Synchronizing Two Counter Tasks in NI-DAQmx

Updated May 12, 2023

Reported In


  • LabVIEW


  • NI-DAQmx

Issue Details

I need to synchronize two counter tasks on the same National Instruments DAQ device, how do I do this in NI-DAQmx and LabVIEW?


There are two approaches for synchronizing two counter tasks on the same NI DAQmx device: 
  1. Use an Arm Start Trigger for both counters. By pointing to the same start trigger on a PFI or digital line, the counter tasks will not respond to any Start Triggers until after the Arm Start Trigger occurs. The Arm Start Trigger is set using a DAQmx Trigger Property node.
  1. Create a dummy Analog Input task, and use the AI Sample Clock as the clock source for both counters.   The AI dummy task sends an AI start trigger when the AI task starts, thus starting the counter. This trigger could be used to start other DAQ task. By setting up the DAQmx Timing VI in the Counter task to reference the same Sample Clock, we are able to ensure that the tasks start when the AI task clock starts. 


Additional Information

For an example of this approach with Counter Output tasks, you can see the NI Verified Community example on synchronizing two counter output tasks