LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Jim_Kring

Need "TDMS Advanced Spanning" api -- an easy way to span TDMS files and limit individual file size

Status: New

Background

 

The DAQmx apis allow streaming measurements to TDMS. This supports spanning multiple files (by setting the max file size for individual files in the span set), which is very useful.

We need a similar feature for files we're writing to directly (i.e. not using DAQmx) with the TDMS File functions in LabVIEW.

Jim_Kring_0-1707938647270.png

 

Note: The main reason we wanting this feature, right now, is that our files are growing quite large and when we run the TDMS Defragement function, we get out of memory errors in RT on cRIO (e.g. if we have 512MB RAM on our cRIO and the TDMS file is around the same size).

 


Alternatives

We're thinking to do this ourselves, however the TDMS file api does not support checking the file size from a TDMS file reference  (and that's a great idea, too).

I'm not totally sure how this would be added to the TDMS file api -- maybe there could be a "TDMS Advanced Spanning" palette with options for configuring and interacting with TDMS spanning.

2 Comments
Hooovahh
Proven Zealot

I absolutely support this, and any other improvements to TDMS.  For those that don't know I made an API for handling some of this functionality.  It can make a new file based on a time of day, duration, or file size.  But as Jim likely already knows, this only works if you flush the file periodically to get the new file size. 

 

Flushing to disk just to get an idea of how big the file is going to be if you closed is a bit of a pain and wasteful to resources.  If the TDMS file is in memory then you can get a flush of that, and get the size but again this is pretty intense if the file size has grown.  Another option to get a rough idea is to wrap all TDMS Write functions into it's own VIM that keeps track of what was written, and then keep track.  That won't be exact since header information is handled differently but it might be a good enough estimate.  But that requires you to use these new write functions for all access to the file.  All of this is to say there are only bad solutions to this and NI can help make them better.

Jim_Kring
Trusted Enthusiast