Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeContact

The text of a manual · part 26 of 42

Bulletin 5370 CVIM Configurable Vision Input Module User Manual: 8 - Inspection Tools: Windows, pages 245 to 254

Pages 245 to 254 of 390, from Bulletin 5370 CVIM Configurable Vision Input Module User Manual

The original document is the PDF (26 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Allen-Bradley 5370-CVIM

Page 245

Chapter

8 inspection Tools: Windows

Chapter Objectives

The objectives of this chapter are to explain windows and show you how they can be used, and then show you the procedures for configuring them. The chapter begins with a series of questions and answers about windows.

A few Questions and AnsweGm’.sit;;

This part of the chapter introduces you to windows by asking a few questions about them that might occur to you, and then answering those questions. What is a window? A window is a two-dimensional image analysis tool whose size and shape can be adjusted to inspect a specific part of the workpiece image. What does a window actually look for? A window looks at all of the pixels -points of variable light intensity - within its boundaries. It can look for specific numbers of black or white pixels, specific numbers of objects formed of black or white pixels, and so on. How does a window look for pixels? A window scans the area within its boundaries, left-to-right, top-to-bottom, evaluating every pixel along the way. What kind of information can these pixels provide? If a cluster of black or white pixels represents a particular feature (such as a hole) on a workpiece, counting those pixels can indicate the relative area of that feature. Similarly, counting separate clusters of black or white pixels can indicate the number of features or objects within the window’s boundaries. By measuring the gray-scale light level of all pixels within its boundaries, the window can determine their average luminance. By recording the gray-scale image of a particular feature on a workpiece, a window can later search for this same feature on other workpieces. What shapes can a window have? A window has one of three shapes: rectangular, polygonal.

elliptical, or

What are the position, size, and other limits of these windows? A window can be be any length or width, and can be positioned anywhere, so long as it remains within the useable portion of the video monitor screen.

Page 246

Chapter

8 hspection

TOO/S: Windows

8-2

-

A Few Questions and Answers About Windows (continued)

How many windows are available? The CVIM system provides 24 windows for each of the two tool sets, for a total of 48. Each window can be rectangular, elliptical, or polygonal. What functions can a window perform? A window’s function during each inspection cycle is one of these: l Count the number of black or white pixels within the l Count the number of black or white objects within the window. window.

l Compare a specific workpiece feature with a “template” of that feature taken from an ideal workpiece and stored in the CVIM system’s memory. l Calculate the average luminence, part of a workpiece.

Windows or light intensity, of a

This part of the chapter provides you with the details of using and configuring windows of all shapes. Under the Using Rectanglar Windows, Using Eliptical Windows, Using Masks with Windows, and Using Polygonal Windows headings, you will see simple application examples of the three window shapes.

-

Under the Configuring Windows heading, you will find out how to use the “user interface” - the light pen and the popup menus on the video monitor screen - to configure windows for inspection tasks.

Using Rectangular Windows

This section describes how you can use rectanguzar windows to inspect a workpiece or parts of a workpiece. (Note that the term “rectangular” includes square windows.) The following examples use rectangular windows to determine whether holes have been punched in a metal plate. The assumptions are as follows: l The metal plate is backlighted.

l Rectangular windows will be used for these operations:

l Count black pixels, which represent the opaque metal in the plate. l Count the white pixels that represent just the holes in the plate. l Count the white objects that represent just the holes in the plate.

-

Page 247

Chapter

8

Inspection Tools: Windows 8-3

Using Rectangular

Windows (continued)

l Shift and rotation compensation will not be used. (For information on shift compensation, see Chapter 6, Reference Tools: Lines and Windows.) The objective of these inspection examples is for the CVIM system to inspect every plate for the correct area or number of holes and reiect all glates with incorrect area or number of holes. ” s

Example 1: Figure 8.1 shows how the image of the metal plate might look on your video monitor screen. Figure 8.1 Screen Image of Metal Plate Holes in Plate Metal Plate \

Since the metal plate is qpaque, it appears black when lighted from behind. The holes in the plate appear white, and so does the area around the plate. The window’s function in this example is simply to count the black pixels within its boundaries. By counting black pixels, the window is, in effect, measuring the area of the metal plate. Thus, if any hole is either missing or incompletely punched, the area of the plate - the number of black pixels - will be greater than expected. If there are too many holes, or if any hole is much too large, the area will be smaller than expected. In each case, the CVIM system will issue a “pass/fail” signal that you can use to control your production equipment. For example, you could have the production equipment send the defective part, to a reject bin.

Page 248

Chapter

8

Inspection Tools: Windows

8-4

Using Rectangular Windows (continued)

Figure 8.2 shows how a rectangular window might appear when it is positioned around the metal plate. Note that the window needs to be just large enough to enclose the plate. This allows for a small amount of plate shift along the X and Y axes of the image on the monitor screen.

Figure 8.2 Rectangular Window Around Metal Plate Rectangular ..,t.- -I -_ _.

Metal Plate

Note that in this example shift and rotation compensation are not used. Thus, each plate must be in a nearly fixed position within the window. The plate cannot be allowed to shift or rotate so that part of it lies outside the window. During an inspection operation, the window counts the black pixels. If the black pixel count is within range limits (that you specify), the plate “passes” inspection; if not, the plate “fails” inspection. Example 2: Another way of using a rectangular window is to position it inside the plate so that the CVIM system can count the white pixels in the four holes, as shown in Figure 8.3. In effect, the window in this case would measure the sum of the areas of the four holes. During an inspection operation, the window counts the white pixels. If the white pixel count is within range limits (that you specify), the plate “passes” inspection; if not, the plate “fails” inspection.

-

Page 249

Chapter

Using Rectangular Windows (con tin ued)

8

Inspection Tools: Windows

8-5

Thus, if any hole is either missing or incompletely punched, the sum of the hole areas - the total number of white pixels will be smaller than expected. If there are too many holes, or if any hole is too large, the sum will be greater than expected. In each case, the CVIM system will issue a “pass/fail” signal that you can use to control your production equipment. -

Figure 8.3 Rectangular Window Positioned Around Holes in Metal Plate Rectangular Window

Meta) Plate

