03-06-2024 06:39 AM
Hello,
I am attempting to initialize controls in my actor's "Actor Core.vi" by sending messages in the actor's "Pre Launch Init.vi" to trigger events to be handled by dyanmic event loops in Actor Core.
I thought this was an accepted method to "load the event queue" in Pre Launch Init, however, whenever I pass a message in Pre Launch Init.vi, it never triggers the corresponding event in Actor Core. I have tested this and I must wait until after the event is "registered" in the event registration terminal.
Is this intended behavior? Is there no way to pre-load the event queue in Pre Launch Init to then execute when Actor Core starts up and begins receiving messages and processing events?
03-06-2024 08:07 AM
This is intended behaviour. If you want to go this way, you have to create your events, register them with an event registration refnum, then generate the events.
You would need to store the event registration refnum in the class data and read it in the actor core.
There is a very nice presentation about user events in LabVIEW: https://github.com/donyaco/LabVIEW-User-Events-Tips-Tricks-and-Sundry
Look at 02 - Demonstration - Event Queue Decoupled from Generation.vi for what you are experiencing.