JP5061547B2 - Motor control apparatus, motor control method, and printing apparatus - Google Patents

Motor control apparatus, motor control method, and printing apparatus Download PDF

Info

Publication number
JP5061547B2
JP5061547B2 JP2006247828A JP2006247828A JP5061547B2 JP 5061547 B2 JP5061547 B2 JP 5061547B2 JP 2006247828 A JP2006247828 A JP 2006247828A JP 2006247828 A JP2006247828 A JP 2006247828A JP 5061547 B2 JP5061547 B2 JP 5061547B2
Authority
JP
Japan
Prior art keywords
control
motor
area
target speed
counter
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
JP2006247828A
Other languages
Japanese (ja)
Other versions
JP2008072806A (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 JP2006247828A priority Critical patent/JP5061547B2/en
Publication of JP2008072806A publication Critical patent/JP2008072806A/en
Application granted granted Critical
Publication of JP5061547B2 publication Critical patent/JP5061547B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、モータ制御装置、モータ制御方法、及び、印刷装置に関する。   The present invention relates to a motor control device, a motor control method, and a printing apparatus.

モータは駆動源として様々な装置に用いられている。例えば、インクジェットプリンタ等の印刷装置では、ヘッドが取り付けられたキャリッジを移動させるための駆動源として、及び、画像が印刷される用紙を搬送させるための駆動源として用いられている。この印刷装置において、キャリッジの加速時及び減速時と一定速度の移動時(定速移動時)とで、異なる制御情報(加速領域電流値データ,固定周期電流値)を用いたものが提案されている(例えば、特許文献1を参照。)。
特開2003−63085号公報
Motors are used in various devices as drive sources. For example, in a printing apparatus such as an ink jet printer, it is used as a drive source for moving a carriage to which a head is attached and as a drive source for transporting paper on which an image is printed. In this printing apparatus, there has been proposed one that uses different control information (acceleration region current value data, fixed cycle current value) depending on whether the carriage is accelerating or decelerating and moving at a constant speed (constant speed movement). (For example, refer to Patent Document 1).
JP 2003-63085 A

近年の装置では、多様な動作パターンでの制御が行われる。例えば、極めて短い時間で移動体を加速させたり減速させたりするパターンや、移動体を比較的緩やかに加速等させるパターンがある。また、加速期間や減速期間の途中までは移動体を急加速等させ、その後緩やかに加速等させるパターンもある。ここで、移動体における加速度合いや減速度合いを短時間で急に変化させる場合には、モータの駆動制御を細かな間隔で行うことが好ましい。一方、移動体の加速度合いや減速度合いが一定の場合、モータの駆動制御は、加速等の度合いを急に変化させる場合に比べて粗い間隔で行えばよい。   In recent apparatuses, control is performed with various operation patterns. For example, there are a pattern in which the moving body is accelerated or decelerated in a very short time, and a pattern in which the moving body is accelerated relatively slowly. Further, there is a pattern in which the moving body is accelerated rapidly until the middle of the acceleration period or deceleration period, and then gradually accelerated. Here, when the degree of acceleration and the degree of deceleration in the moving body are suddenly changed in a short time, it is preferable to perform motor drive control at fine intervals. On the other hand, if the degree of acceleration and the degree of deceleration of the moving body are constant, the drive control of the motor may be performed at coarser intervals than when the degree of acceleration or the like is suddenly changed.

前掲の装置では、加速等の期間において一定周期毎に制御情報を与えているため、加速等の度合いに適した駆動制御が行い難いという問題があった。仮に、制御情報が与えられる間隔を、加速等の度合いを急に変化させる場合を基準に設定したとする。この場合、移動体の加速度合いが一定であるときに、不必要に制御が細かくなってしまう。そして、制御情報の量が過度に多くなってしまい、必要とされるメモリの容量が過度に多くなってしまうという問題が生じる。   The above-described apparatus has a problem that it is difficult to perform drive control suitable for the degree of acceleration or the like because the control information is given at regular intervals during the period of acceleration or the like. Suppose that the interval at which the control information is given is set based on a case where the degree of acceleration or the like is suddenly changed. In this case, the control becomes unnecessarily fine when the acceleration of the moving body is constant. And the amount of control information will increase too much, and the problem that the capacity | capacitance of the memory required will increase excessively will arise.

本発明はこのような事情に鑑みてなされたものであり、その目的は、移動体の加速等のパターンに適した制御を行うことにある。   The present invention has been made in view of such circumstances, and an object thereof is to perform control suitable for a pattern such as acceleration of a moving body.

前記目的を達成するための主たる発明は、(A)モータの駆動に伴って移動する移動体の移動量をカウントするカウンタと、(B)前記モータの駆動に関する制御情報を記憶したメモリであって、前記カウンタの複数のカウント値に対応した第1制御情報を記憶する第1領域と、前記カウンタのカウント値のそれぞれに対応した第2制御情報を記憶する第2領域と、を有する制御パターン情報を複数記憶するメモリと、(C)前記移動体の制御モードに応じて前記制御パターン情報を選択し、前記カウント値に基づいて、選択した前記制御パターン情報における前記第1領域と前記第2領域の何れかを選択し、選択された領域から、前記カウンタのカウント値に応じた制御情報を読み出し、前記モータの駆動制御を行う駆動制御部と、を備え、前記複数の制御パターン情報のそれぞれは、前記第1領域と前記第2領域の比率が異ならされている、モータ制御装置である。
The main invention for achieving the above object is (A) a counter that counts the amount of movement of a moving body that moves as the motor is driven, and (B) a memory that stores control information relating to the driving of the motor. , control pattern information having a first area for storing first control information corresponding to a plurality of count value of the counter, and a second area for storing the second control information corresponding to each of the count value of the counter, the a memory for storing a plurality of, (C) the selects the control pattern information according to the control mode of the mobile body based on the count value, the second region and the first region in the selected said control pattern information selects one of the selected regions, reads the control information corresponding to the count value of the counter, and a drive control unit for controlling the drive of the motor Wherein each of the control pattern information, the ratio of the second region and the first region is different from a motor controller.

本発明の他の特徴は、本明細書、及び添付図面の記載により、明らかにする。   Other features of the present invention will become apparent from the description of this specification and the accompanying drawings.

本明細書の記載、及び添付図面の記載により、少なくとも次のことが明らかにされる。   At least the following will be made clear by the description of the present specification and the accompanying drawings.

すなわち、(A)モータの駆動に伴って移動する移動体の移動量をカウントするカウンタと、(B)前記モータの駆動に関する制御情報を記憶したメモリであって、前記カウンタの複数のカウント値に対応した第1制御情報を記憶する第1領域、及び、前記カウンタのカウント値のそれぞれに対応した第2制御情報を記憶する第2領域を有するメモリと、(C)前記第1領域と前記第2領域の何れかを選択し、選択された領域から、前記カウンタのカウント値に応じた制御情報を読み出し、前記モータの駆動制御を行う駆動制御部と、(D)を有するモータ制御装置を実現できることが明らかにされる。   That is, (A) a counter that counts the amount of movement of the moving body that moves with the drive of the motor, and (B) a memory that stores control information related to the drive of the motor, and a plurality of count values of the counter A memory having a first area for storing corresponding first control information, and a second area for storing second control information corresponding to each of the count values of the counter; (C) the first area and the first area; Select one of the two areas, read out the control information corresponding to the count value of the counter from the selected area, and realize a motor control device having (D) a drive control unit that performs drive control of the motor It is revealed that it can be done.

かかるモータ制御装置であって、タイミングを定めるための電圧変化を有し、かつ、前記移動体が所定量移動する毎に前記電圧変化が生じるタイミング信号を生成する、タイミング信号生成部を有し、前記カウンタは、前記タイミング信号における前記電圧変化の回数を、前記移動体の移動量としてカウントする構成が好ましい。   Such a motor control device has a voltage change for determining timing, and has a timing signal generation unit that generates a timing signal in which the voltage change occurs every time the moving body moves by a predetermined amount, The counter preferably counts the number of voltage changes in the timing signal as the amount of movement of the moving body.

かかるモータ制御装置であって、前記駆動制御部は、前記カウント値を除算して得られた値を用いて、前記第1領域から前記第1制御情報を読み出し、前記カウント値を用いて、前記第2領域から前記第2制御情報を読み出す構成が好ましい。   In this motor control device, the drive control unit reads the first control information from the first area using a value obtained by dividing the count value, and uses the count value to A configuration in which the second control information is read from the second region is preferable.

かかるモータ制御装置であって、前記駆動制御部は、前記第1領域と前記第2領域とを前記移動体の加速状態に応じて選択する構成が好ましい。   In this motor control apparatus, it is preferable that the drive control unit selects the first region and the second region according to an acceleration state of the moving body.

かかるモータ制御装置であって、前記メモリは、前記第1領域と前記第2領域の少なくとも一方を有する制御パターン情報を、前記移動体の移動速度に応じて定められる複数の制御モードのそれぞれに対応させて記憶する構成が好ましい。   In this motor control device, the memory corresponds to each of a plurality of control modes determined according to a moving speed of the moving body, with respect to control pattern information having at least one of the first area and the second area. A configuration in which the information is stored is preferable.

かかるモータ制御装置であって、前記メモリは、前記第1制御情報として、前記カウンタの複数のカウント値に対応した前記移動体の目標速度を記憶し、前記第2制御情報として、前記カウンタのカウント値のそれぞれに対応した前記移動体の目標速度を記憶する構成が好ましい。   In this motor control device, the memory stores, as the first control information, target speeds of the moving body corresponding to a plurality of count values of the counter, and counts of the counter as the second control information It is preferable that the target speed of the moving body corresponding to each value is stored.

また、次のモータ制御方法を実現できることが明らかにされる。すなわち、(A)モータの駆動に伴って移動する移動体の移動量をカウントすること、(B)前記モータの駆動に関する制御情報を記憶したメモリに設けられる第1領域と第2領域であって、前記カウンタの複数のカウント値に対応した第1制御情報を記憶する第1領域と前記カウンタのカウント値のそれぞれに対応した第2制御情報を記憶する第2領域について、何れかの領域を選択すること、(C)選択された領域から、前記カウンタのカウント値に応じた制御情報を読み出し、前記モータの駆動制御を行うこと、(D)を行うモータ制御方法を実現できることが明らかにされる。   It will also be clarified that the following motor control method can be realized. That is, (A) counting the amount of movement of the moving body that moves as the motor is driven, and (B) a first area and a second area provided in a memory that stores control information relating to the driving of the motor. Select one of the first area for storing first control information corresponding to a plurality of count values of the counter and the second area for storing second control information corresponding to each of the count values of the counter. It is clarified that (C) the control information corresponding to the count value of the counter is read from the selected area, the drive control of the motor is performed, and the motor control method of (D) can be realized. .

また、次の印刷装置を実現できることも明らかにされる。すなわち、(A)インクを吐出させるヘッドであって、第1モータによって所定の移動方向に移動されるヘッドについて、その移動量をカウントするカウンタと、(B)前記第1モータの駆動に関する制御情報を記憶したメモリであって、前記カウンタの複数のカウント値に対応した前記移動体の目標速度を、第1制御情報として記憶する第1領域、及び、前記第1カウンタのカウント値のそれぞれに対応した前記移動体の目標速度を、第2制御情報として記憶する第2領域を有するメモリと、(C)前記媒体の搬送終了時に前記ヘッドが前記インクの吐出開始位置へ達するように、前記媒体を搬送するための第2モータを駆動中に前記第1モータの駆動を開始させる駆動制御部であって、前記媒体の搬送終了タイミング、インク吐出開始位置までの前記ヘッドの移動量に対応する前記第1カウンタのカウント値、及び、前記第1領域及び前記第2領域に記憶された前記ヘッド用の目標速度に基づき、前記第1モータに対する駆動制御の開始タイミングを求め、求められた開始タイミングにて、前記第1モータに対する駆動制御を開始する、駆動制御部と、(D)を有する印刷装置を実現できることも明らかにされる。   It is also clarified that the following printing apparatus can be realized. That is, (A) a head that ejects ink and moves in a predetermined movement direction by the first motor, a counter that counts the movement amount, and (B) control information related to driving of the first motor. In which a target speed of the moving body corresponding to a plurality of count values of the counter is stored as first control information, and each of the count values of the first counter is stored. A memory having a second area for storing the target speed of the movable body as second control information; and (C) the medium is moved so that the head reaches the ink ejection start position when the conveyance of the medium is completed. A drive control unit that starts driving the first motor while driving a second motor for transporting, the transport end timing of the medium, and the ink discharge start position; Drive control for the first motor based on the count value of the first counter corresponding to the amount of movement of the head up to and the target speed for the head stored in the first area and the second area. It is also clarified that it is possible to realize a printing apparatus having a drive control unit and (D) for obtaining a start timing and starting drive control for the first motor at the obtained start timing.

===第1実施形態===
モータ、及び、モータ制御装置は、種々の装置に用いられる。本明細書では、これらのモータ、及び、モータ制御装置を有するインクジェットプリンタ(以下、単にプリンタともいう。)を例に挙げて説明する。このプリンタは、ヘッドから吐出されたインクによって媒体に画像を印刷する印刷装置に相当する。図1に示すように、プリンタ10は、コントローラ部20とエンジン部30とを有する。
=== First Embodiment ===
The motor and the motor control device are used in various devices. In this specification, an ink jet printer (hereinafter also simply referred to as a printer) having these motors and a motor control device will be described as an example. This printer corresponds to a printing apparatus that prints an image on a medium using ink ejected from a head. As shown in FIG. 1, the printer 10 includes a controller unit 20 and an engine unit 30.

<コントローラ部20について>
コントローラ部20は、プリンタ10における制御を担当する部分であり、CPU21、ASIC22、メモリ23、タイマーIC24、及び、DCユニット25を有する。CPU21は、プリンタ10の全体の制御を行うための演算処理装置である。このCPU21は、バスBUを介して、ASIC22、メモリ23、及び、インタフェース26と通信可能に接続されている。なお、インタフェース26は、ホストコンピュータHCと通信可能に接続されている。この他に、CPU21は、DCユニット25、キャリッジモータドライバ33(CRモータドライバ)、搬送モータドライバ36(PFモータドライバ)と電気的に接続されている。ASIC22は、ホストコンピュータHCからの印刷データに基づいてドット毎の制御データをシリアル伝送したり、ヘッドHDに用いられる駆動波形等を生成したりする。また、ASIC22は、ヘッドドライバ38と通信可能に接続されている。メモリ23は、CPU21やASIC22用のプログラムや変数を記憶する領域として用いられたり、作業用の領域として用いられたりする。このメモリ23は、RAM、EEPROM、ROM等の記憶素子によって構成される。これらの記憶素子によって、作業用の領域等に用いられる揮発性領域、プログラム等を記憶する領域等に用いられる不揮発性領域、及び、変数や定数等を記憶する領域等に用いられる書き換え可能な不揮発性領域が構成される。タイマーIC24は、時間を認識するためのクロック(以下、計時用クロックともいう。)を生成する。そして、計時用クロックはCPU21に供給される。従って、CPU21は、計時用クロックのエッジ(タイミングを示す電圧変化)を、メモリ23に設けられる計時カウンタ領域(図示せず)でカウントすることで、あるタイミングからの経過時間を認識できる。そして、CPU21は、計時用クロックに基づくタイマー信号を出力する。このタイマー信号は、放熱状態の取得タイミングを定める際に用いられる。DCユニット25は、キャリッジモータドライバ33や搬送モータドライバ36を制御するための指令信号(制御用信号)を出力する。なお、DCユニット25については後で詳しく説明する。
<About the controller unit 20>
The controller unit 20 is a part in charge of control in the printer 10 and includes a CPU 21, an ASIC 22, a memory 23, a timer IC 24, and a DC unit 25. The CPU 21 is an arithmetic processing device for performing overall control of the printer 10. The CPU 21 is communicably connected to the ASIC 22, the memory 23, and the interface 26 via the bus BU. The interface 26 is communicably connected to the host computer HC. In addition, the CPU 21 is electrically connected to the DC unit 25, the carriage motor driver 33 (CR motor driver), and the transport motor driver 36 (PF motor driver). The ASIC 22 serially transmits control data for each dot based on print data from the host computer HC, and generates a drive waveform used for the head HD. The ASIC 22 is connected to the head driver 38 so as to be communicable. The memory 23 is used as an area for storing programs and variables for the CPU 21 and the ASIC 22 or used as a work area. The memory 23 is configured by a storage element such as a RAM, an EEPROM, or a ROM. With these storage elements, volatile areas used for work areas, non-volatile areas used for areas for storing programs, etc., and rewritable non-volatile areas used for areas for storing variables, constants, etc. Sex areas are constructed. The timer IC 24 generates a clock for recognizing time (hereinafter also referred to as a clock for clocking). Then, the clock for clocking is supplied to the CPU 21. Accordingly, the CPU 21 can recognize the elapsed time from a certain timing by counting the edge of the clock for clocking (voltage change indicating timing) in a clocking counter area (not shown) provided in the memory 23. Then, the CPU 21 outputs a timer signal based on the clock for clocking. This timer signal is used when determining the acquisition timing of the heat dissipation state. The DC unit 25 outputs a command signal (control signal) for controlling the carriage motor driver 33 and the conveyance motor driver 36. The DC unit 25 will be described in detail later.

<エンジン部30について>
エンジン部30は、印刷のための動作を担当する部分である。そして、エンジン部30は、キャリッジ31と、キャリッジ移動機構32と、キャリッジモータドライバ33と、リニアエンコーダ34と、用紙搬送機構35と、搬送モータドライバ36と、ロータリエンコーダ37と、ヘッドドライバ38とを有する。
<About engine unit 30>
The engine unit 30 is a part in charge of an operation for printing. The engine unit 30 includes a carriage 31, a carriage moving mechanism 32, a carriage motor driver 33, a linear encoder 34, a paper transport mechanism 35, a transport motor driver 36, a rotary encoder 37, and a head driver 38. Have.

キャリッジ31は、インクカートリッジ(図示せず)やヘッドHDが取り付けられる部材である。このキャリッジ31は、キャリッジ移動機構32によって、キャリッジ移動方向(用紙Sの幅方向)に移動される。なお、ヘッドHDは、キャリッジ31に取り付けられているため、キャリッジ31の移動に伴って移動する。従って、キャリッジ31やヘッドHDは移動体に相当する。また、キャリッジ移動機構32はヘッド移動機構に相当し、かつ、移動体を移動させるための移動機構に相当する。本実施形態において、キャリッジ移動機構32は、タイミングベルト41と、駆動プーリー42と、アイドラプーリー43と、キャリッジモータ44を有する。タイミングベルト41は、キャリッジ31に接続されるとともに、駆動プーリー42とアイドラプーリー43との間に架け渡されている。キャリッジモータ44は、キャリッジ31を移動させるための駆動源であり、その回転軸が駆動プーリー42に接続されている。このキャリッジモータ44は、DCモータによって構成されている。このDCモータでは、印加電流に応じてキャリッジモータ44の回転速度を制御することができる。従って、キャリッジモータドライバ33は、DCユニット25からの指令信号の電流量に応じてキャリッジモータ44を駆動させる。   The carriage 31 is a member to which an ink cartridge (not shown) and the head HD are attached. The carriage 31 is moved in the carriage movement direction (the width direction of the paper S) by the carriage movement mechanism 32. Since the head HD is attached to the carriage 31, it moves as the carriage 31 moves. Accordingly, the carriage 31 and the head HD correspond to a moving body. The carriage moving mechanism 32 corresponds to a head moving mechanism and also corresponds to a moving mechanism for moving a moving body. In the present embodiment, the carriage moving mechanism 32 includes a timing belt 41, a drive pulley 42, an idler pulley 43, and a carriage motor 44. The timing belt 41 is connected to the carriage 31 and is stretched between the drive pulley 42 and the idler pulley 43. The carriage motor 44 is a drive source for moving the carriage 31, and its rotation shaft is connected to the drive pulley 42. The carriage motor 44 is constituted by a DC motor. In this DC motor, the rotation speed of the carriage motor 44 can be controlled in accordance with the applied current. Accordingly, the carriage motor driver 33 drives the carriage motor 44 in accordance with the amount of current of the command signal from the DC unit 25.

リニアエンコーダ34は、キャリッジ31(ヘッドHD)が所定距離移動する毎に電圧レベルが変化するエンコーダ信号ENC_Cを出力する。図2Aに示すように、リニアエンコーダ34は、所定間隔で透光部が形成された符号板45と、キャリッジ31とともに移動し、エンコーダ信号ENC_Cを出力するセンサユニット46とを有する。符号板45は、プリンタ10のフレーム側に、キャリッジ移動方向に沿って取り付けられている。そして、また、センサユニット46から出力されるエンコーダ信号ENC_Cは、例えば図2Bに示すように、互いに位相の異なる2種類の信号である。そして、各エンコーダ信号ENC_CA,ENC_CBは、符号板45が有する透光部の検出に対応して電圧をHレベルとLレベルの一方から他方へと交互に変化させる。本実施形態において、センサユニット46は、キャリッジ31が1/180インチの距離を移動する毎に、1周期の信号レベル変化(電圧変化)を生じさせる。そして、第2エンコーダ信号ENC_CBは、第1エンコーダ信号ENC_CAに対して1/4周期だけ位相がずれている。このため、第1エンコーダ信号ENC_CAと第2エンコーダ信号ENC_CBの各エッジに基づき、キャリッジ31の移動を1/720インチ毎に検出できる。後で説明するように、このプリンタ10では、エンコーダ信号ENC_Cのエッジのタイミング(電圧変化のタイミング)で、キャリッジモータ44に対する駆動制御が行われる。このため、エンコーダ信号ENC_Cは、制御タイミングを定めるための電圧変化を有するタイミング信号に相当する。また、リニアエンコーダ34は、タイミング信号生成部に相当し、移動体としてのキャリッジ31が所定距離移動する毎に、出力するエンコーダ信号ENC_Cの電圧変化を生じさせる。   The linear encoder 34 outputs an encoder signal ENC_C whose voltage level changes every time the carriage 31 (head HD) moves a predetermined distance. As shown in FIG. 2A, the linear encoder 34 includes a code plate 45 having a light transmitting portion formed at predetermined intervals, and a sensor unit 46 that moves together with the carriage 31 and outputs an encoder signal ENC_C. The code plate 45 is attached to the frame side of the printer 10 along the carriage movement direction. The encoder signal ENC_C output from the sensor unit 46 is two types of signals having different phases as shown in FIG. 2B, for example. The encoder signals ENC_CA and ENC_CB change the voltage alternately from one of the H level and the L level to the other corresponding to the detection of the light transmitting portion of the code plate 45. In the present embodiment, the sensor unit 46 causes a signal level change (voltage change) in one cycle every time the carriage 31 moves a distance of 1/180 inch. The phase of the second encoder signal ENC_CB is shifted by a quarter period from the first encoder signal ENC_CA. Therefore, the movement of the carriage 31 can be detected every 1/720 inch based on the edges of the first encoder signal ENC_CA and the second encoder signal ENC_CB. As will be described later, in the printer 10, drive control for the carriage motor 44 is performed at the edge timing (voltage change timing) of the encoder signal ENC_C. Therefore, the encoder signal ENC_C corresponds to a timing signal having a voltage change for determining the control timing. The linear encoder 34 corresponds to a timing signal generator, and causes a voltage change of the output encoder signal ENC_C every time the carriage 31 as a moving body moves a predetermined distance.

用紙搬送機構35は、媒体としての用紙Sを搬送する機構であり、媒体搬送機構に相当する。なお、用紙Sは移動体にも相当するため、用紙搬送機構35も、移動体を移動させるための移動機構に相当する。図1では、その主要部である搬送ローラ47と搬送モータ48を示している。搬送ローラ47は、回転によって用紙Sを搬送方向へ送り出す部材である。この搬送方向は、キャリッジ31の移動方向と直交する方向である。搬送モータ48は、搬送ローラ47を回転させるための駆動源であり、DCモータによって構成される。従って、印加された電流量に応じて搬送モータ48の回転速度を制御できる。そして、搬送モータドライバ36は、DCユニット25からの指令信号の電流量に応じて搬送モータ48を駆動する。   The paper transport mechanism 35 is a mechanism that transports the paper S as a medium, and corresponds to a medium transport mechanism. Since the paper S corresponds to a moving body, the paper transport mechanism 35 also corresponds to a moving mechanism for moving the moving body. In FIG. 1, the conveyance roller 47 and the conveyance motor 48 which are the main parts are shown. The transport roller 47 is a member that feeds the paper S in the transport direction by rotation. This conveyance direction is a direction orthogonal to the movement direction of the carriage 31. The carry motor 48 is a drive source for rotating the carry roller 47, and is constituted by a DC motor. Therefore, the rotation speed of the transport motor 48 can be controlled according to the applied current amount. Then, the carry motor driver 36 drives the carry motor 48 according to the amount of current of the command signal from the DC unit 25.

ロータリエンコーダ37は、搬送ローラ47が所定角度回転する毎に電圧レベルが変化するエンコーダ信号ENC_Pを出力する。言い換えれば、用紙Sが所定距離搬送される毎に電圧レベルが変化するエンコーダ信号ENC_Pを出力する。図3Aに一部分を示すように、ロータリエンコーダ37は、所定間隔で透光部が形成された符号板49と、エンコーダ信号ENC_Pを出力するセンサユニット50とを有する。符号板49は、円盤状をしており、透光部が所定間隔で形成されている。そして、搬送ローラ47の回転とともに回転する。この例では、搬送ローラ47の回転軸に符号板49が取り付けられている。センサユニット50は、リニアエンコーダ34が有するものと同様の構成であり、符号板49の透光部と他の部分とを検出する毎に、エンコーダ信号ENC_Pのレベルを変化させる。例えば図3Bに示すように、位相が1/4周期分だけ異なる2種類のエンコーダ信号ENC_PA,ENC_PBを出力する。これにより、用紙Sの搬送量を1/1440インチ毎に検出することができる。なお、このプリンタ10では、エンコーダ信号ENC_Pのエッジのタイミングで、搬送モータ48に対する駆動制御が行われる。このため、エンコーダ信号ENC_Pもまた、制御タイミングを定めるための電圧変化を有するタイミング信号に相当する。そして、ロータリエンコーダ37は、タイミング信号生成部に相当し、移動体としての用紙Sが所定距離移動する毎に、出力するエンコーダ信号ENC_Pの電圧変化を生じさせる。   The rotary encoder 37 outputs an encoder signal ENC_P whose voltage level changes every time the transport roller 47 rotates by a predetermined angle. In other words, the encoder signal ENC_P whose voltage level changes every time the sheet S is conveyed by a predetermined distance is output. As shown in part in FIG. 3A, the rotary encoder 37 includes a code plate 49 in which translucent portions are formed at predetermined intervals, and a sensor unit 50 that outputs an encoder signal ENC_P. The code plate 49 has a disk shape, and translucent portions are formed at predetermined intervals. Then, it rotates with the rotation of the transport roller 47. In this example, a code plate 49 is attached to the rotation shaft of the transport roller 47. The sensor unit 50 has the same configuration as that of the linear encoder 34, and changes the level of the encoder signal ENC_P every time the translucent portion and other portions of the code plate 49 are detected. For example, as shown in FIG. 3B, two types of encoder signals ENC_PA and ENC_PB whose phases are different by a quarter period are output. Thereby, the conveyance amount of the paper S can be detected every 1/1440 inch. In the printer 10, drive control for the transport motor 48 is performed at the edge timing of the encoder signal ENC_P. For this reason, the encoder signal ENC_P also corresponds to a timing signal having a voltage change for determining the control timing. The rotary encoder 37 corresponds to a timing signal generation unit, and causes a voltage change of the output encoder signal ENC_P every time the sheet S as a moving body moves a predetermined distance.

ヘッドドライバ38は、ヘッドHDの駆動制御を担当する部分である。例えば、ASIC22からシリアル伝送されたドット毎の制御データをパラレル変換したり、この制御データに基づいてインクの吐出制御を行ったりする。   The head driver 38 is a part in charge of driving control of the head HD. For example, control data for each dot serially transmitted from the ASIC 22 is converted into parallel data, and ink ejection control is performed based on the control data.

===DCユニット25===
<全体の構成について>
次にDCユニット25について説明する。このDCユニット25は、キャリッジモータ44や搬送モータ48の駆動制御を行うものであり、モータ制御装置における駆動制御部に相当する。このため、DCユニット25は、コントローラ部20が有するCPU21からの各種信号に基づき、キャリッジモータドライバ33や搬送モータドライバ36を制御するための指令信号(制御用信号)を出力する。図4に示すように、DCユニット25は、CPU61、メモリ62、及び、PWM回路63を有する。そして、これらの各部によって、図5に示す機能が実現される。便宜上、図5に示す各機能ブロックを、DCユニット25の構成として説明する。このDCユニット25は、キャリッジモータ44の制御を担当するキャリッジモータ制御ユニット64と、搬送モータ48の制御を担当する搬送モータ制御ユニット65とを有する。
=== DC unit 25 ===
<About the overall configuration>
Next, the DC unit 25 will be described. The DC unit 25 performs drive control of the carriage motor 44 and the carry motor 48, and corresponds to a drive control unit in the motor control device. Therefore, the DC unit 25 outputs a command signal (control signal) for controlling the carriage motor driver 33 and the carry motor driver 36 based on various signals from the CPU 21 of the controller unit 20. As shown in FIG. 4, the DC unit 25 includes a CPU 61, a memory 62, and a PWM circuit 63. The functions shown in FIG. 5 are realized by these units. For convenience, each functional block shown in FIG. 5 will be described as a configuration of the DC unit 25. The DC unit 25 includes a carriage motor control unit 64 that controls the carriage motor 44 and a transport motor control unit 65 that controls the transport motor 48.

キャリッジモータ制御ユニット64は、位置演算部71、第1減算器72、目標速度演算部73、目標速度テーブル74、速度演算部75、第2減算器76、比例要素77P、積分要素77I、微分要素77D、加算器78、PWM回路63a、及び、ウェイト制御部79によって構成される。同様に、搬送モータ制御ユニット65は、位置演算部81、第1減算器82、目標速度演算部83、目標速度テーブル84、速度演算部85、第2減算器86、比例要素87P、積分要素87I、微分要素87D、加算器88、PWM回路63b、及び、ウェイト制御部89によって構成される。なお、搬送モータ制御ユニット65が有する各部81〜89は、キャリッジモータ制御ユニット64が有する各部71〜79と同様に構成されている。このため、キャリッジモータ制御ユニット64について構成を説明し、搬送モータ制御ユニット65については構成の説明を省略する。   The carriage motor control unit 64 includes a position calculator 71, a first subtractor 72, a target speed calculator 73, a target speed table 74, a speed calculator 75, a second subtractor 76, a proportional element 77P, an integral element 77I, and a differential element. 77D, an adder 78, a PWM circuit 63a, and a weight control unit 79. Similarly, the transport motor control unit 65 includes a position calculator 81, a first subtractor 82, a target speed calculator 83, a target speed table 84, a speed calculator 85, a second subtractor 86, a proportional element 87P, and an integral element 87I. , A differential element 87D, an adder 88, a PWM circuit 63b, and a weight control unit 89. In addition, each part 81-89 which the conveyance motor control unit 65 has is comprised similarly to each part 71-79 which the carriage motor control unit 64 has. Therefore, the configuration of the carriage motor control unit 64 will be described, and the description of the configuration of the transport motor control unit 65 will be omitted.

位置演算部71は、リニアエンコーダ34からのエンコーダ信号ENC_Cにおける各々の立ち上がりエッジ、立ち下がりエッジを検出する。そして、検出されたエッジをカウントし、このカウント値に基づいてキャリッジ31の位置を求める。エッジのカウントは、位置演算部71が有する位置カウンタ71aによってなされる。キャリッジモータ44の正転時において、位置カウンタ71aは、1個のエッジが検出されるとカウント値を「+1」する。また、キャリッジモータ44の逆転時において、位置カウンタ71aは、1個のエッジが検出されるとカウント値を「−1」する。第1減算器72は、コントローラ部20のCPU21から送られてくる目標位置と、位置演算部71によって求められたキャリッジ31の演算位置との位置偏差を演算する。目標速度演算部73は、キャリッジ31の目標速度を演算する。この目標速度演算部73は、キャリッジ31が定速で移動している際における目標速度を演算する。すなわち、目標速度演算部73は、第1減算器72からの位置偏差にゲインKpを乗算することで目標速度を求める。なお、このゲインKpの大きさは位置偏差に応じて決定される。そして、ゲインKpは、DCユニット25が有するメモリ62に記憶される。目標速度テーブル74は、キャリッジ31の加速時や減速時において参照される目標速度を、位置カウンタ71aのカウント値に対応させた状態で記憶する。この目標速度テーブル74は、例えばメモリ62が有する一部の領域(不揮発性の領域)を用いて構成される。   The position calculation unit 71 detects each rising edge and falling edge in the encoder signal ENC_C from the linear encoder 34. Then, the detected edges are counted, and the position of the carriage 31 is obtained based on the count value. Edge counting is performed by a position counter 71 a included in the position calculation unit 71. During forward rotation of the carriage motor 44, the position counter 71a increments the count value by “+1” when one edge is detected. Further, when the carriage motor 44 rotates in the reverse direction, the position counter 71a increments the count value by “−1” when one edge is detected. The first subtracter 72 calculates a position deviation between the target position sent from the CPU 21 of the controller unit 20 and the calculated position of the carriage 31 obtained by the position calculating unit 71. The target speed calculation unit 73 calculates the target speed of the carriage 31. The target speed calculation unit 73 calculates a target speed when the carriage 31 is moving at a constant speed. That is, the target speed calculation unit 73 obtains the target speed by multiplying the position deviation from the first subtracter 72 by the gain Kp. The magnitude of the gain Kp is determined according to the position deviation. The gain Kp is stored in the memory 62 included in the DC unit 25. The target speed table 74 stores a target speed referred to when the carriage 31 is accelerated or decelerated in a state corresponding to the count value of the position counter 71a. The target speed table 74 is configured using, for example, a partial area (nonvolatile area) included in the memory 62.

速度演算部75は、リニアエンコーダ34からのエンコーダ信号ENC_Cに基づき、キャリッジ31の移動速度を演算する。例えば、あるエッジが検出されてから他のエッジが検出されるまでの時間をタイマカウンタ等によって計測し、キャリッジ31の移動距離を計測時間で除算することで移動速度を求める。なお、キャリッジ31の移動距離は、位置カウンタ71aのカウント値等によって認識される。第2減算器76は、キャリッジ31の加速時や減速時においては、目標速度テーブル74から読み出された目標速度と、速度演算部75によって演算されたキャリッジ31の移動速度との偏差(速度偏差ともいう。)を求める。また、キャリッジ31の定速移動時においては、目標速度演算部73によって演算された目標速度と、速度演算部75によって演算されたキャリッジ31の移動速度との偏差を求める。比例要素77Pは、速度偏差に定数(Gp)を乗算し、乗算結果を出力する。積分要素77Iは、速度偏差に定数(Gi)を乗じ、乗算結果を積算する。微分要素77Dは、現在の速度偏差と1つ前の速度偏差との差に定数(Gd)を乗算し、乗算結果を出力する。そして、比例要素77P、積分要素77I及び微分要素77Dの演算は、リニアエンコーダ34からのエンコーダ信号ENC_Cのエッジで定められるタイミングで行われる。すなわち、エンコーダ信号ENC_Cは、モータの駆動制御の実行タイミングを定めるための第1タイミング信号に相当する。そして、エンコーダ信号ENC_Cにおけるエッジは、制御の実行タイミングを定めるための電圧変化に相当し、エッジ同士の間隔は、制御の実行間隔を定める第1周期に相当する。   The speed calculation unit 75 calculates the moving speed of the carriage 31 based on the encoder signal ENC_C from the linear encoder 34. For example, the time from when a certain edge is detected until another edge is detected is measured by a timer counter or the like, and the moving speed is obtained by dividing the moving distance of the carriage 31 by the measuring time. The moving distance of the carriage 31 is recognized by the count value of the position counter 71a. When the carriage 31 is accelerating or decelerating, the second subtracter 76 deviates between the target speed read from the target speed table 74 and the moving speed of the carriage 31 calculated by the speed calculating unit 75 (speed deviation). Also called). Further, when the carriage 31 moves at a constant speed, the deviation between the target speed calculated by the target speed calculator 73 and the moving speed of the carriage 31 calculated by the speed calculator 75 is obtained. The proportional element 77P multiplies the speed deviation by a constant (Gp) and outputs the multiplication result. The integration element 77I multiplies the speed deviation by a constant (Gi) and integrates the multiplication results. The differential element 77D 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 77P, the integral element 77I, and the differential element 77D is performed at a timing determined by the edge of the encoder signal ENC_C from the linear encoder 34. That is, the encoder signal ENC_C corresponds to a first timing signal for determining execution timing of motor drive control. An edge in the encoder signal ENC_C corresponds to a voltage change for determining a control execution timing, and an interval between the edges corresponds to a first period that determines a control execution interval.

