Extract TestStand File Global Variable Data Using LabVIEW

Updated Feb 20, 2024

Environment

Software

  • TestStand
  • LabVIEW

For your information, each sequence file can contain any number of global variables, which you can access from any step or sequence within the sequence file in which you define the global variables. View and edit the global variables on the Variables pane. Use the Value column in the Variables pane to modify string, numeric, and Boolean values. Basically, this article will guide you to extract a Sequence File Global variable data by from external VI.

To write data into File Global Data container, you can refer to below methods:
  1. Open ActiveX session to TestStand engine class and create Property Node (ActiveX)
  2. Get Sequence File by create Property Node (ActiveX) and select FileGlobalsDefaultValues.
  3. Get Number of Containers by create Invoke Node (ActiveX) and select method GetNumSubProperties.
  4. Get Names of Container by create Invoke Node (ActiveX) and select method GetNthSubPropertyName with options = 0
  5. Get Container by create Invoke Node (ActiveX) and select method GetNthSubProperty with options = 0
  6. Get Number of Parameters in Container by create Invoke Node (ActiveX) and select method GetNumSubProperties.
  7. Get Name of Parameter by create Invoke Node (ActiveX) and select method GetNthSubPropertyName with options = 0
  8. Get Parameters by create Invoke Node (ActiveX) and select method GetNthSubProperty with options = 0
  9. Get Type of Parameters by create Property Node (ActiveX) and select Type
  10. Get Value Of The Type Property Node (ActiveX) and select TypeName
The instruction above is using GetNthSubProperty method to work on each variable and use the Type property to know if it is a number, string, boolean or container. If it is a container, repeat the process on a lower level. To have better understanding on wiring and connection you may need refer to below example VI:
Extract TS File Global.png

Below shows the result after executing the VI the File Globals data was completed extract to ini. file:
image.png