JP4432055B2 - Printer motor control apparatus and control method - Google Patents

Printer motor control apparatus and control method Download PDF

Info

Publication number
JP4432055B2
JP4432055B2 JP2006291335A JP2006291335A JP4432055B2 JP 4432055 B2 JP4432055 B2 JP 4432055B2 JP 2006291335 A JP2006291335 A JP 2006291335A JP 2006291335 A JP2006291335 A JP 2006291335A JP 4432055 B2 JP4432055 B2 JP 4432055B2
Authority
JP
Japan
Prior art keywords
motor
counter
paper
count value
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2006291335A
Other languages
Japanese (ja)
Other versions
JP2007030521A (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 JP2006291335A priority Critical patent/JP4432055B2/en
Publication of JP2007030521A publication Critical patent/JP2007030521A/en
Application granted granted Critical
Publication of JP4432055B2 publication Critical patent/JP4432055B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

本発明はプリンタ用モータの制御装置および制御方法に関する。   The present invention relates to a printer motor control apparatus and control method.

従来、プリンタの紙送りの制御は紙送りモータ(以下、PFモータともいう)を制御することによって行っていた。DCモータを用いたPFモータの制御は、まず加速制御によってPFモータを起動させた後、PID制御によってPFモータを定速運転し、続いて減速させ停止させていた。そしてこのPID制御は、PFモータの回転に従って回転するエンコーダの出力パルスのカウント値と目標位置(目標パルス数)との偏差に基づいて行われていた。   Conventionally, the paper feed of a printer is controlled by controlling a paper feed motor (hereinafter also referred to as a PF motor). In the control of the PF motor using the DC motor, first, the PF motor is started by acceleration control, then the PF motor is operated at a constant speed by PID control, and then decelerated and stopped. This PID control is performed based on the deviation between the count value of the output pulse of the encoder that rotates in accordance with the rotation of the PF motor and the target position (target pulse number).

一般にPID制御は、PFモータを目標位置に完全に停止させることは難しく、実際の停止位置は、許容範囲内であるが、目標位置からずれた位置となる。   In general, in the PID control, it is difficult to completely stop the PF motor at the target position, and the actual stop position is within the allowable range but is shifted from the target position.

また、許容範囲内の位置に停止後、外乱(例えばシリアルプリンタにおいてはキャリッジの振動等)により動いてしまう場合もあった。   In addition, after stopping at a position within the allowable range, it may move due to disturbance (for example, carriage vibration in a serial printer).

そして、PFモータの停止後に再度起動させて紙送り処理を行う場合には、前回の起動時の目標位置を基準として今回の起動の目標位置が設定されるため、今回の起動によって印刷媒体(紙)が更にずれた位置に停止する可能性がある。このため、所望の位置からずれた位置に印字が行われるという問題があった。   When the paper feed process is performed again after the PF motor is stopped, the current start target position is set with reference to the target position at the previous start, so that the print medium (paper ) May stop at a further offset position. For this reason, there is a problem that printing is performed at a position shifted from a desired position.

本発明は上記事情を考慮してなされたものであって、印刷媒体を駆動するモータの停止後にモータを再起動させても印刷媒体の停止を精度良く行うことが可能なプリンタ用モータの制御装置および制御方法を提供することを目的とする。   The present invention has been made in consideration of the above circumstances, and is a printer motor control device capable of accurately stopping a print medium even if the motor is restarted after the motor driving the print medium is stopped. And providing a control method.

本発明の第1の態様によるプリンタ用モータの制御装置は、モータの回転に従って回転し、前記モータの回転量に応じて前記モータによって搬送される紙の送り量に相当するパルスを出力するエンコーダと、前記モータの起動前に前記紙の送り量の目標値がカウント値として設定され、前記エンコーダから出力される前記パルスに応じて前記カウント値をカウントするカウンタと、前記モータの起動前に、前記紙の送り量の目標値と、前記モータの前回の起動後の停止位置を示す、前記モータの起動前の前記カウンタのカウント値とに基づいて、前記紙送り量の修正された目標値を演算し、前記修正された目標値を前記カウンタの前記カウント値に設定する修正設定手段と、前記カウンタの前記カウント値をカウントダウンするよう前記モータを制御する制御手段と、を備えたことを特徴とする。 A printer motor control apparatus according to a first aspect of the present invention includes an encoder that rotates in accordance with the rotation of a motor and outputs a pulse corresponding to a feed amount of paper conveyed by the motor in accordance with the rotation amount of the motor. , the target value of the feeding amount of the paper before starting the motor is set as a count value, a counter for counting the count value in response to the pulse output from the encoder, before starting the motor, the a target value of the paper feed amount, indicating the last stop position after activation of the motor, based on the count value of the counter before start of the motor, the modified target value of the feeding amount of the paper calculated, a corrected setting means for setting the corrected target value to the count value of said counter, said to count down the count value of said counter model Characterized by comprising control means for controlling the motor, a.

また、本発明の第2の態様によるプリンタ用モータの制御装置は、モータの回転に従って回転し、前記モータの回転量に応じて前記モータによって搬送される紙の送り量に相当するパルスを出力するエンコーダと、前記モータの起動前に前記紙送り量の目標値がカウント値として設定され、前記エンコーダから出力される前記パルスに応じて前記カウント値をカウントするカウンタと、前記モータの起動前に、前記モータの前回の起動時前記紙の送り量の目標値と、前記カウンタによって検出された前記モータの前回の停止時における前記紙の実際の送り量との誤差を演算する誤差演算手段と、前記誤差演算手段によって演算された誤差と、今回の起動時の前記紙の送り量の目標値との和である前記紙の送り量の修正された目標値を演算し、相対的な目標位置として設定する目標位置設定手段と、前記相対的な目標位置と前記モータの前回の停止時における前記カウンタのカウント値に基づく相対的な停止位置との位置偏差を演算するとともに前記カウンタのカウント値を零にリセットする制御量演算手段と、前記位置偏差が零となるように前記モータを制御する制御手段と、を備えたことを特徴とする。 The printer motor control apparatus according to the second aspect of the present invention rotates in accordance with the rotation of the motor and outputs a pulse corresponding to the amount of paper transported by the motor in accordance with the rotation amount of the motor. and the encoder, the target value of the feeding amount of the paper is set as the count value before starting the motor, a counter for counting the count value in response to the pulse output from the encoder, before activation of the motor , the target value of the previous the paper feed amount of startup of the motor, an error calculation means for calculating an error between the actual feed amount of the paper at the previous stop of the motor detected by the counter , an error which is calculated by the error calculating unit, a corrected target value of the paper feed amount which is the sum of the target value of the paper feed amount of the current startup operation Calculates a target position setting means for setting a relative target position, said relative target position, the position deviation between the relative stop position based on the count value of the counter at the previous stop of the motor And a control amount calculating means for resetting the count value of the counter to zero, and a control means for controlling the motor so that the positional deviation becomes zero.

また、本発明の第3の態様によるプリンタ用モータの制御方法は、モータの起動前に、前記モータによって搬送される紙送り量の目標値と、前記モータの回転に従って回転するエンコーダから出力される、前記モータの回転量に応じて前記紙の送り量に相当するパルスに応じてカウント値をカウントするカウンタの前記モータの起動前のカウント値とに基づいて、前記紙送り量の修正された目標値を演算し、前記修正された目標値を前記カウンタの前記カウント値に設定するスッテプと、前記カウンタの前記カウント値をカウントダウンするよう前記モータを制御するステップと、を備えたことを特徴とする。 The third method of controlling a motor for a printer according to an aspect of the present invention, before starting the motor, the target value of the feeding amount of the paper carried by the motor, is output from the encoder that rotates in accordance with rotation of the motor The paper feed amount is corrected on the basis of the count value before starting the motor of the counter that counts the count value according to the pulse corresponding to the paper feed amount according to the rotation amount of the motor. and calculating a target value, characterized in that said corrected target value includes a Suttepu be set to the count value of the counter, and a step of controlling the motor so as to count down the count value of the counter And

また、本発明の第4の態様によるプリンタ用モータの制御方法は、モータの回転に従って回転するエンコーダから出力される、前記モータの回転量に応じて前記モータによって搬送される紙の送り量に相当するパルスに応じてカウント値をカウントするカウンタによって前記紙の位置を検出するステップと、前記モータの起動前に、前記モータの前回の起動時紙の送り量の目標値と、前記カウンタによって検出された前記モータの前回の停止時における前記紙の実際の送り量との誤差を演算するスッテップと、前記演算された誤差と、今回の起動時の前記紙の送り量の目標値との和である前記紙の送り量の修正された目標値を演算し、この修正された目標値を相対的な目標位置として設定するステップと、前記相対的な目標位置と前記モータの前回の停止時における前記カウンタのカウント値に基づく相対的な停止位置との位置偏差を演算するとともに前記カウンタのカウント値を零にリセットするステップと、前記位置偏差が零となるように前記モータを制御するスッテプと、を備えたことを特徴とする。 Further, the printer motor control method according to the fourth aspect of the present invention corresponds to the feed amount of the paper conveyed by the motor according to the rotation amount of the motor, which is output from the encoder rotating according to the rotation of the motor. Detecting the position of the paper by a counter that counts a count value according to a pulse to be detected, a target value of a paper feed amount at the previous start of the motor, and detecting by the counter before starting the motor The sum of the step for calculating the error from the actual feed amount of the paper at the previous stop of the motor, the calculated error, and the target value of the paper feed amount at the current start-up calculates the corrected target value of the feeding amount of a said sheet, said motor and setting the corrected target value as a relative target position, and the relative target position Calculating a relative deviation from the stop position based on the count value of the counter at the previous stop of the counter and resetting the count value of the counter to zero, and the motor so that the position deviation becomes zero And a step for controlling.

まず本実施の形態のプリンタ用モータの制御装置が用いられるインクジェットプリンタの概略の構成について説明する。このインクジェットプリンタの概略の構成を図5に示す。   First, a schematic configuration of an ink jet printer in which the printer motor control device of the present embodiment is used will be described. A schematic configuration of the ink jet printer is shown in FIG.

このインクジェットプリンタは、紙送りを行う紙送りモータ(以下、PFモータともいう)1と、この紙送りモータ1を駆動する紙送りモータドライバ2と、キャリッジ3と、このキャリッジ3を駆動するキャリッジモータ(以下、CRモータともいう)4と、このキャリッジモータ4を駆動するCRモータドライバ5と、DCユニット6と、目詰まり防止のためのインクの吸い出しを制御するポンプモータ7と、このポンプモータ7を駆動するポンプモータドライバ8と、キャリッジ3に固定されて印刷紙50にインクを吐出する記録ヘッド9と、この記録ヘッド9を駆動制御するヘッドドライバ10と、キャリッジ3に固定されたリニア式エンコーダ11と、所定の間隔にスリットが形成された符号板12と、PFモータ1用のロータリ式エンコーダ13と、印刷処理されている紙の終端位置を検出する紙検出センサ15と、プリンタ全体の制御を行うCPU16と、CPU16に対して周期的に割込み信号を発生するタイマIC17と、ホストコンピュータ18との間でデータの送受信を行うインタフェース部(以下IFともいう)19と、ホストコンピュータ18からIF19を介して送られてくる印字情報に基づいて印字解像度やヘッド9の駆動波形等を制御するASIC20と、ASIC20およびCPU16の作業領域やプログラム格納領域として用いられるPROM21,RAM22およびEEPROM23と、印刷中の紙50を支持するプラテン25と、PFモータ1によって駆動されて印刷紙50を搬送する搬送ローラ27と、CRモータ4の回転軸に取付けられたプーリ30と、このプーリ30によって駆動されるタイミングベルト31と、を備えている。   The ink jet printer includes a paper feed motor (hereinafter also referred to as a PF motor) 1 that feeds paper, a paper feed motor driver 2 that drives the paper feed motor 1, a carriage 3, and a carriage motor that drives the carriage 3. (Hereinafter also referred to as a CR motor) 4, a CR motor driver 5 that drives the carriage motor 4, a DC unit 6, a pump motor 7 that controls the suction of ink to prevent clogging, and the pump motor 7 A pump motor driver 8 that drives the recording head, a recording head 9 that is fixed to the carriage 3 and ejects ink onto the printing paper 50, a head driver 10 that drives and controls the recording head 9, and a linear encoder that is fixed to the carriage 3 11, a code plate 12 having slits formed at predetermined intervals, and a rotary for the PF motor 1 An encoder 13, a paper detection sensor 15 for detecting the end position of the paper being printed, a CPU 16 for controlling the entire printer, a timer IC 17 for periodically generating an interrupt signal for the CPU 16, and a host computer 18 And an ASIC 20 for controlling the print resolution and the drive waveform of the head 9 based on the print information sent from the host computer 18 via the IF 19. A PROM 21, RAM 22 and EEPROM 23 used as work areas and program storage areas of the ASIC 20 and CPU 16, a platen 25 that supports the paper 50 being printed, and a transport roller 27 that is driven by the PF motor 1 to transport the print paper 50. And attached to the rotating shaft of CR motor 4 A pulley 30, and a timing belt 31 driven by the pulley 30, the.

なお、DCユニット6は、CPU16から送られてくる制御指令およびエンコーダ11,13の出力に基づいて紙送りモータドライバ2およびCRモータドライバ5を駆動制御する。また、紙送りモータ1およびCRモータ4はいずれもDCモータで構成されている。   The DC unit 6 controls the drive of the paper feed motor driver 2 and the CR motor driver 5 based on the control command sent from the CPU 16 and the outputs of the encoders 11 and 13. Both the paper feed motor 1 and the CR motor 4 are DC motors.

このインクジェットプリンタのキャリッジ3の周辺の構成を図6に示す。   The configuration around the carriage 3 of this ink jet printer is shown in FIG.

キャリッジ3は、タイミングベルト31によりプーリ30を介してキャリッジモータ4に接続され、ガイド部材32に案内されてプラテン25に平行に移動するように駆動される。キャリッジ3の印刷紙に対向する面には、ブラックインクを吐出するノズル列およびカラーインクを吐出するノズル列からなる記録ヘッド9が設けられ、各ノズル列はインクカートリッジ34からインクの供給を受けて印刷紙にインク滴を吐出して文字や画像を印字する。   The carriage 3 is connected to the carriage motor 4 via a pulley 30 by a timing belt 31 and is driven so as to move parallel to the platen 25 while being guided by a guide member 32. On the surface of the carriage 3 facing the printing paper, there is provided a recording head 9 comprising a nozzle row for ejecting black ink and a nozzle row for ejecting color ink. Each nozzle row is supplied with ink from the ink cartridge 34. Characters and images are printed by ejecting ink droplets onto printing paper.

またキャリッジ3の非印字領域には、非印字時に記録ヘッド9のノズル開口を封止するためのキャッピング装置35と、図5に示すポンプモータ7を有するポンプユニット36とが設けられている。キャリッジ3が印字領域から非印字領域に移動すると、図示しないレバーに当接してキャッピング装置35は上方に移動し、記録ヘッド9を封止する。   In the non-printing area of the carriage 3, a capping device 35 for sealing the nozzle openings of the recording head 9 during non-printing and a pump unit 36 having the pump motor 7 shown in FIG. 5 are provided. When the carriage 3 moves from the printing area to the non-printing area, the capping device 35 moves upward by contacting a lever (not shown) and seals the recording head 9.

記録ヘッド9のノズル開口列に目詰まりが生じた場合や、カートリッジ34の交換等を行って記録ヘッド9から強制的にインクを吐出する場合は、記録ヘッド9を封止した状態でポンプユニット36を作動させ、ポンプユニット36からの負圧により、ノズル開口列からインクを吸い出す。これにより、ノズル開口列の近傍に付着している塵埃や紙粉が洗浄され、さらには記録ヘッド9内の気泡がインクとともにキャップ37に排出される。   When the nozzle opening row of the recording head 9 is clogged, or when the ink is forcibly ejected from the recording head 9 by replacing the cartridge 34 or the like, the pump unit 36 with the recording head 9 sealed is used. And the ink is sucked out from the nozzle opening row by the negative pressure from the pump unit 36. As a result, dust and paper dust adhering to the vicinity of the nozzle opening row are washed, and air bubbles in the recording head 9 are discharged to the cap 37 together with ink.

次に、キャリッジ3に取付けられたリニア式エンコーダ11の構成を図7に示す。このエンコーダ11は発光ダイオード11aと、コリメータレンズ11bと、検出処理部11cとを備えている。この検出処理部11cは複数(4個)のフォトダイオード11dと、信号処理回路11eと、2個のコンパレータ11fA ,11fBと、を有している。 Next, the configuration of the linear encoder 11 attached to the carriage 3 is shown in FIG. The encoder 11 includes a light emitting diode 11a, a collimator lens 11b, and a detection processing unit 11c. The detection processing unit 11c includes a plurality (four) of photodiodes 11d, a signal processing circuit 11e, and two comparators 11f A and 11f B.

発光ダイオード11aの両端に抵抗を介して電圧Vccが印加されると、発光ダイオード11aから光が発せられる。この光はコリメータレンズ11bによって平行にされて符号板12を通過する。符号板12には所定の間隔(例えば1/180インチ(=1/180×2.54cm))毎にスリットが設けられた構成となっている。   When the voltage Vcc is applied to both ends of the light emitting diode 11a via a resistor, light is emitted from the light emitting diode 11a. This light is collimated by the collimator lens 11b and passes through the code plate 12. The code plate 12 has a configuration in which slits are provided at predetermined intervals (for example, 1/180 inch (= 1/180 × 2.54 cm)).

この符号板12を通過した平行光は、図示しない固定スリットを通って各フォトダイオード11dに入射し、電気信号に変換される。4個のフォトダイオード11dから出力される電気信号が信号処理回路11eにおいて信号処理される。この信号処理回路11eから出力される信号がコンパレータ11fA,11fBにおいて比較され、比較結果がパルスとして出力される。コンパレータ11fA、 11fB から出力されるパルスENC−A,ENC−Bがエンコーダ11の出力となる。 The parallel light that has passed through the code plate 12 enters each photodiode 11d through a fixed slit (not shown) and is converted into an electrical signal. The electric signals output from the four photodiodes 11d are processed in the signal processing circuit 11e. The signals output from the signal processing circuit 11e are compared in the comparators 11f A and 11f B , and the comparison result is output as a pulse. Pulses ENC-A and ENC-B output from the comparators 11 f A and 11 f B are output from the encoder 11.

パルスENC−AとパルスENC−Bは位相が90度だけ異なっている。CRモータ4が正転すなわちキャリッジ3が主走査方向に移動しているときは図8(a)に示すようにパルスENC−AはパルスENC−Bよりも90度だけ位相が進み、CRモータ4が逆転しているときは図8(b)に示すようにパルスENC−AはパルスENC−Bよりも90度だけ位相が遅れるようにエンコーダ4は構成されている。そして、上記パルスの1周期Tは符号板12のスリット間隔(例えば1/180インチ(=1/180×2.54cm))に対応し、 キャリッジ3が上記スリット間隔を移動する時間に等しい。   The phases of the pulse ENC-A and the pulse ENC-B are different by 90 degrees. When the CR motor 4 is rotating forward, that is, when the carriage 3 is moving in the main scanning direction, the phase of the pulse ENC-A is advanced by 90 degrees from the pulse ENC-B as shown in FIG. As shown in FIG. 8B, the encoder 4 is configured such that the phase of the pulse ENC-A is delayed by 90 degrees from the pulse ENC-B. One period T of the pulse corresponds to a slit interval (for example, 1/180 inch (= 1/180 × 2.54 cm)) of the code plate 12, and is equal to a time for the carriage 3 to move the slit interval.

一方、PFモータ1用のロータリ式エンコーダ13は符号板がPFモータ1の回転に応じて回転する回転円板である以外は、リニア式エンコーダ11と同様の構成となっている。なおインクジェットプリンタにおいては、PFモータ1用のエンコーダ13の符号板に設けられている複数のスリットのスリット間隔は、1/180インチ(=1/180×2.54cm)であり、PFモータ1が上記1スリット間隔だけ回転すると、1/1440インチ(=1/1440×2.54cm)だけ紙送りされるような構成となっている。   On the other hand, the rotary encoder 13 for the PF motor 1 has the same configuration as the linear encoder 11 except that the code plate is a rotating disk that rotates in accordance with the rotation of the PF motor 1. In the ink jet printer, the slit interval of the plurality of slits provided on the code plate of the encoder 13 for the PF motor 1 is 1/180 inch (= 1/180 × 2.54 cm). When rotated by the 1 slit interval, the paper is fed by 1/1440 inch (= 1/1440 × 2.54 cm).

次に図5において示した紙検出センサ15の位置について図9を参照して説明する。図9において、プリンタ60の給紙挿入口61に挿入された紙50は、給紙モータ63によって駆動される給紙ローラ64によってプリンタ60内に送り込まれる。プリンタ60内に送り込まれた紙50の先端が例えば光学式の紙検出センサ15によって検出される。この紙検出センサ15によって先端が検出された紙50はPFモータ1によって駆動される紙送りローラ65および従動ローラ66によって紙送りが行われる。   Next, the position of the paper detection sensor 15 shown in FIG. 5 will be described with reference to FIG. In FIG. 9, the paper 50 inserted into the paper feed insertion slot 61 of the printer 60 is fed into the printer 60 by a paper feed roller 64 driven by a paper feed motor 63. The leading edge of the paper 50 fed into the printer 60 is detected by, for example, the optical paper detection sensor 15. The paper 50 whose leading edge is detected by the paper detection sensor 15 is fed by a paper feed roller 65 and a driven roller 66 driven by the PF motor 1.

続いてキャリッジガイド部材32に沿って移動するキャリッジ3に固定された記録ヘッド(図示せず)からインクが滴下されることにより印字が行われる。そして所定の位置まで紙送りが行われると、現在、印字されている紙50の終端が紙検出センサ15によって検出される。そしてPFモータ1によって駆動される歯車67aにより、歯車67bを介して歯車67cが駆動され、これにより、排紙ローラ68および従動ローラ69が回転駆動されて、印字が終了した紙50が排紙口62から外部に排出される。   Subsequently, printing is performed by dropping ink from a recording head (not shown) fixed to the carriage 3 that moves along the carriage guide member 32. When the paper is fed to a predetermined position, the end of the currently printed paper 50 is detected by the paper detection sensor 15. The gear 67c driven by the PF motor 1 drives the gear 67c via the gear 67b. As a result, the paper discharge roller 68 and the driven roller 69 are driven to rotate, and the paper 50 that has finished printing is discharged into the paper discharge port. 62 is discharged to the outside.

(第1の実施の形態)
次に、本発明によるプリンタ用モータの制御装置の第1の実施の形態について説明する。この実施の形態のプリンタ用モータの制御は、図5に示したDCユニット6によって行われその構成を図1に示す。
(First embodiment)
Next, a first embodiment of a printer motor control apparatus according to the present invention will be described. The control of the printer motor of this embodiment is performed by the DC unit 6 shown in FIG. 5, and the configuration is shown in FIG.

本実施の形態のプリンタ用モータの制御装置すなわちDCユニット6は、位置カウンタ6aと、減算部6bと、目標速度演算部6cと、速度演算部6dと、減算器6eと、比例要素6fと、積分要素6gと、微分要素6hと、加算器6iと、D/Aコンバータ6jと、タイマ6kと、加速制御部6mと、送り量修正演算部90とを備えている。   The printer motor control device of this embodiment, that is, the DC unit 6, includes a position counter 6a, a subtraction unit 6b, a target speed calculation unit 6c, a speed calculation unit 6d, a subtractor 6e, a proportional element 6f, An integration element 6g, a differentiation element 6h, an adder 6i, a D / A converter 6j, a timer 6k, an acceleration control unit 6m, and a feed amount correction calculation unit 90 are provided.

位置カウンタ6aはエンコーダ13の出力パルスENC−A,ENC−Bの各々の立ち上がりエッジ、立ち下がりエッジを検出し、検出されたエッジの個数を計数し、この計数値に基づいて、PFモータ1の回転位置を演算する。この計数はPFモータ1が正転しているときは1個のエッジが検出されると「+1」を加算し、逆転しているときは、1個のエッジが検出されると「−1」を加算する。パルスENC−AおよびENC−Bの各々の周期は符号板のスリット間隔に等しく、かつパルスENC−AとパルスENC−Bは位相が90度だけ異なっている。このため、上記計数のカウント値「1」はエンコーダ13の符号板のスリット間隔の1/4に対応する。これにより上記計数値にスリット間隔の1/4を乗算すれば、PFモータ1の、計数値が「0」に対応する位置からの回転量を求めることができる。このときエンコーダ13の解像度は符号板のスリットの間隔の1/4となる。上記スリットの間隔を1/1440インチ(=1/1440×2.54cm)とすれば解像度は1/5760インチ(=1/5760×2.54cm)となる。   The position counter 6a detects the rising edge and the falling edge of each of the output pulses ENC-A and ENC-B of the encoder 13, counts the number of detected edges, and based on this count value, the PF motor 1 Calculate the rotational position. This count is incremented by "+1" when one edge is detected when the PF motor 1 is rotating forward, and is "-1" when one edge is detected when rotating reversely. Is added. The period of each of the pulses ENC-A and ENC-B is equal to the slit interval of the code plate, and the pulse ENC-A and the pulse ENC-B are different in phase by 90 degrees. For this reason, the count value “1” of the count corresponds to ¼ of the slit interval of the code plate of the encoder 13. Thus, by multiplying the count value by 1/4 of the slit interval, the rotation amount of the PF motor 1 from the position corresponding to the count value “0” can be obtained. At this time, the resolution of the encoder 13 is 1/4 of the interval between the slits of the code plate. If the interval between the slits is 1/1440 inch (= 1/1440 × 2.54 cm), the resolution is 1/5760 inch (= 1/5760 × 2.54 cm).

送り量修正演算部90は、CPU16から送られてくるPFモータ1の起動指令に基づいて動作し、起動の目標位置「0」と、上記起動指令受信直後の位置カウンタ6aのカウント値(パルス数)、すなわち前回の停止位置とに基づいて、修正された紙の送り量を演算する。そして、この修正された送り量を位置カウンタ6aに送り、位置カウンタ6aのカウント値を上記修正された送り量となるように設定する。なおこの時、位置カウンタ6aのカウント値は、目標位置に近づくにつれてそのカウント値も小さくなるように設定される。   The feed amount correction calculation unit 90 operates based on the start command of the PF motor 1 sent from the CPU 16, and the start target position “0” and the count value (number of pulses) of the position counter 6a immediately after receiving the start command. ), That is, the corrected paper feed amount is calculated based on the previous stop position. Then, the corrected feed amount is sent to the position counter 6a, and the count value of the position counter 6a is set to be the corrected feed amount. At this time, the count value of the position counter 6a is set so that the count value decreases as the target position is approached.

