JP2778870B2 - Barcode decoder - Google Patents

Barcode decoder

Info

Publication number
JP2778870B2
JP2778870B2 JP4043594A JP4359492A JP2778870B2 JP 2778870 B2 JP2778870 B2 JP 2778870B2 JP 4043594 A JP4043594 A JP 4043594A JP 4359492 A JP4359492 A JP 4359492A JP 2778870 B2 JP2778870 B2 JP 2778870B2
Authority
JP
Japan
Prior art keywords
bar
margin
data
code
character
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.)
Expired - Fee Related
Application number
JP4043594A
Other languages
Japanese (ja)
Other versions
JPH05242286A (en
Inventor
敏浩 一戸
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.)
Toshiba Corp
Original Assignee
Toshiba Corp
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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP4043594A priority Critical patent/JP2778870B2/en
Publication of JPH05242286A publication Critical patent/JPH05242286A/en
Application granted granted Critical
Publication of JP2778870B2 publication Critical patent/JP2778870B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、例えば商品等に印刷あ
るいは貼付されているバーコードラベルからバーコード
を読取るバーコード読取装置に使用されるバーコードデ
コーダに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a bar code decoder used in a bar code reader for reading a bar code from a bar code label printed or affixed to a product or the like.

【0002】[0002]

【従来の技術】近年、小売り業界等において、商品に印
刷あるいは貼付されその商品の識別コードを示すバーコ
ードラベルをレーザビーム等で走査し、その反射光を読
取ってバーコード読取りを行い、その読取りデータを上
位装置であるECR(ElectricCash Register)やPO
S(Point of Sales)ターミナルに送信するバーコード
読取装置が広く使用されている。
2. Description of the Related Art In recent years, in the retail industry and the like, a bar code label printed or affixed to a product and indicating the identification code of the product is scanned with a laser beam or the like, and the reflected light is read to read the bar code. The data is stored in ECR (ElectricCash Register) or PO
Bar code readers for transmitting to S (Point of Sales) terminals are widely used.

【0003】このような用途に使用されるバーコードと
しては、EAN(European ArticleNumber )やJAN
(Japanese Article Number )と呼ばれるUPC(Univ
ersal Product Code)系のバーコードが知られている。
例えば代表的なバーコードを示すと、図3の(a) は左マ
ージン、左ガードバー、左データキャラクタ(6キャラ
クタ)、センタバー、右データキャラクタ(6キャラク
タ)、右ガードバー及び右マージンからなるEAN/J
AN−13のバーコードであり、図3の(b) は左マージ
ン、左ガードバー、左データキャラクタ(4キャラク
タ)、センタバー、右データキャラクタ(4キャラク
タ)、右ガードバー及び右マージンからなるEAN/J
AN−8のバーコードであり、図3の(c) はEAN/J
AN−13と全く同じ構成のUPC−Aのバーコードで
あり、図3の(d) は左マージン、左ガードバー、データ
キャラクタ(6キャラクタ)、右ガードバー及び右マー
ジンからなるUPC−Eのバーコードである。EAN/
JAN−13、EAN/JAN−8、UPC−Aのバー
コードはセンタバーを挟んで左右にハーフセグメントを
持つダブルセグメントコードであり、またUPC−Eの
バーコードはセンタバーを持たないシングルセグメント
コードである。
[0003] Bar codes used in such applications include EAN (European Article Number) and JAN.
(Japanese Article Number) UPC (Univ
ersal Product Code) is known.
For example, FIG. 3A shows a typical bar code. FIG. 3A shows an EAN / bar composed of a left margin, a left guard bar, a left data character (6 characters), a center bar, a right data character (6 characters), a right guard bar, and a right margin. J
FIG. 3B shows an EAN / J bar code consisting of a left margin, a left guard bar, a left data character (4 characters), a center bar, a right data character (4 characters), a right guard bar, and a right margin.
FIG. 3C shows the EAN / J bar code.
FIG. 3D shows a UPC-E bar code having a left margin, a left guard bar, a data character (six characters), a right guard bar, and a right margin. It is. EAN /
JAN-13, EAN / JAN-8, and UPC-A bar codes are double segment codes having half segments on the left and right across the center bar, and UPC-E bar codes are single segment codes without the center bar. .

【0004】またEAN/JAN−13、EAN/JA
N−8、UPC−Aのバーコードの右ガードバーは図4
の(a) に示すように1モジュール幅のスペース1本とバ
ー2本により構成され、これに対しUPC−Eのバーコ
ードの右ガードバーは図4の(c) に示すように1モジュ
ール幅のスペース3本とバー3本により構成され、さら
にEAN/JAN−13、EAN/JAN−8、UPC
−Aのバーコードのセンタバーは図4の(b) に示すよう
に1モジュール幅のスペース3本とバー2本により構成
されている。
Further, EAN / JAN-13, EAN / JA
The right guard bar of the bar code of N-8 and UPC-A is shown in FIG.
As shown in FIG. 4 (a), the right guard bar of the UPC-E bar code is composed of one space of one module width and two bars, as shown in FIG. 4 (c). Consists of three spaces and three bars, and EAN / JAN-13, EAN / JAN-8, UPC
As shown in FIG. 4B, the center bar of the bar code -A is composed of three spaces of one module width and two bars.

【0005】また、各データキャラクタはそれぞれパリ
ティを持ち、例えばEAN/JAN−13の右側キャラ
クタは全て偶数パリティであり、EAN/JAN−13
の左側キャラクタ及びUPC−Eのキャラクタは下表に
示すような組合わせのパリティを持っている。
Further, each data character has a parity. For example, all the right characters of EAN / JAN-13 have even parity, and EAN / JAN-13 has a parity.
And the UPC-E character have a combination of parity as shown in the table below.

【0006】[0006]

【表1】 [Table 1]

【0007】このようなバーコードを読取るバーコード
読取装置は図5に示す構成になっている。すなわち、バ
ーコードシンボルを光学的に走査し、その反射光を受光
して電気信号に変換した後2値化したバーコード信号を
デコード部1に入力してマージン、ガイドバー、センタ
バーの検出及びキャラクタのデコード、キャラクタ数の
判定、パリティチェックを行い、正しいバーコードを読
取ったと判断したときには、デコード部1からCPU2
に割込み要求が供給され、これによりCPU2はバーコ
ードをRAM3に格納する。そしてバーコードがダブル
セグメントコードの場合には左右のハーフセグメントを
組立て、かつモジュロ10チェックを行った後バーコー
ドをインタフェースを介して上位装置であるホストコン
ピュータ4に送信し、またバーコードがシングルセグメ
ントコードの場合にはモジュロ10チェックを行った後
バーコードをインタフェースを介してホストコンピュー
タ4に送信している。
A bar code reader for reading such a bar code has a configuration shown in FIG. That is, a barcode symbol is optically scanned, the reflected light is received, converted into an electric signal, and then a binarized barcode signal is input to the decoding unit 1 to detect a margin, a guide bar, a center bar, and perform character detection. Decoding, the number of characters, parity check, and when it is determined that a correct bar code has been read, the decoding unit 1
Is supplied to the CPU 2 so that the CPU 2 stores the barcode in the RAM 3. If the bar code is a double segment code, the left and right half segments are assembled, a modulo 10 check is performed, and the bar code is transmitted to the host computer 4 as an upper-level device via an interface. In the case of a code, the bar code is transmitted to the host computer 4 via the interface after performing a modulo 10 check.

【0008】このようなバーコード読取装置に使用され
るデーコード部1の構成は、従来、図6に示す構成であ
った。すなわちバーコード信号はバー幅カウンタ5に入
力され、このバー幅カウンタ5でスペース及びバーの幅
をカウントして量子化している。バー幅カウンタ5から
のカウント値は入マージン検出部6、出センタバー検出
部7、入センタバー検出部8、出マージン検出部9及び
キャラクタデコード部10にそれぞれ供給されている。
[0008] The configuration of the data code section 1 used in such a bar code reader is conventionally the configuration shown in FIG. That is, the bar code signal is input to the bar width counter 5, and the bar width counter 5 counts the space and bar width to quantize. The count value from the bar width counter 5 is supplied to an incoming margin detecting unit 6, an outgoing center bar detecting unit 7, an incoming center bar detecting unit 8, an outgoing margin detecting unit 9, and a character decoding unit 10, respectively.

【0009】入マージン検出部6は、キャラクタに先だ
って有効なマージンとガードバーが検出されるとハイレ
ベルな入マージン検出信号IMG を出力し、出マージン検
出部9は、キャラクタに引き続いて有効なガードバーと
マージンが検出されるとハイレベルな出マージン検出信
号OMG を出力している。また出センタバー検出部7は、
キャラクタに引き続いて有効なセンタバーが検出される
とハイレベルな出センタバー検出信号OCB を出力し、入
センタバー検出部8は、キャラクタに先だって有効なセ
ンタバーが検出されるとハイレベルな入センタバー検出
信号ICB を出力している。
When the valid margin and guard bar are detected prior to the character, the incoming margin detecting section 6 outputs a high level incoming margin detecting signal IMG, and the outgoing margin detecting section 9 outputs the valid guard bar and valid bar following the character. When a margin is detected, a high level output margin detection signal OMG is output. Also, the outgoing center bar detecting unit 7
When a valid center bar is detected following the character, a high-level outgoing center bar detection signal OCB is output. When a valid center bar is detected prior to the character, the incoming center bar detecting section 8 outputs a high-level incoming center bar detecting signal ICB. Is output.

【0010】前記入マージン検出部6からの入マージン
検出信号IMG は遅延回路11で所定のタイミングの遅延
が行われた後2入力アンドゲート12の一方の入力端子
に入力され、前記出センタバー検出部7からの出センタ
バー検出信号OCB は前記アンドゲート12の他方の入力
端子に入力されている。また前記入センタバー検出部8
からの入センタバー検出信号ICB は遅延回路13で所定
のタイミングの遅延が行われた後2入力アンドゲート1
4の一方の入力端子に入力され、前記出マージン検出部
9からの出マージン検出信号OMG は前記アンドゲート1
4の他方の入力端子に入力されている。前記アンドゲー
ト12からの出力FOR 及びアンドゲート14からの出力
BCK をデコード制御部15に供給している。
The input margin detection signal IMG from the input margin detector 6 is input to one input terminal of a two-input AND gate 12 after a predetermined timing delay in a delay circuit 11, and the output center bar detector 7 is input to the other input terminal of the AND gate 12. In addition, the input center bar detector 8
The input center bar detection signal ICB is supplied from the two-input AND gate 1 after a predetermined timing delay in the delay circuit 13.
The output margin detection signal OMG from the output margin detector 9 is input to one input terminal of the
4 is input to the other input terminal. Output FOR from AND gate 12 and output from AND gate 14
BCK is supplied to the decoding control unit 15.

