09-24-2009 08:43 PM
Hi,
Does anyone know how to completely integrate Matlab functions into Labview program without a copy of Matlab in the system when I run the entire program?
Initially I used 'Mathscrip' node but I heard that it doesn't support Matlab toolbox. Thus, I tried out the other option 'Matlab script' node. This node works well in implementing Matlab functions but it indeed requires Matlab installed in the system.
So in other words, how could I realize the full integration(as what Matlab script node achieves.) without Matlab installed in the system?
Cheers,
Nicholas
09-24-2009 11:13 PM
The short answer: you can't. If you use the Matlab Script Node then you need to have Matlab since that communicates with the Matlab ActiveX server. You can compile your Matlab code into a DLL or an app using the Matlab Compiler and call it from LabVIEW, but the target machine still requires the Matlab Component Runtime. The MCR is free, though.
So, either way, you will need some form of Matlab.
09-29-2009 01:26 AM
hi smercurio,
thx for your suggestion.. I found that I could download MCR from Mathwork..
but how to call it from Labview? Am I still using Matlab Script Node and calling the dll in the node?
Cheers,
SSR
09-29-2009 09:29 AM
If you create a Matlab DLL then you would simply use the Call Library Function Node. That's used to call DLLs. You do not directly "call" the MCR from LabVIEW. The MCR is used to run the already-compiled DLL. The Matlab Script Node is for calling the Matlab ActiveX Server and passing it a script for it to compile and run.
Calling Matlab DLLs has come up before on this forum. If you do a search you will find some hits.
10-07-2009 02:55 AM
hi smercurio,
So you mean that the Matlab script is no longer necessary in my case right?
Could I just ask my colleague to compile his codes to matlab dll and I use the Call Library Function Node instead of Matlab script to call it?
About MCR, is it the correct source at the following link http://www.mathworks.com/matlabcentral/fileexchange/5268 ?
Sorry for those basic queries in Matlab as I have very little experience in it. lol... thanks a lot.
Cheers,
Nicholas
10-07-2009 03:11 AM
hi smercurio,
I tried the MCR installed from the link. It seemed that I still need a copy of Matlab for the installation. Where could I get the free MCR?
Basically I just wanna have a stand-alone application with the use of Labview and Matlab toolbox but doesn't require either software installed on the targeted machine. For Labview, I found that I could build an installer withe the run-time engine.
And for Matlab, how could I install the MCR? So could I achieve the above mentioned requirement by following this method?
Cheers,
Nick
10-07-2009 09:46 AM
The MCR does not require the installation of Matlab. Are you sure you're not confusing it with the Matlab Compiler? That's what's used to actually create the DLL/app from within Matlab. The Matlab Compiler can be used to create a deployment package to include the MCR for target machines.
You should be aware that the Matlab Compiler does have limitations when it comes to various toolboxes.