LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Elapsed Timer Bug ???

Solved!
Go to solution

Is this a bug or why does the exact copy of the timer placed in two different events act differently?

0 Kudos
Message 1 of 8
(2,970 Views)

I cannot view your file but I assume you are dropping two separate instances of the Express VI? Each clone behaves independently, so if you set a time target on one it does not effect the time target of the other, for example.

0 Kudos
Message 2 of 8
(2,949 Views)

Here is a screen shot of the two cases and the front panel shown twice. Please forgive the quick and crappy editing but can you see this JPG? Im not sure if what you are saying applies here

0 Kudos
Message 3 of 8
(2,942 Views)
Solution
Accepted by topic author JeffreyS

Because your Init case only runs one time.  It never gets back around to check the Elapsed Time again!

0 Kudos
Message 4 of 8
(2,935 Views)
Solution
Accepted by topic author JeffreyS

@JeffreyS wrote:

Im not sure if what you are saying applies here


What was said completely applies here.  Each instance of the Elapsed Time keeps its own state (start time, reset time, etc).  So your init will never see the time elapsed as written.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 8
(2,934 Views)

Thanks for replying both of you.

Yes, i changed the event enum to flip back to the init event and they both go on now. Say I have a while loop and this timer is set to 10 seconds. That is all fine and good. Will the 10 seconds be effected if I send the program through a 1000 different loops before coming back? ie: will the timer's 10 seconds take longer than 10 seconds. Why even create a timer this way?

0 Kudos
Message 6 of 8
(2,920 Views)

If it takes you 3 minutes to get back around to check if the 10 second timer has elapsed, then you are certainly not going to know it has elapsed until you get back to it.

 

"Why even create a timer this way?"

I don't know what you even mean by that question.

 

Elapsed timer does exactly what it says.  It tells you how much time has passed, and will tell you with the boolean if that time is greater than your setting.

 

It's like looking at your watch, if you forget to look at it, you won't know what time it is or if a given amount of time has passed.

0 Kudos
Message 7 of 8
(2,911 Views)

I think you are saying the timers timing wont be impacted and they loop just needs to check if the elapsed time went by. We incorrectly assumed this would be more like a stove timer. One sets it, walks away, the alarm goes off wither you are there or not to check it. The checking would be built into a deeper level of sub coding. Thanks for the clarification.

0 Kudos
Message 8 of 8
(2,894 Views)