LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Some User Events Are Not Triggering Across Different LabVIEW Libraries

Hi everyone,

I'm facing an issue with User Events in my LabVIEW application and would appreciate any suggestions.

Project Architecture

  • I'm using User Events to communicate between different libraries (.lvlibs).
  • One library is responsible for handling PLC write operations.
  • Another library updates a Multicolumn Listbox on the GUI.
  • I will register the User Events during initialization and share the reference while calling the other libraries via launcher so that other libraries can access them.

Problem

Some events are not being received or The Event which is being received are old events not new events. As a result:

  • The corresponding PLC write does not occur, or
  • The Multicolumn Listbox is not updated.

The strange part is that other User Events using the same mechanism work correctly.

What I've Checked

  • The User Event references are created successfully.
  • The references are passed correctly.
  • The Event Structure is registered for the events.
  • No errors are reported when calling Generate User Event.
  • The issue occurs only for a few specific User Events.

Questions

  1. Are there any known limitations or pitfalls when using User Events across different .lvlibs?
  2. Can a User Event silently fail to trigger if the event registration or reference changes?
  3. Is there a reliable way to verify that the generated event is actually reaching the registered Event Structure?
  4. Has anyone experienced this issue in LabVIEW 2026 Q1?

Any debugging tips or suggestions would be greatly appreciated.

 

0 Kudos
Message 1 of 6
(153 Views)

To Question Nr. 2.

 

Yes, of course, this is what the event registration and event registration refnum are for.

 

At the point of event registration, you have defined which object you want to receive events for. Not the point at which you wire it to the event structure, not at the point the loop around the event structure starts to execute.

Check out THIS video from Jack Dunaway to get a better understanding. I think you've got some misunderstanding as to how User Events work.

0 Kudos
Message 2 of 6
(133 Views)

Thank you for your response.

In my application, I create and register all the User Events only once in the Main Launcher during initialization. As shown in the attached block diagram, I call Register For Events there and then pass both the User Event Refnum and the Event Registration Refnum to the different libraries that require them. None of the libraries create or register the events again.

The Event Structure in the consumer library uses the same Event Registration Refnum that was created in the Main Launcher.

 

akash_maxeye_0-1784887897454.png

 

0 Kudos
Message 3 of 6
(71 Views)

You are sending the event registration refnum to multiple event structures? That will mean that each event will be received by any one of the event structures, not by all. You are splitting the events over all of your event structures. In order for all the event structures to receive all events, they each need their own event registration refnum.

Message 4 of 6
(61 Views)

Do not use one register events node for all event structures, use one register events node for one event structure. 

If you fork the wire and connect it to multiple events structures they will fight each other for the events.

 

Edit: See https://www.youtube.com/watch?v=1uyCfLiqB6I 

0 Kudos
Message 5 of 6
(59 Views)

@UliB wrote:

Do not use one register events node for all event structures, use one register events node for one event structure. 

If you fork the wire and connect it to multiple events structures they will fight each other for the events.

 

Edit: See https://www.youtube.com/watch?v=1uyCfLiqB6I 


And here is why.  Each Register for user Events creates exactly 1 Event Queue Reference.   Similar to creating a filter Event that always discards Events across every Event Structure registered for that Event.  The User Event will be processed EXACTLY ONCE across all Event Structure that share the User Event Refnum. 

 

You have accidentally created a queue with 1 source and N readers for your User Event.

 

You can prove this to yourself by using the Event Inspection Window!  That tool is underappreciated but helpful when you repeatedly shoot yourself in the foot.

 

I won't go so far as to say "Never branch a User Event Refnum Wire!"  There may actually be times when you want a single User Event to take an if, then Else action so, LabVIEW allows this syntax.  It is on the developer then to ensure exactly 1 Event Structure registered for the same User Event Refnum is actually active. 


"Should be" isn't "Is" -Jay
0 Kudos
Message 6 of 6
(21 Views)