This content is not available in your preferred language.

The content is shown in another available language. Your browser may include features that can help translate the text.

Log Multiple DAQmx Tasks in the Same TDMS File

Updated Jul 20, 2023

Reported In

Software

  • LabVIEW

Driver

  • NI-DAQmx

Issue Details

I have an application in which I use two DAQmx tasks to acquire data. I have used the DAQmx Configure Logging VI before, which lets me easily save my data to a file. The problem with this method is that I get two separate files for my two DAQmx tasks, and I want to have just one file with all the signals. Moreover, if I use the same file path in the DAQmx Configure Logging VI for both tasks, I get the message:
 

Error -201311 occurred at DAQmx Start Task.vi

File specified is already opened for output. NI-DAQmx requires exclusive write access.

Solution

To log multiple DAQmx tasks in the same TDMS file, you need to use the TDMS file functions in LabVIEW. The DAQmx Configure Logging VI will not work, since it is programmed to lock the file in which it is working to prevent data from being lost when accessed by multiple writers.

Additional Information

Follow the next example to log multiple DAQmx tasks to a single file: TDMS Data Logging From Multiple DAQmx Tasks in LabVIEW.