Fetching and Publishing Failed Cycle Information in .NET Code Modules (TSM)

Fetch and publish failed cycle information from an NI-Digital Pattern Driver with your .NET application.

  1. Use the following NI-Digital Pattern Driver API in code modules to configure your NI-Digital Pattern instruments to acquire failed cycle information and log this information in the TSM STDF Log file.
    // Configure the instrument to start acquiring information on the first failed cycle 
    session.Trigger.HistoryRamTrigger.TriggerType = HistoryRamTriggerType.FirstFailure;
    // Configure the instrument to acquire only failed cycles
    session.HistoryRam.CyclesToAcquire = HistoryRamCycle.Failed;
    // Set the maximum number of failed cycles you want to acquire per site
    session.HistoryRam.MaximumSamplesToAcquirePerSite = 10;
  2. After configuring the NI-Digital Pattern instrument and bursting a pattern, use the FetchMultisiteHistoryRamInformation extension method to fetch the failed cycle information and organize the information into a format the TSM Code Module API can consume.
    Note The TSM .NET code module API provides the FetchMultisiteHistoryRamInformation extension method for the NIDigital .NET class. It is not part of the NI-Digital Pattern Driver API.
  3. Pass the return value from the FetchMultisiteHistoryRamInformation method to the historyRamCycleInformation parameter of the PublishPatternResults method on the pin query context class in the TSM .NET code module API. TSM logs the failed cycle information in Functional Test Records (FTRs) in the STDF Log file.
The following example shows how to fetch and publish failed cycle information in a code module. This example code module logs a maximum of 10 failed cycles.
public static void PerformTest(ISemiconductorModuleContext
semiconductorModuleContext, string patternName, string[] patternPins)
{
   var pinQueryContext = semiconductorModuleContext.GetNIDigitalPatternSessionsForPattern(patternPins, out var sessions, out var siteLists);
   var passFailResultsPerSession = new bool[sessions.Length][];
   var historyRamCycleInformationPerSession = new NIDigitalHistoryRamCycleInformation[sessions.Length];
   
   Parallel.For(0, sessions.Length, i =>
   {
      var session = sessions[i];
      var siteList = siteLists[i];

      // Configure instrument to acquire cycle information only for first 10 failed cycles
      session.Trigger.HistoryRamTrigger.TriggerType = HistoryRamTriggerType.FirstFailure;
      session.HistoryRam.MaximumSamplesToAcquirePerSite = 10;
      session.HistoryRam.CyclesToAcquire = HistoryRamCycle.Failed;
      
      // Burst pattern
      passFailResultsPerSession[i] = session.PatternControl.BurstPattern(patternName, patternName, true, new TimeSpan(0, 0, 2));
      
      // Fetch history RAM cycle information
      historyRamCycleInformationPerSession[i] = session.FetchMultisiteHistoryRamInformation(siteList, patternName);
   });
   pinQueryContext.PublishPatternResults(passFailResultsPerSession, historyRamCycleInformationPerSession, "PassFail");
}