JPH04268681A - Optical reader - Google Patents

Optical reader

Info

Publication number
JPH04268681A
JPH04268681A JP3048681A JP4868191A JPH04268681A JP H04268681 A JPH04268681 A JP H04268681A JP 3048681 A JP3048681 A JP 3048681A JP 4868191 A JP4868191 A JP 4868191A JP H04268681 A JPH04268681 A JP H04268681A
Authority
JP
Japan
Prior art keywords
character
barcode
bit image
code
counter
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.)
Pending
Application number
JP3048681A
Other languages
Japanese (ja)
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 JP3048681A priority Critical patent/JPH04268681A/en
Priority to US07/839,463 priority patent/US5336874A/en
Publication of JPH04268681A publication Critical patent/JPH04268681A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To quickly detect the erroneous reading of a bar code generating an error in the number of digits (characters) of the bar code. CONSTITUTION:In a constant memory 253, the constant representing the number of bar codes is stored. A bit image BI is supplied to a character counter 2512 as well as the number of digits is counted. After the writing of the bit image BI in a stop code bit image memory 24 and a character code bit image memory 23, a digit number comparator 254 operates and the count value of the character counter 2521 and the constant of a constant memory 253 are compared. At the time of unmatch, the digit number comparator 254 outputs an error signal ERR4, and a character conversion reset signal CERT performing the next reading of the bar code is generated from an error processing circuit 29.

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,
The pattern of combinations of thin bars differs depending on the barcode format, but in all formats, a margin (blank space), a start code, and a stop code are displayed before and after a row of bars representing all character codes. There are bar rows.

【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 the barcode display is used as a start margin, and the part of the background color of the medium of a predetermined width on the right side of the barcode display is used as a stop margin. These margins are used to determine whether a barcode is displayed. The thin bar at the left end of the barcode display and the thin bar following it represent a start code, and the thin bar at the right end and the thick bar one place to the left represent a stop code. Between these start and stop codes, there is a character code that determines the respective display contents by a combination of a predetermined number of thin bars or thick bars (black bars) and thin spaces or thick bases (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. This makes it possible to determine the reading direction of the barcode.

【0005】かかるバーコードを読み取る光学読取装置
はバーコードスキヤナと呼ばれるが、以下、ラインセン
サを用いた従来のバーコードスキヤナの一例を図2、図
3により説明する。但し、同図において、1は読取中信
号ラツチ回路、2は照光部、3は光学結像部、4は1走
査カウンタ、5はメデイア、6はバーコード、7はスタ
ートパルス発生回路、8はパルス幅設定回路、9はレベ
ル検出回路、10は光電変換部、11,12は分周回路
、13は発振回路、14は二値化回路、15は走査回数
定数メモリ、16は走査回数カウンタ、17は走査回数
比較器、18はエツジ検出回路、19はタイマカウンタ
、20はカウント値メモリ、21はカウント値メモリ制
御部、22はビツトイメージ変換器、23はキヤラクタ
コードビツトイメージメモリ、24はストツプコードビ
ツトイメージメモリ、25はビツトイメージメモリ制御
部、251はアドレスカウンタ、252はアドレスデコ
ーダ、2511はビツトカウンタ、2512はキヤラク
タカウンタ、26はスタートストツプ判定部、27はキ
ヤラクタ変換部、28はキヤラクタコード一致比較器、
29はエラー処理回路、30は定数メモリ、31はデー
タ一致回数カウンタ、32はデータ一致回数比較器、3
3は出力データ変換部である。
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. 2 and 3. 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, 22 is a bit image converter, 23 is a character code bit image memory, 24 is a A stop code bit image memory, 25 a bit image memory control section, 251 an address counter, 252 an address decoder, 2511 a bit counter, 2512 a character counter, 26 a start/stop determination section, 27 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 matching number counter, 32 is a data matching number comparator, 3
3 is an output data conversion section.

【0006】図2において、発振回路13は常時動作し
ており、その出力信号が分周回路11で分周されてクロ
ツクφ1が、また、分周回路12で分周されてクロツク
φ2が夫々形成される。クロツクφ1はラインセンサか
らなる光電変換部10と1走査カウンタ4とに供給され
、クロツクφ2はタイマカウンタ19に供給される。
In FIG. 2, 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(図3)はキヤ
ラクタ変換終了信号CEDを夫々出力しており、読取中
信号ラツチ回路1から読取中信号READが供給開始さ
れると、スタートパルス発生回路7はパルス発生条件を
満足し、パルス幅設定回路8の初期値で決まるパルス幅
のスタートパルスSTを発生する。このスタートパルス
STは1走査カウンタ4とラインセンサ10とに供給さ
れる。
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. 3) 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.

【0010】ラインセンサ10は、スタートパルスST
により、受光面の像をクロツクφ1が供給される毎に1
画素ずつ読み取り、バーコード6を走査して読み取る。 これにより、ラインセンサ10からは、バーコード6の
黒バーと白バーとでレベルが異なる電気信号が出力され
る。また、1走査カウンタ4はスタートパルスSTによ
つてクロツクφ1のカウントを開始して走査終了信号S
EDを出力しなくなり、ラインセンサ10の1走査分の
クロツクφ1をカウントすると、再び走査終了信号SE
Dを出力する。この走査終了信号SEDはスタートパル
ス発生回路7、走査回数カウンタ16、カウント値メモ
リ20およびカウント値メモリ制御部21に供給される
The line sensor 10 receives a start pulse ST.
The image on the light receiving surface is changed by 1 every time clock φ1 is supplied.
The barcode 6 is scanned and read pixel by pixel. 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 receives the scan end signal S.
When ED is no longer output and the clock φ1 for one scan of the line sensor 10 is counted, the scan end signal SE is output again.
Output D. This scan end signal SED is supplied to the start pulse generation circuit 7, the scan number counter 16, the count value memory 20, and the count value memory control section 21.

【0011】スタートパルスSTのパルス幅はラインセ
ンサ10での画素をなす各コンデンサの充電時間を決め
るものであり、この充電時間に応じてラインセンサ10
の出力信号のレベルの大きさが決まる。この出力信号は
レベル検出回路9に供給されてレベルの大きさが検出さ
れ、この検出結果に応じてパルス幅設定回路8で最適レ
ベルとなるようなパルス幅が設定される。スタートパル
ス発生回路7は、1走査カウンタ4から再び走査終了信
号SEDが供給されてパルス発生条件を満足すると、再
びパルス幅設定回路8の設定値に応じたパルス幅のスタ
ートパルスSTを発生し、ラインセンサ10を走査開始
させ、1走査カウンタ4をカウント開始させる。このよ
うにして、ラインセンサ10はバーコード6を繰り返し
走査する。
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. In this way, the line sensor 10 repeatedly scans the barcode 6.

【0012】ラインセンサ10の出力信号は、二値化回
路14でレベルが2値化された後、エツジ検出回路18
でその立上り、立下りエツジが検出される。エツジ検出
回路18から出力されるエツジパルスEGはタイマカウ
ンタ19とカウント値メモリ制御部21とに供給される
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 a count value memory control section 21.

【0013】タイマカウンタ19はエツジパルスEGを
リセツト信号として分周回路12からのクロツクφ2を
カウントする。したがつて、タイマカウンタ19からは
、バーコード6の各バーの幅を表わすカウント値Nを出
力する。このカウント値Nはカウント値メモリ制御部2
1によつて制御されるカウント値メモリ20に書き込ま
れる。カウント値メモリ20にバーコード6の全てのカ
ウント値Nが書き込まれ、1走査カウンタ4が走査終了
信号SEDを出力すると、カウント値メモリ20は読出
しモードとなり、カウント値メモリ制御部21の制御に
よつてカウント値メモリ20から書込まれたカウント値
Nが書き込まれた順次に読み出される。
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. When all the count values N of the barcode 6 are written into the count value memory 20 and the one-scan counter 4 outputs the scan end signal SED, the count value memory 20 enters the read mode and is controlled by the count value memory controller 21. Then, the written count values N are read out from the count value memory 20 in the order in which they were written.

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

【0015】次に、図3について説明する。ビツトイメ
ージ変換部22からのビツトイメージBIはキヤラクタ
コードビツトイメージメモリ23、ストツプコードビツ
トイメージメモリ24およびビツトイメージメモリ制御
部25に供給される。ビツトイメージメモリ制御部25
はアドレスカウンタ251とアドレスデコーダ252と
からなつている。アドレスカウンタ251はビツトイメ
ージBI(すなわち、読み取られるバーコード6(図2
)のバーの本数)をカウントするビツトカウンタ251
1と、このビツトカウンタがバーコード6の前部のスト
ツプコードに対するビツトイメージBIをカウントした
後の1キヤラクタ分のビツトイメージBIをカウントす
る毎に1ずつカウントするキヤラクタカウンタ2512
とからなつている。アドレスデコーダ252はビツトカ
ウンタ2511とキヤラクタカウンタ2512のカウン
ト値をデコードし、アドレス信号を形成して出力する。
Next, FIG. 3 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
consists of an address counter 251 and an address decoder 252. The address counter 251 receives the bit image BI (i.e., the barcode 6 to be read (FIG. 2).
Bit counter 251 that counts the number of bars in )
1, and a character counter 2512 that counts by 1 each time this bit counter counts the bit image BI for one character after counting the bit image BI for the stop code at the front of the barcode 6.
It is made up of. Address decoder 252 decodes the count values of bit counter 2511 and character counter 2512 to form and output an address signal.

【0016】ここで、アドレスデコーダ252から出力
されるアドレス信号はビツトカウンタ2511からのカ
ウント値のデコード値とキヤラクタカウンタ2512か
らのカウント値のデコード値とからなり、ビツトカウン
タ2511がストツプコードのビツトイメージBIをカ
ウントする期間キヤラクタカウンタ2512のカウント
値は0である。ビツトカウンタ2511がキヤラクタコ
ードの最初のバーに対する最初のビツトイメージBIを
カウントすると、キヤラクタカウンタ2512は1だけ
カウントしてカウント値が1となり、これ以後、ビツト
カウンタ2511が1キヤラクタ分のビツトイメージB
Iをカウントする毎にキヤラクタカウンタ2512のカ
ウント値が1ずつインクリメントする。
Here, the address signal outputted from the address decoder 252 consists of a decoded value of the count value from the bit counter 2511 and a decoded value of the count value from the character counter 2512, and the bit counter 2511 decodes the bit image of the stop code. During the period for counting BI, the count value of the character counter 2512 is 0. When the bit counter 2511 counts the first bit image BI for the first bar of the character code, the character counter 2512 counts by 1 and the count value becomes 1. From then on, the bit counter 2511 counts the bit image BI for one character. B
Each time I is counted, the count value of the character counter 2512 is incremented by one.

【0017】一方、ストツプコードビツトイメージメモ
リ24には、キヤラクタカウンタ2512のカウント値
が0のときアドレスデコーダ252からのアドレス信号
で指定されるアドレスのみが設定され、キヤラクタコー
ドビツトイメージメモリ23には、キヤラクタカウンタ
2512のカウント値が0以外のときのアドレスデコー
ダ252からのアドレス信号で指定されるアドレスのみ
が設定される。
On the other hand, only the address specified by the address signal from the address decoder 252 is set in the stop code bit image memory 24 when the count value of the character counter 2512 is 0. Only the address specified by the address signal from the address decoder 252 when the count value of the character counter 2512 is other than 0 is set.

【0018】そこで、かかるビツトイメージメモリ制御
部25の動作とメモリ23,24のアドレス設定とによ
り、ストツプコードのビツトイメージBIがストツプコ
ードビツトイメージメモリ24に書き込まれ、次いでキ
ヤラクタコードビツトイメージBIがキヤラクタコード
ビツトイメージメモリ23に書き込まれる。なお、In
terleaved  2of5の場合、黒バーに対応
するビツトイメージBIと白バーに対するビツトイメー
ジBIとが区分されてキヤラクタコードビツトイメージ
メモリ23に書き込まれる。
Therefore, by the operation of the bit image memory control section 25 and the address settings of the memories 23 and 24, the bit image BI of the stop code is written into the stop code bit image memory 24, and then the character code bit image BI is written. The character code is written into the bit image memory 23. In addition, In
In the case of terleaved 2 of 5, the bit image BI corresponding to the black bar and the bit image BI corresponding to the white bar are separated and written into the character code bit image memory 23.

【0019】カウント値メモリ20(図2)でのカウン
ト値Nの読出しが終つてキヤラクタコードビツトイメー
ジメモリ23、ストツプコードビツトイメージメモリ2
4でのビツトイメージBIの書込みが終ると、これらメ
モリ23,24は読出しモードとなり、また、ビツトイ
メージ制御メモリ25は、ビツトカウンタ2511、キ
ヤラクタカウンタ2512がクリアされた後、アドレス
信号を発生し始める。このアドレス信号により、まず、
ストツプコードビツトイメージメモリ24からストツプ
コードのビツトイメージからなるデータSCDが読み出
されてスタートストツプ判定部26に供給され、次いで
、キヤラクタコードビツトイメージメモリ23から1キ
ヤラクタ分のバー本数に等しい個数のビツトイメージか
らなるデータCCDが順番に読み出されてキヤラクタ変
換部27に供給されるのであるが、ビツトイメージメモ
リ制御部25は、キヤラクタ変換部27が1つのデータ
CCDをキヤラクタ変換する毎にビツトカウンタ251
1が内部クロツクを1キヤラクタのバー本数に等しい個
数だけカウントしてアドレス信号を発生し、これによつ
てキヤラクタコードビツトイメージメモリ23から次の
データCCDを読み出させる。
After reading out the count value N from the count value memory 20 (FIG. 2), the character code bit image memory 23 and the stop code bit image memory 2 are read out.
When the bit image BI has been written in step 4, these memories 23 and 24 enter the read mode, and the bit image control memory 25 generates an address signal after the bit counter 2511 and character counter 2512 are cleared. start. With this address signal, first,
Data SCD consisting of a bit image of a stop code is read out from the stop code bit image memory 24 and supplied to the start/stop determination section 26, and then data SCD consisting of a bit image of a stop code is read out from the character code bit image memory 23 in a number equal to the number of bars for one character. The data CCD consisting of bit images are sequentially read out and supplied to the character converter 27. counter 251
1 counts the internal clock by a number equal to the number of bars of one character and generates an address signal, thereby reading out the next data CCD from the character code bit image memory 23.

【0020】スタートストツプ判定部26においては、
バーコード6(図2)に使用される正しいストツプコー
ドを正しく正方向、逆方向に読み取つたときに得られる
2種類のビツトイメージによるビツトパターン(以下、
登録ストツプコードパターンという)がROMに登録さ
れており、ストツプコードビツトイメージメモリ24か
らのビツトイメージによるデータSCDのビツトパター
ン(以下、検出ストツプコードパターンという)が登録
ストツプコードパターンと比較され、いずれの登録スト
ツプコードパターンと一致するか判定される。この検出
ストツプコードパターンと一致する登録ストツプコード
パターンがあるときには、これによつてバーコード6の
読取り方向も判断されたことになるから、この一致した
登録ストツプコードパターンに対応したデータ(ストツ
プコードデータ)SSCを出力データ変換部33に供給
するとともに、変換方向指示信号CDDをキヤラクタ変
換部27に送る。
In the start/stop determining section 26,
The bit pattern (hereinafter referred to as
A bit pattern (hereinafter referred to as a detected stop code pattern) of the data SCD based on the bit image from the stop code bit image memory 24 is compared with the registered stop code pattern. Then, it is determined which registered stop code pattern matches the stop code pattern. If there is a registered stopcode pattern that matches this detected stopcode pattern, the reading direction of the barcode 6 has also been determined based on this, so the data corresponding to this matched registered stopcode pattern ( The stop code data) SSC 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においては、バーコ
ードに使用される全てのキヤラクタコードに対し、正方
向に正しく読み取つたときに得られるビツトイメージに
よるビツトパターン(以下、登録キヤラクタコードパタ
ーンという)がROMに登録されており、キヤラクタコ
ードビツトイメージメモリ23からのデータCCDのビ
ツトパターン(以下、検出キヤラクタコードパターンと
いう)が登録キヤラクタコードパターンと比較され、い
ずれの登録キヤラクタコードパターンと一致するか判定
される。この場合、バーコード6が逆方向に読み取られ
ているときには、スタートストツプ判定部26からの変
換方向指示信号CDDにより、検出キヤラクタコードパ
ターンCCDが前後反転されて登録キヤラクタコードパ
ターンと比較される。
The character converter 27 converts all character codes used in barcodes into bit patterns (hereinafter referred to as registered character code patterns) based on bit images obtained when correctly read in the forward direction. The bit pattern of the data CCD registered in the ROM and from the character code bit image memory 23 (hereinafter referred to as the detected character code pattern) is compared with the registered character code patterns, and matches with any of the registered character code patterns. It will be determined whether In this case, when the barcode 6 is being read in the opposite direction, the detected character code pattern CCD is reversed and compared with the registered character code pattern by the conversion direction instruction signal CDD from the start/stop determination section 26. Ru.

【0023】検出キヤラクタコードパターンCCDが登
録キヤラクタコードパターンのいずれかと一致すると、
キヤラクタ変換部27は一致した登録キヤラクタコード
パターンに対するキヤラクタデータCDを出力し、キヤ
ラクタコード一致比較器28と出力データ変換部33と
に送る。検出キヤラクタコードパターンCCDがいずれ
の登録キヤラクタコードパターンと一致しないときには
、キヤラクタ変換部27はエラー信号ERR2を発生し
てエラー処理回路29に送る。また、バーコード6の1
走査分の検出キヤラクタコードパターンが全てキヤラク
タデータCDに変換されると、キヤラクタ変換部27は
キヤラクタ変換終了信号CEDを発生して図2のスター
トパルス発生回路7に供給する。これにより、このスタ
ートパルス発生回路7はスタートパルスSTを発生し、
ラインセンサ10(図2)はバーコード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 detected character code patterns for the scan are converted into character data CD, the character converter 27 generates a character conversion end signal CED and supplies it to the start pulse generating circuit 7 of FIG. As a result, this start pulse generating circuit 7 generates a start pulse ST,
Line sensor 10 (FIG. 2) performs the next reading scan of 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(図2)などに供給さ
れ、これらをリセツトする。この読取中信号ラツチ回路
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. 2), 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から読取完了信号REN
D1が出力されなければ、それ以上のバーコード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 the barcode 6 does not match this number of consecutive times, reading of the bar code 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 REN.
If D1 is not output, further reading of the barcode 6 is prohibited.

【0027】すなわち、図2において、走査回数カウン
タ16は1走査カウンタ4が走査終了信号SEDを出力
する毎に1ずつカウントアツプする。この走査回数カウ
ンタ16のカウント値はラツチセンサ10の走査回数を
表わし、走査回数比較器17で走査回数定数メモリ15
に設定されている定数と比較される。走査回数カウンタ
16のカウント値がこの定数以上となると、走査回数比
較器17は読取終了信号REND2を出力し、図3の出
力データ変換部33に供給する。
That is, in FIG. 2, 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 the scan number counter 16 represents the number of scans of the latch sensor 10, and the scan number comparator 17 stores the number of scans in the scan number constant memory 15.
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を出力し、図2のカウ
ント値メモリ制御部21、ビツトイメージ変換部22や
図3のキヤラクタコードビツトイメージメモリ23、ス
トツプコードビツトイメージメモリ24、ビツトイメー
ジメモリ制御部25、スタートストツプ判定部26、キ
ヤラクタ変換部27などを初期化する。キヤラクタ変換
部27は、キヤラクタ変換リセツト信号CERTで初期
化されると、キヤラクタ変換終了信号CEDを出力し、
これによつてスタートパルス発生回路7から次のスター
トパルスSTを発生させる。
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. 2 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. When the character conversion section 27 is initialized by the character conversion reset signal CERT, it outputs a character conversion end signal CED,
This causes the start pulse generation circuit 7 to generate the next start pulse ST.