【0011】キャラクタデコード部10は入マージン及
びガードバー、あるいは入センタバーが検出されるとキ
ャラクタのデコードを開始し、出センタバーあるいは出
マージン及びガードバーが検出されるまでデコードを行
うようになっている。キャラクタデコード部10からの
出力はデータキャラクタ及びキャラクタのパリティ情報
を含み、データメモリ16に1キャラクタずつ格納され
るようになっている。またキャラクタデコード部10か
ら出力されるデータキャラクタのキャラクタ数をキャラ
クタ数カウンタ17によって計数している。
The character decoding section 10 starts decoding a character when an incoming margin and a guard bar or an incoming center bar are detected, and performs decoding until an outgoing center bar or an outgoing margin and a guard bar are detected. The output from the character decoding unit 10 includes data characters and parity information of the characters, and is stored in the data memory 16 one character at a time. The number of data characters output from the character decoding unit 10 is counted by the character number counter 17.

【0012】前記デコード制御部15は、アンドゲート
12からの出力FOR がハイレベル、すなわち入マージ
ン、ガードバーと出センタバーが検出されたとき及びア
ンドゲート14からの出力BCK がハイレベル、すなわち
入センタバーと出マージン、ガードバーが検出されたと
き前記データメモリ16からキャラクタデータを読出す
と共にキャラクタ数カウンタ17のカウント値を読出
し、データのキャラクタ数、パリティを調べ、デコード
結果が有効であるか否かを確認すると共にバーコードタ
イプを判別している。そしてバーコードデータが有効で
あるときにはCPU2に割込みをかけ、デコードデータ
をそのタイプと共にCPU2に転送するようになってい
る。
The decode control unit 15 determines that the output FOR from the AND gate 12 is at a high level, that is, when an input margin, a guard bar and an output center bar are detected, and that the output BCK from the AND gate 14 is at a high level, that is, when the input center bar is at a high level. When the output margin and guard bar are detected, the character data is read from the data memory 16 and the count value of the character number counter 17 is read, the number of characters and parity of the data are checked, and whether the decoding result is valid or not is checked. And the barcode type is determined. When the barcode data is valid, an interrupt is issued to the CPU 2 and the decoded data is transferred to the CPU 2 together with its type.

【0013】なお、バーコードの読取方向は、信号FOR
がハイレベルのときはマージン、ガードバー→センタバ
ー、すなわちシングルセグメントコードでは正方向、信
号BCK がハイレベルのときはセンタバー→マージン、ガ
ードバーすなわちシングルセグメントコードでは逆方向
となる。そしてパリティの組合わせからコードタイプを
判別するためにはこの読取方向の情報も使用する。
The bar code reading direction is determined by the signal FOR.
When the signal BCK is at a high level, the direction is a forward direction from the center bar to the margin, and when the signal BCK is at a high level, the direction is a reverse direction. The information on the reading direction is also used to determine the code type from the combination of the parities.

【0014】このような構成のデコード部において、ダ
ブルセグメントコードのハーフセグメントを読取るため
には、マージン、ガードバー、データキャラクタ、セン
タバーが有効なものと確認されなければならない。
In order to read the half segment of the double segment code in the decoding section having such a configuration, the margin, guard bar, data character, and center bar must be confirmed as valid.

【0015】例えば、EAN/JAN−13のラベルに
対して図7の(a) に示すように走査した場合、入マージ
ン及びガードバー、出センタバーが確認され、データキ
ャラクタ数が6であり、データのパリティがEAN/J
AN−13として有効であれば、デコード部はEAN/
JAN−13の左側ハーフセグメントデータとしてこの
データを認識する。
For example, when scanning the label of EAN / JAN-13 as shown in FIG. 7A, the input margin, guard bar, and output center bar are confirmed, the number of data characters is 6, and the data Parity is EAN / J
If the signal is valid as AN-13, the decoding unit outputs EAN /
This data is recognized as the left half segment data of JAN-13.

【0016】また、シングルセグメントコードを読取る
ためには最小限、左マージン、左ガードバー、データキ
ャラクタ×6及びセンタバーが有効なものと確認されれ
ばよい。これはシングルセグメントコードの右側ガード
バーは図4の(c) にも示すようにダブルセグメントコー
ドにおけるセンタバー(図4の(b) )に1モジュールの
バーを追加した形となっているため、右側ガードバーを
センタバーとして確認できれば、パリティ組合わせの違
いからダブルセグメントコードの左側ハーフセグメント
と識別することができる。
In order to read the single segment code, it is sufficient that the left margin, the left guard bar, the data character × 6 and the center bar are at least valid. This is because the right guard bar of the single segment code has a form in which one module bar is added to the center bar of the double segment code ((b) of FIG. 4) as shown in FIG. 4 (c). Can be identified as the center bar, it can be identified as the left half segment of the double segment code from the difference in parity combination.

【0017】例えばシングルセグメントコードであるU
PC−Eのラベルに対して図7の(b) に示すように走査
した場合には、左マージン、左ガードバー、データキャ
ラクタ×6、センタバーが確認され、データのパリティ
がUPC−Eとして有効であれば、デコード部はUPC
−Eとしてこのデータを認識する。
For example, U which is a single segment code
When the PC-E label is scanned as shown in FIG. 7B, the left margin, the left guard bar, the data character × 6, and the center bar are confirmed, and the parity of the data is valid as UPC-E. If there is, the decoding unit is UPC
Recognize this data as -E.

【0018】このように従来はデコード部の構成を簡単
にするために、シングルセグメントコードの右ガードバ
ーをダブルセグメントコードのセンタバーと共通の回路
で検出しており、また右マージンの検出は行っていなか
った。すなわちダブルセグメントコードのハーフセグメ
ントとシングルセグメントコードとの識別はパリティの
組合わせの違いによってのみ行っていた。
As described above, in order to simplify the structure of the decoding unit, the right guard bar of the single segment code is detected by a circuit common to the center bar of the double segment code, and the right margin is not detected. Was. That is, the discrimination between the half segment of the double segment code and the single segment code is performed only by the difference in the combination of the parity.

【0019】[0019]

【発明が解決しようとする課題】ところでデコード部1
に入力されるバーコード信号は、電気的、光学的なノイ
ズの影響やラベルの印字品質等により変形を受けている
場合がある。このため一部のバー又はスペースの幅が本
来の幅とは異なってしまい、キャラクタを誤読すると共
にパリティが偶数から奇数へ、あるいは奇数から偶数へ
と変化することがある。このような状態が発生した場
合、大多数はパリティの組合わせがバーコードとして成
立しない、モジュロ10チェックが合わない、左右のセ
グメントデータが合わない等の理由からデータは無効と
され、最終的には誤読とはならない。
The decoding section 1
May be deformed due to the influence of electrical or optical noise, label printing quality, or the like. As a result, the width of some of the bars or spaces is different from the original width, and the character may be misread and the parity may change from even to odd or from odd to even. When such a state occurs, the majority of the data is invalidated because the combination of the parity does not hold as a barcode, the modulo 10 check does not match, the left and right segment data do not match, and so on. Is not misread.

【0020】しかし例えばEAN/JAN−13の左ハ
ーフセグメントの2つのバーあるいはスペースの幅が同
時に変形した場合、パリティの組合わせがUPC−Eと
して成立してしまうというようにダブルセグメントコー
ドのハーフセグメントをシングルセグメントコードとし
て誤読してしまう問題があった。そしてシングルセグメ
ントコードは右側キャラクタを持たないため、左右のデ
ータを組み立てる際のデータチェックが行われることも
なく、モジュロ10チェックが合ってしまえば正しいデ
ータとみなされてホストコンピュータへデータ転送が行
われてしまうことになる。
However, for example, when the width of two bars or spaces in the left half segment of EAN / JAN-13 is simultaneously deformed, the combination of parity is established as UPC-E. Was misread as a single segment code. Since the single segment code does not have the right character, no data check is performed when assembling the left and right data. If the modulo 10 check is satisfied, the data is regarded as correct data and transferred to the host computer. Would be.

【0021】そこで本発明は、構成が簡単で、かつダブ
ルセグメントのコードをシングルセグメントのコードと
して認識する誤読を大幅に低減できるバーコードデコー
ダを提供しようとするものである。
Accordingly, an object of the present invention is to provide a bar code decoder having a simple structure and capable of greatly reducing misreading of recognizing a double segment code as a single segment code.

【0022】[0022]

【課題を解決するための手段】本発明は、マージン、ガ
ードバー及びセンタバーを有するバーコードのバーコー
ドシンボルを光学的に走査し、その反射光を受光して電
気信号に変換した後2値化したバーコード信号からマー
ジン、ガードバー及びセンタバーを検出してバーコード
データを復号するバーコードデコーダにおいて、センタ
バーを有し、左右対称のマージン、ガードバー構成から
なるバーコードのセンタバー検出出力及び右マージン、
右ガードバー検出出力により、センタバーを持たず、左
右のマージン、ガードバーが対称でないバーコードの右
側マージン、ガードバーを検出する手段と、この検出手
段により右側マージン、ガードバー検出が行われたとき
にはキャラクタデータを有効とし、右側マージン、ガー
ドバー検出が行われないときにはキャラクタデータを無
効とする判定手段を設けたものである。
According to the present invention, a bar code symbol of a bar code having a margin, a guard bar and a center bar is optically scanned, the reflected light is received, converted into an electric signal, and then binarized. A bar code decoder for detecting a margin, a guard bar and a center bar from a bar code signal and decoding bar code data has a center bar, a symmetrical margin, a center bar detection output and a right margin of a bar code having a guard bar configuration,
The right guard bar detection output detects the left and right margins without the center bar, the right margin of the bar code where the guard bar is not symmetrical, and the guard bar detection means, and the right margin and guard bar are detected by this detection means, and the character data is valid. And a determination means for invalidating the character data when the right margin and the guard bar are not detected.

【0023】[0023]

【作用】このような構成の本発明においては、パリティ
の組合わせがセンタバーを持たず、左右のマージン、ガ
ードバーが対称でないシングルセグメントコードとして
成立しても、右ガードバー及び右マージンが検出されな
ければキャラクタデータは無効と判定される。
In the present invention having such a configuration, even if the combination of the parity has no center bar and the left and right margins and the guard bar are formed as asymmetric single segment codes, the right guard bar and the right margin are not detected. Character data is determined to be invalid.

【0024】[0024]

【実施例】以下、本発明の一実施例を図面を参照して説
明する。
An embodiment of the present invention will be described below with reference to the drawings.

