04-07-2017 01:09 AM
Hi,
I need to run a separate executable through cmd in my LV application. Is it possible in any way to interact with the command line while it is executing the external program? I would need to start the executable, then read it's output (stdout) while executing and when I see a certain string, do something else in my LV app in order for the executable to continue. I know it is possible to achieve this by using a fixed delay and act after the delay to allow the executable to continue, but that is not a very robust way.
I searched around for answers but could only find either really old threads or not dealing with the exact same situation. Most answers related to piping(?) and .NET if I understood them correctly. As always, any help would be appreciated.
04-07-2017 08:29 AM
I've never used it personally, but the OpenG Pipes library is supposed to help with interactive command line functions.
http://opengtoolkit.cvs.sourceforge.net/viewvc/opengtoolkit/pipe/
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
04-10-2017 12:57 AM
Thanks for the links. I guess i'll have to study the subject and see if I can make it work.
I also realised there is a way to read the system exec output in real time, by directing the output to a file. In my case it could be enough to read the file while it updates, since I don't really have to input anything more to the executable.
01-31-2018 02:57 PM
Have you had any luck finding an answer. All Windows Pipe code seems to have vanished.
02-20-2018 04:18 AM
I ended up using the solution where I redirect the output to a text file and poll the file. It was enough for my case. For the polling you have to open the file in read only mode. Sorry for late response 🙂