Retriggerable Data Acquisition with NI DAQ Devices

Updated Jul 24, 2023

Reported In

Hardware

  • Multifunction I/O Device
  • PXIe-6320
  • USB-6361
  • USB-6009
  • USB-6008

Software

  • LabVIEW

Driver

  • NI-DAQmx

Issue Details

  • I am using a repeating external trigger to start my measurement which means I need to configure a retriggerable task for my data acquisition application. What NI devices support this feature and how can I use NI-DAQmx to implement this?
  • Note: If you are not using an external trigger and do not have an X Series device please see the second bullet in Additional Information.

Solution

Depending on your device, re-arming of the device trigger will need to be implemented either in hardware or software:
  • X Series: With NI-STC3 technology on new NI 63xx Multifunction I/O (X Series) DAQ boards, analog channels no longer require the use of counters to implement retriggerable acquisitions and triggers can independently rearm themselves without software intervention. Using the 100MHz internal base clock and only taking one sample per trigger, the maximum trigger rate can be 10 nanoseconds
  • Non X Series with no available counters: If you are not using an NI 63xx Multifunction I/O (X Series) DAQ board, analog input is not inherently retriggerable. However; you can retrigger a board by starting and stopping the DAQmx task each time a trigger is received. This will reconfigure the settings on the card and therefore re-arms the analog hardware trigger. This method, however, introduces significant hardware delays and hinders the ability to detect triggers that are close together. This may present issues where triggers are missed. One way to reduce the hardware delay is to explicitly set your task to be in the committed state before setting your task. Doing this eliminates the need to reconfigure the card with your analog input settings and can reduce some of the delay associated with this method, but there will still be an issue with delay involved in re-arming the trigger. See the NI-DAQmx help file linked for more information regarding the committed state. You can explicitly set your task to be committed by using the DAQmx Control Task VI under Functions Palette » Measurement I/O » NI-DAQmx » Task Config.

  • Non X Series with available counters: Another solution is to use one of the available counters on a Multifunction DAQ board to generate a counter output pulse train. This pulse train will generate a finite pulse train that is internally routed to be used as the AI sample clock. The AI task will essentially be a continuous acquisition that is always running but will not acquire any samples until it receives the pulses from the counter's retriggerable pulse train to use as the sample clock. 

Additional Information

  • In LabVIEW 2011 and earlier there is an NI-DAQmx Example for retriggerable analog input called Multi-Function-Ctr Retrigg Pulse Train Generation for AI Sample Clock.vi. It is found in the NI Example Finder (Help»Find Examples) under Hardware Input and Output » DAQmx » Synchronization » Multi-function. That shipping example no longer ships with LabVIEW 2012 and later, but the Legacy NI-DAQmx examples can be downloaded from here .
  • Without an external trigger you will only be able to use the method described in the second solution (Non X Series with no available counters) by starting and stopping the task, this imparts significant overhead and may not be able to react fast enough to triggers.