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

Page 51

Advertising
background image

Chapter 4

Defining Formulas

4–36

For each inspection, if any tool fails, the value RSLT1 =0. Therefore the
value NOT RSLT1 =1. Thus, for any inspection that fails, the value 1 is
added to RSLT2 by the portion of the formula

(RSLT2 + NOT RSLT1)

.

Thus, if consecutive failures occur, the value of RSLT2 is incremented by
one for each failure. This is because the RSLT2 value (the result of formula
2) is retained from inspection to inspection.

As soon as an inspection passes, however, the value RSLT2 is reset to 0.
This is because when an inspection passes the value RSLT1 =1. Therefore
the value NOT RSLT1 =0. Thus, in the formula, when an inspection passes,
the quantity

(RSLT2 + NOT RSLT1)

is multiplied by 0.

The fault range limit for formula 2, in this example, is set to 10. Thus when
10 consecutive failures occur, Formula 2 fails. The output of the formula 2
range limits can be assigned to a results output and used to trigger a signal
the event of 10 consecutive failures.

Creating a Shift Register

This example requires the use of four formulas, the result of which is to
provide a shift register effect, which produces a pass/fail output that is
delayed by four triggers.

Assume that the example application requires the use of window 3.

Formula 4 would be set to yield the numerical result of window 3:

WIN3

Formula 3 would be set to yield the result of formula 4:

RSLT4

Formula 2 would be set to yield the result of formula 3:

RSLT3

Formula 1 would be set to yield the result of formula 2:

RSLT2

The formulas are evaluated in numerical order for each inspection. Thus, for
each inspection, formula 1 is first set to the formula 2 result value, then
formula 2 is set to the formula 3 result value, then formula 3 is set to the

Advertising