LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to run exec and after that enter a input

I am learning c and I want to compare between 2 output, my file and the theater file.
But my problem is that I don't know how can I enter input or inputs after I run the exec file

0 Kudos
Message 1 of 9
(3,529 Views)

You could choose Sys Exec from application pallete to run your exe file. There is an option to wait for it till it completes execution. If you indicate "T" there, and then wire your controls after that (via ERR Cluster), I think you should be able to enter inputs. Is this what you wanted?

 


Kudos are the best way to say thanks 🙂
0 Kudos
Message 2 of 9
(3,520 Views)

@Johnny1986 wrote:

I am learning c and I want to compare between 2 output, my file and the theater file.
But my problem is that I don't know how can I enter input or inputs after I run the exec file


Since you posted this in the LabVIEW forum, I expect that this has something to do with LabVIEW.

 

Can you clarify the connection, maybe with another sentence or two? Thanks!

 

What is in your file? What is a "theater file"?

0 Kudos
Message 3 of 9
(3,513 Views)

Sorry for my first explanation the my English

i will try again

i started to learn C in the university

we need to make Program that run in the cmd,
the tutor take the output of the code and copaire it with there program output

the problem is if you forgat to add ":" to space they lower your graze, and want to prevent that by write a program in labview .

the program will get the path of the tutor exec and my exec.

and when i enter an input the program send it to both of the program and compare the output.

 

now i send the output to txt file of both program and compare it with my program

Labview.jpg

 

But i want to make my life easer

i traied to send that commande to the cmd via Labview  echo "1 2 3" | my.exe
but it's not working.

i hope i explain my self this time

thanks for your replay

0 Kudos
Message 4 of 9
(3,500 Views)

Untitled.png

 

Are you not able to use Command Line and Standard Input to do the job ?

Command Line: cmd /<File name>

Standard Input: echo "1 2 3" 

 

The other option is creating a .BAT file. http://www.computerhope.com/batch.htm#11

You can enter the commands you want in your batch file and call it via Command Line: cmd /<Batch file path>

 

I think the second option will definitely work. 

 


Kudos are the best way to say thanks 🙂
0 Kudos
Message 5 of 9
(3,472 Views)

What do you mean wire your controls after that (via ERR Cluster)? can you give an example of this working? I would like to open tera term using sys exec.vi, set parameters and still send data to tera term via LabVIEW.. doesn't seem possible though.

 

Thanks

 

0 Kudos
Message 6 of 9
(3,394 Views)

@HeavyD wrote:

 I would like to open tera term using sys exec.vi, set parameters and still send data to tera term via LabVIEW.. doesn't seem possible though.

 

Thanks

 


It probably could be done if tera term was just a bit smarterSmiley Wink What is wrong with VISA Write and VISA Read?


"Should be" isn't "Is" -Jay
0 Kudos
Message 7 of 9
(3,392 Views)

I'm using Tera Term to connect to an IOLAN via TCP. So I currently have a TCP read write function going on and that's fine. However, I'm not that great of a programmer and I don't know how to exactly emulate a terminal/console. I want to be able to see what is going on in the console in real time and also be able to respond. Perhaps there is some avenue I haven't explored in LabVIEW.

0 Kudos
Message 8 of 9
(3,389 Views)

A quick edit to the "Advanced VISA Write and Read.vi" Shipping example (Don't blame me its a shipping example) to modify it to use a TCP/IP:Instr class VISA Session should give you some idea.

1a.png


"Should be" isn't "Is" -Jay
Message 9 of 9
(3,384 Views)