12-20-2011 04:47 PM
Anybody know if the "time" inside the event structure is the time the event happened or the time the structure starts handling the event? I'm wanting to use it to "debounce" user inputs (e.g. if a control is changed w/in x sec of the first change event only run the code once).
12-20-2011 05:07 PM
Did you try looking in the LabVIEW Help? From the LabVIEW Help:
The event data provided by a LabVIEW event always include a time stamp, an enumeration that indicates which event occurred, and a VI Server reference to the object that triggered the event. The time stamp is a millisecond counter you can use to compute the time elapsed between two events or to determine the order of occurrence.
Fundamentals -> Event-Driven Programming -> Concepts -> Using Events in LabVIEW.
04-08-2016 03:31 AM
It is the Time the Event occurs. I have testet it.
04-08-2016 09:34 AM
@sletrab wrote:It is the Time the Event occurs. I have testet it.
Did you also check the time stamp difference between your post and the previous one?
09-15-2023 10:21 AM
Thank you, the previous answers did not answer the question.
09-17-2023 02:32 PM - edited 09-17-2023 02:36 PM
09-17-2023 02:56 PM
@wnorris wrote:
Thank you, the previous answers did not answer the question.
Not sure which question you are referring to, but my 2 cents.
The time value is the the start of the handling of the event in the structure. The millisecond timer is the same for all the timing VIs. See below.
If the question refers to limiting the number of rapid fire events you can modify the event structure to limit any events building up in the queue while processing the event. See below.
09-17-2023 04:46 PM
@wnorris wrote:
Thank you, the previous answers did not answer the question.
The thread is from 2016 and answered (some are wrong). What question do you have or what problem are you trying to solve?
The time output is an U32 counter and is only useful relative to another reading. It is compatible with "tick count" and the output of the various simple wait functions.
09-18-2023 10:58 AM
Ah, I had hit the reply button on a specific comment thinking that the forums might nest the reply under that comment like reddit does. It does not.
Anyways, what I wanted to know was whether the time returned in the event structure was "The time that the event was created" vs. "The time that the event structure started executing the case". If the event structure had been idle and waiting I imagine these would be the same, but if the event structure had been busy executing another case (with front panel unlocked) when the event was created I wanted to know if the time terminal would tell me when the event happened even if it was handled later.
09-18-2023 03:03 PM
@wnorris wrote:
Anyways, what I wanted to know was whether the time returned in the event structure was "The time that the event was created" vs. "The time that the event structure started executing the case".
The "Event Inspector Window" under the View Menu is a useful way to watch how events are queued, handled etc.