LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help! How can I call Matlab file with toolbox (matlab 7.1) in labview 8.6?

Solved!
Go to solution

Hi,

     I developed a matlab file aiming at optimizing a system , it involves toolbox . But the inputs should be from Labview, and also the outputs should be shown in labview chart.  The outputs include  arrays. CVI is not installed. My labview is 8.6 version. Matlab is 7.1 version.

     1) does the version of labview and matlab matters in this problem?

     2) what is the best solution? Matlab script? DLL ? Active X? 

     3) If I can use matlab script, should I define the type of every variables in labview including those in the code?

    

 

Thanks!

Jessie

   

 

    

0 Kudos
Message 1 of 3
(2,941 Views)
anyone can help?
0 Kudos
Message 2 of 3
(2,927 Views)
Solution
Accepted by topic author flysinger

Step 1: Learn patience. This forum does not provide immediate technical support. It's made up mostly of volunteers, and most of us have full-time jobs.

 


     1) does the version of labview and matlab matters in this problem?

Not really.

 


     2) what is the best solution? Matlab script? DLL ? Active X? 

Any of these will work. If you want to use the script then you need to use the Matlab Script Node. This allows you to enter Matlab code directly in the node, or you can call scripts that you have on your filesystem. This method requires that you have the full-blown Matlab on the target computer. If you create a Matlab DLL then you would use the Call Library Function Node and call the DLL like any other DLL. This method simply requires that you have the Matlab Runtime on the target computer.  I'm assuming when you say ActiveX that you are referring to writing your own ActiveX component?

 


     3) If I can use matlab script, should I define the type of every variables in labview including those in the code?

I'm not sure what you mean by defining every type of variable. You need to create inputs and outputs on the Matlab Script Node so you can pass data between LabVIEW and the Matlab environment. The LabVIEW Help contains more information on using the Matlab Script Node. There are also examples that ship with LabVIEW. 

 

 

Message 3 of 3
(2,921 Views)