Home
2803-819, Bulletin 2803 VIM Vision Input Module Self
Contents
1. Fig 4 12 Line Main Menu When Measuring Trailing Edge Of Lowest Black Blob WA Having enabled moved sized and established the nominal value for the X gauge so that its read ings correspond to the left edge of the sample workpiece we wish to adjust the Y gauge so that it will behave similarly o Pick EE the leftmost icon to obtain the Line Main Menu for the Y Gauge The short bright vertical line appearing at the center of the screen is the Y gauge The numeral 1 which appears in the fourth icon from the left signi fies that the Y gauge will be working with the image obtained using Threshold 1 Note if we wanted this gauge to work with Threshold 2 we would simply pick that icon and the numeral 2 would replace this 1 o Pick E to enable the Y gauge as shown in Figure 4 11 None of the other icons on the menu will respond until the gauge is enabled o Pick FIC to obtain part 2 of the Line Main Menu o Pick the icon to toggle the Y gauge from analyzing white blobs to black blobs o Now pick the third icon from the left this icon initially appears as 4 several times Each time you pick this location the icon will change such that the small arrowhead in the upper half will appear in a new location AS you pick this icon repeatedly seven 7 different patterns are displayed Figure 4 12 shows how Part 2 of the Line Main Menu will appear after the tra
2. 3 29 Chapter Table of Contents Title Page Self Teach Session 2 Chapter Objectives 4 1 Introduction To Self Teach Session 3 4 1 Configuring A VIM Module To Compensate For Workpiece Position 4 1 Adapting To Front Lighting 4 11 Spatial Filtering Of Line Gauges 4 15 Line Gauge Measurements 4 17 Controlling the Twenty Two Line Gauges 4 18 Self Teach Session 3 Chapter Objectives 5 1 ChapterContents 5 1 Brightness Probe Modes 5 2 Entering Mode 1 Lighting Compensation 5 5 Verifying Arbitrarily Shaped Regions Using Line Gauges 5 6 Image To Image Variability 5 9 Verifying Arbitrarily Shaped Regions USING Windows 5 12 Using Through The Lens Windows 5 14 Working With Mixed Contrast 5 17 Verifying The Presence Of A Blind Hole 5 20 Inspection Cycle Time 5 24 SUMMA x oodd N este ru NE m ERR eens 5 26 List of Figures Figure Table Title Page 2 1 Vision Input Module 2 1 3 1 Vision Module Accessories and Connections 3 2 3 2 The VIM Module Installed in a 1771 1 0 Rack 3 3 3 3 The VIM Modul
3. 4 10 4 19 Window 1 As Shifted By VIM 4 10 4 20 Workpiece Slid Up On Screen 4 10 4 21 Workpiece Slid Off The Y Gauge 4 11 4 22 Camera Image Obrained Using Front lo tid A ted x te aa ad 4 11 List of Figures 3 Figure Table Title Page 4 23 Threshold 1 Has Been Set 4 12 4 24 Threshold 3 Has Been Set 4 13 4 25 Brightness Probe Position and Reference Value 4 13 4 26 Window 3 Has Been Adjusted 4 14 4 27 Window 1 Has Been Adjusted 4 15 4 28 Filter Selections 4 16 4 29 Measurement Pairs Available with X Gauge amp Y Gauge 4 17 4 30 Measurement Pair is Leading Edge of First White Blob 4 17 4 31 Y Gauge Measures Leading Edge of First White Blob 4 18 4 32 Measurement Pair Includes Leading Edge And Width Of TheFirstBlob 4 18 4 33 X Gauge Measures Leading Edge of First White Blob SETTE 4 19 4 34 Coordinate System Used By Line Gauges 4 19 4 35 Additional Measurement Pairs Available With The Twenty Two Line Gauges 4 20 4 36 Line Gauge 1 Is Vertical And Uses Image 3 4 20 4 37 Selected Measurement Pair For Line Gauge Dd oca o RR qa oh UR EVI ERR E 4 21 4 38 Line Gauge 1 Co
4. Zs cM YA EE a Chapter Focusing The Camera Obtaining The Desired Camera Field Of View 3 Self Teach Session I Page 3 7 If the image is too bright turn the f stop on the camera lens clockwise i e toward larger numbers to cut down the overall image brightness Rotating the f stop from one marking to another say from f 8 to f 11 the between the 8 and 16 on the moveable ring reduces the light level by exactly a factor of two If the analog image is still blurred after the overall brightness has been set then the focus on the camera lens needs to be adjusted One way to accurately focus the camera on a work piece is to open the f stop on the lens as much as possible for the 25 mm C mount lens this setting is f 1 4 turn the room lights down so that the analog image isn t too bright i e blooming then rotate the focus ring on the lens first one way and then the other until the largest hole in the erasure shield appears as small as possible Then turn the lights back up and close the f stop on the camera lens until the brightness of the image is pleasing to your eye The size of the camera s field of view depends upon the distance between the camera and the workpiece stand off distance The graph shown in Figure 3 7 gives the width of the field of view for the standard 25 mm focal length C mount lens for different distances between the 1 4 20 camera mounting hole and the workpiece As a gen
5. Title Page Threshold 4 Separates Gold Sheet From Blue 5 17 X Gauge Has Been Adjusted 5 17 Y Gauge Has Been Adjusted 5 18 Line Gauge 1 Has Been Adjusted 5 18 Line Gauge 2 Has Been Adjusted 5 18 Physical Setup For Illustrative Example 5 19 Diffuse Lighting Used For Illustrative Example 5 20 Camera Image For Illustrative Example 5 20 Phenomenology Exploited By Illustrative EXAMDI ducendo o Ea acc cii 5 21 Y Gauge Has Been Adjusted 5 21 X Gauge Has Been Adjusted 5 22 Line Gauge 1 Has Been Adjusted 5 22 VIM Module Signal Timing Short Trigger 5 23 Chapter 7 Using This Manual Read this chapter to familiarize yourself with the remainder of this manual It tells you how to use this manual efficiently This manual describes step by step how to use an Allen Bradley 2803 Vision Input Module VIM to perform simple non contact inspection tasks We assume that you have access to a Vision Input Module and want to learn how to use it effectively No previous knowledge of machine vision is necess ary to use a VIM Module successfully You do not need to know how to program Ladder Logic or be fa miliar with a Programmable Logic Controller PLC to read and use this manual Your VIM Module must be installed correctly in order to perform the applic
6. Figure 5 32 shows a timing diagram for the key control signals input and output by the VIM Module A cycle begins when the TRIGGER line rises The BUSY line goes high about 0 1 milli seconds later When the Module has completed the image analysis the DECISION line is set high or low in accordance with the inspection results At this time the BUSY line is also set low signify ing that the Module is ready for the next trigger Note that BUSY will be held high as long as TRIGGER is held high The DECISION should be sampled after the BUSY line drops Fig 5 32 VIM Module Signal Timing Short Trigger 10 ms Trigger input J Busy output 0 1 ms 4 17 200 ms gt Decision output The fastest VIM Module cycle time attainable occurs using TRIGGER and DECISION signals via the swingarm With all four 4 windows enabled but not floated in X and Y and all Line Gauges disabled the VIM Module cycle time is 1 60th of a second Enabling the X gauge and Y gauge and floating the four 4 windows in X and Y will result in a cycle time of approximately 1 15th of a second Employ ing filtering to eliminate transitions of length 1 pixel for both the X gauge and Y gauge will not change this number appreciably unless there are many white to black and black to white transitions along these gauges Page 5 24 Chapter 5 Self Teach Session Ill Inspection cycle times will increase as more Line gauges are enabled or as the le
7. Page 3 25 Fig 3 34 o Pick to enable Window 2 Window Main Menu SI Window 2 Is Being note that the slash mark has now vanished Adjusted o To change the geometrical shape of Window 2 from rectangular to circular shaped pick the third icon from the left until you see a darkened cir cular shape Note that the bright region on the screen which represents the window is now circu lar also Figure 3 35 shows the Window Main Menu after Window 2 has been enabled and a circular shape has been selected o Pick the ETC icon to obtain Part 2 of Window Main Menu as shown in Figure 3 36 Fig 3 35 o Pick to obtain the Window Move Menu Window 2 Has Been Enabled And A and use the arrow icons to center the bright Circular Shape shape representing Window 2 over the round hole Selected in the upper left corner of the sample work piece After Window 2 has been correctly positioned the Window Move Menu should look like Figure 3 37 o Pick to return to Part 2 of the Window Main Menu as shown previously in Figure 3 36 Fig 3 36 Part 2 of Window Main Menu Chapter 3 Self Teach Session I Page 3 26 Size Window 2 o Now pick to obtain the Window Size Menu If necessary pick either the Ed or the Fig 3 37 icon so that the circular shaped window Window 2 Has b aai Been Positioned is slightly larger than the hole in the work piece Figure 3 38 shows the Window Size Menu after Window 2 has been correctly sized
8. X a Table top Bottom of blind hole Light Sui c The following steps were performed to configure the VIM Module for this example o Use the Window Branch to Disable all windows o Use the Line Branch to Disable all windows o Use the Brightness Branch to Select Mode 1 of the Brightness Probe Adjust Threshold 3 to give a clear definition of the left and bottom edge of the workpiece Adjust Threshold 4 to give a clear definition of the blind hole whose presence in the workpiece is to be verified Note in this particular example a single thresh hold will suffice to bring out both the workpiece edges and the blind hole However since the general case requires two different thresholds we will use two here o Using the Line Branch Enable the Y gauge Pick the fourth icon to select y position compensation followed by x position compensation Analyze the image obtained with Threshold 3 Measure white blobs Select a measurement pair containing the trailing edge of the largest blob Filter Selection 2 Page 5 22 Chapter 5 Self Teach Session Ill Fig 5 30 X Gauge Has Been Adjusted Fig 5 31 Line Gauge 1 Has Been Adjusted Inspection Cycle Time Locate and size the Y gauge and enter the HiLo Menu to latch t
9. o Pick to return to Part 2 of the Window Main Menu as in Figure 3 36 Having selected a circular shape for Window 2 and correctly positioned and sized it we must now set the low and high range limits he ka Fig 3 38 o Pick HI to obtain the HiLo Range Menu as Window 2 Has Lo Been Correctly shown in Figure 3 39 Note that since the size Sized of Window 2 was chosen to be larger than the hole in the workpiece the actual number of white pixels 114 contained in this window is somewhat less than the maximum possible in our case 165 o Pick to change to increments of 10 Then pick the EN icon several times to obtain a low range limit of 100 Now pick the AUR number appearing on the far right of the menu in our case 165 to move the underline beneath it so the high range limit can be adjusted Then pick the icon several times to obtain high range limit of 125 Fig 3 39 HiLo Range Menu o Pick several times to change back to With Initial Limits increments of 1 o Now pick the to obtain a high range limit of 124 pixels Chapter 3 Self Teach Session I So Fig 3 40 Range Limits For Window 2 Have Been Correctly Set Fig 3 41 Main Menu After Configuring The VIM Module Fig 3 42 Clock Icon Displayed While Storing Con figuration o Next pick the number 100 to move the underline beneath the low range limit Now pick the en icon several times to obtain a
10. o Picking and holding the light pen against HT will cause the amount of white in the image to begin increasing i e it lowers this threshold while picking and holding HL will cause the amount of black in the image to begin increasing When the threshold reaches a very low value the image will appear totally white Similarly when the threshold reaches a very high value the image will appear totally black If the threshold value is already at its lower upper limit and you try to decrease increase it the icon will simply flash in and out of reverse video signifying that no further change is available in that direction The oper ation of selecting a threshold is one that will become very familiar to you It is at this point that quantitative meaning is given to the phrase 3 Self Teach Session I Page Scis PA YA va Fig Threshold Setting Menu After Floating 3 22 Threshold 1 VE r rm Fig 3 23 Threshold Setting Menu For Threshold 2 ra F Fig Threshold Setting E ME 3 24 Menu After Floating Threshold 2 NE vu VER L significant contrast between the region of interest and the surrounding areas of the work piece The silver paper provides a high con trast to the sample workpiece Manipulate these two icons until you are satisfied that the left edge of the workpiece as well as the round hole in the upper left of the sample workpiece is cl
11. Self Teach Session I Fig 3 16 Brightness Main Menu Fig 3 17 Brightness Probe Move Menu Fig 3 18 Brightness Probe Moved To Upper Left Of Image o Now pick C to go to the Brightness Main Menu shown in Figure 3 16 This menu is the one you will use to specify the operation of the Brightness Probe and also to set the four 4 thresholds Notice that the lower right corners of the second third and fifth icons in this menu are cutoff This signifies that these particular icons serve as an entry to a sub menu Pick to go to the Brightness Probe Move Menu shown in Figure 3 17 You will use this menu to position the Brightness Probe where you would like it to be on the image Next use er and icons to move the Brightness Probe the bright square at the cen ter of the screen to the upper left of the screen When this is complete the display on the Video Monitor should look like Figure 3 18 Make sure that the switch on the front panel of the Video Monitor is set to UNDERSCAN This allows you to see all the way to the edges of the picture Chapter 3 Self Teach Session I Page 3 17 Fig 3 19 o Now pick to return to the Brightness Brightness Probe HiLo Range Menu Menu which was already shown in Figure 3 16 o Then pick to obtain the Brightness Probe HiLo Range Menu shown in Figure 3 19 You use this menu to specify the upper and lower limits of acceptable illumination The initial low l
12. Window 2 as a circular shape that is centered on and slightly larger than the round hole in the upper left of the workpiece A Low Range Limit of 104 and a High Range Limit of 124 as shown in Figure 3 40 The sample workpiece should generate an ACCEPT decision when the button is pressed Bring up the Main Menu Note If you were using a branch menu or sub menu pick the OK icon as many times as needed to return to the Main Menu If you were currently inspecting the sample workp iece just pick any bright region once to obtain the sign on banner and then pick again to obtain the Main Menu o Pick second icon from the left to obtain the Line Main Menu as shown in Figure 4 1 The short bright horizontal line in the middle of the screen represents the X gauge The fifth icon from the left contains the numeral 1 This indicates that the X gauge is working with the image obtained using Threshold 1 Until the X gauge is enabled none of the other icons on this menu will respond o Pick E to enable the X gauge ar Chapter Fig 4 2 X Gauge Enabled Selecting X Gauge Measurement Fig 4 3 Line Main Menu Part 2 Fig 4 4 Line Move Menu Be om Em gn 4 Self Teach Session Il Page 4 3 Figure 4 2 shows the Line Main Menu after the X gauge has been enabled Like the Window Main Menu the Line Main Menu has two 2 parts When you are in either part of this menu picking the ETC
13. do However for production line situations a good working rule is If the advance of individual workpieces is controlled by a PLC then a VIM Module can inspect what is inthe camera s field of view at your production line s maximum rate A light pen and monitor attached to the VIM Module support a simple menu of pictorial symbols called icons Most people quickly feel at ease with these icons for they depict the choices which are available as you configure a Module to meet the specific inspection needs of your production process The Module also supports a stand alone mode which allows you to work with sample workpie ces away from the noise and distractions of the production line and then when you feel ready apply your ideas or your inspection procedure to workpieces on the actual production line Since machine vision spans a broad range of disci plines considerable attention to details is often required The goal of this manual is to make mac hine vision an effective tool in your hands Sin ce most people learn more quickly by doing than reading this manual is action oriented The thr ee self teach sessions in this manual will walk you through actual vision applications Each succ eeding session is intended to be roughly twice as long as the preceding one You are encouraged to extend your experience with the VIM Module between each of these three sessions Session 1 walks you through the use of windows to perform
14. dows 1 and 2 to detect the presence of a hole ina sample workpiece Finally you used TRIGGER sig nals from a push button to explore the types of flaws this configuration will REJECT Chapter 4 Self Teach Session Il Chapter Objectives Introduction To Self Teach Session 2 Configuring A VIM Module To Compen sate For Workpiece Position Beginning Configuration In this chapter you will learn how to use the X gauge Y gauge and the twenty two 22 line gauges After you have completed Self Teach Session 2 you will be able to configure a VIM Module to success fully perform many of the vision applications which are encountered on production lines The inspection of workpieces on a production line should be tolerant of minor mispositioning and modest changes in lighting Also given the large numbers of workpieces which pass by during a shift it is important that the inspection process contin ue to work well in the face of insignificant vari ations in workpiece appearance and dimensions The Module allows you to readily generalize the inspec tion it performs to these needs of your production line In this Self Teach Session you will configure your VIM Module so that it compensates for mispositioning of the workpiece in X and Y directions be told how to use representative sample work pieces to select the low and high range limits for a particular reading learn about configuration blocks In Sess
15. 1 2 Signal Timing censes he uui etr cries See sits ns Nos a AE tat eer 5 25 Spatial Filtering ie LA e ELA E em M RITU RHET erg 4 15 Stand Off Distance aisi an ear ace Seerne A DU en 3 6 a AM I s p Les dara 3 18 Threshold Image vast AL ete eec bue ese puts e et OECD 3 3 5 11 Thro gh The Lens Window oed EE er he ERIT Oi 5 14 User Interface sumet atus adds a aditu es 3 11 Vision Input Module 2 1 3 11 Wid OW id TREDIUM 1 1 3 20 5 12 Window Branch beer pede Ecce UU RU RO DH A ed 3 11 Window Range Limits xb ehe rro e re ere 3 23 3 26 Window Shape vies ISl RBS ea ura eub OSi Te ad ee ER Ease eis 3 20 WoOrkpiece a E Loi Sk ae Eee E e Lies D Dus 2 2 3 9 Workpiece Flaws isi Er Ese Ee EE Jena Rer a a RE ske ER 3 30 X Gaug serere OE ELE AS Due vel bid ES Te 4 1 4 2 Y Gauge LS caa MUS Sa C GE di e Er d 4 1 4 6 NY ALLEN BRADLEY hos d A ROCKWELL INTERNATIONAL COMPANY Industrial Control Group Milwaukee Wisconsin 53204 Publication 2803 819 October 1987 40062 038 01 A ex
16. Been Set Enabling and Selecting Window 2 o Pick to obtain increments of 10 o Now pick several times to change the low range limit to the value 60 o Next pick several times to obtain increments of 1 again o Now pick the Er icon several times to change the low range limit from the value 60 to the value 65 Figure 3 33 shows the HiLo Range Menu when the range limits for Window 1 have been correctly set We expect this window to contain only white pixels However we chose a low range limit that is ten below the high range limit so that normal variations in the image or slight mispositioning of the workpiece will not result in a REJECT decision o Now pick to return to Part 2 of the Window Main Menu as was shown in Figure 3 27 o Then pick the ETC icon to obtain the Window Main Menu as shown previously in Figure 3 26 Window 2 will now be adjusted in a similar manner However the size of Window 2 will be chosen so that both the interior of the hole in the sample workpiece and some of the surrounding workpiece is included The HiLo limits will be used to verify that both the hole and the surrounding workpiece are present o Pick to change from adjusting Window 1 to adjusting Window 2 The Window Main Menu will now appear as shown in Figure 3 34 The numeral 2 appearing in the first icon signifies that any selections you make at this time will apply only to Window 2 Chapter 3 Self Teach Session I
17. Fig 3 4 Camera Mounted On Stand Fig 3 3 The VIM Module Installed In A Standalone Rack Configuration Then assemble the video camera power supply lens adapters and 25 mm C mount lens Connect the camera to the front of the Module using the cable provided plug the light pen into the front con nector and connect up the video monitor Next con nect the VIM power supply to the swingarm and con nect the normally open push button switch as shown in Figure 3 1 also see Figure 5 21 Single Shot Pushbutton in the User s Manual Then power up the system At this time you should mount the camera on the stand so that its 1 4 20 mounting bolt is 28 1 16 above the table as shown in Figure 3 4 Then locate the sample workpiece drafting shield which came in the brown envelope with this manual Place it directly beneath the camera on the sheet of sil ver metallic paper also included with this manual This will produce a silhouette Now set the f stop upper moveable ring on the camera lens to f 11 and the focus lower moveable ring on the camera to 0 7 meters As soon as power is applied to the 1771 Series I O rack the VIM Module will power up This is signi fied by five of the seven LEDs on the front of the VIM Module being turned on in a test pattern Four seconds later they will all have gone out except for the uppermost LED labeled PWR At this point a pure black and pure white i e Thresholded image with
18. Locate the X gauge half off and half on the left edge of the workpiece Enter the HiLo Range Menu to latch the nominal X gauge value Page 5 14 Chapter 5 Self Teach Session Ill sD Fig 5 14 Window 3 Is Through The Lens O Fig 5 15 Workpiece With Additional White o Fig 5 16 Workpiece With Additional Black o Adjust the Y gauge Analyze the image obtained using Threshold 3 Measure white blobs Select a measurement pair containing the leading edge of the first blob Filter selection 1 Locate the Y gauge half off and half on the top of the workpiece Enter the HiLo Range Menu to latch the nominal Y gauge value Use the Window Branch to Disable Window 2 and Window 3 Enable Window 4 Now pick the third icon with the light pen several times Note how this icon goes through the rectangle shape the four orientations of a right triangle and the disk shape then starts that cycle all over again This is because through the lens is not available on Window 4 Now disable Window 4 Enable Window 3 Pick the third icon Note how this icon changes to resemble a random shape You have just captured a through the lens window for Window 3 Figure 5 14 shows how the display on the Video Monitor should appear now Float Window 3 in X and Y directions Go to Part 2 of the Window Main Menu and enter the HiLo Range Menu The high range limit repre sents the total number of whit
19. Paper o A Camera Stand Cat 2801 N3 o A Normally Open Push Button Switch Cat 800A M2AG o A Tape Measure User Supplied o Sufficient Wire To Connect The Power Supply VIM Module Swingarm and Push Button Fig 3 1 VIM Module Accessories And Connections WARNING Disconnect all power before assembling LIGHT PEN 2801 N7 CABLE 2801 NC2 5M 2801 NC3 10M VIDEO MONITOR 2801 N6 POWER CORD CAMERA CABLE 2801 NCA 2M 2801 NC5 5M 2801 NC6 10M 2801 NC7 25M POWER CORD Chapter 3 Self Teach Session I Page 3 3 Installing and Powering Up A Vision Input Module The mechanics of installing and powering up a VIM Module are straightforward Simply power down the host chassis and insert the Module into any module group in the 1771 Series I O Rack CAUTION Always turn off power to the sys 1 tem before inserting or removing modules Failure to do so may damage the equipment Figure 3 2 shows a VIM Module installed in a 1771 I O Rack with a PLC Alternatively the VIM Module can be installed in a standalone rack without a PLC as shown in Figure 3 3 Note be sure the I O chassis configuration plug is set properly see Vim Users Manual An improper setting will cause the CPU FAULT and CONFIG FAULT LEDs to ligh t Fig 3 2 The VIM Module Installed In A 1771 I O Rack Page 3 4 Chapter 3 Self Teach Session I a
20. Part 2 of the Line Leading Edge and Main Menu after this has been done Width Of The First White Blob Move the Y gauge such that half is above the top edge and half of it is on the workpiece Now enter the HiLo Range Menu to set the high and low limits of the Y gauge Figure 4 31 shows the HiLo Range Menu after this has been done properly o Pick OK to return to the Line Main Menu This latches the reference position for the Y gauge We wish to use the X gauge to measure the location of the left edge of the workpiece To return to the X gauge you must first cycle through the twenty two line gauges o Pick and firmly hold the first icon until the X gauge icon appears again o Go to Part 2 of the Line Main Menu and use it to Chapter 4 Self Teach Session Il Page 4 18 Fig 4 31 specify that the X gauge analyze white pixels Gauge Measures Leading Edge Of select Filter Selection 1 single pixel blobs First White Blob are ignored select the measurement pair comprised of the leading edge and width of the first blob Figure 4 32 shows Part 2 of the Line Main Menu after this has been done move the Y gauge such that half is off the left edge and half of it is on the wokrpiece now enter the HiLo Range Menu to set the high and low limits of the X gauge Figure 4 33 shows the HiLo Range Menu after this has been done properly o Pick OK to return to the Main Menu This Fig 4 32 latch
21. Selected 3 29 3 46 Workpiece With Missing Upper Left Corner 3 29 3 47 Workpiece With Improperly Punched Hole 3 30 3 48 Workpiece With Oversized Hole 3 30 3 49 Workpiece With Undersized Hole 3 30 3 50 Command Bits From PLC to VIM Module 3 31 3 51 Status Bits From VIM Module to PLC 3 31 4 1 Main Menu When Adjusting X Gauge 4 2 4 2 X Gauge Enabled o cresci be EE RD EL rhe 4 3 4 3 Line Main Menu Part2 4 3 4 4 Line Move Menu 4 3 4 5 X Gauge Has Been Positioned 4 4 4 6 Line Size Menu yore as nen oe t 4 4 4 7 Z Gauge Has Been Sized 4 4 4 8 HiLo Range Menu 4 5 4 9 K GaugeRange 4 5 4 10 X Gauge HasBeen Adjusted 4 5 4 11 Line Main Menu When Adjusting The Y Gauge taa Medo Ee br ERE 4 6 4 12 Line Main Menu Part 2 When Measuring Trailing Edge Of Lowest Black Blob 4 6 4 13 Y Gauge Has Been Positioned 4 7 4 14 Y Gauge Range Limits Have Been Set 4 7 4 15 Line Main Menu Part 2 After Y Gauge Has Been Adjusted 4 8 4 16 Window 2 Has Been Floated In X amp Y 4 9 4 17 Window 1 Has Been Floated 4 9 4 18 Workpiece Slid Toward Lef On Screen
22. This Branch Menu also has two 2 parts Part 2 of the Window Branch Menu has three 3 Menus the Move Menu the Size Menu and the HiLo Range Menu You will learn to use these later in this chapter The process of enabling and specifying the image processing operations you wish to have performed on the image of each workpiece is termed configuring a VIM Module When you have completed that process the configuration is automatically stored into EEPROM When stored in EEPROM this information will be retained if the Module is powered down Configuring A VIM The sample workpiece currently being viewed by the Module to Verify The camera will be used to introduce you to the process Presence Of A of configuring a VIM Module As you work through Workpiece On A this example you will learn to use the user Bright Background interface for tasks such as Selecting swingarm triggering freezing a window showing the image of the first workpiece that generates a REJECT decision Adjusting the location of the brightness probe and selecting thresholds Adjusting the windows by selecting their geo metrical shape location and size then setting the acceptable pixel count range limits Understanding what types of workpiece flaws will generate a REJECT decision Since this may be your first hands on encounter with a vision system this manual will walk you through each step and explain what is being accomplished by each act
23. Threshold 3 was one we most recently adjusted the Window Main Menu comes up with Window 3 displayed Fig 4 25 Brightness Probe Position And Reference Value page 4 14 Chapter 4 Self Teach Session II Adjusting Window 3 o Use the Window Branch Menu to Enable Window 3 Float Window 3 in the X and Y directions Select a circular window o Use Part 2 of the Window Branch Menu to Specify that Window 3 measure black areas Move Window 3 so that it is centered over the round hole at the upper left of the workpiece Size Window 3 so that it is only slightly larger than the round hole in the workpiece Fig 4 26 Enter the HiLo Range Menu and adjust the low Window 3 Has and high range limits as shown in Figure 4 26 Been Adjusted Now return to the Window Main Menu Adjusting Window 1 In the previous example Window 1 was sized to fit completely within the round hole in the sample workpiece Since the camera stand off distance hasn t changed there should be no need to change the size of Window 1 o Obtain the Window Branch Menu in a form that controls Window 1 o Use Part 2 of the Window Branch to Specify that Window 1 count black pixels Move Window 1 so that it is centered in the round hole in the workpiece Chapter 4 Self Teach Session Il Page 4 15 Fig 4 27 Enter the Hilo Range Menu and adjust the low Window 1 Has and high range limits as shown in Figure 4 27 Been Adjusted
24. Window 2 is centered on the large round hole in the sample workpiece as shown in Figure 5 2 The starting configuration is o Main Menu Swingarm Triggering SWG TRIG Go On Reject GO o Brightness Branch Brightness Probe Mode 2 Lighting Compensation Located at the center left of the image Low range limit of 20 High range limit of 250 Thresholds Fig 5 2 Threshold 1 Sample Workpiece Floated Lighting Compensation Enabled With Window 2 Adjusted to give good definition of the sample workpiece Threshold 2 Floated Lighting Compensation Enabled Adjusted to give good definition of the sample workpiece o Line Branch X Gauge Enabled Measures black blobs Leading edge of largest blob selected as the upper measurement Filter selection 0 Sized so that it is approximately 32 pixels in length one eighth the screen Located such that it is centered over the left edge of the workpiece Low range limit set to maximum attainable 1 High Range limit set to maximum attainable Note when the object has holes in it the leading edge of the first blob is a more reliable measurement than the leading edge of the largest blob Page 5 4 Chapter 5 Self Teach Session II m Q ns Y Gauge Enabled Measures black blobs Trailing edge of the bottom black blob selected as the upper measurement Filter
25. a small bright square superimposed on its center will appear on the video monitor see Figure 3 5 Chapter 3 Self Teach Session I Page 3 5 Fig 3 5 Thresholded Image With Window No 1 Shown As A Bright Square Displaying The Analog Image The orientation of the workpiece on the video mon itor should be as shown in Figure 3 5 If this isn t what you see the most likely cause is that something didn t get plugged in properly If the LEDs do not come on then either the I O rack has no electrical power or the Module isn t properly seated If the LEDs all lit up in sequence then turned off leaving the CONFIG FAULT and BUSY LE Ds on don t worry this situation will get correc ted the first time we command the VIM Module to save a new configuration If the LEDs function as described but nothing appears on the video mon itor then either the video monitor is without electrical power or the video monitor s cable isn t connected to the front of the Module or the brightness and contrast controls on the front of the video monitor simply need to be adjusted For the purposes of this manual all examples assume that you are operating in stand alone mode If you are using a PLC power up in PROG mode You may have to unlock the VIM Module at this point see Figure 5 14 PLC Bit Manipulation Menu Used to Force Control Bits in Chapter 5 of the User s Manual Once the bright square appears on the video moni tor pick
26. and the background you will find it helpful to use the Module to explore and confirm your own judgement as to which approach suits your needs best The shape of the region to be detected is known Since that may be any shape rectangular triang ular or round this section will show you how to use the line gauges to verify any shape In a following section you will learn how to use Win dows to accomplish this same task Page 5 6 Chapter 5 Self Teach Session Ill IR ms m Fig 5 3 Teardrop Shaped Opening Used In This Example Starting Config uration For This Example Measuring Width Of The Teardrop Fig 5 4 Line Gauge 1 Is Used To Verify Width The drafting shield provides a wide variety of shapes In this section you will work with the teardrop shaped opening shown in Figure 5 3 This teardrop can be characterized by its width maximum height and the angle of its top and bottom edges Thus you can verify the presence of an opening of the right size at the proper location by any com bination of line gauges that confirm these You should generally allow some tolerance on line gauge readings to avoid generating false REJECT decisions This is necessary because of the finite sampling of the digital image Begin with the sample workpiece on silver paper and the VIM Module configuration as it was at the end of the previous section o Now use t
27. as shown in Figure 5 19 Float Threshold 4 and adjust it to give a clear definition of the left and top edges of the blue top sheet as shown in Figure 5 20 o Use the Line Branch to Fig 5 20 Enable X gauge Threshold Separates Analyze the image obtained using Gold Sheet From Blue Threshold 3 Measure white blobs Select a measurement pair containing the trailing edge of the largest blob Filter selection 2 Size and locate the X gauge as shown in Figure 5 21 and then enter the HiLo Range Menu to latch it nominal value Enable the Y gauge Analyze the image obtained using Threshold 3 Measure white blobs Select a measurement pair containing the trailing edge of the largest blob Fig 5 21 Filter Selection 2 X Gauge Has Been Size and locate the Y gauge as shown in Adjusted Figure 5 22 and then enter the HiLo Range Menu to latch its nominal value Enable Line gauge 1 Float Line gauge 1 in X and Y Analyze the image obtained using Threshold 4 Analyze black blobs Select a measurement pair containing the leading blob Filter Selection 1 Size and locate Line gauge las shown in Figure 5 23 Enter the HiLo Range Menu to set the low limit to reading 4 and its high limit to reading 4 Chapter 5 Self Teach Session Ill Page 5 18 Fig 5 22 Enable Line gauge 2 Y Gauge Has Been Float Line gauge 2 in X and Y Adjusted Analyze the image obtained using Threshold Testing Your Mix
28. by 1 to 2 pixels depending upon how the edges of the workpiece line up with the sampled grid used to digitize the image This effect is illustrated in Figure 5 9 for three slightly different locations of the workpiece In location a the ends of the workpiece closely match the detector grid elements In locations b and c the grid elements marked T are partially covered by the workpiece When thresholded the elements marked T can turn out white or black depending upon whether their brightness happens to fall above or below the threshold selected Fig 5 9 Variations In Length Measurements Due To Finite Spatial Sampling Workpiece white black white Detectors inside camera Chapter 5 Self Teach Session Ill Page 5 11 Verifying Any or all of the four Windows can be selected to Arbitrarily Shaped be rectangular triangular or circular You also Regions Using specify their location and size Verifying regions Windows of interest with any of those shapes is straight forward An excellent way to verify the presence of a region of interest which has a more complex shape is to represent that region as a combination of rectangles triangles and circles The teardrop shaped opening in the sample workpiece will again be used as an example Verifying Presence O Disable Line gauges 1 2 and 3 Of A Teardrop o Use the Brightness Branch to adjust Threshhold s 2 3 and 4 to produce an image like that obtained using Threshhold 1
29. contrast possible between the middle sheet and the top sheet Use the Window Branch to disable all windows o Use the Line Branch to disable the X gauge and Y gauge as well as all Line gauges You may need to anchor all enabled tools first o Using the Brightness Branch Move the Brightness Probe so that it is locat ed completely on an exposed portion of the silver bottom sheet Then enter the HiLo Range Menu and note the reading from this region Next move the Brightness Probe so that it is located completely on the exposed portion of the gold sheet This is the region of interest in this example Enter the HiLo Range Menu and again note the reading from this region Then move the Brightness Probe so that it is located completely on the blue top sheet Enter the HiLo Range Menu and again note the reading Note that all three readings are different Move the Brightness Probe to the upper left of the screen and select Lighting Correction Mode 1 Chapter 5 X Self Teach Session Ill Page 5 17 Fig 5 19 In this example the gold sheet can not be Threshold 3 Separates isolated by simply thresholding for any Silver Sheet From Gold threshold which will discriminate the bottom sheet from the middle sheet also blends the middle and top sheets together A different threshold is required for each boundary Float Threshold 3 and adjust it to give the best possible definition of the silver bottom sheet
30. displayed The reading of 3 is just the number of black blobs on the Line gauge Use the fourth icon in the menu to toggle to the lower measurement count number of edges as shown in Figure 4 39 The reading of 10 is the number of transitions on the Line gauge Return to part 2 of the Line Main Menu and set up a Line gauge 1 to count the number of white pixels along its length or to count the number of black pixels along its length All of these measurement pairs behave like the Line gauge functions which you tested earlier The exploration of these functions is left for the interested reader Page 4 22 Chapter 4 X Self Teach Session Il Block Transfer Of The VIM Module Configuration To A PLC Summary The information set up in the VIM Module during the process of configuring it is stored in EEPROM with in the module This information can be copied via block transfers into the PLC for archiving Then at a later date it may be transferred back to the Module The VIM Module uses three 3 blocks of differe nt lengths to hold its configuration Configurati on Block 1 is thirty 30 words long and contains all the Main Menu inputs and the four 4 Windows Configuration Block 2 is sixty two 62 words long and contains the X gauge Y gauge and Line Gauge 1 through Line Gauge 10 Configuration Block 3 is Sixty three 63 words long and contains Line Gau ges 11 through Line Gauge 22 Since each configur ati
31. ion you take When you have completed this example you will be able to configure your Vision Input Module to inspect workpieces that are accurately positioned in fr ont of the camera Page 3 14 Chapter 3 Self Teach Session I Fig 3 12 Structure of Line Branch THE LINE GAUGE MAIN MENU sm E MN EP THE ETC LINE GAUGE MAIN MENU t Gr Eu EZ ky zm INE HI LO RANGE MENU MA Hd St EN 626266 THE LINE SIZE MENU DERE Es EE THE LINE MOVE MENU ar E 3 Ee Wu ES Fig 3 13 Structure Of Window Branch THE WINDOW MAIN MENU Co jw EN A e THE ETC WINDOW MAIN MENUS f rr En THE WINDOW HI LO RANGE MENU THE WINDOW MOVE MENU Sr NE Er Sz Chapter 3 Self Teach Session I Page 3 15 Selecting Swingarm Begin by picking any bright region on the video Triggering And monitor with the light pen This action will cause Freeze On Reject the Main Menu to appear across the lower portion of the screen as shown in Figure 3 14 Fig 3 14 o Now pick the fourth icon from the Display Showing Thresholded Image left to select swingarm triggering SWG With Main Menu TRIG o Then pick the fifth icon from the left to select Freeze On Reject ao tw a is i EA Fig 3 15 o When this has been successfully performed the Main Menu Showing display on the Video Monitor should look like Swingarm Triggering Figure 3 15 and Freeze On Reject zo G i k m Page 3 16 Chapter
32. low range limit of 104 pixels After the range limits for Win dow 2 have been correctly set the HiLo Range Menu will appear as shown in Figure 3 40 o Pick to return to Part 2 of the Window Main Menu as shown in Figure 3 36 o Now pick the ETC icon to return to the Window Main Menu as shown in Figure 3 35 o Finally pick the icon to return to the Main Menu as shown in Figure 3 41 Having selected swingarm triggering adjusted the Brightness Probe set Thresholds 1 and 2 and adjusted Window 1 and Window 2 we would like the Module to retain this information in the event it is powered down o Pick on the Main Menu to command the VIM Module to store its present configuration in EEPROM Note that a clock icon see Figure 3 42 is displayed while the configuration is being stored This storing operation takes about four 4 seconds After the configuration has been stored the menu strip will vanish from the Video Monitor see Fig ure 3 43 and the BUSY LED will go off The Module is now ready to go to work Page 3 28 Chapter 3 Self Teach Session I Inspecting The Sample Workpiece Fig 3 43 Display After Storing Of Config uration Is Complete Freeze On Reject Operation Fig 3 44 Rejected Image Frozed On Video Monitor Go On Reject Operation To command the Module to inspect the sample work piece press the push button switch connected to the swingarm Pressing this button causes bo
33. pass fail verification of the presence of a hole in a workp iece Many real world inspection tasks can be done using simple variations of this application A user who completes Session 1 will be able to successfully apply the VIM Module to some product ion line inspection tasks Session 2 introduces you to line gauges and walks you through the key elements involved in pass fail inspection When you have completed Session 2 you will be able to use your VIM Module for most Page 2 4 Chapter 9 Introduction production line inspection tasks Session 3 intro duces you to the finer details of the Module s operation by walking you through examples of veri fying the dimensions of a region of mixed contrast and verifying the presence of blind holes ina workpiece Completion of Session 3 will allow you to successfully use the full capability of the Module As you will see the concepts involved in Allen Bradley s Vision Input Module are rather simple to describe in words However the usefulness of the VIM Module in a factory is far ranging It is our hope that this Self Teach Manual will serve as a gateway for you Ultimately your real teachers will be the camera images the VIM Module itself and your own ongoing experience in using it to improve production processes in your plant Chapter 3 Self Teach Session Chapter Objectives The objective of this session is to get you and your VIM working together To this end we
34. relative contrast between different regions on a workpiece As you exit this menu the reading of the Brightness Probe is latched as the nominal brightness value for use as a reference Page 3 18 Chapter 3 Self Teach Session I m Setting Thresholds Fig 3 21 Threshold Setting Menu r PR rm Ga IMPORTANT When using lighting compensation make sure your illumination is normal before leaving If you intend to use Floating Thresholds do not exit from the Brightness Probe HiLo Menu This is necessary to enable the proper compensation for lighting changes As you exit from the HiLo Range Menu the last reading is latched to serve as the reference value or nominal brightness of the image Compensations will be made whenever the probe reads brighter or darker than this reference level o Now pick to return to the Brightness Branch menu which was shown previously in Figure 3 16 As mentioned earlier the module contains four 4 independent thresholds so that as many as four different levels of contrast in the camera image can be analyzed simultaneously In the current example you will only employ the first two 2 thresholds o Pick HI icon to obtain the Threshold Setting menu shown in Figure 3 21 You will use this menu whenever you specify a threshold The numeral 1 appearing in the left most icon signi fies that any selections you make at this time will be only for Threshold 1
35. sample workpiece will make it appear that the corner of the workpiece is missing see Figure 3 46 Pressing the button while the paper is in place will result in the DECISION LED being lit i e a REJECT decision After the paper is removed pressing the button will result in the DECISION LED going off i e an ACCEPT decision Placing a thin strip of black paper over the upper left corner of the sample workpiece will make it appear that the hole in the sample workpiece was improperly punched see Figure 3 47 Images like this will also cause a REJECT decision Placing a round shaped piece of white paper that is slightly larger than the hole directly over the hole will make it appear that the hole was punched oversize see Figure 3 48 Images like this will also cause a REJECT decision Removing the round shaped piece of white paper and blackening all but a center region then placing the paper directly over the hole will make it appear that the hole was punched undersized see Figure 3 49 Images like this will also cause a REJECT decision Page 3 30 Chapter 3 Self Teach Session Fig 3 47 Workpiece With Improperly Punched Hole Controlling The VIM Module From A PLC Fig 3 48 Workpeice with Oversized Hole Fig 3 49 Workpiece With Undersized Hole Now remove the white paper so that an ACCEPT deci sion is generated when the push button is pressed Up to this point you have always com
36. selection O Sized so that it is approximately 32 pixels in length Located such that it is half off the bottom edge and half on the workpiece Low range limit set to minimum attainable High range limit set to maximum attainable 1 All of the twenty two line gauges and Window 3 and 4 disabled o Window Branch Window 1 Circular shaped Centered on the large round hole in the workpiece Sized so that it is just contained with the image of the hole Analyzes white areas High range limit set to maximum attainable Low range limit set to 5 less than the high range limit Floated in X and Y directions Window 2 Circular shaped Centered on the large round hole in the workpiece Sized so that it is slightly larger than the image of that hole Analyzes white areas High range limit set to actual 10 Low range limit set to actual 10 Floated in X and Y directions Window 3 and 4 disabled After you have reestablished and saved this conf iguration in EEPROM use the push button trigger to verify that inspection of the workpiece will gener ate an ACCEPT decision Entering Mode 1 o Go to the Brightness Main Menu and pick the Lighting first icon This icon will blink indicating Compensation that the conditions required to enter Mode 1 are not met This is because the Brightness Probe is too low in the image Chapter Verifying Arbitrarily Shaped Regions Using Line Gauges 5 Self Teach Sess
37. will o describe how to install and power up your VIM module o help you become familiar with the VIM module s capabilities by walking you through using it to inspect the sample workpiece supplied with this manual Along the way we will acquaint you with some words which have technical meanings in the realm of machine vision The first example given verifying the pres ence of a hole using backlighting illustrates techniques which have a broad range of applicabil ity When you have completed this working session and familiarized yourself with Chapter 1 of the VIM User s Manual you will be able to success fully apply a VIM to some of the production line inspection applications in your plant The things needed for Self Teach Session I are o A 2803 Vision Input Module Cat 4 2803 VIM1 o A 1771 Series I O Rack such as Cat 1771 A2B or 1771 PSC o A Rack Power Supply such as Cat 1771 P3 o A Camera Cat 2801 YB A Camera Cable Cat 4 2801 NC5 O A 25 mm C Mount Lens Cat 2801 NL1 A Video Monitor Cat 2801 N6 A Video Monitor Cable Cat 2801 NC2 Light Pen Cat 2801 N7 Reliable Source of Light such as A o A VIM Power Supply Cat 2801 P1 A Cat 2801 N17 Precision Ring Light Page 3 2 Chapter 3 Self Teach Session I q A INS o A VIM Self Teach Manual Publication No 2803 819 Containing A Sample Workpiece Metallic Drafting Shield Four 4 Different Sheets of Metallic
38. AB ALLEN BRADLEY A ROCKWELL INTERNATIONAL COMPANY Self Teach Manual m Vi Sj o n 1 n p u t Mo teata No 2803 VIM1 40062 038 01 A Publication 2803 819 October 1987 Important User Information Solid state equipment has operational characteristics differing from those of electromechanical equipment Application Considerations for Solid State Controls Publication SGI 1 1 describes some important differences between solid state equipment and hard wired electromechanical devices Because of this difference and also because of the wide variety of uses for solid state equipment all persons responsible for applying this equipment must satisfy themselves that each intended application of this equipment is acceptable In no event will Allen Bradley Company be responsible or liable for indirect or consequential damages resulting from the use or application of this equipment The examples and diagrams in this manual are included solely for illustrative purposes Because of the many variables and requirements associated with any particular installation Allen Bradley Company cannot assume responsibility or liability for actual use based on the examples and diagrams No patent liability is assumed by Allen Bradley Company with respect to use of information circuits equipment or software described in this manual Reproduction of the contents of this manual in whole or in part without written permission of the A
39. Count the number of black pixels lower Count the number of blobs upper Count the number of edges lower Counting Blobs O Use tbe first icon on the Line Main Menu to With A Line Gauge index to Line Gauge 1 After enabling Line Gauge 1 use the third icon to toggle from a horizontal line to a vertical line Note how the third icon changes appropriately Fig 4 36 Use the fifth icon which currently has the Line Gauge No 1 numeral 1 appearing inside it to select the Is Vertical And image obtained using Threshold 3 for analysis Uses Image 3 by this line gauge Figure 4 36 shows the Line Main Menu after this has been done o Obtain Part 2 of the Line Main Menu Use the Line Move Menu in conjunction with the Line Size Menu to adjust Line Gauge 1 so that it cuts across three 3 of the small holes in the sample workpiece Use the fourth icon to select the analysis of black blobs Chapter 4 Self Teach Session II Page 4 21 Fig 4 37 Selected Measurement Pair For Line Gauge 1 Fig 4 38 Line Gauge 1 Counts Black Blobs Fig 4 39 Line Gauge No 1 Counts Edges Now use the third icon to select the measurement pair comprised of count the number of blobs and count the number of edges Figure 4 37 shows part 2 of the Line Main Menu after this has been done correctly Obtain the HiLo Range Menu as shown in Figure 4 38 The upper measurement count number of blobs is being
40. Note you will only be using Windows 2 3 and 4 in this example Fig 5 10 o Use the Window Branch to Window 2 Is Inside The Right Enable Window 2 Side Of Teardrop Select a circular shape Float Window 2 in X and Y directions Analyze white areas Locate and size Window 2 and set its E low range limit to the reading 5 a as shown in Figure 5 10 a Enable Window 3 Select a circular shape Float Window 3 in X and Y directions Analyze white areas s Locate and size Window 3 and set its 7 ica low range limit to the reading 4 as shown in Figure 5 11 Fig 5 11 Enable Window 4 Window 3 Is Select a rectangular shape Inside The Left Float Window 4 in X and Y directions Side Of Teardrop Analyze white areas Locate and size Window 4 and set its low range limits to the reading 22 as shown in Figure 5 12 o Pick OK on the Main Menu to save this config uration o Select the live camera image on the Video Monitor Now take the light pen in your left hand with your thumb resting on its tip Depressing the tip once with your thumb will display Window 1 Press the tip again to display Window 2 then again and again Page 5 12 Chap ter 5 Self Teach Session Ill II EE Fig 5 12 Window 4 Is Inside The Body Of The Teardrop Verifying Presence Of An L Shape Fig 5 13 Teardrop Shaped Reg
41. PT de cision is generated in all cases Now return the workpiece to its nominal location Note when the sample workpiece is in this location the window displayed on the screen will not shift when the push button is pressed Use the Line Branch to change the low range limits on Line Gauges 1 2 and 3 from 2 less than their reading to only 1 less than their readings and to also change their range limits to 1 more than their readings Pick OK on the Main Menu to save the configuration Without moving the workpiece press the push button twenty five 25 times in succession keeping a tally of how many of these inspec tions generate an ACCEPT decision and how many generate a REJECT decision Now slide the sample workpiece to the left on the screen and press the pushbutton switch twenty five 25 times keeping a tally of how many ACCEPT and how many REJECT decisions are generated Repeat this test again while the workpiece has been slid to the right on the screen then again while it has been slid up and yet again while it has been slid down on the screen Now return the workpiece to its nominal location results will be similar to those shown in re 5 7 This variable ACCEPT REJECT pattern is to image to image variability Chapter 5 Self Teach Session Ill Pagus swsm Uammg Fig 5 7 Typical Decision Results Whe
42. Self Teach Session I Page 3 9 Fig 3 8 Spectral Response of The Eye And The Video Camera fio HUMAN EYE E 0 8 gos VIDEO CAMERA E d 0 4 02 5 7 9 LI 1 3 4 WAVELENGTH THE ULTRAVIOLET VISIBLE NEAR INFRARED REGION REGION REGION A metal drafting shield mentioned earlier will be used as the sample workpiece throughout these Self Teach sessions At the back of this manual are four 4 different sheets of metallic paper Remove a silver a gold and a copper colored sheet from the back of this manual and place them on the table in front of you Now lay the sample workpiece on top of first one sheet and then another and then the third At each step note the contrast your eyes see between the sample workpiece and each sheet of metallic paper Now layer these three metallic sheets of paper together under the camera so that portions of all three can be viewed at once Notice how the silver paper appears brightest to the camera the copper paper appears darkest to the camera and the brightness of the gold paper lies somewhere between the other two Page 3 10 Chap Jer 3 Self Teach Session I Fig 3 9 Workpiece Viewed Against Three Sheets Of Metallic Paper Overview Of The VIM Module Then place the workpiece so that it lays across the junction of all three sheets as shown in Figure 3 9 Note the high contrast the camera sees between the workpiece and the silver paper while it see
43. adder Logic of the PLC Having received a trigg er a second signal line is raised by the VIM Mod ule indicating that it is BUSY Fig 2 1 Vision Input Module VIM Page 2 2 Chapter 2 Introduction What Can The VIM Module Do This line goes low after the inspection has been completed The outcome of the inspection is made available to the PLC on yet a third signal line DECISION Logic high on this line signifies a REJECT decision while logic low signifies an ACCEPT decision i e this particular workpiece passed inspection These same signals i e TRIGGER BUSY and DECISION are also directly accessible via terminals on the swingarm and allow the Module to be used in a stand alone manner When necessary information on why a specific work piece was rejected is available to the PLC via a block transfer operation For more information on ladder logic consult the appropriate PLC Manual The VIM Module can inspect workpieces placed in front of its video camera for the presence of crit ical items at known locations on the workpiece The images it analyzes are painted with just two colors black and white Hence the items whose presence is being verified need to have a certain amount of contrast with the surrounding areas of the work piece The Module can analyze as many as four dif ferent levels of contrast simultaneously In those situations where the items being verified are always a fixed distance fr
44. ain a Window Main Menu which has the numeral 1 appearing inside the first icon Then pick to float Window 1 Figure 4 17 shows how the Window Main Menu should look now Pick the OK icon to return to the Main Menu You have now finished enabling the X gauge and Y gauge and floated Window 1 and 2 Pick the OK icon to store the configuration As soon as the clock vanishes you are ready to test position compensation Press the button to inspect the workpiece An ACCEPT decision will be generated Now draw a faint pencil line along either the top or bottom edge of the sample workpiece to aid you in retaining the workpiece s vertical position Now carefully slide the workpiece about half the width of the hole towards the left on the screen Figure 4 18 shows how the video monitor will appear when this has been done Page 4 10 Chapter 4 Self Teach Session I Fig 4 18 Workpiece Slid Toward Left On Screen Fig 4 19 Window 1 As Shifted By Fig 4 20 Workpiece Slid Up On Screen Press and hold the push button down Note how the displayed representation of Window 1 shifts to the left on the screen so the sample workpiece appears in its nominal position as shown in Figure 4 19 This shifting is based upon the reading from the X gauge In effect the X position of Windows 1 and 2 have been tied to the left edge of the workpiece Releasing the button causes an ACCEPT decision to be generated Als
45. ations contained in this document For instructions and clarifications regarding the correct installations and setup of the module consult the VIM Users Manual Pub 2803 800 Chap 5 Installation and integration This manual uses several terms in a way which may be new to you o BLOB A contiguous string of ones or zeros along a given horizontal or vertical line in a thresholded image This is described in Chapter 4 o CONFIGURATION The controlling parameters used by the VIM Module to inspect a work piece The configuration tells the VIM Module what to inspect and optionally how to judge it as acceptable O ICON A pictorial representation of a com mand The VIM user interface uses icons to inform you of the choices which are availa ble ata given point in time Touching an icon firmly with the tip of the light pen is termed picking an icon and causes the associated command to be executed This is discussed in Chapter 2 O IMAGE The representation of a scene being viewed by a video camera as a two dimensional array of numbers A camera views a scene and transmits electronic signals to the Module The Module turns those signals into an image This is discussed in Chap 5 O LINE GAUGE Analyzes a set of horizontally or vertically aligned pixels You enable and specify the orientation location and size Page 1 2 Chapter 1 Using this manual of the twenty two 22 line gauges on an individual basis This
46. ble of pro Workpiece Slid duction samples Off The Y Gauge Before configuring a Module to perform a vision application for your own production line gather several workpieces which you consider to be repre sentative examples of acceptable workpieces i e known good and also several more workpieces which provide representative examples of flaws which you want the Module to REJECT i e known bad It is all right to configure your Module using a single ideal workpiece provided that after you have done so you test using the ensemble of known good and known bad workpieces The procedure is as follows Use the VIM Module to inspect all the known good workpieces Where necessary go back and slightly loosen widen the HiLo Range Limits on Windows and line gauges until all of the work pieces generate ACCEPT decisions Now inspect all the known bad workpieces Where necessary tighten narrow the Range Limits on Windows and line gauges until all of these workpieces generate REJECT decisions The Range Limits which will per form best lie somewhere between these two extremes Adapting To You may encounter production line vision applica Frontlighting tions where it is not feasible to install back lighting or a light background The same techniques Fig 4 22 which we applied to a backlighted workpiece can be Camera Image adapted to situations where the lighting is on the Obtained Using same side as the camera Front L
47. d Setting Menu for Threshold 1 3 19 3 24 Threshold Setting Menu After Floating Threshold2 3 19 3 25 Window MainMenu 3 20 3 26 Window 1 Is Now Circular Shaped ME aloe ERA 3 21 3 27 Part 2 Of Window Main Menu 3 21 3 28 Window Move Menu 3 22 3 29 Window 1 Has Been Correctly Positioned 3 22 3 30 Window Size Menu 3 22 3 31 Window1 Has Been Positioned And Size 3 23 3 32 HilLoRangeMenu 3 23 3 33 Window 1 Range Limits Have Been Set 3 24 3 34 Window 2 Is Being Adjusted 3 25 List of Figures Figure Table Title Page 3 35 Window 2 Has Been Enabled AndA Circular Shape Selected 3 25 3 36 Part 2 of Window Main Menu 3 25 3 37 Window 2 Has Been Positioned 3 26 3 38 Window 2 Has Been Correctly Sized 3 26 3 39 HiLo Range Menu With Initial Limits 3 26 3 40 Range Limits For Window 2 Have Been Corea SOL icc o OR ER VALE Ree ties Lian 3 27 3 41 Main Menu After Configuring the VIM 3 27 3 42 Clock Icon Displayed While Storing Configuration 3 27 3 43 Display After Storing Of Configuration Complete as e ad are dere 3 28 3 44 Rejected Image Frozen On Video Monitor 3 28 3 45 Go On Reject Has Been
48. e ze On Reject mode we would pick the OK icon which would resave the configuration and turn out the BUSY LED At this point however it is best to change to Go On Reject mode Chapter 3 Self Teach Session I Page 3 29 Fig 3 45 Go On Reject Has Been Selected Workpiece Flaws Which Will Cause A Reject Decision Fig 3 46 Workpiece With Missing Upper Left Corner o Pick and then pick the icon Figure 3 45 shows the Main Menu after selecting the Go On Reject Mode o Now pick to save the new configuration The clock icon reappears indicating that the configuration is being stored When this operation is completed the clock icon vanishes and the BUSY LED goes off Now press the push button to inspect the workpiece The TRIG and BUSY LEDS will behave exactly as they did in the previous mode Again place your hand between the camera and the sample workpiece and press the button The DECISION LED will come on i e based upon this image a REJECT decision was generated This state of the DECISION signal from each inspection is retained until the Module completes another inspection Removing your hand from the camera s view and pressing the button will generate an ACCEPT decision and cause the DECISION LED to go off A small piece of white paper placed on top of the sample workpiece can be used to simulate various types of flaws Placing white paper over the upper left corner of the
49. e Installed in A Standalone Rack 3 4 3 4 Camera Mounted On Stand 3 4 3 5 Thresholded Image With Window 1 Shown As A Bright Square 3 5 3 6 Sequence of Displays Enroute to Directing Live Image tohMontor is EE EE EE ses 3 6 3 7 Camera to Workpiece Distance and Width of Camera sFOV 3 8 3 8 Spectral Response of the Eye and the VideoCamera 3 9 3 9 Workpiece Viewed Against Three Sheets of MetalicPaper 3 10 3 10 VIM User Interface is Divided into Three Branches os ene hou uaa UP E 3 12 3 11 Structure of Brightness Branch 3 12 3 12 StructureofLineBranch 3 14 3 13 Structure of Window Branch 3 14 3 14 Display Showing Threshold Image with MainMenu 3 15 3 15 Main Menu Showing Swingarm Triggering and Freeze On Reject 3 15 3 16 Brightness Main Menu ade 3 16 3 17 Brightness Probe Move Menu ME 3 16 3 18 Brightness Probe Moved to Upper Left SUM AOS ae NR ER Sedo oie se bU SPP 3 16 3 19 Brightness Probe HiLo Range Menu 3 17 3 20 Display After Brightness Probe Limits A AA ee WA 3 17 3 21 Threshold SettingMenu 3 18 3 22 Threshold Setting Menu After Floating Threshold1 3 19 3 23 Threshol
50. e are more than 100 universal I O products see publication 1771 1 2 Compatible Chassis o You can put your VIM Module in any module group of a 1771 Series I O chassis Chapter 1 Using this manual Page 1 3 Related Publications What The VIM Self Teach Manual Contains CHAPTER WHATS COVERED o You can put two or more VIM Modules in the same chassis as long as sufficient power is provided Consult the Vision Input Module User s Manual Publication No 2803 800 for reference informa tion That publication includes a detailed descrip tion of each icon as well as other useful back ground information Using This Manual Self Teach Manual s purpose audience terminology contents and a list of related publications Introduction to the Vision Input Module Describes the functionality of the module typical inspection tasks general module set up procedures gives an overview of Self Teach sessions 1 2 and 3 Session 1 Describes VIM module set up Using the Explains contrast confirming Brightness Probe the presence of a hole how to trigger and Windows the module Session 2 Using Line Gauges Configuring the module to compensate for workpiece pos itioning Adapting inspection procedures for surface feature measurement Session 3 Describes Mode 1 lighting correction Getting the Most verifying a
51. e pixels in the through the lens window The reading is the number of white pixels in the image which fall within this mask Now place a small strip of white paper on the table near the workpiece as shown in Figure 5 15 Note how the reading remains essentially unchanged Then place a small strip of blackened paper on the workpiece as shown in Figure 5 16 Note how the reading has now decreased Chapter 5 X Self Teach Session lll Page 5 15 Set the low range value to the reading about 450 o Pick OK on the Main Menu to save this configuration Testing A Through o Now use the push button switch to inspect the The Lens Window workpiece several times Note an ACCEPT decision should be generated by each inspection o Place the small slip of white paper on the table near the workpiece Now use the push button to inspect the workpiece several times Note that ACCEPT decisions are still generated Fig 5 17 Slide the workpiece to the left on the screen as Workpiece Slid shown in Figure 5 17 Then use the push button Toward Left of to inspect the workpiece several times Here Screen again an ACCEPT decision should be generated by each inspection Now place the strip of black paper on the work piece Again press the push button switch Note that this time a REJECT decision is generated o Remove the black strip of paper and press the push button The decision generated should once again be ACCEPT Now turn o
52. early defined Now pick NZ to specify that this threshold is to be adjusted floated in the same pro portion that the readings from the brightness probe increase or decrease from the nominal value Figure 3 22 shows the Threshold Setting Menu after Threshold 1 has been correctly set and floated Now pick m left most icon to obtain the Threshold Setting Menu for Threshold 2 as shown in Figure 3 23 The numeral 2 now appearing in the left most icon signifies that any selections you make at this time will be only for Threshold 2 Again manipulate the and H icons until you are satisfied that the round hole in the upper left of the sample workpiece as well as the left edge of the workpiece are clearly defined Now pick NZ to specify that this threshold is to be floated Figure 3 24 shows how the Threshold Setting Menu will appear after Thresh hold 2 has been correctly set and floated Now pick to return to the Brightness Main Menu which was shown previously in Figure 3 16 Having completed the setting of Threshold 1 and Threshold 2 you now pick to return to the Main Menu as it was shown previously in Figure 3 10 Page 3 20 chapter 3 Self Teach Session 1 Adjusting The Windows Enabling And Selecting Window 1 Fig 3 25 Window Main Menu Selecting Window Shape The VIM Module has four 4 windows Since Window 1 uses the image obtained by Threshold 1 while Window 2 uses the image obtai
53. ed Contrast Config uration Fig 5 23 Line Gauge 1 Has Been Adjusted Fig 5 24 Line Gauge 2 Has Been Adjusted 4 Measure black blobs Select a measurement pair containing the Leading Edge of the Leading Blob Filter Selection 1 Size and locate Line gauge 2 as shown in Figure 5 24 and then enter the HiLo Range Menu to set its Low Limit to reading 4 and it high limit to reading 4 o Pick OK on the Main Menu to save this config uration Press the push button several times An ACCEPT decision should be generated every time Carefully move the blue top sheet toward the left on the screen so that the exposed portion of the gold middle sheet is narrower on the left Now use the push button to inspect the workpiece Note that a REJECT decision is generated Now move the copper sheet back to its original position in the left right direction The push button will once again produce ACCEPT decisions Then move the gold sheet toward the bottom of the Screen so that the exposed portion of the gold sheet is wider at the top as shown in Figure 5 30 than originally Again use the push button to inspect the workpiece Note that a REJECT decision is generated Verifying the width or height of a region of interest which has mixed contrast involves using two different thresholds In this example you used the X gauge and Y gauge to relate the loca tions of the line gauges to edges in an image obtained usin
54. ement that gauge should make and the accepta ble range of those readings are all input by you Figure 3 12 shows the structure of the Line Branch of the VIM User Interface The Branch Menu has two 2 parts Part 2 of the Line Branch Menu has three 3 Menus The Move Menu the Size Menu and the HiLo Range Menu You will learn to use these in Chapter 4 of this manual The third branch the Window Branch allows you to enable any of the four 4 windows Window 1 always works with images obtained using Threshold 1 Window 2 always works with images obtained usi ng Threshold 2 etc The Window Branch allows you to specify for each window whether the measurement of interest is the number of white pixels or the number of black pixels contained in that window This branch also allows you to chose the geometri cal shape of each window its location in the ima ge and its size as well as the acceptable range of the readings page 3 12 Chapter 3 Self Teach Session Fig 3 10 VIM User Interface Is Divided Into Three 3 Primary Branches THE MAIN MENU m m um WINDOW BRANCH LINE BRANCH BRIGHTNESS BRANCH Fig 3 11 Structure Of Brightness Branch THE BRIGHTNESS MAIN MENU rm rg ru rm pp THE PROBE HI LO RANGE MENU Erd HJ gr AE THE PROBE MOVE MENU sid LJ lt gt UU Chapter 3 Self Teach Session I Page 3 13 Figure 3 13 shows the structure of the Window Branch of the VIM User Interface
55. enu o Then pick LA to change the triangle shape to the last triangular orientation o Now pick a to change Window 1 froma right triangle into a circular shape This is signified both by the dark circle appearing in the icon and by the fact that the bright region on the screen which represents the window is circular Figure 3 26 shows the Window Main Menu after a circular shape has been selected for Window 1 The Window Main Menu actually has two parts The second icon from the right the ETC icon is used to toggle back and forth between the two parts of this menu o Now pick ETC to obtain Part 2 of the Window Main Menu as shown in Figure 3 27 The symbol that appears against a white back ground in the third icon signifies that white areas are to be counted in Window 1 Picking that icon will cause the count to toggle to reading the black area in this window in which case the symbol in this icon will appear against a black background Since the hole we wish to detect is white you want to measure the white areas in Window 1 The first icon serves as an entry to the Window Move Menu o Pick to obtain the Window Move Menu shown in Figure 3 28 Page 3 22 Chapter 3 Self Teach Session I Fig 3 28 Now use the four arrow icons Window Move Menu to move the bright shape representing Window 1 so it is centered on the round hole at the upper left of the workpiece Note Picking an arrow once moves the wi
56. eral rule doubling the distance between camera and workpiece doubles the camera s field of view When doing your own inspection applications you may wish to con sult the VIM User s Manual Chapter 4 for guidance on obtaining different fields of view at a given stand off distance Important This application is set up using diffuse room lighting A ring light around the camera lens will not provide a usable image Page 3 8 Chapter 3 Self Teach Session Fig 3 7 Camera to Workpiece Distance and Width of The Camera s Field Of View Viewing Through A Solid State Camera 35 00 30 00 25 00 20 00 15 00 10 00 FIELD OF VIEW IN INCHES 5 00 0 00 20 25 30 35 40 45 50 55 65 75 STAND OFF DISTANCE IN INCHES Figure 3 8 shows the spectral response of the human eye and the spectral response the video camera The dominant wavelengths blue green and red that our eyes see as colors are shown Because solid state video cameras have their peak sensitiv ity in the near infrared the camera frequently does not see the same contrast as a human eye This leads us to a rule of thumb for using the VIM Module Before stating that a VIM Module can verify the presence of something always place a sample workpiece under the camera and view the image on the Video Monitor A significant difference between the region of interest and the surround ing areas as viewed on the Video Monitor is needed for reliability Chapter 3
57. ering is necessary on the X gauge and the Y gauge because of the high contrast Images with low contrast may need line filtering so we will use it in the next example o Obtain the Line Main Menu o Obtain Part 2 of the Line Branch Menu and use it to specify that the Y gauge is to analyze white blobs select filter selection 1 single pixel blobs are to be ignored The third icon in Part 2 of the Line Main Menu selects the measurement pair for this line gauge The selection available is shown in Fig ure 4 29 Each pair is comprised of an upper and lower measurement Both measurements in this pair are made on every inspection cycle Chapter 4 Self Teach Session Il Page 4 17 Fig 4 29 Measurement Pairs Available With X Gauge and Y Gauge ICON SELECTED FEATURE SET a Leading edge of largest blob b Width of the largest blob El a Trailing edge of the largest blob ch b Width of the largest blob bi a Center of the largest blob b Width of the largest blob a Leading edge of the leading blob b Width of the leading blob a Center of the leading blob b Width of the leading blob a Trailing edge of the trailing blob b Width of the trailing blob a Center of the trailing blob b Width of the trailing blob d ii bi Fig 4 30 Select as the measurement pair the leading Selected Measure edge and width of the leading blob for the Y ment Pair Is gauge Figure 4 30 shows
58. es the reference position of the X Measurement Pair gauge Includes Leading Edge Of First Save the configuration White Blob You have now completed configuring your Module to inspect the sample workpiece with front lighting ona dark background Testing Any and all of the tests which were performed on the previous example can now be performed provided you use black paper in place of white and vice versa to simulate the flaws We will now turn our attention to the twenty two line gauges Controlling The All of the Line Gauges are set up using the Line Twenty Two Line Main Menu However at a given time only a single Gauges line gauge can be viewed by this menu In the pre vious example you began by enabling and setting up the X gauge then indexed forward to enable and set Chapter 4 Self Teach Session Il Page 4 19 Fig 4 33 up the Y gauge Control of the twenty two 22 Line X Gauge Measures Gauges is obtained by using the first icon in the Leading Edge Of Line Branch to index beyond the Y gauge These Line First White Blob Gauges are referred to by number i e Line Gauge 1 Line Gauge 2 Line Gauge 22 Each of them is completely independent in the sense that they are individually enabled Just as with the X gauge and Y gauge you can select whether a given line gauge is to analyze the image produced by Threshold 1 2 3 or 4 and control their location size and HiLo Range Limits In a similar manner all
59. eserved for Future Expansion Trigger 0 Stand By 1 Initiate an Inspection Cycle Binary BCD results 0 Standard Binary Number Format 1 BCD Format Save configuration data 0 Temporary Storage Fast Mode 1 Configure Permanently Fig 3 51 Status Bits Input From VIM Module to PLC INPUT BIT ADDRESS FUNCTION Module Fault 0 RunningOK 1 Fault Configuration fault 0 ConfigurationOK 1 EEPROM CONFIG invalid Module Busy 0 Ready 1 Busy Master range alarm 0 Accept 1 Decision Reject Probe Error 0 OK Normal Operation 1 Error Probe Out of Range X Y float Error 0 OK Normal Operation 1 Error Out of Range Reserved for Future Expansion Reserved for Future Expansion Page 3 32 Chapter 3 Self Teach Session I Lbs c C ULT MY The sequence of operations used to place the Module under the control of the PLC are a Unlock VIM set Command Bit 10 b Configure VIM using the light pen c Select PLC Triggering d Save the configuration in EEPROM e Lock the VIM reset Command Bit 10 f Proceed with Normal Production Operation Summary In Self Teach Session 1 you have installed and powered up your VIM Module You then used the VIM Module to direct analog images from the camera directly to the Video Monitor After reading an overview of the image processing operations per formed by the Module and an overview of the User Interface you configured your Module to use Win
60. f the sample workpiece falls somewhere along the X line gauge the X gauge will be able to perform the compensation Having positioned the X gauge on the left edge of the sample workpiece and sized the X gauge we now need to set its high and low range limits o Pick to get to the HiLo Range Menu as shown in Figure 4 8 Look to be sure that the fourth icon in this menu appears as shown in this figure If it isn t return to part 2 of the Line Main Menu and make it look like Figure 4 3 Note that the low range limit and the high range limit are identical In our case to fina out what the allowable extremes are you must decrease the low range limit to its minimum val ue Place the tip of the light pen firmly against AE and hold it until that icon begins to blink The number displayed is the minimum value Increase it by one to verify that the blob edge is truly detected Pick the number that appears at the extreme right of the screen in our case an 85 so that the underline moves beneath it signifying that the arrow icons now control the high range limit Chapter 4 Self Teach Session Il Page 4 5 Fig 4 8 o Now place and hold the tip of the light pen HiLo Range Menu against the ES until that icon begins to blink Then pick the left most number to move the underline beneath it Figure 4 9 shows the HiLo Range Menu after the X gauge range limits have been correctly set The number which appea rs between the
61. ff the electrical power to the system After a few moments turn it back on again and press the push button The red CONFIG ERR light will come on becuase your through the lens window was lost when the Module was powered down You can correct this CONFIG ERR by capturing the through the lens window and saving the configuration o Go To the Main Menu pick the OK icon to save the configuration Page 5 16 Chapter 5 Self Teach Session Ill Working With Mixed Contrast Physical Setup For This Example Configuring VIM Module For Mixed Contrast Fig 5 18 Arrangemnt of Metallic Sheets Silver Gold Blue Through this example you have learned that a through the lens window is well suited for detecting missing portions of a complex region of interest You may encounter situations where the region of interest is neither the brightest thing in the scene nor the darkest In this section you will use the X gauge and Y gauge together with Line gauges to verify the presence and width of a strip of material which is bounded on one side by some thing which is bright and on the other side by something which is dark This example uses three different sheets of paper to simulate a region of mixed contrast Begin by layering the silver sheet the gold sheet and the blue sheet as shown in Figure 5 18 Direct the camera image to the Video Monitor and adjust the f stop of the lens to produce the best
62. g one threshold while their readings were based upon edges obtained using a different threshold Chapter 5 _ Self Teach Session II Page 5 19 Verifying The The high contrast obtainable when a hole goes all Presence Of A the way through a workpiece makes viewing and Blind Hole measuring the hole easy In this section you will learn how to verify the presence of a blind hole i e the hole does not extend all the way through the workpiece The way the Module is used to verify blind holes is similar in many respects to what you have already done The major difference is in the lighting and contrast between the blind hole and its surroundings Lighting We have used a short length of 2 x 4 wood with a 1 2 diameter hole drilled 3 4 deep in the top as depicted in Figure 5 25 The 2 x 4 was viewed against a wooden table top to obtain a background with the same brightness as the region of interest You may use a three dimensional object of any type provided it a has sufficient thick ness and b has a hole in it which is at least as deep as its diameter Fig 5 25 Physical Setup For Blind Hole Measurement 2 X 4 block of wood 9 hole 75 deep As shown in Figure 5 26 the lighting employed for this example was overhead fluorescent lighting of the type typically found in an office building or laboratory Page 5 20 Chapter 5 Self Teach Session Ill Fig 5 26 Diffuse Lighting Used For Blind Hole Measureme
63. ge and adjusted them to determine the horizontal and vertical location of the workpiece you can float the locations of Windows 1 and 2 When this is done the VIM Module will compute the reading of the X gauge and Y gauge on eachimage then trans late any tools that you have floated so that the workpiece appears in its nominal position The choice of whether something floats or is ancho red is made by you Any or all of the windows and any or all of the twenty two line gauges can be floated However for a given configuration everything that is floated is based upon the same X gauge Y gauge or X and Y gauge readings The Brightness Probe is always anchored i e it does not float in the X and Y directions Pick the CH icon to obtain the Window Branch Menu Note that a numeral appears inside the first icon This signifies what window we are controlli ng Pick this icon to select window 2 The anchor symbol which currently appears in the right side of the fourth icon signifies that this window is anchored Chapter Fig 4 16 Window 2 Has Been Floated In X and Y Floating Window 1 Fig 4 17 Window 1 Has Been Floated Testing The Position Compensation Setup o o 4 Self Teach Session II Page 4 9 Pick the Ed icon to float Window 2 Figure 4 16 shows how the Window Main Menu will appear when Window 2 has been floated in X and Y Pick the first icon several times to obt
64. he Window Branch to disable all windows o Then use the Line Branch to Enable Line Gauge 1 Make it horizontal Floating in X and Y directions Analyze the image obtained with Threshold 1 Analyze white blobs Select a measurement pair which includes width of the largest blob Filter selection 0 Locate Line Gauge 1 so that it passes through the middle of the teardrop shaped hole and is sized as shown in Figure 5 4 Use the HiLo Range Menu to 1 Set the high and low limits for the upper measurement as wide as possible this measurement is not used here 2 Toggle to the lower measurement and specify width of the largest blob with the low range limit set to 2 less than the reading and the high range limit set to 2 more than the reading Chapter 5 Self Teach Session Ill Page 5 7 Measuring The Enable Line Gauge 2 Height Of The Make it vertical Teardrop Floating in X and Y directions Analyze the image obtained using Threshold 1 Fig 5 5 Analyze white blobs Line Gauge 2 Is Select a measurement pair which Used To Verify includes width of the largest blob Height Filter selection 0 Position Line Gauge 2 so that it passes through the teardrop shaped hole at its greatest height and is sized as shown in Figure 5 5 Use the HiLo Range Menu to 1 set the high and low limits for the upper measurement as wide as possible 2 Toggle to the lower measurement 4 and specify width of the
65. he nominal value of the Y gauge as shown in Figure 5 29 Enable the X gauge Analyze the image obtained with Threshold 3 Measure white blobs Select a measurement pair containing the leading edge of the largest blob Filter Selection 2 Locate and size the X gauge and enter the Range Setting Sub Menu to latch the nominal value of the X gauge as shown in Figure 5 30 Enable Line gauge 1 Float Line gauge 1 in X and Y Analyze the image obtained using Threshold 4 Measure black blobs Select a measurement pair which contains the width of the largest blob Locate and size Line gauge 1 as shown in Figure 5 31 Enter the HiLo Range Menu and select width of the largest blob adjust the low range limit to reading 6 and adjust the high range limit to reading 6 o Pick OK on the Main Menu to save this config uration Inspection Cycle Time is the term used for the elapsed time from the trigger until the inspection is complete The inspection cycle time depends upon the configuration At a minimum it takes 1 60th of a second to receive and process a new image from the camera The VIM Module typically can capture an image from the camera and analyze it in less time than it takes for the next workpiece to advance into position on the production line This section pro vides timing information which may help you in situations where the inspection cycle time is critical Chapter 5 Self Teach Session III Page 5 23
66. i e firmly touch with the tip of the light pen any bright area on the top half of the monitor four times This selects the camera image directly to the video monitor Your 1st pick will cause the VIM Module sign on banner to appear across the lower portion of the image On its far right this banner has an icon representing an open padlock Your 2nd pick will cause the main user interface menu to appear in place of the sig n on banner and the BUSY LED on the front of the VIM Module to light Your 3rd pick will cause the strip of six icons or the main menu to vanish Your 4th pick will cause the video signals from the camera to be routed directly to the monitor This sequence of displays is shown in Figure 3 6 If the bright square appears in the center of the monitor but there is no analog image then either the camera cable isn t connected the lens cap is still on the lens the VIM power supply isn t on or the moveable ring on the lens nearest to the camera body f stop needs to be rotated to adm it more light The grey scale image which appears on the video monitor comes directly from the came ra This analog image as it is commonly called shows exactly what the camera is viewing This image is indeed live Wave your hand under the camera while watching the video monitor Page 3 6 Chapter 3 Self Teach Session I Fig 3 6 Sequence of Displays Enroute To Directing Live Camera Image to Video Monitor
67. icon will obtain the other part o Pick EIC to obtain part 2 of the Line Main Menu as shown in Figure 4 3 The X gauge can work with either white pixels or black pixels The fourth icon indicates that X Gauge will analyze white blobs Since our sample workpiece appears as a black silhouette on a white background you want the X gauge to analyze black blobs o Pick so that the X gauge will toggle to analyzing black blobs Note how the background of this icon switched from white to black o Now pick to obtain the Line Move Menu as shown in Figure 4 4 o Then use the four 4 arrow icons to move the X gauge up and to the left so that its right end touches the edge of the sample workpiece as shown in Figure 4 5 o Pick to go to the Line Size Menu as shown in Figure 4 6 Self Teach Session Il Page ed Chapter 4 Fig 4 5 o Pick the icon and hold it until the X Gauge X Gauge Has Been m extends approximately as far into the workpiece Positioned Fig 4 6 Line Size Menu Fig 4 7 X Gauge Has Been Sized as it extends beyond the workpiece on the left Note as you make a horizontal gauge longer or shorter its left end remains fixed Figure 4 7 shows the Line Move Menu after the X gauge has been correctly sized Pick to return to part 2 of the Line Main Menu The size of the X gauge determines the amount of position variation along the X axis which can be accommodated So long as the left edge o
68. ighting Pick a bright area on the top half of the screen four 4 times to select the camera image to the Video Monitor Now relocate the workpiece so that the region con taining the round hole we have been verifying extends beyond the edge of your worktable Then open up the f stop on the lens to f 8 and move the stand until the workpiece is within the camera s field of view as shown in Figure 4 22 Note how an object in this case a coin which has approxi mately the same reflectance as the workpiece has been placed at the same stand off distance The sample workpiece now appears bright compared to its background This will usually be the case whenever the workpiece is in sharp focus while the back Page 4 12 Chapter 4 Self Teach Session ll Adaptations Made Using The Brightness Branch Setting Thresholds Fig 4 23 Threshold 1 Has Been Set Adjusting The Brightness Probe ground is further enough away to be out of focus In some situations however you may still need to build a light shield beneath or behind the workp iece to eliminate stray light The changes required to adapt the techniques used previously to the situation where the background is dark are largely due to the fact that the workpiece is now bright Since you just finished working through one example this section will describe what you want the Module to do Illustrations of the Video Monitor will be given A new concept spatial filter
69. iling edge of the lowest black blob has been selected as the Upper Measurement Chapter 4 Self Teach Session II Page 4 7 Fig 4 13 o Now pick to obtain the Line Move Menu Y Gauge Has Been Positioned Use the four 4 arrow icons to move the Y gauge down so that its bottom end just touches the lower edge of the workpiece as in Figure 4 d 13 o Now pick to transfer directly to the Line Size Menu o Pick and hold until the Y Gauge extends approximately as far below the sample workpieces as it extends into it Note as you make a ver tical line gauge longer or shorter its upper end remains fixed o Pick the OK icon to return to Part 2 of the Fig 4 14 Line Main Menu as was previously shown in Figure Y Gauge HiLo 4 12 Limits Have Been Set Having positioned the Y gauge on the lower edge of the sample workpiece and sized the Y gauge so that it extends equally on and off the workpiece you now need to set its working range limits o Pick the o icon to get the HiLo Range Menu To insure that both the high and low range D limits are at their extreme values pick and E a hold the icon until it starts blink ing Now pick the upper range limit to move the underline beneath it Then pick and hold the EN icon until it starts bl
70. imit is O no light while the initial high limit is 255 A 255 is the value the brightness probe will read when the image is very bright The number between the inequality signs a 233 in our case is the present read ing of the Brightness Probe Note your readings may vary slightly from this number The under line appearing beneath the left most number a zero in this case signifies that picking the ES and XL icons will change the low range limit The number 1 which appears in the third icon signifies that each pick of the light pen will increment or decrement that limit by 1 Fig 3 20 o Now pick five 5 times to raise the low Display After Brightness Probe range limit from 0 to a value of 5 Then pick a Limits Are Set bright place on the number 255 appearing on the extreme right to switch to controlling the high range limit Now pick JG the icon five 5 times to decrease the high range limit from 255 to 250 After the range limits have been correctly set the display should look like Figure 3 20 Should the camera lose power or fail the low limit of 5 on the Brightness Probe reading will cause the ACQ ERROR LED to be lighted Similarly if too much light reaches the camera and causes it to bloom the high limit of 250 will also light the ACQ ERROR LED In the future you may find it helpful to return to this menu and use the Brightness Probe to numerically examine the effects of different lighting or the
71. inequality signs is the reading of the X gauge As we have set things up this value is simply the location of the left edge of the workpiece In our Case the left edge of the workpiece is 63 on a horizontal scale which is 0 at the left border of the image and 255 at the right border As you exit from the HiLo Range Menu the most recent reading is latched to serve as the Fig 4 9 reference value or nominal X position of the X Gauge Range workpiece Compensation will be made whenever the readings are to the left or right of this reference position IMPORTANT When using X Y Position Compensation make sure that the workpiece is in its normal position before exiting the HiLo Range Menu This is necessary to enable the proper compensation for positional variances Note that you may also set the HI LO range limits for the blob width measurement Even when one of the measurements is not used both are Fig 4 10 always performed X Gauge Has Been Adjusted o Pick to return to part 2 of the Line ENS e e Main Menu Then pick the ETC icon to return to the Line Main Menu Figure 4 10 shows the Line Main Menu after the X gauge has been correctly adjusted WA E a S a S paseo Chapter 4 Self Teach Session Il Adjusting The Y Gauge Fig 4 11 Line Main Menu When Adjusting The Y Gauge
72. ing will also be covered Since the level of contrast between the region of interest and the surrounding background has been changed we begin our adaptation with the Bright ness Branch o Go to the Brightness Main Menu Select the Threshold Setting Menu and adjust Threshold 1 to produce a sharply defined white silhouette of the workpiece as shown in Figure 4 23 In order to have an easy way to re establish the previous example leave Threshold 2 unchanged In a moment we will be disabling Window 2 Select and float Threshold 3 then adjust Thresh hold 3 to produce a sharply defined silhouette of the sample workpiece as shown in Figure 4 24 Now return to the Brightness Main Menu Move the brightness probe so that it is located on a bright region which is illuminated by the same light as the workpiece in our case the coin For the sake of clarity the photographs used in this section were pro duced using a black paper backdrop You may wish to do the same Chapter 4 Self Teach Session Il Page 4 13 Fig 4 24 Enter the HiLo Range Menu to latch the nominal Threshold 3 Has or reference brightness value Figure 4 25 Been Set shows how the HiLo Range Menu should apear Then return to the Main Menu Adaptations Made Having selected new values for Threshold 1 and 3 Using The Window we will now use the Window Branch to adjust the Branch corresponding Windows Obtain the Window Main Menu Since
73. inking and then decrease it by one The number between the inequality signs is the reading of the Y gauge As we have set things up this value is simply the location of the lower edge trailing edge of the lowest black blob of the workpiece In our case that edge is at 178 on a vertical scale which is 0 at the top border of the image and 252 at the bottom border of the image Figure 4 14 shows the HiLo Range Menu after the Y gauge range limits have been correctly set The values you get may be slightly different As you exit from the HiLo Range Menu the most recent reading is latched to serve as the nominal Y position of the workpiece Page 4 8 Chapter 4 Self Teach Session Il Ted Fig 4 15 Line Main Menu Part 2 After Y Gauge Has Been Adjusted ELA pu Floating The Windows In X and Y Floating The Windows INFORMATION When using X Y position compensation make sure that the work piece is in normal position before exiting the Y gauge HiLo Range Menu This is necessary to latch the proper reference value and enable position com pensation o Pick to return to Part 2 of the Line Main Menu Figure 4 15 shows Line Main Menu part 2 after the Y gauge has been correctly adjusted o Now pick ETC to return to the Line Main Menu o Now pick the OK icon to return to the Main Menu Now that you have enabled the X gauge and Y gau
74. ion 1 we walked through the Brightness Branch and the Window Branch of the VIM User Inter face The remaining branch the Line Branch gives you access to the tools designed to automatically compensate for mispositioning of a workpiece The X gauge and the Y gauge are dedicated to providing readings which can at your option be used to adjust the location in the image where any or all of the other image processing tools are applied Building upon the example used in Self Teach Session 1 we will walk through configuring for position compensation You will then explore how well position compensation works You should begin this working session with your Module configured exactly as you left it at the close of Self Teach Session 1 Namely Page 4 2 Chapter 4 Self Teach Session Il eg Fig 4 1 Line Main Menu When Adjusting X Gauge Ki a SE YA am n Adjusting The X Gauge And Y Gauge Enabling The X Gauge Main Menu showing Swingarm Triggering SWG TRIG Go On Reject as in Figure 3 45 Brightness Branch showing Brightness probe in the upper left corner of the image as in Figure 3 18 A Low Range Limit of 5 and a High Range Limit of 250 as in Figure 3 20 Window Branch Showing Window 1 as a circular shape that is centered on and slightly smaller than the round hole in the upper left of the workpiece A Low Range Limit of 65 and a High Range Limit of 75 as shown in Figure 3 33
75. ion Represented By Windows Verifying Presence Of A Long Slot Note how the windows cycle by in order then all four of them are displayed simultaneously As shown in Figure 5 13 the interior of the teardrop shaped region is well represented by the combination of Windows 2 3 and 4 Using multiple windows the L shaped hole which appears on the screen in the lower left of the workpiece can be verified by the combination of two rectangular shapes one located inside its horizontal arm and the other located inside its vertical arm In a similar manner the long slot near the bottom of the drafting shield can be verified by a long rectangular window with additional disk shaped windows located at each end The advantage of using windows which are either rectangular or triangular or circular or a com bination thereof is that these shapes are availa ble for all windows and in the event of power down can be reconstructed Chapter 5 Self Teach Session Ill Page 5 13 Using Through The VIM also supports a process based upon a The Lens Windows direct comparison of the image with a reference image This approach referred to as through the lens is useful in situations where the shape of the region of interest is either very complex or comprised of several disjoint areas The through the lens
76. ion lll Page 5 5 o Now move the Brightness Probe to the upper left corner of the image Now return to the Brightness Branch and pick the first icon The numeral 2 appearing in it should change to the numeral 1 If so you have now selected Mode 1 of the Bright ness Probe Enter Mode 1 o Move the Brightness Probe toward the bottom of the screen Note how the arrow icon will blink when you try to move the probe below scan line fourty 40 o Move the Y gauge to the top of the screen Note how the arrow icon will blink in reverse video when you try to move this gauge above scan line fourty eight 48 The reason behind these restrictions is that the VIM Module must receive the Brightness Probe read ing adjust the thresholds and use them on the incoming image in Real Time o Now return the Y gauge centered on the bottom edge of the workpiece Because this line gauge was moved you must re establish the HI LO range limits In most of the simplest machine vision applica tions there is rarely any right approach to accomplish the inspection of a workpiece There are often several approaches or configurations which will yield approximately the same ACCEPT or REJECT decisions Each approach will differ from the others in certain respects such as adaptabil ity to the natural variation among workpieces inspection cycle time or susceptability to noise As when trying to assess the contrast between a region of interest
77. is discussed in Chap ter 4 o PIXEL Literally PICture Element An ele mental portion of an image represented by a single number The VIM Module measures lin ear dimensions in terms of the number of pixels crossed in going from one location to the other The VIM Module measures areas in terms of the number of pixels that are con tained within the boundary of that area This is discussed in Chapter 3 and Chapter 4 o WINDOW A user defined region of the image in which white or black areas are to be measured The area is measured in square pixel units and is commonly called the pixel count The number can be compared with a specified acceptance range as dis cussed in Chapter 3 o WORKPIECE The object to be inspected by the VIM Module Additional definitions of technical terms can be found in Chapter 1 of the VIM User s Manual Publi cation 2803 800 Precautions You will see two types of precautionary statements as you read this manual IMPORTANT and CAUTION o IMPORTANT Used to make you aware of cir cumstances which could cause the configura tion you are currently establishing to be incorrect in the sense that it will REJECT all workpieces unconditionally o CAUTION Used to make you aware of instances where damage to your equipment could occur Related Products You can install a VIM Module in any 1771 series I O rack or any system that uses Allen Bradley program mable controllers Ther
78. largest E blob with the low range limit set B to 2 less than the reading and the high range limit set to 2 more than the reading Measuring Angle Of Enable Line Gauge 3 Top Bottom Edges Make it vertical Float Line Gauge 3 in X and Y directions Fig 5 6 Analyze the image obtained with Line Gauge 3 Is Threshold 1 Used To Verify Analyze white blobs Taper Of The Select a measurement pair which includes Teardrop width of the largest blob Locate Line Gauge 3 so that it passes through the teardrop shaped hole as shown in Figure 5 6 Use the HiLo Range Menu to specify width of the largest blob with the low range limit set to 2 less than the reading and the high range limit set to 2 more than the reading o Pick OK on the Main Menu to save this configuration Page 5 8 Selecting Range Limits On Line Gauges Chapter Your Figu due 5 Self Teach Session Ill Without moving the sample workpiece press the push button several times to verify that an ACCEPT decision is always generated Now slide the sample workpiece to the left and press the push button switch again several times to verify that an ACCEPT decision is always generated Repeat this test again while the workpiece has been slid to the right on the screen then again while it has been slid down on the screen Your results should show that an ACCE
79. lf Teach Sessions you became familiar with the image analysis tools provided by the VIM Module by using them for simple vision tasks In this session you will extend your ability to employ the brightness probe the four 4 windows the X gauge the Y gauge and the twenty two line gauges by applying them to more difficult vision tasks You will o set up the brightness probe to respond immediately to variations in illumination o verify the presence of arbitrarily shaped regions using line gauges o verify the presence of arbitrarily shaped regions using windows o verify the presence of a region of interest with mixed contrast o detect and verify the diameter of a blind hole in a workpiece o learn the inspection cycle time of the VIM Module for specific configurations o be told about PLC block transfers to access detailed VIM Module results While the focus in each section of this chapter is on using the VIM Module effectively under partic ular circumstances along the way you will have the opportunity to explore each of the VIM Module s image analysis tools in more depth than was done in previous sessions It is assumed that you have worked completely through Session 1 and Session 2 It would be help ful if you already have had an opportunity to try to configure the VIM Module to inspect workpieces You should feel free to concentrate on the topics which are relevant to the specific vision applica tion you a
80. llen Bradley Company is prohibited 9 1987 Allen Bradley Company Table of Contents Chapter Title Page 1 Using this Manual Chapter Objectives 1 1 E dd ene aa E 1 1 PrecautiOFris tetas ac gad hd he ee we etek yds 1 2 Related Products 1 2 SUmmatV 4 2 EDE a Ri eon atar mur tubus 1 4 2 Introduction To The Vision Input Module Chapter Objectives 2 1 What Is A VIM Module 2 1 What Can The VIM Module Do 2 2 Can The VIM Module Keep Up With Your Production Lines 2 3 Can Set Up A VIM Module 2 3 Is Machine Vision Difficult To Use 2 3 3 Self Teach Session 1 Chapter Objectives 3 1 Installing And Powering Up A Vision Input Module 3 3 Displaying The Analog Image 3 4 Focusing The Camera 3 7 Viewing Through A Solid State Camera 3 8 Configuring A VIM To Verify The Presence Of A Workpiece On A Bright Background 3 13 Setting Thresholds 3 19 Adjusting The Windows 3 20 Freeze On Reject Operation 3 28 Go On Reject Operation 3 28 Workpiece Flaws Which Will Cause A REJECT Decision
81. manded the VIM Module from the light pen or from the swingarm pushbutton To the PLC the VIM Module is simply a module to which the PLC s Ladder Logic can command any of eight 8 discrete bits or from which the Ladder Logic can read any of eight 8 discrete bits Figure 3 50 shows the functions of the discete bits 2 output from the PLC to a VIM Module In this session two of these discrete output bits are of interest to us UNLOCK discrete bit 10 and TRIGGER discrete bit 15 IMPORTANT To allow configuration of a VIM module when a PLC is in the 1771 I O Rack the UNLOCK bit must be set to 1 Failure to set the UNLOCK bit will prev ent you from using the light pen to con figure the Module Figure 3 51 shows the functions of the discrete bits to the PLC from a VIM Module Input Bit Address 12 will be a 1 when the VIM Module is busy This will occur when either the VIM Module is being configured or the VIM Module is still processing an image in response to TRIGGER command After the PLC outputs a TRIGGER command to the VIM Module BUSY should be examined for a 0 When BUSY becomes 0 the inspection decision is available Chapter 3 Self Teach Session I Page 3 31 Fig 3 50 Command Bits Output From PLC To VIM Module OUTPUT BIT ADDRESS FUNCTION Unlock 0 Lock the Module Disable Progrmg 1 Unlock Enable Progrmg Reserved for Future Expansion Reserved for Future Expansion Reserved for Future Expansion R
82. ms en ata tele Gite od adum Sana ci 5 20 BU ete te Se A EN LA EE AN trees ANG Cian a DRM 1 1 4 15 Brighthexx Branch aid ale dd 3 11 Brightness Probe ausus voe Aki one DER DEE Rhe E pr tod Meee AE 3 11 3 16 Brightness Probe Modes 5 2 5 5 Brightness Range LMHS sis eru wee eee NS 3 17 Camera FOCUSING aan 3 7 Gamera image EERDER AA tas EG NG oe AA 3 5 Configuration AR AE ER ME AL ER EE MEE 1 1 Configuration Blocks suser ES EES eed AAA 4 27 Contrast actor Shae elas TIPS mE 3 8 Field Of Vi W a de sorde vus Se cea ud 4 15 Filter Selection init ci ade xA 4 15 Floatihg in X SY ii adi hs te bore pid d TOL a 4 8 Floating Threshold csi ira a daa bea ia d en ach hete 3 19 Freeze On Reject ciclo 3 28 Go On Reject A ET 3 28 CO GE A EER aa ae ea ows de Ch ETT 1 1 Inspection Cyce Time aa see 5 24 m ge RES A A DR Meg ae Melee e ER oe 1 1 Light Pen Jo usec RI e see Mee de Sea AAA ADA 3 1 Lighting Compensation iss neo a Sea eee See Pe NEE 5 2 Line Branch oie AE ESE ED EE IE EE ee de EE EE ALIS 3 11 kine Gauge SERE ER en 1 1 4 18 5 6 Line Gauge Range Limits 4 4 5 5 8 Meas rem nt cererii N N OR OE ER Vy peo eR ed sj l E augu es 4 16 Measurement Palm oie ccc SFERE e eI DEER x cable s BR E Ee dee b EE ee eeu 4 16 4 19 Mixed Contrast roe auo ER RR EE AE d EE 5 17 Range limits 15 ies des ion mes RE alee ad age elt 3 17 3 23 4 5 gm Ded RT RE EER AE ritus 3 4 Pizel e ped A hd Mahe GE eee as
83. n Range Limits Are Set Too Tight Workpiece Location on Screen No of No of Nominal Position Accept Reject decisions decisions Shifted to the Left Shifted to the Right Shifted Down Fig 5 8 Formation Of A Digital Image Page 5 10 Image To Image Variability Chapter 5 Self Teach Session lll a b c Every digital image can be thought of as simply a mosaic of numbers where each number i e pixel represents the average brightness of the scene over a small rectangle Figure 5 8 illustrates how this comes about Each pixel value in the camera image represents the area of a small rectangle which is receiving light If the entire rectangle is struck by light that pixel appears bright If none of its area is being struck by light that pixel appears dark If 20 of its area is being struck by light that pixel appears dark grey Whereas if 80 of its area is being struck by light that pixel appears light grey When a camera image is thresholded all pixels whose values are larger than the threshold are turned into white while all pixels whose values are smaller than the threshold are turned into black Pixels which represent the boundary of a workpiece will be white black as the small rec tangular area they represent is or is not more than 50 covered by the workpiece The effect of this is that the width of a blob or its location relative to an edge of the sample workpiece can vary
84. ndow exactly one pixel holding the light pen down on an arrow icon will rapidly move the window Figure 3 29 shows how the Window Move Menu should look after Window 1 has been correctly positioned o Pick to return to Part 2 of the Window Branch Menu which was shown previously in Figure 3 27 Size Window The second icon serves as an entry to the Window Window No 1 Size Menu Fig 3 29 o Pick to obtain the Window Size Menu Window 1 Has Been Correctly shown in Figure 3 30 The first and second icons are Positioned used to change the height of the window The third and fourth icons are used to change the width of the window Since the height of a circle is the same as its width in this particular case both sets of icons behave the same o Pick a three 3 times to decrease the Ka 3 radius of Window 1 so that it is the largest circular shape which fits inside the hole on the upper left of the workpiece Note you may find it necessary to slightly adjust the location of Window 1 If so that can be done as follows Fig 3 30 a Pick to transfer directly to the Window Size Menu Window Move Menu that was shown in Figure 3 28 b Then use the arrow icons on that menu to adjust the position of the window Chapter 3 Self Teach Session I Page 3 23 Note that this window has been set up to detect holes too small or not punched correctly It will not detect oversized holes The next window will demonstrate h
85. ned by Threshold 2 each window works independently In our example we will only employ the first two 2 windows o Pick CH third icon from the left on the Main Menu to obtain the Window Main Menu shown in Figure 3 25 The numeral 2 which appears in the left most icon signifies that any selections you make at this time will be just for Window 2 The large slash across the second icon indicates that this window is disabled The other icons on this menu will not respond to the light pen until the window is enabled Pick the window number icon until window 1 appears o Pick Ex to enable Window 1 note that the slash mark is now gone Several geometrical shapes are available for the windows The bright rectangle in the center repre sents the present shape location and size of Win dow 1 This pictorial representation will always match exactly what the window is analyzing The rectangle which presently appears in the third icon from the left indicates that Window 1 currently has a rectangular shape o Pick LI to change Window 1 from a rectangle to a right triangle Notice how the bright region on the screen also becomes triangular in shape o Now pick rd to change the orientation of the triangle o Then pick pi to change the orientation of the triangle again 3 Self Teach Session 1 Page 3 21 Chapter Fig 3 26 Window 1 Is Now Circular im e EC Positioning Window 1 Fig 3 27 Part 2 of Window Main M
86. ngth used for each Line gauge is increased Having all the windows disabled the X gauge and Y gauge enabled and two 2 64 pixel long Line gauges enabled and floated in X and Y and using Filter Selection 1 will result in a cycle time of 1 30th of a second Increasing the number of enabled floated and filtered Line gauges from two 2 to eight 8 will result in a cycle time of approximately 1 15th of a second Enabling floating and filtering all twenty two line gauges will result ina cycle time around 1 8th of a second In the absolute worst case enabling and floating all four 4 windows enabling all twenty two 22 line gauges as 128 pixels in length floated in X and Y and using Filter Selection 2 will result in a cycle time on the order of 1 6th 1 4th second When you must know precisely what the VIM Module cycle time is with your particular configuration the best way to obtain that information is to measure it directly This may be done by connecting an oscilloscope to the TRIGGER and BUSY terminals on the VIM s swingarm Trigger the scope scan with the rising edge of the TRIGGER signal Make sure that the trigger is a staccato pulse about 10 ms in duration Measure the time until the BUSY signal drops This is the VIM Module Inspection Cycle Time Make sure to measure it under a variety of image condition this can have an impact on the inspection cycle time Index Title Page Analog Image EEN 3 4 Blind Hole
87. nt r OO Twin tube fluorescent light fixtures with diffusing covers 5 Workpiece For this work a fluorescent ring light located just beneath the camera lens will work quite well The important thing is to have diffuse light impinging on the workpiece from all directions similar to the way the ground is illuminated when a uniform layer of clouds diffuses the sun s light Fig 5 27 Figure 5 27 shows the camera image Note how the Camera Image For top of the workpiece and the top of the wooden Illustrative table appear equally bright This is because the Example wooden workpiece reflects the same amount of light as the wooden table The blind hole in the work piece and the regions around the immediate edges of the workpiece appear slightly darker due to shadowing As shown in part a of Figure 5 28 the top of the workpiece and the wooden table top receive incoming light from many angles As shown in part b of Figure 5 28 the bottom of the blind hole only receives light from directly above The walls of the hole block some of the light and make it slightly darker at the bottom of the hole The sides of the workpiece also block some light as shown in Figure 5 28 c Chapter 5 Self Teach Session II Page 5 21 nes Fig 5 28 Phenomenology Exploited By Illustrative Example Configuring The VIM Module To Verify The Presence Of A Blind Hole Fig 5 29 Y Gauge Has Been Adjusted Light p Ka Light gt
88. o the representation of Window 1 displayed on the video monitor then reverts to normal as shown in Figure 4 18 Return the sample workpiece to its original loca tion Use the pencil line as a guide in the ver tical direction and slide the workpiece hori zontally until Window 1 is centered in the hole For the sake of illustration slide the sample workpiece about half the width of the hole towards the top of the screen as shown in Figure 4 20 When the button is now pushed variations in the work piece position along the Y axis are compensated for based upon the Y gauge and variations along the X axis are compensated for based upon the X gauge Now move the workpiece close to the top of the image as shown in Figure 4 21 Since the lower edge of the sample workpiece no longer falls along the Y gauge the workpiece position along the Y axis will cause an ACQ ERROR to be generated as well as a REJECT decision Both LEDs will come on Now return the workpiece to its original position again Chapter 4 Self Teach Session Il Page 4 11 Chosing Range Given the large numbers of workpieces which pass Limits Based Upon through a production line ona daily basis it is An Ensemble Of important that the inspection done perform well Workpieces across insignificant variations in workpiece appearance and dimensions The choice of low an high range limits may ultimately have to be made Fig 4 21 with reference to a representative ensem
89. o Now Return to the Window Branch Menu Disabling Window o Select Window 2 Disable Window 2 Notice that the X Y float icon reverts to anchored whenever a window is disabled Now return to the Main Menu Adaptations Made In addition to relocating the X gauge and Y gauge Using The Line and specifying that they analyze white blobs you Branch must also select the spatial filtering to be employed and the appropriate measurement pair Spatial Filtering When you work with thresholded images some of the Of Line Gauges pixels along the edges of the workpiece may flicker from white to black and back again from image to image The X gauge and Y gauge support spatial fil tering to compensate for this effect Filter selec tion is done using the sixth icon in Line Main Menu Part 2 As shown in Figure 4 28 three filtering options are available These same spatial filters are also available on the twenty two line gauges Page 4 16 Chapter Adjusting The Y Gauge Line Gauge Measurements 4 Self Teach Session Il Fig 4 28 Filter Selections ICON THE SPATIAL FILTER EMPLOYED E No filtering IEN Single pixel blobs are ignored El Single and two pixel blobs are ignored The level of spatial filtering needed depends primarily upon the quality of the images with which you are working As a general principle you should use as little filtering as possible while still obtaining reliable results In these examples no filt
90. of the measurement pairs shown above for the X gauge and Y gauge are available to the twenty two line gauges When measuring the width of a blob a line gauge s readings are always the number of pixels crossed in going from the start of the blob to the end of the blob Fig 4 34 Coordinate System When used to measure the position of the edge of a Used By Line blob a horizontal line gauge s reading is the Column number i e the number of pixels crossed in going from the left border of the image to the edge on the workpiece Similarly a vertical line gauge s reading is the row number i e the number of pixels crossed in going from the top bor der of the image to the edge on the workpiece Figure 4 34 illustrates this coordinate system Differences Between For each of the twenty two line gauges you can X Gauge Y Gauge select whether or not you wish them to float in X And The Numbered and Y Each of the twenty two line gauges is com Line Gauges pletely general in the sense that you can specify either a horizontal or a vertical line The twenty two line gauges also support two 2 additional measurement pairs Page 4 20 Chapter 4 Self Teach Session Il Figure 4 35 shows the additional measurement pairs available with the numbered line gauges Fig 4 35 Additional Measurement Pairs Available With The Numbered Line Gauges SELECTED MEASUREMENT PAIR Count the number of white pixels upper
91. om the edges of the work piece the VIM module can be configured to automa tically accommodate variations in the workpiece positioning in front of the camera Representative items which the four 4 windows and twenty two 22 line gauges can readily verify are o the presence of pierced drilled or machin ed holes at known locations on a workpiece o the presence of a light colored item ona dark workpiece or vice versa o that the outside dimensions of the workpiece fall within a user specified range o that the inside dimensions of an opening or cutout fall within specified ranges o that the area of a contrasting region falls within a specified range o that a contrasting object is located within a specified range from the edge of the work piece in the X and Y directions o that the correct number of certain items are present Chapter 2 Introduction Page 2 3 Can The VIM Module Keep Up With Your Production Lines Can I Set Up A VIM Module Is Machine Vision Difficult To Use Industrial production lines run at rates which de pend primarily upon the complexity of the opera tions being performed Several seconds per work piece is typical on automotive lines Several workpieces per second is typical on electronic lines On bottling lines 1 200 or more workpieces per minute is common Strictly speaking the rate at which a VIM Module can inspect a workpiece depends upon how complex a task it is configured to
92. on block has a unique length the requested length of a block transfer is used to identify which of the three configuration blocks is involv ed Note it is recommended that you transfer all three 3 configuration blocks as a matched set The User s Manual for your PLC describes how to perform Block Transfers on your PLC Specific details concerning VIM Module data formats can be found in the VIM User s Manual Chapter 6 In this session you have learned how to use the VIM Module X gauge and Y gauge to compensate for varia tions in workpiece positioning You have also adapted the techniques employed in the previous session to the situation where the sample workpiece is viewed against a dark background You have learned why spatial filtering is needed and have configured the X gauge and Y gauge to use it We have also described the transfer of configuration blocks from the Module to a PLC At this point in time you should be able to apply the techniques you have been shown to successfully apply the VIM Module to most of the inspection applications encountered on an industrial environment Chapter 5 Self Teach Session Il Chapter Objectives Chapter Contents In this chapter you will explore each of the VIM Module image analysis tools in a more detailed manner than was done in previous sessions When you have completed this session you will understand how to use all of the capabilities of the VIM Module In the two previous Se
93. ow to verify both too large and to small holes Fig 3 31 Window 1 Has Figure 3 31 shows how the Window Size Menu will Been Positioned appear after Window 1 has been correctly positioned And Sized and sized o Pick to return to Part 2 of the Window Main Menu as shown in Figure 3 27 Setting HiLo Range Limits Having selected a circular shape for Window 1 and For Window 1 correctly positioned and sized it we must now set the corresponding low and high range limits The fourth icon serves as an entry to the HiLo Range Menu Fig 3 32 HiLo Range Menu o Pick Cie to obtain the HiLo Range Menu shown in Figure 3 32 The number appearing on the extreme right in our case 75 is the high range limit Note if your high range number is different than 75 you must return to the Window Size Menu and make it the proper size The Module constrains the high range limit so that it can t be larger than the total area of the window or smaller than the low range limit The number appearing between the inequality signs is the reading for Window 1 In our case this should be the same as the high range limit The number appearing on the left is the low range limit An underline appearing beneath a range limit signifies that it is this limit which can be changed Picking the third icon will change from increments of 1 to increments of 10 Chapter 3 Self Teach Session I A eee Fig 3 33 Window 1 HiLo Range Limits Have
94. rbitrary shaped features and Out Of Your VIM areas of mixed contrast Example of module a blind hole measuring the inspection cycle time Page 1 4 Chapter 1 Using this manual Summary You will produce successful applications of your Vision Input Module by following the techniques in this manual We ll begin by giving you an overview of the VIM Module and what you can expect to do with it Chapter 2 Introduction Chapter Objectives Introduction To The Vision Input Module What is a VIM Module This chapter answers some basic questions about industrial applications of the Vision Input Module Welcome to the world of practical machine vision for your Allen Bradley Programmable Logic Control ler PLC The Vision Input Module VIM provides machine vision suitable for any environment where a 1771 I O Chassis can be used Moreover since you will be actively involved in configuring the VIM Module to perform inspections on your production line you will be able to easily reconfigure should the requirements of your plant s production process change First and foremost the VIM Module is designed and built in the Allen Bradley tradition of quality This is a module which occupies a double slot in any 1771 series I O chassis and is connected to a solid state video camera and a monitor see Figure 2 1 In production operation the Module s TRIG GER can be a signal line which is set high by the L
95. re interested in doing Page 5 2 Chapter 5 Self Teach Session Ill gd Brightness Probe As mentioned in Session 1 you can specify that any or all of the four 4 thresholds be floated i e automatically raise and lower in the same ratio as the readings from the Brightness Probe The mode of the Brightness Probe is controlled by the first icon in the Brightness Branch Menu Up to this point that icon has always had the numeral 2 showing in it This 2 appears when the VIM Module is using Mode 2 Lighting Compen sation Mode 2 Lighting In Mode 2 this ratio is determined by using the Compensation Brightness Probe reading obtained from the pre ceding camera image Mode 2 Lighting Compensa tion is of broad applicability It compensates for lighting changes such as the aging of lamps which occur gradually over time In Mode 2 there are no restrictions on the location of either the Brightness Probe or the Windows or Line Gauges Mode 1 Lighting There are situations such as when a strobe light Compensation is employed where substantial variations in illumination can occur from image to image Mode 1 of the Brightness Probe was designed to compen sate for this type of variation In Mode 1 you can specify that any or all of the thresholds be floated using the ratio between the Brightness Probe reading in the image that is being proces sed and the nominal value of the Brightness Probe When Mode 1 is selec
96. s little or no contrast between the workpiece and the copper paper In preparation for the first exer cise remove everything but the silver paper and place it so that it fills the camera s entire field of view Then place the sample workpiece on that sheet so the large round hole is in the upper left corner The VIM Module accepts analog images from the video camera As analog images enter the Module a threshold is applied to produce a purely black and white image which the VIM Module then analyzes The VIM Module contains four 4 separate windows Each window has its own threshold parameter Thus the VIM Module can simultaneously handle four 4 different levels of contrast in the analog images it receives from the camera The geometrical shape size and location of each window is selectable The Module also measures average brightness and at the users option will scale float any or all of the threshold levels up and down proportionally The location of the brightness probe in the image is selectable The Module contains twenty two 22 independent line gauges which can be set up to analyze the white black pixels in either a horizontal row or a vertical column of one of the thresholded image S The length and location of each line gauge is selectable For a given line gauge the user can select any one of nine measurement pairs For a workpiece to pass inspection each of the selected window counts and line gauge reading
97. s must fall within the selected range The VIM Module also contians two 2 additional gauges the X gauge and the Y gauge When they are enabled readings from these two dedicated gauges can be used to compensate on an image by Chapter 3 Self Teach Session I pude Sept image basis for variations in workpiece position At the users option any or all of the image analysis tools i e windows and line gauges can employ this dynamic repositioning Overview Of The The user interface employed in the Vision Input User Interface Module is organized along the lines of the types of image processing operations supported by the VIM module As shown in Figure 3 10 the user interface below the main menu is organized into three 3 primary branches The first of these branches the Brightness Branch allows you to specify the operation of the Brightness Probe and to set each of the four 4 thresholds Figure 3 11 shows the structure of the Brightness Branch of the VIM User Interface This branch has three 3 sub menus The Move Menu The HiLo Range Menu and the Threshold Setting Menu You will learn to use these later in this chapter The second branch the Line Branch allows you to enable any of the line gauges and specify which thresholded image it is to use Your inputs are typically made with reference to a live image of the workpiece The orientation location and length as well as the selection of the specific measur
98. ted the Brightness Probe must be located on or above image scan line forty 40 Since the Brightness Probe always moves in increm ents of 8 pixels this corresponds to the probe being in the first second or third vertical loca tion available Mode 1 also requires that no part of the windows or the X gauge or the Y gauge or any of the twenty two line gauges extend above scan line forty eight 48 Note Disabling a Win dow or a Line gauge which extends above scan line forty eight 48 is not sufficient to permit Mode 1 to be selected All portions of all of the wind ows and line gauges enabled or disabled must be below image scan line fourty eight 48 Failure to do so will result in the first icon simply bli nking when you try to enter Mode 1 Starting At this time you need to once again place the Configuration silver metallic paper in the camera s field of For This Session view and re establish the configuration similar to the way it was when you initially enabled the X gauge and Y gauge in Session 2 An easy way to reposition the workpiece is to return the f stop Chapter 5 Self Teach Session Ill Page 5 3 Fig 5 1 of the lens to f 11 direct the camera image to Approximate the Video Monitor and place the workpiece on sil Position Of ver paper beneath the camera so that they appear Sample Workpiece as shown in Figure 5 1 Then select and enable Window 2 Finally move the camera left right or toward you away until
99. th the TRIG LED and the BUSY LED to turn on Both of these LEDs will go off as soon as the push button is released Each time the push button is pressed a single picture from the camera is processed and the corresponding ACCEPT or REJECT decision is made This is called an Inspection Cycle Place your hand carefully in front of the camera above the sample workpiece so that it shadows the hole in the upper left corner without interfering with the Brightness Probe Now press the push button switch The TRIG and BUSY LEDs will behave exactly as before However when the button is released the DECISION LED will light i e based upon what the camera saw this particular workpiece should be rejected Removing your hand and then pressing the push button again will result in the DECISION LED being turned off i e this time the inspection decision is to ACCEPT the workpiece The Module will inspect the workpiece afresh each time the push button is pressed However because we select ed the Freeze On Reject Mode when a REJECT deci sion gets generated the display on the Video Monitor is frozen see Figure 3 44 Manual intervention is required to restore the video mon itor to a live image Pick the screen anywhere to ret urn to live o Then pick the screen twice to go to the Main Menu Note that the BUSY LED is now on since the VIM module is not able to respond to TRIGGER commands If we wanted to continue in the Fre
100. unts Black Blobs 4 21 4 39 Line Gauge 1 Counts Edges 4 21 5 1 Approximate Position Of Sample Workpiece 5 3 5 2 Sample Workpiece With Window2 5 3 5 3 Teardrop Shaped Opening Used In This Example 5 6 5 4 Line Gauge 1 Is Used To Verify Width 5 6 5 5 Line Gauge 2 Is Used To Verify Height 5 7 5 6 Line Gauge 3 Is Used To Verify Taper 5 7 5 7 Typical Decision Results When Range Limits Are Set Too Tight 5 9 5 8 Formation Of A Digital Image 5 9 5 9 Variations In Length Measurements Due To Finite Spatial Sampling 5 10 5 10 Window 2 Is Inside The Right Side Of BK e asset TA 5 11 5 11 Window 3 Is Inside The Left Side Of Teardrop esa Con ee ce Sad de c nde 5 11 5 12 Window 4 Is Inside The Body Of Teardrop 5 12 5 13 Teardrop Shaped Region Represented ByWindow 5 12 5 14 Window 3 Is Through The Lens 5 14 5 15 Workpiece With Additional White 5 14 5 16 WorkpieceWith Additional Black 5 14 5 17 Workpiece Slid Toward Left On Screen 5 15 5 18 Arrangement Of Metalic Sheets 5 16 5 19 Threshold 3 Separates Silver Sheet From Gold 5 17 Figure Table un nu un un uuu WN NJ NJ NA NJ N NO NN 0 Y DU i WN 0 5 30 5 31 5 32 UI N wo List of Figures
101. windows can only be employed when using Window 1 Window 2 or Window 3 The shape of the through the lens window is defined at the instant you pick the third icon in the Window Branch Menu i e whatever is white in the image at the instant this third icon is picked becomes the through the lens window For subsequent images the reading is the number of pixels that lie beneath white areas of the mask A through the lens window can also be floated in X and Y Physical Setup At this point darken the background by extending For This Example the workpiece over the edge of the table on which you are working changing the f stop on the lens to 8 and moving the camera stand so that the sample workpiece appears in the camera s field of view If necessary place a backdrop on the floor beneath the workpiece to eliminate any spurious bright spots Configuring For o Use the Brightness Branch to A Through The Lens Window Select Mode 2 lighting compensation Adjust Threshold 3 to obtain a white sil houette of the sample workpiece Adjust Threshold 4 to also obtain a white silhouette of the sample workpiece Enter the HiLo Range Menu to latch the nominal brightness value Low Limit 20 High Limit 250 o Use the Line Branch to Adjust the X gauge Analyze the image obtained using Threshold 3 Measure white blobs Select a measurement pair containing X the leading edge of the first blob Filter selection 1
Download Pdf Manuals
Related Search
Related Contents
2006 4 Stroke Owners Manual Lubrifiants Liebherr fiche de données techniques デジタル顕微鏡 取扱説明書 PRO 500 - Kunzvital Life Fitness Multihip SL50 User's Manual Orbital Sander Service Instructions CO-BSW24GTX2 取扱説明書 取扱説明書 Copyright © All rights reserved.
Failed to retrieve file