10-03-2013 07:00 AM
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
10-04-2013 02:49 AM
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,
10-04-2013 03:18 AM
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
10-04-2013 05:07 AM
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,
10-04-2013 06:01 AM
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