Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Read tdms files with Matlab tdm example

Hi Ssriram,

 

Can you provide the TDMS file that is causing the error? Do you experience this error with all TDMS file you attempt to read?

 

The error you are experiencing generally occurs when the datatype of the returned pointer is not assigned in the ReadFile.m script. In the sample provided the setDataType function is called directly above the line that is throwing the error. Please ensure that this line is still present in your script:

 

line 56:

setdatatype(filedesc,'int8Ptr',1,filedesclen);

 If you cannot provide the TDMS file that causes the error, can you describe the header information, specifically the file description, stored in the TDMs file. Can you also provide the value that is in the 'err' variable when the error is thrown.

 

Thanks,

 

Sappster
0 Kudos
Message 11 of 32
(3,293 Views)

Hi Sappster,

    Thanks for your reply. I tried using the program for another file also. But it did not work for that one also. Also I have the line 56, as it is in my script.

I could not provide the .tdms file, because of the size restriction of the post. If you provide ur e-mail id I could e-mail it to you. Please suggest some means to read this file to Matlab.

 

Thanks,

S.Sriram

0 Kudos
Message 12 of 32
(3,285 Views)

Hi S.Sriram,

 

Can you provide information about the value in the err variable when you receive the error you are seeing? You should also be able to comment out line 57 as it only displays the TDMS file description.

 

With regard to sending the TDMS file to NI, you can visit ni.com/support and create an email support request or attempt to limit the data in the tdms file and post it to this forum. You can use LV to modify the TDMS file.

Sappster
0 Kudos
Message 13 of 32
(3,238 Views)

Hello,

 

I have try to run the Matlab tdms example on NI PXIE8108 Core 2 Dou 2.53 GHz with Matlab 2011b and i got the next error:

 

Error using loadlibrary (line 253)
A 'Selected' compiler was not found. You may need to run mex -setup.

Error in ReadFile (line 30)
loadlibrary(NI_TDM_DLL_Path,NI_TDM_H_Path);

 

Which compiler should I install?

 

The same code work fine on my laptop with matlab 2009a.

 

Apologize for TURF 

Thanks

 

Regards

Izik Bakshi


0 Kudos
Message 14 of 32
(2,758 Views)

You may need to install VC8 runtime

0 Kudos
Message 15 of 32
(2,741 Views)

Hello,

 

I got the same problem

 

ERROR: TDS Exception in Initialize: Tds Error: TdsErrFileVersionTooNew

err id : -6210.

 

Is there any updated on releasing an update to the dll that support v2.0 TDMS for c++ developers?

 

 

Thank you.

0 Kudos
Message 16 of 32
(2,692 Views)

You are getting this error when you read a TDMS file made in LabVIEW with Mathwork's MATLAB?

Ben D.
Applications Engineer
National Instruments
0 Kudos
Message 17 of 32
(2,672 Views)

No,

I already got the solution from this post

 

http://forums.ni.com/t5/Measurement-Studio-for-VC/cannot-open-tdms-file/m-p/2052078#M7667

 

Thanks!

0 Kudos
Message 18 of 32
(2,664 Views)

Hi Sappster,

 

The value of the err variable is "0".

 

Also after commenting line 57, I get:

 

Undefined function or variable 'chanvals'.

Error in ReadFile (line 182)
    plot(chanvals);

 

 

Please help.

 

Thanks!

 

0 Kudos
Message 19 of 32
(2,650 Views)

err=0 is before commenting line 57.

 

After commenting, when I get chanvals error, err is still 0.

 

 

I tried attaching the TDMS, but it does not allow a 20MB attachment.

 

The TDMS was created through Signal Express Automatically. No manual code involved.

 

The originally supplied Sine Wave works fine (tdm file.)

 

Any of my Signal Express TDMS files refuse to work.

 

Please help.

 

thanks.

 

 

0 Kudos
Message 20 of 32
(2,646 Views)