JPS6398081A - Bar code reader - Google Patents

Bar code reader

Info

Publication number
JPS6398081A
JPS6398081A JP24352286A JP24352286A JPS6398081A JP S6398081 A JPS6398081 A JP S6398081A JP 24352286 A JP24352286 A JP 24352286A JP 24352286 A JP24352286 A JP 24352286A JP S6398081 A JPS6398081 A JP S6398081A
Authority
JP
Japan
Prior art keywords
barcode
circuit
data
signal
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.)
Granted
Application number
JP24352286A
Other languages
Japanese (ja)
Other versions
JPH07104902B2 (en
Inventor
Norihisa Osaka
大坂 規久
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 TEC Corp
Original Assignee
Tokyo 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 Tokyo Electric Co Ltd filed Critical Tokyo Electric Co Ltd
Priority to JP61243522A priority Critical patent/JPH07104902B2/en
Publication of JPS6398081A publication Critical patent/JPS6398081A/en
Publication of JPH07104902B2 publication Critical patent/JPH07104902B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Abstract

PURPOSE:To easily perform the change or the correction of the logic of recognition, by processing only detection whether information is bar code information or not by a hardware, and performing the recognition processing of a bar code by a microcomputer in a software way. CONSTITUTION:A bar code pattern detection circuit 29 detects a bar code pattern by using an inputted binarization signal, and a digital data, and informs the fact that the bar code information is stored in a FIFO register 28 to the microcomputer 30 by a bar code detecting signal. The computer 30, at the time of receiving the input of the bar code detecting signal from the circuit 29, reads the data of the register 28 by applying interruption, and performs the recognition processing of the bar code. Thereby, at the time of changing or correcting the logic of the recognition such as decode, or algorithm, etc., the circuit 29 can be used without applying any change, and a part to be changed is limited only to the program of the computer 30, therefore, a changing work can be facilitated.

Description

【発明の詳細な説明】 [産業上の利用分野] この発明は例えば商品に付されたバーコードを読取るバ
ーコード読取り装置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a barcode reading device for reading barcodes attached to products, for example.

[従来の技術] バーコード読取りIIとしては、ハンド式スキャナーを
使用したものや定置式スキャナーを使用したものがある
[Prior Art] Barcode reading II includes those using a hand scanner and those using a stationary scanner.

従来、ハンド式スキャナーを使用したものとしては、第
10図に示すようにバーコードを例えばペン式スキャナ
ー1で走査して読取り、それを2値化回路2で信号処理
して2値化し、その2値化信号をマイクロコンピュータ
3でソフト処理を行なってバーコードillを行なうよ
うにしている。
Conventionally, as shown in FIG. 10, when a hand-held scanner is used, a barcode is scanned and read by, for example, a pen-type scanner 1, and then the signal is processed and binarized by a binarization circuit 2. The binary signal is subjected to software processing by the microcomputer 3 to create a barcode ill.

このようにペン式スキャナー1を使用するものは人の手
で操作するためバーコードの走査速度は遅く、このため
マイクロコンピュータ3によるソフト処理で充分対応で
きる。
Since the pen-type scanner 1 is operated manually, the scanning speed of the barcode is slow, and therefore software processing by the microcomputer 3 is sufficient.

これに対して定置式スキャナーを使用したものとしては
第11図に示すように、箱状の台4内にレーザ光源5を
設け、その光源5からのレーザビームを回転するポリゴ
ンミラー6によって偏向して台4上の読取り窓7を走査
する。そして窓7の上にバーコードが位置するとその反
射光が受光器8によって受光され、その受光器8からの
信号を2値化回路9で増幅、信号処理などを行なって2
値化し、その2値化信号をランレングスカウンタ10で
バーの幅に相当するデジタル量に量子化し、そのデジタ
ル信号をバーコードKLiE回路11で処理してマージ
ン、ガードバ−の判定、バーコードか否かの判定、キャ
ラクタのデコードを高速でリアルタイムに実行し、その
後の比較的低速でよいキャラクタの編集、チェック(パ
リティチェック、モジュラスチェック)、インターフェ
ースをマイクロコンピュータ12で実行するものが知ら
れている。すなわち、定置式スキャナーを使用するもの
はレーザービームを使用してバーコードを高速で走査す
るためランレングスカウンタ10で処理されたデータを
そのままマイクロコンピュータ12に入力してソフト的
に処理することは処理スピードが要求されることから不
可能となり、バーコード認識回路11を使用して高速処
理の部分をハード的に行なわせてからマイクロコンピュ
ータ12で処理するようにしている。
On the other hand, as shown in FIG. 11, a stationary scanner uses a laser light source 5 installed in a box-shaped table 4, and the laser beam from the light source 5 is deflected by a rotating polygon mirror 6. to scan the reading window 7 on the stage 4. When the barcode is located on the window 7, the reflected light is received by the light receiver 8, and the signal from the light receiver 8 is amplified and processed by the binarization circuit 9.
The binarized signal is quantized into a digital amount corresponding to the width of the bar by a run length counter 10, and the digital signal is processed by a barcode KLiE circuit 11 to determine the margin, guard bar, and whether or not it is a barcode. It is known that a microcomputer 12 executes character determination and character decoding in real time at high speed, and then executes character editing, checking (parity check, modulus check), and interface at relatively low speed. In other words, in those that use a stationary scanner, barcodes are scanned at high speed using a laser beam, so it is not necessary to input the data processed by the run-length counter 10 directly into the microcomputer 12 and process it using software. Since speed is required, this is not possible, so the bar code recognition circuit 11 is used to perform the high-speed processing part in hardware, and then the microcomputer 12 processes it.

[発明が解決しようとする問題点] しかし従来使用されているバーコード認識回路11はマ
ージン、ガードバ−の判定、バーコードか否かの判定、
キャラクタのデコードをすべて行なう論理回路構成とな
っているため、回路構成がかなり複雑になるとともに、
デコードやアルゴリズムなど認識の論理を変更したり、
修正したりするとそのためにバーコード認識回路11の
論理回路構成を変更しなければならず作業がきわめて面
倒なる問題があった。
[Problems to be Solved by the Invention] However, the conventionally used barcode recognition circuit 11 cannot judge margins, guard bars, judge whether or not it is a barcode, etc.
Since it has a logic circuit configuration that performs all character decoding, the circuit configuration becomes quite complex, and
Change recognition logic such as decoding and algorithms,
If such a correction is made, the logic circuit configuration of the barcode recognition circuit 11 must be changed, resulting in a problem that the work becomes extremely troublesome.

この発明は、バーコード情報か否かの検出のみをハード
処理で行い、バーコードの認識処理はマイクロコンピュ
ータによってソフト的に行い、従ってr!tWAの論理
の変更や修正があるとプログラム変更のみで対処でき、
認識の論理の変更や修正が比較的容易にできるとともに
ハード部の論理回路構成が比較的簡単にできるバーコー
ド読取り装置を提供しようとするものである。
In this invention, only the detection of whether or not it is barcode information is performed by hardware processing, and the barcode recognition processing is performed by software by a microcomputer. Changes or modifications to the tWA logic can be handled by simply changing the program.
It is an object of the present invention to provide a barcode reading device in which the recognition logic can be changed and modified relatively easily, and the logic circuit configuration of the hardware part can be relatively simple.

[問題点を解決するための手段] この発明は、バーコード検出部と、このバーコード検出
部からの信号を処理して2値化信号を出力する2値化回
路と、この2値化回路からの2値化信号をランレングス
データに変換するランレングスカウンタと、このカウン
タ出力を記憶する1又は複数のシフトレジスタと、2値
化回路からの211化信号及びランレングスカウンタか
らのデータを入力してバーコードパターンを検出するバ
ーコードパターン検出回路と、このバーコード検出回路
からのバーコード検出信号に応動して1又は複数のシフ
トレジスタのデータを取込みバーコードの!!!識処理
を行なう1又は複数のマイクロコンピュータとからなり
、バーコードパターン検出回路は、2値化信号の変化に
応動して順次、かつバーコードの1キャラクタ周期でカ
ウント動作を行なう複数のカウンタと、この各カウンタ
のデータをそれぞれラッチする複数のラッチ回路と、こ
の各ラッチ回路出力と各カウンタ出力に応動してキャラ
クタ幅の変動を検出するキャラクタ幅変動検出回路と、
この検出回路出力に応動してキャラクタ幅の変動が規定
内で連続していることを判定する判定回路と、この判定
回路が連続を判定したときそのときの1キャラクタ分の
データに一定値を柴じたデータを保持するデータ保持回
路と、このデータ保持回路に保持されたデータとランレ
ングスカウンタのデータとを比較し、カウンタのデータ
が保持回路のデータより大きくなったときバーコード検
出信号を出力する比較出力回路とで構成したものである
[Means for Solving the Problems] The present invention provides a barcode detection section, a binarization circuit that processes a signal from the barcode detection section and outputs a binarized signal, and this binarization circuit. A run-length counter that converts the binary signal from the binary circuit into run-length data, one or more shift registers that store the output of this counter, and inputs the 211-coded signal from the binary circuit and the data from the run-length counter. a barcode pattern detection circuit that detects a barcode pattern; and a barcode pattern detection circuit that reads data from one or more shift registers in response to a barcode detection signal from this barcode detection circuit and detects the barcode pattern. ! ! The barcode pattern detection circuit includes one or more microcomputers that perform identification processing, and the barcode pattern detection circuit includes a plurality of counters that perform counting operations sequentially in response to changes in the binary signal and in one character period of the barcode; a plurality of latch circuits that latch the data of each counter, a character width variation detection circuit that detects a variation in character width in response to each latch circuit output and each counter output;
A determination circuit responds to the output of this detection circuit and determines whether the character width fluctuations are continuous within a specified range, and when this determination circuit determines continuity, a constant value is assigned to the data for one character at that time. A data holding circuit that holds the same data, compares the data held in this data holding circuit with the run length counter data, and outputs a barcode detection signal when the counter data is greater than the holding circuit data. It consists of a comparison output circuit.

[作用] このような構成の本発明においては、2値化回路で2値
化されたバーコードの読取りデータはランレングスカウ
ンタでm子化されてランレングスデータとなり、シフト
レジスタで記憶される。
[Operation] In the present invention having such a configuration, barcode read data that has been binarized by the binarization circuit is converted into m children by the run-length counter to become run-length data, and is stored in the shift register.

一方、2値化信号の0,1の変化に応動して複数のカウ
ンタを順次、かつそれぞれがバーコードの1キャラクタ
周期でカウント動作するとともにその各カウンタのカウ
ントデータをそれぞれラッチ回路でラッチする。そして
各ラッチ回路出力と各カウンタ出力によってキャラクタ
幅の変動を検出し、その変動が規定内で連続しているか
否かを判定する。
On the other hand, in response to changes of 0 and 1 in the binary signal, a plurality of counters sequentially perform a counting operation in one character cycle of the bar code, and the count data of each counter is latched by a latch circuit. Fluctuations in the character width are detected based on the outputs of each latch circuit and the outputs of each counter, and it is determined whether the fluctuations are continuous within a specified range.

そして変動が規定内で連続していることを判定しそのと
き1キャラクタ分のデータに一定値を乗じたデータとラ
ンレングスカウンタのデータとを比較し、カウンタのデ
ータの方が大きいときバーコード情報がシフトレジスタ
に格納されたことをマイクロコンピュータに知らせるた
めのバーコード検出信号をマイクロコンピュータへ出力
する。
Then, it is determined that the fluctuation is continuous within the specified range, and then the data obtained by multiplying the data for one character by a certain value is compared with the run length counter data, and if the counter data is larger, the bar code information A barcode detection signal is output to the microcomputer to inform the microcomputer that the barcode has been stored in the shift register.

これによりマイクロコンピュータはシフトレジスタに格
納されているデータを読込みバーコードの認識処理を行
なう。
As a result, the microcomputer reads the data stored in the shift register and performs barcode recognition processing.

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

第1図に示すように、箱状の台21内にレーザ光源22
を設け、その光源22からのレーザビームを回転するポ
リゴンミラー23によって偏向して台21上に設けられ
た読取り窓24の面を走査するようにしている。そして
窓24の上面側に例えば商品に付されたバーコードが位
置するとレーザビームがそのバコードに反射し、その反
射光が受光器25によって受光されるようになっている
As shown in FIG. 1, a laser light source 22 is installed inside a box-shaped stand 21.
A laser beam from the light source 22 is deflected by a rotating polygon mirror 23 to scan the surface of a reading window 24 provided on the table 21. For example, when a bar code attached to a product is located on the upper surface side of the window 24, the laser beam is reflected by the bar code, and the reflected light is received by the light receiver 25.

前記受光器25からの出力信号を2値化回路26に入力
し、その2値化回路26によって増幅、信号処理などを
行なって2値化している。この2値化回路26からの2
値化信号をランレングスカウンタ27に入力しそのカウ
ンタ27でバーの幅に相当するデジ゛タル量に量子化し
ている。
The output signal from the photoreceiver 25 is input to a binarization circuit 26, which performs amplification, signal processing, etc., and converts it into a binary signal. 2 from this binarization circuit 26
The value signal is input to a run length counter 27, and the counter 27 quantizes it into a digital amount corresponding to the width of the bar.

前記ランレングスカウンタ27で量子化したデジタルデ
ータをシフトレジスタの一種であるデータを先入、先出
する例えば256バイトの記憶容量を持つFIFO(フ
ァースト・インーファーストφアウト)レジスタ28に
供給している。
The digital data quantized by the run-length counter 27 is supplied to a FIFO (first-in-first φ-out) register 28, which is a type of shift register and has a storage capacity of, for example, 256 bytes.

また前記2値化回路26からの2値化信号及びランレン
グスカウンタ27からのデジタルデータをバーコードパ
ターン検出回路29に供給している。このバーコードパ
ターン検出回路29は入力される2値化信号とデジタル
データを使用してバーコードパターンを検出し、FIF
Oレジスタ28にバーコード情報が格納されていること
をバーコード検出信号によってマイクロコンピュータ3
0に知らせるようにしている。
Further, the binary signal from the binarization circuit 26 and the digital data from the run length counter 27 are supplied to the barcode pattern detection circuit 29. This barcode pattern detection circuit 29 detects a barcode pattern using the input binary signal and digital data, and
The microcomputer 3 uses a barcode detection signal to confirm that barcode information is stored in the O register 28.
I am trying to notify 0.

前記マイクロコンピュータ30はバーコードパターン検
出回路29からバーコード検出信号が入力されると割込
みによってFIFOレジスタ28のデータを読込みバー
コードの認識処理を行なうようにしている。
When the microcomputer 30 receives a barcode detection signal from the barcode pattern detection circuit 29, it uses an interrupt to read data from the FIFO register 28 and perform barcode recognition processing.

前記ランレングスカウンタ27、FIFOレジスタ28
及びバーコードパターン検出回路29で構成される回路
は具体的には第2図に示すように構成されている。
The run length counter 27, FIFO register 28
Specifically, the circuit including the barcode pattern detection circuit 29 is constructed as shown in FIG.

すなわち、2値化回路26からの2IIi化信号を2段
のD形フリップ70ツブ31.32と排他的オア回路3
3とで構成される回路に入力し、エッチ信号EDGを作
っている。またそのエッチ信号EDGをD形フリップフ
ロップ34に入力してエッチ信号EDG’を作っている
。なお、各7リツプフロツプ31.32.34のクロッ
ク入力端子OKにはクロック発生器35から発生するク
ロックCLKがそれぞれ入力されている。
That is, the 2IIi signal from the binarization circuit 26 is passed through the two-stage D-type flip 70 tube 31, 32 and the exclusive OR circuit 3.
3 and generates an etch signal EDG. Further, the etch signal EDG is inputted to a D-type flip-flop 34 to generate an etch signal EDG'. Note that the clock CLK generated from the clock generator 35 is input to the clock input terminal OK of each of the seven lip-flops 31, 32, and 34.

すなわち、第3図の(a)に示すように2値化信号が入
力されると、フリップフロップ31は第3図の(b)に
示すクロックCLKを入力されて第3図の(C)で示す
タイミングで動作するとともにフリップ70ツブ32は
フリップフロップ31の出力とクロックCLKを入力さ
れて第3図の(d)で示すタイミングで動作し、排他的
オアゲート33からは第3図の(e)で示されるエッヂ
信J!EDGが出力される。そしてこのエッチ信号ED
GとクロックCLKが7リツプフロツプ34に入力され
てそのフリップフロップ34から第3因の(、f)に示
すエッチ信号EDG’が出力される。
That is, when the binary signal is inputted as shown in FIG. 3(a), the flip-flop 31 receives the clock CLK shown in FIG. 3(b) and outputs the signal in FIG. 3(C). At the same time, the flip 70 tube 32 operates at the timing shown in FIG. 3(d) by receiving the output of the flip-flop 31 and the clock CLK, and the exclusive OR gate 33 operates at the timing shown in FIG. 3(e). Edge Shinji shown in J! EDG is output. And this sex signal ED
G and the clock CLK are input to the flip-flop 34, and the flip-flop 34 outputs the third factor, the etch signal EDG' shown in (, f).

前記エッヂ信号EDGはマイクロコンピュータ30から
の書込みイネーブルとの論理積を取り、FIFOレジス
タ28に対して書込み信号として供給されている。なお
、FIFOレジスタ28からのデータの読出しはマイク
ロコンピュータ30からの読出しクロックによって行な
うようになっている。
The edge signal EDG is ANDed with the write enable from the microcomputer 30 and is supplied to the FIFO register 28 as a write signal. Note that data is read from the FIFO register 28 using a read clock from the microcomputer 30.

前記エッヂ信号EDG’は前記ランレングスカウンタ2
7のクリア端子CLRに供給されている。
The edge signal EDG' is applied to the run length counter 2.
It is supplied to the clear terminal CLR of No.7.

このランレングスカウンタ27は例えば9ビツトカウン
タで前記りOツク発生器35からのクロックCLKをク
ロック入力端子GKに入力してカウントすることによっ
てバーの幅をクロックCLKを最小単位とするデジタル
データに変換するようにしている。
This run length counter 27 is, for example, a 9-bit counter, which inputs the clock CLK from the clock generator 35 to the clock input terminal GK and counts it, thereby converting the width of the bar into digital data whose minimum unit is the clock CLK. I try to do that.

前記エッヂ信号EDGはまた2ビツトカウンタ36及び
デコーダ37のG入力端子にも入力している。カウンタ
36のQ^、QB比出力前記デコーダ37のA、B入力
端子にそれぞれ入力するとともに、7ビツトマルチブレ
クサ38.39のA。
The edge signal EDG is also input to the G input terminal of the 2-bit counter 36 and decoder 37. The Q^ and QB ratio outputs of the counter 36 are input to the A and B input terminals of the decoder 37, respectively, and the A of the 7-bit multiplexer 38.39.

B入力端子にそれぞれ入力している。Each is input to the B input terminal.

すなわち前記カウンタ36は第4図の(b)に示すエッ
ヂ信号EDGを入力されて第4図の(C)に示すQA比
出力送出するとともに第4図の(d)に示すQa比出力
送出する。前記デコーダ37はエッヂ信号EDGとカウ
ンタ36からのQA比出力QB比出力入力されてその各
出力端子Yo 、Yl。
That is, the counter 36 receives the edge signal EDG shown in FIG. 4(b) and sends out the QA ratio output shown in FIG. 4(C), as well as the Qa ratio output shown in FIG. 4(d). . The decoder 37 receives the edge signal EDG and the QA ratio output and QB ratio output from the counter 36, and outputs the output terminals Yo and Yl.

Y2 、Ylから第4図の(e)に示す出力Eo 。Output Eo shown in FIG. 4(e) from Y2 and Yl.

第4図の(f)に示す出力Es、第4図の(Q)に示す
出力E2、第4図の(h)に示す出力E3をそれぞれ出
力する。
The output Es shown in (f) of FIG. 4, the output E2 shown in (Q) of FIG. 4, and the output E3 shown in (h) of FIG. 4 are output, respectively.

前記デコーダ37からの各出力EO、Et 。Each output EO, Et from the decoder 37.

E2 、Eiを4つの7ビツトカウンタ38.39゜4
0.41のクリア端子CLRに供給している。
E2, Ei are four 7-bit counters 38.39°4
0.41 is supplied to the clear terminal CLR.

この各カウンタ38〜41のクロック入力端子OKには
前記りOツク発生器35からのクロックCLKを1/4
分周器42で174分周したクロックCLK’がそれぞ
れ入力されている。
The clock input terminal OK of each of the counters 38 to 41 receives 1/4 of the clock CLK from the clock generator 35.
A clock CLK' whose frequency is divided by 174 by a frequency divider 42 is inputted.

前記各カウンタ38.39.40.41のカウンタデー
タを4つの7ピツトラツチ回路43゜44.45.46
それぞれラッチするようにしている。この各ラッチ回路
43〜46のクロック入力端子GKには前記デコーダ3
7の各出力EO。
The counter data of each counter 38, 39, 40, 41 is transferred to four 7-pit latch circuits 43, 44, 45, 46.
I try to latch each one. The clock input terminal GK of each latch circuit 43 to 46 is connected to the decoder 3.
7 each output EO.

Es 、E2 、E3がそれぞれ入力されている。Es, E2, and E3 are each input.

前記各ラッチ回路43〜46でラッチしたデータを前述
した一方のマルチプレクサ38の入力端子Xo 、Xl
、X2 * Xsにそれぞれ入力するとともに、前記各
カウンタ38〜41のカウントデータを前述した他方の
マルチプレクサ39の入力端子Xa 、Xs 、X2 
、X3に入力している。この各マルチプレクサ38.3
9は前記カウンタ36の出力Q^、Qeを入力されて入
力端子Xa 。
The data latched by each of the latch circuits 43 to 46 is transferred to the input terminals Xo and Xl of one of the multiplexers 38 mentioned above.
, X2 *
, is input to X3. Each of these multiplexers 38.3
9 is an input terminal Xa to which the outputs Q^ and Qe of the counter 36 are input.

Xl、X2 、X3に入力されるデータを選択的に出力
端子Yから出力するようになっている。
The data input to Xl, X2, and X3 are selectively output from output terminal Y.

前記マルチプレクサ38からの出力データを28/32
乗算器47並びに36/32乗算器48に供給している
。前記28/32乗算器47は例えば第6図に示すよう
に7ピツト減算器で出力FはA−8となり、これはAa
〜A6及びBn〜B6を図に示すように接続することに
よってA−A/8−7/8A−28/32Aとなる。そ
してこのように減算器を使用することによってリアルタ
イムで乗算ができる。前記36/32乗算器48は前記
28/32乗算器47に使用した減算器を加算器に変え
ることによって実現できる。
The output data from the multiplexer 38 is divided into 28/32
It is supplied to a multiplier 47 and a 36/32 multiplier 48. The 28/32 multiplier 47 is, for example, a 7-pit subtracter as shown in FIG. 6, and the output F is A-8, which is Aa.
By connecting ~A6 and Bn~B6 as shown in the figure, it becomes A-A/8-7/8A-28/32A. By using a subtractor in this way, multiplication can be performed in real time. The 36/32 multiplier 48 can be realized by replacing the subtracter used in the 28/32 multiplier 47 with an adder.

すなわち、F−A+A/8−9/8A−36/32Aと
なる。
That is, it becomes F-A+A/8-9/8A-36/32A.

前記28/32乗算器47の出力を7ビツトコンバレー
タ49にデータAとして供給するとともに7ビツトラツ
チ回路50に供給している。また前記36/32乗算器
48の出力を7ピツトコンパレータ51にデータAとし
て供給している。前記コンパレータ49.51にはまた
前記マルチプレクサ39からの出力がデータBとして入
力されている。
The output of the 28/32 multiplier 47 is supplied to a 7-bit converter 49 as data A, and is also supplied to a 7-bit latch circuit 50. Further, the output of the 36/32 multiplier 48 is supplied as data A to a 7-pit comparator 51. The output from the multiplexer 39 is also input as data B to the comparators 49 and 51.

前記コンパレータ49はデータAとデータBとを比較し
、A≦Bのとき信号を出力し、前記コンパレータ51は
データAとデータBとを比較し、A≧Bのとき信号を出
力する。そしてコンパレータ49.51からの出力信号
とマイクロコンピュータ30からの書込みイネーブルの
論理積を取っている。これは現在のキャラクタ幅と以前
のキャラクタ幅との比が±12.5%の範囲に入ってい
るか否かを検出することになる。
The comparator 49 compares data A and data B and outputs a signal when A≦B, and the comparator 51 compares data A and data B and outputs a signal when A≧B. Then, the output signal from the comparators 49 and 51 and the write enable from the microcomputer 30 are ANDed. This detects whether the ratio between the current character width and the previous character width is within the range of ±12.5%.

JKフリップ70ツブ52,53.54及び55.56
.57及び58.59.60及び61゜62.63で構
成される回路は前記論理積出力を入力されて連続するキ
ャラクタのキャラクタ幅の変動が規定内(±12.5%
内)で4キャラクタ続くか否かを判定する判定回路で、
この各フリップフロップ52〜63は、フリップ70ツ
ブ52〜54が前記デコーダ37の出力E3に同期して
動作し、フリップフロップ55〜57が前記デコーダ3
7の出力E2に同期して動作し、フリップフロップ58
〜60が前記デコーダ37の出力E!に同期して動作し
、かつフリップフロップ61〜63が前記デコーダ37
の出力Eaに同期して動作するようになっている。
JK flip 70 tube 52, 53.54 and 55.56
.. The circuit composed of 57, 58, 59, 60, 61, 62, 63 inputs the AND output, and the variation in character width of consecutive characters is within the specified range (±12.5%).
This is a judgment circuit that judges whether 4 characters continue in (in).
The flip-flops 52-63 operate in synchronization with the output E3 of the decoder 37, and the flip-flops 55-57 operate in synchronization with the output E3 of the decoder 37.
The flip-flop 58 operates in synchronization with the output E2 of the flip-flop 58.
~60 is the output E! of the decoder 37! The flip-flops 61 to 63 operate in synchronization with the decoder 37.
It operates in synchronization with the output Ea of.

−MにUPC,JANコードと呼ばれるバーコードは第
8図の(a)に示す標準バージョンのものと第8因の(
b)に示す短縮バージョンのものが知られているが、こ
れらは1キャラクタXを7モジユールで表現している。
The barcodes called UPC and JAN codes for -M are the standard version shown in Figure 8(a) and the 8th factor (
A shortened version shown in b) is known, but these express one character X with seven modules.

なお、1モジユールとはバー又はスペースを構成する最
小寸法を示している。従ってバーコードとその他の情報
やノイズを区別するにはこの規則性(1キャラクタ、す
なわち連続する4つのバー、スペースの長さが隣りのキ
ャラクタの長さとおおよそ等しい状態が4キャラクタ以
上続く)を調べればよいことになる。
Note that 1 module indicates the minimum dimension constituting a bar or space. Therefore, to distinguish barcodes from other information or noise, look for this regularity (one character, i.e. 4 consecutive bars, space length approximately equal to the length of the adjacent character for 4 or more characters). It's a good thing.

これを行なっているのが前述した判定回路である。This is done by the aforementioned determination circuit.

例えばバーコードが第8図の(b)に示す短縮バージョ
ンの場合を例にして考えると、第5図の(a)に示す2
値化信号が入力するとデコーダ37からは第5図の(b
)、(C)、(d)、(e)で示すような出力Eo 、
El、E2 、Elが出力される。今フリップフロップ
52〜54について考えるとフリップ70ツブ52は第
5因の(f)に示すように出力E3に同期して動作する
For example, if we consider the case where the barcode is the shortened version shown in FIG. 8(b), the barcode shown in FIG.
When the digitized signal is input, the decoder 37 outputs the signal (b) in FIG.
), (C), (d), and (e) output Eo,
El, E2, and El are output. Now considering the flip-flops 52 to 54, the flip 70 block 52 operates in synchronization with the output E3 as shown in the fifth factor (f).

