The text of a manual · part 18 of 42
Bulletin 5370 CVIM Configurable Vision Input Module User Manual: 6 - Reference Tools: Lines and Windows, pages 177 to 186
Pages 177 to 186 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 177
Chapter
6
Reference Tools: Lines and Windows 6-67
Selecting Define Features Functions and Parameters (continued)
Determining
Set Score Value
In order to determine the appropriate score value(s) to enter into the Set Score menu box(es>, you must perform a series of trial inspections, using several representative workpieces. This will provide you with a base of “score” statistics from which you can derive the appropriate score value(s). At this point, you should have several representative workpieces on hand for use in the trial inspection series. Before beginning the trial inspections, be sure to stage your “ideal” workpiece in front of the camera and perform all of the appropriate parameter settings and functions described in Chapters 3,4, and 5. Then, position the feature and search windows over the appropriate workpiece feature for each active feature (in each reference window) as described earlier in this chapter. NOTE: In choosing workpiece features, it is very desireable to use those that are unique within a search window and have consistent appearance from workpiece to workpiece. This allows using low score values. Features whose appearance varies slightly from workpiece to workpiece will require using higher score values. Although higher score values allow the CVIM system to locate varying features, the cost is a slight increase in processing time and a potential decrease in location accuracy. Your first step in preparing for the trial inspections will be to enter a score of 0 (zero) in the Set Score menu box. A score value of 0 has a special effect: During each inspection cycle, the feature window will search the entire search window for the best match. Next, you will arrange your workpieces so that the CVIM system can inspect them. The inspection setup can be either a manual one, in which you place each new workpiece in position and press a trigger button, or an automatic one, in which you use the actual factory equipment or simulate it. When the inspection setup is ready, you will set the CVIM system to the run mode (described in Chapter 10). This enables the CVIM system to perform the inspections. During each inspection cycle, the feature window searches the entire search window for the best match and reports the resulting score to the statistics tables. During the inspection series, you should reposition (if necessary) some of the workpieces in order to create the maximum workpiece shift and/or rotation that you expect to occur in your application. Finally, when the CVIM system has performed a sufficient number of inspections, you can end the run mode. The score results now stored in the statistics tables will be your basis for determining the score value(s) to enter into the Set Score menu box(es).
Page 178
Chapter
6
Reference Took:
Lines and Windows
6-62
Selecting Define Features Functions and Parameters (continued)
Determining
Set Score Value
(continued)
You can determine the appropriate score value to enter into a particular Set Score menu box by examining the Maximum score “reading” in the associated Inspection Statistics table (you will see this table when you pick the Set Score menu box). To this “reading” you will add a 10% margin. For example, if the Maximum score reading were 40, you would add lo%, or 4, resulting in 44. This is the score value that you would enter into the Set Score menu box. The score value has consequences affecting the repeatability, reliability, and location accuracy of a feature window, as follows: -This indicates how consistently the feature window finds a feature in the search window. Repeatability is 100% if the feature window always finds a feature (however, it may not always find the correct feature). l Repeatability
Generally, the higher the score value, the higher the probability that the feature window will find a particular workpiece feature every time. At the same time, however, the probability also increases that the feature window may find a spurious “feature.” For example, very high score values, such as 200, will enable the feature window to accept nearly anything in the search window as the “correct” workpiece feature. - This indicates how well the feature window finds the correct workpiece feature. Reliability is 100% if the feature window finds only the correct feature (however, it may not always find that feature). l Reliability
Generally, the lower the score value, the higher the probability that the feature window will find only the correct workpiece feature. At the same time, however, the probability also increases that the feature window may not find any feature. For example, very low score values, such as 5, may restrict the feature window to accepting only the correct workpiece feature, but it may not necessarily find that feature every time. l Location accuracy - This indicates how accurately the feature window locates the position of the workpiece feature on the X and Y axes. Generally, the lower the score value, the higher the location accuracy, and vice versa. Reductions in accuracy are slight, however, and for most tool operations they will have no material effect.
Page 179
Chapter
6
Reference Tools: Lines and Windows 6-63
-
Selecting Define Features functions and Parameters (continued)
Determining
Set Score Value (continued)
As you can see from the preceding discussion, you will need to consider certain trade-offs before setting the score value. For example, if the workpiece feature you’ve selected yields a high Maximum reading in the statistics tables, you may still be able to use that workpiece feature so long as the search window will never contain another object that the feature window can mistake for the correct feature. Alternatively, you may be able to reduce the Maximum score reading by positioning the feature window differently over the workpiece feature, or by using a workpiece feature with a simpler shape, such as a circle. In all cases, you should try to find the combination of workpiece feature and feature window size and position that yields the lowest score possible within the constraints of your application. The followin table summarizes the effects that the various score values Eave on the repeatability, reliability, and location accuracy factors.
Score Value
Repeatability
Reliability fc:$$i
0
Maximum
Maximum
Maximum
This score value causes feature window to search entire search window and report lowest score (that is, best match).
Excellent
Appearance of workpiece feature uniform on all workpieces, even when rotated. Feature window is least likely to find a spurious feature. Good when search window has objectssimilar to workpiece feature.
Very good
Appearance of workpiece feature varies slightly. Feature window is more likely to find a spurious feature if search window contains objects similar to workpiece feature. OK if search window has no other objects that feature window can mistake for correct workpiece feature.
Good
Appearance of workpiece feature varies significantly. Feature window is likely to find a spurious feature if search window contains other objects. OK if search window has no other objects.
Fair
Appearance of workpiece feature varies greatly. Feature window is very likely to find a spurious feature if search window has other objects. May be OK if search window contains no other objects.
l-30
30-50 so- 100 lOO+
Fair
Good
Very Good
High
High
Very Good
Good
Fair
Comments
Page 180
Chapter
Reference Tools: Lines and Windows
6
6-64
Selecting Define Features Functions and Parameters (continued)
Determining Set Score Value (continued) Use the following procedure to determine the appropriate score value for an active feature. Comments
Your Action Look at the Set Score menu box in the Define Features menu.
If the score value is not already 0 (zero), perform the next three steps to set the score value to 0. This is necessary before you begin the series of trial inspections.
Pick the Set Score menu box in the Define Features popup menu.
When you pick the Set Score menu box, the calculator pad and the Inspection Statistics table appear, as follows:
::..:. Ifi:; -T:.:.: . q$
.:..:: Li:,: Delete Feature
1 Feature Disp: Off
I
1Active Feature:
I
1
Calculator Pad+
-Ref.
Previous
INext
+
:.:.:.:.: y:$;: 28.267 :::::‘, 5.498 F.::: I
..a
P&P Search Win.
-1
324 49
Window Popup Menu
7 Gage
Inspection Statistics Table
7
8
9
+
-
Oh
4
5
6 x
/
=
1
2
3 t P
0
.
Window
Clr
Enter Mist
Exit
Note that the current “score” setting (55) in the Set Score menu box appears in the calculator display. Note also that the current statistics in the Inspection Statistics table is from a previous operation that used “active feature” # 1. Pick the 0 (zero) digit.
When you pick the 0 digit, it will appear in the calculator display.
Pick the Enter key.
When you pick the Enter key, the 0 will appear in the Set Score menu box. The score value is now set to 0.
Repeat the preceeding steps for each active feature used in your application.
Page 181
Chapter
6
Reference Tools: Lines and Windows 6-65
Selecting
Define
Features
Determining
Set Score Value (continued)
Functions and Parameters (continued)
Your Action Prepare to run a series of “trial” inspections.
Comments Refer to Chapter 10, Runtime Operations for more details about the following steps.
Pick the Exit menu box in the Main Config uration menu.
When you pick the Exit menu box, the Exit popup menu will appear.
Pick the Runtime init. menu box in the Exit menu.
When you pick the Runtime popup menu will appear.
Look at the Mode menu box in the Runtime Init.menu.
If “Standard” appears, pick the menu box once to toggle it to “Learn.” This activates the “learn” mode during the trial inspection series and ensures the accumulation of “score” data in the statistics tables.
Pick the Runtime Display menu box in the Exit menu.
When you pick the Runtime Display menu box, the Runtime Display popup menu will appear.
Pick the Stat. Page 2 menu box in the Runtime Display menu.
The Stat. Page 2 menu box causes page two of the statistics tables to appear on the monitor screen when you activate the run mode. Page two displays “score” statistics for all enabled reference windows.
Pick the Runtime menu box in the Exit menu. Pick the Goto Runmode menu box in the Runtime menu.
When you pick the Runtime menu will appear.
Init. menu box, the Runtime menu box, the Runtime
Init.
popup
When you pick the Goto Runmode menu box, the CVIM system will begin running inspections if you selected Auto/Internal as the trigger source. If not, the system will await trigger inputs from whatever trigger source you selected.
Look at the statistics table.
As the inspections continue, the Stat. Page 2 table will display accumulated “score” data only for each “active feature” within each enabled reference window. No data will appear for any “feature” or window that is not enabled.
Reposition your workpiece to couer all possible positions in your application.
The purpose of doing this is to accumulate “score” data from the worst-case positions that can occur in your application.
When you have enough inspections, look at the Max Reading scores in the Stat. Page 2 table.
Pick the Setup menu box to stop the runmode.
The Max Reading scores in the Stat. Page 2 table are the worst-case scores for each of the “active features” in each enabled reference window. These scores are the basis for the initial values that you will use in the Set Score menu box for each “active feature.” The CVIM system will return to the configuration mode.
At this time, the final data appearing in the Stat. Page 2 table are recorded in the Inspection Statistics table for each “active feature.” You saw an example of this table when you picked the Set Score menu box earlier.
Page 182
Chapter
6
Reference Tools: Lines and Windows
6-66
Using Set Score Function
Selecting Define Features Functions and Parameters
Pick the Set Score menu box, then enter the adjusted Maximum score “reading” as the score value.
(continued)
Recall from an earlier discussion that the adjusted score value is the Maximum score “reading”in the Inspection Statistics table, plus a 10% margin. Comments
Your Action
Pick the Ref.Win menu box to get the Ref.Window popup menu, then pick the Define Features menu box to get the Define Features popup menu. This will restore the configuration situation existing before you performed the series of inspections.
Return to the Define Features popup menu.
Verify that the current “active feature” is one that you want to configure at this time ( #l, #2, or #3).
Look at the Active Feature selection number.
When you pick the Set Score menu box, the calculator pad and Inspection Statistics table appear, as follows:
Pick the Set Score menu box in the Define Features popup menu.
Nominal Samples Maximum Minimum Mean Std.Dev
Delete Feature l .0
P&P Search Win. 1 Feature Disp:
1Active
Off
I
1
I
Feature:
Output/Reference Learn: x=0
I
I
Windo\Al POPUD Men,
,
I
Camera A
Ref. Line I j:
I j
! s&:&/i I?: Gage ,: :. : .: ..:
Window
Mist
Exit
Note that the calculator “display” still shows the zero “score” setting that you set previously. Note also that the Inspection Statistics table displays a Maximum “reading” of 17. In this case, you would add 10% (rounded) to 17, which would yield an adjusted score value of 19. Enter each digit ofyour adjusted score value.
-
I
Ref.
I
Env.
-Inspection Statistics Table
0.0
8 = n/a Y=O
I
-1 411 17 1 16.316 2.690
-
Page 183
Chapter
6
Reference Tools: Lines and Windows 6-67
Selecting Functions
Define Features and Parameters
Using
Set Score Function
(continued)
(continued)
Your Action Pick the Enter key.
Comments When you pick the Enter key, the new score value will appear in the Set Score menu box. NOTE: You should think of the score value that you just entered as its initial value. It is thus subject to change, as may be indicated when you run additional series of trial inspections. Ultimately, the best score value is the lowest one that ensures the most efficient and reliable feature-search operation. The trade-off for using higher scores is a slight increase in processing time and a potential decrease in reliability and/or accuracy.
Repeat the Set Score function for each “active feature” to be used in your application. Using Find Feature Function The Find Feature function causes the feature window of the current “active feature” (1,2, or 3) to conduct one search operation, using the stored image, and to report the result in the Find Feature menu box. This function can be useful in troubleshooting your application, especially during the development stage. For example, you could configure the CVIM system to halt on a reject. When a reject condition occurs, you could then analyze the image associated with the reject, determine the score that caused the reject, and possibly determine the cause of the excessive score. Your Action
Comments
Set the Set Score value to 0 (zero).
Setting the score to 0 enables the feature window to search the entire search window for the best match; that is, the lowest score value.
Look at the Find Feature menu box.
Initially, the score is -1. This is a “flag” indicating that the Find Feature function has not been used since the current “active feature” (1,2, or 3) was selected.
Pick the Find Feature menu box.
When you pick the Find Feature menu box, the feature window searches the entire search window for the workpiece feature. As noted above, the camera does not acquire a new image - the last stored image is used.
Page 184
Chapter
6
Reference Tools: lines and Windows
6-68
Selecting Define Features Functions and Parameters
Using Find Feature Function
(continued)
(continued)
Your Action
Comments If the feature window fir& the workpiece feature before accumulating a score exceeding 200, it returns the accumulated score value in the Find Feature menu box. If the feature window cannot find any feature in the search window having an accumulated score below 200, a message appears on the monitor screen, as follows: The feature cannot be located as currently configured.
Using Learn Function
Select the Learn menu box to command the CVIM system to “learn” the X-Y coordinates of the “shift reference point” and the angle of the “rotation reference line.” The shift reference point is always stated in pixels from the left side of the screen image for X, and from the top of the screen image for Y. Thus, X = 120 indicates that the shift reference point on the X-axis is 120 pixels from the left, and Y = 75 indicates that the shift reference point is 75 pixels from the top. The rotation reference line indicates the angle (6) in degrees between itself and the positive X axis on the screen image. It appears only when two or three feature windows are used. The rotation reference line extends from the center point between the feature window centers (the shift reference point) and the center of one of the feature windows. The following three figures show these shift reference points and rotation reference lines where one, two, or three feature windows are used. When one active feature is used, the shift reference point is at the center of the feature window. ONE ACTIVE FEATURE: -Feature Workpiece
Window Feature
Shift Reference Point
Page 185
Chapter
-
Using Learn Function (continued)
6
Reference Tools: Lines and Windows
6-69
When two active features are used, the shift reference point is halfway between the feature window centers. The rotation reference line extends from the shift reference point to the center of the lowest numbered feature window. TWO ACTIVE FEATURES: Feature Window #2 Workpiece Feature #2 / t
/
Rotation Reference Line
I
I
1
Shift Reference Point
When three active features are used, the shift reference point is at the center of the triangle formed by the centers of the three feature windows. The rotation reference line extends from the shift reference point to the center of the farthest feature window. -
In the figure below, feature window #l is farthest from the shift reference point. THREE ACTIVE FEATURES:
Window
Workpiece Feature #2
#l
Feature Window #2 Feature #l /
\
/
Rotation Reference Line Shift Reference ’ Point
Workpiece MFeature
#3
Feature I /Yq f-- Window #3 I” ‘I I
I
Page 186
Chapter
6
Reference Tools: Lines and Windows
6-70
Using Learn Function (continued)
The angle is always measured from the positive X axis, as follows:
-
Negative Rotation Reference Line (Approx. -135O)
J \
Shift Reference Point
Positive\Rotation Reference Line (Approx. + 1 50°) -
Notice that the three o’clock position is O”, and the nine o’clock position is 180”. The maximum positive angle is 180.00”, and the maximum negative angle is -179.99”. Your Action
Comments box.
When you pick the Learn menu box, the reference window “learns” the 0 angle and the coordinates of the shift reference point, and it displays these figures in the menu box. Note that if you selected only one active feature, the angle line in the menu box will display 8 = n/a, or “not applicable.”
Look at the rtew data in the Learn menu box.
The new data indicate the current angle (8) between the screen image X axis and the rotation reference line, and the X and Y coordinates of the shift reference point.
Pick the Learn menu