07-10-2012 12:54 PM
Hi all
I want to read data from a device periodically, for example every 2 seconds.
but I want to use event driven programming in order to response user events.
now I don't know how to do this......!!
maybe I should use timed loop or timed sequence structure
if I use this structures, should I use then inside the while loop or outside the while loop( I mean the while loop that contains the event cases)?
please help me and accept my thanks....
07-10-2012 01:01 PM
You ned to run these in two separate loops. Look at the Producer/Consumer template. Put a two second time-out on the Dequeue Element and you have a loop that will run every two seconds. The loop should also handle information from the event structure.
Separate loops is the best way of handling this.
Rob