Page 1 of 1

Looping

Posted: Sat Sep 29, 2007 4:02 pm
by Thales
Hello, I am new in this group and I need a infomation How to start a function that send a serial communication and continuosly read this information until the status change to ON or OFF.

I do not what to press one button to start this.

thank you

Posted: Sun Sep 30, 2007 9:35 pm
by ScottBot
There are several different ways to do this, and a lot of it depends on the data you are receiving. In general, you will want to monitor and possibly process the Received Data property of your Generic Serial Device. For more information on this, read through the 'Receiving Data' section of the 'Generic Serial Device' plugin online help.

If the received data is somewhat complex, you may need to process the data in a script and update discrete properties that are managed by the script to indicate the current state of the received data. You can then use a simple Task to execute actions based on the conditions of the properties set by the task (like 'If PowerState Equals On Then do... something').

If the received data is simple, you may be able to get away without using a script, and simply use a Task that compares the value of the Received Data property with the data you are looking for.