Creating Rule Configuration Modules in the TestStand Sequence Analyzer

Select Use Configuration Module from the Configuration Option ring control on the Advanced tab of the Edit Rule dialog box to use a rule configuration module. The TestStand Sequence Analyzer calls the configuration module when the user clicks the Settings button next to the rule on the Rules pane or tab.

National Instruments recommends that you copy a rule configuration module template from the <TestStand>\Components\Analyzer\Templates\<Environment> directory to the <TestStand Public>\Components\Analyzer\<YourRuleName> directory, where Environment is LabVIEW, CVI, CSharp, or VC and YourRuleName is the descriptive name or the unique ID of the custom rule. National Instruments recommends also using your company name as part of the directory name to avoid potential conflicts with other custom analysis modules.

(LabVIEW)  After you copy the template files, rename the VIs using the rule ID to avoid potential conflicts with other analysis module VIs, and enable the VIs to perform rule checking.

(LabWindows/CVI, Microsoft Visual C#, Microsoft Visual C++)  After you copy the template file, search for the text Template in each source file and follow the instructions in the file.

The TestStand Sequence Analyzer requires that rule configuration modules use the following specific prototypes.

LabVIEW

The VI connector pane must use an ActiveX Refnum input with the ActiveX class set to TSAnalyzer.RuleConfigurationContext and can optionally include an Error Out cluster output or a Boolean, an I32 numeric, and a string output, which represent the unbundled elements of an Error Out cluster. You can use the Unbundle by Name function in LabVIEW to obtain the individual elements of the Error Out cluster.

LabWindows/CVI

The function prototype must be one of the following:

void Function(CAObjHandle ruleConfigurationContext); bool Function(CAObjHandle ruleConfigurationContext, char errorMessage[]); int Function(CAObjHandle ruleConfigurationContext, char errorMessage[]);

where ruleConfigurationContext is an input that contains an instance of the TSAnalyzer.RuleConfigurationContext ActiveX class, and errorMessage is a string buffer of 1024 characters in which the function returns error messages for the rule configuration module code.

Microsoft Visual C#

The method prototype must be one of the following:

void Method(NationalInstruments.TestStand.Interop.SequenceAnalyzer.RuleConfigurationContext ruleConfigurationContext); bool Method(NationalInstruments.TestStand.Interop.SequenceAnalyzer.RuleConfigurationContext ruleConfigurationContext, out string errorMessage);

where ruleConfigurationContext is an input that contains an instance of the RuleConfigurationContext COM interop class and errorMessage is an output string in which the method returns error messages for the rule configuration module code.

Microsoft Visual C++

The function prototype must be one of the following:

void Function(TSAnalyzer::RuleConfigurationContext *ruleConfigurationContext); bool Function(TSAnalyzer::RuleConfigurationContext *ruleConfigurationContext, char errorMessage[]); int Function(TSAnalyzer::RuleConfigurationContext *ruleConfigurationContext, char errorMessage[]);

where ruleConfigurationContext is an input that contains an instance of the TSAnalyzer.RuleConfigurationContext ActiveX class, and errorMessage is a string buffer of 1024 characters in which the function returns error messages for the rule configuration module code.