Switching (TSM)
- Updated2025-07-31
- 5 minute(s) read
This example demonstrates a test program that uses four sites and three shared instruments, as shown in the following figure. The test program shares the DMM1 instrument across all four sites and shares the DMM2 and DMM3 instruments across two sites each. All three instruments contain only one channel routed to each site using a switch (MUX).
| Example File Location | <TestStand Public> \Examples\NI_SemiconductorModule\Switching\LabVIEW\Switching.seq |
| Highlighted Features |
|
| Major API |
|
| Prerequisites |
You must also configure the switch instruments and route in Measurement & Automation Explorer (MAX) to be available through Switch Executive Virtual Devices. This example includes the SwitchingConfiguration.nce NI Configuration Export File to import an example configuration into MAX. To import the file, open MAX, select , and browse to the SwitchingConfiguration.nce file in the resulting dialog box. |
Complete the following steps to use this example.
- Complete the following steps to review the pin map file associated with
the test program.
- Select , click the Edit Pin Map
File
button
on the TSM toolbar, or launch the Test Program
Editor and click the Open file for
edit
button located to the right
of the Pin Map File Path display on the Pin Map
panel to open the <TestStand
Public>\Examples\NI_SemiconductorModule\Switching\LabVIEW\Switching.pinmap
file in the Pin Map Editor. The pin map file
defines the following information: - Two DUT pins named A and B, respectively.
- Three multiplexer switch instruments named Mux1, Mux2, and Mux3, each with a multiplexerTypeId attribute value of NISimulatedMultiplexer.
- Three DMM instruments named DMM1, DMM2, and DMM3, each with one channel.
- Four sites on the tester.
- A set of multiplexed connections, in which each connection specifies an instrument and instrument channel and contains a list of connection pin routes. Each route specifies a site, route name, multiplexer, and pin to which it is connected.
- Select , click the Edit Pin Map
File
- Select each step in the MainSequence sequence
and click the Tests tab on the Step Settings
pane to review the tests each step performs.
The Semiconductor Multi Test step type uses the information in the pin map to determine which sites, instruments, and instrument channels to use for a particular test. The first step uses DMM1, which is shared across all four sites, to test pin A on each site. The second step uses DMM2 and DMM3, which are each shared across two sites, to test pin B on each site.
- Click the Options tab on the Step
Settings pane to review the DUT pins specified for each step
and the multisite execution that the step uses.
The first step specifies only DUT pin A. The step uses the pin map to determine that only one instrument is connected to pin A for each site and that a switch routes the channel to each site. With this information, the step determines that all four sites must run in a single thread and only one instance of the code module executes, as shown in the Multisite Execution Diagram.
The second step specifies only DUT pin B. The step uses the pin map to determine that two instruments are available and each connects to DUT pin B on independent sites. With this information, the step determines that it is able to run the code module in two independent threads, as shown in the Multisite Execution Diagram.
- On the Sequences pane, select the ProcessSetup sequence. The steps in this sequence initialize the custom instruments and switches.
- On the Sequences pane, select the ProcessCleanup sequence. The steps in this sequence close instrument and switch sessions.
- Open <TestStand
Public>\Examples\NI_SemiconductorModule\Switching\LabVIEW\Switching.lvproj
to review the code modules the test program uses. The
Example Test Code VI demonstrates a test code module that
uses multiplexed routes. In the VI, each iteration of the
For Loop tests one site. The tests for each site execute
serially in a For Loop because the tests share an
instrument. Do not enable loop iteration parallelism in the
For Loop. Note The For Loop must also close each reference in the array of Semiconductor Module contexts because the references were generated in LabVIEW instead of in TestStand and will not be closed automatically.
- Click the Start Lot
button
on the TSM toolbar to run the test program.
Related Information
- TestStand Directory Structure
- Mapping DUT Pins to Instrument Channels (TSM)
- Testing Multiple Sites in Parallel (TSM)
- TSM Code Module API
- Batch Process Model
- Configuring Switches with Switch Executive (TSM)
- Pin Map File XML Structure (TSM)
- Test Program Editor (TSM)
- Pin Map Panel
- Pin Map Editor (TSM)
- Specifying Multiplexers and Multiplexed Connections in a Pin Map (TSM)
- Tests Tab
- Semiconductor Multi Test Step
- Semiconductor Multi Test Options Tab
- Initializing Switch Sessions (TSM)
- Closing Switch Sessions (TSM)
- Code Modules with Multiplexed Routes (TSM)