Hi! I open a new thread about LMSTestLabAutomation library in Matlab. I want to export data from Test.Lab using Matlab. How can I use the library interfaces (IDatabase, IDataWatch etc..) in Matlab (32-bit version) after the server COM creation (LMSTestLabAutomation.Application)?
Solved! Go to Solution.
From previous posts, I know you reason to make a switch to do some processing in Matlab.
But, the LMS TestLab Automation library doesn't support Matlab. Only Microsoft Visual Studio.
The com interpreter of Matlab doesn't support all our functions and interfaces.
It's through, you can connect with Matlab to LMS project, but at the end IBlock and IBlock2 are interfaces that Matlab doesn't understand, so you can't get any x or y values of blocks.
Good morning bvlassa,
I read in the Automation Manual - LMS Test.Lab -Rev 13A (page 61, Chapter 5): "Although Automation is specially aimed at supporting interpreted languages, like Visual Basic and MATLAB, it just as well can be used from compiled languages like Visual C++, J++, Java, C#". This is the reason why I thought to use the library.
However, to get around this inconvenience, now I would like to export the data to a Matlab file. In the Automation Workbook I find the port "LmsHq::ActiveCompVC:: DataExplorerCmd::CExportToMatLab". How can I use it? Do you have a code for this purpose?
Dear bvlassa, I tried it but the code returned an empty file .mat. The contents of the file .ldsf were not exported. What is the problem? Maybe, there is an error in this line "oMap.Add(ii, "My Computer/" & sDataPath & "/" & ids(ii))" because ids is a number not a name; "labels(ii)" is a name but the problem is again unsolved: empty file .mat.
strange the snippet is running on my machine.
And you need to use the ids (number), this is how Testlab recognize the trace, not on the name.
When the ExportToMatlab call is done, it's possible that the file is created but not yet filled.
Depending on the size of the LDSF it can take a while.
If possible, zip and share you code example, so that i can take a look at it.
Dear bvlassa,I solved the problem due to the backslash in the DataPath, which is different from the character used in the MatlabPath. Thank you so much for the support. It is definitely appreciated.