10-01-2012 04:54 PM
I have some DAQmx measurement data in TDMS format, and would like to analyze this data in Matlab or custom python. I have read and understand the TDMS File Format Internal Structure documentation, but the documentation claims that "This article does not describe how to decode DAQmx data. If you need to read a TDMS file with software that implements native support for TDMS (without using any components provided by National Instruments), you will not be able to interpret this data."
I have tried several online solutions: TDMS Reader and ConvertTDMS(v9) at Matlab File Exchange, both of which failed due to interleaved data formatting or presence of RawDAQmx data. I have also tried (and might still try to debug) a python version (pyTDMS), which might be failing due to poor file format documentation.
I am next going to try the NI solution: the DLL + Matlab. I haven't gotten into attempting an implementation yet, but from the looks of it, it's going to be a hack. Particularly because I now have to install multiple Windows SDKs.
I have two questions:
1) Am I missing something? I realize NI needs to make a profit from their product, but for the documentation to be missing key information and to have to install Microsoft SDKs is inexcusable. Here in the real world, NI, we have mixed shops and several vendors provide the tools that we need. Your website claims TDMS works in Matlab, but this is obviously not the case, at least not easily. And Excel compatibility is great, but not when you have the problems of large data sets that TDMS is supposedly designed for. NI, I've tended to avoid your products in the past because I dislike graphical programming, but you seem to be specifically preventing interoperability which might give me a new reason.
2) What references (if any) are available regarding this "decoding" of DAQmx data? What specifically is different if NI code isn't used?
10-02-2012 12:11 PM
Hi jeff80,
I apogolize for the inconvenience caused here. I believe the method you are talking about in your post is this solution:
http://zone.ni.com/devzone/cda/epd/p/id/5957
I found some additional information about this particular solution in this forum post:
http://forums.ni.com/t5/LabVIEW/TDMS-file-will-not-properly-import-into-Matlab/td-p/1305678
Unfortunately, I'm not sure what is specifically different if NI code isn't used. Please let me know if any of this helps.
10-07-2012 08:26 PM
Hi jeff80,
You are right, the DAQmx data in TDMS file is encoded. When logging the data from DAQ to TDMS, the data stored in TDMS files is DAQmx raw data, and when reading the data out from TDMS files, TDMS is responsible for decoding it and represent to users mainly as double data type. And commonly DAQmx raw data stored in TDMS files always with DAQmx scaling information.
Currently we only support reading DAQmx data from TDMS files by NI softeware products, is that convenient for you to let us know why you need Matlab or custom python to analyze the TDMS files instead of NI softeware products?
Thank you.
Yongqing Ye
NI R&D
10-07-2012 09:17 PM