How Can I Concatenate the Test Sockets Index to a Variable in TestStand?

Updated Jul 20, 2023

You are using a parallel process model (such as Batch Model.seq or Parallel Model.seq) to execute a sequence file and you know that the number of test sockets can be set from Configure >> Model Optionsby setting Number of Test Sockets control.

You want to programmatically concatenate this number to a numeric variable that you have created since you want to pass this value as a parameter to LabVIEW. How can you do it?

  1. Open your sequence file.
  2. Make sure you have selected a multithread process model for execution, such as, BatchModel.seq or ParallelModel.seq.
  3. Create all the variables with the index you want to get the value from:
image.png
  1. Insert a new Statement step and in the Expression tab of this step paste the following expression to be able passing the parameter to LabVIEW:
Evaluate("FileGlobals.URL"+Str(RunState.TestSockets.MyIndex))
Where:
Evaluate() will return the value of the expression.
Str() will format the value RunState.TestSockets.MyIndex to a string.

image.png
 
  1.  (Optional step to check that the index is changing): Add a Message Popup step and paste the following expression to see the value that the new variables have:
Str(Evaluate("FileGlobals.URL"+Str(RunState.TestSockets.MyIndex)))

image.png
 
  1. Run your sequence file by clicking Execute >> Test UUTs.
 

When you click on the OK button of each Test Socket you will have the message with the value of each variable:
 
image.png

image.png