08-27-2012 03:47 AM
Hello all,
Context
For my current project, I am developing a specific tdms data viewer to allow the user to easily visualize the measurement data and do some calculations on these data. I load into different Labview variables (double arrays, clusters etc.) the data written in the tdms file (file/groups/channels properties and channels values) and then use those variables for my required operations: I let the user choose the channels to visualize on a graph, I read and display the associated properties etc.
To speed-up to post-processing operations, I load the data from the physical tdms file only once and then use only the Labview variables that are stored in ram memory. This a key point as I expect the user to perform many different operations on the same set of data (i.e. the same tdms file).
Right now, I am loading all the tdms information into different Labview variables (clusters, arrays etc.) and I wrote a sub-vi to access these variables easily ("get channel values sub-vi" "get channel properties sub-vi" etc.). But I realize that I am actually rewriting more or less the different functions already available in the Labview tdms palette.
This is a tedious work as the tmds data structure (file -> groups -> channels, each level having its own properties) is not easy to mimic with labview variables.
Questions
Here is my questions :
1) Is it possible to load an entire tdms file into some king of "virtual tdms file" that would be in the ram memory and then still being able to use the Labview tdms palette functions (tdms get properties function, tdms list contents etc.) on that "virtual tdms file"?
My goal is to be able to use optimized/bugless functions on a well defined data structure rather that rewriting everything from scratch.
Thanks for you advice.
08-27-2012 08:46 PM
The "TDMS Open" node does more than open a file handle, it will load meta data (including file/group/channels' properties) and create index structures in ram for fast accessing any raw data in TDMS file. Thus, my advice is:
1) You can save the efforts to write sub-VIs to preload properties of a TDMS file at least, since they are already kept in memory after the file is opened.
2) Since index structures are presented, the performance to read data of any part in a tdms file will not be affected by the file size and the read performance might already satisfy your application. You can have a try.
08-27-2012 10:42 PM
I think it's impossible to load large TDMS file into memory. Some TDMS file may reach serveral gigabytes. Load them into memory would run out of the memory.