JPH04339203A - Control of optical sensor - Google Patents

Control of optical sensor

Info

Publication number
JPH04339203A
JPH04339203A JP11133391A JP11133391A JPH04339203A JP H04339203 A JPH04339203 A JP H04339203A JP 11133391 A JP11133391 A JP 11133391A JP 11133391 A JP11133391 A JP 11133391A JP H04339203 A JPH04339203 A JP H04339203A
Authority
JP
Japan
Prior art keywords
optical sensor
level
potential
paper
values
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.)
Pending
Application number
JP11133391A
Other languages
Japanese (ja)
Inventor
Shinji Kato
真二 加藤
Sadao Maeyama
前山 貞夫
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.)
Sony Corp
Original Assignee
Sony Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sony Corp filed Critical Sony Corp
Priority to JP11133391A priority Critical patent/JPH04339203A/en
Publication of JPH04339203A publication Critical patent/JPH04339203A/en
Pending legal-status Critical Current

Links

Landscapes

  • Handling Of Sheets (AREA)
  • Accessory Devices And Overall Control Thereof (AREA)
  • Length Measuring Devices By Optical Means (AREA)
  • Controlling Sheets Or Webs (AREA)

Abstract

PURPOSE:To detect an object accurately regardless of variations in an output potential of an optical sensor attributed to adhesion of dust, a difference of light emitting characteristic or reflection/characteristic, temperature characteristic and the like using the optical sensor. CONSTITUTION:Detection potential of an optical sensor 4 is converted into digital with an A/D converter 18 and the maximum or minimum level values among conversion values for a specified period or a boundary value of the maximum and minimum level determined from the conversion values are stored into a memory 19. A binary boundary value altered as required based on those recorded in the memory is used to perform the judgment on the binary values whether a detection potential of the optical sensor 4 is at the maximum or minimum with a CPU15. Thus, the judgment of the binary values is achieved accurately corresponding to a change in the output potential of the optical sensor 4 attributed to the adhesion of dust to the optical sensor 4, a difference in light emitting characteristic or reflection characteristic, temperature characteristic and the like thereby achieving accurate detection of the object.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明は、プリンタにおける用紙
やインクリボンの制御を行うために、その用紙やインク
リボンの検出を行う場合などに好適な光学センサの制御
方法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method of controlling an optical sensor suitable for detecting paper or ink ribbon in order to control the paper or ink ribbon in a printer.

【0002】0002

【従来の技術】従来から、プリンタでは用紙やインクリ
ボンの制御に、透過形あるいは反射形等の光学センサが
用いられている。その一例として図4に示す用紙のエッ
ジ検出機構がある。プリンタでは用紙1に印刷を行う場
合、用紙1の先頭部分をプラテンローラ2とピンチロー
ラ3により図示しない印刷ヘッド(例えばサーマルヘッ
ド)の印刷開始位置まで送り出さなければならない。こ
のときの紙送りの制御を行うために、光学センサ4を所
定位置に配置して、用紙1のエッジの検出を行っている
2. Description of the Related Art Conventionally, printers have used transmissive or reflective optical sensors to control paper or ink ribbons. An example of this is a paper edge detection mechanism shown in FIG. When printing on a sheet of paper 1 in a printer, the leading portion of the sheet of paper 1 must be sent by a platen roller 2 and a pinch roller 3 to a printing start position of a print head (for example, a thermal head, not shown). In order to control paper feeding at this time, an optical sensor 4 is placed at a predetermined position to detect the edges of the paper 1.

【0003】図5は上記したエッジ検出機構を有するプ
リンタの一例を示すビデオプリンタの構成図である。ビ
デオプリンタはフレームメモリ11,ヘッドコントロー
ラ12,印画メカブロック13,システムコントローラ
14などで構成されており、印画メカブロック13は前
述の光学センサ4,プラテンローラを動かすモータ5,
サーマルヘッド6を備えている。印刷すべき画像入力は
ディジタル形式でフレームメモリ11に格納される。印
刷(印画)を開始する前にシステムコントローラ14は
、モータ5を駆動して用紙のエッジを光学センサ4の出
力により検出するまで紙送りを行う。印刷が開始される
と、システムコントローラはフレームメモリ11の一ラ
イン分の印画データをヘッドコントローラ12に転送す
る。ヘッドコントローラ12は印画データに基づいてサ
ーマルヘッド6の各ドットに電流を流す。この後、シス
テムコントローラ14はモータ5を制御し、一ライン分
の紙送りを行う。以上の印刷動作を繰り返して印画出力
がなされる。
FIG. 5 is a block diagram of a video printer, which is an example of a printer having the above-mentioned edge detection mechanism. The video printer is composed of a frame memory 11, a head controller 12, a printing mechanical block 13, a system controller 14, etc. The printing mechanical block 13 includes the above-mentioned optical sensor 4, a motor 5 for moving the platen roller,
It is equipped with a thermal head 6. The image input to be printed is stored in frame memory 11 in digital form. Before starting printing, the system controller 14 drives the motor 5 to feed the paper until the edge of the paper is detected by the output of the optical sensor 4. When printing is started, the system controller transfers one line of print data from the frame memory 11 to the head controller 12. The head controller 12 applies current to each dot of the thermal head 6 based on print data. Thereafter, the system controller 14 controls the motor 5 to feed the paper by one line. Prints are output by repeating the above printing operations.

【0004】次に、上記における光学センサ4の従来の
制御方法を説明する。図6(a),(b)はそのための
信号の流れを示す説明図である。CPU15は図5のシ
ステムコントローラ14の主要な構成部分であり、光学
センサ4からの検出信号に基づいて前述の紙送り制御を
行っている。従来、光学センサ4からのアナログ信号は
、(a)に示すようにシュミットトリガインバータ(例
えば集積回路74HC14等)16あるいは(b)に示
すようにコンパレータ17を通してH(ハイ),L(ロ
ー)の2値に変換した後、CPU15に入力していた。
Next, a conventional method of controlling the optical sensor 4 mentioned above will be explained. FIGS. 6(a) and 6(b) are explanatory diagrams showing the flow of signals for this purpose. The CPU 15 is a main component of the system controller 14 shown in FIG. 5, and performs the above-mentioned paper feeding control based on the detection signal from the optical sensor 4. Conventionally, the analog signal from the optical sensor 4 is converted into H (high) and L (low) through a Schmitt trigger inverter (for example, integrated circuit 74HC14, etc.) 16 as shown in (a) or a comparator 17 as shown in (b). After converting into binary data, it was input to the CPU 15.

【0005】[0005]

【発明が解決しようとする課題】しかしながら、上記従
来のプリンタで用いられている透過形もしくは反射形等
の光学センサでは、(1)長期間プリンタを使用してい
くと、用紙からのほこりの発生やヘッドの冷却風によっ
て光学センサにほこりがたまってしまい、そのため、光
学センサからの電位が次第に変化していく。(2)プリ
ンタでは異なった染料の用紙を使用したり、OHP用紙
を使ったりと異なる発光特性の紙を扱う場合がある。ま
た、用紙,インクリボンは曲がり等のため、反射が一定
でないものを扱う。このような場合、光学センサからの
電位がばらついてしまう。(3)周囲環境やヘッドの温
度の変化が光学センサ自体やセンサ回路の温度特性に影
響し、光学センサからの電位が変化する。といった問題
があった。
[Problems to be Solved by the Invention] However, with the transmission-type or reflection-type optical sensors used in the above-mentioned conventional printers, (1) when the printer is used for a long period of time, dust is generated from the paper. Dust accumulates on the optical sensor due to the head cooling air, and as a result, the potential from the optical sensor gradually changes. (2) Printers may handle paper with different luminescent properties, such as paper with different dyes or OHP paper. In addition, paper and ink ribbons are used that have uneven reflection due to bending, etc. In such a case, the potential from the optical sensor will vary. (3) Changes in the ambient environment and the temperature of the head affect the temperature characteristics of the optical sensor itself and the sensor circuit, and the potential from the optical sensor changes. There was such a problem.

【0006】これに対して、従来の技術による光学セン
サの制御方法では、これらを2値で検出する際のH,L
を判定する境界電位は集積回路(シュミットトリガイン
バータ16)のスレッショルドレベルあるいはコンパレ
ータ17の基準電位で一定のレベルに決まっていた。こ
のため、上記の(1)〜(3)の状況に対して、H,L
の正しい判定ができなくなり、不具合が発生する虞れが
あった。
On the other hand, in the conventional optical sensor control method, H and L are detected in binary values.
The boundary potential for determining is determined to be a constant level by the threshold level of the integrated circuit (Schmitt trigger inverter 16) or the reference potential of the comparator 17. Therefore, for the situations (1) to (3) above, H, L
There was a risk that a correct judgment could not be made and a problem would occur.

【0007】図7は、上記の問題点の説明図であり、(
a),(b),(c)は経時変化の順を示している。 図において、VTはH,L判定の境界電位、VSは光学
センサから出力される電位、VIはH,L判定後のCP
Uに入力される電位である。境界電位VTが一定である
ため、前述の(1)〜(3)の状況下で光学センサから
の電位VSの最高値が(c)のように境界電位VT以下
になると、VIはLのまま変化しなくなり、H,Lの判
定ができなくなる。
FIG. 7 is an explanatory diagram of the above problem.
a), (b), and (c) show the order of change over time. In the figure, VT is the boundary potential between H and L judgments, VS is the potential output from the optical sensor, and VI is CP after H and L judgments.
This is the potential input to U. Since the boundary potential VT is constant, if the maximum value of the potential VS from the optical sensor becomes below the boundary potential VT as shown in (c) under the conditions (1) to (3) above, VI remains at L. It stops changing and it becomes impossible to judge whether it is H or L.

【0008】本発明は、上記問題点を解決するためにな
されたものであり、その目的は、光学センサへのほこり
等の付着や用紙,インクリボン等の対象物の発光特性,
反射特性等のばらつきあるいはヘッド温度,周囲温度等
の使用環境による温度特性の変化というような使用時の
状況にかかわらず、正確に対象物を検出できる光学セン
サの制御方法を提供することにある。
The present invention has been made to solve the above-mentioned problems, and its purpose is to reduce the adhesion of dust to optical sensors, the light emitting characteristics of objects such as paper and ink ribbons, etc.
It is an object of the present invention to provide a control method for an optical sensor that can accurately detect an object regardless of usage conditions such as variations in reflection characteristics or changes in temperature characteristics due to usage environment such as head temperature and ambient temperature.

【0009】[0009]

【課題を解決するための手段】上記の目的を達成するた
め、本発明の光学センサの制御方法においては、光学セ
ンサの検出電位をディジタル変換し、該変換値のうち所
定の期間の最高レベルと最低レベルの変換値もしくはこ
れらの最高レベルと最低レベルの変換値から定まる最高
レベルと最低レベルの境界値を記録し、この記録に基づ
いて必要の都度前記光学センサの検出電位の2値の判定
に使用する境界値を変更することを特徴としている。
[Means for Solving the Problems] In order to achieve the above object, in the optical sensor control method of the present invention, the detected potential of the optical sensor is digitally converted, and the highest level of the converted value for a predetermined period is converted into a digital signal. The lowest level conversion value or the highest level and lowest level boundary values determined from the highest level and lowest level conversion values are recorded, and based on this record, the binary detection potential of the optical sensor is determined whenever necessary. It is characterized by changing the boundary values used.

【0010】0010

【作用】本発明の光学センサの制御方法では、光学セン
サの検出電位をディジタル変換し、該変換値のうち所定
の期間の最高レベルと最低レベルの変換値もしくはこれ
らの最高レベルと最低レベルの変換値から定まる最高レ
ベルと最低レベルの境界値を記録し、この記録に基づい
て必要の都度変更した2値の境界値を用いて、光学セン
サの検出電位が最高レベルか最低レベルであるかの2値
の判定を行う。これにより、光学センサへのほこりの付
着や検出対象物の発光特性あるいは反射特性の差異や温
度特性などに起因する光学センサの出力電位の変動に対
応し、2値の判定を正確に行えるようにしている。
[Operation] In the optical sensor control method of the present invention, the detection potential of the optical sensor is converted into digital data, and among the converted values, the highest level and lowest level in a predetermined period are converted, or the highest level and lowest level are converted. Record the boundary value between the highest level and the lowest level determined from the value, and use the binary boundary value changed as necessary based on this record to determine whether the detected potential of the optical sensor is at the highest level or the lowest level. Determine the value. This makes it possible to accurately perform binary judgments by responding to fluctuations in the output potential of the optical sensor caused by dust adhesion to the optical sensor, differences in the light emission or reflection characteristics of the object to be detected, and temperature characteristics. ing.

【0011】[0011]

【実施例】以下、本発明の実施例を、図面を参照して詳
細に説明する。
Embodiments Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

【0012】図1は本発明の一実施例を実現するための
構成を示すブロック図である。本実施例は、プリンタに
適用した場合を例とする。このプリンタの一部分を構成
するものとして、図中の4は用紙エッジを検出するため
の光学センサ、5は紙送り制御用のモータ、14はプリ
ンタのシステムコントローラである。また、システムコ
ントローラ14を構成する部分として、15はCPU(
コンピュータもしくはプロセッサ)、18はA(アナロ
グ)/D(ディジタル)コンバータ、19はメモリであ
る。CPU15は記録制御手段15a,H(ハイ),L
(ロー)レベル判定手段15b,境界値算出手段15c
,モータ制御手段15d等の機能手段を内在している。
FIG. 1 is a block diagram showing a configuration for realizing an embodiment of the present invention. This embodiment takes as an example a case where the present invention is applied to a printer. Parts of this printer include an optical sensor 4 for detecting paper edges, a motor 5 for controlling paper feed, and a system controller 14 for the printer. Further, as a part constituting the system controller 14, 15 is a CPU (
18 is an A (analog)/D (digital) converter, and 19 is a memory. The CPU 15 has recording control means 15a, H (high), L
(Low) level determination means 15b, boundary value calculation means 15c
, a motor control means 15d, and other functional means.

【0013】以上の各構成部分は、次のように接続ある
いは連係されている。光学センサ4の検出電位はA/D
コンバータ18に入力され、ここでその入力レベルは数
10段階のディジタル値に変換されてCPU15の入力
ポートに入力される。CPU15内では、入力されたデ
ィジタルの変換値を記録制御手段15aおよびH,Lレ
ベル判定手段15bに分配する。記録制御手段15aで
は、ある周期(例えば1枚プリントする期間)の間に検
出したH,Lレベルそれぞれの変換値をメモリ19に記
録させるとともに境界値算出手段15cに渡す。境界値
算出手段15cは、前の周期の間に検出したH,Lレベ
ルの変換値をメモリ19から読み出し、これと記録制御
手段15aから受け取った今回のH,Lレベルの変換値
とを比較し、そのいずれかの変換値からH,Lレベルの
2値判定に用いる境界値を算出し、その境界値をH,L
レベル判定手段15bに与える。H,Lレベル判定手段
15bは、この境界値に基づいてA/Dコンバータ18
から入力された変換値のH,Lレベルの2値判定を行な
い、例えばHレベルの判定なら用紙を検出したとして、
モータ制御手段15dへ検出情報を渡す。この情報に基
づいてモータ制御手段15dは、モータ5を制御して用
紙の頭出し(用紙の印刷開始位置へのセット)を制御す
る。
The above components are connected or linked as follows. The detection potential of the optical sensor 4 is A/D
The signal is input to the converter 18, where the input level is converted into a digital value of several tens of levels, and is input to the input port of the CPU 15. Within the CPU 15, the input digital conversion value is distributed to the recording control means 15a and the H and L level determining means 15b. The recording control means 15a causes the memory 19 to record the converted values of each of the H and L levels detected during a certain period (for example, a period of printing one sheet) and passes them to the boundary value calculation means 15c. The boundary value calculation means 15c reads the H and L level conversion values detected during the previous cycle from the memory 19, and compares them with the current H and L level conversion values received from the recording control means 15a. , calculate the boundary value used for binary judgment of H and L levels from the converted value, and convert the boundary value into H and L levels.
It is given to the level determining means 15b. The H and L level determining means 15b selects the A/D converter 18 based on this boundary value.
A binary judgment is made between the H and L levels of the converted value input from the converter.For example, if it is judged as an H level, it is assumed that paper has been detected.
The detection information is passed to the motor control means 15d. Based on this information, the motor control means 15d controls the motor 5 to control the beginning of the paper (setting the paper to the print start position).

【0014】以上のようなプリンタの構成部分により実
現される本実施例の光学センサの制御方法を述べる。図
2はその手順を示すフローチャートである。以下、順を
追ってその処理を説明する。
A method of controlling the optical sensor of this embodiment, which is realized by the above-described components of the printer, will be described. FIG. 2 is a flowchart showing the procedure. The processing will be explained step by step below.

【0015】(1)光学センサ4の検出電位をA/Dコ
ンバータ18を介してCPU15に入力する。これによ
り、従来、2値でしか入力しなかったものを、本実施例
では数10段階以上のレベルの値で入力する。
(1) The detected potential of the optical sensor 4 is input to the CPU 15 via the A/D converter 18. As a result, although conventionally only binary values were input, in this embodiment, values of several tens or more levels are input.

【0016】(2)上記で入力されたA/Dコンバータ
18からの変換値と、ソフトウェア(図1の境界値算出
手段15cに対応する)で決定したH,Lレベルの境界
値とを比較し、変換値のH,Lレベルを判定・識別する
。この判定・識別結果により用紙の頭出し制御が行われ
る。
(2) Compare the conversion value inputted above from the A/D converter 18 with the boundary values of H and L levels determined by software (corresponding to the boundary value calculation means 15c in FIG. 1). , determine and identify the H and L levels of the converted value. Based on the results of this determination and identification, sheet cue control is performed.

【0017】(3)ある周期、例えば1枚プリントする
期間のように必ず光学センサ4の検出電位が検出対象物
である用紙の有無で変化する期間に、記録制御手段15
aで検出した最高と最低の各検出電位のレベル変換値を
メモリ19に記録する。
(3) During a certain period, for example, during a period when one sheet of paper is printed, the detection potential of the optical sensor 4 always changes depending on the presence or absence of paper as a detection object, the recording control means 15
The level conversion values of the highest and lowest detected potentials detected in step a are recorded in the memory 19.

【0018】(4)前の周期の間に検出した最高と最低
の各レベルの変換値(メモリ19に記録されている)と
、今回の変換値(上記(3)で検出した変換値)とを比
較する。
(4) The highest and lowest level conversion values detected during the previous cycle (recorded in the memory 19) and the current conversion value (the conversion value detected in (3) above). Compare.

【0019】(5)上記(4)の比較の結果、必要であ
れば今回の最高レベルと最低レベルの電位から、H,L
レベル判定手段15bで用いる境界値を設定変更する。 この境界値は、例えば最高レベルと最低レベルの変更値
の中間の値として算出する。なお、初回の境界値は所定
の初期値を用いる。境界値の設定変更が必要か否かは、
例えば前回と今回の最高レベル同士の差もしくは最低レ
ベル同士の差が一定値以上の場合などとする。
(5) As a result of the comparison in (4) above, if necessary, from the current highest level and lowest level potential, H, L
The setting of the boundary value used by the level determination means 15b is changed. This boundary value is calculated as, for example, an intermediate value between the highest level and lowest level change values. Note that a predetermined initial value is used as the first boundary value. Whether or not it is necessary to change the boundary value settings,
For example, it is assumed that the difference between the highest levels or the lowest levels between the previous and current levels is greater than a certain value.

【0020】(6)上記(4)で検出した最高レベルと
最低レベルの差が一定値以下となったならば、光学セン
サ4にほこりが付着している等の原因が考えられるとし
てウォーニングを表示し、ユーザーにメンテナンスを促
す。この表示は、次回以降において上記の差が大きく変
化したら、ユーザーがほこりを取る等のメンテナンスを
行ったと判断して解除する。
(6) If the difference between the highest level and the lowest level detected in (4) above becomes less than a certain value, a warning is displayed indicating that the cause may be dust attached to the optical sensor 4. and urge users to perform maintenance. This display will be canceled if the above-mentioned difference changes significantly from next time onwards, as it is determined that the user has performed maintenance such as removing dust.

【0021】なお、(2)における用紙の頭出しの制御
についての動作は、図4を用いて説明すると以下の通り
である。用紙1はプラテンローラ2の回転(矢印方向)
により図略のヘッドの印刷位置へ向って送られる。この
用紙1の先頭部が印刷位置に達したときの用紙1のエッ
ジを光学センサ4で検出する。光学センサ4が例えば反
射形であるとした場合には、その検出電位は用紙1から
の反射時にLレベルとなり、無反射時にHレベルとなる
。従って、上記の検出電位をA/D変換して取り込み、
前回決めた境界値あるいは初期設定時の境界値でH,L
レベルの2値判定を行うことにより、Hレベルであれば
、用紙1が光学センサ4の下まで到達していないとして
紙送りを継続し、前記の境界値まで検出電位が下がりL
レベルと判定された時には用紙1が到達したと判断して
紙送りを停止し印刷の動作を開始する。上記初期設定時
の境界値は工場出荷時に紙の種類別に設定記録されたH
,Lレベルの値から算出される。
The operation for controlling the sheet cue in (2) will be explained as follows using FIG. 4. Paper 1 is rotated by platen roller 2 (in the direction of the arrow)
is sent toward the printing position of an unillustrated head. An optical sensor 4 detects the edge of the paper 1 when the leading edge of the paper 1 reaches the printing position. If the optical sensor 4 is of a reflective type, for example, its detection potential will be at the L level when reflected from the paper 1, and will be at the H level when there is no reflection. Therefore, the above detected potential is A/D converted and taken in,
H, L at the previously determined boundary value or initial setting boundary value
By performing a binary level judgment, if the level is H, it is assumed that the paper 1 has not reached the bottom of the optical sensor 4, and paper feeding continues, and the detected potential decreases to the above-mentioned boundary value and L.
When it is determined that the level is reached, it is determined that the paper 1 has arrived, paper feeding is stopped, and printing operation is started. The above initial setting boundary values are set and recorded for each type of paper at the time of factory shipment.
, is calculated from the L level values.

【0022】図3は、以上の実施例の作用の説明図であ
る。図中の(a),(b),(c),(d)は、順に経
時的な変化を示し、VTはH,Lレベル判定の境界値を
、VSは光学センサの検出電位を、VIはH,Lレベル
の判定結果を、それぞれ示している。従来は境界値が一
定のため、光学センサからの電位の変化によって、H,
Lレベルの判定が正確にできなくなる可能性が高かった
が、本実施例では、(a)〜(d)に示すように光学セ
ンサからの電位の変化に応じて、境界値が変化する。そ
のため、H,Lレベルが少差になるまで、H,Lレベル
の判定が正確にできる。その上に、(d)に示しように
HレベルとLレベルの差が一定以下の少差になった時に
は、ウォーニングの表示によりメンテナンスが必要なこ
とが判断できる。これにより、ユーザー自身の手で正常
状態に復帰できるという利点が得られる。
FIG. 3 is an explanatory diagram of the operation of the above embodiment. (a), (b), (c), and (d) in the figure show changes over time in order, VT is the boundary value for H and L level judgment, VS is the detected potential of the optical sensor, and VI shows the determination results of H and L levels, respectively. Conventionally, the boundary value was constant, so changes in the potential from the optical sensor caused H,
Although there was a high possibility that the L level could not be determined accurately, in this embodiment, the boundary value changes in accordance with the change in the potential from the optical sensor, as shown in (a) to (d). Therefore, the H and L levels can be accurately determined until there is a small difference between the H and L levels. In addition, when the difference between the H level and the L level becomes less than a certain level as shown in (d), it can be determined that maintenance is necessary by displaying a warning. This provides the advantage that the user can return to the normal state by his or her own hands.

【0023】なお、図1の構成に使用するCPU15と
してA/D変換ポートを内蔵するものがあり、その場合
にはA/Dコンバータ18を省略して光学センサ4の検
出電位をCPU15のA/D変換ポートへ入力する。こ
のようなA/D変換ポート付きのCPUを利用すれば、
コスト的,スペース的に有効である。また、図2の光学
センサの制御方法を示すフローチャートにおいて、最高
と最低の各検出電位の変換値を記録することに代えて、
その変換値から定まる最高レベルと最低レベルの境界値
(中間値)を毎回記録し、今回と前回の境界値の比較に
よってH,Lレベル判定で用いる境界値を設定変更する
ようにしても良い。さらに、本発明は、プリンタ以外に
も適用可能である。このように本発明は、その主旨に沿
って種々に応用され、種々の実施態様を取り得るもので
ある。
Note that some CPUs 15 used in the configuration of FIG. 1 have a built-in A/D conversion port. Input to D conversion port. If you use a CPU with such an A/D conversion port,
It is effective in terms of cost and space. In addition, in the flowchart showing the control method of the optical sensor in FIG. 2, instead of recording the converted values of the highest and lowest detected potentials,
The boundary value (intermediate value) between the highest level and the lowest level determined from the converted value may be recorded each time, and the boundary value used in H and L level determination may be changed by comparing the current and previous boundary values. Furthermore, the present invention is applicable to things other than printers. As described above, the present invention can be applied in various ways and can take various embodiments in accordance with the gist thereof.

【0024】[0024]

【発明の効果】以上の説明で明らかなように、本発明の
光学センサの制御方法によれば、光学センサの出力値に
対応して、2値の判定の境界値を設定変更することがで
き、例えば光学センサへのほこり等の付着や検出対象物
の発光特性,反射特性等のばらつきあるいは温度特性に
起因する検出電位の変動の各状況に柔軟に対応すること
ができ、そのような状況下でも正確に対象物を検出でき
る利点が得られる。
[Effects of the Invention] As is clear from the above explanation, according to the optical sensor control method of the present invention, the setting of the boundary value for binary determination can be changed in accordance with the output value of the optical sensor. For example, it is possible to flexibly respond to various situations such as dust adhesion to the optical sensor, variations in the light emission characteristics and reflection characteristics of the object to be detected, and fluctuations in the detection potential due to temperature characteristics. However, it has the advantage of being able to accurately detect objects.

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

【図1】本発明の一実施例を実現するための構成を示す
ブロック図
FIG. 1 is a block diagram showing a configuration for realizing an embodiment of the present invention.

【図2】上記実施例の光学センサの制御方法を示すフロ
ーチャート
FIG. 2 is a flowchart showing a method for controlling the optical sensor of the above embodiment.

【図3】上記実施例の作用説明図[Fig. 3] Diagram explaining the operation of the above embodiment

【図4】光学センサの使用例を示すプリンタにおける用
紙エッジ検出機構
[Figure 4] Paper edge detection mechanism in a printer showing an example of using an optical sensor

【図5】プリンタの一例を示すビデオプリンタの構成図
[Figure 5] Configuration diagram of a video printer showing an example of a printer

【図6】(a),(b)は光学センサの従来の制御方法
を示す説明図
[Figure 6] (a) and (b) are explanatory diagrams showing the conventional control method for optical sensors.

【図7】上記従来の光学センサの制御方法の問題点の説
明図
[Fig. 7] An explanatory diagram of the problems of the conventional optical sensor control method described above.

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

4…光学センサ、5…モータ、14…システムコントロ
ーラ、15…CPU、15a…記録制御手段、15b…
H,Lレベル判定手段、15c…境界値算出手段、15
d…モータ制御手段、18…A/Dコンバータ、19…
メモリ。
4... Optical sensor, 5... Motor, 14... System controller, 15... CPU, 15a... Recording control means, 15b...
H, L level determination means, 15c...boundary value calculation means, 15
d...Motor control means, 18...A/D converter, 19...
memory.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】  光学センサの検出電位をディジタル変
換し、該変換値のうち所定の期間の最高レベルと最低レ
ベルの変換値もしくはこれらの最高レベルと最低レベル
の変換値から定まる最高レベルと最低レベルの境界値を
記録し、この記録に基づいて必要の都度前記光学センサ
の検出電位の2値の判定に使用する境界値を変更するこ
とを特徴とする光学センサの制御方法。
Claim 1: Digitally converting the detected potential of an optical sensor, and converting the highest level and lowest level for a predetermined period among the converted values, or the highest level and lowest level determined from the converted values of these highest and lowest levels. A method for controlling an optical sensor, characterized in that a boundary value is recorded, and the boundary value used for determining the binary value of the detected potential of the optical sensor is changed whenever necessary based on this recording.
JP11133391A 1991-05-16 1991-05-16 Control of optical sensor Pending JPH04339203A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11133391A JPH04339203A (en) 1991-05-16 1991-05-16 Control of optical sensor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11133391A JPH04339203A (en) 1991-05-16 1991-05-16 Control of optical sensor

Publications (1)

Publication Number Publication Date
JPH04339203A true JPH04339203A (en) 1992-11-26

Family

ID=14558551

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11133391A Pending JPH04339203A (en) 1991-05-16 1991-05-16 Control of optical sensor

Country Status (1)

Country Link
JP (1) JPH04339203A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1997030851A1 (en) * 1996-02-23 1997-08-28 Copyer Co. Ltd. Image forming device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1997030851A1 (en) * 1996-02-23 1997-08-28 Copyer Co. Ltd. Image forming device
US6120196A (en) * 1996-02-23 2000-09-19 Copyer Co., Ltd. Image forming device using multiple factors to adjust print position

Similar Documents

Publication Publication Date Title
JP2959961B2 (en) Printer
JPH06340096A (en) Thermal transfer printer device and its method
JPH05246414A (en) Label printer
US5957600A (en) Method and apparatus for printing reduced size of image in serial printer
US11025791B2 (en) Information processing apparatus, printing apparatus, information processing method, and program, providing accurate identification of the type of a printing medium by increasing the opportunity to improve the accuracy of determining the type of printing medium based on measurement results
JPH04339203A (en) Control of optical sensor
US6121989A (en) Transparency having printing surface discriminating area method for discriminating printing surface of transparency in thermal printer and device appropriate therefor
US5652950A (en) Power saving method in image forming apparatus using electrophotographic developing method
JPS6336236B2 (en)
JPH08244246A (en) Printer
JPH0940227A (en) Device for identifying medium for printing, and printing device
JP3633845B2 (en) Sensor signal processing device
JP4248439B2 (en) Paper edge detection device and printer using the same
TWI246467B (en) Automatic recognition system and its method of printer recording media
CN111775576B (en) Printer and printing medium sensing method
JPH0445959A (en) Printer
JP2735031B2 (en) Printer device
JPH07291523A (en) Device for detecting program searching mark of roll paper
JP2788905B2 (en) Paper detection device
JPH0627521U (en) Label printer
JPS63272648A (en) Label printer
JPH06191048A (en) Ink exhaustion detector of ink jet recording apparatus
JP3839147B2 (en) Passbook line detector
JPH0732660A (en) Printing device
JP2791289B2 (en) Image processing method