【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]

【発明が解決しようとする課題】しかし、以上説明した
従来のタツチ式バーコードスキヤナには、次のような問
題があつた。
[Problems to be Solved by the Invention] However, the conventional touch-type barcode scanner described above has the following problems.

【0032】(1)  バーコードにつぶれ、欠け、ボ
イドなどがあり、あるいはコントラストが小さく、バー
コードの品質が悪い場合、あるいはまた、バーコードス
キヤナのメデイア上でのタツチ位置が適切でなく、バー
コードの一部がラインセンサの走査範囲からはみ出して
しまう場合には、バーコードが正しい桁数(バーコード
が有するキヤラクタの個数)で読み取られず、バーコー
ドの読取りが誤る場合もあるが、上記のバーコードスキ
ヤナではこれを検出できず、正しいバーコード読取りが
行なわれたものとしてデコードデータをホスト機器に送
つてしまうような事態も生ずることがある。
(1) If the barcode is crushed, chipped, voided, etc., or if the contrast is low and the quality of the barcode is poor, or if the barcode scanner's touch position on the media is not appropriate, If part of the barcode protrudes from the scanning range of the line sensor, the barcode may not be read with the correct number of digits (the number of characters the barcode has), and the barcode may be read incorrectly. A barcode scanner may not be able to detect this, and the decoded data may be sent to the host device assuming that the barcode has been read correctly.

【0033】すなわち、図3において、桁数が誤つたバ
ーコードの読取りが行なわれても、ビツトイメージメモ
リ制御部25はビツトイメージ変換部22(図2)が供
給されるだけのビツトイメージBIをストツプコードビ
ツトイメージメモリ24やキヤラクタコードビツトイメ
ージメモリ23に書き込み、また、これらメモリ24,
23からのデータSCD,CCDがスタートストツプ判
定部26、キヤラクタ変換部27で、その内容に誤りが
あるとしても、正常に処理されるものであれば、メモリ
24,23から順次データSCD,CCDを読み出す。 そして、キヤラクタコード一致比較器28から定数メモ
リ30の一致回数設定値で決まる回数だけ一致パルスが
出力されれば、出力データ変換部33はキヤラクタ変換
部27からのキヤラクタデータCDとスタートストツプ
判定部26からのストツプコードデータSSCとをホス
ト機器に送る。
In other words, in FIG. 3, even if a barcode with an incorrect number of digits is read, the bit image memory control section 25 will not be able to read the bit image BI enough to be supplied to the bit image converting section 22 (FIG. 2). It is written in the stop code bit image memory 24 and the character code bit image memory 23, and also written in the stop code bit image memory 24 and character code bit image memory 23.
Even if the data SCD and CCD from 23 are processed normally by the start/stop determination section 26 and character conversion section 27, even if there is an error in the contents, the data SCD and CCD are sequentially sent from the memories 24 and 23. Read out. Then, when the character code match comparator 28 outputs a match pulse the number of times determined by the number of matches set in the constant memory 30, the output data converter 33 converts the character data CD from the character converter 27 and the start stop. The stop code data SSC from the determination unit 26 is sent to the host device.

【0034】このように、バーコードスキヤナでは読み
取つたバーコードの桁数の検出を行なつておらず、桁数
を間違つてバーコードを読み取つても、デコードデータ
をホスト機器に送つてしまう。そこで、ホスト機器はこ
のデコードデータを処理するのであるが、桁数が間違つ
ているから当然誤動作し、その結果、デコードデータに
エラーがあることを表示する。
In this way, the barcode scanner does not detect the number of digits in the barcode it has read, and even if it reads a barcode with the wrong number of digits, the decoded data will be sent to the host device. . Therefore, the host device processes this decoded data, but because the number of digits is wrong, it naturally malfunctions, and as a result, it displays that there is an error in the decoded data.

【0035】ユーザはこのエラー表示をみて再度バーコ
ードの読取り作業を行なうが、バーコードスキヤナをメ
デイアにタツチさせてホスト機器がエラー表示するまで
にはかなりの時間を要することになり、バーコード読取
作業の効率が劣化するし、ユーザに大きな負担をかける
ことにもなる。
When the user sees this error display, he attempts to read the barcode again, but it takes a considerable amount of time for the host device to display an error message after touching the barcode scanner to the media. This reduces the efficiency of the reading operation and places a heavy burden on the user.

【0036】(2)  この不都合を失くすために、使
用するバーコードの桁数の種類が規格で決められている
ことから、ホスト機器側でバーコードスキヤナから供給
されたデコードデータの桁数をチエツクする方法がとら
れてきた。これにより、ホスト機器での無駄なデータ処
理が防げることになる。しかし、このようにしても、バ
ーコードスキヤナでは、出力データ変換部33(図3)
からの表示指示信号DISにより、バーコードの正常な
読取りが行なわれたことが表示されるのに対し、ホスト
機器では、エラー表示されることになる。このように両
者の表示に違いがあると、ユーザはいずれの表示が正し
いのか、この表示の違いの原因が何か分からず、混乱し
てしまう場合もある。
(2) In order to eliminate this inconvenience, the number of digits of the barcode to be used is determined by the standard, so the number of digits of the decoded data supplied from the barcode scanner on the host device side. A method of checking has been adopted. This prevents unnecessary data processing in the host device. However, even with this method, in the barcode scanner, the output data converter 33 (FIG. 3)
While the display instruction signal DIS from the host device indicates that the bar code has been successfully read, the host device displays an error message. If there is a difference between the two displays, the user may not know which display is correct or what is the cause of the difference in display, and may become confused.

