03-28-2014 11:08 AM
Greetings,
We have a considerable ammount of functionalities in Matlab. And we will like to find a way to reuse this functionalities in DIAdem (not possible to rewrite the code). We have compiler licence for matlab and we can create exectuable stand alone files. However our team wants a full integration in DIAdem.
I was thinking in how possible should be to integrated using the GPI tool with a .dll or something like this. But my guess is that this need and specific way to be compiled from matlab to be able to be compliant with Diadem.
Can you give me some advice for this?
Thank you in advance.!
03-31-2014 04:16 PM
Hi Naoa,
I'd recommend that you communicate with MatLab from a DIAdem VBScript using MatLab's ActiveX commands. You'll be able to save any data channels you want to load into MatLab as *.mat files and load any subsequently created channels by MatLab with the same DataPlugin. Then all you have to do is pass the file path and the *.m script to run through the MatLab ActiveX commands. If the channels are short, then you could alternatively send them back and forth through ActiveX as variant arrays.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
04-02-2014 03:47 AM
Dear Brad.
Indeed ActiveX control can be use as a partial solution. However this brings to us two main issues. The initial problem is that we need to install matlab in all user's computers and the second one is a license issue (not for all toolboxes we have floating licenses), so the ActiveX control will not work in some of our applications.
This is why we would like to use the compilation functionality (MCR) for stand-alone applications, achieving a connectivity between compiled code and DIAdem.
That's why initially I asked if there is the possibility of using the GPI functionality with compiled .dll. However, I know by experience that this is not a straightforward process since the .dll has to be compiled under certain conditions, and my initial idea is that this "make" files should be delivered to Matlab to achieve the compilation.
I will be waiting for your comments or advice.
Thank you in advance for your support.
04-02-2014 04:12 AM
By the way, I am having a lot of troubles posting in the forum. The web page is quite slow.
04-02-2015 07:11 AM
Hello Everyone,
Is been a year after last post regarding this topic, but I am really interested in this. I was able to create COM objects from MatLab and to call them from DIAdem after register them. But I am having problems because in the moment of compiling I lose most of the methods froms the classes. Does anybody know why this happens? Has anybody try to do the same?
Thank you for your time
Best Regards
04-09-2015 11:19 AM
Hello,
When you mention compiling, I assume you are talking about the Mathlab side; am I right?
Perhaps you can provide more details about the methods and classes affected and how you found the methods are actually being lost. I would actually suggest you to create a new post to try to give your question exposure to Mathlab experienced users or even create a post in the Mathlab community (maybe you can even try both).
04-10-2015 01:25 AM
Thank you very much!
Yes Camilo the compiling is done in MatLab side. I ask them as well and the answer is:
"Unfortunately MATLAB classes cannot be 'exported' in a way that they can be invoked directly from VB. MATLAB code using your MATLAB classes can be compiled just fine."
As soon as I have more details in the process I do as you suggest. 🙂