比例要素77Pからの出力、積分要素77Iからの出力、及び、微分要素77Dからの出力は、それぞれ加算器78にて加算される。そして、加算結果はPWM回路63aへ入力される。すなわち、加算結果は、デューティ値を示す信号としてPWM回路63aへ入力される。PWM回路63aは、加算結果(デューティ値)に応じた指令信号を生成して出力する。生成された指令信号は、キャリッジモータドライバ33に入力される。キャリッジモータドライバ33は、指令信号の電流量に応じてキャリッジモータ44を駆動する。その結果、キャリッジ31の現在の速度と、目標速度との偏差に応じた制御量でキャリッジモータ44が駆動される。   The output from the proportional element 77P, the output from the integral element 77I, and the output from the differential element 77D are added by an adder 78, respectively. Then, the addition result is input to the PWM circuit 63a. That is, the addition result is input to the PWM circuit 63a as a signal indicating the duty value. The PWM circuit 63a generates and outputs a command signal corresponding to the addition result (duty value). The generated command signal is input to the carriage motor driver 33. The carriage motor driver 33 drives the carriage motor 44 according to the current amount of the command signal. As a result, the carriage motor 44 is driven with a control amount corresponding to the deviation between the current speed of the carriage 31 and the target speed.

ウェイト制御部79は、キャリッジモータ44の発熱状態を取得し、取得された発熱状態に基づいてキャリッジモータ44の休止に関する制御(駆動停止制御)をする。このウェイト制御部79により、キャリッジモータ44が過度に発熱していた場合に、必要な休止時間(ウェイト時間)が与えられる。例えば、キャリッジ31が往路方向から復路方向へ移動方向を切り替える場合、或いは、その逆へ移動方向を切り替える場合に、必要な休止時間が与えられる。これにより、キャリッジモータ44の発熱状態を適正範囲に維持できる。   The weight control unit 79 acquires the heat generation state of the carriage motor 44 and performs control (drive stop control) related to the suspension of the carriage motor 44 based on the acquired heat generation state. When the carriage motor 44 generates excessive heat, the wait control unit 79 gives a necessary pause time (wait time). For example, when the movement direction of the carriage 31 is switched from the forward direction to the backward direction, or when the movement direction is switched to the opposite direction, a necessary pause time is given. Thereby, the heat generation state of the carriage motor 44 can be maintained in an appropriate range.

<目標速度テーブル74について>
次に、目標速度テーブル74について説明する。この目標速度テーブル74は、前述したように、キャリッジ31の加速時や減速時において参照される目標速度を、位置カウンタ71aのカウント値に対応させた状態で記憶している。そして、目標速度の情報は、モータの駆動に関する制御情報の一種に相当する。また、目標速度テーブル74は、メモリ62が有する一部の領域によって構成されている。このため、DCユニット25が有するメモリ62は、モータの駆動に関する制御情報を記憶したメモリに相当する。図6に示すように、目標速度テーブル74は、複数の制御パターン情報から構成されている。この制御パターン情報は、キャリッジ31の目標速度を所定のタイミング毎に記憶したものである。これらの制御パターン情報は、キャリッジ31の移動速度に基づいて定められた複数の駆動モードに対応して用意されている。例えば、最も速い移動速度の高速モードに対応する第1制御パターン情報74A、2番目に速い移動速度の速度モードに対応する第2制御パターン情報74B、…、最も遅い移動速度の低速モードに対応する第n制御パターン情報74Nというように、n種類の制御パターン情報が用意されている。
<Target speed table 74>
Next, the target speed table 74 will be described. As described above, the target speed table 74 stores the target speed referred to when the carriage 31 is accelerated or decelerated in a state corresponding to the count value of the position counter 71a. The target speed information corresponds to a type of control information related to motor driving. In addition, the target speed table 74 is configured by a partial area of the memory 62. For this reason, the memory 62 included in the DC unit 25 corresponds to a memory that stores control information related to driving of the motor. As shown in FIG. 6, the target speed table 74 is composed of a plurality of pieces of control pattern information. This control pattern information stores the target speed of the carriage 31 at every predetermined timing. These control pattern information is prepared corresponding to a plurality of drive modes determined based on the moving speed of the carriage 31. For example, the first control pattern information 74A corresponding to the high speed mode with the fastest moving speed, the second control pattern information 74B corresponding to the speed mode with the second fastest moving speed,..., Corresponding to the low speed mode with the slowest moving speed. N types of control pattern information such as nth control pattern information 74N are prepared.

制御パターン情報のそれぞれは、エッジ間テーブルと、1周期テーブルとを有している。ここで、エッジ間テーブルとは、エンコーダ信号ENC_Cが有するエッジ毎に、対応する目標速度を記憶したテーブルである。例えば、図7に示す例において、第1エンコーダ信号ENC_CAについては、タイミングt1,t3,t5,t7,…のように奇数番目のタイミングでエッジが生じる。また、第2エンコーダ信号ENC_CBについては、タイミングt2,t4,t6,t8,…のように偶数番目のタイミングでエッジが生じる。エッジ間テーブルでは、これらの各エッジに対応して定められた目標速度が記憶される。例えば、タイミングt1については、このタイミングt1での目標速度v1が、カウント値(エッジの数)C1に対応する領域に記憶される。また、タイミングt2については、目標速度v2がカウント数C2に対応する領域に記憶される。他のタイミングについても同様に目標速度が記憶される。例えば、タイミングt3については、目標速度v3がカウント数C3に対応する領域に記憶される。また、タイミングt11については、目標速度v11がカウント数C11に対応する領域に記憶される。このようなエッジ間テーブルは、メモリが有する第2領域に相当し、移動体の移動量を示すカウント値のそれぞれに対応した第2制御情報(目標速度v1等)を記憶する。   Each of the control pattern information has an inter-edge table and a one-cycle table. Here, the inter-edge table is a table that stores a target speed corresponding to each edge of the encoder signal ENC_C. For example, in the example illustrated in FIG. 7, the first encoder signal ENC_CA has an edge at an odd-numbered timing such as timing t1, t3, t5, t7,. For the second encoder signal ENC_CB, an edge occurs at even-numbered timings such as timings t2, t4, t6, t8,. In the inter-edge table, the target speed determined corresponding to each edge is stored. For example, for the timing t1, the target speed v1 at the timing t1 is stored in an area corresponding to the count value (number of edges) C1. Further, for the timing t2, the target speed v2 is stored in an area corresponding to the count number C2. Similarly, the target speed is stored for other timings. For example, for the timing t3, the target speed v3 is stored in an area corresponding to the count number C3. Further, for the timing t11, the target speed v11 is stored in an area corresponding to the count number C11. Such an inter-edge table corresponds to a second area of the memory, and stores second control information (target speed v1 and the like) corresponding to each count value indicating the moving amount of the moving body.

一方、1周期テーブルとは、エンコーダ信号ENC_Cが有する複数のエッジに対応させて目標速度を記憶したテーブルである。図8の例では、第1エンコーダ信号ENC_CAの1周期に属する複数のエッジ毎に目標速度が記憶される。そして、タイミングt1からタイミングt4のそれぞれに対応する4つのエッジが同じ周期に属する。また、タイミングt5からタイミングt7のそれぞれに対応する4つのエッジが同じ周期に属する。1周期テーブルでは、これらの同じ周期に属する複数のエッジ対して共通に定められた目標速度が記憶される。例えば、複数のタイミングt1〜t4については、これらのタイミングt1〜t4(つまり、これらのタイミングを示すカウント値)における共通の目標速度v21が、対応する領域に記憶される。また、複数のタイミングt5〜t8については、これらのタイミングt5〜t8における共通の目標速度v22が、対応する領域に記憶される。そして、他のタイミングについても同様に目標速度が記憶される。このような1周期テーブルは、メモリが有する第1領域に相当し、移動体の移動量を示す複数のカウント値に対応した第1制御情報(目標速度v21等)を記憶する。   On the other hand, the one-cycle table is a table that stores target speeds corresponding to a plurality of edges of the encoder signal ENC_C. In the example of FIG. 8, the target speed is stored for each of a plurality of edges belonging to one cycle of the first encoder signal ENC_CA. And four edges corresponding to each of timing t1 to timing t4 belong to the same period. Also, four edges corresponding to each of timing t5 to timing t7 belong to the same period. In the one cycle table, a target speed determined in common for a plurality of edges belonging to these same cycles is stored. For example, for a plurality of timings t1 to t4, a common target speed v21 at these timings t1 to t4 (that is, a count value indicating these timings) is stored in the corresponding area. For a plurality of timings t5 to t8, the common target speed v22 at these timings t5 to t8 is stored in the corresponding area. The target speed is stored in the same manner for other timings. Such a one-cycle table corresponds to a first area of the memory, and stores first control information (target speed v21 and the like) corresponding to a plurality of count values indicating the moving amount of the moving body.

エッジ間テーブルと1周期テーブルとを比較すると、エッジ間テーブルはエンコーダ信号における1/4周期毎に目標速度が記憶されているのに対し、1周期テーブルはエンコーダ信号における1周期毎に目標速度が記憶されている。このため、エッジ間テーブルに基づく制御では、1周期テーブルに基づく制御に比べて目標周期をきめ細かに設定することができる。従って、このエッジ間テーブルを、キャリッジ31を急に加速させたり、急に減速させたりする際に用いることで、適切な目標速度を与えることができる。その結果、キャリッジ31の急な加速や減速を円滑に行うことができる。一方、1周期テーブルに基づく制御では、複数のタイミング(複数のカウント値)に対応して共通の目標速度が記憶されている。このため、目標速度の記憶に必要な容量を抑えることができる。   Comparing the inter-edge table with the one-period table, the inter-edge table stores the target speed every quarter period of the encoder signal, whereas the one-period table shows the target speed every period of the encoder signal. It is remembered. For this reason, in the control based on the inter-edge table, the target period can be set more finely than in the control based on the one-period table. Therefore, an appropriate target speed can be given by using this inter-edge table when the carriage 31 is suddenly accelerated or decelerated suddenly. As a result, sudden acceleration and deceleration of the carriage 31 can be performed smoothly. On the other hand, in the control based on the one cycle table, a common target speed is stored corresponding to a plurality of timings (a plurality of count values). For this reason, the capacity required for storing the target speed can be reduced.

第1制御パターン情報74A、第2制御パターン情報74B、及び、第n制御パターン情報74Nを比較すると、何れの制御パターン情報も、2つのエッジ間テーブルの間に1つの1周期テーブルが配置されている。例えば、第1制御パターン情報74Aは、前側エッジ間テーブル74aと後側エッジ間テーブル74cの間に、1周期テーブル74bが配置されている。また、第2制御パターン情報74Bは、前側エッジ間テーブル74dと後側エッジ間テーブル74fの間に、1周期テーブル74eが配置されている。同様に、第n制御パターン情報74Nは、前側エッジ間テーブル74gと後側エッジ間テーブル74iの間に、1周期テーブル74hが配置されている。   Comparing the first control pattern information 74A, the second control pattern information 74B, and the nth control pattern information 74N, each control pattern information has one one-cycle table arranged between the two inter-edge tables. Yes. For example, in the first control pattern information 74A, a one-cycle table 74b is arranged between the front edge table 74a and the rear edge table 74c. In the second control pattern information 74B, a one-cycle table 74e is arranged between the front edge table 74d and the rear edge table 74f. Similarly, in the nth control pattern information 74N, a one-cycle table 74h is arranged between the front edge table 74g and the rear edge table 74i.

いずれの制御パターンにおいても、前側エッジ間テーブル74a,74d,74gは、キャリッジ31の加速度合いや減速度合いを次第に高める場合の制御を担当する。後側エッジ間テーブル74c,74f,74iは、キャリッジ31の加速度合いや減速度合いを次第に抑える場合の制御を担当する。また、は、キャリッジ31の加速度合いや減速度合いが安定している場合の制御を担当する。そして、各制御パターン74A,74B,…74Nは、各制御パターンにおける前側エッジ間テーブル及び後側エッジ間テーブルと、1周期テーブルとの比率が異なっている。   In any of the control patterns, the front edge table 74a, 74d, 74g is in charge of control when gradually increasing the degree of acceleration and the degree of deceleration of the carriage 31. The rear side inter-edge tables 74c, 74f, and 74i are in charge of control when the degree of acceleration and deceleration of the carriage 31 are gradually suppressed. Also, is responsible for control when the acceleration and deceleration of the carriage 31 are stable. The control patterns 74A, 74B,... 74N have different ratios between the front edge table and the rear edge table and the one cycle table in each control pattern.

簡単に説明すると、第1制御パターン情報74Aは、前側エッジ間テーブル74a及び後側エッジ間テーブル74cの比率が最も多い。言い換えれば、1周期テーブル74bの比率が最も少ない。このような第1制御パターン情報74Aは、前側エッジ間テーブル74a及び後側エッジ間テーブル74cの比率が最も多いため、キャリッジ31における加速度合いや減速度合いの変化が大きい場合の制御に適している。例えば、キャリッジ31を最も高い移動速度で移動させる高速モードにおいて、キャリッジ31を最高速度までできるだけ短時間で加速させ、かつ、キャリッジ31を最高速度からできるだけ短時間で停止させる場合の制御に適している。   Briefly, the first control pattern information 74A has the largest ratio between the front edge table 74a and the rear edge table 74c. In other words, the ratio of the one cycle table 74b is the smallest. Such first control pattern information 74A is suitable for control when the ratio of acceleration and deceleration in the carriage 31 is large because the ratio between the front edge table 74a and the rear edge table 74c is the largest. For example, in the high-speed mode in which the carriage 31 is moved at the highest moving speed, it is suitable for control in which the carriage 31 is accelerated to the maximum speed in the shortest possible time, and the carriage 31 is stopped from the maximum speed in the shortest possible time. .

一方、第n制御パターン情報74Nは、前側エッジ間テーブル74g及び後側エッジ間テーブル74iの比率が最も少ない。言い換えれば、1周期テーブル74hの比率が最も多い。このような第n制御パターン情報74Nは、前側エッジ間テーブル74a及び後側エッジ間テーブル74cの比率が最も少ないため、キャリッジ31における加速度合いや減速度合いの変化が小さい場合の制御に適している。言い換えれば、加速度合いや減速度合いを一定にしてキャリッジ31を移動させる場合の制御に適している。例えば、キャリッジ31を最も低い移動速度で移動させる低速モードにおいて、キャリッジ31を加速させたり、停止させたりする場合の制御に適している。   On the other hand, the nth control pattern information 74N has the smallest ratio of the front edge table 74g and the rear edge table 74i. In other words, the ratio of the one cycle table 74h is the largest. Such n-th control pattern information 74N is suitable for control when the change in the degree of acceleration and deceleration in the carriage 31 is small because the ratio between the front edge table 74a and the rear edge table 74c is the smallest. In other words, it is suitable for control when moving the carriage 31 with a constant degree of acceleration and deceleration. For example, it is suitable for control when the carriage 31 is accelerated or stopped in the low speed mode in which the carriage 31 is moved at the lowest moving speed.

このように、キャリッジ31について、急な加速や減速が必要な期間においてエッジ間テーブルに基づく制御を行い、加速や減速の度合いが一定あるいは緩やかな期間において1周期テーブルに基づく制御を行うことで、必要な周期で制御が行えるとともに、必要なメモリの量を抑制することができる。   As described above, the carriage 31 is controlled based on the inter-edge table during a period in which sudden acceleration or deceleration is necessary, and is controlled based on the one-period table in a period where the degree of acceleration or deceleration is constant or moderate. Control can be performed at a necessary cycle, and the amount of necessary memory can be suppressed.

===モータの駆動制御===
次に、モータの駆動制御について説明する。この駆動制御は、コントローラ部20のメモリ23やDCユニット25のメモリ62に記憶されたコンピュータプログラムに基づいて、DCユニット25のCPU61等によってなされる。このため、これらのプログラムは、対応する制御を実現するためのコードを有している。例示したプリンタ10は、制御対象のモータとしてキャリッジモータ44と搬送モータ48とを有している。そして、キャリッジモータ44の駆動制御と搬送モータ48の駆動制御とは、対象は異なるが同じ内容である。このため、本明細書では、キャリッジモータ44の駆動制御について説明をし、搬送モータ48の駆動制御については説明を省略する。
=== Motor drive control ===
Next, motor drive control will be described. This drive control is performed by the CPU 61 of the DC unit 25 and the like based on computer programs stored in the memory 23 of the controller unit 20 and the memory 62 of the DC unit 25. For this reason, these programs have codes for realizing the corresponding control. The illustrated printer 10 includes a carriage motor 44 and a conveyance motor 48 as motors to be controlled. The drive control of the carriage motor 44 and the drive control of the transport motor 48 have the same contents although they are different. Therefore, in this specification, the drive control of the carriage motor 44 will be described, and the description of the drive control of the transport motor 48 will be omitted.

また、モータの駆動制御に関しては、目標速度テーブル74に記憶された目標速度を読み出して駆動制御を行う加速時や減速時の制御に特徴を有する。このため、特徴的な制御である加速時について説明をする。さらに、使用する制御パターン情報は、第1制御パターン情報74Aとする。図6に示すように、この第1制御パターン情報74Aは、前側エッジ間テーブル74aが12テーブル(12カウント分)、1周期テーブル74bが3テーブル(12カウント分)、後側エッジ間テーブル74cが12テーブル(12カウント分)用意されている。   The motor drive control is characterized by acceleration and deceleration control in which the target speed stored in the target speed table 74 is read to perform drive control. For this reason, the acceleration time, which is characteristic control, will be described. Furthermore, control pattern information to be used is first control pattern information 74A. As shown in FIG. 6, the first control pattern information 74A includes 12 tables (12 counts) for the front edge table 74a, 3 tables (12 counts) for the one period table 74b, and 74c for the rear edge table. 12 tables (12 counts) are prepared.