【0025】図1に示すように、バーコードシンボルを
光学的に走査し、その反射光を受光して電気信号に変換
した後2値化したバーコード信号をバー幅カウンタ21
に入力し、このバー幅カウンタ21でスペース及びバー
の幅をカウントして量子化している。そして前記バー幅
カウンタ21からのカウント値は入マージン検出部2
2、出センタバー検出部23、入センタバー検出部2
4、出マージン検出部25及びキャラクタデコード部2
6にそれぞれ供給されている。
As shown in FIG. 1, a bar code symbol is optically scanned, its reflected light is received, converted into an electric signal, and then converted into a binary code.
The bar width counter 21 counts the width of the space and the bar and quantizes them. The count value from the bar width counter 21 is input to the input margin detection unit 2.
2, outgoing center bar detecting section 23, incoming center bar detecting section 2
4. Outgoing margin detecting section 25 and character decoding section 2
6 respectively.

【0026】前記入マージン検出部22、出センタバー
検出部23、入センタバー検出部24、出マージン検出
部25及びキャラクタデコード部26は前述した図6の
入マージン検出部6、出センタバー検出部7、入センタ
バー検出部8、出マージン検出部9及びキャラクタデコ
ード部10と全く同様の機能を果たすようになってい
る。
The above-mentioned incoming margin detecting section 22, outgoing center bar detecting section 23, incoming center bar detecting section 24, outgoing margin detecting section 25 and character decoding section 26 are composed of the above-mentioned incoming margin detecting section 6, outgoing center bar detecting section 7 and FIG. The input center bar detector 8, the output margin detector 9, and the character decoder 10 perform exactly the same functions.

【0027】前記入マージン検出部22からの入マージ
ン検出信号IMG は遅延回路27で6キャラクタ分の遅延
が行われた後2入力アンドゲート28の一方の入力端子
に入力され、前記出センタバー検出部23からの出セン
タバー検出信号OCB は前記アンドゲート28の他方の入
力端子に入力されている。また前記入センタバー検出部
24からの入センタバー検出信号ICB は遅延回路29で
6キャラクタ分の遅延が行われた後2入力アンドゲート
30の一方の入力端子に入力され、前記出マージン検出
部25からの出マージン検出信号OMG は前記アンドゲー
ト30の他方の入力端子に入力されている。
The input margin detection signal IMG from the input margin detection unit 22 is input to one input terminal of a two-input AND gate 28 after a delay of 6 characters in a delay circuit 27, and is output to the output center bar detection unit. The outgoing center bar detection signal OCB from 23 is input to the other input terminal of the AND gate 28. The input center bar detection signal ICB from the input center bar detection unit 24 is input to one input terminal of a two-input AND gate 30 after a delay of 6 characters is performed by a delay circuit 29, and is output from the output margin detection unit 25. The output margin detection signal OMG is input to the other input terminal of the AND gate 30.

【0028】前記入マージン検出部22からの入マージ
ン検出信号IMG はまた前記遅延回路27で遅延された
後、さらに遅延回路31で3クロック分遅延されて2入
力アンドゲート32の一方の入力端子に入力され、前記
出マージン検出部25からの出マージン検出信号OMG は
2入力アンドゲート33の一方の入力端子に入力されて
いる。
The input margin detection signal IMG from the input margin detection section 22 is also delayed by the delay circuit 27 and further delayed by three clocks by the delay circuit 31 to be applied to one input terminal of the two-input AND gate 32. The output margin detection signal OMG from the output margin detection section 25 is input to one input terminal of a two-input AND gate 33.

【0029】前記アンドゲート28からの出力は遅延回
路34で3クロック分遅延された後、信号FOR としてデ
コード制御部35に供給されると共に前記アンドゲート
33の他方の入力端子に供給されている。そして前記ア
ンドゲート33からの出力を信号EFORとして前記デコー
ド制御部35に供給されている。
The output from the AND gate 28 is delayed by three clocks in a delay circuit 34, and then supplied as a signal FOR to a decode control unit 35 and to the other input terminal of the AND gate 33. The output from the AND gate 33 is supplied to the decode controller 35 as a signal EFOR.

【0030】前記アンドゲート30からの出力は信号BC
K として前記デコード制御部35に供給されると共に前
記アンドゲート32の他方の入力端子に供給されてい
る。そして前記アンドゲート32からの出力を信号EBCK
として前記デコード制御部35に供給されている。
The output from the AND gate 30 is a signal BC
K is supplied to the decode control unit 35 and to the other input terminal of the AND gate 32. The output from the AND gate 32 is supplied to the signal EBCK.
Is supplied to the decode control unit 35.

【0031】前記キャラクタデコード部26からの出力
はデータキャラクタ及びキャラクタのパリティ情報を含
み、データメモリ36に1キャラクタずつ格納されるよ
うになっている。また前記キャラクタデコード部26か
ら出力されるデータキャラクタのキャラクタ数をキャラ
クタ数カウンタ37によって計数している。
The output from the character decoding unit 26 includes data characters and parity information of the characters, and is stored in the data memory 36 one character at a time. The number of data characters output from the character decoding unit 26 is counted by a character number counter 37.

【0032】前記デコード制御部35は、遅延回路34
からの信号FOR がハイレベル、すなわち入マージン、ガ
ードバーと出センタバーが検出されたとき及びアンドゲ
ート30からの信号BCK がハイレベル、すなわち入セン
タバーと出マージン、ガードバーが検出されたとき前記
データメモリ36からキャラクタデータを読出すと共に
前記キャラクタ数カウンタ37のカウント値を読出し、
データのキャラクタ数、パリティを調べ、デコード結果
が有効であるか否かを確認すると共にバーコードタイプ
を判別するようになっている。
The decode control unit 35 includes a delay circuit 34
When the signal FOR from the AND gate 30 is at a high level, that is, when the input margin, guard bar and output center bar are detected, and when the signal BCK from the AND gate 30 is at a high level, that is, when the input center bar, output margin and guard bar are detected, the data memory 36 is output. , And the count value of the character number counter 37, and
The number of characters and parity of the data are checked to determine whether the decoding result is valid and to determine the barcode type.

