Skip to content

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

July 31, 2011

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.

Advertisement
3 Comments leave one →
  1. Mark Anderson permalink
    August 19, 2011 6:30 pm

    This is great, how would you make it so that it could accept an input that would reset the elapsed time to 0?

    • August 22, 2011 4:18 pm

      Hi Mark,

      Please find this updated blog for the solution. Sorry for the late reply. Hope it solves your problem.

      Regards,
      Bo

Trackbacks

  1. Preparing for LabVIEW CLD exam (2) « Let's LabVIEW

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.