09-17-2008 08:57 AM
I've been using the built-in waveform write and read VIs for years, and have always had to work around the 2GB file size limit. I read about the TDMS files, and tried to use the express version to create a multi-channel waveform file. Now I can't figure out how to read the file and pick out discrete records. When I use the Read TDMS VIs (express or not) I get a "Not enough memory" error.
I've attached the VI I used to write the file (LabVIEW 8.5.1). How can I read files created this way?
JR
Aerodyn Engineering
09-18-2008 03:33 AM
Hey,
Did you try the "Read TDMS.vi" which you will find using the NI Example Finder (LabVIEW Help menu > Find Examples).
Btw, when I run your VI I receive an error, because you open the reference of the File twice....., once when writing the data with the express vi, and once with the get file size vi.
Christian
09-18-2008 08:16 AM
Christian,
Odd that I don't get that error. The file size subVI is not necessary; I just wanted some way to track it other than Windows Explorer.
I did try the included example, as well as using the express TDMS read. Neither worked satisfactorily.
09-18-2008 08:06 PM
You get the "not enough memory" error, because by default LabVIEW tries to read the whole file into memory at once. If your file is too large for that, you need to load it in smaller pieces. Use the TDMS Get Properties function to figure out how many values a given channel has (unless you know that already). The property you need is NI_ChannelLength. You can then wire the offset and count inputs on TDMS Read in order to determine which subset of your channel(s) you want to read. In case you need some example code for that, you might want to look into the TDMS File Viewer VI.
Hope that helps,
Herbert
09-23-2008 09:47 AM
Herbert,
I've been unsuccessful still at reading from the file created with the Express TDMS write. Based on experiments using your advice, however, I've been able to see that there is information there, I just can't access it outside of the TDMS file viewer. Using the regular TDMS write, I've been able to create other files that I can read. Experiments are continuing, but I'm cautiously optimistic.
Thanks for your help.
09-23-2008 01:24 PM
01-14-2009 05:07 PM
Dear AEI_JR,
How did you eventually get the TDMS file viewer to work with large files?
01-15-2009 06:42 AM
The post above is misleading, I think. I stopped short of using the Express TDMS read, instead, I use the streaming subVIs. I've attached examples of how I use them (LV 8.5.1).
JR