LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Math Script and Matlab

Just a quick question on Matlab script in LabVIEW. Do I still need to install Matlab in using Matlab Script in LabVIEW?

If yes, can I build the LabVIEW application with a Matlab script included without getting application builder from Matlab?

0 Kudos
Message 1 of 5
(4,227 Views)

Hello simply_ynan,

 

there are two ways, to run MATLAB-like code in LabVIEW: the MathWorks, Inc. MATLAB® script node and NI MathScript.

 

The MATLAB® script node uses the MATLAB script engine and needs MATLAB 6.5 or later to be installed. The MATLAB® script node is available in LabVIEW Full and Professional packages.

NI MathScript on the other hand does not require the installation of any third party software, only the LabVIEW MathScript RT Module is needed.

 

Regarding your second question, you will be able to build applications with MATLAB® script included without getting application builder for MATLAB.

 

Daniel

Dániel Fülöp
Field Application Engineer (CLA, CTA)
National Instruments
0 Kudos
Message 2 of 5
(4,221 Views)

A few additional comments:

  • MathScript is NOT the same as Matlab. I.e., while it's a language that looks like Matlab, it's not. Because it's similar you can run some Matlab script without changes by simply copying and pasting the Matlab code into a MathScript node. However, you cannot access Matlab toolboxes, and some of the MathScript functions behave a little differently from Matlab (e.g., they have a different number of parameters).
  • While you can build an application from LabVIEW code that uses a Matlab script node with just the LabVIEW Application Builder, the target machine will still require that the development version of Matlab be installed. The reason for this is because the LabVIEW Matlab Script node communicates with the Matlab ActiveX server, which gets installed when you install Matlab.
  • The Matlab Application Builder is used to make Matlab DLLs (and applications). You would only need this if you want to compile you Matlab code into a DLL and call that DLL from LabVIEW using the Call Library Function Node. Note that the computer that uses this Matlab DLL would require the Matlab Run-Time Engine in order to use the DLL.
Message 3 of 5
(4,215 Views)

Just for reference, there is a third option to run text based programs with a matlab like syntax in LabVIEW:

 

The LabVIEW to Scilab Gateway.

0 Kudos
Message 4 of 5
(4,212 Views)

Thanks everyone. It really helps me clarifying this thing out.

0 Kudos
Message 5 of 5
(4,194 Views)