LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Bypass Sys.exe

Hi ,

When I run a any exe from the System Execute.vi I need a standard output but sometines the .exe runs into an error and doesn't finishes the execution. So System Execute just waits for a response. I want to bypass thw wait function after a particular time period.

Please convey, if this can be done?

0 Kudos
Message 1 of 5
(2,046 Views)

Without more detail I would say try using the  "standard error" or the "return code"  outputs and see if they can be used to determine if the called exe. has exited with an error.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 2 of 5
(2,041 Views)

Hi,

I need a smalll help while using System Execute.vi.

When I launch/run an exe from the SystemExecute.vi, the vi waits for an response. I get a standard output when the cmd runs successfullybut when there is an error in the .exe the SystemExecute.vi is waiting for a response. After a particular time I want to return an error or bypass the SystemExecute to generate an error or some sort of standard output if there is no response after a particular time period. Please convey if this can be done.  

0 Kudos
Message 3 of 5
(2,042 Views)

The .exe file just pops up an error box and once the OK button on the error popup is pressed then only it generates an error. I dont't want to wait for the user to click the OK button. Instead if there is timeout functionality  ican use, It would be great. 

If the set the wait function on the SystemExecute.vi to False constant then it just runs the .exe and sends a empty string. I dont get any information if the .exe has an error or it ram successfully.

0 Kudos
Message 4 of 5
(2,033 Views)

System Exec.vi has two options: Wait for the command to return or don't wait. There isn't something in between these two. The first requires the program to exit at some point somehow, the second will cause System Exec.vi to return immediately but you won't be able to see any standard output or standard error info.

 

There isn't really any safe in between these two. If System Exec sets up the invocation for the command to return standard output and standard error it is at the mercy of that command to return at some point. If it didn't then it can return immediately but won'be able to intercept the standard output and standard error streams.

 

The real problem is your program you want to launch which should have a --quite, -q or similar command line option to prevent it from putting up any dialogs! And maybe it has and you just haven't read its documentation.

Rolf Kalbermatter
My Blog
0 Kudos
Message 5 of 5
(2,016 Views)