LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

calculate tdms file size

How do I calculate .tdms file size on disk?

 

I know how many properties and channels and the number of data points/channel.  I need a way to approximate the file size on disk.  I am hoping there is some formula out there I can use.

 

Thanks

 

Dan

Dan Shangraw, P.E.


   

0 Kudos
Message 1 of 4
(3,029 Views)

Hi Dan,

 

I am not aware of a simple formula to work this out because its not a normal binary file. The TDMS format consists of two separate files, a binary file and a binary index file. This combination makes any calculations difficult. So I think the solution would be complex.

 

Can I ask why you'd need this? 

 

Regards, 

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
0 Kudos
Message 2 of 4
(3,018 Views)

I am designgin a file format I and I need to figure out how much the file will take up on disk.

 

If I have X channels of Y length approximatly how much disk space will this take up?

 

Dan

Dan Shangraw, P.E.


   

0 Kudos
Message 3 of 4
(3,007 Views)

Hi Dan,

 

It depends how your writing to the tdms file, because if your writing to it in chunks - the software creates a new header each time.

 

I found this forum on the subject- was useful, which also contained this link on tdms.

 

I can only suggest that you write some test code to see if there is a linear relationship.. but I feel there are too many variables to take into account.

 

Please let me know how you get on.

Regards, 

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
Message 4 of 4
(2,989 Views)