Rockwell Automation 5370-CVIM2 Module User Manual

Page 377

Advertising
background image

5

Chapter

Chapter 7

Inspection Tools

7–139

In this example, two gages are used to find edge coordinate values on an
object in the image. The X and Y values returned by these gages are
incorporated into the formula that is set up on the formula entry keyboard as
shown in Figure 7.106.

Figure 7.106 Example: Using the DST Function in a Math Tool Formula

In this formula, inspection results from Gage 1 and Gage 2 are used. Since
these gages are both configured for the

X Position

operation, the primary

results are the X–axis coordinate values, while the secondary results are the
Y–axis values. Thus,

{Gage 1},{Gage 1.Ay},{Gage 2},{Gage 2.Ay}

is

evaluated as 33, 246, 478, and 246. (In effect, this formula operates as
though it were set up using the constants 33,246,478,and 246, as in

dst(33,246,478,246)

, which calculates the distance as 445.000 pixels.)

With the formula set up as shown in Figure 7.106, when you pick the

Nominal

field in the math tool edit panel, the system performs one “test”

operation of the formula and returns a distance of 444.997 (pixels).

Example: Using Multiple Windows to Count Objects

In a situation where a single window tool cannot be used to count objects
because of the difficulty or impossibility of masking unwanted objects within
the window, multiple window can be used, along with a math tool formula, to
count these objects. Figure 7.107 (page 7–140) illustrates a rectangular
workpiece on which the inspection application looks for four rivets –– one
rivet at each corner of the workpiece.

In this case, the combination of a single window tool and a mask cannot
remove all of the objects whose size is the same as the rivets. However, four
window tools, each positioned over a single rivet and configured to count
black objects, as shown in Figure 7.107, along with a math tool, configured
to add the object counts from each window, can perform this application.

Advertising