【0037】また、上記(1)の場合に比べ、バーコー
ドスキヤナをメデイアにタツチしてからホスト機器がエ
ラー表示するまでの時間は、ホスト機器でデータ処理が
ない分短かくなるが、これでもかなり長いものである。
Furthermore, compared to case (1) above, the time from when the barcode scanner touches the media until the host device displays an error is shorter because the host device does not process the data. But it's quite long.

【0038】(3)  上記(1),(2)は、図3に
おいて、キヤラクタコードビツトイメージメモリ23に
書き込まれるビツトイメージBIの個数が、桁数に誤り
があつても、桁数×1キヤラクタコードのバー本数に等
しい場合である。
(3) In (1) and (2) above, in FIG. 3, even if the number of bit images BI written to the character code bit image memory 23 has an error in the number of digits, the number of bit images BI is equal to the number of digits×1. This is the case where the number of bars is equal to the number of bars in the character code.

【0039】しかし、このようなことは稀であり、一般
には、桁数に誤りがあると、図3において、キヤラクタ
コードビツトイメージメモリ23から最後に読み出され
るデータCCDのビツトイメージ数は1キヤラクタ分の
バー数よりも少ない。このような場合、キヤラクタ変換
部27は、このデータCCDをキヤラクタ変換できない
から、このデータCCDに対する登録キヤラクタコード
パターンがないことを判定してエラー信号ERR2を出
力し、次のバーコード読取りを開始させる。
However, such a case is rare, and in general, if there is an error in the number of digits, the number of bit images of the data CCD finally read out from the character code bit image memory 23 in FIG. 3 will be 1 character. less than the number of bars in minutes. In such a case, the character conversion unit 27 cannot convert this data CCD into a character, so it determines that there is no registered character code pattern for this data CCD, outputs an error signal ERR2, and starts reading the next barcode. let

【0040】桁数が誤つたバーコードの読出しが繰り返
されてかかる動作が繰り返えされされれば、ホスト機器
に誤つたデコードデータが送られないが、図2の走査回
数定数メモリ15の定数で決まる回数バーコードの読取
りが行なわれても、桁数が間違つたバーコードの読み取
りが続けられると、遂には、リセツト信号RSTによつ
てバーコード読取りが停止し、図3の出力データ変換部
33から表示指示信号DISによつて読取不能であるこ
とが表示される。
If the reading of a barcode with an incorrect number of digits is repeated and this operation is repeated, incorrect decoded data will not be sent to the host device, but the constant of the scanning number constant memory 15 in FIG. Even if the barcode is read the number of times determined by , if the barcode with the wrong number of digits continues to be read, the barcode reading will finally be stopped by the reset signal RST, and the output data conversion shown in Figure 3 will occur. A display instruction signal DIS is sent from the section 33 to indicate that reading is not possible.

【0041】バーコードスキヤナでは、このように読取
不能と表示されるまでは何らの表示も行なわれず、ユー
ザはその間バーコードの正しい読取り動作が行なわれて
いるものと思つている。上記バーコードスキヤナでは、
ラインセンサの走査毎にスタートパルスのパルス幅を変
化させ、最適な条件でバーコード読取りが行なわれるよ
うにしており、通常バーコードの読取りを開始してから
ホスト機器にデコードデータを出力して読取完了を表示
するまでの時間は0.3秒程度と瞬間的なものである。 しかし、上記のように読取不能と表示される場合には、
この表示までに1秒程度と上記に比べてかなりの時間を
要し、ユーザに違和感をもたせるばかりでなく、通常よ
りも長い時間待つた結果の表示が読取不能ということに
なると、ユーザの読取作業のリズムを狂わし、疲労感を
ひき起すことになりかねない。
In the barcode scanner, no display is made until the barcode is displayed as unreadable, and the user assumes that the barcode is being read correctly during that time. In the above barcode scanner,
The pulse width of the start pulse is changed each time the line sensor scans, so that barcode reading is performed under optimal conditions. Normally, barcode reading is started and then decoded data is output to the host device and read. The time it takes to display completion is instantaneous, about 0.3 seconds. However, if it is displayed as unreadable as shown above,
It takes about 1 second for this display to appear, which is much longer than the above, which not only makes the user feel uncomfortable, but also makes it difficult for the user to read the screen if the display is unreadable after waiting for a longer time than usual. This can disrupt your rhythm and cause you to feel tired.

【0042】本発明の目的は、かかる問題を解消し、桁
数が誤つたバーコードの誤読取りを迅速に検出すること
ができるようにした光学読取装置を提供することにある
[0042] An object of the present invention is to provide an optical reading device that can solve this problem and quickly detect erroneous reading of a barcode with an incorrect number of digits.

