LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

elapse vi in sequence structure

Hi Guys

 

I know there a thousand way to implement a time elapse funciton, but i am curious the reason it does not work

 

I set first elapse vi tartget time 5 seconds, second 2 seconds and third 3 seconds in a for loop

 

It works in first and second iteraion. after a few iteration, the second and third elapse vi do not count time any more( I seems that the elapsed time is overwritten by first one. If you probe the three time elapsed output, it  is always 5. 

Download All
0 Kudos
Message 1 of 2
(2,379 Views)

All your elapse time express VIs are independent instances. Resetting one will not do anything to any other instance.

 

Leave only the express VIs inside the while loops and reset them when i=0 (I.e. wire an "=0" between the iteration terminal and the reset terminal.

 

You might also want to place a small wait inside each loop (e.g. 1ms). There is no need to spin them millions of times per second.

0 Kudos
Message 2 of 2
(2,374 Views)