04-05-2016 11:57 AM
I notice that the express VI that saves binary data saves it with 8 byte precision.
That ends up being about the same size as the text version. (My data is usually less than 2 bytes).
Is there an easy way to get the express VI to reduce its precision from 8 bytes to 2?
04-05-2016 12:47 PM
First post some code, how you use the functions will determine how well a file is constructed, regardless of the format.
A TDMS file will log the data taking up the same amount of space that the data does in memory. If you log two U64 numbers, the data portion of the TDMS file will take up 16 bytes ((64+64) / 😎 If you want to take up less space in memory, log with a less precise data type, of course you may loose some data in the process.
Basically what I'm saying is if you have a problem with the TDMS file size, it probably is in how you are using it. Simply applying a defrag on your file at the end of a log will probably go a long way depending on the size and fragmentation.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
04-05-2016 12:57 PM
I wonder if compressing it would work.
04-05-2016 01:12 PM
I am using a express VI to save a express data type.
I tried to convert the data to an array but the express VI changed it back.
04-05-2016 01:39 PM
@MikeBenson wrote:I notice that the express VI that saves binary data saves it with 8 byte precision.
Are you referring to the Write Measurement FIle? That uses the Dynamic Data Type, which can only really work with Double Precision Floating Points, 8 bytes. If you use the actual TDMS API, you could cut that down. For instance, I had a file in which we saved all data as DBLs for simplicity sake. Then harddrive space became a factor. So we saved in the TDMS the original data type (I32, I16, DBL). That actually cut the file size by about 25%.
So this turns into the classic "Express VIs will get you started, but don't expect to go far with them".
04-05-2016 02:01 PM
If compressing your file in a zip or any other archive does result in a significantly smaller file, then that is a sign that your TDMS is fragmented. Best advice is to not use express VIs, and to do the work with the TDMS API yourself. Avoid dynamic data types. And Post your code, or a sample of it demonstrating what you are having issues with.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord