11-10-2011 08:44 AM
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
11-17-2011 05:11 AM
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,
11-17-2011 07:21 AM
What are you trying to accomplish? There may be other easier ways to do what you are trying to do that are easier.