The text of a manual · part 28 of 42
Bulletin 5370 CVIM Configurable Vision Input Module User Manual: 8 - Inspection Tools: Windows, pages 265 to 274
Pages 265 to 274 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 265
Chapter
8
Inspection Tools: Windows 8-2 1
Selecting Define Window Popup Menu and Paranlleters (continued) Your Action Aim th.e lightpen at the topmost vertex handle.
Using P&P Process Win. Function
(continued)
Comments Continue when the highlight square appears.
Pick the vertex handle. Drag the topmost vertex down and to the right, as shown.
The polygon now has two enclosed areas. As noted earlier, you can move a vertex anywhere on the screen. This includes moving it across an adjacent or opposite side of the polygon.
-
Page 266
Chapter
8 inspection Tools: Windows
8-22 -
Selecting
Define Window Popup Menu and Parameters (continued)
Using P&P Process Win. Function (continued)
Your Action
Comments The following steps use a simple example - a four-sided polygon in the shape of a rectangle -to show the effect of using the Add Vertex and Delete Vertex functions. Initially, the handles are located at the vertices and center of the polygon:
Your Action Pick the Add Vertex menu box.
Comments When you pick the Add Vertex menu box, the menu box becomes shaded. The handles on the polygon shift from the vertices to the center of the sides, and the center handle disappears, as follows: U
1
[
I
Env.
Camera A
Ref. Line
Ref. Win
Gage
$?i~d$$i
Mist
Exit
Page 267
Chapter
8
Inspection
Tools: Windows 8-23
Selecting Define Window P’opup Menu and Parameters (continued)
Using P&P Process Win. Function
Your Action Aim the light pen at the leftmost handle.
(continued)
Comments Continue when the highlight square appears. U
Cl
Dl
Pick the handle. Drag the new vertex to the left, as shown.
The rest of the polygon will remain anchored.
+-----fSpotlight”
The vertex will follow the light pen wherever you move it. Lock the vertex in position.
Note that the previous left side has become two sides -the polygon now has five sides - and a new handle appears in the center of each of these two sides.
Page 268
Chapter
8
Inspection Tools: Windows
8-24 -
Selecting Define Window Popup Menu and Parameters (continued)
Using P&P Process Win. Function (continued)
Comments
Your Action
You can repeat the Add Vertex “pick and place” function until the polygon has 16 sides. To exit the Add Vertex function, pick the Add Vertex menu box again.
When you pick the Add Vertex menu box, the shading is removed, and all handles (except the center handle) return to the polygon vertices.
Pick the Delete Vertex menu box.
When you pick the Delete Vertex menu box, the menu box becomes shaded. Handles remain at the vertices, but the center handle disappears, as follows:
Env.
Aim the light pen at the leftmost uertex.
Camera A
Continue when the highlight square appears.
Page 269
Chapter
8
Inspection Tools: Windows 8-25
Selecting Define Window Popup Menu and Parameters (continued)
Using P&P Process Win. Function (continued)
Comments
Your Action Pick the handle.
When you pick the handle, the two leftmost sides become one again, as follows: E r L c1
EI
You can repeat the Delete Vertex “pick and place” function until the polygon has only three sides.
If necessary, use the vernier arrows to “fine-tune” the position or size of the window.
You can change the window’s size or position more precisely by using the vernier arrows. The vernier arrows enable you to make these changes in small increments. You can access the vernier arrows while either picking a window handle or placing the window or window side.
Press and --. hold the light pen tip against the wmdow handle, window,, or window side.
Hold the light pen tip in for about one second. The vernier arrows will then appear in the lower-right corner of the monitor screen:
VERNIER ARROWS
Move top or bottom side up or down.
Move vertex or entire window up, down, left, or right
Move left or right side left or right.
Page 270
Chapter
8
Inspection Tools: Windows
8-26 -
Selecting Define Window Popup Menu and Parameters (continued)
Using P&P ProcessWin. function (continued)
Comments
Your Action Pick an arrow once to move the window or window side one gtxel in the arrow’s direction.’
The up, down, right, or left arrow, will move the entire window or window side (vertex for polygons) one pixel in the direction indicated by the arrow.
Pick and hold an arrow to change thxndow size or position continuously.
When you pick and hold an arrow, the window’s size or position will change slowly for the first five or six increments. It will then change at a more rapid rate.
Pick the “return” symbol to release the vernier arrows.
When the window’s size and/or position are correct, pick the “return” symbol ( +J) to release the vernier arrows and return to the pick-and-place mode. Selecting Window Mask Popup Menu If a mask is appropriate for your application, select a rectangular or elliptical mask. Otherwise, select NO Mask if no mask is needed for your application. Your choice of mask shape depends on the shape of the workpiece image area that you want masked. NOTE:
Here are a few things about masks to keep in mind:
l You can use any mask shape with any window shape except a polygon. l You cannot use a mask when using a window for template matching.
l You can position a mask anywhere in relation to its associated window, even totally outside the window. (The mask, in this case, would not be able to mask anything.) l You can make the mask large enough to include the window. (The window, in this case, would be completely masked.) l Using
Your Action Look at the Mask menu box in the Define Window popup menu.
a mask will increase processing time. Comments
The Mask menu box shows whether a mask is currently selected, and, if so, whether that mask is a Rectangle or Ellipse. If the current shape is not the one you want, continue with the next steps.
-
Page 271
Chapter
Selecting
8
Inspection Tools: Windows
Selecting Window
Define Window
8-27
Mask Popup Menu (continued)
Popup Menu and Parameters (continued) Comments
Your Action Pick the Mask menu box, if appropriate.
When you pick the Mask menu box, the Window popup menu will appear, as follows:
IShape: Rectangle
0.0
Op: #White
000
Pixels
P&P Process Win.
l*o
IP&P Mask Win.
0.0
I
Window Mask -Popup Menu
0.0
10
Ellipse
-
Define Window Popup Menu
I
IThreshold/Filter
1 Range/Reference
Mask
1
I
Env.
Camera A
Ref. Line
Ref. Win
Gage
Exit
Note that the No Mask box in the Window Mask popup menu has a shaded square (0). This indicates that no mask is currently selected for this window. Pick the appropriate mask shape from the Wilndow Mask menu.
If you pick a different Window Mask menu box, it will appear as in the Mask menu box. In addition, the new mask shape (or no mask) will appear on the monitor screen. Using P&P Mask Win. function Pick the P&P Mask Win. menu box, then position the mask within the window as is appropriate for your application and set the mask’s dimensions. Refer to Using P&P Process Win. Function for instructions on positioning and sizing the mask window. The procedure for manipulating mask windows is identical to the procedure for manipulating process windows.
Page 272
Chapter
8
Inspection Took:
Windows
8-28
Selecting
Define Window Popup Menu and Parameters (continued)
Selecting
Window
Operation
Popup Menu
Pick the Op menu box, then select one of six operations for an elliptical or polygonal window, or seven operations for a rectangular window, as follows: 1. Count the number of ulhitepixels inside the window. 2. Count the number of black pixels inside the window (see the NOTE, below). 3. Count the number of white objects inside the window. 4. Count the number of black objects inside the window. 5. Locate the edge gradient between black and white areas within the window, identify the gradient with thin band of white pixels, and count the number of white pixels in the gradient “band.” 6. Measure the average luminance of all pixels inside the window. 7. Perform a “template” match by comparing a designated area on the workpiece (the “template”) with the same area on all workpieces to be inspected. Note that this operation can be used only with a rectangular window with no musk. Your choice of window operation depends on which one is appropriate for your application.
-
NOTE: Windows that are tied to reference windows can rotate. The total number of pixels contained in a rotated window can be slightly greater than or less than the total number of pixels in the original unrotated window. You will need to account for this condition when you set the “pass/fail” limits. The CVIM system performs the white pixel count operation by counting the number of white pixels within the window in its present orientation. The value reported for the black pixel count operation is equal to the total number of pixels in the original unrotated window minus the number of white pixels counted within the window in its present orientation. This slight change in window size is normally insignificant; however, for some applications, such as inspecting a white area for small black defects, it may be desireable to invert the image within the window, using the threshold cursors, then select the #White Pixels window operation. Another alternative is to use the #Black Objects window operation instead of the #Black Pixels operation. Your Action Look at the Op menu box in the Define Window popup menu.
Comments The Op indicates the currently selected window operation. If that is not the operation you want, continue with the next steps and select a different operation.
-
Page 273
Chapter
8 hspection
Tools: Windows 8-29
Selecting Define Window Popup Menu and
Selecting Window Operation
Popup Menu (continued)
Parameters (continued)
Comments
Your Action Pick the Op menu box.
When you pick the Op menu box, the Window Operation popup menu should appear, as follows: Define Window Popup,Menu
Mask:
No Mask
0.0
Threshold/Filter
0.0
1 Range/Reference
0.0
I
0
#Black Pixels
0
#White
0
#Black Obj’s
0
Gradient
0
Luminance
0
Template
.
Previous
Next
Env.
Camera A
Obj’s
Match
.
1
I Ref. Line
Ref. Win
Gage
!@$I&$&
Mist
Exit
Note that the #White Pixels box in the Window Operation popup menu has a shaded square (0). This indicates that the window is currently configured to count the number of white pixels within its boundaries. Pick the appropriate window operation from the Window Operation menu.
If you pick a different window operation menu box, a message will appear above the Window Operation menu, as follows: WARNING: Selectin a new tool operation will result in the nomina 7, range, and statistical values being set to zero. Reselect to confirm. The purpose of this message is to ask you to verify that you really want to change the tool operation. If so, pick the same menu box again.
Page 274
Chapter
8
Inspection Tools: Windows
8-30
Configuring
Selecting
Define Window Popup Menu and Parameters (continued)
#0 bj’s Operations
Ifyou selected either the #White Obj’s or the #Black Obj’s menu box in the Window Operation popup menu, continue with the following steps. Otherwise, skip this section. An “object” is any group of joined pixels: black pixels on a white background, or white pixels on a black background. The #0 bj’s operation enables a window to search for and count either black objects or white objects whose size lies within a specified range. If a black object contains white pixels within its perimeter, the white pixels can either be counted as black pixels or they can be ignored. The same is true of a white object with black pixels inside its perimeter. All objects, in order to be counted, must have a size (pixel count) that lies within a specified pixel range, or “tolerance,” which is based on the pixel count of a “target” object. NOTE: To ensure correct counting, black objects must not touch the window boundary. In the following steps, assume that you have already selected the #Black Obj s operation. Use these steps to specify the target object and set the object-size range limits for your object-counting application. Comments
Your Action
When you pick the Define Target menu box, the Define Target popup menu will appear, as follows:
Pick the Define Target menu box.
I + White to Area -
Tolerance:
0
Define Window i++e q&t
I
..
i i &j 0.0
Range/Reference
I
Env.
Define Target Menu Box
Camera A
I
Ref. Line
Ref. Win
Gage
~!&&SV,~
Mist
Exit