Overview
TestStand provides Temporary global variables which exist for the lifetime of the TestStand engine. This example demonstrates how to create and use Temporary Global variables in TestStand.
Description
Temporary Globals are variables which are located in the Engine.TemporaryGlobals object.
- Like station global variables, these variables persist between multiple executions.
- Unlike station globals, temporary globals do not persist on disk and are removed upon engine shutdown.
You must create these variables at runtime using the TestStand API. For information on using the TestStand
API to create properties, refer to <TestStand Public>/Examples/TestStand API/Creating New Properties Using API
Use temporary globals to store configuration data that pertains to the current instance of TestStand, but should not
persist for new TestStand instances. This example uses a Temporary global variable to track the number of
times this sequence has executed in the current instance of TestStand.
Hardware and Software Requirements
Using Temporary Globals - TS2017.seq
TestStand 2017 or Compatible
Using Temporary Globals - TS2012.seq
TestStand 2012 SP1 or Compatible
Steps to Implement or Execute Code
- Run the MainSequence sequence using Execute » Run MainSequence.
- Observe that the initialization dialog appears on the first run. This dialog will not appear on subsequent runs.
- Observe the execution count is '1'. Run the example again and note that it increments each execution.
- Close TestStand and re-open it, then run the example again. Observe that the execution count has reset, and the initialization dialog again appears.
Al B.
Staff Software Engineer - TestStand
CTA/CLD