Method and machine for reading and assigning optical codes

Abstract: A method and machine (1) for reading and assigning optical codes (2) to a succession of moving articles (3), each having at least one respective optical code (2), and the method including the steps of feeding the succession of articles (3), by means of a conveyor (5), through a read area (6); reading the optical codes (2) within the read area (6) by means of at least one optical reader (7), and determining, as each optical code (2) is being read, the position in space of the optical code (2) with respect to a given space reference; and assigning each optical code (2) to the corresponding article (3) by matching the position in space of the optical code (2) with the position in space of the corresponding article (3).

Description: The present invention relates to a method of reading and associating optical codes, and in particular for reading and associating optical codes to a succession of articles fed through a read area on a conveyor. In the following description, the term "optical code" is intended to mean a set of graphic marks applied to a label or directly on the article (or any other support), and whereby information is coded in the form of a sequence of black and white or variously coloured regions arranged in one or more directions. Examples of such codes are bar codes, two-dimensional codes, colour codes, and others. The present invention also relates to a machine for reading and associating optical codes. Figures 1 and 2 show a known machine for reading and associating optical codes to a succession of moving articles A, each having a respective optical code on the top surface. The machine comprises a belt conveyor C for feeding a succession of spaced articles A in a given direction on a conveying surface and through a read area defined by a portion of the conveying surface itself. The machine also comprises a presence sensor S for detecting the entry of each article A inside the read area; a travel sensor E for monitoring the travel of articles A within the read area; and a measuring device M for determining, at the input of the read area, the height of each article A with respect to the conveying surface. The machine also comprises a control unit U connected to presence sensor S, travel sensor E and measuring device M, and which provides for determining, with respect to a fixed reference and as a function of time, the distribution of articles A within the read area and in the traveling direction of articles A. Finally, the machine also comprises a number of optical readers L, each of which is connected to control unit U, and is located over the read area to read the optical codes as they travel through. More specifically, each optical reader L defines a respective scan line V on the conveying surface, and is able to read directly any optical codes which cross scan line V substantially parallel to the scan line. By means of a known reconstruction algorithm, each optical reader L is also able to read any optical codes which, on crossing scan line V, are so oriented as to form with the scan line an angle of maximum ±90°. As each optical reader L is able to read optical codes oriented within an angle of maximum ±90° in relation to the respective scan line V, the optical readers L of the above known machine are arranged over the read area with scan lines V at different angles with respect to the traveling direction of articles A. Scan lines V are so arranged within the read area as to cover the 360° required for any optical code traveling through the read area to be read by at least one optical reader L, so that the above machine comprises at least two optical readers L with their respective scan lines V perpendicular to each other. On reading an optical code, each optical reader L supplies control unit U with the content of the optical code and the scan angle α of the optical code with respect to optical reader L; scan angle α being, at the instant the optical code is read, the angle between a reference ray R from optical reader L and intersecting scan line V, and a beam F emitted by optical reader L and intersecting the optical code. In actual use, as belt conveyor C feeds spaced articles A continuously through the read area, presence sensor S and measuring device M respectively detect and communicate to control unit U the entry of each article A inside the read area and the height of article A with respect to the conveying surface. On the basis of the information received from presence sensor S, measuring device M and travel sensor E, control unit U is able to determine, with respect to a fixed reference and as a function of time, the distribution of articles A within the read area. As articles A travel through the read area, the optical codes are read by optical readers L, each of which communicates to control unit U the instant each optical code it succeeds in reading is read, and the relative scan angle α. Since the sequence in which the optical codes are read within the read area depends substantially on how the optical codes are oriented and how scan lines V are arranged within the read area, the optical codes may be read in a different sequence from that in which articles A enter the read area, so that no definite time relationship exists between article A entering the read area and the optical code of article A being read. More simply, the order (sequence) in which the articles enter the read area may differ from the order (sequence) in which the respective optical codes are read. As a result of this lack of synchronism between the two sequences, control unit U must follow a given association procedure to associate each optical code to respective article A. The main drawback of the above machine lies in the procedure by which the optical codes are associated to the respective articles, which is relatively complex and not altogether reliable. Another drawback of the above machine is that, in certain operating conditions, it may not have all the information required to assign a given optical code. For example, in the event a relatively high and a relatively low article A are located too close together within the read area, the beam F emitted by optical reader L on detecting an optical code may intersect both articles A at the same time, so that scan angle ∝ is no longer sufficient to determine which of the two articles A the optical code refers to, and the machine is subjected to the so-called "shadow effect." Yet a further drawback of the above machine is that it is only capable of catering to substantially parallelepiped articles A. The Patent Abstract of Japan no. 11, vol. 96, of 29 November 1996 (JP 08 178620 A of 12 July 1996), describes a device for reading bar codes on objects that are fed along a conveyor. Three readers are adjusted according to information received by a presence sensor, a height detector and a TV camera and elaborated by a control unit that determines the spatial position of the centre of top and side faces of the object. It is an object of the present invention to provide a method of reading and associating optical codes, designed to overcome the aforementioned drawbacks. This object is achieved by a method according to claim 1 and a machine according to claim 12. Preferred embodiments are set out in dependent claims. More specifically, to dispense with said association procedure, the present invention proposes to eliminate the lack of synchronism between the sequence in which articles A enter the read area and the sequence in which the optical codes on articles A are read, by determining the position in space of the optical codes traveling through the read area. It should be stressed that knowing the position in space of an optical code also implies knowing the position in space of a given point of article A bearing the optical code. In the above method, for each optical code, the step of reading the optical code is preferably substantially simultaneous with the step of determining the position in space of the optical code. The step of determining the position in space of the optical code preferably comprises the substeps of: determining, when reading the optical code, the distance of the optical code with respect to the optical reader taking the reading, and the scan angle between a first reference ray from the optical reader and a second ray joining the optical reader to the optical code; said distance and said scan angle being the polar coordinates of the optical code with respect to the optical reader by which the reading was taken; and converting the polar coordinates of the optical code into space coordinates associated with said given space reference. A machine according to the invention is preferably characterized by comprising at least two optical readers, each defining a respective scan line in said read area; the two optical readers are so arranged that the respective scan lines form respective different angles with said traveling direction of the articles; and the scan lines must be so arranged in the read area as to ensure that any optical code traveling through the read area is read by at least one optical reader. A machine according to the invention is preferably characterized by comprising detecting means connected to said processing unit, and for detecting the presence of the articles at a respective input of said read area. This solution enables the sequence in which articles A enter the read area to be so determined as to enable rapid association of the optical codes, and also provides for more effectively controlling articles A traveling through the read area. That is, any difference between the input sequence of articles A determined by the detecting means, and the output sequence of articles A and the respective optical codes detected by the optical readers, indicates malfunctioning of the machine. A non-limiting embodiment of the present invention will be described by way of example with reference to the accompanying drawings 3, 4 and 5, in which: Figure 3 shows a schematic view in perspective of a machine for reading optical codes in accordance with the teachings of the present invention; Figure 4 shows a variation of the Figure 3 machine; Figure 5 shows a plan view, with parts removed for clarity, of the Figure 3 machine in a particular operating condition. Number 1 in Figure 3 indicates a machine for reading and associating optical codes 2 to a succession of moving articles 3, each having at least one respective optical code 2 on a respective surface 4. The term "optical code" 2 is intended to mean a set of graphic marks applied to a label or directly on article 3 (or any other support), and whereby information is coded in the form of a sequence of black and white or variously coloured regions arranged in one or more directions. Examples of optical codes 2 are bar codes, two-dimensional codes and colour codes. Machine 1 comprises a known conveyor 5 for conveying said succession of articles 3, spaced in relation to one another, on a conveying surface and through a read area 6 defined by a portion of the conveying surface itself; a number of optical readers 7 for reading optical codes 2, and each of which is located over read area 6 and provides for reading optical codes 2 traveling through read area 6 in a given direction 8; a processing and control unit 9 communicating with each optical reader 7; and a travel sensor 10 connected to processing unit 9, and for detecting the travel of articles 3 within and out of read area 6. Finally, machine 1 may also comprise a presence sensor 11 (e.g. a photocell) located at the input of read area 6, and for communicating the presence of an article 3 at the input of read area 6 to processing unit 9. By means of sensors 10 and 11, processing unit 9 is able to determine the size of each article 3 in traveling direction 8, and to real-time process the distribution of articles 3 within read area 6 and in traveling direction 8 of articles 3. More specifically, conveyor 5 comprises a belt 12 looped about a pair of pulleys 13, each rotating about a respective axis perpendicular to the traveling direction 8 of articles 3, and at least one of which is connected mechanically to a drive unit (not shown). Pulleys 13 define on belt 12 an upper branch 14, in turn defining said conveying surface on which articles 3 are preferably, but not necessarily, placed with respective surfaces 4 upwards. In the example shown, travel sensor 10 is defined by a known encoder located at one of pulleys 13 of conveyor 5, and which communicates to processing unit 9 the travel of belt 12 in direction 8 of articles 3. Optical readers 7 are of the type claimed in US Patent N° 5483051 filed by the present Applicant and granted on 9 January, 1996, and provide for scanning optical codes 2 within read area 6 by emitting a laser beam 15 onto conveyor 5, and sweeping beam 15 within a given plane angle. The plane angle within which laser beam 15 is moved defines a scan plane π, which intersects the conveying surface of articles 3 to define a scan line 16 substantially sloping at an angle γ with respect to the traveling direction 8 of articles 3. With reference to Figure 3, each optical reader 7 is able to read directly any optical codes 2 which, on crossing scan line 16, are so oriented as to be substantially parallel to scan line 16; and, by means of an interpolation algorithm, each optical reader 7 is also able to read any optical codes which, on crossing scan line 16, are so oriented as to form with scan line 16 an angle of maximum ±90°. Optical readers 7 of machine 1 are therefore so arranged over read area 6 that scan lines 16 form different angles γ with respect to the traveling direction 8 of articles 3. More specifically, scan lines 16 are so arranged within read area 6 that any optical code 2 traveling through read area 6 is readable by at least one of optical readers 7. When reading optical code 2, each optical reader 7 is able to determine the distance K between itself and the optical code 2 it is reading, and the scan angle β at which the reading is being made; the scan angle β (corresponding to state of the art scan angle α) being the angle between a fixed reference ray 17 lying on scan plane π (and corresponding to state of the art ray R), and the laser beam 15 (corresponding to state of the art beam F) emitted by optical reader 7 and intersecting the optical code 2 being read. More specifically, each optical reader 7 is able to determine distance K and scan angle β of a given point of optical code 2 preferably, but not necessarily, located at the start of optical code 2. In the example shown, scan plane π and reference ray 17 are perpendicular to the conveying surface of articles 3. In the Figure 4 variation, as opposed to presence sensor 11, machine 1 comprises a further optical reader 20 of the type claimed in US Patent N° 5483051 filed by the present Applicant and granted on 9 January, 1996, and which is so arranged that scan line 16 is located at the input of read area 6 and perpendicular to the traveling direction 8 of articles 3. In this case, optical reader 20 is able to determine, in real time and along scan line 16, the contour of articles 3 entering read area 6, thus enabling processing unit 9 to determine the volume and position of each article 3 on belt 12 at the input of read area 6, even in the event of a number of articles 3 entering read area 6 simultaneously or slightly offset in relation to each other, and so being "concealed" with respect to a presence sensor 11. In the example shown, optical reader 20 detects and reads optical codes 2 in the same way as optical readers 7. Operation of machine 1 will now be described assuming, for the sake of simplicity, that optical codes 2 traveling through read area 6 are detected and read by only one of optical readers 7 of machine 1. If no presence sensor 11 is provided on machine 1, conveyor 5 feeds articles 3 through read area 6 in direction 8, while optical reader 7 searches for optical codes 2 traveling through read area 6. On detecting and reading an optical code 2, optical reader 7 determines and communicates distance K and scan angle β to processing unit 9 together with the information contained in optical code 2. Given the polar coordinates of optical code 2 with respect to optical reader 7, and given the position of optical reader 7 with respect to the conveying surface of articles 3, processing unit 9 is able to determine the position of optical code 2 with respect to the conveying surface at the instant in which the optical code is read. It should be stressed that knowing the position of optical code 2 with respect to the conveying surface also implies knowing the position, with respect to the conveying surface, of a point of article 3 bearing optical code 2. On determining the position of optical code 2, i.e. the position of a point of article 3 bearing optical code 2, at the instant in which it is read, processing unit 9 is able to follow the travel of optical code 2, and hence of article 3, in direction 8 using the information received from sensor 10 detecting the travel of belt 12. Finally, on detecting an optical code 2, and hence a corresponding article 3, leaving read area 6, processing unit 9 associates the information contained in the optical code 2 to that article 3. If machine 1 is equipped with presence sensor 11 (Figure 3), processing unit 9 is able to determine, as a function of time, the distribution of articles 3 within read area 6 and in direction 8 before optical codes 2 of articles 3 are detected and read by optical reader 7. In this case, since the sequence in which articles 3 travel through read area 6 is known, processing unit 9 is able to associate each optical code 2 to the corresponding article 3 as soon as optical code 2 is read by optical reader 7. Optical codes 2 are associated to corresponding articles 3 by comparing the position in space of each optical code 2 at the instant in which it is read, with the distribution of articles 3 within read area 6 at the same instant, and by associating optical code 2 to the article 3 occupying the same position in space as optical code 2 at the instant in which it was read. If presence sensor 11 is provided (Figure 3), processing unit 9 determines the size of each article 3 by determining, by means of sensor 10, the travel of belt 12 within the time interval in which sensor 11 indicates the presence of article 3 at the input of read area 6. Sensor 11, in fact, indicates to processing unit 9 when the front and rear ends of each article 3 enter read area 6 in the traveling direction 8 of articles 3. If machine 1 is equipped with optical reader 20 (Figure 4), processing unit 9 is able to determine the volume of each article 3 and the arrangement of articles 3 within read area 6 as a function of time, thus enabling correct association of the read optical codes 2, even in the event of a number of articles 3 entering read area 6 simultaneously or slightly offset in relation to one another. Optical codes 2 are associated to respective articles 3 in the same way as described with reference to machine 1 equipped with presence sensor 11. In this case, however, as processing unit 9 is able to determine the arrangement of articles 3 within read area 6, articles 3 entering read area 6 need not necessarily be spaced in relation to one another. With reference to Figure 5, experiments have shown that, to reliably determine distance K between the optical reader 7 taking the reading and the optical code 2 being read, optical code 2 must be sampled at least twice per scan. Assuming, therefore, the smallest possible size and the worst possible location of optical code 2 on the conveying surface (i.e. an optical code 2 of the smallest size readable and located at a maximum distance from optical reader 7), optical reader 7 must be able to make, along scan line 16, a minimum number of samples Nc equal to [(J/Y*2], where J is the length of scan line 16 on the conveying surface, and Y is the minimum dimension of optical code 2 parallel to scan line 16. To determine distance K, each optical reader 7 comprises a laser emitting/receiving device generating an analog signal substantially proportional to distance K between optical reader 7 and the optical code 2 illuminated by laser beam 15; and a high-frequency (e.g. 20 MHz) analog-digital converter for sampling said analog signal and supplying a number of samples Nu greater than that required for reliably measuring distance K (Nu > Nc). To obtain the minimum number of samples Nc, only some of the samples supplied by the analog-digital converter need therefore be acquired, so that the frequency Fc at which the samples supplied by the analog-digital converter are acquired and memorized is necessarily less than that at which the analog signal is sampled by the analog-digital converter. If T is the time interval in which laser beam 15 scans line 16, acquisition time Tc therefore equals: Tc = T/NC = T/[(J/Y)*2] and acquisition frequency Fc equals: Fc = 1/Tc = [(J/Y)*2]/T Each optical reader 7 also comprises a decoding device for decoding optical codes 2, and which provides for decoding the optical code 2 detected along scan line 16 before laser beam 15 finishes scanning line 16, and also for supplying the scan angle β of the decoded optical code 2, i.e. the angle at which laser beam 15 detects the start of optical code 2. As the traveling speed of articles 3 is several orders of magnitude less than the speed at which laser beam 15 is swept along scan line 16 by optical reader 7, the position of optical code 2 may reasonably be assumed to be unchanged at the next scan following that in which optical code 2 is decoded. As such, at the next scan following that in which optical code 2 is decoded, the output values of the analog-digital converter are memorized at frequency Fc, and the value of distance K to be associated to optical code 2 is stored in a given storage location corresponding to scan angle β. To make the best use of optical readers 7, therefore, scan line 16 is preferably, but not necessarily, defined by the lateral edges of branch 14 of belt 12, in which case, the two rays from optical reader 7 and defining scan plane n must intersect the conveying surface of articles 3 at said lateral edges of branch 14 of belt 12. Finally, to correctly determine when each article 3 exits read area 6, read area 6 must terminate downstream from the last scan line 16 encountered by each article 3 traveling in direction 8. If presence sensor 11 is provided, the length of read area 6 is preferably, but not necessarily, equal to [TA(max)-SA(min)], where TA(max) indicates the greater of distances TA, SA(min) indicates the lesser of distances SA, and TA and SA respectively indicate, for each scan line 16, the maximum and minimum distance from the position of sensor 11. The main advantage of the method and machine 1 described above lies in reading optical code 2 at the same time the presence of article 3 bearing the optical code is detected, thus enabling optical code 2 to be associated immediately to respective article 3 with no risk of error. The solution described therefore provides for dispensing with the association procedure typical of known machines, while at the same time ensuring total reliability. Further advantages are derived from the fact that machine 1 is not subject to the so-called "shadow effect" typical of known machines, and provides for catering to articles 3 of any shape. Another advantage is that machine 1 is cheaper to produce by dispensing with the measuring device M typical of known machines. And finally, in the event optical reader 20 is provided, another advantage lies in the possibility of supplying a number of articles 3 simultaneously to the input of read area 6.

Claims: A method of reading and associating read optical codes (2) to corresponding articles, comprising the steps of: feeding through a read area (6) a succession of articles (3) each having at least one respective optical code (2) on at least one surface (4); reading said at least one optical code (2) on said articles (3) within said read area (6) by means of at least one optical reader (7, 20); characterized by determining the position in space of said at least one optical code (2) with respect to a given reference system; and associating said at least one read optical code (2) to the corresponding article (3). A method as claimed in Claim 1, wherein said step of reading the optical code (2) and said step of determining the position in space of the optical code (2) are substantially simultaneous. A method as claimed in Claim 2, wherein said step of determining the position in space of the optical code (2) comprises the substeps of: determining, when reading the optical code (2), the distance (K) of the optical code (2) with respect to the optical reader (7, 20) taking the reading, and the scan angle (β) between a first reference ray (17) from said optical reader (7, 20) and a second ray (15) joining said optical reader (7, 20) to the optical code (2); said distance (K) and said scan angle (β) being the polar coordinates of said optical code (2) with respect to the optical reader (7, 20) by which the reading was taken; and converting the polar coordinates of the optical code (2) into space coordinates associated with said given reference system. A method as claimed in Claim 3, wherein said second ray (15) joins said optical reader (7, 20) to an initial end of the optical code (2); and said space coordinates of the optical code (2) are the space coordinates of the initial end of the optical code (2). A method as claimed in at least one of the foregoing Claims, wherein said step of associating the read optical code (2) comprises the substeps of: determining, after the optical code (2) is read, the displacement, as a function of time, of the optical code (2) and corresponding article (3) within said read area (6); determining, on the basis of the displacement of the article (3) and corresponding optical code (2), the position in space of the optical code (2) and corresponding article (3) with respect to said given reference system; and associating the optical code leaving said read area (6) to the article (3) also leaving the read area (6). A method as claimed in at least one of the foregoing Claims from 1 to 4, characterized by comprising, between said step of feeding said articles (3) and said step of reading said optical code (2), the step of detecting the entry of said articles (3) into said read area (6), to determine, as a function of time, the distribution of said articles (3) within the read area (6). A method as claimed in Claim 6, wherein said step of detecting the entry of the articles (3) into the read area (6) comprises the substeps of: determining the entry into said read area (6) of the front end of the articles (3) in the traveling direction (8) of the articles (3); determining the entry into said read area (6) of the rear end of the articles (3) in said traveling direction (8); determining the size of the articles (3) in the traveling direction (8) of the articles (3); and determining, with respect to said given reference system, successive displacements of the articles (3) within said read area (6) and in said traveling direction (8). A method as claimed in Claim 6, wherein said step of determining the entry of the articles (3) into the read area (6) comprises the substeps of: determining the number of articles (3) entering said read area (6) and the respective volumes; and determining, with respect to said given reference system, successive displacements of the articles (3) within said read area (6) and in said traveling direction (8). A method as claimed in Claim 7 or 8, wherein said step of associating said read optical code (2) comprises the substeps of: determining the distribution of the articles (3) within said read area (6) at the instant in which the optical code (2) is read; determining, with reference to said distribution, which of said articles (3) occupied the same position in space as said optical code (2); and associating said read optical code (2) to the article (3) which occupied the same position in space. A method as claimed in Claim 3 and/or 4, wherein said substep of determining said distance (K) and said scan angle (β) relative to the optical code (2) comprises successively performing a first scan of said optical code (2) to decode the optical code (2) and determine the scan angle (β), and a second scan of said optical code (2) to determine the distance (K) of the optical code (2) from the optical reader (7, 20) taking the reading. A method as claimed in Claim 10, wherein said optical code (2) must be sampled at least twice in the course of said second scan. A machine (1) for reading optical codes (2) on a succession of articles (3) each having at least one optical code (2) on at least one surface (4) and for associating read optical codes (2) to respective articles (3), comprising: a conveying device (5) for feeding the succession of articles (3) in a given traveling direction (8) through a read area (6); optical reading means (7, 20) located at said read area (6) and arranged for reading said at least one optical code (2); characterized by position determining means (7, 20) located at said read area (6) and arranged for determining the position in space of said at least one optical code (2) ; a processing unit (9) connected to said optical reading means (7, 20) and to said position determining means (7, 20), and arranged to associate said at least one read optical code (2) to the corresponding article (3) on the basis of the determined position of said at least one optical code (2). A machine (1) as claimed in claim 12, characterized by further comprising measuring means (10) for determining displacement of the articles (3) in said direction (8), said measuring means being connected to said processing unit (9). A machine as claimed in Claim 12 or 13, characterized in that the optical reading means comprise at least two optical readers (7, 20), each defining a respective scan line (16) in said read area (6); the two optical readers (7, 20) being so arranged that the respective scan lines (16) form respective different angles (gamma) with said traveling direction (8) of the articles (3). A machine as claimed in any of Claims 12 to 14, characterized by comprising detecting means (11, 20) connected to said processing unit (9), and arranged for detecting the presence of said articles (3) at a respective input of said read area (6). A machine as claimed in Claim 15, characterized in that said detecting means (11, 20) comprise a presence sensor (11) located at the input of said read area (6), and by means of which said processing unit (9) determines, as a function of time, the distribution of the articles (3) within said read area (6) and in said traveling direction (8). A machine as claimed in Claim 15, characterized in that said detecting means (11, 20) comprise an optical reader (20) located at the input of said read area (6), and by means of which said processing unit (9) determines the volume of the articles (3) and the distribution of the articles (3) on said conveying device (5) and within said read area (6) as a function of time.

Inventors: BENGALA MORENO, BENGALA, MORENO
Applicants: DATALOGIC SPA, DATALOGIC S.P.A.
Application year: 1996
Main classification: G06K7
IPC codes: G06K7