Programmatically Set the Number of Test Sockets in TestStand

Updated Nov 17, 2017

Reported In

Software

  • TestStand 2016 SP1
  • TestStand 2016
  • TestStand 2014 SP1

Issue Details

I'm using a parallel process model (such as Batch Model.seq or Parallel Model.seq) to execute my sequence file.

I know that the number of test sockets can be set from Configure»Model Options, by setting Number of Test Sockets property.

However, I would need to perform this programmatically: is is possible?
 

Solution

You can programmatically set the number of test sockets by overriding a Process Model Callback sequence named Model Options. To accomplish this, you should follow these steps:
  1. Ensure that a multithreaded process model (such as BatchModel.seq or ParallelModel.seq or a customized version of these process models) has been selected for execution. You can set a default process model for the test station from Configure»Station Options»Model»Station Model or you can specify a particular process model for a specific sequence file.
  2. Open your client sequence file
  3. Right-click Sequences Pane and select Sequence File Callbacks... to access Sequence File Callbacks dialog box
  4. Highlight ModelOptions Model Callback and click Add, then click OK
  5. Highlight ModelOptions sequence in Sequences Pane. This model callback provides a series of Parameters, defined by the process model. ModelOptions.NumTestSockets defines the number of test sockets:
  1. Drag and drop a new Statement step in Steps pane and insert the following expression: Parameters.ModelOptions.NumTestSockets=N     (replace N with the desidered number of test sockets)
  2. You will get a sequence file similar to what shown below:
  1. Execute your sequence file by clicking Execute»Test UUTs

WAS THIS ARTICLE HELPFUL?

Not Helpful