JP2576370B2 - ID mark reading device - Google Patents

ID mark reading device

Info

Publication number
JP2576370B2
JP2576370B2 JP5192952A JP19295293A JP2576370B2 JP 2576370 B2 JP2576370 B2 JP 2576370B2 JP 5192952 A JP5192952 A JP 5192952A JP 19295293 A JP19295293 A JP 19295293A JP 2576370 B2 JP2576370 B2 JP 2576370B2
Authority
JP
Japan
Prior art keywords
mark
bit
digital value
decoding
decoding result
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP5192952A
Other languages
Japanese (ja)
Other versions
JPH0728924A (en
Inventor
優明 武井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
Nippon Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP5192952A priority Critical patent/JP2576370B2/en
Publication of JPH0728924A publication Critical patent/JPH0728924A/en
Application granted granted Critical
Publication of JP2576370B2 publication Critical patent/JP2576370B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、物体に付されたIDマ
ーク(識別用マーク)を読み取るためのIDマーク読み
取り装置に係り、特に、IDマークのリード、ライト機
能を有するシリアルプリンタに適した、IDマーク読み
取り装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an ID mark reading device for reading an ID mark (identification mark) attached to an object, and more particularly to a serial printer having a function of reading and writing ID marks. , An ID mark reading device.

【0002】[0002]

【従来の技術】図9はIDマークの形状を示す平面図で
ある。これはIDマークのリード、ライト機能を有する
シリアルプリンタに用いられるものであり、(A)は低
密度モード、(B)は高密度モードである。IDマーク
は、ビットマークM及びスペースSから構成されるとと
もに、スタートマーク1、ストップマーク2及びデータ
3に分けられる。データ3は可変長であり、低密度
モードでは1〜5バイトの情報を、高密度モードでは1
〜15バイトの情報を持たせることができる。データ
3の最後には必ず1バイト長のパリティ4が追加され、
データ3のチェックに用いられる。また、データ部3
におけるビットマークMをビットマーク5として示す
と、データ3の1バイトは、一定間隔に並ぶ8本の
ットマーク5構成されている。ビットマーク5は、例
えば黒く印刷されていればそのビットは「1」であり、
空白であれば「0」である。
2. Description of the Related Art FIG. 9 is a plan view showing the shape of an ID mark. This is used for a serial printer having an ID mark read / write function, where (A) is a low density mode and (B) is a high density mode. ID mark is composed of a bit marks M and spaces S Rutoto
Moni, start mark 1, stop mark 2 and data
Division 3 The data section 3 has a variable length and stores 1 to 5 bytes of information in the low-density mode and 1
Up to 15 bytes of information can be provided. A parity 4 of 1 byte length is always added at the end of the data section 3,
Used for checking the data section 3. Data part 3
Is shown as bit mark 5 in FIG.
When one byte of data unit 3, eight bi arranged at regular intervals
It is composed of Tsu door mark 5. Bit mark 5 is an example
For example, if it is printed in black, the bit is “1”,
If it is blank, it is "0".

【0003】従来のこの種のIDマーク読み取り装置で
は、受光センサの出力を1または0の2値化を行う変換
回路を有しており、このハードウェア的に行われた2値
化結果をもとにデコードを行っていた。公知資料として
は、特開昭60−100272号公報等がある。
A conventional ID mark reader of this type has a conversion circuit for binarizing the output of the light receiving sensor into 1 or 0, and can also convert the result of the binarization performed by hardware. And decoding was done. Known materials include JP-A-60-100272.

【0004】[0004]

【発明が解決しようとする課題】このような従来のID
マーク読み取り装置では、受光センサによりIDマーク
を走査した結果が、ハードウェア的に行われた2値化デ
ータとして記憶される。そのため、2値化処理がうまく
行かなかった場合は、もう一度読み直しを行うしかなか
った。
SUMMARY OF THE INVENTION Such a conventional ID
In the mark reading device, the result of scanning the ID mark by the light receiving sensor is stored as binary data performed by hardware . Therefore, when the binarization process did not go well, the only way to reread was to do so.

【0005】また、受光センサの感度が劣化している、
用紙が汚れている、又は黒色以外の色の濃い用紙にID
マークが印刷されている場合は、IDマークを読み取っ
た際の受光センサ出力のダイナミックレンジが小さくな
る。しかし、このような場合にもハードウェア的に2値
化を行うために、1または0の判定しきい値を変更する
ことができず、読み取りができなくなるという問題があ
った。
[0005] Further, the sensitivity of the light receiving sensor is degraded.
ID on paper that is dirty or dark paper other than black
When the mark is printed, the dynamic range of the output of the light receiving sensor when the ID mark is read becomes small. However, even in such a case, since the binarization is performed by hardware , there is a problem that the determination threshold value of 1 or 0 cannot be changed and reading cannot be performed.

【0006】また、IDマークのスタートマークは用紙
の左上に印刷されるので、用紙の浮きにより受光センサ
の焦点が合わなくなりやすい。このような場合は、スタ
ートマークに対する受光センサ出力が変化しないため、
他のデータが全て正常であっても読み取りができないと
いう問題があった。
Also, since the start mark of the ID mark is printed on the upper left of the sheet, the focus of the light receiving sensor tends to be out of focus due to the floating of the sheet. In such a case, the output of the light receiving sensor with respect to the start mark does not change.
There is a problem that reading cannot be performed even if all other data is normal.

【0007】[0007]

【発明の目的】そこで、本発明は、受光センサの出力電
圧が全体的に上下にシフトしても正確なデコード結果が
得られる、IDデータ読み取り装置を提供することを目
的とする。また、本発明の他の目的は、デコード結果が
異常である場合にソフトウェア処理のみの再実行を可能
にすることを目的とする。
SUMMARY OF THE INVENTION It is an object of the present invention to provide an ID data reading apparatus capable of obtaining an accurate decoding result even when the output voltage of the light receiving sensor shifts up and down as a whole. Another object of the present invention is to enable re-execution of only software processing when a decoding result is abnormal.

【0008】[0008]

【課題を解決するための手段】上記目的を達成するため
に、この発明に係るIDマーク読み取り装置は、.論
理的な0又は1を意味するビットマークと このビット
マーク間のスペースとの位置が、スタートマー及びスト
ップマークの、位置から求められるIDマークに対し
て、このIDマークからの反射光を検出して微細幅毎に
電気信号に変換する受光センサと、前記電気信号を
2ビット以上のデジタル値に変換するA/Dコンバータ
と、前記デジタル値を格納する記憶手段と、
の記憶手段に格納された前記デジタル値を前記ビット
ーク及び前記スペース毎に平均化し、これらの平均化さ
れた前記ビットマークのデジタル値と当該ビットマーク
に隣接する前記スペースのデジタル値との差を求め、こ
の差としきい値とを比較して当該ビットマークを二値化
したデコード結果を出力するデコード手段と、前記
デコード結果が正常か否かを判定する判定手段と、
前記デコード結果が異常である場合に前記しきい値を変
更して再び前記デコード手段からデコード結果を出力さ
せるリトライ手段とを備えたものとした。
To achieve the above object, according to the Invention The, ID mark reading apparatus according to the present invention. Argument
A bit mark meaning a logical 0 or 1 and this bit
The position between the mark and the space
A light-receiving sensor that detects reflected light from the ID mark obtained from the position of the top mark and converts the reflected light into an electric signal for each fine width ; An A / D converter for converting the electric signal into a digital value of 2 bits or more ; Storage means for storing the digital value ; The digital value stored in the storage means averages for each of the bits Ma <br/> over click and the space, the digital value and the space adjacent to the bit mark of the bit marks are those averaging Decoding means for obtaining a difference from the digital value, comparing the difference with a threshold value, and outputting a binarized decoding result of the bit mark ; Determining means for determining whether the decoding result is normal ;
And retry means for changing the threshold value when the decoding result is abnormal and outputting the decoding result from the decoding means again.

【0009】また、前記記憶手段と前記リトライ手段と
を省き、前記デコード手段の代わりに、前記デジタル値
を前記ビットマーク及び前記スペース毎に平均化し、こ
れらの平均化された前記ビットマークのデジタル値と当
ビットマークに隣接する前記スペースのデジタル値と
の差を求め、この差としきい値とを比較して当該ビット
マークを二値化したデコード結果を出力するデコード手
段としてもよい。
Further, the storage means and the retry means are omitted, and the digital value is averaged for each of the bit mark and the space instead of the decoding means, and the averaged digital value of the bit mark is obtained. And a digital value of the space adjacent to the bit mark may be obtained, and the difference may be compared with a threshold value to output a decoding result obtained by binarizing the bit mark. .

【0010】[0010]

【作用】IDマークからの反射光は、受光センサにより
微細幅毎に電気信号に変換される。これらの電気信号
は、A/Dコンバータにより2ビット以上のデジタル値
に変換される。デコード手段では、IDマークのビット
マーク及びスペース毎に前記デジタル値が平均化され、
これら相互の差としきい値とが比較される。前記デジタ
ル値は2ビット以上の値であるから、前記差は多様な値
になる。そして、比較された結果に基づきデコード結果
が出力される。デジタル値の絶対値としきい値との比較
ではないので、すべてのデジタル値全体が上昇又は低下
しても、前記差が一定以上あればデコード結果が得られ
る。
The light reflected from the ID mark is converted into an electric signal for each fine width by the light receiving sensor. These electric signals are converted into digital values of 2 bits or more by an A / D converter. In the decoding means, the digital value is averaged for each bit mark and space of the ID mark,
These differences are compared with a threshold value. Since the digital value is a value of 2 bits or more, the difference has various values. Then, a decoding result is output based on the comparison result. Since it is not a comparison between the absolute value of the digital value and the threshold value, a decoding result can be obtained if the difference is equal to or more than a certain value even if all the digital values rise or fall.

【0011】また、記憶手段、判定手段、リトライ手段
等を付設したものは、判定手段がデコード結果を異常で
あると判定した場合に、リトライ手段がしきい値を変更
して、デコード手段が再び前記差と新たなしきい値とを
比較し、新たなデコード結果を出力する。
[0011] Further, in the case where storage means, determination means, retry means and the like are added, when the determination means determines that the decoding result is abnormal, the retry means changes the threshold value and the decoding means again. The difference is compared with a new threshold, and a new decoding result is output.

【0012】[0012]

【実施例】図1はこの発明に係るIDマーク読み取り装
置の原理構成図である。この発明に係るIDマーク読み
取り装置50は、IDマーク52からの反射光54を検
出して微細幅毎に電気信号に変換する受光センサ16
と、前記電気信号を2ビット以上のデジタル値に変換す
るA/Dコンバータ17と、前記デジタル値を格納する
記憶手段56と、記憶手段56に格納された前記デジタ
ル値をIDマーク52のビットマークM及びスペースS
毎に平均化しこれら相互の差としきい値とを比較してデ
コード結果を出力するデコード手段58と、前記デコー
ド結果が正常か否かを判定する判定手段60と、前記デ
コード結果が異常である場合に前記しきい値を変更して
再びデコード手段58からデコード結果を出力させるリ
トライ手段62とを備えたものである。
FIG. 1 is a block diagram showing the principle of an ID mark reading apparatus according to the present invention. The ID mark reading device 50 according to the present invention detects the reflected light 54 from the ID mark 52 and converts it into an electric signal for each fine width.
An A / D converter 17 for converting the electric signal into a digital value of 2 bits or more, a storage means 56 for storing the digital value, and a bit mark of the ID mark 52 for storing the digital value stored in the storage means 56 M and space S
A decoding means 58 for averaging each time and comparing the mutual difference with a threshold value and outputting a decoding result; a judging means 60 for judging whether or not the decoding result is normal; and a case where the decoding result is abnormal. And a retry means 62 for changing the threshold value and outputting the decoding result from the decoding means 58 again.

【0013】図2は本発明の一実施例を示すブロック図
である。この図において、図1における記憶手段56は
印字バッファ18によって実現され、図1におけるデコ
ード手段58、判定手段60及びリトライ手段62はホ
ストCPU6、プリンタCPU9等によって実現されて
いる。
FIG. 2 is a block diagram showing an embodiment of the present invention. In this figure, the storage means 56 in FIG. 1 is realized by the print buffer 18, and the decoding means 58, the judgment means 60 and the retry means 62 in FIG. 1 are realized by the host CPU 6, the printer CPU 9, and the like.

【0014】ホストCPU6よりIDマークリードコマ
ンドが送られると、印字制御部7は機構制御部8に対し
IDマークのリードの実行を促す。これを受けて機構制
御部8は、受光センサ16をONし、スペーシングモー
タドライバ11を介してスぺーシングモータ14を動か
し、IDマーク上を走査する。受光センサ16の出力
は、一定の周期でサンプリングされる。サンプリングさ
れた受光センサ16の出力信号は、A/Dコンバータ1
7に取り込まれ、8ビットデータに変換される。この8
ビットデータは、印字のイメージデータを格納する印字
バッファ18に格納される。
When an ID mark read command is sent from the host CPU 6, the print controller 7 urges the mechanism controller 8 to execute reading of an ID mark. Mechanism control unit 8 receives this, ON the light receiving sensor 16 moves the scan pacing motor 14 via a spacing motor <br/> motor driver 11, scans the ID mark. The output of the light receiving sensor 16 is sampled at a constant cycle. The sampled output signal of the light receiving sensor 16 is output to the A / D converter 1
7 and converted into 8-bit data. This 8
The bit data is stored in a print buffer 18 that stores print image data.

【0015】図3乃至図5は、IDマークに記録された
データの解析を行う一例である。処理全体は図3のよう
に大きく分けて、受光センサ16の出力を8ビットデー
タに変換して印字バッファ18に格納するデジタル化処
理(ステップ101)と、IDマークがもつ情報を解析
してコード化するデコード処理(ステップ102)と、
デコード結果が正常か否かを判断し(ステップ10
3)、正常な場合には処理を終了し、異常な場合はデコ
ード処理(ステップ102)を再実行するため、ビット
マーク黒/空白のしきい値等の条件を変更するリトライ
処理(ステップ104)とから成る。以下に各処理の詳
細を記す。
FIGS. 3 to 5 show an example of analyzing data recorded on an ID mark. The whole process is roughly divided as shown in FIG. 3, a digitizing process (step 101) for converting the output of the light receiving sensor 16 into 8-bit data and storing it in the print buffer 18, and analyzing the information of the ID mark to obtain a code. Decoding process (step 102),
It is determined whether the decoding result is normal (step 10).
3), the process ends if normal, abnormal if the decoding process (for re-executing the step 102), the retry process of changing the conditions such as bit <br/> mark black / Blank threshold (Step 104). The details of each process are described below.

【0016】図4は、受光センサ16の出力がデコード
されるまでの過程を示したものである(データ1バイト
分)。IDマークのデータ部の、ある1バイトが「D2
h」であるとすると、IDマークは21のようになる。
図で中の白い四角は、実際には何も印刷されない。この
上を受光センサ16が走査した時の出力電圧の変化(ア
ナログ波形)が22である。この波形の下に設けた目盛
りの間隔が、データのサンプリング周期であり、A
(n)とはサンプリングされた電圧値である。この電圧
は、A/Dコンバータ17を通して8ビットデータD
(n)に変換され、印字バッファ18に格納される。以
下同じように次のサンプリングで、電圧A(n+1)が
A/Dコンバータ17で変換され、D(n+1)とな
り、印字バッファ18のD(n)の次のエリアに格納さ
れる。
FIG. 4 shows a process until the output of the light receiving sensor 16 is decoded (one byte of data). One byte of the data portion of the ID mark is “D2
h ", the ID mark looks like 21.
The white squares in the figure do not actually print anything. The change in the output voltage (analog waveform) when the light receiving sensor 16 scans over this is 22. The interval between the graduations provided below this waveform is the data sampling period.
(N) is a sampled voltage value. This voltage is supplied to the 8-bit data D through the A / D converter 17.
(N) and stored in the print buffer 18. Similarly, at the next sampling, the voltage A (n + 1) is converted by the A / D converter 17 to become D (n + 1) and stored in the area next to D (n) in the print buffer 18.

【0017】このようにしてIDマーク全てを走査し、
その出力を8ビットデータとして印字バッファ18に格
納し終わると、次にデコード処理19(ステップ10
3、詳細は後述)を実行して「D2h」という結果を得
る。
In this manner, all the ID marks are scanned,
When the output is stored in the print buffer 18 as 8-bit data, a decoding process 19 (step 10) is performed.
3. Details will be described later) to obtain the result "D2h".

【0018】IDマーク全てにおいてデコードが終了し
た後、データチェックを行い、正常であれば終了する。
データチェックが異常な場合は、エラー状況に合った条
件の変更を行うリトライ処理(ステップ104、詳細は
後述)を実行し、デコード処理部19(ステップ10
2)を再実行する。
After decoding is completed for all ID marks, a data check is performed.
If the data check is abnormal, a retry process (step 104, details of which will be described later) for changing a condition suitable for the error situation is executed, and the decoding processing unit 19 (step 10).
Perform 2) again.

【0019】図5はデコード処理のフローチャート、図
6乃至図8はデコード処理におけるのデータ処理を図示
したものである。
FIG. 5 is a flowchart of the decoding process, and FIGS. 6 to 8 show data processing in the decoding process.

【0020】本処理ではまず、スタートマークの検出を
行う(ステップ29)。ここでは、予め与えられている
スタートマーク/ストップマーク検出用しきい値36と
印字バッファ内に格納された8ビットデータを比較し、
しきい値より大きくなる最初の8ビットデータの並びを
スタートマークとし、その形状より低密度モードである
か、高密度モードであるかの判断を行う。また、デコー
ドのための基点として、スタートマーク位置37(印字
バッファ18のアドレス)を記憶する。この際、スター
トマーク1を検出できなかった場合或いは高密度モード
/低密度モードいずれの形状とも一致しない場合、スタ
ートマークエラーを発生し(ステップ33)、リトライ
処理(ステップ104)へ分岐する。
In this processing, first, a start mark is detected (step 29). Here, the predetermined start mark / stop mark detection threshold value 36 is compared with the 8-bit data stored in the print buffer.
The arrangement of the first 8-bit data larger than the threshold value is used as a start mark, and it is determined whether the mode is the low-density mode or the high-density mode based on the shape. In addition, a start mark position 37 (address of the print buffer 18) is stored as a base point for decoding. At this time, if the start mark 1 cannot be detected or does not match any of the high-density mode / low-density mode shapes, a start mark error is generated (step 33), and the process branches to retry processing (step 104).

