LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Elapsed Timer Too Long?

Is there a limit to the duration I can input into an elapsed timer VI? In my program the user can specify a duration of up to 24 hrs. My program is supposed to hold current conditions for the specified durations. When the user sets it 1, 2, 3 or four hours it holds the current conditions fine. When they set it to 24 hours the current conditions are not held for 24 hours. Is this too long of a duration for this VI (86,400 seconds)?
 
thanks.
0 Kudos
Message 1 of 7
(3,447 Views)

Hi rchaoua,

i don´t know which time you can connect to that field, but independent of that i think it is better to use a smaller time which is a multiple of it and run in a loop, so you have anymore the chance to stop your program.

Mike

0 Kudos
Message 2 of 7
(3,443 Views)
You connect the time in seconds. The elapsed time is good b/c it runs but does not directly interact with my program. When the time is up it sends out a boolean true to let the program know that this section of the program is completed. It seems so much more simpler than using a smaller timer and loop. I just don't know if there is a limit to the value I can input. If there is the loop a smaller timer will be my fallback plan.
0 Kudos
Message 3 of 7
(3,437 Views)
The question regarding maximum duration a elapsed time VI has still not been answered. But I have another question; Can you have multiple elapsed time VI in a single piece of code and not have it affect the other elapsed VIs? I have three elapsed timers in my code (in different panels) and get the sneaking supsicion that they are not behaving nicely with each other. But I am not sure. I was hoping someone has expereince with this scenario and could shed some light.
 
Thanks
0 Kudos
Message 4 of 7
(3,418 Views)


rchaoua wrote:
The question regarding maximum duration a elapsed time VI has still not been answered.
You can convert the "elapsed time" express VI to a plain VI by "right-click...open front panel" and inspect the code yourself. There are no secrets! You can see that it converts the timestamp to DBL and operates on the lower precision DBL values. This should be sufficient for much more than 24 hours, so something else is wrong in your case.
 
Can you attach an example that shows the incorrect behavior (=premature elapsation?). 😄


rchaoua wrote:
But I have another question; Can you have multiple elapsed time VI in a single piece of code and not have it affect the other elapsed VIs?  I have three elapsed timers in my code (in different panels) and get the sneaking supsicion that they are not behaving nicely with each other. But I am not sure. I was hoping someone has expereince with this scenario and could shed some light.
The crucial subVIs are reentrant and thus there should be no interaction between multiple instances of the "elapsed time" express VI. Each will keep it's own state. Why do you suspect that they interact?
 
 
Message 5 of 7
(3,407 Views)
You might doublecheck the calculation you do to get the number of seconds to wait from the number of hours the user specifies. If you aren't using an appropriate data type, you might be seeing overflow in some of the calculations. For instance, take a look at the picture below. It's only accurate up to 18 hours of waiting. Beyond that, the U16 overflows and produces inaccurate results. Even if you wire this U16 value into a double input for the number of seconds to wait, you'd still end up with the wrong results.





Message Edited by Jarrod S. on 03-31-2008 03:32 PM
Jarrod S.
National Instruments
0 Kudos
Message 6 of 7
(3,396 Views)
I assumed that you are talking about the "elapsed time" express VI that ships with LabVIEW.
 
If you have your own handcoded version, all bets are off with respect to datatype and multiple instances. 😄 Attach the VI and we will be able to tell.
0 Kudos
Message 7 of 7
(3,385 Views)