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

The text of a manual · part 12 of 42

Bulletin 5370 CVIM Configurable Vision Input Module User Manual: 6 - Reference Tools: Lines and Windows, pages 117 to 126

Pages 117 to 126 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 117

Chapter

6

Reference Took: fines and Windows

Chapter Objectives

The objectives of this chapter are first to show you how reference tools can be used, and then show you the procedure for configuring them. The chapter begins with a series of questions and answers about reference tools.

A Few Questions and Answers About Reference Too/r

This section introduces you to reference tools by asking a few questions that might occur to you, and then answering those questions. What is a reference tool? A reference tool is a pre-inspection tool that examines the position of each workpiece and determines whether it is shifted relative to the position of the “original” workpiece. If so, the CVIM system can calculate the amount of shift and apply shift compensation to other tools. What kinds of reference tools are there? The CVIM system provides two types of reference tools: lines and windows. How do these tools work? line searches along its length for specific edges on a workpiece. It can search horizontally (X-axis), vertically (Y-axis), or both. l A reference l A reference window searches within its boundary for a specific feature on a workpiece. How many reference lines and windows are there? CVIM system provides three sets of reference lines for each of its two tool sets. Each set contains one, two, or three lines, according to the specific function.

l The l The CVIM system provides three sets of reference windows for each of its two tool sets. Each set contains three feature/search window pairs.

What functions does a reference tool perform? A reference tool’s main functions are to: l Locate an edge or feature on each new workpiece entering the camera’s field of view during an inspection cycle. l Check for shift and/or rotation in the position of each new workpiece relative to the position of the original workpiece. l Measure and record the shift direction and amount.

l Use the recorded shift and/or rotation information to shift the position of all associated analysis tools so that they retain correct alignment with the shifted workpiece.

Page 118

Chapter

6

Reference Tools: Lines and Windows

6-2

A few Questions and Answers About Reference Tools (continued)

When might a reference tool be necessary? A reference tool might be needed if, during a normal series of inspections, successive workpieces are not likely to be in exactly the same position from inspection to inspection, but are expected to vary in position (but always within. the camera’s field of view) What kinds of shift compensation information can reference tools detect? l Each set of reference lines can detect workpiece shift along the X and/or Y axes and rotation up to & 60 degrees. l Each set of reference windows can detect workpiece shift along the X and Y axes and rotation up to + 15 degrees.

What is the relationship of a reference tool to an inspection tool? A reference tool exists mainly to supply shift and/or rotation compensation to one or more inspection tools. You can configure any inspection tool to receive shift and/or rotation information from any reference tool. How does the CVIM s stem make use of shift and/or r rom a reference rotation information tool? The CVIM system uses shift and/or rotation information from a particular reference tool to adjust the positions of all inspection tools associated with that reference tool.

Reference Lines

This section provides you with the details of using and configuring reference lines. Under the Using Reference Lines heading, you will see a simple example application in which a reference line provides shift compensation for a linear gage configured to measure the level of liquid in a bottle. Under the Configuring Reference Lines heading, you will use the CVIM “user interface” -the light pen, popup menus, and graphic symbols on the video monitor screen - to configure a reference line.

Using Reference Lines

The following pages describe how you can use reference lines to detect and measure workpiece shift and offset the inspection tools by the amount of the shift. This process is called “shift compensation,” and its advantage is that workpieces need not be rigidly fixtured for inspection. Reference lines can compensate for workpiece shift along the horizontal axis only, or the vertical axis only, or along both axes at the same time.

-

Page 119

Chapter

6

Reference Tools: Lines and Windows 6-3

