LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

reducing TDMS file size?

Hello Frenk

I think you use a M-series card. In M-series card if you ask for the unscaled data, you'll get the unscaled uncalibrated data. After that DAQmx applies a up to 5 order polynomial to get the correct data.

Unscaled data is not calibrated with M Series, while unscaled data for E Series is calibrated.
source
The difference is about 10%

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 11 of 16
(1,328 Views)

Hello,

Thanks all for the responses. The full range of my measurement was definitely +/-5 V. I did use the examples of dealing with TDMS files to try and help me, but the TDMS reader pulls a magic calibration number out of the file and I don't know where it came from (i.e. how it got into the TDMS file, or how to access it online when I first acquire and need to scale my data).

 

Ton wrote:

"I  think you use a M-series card. In M-series card if you ask for the unscaled data, you'll get the unscaled uncalibrated data. After that DAQmx applies a up to 5 order polynomial to get the correct data.


Unscaled data is not calibrated with M Series, while unscaled data for E Series is calibrated."

 

Yes, I am using an M Series card. Do you know how I can access this polynomial online to scale my data immediately after it is returned to me by DAQmx Read?  (This is making me long for my old E series card!)

 

Thanks again all,

Frenk

 

 

0 Kudos
Message 12 of 16
(1,319 Views)
You can see the file structure in the TDMS File Viewer. There is one group for data channels and one group for scaling factors. The reason for the scaling factors being stored in channels (as opposed to properties) is that there can be varying numbers of them. The reading VI pulls the scaling factors from these channels.

Hope that helps,
Herbert
0 Kudos
Message 13 of 16
(1,312 Views)
Hello,
I need to have access to the scaling number during the acquisition, so I cannot refer to the TDMS file at that time.
 
Very naive question... will those scaling numbers change from measurement to measurement if the input voltage range is fixed? In that case I could snoop out the correct scaling factor from a previous TDMS file and then hard code it into my online analysis, but this seems really clunky.
 
Best,
Frenk
0 Kudos
Message 14 of 16
(1,311 Views)
These numbers come from DAQmx property nodes. Please have a look at .\examples\file\plat-tdms\example Cont Acq&Graph Voltage - Write Unscaled Data to File (TDMS).vi and it's subVIs.

Herbert
0 Kudos
Message 15 of 16
(1,305 Views)

Thank you so much. My problem is now solved.

For other readers:

The code to obtain the scaling parameters is from the example Cont Acq&Graph Voltage - Write Unscaled Data to File (TDMS).vi, which contains a subVI called Cont Acq&Graph Voltage - Set File Info (TDMS).vi, which shows how to get the scaling coefficients.

How to use them is obtained from the example Cont Acq&Graph Voltage - Graph Unscaled Data from File (TDMS).vi, which contains a subVI called Graph Acquired Data - Unscaled to Scaled (TDMS).vi, which shows how to use them.

 

Really appreciate all the support. Thank you.

Best Regards,

Frenk

0 Kudos
Message 16 of 16
(1,295 Views)