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

Page 48

Advertising
background image

Chapter 4

Defining Formulas

4–33

Example usage: The formula below finds the variance of the results from 6
gages:

VAR(GAGE1,GAGE2,GAGE3,GAGE4,GAGE5,GAGE6)

In this example, each of six gages is set for linear gaging, in order to measure
the distance between the center of two objects (see Figure 4.18). The
formula above provides the variance of the measurements of the six gages.
In this example, if the variance value is beyond an acceptable range, the part
is rejected.

Figure 4.18 Example application, using gages and the variance operator

Gages 1-6,
each measuring
distance between
the two objects of
the same color

X

X

X

X

X

X

X

X

X

X

X

X

Logical Operators

The logical operators,

AND

,

OR

, and

NOT

, perform the indicated logical

function, and return a logical (1 or 0) result. Generally, it makes sense to use
operands which are logical values (1 or 0), such as conditional operation
results, or tool pass/fail results. Nonetheless, you can use operands of any
value.

AND

operator

The

AND

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 – Only if both operands are non-zero.

0 result – If either or both of the operands equals zero.

Format / Usage: In general, use two operands with the operator, placing the

AND

operator in the formula between the two operands.

Example usage: This formula

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. The formula

Advertising