Example 3: Another way of using the rectangular window in Figure 8.3 is to have the CVIM system count the number of white objects - the four holes. Thus, if any hole is missing, or if there are too many holes, the CVIM system will issue a “pass/fail” signal.

Using Elliptical Windows

This section describes how you can use elliptical windows to inspect a workpiece or parts of a workpiece. (Note that the term “elliptical” includes circular windows.)

Example 1: This example uses circular windows to determine whether the two holes in a metal plate are the correct size. The assumptions are these: l The metal plate is backlighted; thus, the plate will appear black and the holes white on the monitor screen.

Page 250

8-6

Chapter

Using Elliptical Windows (con timed)

8 inspection Tools: Windows l The CVIM system will use two circular windows to count the white pixels from the holes.

l Shift and rotation compensation will not be used. (For information on shift compensation, see Chapter 6, Reference Tools: Lines and Windows.) The objective for the CVIM system to inspect each hole for the correct in this example area.

are

The CVIM system will reject all plates with missing holes or holes having an incorrect area. Figure 8.4 shows the image of a plate with two punched holes, each of which has a circular window around it (the circular window is shown as a thin white circle). Figure 8.4 Circular Windows Around Holes in Metal Plate Circular Window Around Hole

Metal Plate

Circular Window Around Hole The windows’ function in this example is simply to count the white pixels within their boundaries. By counting white pixels, the windows are, in effect, measuring the area of the holes. Thus, if a hole is missing, incompletely punched, or undersize, the area of the hole- the number of white pixels - will be smaller than expected. If the hole is too large, the area will be greater than expected. In each case, the CVIM system will issue a “pass/fail” signal.

-

Page 251

Chapter

8

Inspection Tools: Windows 8-7

Using E/Liptical Windows (continued)

Example 2: This example uses circular windows to determine whether an O-ring is present or missing, or is improperly installed, on the inside wall of a cylinder. The assumptions are these: l The open end of the cylinder is frontlighted.

