LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Maximizing TDMS streaming speed

Wow. That was a HUGE gain! copying a lot of the "TDMS Advanced - File Write Speed Test (Asynchronous)" into this code seemed to let me write my data at 230kHz. I need to verify it now though, and I am having issues with re-loading the data after the fact to make sure it is OK. Do I need to use TDMS Advanced reads whenever I use a TDMS advanced write? I am trying to load the 2D data but I only seem to get an array of 1x912 instead of an array that is 150000x912. Any guesses as to what I am doing wrong?

0 Kudos
Message 11 of 14
(1,353 Views)

No, you can use standard TDMS Read for a TDMS file which is produced by TDMS Advanced Write.

One thing to notice that you can write 1D/2D array to Asynchronous Write for one channel, but inside TDMS it will be treated as continueous 1D array of raw data. Thus, when read data out by TDMS Read, the "data type" should be 1D array instead of 2D and then reshape the 1D array to 2D as you need.

0 Kudos
Message 12 of 14
(1,338 Views)

Thanks for all the help deppSu. That worked great.

 

Final question: What I currently have is great for saving a single array/matrix of raw data. Can I simply repeat the process if I want to add additional data the file? i.e. metadata about this particular data set (voltage, current, etc...)? I have attached a simple example that works (modified from the "TDMS Advanced - Append Multiple Headers.vi" example), but I want to be absolutely sure that what I am doing is correct and I won't somehow create a corrupt data file because I have not configured one of the sizes correctly.

0 Kudos
Message 13 of 14
(1,316 Views)

I'm glad it works in your case.

I think you did right. Only one thing to improve is that you can use "TDMS Reserve File Size" only once with all the size you anticipated to write instead of calling it every time before the write call.

0 Kudos
Message 14 of 14
(1,301 Views)