To download NI software, including the products shown below, visit ni.com/downloads.
This tutorial demonstrates how to use the NI-TClk API to synchronize two digital pattern instruments for use on one site within the TestStand Semiconductor Module (TSM). This example can easily be modified for multiple sites or any other instrument that support NI-TClk synchronization.
Note: This example is for digital pattern instruments that were calibrated in an NI STS.
The source files for this tutorial are attached to this document. You will be working with the Synchronize Digital Pattern Instruments sequence file. In there, you will find the usual sequence callbacks: MainSequence, ProcessSetup, and ProcessCleanup. Using ProcessSetup and ProcessCleanup is standard procedure when working with TSM. Following this practice ensures that your instruments sessions are properly initialized and closed when running your execution. This tutorial is a simpler version of the Accelerometer example. If you require a more full featured example, refer to the Accelerometer with LabVIEW (Semiconductor Module) help topic.
Note: For more in-depth information about NI-TClk synchronization, refer to National Instruments NI-TClk Technology for Timing and Synchronization of Modular Instruments
When designing test programs, take multisite options into consideration for your hardware configuration. This example uses one thread per subsystem which, for VIs configured for shared clone execution setting, results in one instance of the VI executing for the number of sites in a subsystem. This works for systems where the subsystems are independent but will not work for systems where a DIB resource pin is shared by the multiple subsystems. If this is the case on your system, consider changing the subsystem configuration in your pinmap such that the shared resource is only owned by one site or by changing the multisite option to one thread per site and using global site data instead to store sessions instead of per site data.
The ProcessSetup sequence initializes the digital pattern sessions and applies timing levels. The reason why synchronization is not done in ProcessSetup is because you cannot store the digital pattern sessions in per site data and guarantee that all sessions will be open for the lifetime of all subsystems. This is why it is done in the Synchronize Digital Instrument Sessions step of the MainSequence.
Figure 1. LabVIEW block diagram for Add NI-Digital Pattern Instrument Sessions.vi showing how to initialize the digital pattern instruments
Figure 2. LabVIEW block diagram for Apply Levels and Timing.vi
Figure 3. MainSequence of Synchronize Digital Devices.seq
The MainSequence callback is the starting point of your test program. In this example, you synchronize your instruments sessions before you start your test program to ensure that all the instruments are ready .
Figure . LabVIEW block diagram for Synchronize Instruments Sessions.vi showing how to get and store NI-TClk sessions
There is no need to synchronize the devices on each run of the sequence. To enforce this, the following precondition is used on the Synchronize NI-Digital Pattern sessions step:
RunState.Caller.Locals.UUT.UUTLoopIndex <= 1
Figure 4. LabVIEW block diagram for Connect Vref Pin.vi.
This VI sets the appropriate pins to high or low according to what is defined in the specification files. This step sets the relays to low. The SubVI uses the TSM pin map to find what pins to set and then uses the PPMU functionality on the digital pattern instrument to set the levels on the pin.
Note: For more information on specification files refer to the Specifications File (Semiconductor Module) help document.
Figure 5. LabVIEW Block Diagram using Site Data to get sessions.vi
Figure 6. LabVIEW block diagram for Close NI-Digital Pattern Instrument Session.vi
This VI gets all of the digital pattern instrument sessions from the Semiconductor Module context, resets the instruments, and then closes the sessions.
When you run this sequence, you will burst a simple pattern to your DUT. This example only has one pattern and that pattern uses both the digital pattern instruments. You can modify this example to fit your requirements by editing the pin map file to match your hardware configuration and add your own patterns in the digital pattern project.
How-Separate-2Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.