Event Sources
User Interface
The first source of events you come across when starting with LabVIEW™ are the events generated by the UI when a user of your application use the mouse or the keybard.
The Event Structure is the way to detect the event and execute the appropriate caode.
Before the introduction of the Event Structure (a long time ago), LabVIEW developpers had to periodically poll the controls to detect interactions with the User Interface 😓. |
Example code: 01a - Event Sources - User Interface.vi


User Events a.k.a Custom Events
User Events, the worst named feature in LabVIEW™
Behind this name, you’ll find the way to create and generate events programmatically.
This source of events is the corner stones of many event driven architectures. The DQMH framework is probably one of the most popular framework based on the LabVIEW™ user event feature. |
Example code: 01b - Event Sources - Custom Events.vi


Event Callback
This source of event doesn’t involve the use of an Event Structure. Once registred to an event the Callback VI is executed each time the event occurs.
This kind of event breaks the usal data flow we are used to |
Example code: 01c - Event Sources - Event Callback.vi



Daqmx
This source of event is problably the less known. With it, you can handle acquistion event in the Event Structure. It makes straigtforward the use of the other sources of events in the loop that handle the acquistion.
This example requieres the NI Daqmx driver to be executed. |
Example code: 01d - Event Sources - Daqmx Event.vi

