07-09-2012 04:35 PM
Razor,
Try to create a small data file that displays this behavior.
Can you please post your Signal Express project that generates the tdms file and the tdms file that you are unable to read in MATLAB?
Can you read the TDMS file with TDMS viewer or read it in LabVIEW?
07-10-2012 10:45 AM
Hi Razor,
I don't have the m file in front of my currently so this is all hypothetical thought, but the example ReadFile.m is intended to demonstrate how to use the TDM file reading function and is designed specifically for the sinewave tdm file provided, i.e. it pulls chan types and file header information specific to that tdm file. The error may be comming from the fact that your tdms file does not contain the same information, namely the file description it is attempting to read near line 57. With regards to the error you mentioned about chanvars, check to see if you are receiving an error when instantiating that variable.
07-10-2012 12:49 PM
Hi Kyle,
Thanks for your reply. Here are the requested files attached.
The TDMS file works perfectly in LabVIEW SignalExpress.
Hoping to see your reply soon.
07-10-2012 12:51 PM - edited 07-10-2012 12:52 PM
Hi Sappster,
Thanks for your reply!
I will begin going through the code, and try to find what I can edit, to make the code more genearalised, if what you ware saying is true.
But its surprising that no where is it mentioned that the code uploaded on ni.com is example-specific.
Thanks.
07-10-2012 12:53 PM
Hi Kyle and Sappster,
Another question closely related to this one:
Assuming that Kyle or I can find a way to open any TDMS into MATLAB, will MATLAB still be able to open a 10GB TDMS?
That is my final aim.
Thanks.
07-11-2012 07:07 PM - edited 07-11-2012 07:17 PM
I am able to read exmple .tdm file. I had a same error message when I tried to read my .tdms file in MATLAB.
My .tdms file size is 300MB and it was generated from LabVIEW SignalExpress.
Any help would be appreciated.
07-11-2012 08:56 PM
Razor and erhk,
I believe the issue is with TDMS 1.0 vs 2.0. There was an old KB that had the information about how the code didn't work for TDMS 2.0. I have found another option for you guys.
Please check out this link. I was able to open Razors tdms file without any issues.
http://www.mathworks.com/matlabcentral/fileexchange/28771-converttdms-v9
07-12-2012 06:31 PM
Kyle,
Thank you for your suggestion about reading TDMS file. I am able to read a file in the MATLAB but it only returns me following :
FileName: 'Digital_Input.tdms'
FileFolder: ''
SegTDMSVerNum: [190x1 double]
NumOfSegments: 190
Data: [1x1 struct]
It also generates .mat file corrosponding to the .tdms file. However, none of these values contain the actual measurement data.
Does this code allows to extract actual measurement data.
Thank you.
07-13-2012 05:47 PM
Erhk,
Please make sure you are using the correct calls.
Unfortunately, I can't support another software for calling into TDMS documents. The standard is defined and we follow the standard. If the issue becomes related to how we are creating the TDMS file please let me know and I will be able to help. It seems plenty of other people have gotten it to work so maybe contact someone on that page as to how they got it to work.
07-13-2012 08:57 PM
Hi Kyle,
Thanks a lot for your reply and help!
I am yet to try out your solution.
For now, I have got my hands on LabVIEW Eval, and Binary files are working in an awesome way too !
I have to decode some of the headers though, if I want to read them into MATLAB, which should be simpler than trying to decode how the TDMS code works in MATLAB.
So lets see where this goes!
Again I appreciate your help.
Thank you.