LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Recount time in using function 'Elapsed Time'

Solved!
Go to solution

Hello everyone,

 

Now I have a problem in using function 'Elapsed Time'. Here is my vi. 

In my program, when I click boolean4, elapsed time begins to count time and the boolean light is on, when it pass 3 seconds, the boolean light will be off. What I want is that when the boolean light is off, the function Elapsed Time can stop counting time and reset to 0 without aborting all the program. After then, when I reclick the Boolean 4,it starts to count time and repeats what I said.

 

Thanks a lot!

 

0 Kudos
Message 1 of 3
(2,511 Views)
Solution
Accepted by topic author C.LI

If you want to reset your timer when 3 seconds has elapsed, you need to use that true output as the input to your "Reset" input on the "Elapsed Time" subVI on the next loop iteration.  That said, you may want to take a look at how the timer is used in the LabVIEW CLD Exam solution that I attached.  Take a look at how they use their timer function in there.  The "Timer Engine.vi" used in there is nearly identical to the "Elapsed Time" VI you are using.  This application should give you something of a better idea of how to expand on the idea I'm talking about here.

Message 2 of 3
(2,493 Views)

Hello Shane-C

 

Thank you for replying me. Actually, I had solved the problem, I just added a control boolean on the reset, the function will recount from 0.

Anyway, thanks a lot!

Message 3 of 3
(2,480 Views)