LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sys Exec - reading the output

I am using the System Exec.vi to send a command line to the windows command prompt:
 
"command.com /c w32tm.exe /resync"
 
I use this to force my PC to update the system time with a time server. When I run this command in the command prompt outside labview I get an output when the process completes that says "The command completed successfully.".
 
I want to be able to display this message in LabVIEW - however when I wire a string indicator to the "standard output" terminal of the VI I don't get any feedback. Is this possible using this method? Or am I better off reading the return code to establish if the task completed? Return code doesn't seem to do anything either. It would be nice to know whether the process worked or not.
 
 
W32tm.exe info:
 


Message Edited by russelldav on 11-26-2007 02:51 PM
0 Kudos
Message 1 of 2
(2,673 Views)

I just worked out how to fix this and get the output I wanted...

I changed the command line to:

"w32tm.exe /resync"

and it works fine.  I'm hazarding a guess the /c before was causing the problem?

 

Does anyone know what the return codes mean? I get "-1073741510" when the program executes.

0 Kudos
Message 2 of 2
(2,664 Views)