Creating or Modifying a Sequence File from a Custom User Interface in TestStand

Updated Apr 7, 2023

Reported In

Software

  • TestStand
  • LabVIEW

Issue Details

I am developing a custom user interface in LabVIEW to create or modify the sequence files I've developed. How can I perform these operations?

Solution

You should use the TestStand API Reference Help  to implement this functionality:

1. Create an instance of the TestStand Engine.
2. Now, you can create a new sequence file using the Engine.NewSequenceFile  method.

 
3. Using the reference of the new sequence file you can create FileGlobal variables which will be used to store the output data from the VI. To create other kind of variables refer to Programmatically Creating Variables in TestStand​​​​​​ .

4. At this point, you can create a new step. Following the instructions to create a step that uses the LabVIEW Adapter.
  • Create the step using the Engine.NewStep method.
  • Access the LabVIEW specific module properties by type casting the Module Object (Step.Module property) to the LabVIEW Module class, using the Variant to Data node.  
  • Set the LabVIEWModule.VIPath  property to the desired VI.
  • Call Module.LoadPrototype  method  to load the module parameters from the VI.
  • To set the parameters, access the LabVIEWModule.Parameters  collection, which contains an item for each parameter in the VI.
  • Set the ValueExpr property for each parameter to the desired property. As example the the FileGlobals created in step 3.

 
5. Add the step to the mainSequence of the new sequence file.
6. Save the sequence file using SequenceFile.Save  method.
7. Release the sequence file using Engine.ReleaseSequenceFileEx  method and close all references. 

You can find an example in Creating a Sequence File with a LabVIEW Module Step Using the TestStand API . Refer also to Building a Sequence Using API .

Additional Information

If you are interested in customize the TestStand Simple User Interface in LabVIEW refer to Working with the TestStand Simple User Interface - LabVIEW  and Working with the TestStand Simple User Interface - LabVIEW (TestStand 2013 and Previous)