減算器6bは、目標位置「0」と、位置カウンタ6aのカウント値との位置偏差を演算する。   The subtractor 6b calculates a position deviation between the target position “0” and the count value of the position counter 6a.

目標速度演算部6cは、減算器6bの出力である位置偏差に基づいてPFモータ1の目標速度を演算する。この演算は位置偏差にゲインKpを乗算することにより行われる。このゲインKpは位置偏差に応じて決定される。なお、このゲインKpの値は図示しないテーブルに格納していても良い。   The target speed calculator 6c calculates the target speed of the PF motor 1 based on the position deviation that is the output of the subtractor 6b. This calculation is performed by multiplying the position deviation by the gain Kp. This gain Kp is determined according to the position deviation. Note that the value of the gain Kp may be stored in a table (not shown).

速度演算部6dはエンコーダ13の出力パルスENC−A,ENC−Bに基づいてPFモータ1の速度を演算する。この速度は次のようにして求められる。まずエンコーダ13の出力パルスENC−A,ENC−Bの各々の立ち上がりエッジ、立ち下がりエッジを検出し、エッジ間の時間間隔を例えばタイマカウンタによってカウントする。このカウント値をTとすると、速度は1/Tに比例したものとなる。本実施の形態においては、出力パルスENC−Aの1周期、例えば立ち上がりエッジから次の立ち上がりエッジまでをタイマカウンタによって計測することにより求めている。   The speed calculation unit 6 d calculates the speed of the PF motor 1 based on the output pulses ENC-A and ENC-B of the encoder 13. This speed is obtained as follows. First, the rising edge and the falling edge of each of the output pulses ENC-A and ENC-B of the encoder 13 are detected, and the time interval between the edges is counted by, for example, a timer counter. When this count value is T, the speed is proportional to 1 / T. In the present embodiment, it is obtained by measuring one cycle of the output pulse ENC-A, for example, from the rising edge to the next rising edge with a timer counter.

