DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Automatic conversion of TDMS files to *.mat procedure in Diadem

Hello to all,

 

 

I have a very large set of data aquired with a PXI chassis. The data is saved in TDMS files. Each TDMS file contains data from  10 acquisition channel. I have to convert this data into Matlab readable fiels, *.mat files. Unfortnately, there are a lot of files (900GB), each file is very large (17GB), and therefore manual conversion is very long and I cannot afford to waste so much time. 

 

Does anybody know if I can develop an automatic procedure in Diadem that will take a TDMS file and output 10 *.mat files?

 

I have to mention that I have tried to convert the TDMS files using Matlab scripts found on Matlab Central, but with no success. I have also tried using some VIs I found on the NI Support forums, but all failed. I am left woth this third solution in Diadem that works, but takes a lot of time.

 

I am open to any suggestion.

 

Thank you all,

Jean

0 Kudos
Message 1 of 5
(9,856 Views)

Hi Jean,

 

Have you looked at this document: http://digital.ni.com/public.nsf/allkb/1706BA4C65A8533686256C630062DD03

 

You can use this dataplugin in DIAdem, to import/export files from/to MATlab: http://zone.ni.com/devzone/cda/epd/p/id/4178

 

Let me know if you need more informations.

 

Regards,

Message 2 of 5
(9,845 Views)

Hello,

 

Thank you for your reply. I already have the plugin for exporting data under Matlab. 

 

The example shown in the archive does not provide help because I do not need to create data in Diadem, I already have my data in TDMS format. However, this exmaple gives me an idea: I have to write a VBS script to open the files and save the data, but I need some help as I am not familiar with VBS syntax. Is there a tutorial where I can see How I can open a TDMS file, select the appropriate channel and convert the data inti Matlab files?

 

Best regards,

Jean

0 Kudos
Message 3 of 5
(9,840 Views)

HI Jean,

 

If you know how to convert the files manually using the dataplugin, then you can record the actions you take, and it will automatically write the code in VBScript. You have to use the button "Enable Recording Mode", in the Script panel.

If you need more informations on the VBS language, you can search on Google. I don't think we have a tutorial for this. Maybe you can try contacting Matlab to know how to use their dataplugin.

 

Regards,

0 Kudos
Message 4 of 5
(9,834 Views)

You will find a lot of example code in the DIAdem help. (in the web below http://zone.ni.com/reference/en-XX/help/370858K-01/TOC623.htm). Open the book "Programming Reference" in the help.

If you record your script. you can move the mouse over a line in the Script editor and you will get a context related short help in a tool tip, with a link to the complete help. These help topics contains a lot of example code.

 

Winfried

0 Kudos
Message 5 of 5
(9,829 Views)