Example Code

Synchronized Analog Output on Multiple Devices (RTSI/PFI) 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)

    Software

  • LabVIEW

    Driver

  • NI DAQmx

Code and Documents

Attachment

Download All

Overview

This VI shows how to create two Analog Output tasks on two separate devices and use one hardware clock to control both devices.

 
Description

In this case, we set the rate for Device 0, then export the clock to a RTSI line, but you can also use a PFI line. You can externally connect the RTSI bus or the PFI lines, so the two devices can share a clock.

Note that the slave task must start before the master.


Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Configure the physical channels for the two analog output tasks.
  2. Specify the analog output rate and the data you want to output.
  3. Run the VI.

 

Additional Information or References
VI Snippet

018.png

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

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