Understanding Two Way Feedback

Tutorials for working with our software
Locked
User avatar
DemoPad
Site Admin
Posts: 723
Joined: Thu Jun 14, 2012 10:46 am
Contact:

Understanding Two Way Feedback

Post by DemoPad » Thu Jul 05, 2012 3:55 pm

It is possible for the DemoControlHD app to listen to any data coming back from a device, and perform actions when it sees particular data anywhere in the response.

It is important to set the response terminator for the device (defaults to hex 0D) so that the app knows when a particular ‘chunk’ of data has been received. It is also important to check the box ‘maintain connection’ to tell the app to constantly listen to the device.

You then simply set up each response individually, and specify the actions that are to be executed if the returned data (or any part of it) matches the data specified.

Select the device in the project, then go to the 2-way feedback module. You can specify a number of conditions (each with a name) to specify the return data to watch out for. This can either be fixed data, e.g.:

PWR=1

which will cause the associated actions to fire when the data "PWR=1" is seen anywhere in the returned data, OR you can specify a regular expression pattern, e.g.

VOL=([0-9]*)

which will execute actions if data of the form "VOL=[any numbers]" appear in the return data. For regular expressions, the 'result' (the part in brackets) can be captured & assigned to a label or number variable.

Related Topics
Using Regex in Two Way Feedback

Tags
Using 2 two way feedback from device

Locked