LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Looking to implement a timer inside a while loop

Hi,
 
I am trying to program a LabView application where I have a mail 'While' loop for continuous data acquisition. Data is continuously acquired and written to file in each iteration of this loop.
 
Upon meeting a certain condition in the data, I plan to implement the start of a timer. However, this timer should not interfere with the normal execution of the while loop. After this timer is complete, I check for a certain second condition and stop my data acquisition.
 
I tried using the 'Wait' function, but could not succeed programmatically in avoiding the delay with interfering with the normal functioning of the while loop.
 
Could there be a simple workaround?
 
Thanks,
-Dude
0 Kudos
Message 1 of 2
(2,798 Views)
Look at the Time Elapsed express VI (Time & Dialog palette). It allows you to reset a timer and check if the time has passed. If you open it (right click>>Open FP>>Convert), you will see it uses an uninitialized shift register to remember the time it started at. Search the site for that term or LV2 globals to learn more about this technique.

___________________
Try to take over the world!
0 Kudos
Message 2 of 2
(2,790 Views)