Using (Reference lines (continued)

In the following example of using a reference line, these 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 The

CVIM system will use a linear gage to measure the level of the liquid. a The position of each bottle being inspected will vary horizontally from the “original,” but not uertically. a The CVIM system will use a horizontal reference line to provide shift compensation to the linear gage. The overall objective in this example is for the CVIM system to inspect every bottle for proper fill level and to reject all bottles that are not properly filled. The functions of the reference line in this example are these: a Find the bottle within a preset range along the X-axis. (NOTE: The “preset range” is determined by the position and length of the reference line.) a Check each inspected bottle to determine whether it is shifted from the position of the “original” bottle. a If an inspected bottle is shifted, shift the linear gage by the same amount, and in the same direction, as the bottle. Figure 6.1 shows how an image of a properly filled bottle might look on your monitor screen. Since both the liquid and the bottle cap are opaque, they should appear black when lighted from behind. Under the same backlighting conditions, the semi-transparent neck (above the liquid) should appear as a light shade of gray. Figure 6.1 also shows a horizontal reference line positioned on the bottle, (During configuration, you would have moved the line to this position.) If you consider this bottle to be in the “original” position, the X marks the “original” location of the bottle’s edge on the reference line. As the CVIM system inspects a series of bottles, the reference line will find the edge on any bottle as long as that edge lies somewhere along the reference line. (During configuration, you would have set the reference line’s length equal to the maximum allowable shift in the bottle’s position.) If a particular bottle is shifted, but its edge lies someulhere on the reference line, the reference line will find the edge. If, however, the bottle has shifted so much that its edge lies beyond either end of the reference line, an inspection failure will occur since the reference line will root find the bottle’s edge.

Page 120

Chapter

6

Reference Tools: Lines and Windows

6-4

Using Reference Lines (continued)

Figure 6.1 Reference Line Positioned Across Bottle

“X’ Indicates “Original” Edge Location r’:

-. .a

\ Tail

4

Head / Reference Line d-

Bottle in its “Original” position -

If the CVIM system did not have some way to compensate for the bottle’s horizontal shift, an inspection could fail because the gage may not coincide with the bottle’s neck. To summarize the factors in the bottle inspection example: l A horizontal bottle.

reference line will be configured to find the l A linear gage will be configured to measure the liquid level in the bottle. l The bottles horizontally.

in any series of inspections will be shifting l These horizontal shifts will always occur within the length of the reference line. l All bottles will be in the same position uertica2Zy.

Page 121

Chapter

6

Reference Tools: Lines and Windows 6-5

Using Reference fines (continued)

Figure 6.2 shows how a linear gage might appear when positioned vertically over the bottle’s neck. The gage length need only be sufficient to extend below the lowest acceptable liquid level. At that length, the gage would also be able to detect the highest acceptable level. One way to measure the liquid level is to have the gage measure the distance from the top of the cap to the liquid surface. You could set an upper and lower limit for the level, and have CVIM reject any bottle whose level is above or below those limits.

Figure 6.2 Linear Gage Positioned Vertically Over Bottle

Linear Gage

‘X’ Indicates Location of Edge That Linear Gage Finds at of Liquid

I m-face of Liquid

Figure 6.3 compares the position of the “original” bottle (the one you used to configure the reference line) to the position of a shifted bottle (one that appears during an inspection). The X’s show the respective edge positions along the reference line.

Page 122

Chapter

6

Reference Tools: Lines and Windows

6-6

Using Reference Lines (continued)

Figure 6.3 Edge Locations on Shifted Bottle and Original Bottle

Head Refe

;-

Position of Original Bottle Position of Shifted Bottle

At the start of each inspection, the reference line searches along its length for the bottle’s edge. It starts the search at its head (the circle) and proceeds rightward toward its tail until it detects the edge of the bottle. It expects to find that edge somewhere along its length. When the reference line finds the shifted bottle’s edge, the position of that edge is compared with the position of the same edge on the “original” bottle. The difference between the two edge positions is the amount of horizontal shift compensation applied to the linear gage.

Page 123

Chapter

6

Reference Tools: Lines and Windows 6-7

Using Reference Lines (continued)

For instance, assume that the reference edge of the original bottle was at X-axis pixel location 120 along the reference line, and the linear gage was at X-axis location 150. Assume also that the reference line found the edge of the shifted bottle at pixel location 105, which is 15 pixels to the left of the original edge (pixel numbers increase, left-to-right). The CVIM system compensates for the shifted bottle by shifting the linear gage 15 pixels to the left, thus repositioning the gage over the bottle’s neck. Figure 6.4 shows this. The system then proceeds with the linear gage measurement on the liquid level of the shifted bottle. Look again at Figure 6.4. Notice that without shift compensation, the linear gage would be to the right of the bottle’s neck. In this particular case, the gage would probably indicate (falsely) a too-low liquid level.

Figure 6.4 Linear Gage After Shift Compensation Shift-Compensated Position of Linear

Position of Shifted Bottle

Page 124

Chapter

6

Reference Tools: Lines and Windows

6-8

Using Reference Lines (continued)

The purpose of the bottle inspection example was to give you simple demonstration of using a reference line.

-,

In actual applications, three sets of reference lines are available. Within each set, you can use the horizontal and vertical lines either in pairs or singly. Each set can provide shift compensation for inspection gages and/or windows. In addition, the reference lines can provide shift and/or rotation compensation for other reference tools, with the following restrictions: A reference line cannot, provide shift and/or rotation compensation to a Zourernumbered reference line. Thus, reference line #2 cannot be a reference tool for reference line #l. l

A reference urindoul cannot provide shift or rotation compensation to a reference line. l

Configuring

Reference Lines

To configure the reference lines, you will pick the Ref. Line menu box in the Main Configuration menu then select the parameters and perform the functions in the Ref. Line popup menu. These are%he main function and configuration the Ref. Line popup menu:

categories in line definition: Sets the reference line position and length. Selects the line type, the line to be configured, and binary or gray scale mode. Defines the edges. l Reference line features: Selects the specific edge to be used for the X and/or Y line.

l Reference l Select output lines and reference tool: Selects the output line for reporting inspection “results,” and selects reference tool from which to receive shift compensation. edge references: This function “learns” the pixel location of the edge on the X and/or Y reference line.

l Learn reference line set: This function selects the reference line set (1,2, or 3) to be configured.

l Select l Enable/disable reference line set: This function enables or disables the currently selected reference line set.

Configuring a set of reference lines involve these basic steps:

l Selecting the reference line set (1 to 3) to be configured.

l Enabling the selected reference line set.

l Positioning workpiece.

and sizing the reference line(s) over the l Selecting either a binary or gray scale image in which to search for the edge. l Defining and selecting the particular edge(s).

-

Page 125

Chapter

6

Reference Tools: Lines and Windows 6-9

Selecting Ref.Line Popup Menu

Your first step is to select the Ref. Line popup menu.

Your Action Pick Ref.Line in the Main Configuration menu.

Comments When you pick the Ref.Line menu box, the Ref. Line popup menu appears above the Main Configuration menu, as follows:

&WLiin;

1: [;:x”,‘d

Env.

Camera A

1

R$

Link

Ref. Win

Gage

Window

Mist

Exit

The Ref. Line popup menu shows the six configuration categories described earlier. In addition to the Ref. Li ne popup menu, if the currently selected reference line is enabled, as shown above, that line will also appear somewhere on the monitor screen.

Selecting and Enabling Reference Line Your Action Look at the Ref.Line menu box in the Ref.Linepopup menu. Select the reference line number.

Select a reference line number and enable the reference line. Comments The Ref.Line menu box indicates the currently selected reference line number (1,2, or 31, and indicates the reference line status: Enabled or Disabled. To change the reference line number, pick the Next (or Previous) menu box repeatedly until the correct number appears. The Next and Previous functions work like this: When you pick the Next box, the next higher reference line number appears: 1,2,3,. . . 1,2,3, and so on. When you pick the Previous box, the next lower reference line number appears: 3,2,1,. . . 3,2,1, and so on.

Look at the Ref.Line menu box again. Pick the Ref.Line menu box.

If the status is Disabled, perform the next step. To enable the reference line, pick the Ref.Line menu box.The status should now indicate Ena bled.

Page 126

Chapter

6

Reference Tools. Lines and Windows

6-10

Selecting Define Ref.Line Popup Menus and Parameters

Select the Define Ref .Line popup menus, then select the parameters in those menus.

Comments

Your Action

Pick the Define Ref.Line menu box in the Ref.Line popup menu.

When you pick the Define Ref.Line menu box, the two Define Ref. Line popup menus appear above the Ref.Line popup menu, as follows:

1 Define Edges

0.0

1

,

1Output/Reference

Env.

Camera A

0.0

Popup Menus

1 i’Fjf.:Fiti$.

Ref. Win

Gage

Window

Mist

Exit

Selecting Ref.Line Type Popup Menu Select the Ref.Line Type menu box, then select one of the six reference line types, as follows: 1. X-axis line only. 2. Y-axis line only. 3. X- and Y-axis lines with the X-axis line evaluated first. 4. X- and Y-axis lines with the Y-axis line evaluated first. 5. Two X-axis lines and one Y-axis line with the X-axis lines evaluated first. 6. Two Y-axis lines and one X-axis line with the Y-axis lines evaluated first. The “X” and “Y” refer to the physical orientation of the reference line(s) on the monitor screen: horizontal (X-axis), vertical (Y-axis), or both. Your choice of “type” depends on the expected workpiece shift and/or rotation in your CVIM application.

-