Asynchronous Analysis (TSM)
- Updated2025-01-22
- 4 minute(s) read
Asynchronous Analysis (TSM)
This example demonstrates a test program that must perform lengthy analysis on data acquired from an instrument. The test program performs the analysis in an asynchronous thread. The following two figures demonstrate how performing the analysis asynchronously to the data acquisition reduces the overall duration of the test program.
The following table shows a test program thread usage without asynchronous analysis.
Site 1 | Acquire Data1 | Analyze Data1 | Acquire Data2 | Analyze Data2 | Acquire Data3 | Analyze Data3 |
Site 1 | Acquire Data1 | Analyze Data1 | Acquire Data2 | Analyze Data2 | Acquire Data3 | Analyze Data3 |
Site 1 | Acquire Data1 | Analyze Data1 | Acquire Data2 | Analyze Data2 | Acquire Data3 | Analyze Data3 |
Site 1 | Acquire Data1 | Analyze Data1 | Acquire Data2 | Analyze Data2 | Acquire Data3 | Analyze Data3 |
The following table shows a test program thread usage with asynchronous analysis.
Site 1 | Acquire Data1 | Acquire Data2 | Acquire Data3 | |||
Analyze Data1 | Analyze Data2 | Analyze Data3 | ||||
Site 2 | Acquire Data1 | Acquire Data2 | Acquire Data3 | |||
Analyze Data1 | Analyze Data2 | Analyze Data3 | ||||
Site 3 | Acquire Data1 | Acquire Data2 | Acquire Data3 | |||
Analyze Data1 | Analyze Data2 | Analyze Data3 | ||||
Site 4 | Acquire Data1 | Acquire Data2 | Acquire Data3 | |||
Analyze Data1 | Analyze Data2 | Analyze Data3 |
Example File Locations | <TestStand Public>\Examples\NI_SemiconductorModule\Test Optimizations\Asynchronous Analysis\LabVIEW\Asynchronous Analysis.seq |
Highlighted Features |
|
Major API |
None |
Prerequisites |
|
- Complete the following steps to review the pin map file associated with the test
program.
- Select 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 launch the Pin Map Editor. Open the <TestStand Public>\Examples\NI_SemiconductorModule\Test Optimizations\Asynchronous Analysis\LabVIEW\Asynchronous Analysis.pinmap file in the Pin Map Editor. The pin map file defines the following information:
- One DUT pin named A.
- One custom instrument named Dev1 with an instrumentTypeId attribute value of CustomInstrument and one channel group that contains four channels.
- Four sites on the tester.
- A series of connections for each site, in which each connection specifies DUT pin A, a site number, the custom instrument Dev1, and an instrument channel.
, click the
- Select Edit Pin Map File
- Open <TestStand
Public>\Examples\NI_SemiconductorModule\Test
Optimizations\Asynchronous Analysis\LabVIEW\Asynchronous
Analysis.seq and review the steps in the sequence.
- Each Acquire Test Data step is a Semiconductor Multi Test Step that runs a LabVIEW code module that acquires data for each site and exports a reference to the data to a local variable. Because the pin map specifies a channel for each site connected to pin A, the test runs one instance of the code module that acquires data for all four sites.
- Each Analyze Test Data step runs a VI asynchronously to perform analysis on the data acquired in the preceding Acquire Test Data step. TestStand passes to the VI the local variable that contains the reference to the test data and stores the analysis result the VI returns in another local variable.
- Each Wait for Analysis of Test Data step waits for the asynchronous thread running the analysis VI to complete.
- Each Evaluate Analysis Result step is a Semiconductor Multi Test step with no code module. The step evaluates the value of the local variable that contains the analysis result against a set of limits. The Tests tab in the Step Settings pane shows the limits. If the value of the analysis result is within the limits, the test passes. Otherwise, the test fails.
- On the Sequences pane, select the ProcessSetup sequence. The Launch Resource Usage Profile step launches the Execution Profiler to demonstrate how the analysis threads run in parallel to the data acquisition threads. The Open and Store Instrument Sessions step in this sequence initializes the custom instrument.
- On the Sequences pane, select the ProcessCleanup sequence. The Close Instrument Sessions step in this sequence closes the custom instrument session.
- Open <TestStand Public>\Examples\NI_SemiconductorModule\Test Optimization\Asynchronous Analysis\LabVIEW\Asynchronous Analysis.lvproj to review the code modules the test program uses.
- Complete the following steps to execute the test program.
- Select to launch the Model Options dialog box.
- Set the Number of Test Sockets to 4 and click OK to close the Model Options dialog box.
- Click the Start Lot
button on the TSM toolbar to run the test program.
- The Execution Profiler automatically launches when execution begins. The profiler shows each thread running in the test program and demonstrates that the analysis steps are running in parallel with the acquisition steps.