LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can send characters to the standard input while DOS Command is under execution

Can Labview send characters to the standard input while DOS Command is under running with System Exec.vi?
0 Kudos
Message 1 of 16
(6,923 Views)
See this thread:
http://forums.lavag.org/System-Exec-With-Interaction-t213.html

Regards,

Wiebe.


0 Kudos
Message 2 of 16
(6,839 Views)
This actually referes to a download:

http://forums.ni.com/ni/board/message?board.id=170&message.id=138829#M138829



0 Kudos
Message 3 of 16
(6,836 Views)
Thanx for the response. I don't want to send input as command argument with System Exec.  Instead What I need is, after I invoke command using System Exec, command starts execution. During its execution I need to send inputs thru stdin. Is it possible?
0 Kudos
Message 4 of 16
(6,812 Views)

"sowji" <x@no.email> wrote in message
news:1191397207244-589679@exchange.ni.com...
> Thanx for the response. I don't want to send input as command argument
with System Exec.&nbsp; Instead What I need is, after I invoke command using
System Exec, command starts execution. During its execution I need to send
inputs thru stdin. Is it possible?

Yes, and you can download it here:

http://forums.ni.com/ni/board/message?board.id=170&message.id=138829#M138829

I've used it myself to make an interactive link to mplayer. You can start
it, read it's response, and send commands to it like you would do yourself
when typing on the command prompt.

Regards,

Wiebe.


0 Kudos
Message 5 of 16
(6,802 Views)
Bwt. Download the .zip file. Unzip the .ogp file. Use the OpenG package
manager to unpack it, or change it's extension to .zip. Then there is your
code.

Regards,

Wiebe.


0 Kudos
Message 6 of 16
(6,769 Views)

In DOS, when we type bash, we will get bash$ prompt(only when you have cygwin installed). At this prompt, we can execute unix commands.

With Systemexec.vi, executed bash. Got bash$ prompt with dos window open. Now how should we pass unix commands to the same dos window.

0 Kudos
Message 7 of 16
(6,740 Views)
Download this
http://forums.ni.com/ni/board/message?board.id=170&message.id=138829#M138829

Unzip the .ogp file. Use the OpenG package manager to unpack it, or change
it's extension to .zip.

Use the vi's. See "PING Example.vi".

Let us know what step gives you problems.

Regards,

Wiebe.


0 Kudos
Message 8 of 16
(6,725 Views)
 
Found following VI's in ogpipe.llb under the ZIP file. Didn't find PING Example.vi
OGPIPE Write To Pipe__ogtk.vi
OGPIPE RefNum__ogtk.ctl
OGPIPE Read From Pipe__ogtk.vi
OGPIPE Open System Command__ogtk.vi
OGPIPE Open Pipe__ogtk.vi
OGPIPE Close Pipe__ogtk.vi
OGPIPE - VI TREE__ogtk.vi
 
 
0 Kudos
Message 9 of 16
(6,707 Views)


@iftu wrote:
 
Found following VI's in ogpipe.llb under the ZIP file. Didn't find PING Example.vi
OGPIPE Write To Pipe__ogtk.vi
OGPIPE RefNum__ogtk.ctl
OGPIPE Read From Pipe__ogtk.vi
OGPIPE Open System Command__ogtk.vi
OGPIPE Open Pipe__ogtk.vi
OGPIPE Close Pipe__ogtk.vi
OGPIPE - VI TREE__ogtk.vi
 
 


PING Example is not in that archive. This is only the actual PIPE function library. What you want to do is using "OGPIPE Open System Command" to create the pipe handles for stdin and stdout and optinally stderr. Then use "OGPIPE Write To Pipe" to write to stdin and "OGPIPE Read From Pipe" to read from stdout and optionally stderr. When finished close each opened pipe handle with "OGPIPE Close Pipe".

Rolf Kalbermatter

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 10 of 16
(6,690 Views)