Home
5370-ND007, Bulletin 5370 CVIM OCR
Contents
1. 20000 7 1 Using the RS 232 Port ce eee eee eee 7 4 ASCII Commands agama naa secure KANAN LNAG 7 4 DEVCGMMANS sd aaahh NT PAN NAAN 7 6 Using the Pyramid Integrator Backplane 7 9 Using the Backplane a 7 9 Using Message Mail 2 00 7 9 Configuration Blocks for OCR Windows 7 11 Results Blocks for OCR Windows 7 13 Statistics for OCR Windows 00005 7 16 Table Title Page List of Tables 7 A CVIM Remote O Outputs PLC to CVIM if CVIM IS RACK 02 os sA ada COA esa ae ee eto Mara 7 2 7 B Configuration Blocks 42 65 Windows 1 24 Toolset 1 Configuration Blocks 104 127 Windows 1 24 Toolset 2 aaa saaan manawagan 7 13 7 C Numerical Results Data Results Block 1 7 16 7 D Numerical Results Data Results Block 2 7 17 Chapter 1 Using This Manual Chapter Objective The objective of this chapter is to provide an overview of the contents and organization of this manual This chapter also defines the OCR PAK option describes the intended audience lists related publications and describes cautions OCR PAK Option The OCR PAK option Allen Bradley Cat No 5370 OCR Definition isan enhancement to the Allen Bradley CVIM module Cat No 5370 CVIM inspection windows which provides a new capability optical character recognition OCR The OCR PAK option is installed in the CVIM through the use
2. 4 25 String Keypad Using the a 4 22 T Threshold Adjusting the a 4 9 Thresholds Character Window Adjusting 4 41 Types of Operation a 2 3 U Usage Window nG r E E ee 2 8 Using Analysis Function os pman eee ted eea dee eves 4 51 Backplane 2 anta Ban lan dn a oy dato Sekt 7 9 Char Width naaa leat aad tn Panda e BAG 5 4 Define Char String Menu 255 4 11 Diagnostics maana BA ANT NINA K eens 5 7 Disp Chats AA AA 5 8 Filter FUNCION cass nlx yi RP BSA yeaa cea es 4 26 Learn FUNCION awa aa bho ee Boe SE Ba ahaha a 4 27 Learn Function Examplesof 4 28 Learn Match String Function 4 21 Message Mail a sain GoDog eee a Gg a da 7 9 Mirror Function a maga Aa GANSA pig kao 4 15 OCR Adjustment Features 5 2 OCR WINdOWS so aaa ea wes eee ahat oe oot 4 1 Pyramid Integrator Backplane 7 9 Reconnect nakaaantig iidne rA E deer EDU Rees 5 3 Registration Function a 4 51 RS 232 POT nla es PG DAN DN BG Re NA 7 4 Search Window 2 NN 8 an Kaanak Wa ALAS 4 42 Search Window and Reference Line 4 47 Search Window Example of 4 46 Show Matrix daa nA ose ee ewan as 5 10 Strict Control Function XX sa haus dad sv haa hay 4 25 String Keypad gt aha Apan pren LAN pagan 4 22 1 6 Index Section Page V Valid Characters daan
3. 000 eee 1 2 Remote I O Outputs CVIM PLC to CVIM 7 2 Requirements Character Appearance 2 4 Restrictions Decimal Point Character 0 00 2 2 Space Character wu sa Saad BG kaha hi caw 2 2 Results Blocks for OCR Windows 7 13 Block T whan olin da eae neces ao e Ae ass Wadd AA AA 7 16 BOCK ABA AA ett Sah enh Sea RSet Oe ica 7 17 Results Display Kaawa AA aes ould feats geen eae 6 2 Rotation Character 2 vay nh oie awe dans ea GT ang awe 2 5 RS232 PO 5 USING aaah Sek in pad a eet ese ces 7 4 Runtime Displays mama pana a NAA PE dee WANG bes se eae 6 1 Runtime Tools Display anaana 6 1 S Search Mode Defining the 0 4 13 Search Window Example of Using a 4 46 MISA GRP ANA AA APA he ood ole 4 42 Index Section Page Selecting Background 0 a 4 13 Selecting OCR Operation a 4 4 Selecting Orientation and Direction 4 14 Selecting the Font 2 250035 oey tae NA NAA 4 12 Selecting the Read Mode 4 18 Setting Max Chars waaa oie de daria eee cese 4 33 Setting the Pack Function 4 36 Show Matrix USING a naa vais eae tiene aNG 5 10 Space Character Restrictions 2 2 Spacing Character 2627ise Jaan contd veges ees 2 5 Statistics BKT ALE AA AA O PAA See ye 6 3 For OCR Windows aaa PNG ABA DAWA Nasa 7 16 Strict Control Function Using
4. Select and Enable the Window Define Window lt I Range Reference eee Window 1 Disabled Nominal 4 Window Popup Menu In order to select a specific window for OCR operation you pick the Next or Previous box on the Window menu as with any other window operation However in selecting a window for OCR operation remember that for OCR inspections the CVIM uses multiple windows e The first window is the string window this is the window you select enable and configure for OCR e The subsequent windows are the character windows these are allocated by the CVIM automatically on an as needed basis when you configure the string window In order to allocate character windows the CVIM utilizes only consecutively numbered disabled windows which must immediately follow the string window in sequence Each string window can require from one to 16 character windows Therefore when selecting a window to be your string window select a window which is followed in sequence by at least one disabled window and possibly more depending on how parameters in your OCR window configuration are set Chapter 4 Configuring OCR Windows 4 3 Selectand Enable The number of character windows required depends upon the Window these two parameters which you set 1 the maximum continued number of characters and 2 the pack function enabled or disabled Note The pack function is discussed later in this chapter
5. Learn Nominal ABC 123 Window 1 Enabled Previous Next Examples of Using the Learn Function Example 7 Mode Match String Assume now you have set the String box to ABC 2 3 Recall that the character regards any detected marking as a match whether itis a valid character or not Comments Picking the Learn box causes the characters ABC 2 3 to appear in the Learn box In this case the characters in the inspected string are detected this is indicated by the two characters in the Learn box when you place the character in the String box the OCR window does not try to identify the character it merely checks for a marking q Learn box Example 8 Mode Match String Assume now you have set the String boxtoABC 1 2 3 witha space between the C and the 1 Comments Picking the Learn box causes the charactersABC 123 to appear in the Learn box with a space between the C and the 1 In this case the space character in the inspected string is detected this is indicated by the space present in the string in the Learn box Had the space not been detected the Learn box would have read ABC q Learn box Chapter 4 Configuring OCR Windows 4 33 Setting Max Chars The Max Chars function enables you to select the maximum number of characters your string window will inspect The CVIM inspects only up to the selected maximum number of character
6. The Range Reference box changes to the Output Reference box ranges are not used with the OCR windows These new OCR related menu items are discussed further throughout the remainder of this chapter Chapter 4 Configuring OCR Windows 4 6 Placing the After OCR is selected next place the OCR window to cover OCR Window the character s you are going to inspect Your Action Comments Pick the P amp P Process Win box on the Define Window menu Shape Rectangle Search Win Disabled OP OCR When you pick the P amp P Process Win box the handles appear on the window Example Character String AT4 Handle Pick and place the window so it covers the character s you are gong to inspect Window placed over horizontally oriented character string AT4 The window should be placed so the window surrounds the character s to be inspected In placing the window Do not allow the window borders to overlap any part of the character s to be inspected e Make sure the characters s to be inspected are the only features that appear in the window Window placed over vertically oriented character string AT4 Chapter 4 Configuring OCR Windows Placing the OCR Window continued Your Action Place the window over a character so that the window just covers the character IN Window placed over 7 AG 4 horizontally oriented character Pick the Hel
7. 7 14 Block 2 Results Numerical Results Data 7 15 Blocks Configuration for OCR Windows 7 11 Blocks Results for OCR Windows 7 13 C CAUUONS aa Pa KANA nas mo aata AN aan SUBA AG Ba aba 1 2 Char Width Using amag Sood chee ied dea ad KA Naan 5 4 Character AHGAMENt Kang es Boker ie 16245 AWAY 2 4 AUMDIGUITICS rai te cork HA AA suse Ree Ew 2 6 Appearance Requirements 2 4 2 4 Height a Gad GA LAGA Pa Romar acta paa an Masa Kasih a 2 4 Orientation and Direction 2 4 DUST kunan ath seeded NAA AE AN aS DA 2 7 Restrictions Decimal Point 2 2 Restrictions Space 2ang seve Pana de er ee gd oo 2 2 ROCAUON saaan GE AA NAGA Bk ma EN 2 5 Spacing AA AAP Mat thd AA 2 5 Window Thresholds Adjusting 4 41 Characters Valid oc ck ose hoe swab dada wes tas 2 2 For the Match String 02 2e eee eee 4 24 Characters Wild Card 625 Sawan wakes ates kee es 4 24 Choosing the Mode 2 2 a 4 19 Index 1 2 ema Ae o06rrrr Section Page Commands ASCI trees wks aag tthe KASERA WALA Ga ABA Re hee oot 7 4 DET 52Na angay Ma ha nG en KG aoe b eee eet mad 2 7 6 Communications ppm naaa SAAN a iad 7 1 OCMC WE PARA APAN EN AN Ear SAO ds cacti 7 1 Configuration Blocks forOCR Windows 7 11 Configuring OCR Windows 220 4 1 Contrast Character background 2 6
8. Note For horizontal character strings the top and bottom handles are disabled for vertical strings the left and right handles are disabled Top and bottom handles are NA disabled 4 P amp P Char Width box Using the side handles for horizontal strings place the window so that it surrounds a single character representative of typical character width the Char Width function automatically adjusts the width 25 percent to accommodate variance in width from character to character Window placed over single character Note If you set the width too narrow the OCR window may split wide characters into two unrecognizable characters If you set the width too wide the OCR window may not separate the connected characters at all Chapter 5 OCR Adjustment Features Using Char Width With the Char Width box set to Manual the OCR window continued will during inspection separate any connected characters according to the character width you set You can check the effects of your character width setting by using the Learn box with the Disp Chars box Enabled see Using Disp Chars in this chapter the separation the OCR window makes will appear in the displayed characters Separation created by Char Width function Font Other S Character Display window Search Mode Read Numbers Letters Max Chars 16 Pack Enabled Reconnect Disabled Wand Tare Char Width Manual connected P amp P Char
9. Read Results OCR This is basically the same command as the DF1 Read Results Command in Chapter 5 of the CVIM Communications Manual The difference is with this command you specify OCR results Use this command to list the results of the last inspection from all the OCR string windows in the specified tool set Command Format an PAPAL KA AA PA ar Where 07 the read result command n Times H repeat number high byte n Times L repeat number low byte x tool set number where 04 tool set 1 05 tool set 2 20 OCR results For example Suppose window 1 and window 8 of toolset 1 are string windows and the recognized strings are 1234 and 5 6 7 8 respectively for the last inspection This DF1 command DLE STX 07 00 01 04 20 DLE ETX BCC returns the hexadecimally encoded ASCII characters of the two string windows the strings are each terminated by the null 00 DLE STX 31 32 33 34 00 35 36 37 38 00 DLE ETX BCC 7 8 DF1 Commands continued Chapter 7 Communications Set Match String Use this command to set the match string for a string window which is configured for a match operation Note To use this command the selected CVIM host must be RS 232 Command Format Where 1A the Set Match String command x tool set number where 04 tool set 1 05 tool set 2 17 window z window number string characters match string Note The string must be hexadecimally encoded
10. 7 2 Installing the OCR PAK option 3 1 Index Section Page K Keyboard match string entry 4 22 L Learn Function Examples of Using aa 4 28 USING oven cheeses pupa E BNG tes Baga 4 27 Learn Match String Function Using 4 21 Length of Match String and the Max Chars Setting 4 25 M Manual Objective and Contents 1 1 Match Operations 2 5206 na a serene ue Rees 2 3 Match String and the Max Chars Setting Length 4 25 Match String Defining 2 2 eee 4 21 Match String Valid Characters for 4 24 Matrix Show USING ve20e44004 c358620 bass desea 5 10 Max Chars Setting Length of Match String and MaeChars paha aa a eet 4 25 Max Chars Setting upahan aNG NA map ne Kala 4 33 Message Mail Using a 7 9 Mirror Function Using a 4 15 Mode Choosing sc paaa baka aa mna LA ANONG deans 4 19 N Numerical Results Results Block T acc is reese tan uae oE NG 7 16 Results Block 2 ahaha ASA RIN RNGA A a 7 17 O OCR Adjustment Features a 5 1 USING 2 Set oek cameos senses ey ADGL Aen Saude 5 2 Adjustment Overview 22 002 0005 5 1 When to USO ua oie each Gu e e 5 1 Operation Selecting vei sues esi to eta Geese 4 4 Window initial Setup OF oen soenan oe Gabe neko de 4 1 MC APA PAA iene 4 6 Configuration Blocks for 7 11 CONHGUTING aer ad
11. Related Publications Before using this manual you should be familiar with the CVIM module and its configuration procedures For information refer to the CVIM User s Manual Cat No 5370 ND001 Series B In particular review Chapters 8 Inspection Tools Windows and 10 Runtime Functions If you plan to use the CVIM communications port on the chassis backplane and or front panel refer also to the CVIM Communications Manual Cat No 5370 ND002 Series C Notices of caution are used when the CVIM module or peripheral equipment could be damaged if the listed procedure is not followed The following format is used CAUTION This is an example of the format used for a caution The following manuals are cited for reference in this manual e User s Manual Bulletin 5370 CVIM Cat No 5370 NDO001 Series B also referred to as the CVIM User s Manual in this publication e Communications Manual Bulletin 5370 CVIM Cat No 5370 ND002 Series C also referred to as the CVIM Communications Manual in this publication Chapter 2 Application Considerations and Requirements Chapter Objective The objective of this chapter is to provide information regarding the capabilities of OCR windows and the restrictions and requirements regarding the use of OCR windows Note Read this chapter before attempting to use OCR PAK Introduction tothe The OCR PAK option is an enhancement to the CVIM OCR PAK Option inspect
12. Typical Toolset Usage Menu gt Output Reference Menu Ref Fixed Define Window Define Char String ba Learn Nominal Output Reference box Window 1 Enabled Previous Note that the No Output box has a shaded square 0 indicating that no output is assigned to the currently selected window Also note that the available outputs are in light type you cannot pick the outputs listed in dark type Pick the appropriate output Picking one of the available outputs assigns that output fromthe menu tothe currently selected window Note If you prepared an Output Line Planning Sheet see Appendix A in the CVIM User s Manual refer to it for the assignment for this window Chapter 4 Configuring OCR Windows 4 51 Using the Analysis Function You can use the CVIM module s analysis capability to Analysis Menu display the inspection time of the OCR windows Refer to the CVIM User s Manual for information on the analysis tools Windows Process Time 0 000ms ContinuousS amp A Snap amp Analyze Analyze Image Tool Display Config Results Archival Snapshot Registration Using the Registration Upon returning to setup mode from the run mode you can Function use the CVIM module s registration capability to Registration Menu gt automatically realign the OCR string window with the character string if the character string has shift
13. Font Other Read Numbers Letters 5800 Max Chars 16 coo Pack Enabled Reconnect Disabled Char Width Auto P amp P Char Width Diagnostics Your Action Pick the Orientation box on the Search Mode menu to change the setting if appropriate Window placed over horizontally oriented characters Window placed over vertically oriented characters with pl F bottom to top direction Pick the Direction box on the Search Mode menu to change the setting if appropriate Chapter 4 Configuring OCR Windows Selecting Orientation and Direction Set the Orientation and Direction boxes on the Search Mode menu according to the orientation and direction of the character strings you are inspecting as described below Background Light Orientation box Orientation Horizontal Direction Top to Bottom lt Direction box Mirror Disabled End Chars Disabled Picking the Orientation box toggles the entry between Horizontal and Vertical Select Horizontal to inspect horizontally oriented characters Note With Horizontal selected the Direction box is disabled This is because the CVIM normally recognizes characters in horizontal strings from left to right except with Mirror enabled see Using the Mirror Function Select Vertical to inspect vertically oriented strings shown below If you select Vertical you also choose the Direction Note With Vertical selected the Direction
14. Number Letter 0 lt gt 0 lt gt 2 lt gt Z 5 lt gt 5 8 lt gt B Character misreads due to confusion of the above numbers and letters can result in false inspection passes false inspection failures or simply incorrectly identified characters To help prevent such misreads for read operations you select a priority for recognition Letters The OCR window attempts to identify each character in the window as a letter only Numbers The OCR window attempts to identify each character in the window as a number only Letters Numbers The OCR window attempts to identify each character in the window as a letter first Then if any characters are not recognized as letters the OCR window attempts to identify them as numbers Numbers Letters The OCR window attempts to identify each character in the window as a number first Then if any characters are not recognized as numbers the OCR window attempts to identify them as letters Chapter 2 Application Considerations and Requirements 2 7 Character Quality The quality or clarity of the characters inspected can affect the success of character recognition Extra markings or breaks in characters can result in failed or incorrect recognition of a character Sore Extra markings or breaks can particularly affect parts of characters called loops and hooks Hooks are parts of a character which partially encircle an area such as the bottom half of a 9 or
15. continued Max Chars 16 coo Pack Enabled Reconnect Disabled Char Width Auto P amp P Char Width eee Diagnostics eee de Number Strict Control Enabled Filter Disabled Learn Match String Examples of Using the Learn Function The following examples assume the OCR settings such as Font and Search Mode have already been set according to the requirements of the application Example 1 Mode Numbers Assume you have placed the OCR window over the characters A B C 1 2 3 and set the Mode box on the Match Mode menu to Numbers lt 1 lt Mode Numbers selected lt 4 Mode Menu O Letters pLetters Numbers Numbers Letters Match String Your Action Pick the Learn box on the Window menu Define Window Define Char String Output Reference Nominal 777123 Window 1 Enabled Learn Comments Picking the Learn box causes the character string to appear in the Learn box In this case 123 appears in the Learn box The three characters indicate that A B and C are not recognized Recall that in Numbers mode the OCR window tries to identify each character as a number only and does not recognize letters q Learn box Chapter 4 Configuring OCR Windows 4 29 Using the Learn Function Examples of Using the Learn Function continued Example 2 Mode Letters Numbers Assume now you have
16. the reference lines and reference windows see the CVIM User s Manual for more information about these tools What is shift compensation In some applications the features to be inspected by a line gage or window may shift position in the image from inspection to inspection To account for this position shift you use the shift compensation tools of the CVIM to detect the amount and direction of shift and apply the same shifting to the inspection tool as the shift of the features How does the search window work During setup the search window learns the positions of features contained within its borders During an inspection the search window inspects the area within its borders for feature content If during an inspection the content in the search window shifts from the learned position the search window shifts the OCR string window the same amount and direction as the content shift Can you use reference lines and reference windows with OCR windows You can effectively use reference lines and reference windows with OCR windows if the character string you are inspecting is consistently aligned with an edge or feature in the inspected image However in many applications the character string position is not consistently aligned with a feature or edge in the image Note You cannot apply rotation compensation to an OCR window you can only compensate for horizontal and or vertical shifting When should you use
17. ASCII Commands continued 7 5 Read Inspection Results OCR Use this command to list the results of the last inspection from all the OCR string windows in the specified tool set Command Format gt RRx TSnOCR CR Reads the character strings from the specified tool set x number of times command is repeated optional default 1 n Tool set number For example Suppose window 1 and window 8 of toolset 1 are string windows and the recognized strings are 1234 and ABCD respectively for the last inspection This command gt RR TS10CR CR will return the ASCIl encoded characters of the two strings CR LF 1234 CR LF ABCD CR LF Set Match String Use this command to set the match string for a string window which is configured for a match operation Note To use this command the selected CVIM host must be RS 232 Command Format SSM TSnWd string CR Sets the match string for the specified string window n Tool set number d Window number string characters match string Note If the match string you are setting includes letters use upper case letters only For example Suppose window 9 of tool set 1 is a string window set for match string operation This command gt SM TS1W9 ABC D CR will set the match string of window 9 tt ABC D Note If the match string you send is not a valid match string the CVIM module will not accept the new match string and wil
18. CVIM Remote O Outputs PLC to CVIM 7 2 D Decimal Point Character Restrictions 2 2 Define Char String Menu Using 4 11 Defining the Match String 0 4 21 Defining the Search Mode 0 4 13 Definition OCR PAK Option 1 1 DEV Commands naa doe acs aa AO Se nab AN aata SLA 7 6 Diagnostics USING 1 3 Ane KARA PRN ANNA AGARAN KAN 5 7 Direction Character an se wo DAG nk gabe 2 4 Selecting AHA wits 4 14 Disp Chars USINO aaa wii pala aah p ee ba Aka es ee 5 8 Display Results cicsad avpassees ews eer sass 6 2 Display Tools Runtime 6 1 Display Statistics eee eee 6 3 Displays Runtime a ANNA pb alala mew in 6 1 E Effect of the End Chars Setting 7 4 34 Enable the Window 2 2 4 2 End Chars FUNCTION dana aa KA maa 4 15 Effectof inahing ts Ja fe Ue eet Gb 4 34 Example of Using the Search Window 4 46 Example of Using the Search Window and Reference 4 47 Examplesof Using the Learn Function 4 28 F Features Additional ATA 2 9 Features Adjustment OCR Kanan DAG pad 5 1 Filter Function USING 2 teceraoe nwenne chee Ab Aus 4 26 Font Selecting the aa srs eei ot vee aes od need 4 12 Font Styles a aaa ch cease sae aad 2 2 4 12 H Height Character 2 202 2550s kl hae FA Kasa 2 4 1 0 Remote Outputs CVIM PLC to CVIM
19. Pick the Learn boxon the Picking the Learn box causes the characters ABC 123 Window menu to appear in the Learn box and displays the characters ina window at the top of the monitor screen Chapter 5 OCR Adjustment Features 5 9 Using Diagnostics Using Disp Chars continued continued The Disp Chars function can be a useful troubleshooting tool For example suppose the character string ABC 789 appears in the OCR window during setup Then when you pick the Learn box the 9 in the inspected character string is listed as By using Disp Chars to display characters as viewed by the CVIM you might notice that the hook of the 9 is connected to the loop making it unrecognizable as a 9 This shows why the 9 is listed in the Learn box as Search Mode ece Read Numbers Letters eee Max Chars 16 eee Pack Enabled Char Width Auto P amp P Char Width coo N OCR string window Define Window eee E Output Reference PEP Learn Nominal ABC78 Window 1 Enabled Once you have seen how the characters appear in the window you can take steps to correct problems such as the one described above For example in the above case changing the threshold of the string window might help clean up the appearance of the 9 lt 4 Learn box Note If necessary you can also adjust the threshold of individual character windows in the string See Adjusting Character Window Thr
20. Previous Next Previous and q Window box Next Boxes Pick the Window Disabled box to enable the window 4 4 Selecting OCR Operation Chapter 4 Configuring OCR Windows Your Action Pick the Define Window box on the Window menu Pick the Op box on the Define Window menu Define Window Menu Pick the OCR box on the Window Operation menu twice Ho Access the Define Window and Window Operation menus in order to select OCR for the window operation Comments menu appears In order to select OCR as the operation access the Window Operation menu do this by picking the Op box Note that before you can select OCR as the window operation two boxes on the Define Window menu must be set as follows When you pick the Define Window box the Define Window The Shape box must be set to Rectangle The Mask box must be set to No Mask Shape Rectangle soo Mask No Mask coe P amp P Process Win c00 P amp P Mask Win soo Threshold Filter oco Range Reference eee Learn Nominal Window 1 Enabled Previous When you pick the Op box the Window Operation menu appears typical menus shown below Pick OCR box twice Picking the OCR box twice changes the Op box setting to OCR Note If you cannot select OCR as the operation that is if OCR appears on the Window Operation menu in black letters and the Shape and Mask boxes are set correctl
21. spaces in a row in a match string Any spaces you enter must be between other characters and not at the beginning or end of a string Generally the inspected space must be as wide as the average width of the inspected characters or wider A space detected in the string window is always counted as a single space even if its width is that of several characters Wild Card Characters The wild card characters allow you to inspect specific characters of a character string for an exact match while allowing other characters wherever the wild card characters are placed to vary The following characters all of which are available on the shift keyboard have special usage in the match string Place this character in the match string to accept any digit from 0 9 as a match Accept any letter from A Z as a match amp Accept any valid character as a match x Accept any marking valid character or not as a match Chapter 4 Configuring OCR Windows 4 25 Defining the Match String Length of the Match String and the Max Chars Setting continued Make sure the Max Chars box is set to a number that is high enough to accommodate the number of characters in your match string see Setting Max Chars for more information It is best to set the Max Chars box to the exact number of characters in the match string If the Max Chars box is set to a number higher than the number of characters in your match string a
22. you use the Char Width box and the P amp P Char Width box on the Define Char String menu Note Before you complete the following steps you should first place the OCR window over a character string in the setup image and define at least the Search Mode Your Action Comments Pick the Char Width box When you pick the Char Width box the setting toggles from box on the Define Char String Auto to Manual With Manual selected the P amp P Char Width menu to select Manual box is enabled Font Other Search Mode Read Numbers Letters Max Chars 16 Define Char Pack Enabled String menu Reconnect D sabled Char Width Manual 4 Char Width box P amp P Char Width 4 P amp P Char Width box Diagnostics Define Window lt 4 Define Char String box Chapter 5 OCR Adjustment Features 5 5 Using Char Width continued Your Action Pick the P amp P Char Width box on the Window menu Font Other Search Mode coe Read Numbers Letters 000 Max Chars 16 eee Pack Enabled Diagnostics Pick and place the window to define the character width Font Other Search Mode seo Read Numbers Letters eee Max Chars 16 coo Pack Enabled Reconnect Disabled Char Width Manual Pap char wid T AEE Diagnostics Comments When you pick the P amp P Char Width box the character width window appears Itis initially the same size as the string window and it has handles for picking and placing
23. ASCII and must be terminated with the null 00 Use upper case only for letters For example Suppose window 9 of tool set 2 is a string window set for match string operation This DF1 command DLE STX 1A 05 17 09 31 32 33 34 35 36 00 DLE ETX BCC will set the match string of window 9 to 123457 Note If the match string you send is not a valid match string the CVIM module will not accept the new match string and will set the Configuration Fault discrete bit Chapter 7 Communications Using the Pyramid Inte lator Backplane Using the Backplane Using Message Mail Read this section if you use the Pyramid Integrator backplane to communicate with the CVIM and you are using OCR windows Note Refer to Pub No 5000 2 3 Allen Bradley Pyramid Integrator Technical Overview for a description of the basic hardware components and valid configurations Through the backplane you can access an area of memory called Shared Memory Shared Memory contains e CVIM Discrete Bit Information refer to Appendix B in the CVIM Communications Manual e Results Data refer to Appendix C in the CVIM Communications Manual e In addition you can access the CVIM setup and configuration data through the backplane refer to Appendix Din the CVIM Communications Manual With OCR PAK installed you can use message mail to send any of the ASCII commands for the OCR windows see ASCII Commands in this chapter To do so you
24. Contents Chapter Title Page 1 Using this Manual Chapter Objectives ak 4 25 ede nG at a NAA 1 1 OCR PAK Option Definition naaa 1 1 Manual Objective and Contents 1 1 Intended Audience 200 aa 1 2 Cautions aces chet ad eee NANANA NAGDAAN 1 2 Related Publications 204 aman 1 2 2 Application Considerations and Requirements Chapter Objective srera fo kka AA AA 2 1 Introduction to the OCR PAK Option 2 1 Font Styles cha cht KG TRA aes NP aha en wa eee 2 2 Valid Characters 22 5 a oa daa AKIN eee D TGA Hee 2 2 Space Character Restrictions 2 2 Decimal Point Character Restrictions 2 2 Types of Operation a 2 3 Read Operations 202 0 e eee eee 2 3 Match Operations ee eee eee ees 2 3 Character Appearance Requirements 2 4 Character Orientation and Direction 2 4 Character Height 222255 ee ides erase oe 2 4 Character Alignment 222 220005 2 4 Characterspacing s 055 506 206s ohne gng wkd 2 5 Character Rotation 020 2000 2 5 Character Background Contrast 2 6 Character Ambiguities 2 0 2 6 Character Quality iere naisahan oud eek Ges 2 7 Window Usage lt co0 ce cues oan dawandscneievas tents 2 8 Additional Features Xa a nna ANN PNG 2 9 3 Installing the OCR PAK Option Chanter Objective oo aa na Bana Paka Kamag 3 1 Installing the OCR
25. Enabled Note If the Disp Chars box is enabled you must first disable it in order to enable the Show Matrix box Font Other Search Mode Disp Chars Disabled Show Matrix Enabled Read Numbers Letters Max Chars 16 Pack Enabled Reconnect Disabled Al d C 1 2 3 Char Width Auto CHE OCR string window P amp P Char Width 4 _ Diagnostics box Chapter 5 OCR Adjustment Features 5 11 Using Diagnostics Using Show Matrix continued continued Your Action Comments Pick the Learn boxonthe Picking the Learn box displays the character matrix and Window menu the character in a window at the top of the monitor screen B displayed Search Mode soo Read Numbers Letters eee oon Max Chars 16 eee A B i C 1 2 3 m Pack Enabled a AN OCR string window Matrix for BRB Reconnect Disabled Char Width Auto P amp P Char Width rr Define Window oco Output Reference e068 Learn Nominal B Window 1 Enabled Note If you use the Show Matrix function with more than one character in the string window the display window shows the matrix for the last character in the string window only q Learn box Chapter 6 Runtime Displays Chapter The objective of this chapter is to describe how to interpret Objective the CVIM runtime displays when using OCR windows Runtime Tools Display You can display the string window and search window
26. Function 4 28 Setting Max Chars Xa aba Kaka ayes een ess 4 33 Effect of the End Chars Setting 4 34 Setting the Pack Function 4 36 Adjusting Character Window Thresholds 4 41 Using the Search Window 2 4 42 Example of Using the Search Window 4 46 Example of Using the Search Window and Reference Line 00005 4 47 Assigning the Reference Tool 4 48 Assigning an Output Line 0 4 4 49 Using the Analysis Function 02000 4 51 Using the Registration Function 4 51 5 OCR Adjustment Features Chapter Objective pA nha te es Kaka 5 1 Overview OCR Adjustment 5 1 When to Use OCR Adjustments 5 1 Using the OCR Adjustment Features 5 2 Using Reconnect Nan Ka Bhs wee 5 3 Using Chat Width lt 9 350 25 stent pe ee oh ed 5 4 Using Diagnostics Sisson Spon nae aaa Dake ee 5 7 Using Disp Chars sakada keg eta uenaea ae 5 8 Using Show Matrix Table of Contents 3 Chapter Title Page 6 Runtime Displays Chapter Objective 2 28 cia eke ON ee a 6 1 Runtime Tools Display 0 2 000000 6 1 Results Display sarri sensado een enh es Seat 6 2 Statistics Display 2 BP aNG AT Me oes 6 3 7 Communications Chapter Objective mgawa ha NAGA eee elke 7 1 Communications Overview 2 2 20006 7 1 Using the Remote I O Link
27. Function for information on enabling and disabling the End Chars function The benefit of enabling the End Chars function is that it enables the OCR window to ignore unwanted characters or other objects such as logos which may appear with the target characters in the OCR window during inspections For example suppose you want to inspect the printed date on labels which follows the word DATE The problem is you do not want to inspect the word DATE but the word or part of it sometimes appears in the OCR window due to printing or positioning inconsistencies One way to avoid inspecting the word DATE and still inspect the actual date would be to set Max Chars to 5 and set End Chars to Enabled For example if during setup you were to pick the Learn box with End Chars set to Enabled and Max Chars set to 5 the OCR window would inspect only the last 5 characters in the OCR window as shown below Define Window ee Define Char String eee Output Reference FEB94 Window 1 Enabled Learn Tes Learn box 4 36 Setting the Pack Function Your Action Pick the Pack box to enable or disable packing Chapter 4 Configuring OCR Windows The Pack box allows you to enable or disable the character packing function Character packing works like this e With Pack disabled the CVIM allocates one character window for each character being inspected in
28. Not Used 111 Programmable Results Block Write 110 Set Match String Reserved 1 Config Transfer 1 Display Stat 2 Page Not Used 1 Disable JMB Forces 1 Credit Card Config 4 s bit Not Used 1 Block Trnsfer Block No 64 s bit 1 Force JMB Output 7 ON Not Used 1 Force JMB Output 7 OFF Not Used Not Used Not Used Not Used 1 Display Stat 1 Page Not Used Halt on Reject 1 Enable JMB Outputs 1 Credit Card Config 2 s bit 1 Toolset 2 Request 1 Block Trnsfer Block No 32 s bit 1 Force JMB Output 6 ON 1 Force JMB Output 14 ON 1 Force JMB Output 6 OFF 1 Force JMB Output 14 OFF 1 Page 1 Page Up 1 Resume 1 Display Down Control Not Used Toolset 2 1 Display Results Page 1 Disable JMB Outputs 1 Credit Card Config 1 s bit 1 Toolset 1 Request 1 Block Trnsfer Block No 16 s bit 1 Force JMB Output 5 ON 1 Force JMB Output 13 ON 1 Force JMB Output 5 OFF 1 Force JMB Output 13 OFF 1 Freeze Next image 1 RAMto Credit Card 1 Last Block write Only 1 Block Trnsfer Block No 8 s bit 1 Block Transfer Type 1 Block Trnsfer Block No 4 s bit 1 Force JMB Output 3 ON 1 Force JMB Output 11 ON 1 Force JMB Output 4 ON 1 Force JMB Output 12 ON 1 Force JMB Output 3
29. OFF 1 Force JMB Output 4 OFF 1 Force JMB Output 11 OFF 1 Force JMB Output 12 OFF CVIM Remote I O Outputs PLC to CVIM if CVIM is Rack 02 1 Displa Failed Tools 1 Post TS2 to Remote Q 1 Block Transfer Type Block Trnsfer Block No 2 s bit 1 Force JMB Output 2 ON 1 Force JMB Output 10 ON 1 Force JMB Output 2 OFF 1 Force JMB Output 10 OFF a BIT 00 15 14 13 12 11 10 Not Used Not Used Not Used Not Used Not Used Not Used 1 0 1 Lightpen 1 Trigger 1 Trigger 1 Unlock 1 Lock Request Request Toolset 2 Toolset 1 Setup Setup 1 Display 1 Display VO Page All Tools 1 Freeze All 1 Freeze Go on reject Rejects First Reject Not Used Not Used 1 Display Image Only 1 Post TS1 ta Remote I O 1 Credit 1 RAM to 1 EEPROM Cardto RAM EEPROM to RAM 1 Block Transfer Type 1 Block Trnsfer Block No 1 s bit 1 Force JMB Output 1 ON 1 Force JMB Output 9 ON 1 Force JMB Output 1 OFF 1 Force JMB Output 9 OFF 1 Display Toolset 1 A pasa aa kasta Set these three bits to specify the type of block as follows 001 Results 010 Configuration 100 Template 101 Statistics if both ON amp OFF bits are set the output is forced OFF Do not write to these bits CA ee ee ee ep ee eee Chapter 7 Communications Using the Remote IIO Link cont
30. PAK Option 3 1 4 Configuring OCR Windows Chanter Objective ies area mind wang kaa at Ma 4 1 Using OCR Windows a a naa G wand Saab WA haa 4 1 Acquiring an Image a 4 1 Initial Setup of the OCR Window Table of Contents Chapter Title Page 4 Configuring OCR Windows continued Select and Enable the Window 4 2 Selecting OCR Operation 4 4 Placing the OCR Window 4 6 Adjusting the Threshold 4 9 Using the Define Char String Menu 4 11 Selecting the Font aha eas ei ews 4 12 Defining the Search Mode 4 13 Selecting Background 4 13 Selecting Orientation and Direction 4 14 Using the Mirror Function 4 15 The End Chars Function a 4 15 Selecting the Read Mode 4 18 Choosing the Mode 4 19 Defining the Match String 4 21 Using the Learn Match String Function 4 21 Using the String Keyboard 4 22 Valid Characters for the Match String 4 24 Wild Card Characters aa 4 24 Length of Match String and the Max Chars Setting a 4 25 Using the Strict Control Function 4 25 Using the Filter Function 4 26 Using the Learn Function 2 4 27 Examples of Using the Learn
31. PAK option is provided on a memory card This OCR PAK Option section describes how to install the option Note If you have already installed or intend to install other software option packages in the CVIM module refer to the Instruction Sheet included with the software package for the proper loading sequence for installing multiple options Also note that the CVIM system must have the Revision C03 or higher firmware before the OCR PAK option can be installed the firmware revision is listed on the title banner on the monitor screen following powerup Use the following steps to install the OCR PAK option in your CVIM system Your Action Comments Pull the DC PWR LOCK This removes DC power from the CVIM module handle out as far as it will go Insert the memory card into the Insert the end with the metal strip facing right the arrow Archive Memory sloton the on the card label should also be facing right CVIM module CVIM Module OCR PAK memory card Card Label Metal Strip Pushin the DC PWR LOCK This applies DC power to the CVIM module when power is handle as far as possible applied the loading sequence begins Chapter 3 Installing the OCR PAK Option 3 2 Installing OCR PAK continued CAUTION Do not remove power to the CVIM module during loading of the OCR PAK option Doing so may damage the CVIM module Your Action Comments Observe the LEDs during The top three LEDs on the CVIM module indicate the loading
32. all of the individual character windows as well You can also set the threshold level for each of the individual character windows see Setting the Pack Function later in this chapter Chapter 4 Configuring OCR Windows Using the Define Char String Menu Your Action Pick the Define Char String box on the Window menu Define Char String menu gt Search Mode Read Numbers Letters ee Max Chars 16 Pack Enabled To further configure the OCR window you must use the Define Char String menu To access the Define Char String menu pick the Define Char String box on the Window menu Comments When you pick the Define Char String box the Define Char String menu pops up There are two types of features on the Define Char String menu the OCR configuration features and the OCR adjustment features OCR Configuration Features Reconnect Disabled Char Width Auto OCR Adjustment Features P amp P Char Width Diagnostics Define Window eee Define Char String Output Reference eee Learn Nominal t Define Char String box 4 Learn box The OCR configuration features are used to set most of the parameters for the OCR inspection and are discussed in this section The OCR adjustment features are intended for use only in special cases and are discussed in Chapter 5 Use of the Learn box during setup will also be discussed in this chapter Before you can use the Le
33. box is enabled Window placed over vertically oriented characters with top to bottom direction Picking the Direction box toggles the entry between Bottom to Top and Top to Bottom Select the Direction which is appropriate for your application see diagram above for examples of Bottom to Top and Top to Bottom directions Chapter 4 Configuring OCR Windows 4 15 Defining the Search Mode continued Inspected characters reflected from the left side of the camera Your Action Pick the Mirror box on the Search Mode menu to change the setting if required P amp P Char Width Diagnostics Using the Mirror Function The Mirror function allows you to inspect a reversed image of character strings For example with Mirror set to Enabled you can use a mirror to reflect the character strings to the camera or inspect characters on the reverse side of a transparent film Camera bottom side gt showing Mirror 1 The Mirror function is designed for cases where the image is reflected from either the left or the right of the camera field of view that is the image is reflected about the vertical axis in the field of view see diagrams on the next page The mirror function is not designed to work with images reflected from above or below the field of view You enable the Mirror function by picking the Mirror box on the Search Mode menu Comments Picking the Mirror box toggles the entr
34. citi oe Worden mkha 4 1 Results Blocks for vs oie os ox makain aah BA 7 13 Statistics TOR occa Cpt date nana bee Baa 7 16 O AAP AA a PO ete Yeah aad eae an 4 1 OCR PAK Option Definition 5am h Ta nd bhutan eee baal 1 1 Installing AA AA ABA es 3 1 Introduction 0 a 2 1 Index 1 4 a am eee rere Section Page Operation Typesof uu 2 3 Match sense aaa ai Canaman Nh a Pub 2 3 Lt RA AA PAC PRA 2 3 Option Definition OCR PAK 1 1 Orientation and Direction Character 2 4 Orientation and Direction Selecting 4 14 Output Line Assigning an 0 4 49 Outputs Remote I O CVIM PLC to CVIM 7 2 Overview Communications 0 7 1 Overview OCR Adjustment 5 1 P Pack Function Setting 0 00 4 36 Placing the OCR Window 0 4 6 PLC to CVIM Remote O Outputs Uu 7 2 Publications Related 000 00 2000 1 2 Pyramid Integrator Backplane Using 7 9 Q Quality Character is ada G kasa lib Aka aes 2 7 R Read Mode Selecting 4 18 Read Operations aaau anaana nnana 2 3 Reconnect Using a 5 3 Reference Line Using the Search Window and 4 47 Reference Tool Assigning 4 48 Registration Function Using 4 51 Related Publications
35. configuring OCR Left Cursor Pixel Obj Filter Menu t mE Slide Bar Define Char String eee Output Reference soo UOTOIYMITA Learn Nominal Right Cursor gt Window 1 Enabled 4 10 Chapter 4 Configuring OCR Windows Adjusting the Threshold continued Your Action Pick the right cursor next to the slide bar Adjust cursor to obtain the best image possible Comments When the cursor is successfully picked it changes color When you slide the right cursor upward more dark pixels appear in the window and dark characters on a light background appear thicker Light characters on a dark background appear thinner When you slide the right cursor downward more light pixels appear in the window and light characters on a dark background appear thicker Dark characters on a light background appear thinner When setting the cursor position your objectives are to 1 Obtain a clearly readable appearance of characters Varying the threshold level can make character strokes appear thinner or thicker fill in loops or hooks etc 2 Make sure the string window is clear as possible of any noise that is random pixels of the same color as the characters appearing in the OCR window Some noise is tolerable however too much noise can cause misreads by the OCR window Note When you set the string window threshold level you are also setting the threshold for
36. of a memory card With OCR PAK installed OCR is listed as an additional selectable option for CVIM module inspection window operation All of the parameters for this new window operation are configurable through the CVIM module s popup menu environment through the use of the light pen and monitor interface Manual Objective The objective of this manual is to provide the procedures to and Contents both install OCR PAK in the CVIM module and configure the CVIM module in order to use the CVIM module for optical character recognition OCR Chapter 2 Application Considerations and Requirements describes key features specifications and restrictions in using the OCR PAK option Chapter 3 Installing the OCR PAK Option shows you how to install the OCR PAK option on the CVIM module Chapter 4 Configuring OCR Windows describes the use of menus and other displays in configuring a window for OCR Chapter 5 OCR Adjustment Features describes the use of special adjustment features for OCR windows Chapter 6 Runtime Displays describes the use of the Tool Display the Results Page and the Stat1 Page specifically regarding the OCR PAK option Chapter 7 Communications provides information which in addition to the CVIM Communications Manual is necessary to access OCR results and statistics data and perform OCR specific configuration functions using communications ports Chapter 1 Using This Manual Intended Audience Cautions
37. set the Mode box to Letters Numbers Your Action Comments Pick the Learn boxon the Picking the Learn box causes the character string to appear Window menu in the Learn box In this case AB C O 1 2 3 appears in the Learn box Note that the fourth character is identified as the letter O and not 0 zero Recall that in Letters Numbers mode the OCR window attempts to identify each character as a letter first Define Window eee Define Char String eee Output Reference coo Learn Nominal ABCO123 Window 1 Enabled Ten cameras ret tine Ret win cage Example 3 Mode Numbers Letters Assume now you have set the Mode box to Numbers Letters q Learn box Pick the Learn box onthe Picking the Learn box causes the character string to appear Window menu in the Learn box In this case AB C 0 1 2 3 appears in the Learn box Note that the fourth character is identified as 0 zero and not the letter O Recall that in Numbers Letters mode the OCR window attempts to identify each character as a number first Define Window Define Char String Output Reference Nominal ABC 123 Window 1 Enabled Learn Learn box Chapter 4 Configuring OCR Windows 4 30 Using the Learn Function Examples of Using the Learn Function continued Example 4 Mode Match String Assume now you have set the Mode box to Match String and you have set the String boxtoABC123 As
38. suppose window 3 a string window reads the characters ABC DE F with packing enabled The results for windows 4 and 5 two character windows would be the hexadecimally encoded ASCII characters listed as follows Window 4 41 42 43 44 Window 5 45 46 00 00 characters A B C D characters E F Now suppose window 3 reads the characters AB C DEF with packing disabled The results for windows 4 9 six character windows would be the hexadecimally encoded ASCII characters listed as follows Window 4 00 00 0041 character A Window 5 00 00 00 42 character B Window 6 00 00 00 43 character C Window 7 00 00 00 44 character D Window 8 00 00 00 45 character E Window 9 00 00 00 46 character F Chapter 7 Communications 7 14 Results Blocks for OCR Windows continued Table 7 C Bit Backplane Toolset Toolset 1 2 312 313 Window 1 Value k 15 314 315 26 27 Window 2 Value 28 29 Window 3 Value Definition Window 5 Value 38 39 0 15 Window 8 Value Luminance 17 16 Object 32 bit integer Pixel 32bit integer Template 32bit integer Gradient 32bit integer OCR 32 bit integer Same as window 1 Same as window 1 Same as window 1 Same as window 1 Same as window 1 Same as window 1 Same as window 1 Chapter 7 Communications 7 15 Results Blocks for OCR Windows continued Backplane Toolset Toolset 1 2 Table 7 D Bit Defi
39. the search window You should use the search window as the shift compensation tool of first choice when shift compensation is required for your OCR application since the search window does not require that the character string be consistently aligned with an edge or feature in the image Chapter 4 Configuring OCR Windows Using the Search Window continued 4 43 Can you use both a reference tool and a search window with an OCR window You can use the search window to provide shift compensa tion along with a reference tool s shift compensation Note that if you also assign a reference tool to the OCR window and you also use the search window the reference tool shift compensation is applied to the search window If you use the reference tool and no search window shift compensation from the reference tool is applied directly to the OCR string window How do you set up the search window You first enable the search window for the OCR window you are configuring Then you place the search window over the desired area on the monitor screen using the pick amp place function much like any other window You then pick the Learn box and the search window learns the positions of features detected within its borders it ignores anything that touches or crosses its borders How do you place the search window Generally you should remember these points when picking amp placing the search window The search w
40. the string window The number of character windows allocated with Pack disabled is equal to the number shown in the Max Chars box The advantage of setting Pack to disabled is this With Pack disabled there is one character window for each character this means you can set the threshold for each individual character inspected This is desirable if the lighting intensity varies from character to character as may be the case if you are inspecting characters on a round object With Pack enabled the CVIM allocates one character window for each group of up to four characters in the string window to be inspected The advantage of setting Pack to enabled is that you will use less windows than if Pack is disabled unless you are inspecting a single character With Pack enabled you can set the thresholds for the groups of characters in the individual character windows Comments When you pick the Pack box the setting toggles between Enabled and Disabled Font Other Search Mode ee Read Numbers Letters eee Max Chars 16 eee Pack box Pack Enabled Reconnect Disabled Char Width Auto P amp P Char Width Diagnostics Define Window Chapter 4 Configuring OCR Windows 4 37 Setting the Pack Function Note If you set Pack to Disabled and there are not continued enough windows available for character window allocations this message appears on the screen ERROR There are not enough charac
41. the two hooks making up a 3 Loops are parts of a character which completely encircle an area such as the top of a 9 or the two loops making up a B ute markings Example of aB with a break For example notice the extra print in the top hook of the 3 illustrated above With the hook filled in the 3 is no longer recognizable Notice also the extra print connecting the hook of the 9 so that the character has two loops and begins to resemble an 8 The break in the B may make it unrecognizable Character appearance defects such as these can hinder correct identification of characters Thus maintenance of character quality is important for enabling successful character recognition Note The OCR PAK includes a reconnect function which when enabled allows the OCR window to overlook small breaks in characters 2 8 Chapter 2 Application Considerations and Requirements Window Usage When you select and configure a window for OCR the CVIM automatically allocates additional windows to support the inspection Thus for each character string inspected two types of window are created String window This is the window you select place over the character string to be inspected and configure for OCR operation Note You can inspect a character string up to 16 characters in length Typical String Window Character Windows These are windows automatically selected and placed by the CVIM to support the string windo
42. 5 If you pick the Next box again you will see that window 12 is enabled and placed over the second character Window 13 gt ABCDE12345 If you pick the Next box again you will see that window 13 is enabled and placed over the third character and so on through window 20 Each of the 10 characters is now assigned a character window Now suppose you set the Max Chars box to 8 then pick the Learn box If you then pick the Next box repeatedly you will see that window 11 has automatically been placed over the first character window 12 has been placed over the second character and so on through window 18 However since Max Chars is set to 8 no windows are placed over the last two characters 4 and 5 Now suppose you set the Max Chars box to 12 then pick the Learn box If you then pick the Next box repeatedly you will see that windows 11 20 have all been enabled and that character windows have been placed over all 10 characters You will see that windows 21 and 22 have been allocated but are disabled the Window box for each reads Disabled in dark letters Windows 21 and 22 are automatically enabled and used for character windows if and when 12 characters appear in the string window Chapter 4 Configuring OCR Windows 4 40 Setting the Pack Function Note on Tool Display continued You can configure the CVIM with the Tool Display set to On so that all the enabled tools are visible during setup For OC
43. B ALLEN BRADLEY Bulletin 5370 CVIM OCR PAK Option Catalog Number 5370 OCR User Manual 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 Allen Bradley Company is prohibited 01991 Allen Bradley Company Table of
44. Briefly with packing enabled each character window used is assigned to a group of up to four characters with packing disabled one character window is assigned to each individual character in the string Recall that there are 24 windowsin all per tool set The CVIM module only allocates windows with higher numbers than the string window as character windows Thus for example if a string window requires six character windows the highest numbered window you can select for the string window is 18 in that case the CVIM module would then use windows 19 24 for character windows Note You cannot use window 24 for an OCR string window since there are no higher numbered windows available Note The OCR PAK option does not allocate a disabled window which is set for OCR operation when allocating character windows Each character window when allocated is automatically enabled or disabled as required the Window box on the Window menu will read Enabled or Disabled in dark lettering indicating that you cannot change the parameter in the box You cannot disable or enable individual character windows you can only disable or enable the associated string window Once you have decided which window to use as a string window select and enable the window Your Action Comments Pick the Next or Previous box on the Window menu to select the desired window Define Window eee Range Reference eee Window 1 Disabled
45. High Fraction Not applicable for OCR windows Warning Range Low Integer Not applicable for OCR windows Warning Range Low Fraction o 3 gt Refer to the CVIM Communications Manual for Pyramid Integrator long word descriptions Chapter 7 Communications Results Blocks for OCR Windows 7 13 The results blocks for the CVIM module inspection windows are described in the tables in Appendix C of the CVIM Communications Manual Table 7 C and 7 D update the window results blocks to include the result information for OCR windows Note Decimal points or international in the match strings or in OCR window results are transmitted as ASCII period or comma respectively Note the following with regard to OCR window results For string windows the results value listed for that window represents the number of characters recognized in the string characters not recognized are not counted For example if window 8 a string window successfully reads the eight characters AB C D E F G H the result for window 8 would be 00 00 00 08 For character windows the results value is a listing of ASCII codes for the characters recognized by that character window Each character requires 8 bits the 32 bit result can list from one to four characters If packing is disabled one character is listed per result if packing is enabled one to four characters are listed per window result For example
46. LMNOPQRSTUVWXYZ 0123456789 Helvetica ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 Chapter Configuring OCR Windows 4 4 13 Defining the Search Mode The Search Mode menu allows you to select a number of parameters which govern the way the CVIM searches for characters within the string window Access the Search Mode menu by picking the Search Mode box Your Action Comments PicktheSearch Mode boxon Picking the Search Mode box displays the Search Mode the Define Char String menu menu as illustrated below P ape Search Mode Menu PBA AP 3 Background Light Searen Mode td I Val AE TAN Orientation Horizontal S Background box Read Numbers Letters eee h Mod Direction Top to Bottom seals oe Max Chars 16 coo P box Mirror Disabled Pack Enabled Define Window coo g ct Output Reference coo Learn Nominal End Chars Disabled Window 1 Enabled Selecting Background Pick the Background boxon Picking the Background box toggles the entry between the Search Mode menu to Light and Dark Select Background Light to inspect dark change the setting if characters on a light background Select Background Dark appropriate to inspect light characters on a dark background Window placed over dark charactersona A 4 l light background T foo Window placed over light characters ona dark background 4 14 Defining the Search Mode continued
47. R windows this means that the search window if used string windows and the associated character windows are visible at the same time To set the Tools Display to On Your Action Comments Pick the Env box When you pick the Env box the Environment menu appears on the Main menu Pick the System box When you pick the System box the System menu appears on the Env menu Pick the Tool Display box When you pick the Tool Display box the box toggles between on the System menu Onand Off RS 232 Standby Off CFG Host Stand Alone SYS Host Stand Alone Tool Display On lt 4 Tool Display box Monitor Color Units Pixels Tool Set For example in the diagram shown below window 11 a character window associated with string window 10 is selected With Tools Display set to On window 11 is highlighted while the associated string window and the other character windows are outlined Define Window Output Reference Nominal ABCD Window 11 Enabled Learn Window 11 Previous Chapter 4 Configuring OCR Windows 4 41 Setting the Pack Function Adjusting Character Window Thresholds continued Recall that when you set the threshold for the string window you are also setting the threshold for all the associated character windows The OCR PAK option allows you to set the threshold of individual character windows as well Note that with Pack set to Disabled so that a character w
48. Reconnect function is intended for use then in applications where small breaks in characters are in evidence To enable the Reconnect function pick the Reconnect box on the Define Char String menu Comments Picking the Reconnect box toggles the setting between Disabled and Enabled Font Other Search Mode eee Read Numbers Letters eee Max Chars 16 TIL Pack Enabled Define Char String menu Reconnect Disabled 4 Reconnect box Char Width Auto P amp P Char Width Diagnostics Define Window Define Char String Define Char String box Output Reference Chapter 5 OCR Adjustment Features Using Char Width The OCR PAK option provides a function which allows you to set the width for inspection of characters This character width function is intended to be of use in situations where characters in an inspected string appear to be connected though they are properly spaced otherwise Example of connected characters the W and T characters would not ordinarily be recognized Ordinarily characters which appear to be connected in the OCR window during inspection are not recognized as separate characters the connected characters are regarded by the OCR window asa single unrecognizable character However setting the character width can enable the OCR window to separate joined characters and to individually recognize each character To set the character width
49. Width Diagnostics Define Window Output Reference Learn Nominal WTL lt 4 Learn box Window 1 Enabled Previous Chapter 5 OCR Adjustment Features 5 7 Using Diagnostics The Diagnostics box on the Define Char String menu leads to the Diagnostics menu which features two diagnostic functions Disp Chars and Show Matrix To access the diagnostics functions pick the Diagnostics box on the Define Char String menu Your Action Comments Pick the Diagnostics box to Picking the Diagnostics box on the Define Char String menu display the Diagnostics menu opens the Diagnostics menu Diagnostics menu Font Other Search Mode eee Read Numbers Letters eee Max Chars 16 eo Pack Enabled Reconnect Disabled Char Width Auto P amp P Char Width soo lt Diagnostics box Define Window soo Disp Chars Disabled Show Matrix Disabled tri Output Reference soo Learn Nominal lt q Learn box ABC123 To use either of the diagnostics functions you must first configure the other OCR window parameters as appropriate and have a character string placed in the OCR string window Then you set either the Disp Chars box to Enabled or the Show Matrix box to Enabled you can only enable one diagnostic function at a time Then you pick the Learn box on the Window menu The two diagnostic functions are discussed in the following two sectio
50. Z 0123456789 Italicized fonts ABCDEFGHIJKLMNOPQRS TUVWXYZ 0123456789 Fonts whose characters have different stroke widths Any fonts generated by a dot matrix printer Valid Characters The valid characters those which are recognizable by the OCR window for each font style include Upper case alphabet A Z e Digits 0 9 e Slash decimal point or international and space Space Character A space character is defined as a blank area between two Restrictions characters in a character string These restrictions apply to the space character Spaces are not recognized before the first character and after the last character The blank area between two characters is recognized asa single space character regardless of the width of the blank area Decimal Point Character The OCR window recognizes either a or international Restrictions as a decimal point with these restrictions Decimal points are only recognized between two numerals A decimal point appearing between letters is interpreted as a space A decimal point appearing at the beginning or end of a string is ignored Only one decimal point is recognized per character string Additional decimal points are interpreted as spaces Chapter 2 Application Considerations and Requirements Types of Operation Read Operations Match Operations 2 3 You can configure the OCR window to perform either of two basic types of operation read or mat
51. acters are not recognized or not matched The window statistics byte allocations are listed in Appendix C of the CVIM Communications Manual Note this addition to the listing Minimum and Maximum values for Window OCR are stored as 32 bit integers See Statistics Display in Chapter 6 for further descriptions and examples of the OCR window statistics Index Section Page A Acquiring an Image sos Soest ea tia tet ka 4 1 Additional Features 0 00 cece eee eee eee 2 9 Adjusting Character Window Thresholds 4 41 Adjusting the Threshold o naa sts eee es 4 9 Adjustment Features OCR 5 1 USING PAP AA ewes SU 5 2 Adjustments OCR Overview 5 1 When to USE 2804 paaa A GN anes eadersed oy 5 1 Alignment Character 0 aaa BANI BNG AN ERA GAN 2 4 Ambiguities Character ca sasa PANA ANA 2 6 Analysis Function Using a 4 51 Appearance Requirements Character 2 4 Application Considerations and Requirements 2 1 ASCI Commands 452 ALA DATA 7 4 Assigning an Output Line a 4 49 Assigning the Reference Tool 4 48 Audience Intended 0 eee c cece eee ee 1 2 B Background Contrast lt c c224d2 2 e4teda dn UNANG 2 6 Background Selecting a 4 13 Backplane Pyramid Integrator Using 7 9 Backplane USING aasa a Aa ey KAN A ee on 7 9 Block 1 Results Numerical Results Data
52. an Naga GUAN NI LG DINA 2 2 Valid Characters for the Match String 4 24 W When to Use OCR Adjustments 4 5 1 Wild Card Characters 0 0 4 24 Window Usage 24 052 soe aseodd i siceeunes denen 2 8 pA CT A ROCKWELL INTERNATIONAL COMPANY With offices in major cities worldwide WORLD HEADQUARTERS EUROPE MIDDLE EAST ASIA PACIFIC HEADQUARTERS CANADA HEADQUARTERS LATIN AMERICA Allen Bradley AFRICA HEADQUARTERS Allen Bradley Hong Kong Limited Allen Bradley Canada Limited HEADQUARTERS 1201 South Second Street Allen Bradley Europe B V Room 1006 Block B Sea View Estate 135 Dundas Street Allen Bradley Milwaukee WI 53204 USA Amsterdamseweg 15 2 8 Watson Road Cambridge Ontario NIR 5X1 1201 South Second Street Tel 1 414 382 2000 1422 AC Uithoorn Hong Kong Canada Milwaukee WI 53204 USA Telex 43 11 016 The Netherlands Tel 852 887 4788 Tel 1 519 623 1810 Tel 1 414 382 2000 FAX 1 414 382 4444 Tel 31 2975 43500 Telex 780 64347 Telex 069 59317 Telex 43 11 016 Telex 844 18042 FAX 852 510 9436 FAX 1 519 623 8930 FAX 1 414 382 2400 FAX 31 2975 60222 lt a Catalog No 5370 ND007 Series A 40062 200 01 a ERO 1991 Allen Bradley Company inc
53. arn box to display meaningful results during setup of the OCR window you will have to appropriately set at least these three Define Char String menu items Font Search Mode Read These three parameters are discussed in three sections that immediately follow after that the Learn box and the remaining parameters are discussed Chapter 4 Configuring OCR Windows 4 12 Selecting the Font The Font box allows you to select one of two font choices ANSI or Other Select ANSI if you are inspecting ANSI also called OCR A characters otherwise select Other Note If you select Other recall that as discussed in Chapter 2 there are restrictions to the styles of font that the OCR windows can consistently recognize Make sure your font style conforms to these restrictions Your Action Comments If appropriate pick the Font Picking the Font box toggles the Font selection between box on the Define Char String ANSI and Other menu to change the Font Pick the desired Style on the Font menu Font box P Font Other Search Mode c00 Read Numbers Letters eee Max Chars 16 eee Pack Enabled Reconnect Disabled Char Width Auto P amp P Char Width Diagnostics ANSI This is the ANSI American National Standards Institute or OCR A font ABCDEFGHIJKLMNOPQRSTUVUXYZ 01234567489 Other Below are two examples of fonts that are recognizable when Other is selected Modern ABCDEFGHIJK
54. ce With Letters Numbers selected the OCR window attempts to identify each character in the window as a letter first Then if any characters are not clearly recognized as letters the OCR window attempts to identify them as numbers In some cases numbers might be misread and identified as letters for example the number 1 might be identified as the letter T Numbers Letters Select Numbers Letters if both numbers and letters will be read in your application with letters being the first identification choice With Numbers Letters selected the OCR window attempts to identify each character in the window as a number first Then if any characters are not clearly recognized as numbers the OCR window attempts to identify them as letters In some cases letters might be misread and identified as numbers for example the letter S might be identified as the number 5 e Match String Select Match String in order to have the OCR window perform a match operation With Match String selected you must define the content of the match string see the next section Defining the Match String During CVIM operation with Match String selected the OCR window determines whether each character in the inspected character string matches the corresponding character in the match string Note After selecting the mode if you have the string window placed over a sample character string you can use the Learn box to
55. ch When configured for read operations the OCR window reads character strings and reports the characters recognized The window passes inspection if all characters are recognized and fails if any of the characters is not recognized Read operations are typically used to identify what is being inspected When you configure an OCR window for match operation you define a match string The OCR window reads character strings in order to verify a match with the match string The window passes inspection if all characters match and fails if any of the characters in the inspected string do not match the corresponding character s in the match string Match operations are typically used to verify what is being inspected You can use certain wild card characters in your match string these wild card characters have special usage Accepts any number from 0 9 as a match Accepts any letter from A Z as a match Accepts any valid character as a match Q Accepts any detected marking as a match Chapter 2 Application Considerations and Requirements 2 4 Character Appearance This section describes the appearance requirements which Requirements must be met for valid characters to be recognized in addition to meeting font style requirements Character Orientation The OCR window can be configured to inspect character and Direction strings having either a vertical or horizontal orientation in the field of vi
56. disabled the lettering is dark unless Match String is selected for the Mode These four boxes are used only when Match String is selected for the Mode lt q Read Menu Mode Numbers Letters eee amp Mode Box Search Mode ooe Max Chars 16 eee Pack Enabled Define Window eee arstring CT Strict Control Enabled Filter Disabled Pad Read Box Learn Match String String Output Reference ecco Learn Nominal Window 1 Enabled Chapter 4 Configuring OCR Windows 4 19 Selecting the Read Mode To change the Mode box setting pick the Mode box to continued access the Mode menu Your Action Pick the Mode boxon Picking the Mode box displays the Mode menu the Match Mode menu Font Other Search Mode lode Nu Strict Control Enabled 4 Filter Disabled 4 Mode Box Learn Match String 4 Mode Menu P amp P Char Width Letters Numbers OiMatch String Pick the box on the Mode Pick the appropriate item on the Mode menu for your menu to select theitem application When you pick an item on the Mode menu which is appropriate the box for that item turns dark and the selected item for your application appears in the Mode box Diagnostics Choosing the Mode There are two modes of operation that the OCR window can perform either a read or a match operation Read Ifyo
57. e Disp Chars Displays the appearance of the inspected characters as seen by the CVIM Show Matrix Displays the mathematical coding of an inspected character as stored by the CVIM Important The OCR adjustment features described in this chapter are intended to help improve the performance of the OCR operation particularly in situations of diminished character quality as described for each OCR adjustment feature It is up to the user to apply the appropriate OCR adjustment feature s for the application and to review and assess the resulting performance of the OCR operation When to Use The OCR adjustment features are intended for use only OCR Adjustments after initial setup and trial run of your OCR configuration If upon completion of a trial run you do not obtain the intended results you should first address any possible configuration adjustment requirements such as window placement thresholding Read Mode setting and so forth Chapter 5 OCR Adjustment Features 5 2 When to Use Then after optimizing your configuration if it is determined OCR Adjustments that you cannot successfully recognize characters due to continued diminished character quality and not due to inadequate configuration you should apply the OCR adjustment features as appropriate for your situation Using the To use the OCR adjustment features you must access the OCR Adjustment Define Char String menu Features Your Action Comment
58. e listed in green An unrecognized or non matching character is displayed as a red The Faults column displays the accumulated number of window failures for each window For any inspection in which a particular character window fails that is when a appears in the listed string the Faults count for that character window is incremented For any inspection in which at least one character windows fails the Faults count for the string window is incremented Chapter 6 Runtime Displays 6 3 Statistics Display As with any tool or probe the OCR window statistics can be displayed during runtime by picking the Stat1 Page box on the Display menu The Stat1 Page statistics are based on the accumulated results for the inspections sampled For OCR windows these results are as follows e For the string window the result or reading is the number of characters recognized or matched in the inspected string This can range from 0 to the maximum number of characters as set in the Max Chars box e For each character window the result or reading is always either a 1 if all characters in that window are recognized or matched or a O if any of the characters are not recognized or do not match For example suppose you are reading a six character string with window 1 You have Pack set to Disabled and Max Chars set to 6 so windows 2 through 7 are allocated as character windows A typical Stat1 Page displayi
59. ed from its original position in the image Refer to the CVIM User s Manual for information on the registration functions Note To use Registration you must be using the search window and or a reference line or a reference window assigned to the OCR window Snap amp Register Continuous 5 amp R Register to Image Learn Registration Tool Display Config Results Archival Snapshot Analysis Chapter OCR Adjustment Features Chapter Objective The objectives of this chapter are to describe the OCR adjustment features and to describe how and when to use them Overview The OCR PAK option is designed for applications which OCR Adjustment meet certain requirements for character print quality as set forth in Chapter 2 Application Considerations and Requirements That is in order for an OCR window to work successfully the characters to be recognized should meet spacing contrast and other appearance requirements In some cases through the use of one or more of the OCR adjustment features it may be possible to accommodate print quality shortcomings and recognize characters which do not fully meet print quality recommendations The OCR adjustment features are Reconnect Helps the OCR window to overlook small breaks in the strokes of characters e Char Width Helps the OCR window to separate and recognize characters connected by ink overflow Two diagnostic features also discussed in this chapter ar
60. els in width There must be space ny asd between characters Character Rotation The OCR windows can tolerate up to 5 degrees of rotation of character strings or of individual characters from their original vertical or horizontal orientation E k lt 5 The 5 degrees of character rotation is acceptable so long as All characters remain within the borders of the OCR window during inspection Part of the F is rotated All characters out of window so the F remain in window will not be recognized Characters do not overlap That is there must be space between the areas occupied by each character There is space between the areas occupied by each of The areas occupied by the E and T overlap so they will not be the characters recognized Chapter 2 Application Considerations and Requirements Character Background Contrast Character Ambiguities The contrast between the inspected characters and the surrounding background must be great enough so that when configuring the OCR window a threshold can be set to effectively distinguish the inspected characters from the background There are several characters from the valid character set which can be confused by OCR systems Certain numbers can be misread as letters and certain letters can be misread as numbers especially if the print quality of the inspected characters degrades These ambiguous number letter pairs are
61. ements Font Other Search Mode Read Match String 1 Mode Numbers Letters soo Strict Control Enabled Filter Disabled 4 Filter box Learn Match String Max Chars 16 Pack Enabled String Reconnect Disabled Chapter 4 Configuring OCR Windows 4 27 Using the Learn Function You can use the Learn box to display the results of the OCR window inspection during set up as with other windows In the case of OCR windows picking the Learn box displays characters as recognized by the OCR window Pick the Learn box after you have configured an OCR window to get feedback which can help you determine whether the window as configured provides the desired inspection results or whether adjustments to configuration staging etc are necessary Font Other Search Mode eee Read Numbers Letters 500 Max Chars 16 coo Pack Enabled Reconnect Disabled Char Width Auto P amp P Char Width Diagnostics Define Window Output Reference Learn Nominal Learn box ABCD12 Window 1 Enabled Previous Next Camera A Ref Line Ref Win Window misc Exit When you pick the Learn box Characters are displayed as recognized The is displayed for each character not recognized The number 0 zero is displayed in the Learn box with a slash through it to distinguish it from the letter O 4 28 Chapter 4 Configuring OCR Windows Using the Learn Function
62. esholds in Chapter 4 Chapter 5 OCR Adjustment Features 5 10 Using Diagnostics Using Show Matrix continued The Show Matrix function used in conjunction with the Learn box displays the matrix of an inspected character in a window on the monitor screen This matrix is a set of 16 numerical expressions which represent the character and are stored in CVIM memory The Show Matrix function is intended for use if and when your OCR window cannot recognize a particular character because of its particular shape or appearance despite your having adjusted other factors such as lighting window position window threshold etc If all else fails you can use the Show Matrix function to obtain the character s matrix Then you can submit the matrix numbers to your local Allen Bradley representative for application assistance To use the Show Matrix function first configure the other OCR window parameters as appropriate Then place the OCR string window over the specific character in the character string for which you want a matrix Then set the Show Matrix box to Enabled and pick the Learn box For example suppose you want to use the Show Matrix function to obtain the matrix for the B in the character string ABC 1 2 3 shown below Follow these steps Your Action Comments Pick the Show Matrix box to Picking the Show Matrix box on the Define Char String menu change the setting to Enabled toggles the setting from Disabled to
63. ew In the case of vertically oriented strings you select direction either bottom to top or top to bottom l l Non recognizable Vertical string with Vertical string with orientation bottom to top top to bottom Na FE direction Ng Horizontal direction string Note that for the example on the right you cannot inspect the string with the window positioned as shown You could inspect the three characters by using three OCR windows with one window over each of the characters Character Height Height of characters as they appear on the monitor during setup must be between 11 and 127 pixels Note The optimal height range is 16 32 pixels for maximum speed The height range for optimal reliability is 32 64 pixels Note that the character size can vary so long as all characters are within height range Characters of different height are recognizable Character Alignment Characters do not have to appear in strict linear alignment so long as characters are not completely out of alignment with at least one other character in the string A B and C characters are recognizable vertical alignment of each character overlaps at least one other in the string C character is out of line with the A and B characters the string ABC will not be correctly identified Chapter 2 Application Considerations and Requirements 2 5 Character Spacing Characters must be separated by blank space of at least 3 pix
64. g the Read setting and defining the Search Mode Optional Use the Learn function to check the results of your configuration to this point Determine the number of windows allocated for the inspection by setting the maximum characters and by setting the pack function Optional Use the Learn function and the Next box to check the windows allocated Enable and place the search window if used The search window is a shift compensation feature that is part of the OCR option package and works exclusively with OCR windows Assign a reference tool if appropriate e Select discrete outputs for the OCR window if used Before you configure windows for OCR operation you should first acquire an image which includes the characters to be inspected Note Refer to the CVIM User Manual for general information on staging and on acquiring an image After you have acquired an image for OCR setup you can begin to configure a window for OCR This section discusses the initial steps of window setup selecting and enabling a window selecting OCR for the operation type placing the window and setting an initial threshold level Chapter 4 Configuring OCR Windows 4 2 Initial Setup of the To begin configuring an inspection window for OCR OCR Window operation first access the Window menu continued Your Action Comments Pick the Window box onthe When you pick the Window box the Window menu appears Main menu Learn
65. haracter windows then windows 6 7 and 8 must be available for use as character windows that is they must be disabled and not have OCR selected as the window operation Listed below are additional features of the OCR windows e Light Dark Background You can configure the OCR window to look for either light characters on a dark background or dark characters on a light background e Mirror You can configure the OCR window to recognize a mirrored image of inspected characters Search Window The OCR PAK option provides a shift compensation feature called a search window which works exclusively with the OCR windows e Individual Character Thresholding You can set the threshold for each character window With packing disabled a character window is assigned to each character so you can set the threshold for each character e Automatic Character Reconnect You can configure the OCR window to overlook small breaks in the strokes of characters which would ordinarily result in a character not being recognized e Manual Character Width Setting You can set a limit for character width which allows the OCR window to separate and recognize connected characters which would ordinarily not be recognized Chapter 3 Installing the OCR PAK Option Chapter The objective of this chapter is to describe how to install Objectives the OCR PAK option in the Allen Bradley 5370 CVIM machine vision system Installing the The OCR
66. if used during runtime refer to the CVIM User s Manual for more information regarding the runtime displays A typical case of a string window and its search window as displayed during runtime is shown below Listing of Search Window p gt recognized characters ABC12 Sting gt a ABC123 Inspected string C Image 0 Failed Jovo 0 Result 0 Stat 1 0 stat 2 F Only Tools Page Page Page Page Note that the displayed string window includes in the upper left corner a listing of the character string as recognized by the string window If the window is defined for a read operation any character that is not recognizable is displayed as a red in the character display If the window is defined for a match operation any character that does not match the corresponding character in the match string is displayed as a red in the character display The colors of the displayed windows have special meaning The string window and search window if used are displayed in green if the inspection is a success If the string window is red this indicates the inspection has failed If the search window is green and the string window shifts to the middle of the search window with no character display listing and is red this means the search window has shifted the OCR window partially off the screen If the search window is red this can indicate that the reference tool assigned to the OCR window fa
67. iled or shifted the search window partially off screen Or else it can indicate that no features are recognized as being located in the search window 6 2 Chapter 6 Runtime Displays Results Display TRIGGERS Accepted Missed Total As with any window the OCR window results can be displayed during runtime by picking the Result Page box on the Display menu The window results for OCR windows are listed under only two columns the Faults column and the Reading column Range results do not apply to OCR windows so the range result columns Fail Low Warn Low Warn Hi and Fail Hi are blank Suppose you are inspecting a six character string with window 1 You have Pack set to Disabled and Max Chars set to 6 so windows 2 through 7 are allocated as character windows A typical result page displaying OCR window results is shown below FAULTS Reference Lines Windows 35 Master Fault 2 0 Light Probe 35 WINDOW Faults Fail Low Warn Low Reading Warn Hi Fail Hi ABC12 A spia p O Image O Failed g Al g vo Only Tools Tools Page O stat 1 0 stat 2 Page Page In the above Results Page display the Reading column lists the current characters read by the corresponding windows Hence for window 1 the string window all the characters of the inspected string are listed For windows 2 through 7 the individual characters are listed Recognized and matching characters ar
68. indow analyzes every item within its border for shift Therefore it is best to include in the search window only the features that shift in the same amount and direction as the inspected character string This may mean that you only include the character string itself in the search window The rest of the search window area should be blank both during setup and during operation The search window does not regard any feature which touches its border as being in the search window When placing the search window during setup then you can allow the search window to overlap features that do not shift so long as they are touching the borders This also means that if any feature that is fully in the search window during setup touches the border during operation that feature will be ignored by the search window This may cause a shift compensation to be applied that is not directly in accordance with the actual feature shift This could cause the window inspection to fail Chapter 4 Configuring OCR Windows 4 44 Using the Search Window Use the following steps to enable and place the search continued window these steps assume the Op box is already set to OCR on the Define Window menu Your Action Comments Pick the Define Window box Picking the Define Window box displays the Define Window on the Window menu to access menu the Define Window menu Pick the Search Win box Picking the Search Win box toggles the setting betwee
69. indow is assigned to each character you can adjust the threshold for specific individual characters in the inspected string as shown below This is useful for example when the lighting varies from character to character such as might happen when inspecting characters on a round bottle To adjust the threshold of a specific character window you simply select the character window you want to adjust using the Next or Previous box then follow the same procedure described for the string window see Adjusting the Threshold in this chapter Shape Rectangle soo IBCDE12345 in eco ooo P amp P Process Win P amp P Search Win Range Reference eee A OoOr orevwnNmaArta Learn Nominal Previous Note After you set the threshold level of a character window its setting will revert back to the string window s threshold setting if you Enable or disable the Pack function e Adjust the threshold level of the string window Select the P amp P Process Win box 4 42 Using the Search Window Chapter 4 Configuring OCR Windows This section discusses the search window function of the OCR PAK option This section begins with some questions and answers in order to introduce the search window What is the search window The search window is a type of shift compensation tool that is available for use exclusively with OCR windows Recall that the CVIM has other shift compensation tools
70. inued 7 3 Note If the match string you send is not a valid match string the CVIM module will not accept the new match string and will set the Configuration Fault discrete bit Shown below is an example of a block transfer write with the associated data file block The data file block shows file N7 20 containing the match string ABCD123 The match string characters are hexadecimally encoded ASCI Note Decimal points or international in the match strings or in OCR window results when using match strings are transmitted as ASCII period or comma respectively Decimal points or international in non match string OCR window results are transmitted as ASCII period saa alah ci areca oe a NA eect 4 BLOCK TRNSFR WRITE EEA AB CD a NN N7 20 N7 30 N7 40 N7 50 N7 60 4142 00 00 00 00 00 00 00 00 43 44 00 00 00 00 00 00 00 00 Rack 2 Group Qi Module 01 Control Block N7 110 Data File N7 20 Length 0 I i 1 i Continuous N 1 3 null NG File Block 3132 3300 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 7 4 Using the RS 232 Port ASCII Commands Chapter 7 Communications If you use the RS 232 port to communicate with the CVIM and use OCR windows some addi
71. ion windows which provides a new capability optical character recognition OCR You configure windows for OCR using the light pen and monitor interface When the OCR PAK option is installed in the CVIM module OCR is listed as an option in the Window Operations menu Define Window gt Menu Shape Rectangle eee Mask No Mask coo P amp P Process Win 606 P amp P Mask Win coo Threshold Filter coo Range Reference 680 Learn Nominal Window 1 Enabled Previous ne En camera Ret Line Rot Win The OCR window operation can be used in either of two ways to read alphanumeric characters numbers letters and or other characters or to verify a match of a user defined character string group of characters OCR option The remainder of this chapter further discusses the key capabilities requirements and restrictions concerning the use of OCR windows 2 2 Chapter 2 Application Considerations and Requirements Font Styles Setup of the OCR window for inspections does not require that you teach or train the CVIM to recognize your character set Instead you select a font style the term font refers to the characteristic appearance of the characters OCR windows do not recognize characters of all font styles recognizable font styles are illustrated in Chapter 4 Font styles not supported include Fonts with serifs ABCDEFGHIJKLMNOPQRSTUVWXY
72. itional type of block transfer write becomes available which allows you to set the match string for string windows which are configured for a match operation Note To use this command the selected CVIM host must be Remote O Set Match String To set a new match string in an OCR string window refer to Table 7 A Set the appropriate Toolset Request bit either bit 04 or 05 in word 23 in Table 7 A to specify toolset 1 or 2 Set the three Block Transfer Type bits bits 02 01 and 00 in word 23 in Table 7 A to 110 to specify set match string Use the eight Block Transfer Block Number bits bits 17 to 10 in word 23 in Table 7 A to designate the string window number for which you are setting a match string For example set bits 10 and 11 to select window 3 Execute the block transfer write command including the hexadecimally encoded ASCII characters representing the new match string followed by a null terminator in the block see example on page 7 3 Note If the match string you are setting includes letters use upper case letters only Chapter 7 Communications 7 2 Using the Remote HO Link continued Table 7 A 17 Reserved 1 Enable JMB Forces 1 Credit Card Config 8 s bit Not Used 1 Block Trnsfer Block No 128 s bit 1 Force JMB Output 8 ON Not Used 1 Force JMB Output 8 OFF Not Used 1 Reset Counters Not Used Not Used
73. keyboard all the alphabet characters shift to lower case and alternate characters appear on the top line as well as on some of the other keys Note also that on the lowercase keyboard there are two T keys in the lower left and right corners of the keyboard Picking either of the two keys in the lower left and right corners of the lowercase keyboard returns the original or uppercase keyboard to the screen 4 24 Chapter 4 Configuring OCR Windows Defining the Match String continued Valid Characters for the Match String Some characters on the keyboards are not valid for the match operation Restrict your match string entry to valid characters and or wild card characters only If you enter an invalid match string this message will be displayed ERROR Illegal Match String Valid characters are listed below All upper case letters A Z Digits 0 9 The slash character Decimal point either or international Note Decimal points are valid only when positioned between two digits Also only one decimal point is allowed per inspected string Space Note In order to use a space character you should have at least three non space characters in the match string an exception is if you manually set the character width in which case the OCR window could detect spaces with two non space characters in the string see Using Char Width in Chapter 5 Note that you cannot place two or more
74. l set the Configuration Fault discrete bit Chapter 7 Communications DF1 Commands This section discusses three DF1 protocol commands which can transfer information involving OCR windows e Read Results Read Results OCR e Set Match String e 3 Note Decimal points or international in the match strings or in OCR window results when using match strings are transmitted as ASCII period or comma respectively Decimal points or international in non match string OCR window results are transmitted as ASCII period Read Results This is the same command as the DF1 Read Results Command in Chapter 5 of the CVIM Communications Manual Use this command to read a specific OCR string window result from the last inspection The result returned is the character string read by the window Command Format Where 07 the read result command n Times H repeat number high byte n Times L repeat number low byte x tool set number where 04 tool set 1 05 tool set 2 17 window z window number For example Suppose window 1 of toolset 1 is a string window and the recognized string is 12 3 4 This DF1 command DLE STX 07 00 01 04 17 01 DLE ETX BCC will return the hexadecimally encoded ASCII characters of the string terminated by the null character 00 DLE STX 31 32 33 34 00 DLE ETX BCC Chapter 7 Communications DF1 Commands continued 7 7
75. list the ASCII command in the External Data Table Address field of the message block to perform the desired function Note Decimal points or international in the match strings or in OCR results when using match strings are transmitted as ASCII period or comma respectively Decimal points or international in non match string OCR window fede are transmitted as ASCII period The example below shows a typical message block with an ASCII command in the External Data Table Address field CONTROL BLOCK 0MSG0 0 F1 Requested Size element 0 F2 Priority HIGH F3 Local Remote LOCAL F4 Local Link Type DH F5 Remote Link type N A F6 Station ID Node 0 F7 Module ID Class CVIM Tw z1 Port 1 F8 Communication Command TYPED READ F9 Internal Data Table Addr 019 0 F10 External Data Table Addr gt RR TS2W 1 The Set Match String command is a special case and is described on the next page 7 10 Using Message Mail continued Chapter 7 Communications Set Match String Use this command to set the match string for a string window which is configured for a match operation Note To use this command the selected CVIM host must be Pyramid Command Format SSM TSnWd where n Tool set number d Window number To use this command you must 1 list the ASCII command in the External Data Table Address field and 2 list the match string in hexadeci
76. mally encoded ASCII using a null 00 to terminate the string at the specified Internal Data Table Address For example Suppose window 9 of tool set 1 is a string window set for match string operation You have listed the match string 31 32 33 34 35 36 00 hexadecimally encoded ASCII for 12345 6 null at the specified Internal Data Table Address 0L9 0 in the example The following control block will set the match string of window 9 to123456 CONTROL BLOCK OMSG0 0 F1 Requested Size element 0 F2 Priority HIGH F3 Local Remote LOCAL F4 Local Link Type DH F5 Remote Link type N A F6 Station ID Node 0 F7 Module ID Class CVIM Tw 1 Port 1 F8 Communication Command TYPED READ F9 Internal Data Table Addr 019 0 F10 External Data Table Addr SSM TS1W9 Note If the match string you are setting includes letters use upper case letters only Note If the match string you send is not a valid match string the CVIM module will not accept the new match string and will set the Configuration Fault discrete bit Chapter 7 Communications 7 11 Configuration Blocks The configuration blocks for the CVIM module inspection for OCR Windows windows are described in tables in Appendix D of the CVIM Communications Manual Table 7 B updates the window configuration blocks to include the configuration information for OCR windows for both tool sets 1 and 2 Table 7 B Configuration Blocks 42 65 Windows 1 24 T
77. n to enable the search window Disabled and Enabled With the Search Win box set to Enabled the search window is displayed on the screen Pick the P amp P Search Window Picking the P amp P Search Window box displays the handles box on the Define Window on the window the menu 4 OCR string window Shape Rectangle Search Win box Search Win Enabled P amp P Process Win Handle a a P amp P Search Win box Threshold Filter Output Reference Learn Nominal Search Window Window 1 Enabled Previous Env CameraA Chapter 4 Configuring OCR Windows 4 45 Using the Search Window continued Your Action Comments Pick and place the search window so it covers the area you are going to search Shape Rectangle F OCR string window Search Win Enabled Op OCR P amp P Process Win P amp P Search Win Threshold Filter Define Char String Output Reference a Search Window Learn Nominal ABC12 Window 1 Enabled Pick the Learn box When you pick the Learn box the search window learns the position of all the features within its borders Note If you adjust the position of the search window you must pick the Learn box again after the position adjustment so the search window can relearn the contents In the example above only the character string ABC12 appears in the search window During operation if the position of the character string shif
78. nd the OCR window detects more characters than are listed in the match string the inspection fails Using the Strict Control The Strict Control box allows you to select the level of Function tolerance for character variation when using the OCR windows to verify match strings With Strict Control set to Enabled the OCR window has a relatively low tolerance level for variations With Strict Control set to Disabled the OCR window has more tolerance for variation that is the OCR window is more accepting of character appearance variations For example let s say you are verifying the date FEB 92 Suppose that because of variance in print quality sometimes the B in FEB is misread as an 8 causing the inspection to fail In this case if you want to make the OCR window more tolerant of variance you would set the Strict Control box to Disabled This would set a higher tolerance for variation allowing B characters of lesser quality to be accepted so inspections do not fail due to the B characters Your Action Comments Pick the Strict Control box When you pick the Strict Control box the setting toggles box onthe Read menu between Enabled and Disabled Enable or disable according to your application requirements Mode Numbers Letters coo Strict Control Enabled q Strict Control box Filter Disabled Learn Match String String Chapter 4 Configuring OCR Windows 4 26 Using the Filter The Filter box allows yo
79. ndow you may want to include OCR Window enough space within the window surrounding the inspected continued characters to allow for slight shifting of the character s from inspection to inspection If the characters position in the image shifts so that part of a character is outside the window or on the border that character will not be recognized Window placed with some tolerance for gt shifting Window placed with no tolerance for shifting gt not recommended If significant shifting occurs in your application you can use the CVIM reference tools to provide shift compensation for the OCR windows Also the OCR PAK option provides another shift compensation feature called the search window which works exclusively with OCR windows See Using the Search Window and Assigning the Reference Tool later in this chapter for more information Chapter 4 Configuring OCR Windows 4 9 Adjusting the Threshold As with other windows you can adjust the binary threshold of the OCR windows to obtain the best possible image of the inspected character s Select the Threshold Filter box on the Define Window menu to set the threshold Your Action Comments Pick the Threshold Filter When you pick the Threshold Filter box the threshold menu box in the Define adjusting slide bar appears on the screen Note The Pixel Window menu Obj Filter menu and the cursor left of the slide bar are disabled and cannot be used when you are
80. ng results for 150 inspections for windows 1 7 is shown below PROBE Samples Mean Std Dev Min Reading Max Reading 1 WINDOW Samples Std Dev Min Reading Max Reading 1 150 1 683 6 150 0 000 150 0 195 150 0 114 150 0 195 150 0 195 150 0 000 O image O Failed D an Q vo 0 Result g Stat O stat2 e NT Only Tools Tools Page Page Page Page Note for window 1 the string window the Min Reading for the sampling is listed as 0 indicating that during at least one inspection none of the characters were recognized at all For window 2 a character window the Min Reading is 1 indicating none the readings for that window failed Chapter 6 Runtime Displays Statistics Display For window 3 a character window the Min Reading is 0 continued indicating that at least one reading for that window failed that is the character inspected by that window was not recognized during at least one inspection Notice the values in the Mean column for the character windows windows 2 7 These values can be interpreted as as percentage of success for each character window This is because the Mean is an average of the window results and the character window results are always either 1 for pass or 0 for fail So for example the Mean value of windows 4 is 0 986 indicating these window successfully recognized a character in 98 6 of the 150 readings this amounts to 148 passes 2 failures The Mean value of wind
81. nition 0 Window 9 Value k indow 10 Value 5 Luminance 17 16 Object 32 bit integer Pixel 32 bit integer Template 32bit integer Gradient 32bit integer OCR 32 bit integer Same as window 9 Same as window 9 Same as window 9 354 355 F 3 92 93 4 96 97 indow 12 Value 98 99 10 11 indow 13 Value 100 101 12 13 102 103 14 15 5 104 105 368 369 16 17 indow 16 Value 3 5 7 indow 11 Value indow 14 Value indow 15 Value 122 123 34 35 indow 17 Value 124 125 36 37 indow 18 Value 126 127 38 39 0 15 Window 19 Value 128 129 40 41 0 15 130 131 42 4 indow 21 Value 132 133 44 4 indow 22 Value 134 135 46 4 indow 23 Value 136 137 48 4 indow 24 Value i indow 20 Value i N o Chapter 7 Communications 7 16 Statistics for The statistics for the OCR windows are based on the OCR Windows accumulated results for the inspections sampled For OCR windows these results are as follows e For the string window the result or reading is the number of characters recognized or matched in the inspected string This can range from 0 to the maximum number of characters as set in the Max Chars box For each character window the result or reading is always either a 1 if all of the characters in that window are recognized or matched or a O if any of the char
82. ns Chapter 5 OCR Adjustment Features 5 8 Using Diagnostics Using Disp Chars continued The Disp Chars or display characters function used in conjunction with the Learn box displays the inspected characters in a window on the monitor screen as they are viewed by the CVIM this may be different from the way they appear in the OCR window during setup To use the Disp Chars function you must first configure the other OCR window parameters as appropriate and havea character string in the OCR string window Then you set the Disp Chars box to Enabled and pick the Learn box For example suppose after you have selected placed and configured an OCR window you want to use the Disp Chars function to see how the inspected characters A B C 1 2 3 as shown below appear to the CVIM Follow these steps Your Action Comments Pick the Disp Chars box to Picking the Disp Chars box on the Define Char String menu change the setting toEnabled toggles the setting from Disabled to Enabled Note If the Show Matrix box is enabled you must first disable it in order to enable the Disp Chars box ATES a ee es Disp Chars Enabled Search Mode Show Matrix Disabled Read Numbers Letters Max Chars 16 Pack Enabled Reconnect Disabled Char Width Auto CC P amp P Char Width NG banay Bt OCR string window E Disp Chars box Output Reference Learn Nominal 4 Learn box
83. om In the above case the image is reflected from the right of the camera field of view the reflected image would be the same if the image was reflected from the left To inspect the string you would select Orientation Vertical and Direction Top to Bottom The End Chars Function The End Chars function works in conjunction with the Max Chars function and affects the way OCR windows are utilized For more information refer to Setting Max Chars and to the subsection Effect of the End Chars Setting in this chapter To enable or disable the End Chars function Your Action Comments Pick the End Chars boxon Picking the End Chars box toggles the entry between the Search Mode menu to Enabled and Disabled change the setting Sea rch Mode Bi KC a Font Other 4 End Chars box Chapter 4 Configuring OCR Windows 4 18 Selecting the Read Mode Select the Read box to access the Read menu then select from parameters listed in that menu Your Action Comments Look at the setting inthe The Read box tells what mode is currently selected It can Read box onthe Define Char be any one of these Letters Numbers Letters Numbers String menu Numbers Letters or Match String Pick the Read boxon Picking the Read box displays the Read menu The Mode the Define Char String menu box is set to Numbers Letters the first time you access the Read menu Note The four other boxes on the Read menu are
84. oolset 1 Configuration Blocks 104 127 Windows 1 24 Toolset 2 Bi EC 15 Block Transfer Signature Enable 0 Disabled 1 Enabled Remote I O amp RS 232 5 0 7 Window Low Threshold 0 Low Limit _ 63 High Limit 5 8 15 Window High Threshold 0 Low Limit You can set this to any value from 0 63 however the CVIM module automatically sets this to 63 for OCR windows 63 High Limit CO 15 window icaton 15 fwndowwia a eo E U aaa O OfOo o GUT KI f MI 0 15 Search Window X Location Search Window Y Location 1 Search Window Width 15 Search Window Height Refer to the CVIM Communications Manual for Pyramid Integrator long word descriptions o HIN n n pan O N N o o wn Chapter 7 Communications 7 12 Configuration Blocks for OCR Windows continued Table 7 B continued Configuration Blocks 42 65 Windows 1 24 Toolset 1 iguration Blocks 104 127 Windows 1 24 Toolset 2 Definition 0 15 Fail Range High Integer Remote I O amp RS 232 Notes Not applicable for OCR windows Not applicable for OCR windows Fail Range High Fraction Not applicable for OCR windows Fail Range Low Fraction Not applicable for OCR windows Fail Range Low Integer Warning Range High Not applicable for OCR Integer windows Not applicable for OCR windows Warning Range
85. order A B C 1 2 then 3 just as if you were typing If you pick the wrong character by mistake pick the key to erase it To clear the entire entry pick the Cl key Pick the Ret key to enter the When you pick the Ret key the New String entry is copied new string in the String box into the String box and becomes the match string Chapter 4 Configuring OCR Windows Defining the Match String continued Your Action Pick the key on the keyboard to access the lowercase keyboard Original Keyboard Pickingthe key mng 1712 x c v e NIM lt gt Space 4 23 Using the String Keyboard There is also a lowercase keyboard available This lowercase keyboard includes lowercase characters and alternate characters among which are the wild card characters Note Remember that the OCR windows do not recognize lowercase alphabet characters Comments Picking either of the two keys in the lower left and right corners of the keyboard displays the lowercase keyboard as shown below 11 2 3 4 5 6 7 8 9 0 la 2 w E R 7 Y u Jo P t ret A15 D F elaji ke 1 eon changes the keyboard Lowercase Keyboard Pick the key on the lowercase keyboard to access the original keyboard BORER RG ES a wle r t y uli e p le ret a salto aie ieh eee 1 2 e e v b n m space 1 Note that on the lowercase
86. ow 7 is 1 000 indicating the window successfully recognized a character in 100 of the 150 readings Samples Mean Std Dev Min Reading Max Reading WINDOW Samples Std Dev Min Reading Max Reading 150 1 683 6 150 0 000 150 2 0 195 150 X 0 114 150 0 195 150 0 195 150 0 000 Chapter 7 Communications Chapter The objective of this chapter is to provide information Objective regarding CVIM communications with respect to OCR windows Refer to this chapter if your application uses the CVIM communications ports on the chassis backplane and or front panel and also uses OCR windows Note The information in this chapter is provided as a supplement to the CVIM Communications Manual Refer to that manual where appropriate for related information Communications The installation of the OCR PAK option does not alter the Overview prior CVIM communications capabilities which are already available However when OCR windows are used some additional communication commands become available these are described in this section by communication type i e remote I O link Pyramid Integrator backplane or RS 232 port Furthermore the result configuration and statistical data for OCR windows are different from that of other windows These differences are discussed in this section as well Using the Remote If you use the remote I O link to communicate with the IIO Link CVIM and you are using OCR windows an add
87. p icon to display the window dimensions Typical help screen showing window coordinates Note the Length and Height dimensions sy Window Coordinates X 100 Y 100 4 7 As you place the OCR window over the character string you can use the OCR window along with the Help message to determine the size of the characters in your image Remember that the characters size must be between 11 and 127 pixels in height Comments Window placed over vertically oriented character WT When you pick the Help icon the help message box appears the help message lists the window coordinates along with the height and length Length 12 Height 16 Because the window encompasses the dimensions of the character the window height and length reflect the character height and width respectively Compare the character height and width with the specified size requirements to see if they are within range In most cases the character height will be the key dimension for comparison Note For vertically oriented characters the window length indicates the character height while the window height reflects the character width Also if character size is uniform it is only necessary to measure one representative character If character size is not uniform measure the largest and smallest characters to determine if they are within the size limit Chapter 4 Configuring OCR Windows Placing the When you place the OCR wi
88. ppears in the Learn box do the following Comments When you pick the Learn Match String box the ABCDEF string in the Learn box is copied to the String box This sets the ABCDEF string as the match string Mode Numbers Letters coo Strict Control Enabled Filter Disabled Learn Match String String ABCDEF Chapter 4 Configuring OCR Windows 4 22 Defining the Match String Using the String Keyboard continued Instead of using the Learn Match String box you can enter the match string using the keyboard which appears on the screen when you pick the String box Your Action Comments Pick the String boxonthe Picking the String box displays the keyboard With the Read menu keyboard on the screen you can select characters from the keyboard with the light pen to define the match string Note that above the character boxes two entry prompts appear on the keyboard Current String lists the currently defined match string if there is one New String lists the characters as you select them from the keyboard Font Other Search Mode Keyboard appears Define Window eee pps Bs gt Bs p pitoi aite E Define Char String ie Range Reference eee Pick the characters onthe When you pick a character key on the keyboard it appears keyboard to select the next to New String in the keyboard window For example New String entry to define the string A B C 1 23 as the new string pick the keys in
89. progress of the three phase loading process as follows Vision Processor C Pass Fail Trigger 1 C Ea Trigger 2 OCR Loading Phase LEDs Cg to green to green The loading process requires about 45 seconds with each phase taking about 15 seconds When the loading process is complete the CVIM module begins its normal powerup sequence To verify that the OCR PAK option is installed check the title banner on the monitor after power up if the OCR PAK option is installed there is a message on the banner indicating the presence of the OCR PAK option Note You need only install the OCR PAK option once once installed the OCR PAK option remains installed for all subsequent powerups Chapter 4 Configuring OCR Windows Chapter Objective Using OCR Windows Acquiring an Image Initial Setup of the OCR Window The objective of this chapter is to describe how to configure a window for OCR inspections The OCR PAK option is integrated into the CVIM module as an additional function performed by inspection windows To set up an OCR window a number of steps are involved Each of these steps are discussed in this chapter Acquire an image for use during setup Begin setup by selecting and enabling a window selecting OCR as the window operation placing the window and setting an initial threshold level for the window e Continue the setup process by selecting the Font style selectin
90. r the following scenario You have enabled window 10 and selected OCR as the operation Windows 11 24 are all available for character windows that is they are all disabled and none of them are set for OCR operation You have placed the window 10 which is the string window over the horizontal character string which consists of 10 characters ABCDE12345 as shown below Window 10 You have set Max Chars to 10 and Pack to Enabled If you pick the Learn box then pick the Next box you will see that ABCDE12345 window 11 is enabled and is placed over the first four characters Window 11 1111177 ae Window 12 ABCDE12345 If you pick Next again you will see that Window 12 is enabled and is placed over the next four characters If you pick Next again you will see that Window 13 is enabled and is placed over the last 2 characters Kk Window 13 Chapter 4 Configuring OCR Windows Setting the Pack Function continued Window 11 4 39 Example 2 Pack Disabled Recall that with Pack disabled the CVIM will assign one character window to each character Now consider this scenario You select Window 10 again You leave Max Chars set to 10 and change Pack to disabled Then you pick the Learn box to update the character windows If you then pick the Next box you will see that NBCDE12345 window 11 is enabled and placed over the first character Window 12 a a ABCDE1234
91. s Pick the Window box onthe When you pick the Window box the Window menu appears Main menu Pick the Define Char String When you pick the Define Char String box the Define Char box on the Window menu String menu pops up Note The Define Char String box is not available unless the window operation is already set to OCR see Chapter 4 for window configuration information Font Other Search Mode eoo Read Numbers Letters eee OCR Configuration Features Max Chars 16 eee Define Char String menu Pack Enabled Reconnect Disabled Char Width Auth OCR Adjustment Features P amp P Char Width Diagnostics Define Window eee Define Char String e4 Define Char String box Output Reference soo Learn Nominal Window 1 Disabled ie Jea 7 Chapter 5 OCR Adjustment Features 5 3 Using the OCR Adjustment Features continued Using Reconnect Examples of characters with breaks Your Action Pick the Reconnect box to enable or disable the function The OCR configuration features are used to set most of the parameters for the OCR inspection and are discussed in Chapter 4 The OCR adjustment features are intended for use in special cases as discussed in this section The Reconnect function can be used in some cases to allow the OCR window to overlook a small break that may occur in an inspected character which would otherwise make the character unrecognizable S B The
92. s regardless of the number of characters which may appear in the string window The Max Chars setting is limited to the following range The highest Max Chars number you can set is 16 provided enough character windows can be allocated The lowest Max Chars number you can set is 1 Set the Max Char box number to the maximum number of characters you expect to inspect with your string window Your Action Comments Pick the Max Chars boxon When you pick the Max Chars box the calculator pad the Define Char String menu appears on the monitor screen Search Mode eee Read Numbers Letters eee Pack Enabled Reconnect Disabled Char Width Auto P amp P Char Width eee Define Window Cee Max Chars box gt Calculator Pad DefineChar String lt 1 Output Reference eee Learn Nominal Window 1 Enabled Pick the digitsonthe When you pick a digit on the calculator pad it appears calculator pad to select inthe window of the pad For example to select 10 the Max Charsentry pick 1 then pick 0 If you make a mistake pick the key To clear the entire entry pick the Clr box on the calculator pad Chapter 4 Configuring OCR Windows 4 34 Setting Max Chars continued Your Action Pick the Enter boxon the Once you have selected the desired number picking the calculator pad Enter box puts the number in
93. see what characters the OCR window is identifying see Using the Learn Function in this chapter in order to check the effect of your mode selection Chapter 4 Configuring OCR Windows 4 21 Defining the Match String Font Other Max Chars 16 c00 Pack Enabled Your Action Pick the Learn Match String box on the Read menu Learn Match String box String box shows match string Na With Match String selected as the Read mode you must define the content of the match string The character string you define for the match operation the match string will appear in the String box on the Read menu Note With Match String selected the four other boxes on the Read menu are enabled that is the Strict Control Filter Learn Match String and String boxes NG Mode Match String selected Mode Match String Strict Control Enabled These four boxes are enabled when Match String is selected Filter Disabled Learn Match String String The Learn Match String box and String box provide two different ways to define the character string the two methods are discussed in the next two sections Using the Learn Match String Function To use the Learn Match String function you must have first used the Learn box so that the desired string appears in the Learn box For example suppose you want to use the character string ABCDEF asthe match string If ABCD EF currently a
94. spected string A is recognized as a letter the character regards letters as a match so the A appears in the Learn box The third character in the inspected string C is not a number and since the regards only numbers as a match the question mark character appears Define Char String so eee Output Reference Learn Nominal AB 123 Window 1 Enabled Example 6 Mode Match String Assume now you have set the String box to 4 BC12 amp Recall that the amp character regards any valid character as a match 4 Learn box Pick the Learn boxon the Picking the Learn box causes the characters ABC 123 Window menu to appear in the Learn box In this case the first character in the inspected string A is recognized as a letter so the A appearsin the Learn box The last character in the inspected string 3 is recognized as a number so the 3 appears in the Learn box Define Window Define Char String Output Reference Learn Nominal ABC123 Window 1 Enabled Learn box Previous Next 4 32 Chapter 4 Configuring OCR Windows Using the Learn Function continued Pick the Learn box on the Window menu Pick the Learn box on the Window menu Your Action Define Window Define Char String Output Reference Learn Nominal ABC 23 Window 1 Enabled Previous Next Your Action Define Window Define Char String Output Reference
95. sume you are now inspecting the character string AB C 456 Search Mode eee ee Diagnostics e Mode Match String q Mode Match String selected Strict Control Enabled Filter Disabled Learn Match String String ABC123 4q String box Your Action Comments Pick the Learn boxon the Picking the Learn box causes the characters ABC Window menu to appear in the Learn box Recall that in Match String mode the OCR window checks to see if the inspected string matches the match string In this case the last three inspected numbers 4 5 6 do not match the last three numbers in the match string 1 2 3 so the three question mark characters appear Wherever the character appears in the Learn box there is no match Define Window Define Char String eee Output Reference Nominal ABC Window 1 Enabled Learn 4 Learn box Chapter 4 Configuring OCR Windows 4 31 Using the Learn Function Examples of Using the Learn Function continued Example 5 Mode Match String Assume now you have set the String box to B 123 Recall that the character regards any letter as a match while the character regards any number as a match Your Action Comments Pick the Learn boxon the Picking the Learn box causes the characters AB 123 Window menu to appear in the Learn box In this case the first character in the in
96. ter windows available to unpack the characters If this message appears you cannot disable the Pack function You must either leave the Pack box set to Enabled or arrange your window selections so that enough windows are available After changing the Pack box setting if you pick the Learn box the CVIM updates the character windows as according to the Pack box and Max Char box setting Note It is not mandatory that you pick the Learn box after changing the Pack box setting if you do not the new setting will take effect during run mode anyway but the new window allocation will not be observable during setup Your Action Comments Pick the Learn box after changing the Pack setting Define Window eee Define Char String eee Output Reference EPI Learn box p Learn Nominal ABCD12 Window 1 Enabled Chapter 4 Configuring OCR Windows 4 38 Setting the Pack Function Examples of setting the Pack and Max Chars boxes continued The following examples illustrate the setting of the Pack and Max Chars boxes Example 1 Pack Enabled Recall that with Pack enabled the CVIM will allocate one character window for each group of four characters For example if there are 10 characters in the string window the CVIM will allocate one character window for the first four characters one for the second four characters and one for the last two characters for a total of three character windows Conside
97. the Max Chars box Note The CVIM must be able to allocate enough character windows to inspect the maximum number of characters If you select a number beyond the range 1 16 or if there are not enough windows available for character windows for the maximum number entered the message Value Qut of Range flashes on the calculator pad and you will not be allowed to enter the number Pick the Learn box after When you pick the Learn box after changing the Max changing the Max Chars Chars box setting the CVIM updates the character box setting windows according to the Max Chars setting and also according to the Pack setting see the next section Define Window Define Char String Output Reference Learn box gt Learn Nominal ABCD12 Window 1 Enabled Effect of the End Chars Setting As discussed earlier the string window will inspect only the number of characters as set in the Max Chars box For example suppose you inspect this string with 8 characters ABCD1234 wee Jem Now suppose the Max Chars box is set to 6 Normally with the End Chars box disabled the OCR window will inspect only the first 6 characters ABCD12 If the End Chars box is enabled however the OCR window will inspect only the last 6 characters in the string CD1234 Chapter 4 Configuring OCR Windows 4 35 Setting Max Chars Effect of the End Chars Setting continued continued Note See The End Chars
98. tional commands become available This section first discusses the ASCII commands and then the DF1 commands Note Refer to the CVIM Communications Manual for ASCI protocol description conventions and other information related to RS 232 communication This section discusses three ASCII protocol commands which can transfer information involving OCR windows Read Inspection Results Read Inspection Results OCR e Set Match String n Note Decimal points or international in the match strings or in OCR window results when using match strings are transmitted as ASCII period or comma respectively Decimal points or international in non match string OCR window results are transmitted as ASCII period Read Inspection Results This is the same command as listed in The CVIM Communications Manual Use this command to read the OCR string window result of the last inspection the result returned is the character string read by the window Command Format gt RRx TSnW d CR Reads the character string from the specified string window x number of times command is repeated optional default 1 n Tool set number d Window number For example Suppose window 1 of toolset 2 is a string window and the recognized string isABCDE This command gt RR TS2W 1 CR will return the ASCI encoded characters of the string CR LF ABCDE CR LF Chapter 7 Communications
99. ts from inspection to inspection but remains within the area of the search window the search window will locate the character string position and will shift the OCR window position accordingly so that that character string is inspected Chapter 4 Configuring OCR Windows 4 46 Using the Search Window Example of Using the Search Window continued Suppose in your application you want to use an OCR window to inspect the date stamped on the label of a box The stamped date is to be located somewhere within a blank area on the label but the position of the stamped date may vary from one label to the next Label Blank area of label where date stamp is generally located JUN 17 92 Date stamp position JUN 17 92 may vary from inspection to inspection To solve this during setup you would place the OCR window over the character string in a typical position you would then place the search window over the entire blank area where the character string might appear Then wherever the date stamp was placed within in the blank area the OCR window would automatically be shifted there to cover it CVIM monitor screen Na Search Window JUN 17 92 XK String window shifts os 4 according to string position Chapter 4 Configuring OCR Windows 4 47 Using the Search Window continued Example of Using the Search Window and a Reference Line Now in the same application suppose that the bo
100. u select any of the first four items on the Mode menu Letters Numbers Letters Numbers or Numbers Letters as the mode you are selecting a read operation The OCR window identifies and lists the characters which appear in the OCR window during inspection The window s discrete output result is a pass if the OCR window identifies all the characters in the window Match If you select Match String as the mode you are selecting a match operation when the OCR window inspects each character string it determines if there is an exact match between the characters inspected in the window and a user defined character string called the match string The window s discrete output result is a pass if the character string identified by the OCR window matches the match string Chapter 4 Configuring OCR Windows 4 20 Selecting the Read Mode continued Choosing the Mode Here are descriptions of the different mode selections Letters Select Letters to identify all characters as letters With Letters selected the OCR window attempts to identify each character in the window as a letter Numbers Select Numbers to identify all characters as numbers With Numbers selected the OCR window attempts to identify each character in the window asa number Letters Numbers Select Letters Numbers if both numbers and letters will be read in your application with letters being the first identification choi
101. u to enable or disable the filter Function function With the Filter function enabled the OCR window ignores small specks in the OCR window image These specks might be errant ink specks or dirt for example which would normally cause a match operation to fail For example let s say you are verifying the string ABC123 Suppose that because of variance in printing quality occasionally specks of ink appear with the inspected string causing the match operation to fail Define Window coo Define Char String oco Output Reference eee Learn Nominal ABC Window 1 Enabled In this case if you want to allow the OCR window to accept the appearance of small specks you would set the Filter box to Enabled so that inspections are accepted with the specks lt q Learn box Speck in image Note If a speck in the image touches a character or characters in the OCR window the speck is not ignored In this case if the speck sufficiently alters a character s appearance the character will not be recognized and the match operation will fail Also a speck may connect characters causing the OCR operation to fail In this case the Char Width function would be useful see Using Char Width in Chapter 5 Your Action Comments Pick the Filter box When you pick the Filter box the setting toggles between box on the Read menu Enabled and Disabled Enable or disable according to your application requir
102. w Fora read operation that is when the Read box is set to Letters Numbers Letters Numbers or Numbers Letters the assigned results output is activated only when at least one character is not identified As long as all characters are identified the inspection is considered a success and there is no output activation e Fora match operation that is when the Read box is set to Match String the assigned results output is active when at least one character in the inspected string as identified by the OCR window does not match the corresponding character s in the user defined match string As long as all inspected characters match the user defined match string the inspection is considered a success and there is no output activation Note Failure of the search window and or reference tools will cause the associated OCR window to fail Chapter 4 Configuring OCR Windows 4 50 Assigning the Output Line Use the following steps to assign an output to the currently continued selected window Your Action Comments Pick the Output Reference When you pick the Output Reference box the Output box on the Window menu Reference menu is displayed Pick the Output box on the When you pick the Output box the Toolset Usage menu Output Reference menu appears This menu shows the output line functions you assigned to the Output Assignment menu see the CVIM User s Manual for more information
103. w Character windows are assigned to portions of the character string which appear in the string window Each string window can have from one to 16 associated character windows depending on the length of the character string and upon other configuration options With Pack enabled character windows are assigned to characters in the string window in groups of four characters A character string with 12 characters would require 3 character windows with Pack enabled Typical Character Window with Pack enabled 45ABCDEF With Pack disabled a character window is assigned to each character in the string window A character string with 12 characters would require 12 character windows with Pack disabled Typical Character Window with Pack disabled 412345ABCDEF Note Using all 24 windows and with Pack enabled for all windows you could inspect up to 76 characters per tool set Chapter Application Considerations and Requirements 2 Window Usage continued Additional Features 2 9 Character Window Requirements In order to configure a string window for OCR there must be enough additional windows available to serve as character windows To be available to serve as character windows the additional windows must e Follow the string window in sequence e Bedisabled Not have OCR selected for window operation For example if you select window 5 for use as the string window and your inspection requires 3 c
104. w menu Reference menu is displayed Pick the Ref box onthe When you pick the Ref box the Reference menu appears Output Reference menu Reference Menu Output Reference Fixed Menu m Fixe O RefLine 1 O RefLine2 O Refline3 Output None O Ref Win 1 Define Window O Ref Win 2 Define Char String O Ref Win 3 OutputiReference i Learn Nominal Mang Output Reference box Window 1 Enabled Previous Note that the Fixed box has a shaded square indicating that a reference tool is not assigned to the currently selected window Also note that the available reference tools are in light type on the screen you cannot pick the tools listed in dark type Pick the appropriate reference Picking one of the available reference tools assigns the tool fromthe menu currently selected window to that reference tool Chapter 4 Configuring OCR Windows 4 49 Assigning an Output Line You can assign the results of the OCR window to a specific CVIM output using the Output menu box Note To assign the window results to an output there must be a results output available for more information on assigning results see the CVIM User s Manual Note that unlike other CVIM inspection windows the OCR window does not use range limits there is no fault range or warning range for OCR window results Instead the OCR window results reflect the success of the read or match operation as described belo
105. x position also may shift horizontally during operation so that the label position also shifts JUN 17 92 Horizontal reference line To solve this you would use a horizontal reference line to gage the label shift and assign the OCR window to the reference line Then during inspections the shift detected by the reference line would be applied to the search window The search window would be shifted so it would still cover the blank area a Search oe Window shifted String Window JUN 17 99 Chapter 4 Configuring OCR Windows 4 48 Assigning the Reference You can configure the OCR window so that one of the six Tool reference tools provides shift compensation to the string window or if the search window is used to the search window Note character windows automatically follow the positioning of the associated string window During an inspection if the reference tool detects a shift of the work piece feature the reference tool shifts the corresponding window the same amount and direction for more informa tion about reference tools see the CVIM User s Manual Note The OCR windows do not accept rotation compensation from an assigned reference tool only horizontal and vertical shifting is applied to OCR windows To assign a reference tool to the currently selected window Your Action Comments Pick the Output Reference When you pick the Output Reference box the Output box on the Windo
106. y check the next window The next window is either enabled or if it is disabled OCR has been selected for its window operation You must either select a different window or change the configuration of the next window so that it is disabled and OCR is not its selected operation Chapter 4 Configuring OCR Windows Selecting OCR Operation continued 4 5 When you select OCR as the window operation note the contents of both the Window and Define Window menus change as shown below the specific changes are indicated by the dotted line arrows Typical menu appearance Menu appearance before selecting OCR after selecting OCR Shape Rectangle ese maa 2e Define Window Menu Window Window 1 Enabled Previous Shape Rectangle c00 Search Win Disabled en Output Reference Learn Nominal P amp P Process Win eee ere a eee ee Jp P amp P Search Win 000 Threshold Filter soo where eee ec ete gt Define Char String 000 PAA PA ee gt ece Window 1 Enabled The Mask box is replaced by the Search Win box mask windows are not available with OCR operation A new reference tool the search window becomes available Next The P amp P Mask Win box is replaced by the P amp P Search Win box The Define Char String box is added to Window menu when you pick this box the Define Char String menu appears which you use to define the OCR operation
107. y between Enabled and Disabled d44 Mirror box Chapter 4 Configuring OCR Windows 4 16 Defining the Search Mode Using the Mirror Function continued The following examples show mirror and reflection orientation Vertical axis of field of view gt Camera field of view image reflected to camera Mirror The actual printed characters Horizontal Characters In this case the image is reflected from the left of the camera field of view and about the vertical axis of the field of view the reflected image would be the same if the image was reflected from the right Camera field of view image reflected to camera Mirror Na The actual printed characters vertically oriented with bottom to top direction HAB Vertical Characters Bottom to top In the above case the image is reflected from the right of the camera field of view and about the vertical axis of the field of view the reflected image would be the same if the image was reflected from the left To inspect the string you would select Orientation Vertical and Direction Bottom to top Chapter 4 Configuring OCR Windows 4 17 Defining the Search Mode Using the Mirror Function continued Camera field of view Vertical axis of field of view image reflected to camera Mirror The actual printed characters vertically oriented characters with top to bottom direction Vertical Characters Top to Bott
Download Pdf Manuals
Related Search
Related Contents
SK Catalog - Echo Group Inc Nordic Star Products NRD24V1 User's Manual JVC GVT0143-008A User's Manual Radio Telescope User Manual STANDARD OPERATING 技術研究開発及び実用化に対する支援等 MANUAL DO UTILIZADOR REFERENCES StarTech.com 3m High Speed HDMI Cable with Ethernet - HDMI to HDMI Micro - M/M Page 1 Page 2 このたびはカワイ電子ピアノをお求めいただきま して SERVICE MANUAL - Appliance Factory Parts Copyright © All rights reserved.
Failed to retrieve file