LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Working with elapsed time express VI

Hi,
 
I am trying to use the express VI "Elapsed Time" to control the execution of an application of mine for a specified number of seconds.  The VI works perfectly if I give a "start time" of 0 seconds and let's take for the sake of example, a "time target" of 5 seconds.  The VI runs for 5 seconds and stops as expected at the end of 5 seconds. 
 
However, if I input a "start time" of 1 second and the "time target" as 5 seconds, ideally, the VI should run for 5 seconds from the "start time".  To my surprise, it stops execution after 1 iteration and displays a value 3.21sec as the "elapsed time".  I get the same output for "elapsed time" even if I input a higher value such as 10 seconds as the "start time".  Attached you will find the VI I made. I would appreciate any help with respect to advising as to why the VI behaves so.
 
Thanks.
 
Ram
0 Kudos
Message 1 of 5
(5,974 Views)
The reason that you are getting 3.21 is because that is the time that has elapsed since Jan 1 12 am 1904 (the actual number you are seeing is something like 3.2155+9 if you make your elapsed time indicator larger). 

If I understand you correctly, if the user sets a start time of 2, and a time target of 5, the eplased time should read 7.

See if this VI does the trick for you.

Kenny
Kenny

0 Kudos
Message 2 of 5
(5,962 Views)
Hi Kenny,

You are exactly right.  Unfortunately, I don't see anything in the VI you uploaded.  Can you resend the VI?

Thanks.

Ram
0 Kudos
Message 3 of 5
(5,952 Views)

I created the VI in labview 8.0  Also, the only difference is the addition of a delay routine in front of the while loop.  Here is a screen shot.

 

Kenny

Kenny

0 Kudos
Message 4 of 5
(5,948 Views)

Hi Kenny,

Thanks for your fast response.  Actually, I tried something very similar by using a while loop instead of a sequence structure.  The new VI I have is attached.

Ram

0 Kudos
Message 5 of 5
(5,937 Views)