【0033】また前記デコード制御部35は、アンドゲ
ート33からの信号EFORがハイレベル、すなわち入マー
ジン、ガードバーと出センタバー、さらに出ガードバ
ー、マージンが検出されたとき及びアンドゲート32か
らの信号EBCKがハイレベル、すなわち入センタバーと出
マージン、ガードバーさらに入マージン、ガードバーが
検出されたとき前記データメモリ36からキャラクタデ
ータを読出すと共に前記キャラクタ数カウンタ37のカ
ウント値を読出し、データのキャラクタ数、パリティを
調べ、デコード結果がUPC−Eコードして有効である
か否かを確認すると共にバーコードタイプを判別するよ
うになっている。
The decoding control unit 35 determines whether the signal EFOR from the AND gate 33 is at a high level, that is, when an incoming margin, a guard bar and an outgoing center bar, an outgoing guard bar and a margin are detected, and the signal EBCK from the AND gate 32 is output. When a high level, that is, an incoming center bar and an outgoing margin, a guard bar, and further an incoming margin and a guard bar are detected, the character data is read from the data memory 36 and the count value of the character number counter 37 is read. The bar code type is checked to determine whether the decoded result is valid as a UPC-E code and to determine the bar code type.

【0034】そしてバーコードデータが有効であるとき
には前記デコード制御部35は、CPU38に割込みを
かけ、デコードデータをそのタイプと共にCPU38に
転送するようになっている。
When the bar code data is valid, the decode control unit 35 interrupts the CPU 38 and transfers the decoded data to the CPU 38 together with its type.

【0035】このような構成の実施例においては、EA
N/JAN−13のバーコードシンボルを左側から読取
ったバーコード信号が入力され、入マージン検出部22
で左マージン、左ガードバーが検出され、出センターバ
ー検出部23でセンタバーが検出され、またキャラクタ
デコード部26でデコードされたデータキャラクタ数が
6で、かつデータのパリティがEAN/JAN−13と
して有効であれば、デコーダ制御部35はEAN/JA
N−13の左側ハーフセグメントデータとして認識す
る。また、入センターバー検出部24でセンタバーが検
出され、出マージン検出部25で右マージン、右ガード
バーが検出され、またキャラクタデコード部26でデコ
ードされたデータキャラクタ数が6で、かつデータのパ
リティがEAN/JAN−13として有効であば、デコ
ーダ制御部35はEAN/JAN−13の右側ハーフセ
グメントデータとして認識する。
In the embodiment having such a configuration, the EA
A bar code signal obtained by reading a bar code symbol of N / JAN-13 from the left side is inputted,
Detects the left margin and left guard bar, the center bar is detected by the outgoing center bar detecting unit 23, the number of data characters decoded by the character decoding unit 26 is 6, and the parity of the data is valid as EAN / JAN-13. If so, the decoder control unit 35 sets the EAN / JA
It is recognized as the left half segment data of N-13. Also, the center bar is detected by the incoming center bar detecting unit 24, the right margin and right guard bar are detected by the outgoing margin detecting unit 25, and the number of data characters decoded by the character decoding unit 26 is 6, and the parity of the data is If the data is valid as EAN / JAN-13, the decoder control unit 35 recognizes the data as right half segment data of EAN / JAN-13.

【0036】また、UPC−Eのバーコードシンボルの
ときには、例えば左側から読取ったバーコード信号が入
力され、入マージン検出部22で左マージン、左ガード
バーが検出され、出センターバー検出部23でセンタバ
ーが検出され、またキャラクタデコード部26でデコー
ドされたデータキャラクタ数が6で、かつデータのパリ
ティがUPC−Eとして有効であっても、アンドゲート
33からの信号EFORがハイレベルでなければ、デコーダ
制御部35はUPC−Eのバーコードデータとして認識
せず無効にする。すなわち出ガードバー及び出マージン
が検出されなければUPC−Eのバーコードデータとし
ては無効とする。
In the case of a UPC-E bar code symbol, for example, a bar code signal read from the left side is input, the left margin and the left guard bar are detected by the input margin detecting section 22, and the center bar is detected by the output center bar detecting section 23. If the number of data characters decoded by the character decoding unit 26 is 6 and the parity of the data is valid as UPC-E, but the signal EFOR from the AND gate 33 is not at a high level, the decoder The control unit 35 does not recognize the barcode data as UPC-E and invalidates it. That is, if the output guard bar and the output margin are not detected, the barcode data is invalid as UPC-E barcode data.

【0037】また例えば右側から読取ったときには、入
センターバー検出部24でセンタバーが検出され、出マ
ージン検出部25で左ガードバー、左マージンが検出さ
れることになるが、このときにもキャラクタデコード部
26でデコードされたデータキャラクタ数が6で、かつ
データのパリティがUPC−Eとして有効であっても、
アンドゲート32からの信号EBCKがハイレベルでなけれ
ば、デコーダ制御部35はUPC−Eのバーコードデー
タとして認識せず無効にする。すなわち入マージン及び
入ガードバーが検出されなければUPC−Eのバーコー
ドデータとしては無効とする。
For example, when reading from the right side, the center bar is detected by the incoming center bar detecting section 24, and the left guard bar and the left margin are detected by the outgoing margin detecting section 25. Even if the number of data characters decoded at 26 is 6 and the parity of the data is valid as UPC-E,
If the signal EBCK from the AND gate 32 is not at a high level, the decoder control unit 35 does not recognize it as UPC-E barcode data and invalidates it. That is, if the incoming margin and the incoming guard bar are not detected, the barcode data is invalid as UPC-E barcode data.

