LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview 8.2 Elapsed time text seconds

How come in Labview 8.2 when using the time function Elapsed Time the Elapsed time text goes to 60 seconds? It should be 0-59, but it goes to 60. Anybody else seen this problem?
0 Kudos
Message 1 of 7
(4,570 Views)
Handbone,

the information you provide is insufficient so i take the freedom to asume many things:
a) you talked about the express VI "Elapsed Time" and configure it to 60 seconds
b) after running the application, when the Elapsed Time.VI is executed, you see 60 seconds when the boolean output is set to TRUE.

This is expected behaviour. The time desired is elapsed (boolean TRUE) only AFTER the timestamp reveals a difference greater than the time desired; the VI itself only checks for the timestamps, compare the difference to the desired time to elapse and sets the boolean in regard to the comparison.
So it also depends on how often you call this VI during your execution; it is possible that "time elapsed" can easily "be off" more than several seconds.....

hope this helps,
Norbert
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 7
(4,565 Views)
Norbert,
 
I am wiring 900 seconds to the Elasped Time VI. When running the VI, the output from Elapsed Time String when in a loop reads.
0,1,2,3,... 60, 1:01, 1:02, 1:03, ... 1:60.   I have never seen time displayed this way. One would think it would go to 1:59 and the next output would be 2:00.
0 Kudos
Message 3 of 7
(4,550 Views)
That's a much clearer explanation.

That is, indeed, a strange issue. O_o
0 Kudos
Message 4 of 7
(4,539 Views)
It's a rounding issue when creating the string. I set up the following:

and saw it go to 1:00 when it hit the 60-second mark. I never saw it say 0:60. Notice that the numeric indicator is 60.3.

Then, when I ran it a second time, I got this:

Notice that the numeric indicator is 59.9. This time you get the 0:60.




Message Edited by smercurio_fc on 01-23-2008 05:32 PM

Message Edited by smercurio_fc on 01-23-2008 05:33 PM
Download All
0 Kudos
Message 5 of 7
(4,531 Views)
smercurio,


your post sheds some real good light on this issue. You are correct, the issue is created by the way how the "elapsed time" string is formatted. There is a conversion from double to string using %.02d, which does not truncate but round the double to the next integer.
So as a fast workaround, i would suggest to use the double output "Elapsed Time (s)" and create a string on your own:



hope this helps,
Norbert

Message Edited by Norbert B on 01-24-2008 02:38 AM
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 6 of 7
(4,519 Views)
I found another, improved method to display the time correctly:



See this link for further info.

hope this helps,
Norbert


Message Edited by Norbert B on 01-24-2008 02:49 AM
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 7 of 7
(4,517 Views)