LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Register for user event in SubVI

Hi there,

I have a main vi which has a subpanel containing another vi. My main vi creates and registers a user event. On firing this event from my main vi, it is handled in the main vi event structure allright.

My subvi also contains a event structure which runs ok.
Now i want the subvi to register for the same user event i created in the main vi. But how do i register for a user event created in another vi?

Thanks in advance,

Marco
0 Kudos
Message 1 of 4
(3,153 Views)
Marco,

If I understand you correctly, you want to register two different Event Structures for the same User Event. Here is what you need to do:

Each Event Structure must have its own Event Registration Refnum (ERR). Although this requirement is not strictly enforced by the editor, you may experience strange behavior and hangs if you try to handle the same Event Registration with multiple Event Structures. Next, create an ERR for each Event Structure and wire the same User Event Refnum (UER) into both Register Events nodes. Now, when you fire the user event, it will be enqueued into both Event Queues and can be handled by each Event Structure seperately.

Best of luck,

-Jim
Message 2 of 4
(3,153 Views)
I had both event structures wired to the same ERR before, didn't work at all. This works allright. Thanks Jim.

Cheers,

Marco
0 Kudos
Message 3 of 4
(3,153 Views)

Jim's old post helped me immensely today!

 

Thanks 🙂

0 Kudos
Message 4 of 4
(2,508 Views)