If you have two Data Acquisition (DAQ) devices, you may wish to acquire data from both of them, yet not necessarily at the same rate. However what if you want to acquire data from one at a rate of 1 sample/sec, and from the other at a rate of 1000 samples/sec; then write both to a TDMS file although ensuring that the two devices stay synchronised?
The code initialises data acquisition for the two devices and sets the rate using the sample clock.
Then within the while loop, we read data on each channel and write this to TDMS file before closing the TDMS and stopping the data acquisition outside the loop.
LabVIEW 2009 or compatible
DAQmx 9.1.5 or compatible
Steps To Implement or Execute Code:
1) Select channels on DAQ device to acquire from (Device 1 and Device 2).
2) Select TDMS file to write to (either create a new one, or overwrite an existing).
3) Set the desired acquisition rate for each device (currently set to 1sample/sec, and 1000 samples/sec).
**This document has been updated to meet the current required format for the NI Code Exchange.**