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: 

Can LabView interact with an executable?

Hi there,

Okay, I'm creating this VI in LabVIEW that uses SystemExec.vi to run an external, DOS-based program. However, this external program needs input after output of the first segment of text. The input is found using a small Call Library Function, but is BASED ON what the program outputs during its first segment.

So, if you couldn't tell already, I'm having a problem getting the output of the first segment into LabVIEW so I can work with it. In SystemExec.vi, when I set "Wait Until Completion?" to "false", there is no output from the sub-vi. Thus, I can't work with it.

Basically, during the whole execution, I need to have LabVIEW able to interact with the program. But it looks like the program output
s to ONLY ONE device, either the console or LabVIEW. Any suggestions?
0 Kudos
Message 1 of 2
(2,931 Views)
Hi Bonhomme-

We have to get a little creative here.
Any command line's output may be redirected to a text file with the ">" (e.g. 'ping www.ni.com > benschulte.txt' outputs to benschulte.txt).

1. So you launch your exe with SystemExec
2. Redirect the output to a text file
3. Read the text file in LabVIEW and proceed

Hope this helps.

ben schulte
national instruments
0 Kudos
Message 2 of 2
(2,931 Views)