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:47 PM
11-29-2014 07:07 PM
Well, if there are a thousand ways to do it, there are probably about 995 better ways to do it. 😉
That being said, I believe you have to put a condition for each elapsed time that resets the timer on the first iteration of the while loop. And get rid of the elapsed times with nothing happenning. And learn how to use dataflow instead of sequence structures.
One FYI, too. Leave everything at the defaults except for the stuff you are changing - i.e., the reset and the time target. BIG HINT: i can = 0 only once.
Dataflow basics here.
Another BIG HINT:
Error in and Error out are inputs and outputs that could be used to enforce dataflow.