02-11-2011 10:58 AM
Hi,
I'm trying to make a stand alone application of my LV code. The code includes MATLAB script, where it uses MATLAB optimization toolbox and some other m files. I'm using LV10.
I searched the forum but didn't find any clear and easy-to-follow procedure to do this.
I appreciate your help on this issue.
Thanks
02-11-2011 11:12 AM
What exactly are you having an issue with? Are you asking about the Matlab Script Node? Are you asking about paths? Are you asking about specific compatibility issues?
02-11-2011 11:20 AM
The problem is that I don't know how to incorporate my m files and the optimization toolbox in the LV stand alone application so I can run the application on the machines that don't have MATLAB.
02-11-2011 11:21 AM - edited 02-11-2011 11:22 AM
You can't. In order to use the .m files you need Matlab on the target machine. You can optionally compile the code into a DLL using the Matlab compiler, but you have to buy that. This would simply require the Matlab Runtime Component on the target machine, but this is free.
Another option is to see if the code will work under MathScript. But that requires a separate license from NI.
02-11-2011 11:34 AM
Thanks a lot for your responses, but it's still not clear for me.
So if I compile the Matlab code into a DLL I can use it on the target machine just by installing MRC?
If this is the case then how should I call the DLL files in the LV application?
02-11-2011 12:27 PM
Theoretically, you can use the Call Library Function Node, which is used to call DLLs. However, I have personally never done this, as we do not have the Matlab compiler here at work. Depending on the complexity of the DLL and the type of input/output parameters you may have to create a wrapper DLL to act as an intermediary between the simple datatypes that LabVIEW can handle and the complex datatypes you may have.
02-11-2011 03:17 PM
Thanks, I'm trying to implement it as you said, will let you know if I get any results.