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. 

0 Kudos
Message 1 of 3
(2,514 Views)
0 Kudos
Message 2 of 3
(2,505 Views)

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.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 3 of 3
(2,495 Views)