Retriggerable Tasks in NI-DAQmx


With NI-DAQmx it is possible to define hardware triggered analog, digital, and counter tasks. Additionally, X Series multifunction data acquisition devices (DAQ) natively support retriggerable tasks. A retriggerable task will acquire or generate a finite number of samples each time a digital trigger signal is received. An example of this can be seen in Figure 1. For each edge of the trigger signal, there will be four pulses of the sample clock (the device will acquire or generate four samples). This document discusses how to configure retriggerable tasks with X Series DAQ devices, as well as how to achieve similar functionality with previous generation DAQ devices using onboard counters.

Figure 1. Retriggered Sample Clock.


Hardware and Software Requirements

Only NI X Series multifunction DAQ devices (63xx) natively support retriggerable tasks. However, most NI multifunction DAQ devices, such as M Series (62xx), can be used to implement similar functionality. To determine if your device supports this functionality, see Retriggerable Data Acquisition with NI DAQ Devices for more information.

The NI-DAQmx API is available for LabVIEW, along with text-based development environments such as LabWindows/CVI, .NET, and C++. Refer to the NI-DAQ Readme to ensure that you have a version of NI-DAQmx that supports your device.

Application Architecture

To create a retriggerable Task with an X Series device, use the Start:More:Retriggerable property shown in Figure 2. This property specifies whether a finite task resets and waits for another hardware start trigger after the task completes. When you set this property to TRUE, the device performs a finite acquisition or generation each time the start trigger occurs until the task stops. The device ignores a trigger if it is in the process of acquiring or generating signals.

Figure 2. Retriggerable Task Creation With an X Series DAQ Device.

To achieve retriggerable functionality with previous generation DAQ devices, the hardware start trigger must be used to generate finite digital pulses using the two onboard counters. These pulses will internally be used as the clock source for the analog input task. Figure 3 illustrates this application architecture.

Figure 3. Retriggerable Analog Acquistion Using Onboard Counters.

Shipping Example

NI-DAQmx versions 9.5 and earlier ship with LabVIEW examples that demonstrate using retriggerable analog input and output tasks with X Series DAQ devices. For previous generation DAQ devices, the example Multi-Function-Ctr Retrigg Pulse Train Generation for AI Sample demonstrates retriggerable functionality using counters. This example can be accessed through the LabVIEW Example Finder (Help»Find Examples»Hardware Input and Output»DAQmx» Synchronization» Multi-function).

NI-DAQmx versions 9.5.5 and newer do not include retriggerable examples for LabVIEW 2012.  The previous examples are available in the Additional Resources section below.

Was this information helpful?