LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Calling exe pauses Labview execution

I've written a program that needs to call another program.  When that program opens, it pauses the now "background" vi, but I need it to continue running in the background.  If I chose 'F' for 'Wait until completetion' the main program doesn't pause, but the window (from the exe I called) never opens.
 
Can this be done?
0 Kudos
Message 1 of 12
(3,236 Views)

I just tried it with a simple "cmd" command on 7.0 and it seems to work fine. Make sure Run Minimized is set to F.

If that doesn't help, you can always create a dedicated loop just for launching the program and set it to wait until done.


___________________
Try to take over the world!
0 Kudos
Message 2 of 12
(3,226 Views)
When I run it with Run Minimized and Wait until completion both set to F, the main VI does in fact continue to run, but it doesn't open the exe's window that I am trying to call.  It just shows the system (DOS) window.  For the window that I want to call to open, I have to have the "wait until completion" set to T, but that pauses the main program.
0 Kudos
Message 3 of 12
(3,223 Views)
Instead of calling your program directly, you can try calling "cmd" with the /c or /k option (run cmd /? for more details) which might help. Another alternative is to create a batch file (a file with a .bat extension which has the command you want to run in it) and run it instead of your exe.

___________________
Try to take over the world!
0 Kudos
Message 4 of 12
(3,219 Views)
I'm already calling a batch file.  I am passing arguments along with the exe, so I have to use the batch file.  The only way the window opens for me is if I set Wait until completion to T, and that pauses the execution of the main program.
0 Kudos
Message 5 of 12
(3,206 Views)
In that case I would go with the dedicated loop option - create a loop waiting only to open this program. Then you can set the wait input to T.

___________________
Try to take over the world!
0 Kudos
Message 6 of 12
(3,200 Views)
Try the Run Program.vi that is attached to this message.
0 Kudos
Message 7 of 12
(3,200 Views)
Well, I'm not quite sure what your vi does here.  The actual call doesn't really look like you did anything that I didn't do, and your program ends after the calculator is loaded.  Basically, I just want my program to load another program but continue running.  One would think this wouldn't be that challenging, but so far, I've had no luck.
0 Kudos
Message 8 of 12
(3,188 Views)


@TNeilson wrote:
Well, I'm not quite sure what your vi does here.  The actual call doesn't really look like you did anything that I didn't do, and your program ends after the calculator is loaded.  Basically, I just want my program to load another program but continue running.  One would think this wouldn't be that challenging, but so far, I've had no luck.

I didn't realize I'd need to provide an example of how to use the  Run Program.vi that I referenced.
An example is now attached.

LV v7.1.1 and you will need to provide it with the aforementioned  Run Program.vi

Message 9 of 12
(3,181 Views)
Thank you very much...Sorry I was confused before, I think I got it, and it seems to work...
0 Kudos
Message 10 of 12
(3,172 Views)