LabVIEW Idea Exchange

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

TDMS Flush Time Based

Status: Declined

Any idea that has received less than 2 kudos within 2 years after posting will be automatically declined.

When I am writing to a TDMS file I'm not actually writing to a file on disk.  The TDMS Write function has some buffering and will only write to disk when the buffer is full which is convenient.  You can even set this buffer size so that you can control how often it flushs.  

 

During testing I want to make sure data is being flushed to disk at a minimum of some rate.  Say I want to flush to disk every 5 minutes so if there is a power outage I only lose my last 5 minutes of data at most and not the whole day the test was running.  I can try to find the buffer size that represents 5 minutes of data, but what I end up doing is write code that checks a timer and every 5 minutes perform a flush.

 

But what I think would be a useful feature is to have another property similar to setting the buffer size, and instead of setting the number of data points to be in the buffer to cause a flush, instead set an amount of time to elapse before performing a flush.

3 Comments
deppSu
NI Employee (retired)

According to my understanding what you suggest is:

1) Create a new time interval property like the existing NI_MinimumBufferSize property.

2) In TDMS Write, when deciding whether to flush data to disk, add condition if the elapse time from last flush exceeds the time interval property set, do flush.

Am I right?

Hooovahh
Proven Zealot

I don't know if it needs to be a property but that is probably the easiest way to implement it.  And yes that is basically what this suggestion is for.  Perform a write, and if X amount of time has lapsed since the last flush, then perform a flush now, if not then don't flush.

Darren
Proven Zealot
Status changed to: Declined

Any idea that has received less than 2 kudos within 2 years after posting will be automatically declined.