Write TestStand Array of Container File Global Using LabVIEW

Updated Dec 7, 2023

Environment

Software

  • TestStand
  • LabVIEW

File Global are variables that are in scope for the Sequence File and visible to all Sequences within that Sequence File. By default, File Global are out of scope (not visible) to Sequences contained in another Sequence File. 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. Usually, TestStand utilize LabVIEW as a code module, but it was possible also for LabVIEW to write array of container in File Global. This article will guide to write array of container into file global 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.
  2. Create a Invoke Node (ActiveX)
  3. From the Automation Refnum connect to Invoke Node (ActiveX) Ref In.
  4. For the method select GetSequenceFileEX.
  5. Create Property Node (ActiveX) and select FileGlobalsDefaultValues.
  6. From the FileGlobalsDefaultValues create another Property node (ActiveX) and select SetValString method.
  7. Based on SequenceFile Property Node you may create another Invoke Node (ActiveX) and select save method.
  8. Close ref for PropertyObject.
  9. Create Invoke Node (ActiveX) AutomationRefNum.
  10. Lastly, close reference for all reference out.

To have better understanding on wiring and connection you may need refer to below example VI:
Write File Global Data Container.png
 

As you can see from the lookup string it's looking for the container (Exp: hello) and string (Exp: world). From the newValue it was the value that need to write into the File Global container. Below shows the result after done the execution:
image.png