キャリッジモータの駆動処理(メイン処理)は、リニアエンコーダ34からのエンコーダ信号ENC_Cで規定されるタイミングで行われる。すなわち、エッジで定められるタイミングで行われる。図9Aのフローチャートに示すように、メイン処理では、まず目標速度読出処理が行われる(S1)。この目標速度読出処理は、目標速度テーブル74から、位置カウンタ71aのカウント値に対応する目標速度を読み出す処理である。なお、このプリンタ10では、読み出した目標速度と現在速度との偏差も算出している。   The carriage motor drive process (main process) is performed at a timing defined by the encoder signal ENC_C from the linear encoder 34. That is, it is performed at the timing determined by the edge. As shown in the flowchart of FIG. 9A, in the main process, first, a target speed reading process is performed (S1). This target speed reading process is a process of reading the target speed corresponding to the count value of the position counter 71a from the target speed table 74. The printer 10 also calculates a deviation between the read target speed and the current speed.

図9Bに示すように、この目標速度読出処理では、まず位置カウンタ71aのカウント値が取得される(S11)。すなわち、CPU61(位置演算部71)は、位置カウンタ71aを参照し、その時点におけるカウント値を取得する。前述したように、位置カウンタ71aは、エンコーダ信号ENC_Cのエッジを検出する毎にカウント値を変化させる。このため、位置カウンタ71aのカウント値は、キャリッジ31(ヘッドHD)の現在位置を示す情報となる。カウント値を取得したならば、CPU61は、起動位置(移動開始点)と現在位置の差分を算出する(S12)。すなわち、起動位置からの移動距離を算出する。このプリンタ10では、カウント値を位置の情報として用いるため、その時点でのカウント値から起動位置におけるカウント値を減算した値が算出される。   As shown in FIG. 9B, in this target speed reading process, first, the count value of the position counter 71a is acquired (S11). That is, the CPU 61 (position calculation unit 71) refers to the position counter 71a and acquires the count value at that time. As described above, the position counter 71a changes the count value every time the edge of the encoder signal ENC_C is detected. For this reason, the count value of the position counter 71a is information indicating the current position of the carriage 31 (head HD). If the count value is acquired, the CPU 61 calculates the difference between the activation position (movement start point) and the current position (S12). That is, the movement distance from the activation position is calculated. Since the printer 10 uses the count value as position information, a value obtained by subtracting the count value at the starting position from the count value at that time is calculated.

差分を算出したならば、CPU61は、参照すべき目標速度テーブルを選択する(S13)。この処理では、カウント値の差分に基づき、前側エッジ間テーブル74a、1周期テーブル74b、後側エッジ間テーブル74cの何れかが選択される。この選択は、各テーブルに付属情報として設定された切替位置の情報に基づいて行われる。図6及び図10に示すように、この例では、前側エッジ間テーブル74aがカウント値[0]から[11]に対応し、1周期テーブル74bがカウント値[12]から[23]に対応し、後側エッジ間テーブル74cがカウント値[24]から[35]に対応している。このため、切替位置の情報としては、1周期テーブル74bの先頭カウント値[12]、及び、後側エッジ間テーブル74cの先頭カウント値[24]が設定されている。CPU61は、カウント値の差分と切替位置の情報に基づいて、参照すべき目標速度テーブルを選択する。すなわち、差分が値[0]から値[11]の範囲内であった場合には前側エッジ間テーブル74aが選択され、差分が値[12]から値[23]の範囲内であった場合には1周期テーブル74bが選択される。また、差分が値[24]から値[35]の範囲内であった場合には後側エッジ間テーブル74cが選択される。そして、CPU61は、選択した目標速度テーブルの格納タイプを参照する(S14)。ここで、格納タイプとは、目標速度がエンコーダ信号ENC_Cのエッジ毎に記憶(格納)されているのか、1周期毎に記憶されているのかの種別である。この格納タイプを示す情報は、切替位置の情報と同様に、各テーブル74a,74b,74cに付属情報として設定されている。   If the difference is calculated, the CPU 61 selects a target speed table to be referred to (S13). In this process, one of the front edge table 74a, the one-cycle table 74b, and the rear edge table 74c is selected based on the difference in the count values. This selection is performed based on the information on the switching position set as attached information in each table. As shown in FIGS. 6 and 10, in this example, the front edge table 74a corresponds to the count values [0] to [11], and the one cycle table 74b corresponds to the count values [12] to [23]. The rear edge table 74c corresponds to the count values [24] to [35]. Therefore, as the switching position information, the head count value [12] of the one cycle table 74b and the head count value [24] of the rear edge table 74c are set. CPU61 selects the target speed table which should be referred based on the difference of count value, and the information of a switching position. That is, when the difference is within the range of value [0] to value [11], the front edge table 74a is selected, and when the difference is within the range of value [12] to value [23]. The one cycle table 74b is selected. If the difference is within the range of value [24] to value [35], the rear edge table 74c is selected. Then, the CPU 61 refers to the storage type of the selected target speed table (S14). Here, the storage type is a type indicating whether the target speed is stored (stored) for each edge of the encoder signal ENC_C or stored for each cycle. The information indicating the storage type is set as attached information in each of the tables 74a, 74b, and 74c, similarly to the switching position information.

格納タイプを参照したならば、CPU61は、格納タイプに基づく判断をする(S15)。そして、格納タイプが「エッジ毎」であった場合にはステップS16に移行し、格納タイプが「周期毎」であった場合にはステップS19に移行する。格納タイプが「エッジ毎」であった場合、CPU61は、位置カウンタ71aのカウント値でテーブルを参照する旨の設定をする(S16)。そして、CPU61は、エッジ毎の目標周期を設定する(S17)。つまり、隣接するエッジ同士の間隔を目標周期に設定する。これらの設定をしたならば、CPU61は、目標速度テーブル74から対応する目標速度を取得する(S18)。図10の例で説明すると、カウント値が値[0]であった場合、このカウント値[0]に対応する前側エッジ間テーブル74aが参照され、目標速度Ta0が取得される。また、カウント値が値[10]であった場合、対応する前側エッジ間テーブル74aから目標速度Ta10が取得される。同様に、カウント値が値[24]であった場合、対応する後側エッジ間テーブル74cから目標速度Ta12が取得される。   If the storage type is referred to, the CPU 61 makes a determination based on the storage type (S15). If the storage type is “every edge”, the process proceeds to step S16, and if the storage type is “every period”, the process proceeds to step S19. When the storage type is “for each edge”, the CPU 61 sets to refer to the table with the count value of the position counter 71a (S16). Then, the CPU 61 sets a target cycle for each edge (S17). That is, the interval between adjacent edges is set as the target period. If these settings are made, the CPU 61 acquires the corresponding target speed from the target speed table 74 (S18). Referring to the example of FIG. 10, when the count value is the value [0], the front edge table 74a corresponding to the count value [0] is referred to, and the target speed Ta0 is acquired. When the count value is the value [10], the target speed Ta10 is acquired from the corresponding front edge table 74a. Similarly, when the count value is the value [24], the target speed Ta12 is acquired from the corresponding rear edge table 74c.

一方、格納タイプが「周期毎」であった場合、CPU61は、位置カウンタ71aのカウント値を1/4した値でテーブルを参照する旨の設定をする(S19)。そして、CPU61は、周期毎の目標周期を設定する(S20)。つまり、第1エンコーダ信号ENC_CAの1周期の間隔を目標周期に設定する。これらの設定をしたならば、CPU61は、目標速度テーブル74から対応する目標速度を取得する(S21)。例えば、カウント値が値[14]であった場合、CPU61は、値[14]から値[12]を減算して、1周期テーブル74bに対応するカウント範囲(値[12]から値[23])における何番目のカウント値であるかを求める。この場合、減算して得られた値が値[2]であるため、カウント範囲における2番目のカウント値となる。そして、この値を1周期に含まれるエッジの数で除算する。この例では1周期に4つのエッジが含まれているので値[4]で除算する。その結果、値[0](=2/4)が得られる。CPU61は、この値[0]に対応する1周期テーブルを参照し、目標速度Tb0を取得する。また、カウント値が値[18]であった場合、CPU61は、値[18]から値[12]を減算し、カウント範囲における6番目のカウント値であることを示す値[6]を取得する。そして、この値[6]を値[4]で除算し、値[1]を得る。得られた値[1]に基づいて、対応する1周期テーブルを参照し、目標速度Tb1を取得する。   On the other hand, when the storage type is “every period”, the CPU 61 sets to refer to the table with a value obtained by ¼ of the count value of the position counter 71a (S19). And CPU61 sets the target period for every period (S20). That is, the interval of one cycle of the first encoder signal ENC_CA is set as the target cycle. If these settings are made, the CPU 61 acquires the corresponding target speed from the target speed table 74 (S21). For example, when the count value is the value [14], the CPU 61 subtracts the value [12] from the value [14], and the count range (value [12] to value [23] corresponding to the one cycle table 74b). ) To obtain the count value. In this case, since the value obtained by subtraction is the value [2], it becomes the second count value in the count range. Then, this value is divided by the number of edges included in one cycle. In this example, since four edges are included in one cycle, the value is divided by [4]. As a result, the value [0] (= 2/4) is obtained. The CPU 61 refers to the one cycle table corresponding to this value [0] and obtains the target speed Tb0. When the count value is the value [18], the CPU 61 subtracts the value [12] from the value [18] to obtain the value [6] indicating the sixth count value in the count range. . Then, the value [6] is divided by the value [4] to obtain the value [1]. Based on the obtained value [1], the corresponding one-cycle table is referenced to obtain the target speed Tb1.

以上の手順で、エッジ毎の目標速度(S18)、或いは、周期毎の目標速度(S21)を取得したならば、CPU61(第2減算器76)は、目標速度と現在速度の偏差を求める(S22)。この偏差は、以降の処理で用いられる。目標速度と現在速度の偏差を求めたならば、CPU61は、一連の目標速度読出処理を終了する。   If the target speed (S18) for each edge or the target speed (S21) for each cycle is acquired by the above procedure, the CPU 61 (second subtractor 76) obtains the deviation between the target speed and the current speed ( S22). This deviation is used in subsequent processing. If the deviation between the target speed and the current speed is obtained, the CPU 61 ends the series of target speed reading processing.

目標速度読出処理(S1)が終了したならば、PID計算処理が行われる(S2)。このPID計算処理では、CPU61(比例要素77P,積分要素77I,微分要素77D,加算器78)は、速度偏差に定数(Gp)、定数(Gi)、定数(Gd)を乗算等し、演算結果を加算する。この加算結果は、デューティ値を示す信号としてPWM回路63aへ入力される。   When the target speed reading process (S1) is completed, a PID calculation process is performed (S2). In this PID calculation process, the CPU 61 (proportional element 77P, integral element 77I, differential element 77D, adder 78) multiplies the speed deviation by a constant (Gp), constant (Gi), constant (Gd), etc. Is added. This addition result is input to the PWM circuit 63a as a signal indicating the duty value.

次に、PWM出力処理(S3)が行われる。このPWM出力処理において、PWM回路63aは、加算結果(デューティ値)に応じた指令信号を生成して出力する。生成された指令信号は、キャリッジモータドライバ33に入力される。キャリッジモータドライバ33は、指令信号の電流量に応じてキャリッジモータ44を駆動する。その結果、キャリッジ31の現在の速度と、目標速度との偏差に応じた制御量でキャリッジモータ44が駆動される。   Next, PWM output processing (S3) is performed. In this PWM output process, the PWM circuit 63a generates and outputs a command signal corresponding to the addition result (duty value). The generated command signal is input to the carriage motor driver 33. The carriage motor driver 33 drives the carriage motor 44 according to the current amount of the command signal. As a result, the carriage motor 44 is driven with a control amount corresponding to the deviation between the current speed of the carriage 31 and the target speed.

そして、以上説明した一連の処理がエンコーダ信号ENC_Cで規定されるタイミングで行われることにより、例えば、図11に示すように、加速期間における前側部分、及び、後側部分では、エンコーダ信号ENC_Cのエッジ毎に定められる目標速度に基づいて、キャリッジモータ44の制御が行われる。また、加速期間における中間部分では、エンコーダ信号ENC_Cの周期毎に定められる目標速度に基づいて、キャリッジモータ44の制御が行われる。これにより、その部分に適した周期でキャリッジモータ44の駆動制御を行うことができる。また、目標速度を記憶するための領域を必要な容量に定めることができる。   The series of processes described above are performed at the timing specified by the encoder signal ENC_C. For example, as shown in FIG. 11, at the front and rear portions in the acceleration period, the edge of the encoder signal ENC_C The carriage motor 44 is controlled based on the target speed determined for each. Further, in the intermediate portion in the acceleration period, the carriage motor 44 is controlled based on the target speed determined for each cycle of the encoder signal ENC_C. Thereby, drive control of the carriage motor 44 can be performed at a cycle suitable for the portion. In addition, an area for storing the target speed can be set to a necessary capacity.

===まとめ===
以上説明したように、このプリンタ10では、メモリ62の不揮発性領域に設けられる目標速度テーブル74に、1周期テーブル(第1領域)と前側エッジ間テーブル及び後側エッジ間テーブル(第2領域)とを設けている。そして、1周期テーブルには、位置カウンタ71aの複数のカウント値に対応した目標速度(第1制御情報)を記憶させ、前側エッジ間テーブル及び後側エッジ間テーブルには、位置カウンタ71aのカウント値のそれぞれに対応した目標速度(第2制御情報)を記憶させている。そして、DCユニット25(駆動制御部)は、前側エッジ間テーブル、1周期テーブル、及び、後側エッジ間テーブルの何れかを選択し、選択された領域から、位置カウンタ71aのカウント値に応じた目標速度を読み出し、キャリッジモータ44の駆動制御を行う。
=== Summary ===
As described above, in the printer 10, the target speed table 74 provided in the non-volatile area of the memory 62 includes the one cycle table (first area), the front edge table, and the rear edge table (second area). And are provided. Then, the target speed (first control information) corresponding to the plurality of count values of the position counter 71a is stored in the one cycle table, and the count value of the position counter 71a is stored in the front edge table and the rear edge table. The target speed (second control information) corresponding to each of these is stored. Then, the DC unit 25 (drive control unit) selects any one of the front edge table, the one period table, and the rear edge table, and according to the count value of the position counter 71a from the selected area. The target speed is read and drive control of the carriage motor 44 is performed.