【0038】このようにシングルセグメントコードの右
ガードバーをダブルセグメントコードのセンタバーと共
通の回路で検出し、しかも従来回路に遅延回路31,3
4とアンドゲート32,33を追加するのみなので構成
は簡単である。
As described above, the right guard bar of the single segment code is detected by the same circuit as the center bar of the double segment code, and the delay circuits 31 and 3 are added to the conventional circuit.
4 and AND gates 32 and 33 are simply added, so that the configuration is simple.

【0039】またセンタバー、ガードバー、マージンの
検出が行われ、またデータキャラクタ数が正しく、かつ
データのパリティがUPC−Eとして有効であっても、
アンドゲート32,33からの信号がハイレベルで無け
ればUPC−Eのバーコードデータとしては無効として
いるので、UPC−Eのバーコードデータの認識をより
確実にすることができ、誤読を大幅に低減できる。すな
わちEAN/JAN−13の左側ハーフセグメントデー
タの2つのバーあるいはスペースの幅が同時に変形して
パリティの組合わせがUPC−Eとして成立してしまう
事態が発生しても、EAN/JAN−13の左側ハーフ
セグメントデータからは出ガードバー及び出マージンが
検出されないのでバーコードデータは無効とされる。
Further, even if the center bar, guard bar, and margin are detected, and the number of data characters is correct and the parity of the data is valid as UPC-E,
If the signals from the AND gates 32 and 33 are not at a high level, the bar code data of the UPC-E is invalid, so that the recognition of the bar code data of the UPC-E can be made more reliable and the erroneous reading can be greatly reduced. Can be reduced. That is, even if the width of the two bars or spaces of the left half segment data of the EAN / JAN-13 is simultaneously deformed and the combination of the parity is established as the UPC-E, the EAN / JAN-13 cannot be used. Since the outgoing guard bar and the outgoing margin are not detected from the left half segment data, the barcode data is invalidated.

【0040】なお、UPC系コードにはハーフセグメン
トが6キャラクタで構成されるものと4キャラクタで構
成されるものがある。そして入マージンと出センタバー
の間及び入センタバーと出マージンの間のバー及びスペ
ースの数はキャラクタ数により異なる。そこで遅延回路
27及び29の構成を図2に示すように、2つの遅延回
路41,42と1つのオアゲート43からなる回路に置
き換える。すなわち検出部22,24からの検出信号を
遅延回路41で4キャラクタ分遅延し、遅延回路42で
さらに2キャラクタ分遅延させ、4キャラクタ分遅延し
た検出信号及び。6キャラクタ分遅延した検出信号をオ
アゲート43を介して出力させる。
The UPC code includes a half segment consisting of six characters and a half segment consisting of four characters. The number of bars and spaces between the incoming margin and the outgoing center bar and between the incoming center bar and the outgoing margin vary depending on the number of characters. Therefore, the configuration of the delay circuits 27 and 29 is replaced with a circuit including two delay circuits 41 and 42 and one OR gate 43 as shown in FIG. That is, the detection signal from the detection units 22 and 24 is delayed by four characters by the delay circuit 41, further delayed by two characters by the delay circuit 42, and the detection signal delayed by four characters. The detection signal delayed by six characters is output via the OR gate 43.

【0041】このようにすれば、キャラクタ数が4キャ
ラクタの場合も6キャラクタの場合も入マージン検出信
号IMG は出センタバー検出信号OCB とタイミングを一致
させることができ、また入センタバー検出信号ICB は出
マージン検出信号OMG とタイミングを一致させることが
できる。従ってハーフセグメントが6キャラクタで構成
されるものであっても4キャラクタで構成されるもので
あってもデコードができることになる。
In this way, regardless of whether the number of characters is four or six, the timing of the incoming margin detection signal IMG and the output center bar detection signal OCB can be matched, and the input center bar detection signal ICB can be output at the same time. The timing can be matched with the margin detection signal OMG. Therefore, decoding can be performed whether the half segment is composed of six characters or four characters.

【0042】なお、前記実施例は各部をハードウエア構
成としたが必ずしもこれに限定されるものではなく、プ
ログラムを使用したソフトウエアによっても構成できる
ものである。
In the above-described embodiment, each component has a hardware configuration. However, the present invention is not limited to this. The configuration can also be configured by software using a program.

【0043】[0043]

【発明の効果】以上詳述したように本発明によれば、ダ
ブルセグメントコードと共通の検出手段を使用してシン
グルセグメントコードの右ガードバー、右マージンを検
出して構成の簡単化を図ったものにおいて、ダブルセグ
メントのコードをシングルセグメントのコードとして認
識する誤読を大幅に低減できるバーコードデコーダを提
供できるものである。
As described above in detail, according to the present invention, the right guard bar and the right margin of a single segment code are detected by using the same detection means as the double segment code to simplify the structure. The present invention can provide a bar code decoder which can greatly reduce erroneous reading of recognizing a double segment code as a single segment code.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の一実施例を示すブロック図。FIG. 1 is a block diagram showing one embodiment of the present invention.

