LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Fire another event from with an event

How best to fire an event (say a boolean value change) from within another different event (say a second boolean value change) ? I've tried having the second event assign a value to the first boolean's Value Signaling property. This does fire the first event, but its code does not seem to be executed until the end of the second event. Both events have the event's Time property wired to front panel indicators to show when they fire. The first event also has a GetTickCount wired to a front panel indicator. The second event has a sequence structure which first changes the first boolean's Value Signaling property, then Waits 1000 msec, then performs GetTickCount. I would expect the two event's GetTickCount values to be differen
t by 1000 msec but instead they are the same. The Time value of the first event is 1000 msec less however. Why does the first event's GetTickCount not get executed until after the delay in the event which fired it ? The same behavior occurs if CreateUserEvent and GenerateUserEvent are used in a similar manner.
0 Kudos
Message 1 of 2
(2,582 Views)
The time given by the event structure is the time the event actually was generated.

So when you generate a user event and then wait a second until you allow that user event to actually be handled the time of the user event is not one second after. You do not change the time the event fired, you just delay when it is handled.

The same goes for the event fired using the value property.
0 Kudos
Message 2 of 2
(2,582 Views)