From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Call based-dos .exe file, but how to input the parameters and get the text on DOS screen?

Solved!
Go to solution

Yes, I have searched the similar topic before posting this topic. 

I understand we can use standard input for parameters input of system exec.vi, but still can't find any answer about "how to get the text on DOS screen".

1. Attached sw500912_2701test.exe is the based-dos exe file, (change .tar to rar)

2. Double click .exe, run this file. The first parameter is band rate, default is 9600.

Double click .exe, run exe file

3. Setting the COM #

3. Open com2.JPG

Colin Zhang
------------------
LV7.1/8.2/8.2.1/8.5/8.6/9.0/2010/2011/2013/2015/2016/2020; test system development; FPGA; PCB layout; circuit design...
Please Mark the solution as accepted if your problem is solved and donate kudoes


Home--colinzhang.net: My Blog

iTestGroup: One-step test solution provider!
ONTAP.LTD : PCBA test solution provider!
0 Kudos
Message 1 of 7
(3,181 Views)

to get the output text set wait till completion to truew (default i think) then wire the standard output. It returns a multiline string of the output

 

Hope it helps

Please remember to accept any solutions and give kudos, Thanks


LV 8.6.1, LV2010,LV2011SP1, FPGA, Win7
0 Kudos
Message 2 of 7
(3,167 Views)

Thanks for your reply. I thought so as well before, but it seems failed to receive the data from standard output

DOS VI.png

Colin Zhang
------------------
LV7.1/8.2/8.2.1/8.5/8.6/9.0/2010/2011/2013/2015/2016/2020; test system development; FPGA; PCB layout; circuit design...
Please Mark the solution as accepted if your problem is solved and donate kudoes


Home--colinzhang.net: My Blog

iTestGroup: One-step test solution provider!
ONTAP.LTD : PCBA test solution provider!
0 Kudos
Message 3 of 7
(3,162 Views)
Solution
Accepted by topic author colinzhang

May be worth checking the command is actually running. when the dos window pops up is there any text?

 

try cmd /c "<insert command>"

Please remember to accept any solutions and give kudos, Thanks


LV 8.6.1, LV2010,LV2011SP1, FPGA, Win7
Message 4 of 7
(3,158 Views)

Thanks, i understand a little. Because didn't complete the DOS .exe file implement, maybe the text data can't pass to the front panel.

Colin Zhang
------------------
LV7.1/8.2/8.2.1/8.5/8.6/9.0/2010/2011/2013/2015/2016/2020; test system development; FPGA; PCB layout; circuit design...
Please Mark the solution as accepted if your problem is solved and donate kudoes


Home--colinzhang.net: My Blog

iTestGroup: One-step test solution provider!
ONTAP.LTD : PCBA test solution provider!
0 Kudos
Message 5 of 7
(3,140 Views)

Cant you add the parameters of the com-port to the command call? Similar to "TarToRar -c 1 -b 9600 -f file.tar -o file.rar"?

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 6 of 7
(3,117 Views)

Yes, I can. I find the reason that why no output. 

Because it fail to jump out of loop of DOS .exe, can't output the text of screen. Thanks for your reply. 

Colin Zhang
------------------
LV7.1/8.2/8.2.1/8.5/8.6/9.0/2010/2011/2013/2015/2016/2020; test system development; FPGA; PCB layout; circuit design...
Please Mark the solution as accepted if your problem is solved and donate kudoes


Home--colinzhang.net: My Blog

iTestGroup: One-step test solution provider!
ONTAP.LTD : PCBA test solution provider!
0 Kudos
Message 7 of 7
(3,113 Views)