NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Execute ping from cmd prompt and analyze response

I found how to execute the ping command in a cmd prompt window. Is there any way to redirect the output so I can analyze the response?
0 Kudos
Message 1 of 8
(5,421 Views)
Assuming you are using the Call Executable step type, on the Standard Output/Error tab, select the output destination. If you select to store it in a variable or property, the default is Step.StdOutput.Text but you can select a local variable if that is what you want.
0 Kudos
Message 2 of 8
(5,416 Views)

ok, I don't see that tab in TestStand. There is "Step Settings" and then "Output", but Output doesn't have anything to what you're referring to.

0 Kudos
Message 3 of 8
(5,406 Views)

What version of TestStand are you using? I don't know when this was added but in 4.2, the screen looks like the image below.

 

Message Edited by Dennis Knutson on 02-17-2010 01:28 PM
0 Kudos
Message 4 of 8
(5,404 Views)
Must be a new feature in 4.2. i'm running 4.0, and I don't see that.
0 Kudos
Message 5 of 8
(5,398 Views)

I think it was actually introduced with TestStand 4.1. You might have to write a batch file where the output is redirected to a text file. You don't mention what programming language you are using but it might be simpler there.

0 Kudos
Message 6 of 8
(5,392 Views)

Hello, once you have the ping answer in the Step.StdOutput.Text variable, I would be very interested to know how to analyze the answer 🙂

Is it necessary to use a code module or is it possible only via teststand?

Thank you Cat Happy

0 Kudos
Message 7 of 8
(4,424 Views)

Hi BRBASTS,

 

What do you mean, "analyze the answer"? You should be able to do something with the result of Step.StdOutput.Text in TestStand via the use of TestStand API expressions. No code module required.

 

TestStand 2012 Help: Expressions:

http://zone.ni.com/reference/en-XX/help/370052K-01/tsfundamentals/infotopics/bldgblocks_expressions/

 

In the future, you'll have better luck getting a response from the community if you create a new forum and add a link to another for reference (if needed). This forum is almost 5 years old.

 

Thanks!

Kelsey W.
National Instruments
Applications Engineer
0 Kudos
Message 8 of 8
(4,403 Views)