LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sort data depending on DAQmx task name to MORE TDMS files

Hello everyone, the thing I need to do is save data from querry to more (for example 3) TDMS files. Here in 1st for loop I just "unbox" data from variant data type. Because data can be a DBL constant or DBL 1D array depending if source is measuring one channel or multiple channels.

Now, the question is, how can I divide these data to 3 TDMS files depending on DAQmx task name, which is part of every cluster with measurement.

 

Thank you guys for any advices!

 

SortDatatoTDMSFiles.JPG

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

Why do you need 3 different files?  Why not just use different groups in the same TDMS file?  It would be a lot simpler if you just used that task name for the group name when you write the data to your TDMS file.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 4
(2,386 Views)

That is true and indeed good idea.

Then let's say there is possibility to save everything to one file. Still, the problem with sorting data (to arrays) by task name and preparing them for save persists. How would you sort all data to arrays of different lenght, when number of devices is variable and also number of channels for measurements is variable.

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

If things are coming from DAQmx tasks, then just read so you get an array of waveforms out and put that in your queue along with the task name.  Then you just do a TDMS write with the array of waveforms as the data and the tasks name as the group.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 4
(2,367 Views)