減算器6eは、目標速度と、速度演算部6dによって演算されたPFモータ1の実際の速度との速度偏差を演算する。   The subtractor 6e calculates a speed deviation between the target speed and the actual speed of the PF motor 1 calculated by the speed calculation unit 6d.

比例要素6fは上記速度偏差に定数Gpを乗算し、乗算結果を出力する。積分要素6gは速度偏差に定数Giを乗じたものを積算する。微分要素6hは現在の速度偏差と、1つ前の速度偏差との差に定数Gdを乗算し、乗算結果を出力する。なお比例要素6f、積分要素6g、および微分要素6hの演算はエンコーダ13の出力パルスENC−Aの1周期毎を、例えば出力パルスENC−Aの立ち上がりエッジに同期して行う。   The proportional element 6f multiplies the speed deviation by a constant Gp and outputs the multiplication result. The integrating element 6g integrates the speed deviation multiplied by a constant Gi. The differentiation element 6h multiplies the difference between the current speed deviation and the previous speed deviation by a constant Gd, and outputs the multiplication result. The calculation of the proportional element 6f, the integral element 6g, and the derivative element 6h is performed every period of the output pulse ENC-A of the encoder 13 in synchronization with, for example, the rising edge of the output pulse ENC-A.

比例要素6f、積分要素6g、および微分要素6hの出力は加算器6iにおいて加算される。そして加算結果、すなわちPFモータ1の駆動電流がD/Aコンバータ6jに送られてアナログ電流に変換される。このアナログ電流に基づいて紙送りモータドライバ2によってPFモータ1が駆動される。   Outputs of the proportional element 6f, the integral element 6g, and the derivative element 6h are added by the adder 6i. Then, the addition result, that is, the driving current of the PF motor 1 is sent to the D / A converter 6j and converted into an analog current. The PF motor 1 is driven by the paper feed motor driver 2 based on the analog current.

