Rockwell Automation 5370-CMPK Color CVIM Module MATH-PAK User Manual
Page 49

Chapter 4
Defining Formulas
4–34
yields a 1 result if both gages pass, and a 0 (zero) result if either or both
gages fail.
(GAGE1.2 AND GAGE2.2)
OR operator
The
OR
operator evaluates two operands as to whether or not each equals 0
(zero), and then provides either a 1 or 0 result, as follows:
1 result – If either or both operands are non-zero.
0 result – Only if both of the operands equal zero.
Format / Usage: In general, use two operands with the operator, placing the
OR
operator in the formula between the two operands.
Example usage: This formula
OR
s the pass/fail results from gages 1 and 2.
A pass condition yields a 1 result, a fail yields a 0 (zero) result. The formula
yields a 1 result if either or both gages pass, and a 0 (zero) result only if both
gages fail.
(GAGE1.2 OR GAGE2.2)
NOT operator
The
NOT
operator inverts the logical evaluation (1 or 0) of an operand or
expression in a formula, assigning a logical value as follows:
0 – If the operand is non-zero.
1 – If the operand equals 0 (zero).
Format / Usage: Place the
NOT
operator to the immediate left of the operand
in the formula.
Example usage: This formula first
AND
s the pass/fail results from gages 1
and 2. A pass condition yields a 1 result, a fail yields a 0 (zero) result.
(GAGE1.2 AND GAGE2.2) AND NOT GAGE3.2
Then, the formula takes the result of the first
AND
operation, and
AND
s it
with the inverse (
NOT
) of the pass/fail result of gage 3. In this case, the
result of the formula is 1, only if both gage 1 and gage 2 pass, and gage 3
fails. Otherwise, the result is 0.