Sending Per-Site Data to Code Modules in the TestStand Semiconductor Module

Updated Jul 13, 2023

Environment

Software

  • TestStand
  • TestStand Semiconductor Module

This document explains how to use the Per-Site Inputs tab in the Semiconductor Action or Semiconductor Multi Test steps, or TSM Per-Site Data to send per-site data to code modules using the TestStand Semiconductor Module.

The Per-Site Inputs tab in the Semiconductor Action or Semiconductor Multi Test steps can be used to define per-site Input Parameters for a given code module.

The TSM Per-Site Data can be used to share data across code modules without TestStand intervention.

Per-Site Inputs Tab

  1. Select the Per-Site Inputs tab in the code module you need to specify per-site data.
  2. Specify a Pin or Input Data Id (you don't need to specify both) you want the per-site input to be associated to. The Input Data Id is arbitrary but it must match in TestStand and in the code module.
  3. Provide a Data Source expression to determine a numeric, boolean or string value (arrays are not compatible).
  4. Retrieve the per-site value in the code module using the Get Input Data VI. Either the Pin or Input Data Id will render the same result.
 

TSM Per-Site Data

  1. Create a code module and add a Set Site Data VI.
  2. Define a Data Id the data will be associated to. The Data Id is arbitrary, but it must match in any code modules accessing that specific per-site data.
  3. Write a 1D array with a value for each site or a 2D array with a row of values for each site. The per-site data is written as a variant so you can also use other complex data types if needed.
  4. Add a Get Site Data VI on the code module where you need to access the data.
  5. Specify the Data Id and read the variant data.
  6. Convert the variant data to the type used on step 3.

Both methods allow sending unique per-site data to code modules.

The Per-Site Inputs tab method is easier to use, but it is not very scalable as it only works over the specific step you configure. The TSM Per-Site Data is more complex, but the data source must not be provided by TestStand, so it can remain encapsulated in the TestStand Semiconductor Module Context, and allows any code module to access the data as long as it receives the TestStand Semiconductor Module Context as an input.

Per-Site Inputs Tab

The figure below shows the Per-Site Inputs tab from the Test step, configured in TestStand to send values from the TestValues array local variable on a per-site basis, using the TestSockets.MyIndex property in the Data Source expression. In this case, an array with 4 values is specified as the data source on a 4 sites system. The same data is written using the Pin and input Data Id methods just to confirm the outcome is the same.
 

Per-Site Inputs Tab.png


The image below shows the Get Input Data VI with both the Pin and Input Data Id methods, either will render the same result. The ID Data Out will have one value per site in the Semiconductor Module Context.
 

Get Input Data VI.png

If the code module executes once per site, you will only have one value, but if it executes on a subsystem composed by two sites, it will have two values, one for each site.
 

TSM Per-Site Data

The figure below shows how to use the Set Site Data VI to write a scalar value to the arbitrary PerSiteParam Data Id. If you wire a 2D array instead, the Set Site Data VI writes one row per site.
 
Set Site Data VI.png


The figure below shows the Get Site Data VI along with the PerSiteParam Data Id being used to retrieve the data.
 
Get Site Data VI.png

If the code is executed in a step that runs independently on each site, the Site Data array on each instance of the code module will have a single value corresponding to the data for the corresponding site. If it is executed in a code module from a subsystem composed by two sites, the Site Data array will have two values, once for each site.

If you don't know the number of sites, you can use the Get Site Numbers VI
to retrieve the number of sites in the system and the site numbers on the executing thread.