Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPH07104902B2 - Bar code reader - Google Patents
[go: Go Back, main page]

JPH07104902B2 - Bar code reader - Google Patents

Bar code reader

Info

Publication number
JPH07104902B2
JPH07104902B2 JP61243522A JP24352286A JPH07104902B2 JP H07104902 B2 JPH07104902 B2 JP H07104902B2 JP 61243522 A JP61243522 A JP 61243522A JP 24352286 A JP24352286 A JP 24352286A JP H07104902 B2 JPH07104902 B2 JP H07104902B2
Authority
JP
Japan
Prior art keywords
data
circuit
bar code
signal
output
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 - Lifetime
Application number
JP61243522A
Other languages
Japanese (ja)
Other versions
JPS6398081A (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.)
Tec Corp
Original Assignee
Tec 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 Tec Corp filed Critical Tec Corp
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

Description

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

[従来の技術] バーコード読取り装置としては、ハンド式スキャナーを
使用したものや定置式スキャナーを使用したものがあ
る。
[Prior Art] Bar code readers include those using a hand-held scanner and those using a stationary scanner.

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

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

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

[発明が解決しようとする問題点] しかし従来使用されているバーコード認識回路11はマー
ジン、ガードバーの判定、バーコードか否かの判定、キ
ャラクタのデコードをすべて行なう論理回路構成となっ
ているため、回路構成がかなり複雑になるとともに、デ
コードやアルゴリズムなど認識の論理を変更したり、修
正したりするとそのためにバーコード認識回路11の論理
回路構成を変更しなければならず作業がきわめて面倒な
る問題があった。
[Problems to be Solved by the Invention] However, since the conventionally used barcode recognition circuit 11 has a logic circuit configuration for performing all of margin, guard bar determination, barcode determination, and character decoding. The problem is that the circuit configuration becomes quite complicated, and if the recognition logic such as decoding or algorithm is changed or modified, the logic circuit configuration of the barcode recognition circuit 11 must be changed for that purpose, which is a very troublesome task. was there.

この発明は、バーコード情報か否かの検出のみをハード
処理で行い、バーコードの認識処理はマイクロコンピュ
ータによってソフト的に行い、従って認識の論理の変更
や修正があるとプログラム変更のみで対処でき、認識の
論理の変更や修正が比較的容易にできるとともにハード
部の論理回路構成が比較的簡単にできるバーコード読取
り装置を提供しようとするものである。
According to the present invention, only the detection of the bar code information is performed by the hardware process, and the bar code recognition process is performed by the software by the microcomputer. Therefore, if the recognition logic is changed or modified, it can be dealt with only by changing the program. SUMMARY OF THE INVENTION An object of the present invention is to provide a bar code reader which can relatively easily change or modify the recognition logic and can relatively easily configure the logic circuit of the hardware part.

[問題点を解決するための手段] この発明は、バーコード検出部と、このバーコード検出
部からの信号を処理して2値化信号を出力する2値化回
路と、この2値化回路からの2値化信号をランレングス
データに変換するランレングスカウンタと、このカウン
タ出力を記憶する1又は複数のシフトレジスタと、2値
化回路からの2値化信号及びランレングスカウンタから
のデータを入力してバーコードパターンを検出するバー
コードパターン検出回路と、このバーコードパターン検
出回路からのバーコード検出信号に応動して1又は複数
のシフトレジスタのデータを取込みバーコードの認識処
理を行なう1又は複数のマイクロコンピュータとからな
り、バーコードパターン検出回路は、2値化信号の変化
に応動して順次、かつバーコードの1キャラクタ周期で
カウント動作を行なう複数のカウンタと、この各カウン
タのデータをそれぞれラッチする複数のラッチ回路と、
この各ラッチ回路出力と各カウンタ出力に応動してキャ
ラクタ幅の変動を検出するキャラクタ幅変動検出回路
と、この検出回路出力に応動してキャラクタ幅の変動が
規定内で連続していることを判定する判定回路と、この
判定回路が連続を判定したときそのときの1キャラクタ
分のデータに、キャラクタ幅の変動の規定内下限値を決
める一定値を乗じたデータを保持するデータ保持回路
と、このデータ保持回路に保持されたデータとランレン
グスカウンタのデータとを比較し、カウンタのデータが
保持回路のデータより大きくなったときバーコード検出
信号を出力する比較出力回路とで構成したものである。
[Means for Solving Problems] The present invention relates to a bar code detecting section, a binarizing circuit which processes a signal from the bar code detecting section and outputs a binarized signal, and the binarizing circuit. The run length counter for converting the binarized signal from the to the run length data, one or a plurality of shift registers for storing the counter output, the binarized signal from the binarization circuit and the data from the run length counter. A bar code pattern detection circuit for inputting and detecting a bar code pattern and a bar code recognition process in response to a bar code detection signal from the bar code pattern detection circuit to take in data of one or a plurality of shift registers Alternatively, the bar code pattern detection circuit is composed of a plurality of microcomputers, and the bar code pattern detection circuit sequentially operates in response to a change in the binarized signal and outputs one bar code. A plurality of counters that perform a counting operation in a character cycle, and a plurality of latch circuits that respectively latch the data of each counter,
A character width variation detecting circuit that detects variations in the character width in response to the outputs of the respective latch circuits and the respective counters, and it is determined in response to the outputs of the detection circuit that the variations in the character width continue within the specified range. And a data holding circuit for holding the data obtained by multiplying the data for one character at that time by a constant value that determines the specified lower limit value of the variation of the character width when this determination circuit determines continuity, The comparison output circuit compares the data held in the data holding circuit with the data of the run length counter, and outputs a bar code detection signal when the counter data becomes larger than the data of the holding circuit.

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

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

そして変動が規定内で連続していることを判定しそのと
き1キャラクタ分のデータに一定値を乗じたデータとラ
ンレングスカウンタのデータとを比較し、カウンタのデ
ータの方が大きいときバーコード情報がシフトレジスタ
に格納されたことをマイクロコンピュータに知らせるた
めのバーコード検出信号をマイクロコンピュータへ出力
する。これによりマイクロコンピュータはシフトレジス
タに格納されているデータを読込みバーコードの認識処
理を行なう。
Then, it is judged that the fluctuation is continuous within the regulation, and at that time, the data obtained by multiplying the data for one character by a constant value is compared with the data of the run length counter, and when the data of the counter is larger, the bar code information is obtained. A bar code detection signal for notifying the microcomputer that the data has been stored in the shift register is output to the microcomputer. As a result, the microcomputer reads the data stored in the shift register and performs a barcode recognition process.

[実施例] 以下、この発明の一実施例を図面を参照して説明する。[Embodiment] 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 provided in a box-shaped base 21, and a laser beam from the light source 22 is deflected by a rotating polygon mirror 23 to read a reading window on the base 21.
It scans 24 surfaces. When, for example, a bar code attached to the 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 the light receiver.
It is designed to be received by 25.

前記受光器25からの出力信号を2値化回路26に入力し、
その2値化回路26によって増幅、信号処理などを行なっ
て2値化している。この2値化回路26からの2値化信号
をランレングスカウンタ27に入力しそのカウンタ27でバ
ーの幅に相当するデジタル量に量子化している。
The output signal from the light receiver 25 is input to the binarization circuit 26,
The binarizing circuit 26 performs binarization by performing amplification, signal processing and the like. The binarized signal from the binarization circuit 26 is input to a run length counter 27 and quantized by the counter 27 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 having a storage capacity of, for example, 256 bytes, in which data that is a kind of shift register is first-in / first-out. .

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

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

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

すなわち、2値化回路26からの2値化信号を2段のD形
フリップフロップ31,32と排他的オア回路33とで構成さ
れる回路に入力し、エッヂ信号EDGを作っている。また
そのエッヂ信号EDGをD形フリップフロップ34に入力し
てエッヂ信号EDG′を作っている。なお、各フリップフ
ロップ31,32,34のクロック入力端子CKにはクロック発生
器35から発生するクロックCLKがそれぞれ入力されてい
る。
That is, the binarized signal from the binarization circuit 26 is input to a circuit composed of the two-stage D-type flip-flops 31, 32 and the exclusive OR circuit 33 to generate the edge signal EDG. Further, the edge signal EDG is input to the D-type flip-flop 34 to produce an edge signal EDG '. The clock CLK generated from the clock generator 35 is input to the clock input terminals CK of the flip-flops 31, 32 and 34, respectively.

すなわち、第3図の(a)に示すように2値化信号が入
力されると、フリップフロップ31は第3図の(b)に示
すクロックCLKを入力されて第3図の(c)で示すタイ
ミングで動作するとともにフリップフロップ32はフリッ
プフロップ31の出力とクロックCLKを入力されて第3図
の(d)で示すタイミングで動作し、排他的オアゲート
33からは第3図の(e)で示されるエッヂ信号EDGが出
力される。そしてこのエッヂ信号EDGとクロックCLKがフ
リップフロップ34に入力されてそのフリップフロップ34
から第3図の(f)に示すエッヂ信号EDG′が出力され
る。
That is, when the binarized signal is input as shown in FIG. 3A, the flip-flop 31 receives the clock CLK shown in FIG. The flip-flop 32 operates at the timing shown in FIG. 3 and receives the output of the flip-flop 31 and the clock CLK to operate at the timing shown in FIG.
The edge signal EDG shown in FIG. 3 (e) is output from 33. Then, the edge signal EDG and the clock CLK are input to the flip-flop 34, and the flip-flop 34
Outputs an edge signal EDG 'shown in FIG. 3 (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 the data can be read from and read from the FIFO register 28 by the microcomputer 30.
It is designed to be performed by a read clock from the.

前記エッヂ信号EDG′は前記ランレングスカウンタ27の
クリア端子CLRに供給されている。このランレングスカ
ウンタ27は例えば9ビットカウンタで前記クロック発生
器35からのクロックCLKをクロック入力端子CKに入力し
てカウントすることによってバーの幅をクロックCLKを
最小単位とするデジタルデータに変換するようにしてい
る。
The edge signal EDG 'is supplied to the clear terminal CLR of the run length counter 27. The run-length counter 27 is, for example, a 9-bit counter, and inputs the clock CLK from the clock generator 35 to the clock input terminal CK to count the width of the bar into digital data having the clock CLK as a minimum unit. I have to.

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

すなわち前記カウンタ36は第4図の(b)に示すエッヂ
信号EDGを入力されて第4図の(c)に示すQA出力を送
出するとともに第4図の(d)に示すQB出力を送出す
る。前記デコーダ37はエッヂ信号EDGとカウンタ36から
のQA出力、QB出力を入力されてその各入出力端子Y0,Y1,
Y2,Y3から第4図の(e)に示す出力E0、第4図の
(f)に示す出力E1、第4図の(g)に示す出力E2、第
4図の(h)に示す出力E3をそれぞれ出力する。
That is, the counter 36 receives the edge signal EDG shown in FIG. 4 (b), sends out the Q A output shown in FIG. 4 (c), and outputs the Q B output shown in FIG. 4 (d). Send out. The decoder 37 receives the edge signal EDG and the Q A output and the Q B output from the counter 36 and receives the respective input / output terminals Y 0 , Y 1 ,
From Y 2 and Y 3 to the output E 0 shown in (e) of FIG. 4, the output E 1 shown in (f) of FIG. 4, the output E 2 shown in (g) of FIG. The output E 3 shown in h) is output.

前記デコーダ37からの各出力E0,E1,E2,E3を4つの7ビ
ットカウンタ38,39,40,41のクリア端子CLRに供給してい
る。この各カウンタ38〜41のクロック入力端子CKには前
記クロック発生器35からのクロックCLKを1/4分周器42で
1/4分周したクロックCLK′がそれぞれ入力されている。
The outputs E 0 , E 1 , E 2 , E 3 from the decoder 37 are supplied to the clear terminals CLR of the four 7-bit counters 38, 39, 40, 41. The clock CLK from the clock generator 35 is supplied to the clock input terminal CK of each of the counters 38 to 41 by the 1/4 frequency divider 42.
The clock CLK ′ divided by 1/4 is input.

前記各カウンタ38,39,40,41のカウンタデータを4つの
7ビットラッチ回路43,44,45,46をそれぞれラッチする
ようにしている。この各ラッチ回路43〜46のクロック入
力端子CKには前記デコーダ37の各出力E0,E1,E2,E3がそ
れぞれ入力されている。
The counter data of the counters 38, 39, 40, 41 are latched by four 7-bit latch circuits 43, 44, 45, 46, respectively. The outputs E 0 , E 1 , E 2 , E 3 of the decoder 37 are input to the clock input terminals CK of the latch circuits 43 to 46, respectively.

前記各ラッチ回路43〜46でラッチしたデータを前述した
一方のマルチプレクサ67の入力端子X0,X1,X2,X3にそれ
ぞれ入力するとともに、前記各カウンタ38〜41のカウン
トデータを前述した他方のマルチプレクサ68の入力端子
X0,X1,X2,X3に入力している。この各マルチプレクサ67,
68は前記カウンタ36の出力QA,QBを入力されて入力端子X
0,X1,X2,X3に入力されるデータを選択的に出力端子Yか
ら出力するようになっている。
The data latched by each of the latch circuits 43 to 46 is input to the input terminals X 0 , X 1 , X 2 , and X 3 of the one multiplexer 67 described above, and the count data of each of the counters 38 to 41 is described above. Input terminal of the other multiplexer 68
Inputting in X 0 , X 1 , X 2 , X 3 . Each multiplexer 67,
68 receives the outputs Q A and Q B of the counter 36 and receives an input terminal X
The data input to 0 , X 1 , X 2 and X 3 are selectively output from the output terminal Y.

前記マルチプレクサ67からの出力データを28/32乗算器4
7並びに36/32乗算器48に供給しているい。前記28/32乗
算器47は例えば第6図に示すように7ビット減算器で出
力FはA−Bとなり、これはA0〜A6及びB0〜B6を図に示
すように接続することによってA−A/8=7/8A=28/32A
となる。そしてこのように減算器を使用することによっ
てリアルタイムで乗算ができる。前記36/32乗算器48は
前記28/32乗算器47に使用した減算器を加算器に変える
ことによって実現できる。すなわち、F=A+A/8=9/8
A=36/32Aとなる。
The output data from the multiplexer 67 is supplied to the 28/32 multiplier 4
Supply to 7 and 36/32 multiplier 48. The 28/32 multiplier 47 is, for example, a 7-bit subtractor as shown in FIG. 6, and the output F is AB, which connects A 0 to A 6 and B 0 to B 6 as shown in the figure. As a result, A−A / 8 = 7 / 8A = 28 / 32A
Becomes And by using the subtractor in this way, multiplication can be performed in real time. The 36/32 multiplier 48 can be realized by replacing the subtractor used in the 28/32 multiplier 47 with an adder. That is, F = A + A / 8 = 9/8
A = 36 / 32A.

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

前記コンパレータ49はデータAとデータBとを比較し、
A≦Bのとき信号を出力し、前記コンパレータ51はデー
タAとデータBとを比較し、A≧Bのとき信号を出力す
る。そしてコンパレータ49,51からの信号出力とマイク
ロコンピュータ30からの書込みイネーブルの論理積を取
っている。前記乗算器47,48及びコンパレータ49,51はキ
ャラクタ幅変動検出回路を構成し、この回路により現在
のキャラクタ幅と以前のキャラクタ幅との比が±12.5%
の範囲に入っているか否かを検出することになる。
The comparator 49 compares the data A and the data B,
A signal is output when A ≦ B, the comparator 51 compares the data A with the data B, and a signal is output when A ≧ B. Then, the logical product of the signal outputs from the comparators 49 and 51 and the write enable from the microcomputer 30 is taken. The multipliers 47 and 48 and the comparators 49 and 51 constitute a character width variation detection circuit, and the ratio of the current character width to the previous character width is ± 12.5% by this circuit.
It will detect whether it is within the range of.

JKフリップフロップ52,53,54及び55,56,57及び58,59,60
及び61,62,63で構成される回路は前記論理積出力を入力
されて連続するキャラクタのカラクタ幅の変動が規定内
(±12.5%内)で4キャラクタ続くか否かを判定する判
定回路で、この各フリップフロップ52〜63は、フリップ
フロップ52〜54が前記デコーダ37の出力E3に同期して動
作し、フリップフロップ55〜57が前記デコーダ37の出力
E2に同期して動作し、フリップフロップ58〜60が前記デ
コーダ37の出力E1同期して動作し、かつフリップフロッ
プ61〜63が前記デコーダ37の出力E0に同期して動作する
ようになっている。
JK flip-flops 52,53,54 and 55,56,57 and 58,59,60
The circuit constituted by 61, 62, 63 is a judgment circuit for judging whether or not the variation of the character width of consecutive characters, which is inputted with the logical product output, continues for 4 characters within the regulation (within ± 12.5%). In each of the flip-flops 52 to 63, the flip-flops 52 to 54 operate in synchronization with the output E 3 of the decoder 37, and the flip-flops 55 to 57 output the decoder 37.
Operates in synchronization with E 2, as flip-flops 58 to 60 is activated and the output E 1 in synchronism with the decoder 37, and flip-flops 61 to 63 are operated in synchronization with the output E 0 of the decoder 37 Has become.

一般にUPC、JANコードと呼ばれるバーコードは第8図の
(a)に示す標準バージョンのものと第8図の(b)に
示す短縮バージョンのものが知られているが、これらは
1キャラクタxを7モジュールで表現している。なお、
1モジュールとはバー又はスペースを構成する最小寸法
を示している。従ってバーコードとその他の情報やノイ
ズを区別するにはこの規則性(1キャラクタ、すなわち
連続する4つのバー、スペースの長さが隣りのキャラク
タの長さとおおよそ等しい状態が4キャラクタ以上続
く)を調べればよいことになる。これを行なっているの
が前述した判定回路である。
Bar codes generally called UPC and JAN codes are known to be the standard version shown in (a) of FIG. 8 and the shortened version shown in (b) of FIG. It is expressed in 7 modules. In addition,
One module refers to the minimum dimension that constitutes a bar or space. Therefore, in order to distinguish the bar code from other information and noise, this regularity (1 character, that is, 4 consecutive bars, the length of the space is approximately equal to the length of the adjacent character continues for 4 or more characters) can be examined. It will be good. The determination circuit described above does this.

例えばバーコードが第8図の(b)に示す短縮バージョ
ンの場合を例にして考えると、第5図の(a)に示す2
値化信号が入力するとデコータ37からは第5図の
(b)、(c)、(d)、(e)で示すような出力E0
E1、E2、E3が出力される。今フリップフロップ52〜54に
ついて考えるとフリップフロップ52は第5図の(f)に
示すように出力E3に同期して動作する。そしてフリップ
フロップ53はフリップフロップ52の出力に応動し第5図
の(g)に示す信号を出力し、さらにフリップフロップ
54はフリップフロップ53の出力と各コンパレータ49,51
の論理積出力との論理積によって第5図の(h)に示す
信号を出力する。すなわち、デコーダ37の出力E3のの
時点では各コンパレータ49,51の論理積出力がハイレベ
ルの可能性もあるが、次のの時点ではマージン(7モ
ジュール)+ガードバー(3モジュール)>1キャラク
タ(7モジュール)となるので論理積出力がローレベル
となり、フリップフロップ52,53がクリアされる。さら
にの時点では現在のキャラクタ幅と以前のキャラクタ
幅が略等しくなるので、論理積出力がハイレベルとな
り、出力E3の立上がりでフリップフロップ52がセットさ
れる。さらにの時点でも同じく現在のキャラクタ幅と
以前のキャラクタ幅が略等しくなるので、論理積出力が
ハイレベルとなり、出力E3立上がりでフリップフロップ
52が反転してリセットされ、代わりにフリップフロップ
53がセットされる。さらにの時点においても同様とな
り、フリップフロップ52がセットされ、さらにフリップ
フロップ54がセットされる。さらにの時点においても
同様となり、フリップフロップ52がリセットしてフリッ
プフロップ53がリセットされる。
For example, considering the case where the bar code is the shortened version shown in FIG. 8B, as shown in FIG.
When the digitized signal is input, the output E 0 from the decoder 37 as shown in FIGS. 5 (b), (c), (d) and (e),
E 1 , E 2 , and E 3 are output. Considering now the flip-flops 52 to 54, the flip-flop 52 operates in synchronization with the output E 3 as shown in (f) of FIG. Then, the flip-flop 53 responds to the output of the flip-flop 52 and outputs the signal shown in (g) of FIG.
54 is the output of the flip-flop 53 and each comparator 49, 51
The signal shown in (h) of FIG. 5 is output by the logical product with the logical product output of. That is, at the time of the output E 3 of the decoder 37, the logical product output of the comparators 49 and 51 may be at the high level, but at the next time, the margin (7 modules) + guard bar (3 modules)> 1 character (7 modules), the logical product output becomes low level, and the flip-flops 52 and 53 are cleared. At the further point in time, the current character width and the previous character width become substantially equal, so the logical product output becomes high level, and the flip-flop 52 is set at the rise of the output E 3 . At the same time, the current character width and the previous character width are almost equal, so the logical product output goes high and the output E 3 rises and the flip-flop rises.
52 flipped and reset, instead flip-flop
53 is set. The same is true at the further point in time, and the flip-flop 52 is set, and further the flip-flop 54 is set. The same is true at the further time point, and the flip-flop 52 is reset and the flip-flop 53 is reset.

このようにしてフリップフロップ54は連続する4キャラ
クタのキャラクタ幅が略等しいときセットされオアゲー
ト64を介してアンドゲート65にセット信号を出力する。
In this way, the flip-flop 54 is set when the character widths of four consecutive characters are substantially equal to each other 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>Bのとき、すなわちラン
レングスカウンタ27のデータの示す幅がラッチ回路50の
データの示す幅よりも大きくなったとき信号を前記アン
ロードゲート65に出力する。そしてこのタイミングでア
ンドゲート65からマイクロコンピュータ30にバーコード
検出信号が出力されそのマイクロコンピュータ30に割込
みをかける。このときFIFOレジスタ28には最後のバイト
にマージン相当のランレングスデータが入り、その前に
バーコード情報と判定されたデータが格納されているこ
とになる。
The latch circuit 50 rises to 28 when the output of the OR gate 64 rises.
Latch the output of the / 32 multiplier 47. That is, the latch circuit 50 has the character width of the determined 7 modules.
Data of 28/32, that is, a width of about 6 modules will be latched. The data of the latch circuit 50 is supplied to the 7-bit comparator 66 as B data.
The comparator 66 still has the run length counter.
27 count data are input as A data.
Then, this comparator outputs a signal to the unload gate 65 when A> B, 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. Then, at this timing, a bar code detection signal is output from the AND gate 65 to the microcomputer 30, and the microcomputer 30 is interrupted. At this time, the run length data corresponding to the margin is stored in the last byte of the FIFO register 28, and the data judged to be the bar code information before that is stored.

前記マイクロコンピュータ30はFIFOレジスタ28に格納さ
れているデータを読込むと第7図に示すバーコードの認
識処理を行なう。これは先ずマージン、ガードバーの位
置を検索する。続いて前半のバーコードについて1キャ
ラクタづつデコード処理を行い、センターバーを確認し
てからさらに後半のバーコードについて1キャラクタづ
つデコードする。そして最後に反対側にあるマージン、
ガードバーを検出すると続いてパリティチェックを行
い、さらにモジュラスチェックを行なう。この2つのチ
ェックにおいて異常があればエラーにする。またこの2
つのチェックがいずれもOKであればデコードしたデータ
を例えば商品販売データ処理部へ転送する。
When the microcomputer 30 reads the data stored in the FIFO register 28, it performs the barcode recognition process shown in FIG. First, the positions of the margin and the guard bar are searched. Subsequently, the bar code in the first half is decoded character by character, the center bar is confirmed, and then the bar code in the latter half is decoded character by character. And finally the margin on the other side,
When the guard bar is detected, the parity check is performed subsequently, and the modulus check is further performed. If there is an abnormality in these two checks, it is regarded as an error. Also this 2
If all the two checks are OK, the decoded data is transferred to, for example, the product sales data processing unit.

このような構成の本実施例においては、バーコードパタ
ーン検出回路29において読み取った信号の2値化信号を
もとにランレングス処理され、さらにFIFOレジスタ28に
記憶された情報がバーコードの情報であるか否かを判定
し、バーコードの情報らしいと判定したときマイクロコ
ンピュータ30に割込みをかけてFIFOレジスタ28に記憶さ
れている情報を読み込ませる制御を行い、その後のバー
コード認識処理についてはマイクロコンピュータ30によ
るプログラム処理で行なっているので、高速処理が要求
される部分はバーコードパターン回路29のハード回路に
よって処理でき、マイクロコンピュータ30はバーコード
の認識処理のみでよいので充分に対処することができ
る。そしてデコードやアルゴリズムなど認識の論理を変
更したり、修正するときにはバーコードパターン検出回
路29は何等変更せずに使用でき、変更する部分はマイク
ロコンピュータ30のプログラムのみでよいので、ハード
回路を作り直す必要がなく変更作業がきわめて容易にで
きる。
In the present embodiment having such a configuration, the run length processing is performed based on the binarized signal of the signal read by the bar code pattern detection circuit 29, and the information stored in the FIFO register 28 is the bar code information. If it is determined that there is barcode information, it is controlled to interrupt the microcomputer 30 to read the information stored in the FIFO register 28. Since the program processing is performed by the computer 30, the portion requiring high-speed processing can be processed by the hardware circuit of the barcode pattern circuit 29, and the microcomputer 30 only needs to perform the barcode recognition processing. it can. When changing or correcting the recognition logic such as decoding or algorithm, the barcode pattern detection circuit 29 can be used without any change, and only the program of the microcomputer 30 needs to be changed, so it is necessary to recreate the hardware circuit. The change work can be done very easily.

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

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

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

また前記実施例ではマルチプレクサを使用して各ラッチ
回路からのデータの選択を行なったが必ずしもこれに限
定されるものではなく、マルチプレクサを使用せず28/3
2乗算器、36/32乗算器及び7ビットコンパレータ49,51
を各出力E0〜E3に対応して個々に設けて構成しても同様
の機能をする回路は実現できるものである。
Further, in the above-described embodiment, the multiplexer is used to select the data from each latch circuit, but the present invention is not limited to this, and the multiplexer is not used.
2 multiplier, 36/32 multiplier and 7-bit comparator 49, 51
It is possible to realize a circuit having the same function even if each of the outputs E 0 to E 3 is individually provided and configured.

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

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

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

第1図〜第8図はこの発明の一実施例を示すもので、第
1図は一部概略構成を含むブロック図、第2図は第1図
におけるバーコードパターン検出回路の具体回路構成を
示す回路図、第3図、第4図及び第5図は第2図の各部
の動作タイミングを示すタイミング波形図、第6図は第
2図の28/32乗算器の構成を示す図、第7図はマイクロ
コンピュータによるバーコード認識処理を示す流れ図、
第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……36/32乗算器、49,5
1……7ビットコンパレータ、50……7ビットラッチ回
路、52〜63……JKフリップフロップ、66……7ビットコ
ンパレータ。
1 to 8 show an embodiment of the present invention. FIG. 1 is a block diagram partially including a schematic configuration, and FIG. 2 shows a specific circuit configuration of the bar code pattern detection circuit in FIG. The circuit diagram, FIG. 3, FIG. 4 and FIG. 5 are timing waveform diagrams showing the operation timing of each part of FIG. 2, and FIG. 6 is a diagram showing the configuration of the 28/32 multiplier of FIG. FIG. 7 is a flow chart showing the barcode recognition processing by the microcomputer,
FIG. 8 shows an example of a bar code, (a) is a standard version bar code diagram, (b) is a shortened version bar code diagram, and FIG. 9 is a block diagram showing another embodiment of the present invention. , FIG. 10 and FIG. 11 are block diagrams showing a conventional example. 22 …… Laser beam, 25 …… Receiver, 26 …… Binarization circuit,
27 …… Run length counter, 28 …… FIFO register, 29
…… Bar code pattern detection circuit, 30 …… Microcomputer, 36 …… 2-bit counter, 37 …… Decoder,
38-41 …… 7-bit counter, 43-46 …… 7-bit latch circuit, 47 …… 28/32 multiplier, 48 …… 36/32 multiplier, 49,5
1 …… 7-bit comparator, 50 …… 7-bit latch circuit, 52 to 63 …… JK flip-flop, 66 …… 7-bit comparator.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】バーコード検出部と、このバーコード検出
部からの信号を処理して2値化信号を出力する2値化回
路と、この2値化回路からの2値化信号をランレングス
データに変換するランレングスカウンタと、このカウン
タ出力を記憶する1又は複数のシフトレジスタと、前記
2値化回路からの2値化信号及びランレングスカウンタ
からのデータを入力してバーコードパターンを検出する
バーコードパターン検出回路と、このバーコードパター
ン検出回路からのバーコード検出信号に応動して前記1
又は複数のシフトレジスタのデータを取込み、バーコー
ドの認識処理を行なう1又は複数のマイクロコンピュー
タとからなり、 前記バーコードパターン検出回路は、2値化信号の変化
に応動して順次、かつバーコードの1キャラクタ周期で
カウント動作を行なう複数のカウンタと、この各カウン
タのデータをそれぞれラッチする複数のラッチ回路と、
この各ラッチ回路出力と前記各カウンタ出力に応動して
キャラクタ幅の変動を検出するキャラクタ幅変動検出回
路と、この検出回路出力に応動してキャラクタ幅の変動
が規定内で連続していることを判定する判定回路と、こ
の判定回路が連続を判定したとき、そのときの1キャラ
クタ分のデータに、キャラクタ幅の変動の規定内下限値
を決める一定値を乗じたデータを保持するデータ保持回
路と、このデータ保持回路に保持されたデータと前記ラ
ンレングスカウンタのデータとを比較し、カウンタのデ
ータが保持回路のデータより大きくなったときバーコー
ド検出信号を出力する比較出力回路とで構成したことを
特徴とするバーコード読取り装置。
1. A bar code detecting section, a binarizing circuit for processing a signal from the bar code detecting section and outputting a binarized signal, and a run length of the binarizing signal from the binarizing circuit. A run length counter for converting to data, one or a plurality of shift registers for storing the counter output, a binarized signal from the binarization circuit and data from the run length counter are input to detect a bar code pattern. And a bar code pattern detection circuit that operates in response to a bar code detection signal from the bar code pattern detection circuit.
Or one or a plurality of microcomputers for fetching data from a plurality of shift registers and performing a barcode recognition process, wherein the barcode pattern detection circuit sequentially and in response to a change in a binarized signal A plurality of counters that perform a counting operation in one character period, and a plurality of latch circuits that respectively latch the data of the respective counters,
A character width variation detecting circuit that detects variations in the character width in response to the outputs of the respective latch circuits and the outputs of the counters, and a variation of the character width in response to the outputs of the detection circuit are continuously within a specified range. A judgment circuit for judging, and a data holding circuit for holding data obtained by multiplying the data for one character at that time by a constant value for determining a prescribed lower limit value of fluctuation of the character width when this judgment circuit judges continuity. A comparison output circuit for comparing the data held in the data holding circuit with the data of the run length counter and outputting a bar code detection signal when the data of the counter becomes larger than the data of the holding circuit. Bar code reader characterized by.
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 JPS6398081A (en) 1988-04-28
JPH07104902B2 true 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)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2785534B2 (en) * 1990-12-20 1998-08-13 株式会社デンソー Information reader

