Easily Synchronize and Trigger NI-DAQmx with Channel Expansion

Updated Jul 31, 2023

Reported In

Software

  • LabVIEW

Driver

  • NI-DAQmx

Issue Details

I would like to combine DAQmx tasks or acquire more than one channel from a single task.

I am trying to simultaneously read or write signals on multiple channels using NI-DAQmx, and would like them synchronized without having to program, specify or configure triggers and sample clocks. I have heard about a method called “Channel Expansion.” What is channel expansion and how does it help me simultaneously read or write on multiple channels? Can this be done across multiple devices?

What is the easier way to simply synchronize two channels?

I would like to synchronize more than one module of the same type in my cDAQ chassis.

Solution

Channel expansion is the process of expanding the channels of a data acquisition device to include channels of another device, effectively creating a task with more channels. When channel expansion is utilized, DAQmx automatically routes triggers and clocks in the DAQmx driver level so that the multiple devices are synchronized. This synchronization is necessary in order to make the devices function as one. Channel Expansion is one of the easiest and often most precise way to synchronize multiple DAQmx devices.

Additionally, multiple DAQmx Create Virtual Channel instances can be combined in one DAQmx task, even when channel expansion is used. This allows a single DAQmx task to include different measurement types, as well as channels from multiple devices.

Channels and devices must be comma separated. Below are code samples for channel expansion in LabVIEW and LabWindows/CVI:
 



Note: Channel Expansion is not supported for all NI data acquisition devices in all versions of the DAQmx driver. Multi-device task support for DSA devices began with NI-DAQmx 8.0, for S Series MIO devices beginning with NI-DAQmx 8.1, and for X Series MIO devices in DAQmx 9.0. 
 

Additional Information

General Rules and Conditions: See Channel Expansion Explained  for more information.

Specific Information:
All Devices

  • All channels in the task must be analog input channels of the same type of device (i.e. all DSA devices, or all S Series devices, or all X Series devices, or all CompactDAQ devices), with the exception of the SC Express, which can be combined with certain X Series devices or certain DSA devices.
  • Follow the NI-DAQmx Syntax for Specifying Physical Channel Strings  when entering in channel names. For example, a colon can be used to denote a channel range and commas can be used to separate individual channels or channel ranges.

PXI Devices

  • The devices must all be in a single chassis, and the chassis must be identified in NI Measurement & Automation Explorer (NI MAX). 
PCIe Devices
  • You must use a RTSI cable to connect the devices, and you must identify the cable in MAX.

DSA and SC Express Devices

  • If the channel expansion task includes channels from only PXI-447x devices, one of the PXI-447x devices must be in PXI slot 2. 
  • If the task includes channels from both a PXI-4461/4462 and PXI-447x devices, a PXI-4461/4462 device must be in PXI slot 2.
  • NI-DAQmx accounts for filter delay differences between devices with some qualifications:
    • NI 4461 and 4462 devices lack the ability to compensate for filter delay.
    • For all other devices, if the task includes channels from different device families, NI-DAQmx will acout for filter delay difference between the devices.
  • A task can include channels from multiple DSA, SC Express, and X Series devices given the following conditions:
    • The devices must be in a single chassis, and the chassis must be identified in NI MAX.
    • For groups of more than two devices, every device must be compatible with every other device. For details on DSA, SC Express, and X Series channel expansion device combinations supported by a specific release of NI-DAQmx, refer to DSA, SC Express, and X Series Multidevice Tasks - NI-DAQmx Help . As an example, the devices within the following groups can be channel expanded because all of these devices are compatible with every other device listed in the group:
      • NI 4300/4353/4357 and PXIe X Series devices
      • NI 4330/4331 and NI 449x devices
      • NI 4330/4331/4339 and NI 4464 devices

CompactDAQ Devices

  • All Analog Input CompactDAQ modules and most Analog Output and Digital I/O CompactDAQ modules are capable of combining channels into a single DAQmx task. 
  • All CompactDAQ devices involved in the single DAQmx task must be located in the same chassis, unless you are synchronizing between chassis with 9469 modules. You must have at least DAQmx 9.9 to do this. There is another exception if both chassis are compatible with TSN. You can find more information about TSN technology in this article : Designing Distributed TSN Ethernet-Based Measurement Systems
  • All channels in the task must be of the same type (i.e. all Analog Input modules, all Analog Output modules, or all Digital I/O modules).
  • The number of tasks is limited by the chassis, the modules in use, and the task(s) type. See Number of Concurrent Tasks on a CompactDAQ Chassis Gen II for more information.