そしてフリップ70ツブ53はフリップ70ツブ52の
出力に応動し第5図の(Q)に示す信号を出力し、さら
に7リツプフロツプ54はフリップ70ツブ53の出力
と各コンパレータ49.51の論理積出力との論理積に
よって第5図の(h)に示す信号を出力する。すなわち
、デコーダ37の出力E3の■の時点では各コンパレー
タ49゜51の論理積出力がハイレベルの可能性もある
が、次の■の時点ではマージン(7モジユール)+ガー
ドパー(3モジユール)〉1キャラクタ(7モジユール
)となるので論理積出力がローレベルとなり、フリップ
70ツブ52.53がクリアされる。ざらに■の時点で
は現在のキャラクタ幅と以前のキャラクタ幅が略等しく
なるので、論理積出力がハイレベルとなり、出力E3の
立上がりでフリップ70ツブ52がセットされる。ざら
に■の時点でも同じく現在のキャラクタ幅と以前のキャ
ラクタ幅が略等しくなるので、論理積出力がハイレベル
となり、出力E3の立上がりで7リツプフロツプ52が
反転してリセットされ、代わりにフリップフロップ53
がセットされる。ざらに■の時点においても同様となり
、フリップフロップ52がセットされ、ざらに7リツプ
フロツプ54がセットされる。ざらに■の時点において
も同様となり、フリップフロップ52がリセットしてフ
リップフロップ53がリセットされる。
The flip-flop 53 responds to the output of the flip-70 knob 52 and outputs the signal shown in (Q) in FIG. A signal shown in (h) of FIG. 5 is outputted by ANDing with . That is, at the time point ■ of the output E3 of the decoder 37, there is a possibility that the AND output of each comparator 49°51 is at a high level, but at the next point ■, the margin (7 modules) + guard par (3 modules)>1 Since it becomes a character (7 modules), the AND output becomes a low level, and the flip 70 knobs 52 and 53 are cleared. Since the current character width and the previous character width are approximately equal at the time point (2), the AND output becomes high level, and the flip 70 knob 52 is set at the rising edge of the output E3. Similarly, at the time point ■, the current character width and the previous character width are approximately equal, so the AND output becomes high level, and at the rise of the output E3, the 7 flip-flop 52 is inverted and reset, and the flip-flop 53 is changed instead.
is set. The same thing happens at the time point (2), where the flip-flop 52 is set and the 7-lip flop 54 is set. The same holds true at point (2), where the flip-flop 52 is reset and the flip-flop 53 is reset.

