JP2677805B2 - Code reader - Google Patents

Code reader

Info

Publication number
JP2677805B2
JP2677805B2 JP62300112A JP30011287A JP2677805B2 JP 2677805 B2 JP2677805 B2 JP 2677805B2 JP 62300112 A JP62300112 A JP 62300112A JP 30011287 A JP30011287 A JP 30011287A JP 2677805 B2 JP2677805 B2 JP 2677805B2
Authority
JP
Japan
Prior art keywords
signal
code
count
unit
count value
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
JP62300112A
Other languages
Japanese (ja)
Other versions
JPH01142888A (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.)
Alps Alpine Co Ltd
Original Assignee
Alps Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alps Electric Co Ltd filed Critical Alps Electric Co Ltd
Priority to JP62300112A priority Critical patent/JP2677805B2/en
Priority to US07/208,182 priority patent/US4859840A/en
Publication of JPH01142888A publication Critical patent/JPH01142888A/en
Application granted granted Critical
Publication of JP2677805B2 publication Critical patent/JP2677805B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、媒体上に表示された符号(例えば、バーコ
ード)を光電変換部等で走査して読み取り、その符号で
示される情報を計算器で処理可能な信号にデコードして
出力する符号読取装置に係り、特に、符号の読取り及び
デコードの確度を高めるようにした符号読取装置に関す
る。 〔従来の技術〕 一般に、この種の符号読取装置は、帳票や物品表面等
の媒体上に、種々のコード体系にしたがって表示された
符号を光学読取装置等のスキャナによって光電変換し、
得られた電気信号をマイクロプロセッサ等の計算装置で
処理できるようにデコードして出力するものである。こ
の場合、表示される符号としては、バーコード、カルラ
コード等の専用表示符号や一般文字があり、これらをデ
コードするために、表示方法には一定の基準が定められ
ている。この基準は、表示間隔及び表示範囲に関する規
定であって、例えば、バーコードについては、日本工業
規格〔JIS X 0502〕(昭和62年4月30日第1刷発行)第
3頁乃至第9頁の記載のものや、American National St
andard 〔ANSI:MH10.8M−1983〕の第8頁等に規定され
ているもの等がある。これらの表示の読み取りに際して
は、スキャナとして代表的な光学読取装置が用いられ、
その中でも、ペン型のものだけでなく、セルフ・スキャ
ニング・タイプのハンド・ワンド・モデルや据置型のい
ずれかのものであってもよい。 第10図は、既知の符号読取装置の代表例である光学式
符号読取装置(以下、バーコードリーダと記す)の回路
構成の一例を示すブロック図である。 また、第11図乃至第14図は、第10図に示した既知のバ
ーコードリーダの動作状態を説明する説明図である。 第10図において、101は光電変換部、102はファースト
スペース検出部、103は第1エッジ検出部、104はカウン
タ部、105はスタートマージン判定部(スタート判定
部)、107はデコーダ部、110はストップマージン判定部
(ストップ判定部)である。 第10図において、光電変換部101は光電変換器1と2
値化回路2とからなり、光電変換器1は、媒体上に光反
射効率の高いスペースと、光吸収率の高いバーとの2つ
の状態で交互に表示された符号を検出して、所定電圧レ
ベルの電気信号aに変換して出力し、2値化回路2は、
電気信号aを受け、例えば光反射率の高い白色のスペー
スをローレベル(以下“L"と記す)として、一方、例え
ば光吸収率の高い黒色のバーをハイレベル(以下“H"と
記す)とした2値化信号bに変換する。 ファーストスペース検出部102は、切替器3とスペー
ス検出器4とからなり、光電変換部101からの2値化信
号bを切替器3を介してスペース検出器4または切替器
5に供給する。切替器3は、初期にリセット信号の印加
によってスペース検出器4側に切替えられている。光電
変換部101は、第11図に示されるように、バーコードの
表示位置の前方から走査を開始する場合、その表示位置
の前方のスペース(ファーストスペース)において"L"
信号をスペース検出器4に供給する。スペース検出器4
の出力は、カウンタ部104の第1カウンタ回路8に接続
され、スペース検出器4の発生する信号cが上記表示位
置の前方のスペースによって得られる"L"信号であると
き、検出信号eを第1カウンタ回路8に供給する。第1
カウンタ回路8は、検出信号eの供給によってクリアさ
れ、その後に入力されるクロック信号のカウントを開始
する。 このとき、切替器3は、検出信号eの印加によって第
1エッジ検出部103側に切替えられ、第1エッジの検出
のために待機する。第1カウンタ回路8は、検出信号e
の持続時間中にクロック信号の数をカウントし、第1カ
ウンタ回路8のカウント値が第1定数レジスタ9に設定
されているオーバフロー値(例えば、光電変換部101が
スペース上で停止しているような状態)に達すると、オ
ーバフロー比較器10はリセット信号を出力し、第1カウ
ンタ回路8を始めとする装置全体をリセットする。 一方、第1カウンタ回路8のカウント値jは、切替器
11を通してスタートマージン判定部105の第1カウンタ
メモリ12に供給され、第1マージン比較器14は、後述す
る信号hの供給時に、第1カウンタメモリ12のカウント
値と第2定数レジスタ13の設定値とを比較する。 第11図のaに示されるように、第1カウンタ回路8の
カウント値j、即ち、第1カウンタメモリ12に供給され
る信号線1のカウント値をtM(バーコード直前のスペー
スのカウント時間)とし、第2定数レジスタ13に設定さ
れているスタートマージン時間をtSとしたとき、tM>tS
であれば、第12図(a)に示されるように、走査のスタ
ート位置がバーコードから十分離れているものと判断さ
れる。 また、第11図のbに示されるように、走査のスタート
位置がバーコードから十分離れていても、途中に汚れP
があったような場合、走査のスタート位置から汚れPま
でのカウント時間tM1、汚れPからバーコードの位置ま
でのカウント時間tM2は、それぞれtSより小さくなり、
(tM1<tS、tM2<tS)、やはりスタート判定はできない
と判断する。 一方、第11図のcに示されるように、走査のスタート
位置がバーコードに近いときは、第12図(c)に示され
るように、走査のスタート位置からバーコードまでのカ
ウント時間tMは、tM<tSとなり、これもまたスタート判
定はできないと判断する。 上記第11図b、cに示される場合には、スタートマー
ジン判定部105からリセット信号が出力され、バーコー
ドの読み取りはなされない。 ここで、第11図のaに示されるように、tM>tSである
と、スペース検出器4の検出出力eは、切替器3に供給
され、切替器3を切替器5側に切替える。第1エッジ検
出部103の第1エッジ検出器6は、表示位置の前方のス
ペースから最初のバーコードに達したときに、光電変換
部101から出力される“L"から“H"への変化(第11図の
イ点)に伴う変化信号fを検出し、第1変化検知信号h
を出力する。変化検知信号hは、切替器5を第2エッジ
検出部7側に切替えるとともに、カウンタ部104の第1
カウンタ回路8に供給され、第1カウンタ回路8はクロ
ック信号のカウントを開始する。また、切替器11は、ス
ペース検出器4の検出出力eにより、ストップマージン
判定部110側に切替えられる。第2エッジ検出部7は、
最初のバーコードの終わりのエッジ、即ち、第11図のロ
点における“H"から“L"への変化を検出し、第2変化検
知信号iを出力する。 一方、第1カウンタ回路8は、第1エッジ検出器6が
第1エッジを検出した時点からカウントを開始し、その
カウント値は、第2エッジ検出器7が第2エッジを検出
した時点(信号線iの信号出力時点)において、ストッ
プマージン判定部110の第2カウンタメモリ15に格納さ
れる。第2カウンタメモリ15は、カウント値を信号線o
に出力し、そのカウント値は、第2変化検知信号信号i
によって切替えられる切替器16を通して信号線tからデ
コーダ部107に供給される。即ち、この時点には、第11
図のイ点からロ点までのバーコード(バーB1)の幅に対
応したカウント値がデコーダ部107に供給されることに
なる。 次に、第2エッジ検出器7は、第11図のaにおけるロ
点の“H"から"L"への変化と、同図のハ点の“L"から
“H"への変化とを順次検出し、ロ点からハ点までのカウ
ント値がデコーダ部107に供給される。 以下、同様にしてそれぞれのバーコードのスペースの
幅及びバーの幅に相当するカウント値が順次デコーダ部
107に供給される。 以上のように、スタートマージン判定部105は、表示
位置の前方のスペースがスタートマージンを満足してい
るか否かを確認し、満足していないと判断したとき、リ
セット信号を出力し、バーコードの読み取りを開始させ
ない。 切替器22は、第1エッジ検出部103から第1変化検知
信号hが供給されると、ストップマージン判定部110か
ら出力された信号uをデコーダ部107に供給する。 この場合、スタートマージン判定部105の第2定数レ
ジスタ13は、スタートマージンに対応する定数が予め設
定されており、その設定値nが第1マージン比較器14に
供給される。第1マージン比較器14は、第1変化検知信
号hが入力された時点から動作を開始し、第1カウンタ
メモリ12からのカウント値mと第2定数レジスタ13の設
定値nとを比較し、m<nのときにリセット信号を出力
し、バーコードの読み取り動作が行われないようにす
る。 幾つかのバーコードの読み取りが終了し、再びスペー
ス部分に入ったとき、即ち、第13図におけるニ点の“H"
から“L"への変化時点に、第1カウンタ回路8は、クロ
ック信号のカウントを開始し、そのカウント値がストッ
プマージン判定部110の第2カウンタメモリ15に格納さ
れる。第2マージン比較器15は、第2カウンタメモリ15
のカウント値tNと第7定数レジスタ42に設定されてある
ストップマージンに対応する値tCとを比較する。 なお、この設定値tCは、バーコードリーダの操作者ま
たは操作時のスキャンスピードの変動を考慮した上で設
定される定数であって、第13図のaまたはbに示される
ようなスキャンスピードが遅いとき、速いときに対応す
る第14図(a)、(b)の波形のように、tN>tCであれ
ば、バーコードの読み取りが終了したものと判断し、切
替器22を切替え、第2マージン比較器15からの第1比較
信号vをデコーダ部107に供給し、デコーダ部107にデコ
ード指令を与える。 一方、第13図のcに示されるように、ストップマージ
ンとして確保してあるスペース部分に、汚れP′があっ
て、tN<tCとなるときは、第14図(c)に示されるよう
に、この汚れP′をバーコードとして誤って読み込み、
誤動作を生じる恐れがある。これに対して、第7定数レ
ジスタ42は、ストップマージンに対応する定数sが予め
設定されており、その設定値sを第2マージン比較器20
に供給し、バーまたはスペースのカウント値が上記設定
値s以上になったとき、第2マージン比較器15からの第
2比較信号vを切替器22を介してデコーダ部107に供給
し、デコーダ部107にデコード停止指令を与える。 なお、上記説明では、スペースを白地、バーを黒地と
し、それぞれ信号のレベルを“L"、“H"としたが、これ
に限るものではない。 なお、この種の従来技術に関するものとして、特公昭
60−35707号公報に記載のものがある。 〔発明が解決しようとする課題〕 前述の従来技術においては、バーコードの表示位置の
前方のスペースがある一定距離(ワイドスペース幅より
も大きい距離)以上またはある一定時間(ワイドスペー
ス幅のカウント時間より大きい時間)以上であることが
検出されたとき、バーコードの読み取りのスタートと判
定しているので、バーコードの表示位置の前方のスペー
スとして、ある一定距離以上または一定時間以上のもの
が必要になり、その結果、バーコードを表示する際に、
バーコード表示を高密度化することが困難であり、しか
も、スペース部分に汚れがつく可能性が高くなって、誤
動作を生じ易いという問題がある。 また、前述の従来技術においては、バーまたはスペー
スに対するカウント値がある定数値より大きいとき、バ
ーコードの読み取りの終了と見なしてデコード動作を開
始させるように制御しているので、バーコードリーダの
スキャンスピードにより、ストップマージンに必要なス
ペース/バーの幅が変化するようになって、速いスキャ
ンスピードに対応させるためにストップマージン幅を大
きく設定しなければならず、その結果、バーコードを表
示する際に、バーコード表示を高密度化することが困難
であり、しかも、このマージン部分に汚れがつく可能性
が高くなって、誤動作を生じ易いという問題がある。 本発明は、上記従来技術の問題点を解決するもので、
その目的は、バーコード表示の高密度化を可能にし、符
号の読み取りに際する誤動作の発生を低減した符号読取
装置を提供することにある。 〔課題を解決するための手段〕 上記目的を達成するために、本発明は、媒体上に表示
された符号を読み取り、2値信号を出力する光電変換部
と、2値信号の変化時を表す変化検知信号及び変化検知
信号の時間間隔をクロック信号でカウントしたカウント
信号を出力する計時部と、変化検知信号の供給回数が所
定数に達したときに最初の符号を読み取ったものと判定
してスタート判定信号を出力するスタート判定部と、デ
コード開始信号の供給によってカウント信号をデコード
処理するデコーダ部と、スタート判定信号が未だ供給さ
れず、しかも、カウント信号を用いて、2番目以降の符
号のカウント値とその直前の符号のカウント値に符号の
許容範囲を表す定数を乗算した値との大きさを比較し、
2番目以降の符号のカウント値の方が大きい場合に、読
み取った符号が非符号であると判定し、装置内の各部を
読み取り前の状態に復帰させるリセット信号を出力する
非符号判定部と、スタート判定信号が既に供給されてお
り、しかも、カウント信号を用いて、2番目以降の符号
のカウント値とその直前の符号のカウント値に符号の許
容範囲を表す定数を乗算した値との大きさを比較し、2
番目以降の符号のカウント値の方が大きい場合に、正規
の符号の読み取りを終了したものと判定し、デコーダ部
にデコード開始信号を出力する符号読取終了判定部とを
備える第1の手段を具備する。 また、上記目的を達成するために、本発明は、媒体上
に表示された符号を読み取り、2値信号を出力する光電
変換部と、2値信号の変化時を表す変化検知信号及び変
化検知信号の時間間隔をクロック信号でカウントしたカ
ウント信号を出力する計時部と、前記変化検知信号の供
給回数が所定数に達したときに最初の符号を読み取った
ものと判定してスタート判定信号を出力するスタート判
定部と、デコード開始信号の供給によってカウント信号
をデコード処理するデコーダ部と、スタート判定信号が
未だ供給されず、しかも、カウント信号を用いて、2番
目以降の符号のカウント値とその直前の符号のカウント
値との比率が、符号の許容範囲を表す常数よりも大きい
かを比較し、比率の方が大きい場合に、読み取った符号
が非符号であると判定し、装置内の各部を読み取り前の
状態に復帰させるリセット信号を出力する非符号判定部
と、スタート判定信号が既に供給されており、しかも、
カウント信号を用いて、2番目以降の符号のカウント値
とその直前の符号のカウント値との比率が、符号の許容
範囲を表す常数よりも大きいかを比較し、その比率の方
が大きい場合に、正規の符号の読み取りを終了したもの
と判定し、デコーダ部にデコード開始信号を出力する符
号読取終了判定部とを備える第2の手段を具備する。 さらに、上記目的を達成するために、本発明は、媒体
上に表示された符号を読み取り、2値信号を出力する光
電変換部と、2値信号の変化時を表す変化検知信号及び
変化検知信号の時間間隔をクロック信号でカウントした
カウント信号を出力する計時部と、変化検知信号の供給
回数が所定数に達したときに最初の符号を読み取ったも
のと判定してスタート判定信号を出力するスタート判定
部と、デコード開始信号の供給によってカウント信号を
デコード処理するデコーダ部と、スタート判定信号が未
だ供給されず、しかも、カウント信号を用いて、2番目
以降の符号のカウント値を符号の許容範囲を表す定数で
除算した値が、その直前の符号のカウント値よりも大き
いかを比較し、除算した値の方が大きい場合に、読み取
った符号が非符号であると判定し、装置内の各部を読み
取り前の状態に復帰させるリセット信号を出力する非符
号判定部と、スタート判定信号が既に供給されており、
しかも、カウント信号を用いて、2番目以降の符号のカ
ウント値を符号の許容範囲を表す定数で除算した値が、
その直前の符号のカウント値よりも大きいかを比較し、
除算した値の方が大きい場合に、正規の符号の読み取り
を終了したものと判定し、デコーダ部にデコード開始信
号を出力する符号読取終了判定部とを備える第3の手段
を具備する。 〔作用〕 上記第1の手段によれば、スタート判定部は、変化検
知信号の供給回数が所定数に達したときに最初の符号を
読み取ったものと判定してスタート可を示すスタート判
定信号を出力し、非符号判定部は、スタート判定信号が
未だ供給されない場合、カウント信号を用い、2番目以
降の符号のカウント値とその直前の符号のカウント値に
符号の許容範囲を表す定数を乗算した値との大きさを比
較し、2番目以降の符号のカウント値の方が大きい場合
に、読み取った符号が非符号であると判定して装置内を
リセットし、符号読取終了判定部は、スタート判定信号
が既に供給された場合に、カウント信号を用い、2番目
以降の符号のカウント値を符号の許容範囲を表す定数で
除算した値が、その直前の符号のカウント値よりも大き
いかを比較し、除算した値の方が大きい場合に正規の符
号の読み取りを終了したものと判定し、カウント信号の
デコードを開始させる。 また、上記第2の手段によれば、スタート判定部は、
変化検知信号の供給回数が所定数に達したときに最初の
符号を読み取ったものと判定してスタート可を示すスタ
ート判定信号を出力し、非符号判定部は、スタート判定
信号が未だ供給されない場合、カウント信号を用い、2
番目以降の符号のカウント値とその直前の符号のカウン
ト値との比率が、符号の許容範囲を表す常数よりも大き
いかを比較し、その比率の方が大きい場合に、読み取っ
た符号が非符号であると判定して装置内をリセットし、
符号読取終了判定部は、スタート判定信号が既に供給さ
れた場合に、カウント信号を用い、2番目以降の符号の
カウント値とその直前の符号のカウント値との比率が、
符号の許容範囲を表す常数よりも大きいかを比較し、そ
の比率の方が大きい場合に、正規の符号の読み取りを終
了したものと判定し、カウント信号のデコードを開始さ
せる。 さらに、上記第3の手段によれば、スタート判定部
は、変化検知信号の供給回数が所定数に達したときに最
初の符号を読み取ったものと判定してスタート可を示す
スタート判定信号を出力し、非符号判定部は、スタート
判定信号が未だ供給されない場合、カウント信号を用
い、2番目以降の符号のカウント値を符号の許容範囲を
表す定数で除算した値が、その直前の符号のカウント値
よりも大きいかを比較し、除算した値の方が大きい場合
に、読み取った符号が非符号であると判定して装置内を
リセットし、符号読取終了判定部は、スタート判定信号
が既に供給された場合に、カウント信号を用い、2番目
以降の符号のカウント値を符号の許容範囲を表す定数で
除算した値が、その直前の符号のカウント値よりも大き
いかを比較し、除算した値の方が大きい場合に、正規の
符号の読み取りを終了したものと判定し、カウント信号
のデコードを開始させる。 そして、上記第1乃至第3の手段は、いずれも、符号
の読み取りの可否をカウント値の比を用いて判定するよ
うにしているので、読み取り可能な符号の仕様、即ち、
符号の幅(長さ)や走査速度(滞留時間)の仕様を作成
する場合、スタートマージンやストップマージンに対し
て充分大きなマージンを設定する必要がなく、最小限度
のスタートマージンやストップマージンを有する仕様に
することができる。 〔実施例〕 以下、本発明の実施例を図面を参照して説明する。 第1図は、本発明による符号読取装置の一実施例を示
すブロック構成図であって、符号読取装置がバーコード
読取装置である例を示すものである。 第1図において、101は光電変換部、106は符号読取終
了判定部、107はデコーダ部、108はスタート判定部、10
9は非符号判定部、111は計時部である。 第1図に示されように、光電変換部101は、バーコー
ドをスキャンして読み取り、高レベル“H"及び、低レベ
ル“L"からなる2値信号に変換する。計時部111は、光
電変換部101から供給される2値信号の変化状態を検出
し、変化の検出時に表化検知信号を発生し、かつ、変化
検知信号の時間間隔をクロック信号でカウントし、その
カウント値を示すカウント信号を発生する。スタート判
定部108は、計時部111から供給される変化検知信号の供
給回数に基づいて最初の符号の有無を検出し、その検出
時にスタート判定信号を発生する。デコーダ部107は、
計時部111から供給されるカウント信号をデコード処理
し、処理結果を読み取りデータとして出力する。非符号
判定部109は、スタート判定部108からスタート判定信号
の供給がない場合に限って、計時部111から供給される
カウント信号に基づいて、2番目以降の符号のカウント
値とその直前の符号のカウント値に許容符号を表す定数
を乗算した乗算カウント値とを比較し、前者のカウント
値が後者の乗算カウント値よりも大きい場合にリセット
信号を発生する。符号読取終了判定部106は、スタート
判定部108からスタート判定信号の供給がある場合に限
って、計時部111から供給されるカウント信号に基づい
て、現在の符号のカウント値とその直前の符号のカウン
ト値に許容符号を表す定数を乗算した乗算カウント値と
を比較し、前者のカウント値が後者の乗算カウント値よ
りも大きい場合にデコード開始信号を発生し、デコーダ
部107に供給してデコードを開始させる。 次に、第2図は、第1図に示した本実施例の詳細な構
成を示すブロック構成図である。 第2図において、101は光電変換部、102はファースト
スペース検出部、103は第1エッジ検出部、104はカウン
タ部、106は符号読取終了判定部、107はデコーダ部、10
8はスタート判定部、109は非符号判定部、111は計時部
であり、いずれも、図1に示された各構成要素101、106
乃至109、111に対応するものである。 また、7は第2エッジ検出部であり、ファーストスペ
ース検出部102、第1エッジ検出部103、カウンタ部10
4、第2エッジ検出部7は、全体で計時部111を構成して
いる。 そして、光電変換部101は、バーコード等の符号を光
電変換器1で読み取り、読み取り信号を信号線aを介し
て2値化回路2に供給し、低レベル“L"及び高レベル
“H"からなる2値信号に変換し、変換した2値信号を信
号線bを介して計時部111のファーストスペース検出部1
02に供給する。 計時部111において、ファーストスペース検出部102の
切替器3は、リセット信号の入力によって図示の3r側に
切替えられており、信号線eの信号入力によって図示3s
側に切替えられる。したがって、切替器3は、信号線b
をスペース検出器4に接続し、信号線cの2値信号がス
ペースを示すものである(例えば、“L")のとき、信号
線eに検出信号を発生し、切替器3を3s側に切替える。
これにより、光電変換部101の信号線bに得られる2値
信号は、切替器3を通って信号線dから第1エッジ検出
部103の切替器5に供給される。切替器5は、リセット
信号の入力によって5r側に切替えられているので、信号
線dは信号線fを介して第1エッジ検出器6に接続され
る。 第1エッジ検出器6は、信号線fの2値信号がスペー
スからバーを示すものに変化(例えば、“L"から“H")
したときを検出し、信号線hに第1変化検知信号を発生
する。信号線hの第1変化検知信号は、切替器5に供給
されると、切替器5を5s側に切替え、同時に、カウンタ
部104の第1カウンタ回路8に供給される。第1カウン
タ回路8は、第1変化検知信号の供給によってカウント
値が0になり、その後、入力されるクロック信号CLのカ
ウント動作を開始する。この場合、第1カウンタ回路8
は、リセット信号の入力だけでなく、後述する第2エッ
ジ検出器7から出力線iを介して供給される第2変化検
知信号の供給によっても同様にカウント値が0になり、
その後、クロック信号CLのカウントを開始し、いずれの
場合も、信号線iにカウント値を出力する。第1カウン
タ回路8から出力されたカウント値は、オーバフロー比
較器10において、第1定数レジスタ9に設定したオーバ
フロー値と比較され、第1カウンタ回路8のカウント値
がオーバフロー(例えば、スキャナを途中で停止させた
場合等)したときは、オーバフロー比較器10がリセット
信号を出力する。 第2エッジ検出器7は、切替器3の3s側への切替及び
切替器5の5s側への切替に対応して、光電変換部101か
ら2値信号が供給され、信号線hの第1変化検知信号が
バーからスペースを示すものへの変化(“H"から“L")
及びスペースからバーを示すものへの変化(“L"から
“H")をそれぞれ検出し、検出時に第2変化検知信号を
信号線iに発生する。第2変化検知信号は、第1カウン
タ回路8に供給されるとともに、スタート判定部108の
第2カウンタ回路28に供給される。 スタート判定部108は、第2変化検知信号に基づい
て、ファーストエレメント(最初の符号)の立上り部を
検出した後、続いて供給されるファーストエレメント
(最初の符号)立下り部及びそれ以後のエレメント(符
号)の変化の数をカウントし、そのカウント値が第4定
数レジスタ29に予め設定してある定数に達したとき、信
号線ウにスタート判定信号を発生する(スタート判定を
行うために、スペースとバーの数をカウントしてい
る)。 第2カウンタ回路28は、信号線iの第2変化検知信号
の印加によりカウンタが順次インクリメントされ、信号
線アにそのカウント値を送出する。なお、第2カウンタ
回路28は、リセット信号の入力によってカウンタ値が0
にクリアされる。第4定数レジスタ29は、バーコードの
スタート判定に使用するエレメントの数(2以上)を示
す定数が予め設定されており、その設定値が信号線イを
介して第1マージン比較器30に供給される。第1マージ
ン比較器30は、信号線アのカウント値と信号線イの設定
値とを比較し、カウント値が第4定数レジスタ29の設定
値を超えていると、信号線ウにスタート判定信号を出力
する。 切替器31は、第2エッジ検出器7の第2変化検知信号
を、切替器39及び非符号判定部109の切替器32に、また
は、切替器21及び符号読取判定部106の切替器16のいず
れかに供給する。切替器31の切替えは、リセット信号と
スタート判定部108のスタート判定信号とによって行わ
れる。切替器31は、リセット信号が印加されると31r側
に切替られ、信号線iから第2変化検知信号が印加され
ると31s側に切替られる。 切替器11は、リセット信号の印加と第1エッジ検出器
6からの第1変化検知信号の印加によって切替えられ、
第1変化検知信号の印加時に、第1カウンタ回路8のカ
ウント値を第1カウンタメモリ12及び第2カウンタメモ
リ15に供給する。 非符号判定部109は、少なくとも最初のバーとスペー
スのカウント値を比較し、それらのエレメント(符号)
のカウンタ値(第1カウンタメモリ12のカウント値)が
直前のエレメント(符号)のカウンタ値(第2前回カウ
ンタメモリ35に記憶されたカウント値)のある定数(第
6定数レジスタ36の内容)倍を超えたときに、リセット
信号を信号線サに送出する。即ち、スタート判定の際
に、スタートマージンを見ることなく、少なくとも最初
のバーとスペースのカウント値の比較を行い、既に述べ
たように、正規のエレメント(符号)の読み取りでない
と判断したとき、リセット信号を出力する。 この場合、第1カウンタメモリ12は、信号線1からの
カウント値を記憶し、このカウント値を信号線mに送出
する。そして、リセット信号の印加によって記憶してい
たカウント値がリセットされる。 第5定数レジスタ33は、(ワイドエレメント/スロー
スキャンスピード)より大きいカウント値が予め設定さ
れており、その設定値を信号線カに出力する。切替器34
は、リセット信号が入力されたとき、信号線カと信号線
キとを接続し、第5定数レジスタ33のカウント値を第2
前回カウンタメモリ35に供給し、そこに記憶させる。第
2前回カウンタメモリ35は、記憶したカウント値を信号
線クを介して第2乗算器37に供給し、第2乗算器37は、
第1前回カウンタメモリ35のカウント値と、第6定数レ
ジスタ35に設定されているワイドエレメント/ナローエ
レメントより大きい値とを乗算する。その乗算出力は、
信号線コを介して第3マージン比較器38に供給される。 第3マージン比較器38は、信号線mからの第1カウン
タメモリ12のカウント値と第2乗算器37の乗算出力とを
比較し、前者が後者3を超えていた場合に信号線サに信
号を出力する。 切替器40は、(i)リセット信号が入力されると、信
号線サとリセット出力線を接続し、信号線サに得られた
信号をリセット信号として出力する。また、(ii)信号
線ウからスタート判定信号が入力されると、信号線サと
リセット出力線とを切離し、リセット出力線にリセット
信号が出力されない。 非符号判定部109の切替器32は、信号線エから第2変
化検知信号が入力されたときのみ、信号線mと信号線キ
とを接続し、第1カウンタメモリ12に記憶されたカウン
ト値を第2前回カウントメモリ35に供給し、第2変化検
知信号の未入力時には、信号線mと信号線キとを切離
す。 切替器39は、信号線エから第2変化検知信号が入力さ
れたときのみ、信号線mと信号線tとを接続し、第1カ
ウンタメモリ12のカウント値をデコーダ部107に供給す
る。 切替器21及び切替器39は、第2エッジ検出器7から切
替器31を介して供給される第2変化検知信号によって切
替られるもので、切替器39は、その切替えによって、第
1カウンタメモリ12に記憶されているエレメント(符
号)のカウント値を、また、切替器21は、その切替えに
よって、後述するように、第2カウンタメモリ15に記憶
されているエレメント(符号)のカウント値を、それぞ
れデコーダ部107に送出する。 切替器27は、信号線ウからスタート判定信号が入力さ
れたときのみ、即ち、スタート判定部108からのスター
ト判定信号によって切替えられるもので、信号線mのカ
ウント値を信号線pを介して符号読取判定部109の第1
前回カウンタメモリ17に供給する。この場合、信号線m
のカウント値は、スタート判定部109において最後のエ
レメントの判定に使用されたカウンタ値である。 また、符号読取終了判定部106は、現在読んでいるエ
レメントのカウント値、即ち、第2カウンタメモリ15に
記憶されているカウント値が直前のエレメントのカウン
ト値、即ち、第1前回カウンタメモリ17に記憶されてい
るカウント値のある定数(第3定数レジスタ18の設定
値)倍を超えたときに、信号線uに出力信号を送出す
る。第2カウンタメモリ15は、信号線1から供給される
カウンタ部104の第1カウンタ回路8のカウント値を記
憶し、記憶したカウント値を信号線oに送出する。切替
器16は、切替器31及び信号線オを介して第2エッジ検出
器7からの第2変化検知信号が入力されたときのみ、信
号線oと信号線pとを接続し、第2カウンタメモリ15の
カウント値を第1前回カウンタメモリ17に供給する。第
1前回カウンタメモリ17は、信号線pから印加されたカ
ウント値を記憶し、記憶したカウント値を信号線qを介
して第1乗算器19に供給する。第3定数レジスタ18は、
バーコードのワイドエレメント/ナローエレメントより
大きい定数が予め設定されており、この設定値は信号線
rを介して第1乗算器19に供給される。第1乗算器19
は、第1前回カウンタメモリ17に記憶されたカウント値
と第3定数レジスタ18の設定値とを乗算し、乗算出力を
信号線sを介して第2マージン比較器20に供給する。 第2マージン比較器20は、信号線oを介して入力され
る第2カウンタメモリ15のカウント値と第1乗算器19の
乗算出力とを比較し、前者の値が後者の値を超えたと
き、信号線uに出力信号を送出する。 切替器22は、リセット信号が入力されると、信号線u
と信号線vとを切離し、信号線ウを介してスタート判定
部108からスタート判定信号が印加されると、信号線u
と信号線vとを接続する。このため、スタート判定部10
8からのスタート判定信号が入力した時点から、符号読
取判定部106の出力信号をデコーダ部107にデコード開始
信号として供給し、デコーダ部107におけるデコーダ動
作を開始させる。 デコーダ部107は、読み取ったバーコードのエレメン
トの幅に対応するクロック信号CLのカウント値に基づい
て、バーコードの符号の意味をデコード処理するもので
あり、例えば第2図に図示されるような構成を具備して
いる。 このデコーダ部107における各構成ブロックの機能
は、次のようなものである。 ビットイメージ変換器23は、信号線iからの第2エッ
ジ検出器7の第2変化検知信号の供給によって作動し、
信号線tから入力されるカウント値をビットイメージに
変換して信号線wを介してビットイメージメモリ24に記
憶する。この変換時にエラーが発生したときは、リセッ
ト信号を出力する。 ビットイメージメモリ24は、(i)信号線wから印加
されるビットイメージを記憶する、(ii)信号線vから
印加されるデコード開始信号により、記憶されているビ
ットイメージを信号線xを介してキャラクタ変換器25に
送出する、(iii)リセット信号が入力されると、記憶
されていたビットイメージをクリアする、というような
動作を行う。 キャラクタ変換器25は、ビットイメージメモリ24から
印加されたビットイメージをキャラクタに変換し、これ
を信号線Yを介して出力回路26に供給する。なお、キャ
ラクタ変換の際にエラーが発生したときはリセット信号
を出力する。 そして、出力回路26は信号線Yから印加されるキャラ
クタ信号を出力線zに送出し、図示されない表示手段に
供給する。このキャラクタ信号の送出が完了すると、リ
セット信号を出力する。 続いて、第3図は、本発明に用いられる非符号判定部
109及び符号読取終了判定部106の構成の第1実施例を示
すブロック構成図である。 第3図において、120はカウンタメモリ(非符号判定
部109の第1カウンタメモリ12、符号読取終了判定部106
の第2カウンタメモリ15に対応する)、,130は前回カウ
ンタメモリ(非符号判定部109の第2前回カウンタメモ
リ35、符号読取終了判定部106の第1前回カウンタメモ
リ17に対応する)、140は定数レジスタ(非符号判定部1
09の第6定数レジスタ36、符号読取終了判定部106の第
3定数レジスタ18に対応する)、150は乗算器(非符号
判定部109の第2乗算器37、符号読取終了判定部106の第
1乗算器19に対応する)、160は比較器(非符号判定部1
09の第3マージン比較器38、符号読取終了判定部106の
第2マージン比較器20に対応する)である。 上記構成による非符号判定部109及び符号読取終了判
定部106の構成によれば、スタートマージン、ストップ
マージンを判定するために、バーコード読み取りのため
のスキャンに伴い、現在のエレメント(符号)のカウン
ト値と、前回のエレメント(符号)のカウント値にある
定数を乗算した値と比較している。そして、非符号判定
部109は、スタート判定信号が未だ供給されないとき
に、カウンタメモリ120に記憶された2番目以降の符号
のカウント値と、前回カウンタメモリ130に記憶されて
いる直前の符号のカウント値に定数レジスタ140に設定
されている符号の許容範囲を表す定数を乗算した値とを
比較し、前者が後者よりも大きい場合、読み取った符号
が非符号であると判定しており、また、符号読取終了判
定部106は、スタート判定信号が既に供給されていて、
カウンタメモリ120に記憶された2番目以降の符号のカ
ウント値と、前回カウンタメモリ130に記憶されている
直前の符号のカウント値に定数レジスタ140に設定され
ている符号の許容範囲を表す定数を乗算した値とを比較
し、前者が後者よりも大きい場合、正規の符号の読み取
りを終了したと判定しているもので、これら非符号判定
部109及び符号読取終了判定部106により、スタートスペ
ースまたはストップスペースの状態の判定を行っている
ものである。 また、第4図は、本発明に用いられる非符号判定部10
9及び符号読取終了判定部106の構成の第2実施例を示す
ブロック構成図である。 第4図において、170は除算器であって、その他、第
3図に示された構成部分と同じ構成部分については同じ
符号を付けている。 第4図に示された例においては、カウンタメモリ120
のカウント値を定数レジスタ140に設定したある定数で
除算した値と、前回カウンタメモリ130のカウント値と
を比較している。そして、非符号判定部109は、スター
ト判定信号が未だ供給されないときに、カウンタメモリ
120に記憶された2番目以降の符号のカウント値と前回
カウンタメモリ130に記憶されている直前の符号のカウ
ント値との比率を、定数レジスタ140に設定されている
符号の許容範囲を表す常数と比較し、前者が後者よりも
大きい場合、読み取った符号が非符号であると判定して
おり、また、符号読取終了判定部106は、るスタート判
定信号が既に供給されているとき、カウンタメモリ120
に記憶された2番目以降の符号のカウント値と前回カウ
ンタメモリ130に記憶されている直前の符号のカウント
値との比率を、定数レジスタ140に設定されている符号
の許容範囲を表す常数と比較し、前者が後者よりも大き
い場合、正規の符号の読み取りを終了したと判定してい
るもので、これら非符号判定部109及び符号読取終了判
定部106により、スタートスペースまたはストップスペ
ースの状態の判定を行っているものである。この構成に
よっても、第3図に示された非符号判定部109及び符号
読取終了判定部106と同様の機能が達成できる。 さらに、第5図は、本発明に用いられる非符号判定部
109及び符号読取終了判定部106の構成の第3実施例を示
すブロック構成図である。 第5図において、第4図に示された構成部分と同じ構
成部分については同じ符号を付けている。 第5図に示された例においては、カウンタメモリ120
のカウント値と前回カウンタメモリ130のカウント値を
除算器170で除算した値と、定数レジスタ140に設定した
ある定数とを比較器160で比較している。そして、非符
号判定部109は、スタート判定信号が未だ供給されない
ときに、カウンタメモリ120に記憶された2番目以降の
符号のカウント値を定数レジスタ140に設定されている
符号の許容範囲を表す定数で除算した値と、前回カウン
タメモリ130に記憶されている直前の符号のカウント値
とを比較し、前者が後者よりも大きい場合に、読み取っ
た符号が非符号であると判定しており、また、符号読取
終了判定部106は、スタート判定信号が既に供給されて
いるとき、カウンタメモリ120に記憶された2番目以降
の符号のカウント値を定数レジスタ140に設定されてい
る符号の許容範囲を表す定数で除算した値と、前回カウ
ンタメモリ130に記憶されている直前の符号のカウント
値とを比較し、前者が後者よりも大きい場合に、正規の
符号の読み取りを終了したと判定しているもので、これ
ら非符号判定部109及び符号読取終了判定部106により、
スタートスペースまたはストップスペースの状態の判定
を行っているものである。この構成によっても、第3図
及び第4図に示された非符号判定部109及び符号読取終
了判定部106と同様の機能が達成できる。 ここで、本発明における符号読取装置の動作を、第6
図乃至第9図を用いて説明する。 第6図は、本発明の符号読取装置におけるスタート判
定動作の説明図であり、第7図は、第6図のスタート判
定動作の関連波形図である。 第6図において、ラインaはスキャンのスタート位置
がバーコードから十分離れているときのスキャンライン
で、第7図(a)はそのスキャン時の読み取り波形であ
る。この場合、ファーストバー(最初のバー符号)B1の
読み取りの時間に対応するカウンタ値をtA、ファースト
スペース(最初のスペース符号)S1の読み取りの時間に
対応するカウント値をtB、ある定数をAとすると、tB
A×tAになり、バーコードの読み取りがスタート可であ
ると判定される。 また、第6図のラインbに示されるように、スキャン
のスタート位置がバーコードから十分離れていても、そ
の途中に汚れPが存在する場合、第7図(b)に示され
るように、読み取り波形は、汚れPによって疑似の読み
取り信号が得られ、その読み取り信号に対してカウント
値tA1が得られる。この場合、汚れPに続くスペースの
カウント値tB1は、tB1>A×tAとなって、汚れPはバー
コードと見做されない。そして、本来のバーコードにお
けるファーストバー(最初のバー符号)B1のカウント値
tAと、それに続くファーストスペース(最初のスペース
符号)S1のカウント値のtBとの間で、tB<A×tAになる
ので、この時点においてバーコードの読み取りがスター
ト可と判定される。 さらに、第6図のラインcに示されるように、スキャ
ンのスタート位置がバーコードに近いときでも、ファー
ストバー(最初のバー符号)B1のカウント値tAとファー
ストスペース(最初のスペース符号)S1のカウント値の
tBとの間で、tB<A×tAになるので、バーコードの読み
取りがスタート可と判定される。 このように、本実施例においては、バーコードのファ
ーストバー(最初のバー符号)B1のカウント値tAのある
定数A倍の値A×tAよりも、バーコードのファーストス
ペース(最初のスペース符号)S1のカウント値tBが小さ
いときに、バーコードの読み取りがスタートしたと判定
するので、バーコード直前のスペースは短くても済むこ
とになる。そのため、バーコードを高密度化状態で表示
させることが可能になり、しかも、最初のバーコードの
前に位置するスペース部分に汚れPが付着する確率が低
くなって、汚れPに基づく読み取り時の誤動作が起き難
くくなる。この場合、ある定数Aは、既に述べたよう
に、ワイドエレメント/ナローエレメントよりも大きな
値であればよい。 続く、第8図は、本発明の符号読取装置における符号
読取判定動作の説明図であり、第9図は、第8図の符号
読取判定動作の関連波形図である。 第8図において、ラインaはスキャンスピードが遅い
ときのスキャンラインで、第9図(a)はそのスキャン
時の読み取り波形であり、ラインbはスキャンスピード
が速いときのスキャンラインで、第9図(b)はそのス
キャン時の読み取り波形であり、ラインcはスキャンス
ピードが速く、最後のバーコードの後の位置に汚れPが
あるスキャンラインで、第9図(c)はそのスキャン時
の読み取り波形である。 第8図及び第9図(a)乃至(c)において、スキャ
ンによって読み取ったエレメント(符号)のカウント値
がその直前のエレメント(符号)のカウント値(tAまた
はtB)のある定数A倍より大きいときに、バーコードの
読み取り終了と判定し、デコード動作が実行される。 このように、本実施例によれば、バーコードをスキャ
ンする際のスキャンスピードによらずに、ストップマー
ジンに必要なスペースとバーの幅が決まり、ストップマ
ージン幅の小さいバーコードを用いることが可能にな
り、バーコードを高密度化状態で表示することが可能に
なり、最後のバーコードの後の位置に汚れPが付着する
可能性を低くすることができ、汚れPに基づく読み取り
時の誤動作が少なくなる。 この場合においても、ある定数Aは、既に述べたよう
に、ワイドエレメント/ナローエレメントよりも大きい
値であればよく、例えばA=8に選んで実施することが
できる。 〔発明の効果〕 以上のように、請求項1乃至請求項3に記載の各発明
によれば、符号の読み取りの可否を変化検知信号のカウ
ント値を用いて判定するようにしているので、読み取り
可能な符号の仕様、即ち、符号の幅(長さ)やスキャン
スピード(滞留時間)の仕様を決定する場合に、スター
トマージン(スキャンのスタート位置と最初の符号との
間隔)及びストップマージン(最後の符号とスキャンの
終了位置との間隔)を最小限度に選ぶことが可能にな
り、その分、表示される符号の幅を狭めて、表示される
符号を高密度化することが可能になるとともに、読み取
り時の誤りを低減することができるという効果があり、
その上に、正規の符号の読み取りが行われる以前に、無
駄に符号がデコードされないので、次の符号の読み取り
準備に要する時間を必要とないという効果もある。
DETAILED DESCRIPTION OF THE INVENTION [Industrial applications]   The present invention uses a code (for example, bar code) displayed on the medium.
Scanning) with a photoelectric conversion unit, etc.
Decode the information shown into a signal that can be processed by a calculator
The present invention relates to a code reading device for outputting, in particular, a code reading and
The present invention relates to a code reading device that improves the accuracy of decoding.
You. [Conventional technology]   Generally, this type of code reading device is used for documents, surface of articles, etc.
Displayed on various media according to various code systems
The code is photoelectrically converted by a scanner such as an optical reader,
The obtained electrical signal is calculated by a computing device such as a microprocessor.
It is decoded and output so that it can be processed. This
In the case of, the displayed codes are bar code and carla.
There are special display codes such as codes and general characters.
In order to code, the display method has a certain standard.
ing. This standard is a rule regarding display interval and display range.
For example, for barcodes,
Standard [JIS X 0502] (Issued the first printing on April 30, 1987) No.
Items from pages 3 to 9 and American National St.
andard [ANSI: MH10.8M-1983] page 8 etc.
There are things that are. When reading these displays
Is a typical optical reader used as a scanner,
Among them, not only pen type but also self scan
Training hand wand model or stationary model
It may be a different one.   FIG. 10 shows an optical system that is a typical example of a known code reading device.
Circuit of code reading device (hereinafter referred to as bar code reader)
It is a block diagram which shows an example of a structure.   Further, FIGS. 11 to 14 show the known bars shown in FIG.
FIG. 4 is an explanatory diagram illustrating an operating state of the code reader.   In FIG. 10, 101 is a photoelectric conversion unit and 102 is a fast
Space detector, 103 is the first edge detector, 104 is a counter
Part 105, a start margin determination part (start determination
Section), 107 is a decoder section, and 110 is a stop margin determination section.
(Stop determination unit).   In FIG. 10, the photoelectric conversion unit 101 includes photoelectric converters 1 and 2
The photoelectric conversion device 1 is composed of a binarization circuit 2 and an optical converter on the medium.
Two, a space with high emission efficiency and a bar with high light absorption rate
In this state, the signs displayed alternately are detected and the specified voltage level is detected.
The binarization circuit 2 converts the bell electric signal a and outputs it.
Upon receiving the electrical signal a, for example, a white space with high light reflectance
As a low level (hereinafter referred to as "L"),
For example, the black bar with high light absorption is at a high level (hereinafter referred to as “H”
It is converted into the binarized signal b.   The fast space detector 102 includes a switch 3 and a space.
And a binary detector from the photoelectric conversion unit 101.
No. b through the switch 3 and space detector 4 or switch
5 The switch 3 initially applies the reset signal.
Is switched to the space detector 4 side. Photoelectric
The conversion unit 101, as shown in FIG.
Display position when scanning starts from the front of the display position
"L" in the space in front of (first space)
The signal is supplied to the space detector 4. Space detector 4
Is connected to the first counter circuit 8 of the counter unit 104.
The signal c generated by the space detector 4 is changed to the above-mentioned display position.
Is the "L" signal obtained by the space in front of the table
Then, the detection signal e is supplied to the first counter circuit 8. First
The counter circuit 8 is cleared by the supply of the detection signal e.
Start counting the clock signal input after that.
I do.   At this time, the switch 3 is switched to the first position by applying the detection signal e.
Switch to the 1-edge detection unit 103 side to detect the 1st edge
Wait for The first counter circuit 8 detects the detection signal e
Count the number of clock signals during the duration of
The count value of the counter circuit 8 is set in the first constant register 9.
Overflow value (for example, the photoelectric conversion unit 101
When you reach a state where you are stopped on the space)
The overflow comparator 10 outputs a reset signal, and the first counter
The entire circuit including the input circuit 8 is reset.   On the other hand, the count value j of the first counter circuit 8 is
Through 11 the first counter of the start margin determination unit 105
The first margin comparator 14 is supplied to the memory 12, and the first margin comparator 14 will be described later.
The count of the first counter memory 12 when the signal h
The value is compared with the set value of the second constant register 13.   As shown in FIG. 11 a, the first counter circuit 8
Count value j, that is, supplied to the first counter memory 12
Count value of signal line 1M(The space immediately before the barcode
Count time) and set in the second constant register 13.
Start margin time is tSAnd then tM> TS
Then, as shown in Fig. 12 (a), the scanning
It is determined that the card position is far enough from the barcode.
It is.   Also, as shown in Fig. 11b, the start of scanning
Even if the position is far from the barcode, dirt P
If there is such a problem, the dirt P
Count time at tM1, Dirt P to bar code position
Count time at tM2Respectively tSSmaller,
(TM1<TS, TM2<TS), After all it is not possible to judge the start
Judge.   On the other hand, as shown in FIG. 11c, the start of scanning
When the position is close to the barcode, it is shown in Fig. 12 (c).
Scan from the scanning start position to the barcode.
Und time tMIs tM<TSAnd this is also the start format
Judge that it is not possible to determine.   In the case shown in Fig. 11 b and c above, starter
A reset signal is output from the gin determination unit 105 and the bar code
No reading is done.   Here, as shown in FIG. 11a, tM> TSIs
And the detection output e of the space detector 4 is supplied to the switch 3.
Then, the switching device 3 is switched to the switching device 5 side. First edge inspection
The first edge detector 6 of the output unit 103 is arranged in front of the display position.
Photoelectric conversion when reaching the first barcode from pace
Change from "L" to "H" output from section 101 (see FIG. 11)
The change signal f associated with (a point) is detected, and the first change detection signal h
Is output. The change detection signal h indicates that the switch 5 has the second edge.
While switching to the detection unit 7 side, the first of the counter unit 104
Is supplied to the counter circuit 8, and the first counter circuit 8 is
The count of the clock signal is started. In addition, the switch 11
The stop margin is determined by the detection output e of the pace detector 4.
It is switched to the determination unit 110 side. The second edge detector 7
The edge at the end of the first bar code, i.e.
The change from “H” to “L” at the point is detected, and the second change detection
The intelligent signal i is output.   On the other hand, in the first counter circuit 8, the first edge detector 6
Counting starts when the first edge is detected, and
As for the count value, the second edge detector 7 detects the second edge.
At the time (when the signal is output from the signal line i)
Stored in the second counter memory 15 of the margin determination unit 110.
It is. The second counter memory 15 outputs the count value to the signal line o.
To the second change detection signal signal i
From the signal line t through the switch 16 switched by
It is supplied to the coder unit 107. That is, at this point, the 11th
The width of the bar code (bar B1) from point a to point b in the figure
The corresponding count value is supplied to the decoder unit 107.
Become.   Next, the second edge detector 7 operates as shown in FIG.
Change from “H” to “L” at the point and from “L” at the point C in the figure
A change from "H" to "H" is detected sequentially,
The input value is supplied to the decoder unit 107.   Follow the same procedure for each barcode space.
The count value corresponding to the width and the width of the bar is sequentially decoded.
Supplied to 107.   As described above, the start margin determination unit 105 displays
The space in front of the position satisfies the start margin
If you are not satisfied, check the
Output a set signal to start barcode reading.
Absent.   The switching unit 22 detects the first change from the first edge detection unit 103.
When the signal h is supplied, the stop margin determination unit 110
The signal u output from the above is supplied to the decoder unit 107.   In this case, the second constant value of the start margin determination unit 105
The register 13 has a preset constant corresponding to the start margin.
Is set, and the set value n is stored in the first margin comparator 14.
Supplied. The first margin comparator 14 receives the first change detection signal.
When the signal h is input, the operation starts and the first counter
The count value m from the memory 12 and the setting of the second constant register 13 are set.
Outputs a reset signal when comparing m with a fixed value n
The bar code reading operation.
You.   After scanning some barcodes, scan again.
When entering the space, that is, the "H" at the two points in FIG.
At the time of the change from "L" to "L", the first counter circuit 8
Start counting the check signal, and the count value
Stored in the second counter memory 15 of the margin determination unit 110.
It is. The second margin comparator 15 includes a second counter memory 15
Count value tNAnd the 7th constant register 42 is set
The value t corresponding to the stop marginCCompare with   Note that this set value tCIs the bar code reader operator.
Or, set it after considering the fluctuation of the scan speed during operation.
Is a constant that is determined and is shown in a or b of FIG.
When the scan speed is slow or fast
As shown in the waveforms of Figures 14 (a) and (b), tN> TCThat
For example, it is determined that the barcode reading is completed and the
The switching device 22 is switched, and the first comparison from the second margin comparator 15 is performed.
The signal v is supplied to the decoder unit 107, and the decoder unit 107
Command command.   On the other hand, as shown in Figure 13c, stop merge
There is dirt P'on the space reserved as
, TN<TCWhen it becomes, as shown in Fig. 14 (c).
In addition, the dirt P'is mistakenly read as a bar code,
It may cause malfunction. On the other hand, the seventh constant
In the register 42, the constant s corresponding to the stop margin is preset.
Is set, and the set value s is set to the second margin comparator 20.
Supply to a bar or space count value set above
When the value exceeds s, the second margin comparator 15
2 The comparison signal v is supplied to the decoder unit 107 via the switch 22.
Then, a decoding stop instruction is given to the decoder unit 107.   In the above description, the space is white and the bar is black.
The signal levels are set to "L" and "H" respectively.
It is not limited to.   As for the related art of this type,
There is one described in JP-A-60-35707. [Problems to be solved by the invention]   In the above-mentioned conventional technique, the display position of the barcode is
A certain distance with the space in front (from the wide space width
Over a large distance) or over a certain time (wide space)
(The time is greater than the count time of the scan width)
When it is detected, the barcode reading starts and the
The space in front of the bar code display position is
As a service, a certain distance or more or a certain time or more
As a result, when displaying the barcode,
It is difficult to increase the density of bar code display.
However, there is a high possibility that the space will become dirty and
There is a problem that the operation is likely to occur.   Further, in the above-mentioned conventional technique, a bar or a space is used.
If the count value for the
-Decode operation is considered to be the end of code reading.
Since it is controlled to start, the barcode reader
Depending on the scan speed, the space required for the stop margin
As the pace / bar width changes, a faster scan
Wide stop margin width to accommodate high speed
The barcode must be displayed as a result.
When displaying, it is difficult to make the bar code display high density
And, moreover, there is a possibility that the margin will get dirty.
However, there is a problem in that the malfunction is likely to occur due to the increase in the value.   The present invention solves the above-mentioned problems of the prior art,
Its purpose is to enable high density bar code display and
Code reading that reduces the occurrence of malfunctions during signal reading
It is to provide a device. [Means for solving the problem]   In order to achieve the above object, the present invention provides a display on a medium.
Photoelectric conversion unit that reads the generated code and outputs a binary signal
And a change detection signal and a change detection indicating the change of the binary signal
Count that counts the time interval of the signal with the clock signal
The timing part that outputs the signal and the number of times the change detection signal is supplied
Judged as reading the first code when the constant number is reached
And a start determination section that outputs a start determination signal.
Decode count signal by supplying code start signal
The decoder unit to be processed and the start judgment signal are not yet supplied.
Not using the count signal, the second and subsequent marks
Of the sign to the count value of the code and the count value of the code immediately before it.
Compare the size with the value multiplied by the constant that represents the allowable range,
If the count value of the second and subsequent codes is larger, read
It is determined that the detected code is non-code, and
Output a reset signal to return to the state before scanning
The unsigned judgment unit and the start judgment signal have not been supplied yet.
In addition, using the count signal, the second and subsequent codes
Of the sign to the count value of
Compare the size with the value obtained by multiplying the constant that represents the volume range, and
Normal if the count value of the sign after the th is larger
It is judged that the reading of the code of
And a code reading end determination unit that outputs a decoding start signal to
The first means comprises.   Further, in order to achieve the above object, the present invention
Photoelectric that reads the code displayed on the screen and outputs a binary signal
A conversion unit, a change detection signal indicating when the binary signal changes, and a change detection signal.
The time interval of the aging detection signal is counted by the clock signal.
Timing signal output unit and the change detection signal
The first code was read when the number of salaries reached a predetermined number
Start judgment that outputs a start judgment signal
The count signal is supplied by the constant section and the decode start signal.
And the start decision signal
Not supplied yet, and using the count signal, the second
The count value of the code after the eye and the count of the code immediately before it
The ratio with the value is larger than the constant that represents the allowable range of the sign.
If the ratio is larger, the code read
Is determined to be unsigned, and each part in the device is read before reading.
Non-code determination unit that outputs a reset signal to restore the state
And the start judgment signal has already been supplied, and
Count value of the second and subsequent codes using the count signal
And the ratio of the count value of the code immediately before it to the code allowance
Compare whether it is larger than the constant that represents the range, and then use that ratio
If the normal code is read when is large,
To output a decoding start signal to the decoder section.
The second means is provided with a signal reading end determination unit.   Further, in order to achieve the above object, the present invention provides a medium
Light that reads the code displayed above and outputs a binary signal
An electric conversion unit, a change detection signal indicating a change in binary signal, and
The time interval of the change detection signal is counted by the clock signal
Timing unit that outputs a count signal and change detection signal supply
I read the first code when the number of times reached a predetermined number
Start judgment that outputs start judgment signal
Section and the decoding start signal
If the start decision signal is
Not supplied, and using the count signal, the second
Subsequent code count values are constants that represent the allowable range of codes.
The divided value is larger than the count value of the code immediately before it.
If the squid is compared and the divided value is larger, read
It is determined that the code that has been
An unsigned symbol that outputs a reset signal to restore the state before taking
No. judgment unit and start judgment signal have already been supplied,
Moreover, using the count signal, the code of the second and subsequent codes is
The value obtained by dividing the und value by a constant indicating the allowable range of the sign is
Compare if it is greater than the count value of the code immediately before it,
Reads the normal code when the divided value is larger
Is judged to have ended, and the decoding start signal is sent to the decoder section.
Means for outputting a code reading end determination unit
Is provided. [Action]   According to the first means, the start determination unit is
When the number of times the intelligent signal is supplied reaches a predetermined number, the first code is
A start mark indicating that it is possible to start by judging that it has been read
A constant signal is output, and the start judgment signal is
If not supplied yet, use count signal
For the count value of the descending sign and the count value of the preceding sign
The size is compared with the value multiplied by a constant that represents the allowable range of the code.
If the count value of the second and subsequent codes is greater than
Then, it is judged that the read code is non-code and
After resetting, the code reading end determination unit displays the start determination signal.
If the count signal is already supplied, the second signal is used.
Subsequent code count values are constants that represent the allowable range of codes.
The divided value is larger than the count value of the code immediately before it.
Compare the squid, and if the divided value is larger, the regular mark
No. of the count signal
Start decoding.   Further, according to the second means, the start determination unit is
When the number of times the change detection signal is supplied reaches a predetermined number, the first
A star indicating that the code can be read and the start is possible.
Output the start judgment signal and the non-code judgment unit
If the signal is not supplied yet, the count signal is used and 2
Count value of the code after the th and count of the code immediately before it
Value is larger than the constant that represents the allowable range of the code.
Compare the squid and read if the ratio is larger
Reset the inside of the device by determining that the sign is a non-sign,
The code reading end determination unit has already supplied the start determination signal.
If the count signal is detected, the count signal is used
The ratio between the count value and the count value of the code immediately before it is
It is compared whether it is larger than the constant representing the allowable range of the code, and the
If the ratio of is larger, the normal code reading is terminated.
It is judged that the count signal has been completed and the decoding of the count signal is started.
Let   Further, according to the third means, the start determination unit
Is the maximum when the number of times the change detection signal is supplied reaches the specified number.
Judge that the first code has been read and indicate that the start is possible
Outputs the start judgment signal, and the non-code judgment unit starts
If the judgment signal is not yet supplied, use the count signal
The count value of the second and subsequent codes to the allowable range of codes
The value divided by the constant is the count value of the code immediately before it.
If the divided value is greater than
Then, it is judged that the read code is non-code and
After resetting, the code reading end determination unit displays the start determination signal.
If the count signal is already supplied, the second signal is used.
Subsequent code count values are constants that represent the allowable range of codes.
The divided value is larger than the count value of the code immediately before it.
When the squid is compared and the divided value is larger, the normal
It is judged that the reading of the code is completed, and the count signal
Start decoding.   The first to third means are all coded
Readability is judged using the ratio of count values.
Therefore, the specifications of the readable code, that is,
Create specifications for code width (length) and scanning speed (residence time)
The start margin and stop margin
There is no need to set a sufficiently large margin,
With specifications that have a start margin and a stop margin
can do. 〔Example〕   Hereinafter, embodiments of the present invention will be described with reference to the drawings.   FIG. 1 shows an embodiment of a code reading device according to the present invention.
FIG. 3 is a block configuration diagram in which the code reading device is a bar code.
1 illustrates an example of a reading device.   In FIG. 1, 101 is a photoelectric conversion unit, and 106 is a code reading end.
End determination unit, 107 a decoder unit, 108 a start determination unit, 10
Reference numeral 9 is a non-code determination unit, and 111 is a clock unit.   As shown in FIG. 1, the photoelectric conversion unit 101 is a bar code.
Scan and read the high level "H" and low level
It is converted into a binary signal consisting of "L". The timekeeping unit 111 uses the light
Detects the change state of the binary signal supplied from the electrical conversion unit 101
Generate a tabulated detection signal when a change is detected, and
The time interval of the detection signal is counted by the clock signal,
A count signal indicating the count value is generated. Start format
The setting unit 108 supplies the change detection signal supplied from the clock unit 111.
Detects the presence or absence of the first code based on the number of pays and detects it
Occasionally a start judgment signal is generated. The decoder unit 107 is
Decodes the count signal supplied from the clock unit 111
Then, the processing result is output as read data. Unsigned
The determination unit 109 receives the start determination signal from the start determination unit 108.
Is supplied from the timekeeping unit 111 only when there is no supply of
Counting the second and subsequent codes based on the count signal
A constant that represents the allowable code in the count value of the value and the code immediately before it
Compared with the multiplication count value multiplied by, the former count
Reset if value is greater than the latter multiply count value
Generate a signal. The code reading end determination unit 106 starts
Only when the start judgment signal is supplied from the judgment unit 108
Based on the count signal supplied from the timer unit 111
The count value of the current code and the count of the code immediately before it.
Value multiplied by a constant that represents the allowable code
And the count value of the former is the multiplication count value of the latter.
Decode start signal is generated when the
It is supplied to the unit 107 to start decoding.   Next, FIG. 2 shows the detailed structure of this embodiment shown in FIG.
It is a block diagram showing a configuration.   In FIG. 2, 101 is a photoelectric conversion unit, and 102 is fast.
Space detector, 103 is the first edge detector, 104 is a counter
Data, 106 is a code reading end determination unit, 107 is a decoder unit, 10
8 is a start determination unit, 109 is an unsigned determination unit, 111 is a time counting unit
And each of the components 101 and 106 shown in FIG.
Through 109 and 111.   Further, 7 is a second edge detection unit, which is a first space detector.
Source detection unit 102, first edge detection unit 103, counter unit 10
4, the second edge detection unit 7 constitutes the clock unit 111 as a whole.
I have.   Then, the photoelectric conversion unit 101 outputs a code such as a bar code as an optical signal.
The signal is read by the electric converter 1 and the read signal is sent through the signal line a.
Is supplied to the binarization circuit 2 for low level "L" and high level.
Convert to a binary signal consisting of "H" and send the converted binary signal.
First space detection section 1 of clock section 111 via line b
Supply to 02.   In the timekeeping unit 111, the first space detection unit 102
The switch 3 is switched to the 3r side shown by the input of the reset signal.
It has been switched, and it is shown in Fig. 3s by the signal input of signal line e.
Switched to the side. Therefore, the switch 3 is configured so that the signal line b
Is connected to the space detector 4 and the binary signal on the signal line c is scanned.
When indicating a pace (eg "L"), signal
A detection signal is generated on the line e, and the switch 3 is switched to the 3s side.
As a result, the binary value obtained on the signal line b of the photoelectric conversion unit 101
The signal passes through the switch 3 to detect the first edge from the signal line d.
It is supplied to the switch 5 of the unit 103. Switch 5 is reset
Since it is switched to the 5r side by the input of the signal,
The line d is connected to the first edge detector 6 via the signal line f.
You.   The first edge detector 6 outputs the binary signal of the signal line f with a space.
Change from a bar to a bar (eg "L" to "H")
When it does, and generates the first change detection signal on the signal line h
I do. The first change detection signal of the signal line h is supplied to the switcher 5.
Then, the switch 5 is switched to the 5s side, and at the same time, the counter
It is supplied to the first counter circuit 8 of the unit 104. First count
Circuit 8 counts by supplying the first change detection signal.
The value becomes 0, and after that, the clock signal CL
Und operation starts. In this case, the first counter circuit 8
Is not only for inputting the reset signal, but also for the second
Second change detection supplied from the detector 7 via the output line i.
Similarly, the count value becomes 0 by the supply of the intelligence signal,
After that, start counting the clock signal CL, and
Also in this case, the count value is output to the signal line i. First count
The count value output from the output circuit 8 is the overflow ratio.
In the comparator 10, the value set in the first constant register 9 is exceeded.
Count value of the first counter circuit 8 compared with the flow value
Overflows (for example, the scanner is stopped midway)
In case of), overflow comparator 10 is reset
Output a signal.   The second edge detector 7 switches the switch 3 to the 3s side and
Corresponding to the switching of the switch 5 to the 5s side, the photoelectric conversion unit 101
A binary signal is supplied, and the first change detection signal of the signal line h
Change from bar to space (“H” to “L”)
And change from space to bar (from "L"
"H") is detected respectively, and the second change detection signal is detected at the time of detection.
It occurs on the signal line i. The second change detection signal is the first count
Of the start determination unit 108
It is supplied to the second counter circuit 28.   The start determination unit 108 is based on the second change detection signal.
The rising edge of the first element (first code)
First element that is continuously supplied after detection
(First code) Falling element and subsequent elements (code
No.) change and the count value is the fourth constant.
When the number preset in the number register 29 is reached,
Generate a start judgment signal on Line C
Counting the number of spaces and bars to do
).   The second counter circuit 28 uses the second change detection signal of the signal line i.
The counter is sequentially incremented by the application of
Send the count value to line a. The second counter
The circuit 28 has a counter value of 0 when the reset signal is input.
Will be cleared. The fourth constant register 29
Indicates the number of elements (2 or more) used for start judgment
Is set in advance, and the set value
It is supplied to the first margin comparator 30 via. First merge
The comparator 30 sets the count value of signal line A and the setting of signal line A.
Compared with the value, the count value is set in the fourth constant register 29
If it exceeds the value, the start judgment signal is output to the signal line c.
I do.   The switch 31 is a second change detection signal of the second edge detector 7.
To the switch 39 and the switch 32 of the non-code determination unit 109,
Is one of the switching unit 21 and the switching unit 16 of the code reading determination unit 106.
Supply to somebody. Switching of the switching device 31 is performed with a reset signal.
Performed by the start determination signal of the start determination unit 108
It is. The switch 31 is on the 31r side when a reset signal is applied.
And the second change detection signal is applied from the signal line i.
Then it is switched to the 31s side.   The switching unit 11 applies the reset signal and the first edge detector.
It is switched by the application of the first change detection signal from 6,
When the first change detection signal is applied, the counter of the first counter circuit 8 is
The count value is stored in the first counter memory 12 and the second counter memo.
Supply to Ri 15.   The non-code determination unit 109 determines at least the first bar and the space.
Compare the count values of the cells and their elements (sign)
The counter value of (the count value of the first counter memory 12) is
Counter value of the immediately preceding element (code) (second previous count)
Constant value (count value stored in input memory 35)
6 Contents of the constant register 36) Reset when it exceeds
The signal is sent to the signal line service. That is, when determining the start
At least first without looking at the start margin
I made a comparison of the count values of the bar and space of
As you can see, it is not a legitimate element (code) reading
When it is determined that the reset signal is output.   In this case, the first counter memory 12 is
Stores the count value and sends this count value to the signal line m
I do. Then, it is stored by applying the reset signal.
The count value is reset.   The fifth constant register 33 is (wide element / slow).
(Scan speed) A preset count value greater than
The set value is output to the signal line output. Switch 34
When the reset signal is input,
Is connected to and the count value of the fifth constant register 33 is set to the second value.
It is supplied to the counter memory 35 last time and stored there. No.
2 The previous counter memory 35 signals the stored count value.
The second multiplier 37 is supplied to the second multiplier 37 via the line
The count value of the first previous counter memory 35 and the sixth constant number
Wide element / narrowe set in Dista 35
Multiply with a value larger than the element. The product output is
It is supplied to the third margin comparator 38 via the signal line U.   The third margin comparator 38 uses the first count from the signal line m.
The count value of the memory 12 and the multiplication output of the second multiplier 37
In comparison, if the former exceeds the latter 3, the signal line
Output a signal.   The switching device 40 receives a signal (i) when a reset signal is input.
Connect the signal line service and the reset output line to obtain the signal line service.
The signal is output as a reset signal. Also, (ii) signal
When the start judgment signal is input from the line
Separate from the reset output line and reset to the reset output line
No signal is output.   The switching unit 32 of the non-code determination unit 109 changes from the signal line D to the second change.
Signal line m and signal line key only when the signal
And the counter stored in the first counter memory 12
Value is supplied to the second previous count memory 35 to detect the second change.
When no intelligent signal is input, disconnect the signal line m from the signal line key
You.   The switch 39 receives the second change detection signal from the signal line D.
Signal line m and signal line t only when
The count value of the unter memory 12 is supplied to the decoder unit 107.
You.   The switch 21 and the switch 39 are disconnected from the second edge detector 7.
It is turned off by the second change detection signal supplied via the relay 31.
The switching device 39 can be replaced by the
1 Element stored in counter memory 12
No.) count value, and the switch 21
Therefore, as described later, it is stored in the second counter memory 15.
The count value of each element (sign)
And sends it to the decoder unit 107.   The switch 27 receives the start judgment signal from the signal line c.
Only when it is hit, that is, the star from the start determination unit 108
It is switched according to the power judgment signal.
The first value of the code reading determination unit 109
Supplied to the counter memory 17 last time. In this case, the signal line m
The count value of
It is the counter value used for the determination of the element.   In addition, the code reading end determination unit 106 determines that the currently read code is
Element count value, that is, in the second counter memory 15
The stored count value is the count of the previous element.
Value, that is, the value stored in the first previous counter memory 17
A constant with a count value (setting of the third constant register 18
Value) times the output signal is sent to the signal line u
You. The second counter memory 15 is supplied from the signal line 1.
The count value of the first counter circuit 8 of the counter unit 104 is recorded.
The stored count value is sent to the signal line o. switching
The device 16 detects the second edge via the switch 31 and the signal line E.
Only when the second change detection signal from the instrument 7 is input
The signal line o and the signal line p are connected, and the second counter memory 15
The count value is supplied to the first previous counter memory 17. No.
1 The previous counter memory 17 has the counter voltage applied from the signal line p.
Memorize the count value and store the stored count value via the signal line q.
And supplies it to the first multiplier 19. The third constant register 18 is
From wide / narrow element of barcode
A large constant is set in advance, and this set value is the signal line.
It is supplied to the first multiplier 19 via r. First multiplier 19
Is the count value stored in the first previous counter memory 17
And the setting value of the third constant register 18 are multiplied, and the multiplication output is
The signal is supplied to the second margin comparator 20 via the signal line s.   The second margin comparator 20 is input via the signal line o.
The second counter memory 15 count value and the first multiplier 19
Compare with the multiplication output, and if the former value exceeds the latter value
Then, the output signal is sent to the signal line u.   When the reset signal is input, the switch 22 receives the signal line u.
And signal line v are separated, and start determination is made via signal line c.
When the start determination signal is applied from the unit 108, the signal line u
And the signal line v are connected. Therefore, the start determination unit 10
Read the code from the time when the start judgment signal from 8 is input.
Start decoding the output signal of the determination unit 106 to the decoder unit 107
It is supplied as a signal and the decoder operation in the decoder unit 107 is performed.
Start the work.   The decoder unit 107 displays the element of the read barcode.
Based on the count value of the clock signal CL corresponding to the
To decode the meaning of the bar code.
Yes, for example, with the configuration shown in FIG.
I have.   Functions of each component block in the decoder unit 107
Is like this:   The bit image converter 23 uses the second edge from the signal line i.
It operates by supplying the second change detection signal of the detector 7;
Count value input from signal line t into bit image
It is converted and recorded in the bit image memory 24 via the signal line w.
Remember If an error occurs during this conversion, reset
Output signal.   The bit image memory 24 is applied from (i) the signal line w.
Stored bit image, (ii) from signal line v
Depending on the decoding start signal applied, the stored
Image to the character converter 25 via signal line x
Send, (iii) When reset signal is input, store
Such as clearing the existing bit image
Perform the operation.   The character converter 25 uses the bit image memory 24
Converts the applied bit image to a character, which
Is supplied to the output circuit 26 via the signal line Y. In addition,
Reset signal if an error occurs during lactate conversion
Is output.   Then, the output circuit 26 is a character applied from the signal line Y.
To a display means (not shown) by sending the output signal to the output line z.
Supply. When the transmission of this character signal is completed,
Output a set signal.   Next, FIG. 3 shows a non-code determination unit used in the present invention.
A first embodiment of the configurations of 109 and code reading end determination unit 106 is shown.
It is a block configuration diagram.   In FIG. 3, 120 is a counter memory (non-code judgment
First counter memory 12 of unit 109, code reading end determination unit 106
(Corresponding to the second counter memory 15) of the
Memory (second previous counter memo of unsigned determination unit 109)
35, first previous counter memo of code reading end determination unit 106
(Corresponding to 17), 140 is a constant register (non-sign determination unit 1
The sixth constant register 36 of 09, the code reading end determination unit 106
3 corresponds to register 18), 150 is a multiplier (unsigned)
The second multiplier 37 of the judging unit 109 and the second multiplier 37 of the code reading end judging unit 106
1 corresponds to the multiplier 19), 160 is a comparator (non-code determination unit 1
09 third margin comparator 38, code reading end determination unit 106
This corresponds to the second margin comparator 20).   The non-code determination unit 109 and the code read end determination with the above configuration
According to the configuration of the constant unit 106, the start margin and the stop
To read the barcode to judge the margin
The current element (code) coun
Value and the count value of the previous element (sign)
It is compared with the value multiplied by a constant. And unsigned decision
When the start judgment signal is not yet supplied, the unit 109
, The second and subsequent codes stored in the counter memory 120
The count value of the
Set to the constant register 140 to the count value of the code immediately before
Is multiplied by a constant that represents the allowable range of the sign
Compare, if the former is greater than the latter, the code read
Is determined to be non-coded, and the code read end
The setting unit 106 has already supplied the start determination signal,
The code of the second and subsequent codes stored in the counter memory 120.
Unt value and the value previously stored in the counter memory 130
The count value of the immediately preceding sign is set in the constant register 140.
Compare with the value multiplied by a constant that represents the allowable range of the sign
However, if the former is larger than the latter, the legitimate code is read.
It is determined that the
The start space is determined by the unit 109 and the code reading end determination unit 106.
The status of the start or stop space.
Things.   Further, FIG. 4 shows the non-code determination unit 10 used in the present invention.
9 shows a second embodiment of the configuration of 9 and code reading end determination unit 106
It is a block block diagram.   In FIG. 4, 170 is a divider,
Same as components shown in Fig. 3 Same as components
It is marked.   In the example shown in FIG. 4, the counter memory 120
The count value of is a constant set in the constant register 140.
The divided value and the previous count value of the counter memory 130
Are comparing. Then, the non-code determination unit 109
Counter memory when the judgment signal is not supplied yet.
The count value of the second and subsequent codes stored in 120 and the previous time
The counter of the previous code stored in the counter memory 130
The ratio with the input value is set in the constant register 140.
Compared with the constant that represents the allowable range of the sign, the former is more than the latter
If it is large, it is judged that the read code is non-code.
In addition, the code reading end determination unit 106
When the constant signal is already supplied, the counter memory 120
The count value of the second and subsequent codes stored in
Counter of the previous code stored in the input memory 130
Sign of the ratio with the value set in the constant register 140
The former is greater than the latter than the constant that represents the allowable range of
If it is not, it is judged that the reading of the legitimate code is completed.
The non-code determination unit 109 and the code read end determination
Depending on the fixed part 106, the start space or stop space
The state of the source is determined. In this configuration
Therefore, the non-code determination unit 109 and the code shown in FIG.
A function similar to that of the read end determination unit 106 can be achieved.   Further, FIG. 5 shows a non-code determination unit used in the present invention.
A third embodiment of the configurations of 109 and the code reading end determination unit 106 is shown.
It is a block configuration diagram.   In FIG. 5, the same structure as the components shown in FIG. 4 is used.
The same symbols are attached to the components.   In the example shown in FIG. 5, the counter memory 120
Of the count value of the previous counter memory 130
The value divided by the divider 170 and set in the constant register 140
The comparator 160 compares it with a constant. And unsigned
The start determination signal is not yet supplied to the signal determination unit 109.
Sometimes, the second and subsequent ones stored in the counter memory 120
The sign count value is set in the constant register 140
The value obtained by dividing by the constant indicating the allowable range of the sign and the previous count
Count value of the immediately preceding code stored in the data memory 130
And compare if the former is larger than the latter, read
Code is judged to be non-code, and the code is read.
The end determination unit 106 has already supplied the start determination signal.
2nd and later stored in the counter memory 120 when
The count value of the sign of is set in the constant register 140
Value divided by a constant that represents the allowable range of the sign
Counter of the previous code stored in the input memory 130
Value, and if the former is greater than the latter, the
It is judged that the reading of the code is completed.
From the non-code determination unit 109 and the code reading end determination unit 106,
Determining start space or stop space status
Is what you are doing. Even with this configuration, FIG.
And the non-code determination unit 109 and the code reading end shown in FIG.
A function similar to that of the end determination unit 106 can be achieved.   Here, the operation of the code reading device in the present invention will be described in the sixth
This will be described with reference to FIGS.   FIG. 6 shows the start code in the code reading device of the present invention.
FIG. 7 is an explanatory view of the constant operation, and FIG. 7 is a start judgment of FIG.
It is a related waveform diagram of constant operation.   In FIG. 6, line a is the scan start position.
Scan line when is far enough from the barcode
Then, FIG. 7 (a) is a read waveform at the time of the scan.
You. In this case, the first bar (first bar code) B1
The counter value corresponding to the reading time is tA,first
At the time of reading space (first space code) S1
The corresponding count value is tB, Where A is a constant, tB<
A × tAAnd the barcode can be read.
Is determined.   Also, as shown in line b in FIG. 6, the scan
Even if the start position of the
If dirt P exists in the middle of the process, it is shown in Fig. 7 (b).
As shown, the read waveform is a false read due to the dirt P.
Taken signal is obtained and counted against the read signal
Value tA1Is obtained. In this case, the space following the dirt P
Count value tB1Is tB1> A × tASo the dirt P is a bar
Not considered a code. And the original barcode
Count value of first bar (first bar code) B1
tAFollowed by the first space (the first space
Code) t of the count value of S1BBetween and tB<A × tAbecome
Therefore, at this point, the bar code reading
It is judged to be acceptable.   Furthermore, as shown in line c in FIG.
Even if the start position of the
Stbar (first bar code) B1 count value tAAnd fur
Of space count (first space code) S1
tBBetween and tB<A × tARead the barcode.
It is determined that the tori can be started.   In this way, in this embodiment, the barcode
The count value t of the first bar code (first bar code) B1AWith
Value of A times A × tAThan the barcode fasts
Count value of pace (first space code) S1BIs small
When it is determined that the barcode reading has started
Therefore, the space just before the barcode can be short.
And Therefore, the barcode is displayed in a high-density state.
Of the first bar code
The probability that dirt P will adhere to the space located in front is low.
It becomes difficult to cause malfunctions when reading due to dirt P
It gets harder. In this case, some constant A is as described above.
And larger than wide element / narrow element
Any value will do.   Next, FIG. 8 shows a code in the code reading device of the present invention.
FIG. 9 is an explanatory diagram of a read determination operation, and FIG. 9 is a symbol of FIG.
It is a related waveform diagram of a read determination operation.   In FIG. 8, line a has a slow scan speed.
The scan line at that time is shown in FIG. 9 (a).
Waveform read at time, line b is scan speed
Figure 9 (b) shows the scan line when scanning is fast.
This is the read waveform during scanning, and line c is the scan scan
The speed is fast and there is dirt P at the position after the last barcode.
Figure 9 (c) shows a scan line at the time of the scan
Is a read waveform of.   In FIGS. 8 and 9 (a) to (c), the scan
Count value of the element (code) read by the
Is the count value (tAAlso
Is tB) Is larger than a certain constant A times,
It is determined that the reading is completed, and the decoding operation is executed.   Thus, according to this embodiment, the barcode is scanned.
Regardless of the scan speed when scanning
The space required for the gin and the width of the bar are determined, and the stop
It is now possible to use barcodes with a small width
Enabled to display barcodes in high density
And the dirt P adheres to the position after the last barcode.
Readability based on dirt P that can reduce the possibility
Malfunctions at times are reduced.   Even in this case, a constant A is as described above.
And larger than wide element / narrow element
Any value can be used, for example, A = 8 can be selected and implemented.
it can. 〔The invention's effect〕   As described above, the respective inventions according to claim 1 to claim 3
According to the above, whether or not the code can be read is checked by the change detection signal.
Since the judgment is made using the
Possible code specifications, ie code width (length) and scan
When determining the specifications of speed (residence time),
Margin (scan start position and first sign
Interval) and stop margin (of the last code and scan)
It becomes possible to select the minimum distance between the end position)
Therefore, the width of the displayed code is narrowed by that amount and the code is displayed.
Codes can be densified and read
There is an effect that it is possible to reduce mistakes at the time of
On top of that, there is no
The next code is read because the code is not decoded.
There is also an effect that the time required for preparation is unnecessary.

【図面の簡単な説明】 第1図は本発明による符号読取装置の一実施例を示すブ
ロック構成図、第2図は第1図に示した本実施例の詳細
な構成を示すブロック構成図、第3図は本発明に用いら
れる非符号判定部及び符号読取終了判定部の構成の第1
実施例を示すブロック構成図、第4図は本発明に用いら
れる非符号判定部及び符号読取終了判定部の構成の第2
実施例を示すブロック構成図、第5図は本発明に用いら
れる非符号判定部及び符号読取終了判定部の構成の第3
実施例を示すブロック構成図、第6図は本発明の符号読
取装置におけるスタート判定動作の説明図、第7図は第
6図のスタート判定動作の関連波形図、第8図は本発明
の符号読取装置における符号読取判定動作の説明図、第
9図は第8図の符号読取判定動作の関連波形図、第10図
は既知の符号読取装置であるバーコードリーダのブロッ
ク構成図、第11図と第12図は第10図に示したバーコード
リーダのスタート判定動作の説明図、第13図と第14図は
第10図に示したバーコードリーダの符号読取判定動作の
説明図である。 101……光電変換部、104……カウンタ部、106……符号
読取終了判定部、107……デコーダ部、108……スタート
判定部、109……非符号判定部。
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block configuration diagram showing an embodiment of a code reading device according to the present invention, and FIG. 2 is a block configuration diagram showing a detailed configuration of the embodiment shown in FIG. FIG. 3 is a first diagram of the configurations of the non-code determination unit and the code reading end determination unit used in the present invention.
FIG. 4 is a block configuration diagram showing an embodiment, and FIG. 4 is a second configuration of a non-code determination unit and a code reading end determination unit used in the present invention.
FIG. 5 is a block configuration diagram showing an embodiment, and FIG. 5 is a third configuration of a non-code determination unit and a code reading end determination unit used in the present invention.
FIG. 6 is a block diagram showing an embodiment, FIG. 6 is an explanatory diagram of a start judgment operation in the code reading apparatus of the present invention, FIG. 7 is a waveform diagram related to the start judgment operation of FIG. 6, and FIG. FIG. 9 is an explanatory diagram of the code reading determination operation in the reading device, FIG. 9 is a waveform diagram relating to the code reading determination operation of FIG. 8, and FIG. 10 is a block configuration diagram of a bar code reader which is a known code reading device. 12 and FIG. 12 are explanatory diagrams of the start determination operation of the bar code reader shown in FIG. 10, and FIGS. 13 and 14 are explanatory diagrams of the code reading determination operation of the bar code reader shown in FIG. 101 ... Photoelectric conversion section, 104 ... Counter section, 106 ... Code reading end determination section, 107 ... Decoder section, 108 ... Start determination section, 109 ... Non-code determination section.

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 昭57−6977(JP,A) 特開 昭58−3073(JP,A) 特開 昭58−221467(JP,A)   ────────────────────────────────────────────────── ─── Continuation of front page    (56) References JP-A-57-6977 (JP, A)                 JP 58-3073 (JP, A)                 JP-A-58-221467 (JP, A)

Claims (1)

(57)【特許請求の範囲】 1.媒体上に表示された符号を読み取り、2値信号を出
力する光電変換部と、前記2値信号の変化時を表す変化
検知信号及び前記変化検知信号の時間間隔をクロック信
号でカウントしたカウント信号を出力する計時部と、前
記変化検知信号の供給回数が所定数に達したときに最初
の符号を読み取ったものと判定してスタート判定信号を
出力するスタート判定部と、デコード開始信号の供給に
よって前記カウント信号をデコード処理するデコーダ部
と、前記スタート判定信号が未だ供給されず、しかも、
前記カウント信号を用いて、2番目以降の符号のカウン
ト値とその直前の符号のカウント値に符号の許容範囲を
表す定数を乗算した値との大きさを比較し、前記2番目
以降の符号のカウント値の方が大きい場合に、読み取っ
た符号が非符号であると判定し、装置内の各部を読み取
り前の状態に復帰させるリセット信号を出力する非符号
判定部と、前記スタート判定信号が既に供給されてお
り、しかも、前記カウント信号を用いて、前記2番目以
降の符号のカウント値とその直前の符号のカウント値に
符号の許容範囲を表す定数を乗算した値との大きさを比
較し、前記2番目以降の符号のカウント値の方が大きい
場合に、正規の符号の読み取りを終了したものと判定
し、前記デコーダ部に前記デコード開始信号を出力する
符号読取終了判定部とを備えることを特徴とする符号読
取装置。 2.媒体上に表示された符号を読み取り、2値信号を出
力する光電変換部と、前記2値信号の変化時を表す変化
検知信号及び前記変化検知信号の時間間隔をクロック信
号でカウントしたカウント信号を出力する計時部と、前
記変化検知信号の供給回数が所定数に達したときに最初
の符号を読み取ったものと判定してスタート判定信号を
出力するスタート判定部と、デコード開始信号の供給に
よって前記カウント信号をデコード処理するデコーダ部
と、前記スタート判定信号が未だ供給されず、しかも、
前記カウント信号を用いて、2番目以降の符号のカウン
ト値とその直前の符号のカウント値との比率が、符号の
許容範囲を表す常数よりも大きいかを比較し、前記比率
の方が大きい場合に、読み取った符号が非符号であると
判定し、装置内の各部を読み取り前の状態に復帰させる
リセット信号を出力する非符号判定部と、前記スタート
判定信号が既に供給されており、しかも、前記カウント
信号を用いて、2番目以降の符号のカウント値とその直
前の符号のカウント値との比率が、符号の許容範囲を表
す常数よりも大きいかを比較し、前記比率の方が大きい
場合に、正規の符号の読み取りを終了したものと判定
し、前記デコーダ部に前記デコード開始信号を出力する
符号読取終了判定部とを備えることを特徴とする符号読
取装置。 3.媒体上に表示された符号を読み取り、2値信号を出
力する光電変換部と、前記2値信号の変化時を表す変化
検知信号及び前記変化検知信号の時間間隔をクロック信
号でカウントしたカウント信号を出力する計時部と、前
記変化検知信号の供給回数が所定数に達したときに最初
の符号を読み取ったものと判定してスタート判定信号を
出力するスタート判定部と、デコード開始信号の供給に
よって前記カウント信号をデコード処理するデコーダ部
と、前記スタート判定信号が未だ供給されず、しかも、
前記カウント信号を用いて、2番目以降の符号のカウン
ト値を符号の許容範囲を表す定数で除算した値が、その
直前の符号のカウント値よりも大きいかを比較し、前記
除算した値の方が大きい場合に、読み取った符号が非符
号であると判定し、装置内の各部を読み取り前の状態に
復帰させるリセット信号を出力する非符号判定部と、前
記スタート判定信号が既に供給されており、しかも、前
記カウント信号を用いて、2番目以降の符号のカウント
値を符号の許容範囲を表す定数で除算した値が、その直
前の符号のカウント値よりも大きいかを比較し、前記除
算した値の方が大きい場合に、正規の符号の読み取りを
終了したものと判定し、前記デコーダ部に前記デコード
開始信号を出力する符号読取終了判定部とを備えること
を特徴とする符号読取装置。
(57) [Claims] A photoelectric conversion unit that reads the code displayed on the medium and outputs a binary signal, a change detection signal that represents the time when the binary signal changes, and a count signal that counts the time interval of the change detection signal with a clock signal. A time measuring unit for outputting, a start judging unit for judging that the first code is read when the number of times of supplying the change detection signal reaches a predetermined number and outputting a start judging signal, A decoder unit that decodes the count signal, and the start determination signal has not been supplied yet, and
Using the count signal, the magnitudes of the count value of the second and subsequent codes and the value obtained by multiplying the count value of the immediately preceding code by a constant indicating the allowable range of the code are compared, and the magnitudes of the second and subsequent codes are compared. When the count value is larger, the read code is determined to be non-code, and the non-code determination section that outputs a reset signal that returns each unit in the apparatus to the state before reading and the start determination signal have already been output. The count signal is supplied and the magnitudes of the count value of the second and subsequent codes and the count value of the code immediately before that are multiplied by a constant representing the allowable range of the code are compared. If the count value of the second and subsequent codes is larger, it is determined that the reading of the regular code is completed, and the code read end determination unit that outputs the decoding start signal to the decoder unit. Code reading device, characterized in that it comprises. 2. A photoelectric conversion unit that reads the code displayed on the medium and outputs a binary signal, a change detection signal that represents the time when the binary signal changes, and a count signal that counts the time interval of the change detection signal with a clock signal. A time measuring unit for outputting, a start judging unit for judging that the first code is read when the number of times of supplying the change detection signal reaches a predetermined number and outputting a start judging signal, A decoder unit that decodes the count signal, and the start determination signal has not been supplied yet, and
If the ratio between the count value of the second and subsequent codes and the count value of the immediately preceding code is greater than a constant representing the allowable range of the code using the count signal, and if the ratio is greater In, the read code is determined to be non-code, a non-code determination unit that outputs a reset signal for returning each unit in the apparatus to the state before reading, and the start determination signal has already been supplied, and, If the ratio between the count value of the second and subsequent codes and the count value of the immediately preceding code is greater than a constant representing the allowable range of the code using the count signal, and if the ratio is greater The code reading device further comprises: a code reading end determining unit that determines that the reading of the regular code is completed and outputs the decoding start signal to the decoder unit. 3. A photoelectric conversion unit that reads the code displayed on the medium and outputs a binary signal, a change detection signal that represents the time when the binary signal changes, and a count signal that counts the time interval of the change detection signal with a clock signal. A time measuring unit for outputting, a start judging unit for judging that the first code is read when the number of times of supplying the change detection signal reaches a predetermined number and outputting a start judging signal, A decoder unit that decodes the count signal, and the start determination signal has not been supplied yet, and
Using the count signal, it is compared whether the value obtained by dividing the count value of the second or subsequent code by a constant representing the allowable range of the code is greater than the count value of the code immediately before, and the value obtained by the division. Is large, the read code is determined to be non-code, and a non-code determination section that outputs a reset signal that restores each unit in the apparatus to the state before reading, and the start determination signal have already been supplied. Moreover, by using the count signal, it is compared whether the value obtained by dividing the count value of the second and subsequent codes by a constant representing the allowable range of the code is greater than the count value of the code immediately before that, and performing the division. When the value is larger, it is determined that the reading of the regular code is completed, and a code reading end determination unit that outputs the decoding start signal to the decoder unit is provided. Winding device.
JP62300112A 1987-10-30 1987-11-30 Code reader Expired - Fee Related JP2677805B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP62300112A JP2677805B2 (en) 1987-11-30 1987-11-30 Code reader
US07/208,182 US4859840A (en) 1987-10-30 1988-06-16 Code reading apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62300112A JP2677805B2 (en) 1987-11-30 1987-11-30 Code reader

Publications (2)

Publication Number Publication Date
JPH01142888A JPH01142888A (en) 1989-06-05
JP2677805B2 true JP2677805B2 (en) 1997-11-17

Family

ID=17880865

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62300112A Expired - Fee Related JP2677805B2 (en) 1987-10-30 1987-11-30 Code reader

Country Status (1)

Country Link
JP (1) JP2677805B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03144786A (en) * 1989-10-30 1991-06-20 Casio Comput Co Ltd Bar code detector
JPH03144787A (en) * 1989-10-30 1991-06-20 Casio Comput Co Ltd Bar code detector

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS576977A (en) * 1980-06-13 1982-01-13 Fujitsu Ltd Bar code reading system
JPS583073A (en) * 1981-06-30 1983-01-08 Fujitsu Ltd Bar-code read system
JPS58221467A (en) * 1982-06-16 1983-12-23 Fujitsu Kiden Ltd Bar code reading system

Also Published As

Publication number Publication date
JPH01142888A (en) 1989-06-05

Similar Documents

Publication Publication Date Title
US5128527A (en) Apparatus for reading a bar code
JP2616921B2 (en) Label identification device
US4021777A (en) Character reading techniques
US3891831A (en) Code recognition apparatus
US5194722A (en) Enhanced UPC bar code decoding system reconstructing complete bar code signals from partial bar code scans
US4667089A (en) Bar code discriminating apparatus for bar code reading
US5276316A (en) Method for reconstructing complete bar code signals from partial bar code scans
JPH07101437B2 (en) Code reader
JPH0354388B2 (en)
CA2044935C (en) Bar-code reading apparatus
US3778597A (en) Record reading system
US3820067A (en) Character reading system controlled by preprinted program control characters on document form
USRE29104E (en) Method of scanning documents to read characters thereon without interference from visible marks on the document which are not to be read by the scanner
JP2677805B2 (en) Code reader
EP0029454B1 (en) Bar code symbol decoding system
US6547143B2 (en) Bar-code reader and bar-code reading method providing display and correction of questionable characters
JP2677806B2 (en) Code reader
US4108368A (en) Coded record and method of and system for interpreting the record
JPH01116777A (en) Final display deciding circuit
JP2742140B2 (en) Optical reader
CA1070837A (en) Coded record and method of and system for interpreting the record
JPH01200490A (en) Code reader
JPH01206478A (en) Code reader
CA1078061A (en) Multiple code sensing optical reader
CA1198218A (en) Process and apparatus for reading contrasting indicia

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees