Station Global Variables

TestStand 2017 Help

Edition Date: November 2017

Part Number: 370052W-01

»View Product Info

Download Help (Windows Only)
NI TestStand 2014 Help
NI TestStand 2014 SP1 Help
TestStand 2016 Help
TestStand 2016 SP1 Help
TestStand 2017 Help

Station global variables are variables specific to a computer that you can access from all steps and sequences on that computer. Any changes you make to the value of a station global variable are reflected in all other steps and sequences.

Use the Station Globals window of the TestStand Sequence Editor to create station global variables. Creating a station global variable is similar to creating a variable of any other scope. You can access and use station global variables similarly to variables of other scopes, such as local variables.

Note Note  When you use station global variables in TestStand, you might encounter problems with concurrent access, which is similar to the behavior of using global variables in other programming languages. Use queues and notifications for intrathread communication to work around these issues.

While running, TestStand stores the station global variables in the StationGlobals property object.

TestStand saves the station global variables in the StationGlobals.ini file in the <TestStand Application Data>\Cfg directory automatically when you close the TestStand Engine. You can also save the station global variables from the Station Globals window or by calling the Engine.CommitGlobalsToDisk method.

Note Note  Until you save the station global variables, new instances of TestStand do not have access to the new station global variables. Any changes you make to the station global variables in one instance of TestStand do not appear in any other instances of TestStand that are running at the same time.

The TestStand Deployment Utility does not automatically deploy the station global variables. You can include the StationGlobals.ini file in the deployment image, but doing so might remove any station global variables that exist on the target computer to which you deploy the image.

Note Note  You can programmatically create variables under the property that Engine.TemporaryGlobals returns. TestStand does not persist these objects to file. You can also use Execution.RunTimeVariables and Thread.RunTimeVariables to programmatically create variables at runtime for an execution or for a thread in an execution.

WAS THIS ARTICLE HELPFUL?

Not Helpful