The MinMax Test Type

The MinMax test is typically an analog test. When it is completed, the predefined result variant variable (TestResult) is compared against the numeric Min and Max values. The test assigns the test result value to the TestResult variable so that ATEasy can calculate the value of the TestStatus internal variable. If the result is within these values, the test status is Pass (1). If it is not, the test status is Fail (2). If an error occurs during a test and a measurement can not be taken, the test status is Error (3).

Defining a MinMax Test's Properties

To define a MinMax test's properties:

  1. Select the test and click (Properties) on the ATEasy toolbar. The Test Properties dialog appears:

  1. Make selections and entries as needed in the dialog box. For descriptions of the common test properties (name, ID, etc.), see Test Properties Window.

  2. In the Min and Max fields, enter the minimum and maximum values to which TestResult is to be compared.

  3. Click the Windows Close button in the upper-right corner of the dialog box to close it.

MinMax Test Log Output

In the example shown above, a Min/Max test is used to measure DC voltage. The Min/Max test properties include the minimum and maximum allowable values (high and low limits), the actual pin where the measurement is being taken, and the units (VDC, VAC, Hz, etc.). During testing, these parameters are printed into the test log.

Here is an example of MinMax test log output in text format:

Here is an example of the same MinMax test log output in HTML format:

Calculating TestStatus in a MinMax Test

The following code simulates the way ATEasy calculates TestStatus in a Min/Max test:

if TestStatus=NONE and VarType(TestResult) <> vtEmpty then

if TestResult >= Test.Min and Test.Result <= Test.Max

TestStatus=PASS

else

TestStatus=FAIL

endif

endif

! The status now is in TestStatus of which ATEasy

! write the status field.

MinMax Test Code Sample

The next example shows how to write a MinMax test and set the TestResult variable.

! MinMax Test

Measure DMM Immediate(TestResult)

TestResult=TestResult * 2

See Also

Min Property (ATest), Max Property (ATest), GetTestMin, GetTestMax, SetTestMin, SetTestMax, TestResult Variable, TestStatus Variable