また、タイマ6kおよび加速制御部6mは加速制御に用いられ、比例要素6f、積分要素6g、および微分要素6hを使用するPID制御は加速途中の定速および減速制御に用いられる。   The timer 6k and the acceleration control unit 6m are used for acceleration control, and the PID control using the proportional element 6f, the integral element 6g, and the derivative element 6h is used for constant speed and deceleration control during acceleration.

タイマ6kはCPU16から送られてくるクロック信号に基づいて所定時間毎にタイマ割込み信号を発生する。   The timer 6k generates a timer interrupt signal every predetermined time based on the clock signal sent from the CPU 16.

加速制御部6mは上記タイマ割込信号を受ける度毎に所定の電流値(例えば20mA)を目標電流値に積算し、積算結果すなわち加速時におけるPFモータ1の目標電流値がD/Aコンバータ6jに送られる。PID制御の場合と同様に上記目標電流値はD/Aコンバータ6jによってアナログ電流に変換され、このアナログ電流に基づいてドライバ2によってPFモータ1が駆動される。   Every time the acceleration control unit 6m receives the timer interrupt signal, the acceleration control unit 6m integrates a predetermined current value (for example, 20 mA) to the target current value, and the integration result, that is, the target current value of the PF motor 1 at the time of acceleration is obtained as the D / A converter 6j. Sent to. As in the case of PID control, the target current value is converted into an analog current by the D / A converter 6j, and the PF motor 1 is driven by the driver 2 based on this analog current.

ドライバ2は、例えば4個のトランジスタを備えており、D/Aコンバータ6jの出力に基づいて上記トランジスタを各々ONまたはOFFさせることにより
(a)PFモータ1を正転または逆転させる運転モード
(b)回生ブレーキ運転モード(ショートブレーキ運転モード、すなわちPFモータ1の停止を維持するモード)
(c)PFモータ1を停止させようとするモード
を行わせることが可能な構成となっている。
The driver 2 includes, for example, four transistors, and each of the transistors is turned on or off based on the output of the D / A converter 6j. (A) An operation mode in which the PF motor 1 is rotated forward or backward (b ) Regenerative brake operation mode (short brake operation mode, that is, a mode for maintaining the stop of the PF motor 1)
(C) The configuration is such that a mode for stopping the PF motor 1 can be performed.

次に図2(a),(b)を参照して本実施の形態のプリンタ用モータの制御装置、すなわちDCユニット6の動作を説明する。PFモータ1が停止しているときにCPU16からDCユニット6にPFモータ1を起動させる起動指令信号が送られると、送り量修正演算部90によって修正された紙の送り量が演算され、この演算された送り量が位置カウンタ6aのカウント値として設定される。このとき加速制御部6mから起動初期電流値I0 がD/Aコンバータ6jに送られる。なお、この起動初期電流値I0は起動指令信号とともにCPU16から加速制御部6mに送られてくる。そしてこの電流値I0はD/Aコンバータ6jによってアナログ電流に変換されてドライバ2に送られ、このドライバ2によってPFモータ1が起動開始する(図2(a),(b)参照)。 Next, with reference to FIGS. 2A and 2B, the operation of the printer motor control apparatus of this embodiment, that is, the DC unit 6 will be described. When the start command signal for starting the PF motor 1 is sent from the CPU 16 to the DC unit 6 when the PF motor 1 is stopped, the paper feed amount corrected by the feed amount correction calculation unit 90 is calculated. The feed amount thus set is set as the count value of the position counter 6a. At this time, the startup initial current value I 0 is sent from the acceleration controller 6m to the D / A converter 6j. The starting initial current value I 0 is sent from the CPU 16 to the acceleration control unit 6m together with the starting command signal. The current value I 0 is converted into an analog current by the D / A converter 6j and sent to the driver 2, and the driver 2 starts to start the PF motor 1 (see FIGS. 2A and 2B).

起動指令信号を受信した後、所定の時間毎にタイマ6kからタイマ割込信号が発生される。加速制御部6mはタイマ割込信号を受信する度毎に、起動初期電流値I0に所定の電流値(例えば20mA)を積算し、積算した電流値をD/Aコンバータ6jに送る。するとこの積算した電流値はD/Aコンバータ6jによってアナログ電流に変換されてドライバ2に送られる。そしてPFモータ1に供給される電流の値が上記積算した電流値となるように、ドライバ2によってPFモータ1が駆動されPFモータ1の速度は上昇する(図2(b)参照)。このためPFモータ1に供給される電流値は図2(a)に示すように階段状になる。 After receiving the start command signal, a timer interrupt signal is generated from the timer 6k every predetermined time. Each time the acceleration control unit 6m receives a timer interrupt signal, the acceleration control unit 6m adds a predetermined current value (for example, 20 mA) to the starting initial current value I 0 and sends the integrated current value to the D / A converter 6j. Then, the integrated current value is converted into an analog current by the D / A converter 6j and sent to the driver 2. Then, the PF motor 1 is driven by the driver 2 and the speed of the PF motor 1 is increased so that the value of the current supplied to the PF motor 1 becomes the integrated current value (see FIG. 2B). For this reason, the current value supplied to the PF motor 1 is stepped as shown in FIG.

なお、このときPID制御系も動作しているが、D/Aコンバータ6jは加速制御部6mの出力を選択して取込む。   At this time, the PID control system is also operating, but the D / A converter 6j selects and captures the output of the acceleration control unit 6m.

