LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

User event only works when debugging

Solved!
Go to solution

Hi,

 

I'm having problems in a VI which registers for two different kinds of user events. One of them has an array of unsigned words as data, and the other has a single boolean. When the event with unsigned words array as data is received, the VI sends a notification back to the VI that fired the user event. In the snippet shown below, I'm just sending the notification back with another constant array as data, only for testing. 

When I try to trigger this event on the other VI, this event is not received in the VI that registered for the event. I noticed that when the "Wait on Notification" node in the other VI timed out. But, for some reason, when I run the VI that triggers this user event step by step (or even insert a breakpoint somewhere in the code, before firing the event) the event is received instantly.

The other user event in the VI snippet (with boolean data), in the other hand, is always triggered. Does anybody know a reason for that to happen? Does that have something to do with registering for two user events? I don't remember if I ever tried to do so, and haven't seen that in the code examples, too.

 

Thanks!

Best regards,

Henrique BaronMultipleUserEvents.png

0 Kudos
Message 1 of 2
(2,231 Views)
Solution
Accepted by topic author hbaron93

Nevermind, just found the problem. The launching of the VI (thus the call of the "Register for Events" node) and the triggering of the event where happening in the correct order, but almos simultaneously, so that the VI in the snippet had no time to register for the event before it was triggered.

0 Kudos
Message 2 of 2
(2,215 Views)