11-29-2014 06:32 PM
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.
11-29-2014 06:40 PM
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.