LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TDMS file opener error message

Hi,

 

I'm trying to open the TDMS file with the source code from TDMS Reader - File Exchange - MATLAB Central (mathworks.com).

 

I was able to open some files but weren't able to open files saved using DAQmx assist block. 

 

The error I'm getting is as in the picture below.

kapitan2269_0-1643216273321.png

 

The code I use is 

 

routeV = 'I:\Temp';

A = 1; 
B = 4; 

for a = 1:A
[P,~] = TDMS_readTDMSFile([routeV,'_',num2str(a.','%04d'),'.tdms']);
% for b = 1:B
% DB(:,a,b) = P.data{1,b+2}';
% end
end

 

and the files I'm trying to open are in the attached file. 

 

Thank you in advance.

0 Kudos
Message 1 of 2
(116 Views)

Not being a Matlab person, I know a bunch of my colleagues have had issues with Matlab and TDMS.

 

I believe the issue is that you have "raw" DAQmx TDMS files. The data is written in raw form but scaling information is added. In LabVIEW, a TDMS file like this is seen as data in double type, that is, not even LabVIEW can recover the raw integers, just the scaled double data.

 

My guess is that Matlab is having problems applying the scaling information.

 

Sorry I cannot be of more help. Look below at the properties from your file, multiple scales.

 

Snap4.png

0 Kudos
Message 2 of 2
(97 Views)