Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
36 ratings:
 2.11 out of 5     Rate this Document

Reading TDM/TDMS Files with The MathWorks, Inc. MATLAB® Software

Primary Software: DIAdem
Primary Software Version: 10.2
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem:
Can I read TDM or TDMS files with The MathWorks, Inc. MATLAB® software?

Solution:
The attached ZIP file contains an example that shows how to read TDM and TDMS files from within the MATLAB software environment. The ZIP file is a modified version of the DIAdem Connectivity Library (TDM C DLL) that contains an adapted C-header file (nilibddc_m.h) to be used in conjunction with the MATLAB software. Refer to the doc folder within the ZIP file for more information about the functions.

If you copy the TDM dll (nilibddc.dll) and the header file into C:\test\, you must specify the location in your m-script like this:

examplePath = 'C:\test';
hfile = [examplePath '\nilibddc_m.h'];
loadlibrary([examplePath '\nilibddc'], hfile);

The TDM dll can be found in the dev\bin folder while the header file can be found in the dev\include folder of the attached ZIP file. The example .m file is located within the Examples folder.

Keep in mind that this provides only the capability to read TDM/TDMS files with the MATLAB software environment and that the example has been tested for use with MATLAB software Versions R2007a, R2007b, and R2008a.  It is expected, but not verified, that the example will work with earlier versions of the MATLAB® software as well.

Note: Text channels in TDM and TDMS files cannot be read in MATLAB®.

MATLAB® is a registered trademark of The MathWorks, Inc.

Related Links:
KnowledgeBase 42AANPH0:  Reading and Writing TDM/TDMS Files
Developer Zone Tutorial:  DataPlugins:  Supported Data Formats (ni.com/dataplugins)

Attachments:


MATLAB TDM Example.zip - MATLAB TDM Example.zip



Report Date: 05/22/2007
Last Updated: 03/30/2009
Document ID: 49L3K6FN

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit