LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading and writing to a command prompt windows

Hi,

 

I`ve had a quick look on the message boards and the internet but can`t really find an answer to my question.

 

I`m trying to write to a command prompt window and then read back from it, i know i can do this with the system exec and a string containing all the commands but i need to keep the same command prompt open and send different commands based on the returned values.

 

Is this possible? Any help is most welcome.

 

Many thanks

 

James

0 Kudos
Message 1 of 3
(4,777 Views)

Hi Treble20,

 

Thank you for using the forums - sorry to see that no-one has replied to your post up until now.

 

You are correct in thinking that in order to write the to command prompt, you would need to use the System Exec VI. There is a useful example on writing to it that you can find by opening LabVIEW >> Help >> Find Examples, then searching for "Calling System Exec".

 

You can read your standard output from this with an output from the System Exec VI.

 

In order to keep the command prompt open, I believe that this requires you to put a new line at the end with the command "pause" in order to keep the command window open.

 

Please let me know how you get along and if this answers your questions!

 

Best wishes,

Tori
Student
0 Kudos
Message 2 of 3
(4,716 Views)

What are you trying to accomplish? There may be other easier ways to do what you are trying to do that are easier.

Tim
GHSP
0 Kudos
Message 3 of 3
(4,709 Views)