Signal Conditioning

cancel
Showing results for 
Search instead for 
Did you mean: 

Scaling TDMS files

Solved!
Go to solution

Hi,

 

Has anybody got a good example VI for scaling TDMS files. I've capured data using the VI attached and I want to scale this data to a new file using scaling slope and intercept derived from a calibration VI. I thought this would be straight forward but when I followed the example NI provide it does not change anything but the scaling information writen to the TDMS file properties. The data remains the same.

 

 

Thank you

 

Dan

Donners
0 Kudos
Message 1 of 7
(6,758 Views)

Hi,

You say the scaling information had written into the TDMS file properties but the data remains the same, I'm quite doubt about that. Could you please attach the tdms file here, I can verify whether the properties were written correctly or not.

Acutally, you can set the scaling info by calling "Create Scaling Information.vi" Capture.PNG. I think the Linear Scaler is what you need. The Sample for Create Scaling Information can be found in the NI Example Finder.(Browse->Directory Structure:file->plat-tdms.llb->TDMS - Create Scalling Information.vi)

0 Kudos
Message 2 of 7
(6,728 Views)

I follow your snapshot to build up a VI and run. The scaler in the file works. When I change the intercept in the file by setting properties, the channel data change too.

0 Kudos
Message 3 of 7
(6,725 Views)

Hi,

 

I've attached the signal conditioning VI that tries to scale the data from the 'Raw Data' group of the 'Raw Data' file to a 'Scaled Raw Data' group in a new 'Filtered Data' TDMS file. For some reason it saves a 'Raw Data' group in the new 'Filtered Data' file, that shows the new scale in the properties but the values have not been changed from the source 'Raw Data' file. I know that's a bit of a tongue twister, but I've attached the new 'Filtered Data' TDMS file that might illustrate what I'm talking about.

 

Thank you,

 

Dan

Donners
0 Kudos
Message 4 of 7
(6,711 Views)

The forum is not letting me attach a TDMS or Zip file so I've attached the TDMS file as viewed through Excel.

Donners
0 Kudos
Message 5 of 7
(6,710 Views)
Solution
Accepted by topic author Donners

Hi,

According to your excel file attached here, I am not sure the whether the scaler works or not. But I believe it works! You set slope = 0.033939 and intercept = -8.962304 on "Raw Data" group and the DATA on this group looks quite consistent with this SCALER.

 

This attached excel file has not a "Scaled Raw Data" group but a "Raw Data" group which is not consistent with your description. 

Please attach the orignal TDMS file and a scaled TDMS file here, this may be more efficient to figure out the reason. (I can set slope = 1 and intercept  = 0 to read out the raw data from the scaled tdms file.)

Here is allowed to attach both tdms and zip file.

 

 

Message 6 of 7
(6,694 Views)

Hi,

 

You're right. The data is scaling, I think I must have a problem in the calibration VI. It's scaling but not doing it right therefore the slope and intercept is wrong. I don't know why it is not saving the data to a Scaled Raw Data group. I think I'll open a clean new post to deal with that issue.

 

Thanks for putting up with my ramblings, I appreciate your help.

 

 

Donners
0 Kudos
Message 7 of 7
(6,682 Views)