この構成により、キャリッジ31やヘッドHD(移動体)における加速度合いや減速度合いを短時間で急に変化させる場合には、前側エッジ間テーブルや後側エッジ間テーブルから目標速度を読み出してキャリッジモータ44の制御を行うことで、駆動制御を細かな間隔(エンコーダ信号ENC_Cのエッジ毎の間隔)で行うことができる。一方、キャリッジ31やヘッドHDにおける加速度合いや減速度合いが一定あるいは緩やかな変化の場合には、1周期テーブルから目標速度を読み出してキャリッジモータ44の制御を行うことで、駆動制御を適度な間隔(エンコーダ信号ENC_Cの1周期毎の間隔)で行うことができる。その結果、メモリ62の容量が過度に多くなってしまう不具合を防止でき、また制御の適正化が図れる。   With this configuration, when the acceleration degree and the deceleration degree in the carriage 31 and the head HD (moving body) are suddenly changed in a short time, the target speed is read from the front edge table or the rear edge table and the carriage motor 44 is read. By performing this control, drive control can be performed at fine intervals (interval for each edge of the encoder signal ENC_C). On the other hand, when the degree of acceleration and deceleration in the carriage 31 and the head HD are constant or gradual changes, the target speed is read from the one-period table and the carriage motor 44 is controlled to control the drive control at an appropriate interval ( This can be performed at intervals of one cycle of the encoder signal ENC_C). As a result, the problem that the capacity of the memory 62 increases excessively can be prevented, and control can be optimized.

また、このプリンタ10は、キャリッジ31が所定量移動する毎に、その電圧レベルをHレベルとLレベルの一方から他方へと変化させるエンコーダ信号ENC_Cを生成するリニアエンコーダ34を有している。また、用紙Sが所定量搬送される毎にその電圧レベルをHレベルとLレベルの一方から他方へと変化させるエンコーダ信号ENC_Pを生成するロータリエンコーダ37も有している。そして、各位置カウンタ71a,81aは、これらのエンコーダ信号ENC_C,ENC_Pのエッジの数(電圧変化の回数)を、キャリッジ31の移動量や用紙Sの搬送量としてカウントしている。この構成により、キャリッジ31の移動量や用紙Sの搬送量を容易に認識することができる。   The printer 10 also includes a linear encoder 34 that generates an encoder signal ENC_C that changes the voltage level from one of the H level and the L level each time the carriage 31 moves by a predetermined amount. The rotary encoder 37 also generates an encoder signal ENC_P that changes the voltage level from one of the H level and the L level each time the sheet S is conveyed by a predetermined amount. The position counters 71a and 81a count the number of edges (the number of voltage changes) of these encoder signals ENC_C and ENC_P as the movement amount of the carriage 31 and the conveyance amount of the paper S. With this configuration, the movement amount of the carriage 31 and the conveyance amount of the paper S can be easily recognized.

また、DCユニット25(駆動制御部)では、位置カウンタ71aのカウント値を除算して得られた値を用いて、位置カウンタ71aの複数のカウント値に対応した目標速度(第1制御情報)を読み出している。また、位置カウンタ71aのカウント値を用いて、カウント値のそれぞれに対応した目標速度(第2制御情報)を読み出している。この構成により、共通のカウント値を用いて、種類の異なる目標速度(第1制御情報と第2制御情報)を読み出すことができる。   Further, the DC unit 25 (drive control unit) uses the value obtained by dividing the count value of the position counter 71a to obtain target speeds (first control information) corresponding to a plurality of count values of the position counter 71a. Reading out. Further, the target speed (second control information) corresponding to each count value is read using the count value of the position counter 71a. With this configuration, different types of target speeds (first control information and second control information) can be read using a common count value.

そして、DCユニット25(駆動制御部)は、キャリッジ31の加速状態(加速の変化度合い)に応じて、前側エッジ間テーブル、1周期テーブル、及び、後側エッジ間テーブルの何れかを選択している。この構成により、キャリッジ31の加速状態に適した制御ができる。   Then, the DC unit 25 (drive control unit) selects any one of the front edge table, the one-period table, and the rear edge table according to the acceleration state (acceleration change degree) of the carriage 31. Yes. With this configuration, control suitable for the acceleration state of the carriage 31 can be performed.

また、メモリ62に設けられる目標速度テーブル74は、各制御パターン情報(第1制御パターン情報74A,第2制御パターン情報74B,…,第n制御パターン情報74N)を、キャリッジ31の移動速度や用紙Sの搬送速度に応じて定められる複数の制御モードのそれぞれに対応させて記憶している。この構成により、キャリッジ31等の移動速度に適したパターンで制御が行える。なお、制御パターン情報に関し、前側エッジ間テーブルや後側エッジ間テーブルのように、位置カウンタ71aのカウント値毎に目標速度を与える形式のテーブルだけで構成しても良く、1周期テーブルのように、位置カウンタ71aの複数のカウント値に対応させて目標速度を与える形式のテーブルだけで構成してもよい。   The target speed table 74 provided in the memory 62 stores each control pattern information (first control pattern information 74A, second control pattern information 74B,..., Nth control pattern information 74N), the moving speed of the carriage 31 and the paper. The data is stored in correspondence with each of a plurality of control modes determined according to the transport speed of S. With this configuration, control can be performed with a pattern suitable for the moving speed of the carriage 31 and the like. It should be noted that the control pattern information may be composed of only a table that gives a target speed for each count value of the position counter 71a, such as a front edge table or a rear edge table, as in a one-cycle table. Alternatively, the table may be composed of only a table in which a target speed is given in correspondence with a plurality of count values of the position counter 71a.

===第2実施形態===
前述した第1実施形態において、目標速度テーブル74には、駆動制御のタイミング毎に与えられる目標速度が、キャリッジの移動距離(エンコーダ信号ENC_C,ENC_Pのエッジのカウント数)と関係付けられた状態で記憶されていた。これらの目標速度と移動距離の情報を用いることで、或る制御タイミングから次の制御タイミングまでの経過時間を事前に知ることができる。ひいては、用紙Sにおける1単位の搬送開始から終了までの経過時間(便宜上、用紙Sの搬送時間ともいう。)を事前に知ることができる。
=== Second Embodiment ===
In the first embodiment described above, the target speed table 74 indicates that the target speed given at each drive control timing is related to the movement distance of the carriage (the count number of the edges of the encoder signals ENC_C and ENC_P). It was remembered. By using the information on the target speed and the moving distance, the elapsed time from a certain control timing to the next control timing can be known in advance. As a result, it is possible to know in advance the elapsed time from the start to the end of the conveyance of one unit of the sheet S (also referred to as the conveyance time of the sheet S for convenience).

また、インクの吐出開始位置までのキャリッジ31(ヘッドHD)の移動距離は、ヘッドHDに入力されるドット形成データに基づいて取得できる。ここで、ドット形成データとは、吐出されるインクの量を単位領域(ドットが形成され得る場所として仮想的に定められた空間)毎に示すものである。そうすると、キャリッジ31の移動開始からヘッドHDがインクの吐出を開始するまでの経過時間(便宜上、吐出開始までの時間ともいう。)も事前に知ることができる。   Further, the moving distance of the carriage 31 (head HD) to the ink ejection start position can be acquired based on the dot formation data input to the head HD. Here, the dot formation data indicates the amount of ejected ink for each unit region (a space virtually defined as a place where dots can be formed). Then, the elapsed time from the start of the movement of the carriage 31 until the head HD starts ejecting ink (also referred to as the time until the start of ejection for convenience) can be known in advance.

このように、用紙Sの搬送時間と吐出開始までの時間とを事前に知ることができるため、用紙Sの搬送終了時点から吐出開始までの時間だけ遡ったタイミングで、キャリッジ31の移動を開始させると、用紙Sの搬送終了時点とインクの吐出開始時点とを揃えることができる。これにより、或る期間において、用紙Sの搬送動作とキャリッジ31の移動動作とが重畳的になされることとなり、印刷動作を高速化できる。以下、このように構成した第2実施形態について説明する。なお、第2実施形態において、ハードウェアの構成は前述した第1実施形態と同じである。このため、説明は省略する。   As described above, since the conveyance time of the sheet S and the time until the start of ejection can be known in advance, the movement of the carriage 31 is started at a timing that is traced back from the end of conveyance of the sheet S to the start of ejection. And the time when the conveyance of the paper S is completed and the time when the ink discharge is started can be made uniform. Thereby, the transport operation of the paper S and the movement operation of the carriage 31 are performed in a superposed manner in a certain period, and the printing operation can be speeded up. Hereinafter, the second embodiment configured as above will be described. In the second embodiment, the hardware configuration is the same as that of the first embodiment described above. Therefore, the description is omitted.

また、この実施形態において、キャリッジモータ44は、ヘッドHDをヘッド移動方向(所定の移動方向)に移動させるための第1モータに相当する。位置演算部71が有する位置カウンタ71aは、ヘッドHDの移動量をカウントする第1カウンタに相当する。同様に、搬送モータ48は、用紙Sをヘッド移動方向とは交差する搬送方向へ搬送させるための第2モータに相当する。位置演算部81が有する位置カウンタ81aは、用紙Sの搬送量(移動量)をカウントする第2カウンタに相当する。   In this embodiment, the carriage motor 44 corresponds to a first motor for moving the head HD in the head movement direction (predetermined movement direction). The position counter 71a included in the position calculation unit 71 corresponds to a first counter that counts the amount of movement of the head HD. Similarly, the transport motor 48 corresponds to a second motor for transporting the paper S in a transport direction that intersects the head movement direction. The position counter 81 a included in the position calculation unit 81 corresponds to a second counter that counts the transport amount (movement amount) of the paper S.

加えて、メモリ62に設けられる目標速度テーブル74は、位置カウンタ71aのカウント値に対応するキャリッジモータ44の目標速度を記憶したメモリである。同様に、メモリ62に設けられる目標速度テーブル84は、位置カウンタ81aのカウント値に対応する搬送モータ48の目標速度を記憶したメモリである。この目標テーブル74には、前側エッジ間テーブル74a…、1周期テーブル74b…、及び、後側エッジ間テーブル74c…が設けられる。また、目標速度テーブル84についても同様に、前側エッジ間テーブル、1周期テーブル、及び、後側エッジ間テーブルが設けられる。   In addition, the target speed table 74 provided in the memory 62 is a memory that stores the target speed of the carriage motor 44 corresponding to the count value of the position counter 71a. Similarly, the target speed table 84 provided in the memory 62 is a memory that stores the target speed of the transport motor 48 corresponding to the count value of the position counter 81a. The target table 74 is provided with a front edge table 74a, a one-cycle table 74b, and a rear edge table 74c. Similarly, the target speed table 84 is provided with a front edge table, a period table, and a rear edge table.

これらのテーブルの中で、1周期テーブルは、位置カウンタ71a(第1カウンタ)及び位置カウンタ81a(第2カウンタ)の複数のカウント値に対応したヘッドHDや用紙S(移動体)の目標速度を、第1制御情報として記憶する第1領域に相当する。また、前側エッジ間テーブルと後側エッジ間テーブルは、位置カウンタ71a及び位置カウンタ81aのカウント値のそれぞれに対応したヘッドHDや用紙Sの目標速度を、第2制御情報として記憶する第2領域に相当する。   Among these tables, the one-cycle table indicates target speeds of the head HD and the paper S (moving body) corresponding to a plurality of count values of the position counter 71a (first counter) and the position counter 81a (second counter). This corresponds to the first area stored as the first control information. The front edge table and the rear edge table are stored in the second area for storing the target speeds of the head HD and the paper S corresponding to the count values of the position counter 71a and the position counter 81a as second control information. Equivalent to.

そして、駆動制御部としてのDCユニット25(CPU61,メモリ62)は、用紙Sの搬送終了時における位置カウンタ81aのカウント値、及び、目標速度テーブル84に記憶された用紙S用の目標速度に基づき、搬送モータ48に対する駆動制御の終了タイミングを求め、求められた終了タイミング、インク吐出開始位置までのヘッドHDの移動量に対応する位置カウンタ71aのカウント値、及び、目標テーブル74に記憶されたヘッドHD用の目標速度に基づき、キャリッジモータ44に対する駆動制御の開始タイミングを求め、求められた開始タイミングにて、キャリッジモータ44に対する駆動制御を開始する。   Then, the DC unit 25 (CPU 61, memory 62) as the drive control unit is based on the count value of the position counter 81a at the end of conveyance of the sheet S and the target speed for the sheet S stored in the target speed table 84. The end timing of the drive control for the transport motor 48 is obtained, the obtained end timing, the count value of the position counter 71a corresponding to the amount of movement of the head HD to the ink discharge start position, and the head stored in the target table 74 The drive control start timing for the carriage motor 44 is obtained based on the HD target speed, and the drive control for the carriage motor 44 is started at the obtained start timing.

<処理の具体例について>
以上の処理を図12に基づいて具体的に説明する。まず、DCユニット25(駆動制御部)では、用紙Sに対する1単位の搬送時間WP、すなわち、あるパスから次のパスへ移行する際における用紙Sの搬送に要する時間を求める。この搬送時間WPは、例えば、定数としてメモリ62に記憶されているものが用いられる。すなわち、搬送期間WPは主に搬送量に基づいて定まり、他の要因による変動の影響は少ないからである。そして、この搬送時間WPが得られると、DCユニット25は、搬送モータ48の駆動開始タイミングt1に対応する駆動終了タイミングt2(用紙Sの搬送終了タイミング)を認識することができる。
<Specific examples of processing>
The above process will be specifically described with reference to FIG. First, the DC unit 25 (drive control unit) obtains one unit of transport time WP for the paper S, that is, the time required for transport of the paper S when shifting from one pass to the next. For example, the conveyance time WP is stored in the memory 62 as a constant. That is, the transport period WP is determined mainly based on the transport amount, and is less affected by fluctuations due to other factors. When the transport time WP is obtained, the DC unit 25 can recognize the drive end timing t2 (paper S transport end timing) corresponding to the drive start timing t1 of the transport motor 48.

次に、DCユニット25は、インクの吐出を開始するヘッドHDの位置P1(キャリッジ移動方向の位置)を取得する。この取得は、例えば、コントローラ部20のCPU21からの情報に基づいて行われる。この情報としては、例えば、ドット形成データに基づくドットの形成位置の情報が用いられる。そして、キャリッジ31(ヘッドHD)の停止位置は、位置カウンタ71aのカウント値より認識できるので、インク吐出開始位置P1を取得することにより、キャリッジ31の停止位置からインクの吐出開始位置P1までの移動距離Xが認識できる。   Next, the DC unit 25 acquires the position P1 (position in the carriage movement direction) of the head HD from which ink ejection is started. This acquisition is performed based on information from the CPU 21 of the controller unit 20, for example. As this information, for example, information on the dot formation position based on the dot formation data is used. Since the stop position of the carriage 31 (head HD) can be recognized from the count value of the position counter 71a, the movement from the stop position of the carriage 31 to the ink discharge start position P1 is obtained by obtaining the ink discharge start position P1. The distance X can be recognized.

キャリッジ31の移動距離Xを認識したならば、DCユニット25は、この移動距離Xを移動するために必要な移動時間WC1を取得する。この移動時間WC1は、目標速度テーブル74に記憶された目標速度と、エンコーダ信号ENC_Pのエッジ同士で規定されるキャリッジの単位移動量に基づいて求めることができる。便宜上、吐出開始位置P1に対応する位置カウンタ71aのカウント値は値[30]であるとする。なお、カウント値は吐出開始位置P1と互いに関連しているので、DCユニット25は、吐出開始位置P1の情報からカウント値を取得できる。   If the movement distance X of the carriage 31 is recognized, the DC unit 25 acquires the movement time WC1 necessary for moving the movement distance X. The movement time WC1 can be obtained based on the target speed stored in the target speed table 74 and the unit movement amount of the carriage defined by the edges of the encoder signal ENC_P. For convenience, it is assumed that the count value of the position counter 71a corresponding to the ejection start position P1 is the value [30]. Since the count value is related to the discharge start position P1, the DC unit 25 can acquire the count value from the information of the discharge start position P1.

DCユニット25は、カウント値[30]に基づいて目標速度テーブル74を参照し、対象となる範囲のテーブルを特定する。例えば、第1制御パターン情報74Aを用いる場合、図10に示すように、対象となるテーブルとして、前側エッジ間テーブル74aと、1周期テーブル74bと、後側エッジ間テーブル74bの7番目のテーブルまでとが特定される。そして、特定された個々のテーブルについて、目標速度毎に所要時間が計算される。   The DC unit 25 refers to the target speed table 74 based on the count value [30], and specifies a table in the target range. For example, when the first control pattern information 74A is used, as shown in FIG. 10, up to the seventh table of the front edge table 74a, the one-period table 74b, and the rear edge table 74b as target tables. Are identified. For each identified table, the required time is calculated for each target speed.

例えば、前側エッジ間テーブル74aの1番目のテーブルには、目標速度Ta0が記憶されている。この目標速度Ta0は、キャリッジ31を1/180インチの1/4(つまり、1/720インチ)だけ移動させる際の、キャリッジ31の移動速度と考えることができる。このため、この移動距離(1/720インチ)を目標速度Ta0で除算することで、目標速度Ta0に対応する所要時間が計算できる。そして、前側エッジ間テーブル74aや後側エッジ間テーブル74cに属する他のテーブルについても同様の計算により、各目標速度Ta1〜Ta18に対応する所要時間が計算できる。   For example, the target speed Ta0 is stored in the first table of the front edge table 74a. This target speed Ta0 can be considered as the moving speed of the carriage 31 when the carriage 31 is moved by 1/4 of 1/180 inch (that is, 1/720 inch). Therefore, the required time corresponding to the target speed Ta0 can be calculated by dividing the moving distance (1/720 inch) by the target speed Ta0. The required time corresponding to each target speed Ta1 to Ta18 can be calculated by the same calculation for the other tables belonging to the front edge table 74a and the rear edge table 74c.

また、1周期テーブル74bの1番目のテーブルには、目標速度Tb0が記憶されている。この目標速度Tb0は、キャリッジ31を1/180インチだけ移動させる際の、キャリッジ31の移動速度と考えることができる。このため、この移動距離(1/180インチ)を目標速度Tb0で除算することで、目標速度Tb0に対応する所要時間が計算できる。なお、1周期テーブル74bに属する他のテーブルについても同様の計算により、各目標速度Tb1,Tb2に対応する所要時間が計算できる。   In addition, the target speed Tb0 is stored in the first table of the one cycle table 74b. This target speed Tb0 can be considered as the moving speed of the carriage 31 when the carriage 31 is moved by 1/180 inch. Therefore, the required time corresponding to the target speed Tb0 can be calculated by dividing the moving distance (1/180 inch) by the target speed Tb0. It should be noted that the required time corresponding to each target speed Tb1, Tb2 can be calculated for other tables belonging to one cycle table 74b by the same calculation.

各目標速度Ta0〜Ta18,Tb0〜Tb2に対応する所要時間が得られたならば、DCユニット25は、全ての所要時間を加算する。これにより、図12に示す移動時間WC1が得られる。   If the required times corresponding to the target speeds Ta0 to Ta18 and Tb0 to Tb2 are obtained, the DC unit 25 adds all the required times. Thereby, the movement time WC1 shown in FIG. 12 is obtained.

移動時間WC1が得られたならば、DCユニット25は、タイミングt2から移動時間WC1だけ遡ったタイミングt3を特定し、このタイミングt3をキャリッジ31の駆動開始タイミングに定める。   If the movement time WC1 is obtained, the DC unit 25 specifies a timing t3 that is back by the movement time WC1 from the timing t2, and sets this timing t3 as the drive start timing of the carriage 31.

そして、DCユニット25は、搬送モータ48の駆動をタイミングt1で開始した後、タイミングt3の到来を監視する。そして、タイミングt3が到来したことを条件に、搬送モータ48の駆動中にキャリッジモータ44の駆動を開始する。これにより、用紙Sの搬送終了タイミングとヘッドHDからのインクの吐出タイミングが、ともにタイミングt2で揃う。その結果、印刷の高速化が図れる。そして、このプリンタ10では、目標速度テーブル74に記憶された目標速度を用いてキャリッジモータ44の駆動開始タイミングt3を定めているので、移動時間WC1を精度良く定めることができる。その結果、用紙Sの搬送終了タイミングとヘッドHDからのインクの吐出タイミングとを、より精度良く定めることができる。   The DC unit 25 starts driving the transport motor 48 at timing t1, and then monitors the arrival of timing t3. Then, on the condition that the timing t3 has come, the driving of the carriage motor 44 is started while the transport motor 48 is being driven. As a result, the conveyance end timing of the sheet S and the ejection timing of the ink from the head HD are both aligned at the timing t2. As a result, the printing speed can be increased. In the printer 10, since the drive start timing t3 of the carriage motor 44 is determined using the target speed stored in the target speed table 74, the movement time WC1 can be accurately determined. As a result, the conveyance end timing of the paper S and the ejection timing of the ink from the head HD can be determined with higher accuracy.

なお、以上の説明では搬送時間WPを定数としてメモリ62に記憶させていたが、この搬送時間WPを演算で用いて求めてもよい。この場合、加速期間WP1及び減速期間WP3では、目標速度テーブル84に記憶されている目標速度、及び、エンコーダ信号ENC_Pで規定される単位搬送量(対応するエッジ同士によって定まる搬送量)に基づいて必要な時間が求められる。また、定速期間WP2では、目標搬送量、目標搬送量を与える回数、及び、ゲインKpに基づいて必要な時間が求められる。   In the above description, the conveyance time WP is stored in the memory 62 as a constant. However, the conveyance time WP may be obtained by calculation. In this case, in the acceleration period WP1 and the deceleration period WP3, it is necessary based on the target speed stored in the target speed table 84 and the unit transport amount (the transport amount determined by the corresponding edges) defined by the encoder signal ENC_P. Time is required. Further, in the constant speed period WP2, the required time is obtained based on the target carry amount, the number of times the target carry amount is given, and the gain Kp.

===その他の実施形態===
前述の実施形態は、主としてプリンタ10に組み込まれたモータ制御装置について記載されているが、その中には、モータ制御方法や制御用プログラムの開示も含まれている。また、上記の実施形態は、本発明の理解を容易にするためのものであり、本発明を限定して解釈するためのものではない。本発明は、その趣旨を逸脱することなく、変更、改良され得ると共に、本発明にはその等価物が含まれることはいうまでもない。特に、以下に述べる実施形態であっても、本発明に含まれるものである。
=== Other Embodiments ===
Although the above-described embodiment has been described mainly with respect to the motor control device incorporated in the printer 10, the disclosure includes a motor control method and a control program. The above-described embodiments are for facilitating understanding of the present invention, and are not intended to limit the present invention. The present invention can be changed and improved without departing from the gist thereof, and it is needless to say that the present invention includes equivalents thereof. In particular, the embodiments described below are also included in the present invention.

<制御対象となるモータ等について>
前述の各実施形態において、プリンタ10は、キャリッジモータ44と搬送モータ48を有していたが、他の種類のモータも制御対象とすることができる。そして、これらのモータは、DCモータによって構成されていたが、他の種類のモータによって構成してもよい。また、発熱量を取得するための信号として、前述の実施形態では、PWM回路63から出力された指令信号を用いていた。しかしながら、モータの発熱量を認識できる信号であれば、指令信号に限定されるものではない。例えば、PWM回路63に入力されるデューティ信号であってもよい。
<About controlled motors>
In each of the embodiments described above, the printer 10 has the carriage motor 44 and the conveyance motor 48, but other types of motors can also be controlled. These motors are constituted by DC motors, but may be constituted by other types of motors. Further, in the above-described embodiment, the command signal output from the PWM circuit 63 is used as a signal for acquiring the heat generation amount. However, the signal is not limited to the command signal as long as it can recognize the heat generation amount of the motor. For example, a duty signal input to the PWM circuit 63 may be used.

<モータ制御装置が組み込まれる対象装置について>
前述の各実施形態では、モータ制御装置が組み込まれる対象装置として、プリンタ10を例に挙げて説明した。しかしながら、対象装置はプリンタ10に限定されるものではない。モータを有する他の装置も対象装置となり得る。
<About the target device in which the motor control device is incorporated>
In each of the above-described embodiments, the printer 10 has been described as an example of the target device in which the motor control device is incorporated. However, the target device is not limited to the printer 10. Other devices having a motor can also be the target device.

<制御情報について>
第1実施形態では、テーブルに記憶される制御情報として目標速度が例示されていた。制御情報としては、目標速度に限定されるものではない。他の種類の情報であってもよい。
<About control information>
In the first embodiment, the target speed is exemplified as the control information stored in the table. Control information is not limited to the target speed. Other types of information may be used.

プリンタの構成を説明するブロック図である。FIG. 2 is a block diagram illustrating a configuration of a printer. 図2Aは、リニアエンコーダの構成を説明するための図である。図2Bは、リニアエンコーダからのエンコーダ信号を説明するための図である。FIG. 2A is a diagram for explaining the configuration of the linear encoder. FIG. 2B is a diagram for explaining an encoder signal from the linear encoder. 図3Aは、ロータリエンコーダの構成を説明するための図である。図3Bは、ロータリエンコーダからのエンコーダ信号を説明するための図である。FIG. 3A is a diagram for explaining the configuration of the rotary encoder. FIG. 3B is a diagram for explaining an encoder signal from a rotary encoder. DCユニットの構成を説明するブロック図である。It is a block diagram explaining the structure of DC unit. DCユニットの機能を説明するブロック図である。It is a block diagram explaining the function of DC unit. 目標速度テーブルを説明する概念図である。It is a conceptual diagram explaining a target speed table. エンコーダ信号のエッジ毎の電流値(目標速度)を説明する概念図である。It is a conceptual diagram explaining the electric current value (target speed) for every edge of an encoder signal. エンコーダ信号の周期毎の電流値(目標速度)を説明する概念図である。It is a conceptual diagram explaining the electric current value (target speed) for every period of an encoder signal. 図9Aは、キャリッジモータの駆動処理(メイン処理)を説明するフローチャートである。図9Bは、キャリッジモータの駆動処理における、目標速度読出処理を説明するフローチャートである。FIG. 9A is a flowchart for explaining a carriage motor drive process (main process). FIG. 9B is a flowchart illustrating target speed reading processing in the carriage motor driving processing. 目標速度テーブルからの目標速度の読み出しを説明する概念図である。It is a conceptual diagram explaining reading of the target speed from the target speed table. 1パス期間中における指令信号の電流値、キャリッジの移動速度、及び、エンコーダ信号を説明する図である。It is a figure explaining the electric current value of the command signal in one pass period, the moving speed of a carriage, and an encoder signal. 第2実施形態を説明する図である。It is a figure explaining 2nd Embodiment.

符号の説明Explanation of symbols

10 プリンタ,20 コントローラ部,21 CPU,22 ASIC,
23 メモリ,24 タイマーIC,25 DCユニット,26 インタフェース,
30 エンジン部,31 キャリッジ,32 キャリッジ移動機構,
33 キャリッジモータドライバ,34 リニアエンコーダ,
35 用紙搬送機構,36 搬送モータドライバ,37 ロータリエンコーダ,
38 ヘッドドライバ,41 タイミングベルト,42 駆動プーリー,
43 アイドラプーリー,44 キャリッジモータ,45 符号板,
46 センサユニット,47 搬送ローラ,48 搬送モータ,
49 符号板,50 センサユニット,61 CPU,62 メモリ,
63 PWM回路,63a キャリッジモータ制御ユニット側のPWM回路,
63b 搬送モータ制御ユニット側のPWM回路,
64 キャリッジモータ制御ユニット,65 搬送モータ制御ユニット,
71 位置演算部,71a 位置カウンタ,72 第1減算器,
73 目標速度演算部,74 目標速度テーブル,74A 第1制御パターン情報,
74B 第2制御パターン情報,74N 第n制御パターン情報,
74a,74d,74g 前側エッジ間テーブル,
74c,74f,74i 後側エッジ間テーブル,
74b,74e,74h 1周期テーブル,
75 速度演算部,76 第2減算器,
77P 比例要素,77I 積分要素,77D 微分要素,78 加算器,
79 ウェイト制御部,81 位置演算部,82 第1減算器,
83 目標速度演算部,84 目標速度テーブル,85 速度演算部,
86 第2減算器,87P 比例要素,87I 積分要素,87D 微分要素,
88 加算器,89 ウェイト制御部,BU バス,HC ホストコンピュータ,
HD ヘッド,ENC_CA 第1エンコーダ信号,
ENC_CB 第2エンコーダ信号,ENC_PA 第1エンコーダ信号,
ENC_PB 第2エンコーダ信号,Kp ゲイン
10 printer, 20 controller, 21 CPU, 22 ASIC,
23 memory, 24 timer IC, 25 DC unit, 26 interface,
30 engine unit, 31 carriage, 32 carriage moving mechanism,
33 Carriage motor driver, 34 Linear encoder,
35 paper transport mechanism, 36 transport motor driver, 37 rotary encoder,
38 Head driver, 41 Timing belt, 42 Drive pulley,
43 idler pulley, 44 carriage motor, 45 sign plate,
46 sensor unit, 47 transport roller, 48 transport motor,
49 Code plate, 50 Sensor unit, 61 CPU, 62 Memory,
63 PWM circuit, 63a PWM circuit on the carriage motor control unit side,
63b PWM circuit on the conveyance motor control unit side,
64 Carriage motor control unit, 65 Carriage motor control unit,
71 position calculation unit, 71a position counter, 72 first subtractor,
73 target speed calculation unit, 74 target speed table, 74A first control pattern information,
74B second control pattern information, 74N nth control pattern information,
74a, 74d, 74g Front edge table,
74c, 74f, 74i Table between rear side edges,
74b, 74e, 74h 1 period table,
75 speed calculator, 76 second subtractor,
77P proportional element, 77I integral element, 77D differential element, 78 adder,
79 weight control unit, 81 position calculation unit, 82 first subtractor,
83 Target speed calculator, 84 Target speed table, 85 Speed calculator,
86 second subtractor, 87P proportional element, 87I integral element, 87D differential element,
88 adder, 89 wait control unit, BU bus, HC host computer,
HD head, ENC_CA first encoder signal,
ENC_CB second encoder signal, ENC_PA first encoder signal,
ENC_PB Second encoder signal, Kp gain

Claims (8)

(A)モータの駆動に伴って移動する移動体の移動量をカウントするカウンタと、
(B)前記モータの駆動に関する制御情報を記憶したメモリであって、
前記カウンタの複数のカウント値に対応した第1制御情報を記憶する第1領域と、前記カウンタのカウント値のそれぞれに対応した第2制御情報を記憶する第2領域と、を有する制御パターン情報を複数記憶するメモリと、
(C)前記移動体の制御モードに応じて前記制御パターン情報を選択し、前記カウント値に基づいて、選択した前記制御パターン情報における前記第1領域と前記第2領域の何れかを選択し、選択された領域から、前記カウンタのカウント値に応じた制御情報を読み出し、前記モータの駆動制御を行う駆動制御部と、
を備え、
前記複数の制御パターン情報のそれぞれは、前記第1領域と前記第2領域の比率が異ならされている、モータ制御装置。
(A) a counter that counts the amount of movement of the moving body that moves as the motor is driven;
(B) A memory storing control information related to driving of the motor,
A first area for storing first control information corresponding to a plurality of count value of the counter, and a second area for storing the second control information corresponding to each of the count value of the counter, the control pattern information with Multiple memories ,
(C) Select the control pattern information according to the control mode of the moving body, and select one of the first area and the second area in the selected control pattern information based on the count value , A drive control unit that reads out control information corresponding to the count value of the counter from the selected area and performs drive control of the motor;
With
Each of the plurality of control pattern information is a motor control device in which a ratio of the first area and the second area is different .
請求項1に記載のモータ制御装置であって、
タイミングを定めるための電圧変化を有し、かつ、前記移動体が所定量移動する毎に前記電圧変化が生じるタイミング信号を生成する、タイミング信号生成部を有し、
前記カウンタは、
前記タイミング信号における前記電圧変化の回数を、前記移動体の移動量としてカウントする、モータ制御装置。
The motor control device according to claim 1,
Having a voltage change for determining timing, and generating a timing signal for generating the voltage change every time the moving body moves by a predetermined amount;
The counter is
The motor control apparatus which counts the frequency | count of the said voltage change in the said timing signal as a movement amount of the said mobile body.
請求項2に記載のモータ制御装置であって、
前記駆動制御部は、
前記カウント値を除算して得られた値を用いて、前記第1領域から前記第1制御情報を読み出し、
前記カウント値を用いて、前記第2領域から前記第2制御情報を読み出す、モータ制御装置。
The motor control device according to claim 2,
The drive control unit
Using the value obtained by dividing the count value, the first control information is read from the first area,
A motor control device that reads out the second control information from the second region using the count value.
請求項1から請求項3の何れかに記載のモータ制御装置であって、
前記駆動制御部は、
前記第1領域と前記第2領域とを前記移動体の加速度合いに応じて選択する、モータ制御装置。
The motor control device according to any one of claims 1 to 3,
The drive control unit
The motor control apparatus which selects the said 1st area | region and the said 2nd area | region according to the acceleration degree of the said mobile body.
請求項4に記載のモータ制御装置であって、
前記メモリは、
前記第1領域と前記第2領域の少なくとも一方を有する制御パターン情報を、前記移動体の移動速度に応じて定められる複数の制御モードのそれぞれに対応させて記憶する、モータ制御装置。
The motor control device according to claim 4,
The memory is
The motor control apparatus which memorize | stores the control pattern information which has at least one of the said 1st area | region and the said 2nd area | region corresponding to each of several control modes defined according to the moving speed of the said mobile body.
請求項1から請求項5の何れかに記載のモータ制御装置であって、
前記メモリは、
前記第1制御情報として、前記カウンタの複数のカウント値に対応した前記移動体の目標速度を記憶し、
前記第2制御情報として、前記カウンタのカウント値のそれぞれに対応した前記移動体の目標速度を記憶する、モータ制御装置。
The motor control device according to any one of claims 1 to 5,
The memory is
As the first control information, the target speed of the moving body corresponding to a plurality of count values of the counter is stored,
The motor control apparatus which memorize | stores the target speed of the said mobile body corresponding to each of the count value of the said counter as said 2nd control information.
(A)モータの駆動に伴って移動する移動体の移動量をカウントすること
(B)前記モータの駆動に関する制御情報を記憶したメモリであって、前記カウンタの複数のカウント値に対応した第1制御情報を記憶する第1領域と、前記カウンタのカウント値のそれぞれに対応した第2制御情報を記憶する第2領域と、を有する制御パターン情報を複数記憶するメモリから、前記移動体の制御モードに応じて前記制御パターン情報を選択し、前記カウント値に基づいて、選択した前記制御パターン情報における前記第1領域と前記第2領域の何れかを選択することと、
(C)選択された領域から、前記カウンタのカウント値に応じた制御情報を読み出し、前記モータの駆動制御を行うこと
を含み、前記複数の制御パターン情報のそれぞれは、前記第1領域と前記第2領域の比率が異ならされている、モータ制御方法。
And counting the amount of movement of the moving body which moves along with the driving of (A) a motor,
(B) A memory storing control information relating to driving of the motor, wherein the first area stores first control information corresponding to a plurality of count values of the counter, and corresponds to each of the count values of the counter The control pattern information is selected in accordance with the control mode of the moving body from a memory that stores a plurality of control pattern information having a second area that stores second control information, and is selected based on the count value. Selecting either the first region or the second region in the control pattern information;
(C) from the selected area, reads the control information corresponding to the count value of the counter, and to perform the drive control of the motor,
Each of the plurality of control pattern information includes a ratio of the first area to the second area, and the motor control method is different .
(A)インクを吐出させるヘッドであって、第1モータによって所定の移動方向に移動されるヘッドについて、その移動量をカウントするカウンタと、
(B)前記第1モータの駆動に関する制御情報を記憶したメモリであって、
前記カウンタの複数のカウント値に対応した前記ヘッドの目標速度を、第1制御情報として記憶する第1領域と、前記カウンタのカウント値のそれぞれに対応した前記ヘッドの目標速度を、第2制御情報として記憶する第2領域と、を有する制御パターン情報を複数有するメモリと、
(C)前記媒体の搬送終了時に前記ヘッドが前記インクの吐出開始位置へ達するように、前記媒体を搬送するための第2モータを駆動中に前記第1モータの駆動を開始させる駆動制御部であって、
前記ヘッドの制御モードに応じて前記制御パターン情報を選択し、
インク吐出開始位置までの前記ヘッドの移動量に対応する前記カウンタのカウント値に基づいて、選択した前記制御パターン情報における前記第1領域と前記第2領域のいずれかを選択し、選択された領域から前記ヘッド用の目標速度を読み出し、
読み出した前記目標速度と前記媒体の搬送終了タイミングとに基づき前記第1モータに対する駆動制御の開始タイミングを求め、
求められた開始タイミングにて、前記第1モータに対する駆動制御を開始する、駆動制御部と、
を備え、前記複数の制御パターン情報のそれぞれは、前記第1領域と前記第2領域の比率が異ならされている、印刷装置。
(A) a counter that counts the amount of movement of a head that ejects ink and is moved in a predetermined movement direction by the first motor;
(B) A memory storing control information related to driving of the first motor,
The target speed of the head corresponding to a plurality of count value of the counter, a first region for storing a first control information, the target speed of the head corresponding to each of the count value of the counter, second control information A memory having a plurality of control pattern information having a second area stored as
(C) a drive control unit that starts driving the first motor while driving the second motor for transporting the medium so that the head reaches the ink ejection start position at the end of transport of the medium; There,
Select the control pattern information according to the control mode of the head,
Based on the count value of the counter corresponding to the movement amount of the head to the ink discharge start position, the first area and the second area in the selected control pattern information are selected, and the selected area Read the target speed for the head from
Based on the read target speed and the conveyance end timing of the medium, a start timing of drive control for the first motor is obtained,
A drive control unit for starting drive control for the first motor at the determined start timing;
Each of the plurality of pieces of control pattern information has a ratio of the first area to the second area different from each other .
JP2006247828A 2006-09-13 2006-09-13 Motor control apparatus, motor control method, and printing apparatus Expired - Fee Related JP5061547B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006247828A JP5061547B2 (en) 2006-09-13 2006-09-13 Motor control apparatus, motor control method, and printing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006247828A JP5061547B2 (en) 2006-09-13 2006-09-13 Motor control apparatus, motor control method, and printing apparatus

Publications (2)

Publication Number Publication Date
JP2008072806A JP2008072806A (en) 2008-03-27
JP5061547B2 true JP5061547B2 (en) 2012-10-31

Family

ID=39293904

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006247828A Expired - Fee Related JP5061547B2 (en) 2006-09-13 2006-09-13 Motor control apparatus, motor control method, and printing apparatus

Country Status (1)

Country Link
JP (1) JP5061547B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4797053B2 (en) * 2008-10-21 2011-10-19 株式会社ロブテックス Rivet material installation work management system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06237588A (en) * 1993-02-05 1994-08-23 Konica Corp Speed control circuit for motor for driving optical scan system of image former
JP4058925B2 (en) * 2001-08-29 2008-03-12 セイコーエプソン株式会社 Printing control apparatus and printing method
JP3809406B2 (en) * 2002-08-29 2006-08-16 キヤノン株式会社 Recording apparatus and recording apparatus control method
JP4355545B2 (en) * 2003-09-12 2009-11-04 株式会社リコー Motor drive control and image forming apparatus

Also Published As

Publication number Publication date
JP2008072806A (en) 2008-03-27

Similar Documents

Publication Publication Date Title
US7712857B2 (en) Printing apparatus, printing method, program, storage medium, and computer system
US20050078134A1 (en) Printing apparatus, printing method, storage medium, and computer system
JP4457456B2 (en) Printing device
US7135831B2 (en) Method and device for controlling motor
JP2001103778A (en) Control device and method of printer motor and recording medium recording control programs
US5926192A (en) Print control system
US7121749B2 (en) Device and method for carriage drive control
JP5061547B2 (en) Motor control apparatus, motor control method, and printing apparatus
WO2004005031A1 (en) Ink jet printer, ink jet printing method, ink jet print program, and medium recording that program
JP2010029013A (en) Motor controller, motor control method, and printing apparatus
JP3570617B2 (en) DC motor control device and control method
JP2003266652A (en) Printer, printing method, program and computer system
JP4325151B2 (en) Printing apparatus and computer system
JP4552543B2 (en) Motor overheat determination device, motor overheat determination method, motor overheat determination program, motor control device, motor control method, and printing apparatus
JP4662821B2 (en) Motor drive control device, image forming apparatus, and program
JP3777936B2 (en) Motor control method and control apparatus
JP3818496B2 (en) Printer control apparatus and printer control method
JP5845693B2 (en) Conveying apparatus and image forming apparatus
JP2008072805A (en) Motor controller and control method
JP2005176518A (en) Recording device, motor control device and method
JP2006056623A (en) Image forming device
JP2006150619A (en) Printing device, computer program, printing system, and printing method
JP2006272762A (en) Printer, printing method, and program
JP5071073B2 (en) Motor control device, printer, and drive control method
JP2017132180A (en) Printer and position control method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090724

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110713

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110906

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20111102

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

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

R150 Certificate of patent or registration of utility model

Ref document number: 5061547

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

Year of fee payment: 3

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