07-21-2016 09:04 AM
Hello,
I'm trying to control a software that has a command line interface using LabView 2011 but I'm having problems at the moment to read the information back.
Attached is the VI I created until now, but it does not work properly.
Problems until now:
1.- If I use ReadLine(), it hangs showing no error and nothing else.
2.- ReadToEnd() Same problem as previous line, the software just hangs at that step.
3.- If I compare the response from "peek" waiting for the -1 indicating there is no more character, the software hangs as previous steps.
Do you have some clues on what could be wrong or another way to "control" the CMD to send messages, read back and then send messages, etc...
Thank you very much for your help.
Solved! Go to Solution.
07-21-2016 09:14 AM
Hi Harman,
1. Replace all stacked sequences by flat ones.
2. Show the label of all terminals! (Why did you hide them anyway?)
3. Replace all local variables by wires.
When you have done this you could check those different reference controls you use in your VI.
Why do you use "StandardInput" and write this into "StreamWriter Ref"?
Why do you write "StandardOutput" to "StreamReader Ref"?
07-21-2016 09:20 AM
Hello GerdW,
Thank you very much for your feedback.
About your two last questions, why not ?, what do you recomend to use ?.
Thanks,
07-21-2016 09:42 AM
Attached the new VI,
07-21-2016 09:49 AM
I have done this before - I posted about it on the forums here: https://forums.ni.com/t5/LabVIEW/How-to-open-close-and-monitor-a-application-xyz-exe-using/m-p/32511...
I did also wrap it up into a library at some point and post it on the forums but I couldn't find that particular post.