Example Code

TDMS Data Logging From Multiple DAQmx Tasks in LabVIEW

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.

    Driver

  • NI-DAQmx

Code and Documents

Attachment

Description

Overview

 This example shows how to log data to a single TDMS file when coming from more than one DAQmx acquisition tasks.

 

Description

This example showshow to send data to a TDMS file from two DAQmx tasks that are running at the same rate. This method can be really useful when trying to substitute the DAQmx Configure Logging VI with multiple tasks running in different devices but are all in the same application.

 

Hardware and Software Requirements

LabVIEW Base Development System 2012 or higher.

NI-DAQmx 12.0 or higher.

 

Steps to Implement or Execute Code

  1. Download the attached VI.
  2. Select your analog inputs in Task 1 and Task 2.
  3. Select an Acquisition Rate.
  4. Select a TDMS File Path.
  5. Run the VI.
  6. Click Stop when finished logging.

 

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