ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

invoke executable file from VI

Hi,
I am new user in Labview 8.2. I made an executable VI file and I need to run it from another VI program.
Can anybody tell me how can I solve this problem?

Thanks.
0 Kudos
Message 1 of 5
(3,114 Views)
Use VI server. Search the forum or have a look at the examples for VI Server. You can use it to control (set/get control values & properties, invoke methods like 'Run VI' etc) VIs.

0 Kudos
Message 2 of 5
(3,105 Views)
Maybe we have a problem with terminology. What do you mean by an "executable VI"? Do you have a plain VI (*.vi) that works properly and is "runnable" or did you turn it into an executable (*.exe) using the application builder?
 
Once you have made it into an executable using application builder, you could just use "System exec" (found in the "connectivity...libraries and executables" palette) to run it.
 
If you just want to call one VI from within another VI, you would just place it on the block diagram. Optionally, you would also need to assign terminals on the subVI so you can wire inputs and outputs as needed.
0 Kudos
Message 3 of 5
(3,090 Views)
Thanks to both for the help.

Now I have a new problem.......... Actually my program saves some input (taken from the string) to a text file. If i run the .vi file then it is okay to save the information in the text file when the run is aborted by a button. But after building .exe file with the application builder, when the button is pressed the .exe file stop running but the program does not exit (have to press the close in the top-right corner) and the information is not written in the text file.

Can anybody please tell me how to solve the problem?

Thanks.
0 Kudos
Message 4 of 5
(3,065 Views)
Do you possibly generate the file path programmatically relative to the current folder? In this case you need to adjust the path!
 
There are a few application notes explaining the details, e.g.:
 
 
 
0 Kudos
Message 5 of 5
(3,055 Views)