Family Cites Families (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
DE2915732C2 (en) * 1979-04-19 1983-09-29 Scantron GmbH & Co Elektronische Lesegeräte KG, 6000 Frankfurt Method for identifying objects and apparatus for carrying out this method

Also Published As

Publication number Publication date
JPS6398081A (en) 1988-04-28

Similar Documents

Publication Publication Date Title
US5414252A (en) High speed scan bar code reader which can read more than one type of bar code
US5128527A (en) Apparatus for reading a bar code
US6206289B1 (en) Scanner
US5302813A (en) Multi-bit digitizer
US5144118A (en) Bar code scanning system with multiple decoding microprocessors
US6082621A (en) Interface between threshold processing digitizer for bar code reader
US5821520A (en) Bar code scanning system with the pre-decoding signal processing and method for bar code candidate selection for decoding
US5468946A (en) Method and apparatus for decoding multi-level bar codes or bi-level bar codes
CA2044935C (en) Bar-code reading apparatus
US20020139851A1 (en) Symbology scanning system for efficiently locating coded symbologies
JPH0448392A (en) Bar code reader
US5247161A (en) Bar code scanning system with converter means and microprocessor means contained in a single integrated circuit
JPH07104902B2 (en) Bar code reader
JP2729168B2 (en) Barcode, barcode reader, and method of reading the same
US6299065B1 (en) Bar code processing system with multiport signal decoder
JP3785527B2 (en) Bar code reader and storage medium
US6478224B1 (en) Symbology-independent method and apparatus for identifying potential bar code data
JP2776035B2 (en) Barcode reader
JP2742140B2 (en) Optical reader
JP2777321B2 (en) Bar code reading method and bar code reading device
JP2732914B2 (en) Barcode reader
JPH01116777A (en) Final display deciding circuit
JP2689158B2 (en) Barcode reader
JP2677806B2 (en) Code reader
JP2923375B2 (en) Barcode reader

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term