【0043】[0043]

【課題を解決するための手段】上記目的を達成するため
に、本発明は、ビツトイメージをカウントして読み取ら
れるバーコードの桁数を検出する第1の手段と、該第1
の手段の検出値とバーコードに対して予め決められて桁
数に等しい基準値とを比較する第2の手段とを設ける。
[Means for Solving the Problems] In order to achieve the above object, the present invention includes a first means for counting bit images to detect the number of digits of a read barcode;
and a second means for comparing the detection value of the means with a reference value predetermined for the barcode and equal to the number of digits.

【0044】[0044]

【作用】ビツトイメージをカウントしてバーコードが桁
数正しく読取られたか否か判定されるので、ビツトイメ
ージからキヤラクタデータに変換されるデコード処理前
に桁数が誤つたバーコードの誤読取りが検出される。
[Operation] Bit images are counted to determine whether the barcode has been read with the correct number of digits, so barcodes with an incorrect number of digits can be read incorrectly before the decoding process converts the bit image into character data. Detected.

【0045】[0045]

【実施例】以下、本発明の実施例を図面によつて説明す
る。図1は本発明による光学読取装置の一実施例の要部
を示すブロツク図であつて、253は定数メモリ、25
4は桁数比較器であり、図3に対応する部分には同一符
号をつけて重複する説明を省略する。なお、この実施例
は従来の図2に示したものと同一構成の前段部と図1に
示す後段部とでなるが、この前段部は既に説明したので
、後段部のみを図1に示して説明する。
Embodiments Hereinafter, embodiments of the present invention will be explained with reference to the drawings. FIG. 1 is a block diagram showing essential parts of an embodiment of an optical reading device according to the present invention, in which 253 is a constant memory;
4 is a digit number comparator, and parts corresponding to those in FIG. 3 are given the same reference numerals and redundant explanations will be omitted. This embodiment has a front part with the same configuration as the conventional one shown in FIG. 2 and a rear part shown in FIG. 1, but since this front part has already been explained, only the rear part is shown in FIG. explain.

【0046】図1において、ビツトイメージメモリ制御
部25は、図3に示した構成に加え、定数メモリ253
と桁数比較器254とが付加されており、定数メモリ2
53には、バーコードの規格上の桁数を表わす定数が格
納されている。
In FIG. 1, the bit image memory control unit 25 includes a constant memory 253 in addition to the configuration shown in FIG.
and a digit comparator 254 are added, and a constant memory 2
53 stores a constant representing the standard number of digits of the barcode.

【0047】バーコードが読み取られてビツトイメージ
BIが供給されると、図3で説明したように、キヤラク
タカウンタ2512がこのバーコードの桁数をカウント
するが、カウント値メモリ20(図2)の読出しが終る
と、桁数比較器254が動作してキヤラクタカウンタ2
512のカウント値と定数メモリ253の定数とを比較
する。これらが一致したときには、桁数比較器254は
エラー信号ERR4を出力せず、図3で説明したキヤラ
クタ変換などのデコード処理動作が行なわれる。キヤラ
クタカウンタ2512のカウント値と定数メモリ253
の定数とが一致しないときには、桁数比較器254はエ
ラー信号ERR4を発生してエラー処理回路29に送る
。これにより、エラー処理回路29はキヤラクタ変換リ
セツト信号CERTを出力し、再びバーコードの読取り
を開始させる。
When the barcode is read and the bit image BI is supplied, the character counter 2512 counts the number of digits of this barcode as explained in FIG. 3, but the count value memory 20 (FIG. 2) When reading is completed, the digit number comparator 254 operates and the character counter 2
The count value of 512 and the constant of constant memory 253 are compared. When these match, the digit number comparator 254 does not output the error signal ERR4, and decoding processing operations such as character conversion described in FIG. 3 are performed. Count value of character counter 2512 and constant memory 253
When the digit number comparator 254 does not match the constant, the digit number comparator 254 generates an error signal ERR4 and sends it to the error processing circuit 29. As a result, the error processing circuit 29 outputs a character conversion reset signal CERT and starts reading the bar code again.

【0048】このようにして、この実施例では、ストツ
プコードビツトイメージメモリ24やキヤラクタコード
ビツトイメージメモリ23にビツトイメージ23でのビ
ツトイメージBIの書込みが終了するとともに、すなわ
ち、キヤラクタ変換処理が行なわれる前に読み取られる
バーコードの桁数が検出されて、正しい桁数であるか否
かが判定されることになり、桁数が誤つたバーコード誤
読取りが短時間で検出されることになる。しかも、この
場合には、キヤラクタ変換が行なわれず、かかる誤読取
りによるバーコードのデコードデータはホスト機器に送
られることがない。
In this way, in this embodiment, writing of the bit image BI in the bit image 23 to the stop code bit image memory 24 and the character code bit image memory 23 is completed, that is, the character conversion process is completed. The number of digits in the barcode being read is detected before the barcode is read, and it is determined whether the number of digits is correct or not, and erroneous readings of barcodes with the wrong number of digits can be detected in a short time. Become. Furthermore, in this case, character conversion is not performed, and the decoded data of the bar code resulting from such erroneous reading is not sent to the host device.

【0049】なお、図1の定数メモリ253にバーコー
ドの規格による桁数全ての定数を格納することもでき、
この場合には、かかる桁数のバーコードを全て対象とす
ることができる。桁数比較器254はキヤラクタカウン
タ2512のカウント値を一致するものがあるまで定数
メモリ253の各定数と順次比較し、一致する定数がな
いときエラー信号ERR4を出力する。
It is also possible to store constants for all the digits according to the bar code standard in the constant memory 253 in FIG.
In this case, all barcodes with this number of digits can be targeted. The digit comparator 254 sequentially compares the count value of the character counter 2512 with each constant in the constant memory 253 until a match is found, and outputs an error signal ERR4 when there is no match.

【0050】[0050]

【発明の効果】以上説明したように、本発明によれば、
読み取つたバーコードのビツトイメージをキヤラクタ変
換する前に該バーコードの読取り桁数を検出することが
でき、桁数が誤つたバーコードの誤読取りを検出に要す
る時間を大幅に短縮することができる。
[Effects of the Invention] As explained above, according to the present invention,
The number of digits read in a barcode can be detected before converting the bit image of the read barcode into characters, and the time required to detect misreading of a barcode with an incorrect number of digits can be greatly reduced. .

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

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

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

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

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

23  キヤラクタコードビツトイメージメモリ24 
 ストツプコードビツトイメージメモリ25  ビツト
イメージメモリ制御部 251  アドレスカウンタ 2511  ビツトカウンタ 2512  キヤラクタカウンタ 252  アドレスデコーダ 253  定数メモリ 254  桁数比較器 26  スタートストツプ判定部 27  キヤラクタ変換部 29  エラー処理回路
23 Character code bit image memory 24
Stop code bit image memory 25 Bit image memory control section 251 Address counter 2511 Bit counter 2512 Character counter 252 Address decoder 253 Constant memory 254 Number of digits comparator 26 Start/stop judgment section 27 Character conversion section 29 Error processing circuit

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】  読み取られるバーコードのバー毎に該
バーの種類を表わすビツトイメージを生成し、該ビツト
イメージを該バーコードのキヤラクタコードを形成する
バーの本数に等しい個数ずつに区分して該区分を夫々キ
ヤラクタデータに変換するようにした光学読取装置にお
いて、該ビツトイメージをカウントして読み取られる該
バーコードのキヤラクタコードの個数を検出する第1の
手段と、該第1の手段の検出値とバーコードに対して予
め決められたキヤラクタコードの個数に等しい基準値と
を比較する第2の手段とを設け、該検出値と該基準値と
が一致しないとき直ちに該バーコードの次の読取りを行
なわせることを特徴とする光学読取装置。
1. A bit image representing the type of bar is generated for each bar of a barcode to be read, and the bit image is divided into a number equal to the number of bars forming the character code of the barcode. In an optical reading device configured to convert each of the classifications into character data, a first means for counting the bit image and detecting the number of character codes of the barcode to be read; and a second means for comparing the detected value of the barcode with a reference value equal to a predetermined number of character codes for the barcode, and when the detected value and the reference value do not match, the barcode is immediately detected. An optical reading device characterized in that the optical reading device performs the next reading of the image.
JP3048681A 1991-02-22 1991-02-22 Optical reader Pending JPH04268681A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP3048681A JPH04268681A (en) 1991-02-22 1991-02-22 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
JP3048681A JPH04268681A (en) 1991-02-22 1991-02-22 Optical reader

Publications (1)

Publication Number Publication Date
JPH04268681A true JPH04268681A (en) 1992-09-24

Family

ID=12810064

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3048681A Pending JPH04268681A (en) 1991-02-22 1991-02-22 Optical reader

Country Status (1)

Country Link
JP (1) JPH04268681A (en)

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
US5619027A (en) Single width bar code symbology with full character set utilizing robust start/stop characters and error detection scheme
US6095419A (en) Bar code reading apparatus for reading plural code systems
EP0172727B1 (en) Apparatus and method for sensing bar coded data
JPS63197965A (en) Fast electronically reprographic printing
EP0176933A2 (en) Bar code reading apparatus
JPH03204790A (en) Decoding of bar code from partial scanning
US5627358A (en) System and method for reading two-dimensional barcodes
US4438327A (en) Bar code reading system and method
US5537431A (en) Method and apparatus for bar code reading and decoding
JPH07175880A (en) Scanner interface device and method of interfacing the same
JPH01319884A (en) Code reader
EP0464713B1 (en) Bar-code reading apparatus
USRE29104E (en) Method of scanning documents to read characters thereon without interference from visible marks on the document which are not to be read by the scanner
US5471041A (en) Bar-code reader device
US4528443A (en) Bar code reading system and method
US5686716A (en) Bar code void and spot discrimination
JPH04268681A (en) Optical reader
JPH04268985A (en) Optical reader
JPH04268982A (en) Optical reader
JPH04268984A (en) Optical reader
JPH0253194A (en) Identification label and reader
EP0063243B1 (en) Ocr and bar code reader with optimized sensor