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.:
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.
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.
Using Regex in Two Way Feedback
Using 2 two way feedback from device
Tutorials for working with our software
1 post • Page 1 of 1