Understanding References - NIVeriStandAdd-Ons/VeriStand-steps-for-TestStand GitHub Wiki
Example sequences to demonstrate the use of references are available in:
<Public Documents>\National Instruments\NI VeriStand Steps for TestStand\Examples\References and Subsequences
All references used by the step types are stored in one of three ways.
-
Functional Global Variable inside LabVIEW Packed Project Library (Run-Time Code Modules)
-
Project Reference
-
Workspace Manager Reference
-
Model Manager Reference
-
Alarm Manager Reference
-
Fault Manager Reference
-
RT Sequence Reference
-
Stimulus Profile Reference
-
-
TestStand File Globals (Run-Time)
-
Gateway IP
-
Project Path
-
-
TestStand File Globals (Edit-Time)
- System Definition Path
Edit-Time Variables
The only File Global variable required to configure the step types using the configuration GUIs is the SystemDefinitionPath File Global. This variable is created by both the Initialize VeriStand and Open References step types. This variable can also be created and populated manually. The variables must be populated manually if using the Open References step.
Run-Time References
References used by the step types at run-time are stored within the veristand-steps-runtime.lvlibp library. These references are created at runtime by both the Initialize VeriStand and Open References step types. References are stored inside a LabVIEW functional global variable (FGV) within the packed project library.
The Initialize VeriStand and Open References step types also populate the same references (Project Reference, Workspace Reference, etc.) within the sequence File Globals. These references are not used by the run-time code modules. These references stored as File Globals can be used to interface with the running VeriStand project using other custom step types or using TestStand’s .NET adapter to call VeriStand’s .NET API directly.
The only File Globals required at run-time are the GatewayIP and ProjectPath. The GatewayIP is used by several steps including all RT Sequence step types. The ProjectPath variable is only used by the Initialize VeriStand or advanced project control step types.
It is possible to use the VeriStand Step Types in subsequences. Subsequences can be located either within the same sequence file as the calling sequence or within a separate sequence file.
Using a Subsequence in the Same Sequence File
Edit-Time
It is not necessary to create or pass any references or variables when configuring a subsequence located in the same sequence file as the calling sequence. The subsequence will use the SystemDefinitionPath variable located in the parent sequence file.
Run-Time
It is not necessary to create or pass any reference or variables when executing a subsequence located in the same sequence file as the calling sequence. All run-time references are stored within the LabVIEW PPL and will be accessible to any sequence which accesses this library. This still applies if running the subsequence in a new thread or execution.
Using a Subsequence in a Different Sequence File
Edit-Time
The SystemDefinitionPath File Global must be present and populated to configure the step types in a separate sequence file. This File Global can be created manually or by using the Open References step type.
Run-Time
The GatewayIP and ProjectPath File Globals are required by some step types. These must be passed to the child sequence if the sequence is in a separate file. The variables can be passed from the parent sequence to the child sequence using Parameters. It’s also possible to set the File Global values in the child sequence using the TestStand API. This still applies if running the subsequence in a new thread or execution.