加速制御部6mの電流値の積算処理は、積算した電流値が一定の電流値IS となるまで行われる。時刻t1 において積算した電流値が所定値IS となると、加速制御部6mは積算処理を停止し、D/Aコンバータ6jに一定の電流値IS を供給する。これによりPFモータ1に供給される電流の値が電流値ISとなるようにドライバ2によって駆動される(図2(a)参照)。 Integration process of the current value of the acceleration controller 6m is carried out until the integrated current value becomes a constant current value I S. When the current value obtained by integrating at time t 1 becomes the predetermined value I S, the acceleration controller 6m stops the integration processing, and supplies a constant current I S to the D / A converter 6j. Accordingly, the driver 2 is driven so that the value of the current supplied to the PF motor 1 becomes the current value I S (see FIG. 2A).

そして、PFモータ1の速度がオーバーシュートするのを防止するために、PFモータ1が所定の速度V1 になると(時刻t2 )になると、PFモータ1に供給される電流を減小させるように加速制御部6mが制御する。このときPFモータ1の速度は更に上昇するが、PFモータ1の速度が所定の速度vcに達すると(図2(b)の時刻t参照)、D/Aコンバータ6jが、PID制御系の出力すなわち加算器6iの出力を選択し、PID制御が行われる。 In order to prevent the speed of the PF motor 1 from overshooting, when the PF motor 1 reaches a predetermined speed V 1 (time t 2 ), the current supplied to the PF motor 1 is reduced. The acceleration control unit 6m controls. In this case although the speed is further increased PF motor 1, the speed of the PF motor 1 reaches a predetermined speed v c (see time t 3 in FIG. 2 (b)), D / A converter 6j is, PID control system Output, that is, the output of the adder 6i is selected, and PID control is performed.

すなわち、目標位置「0」と、カウンタ6aのカウント値との位置偏差に基づいて目標速度が演算され、この目標速度と、エンコーダ13の出力から得られる実際の速度との速度偏差に基づいて、比例要素6f、積分要素6g、および微分要素6hが動作し、各々比例、積分、および微分演算が行われ、これらの演算結果の和に基づいて、PFモータ1の制御が行われる。なお、上記比例、積分、および微分演算は、例えばエンコーダ13の出力パルスENC−Aの立ち上がりエッジに同期して行われる。これによりPFモータ1の速度は所望の速度veとなるように制御される。なお、所定の速度vcは所望の速度veの70〜80%の値であることが好ましい。 That is, the target speed is calculated based on the position deviation between the target position “0” and the count value of the counter 6a. Based on the speed deviation between the target speed and the actual speed obtained from the output of the encoder 13, The proportional element 6f, the integral element 6g, and the differential element 6h operate to perform proportional, integral, and differential calculations, respectively, and the PF motor 1 is controlled based on the sum of these calculation results. The proportional, integral, and differential calculations are performed in synchronization with the rising edge of the output pulse ENC-A of the encoder 13, for example. Thereby, the speed of the PF motor 1 is controlled to be a desired speed v e . Incidentally, it is preferable that the predetermined speed v c 70 to 80% of the value of desired speed v e.

時刻t4からPFモータ1は所望の速度veとなる。 その後、PFモータ1が目標位置に近づくと(図2(b)の時刻t5参照)、PFモータ1の減速が行われ、時刻t6にPFモータ1が停止する。 From time t 4 , the PF motor 1 has a desired speed v e . Thereafter, the PF motor 1 approaches the target position (see time t 5 in FIG. 2 (b)), deceleration of the PF motor 1 is carried out, the PF motor 1 is stopped at time t 6.

以上説明したように本実施の形態によれば、今回の目標送り量と、起動指令を受信した直後の位置カウンタ6aのカウント値すなわち前回の停止位置とに基づいて送り量修正演算部90によって今回の起動時の送り量を修正し、この修正された送り量を位置カウンタ6aのカウント値として設定し、目標値「0」と、位置カウンタ6aの出力との位置偏差に基づいて紙送り制御を行っているので、紙を目標位置に停止させることが可能となり精度の良い紙送りを行うことができる。なお目標値は、「0」を含む所定の範囲の値、例えば−3〜+3の範囲の値であっても良い。   As described above, according to the present embodiment, the current amount is calculated by the feed amount correction calculation unit 90 based on the current target feed amount and the count value of the position counter 6a immediately after receiving the start command, that is, the previous stop position. Is corrected, the corrected feed amount is set as the count value of the position counter 6a, and the paper feed control is performed based on the position deviation between the target value “0” and the output of the position counter 6a. As a result, the paper can be stopped at the target position, and the paper can be fed with high accuracy. The target value may be a value in a predetermined range including “0”, for example, a value in the range of −3 to +3.

また、本実施の形態においては、位置カウンタ6aの最大カウント値は、修正された送り量となるため、位置カウンタ6aの容量を小さくすることが可能となる。   Further, in the present embodiment, the maximum count value of the position counter 6a is the corrected feed amount, so that the capacity of the position counter 6a can be reduced.

(第2の実施の形態)
次に、本発明によるプリンタ用モータの制御装置の第2の実施の形態について説明する。この実施の形態のプリンタ用モータの制御は、図5に示したDCユニット6によって行われその構成を図3に示す。
(Second Embodiment)
Next, a second embodiment of the printer motor control apparatus according to the present invention will be described. Control of the printer motor in this embodiment is performed by the DC unit 6 shown in FIG. 5, and the configuration is shown in FIG.

本実施の形態のプリンタ用モータの制御装置すなわちDCユニット6は、図1に示す第1の実施の形態のプリンタ用モータの制御装置において、目標位置修正演算部80を新たに設けた構成となっている。   The printer motor control device of this embodiment, that is, the DC unit 6 has a configuration in which a target position correction calculation unit 80 is newly provided in the printer motor control device of the first embodiment shown in FIG. ing.

目標位置修正演算部80は、CPU16から送られてくるPFモータ1の起動指令に基づいて動作し、PFモータ1の前回の起動時の目標送り量(パルス数)と、CPU16から送られてくる今回の起動の目標送り量(目標パルス数)と、上記起動指令受信直後(すなわちPFモータ1の起動直前)の位置カウンタ6aのカウント値(パルス数)とに基づいて、修正された目標位置を演算し、この演算結果を減算器6bに送出する。   The target position correction calculation unit 80 operates based on the start command of the PF motor 1 sent from the CPU 16, and the target feed amount (number of pulses) at the previous start of the PF motor 1 and the CPU 16 send it. Based on the target feed amount (target pulse number) of the current start and the count value (number of pulses) of the position counter 6a immediately after receiving the start command (that is, immediately before starting the PF motor 1), the corrected target position is calculated. The calculation result is sent to the subtractor 6b.

この目標位置修正演算部80の一具体例の構成を図4に示す。この具体例の目標位置演算部80は、メモリ81と、誤差演算部82と、加算器83と、リセット信号発生部84と、を備えている。   A configuration of a specific example of the target position correction calculation unit 80 is shown in FIG. The target position calculation unit 80 of this specific example includes a memory 81, an error calculation unit 82, an adder 83, and a reset signal generation unit 84.

メモリ81は上記起動指令に基づいて、記憶していたPFモータ1の前回の起動時の目標送り量を誤差演算部82に出力するとともに、前記記憶していた目標送り量の代わりにCPU16から送られてくる、今回の起動の目標送り量を記憶する。   Based on the start command, the memory 81 outputs the stored target feed amount at the previous start of the PF motor 1 to the error calculation unit 82 and sends it from the CPU 16 instead of the stored target feed amount. The target feed amount for this activation is stored.

誤差演算部82はメモリ81から出力された前回の起動時の目標送り量と、上記起動指令受信直後の位置カウンタ6aのカウント値(パルス数)との差である誤差を演算し、この誤差を加算器83に送出するとともに指令信号をリセット信号発生部84に送り、リセット信号発生部84からリセット信号を発生させる。なお、この誤差は正負の値をとるものとする。   The error calculation unit 82 calculates an error which is a difference between the target feed amount at the previous start output from the memory 81 and the count value (number of pulses) of the position counter 6a immediately after receiving the start command. The command signal is sent to the adder 83 and a command signal is sent to the reset signal generator 84 so that the reset signal generator 84 generates a reset signal. This error takes a positive or negative value.

加算器83は上記誤差と、CPU16から送られてくる今回の起動の目標位置との和を演算し、この和を修正された目標位置として出力する。   The adder 83 calculates the sum of the error and the current start target position sent from the CPU 16, and outputs this sum as a corrected target position.

リセット信号発生部84はリセット信号を発生して位置カウンタ6aのカウント値を「0」にリセットする。なお、リセット信号発生部84は誤差演算部82から指令信号を受ける代わりに加算器83の出力に基づいてリセット信号を発生するように構成しても良い。   The reset signal generator 84 generates a reset signal and resets the count value of the position counter 6a to “0”. The reset signal generator 84 may be configured to generate a reset signal based on the output of the adder 83 instead of receiving a command signal from the error calculator 82.

減算器6bは、目標位置修正演算部80から送られてくる修正された目標位置と、位置カウンタ6aによって求められたPFモータ1の実際の位置との位置偏差を演算する。   The subtractor 6b calculates a position deviation between the corrected target position sent from the target position correction calculation unit 80 and the actual position of the PF motor 1 obtained by the position counter 6a.

