annulla
Visualizzazione dei risultati per 
Cerca invece 
Intendevi dire: 

How to run Matlab Executable from Labview

Risolto!
Vai alla soluzione

Hi,

 

I have a Matlab executable "Report_GUI.exe" , Its a GUI which takes an input ( a file) and generate data report. I want this GUI executable to run through my Labview DAQ program. I am unable to find any proper ways to do it. Can you please help me out on this, is there any example for this which i can look at it.Please let me know.

 

Thanks,

 

Ankit

0 Kudos
Messaggio 1 di 4
5.864Visualizzazioni
Soluzione
Accettato da autore argomento AnkitG

@AnkitG wrote:

Hi,

 

I have a Matlab executable "Report_GUI.exe" , Its a GUI which takes an input ( a file) and generate data report. I want this GUI executable to run through my Labview DAQ program. I am unable to find any proper ways to do it. Can you please help me out on this, is there any example for this which i can look at it.Please let me know.

 

Thanks,

 

Ankit


Hey Ankit,

 

You can open up external .exe files from a LabVIEW program when using the System Exec VI. You can find an example of this sort of operation in the NI Example Finder (Help > Find Examples...) under Communicating with External Applications.

 

Open EXE.png

 

All you need to provide to the input terminals of the System Exec VI is the name of the .exe you wish to open and a reference to it's folder directory;

LabVIEW will do the rest of the work. For extra parameters in terms of the command line arguments you may require, after the entry of the filename in the string attribute of the VI you must type a hyphen  (-) followed by the name of your parameter; for example, "notepad.exe -myFirstParameter".

 

Let me know if you need any more help; a full tutorial of this operation can be found at this URL.

Good luck!


Alex Thomas, University of Manchester School of EEE LabVIEW Ambassador (CLAD)

0 Kudos
Messaggio 2 di 4
5.840Visualizzazioni

Hi Ankit,

 

Alex's solution is valid for opening the file through LabVIEW.

However this Knowledge Based article Calling GUIs for use with The MathWorks explains that "there is no way for LabVIEW to be able to actively handle callbacks from the GUI since the MATLAB Script Server permits no way to do it".

 

If you are also wanting to extract the output string of the command, you can do this through some additional formatting.

I have attached an example VI file that may be able to help on this.

 

Hope we've managed to help!

Tori

 

 

 

Tori
Student
0 Kudos
Messaggio 3 di 4
5.823Visualizzazioni

thanks a lot , I have a now got an understanding by both of yours suggestions it was a great help.

 

-Ankit G

0 Kudos
Messaggio 4 di 4
5.796Visualizzazioni