LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Export TDMS file to asci

Hi All,

I have some problems with my simple programe

1. Can i export the TDMS file to Asci format for Matlab access?

2. I am opening a TDMS file and want to export the data to excel format.
When tried, i was getting only y axis values. all x axis values are constant.
Please see the programe which i used for opening  TDMS file.


3. similarly i want to export the power spectrum data to excel.

Please help me to solve this problem.

Thanks in advance,

Pasu
0 Kudos
Message 1 of 10
(4,728 Views)
Hi Pasu,

even better there's a tdms api for matlab:
http://digital.ni.com/public.nsf/allkb/0EEADA99DC7D00A4862572E30037C3A2
I have never used it but it should work.

Could you give some feedback?

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 2 of 10
(4,718 Views)
Hi Pasu,

The following KB should answer your first two questions:
Reading and Writing TDM/TDMS Files

For writing the Power Spectrum data, unbundle the cluster and write the values into a csv file with the help of the Write to Spreadsheet File.vi.
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 3 of 10
(4,685 Views)
Hi Pasu,
 
There is also a free TDM/TDMS add-in for Excel which allows you to open your TDM/TDMS files in Excel so that you do not need to worry about any conversions.  Just write your files in TDMS and write the power spectrum data to the TDMS file as well.  Then use the add-in to open these files in Excel for any further processing.
 
Caroline Bright
Thanks,
Caroline Tipton
Data Management Product Manager
National Instruments
0 Kudos
Message 4 of 10
(4,669 Views)
Hi ,

Sorry i was away, couldnt reply immediatley. Thanks Ton , Adnan and caroline for the suggestions. Ton , i havent run the programme in MATLAB. in couple of days time  i will let you know the details with MATLAB.

 Thanks once again all

Pasu
0 Kudos
Message 5 of 10
(4,613 Views)

Here's a link to another example for reading TDMS files from Matlab.  This one focuses on retrieving string information like channel names.  Unfortunately, it's another single special-purpose example, just like the standard one that was linked earlier in this thread.  These examples may be fairly helpful to Matlab jockeys who know their way around pointers and handles, strings and cell arrays, memory allocation, etc.  But I for one am still struggling to wrap my head around it all.

I'd love to see a more thorough Matlab script that could convert TDMS data into a Matlab .mat file with sensible variable names.  I'm muddling through it myself now, trying to name the variables based on the group and channel names, making use of Matlab's immensely cool "eval" function.   But it sure seems tedious.  I'm disappointed that NI hasn't done a more thorough job of providing tools for working with the data.  It's possible they did a nice job on the Excel plugin, but I wouldn't know -- some of us don't have a modern enough version, not to mention that Excel is a horrible environment for large datasets.

-Kevin P.

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 6 of 10
(4,597 Views)
Dear all,
 
I want to read my tdms files on MATLAB 7.5, (r2007b); when I tried using the script provided on "Reading TDM/TDMS Files with The MathWorks, Inc. MATLAB® Software" page, (Report Date: 05/22/2007,Last Updated: 05/30/2007,Document ID: 49L3K6FN)
 
 
 
running loadTDM (on the provided TDM file, only the examplePath was changed to the current directory), I got the following error:
 
 
>> loadTDM
??? There was an error loading the library "D:\MatLab TDM Example\bin\nilibddc.dll"
Error using ==> loaddefinedlibrary
The specified procedure could not be found.
 
Error in ==> loadTDM at 16
loadlibrary([examplePath '\nilibddc'], hfile);
>>
 
 
Anybody else notice this problem?
 
Any help would be gratefully appreciated!!
 
Thanks dearly,
 
Raphael
0 Kudos
Message 7 of 10
(4,411 Views)
Hi Raphael,

This example is not compatible with The MathWorks, Inc. MATLAB(R) software environment versions R2007b and later. I am sure that's why you are getting this error. (1083183)


Message Edited by Adnan Z on 12-11-2007 02:11 PM
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 8 of 10
(4,407 Views)
Adnan thanks for your quick reply.
 
Is there any solution for this problem? Is there a chance NI will release a script that works with Matlab R2007b?
 
What release is the last that works with the provided script? R2007a? Earlier releases?
 
Any help will be extremely appreciated as I need to MATLAB process some sampled data ASAP
 
Thanks,
 
Raphael
0 Kudos
Message 9 of 10
(4,388 Views)
Hi Raphael,

Unfortunately, this example is not officially supported by National Instruments. We currently don't have a DLL that will work with this version but R&D is aware of the issue and is looking into it. I wouldn't want to set any expectation for you.

As I mentioned in my previous post, this example will not work with version R2007b and later. It should be able to work with previous versions till version 6.5. I apologize for the inconvenience this has caused you.
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 10 of 10
(4,353 Views)