この位置偏差が零となるように、第1の実施の形態で説明したと同様に紙送りが制御される。   The paper feed is controlled in the same manner as described in the first embodiment so that the positional deviation becomes zero.

この実施の形態においては、目標位置と、起動指令を受信した直後の位置カウンタ6aのカウント値とに基づいて目標位置修正演算部80による今回の起動の目標位置を修正し、この修正された目標値と、位置カウンタ6aの出力との位置偏差に基づいて紙送り制御を行っているので、精度の良い紙送りを行うことができる。   In this embodiment, the target position of the current start by the target position correction calculation unit 80 is corrected based on the target position and the count value of the position counter 6a immediately after receiving the start command, and the corrected target Since the paper feed control is performed based on the position deviation between the value and the output of the position counter 6a, the paper feed can be performed with high accuracy.

なお上記第1および第2の実施の形態においては、プリンタとしてインクジェットプリンタを例にとって説明したが、他のシリアルプリンタやレーザプリンタにも適用できることはいうまでもない。   In the first and second embodiments, an ink jet printer has been described as an example of a printer. However, it goes without saying that the present invention can also be applied to other serial printers and laser printers.

なお、上記第1および第2の実施の形態においては、DCモータについて説明したが、ACモータにも適用できることはいうまでもない。   In the first and second embodiments, the DC motor has been described. Needless to say, the present invention can also be applied to an AC motor.

なお、上記第1および第2の実施の形態においては、印刷媒体は紙であったが、紙以外のものにも本発明を適用できることは云うまでもない。   In the first and second embodiments, the print medium is paper. However, it goes without saying that the present invention can be applied to other than the paper.

(第3の実施の形態)
次に、本発明の第3の実施の形態を図10を参照して説明する。この第3の実施の形態はプリンタ用モータの制御方法であって、その制御手順を図10に示す。
(Third embodiment)
Next, a third embodiment of the present invention will be described with reference to FIG. The third embodiment is a method for controlling a printer motor, and the control procedure is shown in FIG.

まずPFモータの回転に従って回転するエンコーダの出力パルスをカウントすることによってPFモータによって搬送される印刷媒体(紙)の位置を位置カウンタによって検出する(図10のステップF10参照)。次に上記印刷媒体の送り量の目標値と、上記位置カウンタによって検出された上記印刷媒体の前回の停止位置とに基づいて送り量の修正された目標値を演算し、この修正された目標値を上記位置カウンタのカウント値に設定する(図10のステップF11参照)。続いて上記位置カウンタのカウント値が零を含む所定の範囲の値となるようにPFモータを制御する(図11のステップF12参照)。   First, the position of the print medium (paper) conveyed by the PF motor is detected by the position counter by counting the output pulses of the encoder that rotates according to the rotation of the PF motor (see step F10 in FIG. 10). Next, a corrected target value of the feed amount is calculated based on the target value of the feed amount of the print medium and the previous stop position of the print medium detected by the position counter. Is set to the count value of the position counter (see step F11 in FIG. 10). Subsequently, the PF motor is controlled so that the count value of the position counter falls within a predetermined range including zero (see step F12 in FIG. 11).

このように構成された本実施の形態の制御方法によれば、印刷媒体を目標位置に停止させることが可能となるので精度の良い紙送りを行うことができる。   According to the control method of the present embodiment configured as described above, the print medium can be stopped at the target position, so that accurate paper feeding can be performed.

(第4の実施の形態)
次に、本発明の第4の実施の形態を図11を参照して説明する。この第4の実施の形態はプリンタ用モータの制御方法であって、その制御手順を図11に示す。
(Fourth embodiment)
Next, a fourth embodiment of the present invention will be described with reference to FIG. The fourth embodiment is a method for controlling a printer motor, and the control procedure is shown in FIG.

まず、PFモータによって搬送される印刷媒体(紙)の位置を検出する(図11のステップF20参照)。次にPFモータの今回の起動時の印刷媒体の送り量の目標値およびPFモータの前回の起動時の送り量の目標値ならびにPFモータの今回の起動直前の印刷媒体の検出位置に基づいて、印刷媒体の修正された目標位置を演算する(図11のステップF21参照)。続いて上記修正された目標位置と、印刷媒体の検出位置との位置偏差に基づいてPFモータを制御する(図11のステップF22参照)。   First, the position of the print medium (paper) conveyed by the PF motor is detected (see step F20 in FIG. 11). Next, based on the target value of the feed amount of the print medium at the time of starting the PF motor, the target value of the feed amount at the time of the previous start of the PF motor, and the detection position of the print medium immediately before the start of the PF motor, The corrected target position of the print medium is calculated (see step F21 in FIG. 11). Subsequently, the PF motor is controlled based on the positional deviation between the corrected target position and the print medium detection position (see step F22 in FIG. 11).

このように構成された本実施の形態の制御方法によれば、精度の良い紙送りを行うことができる。   According to the control method of the present embodiment configured as described above, it is possible to perform accurate paper feeding.

なお、前記修正された目標位置を演算するステップは、前回の起動時の送り量の目標値と、前記モータの今回の起動直前の前記印刷媒体の検出値とに基づいて前回の起動後の前記送り量の誤差を演算するステップと、今回の起動時の前記送り量の目標値と前記誤差との和である修正された目標位置を演算するステップと、を備えているように構成しても良い。   The step of calculating the corrected target position includes the step after the previous start based on the target value of the feed amount at the previous start and the detected value of the print medium immediately before the start of the motor. A step of calculating a feed amount error and a step of calculating a corrected target position that is a sum of the target value of the feed amount at the time of the current start and the error. good.

(第5の実施の形態)
次に、本発明の第5の実施の形態を図12および図13を参照して説明する。この実施の形態は、プリンタ用モータの制御プログラムを記録した記録媒体である。図12および図13は、本実施の形態の印刷制御プログラムを記録した記録媒体が用いられるコンピュータシステム130の一例を示す斜視図およびブロック図である。
(Fifth embodiment)
Next, a fifth embodiment of the present invention will be described with reference to FIGS. This embodiment is a recording medium on which a printer motor control program is recorded. 12 and 13 are a perspective view and a block diagram showing an example of a computer system 130 that uses a recording medium that records the print control program of the present embodiment.

図12において、コンピュータシステム130は、CPUを含むコンピュータ本体131と、例えばCRT等の表示装置132と、キーボードやマウス等の入力装置133と、印刷を実行するプリンタ134と、を備えている。   In FIG. 12, a computer system 130 includes a computer main body 131 including a CPU, a display device 132 such as a CRT, an input device 133 such as a keyboard and a mouse, and a printer 134 that executes printing.

コンピュータ本体131は、図13に示すように、RAMより構成される内部メモリ135と、内蔵または外付け可能なメモリユニット136と、を備えており、メモリユニット136としてはフレキシブルまたはフロッピディスク(FD)ドライブ137,CD−ROMドライブ138,ハードディスクドライブ(HD)ユニット139が搭載されている。図12に示すように、これらのメモリユニット136に用いられる記録媒体140としては、FDドライブ137のスロットに挿入されて使用されるフレキシブルディスクまたはフロッピディスク(FD)141と、CD−ROMドライブ138に用いられるCD−ROM142等が用いられる。   As shown in FIG. 13, the computer main body 131 includes an internal memory 135 composed of a RAM and a memory unit 136 that can be built in or externally attached. The memory unit 136 is a flexible or floppy disk (FD). A drive 137, a CD-ROM drive 138, and a hard disk drive (HD) unit 139 are installed. As shown in FIG. 12, the recording medium 140 used in these memory units 136 includes a flexible disk or floppy disk (FD) 141 used by being inserted into a slot of the FD drive 137, and a CD-ROM drive 138. The CD-ROM 142 or the like used is used.

図12および図13に示すように、一般的なコンピュータシステムに用いられる記録媒体140としては、FD141やCD−ROM142が考えられるが、本実施の形態は特にプリンタ134に用いられるモータの制御プログラムに関するものであるので、例えばプリンタ134に内蔵させる不揮発性メモリとしてのROMチップ143に本発明の制御プログラムを記録させるようにしても良い。   As shown in FIGS. 12 and 13, the recording medium 140 used in a general computer system may be an FD 141 or a CD-ROM 142, but this embodiment particularly relates to a motor control program used in the printer 134. Therefore, for example, the control program of the present invention may be recorded in the ROM chip 143 as a nonvolatile memory built in the printer 134.

また、記録媒体としては、FD、CD−ROM、MO(Magneto−Optical)ディスク、DVD(Digital Versatile Disk )、その他の光学的記録ディスク、カードメモリ、磁気テープ等であっても良いことは云うまでもない。 The recording medium may be an FD, CD-ROM, MO (Magneto-Optical) disk, DVD (Digital Versatile Disk), other optical recording disk, card memory, magnetic tape, or the like. Nor.

