08-26-2020 10:45 PM
Hello,
I am trying to open a exe file then type V + return and then view the outputed version of firmware running on a device so then I can verify a pass or fail. I have gotten so far as to open the file, then simulate key presses and it returns the current version of firmware. Although, as it runs it is on a window outside of LabVIEW and I can not get it to output in the front panel.
It would be nice to send a string V + Return (propablly "V\r") instead of simulating key presses, but I could not make this work.
How can I run the exe without it poping up in the forground and then see everything outputed to the front panel? here are some snapshots. Any suggestions would be helpful, Thanks
Actual Exe view
08-27-2020 07:43 AM
You might want to check out Greg Payne's solution using .NET callbacks to interact with a command line terminal.
LabVIEW System Exec with callbacks (blog post)
08-27-2020 08:12 AM
Many .exe can take command line arguments, so you could e.g. send fc3 -v and avoid the need to send a key press. Check the manual/help.
08-27-2020 10:21 AM
@Yamaeda wrote:
Many .exe can take command line arguments, so you could e.g. send fc3 -v and avoid the need to send a key press. Check the manual/help.
Just expand on that idea a bit. The output probably gets sent to stdout.
08-27-2020 09:01 PM
not sure how to utalize the .NET callback as the link given implies . Does that mean changing the exeisting library for "system exec.vi" with what offered in Bitbucket repository ?
you would think that the standard input is where I would enter "v + return".
The standard output never displays any information. I can get a bat file the will ping localhost and the works with no problem. In fact anything that runs in the command prompt works great. I just can't it to output anyting when I ring the fc3.exe file, and it runs in the foreground even when it is ran set to run minimized. Bill what do you mean expand the idea a little bit. not sure what you were appling this to.
Is there any way I can add to the command line input (cmd/c start "FC3.exe") so that it writes more such as "cmd/c start "FC3.exe" / v return .