From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Multiple Streams of Data of Multiple Channels to Single TDMS File

Code and Documents

Attachment

This example demonstrates how to write multiple data streams synchronously to a single .tdms file using the Advanced TDMS VIs and functions.  It modifies the existing LabVIEW example named "TDMS Advanced - Synchronously Write". 

This VI creates two data groups with two channels of data in each with the interleaved layout.

stream multi snippet.png

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

Comments
SteveBale
Member
Member
on

Hi Tamdemonium.

Please could you elaborate as to why we do not have the potential for a race condition here? If the upper "Set Channel Information" were to execute just before the lower TDMS Write surely the data would get written to the wrong channels? By changing the data your VI generates so it is a fixed value of 0 for 'group 1' and a fixed value of 1 for 'group 2' and then adding in some breakpoints I believe I may have induced this race condition.

Many Thanks,

Steve

NI-hilator
Member
Member
on

I too would like Steve's question answered.

Contributors