本実施の形態の記録媒体140は、図10示す制御手順ステップF10〜F12を備えるように構成したものである。即ち本実施の形態の記録媒体140は、モータの回転に従って回転するエンコーダの出力パルスをカウントすることによって前記モータによって搬送される印刷媒体の位置を位置カウンタによって検出する手順と、前記印刷媒体の送り量の目標値と、前記位置カウンタによって検出された前記印刷媒体の前回の停止位置とに基づいて前記送り量の修正された目標値を演算し、前記修正された目標値を前記位置カウンタのカウント値に設定する手順と、前記位置カウンタのカウント値が零を含む所定の範囲の値となるように前記モータを制御する手順と、を少なくとも備えるように構成しても良い。   The recording medium 140 of the present embodiment is configured to include control procedure steps F10 to F12 shown in FIG. That is, the recording medium 140 according to the present embodiment includes a procedure for detecting the position of the printing medium conveyed by the motor by counting the output pulses of the encoder that rotates according to the rotation of the motor, and the feeding of the printing medium. A corrected target value of the feed amount is calculated based on a target value of the amount and a previous stop position of the print medium detected by the position counter, and the corrected target value is counted by the position counter. It may be configured to include at least a procedure for setting the value and a procedure for controlling the motor so that the count value of the position counter becomes a value in a predetermined range including zero.

(第6の実施の形態)
次に本発明の第6の実施の形態を説明する。この第6の実施の形態は、プリンタ用モータの制御プログラムを記録した記録媒体であって、図11示す制御手順ステップF20〜F22を備えるように構成したものである。即ち本実施の形態の記録媒体は、モータによって搬送される印刷媒体の位置を検出する手順と、前記モータの今回の起動時の前記印刷媒体の送り量の目標値および前記モータの前回の起動時の前記送り量の目標値ならびに前記モータの今回の起動直前の前記印刷媒体の検出位置に基づいて、前記印刷媒体の修正された目標位置を演算する手順と、前記修正された目標位置と、前記印刷媒体の検出位置との位置偏差に基づいて前記モータを制御する手順と、を少なくとも備えるように構成しても良い。
(Sixth embodiment)
Next, a sixth embodiment of the present invention will be described. The sixth embodiment is a recording medium on which a control program for a printer motor is recorded, and is configured to include control procedure steps F20 to F22 shown in FIG. That is, the recording medium of the present embodiment includes a procedure for detecting the position of the print medium conveyed by the motor, the target value of the feed amount of the print medium when the motor is started this time, and the previous start of the motor. Based on the target value of the feed amount and the detected position of the print medium immediately before the start of the motor, a procedure for calculating the corrected target position of the print medium, the corrected target position, And a procedure for controlling the motor based on a positional deviation from a detected position of the print medium.

なお、前記修正された目標位置を演算する手順は、前回の起動時の送り量の目標値と、前記モータの今回の起動直前の前記印刷媒体の検出値とに基づいて前回の起動後の前記送り量の誤差を演算する手順と、今回の起動時の前記送り量の目標値と前記誤差との和である修正された目標位置を演算する手順と、を少なくとも備えているように構成しても良い。   The procedure for calculating the corrected target position is based on the target value of the feed amount at the previous startup and the detected value of the print medium immediately before the startup of the motor. A procedure for calculating an error in the feed amount, and a procedure for calculating a corrected target position that is the sum of the target value of the feed amount at the time of the current start-up and the error. Also good.

本発明によるプリンタ用モータの制御装置の第1の実施の形態の構成を示すブロック図。1 is a block diagram showing the configuration of a first embodiment of a printer motor control apparatus according to the present invention; FIG. 第1の実施の形態のプリンタ用モータの制御装置の動作を説明する波形図。FIG. 4 is a waveform diagram for explaining the operation of the printer motor control apparatus according to the first embodiment. 本発明によるプリンタ用モータの制御装置の第2の実施の形態の構成を示すブロック図。The block diagram which shows the structure of 2nd Embodiment of the control apparatus of the motor for printers by this invention. 本発明に係る目標位置修正演算部の一具体例の構成を示すブロック図。The block diagram which shows the structure of one specific example of the target position correction calculating part which concerns on this invention. インクジェットプリンタの概略の構成を示す構成図。1 is a configuration diagram illustrating a schematic configuration of an inkjet printer. キャリッジ周辺の構成を示す斜視図。The perspective view which shows the structure of a carriage periphery. リニア式エンコーダの構成を示す模式図。The schematic diagram which shows the structure of a linear encoder. エンコーダの出力パルスの波形図。Waveform diagram of encoder output pulse. 紙検出センサの位置を説明するプリンタの概略の斜視図。FIG. 2 is a schematic perspective view of a printer for explaining a position of a paper detection sensor. 本発明によるプリンタ用モータの制御方法の制御手順を示すフローチャート。5 is a flowchart showing a control procedure of a printer motor control method according to the present invention. 本発明によるプリンタ用モータの制御方法の他の制御手順を示すフローチャート。9 is a flowchart showing another control procedure of the printer motor control method according to the present invention. 本発明による印刷制御プログラムを記録した記録媒体が用いられるコンピュータシステムの一例を示す斜視図。1 is a perspective view showing an example of a computer system using a recording medium that records a print control program according to the present invention. 本発明による印刷制御プログラムを記録した記録媒体が用いられるコンピュータシステムの一例を示すブロック図。1 is a block diagram showing an example of a computer system using a recording medium that records a print control program according to the present invention.

符号の説明Explanation of symbols

1 紙送りモータ(PFモータ)
2 紙送りモータドライバ
3 キャリッジ
4 キャリッジモータ(CRモータ)
5 キャリッジモータドライバ(CRモータドライバ)
6 DCユニット
6a 位置カウンタ
6b 減算器
6c 目標速度演算手段
6d 速度演算部
6e 減算器
6f 比例要素
6g 積分要素
6h 微分要素
6i 加算器
6j D/Aコンバータ
6k タイマ
6m 加速制御部
7 ポンプモータ
8 ポンプモータドライバ
9 記録ヘッド
10 ヘッドドライバ
11 リニア式エンコーダ
12 符号板
13 エンコーダ(ロータリ式エンコーダ)
15 紙検出センサ
16 CPU
17 タイマIC
18 ホストコンピュータ
19 インタフェース部
20 ASIC
21 PROM
22 RAM
23 EEPROM
25 プラテン
30 プーリ
31 タイミングベルト
32 キャリッジモータのガイド部材
34 インクカートリッジ
35 キャッピング装置
36 ポンプユニット
37 キャップ
50 記録紙
80 目標位置修正演算部
81 メモリ
82 誤差演算部
83 加算器
84 リセット信号発生部
90 送り量修正演算部
1 Paper feed motor (PF motor)
2 Paper feed motor driver 3 Carriage 4 Carriage motor (CR motor)
5 Carriage motor driver (CR motor driver)
6 DC unit 6a Position counter 6b Subtractor 6c Target speed calculation means 6d Speed calculation unit 6e Subtractor 6f Proportional element 6g Integration element 6h Differentiation element 6i Adder 6j D / A converter 6k Timer 6m Acceleration control unit 7 Pump motor 8 Pump motor Driver 9 Recording head 10 Head driver 11 Linear encoder 12 Code plate 13 Encoder (rotary encoder)
15 Paper detection sensor 16 CPU
17 Timer IC
18 Host computer 19 Interface unit 20 ASIC
21 PROM
22 RAM
23 EEPROM
25 Platen 30 Pulley 31 Timing belt 32 Carriage motor guide member 34 Ink cartridge 35 Capping device 36 Pump unit 37 Cap 50 Recording paper 80 Target position correction calculation unit 81 Memory 82 Error calculation unit 83 Adder 84 Reset signal generation unit 90 Feed amount Correction calculation section

Claims (8)

