01-16-2013 02:01 PM
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?
01-16-2013 08:32 PM
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.
01-21-2013 02:32 PM
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.
01-21-2013 07:48 PM
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.