l The

CVIM system will use one circular window to count the black pixels from the O-ring. l Shift and rotation compensation will not be used. (For information on shift compensation, see Chapter 6, Reference Tools: Lines and Windows.)

The objective for the CVIM system in this example is to inspect every cylinder for the presence of a properly installed O-ring. The CVIM system will issue a “pass/fail” signal for all cylinders with missing or improperly installed O-rings. Figure 8.5 shows how the open end of the cylinder might look on your monitor screen. It would most likely appear gray when lighted from above. The inside of the cylinder might appear as darker shades of gray because of shadows. Fiaure 8.5 Lookina into Or>en End of Cvlinder With and Without O-Rim

-

The O-ring is installed in a groove on the inside wall of the cylinder, and it is easily visible when viewed from the open end.

Page 252

Chapter

8

Inspection

Tools: Windows

8-8

Using Elliptical Windows (continued)

Figure 8.6 shows how a circular window might appear when it is positioned over the end of the cylinder. In this example,the window’s diameter needs to be just large enough to enclose the O-ring. This allows for a small amount of cylinder shift along its X and Y axes of the image on the monitor screen.

-

Figure 8.6 Circular Window Positioned Over End of Cylinder Circular Window I

Area of Interest /\

Circular Window

-

The window is shown as a white circle inside a black square. The black square is called the “area of interest”; however, the circle is the only part of the image that the window will evaluate. The function of the window in this example is simply to count the black pixels in the O-ring. When the O-ring is present, the black pixel count might be 1000 to 1500; when the O-ring is missing, the pixel count will be 0. If an O-ring were not properly seated in the groove, the window would probably detect that because it might see too many black pixels. In any case, the CVIM system will issue a “pass/fail” signal whenever the black pixel count is beyond the specified range limits.

Page 253

Chapter

8

Inspection Tools: Windows 8-9

-

Using Masks With Windows

Within each inspection window, a second window is available that you can configure to cover unwanted or unneeded parts of the workpiece image. This second window is called a “mask.” In some window applications, only a small part of the image within the inspection window may be needed. In other applications, some part of the image within the inspection window may need “masking” because visual “noise” in it interferes with the inspection of a particular workpiece feature. During an inspection operation, the window ignores the image area within the mask. It processes only the area outside the mask, but inside the window’s boundaries. Example: Refer to the elliptical window example in Figure 8.7. This exam le is similar to the one in Figure 8.6 except that it uses bot f: a window and a mask.

Figure 8.7 Cilrcular Window with Mask Positioned Over End of Cylinder Circular Window I

M?sk

Area of Interest

Ma\sk

Circular Window I

-

O-Ring i< Groove on Inside Cylinder Wall

In this example, the mask and the window are both circular and are arranged concentrically over the cylinder and Oring. The practical value in using this mask is that it can remove visual “noise” or clutter that may interfere with the inspection; however, a mask will increase processing time.

Page 254

Chapter

8

Inspection Tools: Windows

8-10

Using Polygonal Windows

This section describes how you can use polygonal windows to inspect a workpiece or parts of a workpiece.

-

The main advantage of using a polygonal window is that you can tailor it to fit an odd-shaped workpiece or part of a workpiece. In either case, the polygonal window can exclude areas that may interfere with the inspection process. Here are the capabilities windows: l Four and limitations of polygonal polygon windows are available per tool set.

l A polygonal l A mask window can have from three to sixteen sides.

cannot be used with a polygonal window.

Example: This example uses a polygonal window to inspect three screws on a workpiece. The six-sided, L-shaped window will look only at the area including the three screws. It thus avoids the “clutter” on the workpiece. Figure 8.8 Polygonal Window Around Screws in Workpiece Six-Sided, L-Shaped Polygonal Window Around Screws

Workpiece \ -

The polygonal window’s function could be to count objects (the screws) or count black pixels (the total area of the screws). Regardless of which inspection method is used, if a screw is missing, either the object count will be short or the area will be too small. In each case, the CVIM system will issue a “pass/fail” signal.