このようにしてフリップ70ツブ54は連続する4キャ
ラクタのキャラクタ幅が略等しいときセットされオアゲ
ート64を介してアンドゲート65にセット信号を出力
する。
In this way, the flip 70 knob 54 is set when the character widths of four consecutive characters are substantially equal, and outputs a set signal to the AND gate 65 via the OR gate 64.

前記ラッチ回路50はオアゲート64の出力の立上がり
で28/32乗算器47の出力をラッチする。すなわち
、このラッチ回路50には判定された7モジユールのキ
ャラクタ幅の28/32、すなわち略6モジユールの幅
のデータがラッチされることになる。そしてこのラッチ
回路50のデータは7ビツトコンバレータ66にBデー
タとして供給される。前記コンパレータ66にはまた前
記ランレングスカウンタ27のカウントデータがAデー
タとして入力されている。そしてこのコンパレータはA
>8のとき、すなわちランレングスカウンタ27のデー
タの示す幅がラッチ回路50のデータの示す幅よりも大
きくなったとき信号を前記アンドゲート65に出力する
。そしてこのタイミングでアンドゲート65からマイク
ロコンピュータ30にバーコード検出信号が出力されそ
のマイクロコンピュータ30に割込みをかける。このと
きFIFOレジスタ28には最後のバイトにマージン相
当のランレングスデータが入り、その前にバーコード情
報と判定されたデータが格納されていることになる。
The latch circuit 50 latches the output of the 28/32 multiplier 47 when the output of the OR gate 64 rises. That is, data with a width of approximately 6 modules, which is 28/32 of the determined character width of 7 modules, is latched into the latch circuit 50. The data of this latch circuit 50 is then supplied to a 7-bit converter 66 as B data. The count data of the run length counter 27 is also input to the comparator 66 as A data. And this comparator is A
>8, that is, when the width indicated by the data of the run length counter 27 becomes larger than the width indicated by the data of the latch circuit 50, a signal is output to the AND gate 65. At this timing, a barcode detection signal is output from the AND gate 65 to the microcomputer 30, and an interrupt is generated to the microcomputer 30. At this time, run length data corresponding to the margin is stored in the last byte of the FIFO register 28, and data determined to be barcode information is stored before that.

