LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simultaneous writing of different DAQmx tasks to TDMS files

Hi,

I am using a 6368 to moniter several different voltage readings simultaneously on a circuit. I would like to have each of these channels sampling as close to the 2MS/s limit as possible, while writing the data to disk. From what I've gathered, it is not possible to write 2 separate tasks to the same TDMS file without a dramatic decrease in performance. Is there a way to have 2 or more tasks being written simultaneously to 2 respective TDMS files? I've tried this with no luck (both tasks embedded in the same derterministic loop, maybe they need to be in separate loops?), can anybody point me in the right direction? I am assuming there must be a way, otherwise there'd be no point to the simultaneous sampling...

 

Thanks!

0 Kudos
Message 1 of 4
(2,791 Views)

Hello,

 

you should be able to use more than one TDMS files at the same time. What exactly was the problem? Can you attach your code?

There is another problem as well. File operations are inherently non-deterministic, so if you have them in a loop that loop will be non-deterministic even if it is a timed loop.

 

Daniel

Dániel Fülöp
Field Application Engineer (CLA, CTA)
National Instruments
0 Kudos
Message 2 of 4
(2,783 Views)

Hi Daniel,

Here is my code so far. Right now I am just using 1 output channel to send a repeating voltage signal into a circuit, and measure the voltage from 2 other parts on the circuit and record the data. The ultimate goal is to use all 16 channels at the full 2MS/s/ch, and have a record of the data saved to disk at some point.

 

I am still new to labview so I suspect there are a number of things I am doing wrong.

0 Kudos
Message 3 of 4
(2,770 Views)

Hi gimNPC,

 

The issue you're having isn't actually caused by the TDMS logging; an error is occuring because it's not possible to read from a single DAQ device using multiple tasks simultaneously. Instead, you can actually perform a read from multiple channels using a single task. This is done by selecting multiple channels from the DAQmx Physical Channel selector (in the dropdown channel menu, press 'Browse...' and then select the channels using the shift or ctrl key).

 

As such, your second conflicting task can be removed entirely. The data will be written to a single TDMS all at once in array form. Hope this clears things up!

 

James M.

Applications Engineer

National Instruments

James M. | Applications Engineer | National Instruments
0 Kudos
Message 4 of 4
(2,736 Views)