Cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

LMSTestLabAutomation library in Matlab

Creator
Creator

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)?

8 REPLIES

Re: LMSTestLabAutomation library in Matlab

Siemens Genius Siemens Genius
Siemens Genius

Dear,

 

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.

 

Regards

Re: LMSTestLabAutomation library in Matlab

Creator
Creator

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?

 

Re: LMSTestLabAutomation library in Matlab

Experimenter
Experimenter
Hi! I read this post and I'm here now because I have a similar problem. If I want to export data from Input Basket to Text file (.txt) in Visual Basic using Automation, how can I do it? Where can I find an example?

Re: LMSTestLabAutomation library in Matlab

Siemens Genius Siemens Genius
Siemens Genius

in attach you can find a small code snippet for exporting LDSF to Matlab format

Re: LMSTestLabAutomation library in Matlab

Siemens Genius Siemens Genius
Siemens Genius
Dear Isra,
For an export towards Text create a new forum thread. then i will provide a code snippet

Re: LMSTestLabAutomation library in Matlab

Creator
Creator

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.

Re: LMSTestLabAutomation library in Matlab

Siemens Genius Siemens Genius
Siemens Genius

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.

Re: LMSTestLabAutomation library in Matlab

Creator
Creator

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.