Measurement multithreading is the concept of controlling a single function on a Data Acquisition (DAQ) device independent of other I/O operations on the same board or on other boards. Figure 1 illustrates some of the communication paths between data acquisition devices and the driver software.
Figure 1. Communication Paths to Data Acquisition Device and Software
In the Traditional NI-DAQ (Legacy) interface, a simple request for an analog input waveform could block the driver software from accessing a digital I/O line, for example, until the analog input operation is complete. Starting with NI-DAQ 7 interface, a user control could access and read/write a digital line, regardless of the state of an analog input operation. In fact, all four DAQ device operations – analog input, analog output, digital I/O, and counter/timer – can operate independently.
A typical application example is a continuous hardware-timed analog input operation running at 1,000 samples/s without interruption. In the example below, the driver software is asking to retrieve the data in blocks of 500 samples each in the upper loop while trying to read a digital line in the lower loop.
Figure 2. Simultaneous Measurement Operations in the Traditional NI-DAQ Programming Environment
In Figure 2, the digital loop typically can execute at only about 100 operations/s because the upper loop is requesting the attention of the driver software. If all of the samples are not available in the upper loop, the function will block all other DAQ operations until the samples are available. This same program logic is recreated in NI-DAQmx in Figure 3 below.
Figure 3. Simultaneous Measurement Operations in the NI-DAQ 7 Programming Environment
The Digital Loop in Figure 3 can continuously sample the digital input line without interference from the Analog Loop. The read VI in the upper loop simply sleeps, yielding the processor, until the samples are ready. The lower loop can operate freely while the upper loop sleeps. Consequently, the lower loop can run at 10,000 operations/s, a 100X improvement over the traditional NI-DAQ programming environment.
NI-DAQmx also includes DAQ Assistant, which reduces the amount of LabVIEW programming in exchange for configuration-based dialog screens. Using DAQ Assistant is still 10X faster than the traditional programming environment and is much easier and faster to program.
Figure 4. Simultaneous Measurement Operations using the New DAQ Assistant
Although the ability to synchronize these operations is easier than ever with NI-DAQmx, you can now operate these functions asynchronously because of measurement multithreading. Demand driver software with measurement multithreading to meet the changing performance and functionality requirements of a PC-based data acquisition system.