モータの回転に従って回転し、前記モータの回転量に応じて前記モータによって搬送される紙の送り量に相当するパルスを出力するエンコーダと、
前記モータの起動前に前記紙の送り量の目標値がカウント値として設定され、前記エンコーダから出力される前記パルスに応じて前記カウント値をカウントするカウンタと、
前記モータの起動前に、前記紙の送り量の目標値と、前記モータの前回の起動後の停止位置を示す、前記モータの起動前の前記カウンタのカウント値とに基づいて、前記紙送り量の修正された目標値を演算し、前記修正された目標値を前記カウンタの前記カウント値に設定する修正設定手段と、
前記カウンタの前記カウント値をカウントダウンするよう前記モータを制御する制御手段と、
を備えたことを特徴とするプリンタ用モータの制御装置。
An encoder that rotates in accordance with the rotation of the motor and outputs a pulse corresponding to the feed amount of the paper conveyed by the motor according to the rotation amount of the motor;
A target value of the paper feed amount is set as a count value before starting the motor, and a counter that counts the count value according to the pulse output from the encoder;
Before activation of the motor, and a target value of the feeding amount of the paper, showing the last stop position after activation of the motor, based on the count value of the counter before start of the motor, the feed of the paper and modified setting means calculates the corrected target value of the amount, sets the corrected target value to the count value of the counter,
Control means for controlling the motor to count down the count value of the counter;
An apparatus for controlling a motor for a printer.
前記制御手段はPID制御することを特徴とする請求項1記載のプリンタ用モータの制御装置。   2. A printer motor control apparatus according to claim 1, wherein said control means performs PID control. 前記カウンタは前記モータの正転および逆転に応じてカウントアップおよびカウントダウンするカウンタであることを特徴とする請求項1または2記載のプリンタ用モータ制御装置。   3. The printer motor control device according to claim 1, wherein the counter is a counter that counts up and counts down in accordance with normal rotation and reverse rotation of the motor. モータの回転に従って回転し、前記モータの回転量に応じて前記モータによって搬送される紙の送り量に相当するパルスを出力するエンコーダと、
前記モータの起動前に前記紙送り量の目標値がカウント値として設定され、前記エンコーダから出力される前記パルスに応じて前記カウント値をカウントするカウンタと、
前記モータの起動前に、前記モータの前回の起動時前記紙の送り量の目標値と、前記カウンタによって検出された前記モータの前回の停止時における前記紙の実際の送り量との誤差を演算する誤差演算手段と、
前記誤差演算手段によって演算された誤差と、今回の起動時の前記紙の送り量の目標値との和である前記紙の送り量の修正された目標値を演算し、相対的な目標位置として設定する目標位置設定手段と、
前記相対的な目標位置と前記モータの前回の停止時における前記カウンタのカウント値に基づく相対的な停止位置との位置偏差を演算するとともに前記カウンタのカウント値を零にリセットする制御量演算手段と、
前記位置偏差が零となるように前記モータを制御する制御手段と、
を備えたことを特徴とするプリンタ用モータの制御装置。
An encoder that rotates in accordance with the rotation of the motor and outputs a pulse corresponding to the feed amount of the paper conveyed by the motor according to the rotation amount of the motor;
A counter target value of feeding amount of the paper before starting of the motor is set as a count value, counting the count value in response to the pulse output from the encoder,
Before starting the motor, an error between a target value of the paper feed amount at the previous start of the motor and an actual feed amount of the paper at the previous stop of the motor detected by the counter is calculated. Error calculating means for calculating;
The corrected target value of the paper feed amount, which is the sum of the error calculated by the error calculation means and the target value of the paper feed amount at the time of the current start-up, is calculated and used as a relative target position. Target position setting means to be set;
Control amount calculation means for calculating a positional deviation between the relative target position and the relative stop position based on the count value of the counter at the previous stop of the motor and resetting the count value of the counter to zero When,
Control means for controlling the motor so that the positional deviation becomes zero;
An apparatus for controlling a motor for a printer.
前記制御手段はPID制御することを特徴とする請求項4記載のプリンタ用モータの制御装置。   5. A printer motor control apparatus according to claim 4, wherein said control means performs PID control. 前記カウンタは前記モータの正転および逆転に応じてカウントアップおよびカウントダウンするカウンタであることを特徴とする請求項4記載のプリンタ用モータの制御装置。   5. The printer motor control apparatus according to claim 4, wherein the counter is a counter that counts up and counts down in accordance with forward rotation and reverse rotation of the motor. モータの起動前に、前記モータによって搬送される紙送り量の目標値と、前記モータの回転に従って回転するエンコーダから出力される、前記モータの回転量に応じて前記紙の送り量に相当するパルスに応じてカウント値をカウントするカウンタの前記モータの起動前のカウント値とに基づいて、前記紙送り量の修正された目標値を演算し、前記修正された目標値を前記カウンタの前記カウント値に設定するスッテプと、
前記カウンタの前記カウント値をカウントダウンするよう前記モータを制御するステップと、
を備えたことを特徴とするプリンタ用モータの制御方法。
Before starting the motor, the target value of the feeding amount of the paper carried by the motor, is output from the encoder that rotates in accordance with rotation of the motor, corresponding to the feeding amount of the paper in accordance with the rotation amount of the motor based on the count value of the previous activation of the motor of the counter for counting a count value in response to pulses, calculates the corrected target value of the feeding amount of the paper, the said corrected target value of the counter Step to set the count value,
Controlling the motor to count down the count value of the counter;
A method for controlling a printer motor, comprising:
モータの回転に従って回転するエンコーダから出力される、前記モータの回転量に応じて前記モータによって搬送される紙の送り量に相当するパルスに応じてカウント値をカウントするカウンタによって前記紙の位置を検出するステップと、
前記モータの起動前に、前記モータの前回の起動時紙の送り量の目標値と、前記カウンタによって検出された前記モータの前回の停止時における前記紙の実際の送り量との誤差を演算するスッテップと、
前記演算された誤差と、今回の起動時の前記紙の送り量の目標値との和である前記紙の送り量の修正された目標値を演算し、この修正された目標値を相対的な目標位置として設定するステップと、
前記相対的な目標位置と前記モータの前回の停止時における前記カウンタのカウント値に基づく相対的な停止位置との位置偏差を演算するとともに前記カウンタのカウント値を零にリセットするステップと、
前記位置偏差が零となるように前記モータを制御するスッテプと、
を備えたことを特徴とするプリンタ用モータの制御方法。
The position of the paper is detected by a counter that counts a count value according to a pulse corresponding to a feed amount of the paper conveyed by the motor according to the rotation amount of the motor output from an encoder that rotates according to the rotation of the motor. And steps to
Before starting the motor, calculate an error between the target value of the paper feed amount at the previous start of the motor and the actual paper feed amount at the previous stop of the motor detected by the counter. Steps to do,
The corrected target value of the paper feed amount, which is the sum of the calculated error and the target value of the paper feed amount at the time of the current start-up, is calculated, and the corrected target value is calculated as a relative value. Setting as a target position;
Calculating a positional deviation between the relative target position and a relative stop position based on the count value of the counter at the previous stop of the motor, and resetting the count value of the counter to zero;
A step for controlling the motor so that the positional deviation becomes zero;
A method for controlling a printer motor, comprising:
JP2006291335A 1999-08-31 2006-10-26 Printer motor control apparatus and control method Expired - Fee Related JP4432055B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006291335A JP4432055B2 (en) 1999-08-31 2006-10-26 Printer motor control apparatus and control method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP24620999 1999-08-31
JP2006291335A JP4432055B2 (en) 1999-08-31 2006-10-26 Printer motor control apparatus and control method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2000167763A Division JP3893853B2 (en) 1999-08-31 2000-06-05 Printer motor control apparatus and control method

Publications (2)

Publication Number Publication Date
JP2007030521A JP2007030521A (en) 2007-02-08
JP4432055B2 true JP4432055B2 (en) 2010-03-17

Family

ID=37790332

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006291335A Expired - Fee Related JP4432055B2 (en) 1999-08-31 2006-10-26 Printer motor control apparatus and control method

Country Status (1)

Country Link
JP (1) JP4432055B2 (en)

Also Published As

Publication number Publication date
JP2007030521A (en) 2007-02-08

Similar Documents

Publication Publication Date Title
US6747429B2 (en) Print control system, print control method, and recording medium having recorded print control program
US7147299B2 (en) Control unit and method for controlling motor for use in printer, and storage medium storing control program
JP3859115B2 (en) Printer motor control apparatus, control method, and recording medium recording control program
JP4457456B2 (en) Printing device
JP3832174B2 (en) Motor control device and control method
JP3780804B2 (en) Motor control device and control method
US7431414B2 (en) Printer-control apparatus, printer-control method and printer
US6967729B1 (en) Control unit and method for controlling motor for use in printer, and storage medium storing control program
JP3893853B2 (en) Printer motor control apparatus and control method
JP3570617B2 (en) DC motor control device and control method
JP4432055B2 (en) Printer motor control apparatus and control method
JP3705061B2 (en) MOTOR CONTROL DEVICE, ITS CONTROL METHOD, AND RECORDING MEDIUM CONTAINING MOTOR CONTROL PROGRAM
JP3777936B2 (en) Motor control method and control apparatus
JP3871181B2 (en) PRINT CONTROL DEVICE, CONTROL METHOD, AND RECORDING MEDIUM CONTAINING PRINT CONTROL PROGRAM
JP3849908B2 (en) Print control apparatus and print control method
JP3812283B2 (en) PRINT CONTROL DEVICE, PRINT CONTROL METHOD, AND RECORDING MEDIUM CONTAINING PRINT CONTROL PROGRAM
JP3812351B2 (en) PRINT CONTROL DEVICE, PRINT CONTROL METHOD, AND RECORDING MEDIUM CONTAINING PRINT CONTROL PROGRAM
JP3900401B2 (en) DC motor control method and control apparatus
JP2005200222A (en) Printing controller and printing control method and recording medium with printing control program recorded
JP4026331B2 (en) Motor driving method, motor driving apparatus, printer, computer program, and computer system
JP3871185B2 (en) PRINT CONTROL DEVICE, PRINT CONTROL METHOD, AND RECORDING MEDIUM CONTAINING PRINT CONTROL PROGRAM
JP2001078475A (en) Device and method for controlling motor
JP2005186630A (en) Print control device and method and record medium recording print control program
JP2002283559A (en) Print controller, method for controlling print, and recording medium having print control program recorded therein

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20061117

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090901

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090904

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20091102

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20091127

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20091210

R150 Certificate of patent or registration of utility model

Ref document number: 4432055

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20130108

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130108

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20140108

Year of fee payment: 4

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees