Rockwell Automation 5370-CVIM2 Module User Manual

Page 381

Advertising
background image

5

Chapter

Chapter 7

Inspection Tools

7–143

Figure 7.112 Example: Formula Configured to Sum “Pass” Results From Four Gage
Tools

NOTE: A math formula that sums a series of “tool fail” results, such as . . .

{

Gage 1.Fail}+{Gage2.Fail}+{Gage3.Fail}+{Gage4.Fail}

. . . would not work properly, since “tool fail” results are non–logic error
code
values when they are “true,” and the sum would be unpredictable (see
Appendix A for a list of error codes). However, by adding the “

test

function, as follows . . .

test({Gage 1.Fail})+test(

{

Gage 2.Fail})+ . . . test({Gage n.Fail})

. . . each error code would be converted to a logic “1,” and the sum would
thus become predictable.

The second formula evaluates the area returned by the window tool and
performs a logical “and” operation with the results of the first math tool.
Thus, if the window tool returns an area of 47000 or more pixels, and the
first formula returns a result of 3 or greater (meaning that three of the four
gages passed), then the second math tool returns a logic “1”; otherwise, it
returns a logic “0.” This formula is set up on the formula entry keyboard as
shown in Figure 7.113.

Figure 7.113 Example: Formula Configured to AND Window Tool and First Math Tool
Results

The second formula range limits could all be set to 1.000; thus, if the window
tool returns a workpiece area of at least 47000 pixels AND at least three of
the four gage tools pass their measurement inspections (that is, they return
linear measurements between 9.5cm and 10.5cm), then the second math tool
will also pass (that is, it will return a logic “1”).

Advertising