LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

time count down problem

Solved!
Go to solution

Hi,

Please I need help with time count down display.

I am using a state machine. In one of the cases ‘rest’ time is calculated. In the next case the vi waits for the ‘rest’ period to expire before continuing with the next case (the stop button should remain active the entire time). The ‘rest’ time count down should be displayed.

I tried to use Elapsed Time.vi but it works properly only the first time around. Can somebody please help me? I am attaching a sample VI.

Also how can I accomplish displaying the Program Run Time with no interruptions?

Thank you in advance for your advice and help.

Attached: Display Elapsed Time.vi

0 Kudos
Message 1 of 3
(2,277 Views)
Solution
Accepted by topic author Broni

It is because you have the Elapsed Time Timer set to Auto-Reset.  As soon as the time has elapsed, it will start counting again.

 

Turn off Auto-reset.  Put a True value into a shift register in the state that leads into the DoSomething2, wire that shift register to the Reset input.  Let the default be False for all other cases of the state machine.

 

Now when you get ready to go to that state, the True value placed into the shift register will reset the timer.

Message 2 of 3
(2,264 Views)

Thank you very much.

It is exactly what I needed. Works great.

0 Kudos
Message 3 of 3
(2,200 Views)