The text of a manual · part 20 of 42
Bulletin 5370 CVIM Configurable Vision Input Module User Manual: 7 - Inspection Tools: Gages, pages 191 to 199
Pages 191 to 199 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 191
Chapter
Chapter Objectives
A Few Questions and Answers About Gages
7 inspection Took: Gages The objectives of this chapter are to explain gages 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 gages.
This section introduces you to gages by asking a few questions about them that might occur to you, and answering those questions. What is a gage? A gage is a one-dimensional image-analysis tool that inspects only the specific part of the workpiece image that it crosses. What do these gages actually look for? Gages look for edges. An edge is a point on a gage where a specified change occurs in the color of the pixels that make up the image of the workpiece. How does a gage look for edges? A gage searches along its length for specific edges on a workpiece. It begins at either end of the gage and proceeds to the other end, evaluating each pixel along the way. How does a gage detect an edge? It detects an edge when it sees a specified change in the color of the pixels: from black to white, from white to black, or from one specified shade of gray to another. What kind of information can a gage get from edges? By finding just one edge, a gage can calculate position information - it can tell where an edge is on a workpiece. By finding two or more edges, it can measure distances between the edges. Or, it can simply count pixels between the edges, or just count the edges themselves. What shapes can a gage have? A gage has one of two shapes: straight (a linear gage), or circular (a circular gage). What are the size, position, and angle limits of these two gage shapes? A linear gage can be be any length and can be positioned at any angular orientation anywhere within the usable portion of the monitor screen. A circular gage can be either a complete circle or a portion of a circle (an arc), of any radius, and can be positioned anywhere within the usable portion of the monitor screen. (Note that the usable portion of the monitor screen will be reduced when the light probe status is set to “same field.“)
Page 192
Chapter
7
Inspection Toolss: Gages
7-2
-
A Few Questions and Answers About Gages (continued)
How many gages are there? The CVIM system provides 32 gages for each of the two tool sets, for a total of 64. Each gage can be either linear or circular. What functions can a gage perform? A gage’s function during each CVIM inspection cycle is one of these: l Counting
Gages pixels, objects or edges.
l Measuring distances using a linear gage.
l Measuring distances and angles using a circular gage.
This section provides you with the details of using and configuring both linear and circular gages. Under the Using Linear Gages heading, you will see simple example applications in which the CVIM system uses a linear gage to find the level of a liquid in a bottle. Under the Using Circular Gages heading, you will see example applications in which the CVIM system uses circular gages to count and measure the teeth on a gear. Under the Configuring Gages 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 a gage.
Using Linear Gages
_
The following pages describe how you can use linear gages to detect and measure parts of a workpiece. Linear gages can be set to any length within the camera’s field of view, and can be rotated to any angle. In the following examples of using a linear gage to find the level of a liquid in a glass bottle, here are the assumptions: l The
“workpiece” is a clear glass bottle filled with an opaque liquid, such as hand lotion.
l The bottle is backlighted.
l A vertically-positioned the liquid level.
linear gage will be used to measure l Shift compensation will not be used. (For information on shift compensation, see Chapter 6, Reference Tools: Lines and Windows.) The overall objective in these examples is for the CVIM system to inspect every bottle for a correct fill level, and to reject all bottles that are not correctly filled.
-
Page 193
Chapter
7
Inspection
Tools:
Gages 7-3
Example 1: Figure 7.1 shows how an image of a correctly filled bottle might look on the screen of your video monitor.
Using Linear Gages (continued)
Figure 7.1 Linear Gage Configured to Measure Head-to-Edge r--
*
Linear Gage
< ‘X’ Indicates Location of Edge That Linear Gage Finds at Liquid Surface \ Surfa ce c Liqluid
‘%
Headof Gage Linear Ga e Measures t% is Distance
Tail of Gage
-
Since both the liquid and the bottle cap are opaque, they appear black when lighted from behind. Under the same backlighting conditions, the neck (above the liquid level) is likely to appear as a light shade of gray. Figure 7.1 shows also how a linear gage might appear when it is positioned vertically over the bottle’s neck. In this example, the gage needs to be just long enough to detect the liquid surface within previously set range limits. The function of the linear gage in this example is to find the single edge that represents the surface of the liquid in the bottle, then calculate the distance from its “head” to that edge. When the gage finds that edge, it determines whether or not the distance to that edge (that is, the liquid level) is within the previously set range limits. If so, the inspection “passes”; if not, the inspection “fails.”
Page 194
Chapter
7 inspection Tools:
Gages
7-4
Using Linear Gages (con timed)
NOTE: Using the linear gage this way requires that each bottle be in a fixed position along the vertical axis, since the gage cannot differentiate between vertical variations in the bottle’s position and variations in the liquid level. Example 2: Another way to measure the liquid level is to configure the linear gage to find the distance between two edges: the top of the cap (fixed), and the liquid surface (variable). This is shown in Figure 7.2.
Figure 7.2 Linear Gage Configured to Measure Edge-to-Edge Distance
Linear Gage
‘X’ Indicates Location of Reference Edge at i 1. ,/Top of Bottle Cap
\i
‘X’ IndicatesLocation of Edge That Linear Gage Finds at Liquid Surface ,
&i I
Linear Ga e Measures t41is Distance
Sl irface of Liquid
-
In this example, the gage should be long enough to measure the liquid level from the cap and to accommodate a certain amount of up-and-down bottle shift. Unlike Example 1, the range limits in this example apply only to the distance between the two edges; that is, their relative positions along the gage, not their absolute positions. When the gage finds the two edges, it determines whether or not the distance between them (that is, the liquid level) is within the previously set range limits. If so, the inspection “passes; if not, the inspection “fails,”
Page 195
Chapter 7
Inspection Tools: Gages 7-5
Using Linear Gages (continued)
If a particular bottle shifts down, as shown in Figure 7.3, but the cap and liquid surface (the two edges) still lie somewhere along the gage, the gage will find the two edges, and the distance between the edges will then be calculated. (The same would be true if the bottle shifted up, so long as the cap and liquid surface still lie somewhere along the gage.) If, however, one of the two edges lies beyond either end of the gage, an inspection failure will occur, since the distance calculation cannot be made.
Figure 7.3 Linear Gage Measuring Liquid Level on Shifted Bottle
*Ii; :I..
.
Lmear Gage ..
Distance Measured on Original Bottle Original Position of Liquid Surface Same Distance Measured on Shifted Bottle
Original Bottle Position Shifted Position of Liquid Surface
-
Shift Direction Shifted Bottle Position
Page 196
Chapter
7
Inspection Tools: Gages
7-6
Using Circular Gages
The following pages describe how you can use circular gages to detect and measure parts of a workpiece that are arranged in an arc or circle.
-
Circular gages can be set to any radius or to any number of degrees of arc up to 360 , so long as they remain within the screen image. In the following examples of using a circular gage to find the number of teeth on a gear, here are the assumptions: l The “workpiece” l The is a metal gear.
gear is backlighted.
l A circular gage, arranged in a full circle, will be used to count the teeth. l Shift compensation will not be used. (For information about shift compensation, see Chapter 6, Reference Tools: Lines and Windows.) The overall objective in these examples is for the CVIM system to inspect every gear for the correct number of teeth, and to reject all gears that have broken or missing teeth. Example 1: Figure 7.4 shows how an image of a gear might look on your video monitor. Since the gear is opaque, it will appear black when lighted from behind. Figure 7.4 shows also how a circular gage might appear when it is centered over the gear. In this example, the gage needs to be just, large enough to cross all 16 teeth at a point, where it can easily detect the two edges on each tooth. The function of the circular gage in this example is simply to find the 32 edges that represent the 16 teeth. Note that the gear in Figure 7.4 would fail the inspection, since one of the teeth is missing, and material between two other teeth was not removed. When the gage finds the edges, the CVIM system determines whether or not the number of edges (the number of teeth times two) is correct. If the number is 32, the inspection “passes”; if not, the inspection “fails.” NOTE: The circular gage in this example requires that each gear be in the same position during inspection. If the workpiece shifts more than the slightest amount, the result could be a failed inspection. (In a real application, if you expect, workpiece shift, you will probably need the shift compensation provided by one of the reference tools. See Chapter 6, Reference Tools: Lines and Windows.)
-
Page 197
Chapter
7
Inspection Tools: Gages 7-7
Using Circular Gages (continued)
Fiqure 7.4 Circular Case Confiqured to Count Edqes or Pixels iroken or Missina Tooth /
Partial Tooth -
Each Tooth Has Two Edges and (n) Pixels
360-Degree Circu3r Gage
16-Tooth Gear -
Material Not Removed Between Two .a.... . :.:.:::~:~:~:::~p x:~::.:~., :::::::: “i.:.:.’ ,.:.:.:.:::::::+ x:::::: “‘::::~:~.~il/i~ili: Teeth ::::::::: :.:.:.:.: / “‘.:.:.:-:.:;
Example 2: Another way to check for all 16 teeth is to have a circular gage count the black pixels (which come from the teeth) along its circumference. The idea here is that if all 16 teeth are present, the circular gage will detect a specific number of black pixels, plus or minus some small tolerance. In this example, if a tooth is missing, the black pixel count would be below the previously set lower range limit. If material were present between two teeth, the black pixel count would be above the upper range limit. In either case, the inspection would fail. Note that if a tooth is missing and material is present between two teeth, as shown in Figure 7.4, the inspection may puss, especially if the range limits are too “loose.” Thus using a circular gage this way should probably be limited to a situation in which only one or the other condition is likely to occur.
Page 198
Chapter
7 inspection Tools: Gages
7-8
Using Circular Gages (continued)
Example 3: In this inspection example, a series of circular gages will measure the width of each tooth. This inspection will detect any gears with flaws that may pass the inspection in Example 1 or 2. In this example, you would configure 16 circular gages, one for each tooth. Figure 7.5 shows five of these gages. Note that circular gage #l would find no edges. Gages #2 and #3 would each find only one edge. Gage #4 would find two edges, but the width would be below the lower range limit. The teeth would fail the inspections of all of these gages. Only the gage #5, the one over the normal tooth, would find two edges and a normal width. To pass inspection of this gage, the tooth width would have to be between the upper and lower range limits.
Figure 7.5 Circular Gages Configured to Measure Width of a Tooth
Broken or
Cir
3....:,:& ..i_.. ..A..... .:.:.~:.:.:.:.:.:.:.:.:’ 7.Y ............. :.~):.:.:.:.:.):(.y .A.... .. ... .i . ...i... .i... ...i...... .A...... i....... . 2 i ... ....i_.. .i... .A. il.. .._.. .... . .I i... i... . .. ., :.:.:.-:.:.:.x+ .:.:.:.:.:.:,<,; ;;f$gg .A. i......... ::::::::::::~:::::)i:~:~:i:~~~~~::::::::.:.:.:.:.:,.. ~:~:::i:Xf:::j::.:jaj::::::::::a8:g::~~~ lilLi~~~~~~~lsl:iEw’ :i.:::::wj::::j:::::::.::::i:::.:~, .:.: .,...,.......................,..... .A.
..i. .T .... .i._I..._.. ./..._ li_..._. .. .I .I..._ _......
/Circular
Gage #2
Between Two Teeth Circular Gage #3
16-Tooth Gear
-
Page 199
Chapter
7
Inspection Tools: Gages 7-9
Configuring
Gages
In configuring gages you will pick the configuration categories in the Gage popup menu, which appears when you pick Gage from the Main Configuration menu. These are the main function and configuration the Gage popup menu:
categories in definition: Sets the gage position and length; selects the gage shape, operation, and gaging mode (binary or gray scale); and defines all edges.
l Gage features: Selects the specific edges (“features”) used for each gage.
l Gage to be l Select range limits, output lines, reference tool: Selects the operating range limits that determine a “pass” or “fail” result; selects the output line for reporting inspection results; selects a reference tool from which to receive shift compensation. gage measurements: This function “learns” the distance between edges, the number of edges, the number of pixels, or the number of objects, whichever gage operation you have selected. l Learn l Select gage number: number (1 to 32).
This function selects the gage l Enable/disable gage: This function enables or disables the currently selected gage.
Configuring a gage involves these basic steps:
l Selecting the gage number (1 to 32).
l Enabling the selected gage.
l Selecting the gage shape: linear, or circular.
l Selecting either a binary or gray scale image in which to search for edges. l Selecting the gage operation: count black pixels, count edges, make linear measurement, and so on. l Positioning and sizing the gage(s) over the workpiece image, and identifying the edges.
The following pages show you how to perform all of the steps that configure gages. To save time, you should perform these steps in the order given.