前記マイクロコンピュータ30はFIFOレジスタ28
に格納されているデータを読込むと第7図に示すバーコ
ードの認識処理を行なう。これは先ずマージン、ガード
バ−の位置を検索する。続いて前半のバコードについて
1キャラクタづつデコード処理を行い、センターバーを
確認してからさらに後半のバーコードについて1キャラ
クタづつデコードする。そして最後に反対側にあるマー
ジン、ガードバ−を検出す番と続いてパリティチェック
を行い、さらにモジュラスチェックを行なう。この2つ
のチェックにおいて異常があればエラーにする。またこ
の2つのチェックがいずれもOKであればデコードした
データを例えば商品販売データ処理部へ転送する。
The microcomputer 30 has a FIFO register 28
When the data stored in is read, the bar code recognition process shown in FIG. 7 is performed. This first searches for the position of the margin and guard bar. Next, the first half of the barcode is decoded character by character, and after checking the center bar, the second half of the barcode is further decoded character by character. Finally, margins and guard bars on the opposite side are detected, followed by a parity check, and then a modulus check. If there is any abnormality in these two checks, it will be treated as an error. If both of these checks are OK, the decoded data is transferred to, for example, a product sales data processing section.

このような構成の本実施例においては、バーコードパタ
ーン検出回路29において読み取った信号の2(ii化
倍信号もとにランレングス処理され、さらにFIFOレ
ジスタ28に記憶された情報がバーコードの情報である
か否かを判定し、バーコードの、情報らしいと判定した
ときマイクロコンピュータ3oに割込みをかけてFIF
Oレジスタ28に記憶されている情報を読み込ませる制
御を行い、その後のバーコードf!’!II処理につい
てはマイクロコンピュータ30によるプログラム処理で
行なっているので、高速処理が要求される部分はバーコ
ードパターン回路29のハード回路によって処理でき、
マイクロコンピュータ30はバーコードの認識処理のみ
でよいので充分に対処することができる。そしてデコー
ドやアルゴリズムなど認識の論理を変更したり、修正す
るときにはバーコードパターン検出回路29は回答変更
せずに使用でき、変更する部分はマイクロコンピュータ
3oのプログラムのみでよいので、ハード回路を作り直
す必要がなく変更作業がきわめて容易にできる。
In this embodiment having such a configuration, the barcode pattern detection circuit 29 performs run-length processing on the read signal based on the 2 (ii) multiplication signal, and the information stored in the FIFO register 28 is converted into barcode information. When it is determined that the barcode is likely to be information, it interrupts the microcomputer 3o and sends an FIF
Control is performed to read the information stored in the O register 28, and the subsequent barcode f! '! Since the II processing is performed by program processing by the microcomputer 30, parts that require high-speed processing can be processed by the hardware circuit of the barcode pattern circuit 29.
Since the microcomputer 30 only needs to perform barcode recognition processing, it can handle the problem satisfactorily. When changing or modifying the recognition logic such as decoding or algorithm, the barcode pattern detection circuit 29 can be used without changing the answer, and the only part to be changed is the program of the microcomputer 3o, so there is no need to rebuild the hardware circuit. This makes changes extremely easy.

またバーコードパターン検出回路29はパターン情報か
否かを検出するのみの回路構成を有すればよく、従来の
ようにバーコードの認識処理やキャラクタのデコードを
行なう必要がないので、ハード回路の部分の構成を簡単
化できる。
In addition, the barcode pattern detection circuit 29 only needs to have a circuit configuration for detecting whether or not it is pattern information, and there is no need to perform barcode recognition processing or character decoding as in the past, so the hardware circuit is not required. The configuration can be simplified.

なお、前記実施例においては、FIFOレジスタ及びマ
イクロコンピュータをそれぞれ1つずつ使用したものに
ついて述べたが必ずしもこれに限定されるものではなく
、例えば第9図に示すように2個のFIFOレジスタ2
81.282とマスターマイクロコンピュータ301、
スレーブマイクロコンピュータ302を設け、マイクロ
コンピュータ301で切換器71を制御して各レジスタ
281.282に情報を交互に取り込むようにすれば処
理スピードの遅いマイクロコンピュータを使用しても充
分に対処することができる。なお、この場合マスターマ
イクロコンピュータ301が読み取りデータの編集など
を行なうようになる。
In the above embodiment, one FIFO register and one microcomputer are used, but the invention is not limited to this. For example, as shown in FIG. 9, two FIFO registers 2 are used.
81.282 and master microcomputer 301,
If a slave microcomputer 302 is provided and the microcomputer 301 controls the switch 71 to alternately load information into each register 281 and 282, it is possible to sufficiently cope with the use of a microcomputer with a slow processing speed. can. In this case, the master microcomputer 301 edits the read data.

なお、前記実施例においては、キャラクタ幅のカウント
にランレングスカウンタが使用するクロックCLKを1
/4分周したクロックCLK’を使用したが必ずしもこ
れに限定されるものでないのは勿論である。
In the above embodiment, the clock CLK used by the run length counter to count the character width is set to 1.
Although the clock CLK' whose frequency was divided by /4 was used, it is needless to say that the present invention is not limited to this.

また前記実施例ではマルチプレクサを使用して各ラッチ
回路からのデー、夕の選択を行なったが必ずしもこれに
限定されるものではなく、マルチプレクサを使用せず2
8/32乗算器、36/32乗算器及び7ビツトコンバ
レータ49.51を各出力EO〜E3に対応して個々に
設けて構成しても同様の機能を有する回路は実現できる
ものである。
Further, in the above embodiment, a multiplexer was used to select data and data from each latch circuit, but the selection is not limited to this, and the multiplexer is not used to select the data and data from each latch circuit.
A circuit having similar functions can be realized even if an 8/32 multiplier, a 36/32 multiplier, and a 7-bit converter 49.51 are individually provided for each output EO to E3.

さらに前記実施例ではキャラクタ幅の変動の帰室を±1
2.5%内としたがこの値は必ずしもこれに限定される
ものではなく、条件に応じて任意に設定してよいもので
ある。
Furthermore, in the above embodiment, the return of character width variation is ±1.
Although it is set within 2.5%, this value is not necessarily limited to this, and may be set arbitrarily depending on the conditions.

[発明の効果] 以上詳述し、たようにこの発明によれば、バーコード情
報か否かの検出のみをハード処理で行い、バーコードの
Him処理はマイクロコンピュータによってソフト的に
行い、従ってWt識の論理の変更や修正があるとプログ
ラム変更のみで対処でき、認識の論理の変更や修正が比
較的容易にできるとともにハード部の論理回路構成が比
較的簡単にできるバーコード読取り装置を提供できるも
のである。
[Effects of the Invention] As described in detail above, according to the present invention, only the detection of whether or not it is barcode information is performed by hardware processing, and the barcode Him processing is performed by software by a microcomputer. Changes or modifications in the recognition logic can be dealt with by simply changing the program, and it is possible to provide a barcode reading device in which the recognition logic can be changed or modified relatively easily, and the logic circuit configuration of the hardware part can be relatively easily configured. It is something.

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

第1図〜第8図はこの発明の一実施例を示すもので、第
1図は一部概略構成を含むブロック図、第2因は第1図
におけるバーコードパターン検出回路の具体回路構成を
示す回路図、第3図、第4図及び第5図は第2図の各部
の動作タイミングを示すタイミング波形図、第6図は第
2図の28/32乗算器の構成を示す図、第7図はマイ
クロコンピュータによるバーコードg識処理を示す流れ
図、第8因はバーコードの例を示すもので、(a)は標
準バージョンのバーコード図、(b)は短縮バージョン
のバーコード図、第9図はこの発明の他の実施例を示す
ブロック図、第10図及び第11図は従来例を示すブロ
ック図である。 22・・・レーザ光源、25・・・受光器、26・・・
2値化回路、27・・・ランレングスカウンタ、28・
・・FIFOレジスタ、29・・・バーコードパターン
検出回路、30・・・マイクロコンピュータ、36・・
・2ピツトカウンタ、37・・・デコーダ、38〜41
・・・7ピツトカウンタ、43〜46・・・7ピツトラ
ツチ回路、47・・・28/32乗譚器、48・・・3
6/32乗算器、49.51・・・7ビツトコンパレー
タ、50・・・7ピツトラツチ回路、52〜63・・・
JKフリップフロップ、66・・・7ビツトコンバレー
タ。 出願人代理人 弁理士 鈴江武彦 第1図 第7図 (a)        (b) 第8図 第10図 第11図
1 to 8 show one embodiment of the present invention. FIG. 1 is a block diagram including a partial schematic configuration, and the second factor shows a specific circuit configuration of the barcode pattern detection circuit in FIG. 1. 3, 4, and 5 are timing waveform diagrams showing the operation timing of each part in FIG. 2. FIG. 6 is a diagram showing the configuration of the 28/32 multiplier in FIG. Figure 7 is a flowchart showing barcode recognition processing by a microcomputer, and factor 8 shows an example of a barcode, where (a) is a standard version barcode diagram, (b) is a shortened version barcode diagram, FIG. 9 is a block diagram showing another embodiment of the present invention, and FIGS. 10 and 11 are block diagrams showing conventional examples. 22... Laser light source, 25... Light receiver, 26...
Binarization circuit, 27... Run length counter, 28.
... FIFO register, 29... Barcode pattern detection circuit, 30... Microcomputer, 36...
・2 pit counter, 37...decoder, 38-41
...7 pit counter, 43-46...7 pit latch circuit, 47...28/32 multiplier, 48...3
6/32 multiplier, 49.51...7 bit comparator, 50...7 pit latch circuit, 52-63...
JK flip-flop, 66...7 bit converter. Applicant's agent Patent attorney Takehiko Suzue Figure 1 Figure 7 (a) (b) Figure 8 Figure 10 Figure 11

Claims (1)

【特許請求の範囲】 バーコード検出部と、このバーコード検出部からの信号
を処理して2値化信号を出力する2値化回路と、この2
値化回路からの2値化信号をランレングスデータに変換
するランレングスカウンタと、このカウンタ出力を記憶
する1又は複数のシフトレジスタと、前記2値化回路か
らの2値化信号及びランレングスカウンタからのデータ
を入力してバーコードパターンを検出するバーコードパ
ターン検出回路と、このバーコード検出回路からのバー
コード検出信号に応動して前記1又は複数のシフトレジ
スタのデータを取込みバーコードの認識処理を行なう1
又は複数のマイクロコンピュータとからなり、 前記バーコードパターン検出回路は、2値化信号の変化
に応動して順次、かつバーコードの1キャラクタ周期で
カウント動作を行なう複数のカウンタと、この各カウン
タのデータをそれぞれラッチする複数のラッチ回路と、
この各ラッチ回路出力と前記各カウンタ出力に応動して
キャラクタ幅の変動を検出するキャラクタ幅変動検出回
路と、この検出回路出力に応動してキャラクタ幅の変動
が規定内で連続していることを判定する判定回路と、こ
の判定回路が連続を判定したときそのときの1キャラク
タ分のデータに一定値を乗じたデータを保持するデータ
保持回路と、このデータ保持回路に保持されたデータと
前記ランレングスカウンタのデータとを比較し、カウン
タのデータが保持回路のデータより大きくなったときバ
ーコード検出信号を出力する比較出力回路とで構成した
ことを特徴とするバーコード読取り装置。
[Claims] A barcode detection section, a binarization circuit that processes a signal from the barcode detection section and outputs a binary signal, and
A run-length counter that converts a binary signal from the digitizing circuit into run-length data, one or more shift registers that store the output of this counter, and a digitized signal from the binarizing circuit and a run-length counter. a barcode pattern detection circuit that detects a barcode pattern by inputting data from the barcode; and a barcode pattern detection circuit that receives data from the one or more shift registers in response to a barcode detection signal from the barcode detection circuit and recognizes the barcode. Processing 1
or a plurality of microcomputers, and the barcode pattern detection circuit includes a plurality of counters that sequentially perform counting operations in one barcode character period in response to changes in the binary signal, and a plurality of counters for each of the counters. multiple latch circuits that each latch data;
A character width variation detection circuit that detects variations in character width in response to each of the latch circuit outputs and each of the counter outputs; A judgment circuit that makes a judgment; a data holding circuit that holds data obtained by multiplying the data for one character by a certain value when this judgment circuit judges continuity; 1. A barcode reading device comprising a comparison output circuit that compares length counter data and outputs a barcode detection signal when the counter data becomes larger than the holding circuit data.
JP61243522A 1986-10-14 1986-10-14 Bar code reader Expired - Lifetime JPH07104902B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61243522A JPH07104902B2 (en) 1986-10-14 1986-10-14 Bar code reader

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61243522A JPH07104902B2 (en) 1986-10-14 1986-10-14 Bar code reader

Publications (2)

Publication Number Publication Date
JPS6398081A true JPS6398081A (en) 1988-04-28
JPH07104902B2 JPH07104902B2 (en) 1995-11-13

Family

ID=17105157

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61243522A Expired - Lifetime JPH07104902B2 (en) 1986-10-14 1986-10-14 Bar code reader

Country Status (1)

Country Link
JP (1) JPH07104902B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0492455A2 (en) * 1990-12-20 1992-07-01 Nippondenso Co., Ltd. An information reading device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS53120339A (en) * 1977-03-30 1978-10-20 Shinko Electric Co Ltd Method of storing data including improper data
JPS5614373A (en) * 1979-04-19 1981-02-12 Scantron Gmbh Article identifying method and apparatus

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS53120339A (en) * 1977-03-30 1978-10-20 Shinko Electric Co Ltd Method of storing data including improper data
JPS5614373A (en) * 1979-04-19 1981-02-12 Scantron Gmbh Article identifying method and apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0492455A2 (en) * 1990-12-20 1992-07-01 Nippondenso Co., Ltd. An information reading device
US5317136A (en) * 1990-12-20 1994-05-31 Nippodenso Co., Ltd. Information reading device which controls communication interrupt signal from a host system

Also Published As

Publication number Publication date
JPH07104902B2 (en) 1995-11-13

Similar Documents

Publication Publication Date Title
US5128527A (en) Apparatus for reading a bar code
US3723710A (en) Method and device for reading and decoding a high density self-clocking bar code
US3909787A (en) Candidate selection processor
US5557095A (en) System for enabling decoding of bar code and other symbols with a digital microcomputer connected via the input/output port thereof to the scanner
EP0498678A2 (en) High speed scan bar code reader which can read more than one type of bar code
US5276316A (en) Method for reconstructing complete bar code signals from partial bar code scans
US5821520A (en) Bar code scanning system with the pre-decoding signal processing and method for bar code candidate selection for decoding
CA2044935C (en) Bar-code reading apparatus
US3778597A (en) Record reading system
JPH0354388B2 (en)
JPS6116119B2 (en)
JPS6398081A (en) Bar code reader
US4108368A (en) Coded record and method of and system for interpreting the record
JP3785527B2 (en) Bar code reader and storage medium
JP2623818B2 (en) Barcode reader
JP2776035B2 (en) Barcode reader
US6478224B1 (en) Symbology-independent method and apparatus for identifying potential bar code data
KR930002341B1 (en) Bar code decoder using digital signal processing chip
JPS5935478B2 (en) Barcode symbol reading method
JP2677805B2 (en) Code reader
JP2732914B2 (en) Barcode reader
CA1070837A (en) Coded record and method of and system for interpreting the record
JP2778870B2 (en) Barcode decoder
JP2742140B2 (en) Optical reader
JP2677806B2 (en) Code reader

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term