LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Implement a count down timer

Solved!
Go to solution

I was hoping someone could help me implement a timer inside my for loop. The for loop executes the same number of times as the size of an array given by the user. I need to have a countdown timer that takes in the number of seconds calculated from another subVI I have. I have a picture attached, hopefully it helps

0 Kudos
Message 1 of 6
(5,018 Views)

Can you use the elapsed time express VI?

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 2 of 6
(4,983 Views)

How would I do that? I would like the timer to countdown at least every two seconds, preferably every second

0 Kudos
Message 3 of 6
(4,964 Views)
Solution
Accepted by topic author nickemp1996

The express VI will give you how much time has elapsed.  So to countdown, just subtract that from how much time you want to start from.

0 Kudos
Message 4 of 6
(4,959 Views)

Would an implementation like this work?

0 Kudos
Message 5 of 6
(4,953 Views)

That looks like it would work.

 

Actually, there is an error in you upper shift register.  You don't want to subtract your value from the shift register.  You want to subtract it from the target.  Get rid of the upper shift register.

 

Note, the lower shift register serves no purpose.

Keep an eye how the express VI is configured with respect to Reset and Auto-Reset.

0 Kudos
Message 6 of 6
(4,949 Views)