LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

event structure "time"

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).

0 Kudos
Message 1 of 12
(7,015 Views)

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.

Message 2 of 12
(7,011 Views)

It is the Time the Event occurs. I have testet it.

Message 3 of 12
(6,081 Views)

@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? Smiley LOL

 

Message 4 of 12
(6,059 Views)

Thank you, the previous answers did not answer the question. 

0 Kudos
Message 5 of 12
(1,733 Views)

It has actually been answered.

 

Edit: My bad, I misread the previous post. (BTW why can we edit an answer, but not remove it?).

0 Kudos
Message 6 of 12
(1,685 Views)

@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.

 

mcduff_0-1694980349604.png

 

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.

 

mcduff_1-1694980523804.png

 

 

0 Kudos
Message 7 of 12
(1,676 Views)

@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.

0 Kudos
Message 8 of 12
(1,661 Views)

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. 

0 Kudos
Message 9 of 12
(1,616 Views)

@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.

Message 10 of 12
(1,597 Views)