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).
To define a MinMax test's properties:
Select the test and click
(Properties)
on the ATEasy toolbar. The Test Properties dialog appears:
Make selections and entries as needed in the dialog box. For descriptions of the common test properties (name, ID, etc.), see Test Properties Window.
In the Min and Max fields, enter the minimum and maximum values to which TestResult is to be compared.
Click the Windows Close button in the upper-right corner of the dialog box to close it.
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:
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.
The next example shows how to write a MinMax test and set the TestResult variable.
! MinMax Test
Measure DMM Immediate(TestResult)
TestResult=TestResult * 2
Min Property (ATest), Max Property (ATest), GetTestMin, GetTestMax, SetTestMin, SetTestMax, TestResult Variable, TestStatus Variable