LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview calls command line

Solved!
Go to solution

When using System Exec.VI to perform the operations of command line,It can be executed correctly, but the execution process cannot be seen and only jumps out of the black window.The execution information can only be seen on the output terminal of VI after the execution is completed.May I ask how to display the execution process in real-time in the black window that pops up?

 

0 Kudos
Message 1 of 7
(1,247 Views)

Hi wuyaning,

 


@wuyaning222 wrote:

May I ask how to display the execution process in real-time in the black window that pops up?


That black window is a command shell window…

When there should be some text/ASCII art to be displayed then the called executable has to provide that.

Which executable do you call? Can you change the behaviour of that EXE, either by command line arguments or by comppiling its source code?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(1,211 Views)

By not waiting for the program to complete. Then the IO streams for the console are not hooked. However:

- you now don’t know in LabVIEW when that script/external program finished

- if the script executes quickly it will close the console window before you had time to read it. You could fix that by waiting for a keystroke at the end of the script.

Rolf Kalbermatter
My Blog
0 Kudos
Message 3 of 7
(1,210 Views)
Solution
Accepted by topic author wuyaning222

If your EXE does send data to stdout while running, then one of these might help:

 

https://www.vipm.io/package/jki_lib_dotnet_system_exec/

https://labvolution.com/labview-system-exec-callbacks/

 


___________________
Try to take over the world!
Message 4 of 7
(1,201 Views)

Thank you for your reply. Set false to the terminal of waiting for run ,the execution process can be displayed on the  window ,but labview is unable to get contents of  the window。Is there any other way?

0 Kudos
Message 5 of 7
(1,138 Views)

@wuyaning222 wrote:

Is there any other way?


Did you look at the links I posted?


___________________
Try to take over the world!
0 Kudos
Message 6 of 7
(1,101 Views)

Sorry for the late reply,I downloaded the package and can now obtain the output. Thank you very much

Message 7 of 7
(1,083 Views)