LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Newbie timer question.

I'm working on a program that works inside a while loop. The program starts when runned, stops when the stop button of the while loop is pressed. Right now, I have a way of making a timer for the program, but it doesn't work the way I want. Right now, when the program starts the timer starts, and when it reaches a certain time, the whole program stops. I wonder if I can make something like this: run the program, when I chose to, I start a function of the program that will be controlled by the timer, and when the timer reaches the certain time, the function that the timer was controlling will stop but the program itself won't. Thanks for your time.
0 Kudos
Message 1 of 3
(2,675 Views)
WIth LabVIEW 8.2 use the Elapsed Time VI as in the following screenshot. You could easily pass in the amount of time you want to elapse before the loop processing stops. Loop processing continues until the designated time elapses.






Message Edited by Bill@NGC on 07-22-2007 01:33 PM

Message 2 of 3
(2,674 Views)
If you want to keep the program running, don't stop the while loop. SImply place a big case structure in your while loop and in one case you place the BT ("before timeout") code and in the other case the AT ("After Timeout") code. You can use the boolean output of the "elapsed time" to select the approriate case. Make sure to disable "auto reset".
0 Kudos
Message 3 of 3
(2,649 Views)