JP3371968B2 - Printer and printer control method - Google Patents

Printer and printer control method

Info

Publication number
JP3371968B2
JP3371968B2 JP00851492A JP851492A JP3371968B2 JP 3371968 B2 JP3371968 B2 JP 3371968B2 JP 00851492 A JP00851492 A JP 00851492A JP 851492 A JP851492 A JP 851492A JP 3371968 B2 JP3371968 B2 JP 3371968B2
Authority
JP
Japan
Prior art keywords
voltage
converter
digital conversion
correction table
voltage correction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP00851492A
Other languages
Japanese (ja)
Other versions
JPH05193235A (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.)
Seiko Epson Corp
Original Assignee
Seiko Epson 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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP00851492A priority Critical patent/JP3371968B2/en
Publication of JPH05193235A publication Critical patent/JPH05193235A/en
Application granted granted Critical
Publication of JP3371968B2 publication Critical patent/JP3371968B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Accessory Devices And Overall Control Thereof (AREA)
  • Direct Current Feeding And Distribution (AREA)

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】 プリンタにおけるADコンバー
タおよびマイクロプロセッサを用いた制御方法に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a control method using an AD converter and a microprocessor in a printer.

【0002】[0002]

【従来の技術】プリンタメカニズムを精度良く高速に駆
動し、良好な印字品質を保つために、モータやプリント
ヘッドを駆動する電源電圧は一定であることが好まし
い。多くのプリンタの場合、印字動作中のモータやプリ
ントヘッドの消費電力は一定でなく、特にプリントヘッ
ドの場合は、その動作パターンに影響されて大きく変化
する。消費電力の変化は、駆動電源電圧を変化させ、モ
ータのトルクやプリントヘッドの動作に影響を与え、印
字品質の低下をまねく。
2. Description of the Related Art In order to drive a printer mechanism with high accuracy and at high speed and maintain good printing quality, it is preferable that the power supply voltage for driving a motor and a print head is constant. In many printers, the power consumption of the motor and the print head during printing operation is not constant, and particularly in the case of the print head, the power consumption is greatly affected by the operation pattern. The change in power consumption changes the drive power supply voltage, affects the torque of the motor and the operation of the print head, and causes deterioration of print quality.

【0003】そこで駆動電源電圧を監視し、電圧変化に
応じてモータ駆動電流設定を変化させたり、プリントヘ
ッドの通電時間を変化させたりして、駆動電源電圧の変
化による印字品質の低下を防止する制御方法がしばしば
とられる。これらの制御は、マイクロプロセッサによっ
て行われ、マイクロプロセッサに駆動電圧を知らせるセ
ンサの役目をはたす手段として、ADコンバータが通常
用いられる。
Therefore, the drive power supply voltage is monitored and the motor drive current setting is changed or the energization time of the print head is changed according to the voltage change to prevent the deterioration of the print quality due to the change of the drive power supply voltage. Control methods are often used. These controls are performed by a microprocessor, and an AD converter is usually used as a means for serving as a sensor for notifying the microprocessor of a drive voltage.

【0004】ADコンバータによる電圧検出は、プリン
タメカニズム駆動電圧をADコンバータの測定可能電圧
範囲に変換するための分圧抵抗の初期偏差、ADコンバ
ータの初期偏差、基準電源電圧の初期偏差およびそれぞ
れの温度特性、経年変化から測定誤差を生じる。一般的
に電気部品の初期偏差は、それらの温度変化、経年変化
に比較して、1000倍以上大きい。そこで従来、分圧
抵抗の初期偏差、ADコンバータの初期偏差および基準
電源電圧の初期偏差による電圧測定精度の低下を防止す
るために、次のような方式がとられていた。
The voltage detection by the AD converter is performed by detecting the initial deviation of the voltage dividing resistor for converting the printer mechanism driving voltage into the measurable voltage range of the AD converter, the initial deviation of the AD converter, the initial deviation of the reference power supply voltage, and the respective temperatures. Measurement errors occur due to characteristics and aging. Generally, the initial deviation of electric parts is 1000 times or more larger than the temperature change and the secular change. Therefore, in order to prevent the deterioration of the voltage measurement accuracy due to the initial deviation of the voltage dividing resistor, the initial deviation of the AD converter, and the initial deviation of the reference power supply voltage, the following method has been conventionally used.

【0005】第一の方式は、それぞれ精度の高い(初期
偏差の小さい)電気部品を用いる方式である。具体的に
言えば、初期偏差の小さい高精度な抵抗を用いて分圧抵
抗を構成したり、初期偏差の小さい高精度安定化電源用
素子で基準電源を構成したり、初期偏差の小さい高精度
ADコンバータを使用するのである。
The first method is a method that uses highly accurate electric components (small initial deviation). Specifically, a voltage divider resistor is configured using a high-precision resistor with a small initial deviation, a reference power source is configured with a high-precision stabilized power supply element with a small initial deviation, and a high-precision resistor with a small initial deviation is used. The AD converter is used.

【0006】第二の方式は、半固定抵抗器を用いて分圧
抵抗の分割比または基準電源電圧値を調整して、分圧抵
抗の初期偏差、ADコンバータの初期偏差および基準電
源電圧の初期偏差を打ち消す方式である。
The second method is to adjust the division ratio of the voltage dividing resistor or the reference power source voltage value by using a semi-fixed resistor to obtain the initial deviation of the voltage dividing resistor, the initial deviation of the AD converter and the initial value of the reference power source voltage. This is a method of canceling the deviation.

【0007】[0007]

【発明が解決しようとする課題】このような方式の効果
は十分にあり、プリンタにおける電圧検出の精度向上に
貢献できる。
The effect of such a method is sufficient and can contribute to the improvement of the voltage detection accuracy in the printer.

【0008】しかし、第一の方式の場合、プリンタ製造
後の調整は不必要なものの、高精度な電気部品を数多く
使用するため、部品価格が非常に高価なものになるの
と、電圧測定の精度としては、複数の部品の初期偏差の
最悪値の重ね合わせになるため、たとえ存在する超高精
度の電気部品を組み合わせたとしても、目的の測定精度
が達成できない場合がある。
However, in the case of the first method, adjustment after printer manufacturing is unnecessary, but since many high-precision electric parts are used, the parts cost becomes very expensive, and voltage measurement As for accuracy, since the worst values of the initial deviations of a plurality of parts are superposed, the target measurement accuracy may not be achieved even if existing ultra-high accuracy electric parts are combined.

【0009】第二の方式の場合、分圧抵抗の初期偏差、
ADコンバータの初期偏差および基準電源電圧の初期偏
差を打ち消すことは可能であるが、半固定抵抗器を用い
て分圧抵抗の分割比または基準電源電圧値を調整するた
めに、機器の出荷時に電圧を測定しながら半固定抵抗器
を専用治具を用いて操作しある電圧値に合わせ、固定剤
を塗布するとか、抵抗を測定しながら半固定抵抗器を操
作してある抵抗値に合わせ、固定剤を塗布するというよ
うな複雑な作業を強いる。かつ半固定抵抗は温度変化、
湿度変化および振動等に弱い部品であり、機器の信頼性
を著しく低下させる原因となる。
In the case of the second method, the initial deviation of the voltage dividing resistance,
Although it is possible to cancel the initial deviation of the AD converter and the initial deviation of the reference power supply voltage, in order to adjust the division ratio of the voltage dividing resistor or the reference power supply voltage value using the semi-fixed resistor, the voltage at the time of shipment of the device is adjusted. While measuring, adjust the semi-fixed resistor to a certain voltage value by using a special jig and apply a fixative, or operate the semi-fixed resistor while measuring the resistance and fix it to a certain resistance value. It complicates the work such as applying the agent. And the semi-fixed resistance changes with temperature,
It is a component that is vulnerable to changes in humidity and vibration, and can cause a significant decrease in the reliability of the equipment.

【0010】そこで本発明はこのような課題を解決する
もので、その目的とするところは、ADコンバータおよ
びマイクロプロセッサを有するプリンタにおいて、廉価
に、かつ高速に、かつ精度良くプリンタメカニズムを制
御する方法を提供することにある。
The present invention solves such a problem, and an object of the present invention is to control a printer mechanism inexpensively, at high speed and with high precision in a printer having an AD converter and a microprocessor. To provide.

【0011】[0011]

【課題を解決するための手段】本発明のプリンタは、プ
リントヘッド等を駆動するための駆動電源電圧を入力と
し、基準電圧を与えられ、前記駆動電源電圧のデジタル
変換値を出力するADコンバータと、前記ADコンバー
タからの複数の異なるデジタル変換値にそれぞれ含まれ
る誤差を小さくするように前記複数の異なるデジタル変
換値をそれぞれ補正するための特性をもつ電圧補正テー
ブルを作製するための基となるパラメタを記憶する不揮
発性記憶手段と、前記不揮発性記憶手段の前記パラメタ
を基に電圧補正テーブルを作製するための電圧補正テー
ブル作製プログラムと、前記電圧補正テーブル作製プロ
グラムにより作製された前記電圧補正テーブルを一時的
に記憶するためのRAMと、前記ADコンバータのデジ
タル変換値を入力とし、前記RAMが記憶している電圧
補正テーブルを用いて、前記デジタル変換値を補正する
電圧補正手段と、マイクロプロセッサ等から構成され
前記電圧補正手段によって補正されたデジタル変換値を
基にプリントヘッド等を制御する制御回路とを有する
とを特徴とする。
A printer of the present invention includes an AD converter which receives a drive power supply voltage for driving a print head or the like, receives a reference voltage, and outputs a digital conversion value of the drive power supply voltage. , A parameter serving as a basis for producing a voltage correction table having characteristics for respectively correcting the plurality of different digital conversion values so as to reduce an error included in each of the plurality of different digital conversion values from the AD converter. To remember
And a parameter of the non-volatile storage means.
Voltage correction table to create a voltage correction table based on
Cable production program and the voltage correction table production program
Temporarily change the voltage correction table created by
A RAM for storing the inputs the digital conversion value of the AD converter, by using the voltage correction table in the RAM is stored, a voltage correction means for correcting the digital conversion value, composed of a microprocessor or the like It is,
The digital conversion value corrected by the voltage correction means
It characterized the this <br/> to have a control circuit for controlling the print head or the like group.

【0012】また、前記ADコンバータへ基準電圧を供
給する基準電源は、前記制御回路を動作させるための電
源と同一である。
The reference power supply for supplying the reference voltage to the AD converter is the same as the power supply for operating the control circuit.

【0013】[0013]

【0014】さらに、前記パラメタは、予め電圧値のわ
かっている電圧を駆動電圧として前記ADコンバータへ
与え、出力されたデジタル変換値と前記わかっている電
圧から求める又は調整することを特徴とする。
Further, the above-mentioned parameter is characterized in that a voltage whose voltage value is known in advance is given to the AD converter as a drive voltage, and is calculated or adjusted from the output digital conversion value and the known voltage.

【0015】[0015]

【実施例】図1は本発明の電圧検出方法の実施例におけ
るプリンタの構成の関係部分を示すブロック図である。
DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1 is a block diagram showing a relevant portion of the configuration of a printer in an embodiment of the voltage detecting method of the present invention.

【0016】バス(119)で接続されるCPUおよび
その周辺(105)とROM(109)、RAM(11
0)によって形成された制御コンピュータ部分は、プリ
ンタ全体の制御のために設けられ、本発明の電圧検出に
関係する動作は、その制御機能のほんの一部の機能であ
る。CPUおよびその周辺(105)とROM(10
9)、RAM(110)によって形成された制御コンピ
ュータ部分は、通常ROM(109)に記憶されたプロ
グラムによって動作する。接続手段(122)によっ
て、バス(119)に接続可能な外部のテストプログラ
ムROM(107)が接続された場合は、テストプログ
ラムROM(107)に記憶されたプログラムによって
動作することもできる。テストプログラムROM(10
7)が接続されると、外部ROM接続信号(132)を
通してプログラム切り換え手段(131)に外部ROM
の存在が知らされ、プログラム切り換え手段(131)
は外部にテストプログラムROM(107)があると、
優先的に外部ROMをアクセスするようにチップセレク
ト信号を発生する。このチップセレクト信号の切り換え
によって、内部ROM(109)はディスエーブルされ
外部のテストプログラムROM(107)はイネーブル
され、CPUは制御プログラムを切り換えられる。
A CPU connected by a bus (119) and its peripherals (105), a ROM (109), and a RAM (11
The control computer portion formed by 0) is provided for controlling the entire printer, and the operations related to the voltage detection of the present invention are only a part of the control functions. CPU and its periphery (105) and ROM (10
9), the control computer portion formed by the RAM (110) normally operates by the program stored in the ROM (109). When an external test program ROM (107) connectable to the bus (119) is connected by the connecting means (122), it can also be operated by the program stored in the test program ROM (107). Test program ROM (10
When 7) is connected, the external ROM is connected to the program switching means (131) through the external ROM connection signal (132).
Of the presence of the program, and means for switching programs (131)
Has a test program ROM (107) outside,
A chip select signal is generated to preferentially access the external ROM. By switching the chip select signal, the internal ROM (109) is disabled, the external test program ROM (107) is enabled, and the CPU switches the control program.

【0017】CPUおよびその周辺(105)とROM
(109)には、EEPROM(117)が接続されて
おり、装置の電源を切っても記憶する必要のある情報を
保持する。このEEPROM(117)は電圧補正機能
のためだけの構成要素の一つとして存在するのではな
く、どちらかと言うとプリンタの制御上のパラメータや
デフォルト値を記憶するのが主たる機能で、電圧補正の
ためのパラメタを記憶するのにも利用しているのであ
る。プリンタの制御上のパラメータやデフォルト値とい
うのは、印字位置がプリントヘッドの動く方向によって
ずれないように調整するためのタイマー値、電源オンし
たときに選択されるフォント種、文字テーブル、インタ
ーナショナル文字セット、インタフェイスの設定等を決
めるデータである。
CPU and its periphery (105) and ROM
An EEPROM (117) is connected to (109) and holds information that needs to be stored even when the power of the device is turned off. This EEPROM (117) does not exist as one of the constituent elements only for the voltage correction function, but rather has the main function of storing the control parameters and default values of the printer. It is also used to store parameters for The printer control parameters and default values are the timer value for adjusting the print position so that it does not shift depending on the direction in which the print head moves, the font type selected when the power is turned on, the character table, and the international character set. , Data for determining interface settings and the like.

【0018】アナログ信号である電圧値をデジタル信号
に変換し、コンピュータ部分に知らせる為に、ADコン
バータ(102)がCPU(105)に接続されてい
る。プリンタ制御用に開発されたCPUは、ADコンバ
ータをCPUのチップ内に内蔵している場合もしばしば
である。本発明ではADコンバータがCPU内であるか
ないかは問題でなく、どちらの場合でも実現可能なので
ある。ADコンバータ(102)は電圧のデジタル信号
への変換を行うために、基準となる電圧が必要で、それ
を供給する信号線が基準電圧入力(101)である。こ
の実施例では基準電源は特別に設けてなく、CPU等の
ロジック回路を動作させるための電源(+5v)と兼ね
ている。通常ADコンバータの基準電源は、ロジック回
路を動作させるための電源と同一ではなく、高精度のレ
ギュレータによって構成され独立して存在するのが一般
的であるが、本発明における誤差補正方式を用いること
によって、基準電源の電圧の絶対値の初期偏差は問題で
ないので、ロジック回路を動作させるための電源と兼ね
ることができ、コスト低減に大きく貢献する。ただし、
基準電圧としての電源は温度変化、経年変化等の変動が
あると好ましくない。しかし、ロジック回路を動作させ
るための電源を構成するレギュレータでも、その電圧変
動は高精度レギュレータによって構成された基準電源電
圧の絶対値の初期偏差に比べて小さく、プリンタにおけ
る電圧検出精度を本発明の誤差補正方式を用いて実現す
るのに十分である。
An AD converter (102) is connected to a CPU (105) in order to convert a voltage value which is an analog signal into a digital signal and notify the computer portion. A CPU developed for controlling a printer often has an AD converter built in a chip of the CPU. In the present invention, it does not matter whether the AD converter is in the CPU or not, and it can be realized in either case. The AD converter (102) needs a reference voltage in order to convert the voltage into a digital signal, and the signal line for supplying the reference voltage is the reference voltage input (101). In this embodiment, the reference power source is not specially provided and also serves as a power source (+ 5v) for operating the logic circuit such as the CPU. Normally, the reference power source of the AD converter is not the same as the power source for operating the logic circuit but is generally composed of a high-precision regulator and exists independently. However, the error correction method according to the present invention is used. Thus, since the initial deviation of the absolute value of the voltage of the reference power source does not matter, it can also serve as a power source for operating the logic circuit, which greatly contributes to cost reduction. However,
It is not preferable that the power supply as the reference voltage fluctuates due to temperature changes, aging changes, and the like. However, even in the regulator that constitutes the power supply for operating the logic circuit, the voltage fluctuation thereof is smaller than the initial deviation of the absolute value of the reference power supply voltage constituted by the high-accuracy regulator, and the voltage detection accuracy in the printer can be improved. Sufficient to implement using an error correction scheme.

【0019】測定される電圧はプリンタメカニズム、プ
リントヘッド等の駆動電源(103)の電圧であり、接
続手段(121)によって制御回路に接続され、分圧抵
抗(118)にも供給される。駆動電源(103)の電
圧が、ADコンバータ(102)の入力許容電圧範囲内
であると限定されない場合は、分圧抵抗(118)がA
Dコンバータ(102)の測定電圧範囲を拡大する役目
を果たす。分圧抵抗(118)を通して電圧範囲がAD
コンバータ(102)の入力許容電圧範囲に変換された
被測定電圧は、ADコンバータ(102)に与えられ基
準電圧入力(101)と比較することでデジタル信号に
変換されCPU(105)に認識される。
The measured voltage is the voltage of the driving power source (103) of the printer mechanism, the print head, etc., which is connected to the control circuit by the connecting means (121) and is also supplied to the voltage dividing resistor (118). When the voltage of the driving power source (103) is not limited to be within the input allowable voltage range of the AD converter (102), the voltage dividing resistor (118) is set to A.
It serves to extend the measurement voltage range of the D converter (102). The voltage range is AD through the voltage dividing resistor (118)
The measured voltage converted into the input allowable voltage range of the converter (102) is given to the AD converter (102), converted into a digital signal by comparison with the reference voltage input (101), and recognized by the CPU (105). .

【0020】本発明の電圧検出方法の実施例におけるプ
リンタ構成の特徴は、プリンタ外部にテストプログラム
ROM(107)として記憶されたテストプログラム手
段の存在、該プログラムが接続されたことを検知して制
御をテストプログラム手段に移すプログラム切り換え手
段の存在、プリンタ内部に制御プログラムROM(10
9)とともに記憶されている、プリンタの電源オン時
に、電圧測定値を補正するためのデータ変換テーブルを
作製する電圧補正テーブル作製プログラムと、プリンタ
動作時の電圧検出が行われるタイミングに、ADコンバ
ータの出力値から該データ変換テーブルを引いて補正さ
れた電圧値を得る電圧補正プログラムの存在である。
The features of the printer configuration in the embodiment of the voltage detecting method of the present invention are that the test program means stored as a test program ROM (107) outside the printer is present, and the control is performed by detecting that the program is connected. Exists in the printer and a control program ROM (10
9), a voltage correction table creation program for creating a data conversion table for correcting the voltage measurement value, which is stored together with the printer power-on, and the timing of voltage detection during printer operation, of the AD converter. This is the existence of a voltage correction program for obtaining the corrected voltage value by subtracting the data conversion table from the output value.

【0021】図2は本発明の電圧検出方法の実施例にお
けるプリンタのAD変換手段の変換特性を示した図であ
る。横軸は測定入力電圧(306)で、縦軸は分圧抵
抗、基準電圧を含めたAD変換手段のトータルなAD変
換結果(301)を示す。
FIG. 2 is a diagram showing conversion characteristics of the AD conversion means of the printer in the embodiment of the voltage detection method of the present invention. The horizontal axis represents the measured input voltage (306), and the vertical axis represents the total AD conversion result (301) of the AD conversion means including the voltage dividing resistance and the reference voltage.

【0022】理想的AD変換特性(308)に対して現
実のAD変換特性は、分圧抵抗の初期偏差、ADコンバ
ータの初期偏差、基準電圧の初期偏差、それぞれの温度
特性、経年変化から誤差を生じ、誤差の上限を含むAD
変換特性(307)から、誤差の下限を含むAD変換特
性(309)までばらつく。これによって、ある被測定
電圧(305)は、理想的変換値(303)に対して、
変換誤差1(302)または、変換誤差2(304)を
生じる。
The actual AD conversion characteristic with respect to the ideal AD conversion characteristic (308) is an error due to the initial deviation of the voltage dividing resistor, the initial deviation of the AD converter, the initial deviation of the reference voltage, the respective temperature characteristics, and the secular change. AD that includes the upper limit of the error
There are variations from the conversion characteristic (307) to the AD conversion characteristic (309) including the lower limit of the error. As a result, a certain measured voltage (305) becomes
Conversion error 1 (302) or conversion error 2 (304) occurs.

【0023】図3は本発明の電圧検出方法の実施例にお
けるプリンタのAD変換手段の補正方法を示す図であ
る。被測定電圧(410)は、誤差を含む変換特性(4
07)によって、理想的なAD変換値(406)に対し
て、誤差を含むAD変換値(405)としてADコンバ
ータから出力され、CPUに知らされる。
FIG. 3 is a diagram showing a method of correcting the AD conversion means of the printer in the embodiment of the voltage detecting method of the present invention. The measured voltage (410) has a conversion characteristic (4) including an error.
07), the ideal AD conversion value (406) is output from the AD converter as an AD conversion value (405) including an error and is notified to the CPU.

【0024】CPUおよびその周辺回路、ROM、RA
Mから構成されるコンピュータ部分は、誤差を含むAD
変換値(405)を誤差を含まないAD変換値、つまり
真実の値に補正するための補正テーブルを備え、その補
正特性(403)によって、誤差を含むAD変換値(4
05)は、補正後の測定結果(412)に変換される。
CPU and its peripheral circuits, ROM, RA
The computer part composed of M has an AD including an error.
A correction table for correcting the conversion value (405) to an AD conversion value that does not include an error, that is, a true value is provided, and the AD conversion value (4
05) is converted into the corrected measurement result (412).

【0025】この補正テーブル特性(403)の基とな
るパラメタは、プリンタ製造時にテスト用基準電圧電源
を被測定電圧として用いて、プリンタ外部にテストプロ
グラムROMとして記憶されたテストプログラムを、プ
ログラム切り換え手段の働きによって実行したときに生
成され、不揮発性記憶手段であるEEPROMに記憶さ
れる。補正テーブル特性(403)をテーブルとしてE
EPROMに記憶するとその容量が大きくなるため、補
正テーブル特性(403)を数式に近似、そのパラメタ
をEEPROMに記憶する。この実施例の場合は、補正
テーブル特性(403)は直線(1次式)で表現してい
るので、EEPROMに記憶するパラメタは、一般的に
直線の傾きと直線がXまたはY軸と交わる点の2つであ
るが、後述するように、この場合は傾きの値だけでも十
分である。
The parameter which is the basis of this correction table characteristic (403) is the program switching means using the test program stored in the test program ROM outside the printer by using the test reference voltage power supply as the measured voltage at the time of manufacturing the printer. Is generated when it is executed by the action of, and is stored in the EEPROM which is a non-volatile storage means. E using the correction table characteristics (403) as a table
Since the capacity becomes large when stored in the EPROM, the correction table characteristic (403) is approximated to a mathematical expression, and the parameter is stored in the EEPROM. In the case of this embodiment, since the correction table characteristic (403) is expressed by a straight line (linear expression), the parameter stored in the EEPROM is generally the point where the straight line slope and the straight line intersects the X or Y axis. However, as will be described later, in this case, only the inclination value is sufficient.

【0026】パラメタとして記憶された特性は、プリン
タ内部にプリンタの制御プログラムとともに記憶されて
いる電圧補正テーブル作製プログラムによって、プリン
タの電源オン時にEEPROMから読み出され、電圧測
定値を補正するための補正テーブル特性(403)を示
すRAM上のデータ変換テーブルに作り変えられる。プ
リンタ動作時に電圧検出が行われるタイミングは、印字
タイミング毎または一定時間毎のプリントヘッド駆動電
圧確認、印字開始時のイリーガル電圧検出、モータ駆動
時の電流値や駆動周期設定のための電圧測定等である。
特に重要なのは、プリントヘッド駆動電圧によってプリ
ントヘッド駆動パルス幅を変化させたりしてプリントヘ
ッドの動作を駆動電圧が変化しても保証するための制御
である。このような用途の場合は、高速に電圧を判定す
る必要がありさらにプリンタのスループットを低下させ
ないために、CPUの処理時間をなるべく少なくする必
要がある。そこでプリンタ動作時の電圧検出が行われる
タイミングに、ADコンバータの出力値からRAM上に
電源投入時に作っておいたデータ変換テーブルを引いて
補正された電圧値を得る電圧補正プログラムを動作させ
る。こうすることで、電圧測定時の複雑な補正計算を省
き、数値テーブルを参照するだけの高速処理が可能とな
る。
The characteristic stored as a parameter is read out from the EEPROM when the printer is powered on by a voltage correction table preparation program stored in the printer together with the printer control program, and is used for correcting the voltage measurement value. The data conversion table on the RAM showing the table characteristics (403) can be recreated. The timing at which the voltage is detected during printer operation can be checked by checking the print head drive voltage at each print timing or every fixed time, detecting the legal voltage at the start of printing, measuring the current value when driving the motor, and measuring the voltage for setting the drive cycle. is there.
Particularly important is control for guaranteeing the operation of the print head even when the drive voltage changes by changing the print head drive pulse width depending on the print head drive voltage. In the case of such an application, it is necessary to determine the voltage at high speed and further reduce the processing time of the CPU as much as possible so as not to reduce the throughput of the printer. Therefore, at the timing when voltage detection is performed during printer operation, a voltage correction program that operates to obtain a corrected voltage value by subtracting the data conversion table created on the RAM from the output value of the AD converter when the power is turned on is operated. By doing so, complicated correction calculation at the time of voltage measurement is omitted, and high-speed processing only by referring to the numerical table becomes possible.

【0027】このようにしてADコンバータの出力数値
を補正して認識することで、分圧抵抗の初期偏差、AD
コンバータの初期偏差および基準電圧の初期偏差が原因
で発生する電圧測定誤差をゼロにすることができる。電
圧測定誤差のほとんどはこれらのばらつきが原因であ
り、その他温度変化、経年変化からくる誤差はPPMオ
ーダーであり、数%の抵抗偏差からくる誤差等に比較す
れば1/1000から1/10000である。よって、
分圧抵抗、ADコンバータ、基準電圧の初期偏差からく
る誤差をゼロにすることで、電圧検出精度は飛躍的に向
上する。そしてプリンタ装置外部に記憶され調整時に用
いるテストプログラム手段、テストプログラム手段が接
続されたことを検知して制御をテストプログラム手段に
移すプログラム切り換え手段を備えることで、プリンタ
の内部に記憶される制御プログラムの容量を大きく増や
すことがなく、さらにプリンタの電源オン時に用い電圧
測定値を補正するためのデータ変換テーブルを作製する
電圧補正テーブル作製プログラムと、電圧検出が行われ
るタイミングに用いADコンバータの出力値からデータ
変換テーブルを引いて補正された電圧値を得る電圧補正
プログラムを有することで高速化を可能とする。
By correcting and recognizing the output value of the AD converter in this way, the initial deviation of the voltage dividing resistance, AD
The voltage measurement error caused by the initial deviation of the converter and the initial deviation of the reference voltage can be reduced to zero. Most of the voltage measurement errors are caused by these variations, and other errors due to temperature changes and aging are on the PPM order. Compared with errors due to resistance deviation of several%, it is 1/1000 to 1/10000. is there. Therefore,
By eliminating the error caused by the initial deviation of the voltage dividing resistor, the AD converter, and the reference voltage, the voltage detection accuracy is dramatically improved. A control program stored inside the printer is provided by providing a test program means stored outside the printer device and used for adjustment, and a program switching means for detecting the connection of the test program means and transferring control to the test program means. Voltage correction table creation program that creates a data conversion table for correcting the voltage measurement value that is used when the printer is powered on, without significantly increasing the capacity of the AD converter, and the output value of the AD converter that is used at the timing of voltage detection. By having a voltage correction program for obtaining a corrected voltage value by subtracting the data conversion table from, the speed can be increased.

【0028】図4は本発明の電圧検出方法の実施例にお
けるプリンタ調整時のテストプログラム動作を示すフロ
ーチャートである。調整時にはテストプログラムを使用
するが、前述したようにテストプログラムは専用のテス
トプログラムROMに記憶されていて、接続手段を通し
てバスに接続されると調整動作に入る(501)。
FIG. 4 is a flow chart showing the test program operation during printer adjustment in the embodiment of the voltage detection method of the present invention. A test program is used for adjustment, but as described above, the test program is stored in the dedicated test program ROM, and when it is connected to the bus through the connecting means, the adjustment operation starts (501).

【0029】調整時は電圧が校正された正確なテスト用
基準電源を駆動電源として用る必要があり、まずそのテ
スト用基準電源を被測定電圧としていて接続する(50
2)。この状態でAD変換を行い(503)その値を読
み込む(509)。ADコンバータは通常、電圧に対し
て0Vで変換値0を通る電圧に比例した直線の特性を示
す。補正を行う場合は、その直線の傾きに対して行うだ
けで十分であるから、変換値の入力電圧変化率、つまり
その変換特性直線の傾きを計算(504)、そしてその
傾きの値をEEPROMに記憶する(508)。補正が
変換特性の傾きだけでは不十分な場合は、テスト用基準
電圧電源の電圧を変化させて、それぞれに対するAD変
換値から補正曲線を求め、その曲線を記述するパラメタ
を記憶することも可能である。
At the time of adjustment, it is necessary to use an accurate test reference power source whose voltage has been calibrated as a drive power source. First, the test reference power source is connected as the measured voltage (50).
2). In this state, AD conversion is performed (503) and the value is read (509). An AD converter normally exhibits a linear characteristic that is 0 V with respect to the voltage and is proportional to the voltage passing through the conversion value 0. When the correction is performed, it is sufficient to perform the correction on the slope of the straight line. Therefore, the input voltage change rate of the conversion value, that is, the slope of the conversion characteristic line is calculated (504), and the value of the slope is stored in the EEPROM. It is stored (508). If the correction is not sufficient with the slope of the conversion characteristic, it is possible to change the voltage of the test reference voltage power supply, obtain the correction curve from the AD conversion value for each, and store the parameters describing the curve. is there.

【0030】図5は本発明の電圧検出方法の実施例にお
けるプリンタの電源オン後、イニシャライズ中の動作を
示すフローチャートである。プリンタは電源オン後、通
常の制御プログラムに従ってイニシャライズ動作をする
が、その中でAD変換値の補正テーブルを作製する動作
を行う(601)。
FIG. 5 is a flow chart showing the operation during initialization after power-on of the printer in the embodiment of the voltage detecting method of the present invention. After the power is turned on, the printer performs an initialization operation in accordance with a normal control program, in which an operation of creating a correction table of AD conversion values is performed (601).

【0031】直線で変換特性を補正していく場合は、A
D変換特性直線の傾きをEEPROMから読み込む(6
02)。そして0Vで変換値0を通り、EEPROMか
ら読み出した値の逆数の傾きの直線から得られるAD変
換値対電圧の変換テーブルをRAM上に作製する(60
3)。これによって、電圧測定時にいちいち時間のかか
るわり算をする必要がなく、簡単にかつ高速にAD変換
値の補正ができるようになる。
When correcting the conversion characteristic with a straight line, A
The slope of the D conversion characteristic line is read from the EEPROM (6
02). Then, a conversion table of AD conversion value to voltage obtained from a straight line of the slope of the reciprocal of the value read from the EEPROM, which passes the conversion value 0 at 0 V, is prepared in the RAM (60).
3). As a result, it is possible to easily and quickly correct the AD conversion value without the need for time-consuming division when measuring the voltage.

【0032】図6は本発明の電圧検出方法の実施例にお
けるプリンタの電圧測定時の動作を示すフローチャート
である。プリンタ動作時に電圧測定のタイミングがくる
と(701)、AD変換を行い(702)、AD変換値
を読み込む(703)。その後、読み込んだAD変換値
に対応する電圧値を、RAM上に作製されているAD変
換値対電圧値の変換テーブルを引くことで求める(70
4)(705)。ここで、誤差補正が同時に行われるた
め、正確な電圧値を複雑な計算なしで得ることができ
る。
FIG. 6 is a flow chart showing the operation at the time of measuring the voltage of the printer in the embodiment of the voltage detecting method of the present invention. When the voltage measurement timing comes during the printer operation (701), AD conversion is performed (702), and the AD conversion value is read (703). After that, the voltage value corresponding to the read AD conversion value is obtained by looking up the conversion table of AD conversion value to voltage value created on the RAM (70).
4) (705). Here, since the error correction is performed at the same time, an accurate voltage value can be obtained without complicated calculation.

【0033】[0033]

【発明の効果】以上述べたように、本発明によれば、プ
リンタメカニズム、プリントヘッド等の駆動電源電圧を
監視しながら制御するプリンタにおいて、高速、高印字
品質のプリンタ装置を廉価で提供できるという効果があ
る。
As described above, according to the present invention, it is possible to provide a high-speed, high-printing-quality printer device at low cost in a printer that controls while monitoring the drive power supply voltage of the printer mechanism, the print head, and the like. effective.

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

【図1】本発明の電圧検出方法の実施例におけるプリン
タの構成の関係部分を示すブロック図である。
FIG. 1 is a block diagram showing a relevant portion of a configuration of a printer in an embodiment of a voltage detection method of the present invention.

【図2】本発明の電圧検出方法の実施例におけるプリン
タのAD変換手段の変換特性を示した図である。
FIG. 2 is a diagram showing conversion characteristics of the AD conversion means of the printer in the embodiment of the voltage detection method of the present invention.

【図3】本発明の電圧検出方法の実施例におけるプリン
タのAD変換手段の補正方法を示す図である。
FIG. 3 is a diagram showing a method of correcting the AD conversion means of the printer in the embodiment of the voltage detection method of the present invention.

【図4】本発明の電圧検出方法の実施例におけるプリン
タ調整時のテストプログラム動作を示すフローチャート
である。
FIG. 4 is a flowchart showing a test program operation during printer adjustment in the embodiment of the voltage detecting method of the present invention.

【図5】本発明の電圧検出方法の実施例におけるプリン
タの電源オン後、イニシャライズ中の動作を示すフロー
チャートである。
FIG. 5 is a flowchart showing an operation during initialization after power-on of the printer in the embodiment of the voltage detection method of the present invention.

【図6】本発明の電圧検出方法の実施例におけるプリン
タの電圧測定時の動作を示すフローチャートである。
FIG. 6 is a flow chart showing the operation of the printer during voltage measurement in the embodiment of the voltage detection method of the present invention.

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

102 ADコンバータ 107 テストプログラムROM 120 テスト用基準電源 102 AD converter 107 test program ROM 120 test reference power supply

フロントページの続き (56)参考文献 特開 平3−96371(JP,A) 特開 平3−222995(JP,A) 特開 平2−29371(JP,A) 特開 平4−113860(JP,A) (58)調査した分野(Int.Cl.7,DB名) B41J 29/46 B41J 29/38 Continuation of front page (56) Reference JP-A-3-96371 (JP, A) JP-A-3-222995 (JP, A) JP-A-2-29371 (JP, A) JP-A-4-113860 (JP , A) (58) Fields surveyed (Int.Cl. 7 , DB name) B41J 29/46 B41J 29/38

Claims (8)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】プリントヘッド等を駆動するための駆動電
源電圧を入力とし、基準電圧を与えられ、前記駆動電源
電圧のデジタル変換値を出力するADコンバータと、 前記ADコンバータからの複数の異なるデジタル変換値
にそれぞれ含まれる誤差を小さくするように前記複数の
異なるデジタル変換値をそれぞれ補正するための特性を
もつ電圧補正テーブルを作製するための基となるパラメ
タを記憶する不揮発性記憶手段と、 前記不揮発性記憶手段の前記パラメタを基に電圧補正テ
ーブルを作製するための電圧補正テーブル作製プログラ
ムと、 前記電圧補正テーブル作製プログラムにより作製された
前記電圧補正テーブルを一時的に記憶するためのRAM
と、 前記ADコンバータのデジタル変換値を入力とし、前記
RAMが記憶している電圧補正テーブルを用いて、前記
デジタル変換値を補正する電圧補正手段と、 マイクロプロセッサ等から構成され、前記電圧補正手段
によって補正されたデジタル変換値を基にプリントヘッ
ド等を制御する制御回路とを有することを特徴とするプ
リンタ。
1. A drive power source for driving a print head or the like.
The source voltage is input, the reference voltage is given,
An AD converter that outputs a digital conversion value of the voltage, Multiple different digital conversion values from the AD converter
To reduce the error contained in
The characteristics for correcting different digital conversion values
Voltage correction tableThe base parameters for making
Non-volatile storage means for storing data, Based on the parameters of the non-volatile storage means, voltage correction
Voltage correction table making program for making cables
And Created by the voltage correction table creation program
RAM for temporarily storing the voltage correction table
When, The digital conversion value of the AD converter is input,The above
RAM storesUsing the voltage correction table,
Voltage correction means for correcting the digital conversion value, Consists of a microprocessor, etc., The voltage correction means
Based on the digital conversion value corrected by
ControlWith control circuitDoCharacterized by
Linta.
【請求項2】前記電圧補正テーブルの作製に先だって、
予め電圧値のわかっている電圧を駆動電圧として前記A
Dコンバータへ与え、出力されたデジタル変換値と前記
わかっている電圧に基づいて、前記パラメタを求める又
は前記不揮発性記憶手段が記憶しているパラメタを調整
し、前記求められた又は調整されたパラメタを前記不揮
発性記憶手段に記憶するテストプログラムを更に有する
ことを特徴とする請求項1記載のプリンタ。
2. Prior to producing the voltage correction table,
A voltage whose voltage value is known in advance is used as the drive voltage.
The digital conversion value output to the D converter and output
Based on the known voltage
Adjusts the parameters stored in the non-volatile storage means
The calculated or adjusted parameters as described above.
Further has a test program stored in the spontaneous storage means
The printer according to claim 1, wherein:
【請求項3】前記テストプログラムは、前記パラメタ
が、前記電圧補正テーブルとしての直線の傾きであっ
て、電圧補正がその傾きだけで不十分な場合には、前記
わかっている電圧を変化させて、変化後の電圧の各々に
対する前記デジタル変換値から曲線を求め、その曲線の
特性をパラメタとする、 ことを特徴とする請求項2記載のプリンタ。
3. The test program includes the parameters
Is the slope of the straight line as the voltage correction table.
If the voltage correction is not enough for the slope,
By changing the known voltage, change each of the changed voltages.
The curve is obtained from the digital conversion value corresponding to
3. The printer according to claim 2 , wherein the characteristic is a parameter .
【請求項4】前記ADコンバータへ基準電圧を供給する
基準電源は、前記制御回路を動作させるための電源と同
一である請求項1記載のプリンタ。
4. A reference voltage is supplied to the AD converter.
The reference power source is the same as the power source for operating the control circuit.
The printer according to claim 1, wherein the printer is one.
【請求項5】前記電圧補正テーブル作製プログラムによ
り前記電圧補正テーブルを作製し、それを前記RAMへ
記憶する処理は、電源オン時に行われることを特徴とす
請求項1記載のプリンタ。
5. The printer according to claim 1 , wherein the process of creating the voltage correction table by the voltage correction table creating program and storing the voltage correction table in the RAM is performed when the power is turned on.
【請求項6】プリントヘッド等を駆動するための駆動電
源電圧をADコンバータへ入力し、基準電圧を前記AD
コンバータに与え、前記駆動電源電圧のデジタル変換値
を得る工程と、 前記ADコンバータからの複数の異なるデジタル変換値
にそれぞれ含まれる誤差を小さくするように前記複数の
異なるデジタル変換値をそれぞれ補正するための特性を
もつ電圧補正テーブルを作製するための基となるパラメ
タを不揮発性記憶媒体に記憶する工程と、 前記不揮発性記憶媒体に記憶された前記パラメタを用い
て、電圧補正テーブルを作製し、その電圧補正テーブル
を一時的にRAMに記憶する工程と、 前記ADコンバータのデジタル変換値を入力とし、前記
RAMに記憶している電圧補正テーブルを用いて、 前記
ADコンバータからのデジタル変換値を補正する工程
と、 前記補正されたデジタル変換値を基にプリントヘッド等
を制御する工程とを有することを特徴とするプリンタの
制御方法。
6. A drive power source for driving a print head or the like.
Input the source voltage to the AD converter and set the reference voltage to the AD
The digital conversion value of the drive power supply voltage given to the converter
To obtain Multiple different digital conversion values from the AD converter
To reduce the error contained in
The characteristics for correcting different digital conversion values
Voltage correction tableThe base parameters for making
Storing the data in a non-volatile storage medium, Using the parameters stored in the non-volatile storage medium
To create a voltage correction table, and
Temporarily storing in RAM, Using the digital conversion value of the AD converter as an input,
Using the voltage correction table stored in RAM, The above
Step of correcting digital conversion value from AD converter
When, A print head or the like based on the corrected digital conversion value
And the process of controllingDoOf the printer characterized by
Control method.
【請求項7】前記電圧補正テーブルの作製に先だって、
予め電圧値のわかっている電圧を駆動電圧として前記A
Dコンバータへ与え、出力されたデジタル変換値と前記
わかっている電圧に基づいて、前記パラメタを求める又
は前記不揮発性記憶手段が記憶しているパラメタを調整
し、前記求められた又は調整されたパラメタを前記不揮
発性記憶手段に記憶する工程を更に有することを特徴と
する請求項6記載のプ リンタの制御方法。
7. Prior to producing the voltage correction table,
A voltage whose voltage value is known in advance is used as the drive voltage.
The digital conversion value output to the D converter and output
Based on the known voltage
Adjusts the parameters stored in the non-volatile storage means
The calculated or adjusted parameters as described above.
Characterized by further comprising a step of storing in the spontaneous storage means.
The method of the printer according to claim 6.
【請求項8】前記電圧補正テーブルを作製し、それを前
記RAMへ記憶する工程は、電源オン時に行われること
を特徴とする請求項6記載のプリンタの制御方法。
8. The voltage correction table is produced and the
The step of storing in RAM should be performed when the power is turned on.
7. The method of controlling a printer according to claim 6, wherein.
JP00851492A 1992-01-21 1992-01-21 Printer and printer control method Expired - Fee Related JP3371968B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP00851492A JP3371968B2 (en) 1992-01-21 1992-01-21 Printer and printer control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP00851492A JP3371968B2 (en) 1992-01-21 1992-01-21 Printer and printer control method

Publications (2)

Publication Number Publication Date
JPH05193235A JPH05193235A (en) 1993-08-03
JP3371968B2 true JP3371968B2 (en) 2003-01-27

Family

ID=11695249

Family Applications (1)

Application Number Title Priority Date Filing Date
JP00851492A Expired - Fee Related JP3371968B2 (en) 1992-01-21 1992-01-21 Printer and printer control method

Country Status (1)

Country Link
JP (1) JP3371968B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100605260B1 (en) 2005-07-15 2006-07-31 삼성전자주식회사 Ac high voltage detecting apparatus
JP6104093B2 (en) * 2013-08-07 2017-03-29 アスモ株式会社 Signal correction device

Also Published As

Publication number Publication date
JPH05193235A (en) 1993-08-03

Similar Documents

Publication Publication Date Title
US6886120B2 (en) Memory control circuit
US5046859A (en) Temperature measuring device and thermal head device having the same
US5414862A (en) Apparatus for controlling a power source
KR102365419B1 (en) Method for calibration of gas sencsor, computer-readable computer program
US5986241A (en) Heating control system for heater provided in laser printer
JP3371968B2 (en) Printer and printer control method
US20040036439A1 (en) Apparatus and method of controlling a stepper motor
US20020126301A1 (en) Self calibrating ink jet cartridges
JP3403127B2 (en) A / D conversion circuit
JP3884257B2 (en) Signal detection method, apparatus, computer, computer program, recording medium
JP2002318622A (en) Method for correcting position detection signal and positioning device
JPH05281054A (en) Temperature detecting mechanism
JPH09119853A (en) Method and apparatus for correction of output value of sensor
JP2001174304A (en) Sensor with built-in arithmetic device
JPH03115869A (en) Current detector
JP3170084B2 (en) Temperature measurement device
JPH0630576A (en) Servo controller and method for controlling servo
JPH01270784A (en) Controller for motor
JP2955430B2 (en) Electronic device measurement method
KR930003556Y1 (en) Temperature compersating circuit for print head
JPH02118425A (en) Temperature detecting device
JPH1188165A (en) Input device and input method for analog signal and recording medium
JP2625371B2 (en) Adjustment method and device for variable resistor
JP2954050B2 (en) Thermal head controller
JP2005020821A (en) Fan motor control arrangement

Legal Events

Date Code Title Description
FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081122

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20091122

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20091122

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20101122

Year of fee payment: 8

LAPS Cancellation because of no payment of annual fees