JPH04268680A - Optical reader - Google Patents
Optical readerInfo
- Publication number
- JPH04268680A JPH04268680A JP3048586A JP4858691A JPH04268680A JP H04268680 A JPH04268680 A JP H04268680A JP 3048586 A JP3048586 A JP 3048586A JP 4858691 A JP4858691 A JP 4858691A JP H04268680 A JPH04268680 A JP H04268680A
- Authority
- JP
- Japan
- Prior art keywords
- signal
- pulse width
- line sensor
- level
- pulse
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 230000003287 optical effect Effects 0.000 title claims abstract description 22
- 238000001514 detection method Methods 0.000 claims abstract description 48
- 230000001965 increasing effect Effects 0.000 claims abstract description 13
- 238000009825 accumulation Methods 0.000 claims description 18
- 230000007423 decrease Effects 0.000 claims description 9
- 238000003079 width control Methods 0.000 claims description 4
- 230000007274 generation of a signal involved in cell-cell signaling Effects 0.000 claims 1
- 230000035945 sensitivity Effects 0.000 abstract description 6
- 230000003247 decreasing effect Effects 0.000 abstract description 3
- 238000004904 shortening Methods 0.000 abstract 1
- 230000015654 memory Effects 0.000 description 69
- 238000010586 diagram Methods 0.000 description 23
- 238000006243 chemical reaction Methods 0.000 description 22
- 230000008859 change Effects 0.000 description 11
- 239000003990 capacitor Substances 0.000 description 8
- 238000003708 edge detection Methods 0.000 description 7
- 230000000630 rising effect Effects 0.000 description 5
- 238000005286 illumination Methods 0.000 description 4
- 230000010355 oscillation Effects 0.000 description 4
- 238000005070 sampling Methods 0.000 description 3
- 229920006395 saturated elastomer Polymers 0.000 description 3
- 101150033269 ESRRG gene Proteins 0.000 description 2
- 102100031855 Estrogen-related receptor gamma Human genes 0.000 description 2
- 101000851696 Homo sapiens Steroid hormone receptor ERR2 Proteins 0.000 description 2
- 101100333774 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) ERR3 gene Proteins 0.000 description 2
- 102100036831 Steroid hormone receptor ERR2 Human genes 0.000 description 2
- 238000013459 approach Methods 0.000 description 2
- 238000012634 optical imaging Methods 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 238000010408 sweeping Methods 0.000 description 2
- 108010032363 ERRalpha estrogen-related receptor Proteins 0.000 description 1
- 102100036832 Steroid hormone receptor ERR1 Human genes 0.000 description 1
- 239000000428 dust Substances 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000000034 method Methods 0.000 description 1
- 230000008569 process Effects 0.000 description 1
Abstract
Description
【0001】0001
【産業上の利用分野】本発明は、媒体上へ光学的に記録
された表示からの光を受光して蓄積電荷量に変換するラ
インセンサで複数回の読取走査を行なう光学読取装置に
係わり、特に受光感度の制御を早期に適正化する様に改
良された光学読取装置に関する。[Field of Industrial Application] The present invention relates to an optical reading device that performs multiple reading scans using a line sensor that receives light from a display optically recorded on a medium and converts it into an accumulated charge amount. In particular, the present invention relates to an optical reading device that has been improved to quickly optimize control of light receiving sensitivity.
【0002】0002
【従来の技術】バーコードラベルなどに付されたバーコ
ードを読み取るためのタツチ式バーコードスキヤナと称
する光学読取装置においては、CCDセンサやCMOS
センサなどのラインセンサが用いられ、ラインセンサが
バーコードを走査することによつてバーコードのバーが
走査されたときにレベルが変動するアナログ信号が得ら
れる。このアナログ信号は、二値化回路で2値化された
後、デコーダに供給されてバーコードが認識される。[Prior Art] In an optical reading device called a touch-type barcode scanner for reading barcodes attached to barcode labels, CCD sensors and CMOS
A line sensor such as a sensor is used, and the line sensor scans the barcode to obtain an analog signal whose level changes when the bar of the barcode is scanned. This analog signal is binarized by a binarization circuit and then supplied to a decoder to recognize the barcode.
【0003】図9は従来のタツチ式バーコードスキヤナ
の一例の基本構成を示すブロツク図であつて、300は
ラインセンサ、301はラインセンサ300の出力信号
を2値化する上記の二値化回路、302は二値化回路3
01の出力信号をデコードしてバーコードを認識する上
記のデコーダであり、303はクロツク発生器、304
はm/n進カウンタである。FIG. 9 is a block diagram showing the basic configuration of an example of a conventional touch-type barcode scanner, in which 300 is a line sensor, and 301 is the above-mentioned binarization unit that binarizes the output signal of the line sensor 300. circuit, 302 is a binarization circuit 3
303 is a clock generator, 304 is the above-mentioned decoder that decodes the output signal of
is an m/n-ary counter.
【0004】同図において、クロツク発生器303は所
定周波数のクロツクφ1を発生している。このクロツク
φ1はラインセンサ300に供給されるとともに、m/
n進カウンタ304に供給される。このm/n進カウン
タ304は分周器として機能し、クロツクφ1の周期を
tφとすると、図10に示すように、クロツクφ1のn
周期(すなわち、ntφの期間)毎にこのクロツクφ1
のm周期分(すなわち、mtφ)のパルス幅のスタート
パルスSTを発生する。但し、n,mは正整数であつて
、n>mである。このスタートパルスSTもラインセン
サ300に供給される。In the figure, a clock generator 303 generates a clock φ1 of a predetermined frequency. This clock φ1 is supplied to the line sensor 300, and m/
It is supplied to an n-ary counter 304. This m/n-based counter 304 functions as a frequency divider, and when the period of clock φ1 is tφ, as shown in FIG.
This clock φ1 every period (that is, a period of ntφ)
A start pulse ST having a pulse width of m cycles (that is, mtφ) is generated. However, n and m are positive integers, and n>m. This start pulse ST is also supplied to the line sensor 300.
【0005】ラインセンサ300は、線上に多数配列さ
れた受光素子であるフォトダイオードとその数に対応し
た数の蓄電素子であるコンデンサとからなるアレイを有
しており、スタートパルスSTが供給されると、そのパ
ルス期間フォトダイオードでのバーコードが付されたラ
ベルなどの媒体からの受光量に応じた量の電荷の蓄積が
行なわれ、たとえばラインセンサ300がCMOSセン
サである場合、クロツクφ1が供給される毎に各コンデ
ンサから順番に蓄積電荷が読み出される。これにより、
ラインセンサ300がバーコードに応じたアナログ信号
BSを発生する。すなわち、スタートパルスSTはライ
ンセンサ300で電荷蓄積時間を設定し、クロツクφ1
は蓄積された各電荷を順番に読み出すための駆動パルス
ということになる。The line sensor 300 has an array consisting of a large number of photodiodes, which are light receiving elements, arranged in a line and a number of capacitors, which are power storage elements, corresponding to the number of photodiodes, and is supplied with a start pulse ST. During that pulse period, an amount of charge is accumulated in the photodiode according to the amount of light received from a medium such as a label with a bar code attached. For example, if the line sensor 300 is a CMOS sensor, the clock φ1 is supplied. The stored charge is sequentially read out from each capacitor each time the capacitor is loaded. This results in
Line sensor 300 generates an analog signal BS according to the barcode. That is, the start pulse ST sets the charge accumulation time by the line sensor 300, and the clock φ1
is a driving pulse for sequentially reading out each accumulated charge.
【0006】ところで、m/n進カウンタ304の分周
比を一定としてスタートパルスSTのパルス幅を一定と
し、ラインセンサ300での電荷蓄積時間を一定とする
と、バーコードが付された媒体の種類や媒体からライン
センサ300の受光面までの距離に応じて蓄積される電
荷量に違いが生じ、この結果、ラインセンサ300から
出力されるアナログ信号BSの振幅が異なつてしまう。
一方、バーコードのバーの幅は一定ではなく、複数の異
なる幅が規定されており、二値化回路301では、アナ
ログ信号BSをこのバーの幅を表わすように2値化しな
ければならず、このために、アナログ信号BSをその振
幅の中心レベルで2値化するように閾値レベルが設定さ
れている。By the way, if the frequency division ratio of the m/n counter 304 is constant, the pulse width of the start pulse ST is constant, and the charge accumulation time in the line sensor 300 is constant, then the type of medium to which the bar code is attached is determined. The amount of accumulated charge varies depending on the distance from the medium to the light receiving surface of the line sensor 300, and as a result, the amplitude of the analog signal BS output from the line sensor 300 varies. On the other hand, the width of the bar of a barcode is not constant, but a plurality of different widths are defined, and the binarization circuit 301 must binarize the analog signal BS so as to represent the width of the bar. For this purpose, a threshold level is set so that the analog signal BS is binarized at the center level of its amplitude.
【0007】このようなラインセンサ300を用いる場
合には、1つのラインセンサ内での受光〜充電特性に所
定幅のばらつきがあるし、また、ラインセンサ間でもば
らつきがあるし、更に、媒体の照光分布にもばらつきが
生じているので、受光感度設定を行なうためには、極め
て限定された環境に特定して一定の検出時間を設定する
こととなる。そこで、仮に1つのラインセンサ内での受
光〜充電特性のばらつきがないとしても、媒体と光学読
取装置の距離や媒体自体の反射率のばらつきがあると、
受光量が大幅にばらつくので、結果的に蓄積される電荷
量が異なってくる。そして、一定の検出時間において蓄
積電荷量が変化すべきものが飽和してしまうとアナログ
信号BSも飽和して、二値化回路301は、この二値化
回路301に備わつている被2値化信号レベルであるア
ナログ信号BSの振幅に依存して閾値を調節する一般的
な自動閾値制御回路(A.T.C.)でも、閾値レベル
は飽和したアナログ信号BSに対してこれ以上高く設定
できないので、媒体の表示符号が黒色表示を含む状態で
あつても、検出時間の全てにおいて白色状態を示す2値
化信号を出力する。同様に、一定の検出時間において蓄
積電荷量がもつと多く変化すべきものが少なくなるとア
ナログ信号BSの振幅も不足して、二値化回路301は
、この二値化回路301の一般的な自動閾値制御回路で
も、検出感度の問題から閾値レベルを小さいアナログ信
号BSの最大値に対して一定値より低く設定できないの
で、媒体の表示符号が白色表示を含む状態であつても検
出時間の全てにおいて黒色状態を示す2値化信号を出力
する。[0007] When such a line sensor 300 is used, there are variations in the light receiving to charging characteristics within one line sensor, and there are also variations between line sensors, and furthermore, there are Since variations occur in the illumination distribution, in order to set the light reception sensitivity, it is necessary to specify a very limited environment and set a certain detection time. Therefore, even if there is no variation in light reception to charging characteristics within one line sensor, if there are variations in the distance between the medium and the optical reading device or in the reflectance of the medium itself,
Since the amount of light received varies greatly, the amount of charge accumulated will vary as a result. Then, when the amount of accumulated charge that should change in a certain detection time becomes saturated, the analog signal BS also becomes saturated, and the binarization circuit 301 Even with a general automatic threshold control circuit (A.T.C.) that adjusts the threshold depending on the amplitude of the analog signal BS, which is the signal level, the threshold level cannot be set any higher for the saturated analog signal BS. Therefore, even if the display code of the medium includes black display, a binary signal indicating a white state is output during the entire detection time. Similarly, if the amount of accumulated charge in a certain detection time is large and there is little to change, the amplitude of the analog signal BS will also be insufficient, and the binarization circuit 301 will set the general automatic threshold of this binarization circuit 301. Even in the control circuit, the threshold level cannot be set lower than a certain value for the maximum value of the small analog signal BS due to detection sensitivity issues, so even if the display code of the medium includes white display, it is black during the entire detection time. Outputs a binary signal indicating the state.
【0008】以上の如く、ラインセンサ300の各素子
間を一定の検出時間とした場合に、二値化回路301に
自動閾値調整回路を付加しても、この二値化回路301
では、デコーダ302に供給される2値化信号が、検出
された表示符号であるバーコードの反射及び非反射に対
して、逆転する関係で誤つて弁別される。この2値化信
号の誤弁別状態が部分的であつたとしても、この時供給
された2値化信号は、デコーダ302で正しく復号され
ることがなく、デコーダ302がエラー判定のルーチン
に入つてしまつたり、誤つたバーとスペースの長さの判
定を受けてしまう。As described above, when the detection time between each element of the line sensor 300 is fixed, even if an automatic threshold adjustment circuit is added to the binarization circuit 301, the binarization circuit 301
In this case, the binary signal supplied to the decoder 302 is erroneously discriminated in an inverse relationship with respect to reflection and non-reflection of the detected display symbol, that is, the bar code. Even if the erroneous discrimination state of this binary signal is partial, the binary signal supplied at this time will not be correctly decoded by the decoder 302, and the decoder 302 will enter the error determination routine. The bar and space lengths are judged incorrectly or incorrectly.
【0009】そこで、従来のタツチ式バーコードスキヤ
ナにおいては、ラインセンサ300の電荷蓄積時間を可
変としているが、以下、この電荷蓄積時間の可変手段に
ついて、図11により、概略的に説明する。Therefore, in the conventional touch-type barcode scanner, the charge accumulation time of the line sensor 300 is made variable. Hereinafter, a means for varying the charge accumulation time will be schematically explained with reference to FIG. 11.
【0010】同図において、N個の蓄積時間設定回路3
051 ,3052 ,……,305Nが設けられ、こ
れらのうちの1つがスイツチ306で選択されることに
より、ラインセンサ300での電荷蓄積時間が設定され
る。デコーダ302は二値化回路301の出力信号をデ
コードしてバーコードを認識しているが、バーコードを
認識することができないときには、「デコードエラー」
としてスイツチ306を制御する。これにより、スイツ
チ306は所定の順序、たとえば蓄積時間設定回路30
51 ,3052,……の順で選択していつてラインセ
ンサ300での電荷蓄積時間を順次変化させ、デコーダ
302がバーコードを認識可能な電荷蓄積時間を検索す
る。蓄積時間設定回路305Nの次には蓄積時間設定回
路3051が選択されることになり、このような選択は
リング状に行なわれる。In the figure, N accumulation time setting circuits 3
051, 3052, . The decoder 302 decodes the output signal of the binarization circuit 301 and recognizes the barcode, but if the barcode cannot be recognized, a "decoding error" occurs.
The switch 306 is controlled as follows. This causes the switches 306 to operate in a predetermined order, for example, the accumulation time setting circuit 30
51, 3052, . . . to sequentially change the charge accumulation time in the line sensor 300, and search for the charge accumulation time at which the decoder 302 can recognize the barcode. The accumulation time setting circuit 3051 is selected next to the accumulation time setting circuit 305N, and such selection is performed in a ring pattern.
【0011】図9において、このような電荷蓄積時間を
切り換えるためには、m/n進カウンタ304の分周比
を順次変化させればよい。但し、ここでいう分周比とは
、図10におけるスタートパルスSTの周期を一定(す
なわち、n=一定)としてm/nで表わすことができ、
分周比を変化させることは、mを変化させること(すな
わち、スタートパルスSTのパルス幅を変化させること
)である。In FIG. 9, in order to switch the charge accumulation time as described above, it is sufficient to sequentially change the frequency division ratio of the m/n-ary counter 304. However, the frequency division ratio here can be expressed as m/n, assuming that the period of the start pulse ST in FIG. 10 is constant (that is, n = constant).
Changing the frequency division ratio means changing m (that is, changing the pulse width of the start pulse ST).
【0012】次に、以上説明したタツチ式バーコードス
キヤナの具体的構成を図12,図13により説明する。
但し、同図において、1は読取中信号ラツチ回路、2は
照光部、3は光学結像部、4は1走査カウンタ、5は媒
体、6はバーコード、7はスタートパルス発生回路、8
はパルス幅設定回路、10は光電変換部、11,12は
分周回路、13は発振回路、14は二値化回路、15は
走査回数定数メモリ、16は走査回数カウンタ、17は
走査回数比較器、18はエツジ検出回路、19はタイマ
カウンタ、20はカウント値メモリ、21はカウント値
メモリ制御部、211はマージン判定部、212はフア
ーストスロー判定部、213はアドレスカウンタ、21
4はアドレスデコーダ、215はリセツト回路、22は
ビツトイメージ変換器、23はキヤラクタコードビツト
イメージメモリ、24はストツプコードビツトイメージ
メモリ、25はビツトイメージメモリ制御部、26はス
タートストツプ判定部、27はキヤラクタ変換部、28
はキヤラクタコード一致比較器、29はエラー処理回路
、30は定数メモリ、31はデータ一致回数カウンタ、
32はデータ一致回数比較器、33は出力データ変換部
である。Next, the specific structure of the touch-type barcode scanner described above will be explained with reference to FIGS. 12 and 13. However, in the figure, 1 is a reading signal latch circuit, 2 is an illumination unit, 3 is an optical imaging unit, 4 is a 1-scan counter, 5 is a medium, 6 is a bar code, 7 is a start pulse generation circuit, and 8
1 is a pulse width setting circuit, 10 is a photoelectric conversion unit, 11 and 12 are frequency dividing circuits, 13 is an oscillation circuit, 14 is a binarization circuit, 15 is a scanning number constant memory, 16 is a scanning number counter, and 17 is a scanning number comparison 18 is an edge detection circuit, 19 is a timer counter, 20 is a count value memory, 21 is a count value memory control section, 211 is a margin judgment section, 212 is a first throw judgment section, 213 is an address counter, 21
4 is an address decoder, 215 is a reset circuit, 22 is a bit image converter, 23 is a character code bit image memory, 24 is a stop code bit image memory, 25 is a bit image memory control section, and 26 is a start/stop determination section. , 27 is a character conversion unit, 28
is a character code match comparator, 29 is an error processing circuit, 30 is a constant memory, 31 is a data match counter,
32 is a data matching frequency comparator, and 33 is an output data converter.
【0013】バーコードは、文字や数字などのキヤラク
タを幅が異なる複数個のバーでもつてコード化すること
により、商品の値段や商品名などのキヤラクタ列をバー
の配列でもつて表わすようにしたものである。キヤラク
タを表わすコードを、以下、キヤラクタコードというが
、1キヤラクタコードを表わすバーの個数や太バー,細
バーの組合わせパターンはバーコードの形式によつて異
なつているものの、いずれの形式も、全てのキヤラクタ
コードを表わすバーの列の前後に夫々マージン(空白部
)とスタートコード,ストツプコードを表わすバー列が
設けられている。[0013] A barcode is a code in which characters such as letters and numbers are coded using multiple bars of different widths, so that a string of characters such as product prices and product names can be represented by an array of bars. It is. The code representing a character is hereinafter referred to as a character code.Although the number of bars representing one character code and the combination pattern of thick bars and thin bars differ depending on the barcode format, all formats are , bar rows representing margins (blank areas), start codes, and stop codes are provided before and after the rows of bars representing all character codes.
【0014】以下では、説明を明確にするために、図1
2,図13に示すバーコードスキヤナで読み取られるバ
ーコードの形式をInterleaved 2of5
とする。これは、5本の黒バーで1キヤラクタを表わし
、また、黒バーの間隔をなす白バー5本でも1キヤラク
タを表わすようにしたものである。1つのバーコードは
複数個のキヤラクタコードを表わしているが、各キヤラ
クタコードを1桁として複数桁のキヤラクタコードを表
わしている。In the following, for clarity of explanation, FIG.
2. The format of the barcode read by the barcode scanner shown in Figure 13 is Interleaved 2of5.
shall be. In this system, one character is represented by five black bars, and one character is also represented by five white bars that are spaced between the black bars. One barcode represents a plurality of character codes, each character code being one digit.
【0015】この種のバーコード表示では、このバーコ
ード表示の左側での所定幅の媒体の地色の部分をスター
トマージン、右側での所定幅の媒体の地色の部分をスト
ップマージンとし、これらマージンをバーコード表示が
なされていることを判定するために使用する。バーコー
ド表示の左端の細バーとこれに続く細バーとはスタート
コードを表わし、右端の細バーとこれより1つ左側の太
バーとがストップコードを表わしている。そして、これ
らスタートコード、ストップコードとの間に、所定本数
の細バーや太バー(黒バー)と細スペースや太スペース
(白バー)との組合わせでもって夫々の表示内容を判別
するキャラクタコードが表示されている。ここで、キャ
ラクタコードの配列方向(すなわち、スタートコードか
らストップコードへの方向)を順方向とすると、バーコ
ードは上記の順方向に読み取られるようにするのが一般
的であるが、逆方向に読み取られる場合もあり得、この
ような場合には、ストップコードがスタートコードであ
るかのように、また、スタートコードがストップコード
であるかのように読み取られるから、読取り方向によつ
てスタートコード、ストツプコードのパターンが違うこ
とになり、これによってバーコードの読み取り方向を判
別できるようにしている。In this type of barcode display, the part of the background color of the medium of a predetermined width on the left side of this barcode display is used as a start margin, and the part of the base color of the medium of a predetermined width on the right side of this barcode display is used as a stop margin. The margin is used to determine whether the barcode is displayed. The thin bar at the left end of the barcode display and the thin bar following it represent the start code, and the thin bar at the right end and the thick bar one position to the left represent the stop code. Then, between these start codes and stop codes, a character code is used to determine the display contents by a combination of a predetermined number of thin bars or thick bars (black bars) and thin spaces or thick spaces (white bars). is displayed. Here, assuming that the direction in which the character codes are arranged (that is, from the start code to the stop code) is the forward direction, barcodes are generally read in the above forward direction, but in the reverse direction. In such cases, the stop code is read as if it were a start code, and the start code is read as if it were a stop code. , the stop code pattern is different, and this makes it possible to determine the reading direction of the bar code.
【0016】図12において、発振回路13は常時動作
しており、その出力信号が分周回路11で分周されてク
ロツクφ1が、また、分周回路12で分周されてクロツ
クφ2が夫々形成される。クロツクφ1は図9のクロツ
クφ1に相当するものであつて、図9のラインセンサ3
00に相当する光電変換部10と1走査カウンタ4と図
9のm/n進カウンタ304に相当するスタートパルス
発生回路7とに供給され、クロツクφ2はタイマカウン
タ19に供給される。In FIG. 12, the oscillation circuit 13 is always operating, and its output signal is divided by the frequency dividing circuit 11 to form the clock φ1, and by the frequency dividing circuit 12 to form the clock φ2. be done. The clock φ1 corresponds to the clock φ1 in FIG. 9, and the clock φ1 corresponds to the clock φ1 in FIG.
The clock φ2 is supplied to the photoelectric conversion unit 10 corresponding to 00, the 1-scan counter 4, and the start pulse generation circuit 7 corresponding to the m/n counter 304 in FIG.
【0017】図示しないホスト機器から読取開始信号S
が供給されると、読取中信号ラツチ回路1はセツトされ
て読取中信号READを出力し、照光部2とスタートパ
ルス発生回路7とに供給する。照光部2は発光素子とし
てLEDを有し、読取中信号READによつてLEDを
点灯させて媒体5上のバーコード6の印刷領域を照光す
る。この印刷領域から反射された光は光学結像部3を介
して光電変換部10であるラインセンサの受光面に照射
され、この光学結像部3によつてラインセンサの受光面
にバーコード6の像が結像される。以下、光電変換部1
0をラインセンサとして説明する。A read start signal S is received from a host device (not shown).
When the reading signal latch circuit 1 is supplied, the reading signal latch circuit 1 is set and outputs the reading signal READ, which is supplied to the illuminating section 2 and the start pulse generating circuit 7. The illumination section 2 has an LED as a light emitting element, and lights up the LED in response to a reading signal READ to illuminate the printing area of the barcode 6 on the medium 5. The light reflected from this printing area is irradiated onto the light-receiving surface of the line sensor, which is the photoelectric conversion section 10, via the optical imaging section 3. An image is formed. Below, photoelectric conversion section 1
0 is explained as a line sensor.
【0018】スタートパルス発生回路7は、次の4条件
、すなわち、
(1)1走査カウンタ4から走査終了信号SEDが供給
されている
(2)読取中信号ラツチ回路1から読取中信号READ
が供給されている
(3)パルス幅設定回路8でパルス幅設定が完了し、そ
の設定値が送られてきている
(4)キヤラクタ変換部27(図13)からキヤラクタ
変換終了信号CEDが供給されている
の条件を全て同時に満足しているとき、スタートパルス
STを発生する。かかる条件を、以下、パルス発生条件
という。The start pulse generating circuit 7 is operated under the following four conditions: (1) the scan end signal SED is supplied from the 1-scan counter 4; (2) the reading signal READ is supplied from the reading signal latch circuit 1;
(3) The pulse width setting circuit 8 has completed the pulse width setting and the set value has been sent. (4) The character conversion end signal CED is supplied from the character conversion section 27 (FIG. 13). When all of the following conditions are satisfied at the same time, a start pulse ST is generated. Such conditions are hereinafter referred to as pulse generation conditions.
【0019】初期状態では、1走査カウンタ4は走査終
了信号SEDを、パルス幅設定回路8は初期値が設定さ
れていてこれを、キヤラクタ変換部27(図13)はキ
ヤラクタ変換終了信号CEDを夫々出力しており、読取
中信号ラツチ回路1から読取中信号READが供給開始
されると、スタートパルス発生回路7はパルス発生条件
を満足し、パルス幅設定回路8の初期値で決まるパルス
幅のスタートパルスSTを発生する。このスタートパル
スSTは1走査カウンタ4とラインセンサ10とに供給
される。In the initial state, the one-scan counter 4 receives the scan end signal SED, the pulse width setting circuit 8 receives the initial value set, and the character converter 27 (FIG. 13) receives the character conversion end signal CED. When the reading signal READ is started to be supplied from the reading signal latch circuit 1, the start pulse generation circuit 7 satisfies the pulse generation conditions and starts the pulse width determined by the initial value of the pulse width setting circuit 8. Generate pulse ST. This start pulse ST is supplied to the one-scan counter 4 and the line sensor 10.
【0020】ラインセンサ10は、スタートパルスST
により、受光面の像をクロツクφ1が供給される毎に1
画素ずつ読み取り、バーコード6を走査して読み取る。
これにより、ラインセンサ10からは、バーコード6の
黒バーと白バーとでレベルが異なる電気信号BSが出力
される。また、1走査カウンタ4はスタートパルスST
によつてクロツクφ1のカウントを開始して走査終了信
号SEDを出力しなくなり、ラインセンサ10の1走査
分のクロツクφ1をカウントすると、再び走査終了信号
SEDを出力する。この走査終了信号SEDはスタート
パルス発生回路7、走査回数カウンタ16、カウント値
メモリ20、マージン判定回路211及びアドレスカウ
ンタ213に供給される。The line sensor 10 receives a start pulse ST.
The image on the light receiving surface is changed by 1 every time clock φ1 is supplied.
The barcode 6 is scanned and read pixel by pixel. As a result, the line sensor 10 outputs an electrical signal BS having different levels for the black bar and the white bar of the barcode 6. In addition, the 1-scan counter 4 receives a start pulse ST.
As a result, the clock φ1 starts counting and the scan end signal SED is no longer output, and when the clock φ1 for one scan of the line sensor 10 is counted, the scan end signal SED is output again. This scan end signal SED is supplied to the start pulse generation circuit 7, the scan number counter 16, the count value memory 20, the margin determination circuit 211, and the address counter 213.
【0021】スタートパルスSTのパルス幅はラインセ
ンサ10での画素をなす各コンデンサの充電時間を決め
るものであり、この充電時間に応じてラインセンサ10
の出力信号のレベルの大きさが決まる。スタートパルス
STのパルス幅はパルス幅設定回路8の設定される値に
よつて決まるが、この値は1走査カウンタ4から出力さ
れる走査終了信号SEDをカウントする走査回数カウン
タ16のカウント値NSによつて決まる。したがつて、
パルス幅設定回路8の設定値はラインセンサ10の走査
毎に変更されることになり、これに伴つてスタートパル
スSTのパルス幅がラインセンサ10の走査毎に変化す
る。The pulse width of the start pulse ST determines the charging time of each capacitor forming a pixel in the line sensor 10, and the line sensor 10
The magnitude of the output signal level is determined. The pulse width of the start pulse ST is determined by the value set in the pulse width setting circuit 8, and this value is determined by the count value NS of the scan number counter 16 that counts the scan end signal SED output from the 1-scan counter 4. It's decided by then. Therefore,
The set value of the pulse width setting circuit 8 is changed every time the line sensor 10 scans, and accordingly, the pulse width of the start pulse ST changes every time the line sensor 10 scans.
【0022】スタートパルス発生回路7は、1走査カウ
ンタ4から再び走査終了信号SEDが供給されてパルス
発生条件を満足すると、再びパルス幅設定回路8の設定
値に応じたパルス幅のスタートパルスSTを発生し、ラ
インセンサ10を走査開始させ、1走査カウンタ4をカ
ウント開始させる。このようにして、ラインセンサ10
はバーコード6を繰り返し走査する。When the start pulse generation circuit 7 is supplied with the scan end signal SED again from the 1-scan counter 4 and satisfies the pulse generation conditions, it again generates the start pulse ST with a pulse width according to the setting value of the pulse width setting circuit 8. This causes the line sensor 10 to start scanning and the 1-scan counter 4 to start counting. In this way, the line sensor 10
scans barcode 6 repeatedly.
【0023】ラインセンサ10の出力信号BSは、図1
1の二値化回路301に相当する二値化回路14でレベ
ルが2値化された後、エツジ検出回路18でその立上り
、立下りエツジが検出される。エツジ検出回路18から
出力されるエツジパルスEGはタイマカウンタ19とア
ドレスカウンタ213とに供給される。このエツジ検出
回路18以降の処理回路は図11のデコーダ302を構
成している。The output signal BS of the line sensor 10 is shown in FIG.
After the level is binarized by the binarization circuit 14 corresponding to the 1 binarization circuit 301, the rising and falling edges are detected by the edge detection circuit 18. The edge pulse EG output from the edge detection circuit 18 is supplied to a timer counter 19 and an address counter 213. The processing circuits after the edge detection circuit 18 constitute the decoder 302 in FIG.
【0024】タイマカウンタ19はエツジパルスEGを
リセツト信号として分周回路12からのクロツクφ2を
カウントする。したがつて、タイマカウンタ19からは
、バーコード6の各バーの幅を表わすカウント値Nを出
力する。このカウント値Nはカウント値メモリ制御部2
1によつて制御されるカウント値メモリ20に書き込ま
れる。The timer counter 19 counts the clock φ2 from the frequency dividing circuit 12 using the edge pulse EG as a reset signal. Therefore, the timer counter 19 outputs a count value N representing the width of each bar of the bar code 6. This count value N is determined by the count value memory control section 2.
1 is written into the count value memory 20 controlled by 1.
【0025】カウント値メモリ制御部21はマージン判
定部211、フアーストスロー判定部212、アドレス
カウンタ213、アドレスデコーダ214及びリセツト
回路215によつて構成されている。マージン判定部2
11はバーコード6の先頭バーの前と最後のバーの後に
設けられた空白部(スタートマージン,ストツプマージ
ン)に対するタイマカウンタ19のカウント値Nと、空
白部分とバーコード部分のカウント値との比により、バ
ーコードの開始と終了とを検出し、開始信号MSTと終
了信号MEDとを発生する。また、スタートマージン,
ストツプマージンが不足のときには、マージンエラー信
号MERを出力してリセツト回路215に供給する。1
走査カウンタ4から走査終了信号SEDが供給されると
きには、このマージン判定回路211は動作しない。フ
アーストスロー判定部212はタイマカウンタ19から
出力されるカウント値Nの大きさを検出し、エツジ検出
回路18からのエツジパルスEGの間隔が狭すぎたり、
広すぎたりしたときにフアーストスローエラー信号を出
力してリセツト回路215に供給する。媒体5でのバー
コード6の印刷ににじみや傷、ほこりの付着などによつ
てバーが狭くなつたり、広がつたりして読み取られると
、フアーストスロー判定部212はフアーストスローエ
ラー信号を出力する。リセツトカウント215は、マー
ジン判定部211からマージンエラー信号MERが供給
されると、あるいはフアーストスロー判定部212から
フアーストスローエラー信号が供給されると、リセツト
信号を発生してアドレスカウンタ213とカウント値メ
モリ20とに送る。The count value memory control section 21 is composed of a margin determination section 211, a first throw determination section 212, an address counter 213, an address decoder 214, and a reset circuit 215. Margin judgment section 2
11 is the count value N of the timer counter 19 for the blank area (start margin, stop margin) provided before the first bar and after the last bar of the barcode 6, and the count value of the blank area and the barcode area. The start and end of the barcode are detected by the ratio, and a start signal MST and an end signal MED are generated. Also, start margin,
When the stop margin is insufficient, a margin error signal MER is output and supplied to the reset circuit 215. 1
When the scan end signal SED is supplied from the scan counter 4, the margin determination circuit 211 does not operate. The first throw determination unit 212 detects the magnitude of the count value N output from the timer counter 19, and detects whether the interval between edge pulses EG from the edge detection circuit 18 is too narrow,
If the width is too wide, a first throw error signal is output and supplied to the reset circuit 215. If the barcode 6 printed on the medium 5 becomes narrower or wider due to smudges, scratches, or dust adhesion and is read, the first throw determination unit 212 outputs a first throw error signal. Output. When the margin error signal MER is supplied from the margin determination section 211 or the first throw error signal is supplied from the first throw determination section 212, the reset count 215 generates a reset signal and starts counting with the address counter 213. and the value memory 20.
【0026】アドレスカウンタ213は、1走査カウン
タ4から走査終了信号SEDが供給されなくなつてライ
ンセンサ10が走査を開始すると、マージン判定部21
1から開始信号MSTが供給されるとともに、エツジ検
出回路18からのエツジ信号EGを初期値からカウント
し始める。アドレスカウンタ213から出力されるカウ
ント値はアドレスデコーダ214でデコードされ、アド
レス信号ADRとしてカウント値メモリ20に供給され
る。カウント値メモリ20は1走査カウンタ4から走査
終了信号SEDが供給されなくなると書込みモードとな
り、タイマカウンタ19から出力されるカウント値Nが
カウント値メモリ20のアドレス信号ADRによつて指
定されるアドレスに順次書き込まれる。When the scan end signal SED is no longer supplied from the 1-scan counter 4 and the line sensor 10 starts scanning, the address counter 213 detects the margin determination unit 21.
1, the start signal MST is supplied, and the edge signal EG from the edge detection circuit 18 starts counting from the initial value. The count value output from address counter 213 is decoded by address decoder 214 and supplied to count value memory 20 as address signal ADR. The count value memory 20 enters the write mode when the scan end signal SED is no longer supplied from the 1-scan counter 4, and the count value N output from the timer counter 19 goes to the address specified by the address signal ADR of the count value memory 20. Written sequentially.
【0027】カウント値メモリ20にバーコード6の全
てのバーに対するカウント値Nが書き込まれ、マージン
判定部211から終了信号MEDが出力されると、アド
レスカウンタ213はカウントを停止して初期値がセツ
トされる。次に、ラインセンサ10の1走査が終つて1
走査カウンタ4が走査終了信号SEDを出力すると、カ
ウント値メモリ20は読出しモードとなり、アドレスカ
ウンタ213は、内部クロツクにより、初期値から順次
1ずつインクリメントされたカウント値を出力する。こ
のカウント値はアドレスデコーダ214でカウント値メ
モリ20のアドレス信号ADRとなる。したがつて、カ
ウント値メモリ20からは、書き込まれたカウント値N
がその書き込まれた順に読み出される。When the count value N for all bars of the barcode 6 is written into the count value memory 20 and the end signal MED is output from the margin determination section 211, the address counter 213 stops counting and the initial value is set. be done. Next, after one scan of the line sensor 10 is completed, one
When the scan counter 4 outputs the scan end signal SED, the count value memory 20 enters the read mode, and the address counter 213 outputs the count value sequentially incremented by 1 from the initial value by the internal clock. This count value becomes the address signal ADR of the count value memory 20 in the address decoder 214. Therefore, from the count value memory 20, the written count value N
are read in the order they were written.
【0028】なお、リセツト回路215がリセツト信号
を出力すると、これによつてアドレスカウンタ213は
初期値にリセツトされ、カウント値メモリ20はクリア
される。マージン判定部211は次のマージン判定まで
マージンエラー信号MERを出力し続け、フアーストス
ロー判定部212は1走査カウンタ4から次の走査終了
信号SEDが供給されるまでフアーストスローエラー信
号を出力し続ける。Note that when the reset circuit 215 outputs a reset signal, the address counter 213 is reset to the initial value and the count value memory 20 is cleared. The margin determination unit 211 continues to output the margin error signal MER until the next margin determination, and the first throw determination unit 212 continues to output the first throw error signal until the next scan end signal SED is supplied from the 1-scan counter 4. continue.
【0029】カウント値メモリ20から出力されるカウ
ント値Nはビツトイメージ変換部22に供給され、予め
設定されている閾値と比較されてバーの種類を表わすビ
ツトイメージBIに変換される。The count value N outputted from the count value memory 20 is supplied to a bit image converter 22, where it is compared with a preset threshold value and converted into a bit image BI representing the type of bar.
【0030】次に、図13について説明する。ビツトイ
メージ変換部22からのビツトイメージBIはキヤラク
タコードビツトイメージメモリ23、ストツプコードビ
ツトイメージメモリ24およびビツトイメージメモリ制
御部25に供給される。ビツトイメージメモリ制御部2
5は、ビツトイメージBIの出力順序を判定するなどし
て、ビツトイメージBIがキヤラクタコードをなすビツ
トイメージ(キヤラクタコードビツトイメージ)か、あ
るいはストツプコードをなすビツトイメージ(ストツプ
コードビツトイメージ)かを識別し、ビツトイメージB
Iがキヤラクタコードビツトイメージであるときには、
ビツトイメージBIを5個ずつ区分して夫々1バイトの
データとし、これらデータを順次キヤラクタコードビツ
トイメージメモリ23に書き込み、ビツトイメージBI
がストツプコードビツトイメージであるときには、これ
をストツプコードビツトイメージメモリ24に書き込む
。Interleaved 2of5の場合、黒バー
と白バーとに対するビツトイメージが区分され、夫々に
ついて1バイトのデータが形成されてキヤラクタコード
ビツトイメージメモリ23に書き込まれる。キヤラクタ
コードビツトイメージメモリ23、ストツプコードビツ
トイメージメモリ24での書込みが終ると、ビツトイメ
ージメモリ制御部25は、キヤラクタコードビツトイメ
ージメモリ23から上記の1バイトのデータCCDを順
次読み出してキヤラクタ変換部27に送り、また、スト
ツプコードビツトイメージメモリ24からストツプコー
ドビツトイメージSCDを読み出し、スタートストツプ
判定部26に送る。Next, FIG. 13 will be explained. The bit image BI from the bit image converter 22 is supplied to a character code bit image memory 23, a stop code bit image memory 24, and a bit image memory controller 25. Bit image memory control section 2
5 determines whether the bit image BI is a bit image forming a character code (character code bit image) or a bit image forming a stop code (stop code bit image) by determining the output order of the bit image BI. bit image B
When I is a character code bit image,
The bit image BI is divided into five pieces, each of which is 1 byte of data, and these data are sequentially written into the character code bit image memory 23 to create the bit image BI.
When is a stop code bit image, it is written into the stop code bit image memory 24. In the case of Interleaved 2 of 5, bit images for black bars and white bars are separated, and 1 byte of data is formed for each and written to the character code bit image memory 23. When the writing in the character code bit image memory 23 and the stop code bit image memory 24 is completed, the bit image memory control section 25 sequentially reads out the 1-byte data CCD from the character code bit image memory 23 and writes the data into the character code bit image memory 23 and the stop code bit image memory 24. Also, the stop code bit image SCD is read from the stop code bit image memory 24 and sent to the start/stop determining section 26.
【0031】スタートストツプ判定部26においては、
バーコードに使用される正しいストツプコードに対し、
正しく正、逆方向に読み取つたときに得られる2種類の
ビツトイメージによるビツトパターン(以下、登録スト
ツプコードパターンという)がROMに登録されており
、ストツプコードビツトイメージメモリ24からの2つ
のビツトイメージによるデータSCDのビツトパターン
(以下、検出ストツプコードパターンという)が登録ス
トツプコードパターンと比較され、いずれの登録ストツ
プコードパターンと一致するか判定される。この検出ス
トツプコードパターンと一致する登録ストツプコードパ
ターンがあるときには、これによつてバーコード6の読
取り方向も判断でき、この一致した登録ストツプコード
パターンに対応したデータ(ストツプコードデータ)S
SCを出力データ変換部33に供給するとともに、変換
方向指示信号CDDをキヤラクタ変換部27に送る。In the start/stop determining section 26,
For the correct stopcode used in the barcode,
A bit pattern (hereinafter referred to as a registered stop code pattern) consisting of two types of bit images obtained when correctly read in the forward and reverse directions is registered in the ROM, and two bit patterns from the stop code bit image memory 24 are stored in the ROM. The bit pattern of the image data SCD (hereinafter referred to as a detected stop code pattern) is compared with the registered stop code patterns to determine which registered stop code pattern it matches. When there is a registered stopcode pattern that matches this detected stopcode pattern, the reading direction of the barcode 6 can also be determined based on this, and the data (stopcode data) corresponding to this matched registered stopcode pattern can be determined. S
SC is supplied to the output data converter 33, and a conversion direction instruction signal CDD is sent to the character converter 27.
【0032】検出ストツプコードパターンSCDに一致
する登録ストツプコードパターンがないときには、スタ
ートストツプ判定部26はエラー信号ERR1を出力し
、エラー処理回路29に供給する。When there is no registered stop code pattern matching the detected stop code pattern SCD, the start/stop determining section 26 outputs an error signal ERR1 and supplies it to the error processing circuit 29.
【0033】キヤラクタ変換部27においては、バーコ
ードに使用される全てのキヤラクタコードに対し、正方
向に正しく読み取つたときに得られるビツトイメージを
含んだ1バイトのビツトパターン(以下、登録キヤラク
タコードパターンという)がROMに登録されており、
キヤラクタコードビツトイメージメモリ23からの1バ
イトのデータCCDのビツトパターン(以下、検出キヤ
ラクタコードパターンという)が登録キヤラクタコード
パターンと比較され、いずれの登録キヤラクタコードパ
ターンと一致するか判定される。この場合、バーコード
6が逆方向に読み取られているときには、スタートスト
ツプ判定部26からの変換方向指示信号CDDにより、
検出キヤラクタコードパターンCCDが前後反転されて
登録キヤラクタコードパターンと比較される。In the character converter 27, a 1-byte bit pattern (hereinafter referred to as registered character) containing a bit image obtained when correctly read in the forward direction is converted to all character codes used in the bar code. (called a code pattern) is registered in the ROM,
The 1-byte data CCD bit pattern from the character code bit image memory 23 (hereinafter referred to as the detected character code pattern) is compared with the registered character code patterns, and it is determined which registered character code pattern it matches. Ru. In this case, when the barcode 6 is read in the reverse direction, the conversion direction instruction signal CDD from the start/stop determining section 26 causes
The detected character code pattern CCD is reversed and compared with the registered character code pattern.
【0034】検出キヤラクタコードパターンCCDが登
録キヤラクタコードパターンのいずれかと一致すると、
キヤラクタ変換部27は一致した登録キヤラクタコード
パターンに対するキヤラクタデータCDを出力し、キヤ
ラクタコード一致比較器28と出力データ変換部33と
に送る。検出キヤラクタコードパターンCCDがいずれ
の登録キヤラクタコードパターンとも一致しないときに
は、キヤラクタ変換部27はエラー信号ERR2を発生
してエラー処理回路29に送る。また、バーコード6の
1走査分の検出キヤラクタコードパターンCCDが全て
キヤラクタデータCDに変換されると、キヤラクタ変換
部27はキヤラクタ変換終了信号CEDを発生して図1
2のスタートパルス発生回路7に供給する。これにより
、このスタートパルス発生回路7はスタートパルスST
を発生し、ラインセンサ10(図12)はバーコード6
の次の読取り走査を行なう。[0034] When the detected character code pattern CCD matches any of the registered character code patterns,
The character converter 27 outputs character data CD for the matched registered character code pattern, and sends it to the character code match comparator 28 and the output data converter 33. When the detected character code pattern CCD does not match any registered character code pattern, the character converter 27 generates an error signal ERR2 and sends it to the error processing circuit 29. Further, when all of the detected character code patterns CCD for one scan of the barcode 6 are converted into character data CD, the character conversion section 27 generates a character conversion end signal CED, and generates a character conversion end signal CED as shown in FIG.
The start pulse generating circuit 7 of No. 2 is supplied. As a result, this start pulse generation circuit 7 generates a start pulse ST
The line sensor 10 (Fig. 12) generates the barcode 6.
Perform the next read scan.
【0035】キヤラクタコード一致比較器28はキヤラ
クタ変換部27からの1走査分のキヤラクタデータCD
を保持し、これと次回の走査によつてキヤラクタ変換部
27から供給されるキヤラクタデータCDとを比較し、
全てのキヤラクタデータが一致したとき、一致パルスを
出力してデータ一致回数カウンタ31に供給する。デー
タ一致回数カウンタ31はこの一致パルスをカウントし
、このカウント値がデータ一致回数比較器32で定数メ
モリ30に記憶されている一致回数設定値と比較される
。データ一致回数カウンタ31のカウント値が一致回数
設定値以上となると、データ一致回数比較器32は読取
完了信号REND1を発生して出力データ変換部33に
送る。前回走査と今回走査とのキヤラクタ変換部27か
らのキヤラクタデータCDが1つでも一致しないと、キ
ヤラクタコード一致比較器28はエラー信号ERR3を
出力してエラー処理回路29に送るとともに、データ一
致回数カウンタ31をクリアする。The character code match comparator 28 receives one scan of character data CD from the character converter 27.
and compares this with the character data CD supplied from the character converter 27 in the next scan,
When all character data match, a match pulse is output and supplied to the data match counter 31. The data matching number counter 31 counts the matching pulses, and this count value is compared with the matching number set value stored in the constant memory 30 by the data matching number comparator 32. When the count value of the data matching number counter 31 exceeds the matching number setting value, the data matching number comparator 32 generates a read completion signal REND1 and sends it to the output data converter 33. If even one character data CD from the character converter 27 between the previous scan and the current scan does not match, the character code match comparator 28 outputs an error signal ERR3 and sends it to the error processing circuit 29, and also detects a data match. Clear the number counter 31.
【0036】出力データ変換部33は、キヤラクタ変換
部27からのキヤラクタデータCDとスタートストツプ
判定部26からのストツプコードデータSSCをバーコ
ード6の走査毎に取り込んで最新のものを保持し、デー
タ一致回数比較器32から読取完了信号REND1が供
給されると、保持しているキヤラクタデータCDとスト
ツプコードデータSSCとを所定の形式に変換してホス
ト機器(図示せず)に送る。これとともに、読取終了を
表示するための表示指示信号DISをランプやブザーな
どの表示装置(図示せず)に送り、また、リセツト信号
RSTを発生して自身を初期化する。このリセツト信号
RSTは読取中信号ラツチ回路1(図12)などに供給
され、これらをリセツトする。この読取中信号ラツチ回
路1は、リセツト信号RSTでリセツトされると、読取
中信号READを出力しなくなり、バーコード6の読取
りは停止する。照光部2も消灯する。The output data conversion unit 33 takes in the character data CD from the character conversion unit 27 and the stop code data SSC from the start/stop determination unit 26 every time the barcode 6 is scanned, and holds the latest data. When the read completion signal REND1 is supplied from the data matching frequency comparator 32, the character data CD and stop code data SSC held are converted into a predetermined format and sent to the host device (not shown). . At the same time, it sends a display instruction signal DIS to indicate the completion of reading to a display device (not shown) such as a lamp or buzzer, and also generates a reset signal RST to initialize itself. This reset signal RST is supplied to the reading signal latch circuit 1 (FIG. 12), etc., and resets them. When the reading signal latch circuit 1 is reset by the reset signal RST, it stops outputting the reading signal READ and stops reading the bar code 6. The illumination unit 2 is also turned off.
【0037】このようにして、前後の走査によるキヤラ
クタデータが定数メモリ30での一定回数設定値による
回数(たとえば2回)連続して一致すると、バーコード
6が正しく読み取られたとして読取りが終るが、この回
数が連続して一致しなければ、バーコード6の読取りが
繰り返されるのであるが、ある回数読取りが繰り返され
てもデータ一致回数比較器32から読取完了信号REN
D1が出力されなければ、それ以上のバーコード6の読
取りは禁止される。In this way, when the character data from the previous and subsequent scans match consecutively a certain number of times (for example, twice) according to the predetermined number of times set value in the constant memory 30, it is assumed that the bar code 6 has been read correctly and the reading ends. However, if this number of times does not match consecutively, reading of the bar code 6 is repeated. However, even if reading is repeated a certain number of times, the reading completion signal REN is not output from the data matching number comparator 32.
If D1 is not output, further reading of the barcode 6 is prohibited.
【0038】すなわち、図12において、走査回数カウ
ンタ16は1走査カウンタ4が走査終了信号SEDを出
力する毎に1ずつカウントアツプする。この走査回数カ
ウンタ16のカウント値はラインセンサ10の走査回数
を表わし、走査回数比較器17で走査回数定数メモリ1
5に設定されている定数と比較される。走査回数カウン
タ16のカウント値がこの定数以上となると、走査回数
比較器17は読取終了信号REND2を出力し、図13
の出力データ変換部33に供給する。That is, in FIG. 12, the scanning number counter 16 counts up by 1 each time the scanning counter 4 outputs the scanning end signal SED. The count value of the scanning number counter 16 represents the number of scanning of the line sensor 10, and the scanning number constant memory 1
It is compared with a constant set to 5. When the count value of the scanning number counter 16 becomes equal to or greater than this constant, the scanning number comparator 17 outputs the reading end signal REND2, as shown in FIG.
The output data is supplied to the output data converting section 33 of.
【0039】そこで、この出力データ変換部33は、キ
ヤラクタデータやストツプコードデータをホスト機器に
送ることなく、リセツト信号RSTを出力して自身を初
期化する。これにより、バーコード6の読取りは失敗し
たものとしてバーコード6の読取りを中止する。また、
読取り不能を示す表示指示信号DISを表示装置に送る
。Therefore, the output data converter 33 outputs the reset signal RST to initialize itself without sending character data or stop code data to the host device. As a result, the reading of the barcode 6 is deemed to have failed and the reading of the barcode 6 is stopped. Also,
A display instruction signal DIS indicating unreadability is sent to the display device.
【0040】エラー処理回路29は、エラー信号ERR
1,ERR2,ERR3のいずれかが供給されても、キ
ヤラクタ変換リセツト信号CERTを出力し、図12の
カウント値メモリ制御部21、ビツトイメージ変換部2
2や図13のキヤラクタコードビツトイメージメモリ2
3、ストツプコードビツトイメージメモリ24、ビツト
イメージメモリ制御部25、スタートストツプ判定部2
6、キヤラクタ変換部27などを初期化する。キヤラク
タ変換部27は、これにより、キヤラクタ変換終了信号
CEDを出力する。The error processing circuit 29 receives an error signal ERR.
1, ERR2, and ERR3, the character conversion reset signal CERT is output, and the count value memory control unit 21 and bit image conversion unit 2 in FIG.
2 and character code bit image memory 2 in Figure 13.
3. Stop code bit image memory 24, bit image memory control section 25, start/stop determination section 2
6. Initialize the character conversion section 27 and the like. The character conversion unit 27 thereby outputs a character conversion end signal CED.
【0041】以上のように、ラインセンサ10はバーコ
ード6を複数回読取り走査し、定数メモリ30の一致回
数設定値に等しい回数連続してキヤラクタコードが一致
すると、バーコード6の読取りが正しく行なわれたもの
とし、ホスト機器にこのキヤラクタコードを送つて読取
り動作を完了するが、この間、パルス幅設定回路8で設
定されるパルス幅がラインセンサ10の各走査毎に変更
され、これとともに、スタートパルス発生回路7から出
力されるスタートパルスSTのパルス幅が変化する。As described above, the line sensor 10 reads and scans the barcode 6 multiple times, and when the character codes match consecutively a number of times equal to the number of matches set in the constant memory 30, the barcode 6 is read correctly. This character code is sent to the host device to complete the reading operation, but during this time, the pulse width set by the pulse width setting circuit 8 is changed for each scan of the line sensor 10, and along with this, the , the pulse width of the start pulse ST output from the start pulse generation circuit 7 changes.
【0042】図14は図12におけるパルス幅設定回路
8の一例を示すブロツク図であつて、81,82は定数
メモリ、83は乗算器、84は加算器、85は設定値メ
モリである。FIG. 14 is a block diagram showing an example of the pulse width setting circuit 8 in FIG. 12, in which 81 and 82 are constant memories, 83 is a multiplier, 84 is an adder, and 85 is a set value memory.
【0043】同図において、定数メモリ81には、スタ
ートパルス発生回路7(図12)で発生されるスタート
パルスSTの最初に設定されるべきパルス幅(基準パル
ス幅)を決める値(基準値)が格納されており、定数メ
モリ82には、この基準パルス幅の1/16倍のパルス
幅に対する値(1/16値)が格納されている。In the figure, a constant memory 81 stores a value (reference value) that determines the pulse width (reference pulse width) that should be set at the beginning of the start pulse ST generated by the start pulse generation circuit 7 (FIG. 12). is stored, and the constant memory 82 stores a value for a pulse width that is 1/16 times the reference pulse width (1/16 value).
【0044】バーコードスキヤナに電源が投入されたと
きや図13の出力データ変換部33からリセツト信号R
STが出力されたときには、定数メモリ81の基準値が
設定値メモリ85にロードされ、これが読み出されて図
12のスタートパルス発生回路7と加算器84とに供給
される。したがつて、スタートパルス発生回路7から最
初に出力されるスタートパルスSTのパルス幅はこの基
準値に応じたものとなる。When the power is turned on to the barcode scanner or from the output data converter 33 in FIG.
When ST is output, the reference value of constant memory 81 is loaded into set value memory 85, read out, and supplied to start pulse generation circuit 7 and adder 84 in FIG. Therefore, the pulse width of the start pulse ST that is first output from the start pulse generation circuit 7 corresponds to this reference value.
【0045】ラインセンサ10(図12)の走査が終了
して1走査カウンタ4(図12)が走査終了信号SED
を出力する毎に、この走査終了信号SEDの前エツジの
タイミングで乗算器83は定数メモリ82に格納されて
いる1/16値と走査回数カウンタ16(図12)のカ
ウント値Nsとを乗算し、加算器84は乗算器83の出
力値と設定値メモリ85から読み出される設定値とを加
算する。設定値メモリ85では、走査終了信号SEDの
前エツジよりも若干遅れて、そこに記憶されている設定
値が加算器84の出力値と書き換えられ、これが直ちに
読み出されてスタートパルス発生回路7(図12)と加
算器84とに供給される。When the scanning of the line sensor 10 (FIG. 12) is completed, the 1-scan counter 4 (FIG. 12) outputs the scanning end signal SED.
Each time , the multiplier 83 multiplies the 1/16 value stored in the constant memory 82 by the count value Ns of the scanning number counter 16 (FIG. 12) at the timing of the previous edge of the scanning end signal SED. , an adder 84 adds the output value of the multiplier 83 and the setting value read from the setting value memory 85. In the set value memory 85, the set value stored there is rewritten with the output value of the adder 84 with a slight delay from the previous edge of the scan end signal SED, and this is immediately read out and sent to the start pulse generating circuit 7 ( 12) and the adder 84.
【0046】このために、設定値メモリ85から読み出
される設定値は、最初は定数メモリ81に格納されてい
る基準値に等しいが、ラインセンサ10(図12)が走
査を終了する毎にこの基準値の1/16倍の値ずつ増加
していく。したがつて、スタートパルス発生回路7(図
12)からは、最初基準パルス幅のスタートパルスST
が発生するが、ラインセンサ10の走査を繰り返す毎に
スタートパルスSTのパルス幅は基準パルス幅の1/1
6倍の幅ずつ長くなつていくことになる。For this purpose, the set value read from the set value memory 85 is initially equal to the reference value stored in the constant memory 81, but each time the line sensor 10 (FIG. 12) finishes scanning, this reference value is The value increases by 1/16 times the value. Therefore, the start pulse generating circuit 7 (FIG. 12) first generates the start pulse ST with the reference pulse width.
However, each time the line sensor 10 scans, the pulse width of the start pulse ST becomes 1/1 of the reference pulse width.
It will become longer by 6 times the width.
【0047】次に、図12におけるラインセンサ10に
ついて説明する。図15はこのラインセンサ10の構成
図であつて、101は画素部、102は読出しシフトレ
ジスタ、103は掃出しシフトレジスタ、104はサン
プルホールド回路、104aは前置増幅器、104bは
サンプルスイツチ、104cはコンデンサ、104dは
バツフア増幅器、105は8分周回路、106は掃出し
ラツチ回路、107は読出しラツチ回路、D1 〜Dn
はPN接合によるフォトダイオード、S11〜S1n,
S21〜S2nはMOSFETによるアナログスイツチ
である。また、図16は図15の各部の信号のタイミン
グ関係を示す図である。Next, the line sensor 10 shown in FIG. 12 will be explained. FIG. 15 is a configuration diagram of this line sensor 10, in which 101 is a pixel section, 102 is a readout shift register, 103 is a sweep shift register, 104 is a sample and hold circuit, 104a is a preamplifier, 104b is a sample switch, and 104c is a A capacitor, 104d is a buffer amplifier, 105 is an 8 frequency divider circuit, 106 is a sweep-out latch circuit, 107 is a read-out latch circuit, D1 to Dn
are photodiodes with PN junctions, S11 to S1n,
S21 to S2n are analog switches using MOSFETs. Further, FIG. 16 is a diagram showing the timing relationship of signals of each part in FIG. 15.
【0048】図15,図16において、1つのフォトダ
イオードDi(但し、iは1,2,……,n)と一対の
アナログスイツチS1i,S2iとの組で1つの画素を
構成しており、画素部101には、かかる画素がn個1
列に配列されている。アナログスイツチS1iは掃出し
シフトレジスタ103によつてオン,オフ制御され、ア
ナログスイツチS2iは読出しシフトレジスタ102に
よつてオン,オフ制御される。In FIGS. 15 and 16, one pixel is composed of one photodiode Di (where i is 1, 2, . . . , n) and a pair of analog switches S1i, S2i. The pixel unit 101 has n such pixels1.
arranged in columns. The analog switch S1i is controlled on and off by the sweep shift register 103, and the analog switch S2i is controlled on and off by the read shift register 102.
【0049】分周回路11(図12)からのクロツクφ
1は8分周回路105で分周され、デユーテイ比1/2
のシフトクロツクφSHとデユーテイ比1/16のサン
プリングクロツクφSPとが形成される。サンプルホー
ルド回路104のサンプルスイツチ104bがこのサン
プリングクロツクφSPのパルス期間オンする。シフト
クロツクφSHは読出しシフトレジスタ102、掃出し
シフトレジスタ103および読出しラツチ回路107に
供給される。Clock φ from frequency dividing circuit 11 (FIG. 12)
1 is divided by an 8 frequency divider circuit 105, and the duty ratio is 1/2.
A shift clock φSH with a duty ratio of 1/16 and a sampling clock φSP with a duty ratio of 1/16 are formed. The sample switch 104b of the sample hold circuit 104 is turned on during the pulse period of the sampling clock φSP. Shift clock φSH is supplied to read shift register 102, sweep shift register 103 and read latch circuit 107.
【0050】スタートパルス発生回路7(図12)から
供給されるスタートパルスSTは“L”(低レベル)の
パルスであり、読出しラツチ回路107はスタートパル
スSTの立上りエツジ(後エツジ)でセツトされてこの
直後のシフトクロツクφSHの立上りエツジでリセツト
される。この読出しラツチ回路107の出力PRDは、
したがつて、スタートパルスSTの後エツジからその直
後のシフトクロツクφSHまでのパルス幅の“L”のパ
ルスである。このパルスPRDは読出しシフトレジスタ
102に供給される。掃出しラツチ回路106はスター
トパルスSTの立下りエツジ(前エツジ)でセツトされ
、読出しラツチ回路107の出力パルスPRDの立上り
エツジ(後エツジ)でリセツトされる。したがつて、こ
の掃出しラツチ回路106の出力PEXはスタートパル
スSTの前エツジから読出しラツチ回路107の出力パ
ルスPRDの後エツジまでの“L”のパルスである。The start pulse ST supplied from the start pulse generating circuit 7 (FIG. 12) is an "L" (low level) pulse, and the read latch circuit 107 is set at the rising edge (rear edge) of the start pulse ST. It is reset at the rising edge of the shift clock φSH immediately after the lever. The output PRD of this read latch circuit 107 is
Therefore, it is an "L" pulse with a pulse width from the trailing edge of the start pulse ST to the immediately following shift clock φSH. This pulse PRD is supplied to the read shift register 102. The sweep latch circuit 106 is set at the falling edge (front edge) of the start pulse ST, and reset at the rising edge (rear edge) of the output pulse PRD of the read latch circuit 107. Therefore, the output PEX of the sweep latch circuit 106 is an "L" pulse from the front edge of the start pulse ST to the rear edge of the output pulse PRD of the read latch circuit 107.
【0051】読出しラツチ回路107、掃出しラツチ回
路106がリセツト状態にあつて、“L”のパルスPR
D,PEXが出力されていないときには、読出しシフト
レジスタ102、掃出しシフトレジスタ103の全ての
出力は“H”(高レベル)であり、読出し用の各アナロ
グスイツチS2i(但し、i=1〜n)はオフ、掃出し
用の各アナログスイツチS1iはオンしている。かかる
状態を図17に示す。これにより、各フォトダイオード
Diのカソード側にアナログスイツチS1iを介して一
定のバイアス電圧+Vが印加され、各フォトダイオード
Diにその静電容量とバイアス電圧+Vで決まる量の電
荷が蓄積される。かかる状態が掃出し状態である。When the read latch circuit 107 and the sweep latch circuit 106 are in the reset state, the “L” pulse PR
When D and PEX are not output, all outputs of the read shift register 102 and sweep shift register 103 are "H" (high level), and each analog switch S2i for reading (where i = 1 to n) is off, and each sweep analog switch S1i is on. Such a state is shown in FIG. As a result, a constant bias voltage +V is applied to the cathode side of each photodiode Di via the analog switch S1i, and an amount of charge determined by the capacitance and the bias voltage +V is accumulated in each photodiode Di. This state is the sweeping state.
【0052】スタートパルスSTが供給され、その前エ
ツジのタイミングで掃出しラツチ回路106が“L”の
パルスPEXを出力すると、掃出しシフトレジスタ10
3では、このパルスPEXがシフトクロツクφSHによ
つて順次転送され、これにより、アナログスイツチS1
1,S12,……,S1nが順次シフトクロツクφSH
の1周期分ずつ遅れてオフしていく。各アナログスイツ
チS1iがオフする期間は掃出しラツチ回路106の出
力パルスPEXのパルス幅以上で、かつシフトクロツク
φSHの周期の整数倍のうちで最も短い期間である。こ
のように、アナログスイツチS2iがオフしているとき
にアナログスイツチS1iがオフする図18に示す状態
は画素電荷蓄積状態であり、フォトダイオードDiでは
、そこに入射される光の強度に応じた大きさの光電流が
流れ、PN接合部でのコンデンサの電荷が放電される。When the start pulse ST is supplied and the sweep latch circuit 106 outputs the "L" pulse PEX at the timing of the previous edge, the sweep shift register 10
3, this pulse PEX is sequentially transferred by the shift clock φSH, and thereby the analog switch S1
1, S12, ..., S1n are sequentially shift clocks φSH
It turns off with a delay of one period. The period during which each analog switch S1i is turned off is longer than the pulse width of the output pulse PEX of the sweep latch circuit 106 and is the shortest period among integral multiples of the period of the shift clock φSH. In this way, the state shown in FIG. 18 in which the analog switch S1i is off while the analog switch S2i is off is a pixel charge accumulation state, and the photodiode Di has a large amount of charge depending on the intensity of light incident thereon. A photocurrent flows, and the charge on the capacitor at the PN junction is discharged.
【0053】スタートパルスSTの後エツジで読出しラ
ツチ回路107から“L”のパルスPRDが出力される
と、読出しシフトレジスタ102では、このパルスPR
DがシフトクロツクφSHによつて順次シフトされ、ア
ナログスイツチS21,S22,……,S2nの順でシ
フトクロツクφSHの1周期分ずつオンする。i番目の
画素でのかかる状態を図19に示す。かかる状態が読出
し状態であり、フォトダイオードDiの蓄積電荷がアナ
ログスイツチS2iを介して読み出され、サンプルホー
ルド回路104に供給される。アナログスイツチS2i
がオンする期間はアナログスイツチS1iのオフ期間の
最後のシフトクロツクφSHの1周期分であり、アナロ
グスイツチS1i,S2iは同時にオフして図17に示
す掃出し状態に戻る。したがつて、フォトダイオードD
iから読み出される電荷量は図18の状態で放電がなさ
れたコンデンサの残りの電荷量に応じたものであり、受
光強度に応じたものとなる。When the “L” pulse PRD is output from the read latch circuit 107 at the edge after the start pulse ST, the read shift register 102 outputs this pulse PR.
D is sequentially shifted by the shift clock φSH, and the analog switches S21, S22, . Such a state at the i-th pixel is shown in FIG. This state is a read state, and the accumulated charge of the photodiode Di is read out via the analog switch S2i and supplied to the sample and hold circuit 104. Analog switch S2i
The period during which the analog switch S1i is turned on corresponds to one cycle of the shift clock φSH at the end of the off period of the analog switch S1i, and the analog switches S1i and S2i are turned off at the same time to return to the sweeping state shown in FIG. Therefore, photodiode D
The amount of charge read from i corresponds to the amount of remaining charge in the capacitor discharged in the state shown in FIG. 18, and corresponds to the intensity of the received light.
【0054】このようにして、フォトダイオードD1
,D2 ,……Dnの順にシフトクロツクφSHのタイ
ミングで画素電荷が読み出され、サンプルホールド回路
104に供給される。この読出しが終つた画素では、図
17の掃出し状態となり、フォトダイオードDiのカソ
ードにバイアス電圧+Vが印加されて再び充電が行なわ
れる。In this way, the photodiode D1
, D2, . The pixel after this reading is in the sweep state shown in FIG. 17, and the bias voltage +V is applied to the cathode of the photodiode Di to perform charging again.
【0055】各画素から読み出された電荷による信号B
S’は、サンプルホールド回路104において、前置増
幅器104aで増幅された後、サンプリングクロツクφ
SPで駆動されるサンプルスイツチ104bとコンデン
サ104cとによつてサンプルホールドされ、バツフア
増幅器104dを介し、ラインセンサ10の出力信号B
Sとなる。Signal B based on charges read out from each pixel
In the sample hold circuit 104, S' is amplified by the preamplifier 104a and then outputted to the sampling clock φ.
The output signal B of the line sensor 10 is sampled and held by a sample switch 104b driven by SP and a capacitor 104c, and is outputted via a buffer amplifier 104d.
It becomes S.
【0056】以上のように、かかるラインセンサ10に
おいては、各画素での画素電荷蓄積時間は掃出しラツチ
回路106の出力パルスPEXのパルス幅、したがつて
、スタートパルスSTのパルス幅に応じて異なり、この
画素電荷蓄積時間に応じて読み出される電荷量が異なる
。
このために、スタートパルスSTのパルス幅を変化させ
ることにより、ラインセンサ10の出力信号BSの大き
さを変化させることができる。As described above, in the line sensor 10, the pixel charge accumulation time in each pixel varies depending on the pulse width of the output pulse PEX of the sweep latch circuit 106, and therefore the pulse width of the start pulse ST. , the amount of charge read out varies depending on the pixel charge accumulation time. For this reason, by changing the pulse width of the start pulse ST, the magnitude of the output signal BS of the line sensor 10 can be changed.
【0057】ところで、全ての画素について読出しが完
了する前にスタートパルスSTが入力されると、異なる
2つの画素で同時に読出しが行なわれ、正常な読み出し
が行なわれなくなる。このために、図12において、1
走査カウンタ4が設けられており、これによつてライン
センサ10で全ての画素の読出しが完了したことが検出
され、この検出に基づいてスタートパルス発生回路7が
スタートパルスSTを発生するようにしている。By the way, if the start pulse ST is input before reading is completed for all pixels, reading will be performed simultaneously for two different pixels, and normal reading will not be performed. For this purpose, in FIG.
A scanning counter 4 is provided, whereby the line sensor 10 detects that reading of all pixels has been completed, and the start pulse generation circuit 7 generates a start pulse ST based on this detection. There is.
【0058】[0058]
【発明が解決しようとする課題】ところで、上記従来の
バーコードスキヤナにおいては、ラインセンサ10の走
査毎にスタートパルスSTのパルス幅を順次長くし、ラ
インセンサ10での画素電荷蓄積時間を順次増加させる
動作が繰り返すようにしている。これによると、次のよ
うな問題が生ずる。[Problems to be Solved by the Invention] In the conventional barcode scanner described above, the pulse width of the start pulse ST is sequentially lengthened every time the line sensor 10 scans, and the pixel charge accumulation time in the line sensor 10 is sequentially increased. The increasing action is repeated. According to this, the following problems arise.
【0059】すなわち、起動後、スタートパルスSTは
基準パルス幅から順次パルス幅が増加していき、バーコ
ードの読取りが良好に行なわれるようなパルス幅となつ
ていくのであるが、このようなパルス幅にスタートパル
スSTがなつたときにたまたまバーコードの読取りエラ
ーがあり、ラインセンサ10の出力信号BSのデコード
が不能となつた場合には、スタートパルスSTのパルス
幅はそのまま増加していつてしまい、再び良好なバーコ
ードの読取りができるようなパルス幅にスタートパルス
STがなるまで待たなければならない。すなわち、バー
コードの読取り時間が長くなり、操作性の上で問題とな
る。That is, after startup, the pulse width of the start pulse ST gradually increases from the reference pulse width until it reaches a pulse width that allows good barcode reading. If there happens to be a barcode reading error when the width of the start pulse ST becomes shorter, and the output signal BS of the line sensor 10 becomes impossible to decode, the pulse width of the start pulse ST continues to increase. , it is necessary to wait until the start pulse ST reaches a pulse width such that a good bar code can be read again. In other words, it takes a long time to read the barcode, which poses a problem in terms of operability.
【0060】これを解消するためには、ラインセンサ1
0の1回の走査に要する時間を短くすればよいが、この
ためには、発振回路13の出力クロツクの周波数を高く
しなければならない。しかしながら、クロツク周波数を
高くすると、発振回路13での消費電力が増加し、ポー
タブル型のタツチ式バーコードスキヤナにおいては、電
池を内蔵して電源としていることから、特に問題となる
。また、ノイズ対策やラインセンサの感度の点からも問
題となる。In order to solve this problem, line sensor 1
The time required for one scan of 0 may be shortened, but for this purpose the frequency of the output clock of the oscillation circuit 13 must be increased. However, increasing the clock frequency increases power consumption in the oscillation circuit 13, which is particularly problematic in portable touch-type barcode scanners, which have a built-in battery as a power source. There are also problems in terms of noise countermeasures and line sensor sensitivity.
【0061】本発明の目的は、かかる問題を解消し、ラ
インセンサの駆動クロツクの周波数を高めることなく、
ラインセンサでの適正な画素電荷蓄積時間を迅速に設定
できるようにした光学読取装置を提供することにある。An object of the present invention is to solve this problem, and without increasing the frequency of the drive clock of the line sensor.
An object of the present invention is to provide an optical reading device that can quickly set an appropriate pixel charge accumulation time in a line sensor.
【0062】[0062]
【課題を解決するための手段】上記目的を達成するため
に、本発明は、ラインセンサの出力レベルの大小を検出
するレベル検出手段と、該レベル検出手段の検出出力に
応じてスタートパルスのパルス幅を増減するパルス幅設
定手段とを設け、該スタートパルスのパルス幅の増加量
と減少量とを異ならせる。[Means for Solving the Problems] In order to achieve the above object, the present invention provides level detection means for detecting the magnitude of the output level of a line sensor, and a pulse of a start pulse according to the detection output of the level detection means. A pulse width setting means for increasing or decreasing the width is provided, and the amount of increase and amount of decrease in the pulse width of the start pulse are made different.
【0063】[0063]
【作用】ラインセンサの出力レベルは、ラインセンサの
出力信号がデコード可能であるか否かにかかわらず、レ
ベル検出手段でその大小が検出され、スタートパルスが
この検出結果に応じたパルス幅に設定される。このため
に、ラインセンサの出力レベルは、その出力信号が一旦
2値化するのに適正なレベルとなると、デコードが不能
であつても、その適正なレベル状態に維持される。[Operation] Regardless of whether or not the output signal of the line sensor can be decoded, the output level of the line sensor is detected by the level detection means, and the start pulse is set to a pulse width according to this detection result. be done. For this reason, once the output level of the line sensor reaches an appropriate level for binary conversion, the output level of the line sensor is maintained at that appropriate level even if decoding is impossible.
【0064】また、起動時にラインセンサの出力レベル
が該適正なレベルからずれていても、レベル検出手段と
パルス幅設定手段とにより、この出力レベルは大きく変
化して適正なレベルに近づき、適正なレベルに近づくと
、小さく変化して適正レベル近傍に設定される。Furthermore, even if the output level of the line sensor deviates from the appropriate level at the time of startup, the level detection means and the pulse width setting means will change this output level significantly and approach the appropriate level. When it approaches the level, it changes slightly and is set near the appropriate level.
【0065】[0065]
【実施例】以下、本発明の実施例を図面によつて説明す
る。図1,図2は本発明による光学読取装置の一実施例
を示すブロツク図であつて、8’はパルス幅設定回路、
9はレベル検出回路であり、図12,図13に対応する
部分には同一符号をつけて重複する説明を省略する。Embodiments Hereinafter, embodiments of the present invention will be explained with reference to the drawings. 1 and 2 are block diagrams showing an embodiment of an optical reading device according to the present invention, in which 8' is a pulse width setting circuit;
Reference numeral 9 denotes a level detection circuit, and parts corresponding to those in FIGS. 12 and 13 are given the same reference numerals and redundant explanations will be omitted.
【0066】図1において、ラインセンサ10の出力信
号BSはレベル検出回路9にも供給される。このレベル
検出回路9においては、ラインセンサ10の出力信号B
Sが二値化回路14で確実に2値化できるレベル範囲の
中心となる基準レベルV0 が設定されており、ライン
センサ10の出力信号BSがエンベロープ検波されてそ
のエンベロープレベルと基準レベルV0 とが比較され
、その結果、エンベロープレベル≦V0 のとき“L”
、エンベロープレベル>V0 のとき“H”となる検出
信号LSが出力される。この検出信号LSとマージン判
定部211で発生される開始信号MSTはパルス幅設定
回路8’に供給される。In FIG. 1, the output signal BS of the line sensor 10 is also supplied to the level detection circuit 9. In this level detection circuit 9, the output signal B of the line sensor 10 is
A reference level V0, which is the center of the level range in which S can be reliably binarized by the binarization circuit 14, is set, and the output signal BS of the line sensor 10 is envelope-detected, and the envelope level and the reference level V0 are The result is “L” when envelope level ≦V0.
, a detection signal LS that becomes "H" when the envelope level>V0 is output. This detection signal LS and the start signal MST generated by the margin determining section 211 are supplied to the pulse width setting circuit 8'.
【0067】パルス幅設定回路8’はスタートパルス発
生回路7で発生されるスタートパルスSTのパルス幅を
決めるものであつて、この光学読取装置が初期状態にあ
るときには、レベル検出回路9に設定されている基準レ
ベルに対応する初期値、すなわち、設計上、理想的なバ
ーコード6を読み取つたときに、ラインセンサ10の出
力信号BSのエンベロープレベルがこの基準レベルV0
と一致するようなスタートパルスSTのパルス幅が決
められるが、このパルス幅を生じさせる初期値がパルス
幅設定回路8’に設定され、パルス幅設定値NSTとし
てスタートパルス発生回路7に送られる。したがつて、
スタートパルス発生回路7から最初に出力されるスター
トパルスSTのパルス幅はこの初期値に応じたものであ
る。The pulse width setting circuit 8' determines the pulse width of the start pulse ST generated by the start pulse generation circuit 7, and when this optical reading device is in the initial state, the pulse width is set in the level detection circuit 9. In other words, when reading the ideal barcode 6, the envelope level of the output signal BS of the line sensor 10 reaches this reference level V0.
The pulse width of the start pulse ST is determined so as to match the pulse width, and the initial value that produces this pulse width is set in the pulse width setting circuit 8' and sent to the start pulse generation circuit 7 as the pulse width setting value NST. Therefore,
The pulse width of the start pulse ST that is first output from the start pulse generation circuit 7 corresponds to this initial value.
【0068】ラインセンサ10によるバーコード6の読
取りが行なわれ、その出力信号BSのエンベロープレベ
ルがレベル検出回路9で基準レベルV0 と比較される
が、エンベロープレベル≦V0 で“L”の検出信号L
sがレベル検出回路9から出力されると、パルス幅設定
回路8’は、マージン判定部211からの開始信号MS
Tのタイミングでこれまで設定されている値よりも大き
い値をパルス幅設定値NSTとして出力し、次のスター
トパルスSTのパルス幅を増加させる。これに対し、エ
ンベロープレベル>V0 で“H”の検出信号Lsがレ
ベル検出回路9から出力されるときには、同様にして、
パルス幅設定回路8’はパルス幅設定値NSTをこれま
でよりも小さくし、スタートパルスSTのパルス幅を減
少させる。The barcode 6 is read by the line sensor 10, and the envelope level of the output signal BS is compared with the reference level V0 in the level detection circuit 9. When the envelope level≦V0, the detection signal L is “L”.
When s is output from the level detection circuit 9, the pulse width setting circuit 8' receives the start signal MS from the margin determination section 211.
At timing T, a value larger than the previously set value is output as the pulse width setting value NST, and the pulse width of the next start pulse ST is increased. On the other hand, when the envelope level>V0 and the "H" detection signal Ls is output from the level detection circuit 9, similarly,
The pulse width setting circuit 8' makes the pulse width setting value NST smaller than before, and reduces the pulse width of the start pulse ST.
【0069】このように、ラインセンサ10の出力信号
BSのエンベロープレベルがレベル検出回路9の基準レ
ベルV0 に対して上下すると、パルス幅設定回路8’
により、スタートパルスSTのパルス幅が増減する。こ
れにより、ラインセンサ10の出力信号BSのエンベロ
ープレベルが基準レベルV0 近傍で変動し、この出力
信号BSが二値化回路14で確実に2値化されるのであ
るが、この場合、パルス幅設定回路8’のパルス幅設定
値NSTの変化によるスタートパルスSTのパルス幅の
増加量と減少量とは異なるようにする。これは次の理由
によるものである。In this way, when the envelope level of the output signal BS of the line sensor 10 goes up or down with respect to the reference level V0 of the level detection circuit 9, the pulse width setting circuit 8'
Accordingly, the pulse width of the start pulse ST increases or decreases. As a result, the envelope level of the output signal BS of the line sensor 10 fluctuates near the reference level V0, and this output signal BS is reliably binarized by the binarization circuit 14, but in this case, the pulse width setting The amount of increase and amount of decrease in the pulse width of the start pulse ST due to the change in the pulse width setting value NST of the circuit 8' are set to be different. This is due to the following reason.
【0070】光学読取装置の初期状態でパルス幅設定回
路8’に上記の初期値が設定されても、媒体5に対する
バーコード6のコントラストや照光部2による照射光量
などの原因により、ラインセンサ10の出力信号BSの
エンベロープレベルがレベル検出回路9の基準レベルV
0 と大きく異なる場合もある。このような場合、パル
ス幅設定回路8’が出力するパルス幅設定値NSTはラ
インセンサ10がバーコード6を走査する毎に順次変化
していくが、エンベロープレベルが基準レベルV0近傍
に達するまでの期間を短くするために、この場合のパル
ス幅設定値NSTの変化量を大きくした方がよい。その
後、エンベロープレベルが基準レベルV0 を飛び越え
た場合、エンベロープレベルは基準レベルV0 の方に
変化することになるが、この変化量を小さくすることに
より、エンベロープレベルは基準レベルV0から大きく
離れることはない。これによつて再びエンベロープレベ
ルが基準レベルV0 を越えると、エンベロープレベル
は大きく変化して基準レベルV0 を再び越えるが、ま
た基準レベルV0 の方に戻つてくる。このようにして
、初期状態からラインセンサ10の出力信号BSは急速
にかつ確実に2値化されるレベルとなり、その後はこの
状態が保たれる。Even if the above-mentioned initial value is set in the pulse width setting circuit 8' in the initial state of the optical reading device, the line sensor 10 may be The envelope level of the output signal BS is the reference level V of the level detection circuit 9.
It may be significantly different from 0. In such a case, the pulse width setting value NST output by the pulse width setting circuit 8' changes sequentially every time the line sensor 10 scans the barcode 6, but the pulse width setting value NST output by the pulse width setting circuit 8' changes sequentially every time the line sensor 10 scans the barcode 6. In order to shorten the period, it is better to increase the amount of change in the pulse width setting value NST in this case. After that, if the envelope level jumps over the reference level V0, the envelope level will change toward the reference level V0, but by reducing the amount of change, the envelope level will not deviate greatly from the reference level V0. . As a result, when the envelope level exceeds the reference level V0 again, the envelope level changes greatly and exceeds the reference level V0 again, but returns to the reference level V0 again. In this way, the output signal BS of the line sensor 10 quickly and reliably reaches a level that can be binarized from the initial state, and this state is maintained thereafter.
【0071】なお、図2の部分は従来の図13で示す部
分と同じであるので、説明を省略する。Note that the portion shown in FIG. 2 is the same as the conventional portion shown in FIG. 13, so a description thereof will be omitted.
【0072】図3は上記の動作によるエンベロープレベ
ルの変化を示すものであり、BS(0)が初期状態(ラ
インセンサ10の1回目のバーコード走査)でのエンベ
ロープレベルを表わしている。また、エンベロープレベ
ルの増加量は減少量の2倍としている。この場合には、
エンベロープレベルがBS(0)からBS(1)と変化
し、BS(2)と変化したとき基準レベルV0 よりも
大きくなる。そこで、エンベロープレベルはBS(3)
と減少し、次にBS(4)と減少したとき基準レベルV
0 よりも小さくなる。このために、再びエンベロープ
レベルはBS(5)と増加する。以下、ラインセンサ1
0がバーコード6の読取り走査を繰り返す限りこの動作
が繰り返され、このラインセンサ10の出力信号BSの
エンベロープレベルは基準レベルV0 の近傍にある。FIG. 3 shows changes in the envelope level due to the above operation, and BS(0) represents the envelope level in the initial state (first barcode scanning of the line sensor 10). Further, the amount of increase in the envelope level is twice the amount of decrease. In this case,
When the envelope level changes from BS(0) to BS(1) and then to BS(2), it becomes larger than the reference level V0. Therefore, the envelope level is BS(3)
When it decreases to BS(4) and then decreases to BS(4), the reference level V
becomes smaller than 0. Therefore, the envelope level increases again to BS(5). Below, line sensor 1
This operation is repeated as long as 0 repeats the reading scan of the bar code 6, and the envelope level of the output signal BS of this line sensor 10 is near the reference level V0.
【0073】以上のように、この実施例では、ラインセ
ンサ10の出力レベルを検出してこれが2値化に良好な
レベルであるか否かを判定しながら、このライセンサ1
0の出力レベルを調整するものであるから、良好な2値
化処理状態でたまたまデコードが不能となつても、この
状態はそのまま維持され、直ちにデコードが行なわれる
。しかも、初期状態から確実に2値化処理が行なわれる
までの時間が短くて済むことになる。したがつて、上記
従来技術のように駆動クロツクの周波数を高めることな
く、バーコードの読取りが迅速に行なわれ、操作性が向
上するとともに、消費電力の増大化も防ぐことができる
。As described above, in this embodiment, while detecting the output level of the line sensor 10 and determining whether or not this is a suitable level for binarization,
Since the output level of 0 is adjusted, even if decoding happens to become impossible in a good binarization processing state, this state will be maintained and decoding will be performed immediately. Moreover, the time required from the initial state until the binarization process is reliably performed can be shortened. Therefore, the bar code can be read quickly without increasing the frequency of the driving clock as in the prior art, improving operability and preventing an increase in power consumption.
【0074】図4は図1におけるパルス幅設定回路8’
の一具体例を示すブロツク図であつて、86,87は定
数メモリ、88はスイツチ、89は制御回路であり、図
14に対応する部分には同一符号をつけている。FIG. 4 shows the pulse width setting circuit 8' in FIG.
14 is a block diagram showing a specific example, in which 86 and 87 are constant memories, 88 is a switch, and 89 is a control circuit, and parts corresponding to those in FIG. 14 are given the same reference numerals.
【0075】同図において、定数メモリ81には上記の
初期値が格納されており、定数メモリ86にはこの初期
値の1/8倍の値(以下、1/8値という)が、定数メ
モリ87にはこの初期値の−1/16倍の値(以下、−
1/16値という)が夫々格納されている。制御回路8
9はレベル検出回路9(図1)からの検出信号Lsに応
じてマージン判定部211(図1)からの開始信号MS
Tのタイミングで動作し、スイツチ88を制御して定数
メモリ86の1/8値もしくは定数メモリ87の−1/
16値を加算器84に供給する。加算器84はこれと設
定値メモリ85からのパルス幅設定値NSTとを加算し
、設定値メモリ85に書き込んでパルス幅設定値NST
を更新する。In the figure, the above initial value is stored in constant memory 81, and a value 1/8 times this initial value (hereinafter referred to as 1/8 value) is stored in constant memory 86. 87 has a value -1/16 times this initial value (hereinafter -
1/16 value) are stored respectively. Control circuit 8
9 is a start signal MS from the margin determination section 211 (FIG. 1) in response to the detection signal Ls from the level detection circuit 9 (FIG. 1).
It operates at timing T and controls the switch 88 to set the value of 1/8 of the constant memory 86 or -1/ of the constant memory 87.
16 values are provided to adder 84. The adder 84 adds this and the pulse width setting value NST from the setting value memory 85 and writes it to the setting value memory 85 to obtain the pulse width setting value NST.
Update.
【0076】初期状態では定数メモリ81の初期値が設
定値メモリ85に書き込まれ、この初期値がパルス幅設
定値NSTとして加算器84とスタートパルス発生回路
7(図1)とに供給される。In the initial state, the initial value of constant memory 81 is written into setting value memory 85, and this initial value is supplied as pulse width setting value NST to adder 84 and start pulse generating circuit 7 (FIG. 1).
【0077】検出信号Lsが“L”であるときには、制
御回路89により、開始信号MSTのタイミングでスイ
ツチ88は定数メモリ86の1/8値を選択し、加算器
84はこれとパルス幅設定値NSTとを加算して設定値
メモリ85に書き込み、パルス幅設定値NSTを初期値
の1/8倍の値だけ大きくする。検出信号Lsが“H”
のときには、同様にして、スイツチ88は定数メモリ8
7の−1/16値を選択し、加算器84はこれとパルス
幅設定値NSTと加算して設定値メモリ85に書き込む
。これにより、パルス幅設定値NSTは初期値の1/1
6倍の値分小さくなる。When the detection signal Ls is "L", the control circuit 89 causes the switch 88 to select the 1/8 value of the constant memory 86 at the timing of the start signal MST, and the adder 84 selects this and the pulse width setting value. NST is added and written into the setting value memory 85, and the pulse width setting value NST is increased by a value 1/8 times the initial value. Detection signal Ls is “H”
Similarly, the switch 88 stores the constant memory 8.
The adder 84 adds this to the pulse width setting value NST and writes the result into the setting value memory 85. As a result, the pulse width setting value NST becomes 1/1 of the initial value.
It becomes smaller by 6 times the value.
【0078】以上説明した実施例は、レベル検出回路9
に基準レベルV0を設けてラインセンサ10の出力レベ
ルを判定したが、このラインセンサ10の出力信号BS
が確実に2値化可能なレベル範囲を設定し、これによつ
てラインセンサ10の出力レベルを判定するようにして
もよい。以下、このための実施例を説明する。In the embodiment described above, the level detection circuit 9
The output level of the line sensor 10 was determined by setting a reference level V0 to the output signal BS of the line sensor 10.
A level range that can be reliably binarized may be set, and the output level of the line sensor 10 may be determined based on this. Examples for this purpose will be described below.
【0079】図5はかかる実施例の一例を示すものであ
つて、7’,8”はカウンタ、9’は振幅比較器、34
は図1,図2のエツジ検出回路18以降の処理回路から
なるデコーダ、35はデコーダである。FIG. 5 shows an example of such an embodiment, in which 7' and 8'' are counters, 9' is an amplitude comparator, and 34
1 and 2 is a decoder consisting of a processing circuit after the edge detection circuit 18, and 35 is a decoder.
【0080】図5において、振幅比較器9’は図1のレ
ベル検出回路9に対応し、カウンタ8”、カウンタ7’
は夫々図1のパルス幅設定回路8’、スタートパルス発
生回路7に対応する。In FIG. 5, the amplitude comparator 9' corresponds to the level detection circuit 9 of FIG.
correspond to the pulse width setting circuit 8' and the start pulse generation circuit 7 in FIG. 1, respectively.
【0081】ラインセンサ10の出力信号BSは二値化
回路14で2値化され、デコーダ34に供給されるとと
もに、振幅比較器9’に供給され、二値化回路14から
2値化された“H”のパルスが出力されると、このタイ
ミングで予め設定されている基準値VH,VL(但し、
VH>VL)と振幅比較される。これら基準値VH,V
Lはラインセンサ10の出力信号を良好にデコードし得
るこの出力信号BSの適正な振幅範囲を決めるものであ
つて、VH>BS>VLのとき信号BSの振幅は適正と
する。二値化回路14の閾値VTHは、VTH<VLで
ある。The output signal BS of the line sensor 10 is binarized by the binarization circuit 14, and is supplied to the decoder 34, as well as to the amplitude comparator 9', where it is binarized by the binarization circuit 14. When the “H” pulse is output, the preset reference values VH and VL (however,
The amplitude is compared with VH>VL). These reference values VH, V
L determines the appropriate amplitude range of the output signal BS that can satisfactorily decode the output signal of the line sensor 10, and when VH>BS>VL, the amplitude of the signal BS is appropriate. The threshold value VTH of the binarization circuit 14 satisfies VTH<VL.
【0082】振幅比較器9’は、信号BSが小振幅で二
値化回路14から“H”の出力パルスが出力されないと
き、あるいは、この“H”のパルスのタイミングで少な
くともラインセンサ10の出力信号BSにVL≧BSと
なる部分があるときには、アツプ信号UPを出力し、カ
ウンタ8”のカウント値をK1(>1)倍し、また、信
号BSが大振幅で二値化回路14の“H”の出力パルス
のタイミングでラインセンサ10の出力信号BSにBS
≧VHとなる部分があるときには、ダウン信号DOWN
を出力し、カウンタ8”のカウント値を1/K2 (但
し、K2 >1)倍し、VH>BS>VLのときにはい
ずれの信号も出力せず、カウンタ8”に同じカウント値
を保持させる。振幅比較器9’のこれら出力信号UP,
DOWNはスタートパルスSTによつてクリアされる。The amplitude comparator 9' detects at least the output of the line sensor 10 when the signal BS has a small amplitude and no "H" output pulse is output from the binarization circuit 14, or at the timing of this "H" pulse. When the signal BS has a portion where VL≧BS, the up signal UP is output, the count value of the counter 8" is multiplied by K1 (>1), and when the signal BS has a large amplitude, the " BS to the output signal BS of the line sensor 10 at the timing of the output pulse of "H".
When there is a part where ≧VH, the down signal DOWN
is output and the count value of the counter 8'' is multiplied by 1/K2 (K2>1), and when VH>BS>VL, no signal is output and the counter 8'' is held at the same count value. These output signals UP of the amplitude comparator 9',
DOWN is cleared by start pulse ST.
【0083】カウンタ7’は、カウンタ8”のカウント
値がプリセツトされ、このプリセツト値からクロツクφ
1をカウントする。このカウント値はデコーダ35に供
給される。このデコーダ35はカウンタ7’のカウント
値がプリセツト値から第1の規定値まで期間“L”の信
号を出力し、この第1の規定値を越えると、“H”の信
号を出力する。デコーダ35から出力されるこの“L”
の信号がスタートパルスSTである。このスタートパル
スSTの立上りエツジ(後エツジ)でカウンタ7’がカ
ウンタ8”のカウント値をプリセツト値としてロードし
、これより第2の規定値までクロツクφ1をカウントす
ると、このプリセツト値から再びクロツクφ1をカウン
トし始める。カウンタ7’がプリセツト値からクロツク
φ1をカウント開始する毎にデコーダ35からスタート
パルスSTが出力され、このスタートパルスSTのパル
ス幅は、前回発生したスタートパルスSTの後エツジタ
イミングでカウンタ7’にプリセツトされたカウンタ8
”のカウント値に応じたものとなる。The counter 7' is preset with the count value of the counter 8'', and the clock φ is calculated from this preset value.
Count 1. This count value is supplied to the decoder 35. The decoder 35 outputs an "L" signal for a period from the preset value to the first specified value, and outputs an "H" signal when the count value of the counter 7' exceeds the first specified value. This “L” output from the decoder 35
The signal is the start pulse ST. At the rising edge (rear edge) of this start pulse ST, the counter 7' loads the count value of the counter 8'' as a preset value, and when the clock φ1 is counted up to the second specified value, the clock φ1 is started again from this preset value. Each time the counter 7' starts counting clock φ1 from the preset value, a start pulse ST is output from the decoder 35, and the pulse width of this start pulse ST is determined by the edge timing after the previously generated start pulse ST. Counter 8 preset to counter 7'
” according to the count value.
【0084】ここで、カウンタ7’のプリセツト値から
上記第1の規定値までのクロツクφ1のカウント値をm
、プリセツト値から上記第2の規定値までのクロツクφ
1のカウント値をn、クロツクφ1の周期をTφとする
と、スタートパルスSTのパルス幅はm・Tφ、周期は
n・Tφとなり、いずれもカウンタ7’のプリセツト値
に応じて異なる。但し、(n−m)は一定であり、これ
はラインセンサ10の画素数に一致する。Here, the count value of the clock φ1 from the preset value of the counter 7' to the above-mentioned first specified value is expressed as m.
, the clock φ from the preset value to the second specified value
When the count value of 1 is n and the period of clock φ1 is Tφ, the pulse width of the start pulse ST is m·Tφ and the period is n·Tφ, both of which differ depending on the preset value of the counter 7'. However, (n-m) is constant and corresponds to the number of pixels of the line sensor 10.
【0085】いま、カウンタ7’がアツプカウンタであ
つて、そのプリセツト値を負値とし、上記第1の規定値
を零とすると、このプリセツト値がK1 倍になつたと
きには、スタートパルスSTのパルス幅はK1 倍とな
り、プリセツト値が1/K2 倍になつたときには、ス
タートパルスSTのパルス幅も1/K2 倍となる。Now, if the counter 7' is an up counter and its preset value is a negative value and the first specified value is zero, then when this preset value becomes K1 times as high, the pulse of the start pulse ST The width becomes K1 times, and when the preset value becomes 1/K2 times, the pulse width of the start pulse ST also becomes 1/K2 times.
【0086】初期状態では、カウンタ8”に初期値が格
納されており、この初期値がカウンタ7’にプリセツト
されている。これにより、デコーダ35からはこの初期
値に応じた基準パルス幅のスタートパルスSTが出力さ
れ、その後、ラインセンサ10の走査毎にカウンタ8”
のカウント値が変化してスタートパルスSTのパルス幅
が増減する。In the initial state, the initial value is stored in the counter 8'', and this initial value is preset in the counter 7'.Thereby, the decoder 35 starts the reference pulse width according to this initial value. The pulse ST is output, and after that, the counter 8'' is output every time the line sensor 10 scans.
The count value changes and the pulse width of the start pulse ST increases or decreases.
【0087】ここで、K1 >K2 とする。カウンタ
8”に設定される初期値はスタートパルスSTのパルス
幅を最小とするものとすると、ラインセンサ10の1回
目の走査では、振幅比較器9’はアツプ信号UPを出力
し、カウンタ8”のカウント値をK1 倍する。そして
、BS>VLとなるまでカウント値を順次K1 倍して
いく。この場合、カウント値が大きくなるにつれてカウ
ント値の変化量、すなわち、スタートパルスSTのパル
ス幅の変化量は順次大きくなる。カウンタ8”のカウン
ト値をK1 倍した結果、VH>BS>VLとならず、
直接BS≧VHとなつたとすると、振幅比較器9’はダ
ウン信号DOWNを出力し、カウンタ8”のカウント値
を1/K2 倍する。この場合、この1/K2 倍して
得られるカウント値はその直前のK1 倍する元のカウ
ント値よりも大きい。たとえば、いま、カウンタ8”の
カウント値をN(0)とし、これをK1 倍すると、カ
ウント値はK1 ・N(0)となる。このカウント値K
1 ・N(0)を1/K2 倍すると、K1 /K2
>1であるから、K1 ・N(0)×1/K2 >N(
0)となる。つまり、スタートパルスSTのパルス幅を
順次増加させた結果、ラインセンサ10の出力信号BS
の振幅が振幅比較器9’で規定される適正な振幅範囲を
越えると、このパルス幅は最後の増加量よりも小さい量
だけ減少させられる。このことから、スタートパルスS
Tのパルス幅は迅速に適正な範囲に入り込むことになる
。Here, it is assumed that K1 >K2. Assuming that the initial value set in the counter 8'' is the minimum pulse width of the start pulse ST, in the first scan of the line sensor 10, the amplitude comparator 9' outputs an up signal UP, and the counter 8'' Multiply the count value by K1. Then, the count value is successively multiplied by K1 until BS>VL. In this case, as the count value increases, the amount of change in the count value, ie, the amount of change in the pulse width of the start pulse ST, gradually increases. As a result of multiplying the count value of counter 8'' by K1, VH>BS>VL does not hold.
If BS≧VH directly, the amplitude comparator 9' outputs a down signal DOWN and multiplies the count value of the counter 8'' by 1/K2. In this case, the count value obtained by multiplying by 1/K2 is It is larger than the original count value multiplied by K1 immediately before.For example, if the count value of counter 8'' is now N(0) and this is multiplied by K1, the count value becomes K1·N(0). This count value K
1 ・When N(0) is multiplied by 1/K2, K1 /K2
>1, so K1 ・N(0)×1/K2 >N(
0). That is, as a result of sequentially increasing the pulse width of the start pulse ST, the output signal BS of the line sensor 10
If the amplitude of the pulse exceeds the proper amplitude range defined by the amplitude comparator 9', the pulse width is decreased by an amount less than the last increase. From this, the start pulse S
The pulse width of T will quickly fall into an appropriate range.
【0088】図6はカウンタ9’のプリセツト値の変化
を示すものであつて、初期値N(0)を2、ラインセン
サ10の出力信号BSのレベルが基準レベルVL〜VH
で決まる範囲内にあるためのプリセツト値の範囲を4〜
5とし、K1 =3,K2 =2としている。この場合
には、N(1)=6,N(2)=3,N(2)=3,N
(3)=9,N(4)=4.5である。FIG. 6 shows changes in the preset value of the counter 9', where the initial value N(0) is set to 2 and the level of the output signal BS of the line sensor 10 is set to the reference level VL to VH.
The range of preset values to be within the range determined by
5, K1 = 3, and K2 = 2. In this case, N(1)=6, N(2)=3, N(2)=3, N
(3)=9, N(4)=4.5.
【0089】図7は図5を変形した実施例を示すもので
あり、振幅比較器9’からダウン信号DOWNのみが出
力されるようにし、アツプ信号UPはデコーダ34のデ
コードエラー信号から形成するようにしたものである。
すなわち、ラインセンサ10の出力信号BSのレベルが
小さいときには、振幅比較器9’の出力信号は“L”で
あり、ダウン信号DOWNは出力されていない。この“
L”の出力信号はインバータ36で“H”となり、アン
ドゲート37に出力される。このとき、ラインセンサ1
0の出力信号BSのレベルが小さ過ぎてデコーダ34が
二値化回路14の出力をデコード不能なときには、デコ
ーダ34は“H”のデコードエラー信号DERをアンド
ゲート37に出力する。これにより、アンドゲート37
からは、“H”の信号が出力され、アツプ信号UPとし
てカウンタ8”に供給される。FIG. 7 shows an embodiment modified from FIG. 5, in which only the down signal DOWN is output from the amplitude comparator 9', and the up signal UP is formed from the decoding error signal of the decoder 34. This is what I did. That is, when the level of the output signal BS of the line sensor 10 is low, the output signal of the amplitude comparator 9' is "L", and the down signal DOWN is not output. this"
The output signal of "L" becomes "H" by the inverter 36 and is output to the AND gate 37. At this time, the line sensor 1
When the level of the output signal BS of 0 is too low and the decoder 34 cannot decode the output of the binarization circuit 14, the decoder 34 outputs a decoding error signal DER of "H" to the AND gate 37. As a result, and gate 37
An "H" signal is output from the counter 8 and is supplied to the counter 8 as an up signal UP.
【0090】また、図8に示すように、振幅比較器9’
は基準レベルVLのみが設定されてアツプ信号UPのみ
をカウンタ8”に供給し、カウンタ8”へのダウン信号
DOWNは、図7のようにして、デコーダ34が出力す
るデコードエラー信号DERから形成するようにしても
よい。Furthermore, as shown in FIG. 8, the amplitude comparator 9'
Only the reference level VL is set and only the up signal UP is supplied to the counter 8'', and the down signal DOWN to the counter 8'' is formed from the decoding error signal DER output from the decoder 34 as shown in FIG. You can do it like this.
【0091】なお、図7,図8におけるデコードエラー
信号DERとしては、図2におけるエラー処理回路29
が出力するキヤラクタ変換リセツト信号CERTなどを
用いることができる。Note that the decoding error signal DER in FIGS. 7 and 8 is the error processing circuit 29 in FIG.
The character conversion reset signal CERT outputted by CERT can be used.
【0092】また、上記各実施例の説明で挙げた数値は
単なる一例にすぎず、本発明はこれら数値によつて限定
されるものではない。Furthermore, the numerical values given in the description of each of the above embodiments are merely examples, and the present invention is not limited to these numerical values.
【0093】[0093]
【発明の効果】本発明は、受光結果を検出レベル判定手
段の大小判定に基づいてパルス幅の可変量を減少量と増
加量とで異なるように、パルス幅制御信号を設定して蓄
積時間を制御して感度調整するので、復号可能な2値化
信号を得るまでの時間が長くなることがなく、復号成功
までに時間が短くなるので操作性が著しく向上し、かつ
、駆動クロック周波数を高くする必要がないので、低消
費電力型で低価格の光学読取装置を提供することが出来
る等の効果も奏する。Effect of the Invention The present invention sets the pulse width control signal so that the variable amount of the pulse width is different between the amount of decrease and the amount of increase based on the magnitude determination of the detection level determination means for the light reception result. Since the sensitivity is controlled and adjusted, it does not take long to obtain a decodable binary signal, and the time required for successful decoding is shortened, significantly improving operability and increasing the drive clock frequency. Since there is no need to do so, it is possible to provide an optical reading device with low power consumption and low cost.
【図1】本発明による光学読取装置の第1の実施例の一
部を示すブロツク図である。FIG. 1 is a block diagram showing a part of a first embodiment of an optical reading device according to the present invention.
【図2】本発明による光学読取装置の第1の実施例の残
りの部分を示すブロツク図である。FIG. 2 is a block diagram showing the remaining parts of the first embodiment of the optical reading device according to the invention;
【図3】図1におけるラインセンサの出力レベルの変化
を示す図である。FIG. 3 is a diagram showing changes in the output level of the line sensor in FIG. 1;
【図4】図1におけるパルス幅設定回路の一具体例を示
すブロツク図である。FIG. 4 is a block diagram showing a specific example of the pulse width setting circuit in FIG. 1;
【図5】本発明による光学読取装置の第2の実施例の要
部を示すブロツク図である。FIG. 5 is a block diagram showing the main parts of a second embodiment of the optical reading device according to the present invention.
【図6】図5におけるカウンタのプリセツト値の変化を
示す図である。FIG. 6 is a diagram showing changes in the preset value of the counter in FIG. 5;
【図7】本発明による光学読取装置の第3の実施例の要
部を示すブロツク図である。FIG. 7 is a block diagram showing the main parts of a third embodiment of the optical reading device according to the present invention.
【図8】本発明による光学読取装置の第4の実施例の要
部を示すブロツク図である。FIG. 8 is a block diagram showing the main parts of a fourth embodiment of an optical reading device according to the present invention.
【図9】従来の光学読取装置の一例の要部を示すブロツ
ク図である。FIG. 9 is a block diagram showing essential parts of an example of a conventional optical reading device.
【図10】図9でのクロツクとスタートパルスの関係を
示すタイミングチヤートである。FIG. 10 is a timing chart showing the relationship between the clock and start pulse in FIG. 9;
【図11】従来の光学読取装置の他の例の要部を示すブ
ロツク図である。FIG. 11 is a block diagram showing the main parts of another example of a conventional optical reading device.
【図12】図11に示す光学読取装置の一部を具体的に
示すブロツク図である。12 is a block diagram specifically showing a part of the optical reading device shown in FIG. 11. FIG.
【図13】図11に示す光学読取装置の他の部分を具体
的に示すブロツク図である。13 is a block diagram specifically showing other parts of the optical reading device shown in FIG. 11. FIG.
【図14】図12におけるパルス幅設定回路の一例を示
すブロツク図である。14 is a block diagram showing an example of the pulse width setting circuit in FIG. 12. FIG.
【図15】光学読取装置におけるラインセンサの構成を
示す図である。FIG. 15 is a diagram showing the configuration of a line sensor in the optical reading device.
【図16】図15における各部の信号を示すタイミング
チヤートである。16 is a timing chart showing signals of each part in FIG. 15. FIG.
【図17】図15での画素の掃出し状態を示す図である
。FIG. 17 is a diagram showing a pixel sweep state in FIG. 15;
【図18】図15での画素の信号電荷蓄積状態を示す図
である。18 is a diagram showing the signal charge accumulation state of the pixel in FIG. 15. FIG.
【図19】図15での画素の読出し状態を示す図である
。FIG. 19 is a diagram showing a read state of pixels in FIG. 15;
6 バーコード 7 スタートパルス発生回路 7’ カウンタ 8’ パルス幅設定回路 8” カウンタ 9 レベル検出回路 9’ 振幅比較器 10 ラインセンサ 14 二値化回路 34 デコーダ 6 Barcode 7 Start pulse generation circuit 7’ counter 8’ Pulse width setting circuit 8” counter 9 Level detection circuit 9’ Amplitude comparator 10 Line sensor 14 Binarization circuit 34 Decoder
Claims (1)
該表示部からの光量を複数の受光素子で受光してこの複
数の受光素子数に対応した数の蓄電素子に電荷を蓄積し
て、この蓄電素子の蓄電荷量に応じたレベルの検出信号
を順次出力するラインセンサと、該ラインセンサへ夫々
の前記受光素子からの蓄積時間をパルス幅で指定するス
タートパルス信号を供給するスタートパルス発生手段と
、該スタートパルス発生手段の動作基準時間を指定する
と共に、前記ラインセンサからの前記検出信号を順次読
み出す為の読出基準時間を指定する読取動作基準信号発
生手段と、前記スタートパルス発生手段のスタートパル
ス信号に基づいて前記ラインセンサから出力された前記
検出信号のレベルを基準値と比較してレベルの大小を判
定する検出レベル判定手段と、該検出レベル判定手段の
大小判定結果に基づいて前記スタートパルス発生手段が
出力する前記スタートパルスのパルス幅を減増するパル
ス幅設定手段と、該パルス幅設定手段へ前記検出レベル
判定手段の大判定と小判定に対応した前記スタートパル
スを異なるパルス幅の減少と増加量で設定させる為のパ
ルス幅制御信号を出力するパルス幅制御手段とを備え、
前記検出レベル判定手段の大小判定に対応した異なる減
少,増加量のパルス幅制御信号に従って前記スタートパ
ルスのパルス幅で複数回の読取走査を前記ラインセンサ
に行なわせるように構成したことを特徴とする光学読取
装置。Claim 1: A display section optically recorded on a medium;
The amount of light from the display section is received by a plurality of light-receiving elements, charges are accumulated in a number of power storage elements corresponding to the number of light-receiving elements, and a detection signal of a level corresponding to the amount of charge stored in the power storage elements is generated. A line sensor that sequentially outputs a line sensor, a start pulse generating means that supplies a start pulse signal to the line sensor that specifies the accumulation time from each of the light receiving elements by pulse width, and an operation reference time of the start pulse generating means is specified. Also, read operation reference signal generation means for specifying a read reference time for sequentially reading out the detection signals from the line sensor, and the detection output from the line sensor based on a start pulse signal of the start pulse generation means. detection level determination means for determining the magnitude of the level by comparing the level of the signal with a reference value; and reducing the pulse width of the start pulse output by the start pulse generation means based on the magnitude determination result of the detection level determination means. a pulse width setting means for increasing the pulse width, and a pulse width control signal for causing the pulse width setting means to set the start pulse corresponding to the large judgment and small judgment of the detection level judgment means with different pulse width reduction and increase amounts. and a pulse width control means for outputting,
The line sensor is characterized in that it is configured to cause the line sensor to perform a plurality of reading scans with the pulse width of the start pulse in accordance with pulse width control signals of different decrease and increase amounts corresponding to the magnitude determination of the detection level determination means. Optical reader.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP3048586A JP2779074B2 (en) | 1991-02-22 | 1991-02-22 | Optical reader |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP3048586A JP2779074B2 (en) | 1991-02-22 | 1991-02-22 | Optical reader |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH04268680A true JPH04268680A (en) | 1992-09-24 |
JP2779074B2 JP2779074B2 (en) | 1998-07-23 |
Family
ID=12807507
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP3048586A Expired - Fee Related JP2779074B2 (en) | 1991-02-22 | 1991-02-22 | Optical reader |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2779074B2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH07283480A (en) * | 1994-04-11 | 1995-10-27 | Nec Corp | Distributed feedback semiconductor laser |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS58129586A (en) * | 1982-01-27 | 1983-08-02 | Sharp Corp | Optical reader |
-
1991
- 1991-02-22 JP JP3048586A patent/JP2779074B2/en not_active Expired - Fee Related
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS58129586A (en) * | 1982-01-27 | 1983-08-02 | Sharp Corp | Optical reader |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH07283480A (en) * | 1994-04-11 | 1995-10-27 | Nec Corp | Distributed feedback semiconductor laser |
Also Published As
Publication number | Publication date |
---|---|
JP2779074B2 (en) | 1998-07-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US4538060A (en) | Optical reading apparatus having a reading sensor of electronic scanning type | |
US4516017A (en) | High-sensitive optical reading apparatus and method of reading optical information | |
US5406062A (en) | Sensitivity adjustment circuit for bar code scanner and method therefor | |
JP2834113B1 (en) | Code reading method and apparatus | |
US5196684A (en) | Method and apparatus for improving the throughput of a CCD bar code scanner/decoder | |
US5336874A (en) | Bar code reader with error detection and decode control | |
US4228468A (en) | Output correcting system for facsimile | |
US8373108B2 (en) | Indicia reading terminal operative for processing of frames having plurality of frame featurizations | |
US4567360A (en) | Optical reading apparatus | |
US4984285A (en) | Method of correcting shading phenomenon in optical character reader | |
GB2126041A (en) | Improvements in or relating to rangefinders | |
JPH04268680A (en) | Optical reader | |
JP2735667B2 (en) | Detection control circuit | |
EP0505970B1 (en) | White level detection circuit for an optical image reader | |
JP2897147B2 (en) | Optical information reader | |
JP2755529B2 (en) | Barcode scanner sensitivity adjustment circuit | |
JP3102252B2 (en) | Image reading device | |
JPS6023390B2 (en) | pattern reading device | |
JP2877724B2 (en) | Code reader | |
JPH0354510B2 (en) | ||
JP2752551B2 (en) | Barcode scanner sensitivity adjustment circuit | |
JPH0580860B2 (en) | ||
JP2742144B2 (en) | Optical reader | |
KR960035327A (en) | Code reading device | |
JPH0373081A (en) | Bar code scanner |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 19980421 |
|
LAPS | Cancellation because of no payment of annual fees |