JPH04268982A - Optical reader - Google Patents

Optical reader

Info

Publication number
JPH04268982A
JPH04268982A JP3050277A JP5027791A JPH04268982A JP H04268982 A JPH04268982 A JP H04268982A JP 3050277 A JP3050277 A JP 3050277A JP 5027791 A JP5027791 A JP 5027791A JP H04268982 A JPH04268982 A JP H04268982A
Authority
JP
Japan
Prior art keywords
barcode
count value
reading
line sensor
range
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP3050277A
Other languages
Japanese (ja)
Other versions
JP2742144B2 (en
Inventor
Kazuo Hasegawa
和男 長谷川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alps Alpine Co Ltd
Original Assignee
Alps Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alps Electric Co Ltd filed Critical Alps Electric Co Ltd
Priority to JP3050277A priority Critical patent/JP2742144B2/en
Priority to US07/839,463 priority patent/US5336874A/en
Publication of JPH04268982A publication Critical patent/JPH04268982A/en
Application granted granted Critical
Publication of JP2742144B2 publication Critical patent/JP2742144B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PURPOSE:To read and decode only one desired bar code in an optical reader using a line sensor with scanning range extending over plural bar codes. CONSTITUTION:The Bar codes 6A, 6B are included in the scanning range of the line sensor 10, and a specific range of one bar code within the scanning range is defined in constant memory 34 as a reading range. It is decided whether or not the line sensor 10 performs scanning the reading range by comparing the count value of one scan counter 4 with data in the constant memory 34 by a comparator 35, and a switch 216 is turned on while the line sensor 10 scans the reading range by the output RRC of the comparator 35. An address counter 213 is operated by a start signal MST from a margin decision part 211 when the switch 216 is turned on, and write on count value memory 20 is performed.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明は、紙などのメデイア上に
印刷されたバーコードを読み取る光学読取装置に係り、
特に、バーコードの読取りエラー検出に関する。
[Field of Industrial Application] The present invention relates to an optical reading device for reading barcodes printed on media such as paper.
In particular, it relates to barcode reading error detection.

【0002】0002

【従来の技術】バーコードは、文字や数字などのキヤラ
クタを幅が異なる複数個のバーでもつてコード化するこ
とにより、商品の値段や商品名などのキヤラクタ列をバ
ーの配列でもつて表わすようにしたものである。キヤラ
クタを表わすコードを、以下、キヤラクタコードという
が、1キヤラクタコードを表わすバーの個数や太バー、
細バーの組合せパターンはバーコードの形式によつて異
なつているものの、いずれの形式も、全てのキヤラクタ
コードを表わすバーの列の前後に夫々マージン(空白部
)とスタートコード、ストツプコードを表わすバー列が
設けられている。
[Prior Art] A barcode is a barcode in which characters such as letters and numbers are coded using multiple bars of different widths, so that a string of characters such as a product's price or product name can be represented by an array of bars. This is what I did. The code representing a character is hereinafter referred to as a character code, and the number of bars representing one character code, the thick bar,
Although the combination pattern of thin bars differs depending on the barcode format, all formats have margins (blank spaces) and bars representing start and stop codes before and after the row of bars representing all character codes. A queue is set up.

【0003】以下では、説明を明確にするために、バー
コードの形式をInterleaved  2of5と
する。これは、5本の黒バーで1キヤラクタを表わし、
また、黒バーの間隔をなす白バー5本でも1キヤラクタ
を表わすようにしたものである。1つのバーコードは複
数個のキヤラクタコードを表わしているが、各キヤラク
タコードを1桁として複数桁のキヤラクタコードを表わ
している。
[0003] In the following, for clarity of explanation, the format of the barcode is assumed to be Interleaved 2 of 5. This represents one character with five black bars,
Furthermore, five white bars at intervals between black bars represent one character. One barcode represents a plurality of character codes, each character code being one digit.

【0004】この種のバーコード表示では、このバーコ
ード表示の左側での所定幅の媒体の地色の部分をスター
トマージン、右側での所定幅の媒体の地色の部分をスト
ップマージンとし、これらマージンをバーコード表示が
なされていることを判定するために使用する。バーコー
ド表示の左端の細バーとこれに続く細バーとはスタート
コードを表わし、右端の細バーとこれより1つ左側の太
バーとがストップコードを表わしている。そして、これ
らスタートコード、ストップコードとの間に、所定本数
の細バーや太バー(黒バー)と細スペースや太スペース
(白バー)との組合わせでもって夫々の表示内容を判別
するキャラクタコードが表示されている。ここで、キャ
ラクタコードの配列方向(すなわち、スタートコードか
らストップコードへの方向)を順方向とすると、バーコ
ードは上記の順方向に読み取られるようにするのが一般
的であるが、逆方向に読み取られる場合もあり得、この
ような場合には、ストップコードがスタートコードであ
るかのように、また、スタートコードがストップコード
であるかのように読み取られるから、読取り方向によつ
てスタートコード、ストツプコードのパターンが違うこ
とになり、これによってバーコードの読み取り方向を判
別できるようにしている。
[0004] In this type of barcode display, the part of the background color of the medium of a predetermined width on the left side of this barcode display is used as a start margin, and the part of the base color of the medium of a predetermined width on the right side of this barcode display is used as a stop margin. The margin is used to determine whether the barcode is displayed. The thin bar at the left end of the barcode display and the thin bar following it represent the start code, and the thin bar at the right end and the thick bar one position to the left represent the stop code. Then, between these start codes and stop codes, a character code is used to determine the display contents by a combination of a predetermined number of thin bars or thick bars (black bars) and thin spaces or thick spaces (white bars). is displayed. Here, assuming that the direction in which the character codes are arranged (that is, from the start code to the stop code) is the forward direction, barcodes are generally read in the above forward direction, but in the reverse direction. In such cases, the stop code is read as if it were a start code, and the start code is read as if it were a stop code. , the stop code pattern is different, and this makes it possible to determine the reading direction of the bar code.

【0005】かかるバーコードを読み取る光学読取装置
はバーコードスキヤナと呼ばれるが、以下、ラインセン
サを用いた従来のバーコードスキヤナの一例を図5、図
6により説明する。但し、同図において、1は読取中信
号ラツチ回路、2は照光部、3は光学結像部、4は1走
査カウンタ、5はメデイア、6はバーコード、7はスタ
ートパルス発生回路、8はパルス幅設定回路、9はレベ
ル検出回路、10は光電変換部、11,12は分周回路
、13は発振回路、14は二値化回路、15は走査回数
定数メモリ、16は走査回数カウンタ、17は走査回数
比較器、18はエツジ検出回路、19はタイマカウンタ
、20はカウント値メモリ、21はカウント値メモリ制
御部、211はマージン判定部、212はフアーストス
ロー判定部、213はアドレスカウンタ、214はアド
レスデコーダ、215はリセツト回路、22はビツトイ
メージ変換器、23はキヤラクタコードビツトイメージ
メモリ、24はストツプコードビツトイメージメモリ、
25はビツトイメージメモリ制御部、26はスタートス
トツプ判定部、27はキヤラクタ変換部、28はキヤラ
クタコード一致比較器、29はエラー処理回路、30は
定数メモリ、31はデータ一致回数カウンタ、32はデ
ータ一致回数比較器、33は出力データ変換部である。
An optical reading device for reading such a barcode is called a barcode scanner. Hereinafter, an example of a conventional barcode scanner using a line sensor will be explained with reference to FIGS. 5 and 6. However, in the figure, 1 is a reading signal latch circuit, 2 is an illumination unit, 3 is an optical imaging unit, 4 is a 1-scan counter, 5 is a media, 6 is a bar code, 7 is a start pulse generation circuit, and 8 is a start pulse generation circuit. A pulse width setting circuit, 9 a level detection circuit, 10 a photoelectric conversion section, 11 and 12 a frequency dividing circuit, 13 an oscillation circuit, 14 a binarization circuit, 15 a scanning number constant memory, 16 a scanning number counter, 17 is a scanning number comparator, 18 is an edge detection circuit, 19 is a timer counter, 20 is a count value memory, 21 is a count value memory control section, 211 is a margin judgment section, 212 is a first throw judgment section, 213 is an address counter , 214 is an address decoder, 215 is a reset circuit, 22 is a bit image converter, 23 is a character code bit image memory, 24 is a stop code bit image memory,
25 is a bit image memory control section, 26 is a start/stop determination section, 27 is a character conversion section, 28 is a character code match comparator, 29 is an error processing circuit, 30 is a constant memory, 31 is a data match counter, 32 3 is a data matching frequency comparator, and 33 is an output data converter.

【0006】図5において、発振回路13は常時動作し
ており、その出力信号が分周回路11で分周されてクロ
ツクφ1が、また、分周回路12で分周されてクロツク
φ2が夫々形成される。クロツクφ1はラインセンサか
らなる光電変換部10と1走査カウンタ4とに供給され
、クロツクφ2はタイマカウンタ19に供給される。
In FIG. 5, an oscillation circuit 13 is always operating, and its output signal is divided by a frequency dividing circuit 11 to form a clock φ1, and by a frequency dividing circuit 12 to form a clock φ2. be done. The clock φ1 is supplied to a photoelectric conversion section 10 consisting of a line sensor and a one-scan counter 4, and the clock φ2 is supplied to a timer counter 19.

【0007】図示しないホスト機器から読取開始信号S
が供給されると、読取中信号ラツチ回路1はセツトされ
て読取中信号READを出力し、照光部2とスタートパ
ルス発生回路7とに供給する。照光部2は発光素子とし
てLEDを有し、読取中信号READによつてLEDを
点灯させてメデイア5上のバーコード6の印刷領域を照
光する。この印刷領域から反射された光は光学結像部3
を介して光電変換部10であるラインセンサの受光面に
照射され、この光学結像部3によつてラインセンサの受
光面にバーコード6の像が結像される。以下、光電変換
部10をラインセンサとして説明する。
A read start signal S is received from a host device (not shown).
When the reading signal latch circuit 1 is supplied, the reading signal latch circuit 1 is set and outputs the reading signal READ, which is supplied to the illuminating section 2 and the start pulse generating circuit 7. The illumination unit 2 has an LED as a light emitting element, and lights up the LED in response to a reading signal READ to illuminate the printing area of the barcode 6 on the medium 5. The light reflected from this printing area is transmitted to the optical imaging section 3.
The barcode 6 is irradiated onto the light-receiving surface of the line sensor, which is the photoelectric conversion section 10, through the optical imaging section 3, and an image of the barcode 6 is formed on the light-receiving surface of the line sensor. The photoelectric conversion unit 10 will be described below as a line sensor.

【0008】スタートパルス発生回路7は、次の4条件
、すなわち、 (1)1走査カウンタ4から走査終了信号SEDが供給
されている (2)読取中信号ラツチ回路1から読取中信号READ
が供給されている (3)パルス幅設定回路8でパルス幅設定が完了し、そ
の設定値が送られてきている (4)キヤラクタ変換部27からキヤラクタ変換終了信
号CEDが供給されている の条件を全て同時に満足しているとき、スタートパルス
STを発生する。かかる条件を、以下、パルス発生条件
という。
The start pulse generating circuit 7 is operated under the following four conditions: (1) the scan end signal SED is supplied from the 1-scan counter 4; (2) the reading signal READ is supplied from the reading signal latch circuit 1;
(3) The pulse width setting circuit 8 has completed the pulse width setting and the set value has been sent. (4) The character conversion end signal CED has been supplied from the character conversion section 27. When all of these conditions are satisfied at the same time, a start pulse ST is generated. Such conditions are hereinafter referred to as pulse generation conditions.

【0009】初期状態では、1走査カウンタ4は走査終
了信号SEDを、パルス幅設定回路8は初期値が設定さ
れていてこれを、キヤラクタ変換部27(図6)はキヤ
ラクタ変換終了信号CEDを夫々出力しており、読取中
信号ラツチ回路1から読取中信号READが供給開始さ
れると、スタートパルス発生回路7はパルス発生条件を
満足し、パルス幅設定回路8の初期値で決まるパルス幅
のスタートパルスSTを発生する。このスタートパルス
STは1走査カウンタ4とラインセンサ10とに供給さ
れる。  ラインセンサ10は、スタートパルスSTに
より、受光面の像をクロツクφ1が供給される毎に1画
素ずつ読み取り、バーコード6を走査して読み取る。こ
れにより、ラインセンサ10からは、バーコード6の黒
バーと白バーとでレベルが異なる電気信号が出力される
。 また、1走査カウンタ4はスタートパルスSTによつて
クロツクφ1のカウントを開始して走査終了信号SED
を出力しなくなり、ラインセンサ10の1走査分のクロ
ツクφ1をカウントすると、再び走査終了信号SEDを
出力する。この走査終了信号SEDはスタートパルス発
生回路7、走査回数カウンタ16、カウント値メモリ2
0、マージン判定回路211およびアドレスカウンタ2
13に供給される。
In the initial state, the one-scan counter 4 receives the scan end signal SED, the pulse width setting circuit 8 receives the initial value set, and the character converter 27 (FIG. 6) receives the character conversion end signal CED. When the reading signal READ is started to be supplied from the reading signal latch circuit 1, the start pulse generation circuit 7 satisfies the pulse generation conditions and starts the pulse width determined by the initial value of the pulse width setting circuit 8. Generate pulse ST. This start pulse ST is supplied to the one-scan counter 4 and the line sensor 10. The line sensor 10 reads the image on the light-receiving surface one pixel each time the clock φ1 is supplied, and scans and reads the bar code 6 in response to the start pulse ST. As a result, the line sensor 10 outputs electrical signals having different levels for the black bar and the white bar of the barcode 6. Furthermore, the one-scan counter 4 starts counting the clock φ1 in response to the start pulse ST, and outputs the scan end signal SED.
When the clock φ1 for one scan of the line sensor 10 is counted, the scan end signal SED is output again. This scan end signal SED is sent to the start pulse generation circuit 7, the scan number counter 16, and the count value memory 2.
0, margin determination circuit 211 and address counter 2
13.

【0010】スタートパルスSTのパルス幅はラインセ
ンサ10での画素をなす各コンデンサの充電時間を決め
るものであり、この充電時間に応じてラインセンサ10
の出力信号のレベルの大きさが決まる。この出力信号は
レベル検出回路9に供給されてレベルの大きさが検出さ
れ、この検出結果に応じてパルス幅設定回路8で最適レ
ベルとなるようなパルス幅が設定される。スタートパル
ス発生回路7は、1走査カウンタ4から再び走査終了信
号SEDが供給されてパルス発生条件を満足すると、再
びパルス幅設定回路8の設定値に応じたパルス幅のスタ
ートパルスSTを発生し、ラインセンサ10を走査開始
させ、1走査カウンタ4をカウント開始させる。
The pulse width of the start pulse ST determines the charging time of each capacitor forming a pixel in the line sensor 10, and the line sensor 10
The magnitude of the output signal level is determined. This output signal is supplied to a level detection circuit 9 to detect the magnitude of the level, and in accordance with the detection result, a pulse width setting circuit 8 sets a pulse width that provides an optimum level. When the start pulse generation circuit 7 is supplied with the scan end signal SED again from the 1-scan counter 4 and satisfies the pulse generation conditions, it again generates a start pulse ST with a pulse width according to the setting value of the pulse width setting circuit 8. The line sensor 10 is started to scan, and the 1-scan counter 4 is started to count.

【0011】このようにして、ラインセンサ10はバー
コード6を繰り返し走査する。
In this way, the line sensor 10 repeatedly scans the barcode 6.

【0012】ラインセンサ10の出力信号は、二値化回
路14でレベルが2値化された後、エツジ検出回路18
でその立上り、立下りエツジが検出される。エツジ検出
回路18から出力されるエツジパルスEGはタイマカウ
ンタ19とアドレスカウンタ213とに供給される。
The output signal of the line sensor 10 is binarized in level by a binarization circuit 14 and then sent to an edge detection circuit 18.
Its rising and falling edges are detected. The edge pulse EG output from the edge detection circuit 18 is supplied to a timer counter 19 and an address counter 213.

【0013】タイマカウンタ19はエツジパルスEGを
リセツト信号として分周回路12からのクロツクφ2を
カウントする。したがつて、タイマカウンタ19からは
、バーコード6の各バーの幅を表わすカウント値Nを出
力する。このカウント値Nはカウント値メモリ制御部2
1によつて制御されるカウント値メモリ20に書き込ま
れる。
The timer counter 19 counts the clock φ2 from the frequency dividing circuit 12 using the edge pulse EG as a reset signal. Therefore, the timer counter 19 outputs a count value N representing the width of each bar of the bar code 6. This count value N is determined by the count value memory control section 2.
1 is written into the count value memory 20 controlled by 1.

【0014】カウント値メモリ制御部21はマージン判
定部211、フアーストスロー判定部212、アドレス
カウンタ213、アドレスデコーダ214およびリセツ
ト回路215によつて構成されている。マージン判定部
211はバーコード6の先頭バーの前と最後のバーの後
に設けられた空白部(スタートマージン、ストツプマー
ジン)に対するタイマカウンタ19のカウント値Nと、
空白部分とバーコード部分のカウント値との比により、
バーコードの開始と終了とを検出し、開始信号MSTと
終了信号MEDとを発生する。また、スタートマージン
、ストツプマージンが不足のときには、マージンエラー
信号MERを出力してリセツト回路215に供給する。 1走査カウンタ4から走査終了信号SEDが供給される
ときには、このマージン判定回路211は動作しない。 フアーストスロー判定部212はタイマカウンタ19か
ら出力されるカウント値Nの大きさを検出し、エツジ検
出回路18からのエツジパルスEGの間隔が狭すぎたり
、広すぎたりしたときにフアーストスローエラー信号を
出力してリセツト回路215に供給する。メデイア5で
のバーコード6の印刷ににじみや傷、ほこりの付着によ
つてバーが狭くなつたり、広がつたりして読み取られる
と、フアーストスロー判定部212はフアーストスロー
エラー信号を出力する。リセツト回路215は、マージ
ン判定部211からマージンエラー信号MERが供給さ
れると、あるいはフアーストスロー判定部212からフ
アーストスローエラー信号が供給されると、リセツト信
号を発生してアドレスカウンタ213とカウント値メモ
リ20とに送る。
The count value memory control section 21 includes a margin determination section 211, a first throw determination section 212, an address counter 213, an address decoder 214, and a reset circuit 215. The margin determination unit 211 calculates the count value N of the timer counter 19 for the blank area (start margin, stop margin) provided before the first bar and after the last bar of the barcode 6,
Depending on the ratio of the count value of the blank area and the barcode area,
The start and end of the barcode are detected and a start signal MST and an end signal MED are generated. Furthermore, when the start margin and stop margin are insufficient, a margin error signal MER is output and supplied to the reset circuit 215. When the scan end signal SED is supplied from the 1-scan counter 4, the margin determination circuit 211 does not operate. The first throw determination unit 212 detects the size of the count value N output from the timer counter 19, and generates a first throw error signal when the interval between edge pulses EG from the edge detection circuit 18 is too narrow or too wide. is output and supplied to the reset circuit 215. When the barcode 6 printed on the media 5 becomes narrower or wider due to smearing, scratches, or dust adhesion and is read, the first throw determination unit 212 outputs a first throw error signal. do. When the margin error signal MER is supplied from the margin determination section 211 or the first throw error signal is supplied from the first throw determination section 212, the reset circuit 215 generates a reset signal and starts counting with the address counter 213. and the value memory 20.

【0015】アドレスカウンタ213は、1走査カウン
タ4から走査終了信号SEDが供給されなくなつてライ
ンセンサ10が走査を開始すると、マージン判定部21
1から開始信号MSTが供給されるとともに、エツジ検
出回路18からのエツジ信号EGを初期値からカウント
し始める。アドレスカウンタ213から出力されるカウ
ント値はアドレスデコーダ214でデコードされ、アド
レス信号ADRとしてカウント値メモリ20に供給され
る。カウント値メモリ20は1走査カウンタ4から走査
終了信号SEDが供給されなくなると書込みモードとな
り、タイマカウンタ19から出力されるカウント値Nは
カウント値メモリ20のアドレス信号ADRによつて指
定されるアドレスに順次書き込まれる。
When the scan end signal SED is no longer supplied from the 1-scan counter 4 and the line sensor 10 starts scanning, the address counter 213 detects the margin determination unit 21.
1, the start signal MST is supplied, and the edge signal EG from the edge detection circuit 18 starts counting from the initial value. The count value output from address counter 213 is decoded by address decoder 214 and supplied to count value memory 20 as address signal ADR. The count value memory 20 enters the write mode when the scan end signal SED is no longer supplied from the 1-scan counter 4, and the count value N output from the timer counter 19 goes to the address specified by the address signal ADR of the count value memory 20. Written sequentially.

【0016】カウント値メモリ20にバーコード6の全
てのバーに対するカウント値Nが書き込まれ、マージン
判定部211から終了信号MEDが出力されると、アド
レスカウンタ213はカウントを停止して初期値がセツ
トされる。次に、ラインセンサ10の1走査が終つて1
走査カウンタ4が走査終了信号SEDを出力すると、カ
ウント値メモリ20は読出しモードとなり、アドレスカ
ウンタ213は、内部クロツクにより、初期値から順次
1ずつインクリメントされたカウント値を出力する。こ
のカウント値はアドレスデコーダ214でカウント値メ
モリ20のアドレス信号ADRとなる。したがつて、カ
ウント値メモリ20からは、書き込まれたカウント値N
がその書き込まれた順に読み出される。
When the count value N for all bars of the barcode 6 is written into the count value memory 20 and the end signal MED is output from the margin determination section 211, the address counter 213 stops counting and the initial value is set. be done. Next, after one scan of the line sensor 10 is completed, one
When the scan counter 4 outputs the scan end signal SED, the count value memory 20 enters the read mode, and the address counter 213 outputs the count value sequentially incremented by 1 from the initial value by the internal clock. This count value becomes the address signal ADR of the count value memory 20 in the address decoder 214. Therefore, from the count value memory 20, the written count value N
are read in the order they were written.

【0017】なお、リセツト回路215がリセツト信号
を出力すると、これによつてアドレスカウンタ213は
初期値にリセツトされ、カウント値メモリ20はクリア
される。マージン判定部211は次のマージン判定まで
マージンエラー信号MERを出力し続け、フアーストス
ロー判定部212は1走査カウンタ4から次の走査終了
信号SEDが供給されるまでフアーストスローエラー信
号を出力し続ける。
Note that when the reset circuit 215 outputs a reset signal, the address counter 213 is reset to its initial value and the count value memory 20 is cleared. The margin determination unit 211 continues to output the margin error signal MER until the next margin determination, and the first throw determination unit 212 continues to output the first throw error signal until the next scan end signal SED is supplied from the 1-scan counter 4. continue.

【0018】カウント値メモリ20から出力されるカウ
ント値Nはビツトイメージ変換部22に供給され、予め
設定されている閾値と比較されてバーの種類を表わすビ
ツトイメージBIに変換される。
The count value N output from the count value memory 20 is supplied to a bit image converter 22, where it is compared with a preset threshold and converted into a bit image BI representing the type of bar.

【0019】次に、図6について説明する。ビツトイメ
ージ変換部22からのビツトイメージBIはキヤラクタ
コードビツトイメージメモリ23、ストツプコードビツ
トイメージメモリ24およびビツトイメージメモリ制御
部25に供給される。ビツトイメージメモリ制御部25
は、ビツトイメージBIの出力順序を判定するなどして
、ビツトイメージBIがキヤラクタコードをなすビツト
イメージ(キヤラクタコードビツトイメージ)か、ある
いはストツプコードをなすビツトイメージ(ストツプコ
ードビツトイメージ)かを識別し、ビツトイメージBI
がキヤラクタコードビツトイメージであるときには、ビ
ツトイメージBIを5個ずつ区分して夫々1バイトのデ
ータとし、これらデータを順次キヤラクタコードビツト
イメージメモリ23に書き込み、ビツトイメージBIが
ストツプコードビツトイメージであるときにはこれをス
トツプコードビツトイメージメモリ24に書き込む。 Interleaved  2of5の場合、黒バーと
白バーとに対するビツトイメージが区分され、夫々につ
いて1バイトのデータが形成されてキヤラクタコードビ
ツトイメージメモリ23に書き込まれる。キヤラクタコ
ードビツトイメージメモリ23、ストツプコードビツト
イメージメモリ24での書込みが終ると、ビツトイメー
ジメモリ制御部25は、キヤラクタコードビツトイメー
ジメモリ23から上記の1バイトのデータCCDを順次
読み出してキヤラクタ変換部27に送り、また、ストツ
プコードビツトイメージメモリ24からストツプコード
ビツトイメージSCDを読み出し、スタートストツプ判
定部26に送る。
Next, FIG. 6 will be explained. The bit image BI from the bit image converter 22 is supplied to a character code bit image memory 23, a stop code bit image memory 24, and a bit image memory controller 25. Bit image memory control section 25
determines whether the bit image BI is a character code bit image (character code bit image) or a stop code (stop code bit image) by determining the output order of the bit image BI. Identify and bit image BI
When is a character code bit image, the bit image BI is divided into five pieces, each of which is 1 byte of data, and these data are sequentially written into the character code bit image memory 23, so that the bit image BI becomes a stop code bit image. If so, it is written into the stop code bit image memory 24. In the case of Interleaved 2 of 5, bit images for black bars and white bars are separated, and 1 byte of data is formed for each and written to the character code bit image memory 23. When the writing in the character code bit image memory 23 and the stop code bit image memory 24 is completed, the bit image memory control section 25 sequentially reads out the 1-byte data CCD from the character code bit image memory 23 and writes the data into the character code bit image memory 23 and the stop code bit image memory 24. Also, the stop code bit image SCD is read from the stop code bit image memory 24 and sent to the start/stop determining section 26.

【0020】スタートストツプ判定部26においては、
バーコードに使用される正しいストツプコードに対し、
正しく正、逆方向に読み取つたときに得られる2種類の
ビツトイメージによるビツトパターン(以下、登録スト
ツプコードパターンという)がROMに登録されており
、ストツプコードビツトイメージメモリ24からの2つ
のビツトイメージによるデータSCDのビツトパターン
(以下、検出ストツプコードパターンという)が登録ス
トツプコードパターンと比較され、いずれの登録ストツ
プコードパターンと一致するか判定される。この検出ス
トツプコードパターンと一致する登録ストツプコードパ
ターンがあるときには、これによつてバーコード6の読
取り方向も判断でき、この一致した登録ストツプコード
パターンに対応したデータ(ストツプコードデータ)S
SCを出力データ変換部33に供給するとともに、変換
方向指示信号CDDをキヤラクタ変換部27に送る。
In the start/stop determining section 26,
For the correct stopcode used in the barcode,
A bit pattern (hereinafter referred to as a registered stop code pattern) consisting of two types of bit images obtained when correctly read in the forward and reverse directions is registered in the ROM, and two bit patterns from the stop code bit image memory 24 are stored in the ROM. The bit pattern of the image data SCD (hereinafter referred to as a detected stop code pattern) is compared with the registered stop code patterns to determine which registered stop code pattern it matches. When there is a registered stopcode pattern that matches this detected stopcode pattern, the reading direction of the barcode 6 can also be determined based on this, and the data (stopcode data) corresponding to this matched registered stopcode pattern can be determined. S
SC is supplied to the output data converter 33, and a conversion direction instruction signal CDD is sent to the character converter 27.

【0021】検出ストツプコードパターンSCDに一致
する登録ストツプコードパターンがないときには、スタ
ートストツプ判定部26はエラー信号ERR1を出力し
、エラー処理回路29に供給する。
When there is no registered stop code pattern matching the detected stop code pattern SCD, the start/stop determining section 26 outputs an error signal ERR1 and supplies it to the error processing circuit 29.

【0022】キヤラクタ変換部27においては、バーコ
ードに使用される全てのキヤラクタコードに対し、正方
向に正しく読み取つたときに得られるビツトイメージを
含んだ1バイトのデータによるビツトパターン(以下、
登録キヤラクタコードパターンという)がROMに登録
されており、キヤラクタコードビツトイメージメモリ2
3からの1バイトのデータCCDのビツトパターン(以
下、検出キヤラクタコードパターンという)が登録キヤ
ラクタコードパターンと比較され、いずれの登録キヤラ
クタコードパターンと一致するか判定される。この場合
、バーコード6が逆方向に読み取られているときには、
スタートストツプ判定部26からの変換方向指示信号C
DDにより、検出キヤラクタコードパターンCCDが前
後反転されて登録キヤラクタコードパターンと比較され
る。
The character conversion unit 27 converts all character codes used in barcodes into bit patterns (hereinafter referred to as
The registered character code pattern) is registered in the ROM, and the character code bit image memory 2
The bit pattern of the 1-byte data CCD from 3 (hereinafter referred to as the detected character code pattern) is compared with the registered character code pattern to determine which registered character code pattern it matches. In this case, when the barcode 6 is read in the opposite direction,
Conversion direction instruction signal C from start/stop determining section 26
The detected character code pattern CCD is reversely reversed by the DD and compared with the registered character code pattern.

【0023】検出キヤラクタコードパターンCCDが登
録キヤラクタコードパターンのいずれかと一致すると、
キヤラクタ変換部27は一致した登録キヤラクタコード
パターンに対するキヤラクタデータCDを出力し、キヤ
ラクタコード一致比較器28と出力データ変換部33と
に送る。検出キヤラクタコードパターンCCDがいずれ
の登録キヤラクタコードパターンと一致しないときには
、キヤラクタ変換部27はエラー信号ERR2を発生し
てエラー処理回路29に送る。また、バーコード6の1
走査分の検出キヤラクタコードパターンCCDが全てキ
ヤラクタデータCDに変換されると、キヤラクタ変換部
27はキヤラクタ変換終了信号CEDを発生して図5の
スタートパルス発生回路7に供給する。これにより、こ
のスタートパルス発生回路7はスタートパルスSTを発
生し、ラインセンサ10(図5)はバーコード6の次の
読取り走査を行なう。
[0023] When the detected character code pattern CCD matches any of the registered character code patterns,
The character converter 27 outputs character data CD for the matched registered character code pattern, and sends it to the character code match comparator 28 and the output data converter 33. When the detected character code pattern CCD does not match any registered character code pattern, the character converter 27 generates an error signal ERR2 and sends it to the error processing circuit 29. Also, barcode 6 1
When all of the scanned detected character code patterns CCD are converted into character data CD, the character conversion section 27 generates a character conversion end signal CED and supplies it to the start pulse generation circuit 7 of FIG. As a result, the start pulse generating circuit 7 generates a start pulse ST, and the line sensor 10 (FIG. 5) performs the next reading scan of the bar code 6.

【0024】キヤラクタコード一致比較器28はキヤラ
クタ変換部27からの1走査分のキヤラクタデータCD
を保持し、これと次回の走査によつてキヤラクタ変換部
27から供給されるキヤラクタデータCDとを比較し、
全てのキヤラクタデータが一致したとき、一致パルスを
出力してデータ一致回数カウンタ31に供給する。デー
タ一致回数カウンタ31はこの一致パルスをカウントし
、このカウント値がデータ一致回数比較器32で定数メ
モリ30に記憶されている一致回数設定値と比較される
。データ一致回数カウンタ31のカウント値が一致回数
設定値以上となると、データ一致回数比較器32は読取
完了信号REND1を発生して出力データ変換部33に
送る。前回走査と今回走査とのキヤラクタ変換部27か
らのキヤラクタデータCDが1つでも一致しないと、キ
ヤラクタコード一致比較器28はエラー信号ERR3を
出力してエラー処理回路29に送るとともに、データ一
致回路カウンタ31をクリアする。
The character code match comparator 28 receives one scan of character data CD from the character converter 27.
and compares this with the character data CD supplied from the character converter 27 in the next scan,
When all character data match, a match pulse is output and supplied to the data match counter 31. The data matching number counter 31 counts the matching pulses, and this count value is compared with the matching number set value stored in the constant memory 30 by the data matching number comparator 32. When the count value of the data matching number counter 31 exceeds the matching number setting value, the data matching number comparator 32 generates a read completion signal REND1 and sends it to the output data converter 33. If even one character data CD from the character converter 27 between the previous scan and the current scan does not match, the character code match comparator 28 outputs an error signal ERR3 and sends it to the error processing circuit 29, and also detects a data match. Clear the circuit counter 31.

【0025】出力データ変換部33は、キヤラクタ変換
部27からのキヤラクタデータCDとスタートストツプ
判定部26からのストツプコードデータSSCをバーコ
ード6の走査毎に取り込んで最新のものを保持し、デー
タ一致回数比較器32から読取完了信号REND1が供
給されると、保持しているキヤラクタデータCDとスト
ツプコードデータSSCとを所定の形式に変換してホス
ト機器(図示せず)に送る。これとともに、読取終了を
表示するための表示指示信号DISをランプやブザーな
どの表示装置(図示せず)に送り、また、リセツト信号
RSTを発生して自身を初期化する。このリセツト信号
RSTは読取中信号ラツチ回路1(図5)などに供給さ
れ、これらをリセツトする。この読取中信号ラツチ回路
1は、リセツト信号RSTでリセツトされると、読取中
信号READを出力しなくなり、バーコード6の読取り
は停止する。照光部2も消灯する。
The output data conversion unit 33 takes in the character data CD from the character conversion unit 27 and the stop code data SSC from the start/stop determination unit 26 every time the barcode 6 is scanned, and holds the latest data. When the read completion signal REND1 is supplied from the data matching frequency comparator 32, the character data CD and stop code data SSC held are converted into a predetermined format and sent to the host device (not shown). . At the same time, it sends a display instruction signal DIS to indicate the completion of reading to a display device (not shown) such as a lamp or buzzer, and also generates a reset signal RST to initialize itself. This reset signal RST is supplied to the reading signal latch circuit 1 (FIG. 5), etc., and resets them. When the reading signal latch circuit 1 is reset by the reset signal RST, it stops outputting the reading signal READ and stops reading the bar code 6. The illumination unit 2 is also turned off.

【0026】このようにして、前後の走査によるキヤラ
クタデータが定数メモリ30での一定回数設定値による
回数(たとえば2回)連続して一致すると、バーコード
6が正しく読み取られたとして読取りが終るが、この回
数連続して一致しなければ、バーコード6の読取りが繰
り返されるのであるが、ある回数読取りが繰り返されて
もデータ一致回数比較器32から読取完了信号REND
1が出力されなければ、それ以上のバーコード6の読取
りは禁止される。
In this way, when the character data from the previous and subsequent scans match consecutively for a certain number of times (for example, twice) according to the predetermined number of times set in the constant memory 30, it is assumed that the barcode 6 has been read correctly and the reading ends. However, if they do not match this number of consecutive times, reading of the barcode 6 is repeated. However, even if reading is repeated a certain number of times, the data matching number comparator 32 does not output a reading completion signal REND.
If 1 is not output, further reading of the barcode 6 is prohibited.

【0027】すなわち、図5において、走査回数カウン
タ16は1走査カウンタ4が走査終了信号SEDを出力
する毎に1ずつカウントアツプする。この走査回数カウ
ンタ16のカウント値はラインセンサ10の走査回数を
表わし、走査回数比較器17で走査回数定数メモリ15
に設定されている定数と比較される。走査回数カウンタ
16のカウント値がこの定数以上となると、走査回数比
較器17は読取終了信号REND2を出力し、図6の出
力データ変換部33に供給する。
That is, in FIG. 5, the scanning number counter 16 counts up by 1 each time the scanning counter 4 outputs the scanning end signal SED. The count value of this scanning number counter 16 represents the number of scanning of the line sensor 10, and the scanning number constant memory 15 is
is compared with the constant set to . When the count value of the scanning number counter 16 exceeds this constant, the scanning number comparator 17 outputs a reading end signal REND2 and supplies it to the output data converter 33 of FIG.

【0028】そこで、この出力データ変換部33は、キ
ヤラクタデータやストツプコードデータをホスト機器に
送ることなく、リセツト信号RSTを出力して自身を初
期化する。これにより、バーコード6の読取りは失敗し
たものとしてバーコード6の読取りを中止する。また、
読取り不能を示す表示指示信号DISを表示装置に送る
Therefore, the output data converter 33 outputs the reset signal RST to initialize itself without sending character data or stop code data to the host device. As a result, the reading of the barcode 6 is deemed to have failed and the reading of the barcode 6 is stopped. Also,
A display instruction signal DIS indicating unreadability is sent to the display device.

【0029】エラー処理回路29は、エラー信号ERR
1,ERR2,ERR3のいずれが供給されても、キヤ
ラクタ変換リセツト信号CERTを出力し、図5のカウ
ント値メモリ制御部21、ビツトイメージ変換部22や
図6のキヤラクタコードビツトイメージメモリ23、ス
トツプコードビツトイメージメモリ24、ビツトイメー
ジメモリ制御部25、スタートストツプ判定部26、キ
ヤラクタ変換部27などを初期化する。これにより、キ
ヤラクタ変換部27はキヤラクタ変換終了信号CEDを
出力する。
The error processing circuit 29 outputs an error signal ERR.
1, ERR2, and ERR3, the character conversion reset signal CERT is output, and the count value memory control section 21 and bit image conversion section 22 of FIG. 5 and the character code bit image memory 23 and ST of FIG. The top code bit image memory 24, bit image memory control section 25, start/stop determination section 26, character conversion section 27, etc. are initialized. As a result, the character conversion section 27 outputs a character conversion end signal CED.

【0030】以上のように、ラインセンサ10はバーコ
ード6を複数回読取り走査し、定数メモリ30の一致回
数設定値に等しい回数連続してキヤラクタコードが一致
すると、バーコード6の読取りが正しく行なわれたもの
とし、ホスト機器にこのキヤラクタコードを送つて読取
り動作を完了する。
As described above, the line sensor 10 reads and scans the barcode 6 multiple times, and when the character codes match consecutively a number of times equal to the number of matches set in the constant memory 30, the barcode 6 is read correctly. This character code is sent to the host device to complete the read operation.

【0031】[0031]

【発明が解決しようとする課題】ところで、以上のよう
なラインセンサを用いたバーコードスキヤナは、キヤラ
クタ変換部27における登録キヤラクタコードパターン
を代えるなどして、種々のものに使用されるバーコード
に対して適用できる。バーコードスキヤナをメデイアに
タツチさせたときのラインセンサのメデイア上での走査
範囲の大きさが一定であるから、この走査範囲に入るバ
ーコードの読取りは可能であるが、バーコードの大きさ
は一定ではなく、その使われ方によつて大きさが異なる
。そして、上記のような同じ形式のバーコードスキヤナ
を色々な使われ方をするバーコードの読取りに使用する
場合、ラインセンサの走査範囲に1個しかバーコードが
入り込まない場合には問題がないが、たとえばテレビ番
組表のように、小さいバーコードが多数羅列され、この
表から所望のバーコードを読み取る場合には、ラインセ
ンサの走査範囲に2以上のバーコードが入り込んだり、
2以上のバーコードにまたがつてラインセンサの走査範
囲が設定されたりすることがあり、このような場合には
、次のような問題が生ずる。但し、以下の説明では、図
5において、ラインセンサ10の走査範囲はバーコード
2個分の大きさとする。
[Problems to be Solved by the Invention] By the way, the barcode scanner using the line sensor as described above is capable of changing the registered character code pattern in the character converting section 27, thereby converting the barcode scanner used in various products. Applicable to code. Since the size of the scanning range of the line sensor on the media when the barcode scanner is touched to the media is fixed, it is possible to read barcodes that fall within this scanning range, but the size of the barcode is is not constant, and its size varies depending on how it is used. When using the same type of barcode scanner as above to read barcodes that are used in various ways, there is no problem if only one barcode falls within the scanning range of the line sensor. However, when reading a desired barcode from a list of many small barcodes, such as a TV program guide, two or more barcodes may fall within the scanning range of the line sensor, or
The scanning range of the line sensor may be set across two or more barcodes, and in such cases, the following problems occur. However, in the following description, the scanning range of the line sensor 10 in FIG. 5 is assumed to be the size of two barcodes.

【0032】(1)  羅列されている多数のバーコー
ドのうちの所望の1つを読み取りたい場合、この所望の
バーコードがラインセンサの走査範囲に入るように、バ
ーコードスキヤナをメデイアにタツチさせる。
(1) If you want to read a desired one of the many barcodes listed, touch the barcode scanner to the media so that the desired barcode falls within the scanning range of the line sensor. let

【0033】そこで、読み取りたいバーコードをバーコ
ードAとすると、図7に示すように、この所望バーコー
ドAは全体としてラインセンサ10の走査範囲内にある
が、隣りのバーコードBが一部この走査範囲からはみ出
してしまうような場合がある。このような場合には、図
5において、ラインセンサ10がバーコードAを読み取
るとともにマージン判定部211は開始信号MSTを発
生し、アドレスカウンタ213がカウントを開始してカ
ウント値メモリ20にこのバーコードAに対するタイマ
カウンタ19のカウント値Nを記憶する。しかし、次に
ラインセンサ10がバーコードBを読取り開始すると、
マージン判定部211は開始信号MSTを再び発生し、
アドレスカウンタ213がカウントを開始してカウント
値メモリ20では、このバーコードBに対するタイマカ
ウンタ19のカウント値Nと書き換えられる。しかし、
バーコードBは一部がラインセンサ10の走査範囲から
はみ出しているので、この部分についてはカウント値メ
モリ20で書き換えは行なわれない。したがつて、カウ
ント値メモリ20には、バーコードBに対するカウント
値とバーコードAに対するカウント値Nが混在すること
になる。
Therefore, if the barcode to be read is barcode A, as shown in FIG. 7, the desired barcode A is entirely within the scanning range of the line sensor 10, but the adjacent barcode B is partially There may be cases where the image falls outside of this scanning range. In such a case, as shown in FIG. 5, the line sensor 10 reads the barcode A, the margin determination unit 211 generates the start signal MST, the address counter 213 starts counting, and the barcode is stored in the count value memory 20. The count value N of the timer counter 19 for A is stored. However, next time the line sensor 10 starts reading barcode B,
The margin determination unit 211 generates the start signal MST again,
The address counter 213 starts counting, and in the count value memory 20, the count value N of the timer counter 19 for this barcode B is rewritten. but,
Since a part of the barcode B protrudes from the scanning range of the line sensor 10, this part is not rewritten in the count value memory 20. Therefore, in the count value memory 20, the count value for barcode B and the count value N for barcode A coexist.

【0034】かかるカウント値メモリ20のカウント値
Nを上記のようにビツトイメージ変換やキヤラクタ変換
などデコードすると、エラーが生ずるのが一般的であり
、したがつて、ラインセンサ10で所望のバーコードA
が正しくデコードできるように読み取られたにもかかわ
らず、デコードエラーとなつてしまう。
When the count value N of the count value memory 20 is decoded by bit image conversion or character conversion as described above, an error generally occurs.
Even though the code was read so that it could be decoded correctly, a decoding error occurs.

【0035】(2)  また、図8に示すように、バー
コードA,Bがともに全体としてラインセンサ10の走
査範囲内にあるときには、カウント値メモリ20に希望
しないバーコードBに対するタイマカウンタ19のカウ
ント値Nのみが記憶されてデコードされることになり、
誤つたバーコードの読取りが行なわれたことになる。
(2) Furthermore, as shown in FIG. 8, when both barcodes A and B are within the scanning range of the line sensor 10 as a whole, the timer counter 19 for the undesired barcode B is stored in the count value memory 20. Only the count value N will be stored and decoded,
This means that the wrong barcode was read.

【0036】(3)  これを防止するために、アドレ
スカウンタ213は、マージン判定部211からの開始
信号MSTで動作した後にマージン判定部211からの
終了信号MEDによつて停止すると、1走査カウンタ4
からの走査終了信号SEDによつてクリアされた後でな
ければマージン判定部211からの開始信号MSTに応
答しないようにすることが考えられる。これによると、
図7、図8の場合には、バーコードBに対してはタイマ
カウンタ19のカウント値Nのカウントメモリ20への
書込みは行なわれず、バーコードAのデコードが行なわ
れる。
(3) In order to prevent this, when the address counter 213 operates in response to the start signal MST from the margin determination unit 211 and then stops in response to the end signal MED from the margin determination unit 211, the one-scan counter 4
It may be possible to respond to the start signal MST from the margin determination unit 211 only after it has been cleared by the scan end signal SED from the margin determination unit 211. according to this,
In the case of FIGS. 7 and 8, the count value N of timer counter 19 is not written to count memory 20 for barcode B, but barcode A is decoded.

【0037】ところが、つぶりやカケ、ボイドあるいは
コントラストが小さいなどによつてバーコードAの品質
が悪く、ラインセンサ10がバーコードAを読み取つて
もマージン判定部211が開始信号MSTを発生しない
場合があり、このような場合には、アドレスカウンタ2
13はカウントせず、カウント値メモリ20にはバーコ
ードAに対するカウント値Nは書き込まれない。そして
、次にラインセンサ10がバーコードBを読み取つたと
きマージン判定部211が開始信号MSTを発生すると
、アドレスカウンタ213はカウントを開始し、カウン
ト値メモリ20にバーコードBに対するタイマカウンタ
19のカウント値Nが書き込まれることになり、上記(
1),(2)で述べたような問題が生ずる。
However, there are cases in which the quality of the barcode A is poor due to crushing, chipping, voids, or low contrast, and the margin determination unit 211 does not generate the start signal MST even if the line sensor 10 reads the barcode A. Yes, in such a case, address counter 2
13 is not counted, and the count value N for barcode A is not written into the count value memory 20. Then, when the line sensor 10 reads the barcode B, the margin determination unit 211 generates a start signal MST, the address counter 213 starts counting, and the count value of the timer counter 19 for the barcode B is stored in the count value memory 20. The value N will be written, and the above (
The problems mentioned in 1) and (2) arise.

【0038】図8に対する上記(2),(3)の説明の
ように、誤つて読み取られたバーコードBのデコードが
行なわれると、図6の出力データ変換部33からホスト
機器に誤つたキヤラクタデータが送られることになり、
ホスト機器はユーザが望まない誤つた処理を行なうこと
になる。たとえば、上記のようなバーコードによるテレ
ビジヨン番組表からバーコードを読み取つて番組予約な
どをする場合が考えられるが、このような場合、チヤン
ネル番号、日時などのデータのバーコードを決められた
順序で読み取らなければならないのに、上記のようなバ
ーコードの読取りがあると、その順序が狂うことがある
。この場合、ホスト機器はこれらのキヤラクタデータを
読み取つて処理し、その結果をそのまま表示する。そこ
で、ユーザはこの表示を確認し、誤りがあれば修正しな
ければならず、入力効率が劣化するし、ユーザに大きな
負担を強いることになる。
As explained in (2) and (3) above with respect to FIG. data will be sent,
The host device will perform erroneous processing that the user does not want. For example, a barcode may be read from a barcode television program guide as described above to make a reservation for a program. However, if a barcode like the one above is read, the order may be out of order. In this case, the host device reads and processes these character data and displays the results as they are. Therefore, the user must check this display and correct any errors, which reduces input efficiency and imposes a heavy burden on the user.

【0039】(4)  この不都合を除くため、従来で
は、ホスト機器側で誤り防止の処理が行なわれていた。 たとえば、図7、図8のように隣り合うバーコードA,
Bは夫々チヤンネル番号、日にちなど異なるデータのも
のであつて、これらのキヤラクタの桁数や使用する文字
、数字などが異なるようにし、ホスト機器で決められた
順序で各データのキヤラクタデータが送られてきたか否
かを判別、表示するものである。
(4) In order to eliminate this inconvenience, error prevention processing has conventionally been performed on the host device side. For example, as shown in FIGS. 7 and 8, adjacent barcodes A,
B has different data such as channel number and date, and the number of digits of these characters and the letters and numbers used are different, and the character data of each data is sent in the order determined by the host device. It determines and displays whether or not it has been used.

【0040】しかしながら、これによると、ホスト機器
での誤入力、誤動作は防げるものの、バーコードスキヤ
ナのデコーダでの図6の出力データを変換部33から出
力される表示信号DISによる表示は正常とするのに対
し、ホスト機器側では不良と表示され、ユーザに対しこ
れら表示の違いによつて混乱をまねくことになる。
However, according to this, although incorrect inputs and malfunctions in the host device can be prevented, the display of the output data shown in FIG. On the other hand, the host device displays a defective message, causing confusion for the user due to the difference in display.

【0041】(5)  しかも、バーコードの読取りが
行なわれてホスト機器が上記の表示をするまでには、(
バーコードスキヤナでのバーコード読取りからデコード
までの時間)+(キヤラクタデータのホスト機器への転
送時間)+(ホスト機器での上記判定処理時間)と長時
間を要することになり、上記(3)の事態と相まつて、
バーコード読取り作業のリズムを乱し、ユーザに疲労感
を増長させるなど、ユーザに無駄な手間と心理的な負担
をかけることになる。
(5) Furthermore, by the time the barcode is read and the host device displays the above display, (
It takes a long time (time from reading the barcode with the barcode scanner to decoding) + (time to transfer character data to the host device) + (time for the above judgment processing on the host device). Coupled with the situation in 3),
This disturbs the rhythm of barcode reading work, increases the user's sense of fatigue, and places unnecessary effort and psychological burden on the user.

【0042】本発明の目的は、かかる問題点を解消し、
誤つたバーコードの読取りを迅速に検知し、ユーザの作
業負担を軽減することができるようにした光学読取装置
を提供することにある。
[0042] The purpose of the present invention is to solve such problems,
An object of the present invention is to provide an optical reading device capable of quickly detecting erroneous barcode reading and reducing a user's work burden.

【0043】[0043]

【課題を解決するための手段】上記目的を達成するため
に、本発明は、バーコード複数個分の大きさのラインセ
ンサの走査範囲のうちバーコード1個分の大きさの特定
範囲を読取範囲とし、該ラインセンサの走査位置が読取
範囲内にあるか否かを判定する第1の手段と、該第1の
手段の判別結果をもとに該読取範囲内から始まるバーコ
ードに対するタイマカウンタのカウント値をカウント値
メモリに書き込ませる手段とを設ける。
[Means for Solving the Problems] In order to achieve the above object, the present invention reads a specific range the size of one barcode out of the scanning range of a line sensor that is the size of multiple barcodes. a first means for determining whether the scanning position of the line sensor is within the reading range; and a timer counter for a barcode starting from within the reading range based on the determination result of the first means. means for writing the count value of 1 to the count value memory.

【0044】[0044]

【作用】ラインセンサは走査範囲全体にわたつて読取走
査を行なうが、上記第1、第2の手段により、上記読取
範囲内に開始点があるバーコードに対する上記カウント
値のみが上記カウント値メモリに書き込まれてデコード
される。したがつて、所望バーコードの少なくとも開始
点が上記読取範囲に位置づけられるようにすれば、この
所望バーコードは、読取エラーがない限り、確実にデコ
ードされ、他の不所望なバーコードが代りにデコードさ
れることはない。
[Operation] The line sensor performs reading scanning over the entire scanning range, but by the first and second means, only the count value for the barcode whose starting point is within the reading range is stored in the count value memory. written and decoded. Therefore, by ensuring that at least the starting point of the desired barcode is located in the reading range, this desired barcode will be reliably decoded unless there is a reading error, and other undesired barcodes will take its place. It is never decoded.

【0045】[0045]

【実施例】以下、本発明の実施例を図面によつて説明す
る。図1、図2は本発明による光学読取装置の一実施例
を示すブロツク図であつて、6A,6Bはバーコード、
34は定数メモリ、35は読取範囲比較器、216はス
イツチであり、図5,6に対応する部分には同一符号を
つけて重複する説明を省略する。
Embodiments Hereinafter, embodiments of the present invention will be explained with reference to the drawings. 1 and 2 are block diagrams showing one embodiment of an optical reading device according to the present invention, in which 6A and 6B are bar codes,
34 is a constant memory, 35 is a reading range comparator, and 216 is a switch. Portions corresponding to those in FIGS. 5 and 6 are given the same reference numerals and redundant explanations will be omitted.

【0046】図1において、ラインセンサ10の走査範
囲はメデイア5上のn個(但し、nは2以上の整数であ
つて、以下ではn=2とする)分のバーコードを含む大
きさである。この走査範囲のうちバーコード1個分の大
きさの範囲を読取範囲とし、ラインセンサ10がこの読
取範囲を走査するときの1走査カウンタ4のカウント範
囲の上、下限値が読取範囲設定値として定数メモリ34
に格納されている。
In FIG. 1, the scanning range of the line sensor 10 is large enough to include n barcodes on the media 5 (n is an integer greater than or equal to 2, and hereinafter n=2). be. The reading range is the size of one barcode within this scanning range, and the upper and lower limit values of the count range of the 1-scan counter 4 when the line sensor 10 scans this reading range are the reading range setting values. Constant memory 34
is stored in.

【0047】ラインセンサ10の読取走査開始とともに
1走査カウンタ4が分周回路11からのクロツクφ1を
カウントするが、この1走査カウンタ4のカウント値と
定数メモリ34の読取範囲設定値とが読取範囲比較器3
5で比較される。この読取範囲比較器35は、1走査カ
ウンタ4のカウント値が読取範囲設定値の下限と上限の
間にあるとき(ラインセンサ10の走査位置が読取範囲
内にあるとき)高レベルとなり、このカウント値が読取
範囲設定値の上、下限間にないとき(ラインセンサ10
の走査位置が読取範囲外にあるとき)低レベルとなる検
出信号RRCを出力する。カウント値メモリ制御部21
においては、マージン判定部211から出力される開始
信号MSTがスイツチ216を介してアドレスカウンタ
213に供給されるが、スイツチ216は、読取範囲比
較器35からの検出信号RRCによつて制御され、この
検出信号RRCが高レベルのときオン、低レベルのとき
オフする。
At the start of the reading scan of the line sensor 10, the 1-scan counter 4 counts the clock φ1 from the frequency dividing circuit 11, and the count value of the 1-scan counter 4 and the reading range setting value of the constant memory 34 are the reading range. Comparator 3
5 is compared. This reading range comparator 35 becomes high level when the count value of the 1-scan counter 4 is between the lower limit and the upper limit of the reading range setting value (when the scanning position of the line sensor 10 is within the reading range), When the value is not between the upper and lower limits of the reading range setting value (line sensor 10
(when the scanning position of the scanning position is outside the reading range), a detection signal RRC that becomes low level is output. Count value memory control section 21
, the start signal MST output from the margin determination section 211 is supplied to the address counter 213 via the switch 216, but the switch 216 is controlled by the detection signal RRC from the reading range comparator 35. It is turned on when the detection signal RRC is at a high level, and turned off when it is at a low level.

【0048】そこで、いま、ラインセンサ10の走査範
囲の前半バーコード1個分を読取範囲とすると、メデイ
ア5上の一方のバーコード6Aの少なくとも前部がこの
読取範囲内にある場合、このバーコード6Aの読取りと
ともにマージン判定部211から出力される開始信号M
STのタイミングはスイツチ216がオンしている期間
内にあり、この開始信号MSTはスイツチ216を介し
てアドレスカウンタ213に供給される。したがつて、
アドレスカウンタ213はエツジ信号EGをカウントし
、カウント値メモリ20にバーコード6A全体に対する
タイマカウンタ19のカウント値Nが書き込まれる。
Therefore, if the reading range is one barcode in the first half of the scanning range of the line sensor 10, if at least the front part of one barcode 6A on the media 5 is within this reading range, this barcode Start signal M output from margin determination unit 211 upon reading code 6A
The timing of ST is within the period when switch 216 is on, and this start signal MST is supplied to address counter 213 via switch 216. Therefore,
The address counter 213 counts the edge signal EG, and the count value N of the timer counter 19 for the entire barcode 6A is written into the count value memory 20.

【0049】この場合、必ず次のバーコード6Bは読取
範囲の外にあり、ラインセンサ10がこのバーコード6
Bを走査するときにはスイツチ216はオフしており、
このバーコード6Bに対してマージン判定部211が開
始信号MSTを発生しても、この開始信号MSTはアド
レスカウンタ213に供給されない。
In this case, the next barcode 6B is always outside the reading range, and the line sensor 10 detects this barcode 6B.
When scanning B, the switch 216 is off,
Even if the margin determination section 211 generates a start signal MST for this barcode 6B, this start signal MST is not supplied to the address counter 213.

【0050】したがつて、図3、図4に示すように、バ
ーコード6Aの前部が読取範囲内にあつてこのバーコー
ド6Aの読取りによるマージン判定部211からの開始
信号MSTがスイツチ216のオン期間にあれば、必ず
このバーコード6Aに対するタイマカウンタ19のカウ
ント値Nがカウント値メモリ20に書き込まれ、デコー
ド処理が施こされる。そして、このバーコード6A以外
のバーコード6Bは、バーコード6Aの読取りいかんに
かかわらず、デコードされることはない。
Therefore, as shown in FIGS. 3 and 4, when the front part of the barcode 6A is within the reading range, the start signal MST from the margin determination section 211 by reading the barcode 6A is output to the switch 216. If it is in the on period, the count value N of the timer counter 19 for this barcode 6A is definitely written into the count value memory 20 and decoding processing is performed. Barcodes 6B other than barcode 6A will not be decoded regardless of whether barcode 6A is read or not.

【0051】このようにして、読み取りたい所望のバー
コードの少なくとも上記前部が設定された読取期間内に
あるようにすることにより、確実にこの所望バーコード
のみの読取、デコード処理が行なわれ、ラインセンサ1
0が複数個のバーコードを読取り走査しても、あるいは
また、所望バーコードの読取りにエラーがあつても、誤
つたバーコードを読み取つてデコードすることはない。 したがつて、常にバーコードの正しい読取、デコード処
理が行なわれる。
In this way, by ensuring that at least the front part of the desired barcode to be read is within the set reading period, only the desired barcode is reliably read and decoded. Line sensor 1
Even if a plurality of zero barcodes are read and scanned, or even if there is an error in reading a desired barcode, the incorrect barcode will not be read and decoded. Therefore, barcodes are always read and decoded correctly.

【0052】[0052]

【発明の効果】以上説明したように、本発明によれば、
ラインセンサが複数のバーコードを読取走査しても、常
に所望とするバーコードのみの読取、デコード処理が行
なわれ、誤つて他のバーコードを読み取つてデコードす
る誤動作を防止することができる。
[Effects of the Invention] As explained above, according to the present invention,
Even when the line sensor reads and scans a plurality of barcodes, only the desired barcode is always read and decoded, and malfunctions such as erroneously reading and decoding other barcodes can be prevented.

【図面の簡単な説明】[Brief explanation of the drawing]

【図1】本発明による光学読取装置の一実施例の一部を
示すブロツク図である。
FIG. 1 is a block diagram showing a part of an embodiment of an optical reading device according to the present invention.

【図2】本発明による光学読取装置の一実施例の図1に
示した部分に続く部分を示すブロツク図である。
FIG. 2 is a block diagram showing a portion of an embodiment of the optical reading device according to the present invention following the portion shown in FIG. 1;

【図3】図1、図2に示した実施例でのバーコード読取
りの一動作を示す図である。
FIG. 3 is a diagram showing one barcode reading operation in the embodiment shown in FIGS. 1 and 2;

【図4】図1、図2に示した実施例でのバーコード読取
りの他の動作を示す図である。
FIG. 4 is a diagram showing another operation of barcode reading in the embodiment shown in FIGS. 1 and 2;

【図5】従来の光学読取装置の一例の一部を示すブロツ
ク図である。
FIG. 5 is a block diagram showing a part of an example of a conventional optical reading device.

【図6】従来の光学読取装置の一例の図5に示した部分
に続く部分を示すブロツク図である。
FIG. 6 is a block diagram showing a portion of an example of a conventional optical reading device following the portion shown in FIG. 5;

【図7】図5、図6に示した従来技術でのバーコード読
取りの一動作を示す図である。
FIG. 7 is a diagram showing one operation of barcode reading in the conventional technology shown in FIGS. 5 and 6;

【図8】図5、図6に示した従来技術でのバーコード読
取りの他の動作を示す図である。
FIG. 8 is a diagram illustrating another barcode reading operation in the conventional technology shown in FIGS. 5 and 6;

【符号の説明】[Explanation of symbols]

4  1走査カウンタ 5  メデイア 6A,6B  バーコード 10  ラインセンサ 19  タイマカウンタ 20  カウント値メモリ 211  マージン判定部 213  アドレスカウンタ 216  スイツチ 34  定数メモリ 35  読取範囲比較器 4 1 scan counter 5 Media 6A, 6B Barcode 10 Line sensor 19 Timer counter 20 Count value memory 211 Margin judgment section 213 Address counter 216 Switch 34 Constant memory 35 Reading range comparator

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】  メデイア上に印刷されているバーコー
ドの複数個分の走査範囲を有し該走査範囲を走査して該
バーコードを読み取るラインセンサと、該ラインセンサ
の出力信号を2値化して得られる2値化信号のエツジを
検出してエツジ信号を発生するエツジ検出回路と、該エ
ツジ信号毎にクロツクをカウントし該バーコードのバー
幅に応じたカウント値を生成するタイマカウントと、該
カウント値を記憶するカウント値メモリとを備え、該カ
ウント値メモリに記憶されたカウント値をデコードして
読み取られた該バーコードのキヤラクタデータを生成す
るようにした光学読取装置において、該ラインセンサの
該走査範囲の1バーコード分の特定範囲を読取範囲とし
、該ラインセンサの走査位置が該読取範囲内にあるか否
かを判別する第1の手段と、該第1の手段の判別結果に
応じて制御され該読取範囲内から始まるバーコードに対
する該タイマカウンタのカウント値のみを該カウント値
メモリに書き込ませる第2の手段とを設け、該ラインセ
ンサの該走査範囲に含まれる複数個のバーコードのうち
の1個のバーコードのみを読み取つてデコード可能とし
たことを特徴とする光学読取装置。
1. A line sensor that has a scanning range for a plurality of barcodes printed on a medium and scans the scanning range to read the barcode, and a line sensor that binarizes the output signal of the line sensor. an edge detection circuit that detects the edges of the binary signal obtained by the process and generates an edge signal; a timer count that counts clocks for each edge signal and generates a count value according to the bar width of the bar code; A count value memory that stores the count value, and an optical reading device that generates character data of the read barcode by decoding the count value stored in the count value memory. A first means for determining whether or not a scanning position of the line sensor is within the reading range, with a specific range corresponding to one barcode in the scanning range of the sensor as a reading range; and a second means for writing only the count value of the timer counter for the barcode starting from within the reading range into the count value memory, which is controlled according to the result, and a plurality of barcodes included in the scanning range of the line sensor. An optical reader is capable of reading and decoding only one of the barcodes.
JP3050277A 1991-02-22 1991-02-25 Optical reader Expired - Fee Related JP2742144B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP3050277A JP2742144B2 (en) 1991-02-25 1991-02-25 Optical reader
US07/839,463 US5336874A (en) 1991-02-22 1992-02-20 Bar code reader with error detection and decode control

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3050277A JP2742144B2 (en) 1991-02-25 1991-02-25 Optical reader

Publications (2)

Publication Number Publication Date
JPH04268982A true JPH04268982A (en) 1992-09-24
JP2742144B2 JP2742144B2 (en) 1998-04-22

Family

ID=12854445

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3050277A Expired - Fee Related JP2742144B2 (en) 1991-02-22 1991-02-25 Optical reader

Country Status (1)

Country Link
JP (1) JP2742144B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5504320A (en) * 1993-03-19 1996-04-02 Olympus Optical Co., Ltd. Bar-code information reading apparatus

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04219880A (en) * 1990-12-20 1992-08-10 Sumitomo Electric Ind Ltd Optical reader

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04219880A (en) * 1990-12-20 1992-08-10 Sumitomo Electric Ind Ltd Optical reader

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5504320A (en) * 1993-03-19 1996-04-02 Olympus Optical Co., Ltd. Bar-code information reading apparatus

Also Published As

Publication number Publication date
JP2742144B2 (en) 1998-04-22

Similar Documents

Publication Publication Date Title
US5336874A (en) Bar code reader with error detection and decode control
US4488678A (en) Method and apparatus for reading a bar code
US5128527A (en) Apparatus for reading a bar code
EP0720113B1 (en) Two-dimensional code reading apparatus
US4074114A (en) Bar code and method and apparatus for interpreting the same
EP0431264B1 (en) Method and apparatus for decoding bar codes from multiple scans
JPS63197965A (en) Fast electronically reprographic printing
US4438327A (en) Bar code reading system and method
US5537431A (en) Method and apparatus for bar code reading and decoding
EP0176933A2 (en) Bar code reading apparatus
JPH01319884A (en) Code reader
EP0464713B1 (en) Bar-code reading apparatus
US4528443A (en) Bar code reading system and method
US5302814A (en) Bar code reading apparatus
EP0069574B1 (en) Apparatus for reading bar code
JPH04268982A (en) Optical reader
US5686716A (en) Bar code void and spot discrimination
JPH04268985A (en) Optical reader
JPH04268681A (en) Optical reader
JPH0120795B2 (en)
JPH04268984A (en) Optical reader
JPH04268983A (en) Optical reader
US5952643A (en) Bar code decoder for a lightpen
JP2677805B2 (en) Code reader
EP0478345A2 (en) Process for decoding bar codes

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19980113

LAPS Cancellation because of no payment of annual fees