LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

stopwatch that remembers the time when it was stopped to be used to calculate te average.

I'm building an vi so i can calulate the capacity of a condensator. For that i need a stopwatch that starts with counting when i press the start button and and stops with counting when the condensator is fully filled. When it is fully filled the time that is needed must be rememberd so i can later calculate the average of several tests. Can somebody help me? If so i can send you the vi of how far i am. Greetz
0 Kudos
Message 1 of 4
(2,526 Views)
Sounds like you just need the elapsed time function.
0 Kudos
Message 2 of 4
(2,510 Views)

This is how far i got....

 

could you show me how to connect the elapsed time function?

 

Thanks!

0 Kudos
Message 3 of 4
(2,506 Views)

You have a While loop, so you can put Shift Registers on the loop.  When you push the Start button, put the Tick Count (on the Timer Palette, a free-running 1KHz clock value) on the "Start Time" Shift Register.  When you push the Stop button, put the Tick Count on the "Stop Time" Shift Register.  Note that you need to know how to do this only when you push these buttons, i.e. when they go from False to True,

 

Now you have a stable "Start Time" and "Stop Time" (both in milliseconds), and you should have no problem subtracting them and doing whatever manipulation you need to get the value of Elapsed Time into the proper units.  This works as long as your elapsed time is less than 49 weeks (otherwise the Elapsed Time will "roll over").

 

Bob Schor

0 Kudos
Message 4 of 4
(2,476 Views)