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

Page 45

Advertising
background image

Chapter 4

Defining Formulas

4–30

operator/operand expressions, and 4) operator/operand portions of the
formula – that is, operators of the type that are followed by a parenthetical
listing of operands.

Average operator:

AVG

The average operator computes the average value of the operands and/or
expressions that are listed in parentheses following the operator.

Example usage: The formula below averages the results from 3 gages:

AVG(GAGE1,GAGE2,GAGE3)

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

Figure 4.16 Example application, using three gages to find an average measurement

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

X

X

X

X

X

X

Maximum operator:

MAX

The maximum operator returns the maximum value among the operands
and/or expressions listed in parentheses following the operator.

Example usage: The formula below finds the maximum value among the
results of 3 gages:

MAX(GAGE1,GAGE2,GAGE3)

In this example, each of three gages is set for linear gaging, in order to
measure the distance between the center of two objects (see Figure 4.16).
The formula above yields the maximum value among the measurements of
the three gages. In this example, if the maximum value is above a certain
level, the part is rejected.

Advertising