Pause and continue the time with Elapsed time.vi in LabVIEW

Elapsed Time.vi is a very useful Express vi which returns the elapsed time and can be reseted. Unfortunately there is no pause function in Elapsed Time.vi ( LabVIEW 8.5 to 2009). I had been looking for the examples of pausing and continuing the time in LabVIEW, but there seems not be a simple one.
So I created this myself. It is not efficient in term of excecution time, but it is simple to be made from scratch and memorized.

Basically the shift registers are used to store the previous elapsed time. When it is in the false (run) case, the elapsed time is added to the ‘total elapsed time’. When the vi in the true (pause) case, the total elapsed time is transferred to the start time and the Elapsed Time.vi is reseted (stopped). Hope this will be helpful. πŸ™‚

 

———————–In response to Mark’s question——————————–

So I added the reset function for this SubVI:

When you reset the clock, you simply ‘reset’ it and send ‘0’ to elapsed time. Hope it helps.

Tags : , , ,

7 thoughts on “Pause and continue the time with Elapsed time.vi in LabVIEW”

  1. This is a great code bit to use in the CLD exam.

    One comment: With the updated code, the “Time has Elapsed” boolean indicator will show true only if the set time has elapsed since you have unpaused the VI (since the pause also resets the express VI). No big deal, a small bit of comparison code can create that output easily. Just don’t use this indicator as the gate for the next step of your code in your CLD exam as it is coded here, πŸ˜€

Leave a Reply

Your email address will not be published. Required fields are marked *