Model Callbacks in the Sequential Process Model

The Sequential process model includes the following Model callbacks, which you can override with client sequence files:

  • MainSequence—Test UUTs and Single Pass Execution entry point sequences call the MainSequence callback, which is empty in the process model file. The client sequence file must contain a MainSequence callback that performs the tests on a UUT.
  • PreMainSequence—The Test UUTs and Single Pass sequences call the PreMainSequence callback before the MainSequence executes. The PreMainSequence callback in the process model file is empty. Override this in the client file to perform an action before any code in the MainSequence executes.
  • PostMainSequence—The Test UUTs and Single Pass sequences call the PostMainSequence callback after the MainSequence executes. The PostMainSequence callback in the process model file is empty. Override this in the client file to perform an action after all code in the MainSequence executes but before any Model Plug-ins execute.
  • PreUUT—Calls the DoPreUUT sequence, which launches the UUT Information dialog box to obtain the UUT serial number. The Test UUTs Execution entry point calls the PreUUT callback at the beginning of each iteration of the UUT loop. When the operator enters a UUT serial number, the IdentifyUUT step stores the serial number in the UUT.SerialNumber parameter, which is a local variable the Test UUTs sequence passes to the PreUUT callback. When the operator stops testing, the UUT loop terminates, and the IdentifyUUT step sets the ContinueTesting parameter to False. The ContinueTesting parameter is another local variable the Test UUTs sequence passes to the PreUUT callback.
  • PostUUT—Calls the DoPostUUT sequence, which displays a pass, fail, error, or terminate banner to indicate the status of the test the MainSequence callback in the client sequence file performs on the UUT. The Test UUTs Execution entry point calls the PostUUT callback at the end of each iteration of the UUT loop.
  • PreUUTLoop—Before the UUT loop begins, the Test UUTs Execution entry point calls the PreUUTLoop callback, which is empty in the process model file.
  • PostUUTLoop—After the UUT loop terminates, the Test UUTs Execution entry point calls the PostUUTLoop callback, which is empty in the process model file.
  • ReportOptions—The process model Execution entry point sequence calls the Model Plugins – Begin sequence in ModelSupport.seq. Model Plugins – Begin calls the Model Plugin – Initialize sequence in each plug-in instance. Model Plugin – Initialize in the NI_ReportGenerator.seq plug-in calls the ReportOptions callback so the client sequence file can modify the report options. The ReportOptions callback in the process model file is empty. This callback serves the same purpose as the more general ModelPluginOptions callback, but the report generator plug-in calls ReportOptions only for report generator plug-in instances and passes to it only reporting options.
  • DatabaseOptions—The process model Execution entry point sequence calls the Model Plugins – Begin sequence in ModelSupport.seq. Model Plugins – Begin calls the Model Plugin – Initialize sequence in each plug-in instance. Model Plugin – Initialize in the NI_DatabaseLogger.seq plug-in calls the DatabaseOptions callback so the client sequence file can modify the database options. The DatabaseOptions callback in the process model file is empty. This callback serves the same purpose as the more general ModelPluginOptions callback, but the database logging plug-in calls DatabaseOptions only for database logging plug-in instances and passes to it only database options.
  • ModelOptions—The process model Execution entry point sequence calls the Initialize Execution entry point sequence in ModelSupport.seq. After reading the test station model options from disk, the sequence calls the ModelOptions callback so the client sequence file can modify the model options. The ModelOptions callback in the process model file is empty. The client sequence file can change the value of the ModelPluginConfigurationToLoad parameter to specify the name of the model plug-in configuration to load from each model plug-in configuration file. The default value for the ModelPluginConfigurationToLoad parameter is an empty string, which directs the process model to load the active configuration from each model plug-in configuration file.
  • TestReport—The Test UUTs and Single Pass Execution entry points call the Model Plugins – UUT Done sequence in ModelSupport.seq. ModelSupport.seq calls the Model Plugin – UUT Done entry point for each configured result processor. The NI_ReportGenerator.seq plug-in calls the TestReport callback from the UUT Done entry point to generate the contents of the report for one UUT. The report generator does not call the TestReport callback when you enable the On-The-Fly Reporting option in the Report Options dialog box. The report plug-in defines a report for a single UUT as a header, an entry for each step result, and a footer. When you do not want to override the entire TestReport callback, you can override the ModifyReportHeader, ModifyReportEntry, and ModifyReportFooter callbacks instead to customize the report. You can override ModifyReportEntry only when you select the Sequence option in the Report Options dialog box and the report format is HTML or ASCII text.The TestReport callback returns the report using the Report string parameter or the ReportSection object reference parameter. TestStand 2010 SP1 or earlier process models use the Report parameter. TestStand 2012 or later process models use the ReportSection parameter. If you override the TestReport callback, you must support the parameter that corresponds to the version of the process models you use. To support both methods of returning a report, use the ReportSection parameter to determine which parameter the invoking process model requires. If the ReportSection reference uses Nothing as the value, you must return the report as a string in the Report parameter. If the ReportSection reference uses a value other than Nothing, you must return the report by updating the ReportSection parameter.For HTML and ASCII text report formats, depending on the settings in the Report Options dialog box, the TestReport callback determines whether TestStand uses sequences or a DLL to build the report body. Select the Sequence option to more easily modify the reports TestStand generates. Select the DLL option to generate reports more efficiently.When you select the Sequence option in the Report Options dialog box, the TestReport callback calls the AddReportBody sequence in reportgen_html.seq or reportgen_txt.seq to build the report body. The report generator plug-in uses a series of sequences with steps that recursively process the result list for the execution. When you select the DLL option in the Report Options dialog box, the TestReport callback calls a function in modelsupport2.dll to build the report body. You can access the project and source code for the DLL built in LabWindows/CVI from the <TestStand>\Components\Models\TestStandModels directory.For XML reports, TestReport callback calls the AddReportBody sequence in reportgen_xml.seq. The report generator plug-in calls the PropertyObject.GetXML method. For ATML 2 reports, the TestReport callback calls the GetATMLReport sequence in reportgen_atml.seq. The report generator plug-in in calls the Get_Atml_Report function in ATMLSupport.dll in the LabWindows/CVI project. For ATML 5 reports, the TestReport callback calls the AddReportBody sequence in reportgen_atml.seq. The report generator plug-in calls the Get_Atml_ReportSection_For_Body function in ATMLSupport.dll. You can access the project and source code for the DLL built in LabWindows/CVI from the <TestStand>\Components\Models\TestStandModels\ATML directory.
  • ModifyReportHeader—The TestReport callback calls the ModifyReportHeader callback so the client sequence file can modify the report header. The ModifyReportHeader callback receives parameters for the UUT information, the tentative report header text, and the report options. The ModifyReportHeader callback in the process model file is empty.
  • ModifyReportEntry—The TestReport callback uses subsequences to call the ModifyReportEntry callback for each result in the result list for the UUT so the client sequence file can modify the entry point for each step result. The ModifyReportEntry callback receives parameters for an entry from the result list, the UUT information, the tentative report entry text, the report options, and a number that indicates the call stack depth at the time the step executed. TestStand calls ModifyReportEntry callbacks when you generate HTML or ASCII text reports and enabled the Sequence option in the Report Options dialog box. In all other cases, you must modify modelsupport2.dll, located in the <TestStand>\Components\Models\TestStandModels directory, to modify how step results appear in the report. The ModifyReportEntry callback in the process model file is empty.
  • ModifyReportFooter—The TestReport callback calls the ModifyReportFooter callback so the client sequence file can modify the report footer. The ModifyReportFooter callback receives parameters for the UUT information, the tentative report footer text, and the report options. The ModifyReportFooter callback in the process model file is empty.
  • GetReportFilePath—The report generator process model plug-in calls the GetReportFilePath callback so the client sequence file can inspect the report file path.
  • LogToDatabase—Execution entry points call the Model Plugins – UUT Done sequence in ModelSupport.seq. ModelSupport.seq calls the Model Plugin – UUT Done entry point for each configured model plug-in. The NI_DatabaseLogger.seq plug-in calls the LogToDatabase callback from the UUT Done entry point to populate a database with the results for one UUT. The database logger does not call the LogToDatabase callback when you enable the Use On-The-Fly Logging option on the Logging Options tab of the Database Options dialog box. The LogToDatabase callback receives parameters for the UUT information, the result list for the UUT, and the database options.
  • ProcessSetup—The Test UUTs and Single Pass Execution entry points call the ProcessSetup callback so the client sequence file can execute any setup steps that must run only once during the execution of the process model. The Process Setup callback in the process model file is empty.
  • ProcessCleanup—The Test UUTs and Single Pass Execution entry points call the ProcessCleanup callback from the Cleanup step group so the client sequence file can execute any cleanup steps that must run only once during the execution of the process model. The Process Cleanup callback in the process model file is empty.
  • ModelPluginOptions—Execution entry points call the Model Plugins – Begin sequence in ModelSupport.seq, which calls the Initialize Model Plugins sequence. Initialize Model Plugins calls the ModelPluginOptions callback for each model plug-in instance so the client file can modify the model plug-in settings.
  • ModelPluginConfiguration—Execution entry points call the Model Plugins – Begin sequence in ModelSupport.seq, which calls the Initialize Model Plugins sequence. Initialize Model Plugins calls the ModelPluginConfiguration callback so the client file can inspect or modify the set of model plug-ins the process model calls at run time.