07-22-2011 09:55 AM
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
Solved! Go to Solution.
07-25-2011 03:50 AM - edited 07-25-2011 03:51 AM
@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.
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!
07-25-2011 04:30 AM
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
07-25-2011 10:30 AM
thanks a lot , I have a now got an understanding by both of yours suggestions it was a great help.
-Ankit G