11-10-2020 01:22 PM
I'm trying to keep track of the TDMS File size as I write it and my options are as follows:
1) Log (Double - Seconds Count) & (Double - Data)
2) Log (Double - Data)
When I log just the data, I just take the 8 Bytes that make up the double and add them to the total count which I keep in a U64 shift register. I am able to accurately cut off the TDMS file and start a new one at a pre-determined size.
When I log the data + timestamp (seconds double), I am almost high by a factor of 10.
I assumed the math was the following:
(Data Size) X (# of Channels) X (# of Rows of Data) + (Metadata) = File Size
So if that is true then why attached file so off in size? Windows says its 9M, but when I add up the data it should be around .9M.
(Data Size = 😎 X (2 Channels) X (62436 Rows) = 0.998976M
Let me know where my logic is flawed.
Thanks!
Solved! Go to Solution.
11-10-2020 01:30 PM
Try defragmenting the TDMS file after you're done writing.