LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Stream 'standard out' from System Exec

LV v7.0
WinXP

When I run my external shell program I get a progress report as it is working. When I call it with LV (system exec) I can't see the progress report (standard out) until the process is over. Is there a way that I can have the system exec function stream the standard out to the string indicator?

Greg

Message Edited by Crickett on 04-19-2005 11:09 AM

0 Kudos
Message 1 of 6
(4,135 Views)
Not as such, no.

What you can maybe do is re-route the output of the system call to a txt file (Add >textfile.txt) to the end of your command, and then read in the text file intermittantly.

Be aware that you may run into file-sharing problems though.

Would answer more detailed, but I have to finish up......

Sorry

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
Message 2 of 6
(4,126 Views)
And you would also need to set the wait until completion of System Exec to false.
0 Kudos
Message 3 of 6
(4,120 Views)
Is it really neccessary to set "Wait until complete" to false? What happens if you try to read the file parallel to the system command?

That's something I wouldn't have thought of.

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 4 of 6
(4,105 Views)
im thinking that an active x container with a wrapper of the cmd command would work best. ive found one but am not happy with it. i may venture writing my own. if someone has one or knows where a good one is, i'd love to see it.
0 Kudos
Message 5 of 6
(4,098 Views)
You're right, reading in parallel is something that I hadn't thought of. The only time I ever had to do do something like this was when the executable returned a completion string so I could start the task with wait set to false and then keep reading the text file until I saw the completion string. But doing it in parallel and stopping the file read when sytem exec is done should work just fine. I'll have to remember that if I ever have to do something like this again. Thanks.
0 Kudos
Message 6 of 6
(4,091 Views)