LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Save multiple sample rate data to TDM file

Hello, LV connoisseurs

I use 2 Multifunction boards and LV 7.1 to gather slow and fast data simultaneously, 'slow' being 10 temperatures at 150 Hz, 'fast' being 12 pressures at 15 kHz, rate factor between slow and fast is constant 100. My acquisition is set to 'continuous' with blocks of 15 and 1500 resp., so each sample set takes 0.1 sec.

 

Currently, I use 2 loops, one for each board. Slow data are written to .lvm, fast to .tdm, and this works fine.

 

But I wonder if in this configuration it might be possible to

- use one loop only (yes, trivial) with the main target being to

- write data into two channel groups of one .tdm-file, one for the 'fast' the other for the 'slow' data?

If at all possible, would this require the consumer/supplier scheme such as to allow the interspersing of data or can I do this directly?

 

Thank You for your input.

Michael

 

0 Kudos
Message 1 of 3
(2,729 Views)

Hi Michael,

 

so if I understand right, you want to write two streams of data that come at different rates to the same tdms file, but to different channels.

 

You can do that even if you keep the two loops. Just use the reference to the file in each loop, and write to a different channel in each loop. You can use the same file in different parts of a VI as long as you have a reference to it.

 

Just make sure you close it nicely at the end to avoid any memory leaks.

 

I hope this helps.

Regards, 

0 Kudos
Message 2 of 3
(2,704 Views)

Just to make the distinction, you should probably be using TDMS (the S stands for streaming) instead of TDM if you are continuously writing data. TDM is more for writing a snap-shot and doesn't work so well for continuous data (big memory leaks last time I used it back in '06).

 

Also, as no time data is stored you probably also want separate timestamp channels then for your fast and slow data.

 

As mentioned, it is no problem having multiple writing loops using the same TDMS reference.

0 Kudos
Message 3 of 3
(2,689 Views)