Gage – Rockwell Automation 5370-CMPK Color CVIM Module MATH-PAK User Manual
Page 28
![background image](/manuals/580817/28/background.png)
Chapter 4
Defining Formulas
4–13
Using a sub-code: The operands can be defined so as to provide any of a
number of different types of results data. You do this by including a
sub-code – a decimal point and a number (refer to Table 4.C, page 4–14, for
the definitions of the valid sub-codes).
For example, to specify the pass/fail results from gage 5, in the example
above, you would enter the operand
GAGE
5.2
:
•
Pick
G
on the formula entry keyboard – this will initially display the
operand
GAGE0
in the formula display area:
= ? GAGE0
Formula:
•
Pick 5,
then “.”
(decimal point)
, then 2
– this will change the operand to
GAGE
5.2
.
= GAGE5.2
Formula:
You can see in Table 4.C, page 4–14, that the “.
2
” sub-code definition is
“Pass/fail condition for fault range (1 = pass, 0 = fail).” During inspections, then,
if gage 5 were to fail, the value 0 would be entered for the
Gage5.2
operand. Conversely, if gage 5 passes, the value of 1 is entered.
Listing operands: Some operators require that you enter one or more
operands in a parenthetical list following the operator. In these cases, when
you pick the operator, the “open” parenthesis is displayed. After you list the
operands (separated by commas), you then enter the “close” parenthesis.
For example, to average the results from gages 1 and 2, enter the formula:
AVG( GAGE1, GAGE2)
•
Pick the
AVG
key on the formula entry keyboard (located on the
secondary key set). The formula keyboard display shows:
= AVG( ?
Formula:
•
Pick
G
(on the initial key set), then 1, then “,” (comma), then
G
, then
2
.
= AVG( GAGE1, GAGE2 ?
Formula:
•
Pick “
)
” (close parenthesis) on the secondary key set. The formula is
now correct in syntax at this point; the “?” disappears.