LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Event (Notifier) Missed

Solved!
Go to solution

In my application, I have a notifier registered as a "user event". There are three event structures, each within a while loop; in each event structure this notifier event is registered as "dynamic event". In two structures, the timeout is set to "-1" (infinite). In the third stcructure, the timeout is set to 5 ms; the timeout case takes 500 ms to complete (e.g. using "Wait ms"). An additional event structure fires this notifier event.

 

What happens is that the two structures with infinite timeout catch this event (I think), but the structure with a short timeout and long-executing timeout case misses it. If I make the timeout long and the timeout case execute fast, this structure also catches the event. It looks like during the execution of the timeout case the event is unregistered.

 

An example VI is attached.

 

Is it a bug or am I doing something wrong?

 

Thanks,

 

Sergey Liberman

Message Edited by Cepera on 02-12-2010 10:29 PM
0 Kudos
Message 1 of 3
(4,232 Views)
Solution
Accepted by topic author Cepera

You are doing it wrong.  You need to create separate event registrations for each loop.  You are actually lucky that the two loops are both able to see the event and run.  Once a loop handles an event, it get cleared out of the event queue.  The two structures happen to see it at the same time, but once one or the other completes, it is cleared out of the queue and the 3rd structure never sees it.

 

This has come up before.  This recent thread discusses it.

Message 2 of 3
(4,225 Views)
You are right of course. I forgot that events do not broadcast. A corrected VI is attached. It works fine now. Thanks!
0 Kudos
Message 3 of 3
(4,211 Views)