Using NI-DAQmx TSN Features C, C++, or .NET Environments

Updated Feb 13, 2018

Reported In

Hardware

  • cDAQ-9185
  • cDAQ-9189

Driver

  • NI-DAQmx 17.1

Programming Language

  • C# .NET
  • C
  • C++

Issue Details

I would like to use the Time Sensitive Networking (TSN) features of my cDAQ chassis to synchronize measurements or to use time triggers. How do I accomplish this using the C or .NET APIs for NI-DAQmx?

Solution

Performing Synchronized Measurements of the Same Type

The NI-DAQmx driver will automatically synchronize measurements between multiple TSN enabled cDAQ chassis by using channel expansion. When creating the multidevice task, you simply need to specify the channels located on the different chassis. 

For a LabVIEW example of this synchronization, see Figure 3 in How to Achieve High-Accuracy Measurements With NI-DAQmx-Based TSN Devices.
 

Performing Synchronized Measurements of a Different Type

When performing measurements that are of different types (such as an Analog Input and Counter Input), you must have separate tasks in order to perform the measurements, and so cannot use channel expansion as above.

In this case, you can use the TSN features of the cDAQ chassis to start both tasks at the same time by using an absolute time trigger. See Figure 4 in How to Achieve High-Accuracy Measurements With NI-DAQmx-Based TSN Devices for a LabVIEW equivalent of this measurement configuration. Use the following for equivalent functions in the C/.NET APIs:

WAS THIS ARTICLE HELPFUL?

Not Helpful