Sheffield LabVIEW User Group

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW Tip: Using DAQmx Events

Instead of using a whole process to sit and wait for DAQmx data, you can register to receive DAQmx events when certain situations arise in the DAQmx subsystem. Using event-based programming allows your process to continue to perform work (handle other events), whilst waiting for data, without requiring a separate process. In this simple example, the top sequence is a standard DAQ Read, whereas the bottom sequence registers for a DAQ event (every 100 acquired samples) and can still process any number of events whilst waiting. When the specified samples are available from DAQmx, it will fire the event and call the event case shown.

NOTE Although in this simple example, the events look a little more complicated, event based programming has many benefits. It is one way of keeping an application simple without resorting to multiple threads, but also as you progress, it is very powerful when you start tweaking data rates and other DAQ task properties, where the top sequence can run into such problems as buffer overflows and timeouts.

LabVIEW Tip: Using DAQmx Events

Want to receive our LabVIEW Tips via email each month? Subscribe to our newsletter and we’ll add you to our monthly mailing list. We will not pass your details on to any third party organisations.

Message 1 of 2
(6,495 Views)

Great, useful tip Austin.

0 Kudos
Message 2 of 2
(5,188 Views)