NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Executing a system command and display results in data sheet

Solved!
Go to solution

 

I need to modify and existing TestStand application. I need the string that is returned when you type 'set computername' from a cmd prompt and show the result at the top of all test reports. Would that be a Call Executable step type? And how would I get it into StationGlobal.computerName? Lastly how do I make it show up at the top of the test report?

 

Sorry to ask so many beginner questions but it is trial by ordeal time.

 

Thanks,

 

Amherst 

0 Kudos
Message 1 of 5
(3,307 Views)

If you go to Configure->Station Options and go to the preferences tab and look at the middle of the screen it should have a entry for Station ID.

 

By default 'Use Computer Name for Station ID' should be checked.  Hence you would not have to obtain the ComputerName via the 'Set Computername' command via the prompt.

 

The StationID variable is saved within your process model, under the Locals.Stationinfo.StationID.   By default the StationID is on the report header for both the HTML and text reporting, I am not sure about the XML report.

 

Thanks,

 

PH

0 Kudos
Message 2 of 5
(3,302 Views)

Thanks, that solves one problem.

 

However I was trying to be brief but and therefore did not mention that there are other 'set' commands that I also need to read.

 

Amherst

0 Kudos
Message 3 of 5
(3,299 Views)
Solution
Accepted by topic author Amherst

If you have LabVIEW you could call the following ( attached VI ), to get the computername.  It uses the System Exec to access the CMD prompt.

 

Take a look at the VI, and see if you can use it for other 'Set' command you may need.

 

Thanks,

 

PH

0 Kudos
Message 4 of 5
(3,288 Views)

Yep, works more gooder than a hose.

 

Thanks.

0 Kudos
Message 5 of 5
(3,281 Views)