From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Synchronize Two Counter Output Tasks Using LabVIEW with DAQmx

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Hardware

  • Data Acquisition (DAQ)

    Driver

  • NI DAQmx

Code and Documents

Attachment

Overview

This example uses an AI start trigger generated by a dummy AI task to synchronize two counter output tasks.


Description
This program works by using the AI Start Trigger to start the counter output tasks.  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.

 
Requirements

  • LabVIEW 2012 (or compatible)
  • NI-DAQ 12.0 (or compatible)

 

Additional Information or References
VI Snippet

3-219.png

**This document has been updated to meet the current required format for the NI Code Exchange.**

Regards,
Jim Schwartz

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
TeraTech
Member
Member
on

Thank you for this great example. I got it to work on an NI-6363.  However, I would like to use a dummy digital task. Is that possible? This is the change I made for digital but it times out at the wait until done. Sync Two Counters_DI.png

 

 

^TeraTech.

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Check out this lengthy post of mostly complaints)
TeraTech
Member
Member
on

Got it!

Sync two counters_DO.png

 

^TeraTech.

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Check out this lengthy post of mostly complaints)