08-18-2011 06:16 AM
I am attempting to trigger an case every 2 seconds after a cetain time say 12h00 i.e. Every couple seconds after 12h00 a case statement needs to run.
Attached is a vi of what my code look likes.
I need help in figuring out how to trigger the event every couple second.
08-18-2011 07:01 AM
08-18-2011 10:16 AM
It sounds as though you would be better off with a Producer/Consumer architecture. You would have one loop (the Producer) with the event structure handling the user interface events and a second loop (the Consumer) which actually does all the work in a state machine. The task whihc needs to be repeated would be handled in the state machine. The event structure would only send commands (including parameters) to the state machine. So one command could be Repeat and the parameters could be Start Time and Repetition Interval.
This approach is much more robust than your nested sequence structures.
Look at the examples and Design Patterns which come with LV.
Lynn