From 11:00 PM CDT Friday, May 10 – 02:30 PM CDT Saturday, May 11 (04:00 AM UTC – 07:30 PM UTC), ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From 11:00 PM CDT Friday, May 10 – 02:30 PM CDT Saturday, May 11 (04:00 AM UTC – 07:30 PM UTC), ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
To download NI software, including the products shown below, visit ni.com/downloads.
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
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).
Thanks!
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
I don't see how you can use 2 DAQmx starts without generating an error.
Hi smoothdurban,
What error did you see with DAQmx Start Task? You have to start two tasks for the two data acquisition sources that you have e.g. a voltage module and a current module.
If you are seeing an error code, if you go to Help >> Explain Error, you should be able to see a more detailed description of it. Hope this helps!
Hi mumuyumutou,
I've now attached the coding for 2010 as requested on your private message
When the TDMS is created, what does the output look like?
I need to create a program that writes to TDMS with respect to the same reference time from several different sampling rates. The program I currently have, writes with reference to the que time, so the data with lower sampling rates are compressed to the top of the colums. I would like to add blank spaces or repeat values for the data sampled at lower rates.
Would something like this program work?