PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

How do terminate a wait condition in a loop?

I have a while loop that uses a Wait.vi to set the timing. When I terminate the loop, it waits for the next iteration of the "wait" to complete. How can I terminate the wait in the middle of an iteration?
0 Kudos
Message 1 of 2
(3,112 Views)
There is no way to stop a wait function. In order to get the behavior you want you need to make your own wait function, that uses the tick count VI and just checks to see if the total time has passed, or if you have asked it to stop.

Take a look at the attached VI.
0 Kudos
Message 2 of 2
(3,112 Views)