Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Example Program
NI Supported: Yes
Publish Date: Sep 6, 2006

Custom Numeric Limit Test Step Type that Allows Expressions for Low and High Limits (TestStand 1.0.x)

3 ratings | 3.33 out of 5
Print

Downloads

Filename: limittestts103.zip
Requirements: View

The default Numeric Limit Test step type in TestStand 1.0.x has an edit substep called Edit Limits. You execute the edit substep for an instance of this step type by selecting Edit Limits from the context menu of your step. This is done from the sequence file window of a non-executing sequence. The default edit substep displays a dialog box that allows you to enter test limits and other parameters for the test. The limits must be numeric values and cannot be expressions. In addition, the edit substep of the default Numeric Limit Test step type programmatically modifies the status expression of the step to reflect your changes to the test parameters. The status expression is what determines the pass/fail status for your step.

The custom Numeric Limit Test step type of this example has a new edit substep that is written in LabVIEW, which allows you to use expressions or numbers for the test limits. You must have LabVIEW 5.1 or later to use this example. The step type also has a new pre substep that generates a Status Expression for your step.

The update of the status expression value is different from the default step type, which allows you to use a Limit Loader step to dynamically load limits into your Numeric Limit Test step at run time, and have the status expression updated at run time using the new limits. Recall that the default Numeric Limit Test step type only updates the status expression for non-executing sequences when you run the edit substep.

This example program contains two sequence files that both use the custom Numeric Limit Test step type. They are the same in that they both use expressions for the limit values, however one uses the Limit Loader to load the limit expressions from a file while the other does not.

Place the VIs that are located in the attached zip file in \Components\User\StepTypes\CustomNumLimitTest\.

Note: As of TestStand 2.0, the status expression of a Numeric Limit Test step is never updated. Instead of creating a status expression that evaluates to "Passed" or "Failed" based on a combination of comparisons, assignments and conditional operators, TestStand now uses the CheckLimits expression function, which did not exist in TestStand 1.0.x. CheckLimits performs the necessary comparison internally based on the limit inputs and comparison type, and then returns the value of "Passed" or "Failed". This has the advantage of allowing the Numeric Limit Test to use test parameters that are loaded at run time. The default TestStand 2.0 Numeric Limit Test still does not except expressions for the limit values. This example will be updated to provide a custom Numeric Limit Test step type that allows expressions for limits but reflects the new features of TestStand 2.0. The change required is to remove the code in comp_test.vi that updates the status expression of the step.

Requirements


Filename: limittestts103.zip

Software Requirements


Application Software: NI TestStand Development System 2.0
Language(s): LabVIEW

 
3 ratings | 3.33 out of 5
Print

Reader Comments | Submit a comment »

 

Legal
This example program (this "program") was developed by a National Instruments ("NI") Applications Engineer. Although technical support of this program may be made available by National Instruments, this program may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this program with each new revision of related products and drivers. THIS EXAMPLE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).