【図2】本発明の他の実施例を示す遅延部の回路図。FIG. 2 is a circuit diagram of a delay unit according to another embodiment of the present invention.

【図3】UPC−E系のバーコード構成を示す図。FIG. 3 is a diagram showing a barcode configuration of a UPC-E system.

【図4】UPC−E系のバーコードのガードバー、セン
タバーの構成を拡大して示す図。
FIG. 4 is an enlarged view showing a configuration of a guard bar and a center bar of a UPC-E system bar code.

【図5】バーコード読取装置の構成を示すブロック図。FIG. 5 is a block diagram illustrating a configuration of a barcode reading device.

【図6】従来例を示すブロック図。FIG. 6 is a block diagram showing a conventional example.

【図7】EAN/JAN−13及びUPC−Eのバーコ
ード読取りとデコード処理の関係を説明するための図。
FIG. 7 is a view for explaining the relationship between bar code reading and decoding processing of EAN / JAN-13 and UPC-E.

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

22…入マージン検出部、23…出センタバー検出部、
24…入センタバー検出部、25…出マージン検出部、
26…キャラクタデコード部、27,29,31,34
…遅延回路、28,30,32,33…アンドゲート、
35…デコード制御部。
22 ... in margin detection unit, 23 ... out center bar detection unit
24 ... in center bar detection unit, 25 ... out margin detection unit
26: Character decoding unit, 27, 29, 31, 34
... delay circuits, 28, 30, 32, 33 ... AND gates
35 ... Decoding control unit.

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 マージン、ガードバー及びセンタバーを
有するバーコードのバーコードシンボルを光学的に走査
し、その反射光を受光して電気信号に変換した後2値化
したバーコード信号からマージン、ガードバー及びセン
タバーを検出してバーコードデータを復号するバーコー
ドデコーダにおいて、センタバーを有し、左右対称のマ
ージン、ガードバー構成からなるバーコードのセンタバ
ー検出出力及び右マージン、右ガードバー検出出力によ
り、センタバーを持たず、左右のマージン、ガードバー
が対称でないバーコードの右側マージン、ガードバーを
検出する手段と、この検出手段により右側マージン、ガ
ードバー検出が行われたときにはキャラクタデータを有
効とし、右側マージン、ガードバー検出が行われないと
きにはキャラクタデータを無効とする判定手段を設けた
ことを特徴とするバーコードデコーダ。
1. A bar code symbol of a bar code having a margin, a guard bar, and a center bar is optically scanned, the reflected light is received, converted into an electric signal, and then converted to an electric signal. A bar code decoder that detects a center bar and decodes bar code data has a center bar, has a symmetrical margin, a center bar detection output of a bar code having a guard bar configuration, a right margin, and a right guard bar detection output. Means for detecting the right and left margins, the right margin of the bar code in which the guard bar is not symmetrical, and the guard bar. When the right margin and the guard bar are detected by this detecting means, the character data is validated, and the right margin and the guard bar are detected. When there is no character A bar code decoder, further comprising a determination unit for invalidating data.
JP4043594A 1992-02-28 1992-02-28 Barcode decoder Expired - Fee Related JP2778870B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4043594A JP2778870B2 (en) 1992-02-28 1992-02-28 Barcode decoder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4043594A JP2778870B2 (en) 1992-02-28 1992-02-28 Barcode decoder

Publications (2)

Publication Number Publication Date
JPH05242286A JPH05242286A (en) 1993-09-21
JP2778870B2 true JP2778870B2 (en) 1998-07-23

Family

ID=12668129

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4043594A Expired - Fee Related JP2778870B2 (en) 1992-02-28 1992-02-28 Barcode decoder

Country Status (1)

Country Link
JP (1) JP2778870B2 (en)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2732909B2 (en) * 1989-10-05 1998-03-30 富士通株式会社 Barcode reader

Also Published As

Publication number Publication date
JPH05242286A (en) 1993-09-21

Similar Documents

Publication Publication Date Title
JP3004017B2 (en) Barcode decryption method
EP0390162A2 (en) An apparatus for reading a bar code
US4667089A (en) Bar code discriminating apparatus for bar code reading
US5245167A (en) Bar-code reading apparatus
JPH0354388B2 (en)
JP3550807B2 (en) Barcode decoding method
US4253018A (en) Symbol decoding system
JPH09179926A (en) Method for demodulating bar code and bar code reader
JP2778870B2 (en) Barcode decoder
EP0063243B1 (en) Ocr and bar code reader with optimized sensor
US5519199A (en) Method and apparatus for detecting and storing bar bode data and re-detecting undetected data
JP2766768B2 (en) Barcode decoder decoding method
JP3198232B2 (en) Barcode reading method and reader
JP2937527B2 (en) Barcode reader
US20230419060A1 (en) Method, System and Apparatus Employing an Adaptive Threshold to Decode Barcodes
KR940006118B1 (en) Middle bar detection and correct character decision method and apparatus of bar code system
JPS6229837B2 (en)
JP2641991B2 (en) Data processing method of bar code reader
KR900004659B1 (en) Circuit for preprocessing bar code scanner
JP2779898B2 (en) Barcode reader
JP2761251B2 (en) Barcode reading method
JP2750244B2 (en) Barcode decoder decoding method
JP3002601B2 (en) Barcode reader
JP2912743B2 (en) Barcode decoder
JP2779517B2 (en) Barcode detection device

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080508

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090508

Year of fee payment: 11

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090508

Year of fee payment: 11

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100508

Year of fee payment: 12

LAPS Cancellation because of no payment of annual fees