This example demonstrates how to define instruments that TSM does not natively support, how to create API for the instruments, and how to use the API in a code module for a TSM test program. Each instrument in this example has unique session data for each channel, similar to an NI-DCPower instrument. The code module opens one session per channel.

Example File Locations <TestStand Public> \Examples\NI_SemiconductorModule\Custom Instruments\Session per Channel\LabVIEW\Session per Channel.seq
Highlighted Features
  • Custom instruments
  • Pin map
Major API

TSM Code Module API

Prerequisites
  • You must have the LabVIEW Development System installed, and you must configure the LabVIEW Adapter to use the LabVIEW Development System.
  • This example uses the Batch process model.

Complete the following steps to use this example.

  1. Complete the following steps to review the pin map file associated with the test program.
    1. Select Semiconductor Module » Edit Pin Map File or click the Edit Pin Map File button on the TSM toolbar to open the <TestStand Public>\Examples\NI_SemiconductorModule\Custom Instruments\Session per Channel\LabVIEW\Session per Channel.pinmap file in the Pin Map Editor. The pin map file defines the following information:
      • Two custom instruments named dev1 and dev2, respectively, each with an instrumentTypeId attribute value of SessionPerChannelInst and eight available channels but no channel group
      • Four DUT pins named A, B, C, and D, respectively
      • Four sites on the tester
      • A series of connections for each site, in which each connection specifies a DUT pin, a site number, an instrument, and an instrument channel
  2. Complete the following steps to review the code module that communicates with the custom instruments.
    1. Click the LabVIEW Module tab on the Step Settings pane. The Project Path control specifies a file path to the <TestStand Public>\Examples\NI_SemiconductorModule\Custom Instruments\Session per Channel\LabVIEW\Session per Channel.lvproj LabVIEW project file.
    2. Click the Edit LabVIEW Project button, located to the right of the Project Path control, to open Session per Channel.lvproj in LabVIEW.
    3. In the Project Explorer window, expand the API folder.
    4. Open and review the following VIs that correspond to operations TSM performs on the pin map:
      VIDescription
      Session per Channel - Get All Instrument Names.viObtains all instruments of the SessionPerChannelInst instrument type, as defined in the pin map file, so that the initialization code module can open sessions and store them in the SemiconductorModuleContext object.
      Session per Channel - Get All Sessions.viObtains all stored sessions so that the clean up code module can close the sessions that were previously opened and stored in the SemiconductorModuleContext object.
      Session per Channel - Pins To Sessions.viQueries the DUT pins and returns the associated instruments and channel lists associated with a SemiconductorModuleContext object.
      Session per Channel - Store Instrument Session.viStores the sessions in the SemiconductorModuleContext object so that other parts of the test program can access the sessions.
  3. In TestStand, select the ProcessSetup sequence on the Sequences pane. The step in this sequence initializes the instrument sessions.
  4. On the Sequences pane, select the ProcessCleanup sequence. The step in this sequence closes the instrument sessions.
  5. Click the Start Lot button on the TSM toolbar to run the test program.