LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

can i interact with dos application

Hi,
Is it possible to communicate with DOS application?
for example. i have written a C program, which takes keyboard inputs and dispaly the output on screen. 
Using System exec.vi, i can call  my program, but further can i give inputs to my program from labview?
Here i need to run the C program in background and i need to give interface from labview.
 
Please let me know the feasibility.
Thank you,
Ranjith
0 Kudos
Message 1 of 5
(2,799 Views)

Hi Ranjith,

you can use the system exec if your c program allows parameter. If not i think you can send key commands to the dos window with the windows API.

Hope it helps.
Mike

0 Kudos
Message 2 of 5
(2,798 Views)
Could you please explain me bit more on this.
0 Kudos
Message 3 of 5
(2,791 Views)

Hi Ranjith,

which one do you mean? Smiley Happy

If your c program can work with parameters, then you can send your program several times with different parameters. To send simulated commands to the dos window you can use the "keybd_event" function from the user32.dll.

Mike

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

Depending on how you created your dll, you may also be able to use the Call Library node.  Using this you can pass parameters to and from Labview and your dll.

R

0 Kudos
Message 5 of 5
(2,779 Views)