01-26-2022 11:04 AM
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.
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.
01-26-2022 03:31 PM
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.