【0021】スタートマーク1が発見されると、つぎに
ストップマーク検出処理を行う(ステップ30)。ここ
ではスタートマーク位置37をもとにストップマークの
位置を計算より求め、その付近の検索範囲38内の印字
バッファ18の8ビットデータをしきい値36と比較
し、ストップマーク2を検出する。ストップマークを検
出するとその印字バッファ上の位置をストップマーク位
置39として記憶する。ストップマーク2が検出されな
かった場合は、ストップマークエラーを発生し(ステッ
プ34)、リトライ処理(ステップ104)へ分岐す
る。
When the start mark 1 is found, a stop mark detection process is performed next (step 30). Here, the position of the stop mark is obtained by calculation based on the start mark position 37, and the 8-bit data of the print buffer 18 in the search range 38 in the vicinity thereof is compared with the threshold 36 to detect the stop mark 2. When the stop mark is detected, the position on the print buffer is stored as the stop mark position 39. If stop mark 2 is not detected, a stop mark error is generated (step 34), and the process branches to retry processing (step 104).

【0022】スタートマーク1、ストップマーク2とも
に検出されると、次にデータ解析処理を行う(ステップ
31)。まず、スタートマーク位置37とストップマー
ク位置39とにより、データ部のビットマークの先頭位
置40を計算する。この際、スタートマーク位置37と
ストップマーク位置39の距離の計算値とのズレより、
先頭位置40を補正する。
When both the start mark 1 and the stop mark 2 are detected, a data analysis process is performed next (step 31). First, the head position 40 of the bit mark in the data part is calculated from the start mark position 37 and the stop mark position 39. At this time, due to the difference between the calculated value of the distance between the start mark position 37 and the stop mark position 39,
The head position 40 is corrected.

【0023】このようにして求めた先頭位置40から、
各ビットマークの幅41の8ビットデータの平均値と、
その直後に続く同じ幅のスペースの幅42の8ビット
ータの平均値を比較する。このビットマークの平均値と
その直後のスペースの平均値の差を取り、結果がビット
マーク判定しきい値より大きければ1を、しきい値より
小さければ0を、デコード結果格納領域43に格納す
る。
From the head position 40 obtained in this way,
The average value of 8-bit data having a width 41 of each bit mark;
Comparing the average value of the 8-bit de <br/> over data width 42 space the same width immediately followed. Taking the difference between the average value and the average value of the space immediately thereafter the bit marks, stores the result of 1 is greater than the bit mark determination threshold, a 0 is smaller than the threshold, the decoding result storage area 43 I do.

【0024】デコード処理(ステップ102)が完了す
ると、デコード結果格納領域43に格納された、バイト
データの値の和をビット反転させたものと、パリティバ
イトの値を比較するパリティチェックを行う(ステップ
32)。もし、一致しない場合は、パリティエラーを発
生し(ステップ35)リトライ処理(ステップ104)
へ分岐する。エラーの無い場合は正常終了する。
When the decoding process (Step 102) is completed, a parity check is performed to compare the bit-inverted sum of the byte data values stored in the decoding result storage area 43 with the parity byte value (Step 102). 32). If they do not match, a parity error occurs (step 35) and a retry process (step 104)
Branch to If there is no error, the process ends normally.

【0025】リトライ処理(ステップ104)ではま
ず、IDマークを読み取る一連の処理の中で、エラーの
種類、リトライを行った回数、どのようなリトライを行
ったかにより、さらに条件を変えてリトライを行うか、
それとも読み取りエラーとして処理を異常終了するかを
決定する。
In the retry process (step 104), first, in a series of processes for reading the ID mark, the retry is performed by further changing the conditions depending on the type of error, the number of times the retry was performed, and what kind of retry was performed. Or
Alternatively, it is determined whether the processing is abnormally terminated as a reading error.

【0026】エラーの種類には、スタートマークエラー
(ステップ33)、ストップマークエラー(ステップ3
4)、パリティエラー(ステップ35)の3種類があ
る。以下に、エラー別の条件変更の様子を示す。
The types of errors include a start mark error (step 33) and a stop mark error (step 3).
4) and parity error (step 35). The following shows how conditions are changed for each error.

【0027】スタートマークエラー(ステップ33)は
印字バッファ内に、本処理の基点となるスタートマーク
が発見できなかった、或いはそれに相当するデータの並
びが存在しなかったときに発生する。要因としては2値
化が不適当であった場合と、用紙の浮きによりスタート
マークの左端がうまく検出できなかった場合とが考えら
れる。前者の場合は2値化するためのしきい値変更処理
を行い、デコード処理(ステップ102)のスタートマ
ーク検出処理(ステップ29)から再実行する。後者の
場合はスタートマーク位置と、低密度モード/高密度モ
ードを仮定して、ストップマークの検出を行い(ステッ
プ30)、その位置から前記2つの値を決定する処理を
行い、その後、デコード処理部のデータ解析処理(ステ
ップ31)を実行する。
A start mark error (step 33) occurs when a start mark serving as a base point of the present processing cannot be found in the print buffer, or when there is no data arrangement corresponding to the start mark. The causes may be the case where the binarization is inappropriate and the case where the left end of the start mark cannot be detected properly due to the floating of the sheet. In the former case, threshold value change processing for binarization is performed, and the processing is restarted from the start mark detection processing (step 29) of the decoding processing (step 102). In the latter case, a stop mark is detected assuming a start mark position and a low-density mode / high-density mode (step 30), and a process for determining the two values from that position is performed. A data analysis process (step 31) is performed.

【0028】ストップマークエラー(ステップ34)
は、スタートマーク位置から、ストップマークのあるメ
モリ上の位置を計算で求め、その付近からストップマー
クに相当するデータの並びを、スタートマーク/ストッ
プマーク検出用しきい値と比較しながら検索する処理
で、それが発見できなかった時に発生する。この場合
は、スタートマーク/ストップマーク検出用しきい値が
不適当であるとして、しきい値を変更してストップマー
ク検出処理(ステップ30)を再実行する。
Stop mark error (step 34)
Is a process for calculating a position of a stop mark in a memory from a start mark position, and searching for a sequence of data corresponding to the stop mark from the vicinity of the stop mark while comparing the data arrangement with a start mark / stop mark detection threshold value. Occurs when it cannot be found. In this case, it is determined that the threshold value for start mark / stop mark detection is inappropriate, the threshold value is changed, and the stop mark detection process (step 30) is executed again.

【0029】パリティエラー(ステップ35)は、ID
マークのデータ部のデコード結果の和を取りビット反転
させたものが、パリティバイトと一致しなかった時に発
生する。この場合は、まず、ビットマーク判定しきい値
を変更し、データ解析処理(ステップ31)を再実行す
る。更にエラーが発生する場合、バイト毎のビットマー
ク先頭位置の値を変更し、データ解析処理(ステップ3
1)を再実行する。
The parity error (step 35) is based on the ID
This occurs when the sum of the decoding result of the data part of the mark and the result of bit inversion do not match the parity byte. In this case, first, the bit mark determination threshold is changed, and the data analysis process (step 31) is executed again. Further when an error occurs, changes the value of the bit-mer <br/> click the head position of each byte, data analyzing process (Step 3
Re-execute 1).

【0030】なお、本実施例のA/Dコンバータ17で
はIDマークからの電気信号を8ビットのデジタル値に
変換しており十分な性能が得られるが、A/Dコンバー
タは2ビット以上に変換できるものであればどのような
ものでもよい。
Although the A / D converter 17 of this embodiment converts the electric signal from the ID mark into an 8-bit digital value, sufficient performance can be obtained, but the A / D converter converts the electric signal to 2 bits or more. Anything that can be used may be used.

【0031】[0031]

【発明の効果】以上説明したように本発明のIDマーク
読み取り装置によれば、IDマークからの電気信号が微
細幅毎に2ビット以上のデジタル値に変換され、IDマ
ークのビットマーク及びスペース毎に前記デジタル値が
平均化され、これら相互の差としきい値とを比較してデ
コード結果を出力するので、すべてのデジタル値全体が
上昇又は低下する場合のIDマークの読み取り性能を向
上できる。したがって、従来読み取りができなかったI
Dマークでも読み取ることができる。
As described above, according to the ID mark reading apparatus of the present invention, the electric signal from the ID mark is converted into a digital value of 2 bits or more for each fine width, and the digital signal for each bit mark and space for the ID mark is converted. Since the digital values are averaged, and the difference between the digital values and the threshold value are compared to output a decoding result, the reading performance of the ID mark when all the digital values ascend or descend can be improved. Therefore, I cannot be read conventionally.
It can also be read with a D mark.

【0032】また、記憶手段、判定手段、リトライ手段
等を付設したものは、デコード結果が異常である場合
に、しきい値を変更して新たなデコード結果を出力でき
るので、もう一度受光センサでIDマークを走査するこ
となく、ソフトウェア処理のみでデコード結果が得られ
るので、IDマークの読み取り速度を向上できる。さら
に、2値化データをデコードする場合に比べ、様々なエ
ラー状態をソフトウェア処理のみで救うことができると
いう効果がある。
In the case where the storage means, the judgment means, the retry means and the like are added, if the decoding result is abnormal, the threshold value can be changed and a new decoding result can be output. Since the decoding result is obtained only by software processing without scanning the mark, the reading speed of the ID mark can be improved. Further, there is an effect that various error states can be rescued only by software processing, as compared with the case where binary data is decoded.

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

【図1】本発明の原理的構成を示すブロック図である。FIG. 1 is a block diagram showing a basic configuration of the present invention.

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

【図3】本発明の一実施例の動作全体の概略を示すフロ
ーチャートである。
FIG. 3 is a flowchart showing an outline of the entire operation of one embodiment of the present invention.

【図4】本発明の一実施例のデジタル化処理を示す説明
図である。
FIG. 4 is an explanatory diagram showing a digitizing process according to one embodiment of the present invention.

【図5】本発明の一実施例のデコード処理のフローチャ
ートである。
FIG. 5 is a flowchart of a decoding process according to an embodiment of the present invention.

【図6】本発明の一実施例のスタートマーク検出の説明
図である。
FIG. 6 is an explanatory diagram of start mark detection according to one embodiment of the present invention.

【図7】本発明の一実施例のストップマーク検出の説明
図である。
FIG. 7 is an explanatory diagram of stop mark detection according to one embodiment of the present invention.

【図8】本発明の一実施例のデコード処理の説明図であ
る。
FIG. 8 is an explanatory diagram of a decoding process according to an embodiment of the present invention.

【図9】IDマークの形状を示す平面図である。FIG. 9 is a plan view showing the shape of an ID mark.

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

16 受光センサ 17 A/Dコンバータ 50 IDマーク読み取り装置 52 IDマーク 54 IDマークからの反射光 56 記憶手段 58 デコード手段 60 判定手段 62 リトライ手段 M ビットマーク S スペースReference Signs List 16 light receiving sensor 17 A / D converter 50 ID mark reading device 52 ID mark 54 reflected light from ID mark 56 storage means 58 decoding means 60 determination means 62 retry means M bit mark S space

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 論理的な0又は1を意味するビットマー
クと、このビットマーク間のスペースとの位置が、スタ
ートマーク及びストップマークの位置から求められるI
Dマークに対して、 このIDマークからの反射光を検出して微細幅毎に電気
信号に変換する受光センサと、 前記電気信号を2ビット以上のデジタル値に変換するA
/Dコンバータと、 前記デジタル値を前記ビットマーク及び前記スペース毎
に平均化し、これらの平均化された前記ビットマークの
デジタル値と当該ビットマークに隣接する前記スペース
のデジタル値との差を求め、この差としきい値とを比較
して当該ビットマークを二値化したデコード結果を出力
するデコード手段とを備えたIDマーク読み取り装置。
1. A bitmer representing a logical 0 or 1.
Position between the mark and the space between the bit marks
I calculated from the position of the mark and stop mark
For the D mark, a light receiving sensor that detects reflected light from the ID mark and converts it into an electric signal for each fine width, and an A that converts the electric signal into a digital value of 2 bits or more.
/ D converter, averages the digital values for each of the bit mark and the space, obtains the difference between the digital value of the space adjacent to the digital value and the corresponding bit mark of the bit marks are those averaging, An ID mark reading device comprising: decoding means for comparing the difference with a threshold value and outputting a decoding result obtained by binarizing the bit mark.
【請求項2】 論理的な0又は1を意味するビットマー
クと このビットマーク間のスペースとの位置が、スタ
ートマーク及びストップマークの位置から求められるI
Dマークに対して、 このIDマークからの反射光を検出して微細幅毎に電気
信号に変換する受光センサと、 前記電気信号を2ビット以上のデジタル値に変換するA
/Dコンバータと、 前記デジタル値を格納する記憶手段と、 この記憶手段に格納された前記デジタル値を前記ビット
マーク及び前記スペース毎に平均化し、これらの平均化
された前記ビットマークのデジタル値と当該ビットマー
クに隣接する前記スペースのデジタル値との差を求め、
この差としきい値とを比較して当該ビットマークを二値
化したデコード結果を出力するデコード手段と、 前記デコード結果が正常か否かを判定する判定手段と、 前記デコード結果が異常である場合に前記しきい値を変
更して再び前記デコード手段からデコード結果を出力さ
せるリトライ手段とを備えたIDマーク読み取り装置。
2. A bitmer representing a logical 0 or 1.
The position of the space between the
I calculated from the position of the mark and stop mark
For the D mark, a light receiving sensor that detects reflected light from the ID mark and converts it into an electric signal for each fine width, and an A that converts the electric signal into a digital value of 2 bits or more.
/ D converter, storage means for storing the digital value, and averaging the digital value stored in the storage means for each of the bit mark and the space, and averaging these bit marks. seeking the difference between the digital value of the digital value and the space adjacent to the bit-mer <br/> click,
Decoding means for comparing the difference with a threshold value to output a decoding result obtained by binarizing the bit mark; determining means for determining whether the decoding result is normal; and when the decoding result is abnormal. Retry means for changing the threshold value and outputting the decoding result from the decoding means again.
JP5192952A 1993-07-07 1993-07-07 ID mark reading device Expired - Lifetime JP2576370B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5192952A JP2576370B2 (en) 1993-07-07 1993-07-07 ID mark reading device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5192952A JP2576370B2 (en) 1993-07-07 1993-07-07 ID mark reading device

Publications (2)

Publication Number Publication Date
JPH0728924A JPH0728924A (en) 1995-01-31
JP2576370B2 true JP2576370B2 (en) 1997-01-29

Family

ID=16299756

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5192952A Expired - Lifetime JP2576370B2 (en) 1993-07-07 1993-07-07 ID mark reading device

Country Status (1)

Country Link
JP (1) JP2576370B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5145833B2 (en) * 2007-09-12 2013-02-20 株式会社リコー Two-dimensional code reading device, two-dimensional code reading method, two-dimensional code reading program, and recording medium

Also Published As

Publication number Publication date
JPH0728924A (en) 1995-01-31

Similar Documents

Publication Publication Date Title
CA1310755C (en) Optical character reader
US4488678A (en) Method and apparatus for reading a bar code
US7369476B2 (en) Device for reading from or writing to optical recording media having a control unit for a data slicer
EP0464713B1 (en) Bar-code reading apparatus
JP2500859B2 (en) Bar code reader
JP2576370B2 (en) ID mark reading device
US3758752A (en) Automatic vehicle identification
JP2008140255A (en) Bar code reader and bar code reading method
JPH056549A (en) Reproducing signal processor
US5321526A (en) White level detection circuit for an optical image reader
JPS6162983A (en) Musical score reader
JP3160458B2 (en) Character reading device and character reading method
JP2000311451A (en) Data demodulating method
JPS6122837B2 (en)
JP2542628B2 (en) Mark reader
JP2915727B2 (en) Shading correction device such as image sensor
JPH0325690A (en) Signal processing method for bar code reader
JPH05101211A (en) Binarizing device for bar code signal
JPS62125767A (en) Code error detecting system
JPH0737019A (en) Optical reader
JPH05307640A (en) Character reader
JPH0557632B2 (en)
JP5284115B2 (en) Bar code reader
JPH04251394A (en) Bar code reader
JPS6227876A (en) Character reader

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: 19960910

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

Free format text: PAYMENT UNTIL: 20071107

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20081107

Year of fee payment: 12

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

Free format text: PAYMENT UNTIL: 20081107

Year of fee payment: 12

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

Free format text: PAYMENT UNTIL: 20091107

Year of fee payment: 13

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

Free format text: PAYMENT UNTIL: 20091107

Year of fee payment: 13

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

Free format text: PAYMENT UNTIL: 20101107

Year of fee payment: 14

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

Free format text: PAYMENT UNTIL: 20111107

Year of fee payment: 15

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

Free format text: PAYMENT UNTIL: 20111107

Year of fee payment: 15

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

Free format text: PAYMENT UNTIL: 20121107

Year of fee payment: 16

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

Free format text: PAYMENT UNTIL: 20121107

Year of fee payment: 16

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

Free format text: PAYMENT UNTIL: 20131107

Year of fee payment: 17

EXPY Cancellation because of completion of term