JP7059002B2 - Printing equipment - Google Patents
Printing equipment Download PDFInfo
- Publication number
- JP7059002B2 JP7059002B2 JP2017254783A JP2017254783A JP7059002B2 JP 7059002 B2 JP7059002 B2 JP 7059002B2 JP 2017254783 A JP2017254783 A JP 2017254783A JP 2017254783 A JP2017254783 A JP 2017254783A JP 7059002 B2 JP7059002 B2 JP 7059002B2
- Authority
- JP
- Japan
- Prior art keywords
- frequency
- stepping motor
- printing
- delay
- mcu
- 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.)
- Active
Links
Images
Landscapes
- Character Spaces And Line Spaces In Printers (AREA)
- Control Of Electric Motors In General (AREA)
- Handling Of Sheets (AREA)
- Accessory Devices And Overall Control Thereof (AREA)
- Electronic Switches (AREA)
Description
本発明は、印刷装置に関する。 The present invention relates to a printing apparatus.
従来より、ステッピングモータを用紙搬送に使用するサーマルプリンタが知られている(例えば、特許文献1参照)。 Conventionally, a thermal printer using a stepping motor for transporting paper has been known (see, for example, Patent Document 1).
ステッピングモータを使用するサーマルプリンタで印字する場合には、図1に示すように、搬送開始時に、ステッピングモータの回転速度を起動速度から設定速度まで加速し、ステッピングモータの停止前にステッピングモータの回転速度を起動速度に減速させる台形制御が用いられる。なお、図1の加減速線で囲まれた網掛部の面積は印字長/記録紙の搬送距離に相当する。 When printing with a thermal printer that uses a stepping motor, as shown in FIG. 1, the rotation speed of the stepping motor is accelerated from the starting speed to the set speed at the start of transfer, and the stepping motor rotates before the stepping motor is stopped. Trapezoidal control is used to reduce the speed to the starting speed. The area of the shaded area surrounded by the acceleration / deceleration line in FIG. 1 corresponds to the print length / the transport distance of the recording paper.
また、設定速度が上がると加減速時間も増加するため、図2に示すように、ステッピングモータの停止時に、ステッピングモータを起動速度まで徐々に減速するのではなくステッピングモータの回転を急停止させることで、印字時間を短縮している。 Further, as the set speed increases, the acceleration / deceleration time also increases. Therefore, as shown in FIG. 2, when the stepping motor is stopped, the rotation of the stepping motor is suddenly stopped instead of gradually decelerating to the starting speed. Therefore, the printing time is shortened.
図1及び図2では、ステッピングモータを起動速度から設定速度まで加速するが、加速期間中には設定速度に到達するまでに遅延が生じる。そのため、印字時間が予め想定された時間よりも延びる可能性がある。例えば、ステッピングモータを用いたプリンタを搭載した測定装置には、測定すべき事象の測定周期が図1及び図2の設定速度における印字周期に設定されたものがあるが、このような測定装置では設定速度に到達するまでの遅延により、印字されていない測定データを一時記憶するためのメモリリソースが必要となる。 In FIGS. 1 and 2, the stepping motor is accelerated from the starting speed to the set speed, but there is a delay in reaching the set speed during the acceleration period. Therefore, the printing time may be longer than the time expected in advance. For example, in some measuring devices equipped with a printer using a stepping motor, the measurement cycle of an event to be measured is set to the printing cycle at the set speeds of FIGS. 1 and 2. Due to the delay until the set speed is reached, a memory resource for temporarily storing unprinted measurement data is required.
また、サーマルプリンタでは印字率が高い箇所での消費電流を抑えるため、1ラインで通電する発熱体のうち、一度に通電する発熱体数を制限して複数回に分割して通電するものがある。このため、印字率が高い箇所では通電回数の増加に応じて一時的に印字速度が低下することにより遅延が蓄積され、その分だけ測定データの一次記憶量が増えるため、上記の測定装置などでのメモリリソースの枯渇を招く要因となる。 In addition, in thermal printers, in order to suppress current consumption in places where the printing rate is high, some heating elements that are energized in one line are divided into multiple times to energize by limiting the number of heating elements that are energized at one time. .. For this reason, in places where the printing rate is high, the printing speed temporarily decreases as the number of times of energization increases, and delays are accumulated, and the primary storage amount of measurement data increases by that amount. It causes the exhaustion of memory resources.
本発明の目的は、予め設定された印字時間と実際の印字時間との差異を低減することができる印刷装置を提供することにある。 An object of the present invention is to provide a printing apparatus capable of reducing a difference between a preset printing time and an actual printing time.
上記目的を達成するため、明細書に開示された印刷装置は、プラテンローラを駆動するモータと、前記モータの駆動を制御する制御手段と、を備え、前記制御手段は、印字開始から設定された印字速度に達するまでの印字時間の遅延を計数し、該遅延を解消するように前記設定された印字速度を超えて加速する加速制御をおこなうことを特徴とする。 In order to achieve the above object, the printing apparatus disclosed in the specification includes a motor for driving the platen roller and control means for controlling the drive of the motor, and the control means is set from the start of printing . It is characterized by counting the delay of the printing time until the printing speed is reached and performing acceleration control for accelerating beyond the set printing speed so as to eliminate the delay.
本発明の印刷装置によれば、予め設定された印字時間と実際の印字時間との差異を低減することができる。 According to the printing apparatus of the present invention, it is possible to reduce the difference between the preset printing time and the actual printing time.
以下、図面を参照しながら本発明の実施の形態を説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.
(第1の実施の形態)
図3は、第1の実施の形態に係る印刷装置の概略構成図である。
(First Embodiment)
FIG. 3 is a schematic configuration diagram of the printing apparatus according to the first embodiment.
図3において、第1の実施の形態に係る印刷装置は、例えばサーマルプリンタ1である。サーマルプリンタ1は、モータドライバ2、電源3、分圧回路4、MCU(Micro Controller Unit)5、通信インタフェース(I/F)6、ステッピングモータ7及びサーマルヘッド8を備えている。
In FIG. 3, the printing apparatus according to the first embodiment is, for example, a
モータドライバ2は、ステッピングモータ7の動作を制御する。電源3は、モータドライバ2、分圧回路4及びサーマルヘッド8に電圧を供給する。分圧回路4は、電源3からの電圧を所定値に分圧し、MCU5に供給する。
The
MCU5は、各種のデータやプログラムを格納するメモリ9と、時間を計測するタイマ10とを内蔵している。また、MCU5は、分圧回路4からの出力電圧に応じて、サーマルヘッド8へ印加する電流を調整すると共にサーマルヘッド8の消費電流を検出する。尚、サーマルプリンタ1は、複数のサーマルヘッド8を備えていてもよい。MCU5は、通信I/F6を介してコンピュータ11に接続されている。
The MCU 5 has a built-
ステッピングモータ7は、不図示のプラテンローラにギアを介して接続され、プラテンローラを回転させて用紙を搬送する。 The stepping motor 7 is connected to a platen roller (not shown) via a gear, and rotates the platen roller to convey paper.
コンピュータ11が印刷データをMCU5に送信し、さらに改行コードなどの印刷制御データをMCU5に送信すると、MCU5は、駆動制御信号をモータドライバ2を介してステッピングモータ7に出力し、ステッピングモータ7を1ライン分駆動させると共に、オン信号をサーマルヘッド8に出力する。これにより、サーマルヘッド8が通電され、印刷が実行される。MCU5は、サーマルヘッド8の通電及びステッピングモータ7の駆動を印刷データに含まれるライン数分繰り返すことで、全印刷データが用紙に印刷される。
When the
サーマルプリンタ1では、MCU5はステッピングモータの回転速度[mm/s]をモータ駆動周波数[pps]に換算し、記録紙の搬送量に相当する印字長[mm]をモータ駆動ステップ数[step]に換算してステッピングモータ7を制御する。従って、以下では速度及び印字長をそれぞれ駆動周波数及び駆動ステップ数に置き換えて説明する。
In the
図4は、ステッピングモータ7の加速時の遅延ステップ数を示す図である。 FIG. 4 is a diagram showing the number of delay steps during acceleration of the stepping motor 7.
ステッピングモータ7を起動する際の駆動周波数である起動周波数をf0[pps]とし、ステッピングモータ7の加速度をα[pps/s]とし、ユーザによって予め設定された目標周波数をf1[pps]とする。目標周波数は、設定された印字速度に対応するステッピングモータ7の駆動周波数を示す。ステッピングモータ7の加速時には、駆動周波数が起動周波数f0から目標周波数をf1に達するまでに時間を要する。以下、この時間を「遅延時間」と称する。ステッピングモータ7が目標周波数f1に達するまでの加速時の遅延ステップ数Sd[step]は図4のハッチ部で示される。 The starting frequency, which is the drive frequency when starting the stepping motor 7, is set to f 0 [pps], the acceleration of the stepping motor 7 is set to α [pps / s], and the target frequency preset by the user is set to f 1 [pps]. And. The target frequency indicates the drive frequency of the stepping motor 7 corresponding to the set printing speed. When accelerating the stepping motor 7, it takes time for the drive frequency to reach the target frequency f 1 from the start frequency f 0 . Hereinafter, this time is referred to as "delay time". The number of delay steps S d [step] during acceleration until the stepping motor 7 reaches the target frequency f 1 is shown by the hatch portion in FIG.
図5は、ステッピングモータ7の加速制御を示す図である。 FIG. 5 is a diagram showing acceleration control of the stepping motor 7.
目標周波数f1を超えるステッピングモータ7の駆動周波数を超過周波数f2[pps]とすると、駆動周波数が目標周波数f1に到達してから超過周波数f2に達するまでのステッピングモータ7の加速時の超過ステップ数So[step]は図5の右側のハッチ部で示される。図5に示すように、MCU5は、超過ステップ数Soが遅延ステップ数Sdと等しくなる超過周波数f2までステッピングモータ7を加速させ、ステッピングモータ7の駆動周波数が超過周波数f2に到達するとステッピングモータ7を目標周波数f1まで瞬時に減速させ、その後は目標周波数f1でステッピングモータ7を駆動して印字を行う。
Assuming that the drive frequency of the stepping motor 7 exceeding the target frequency f 1 is the excess frequency f 2 [pps], the stepping motor 7 is accelerated from the time when the drive frequency reaches the target frequency f 1 to the time when the drive frequency reaches the excess frequency f 2 . The number of excess steps So [step] is shown by the hatch portion on the right side of FIG. As shown in FIG. 5, the
図6は、MCU5で実行される加速制御を示すフローチャートである。図6では、図5に示すステッピングモータ7の加速制御が行われる。尚、図6の説明では周波数を使用しているが、周波数の逆数である周期を用いてもよい。また、時間の代わりにステップ数を使用してもよい。
FIG. 6 is a flowchart showing the acceleration control executed by the
まず、MCU5は印字が完了したか否かを判別する(S1)。印字が完了した場合には(S1でYES)、本処理を終了する。一方、印字が完了していない場合には(S1でNO)、印字対象が先頭のデータ(例えば、1ページの中の1行目のデータ)であるか否かを判別する(S2)。
First, the
印字対象が先頭のデータである場合には(S2でYES)、起動周波数又は目標周波数のうち小さい方をステッピングモータ7の設定周波数として設定する(S3)。S3では、起動周波数が目標周波数よりも小さい場合は、ステッピングモータ7が設定周波数として設定された起動周波数で起動してから加速される。一方、目標周波数が起動周波数よりも小さい場合は目標周波数が設定周波数に設定され、ステッピングモータ7が目標周波数で駆動され加速不要であることを示している。 When the print target is the first data (YES in S2), the smaller of the start frequency and the target frequency is set as the set frequency of the stepping motor 7 (S3). In S3, when the starting frequency is smaller than the target frequency, the stepping motor 7 is started at the starting frequency set as the set frequency and then accelerated. On the other hand, when the target frequency is smaller than the starting frequency, the target frequency is set to the set frequency, indicating that the stepping motor 7 is driven at the target frequency and does not require acceleration.
その後、MCU5は遅延時間Tdを初期化し(S4)、ステッピングモータ7の駆動を開始して(S5)、駆動開始からの時間を示す経過時間を初期化する(S6)。次に、MCU5は経過時間の計数を開始する(S6A)。MCU5はステッピングモータ7を1ステップ駆動するのに必要な時間が経過したか、且つ1ステップ内でのサーマルヘッド8の通電が完了しているか否かを判別する(S7)。
After that, the
ステッピングモータ7を1ステップ駆動するのに必要な時間が経過していない、又は1ステップ内のサーマルヘッド8の通電が完了していない場合には(S7でNO)、S7の判別を繰り返す。一方、ステッピングモータ7を1ステップ駆動するのに必要な時間が経過し、且つ1ステップ内でサーマルヘッド8の通電が完了している場合には(S7でYES)、S1の処理に戻る。
If the time required to drive the stepping motor 7 in one step has not elapsed, or if the energization of the
一方、印字対象が先頭のデータでない場合には(S2でNO)、MCU5はS6あるいは前回の経過時間更新からの経過時間を更新し(S8)、経過時間の逆数を現在の駆動周波数fn(以下「現在周波数」)とし(S9)、遅延時間Tdを更新する(S10)。遅延時間Tdは、現在の駆動周期(1/fn)(以下「現在周期」)と目標とする駆動周期(1/f1)(以下「目標周期)との差を積算したものである。ここで、遅延周波数fdを遅延時間Tdの逆数とすると、遅延時間Td(=1/fd)に今回の遅延時間(1/fn-1/f1)を加算することで、遅延時間はTd=1/fd+(1/fn-1/f1)の式で更新される。 On the other hand, if the print target is not the first data (NO in S2), the MCU5 updates the elapsed time from S6 or the previous elapsed time update (S8), and sets the inverse of the elapsed time to the current drive frequency f n (NO). Hereinafter, it is referred to as “current frequency”) (S9), and the delay time T d is updated (S10). The delay time T d is the sum of the differences between the current drive cycle (1 / f n ) (hereinafter, “current cycle”) and the target drive cycle (1 / f 1 ) (hereinafter, “target cycle”). Here, assuming that the delay frequency f d is the reciprocal of the delay time T d , by adding the current delay time (1 / f n -1 / f 1 ) to the delay time T d (= 1 / f d ). , The delay time is updated by the formula T d = 1 / f d + (1 / f n -1 / f 1 ).
次に、MCU5はS10で更新された遅延時間Tdが0を超えるか否か、つまり遅延の有無を判別する(S11)。遅延時間Tdが0を超え、遅延時間Tdがある場合には(S11でYES)、MCU5はステッピングモータ7を回転させることが可能な最大の駆動周波数周波数fmax(以下「最大周波数」)をMCU5の内部目標の駆動周波数である要求周波数に設定し、最終的にステッピングモータ7を最大周波数fmaxまで加速するように制御する(S12)。遅延時間Tdが0であり遅延がない場合には(S11でNO)、目標周波数f1を要求周波数に設定し、ステッピングモータ7を目標周波数f1で駆動させる(S13)。この場合はステッピングモータ7の加速は不要である。
Next, the
次に、MCU5は要求周波数が現在周波数fnよりも大きいか否かを判別する(S14)。ここでは、MCU5はステッピングモータ7の加速が必要であるか否かを判別しており、要求周波数が現在周波数fnよりも大きい場合にはステッピングモータ7の加速が必要であると判断し、要求周波数が現在周波数fn以下の場合にはステッピングモータ7の加速は不要であると判断する。
Next, the
要求周波数が現在周波数fnよりも大きい場合には(S14でYES)、MCU5は要求周波数と加速周波数の小さい方をステッピングモータ7の設定周波数として設定し(S15)、ステッピングモータ7を段階的に加速する。なお、加速周波数は現在周波数fnから所定値だけ加速された駆動周波数である。要求周波数が現在周波数fn以下の場合には(S14でNO)、MCU5は要求周波数をステッピングモータ7の設定周波数として設定し(S16)、ステッピングモータ7を要求周波数で駆動させる。S15及びS16の後、S5の処理に進む。
When the required frequency is larger than the current frequency f n (YES in S14), the
印字が完了するまで、S1でNO→S2でNO→S8~S16→S5~S7→S1で示すループ処理が繰り返される。 Until printing is completed, the loop processing indicated by NO in S1 → NO in S2 → S8 to S16 → S5 to S7 → S1 is repeated.
図6の加速制御は、起動時のステッピングモータ7の加速に有効であるが、これに限定されるものではない。例えば、高印字率のデータを印刷する場合や、印字データの転送が遅れた場合などの外乱により一時的に印字速度が低下した場合、図7に示すように、MCU5はステッピングモータ7の駆動周波数を外乱などによって生じた遅延に応じた超過周波数f2’まで加速することで、印字時間の遅延を緩和することができる。なお、図7は、外乱発生時のステッピングモータ7の加速制御を示す図である。
The acceleration control of FIG. 6 is effective for accelerating the stepping motor 7 at the time of starting, but is not limited to this. For example, when printing high print rate data or when the print speed temporarily decreases due to disturbance such as when the transfer of print data is delayed, as shown in FIG. 7, the
(第2の実施の形態)
図5及び図6の加速制御では、超過周波数f2が高く、超過周波数f2から目標周波数f1に切り替える際の周波数変動f2-f1が大きくなる。ステッピングモータ7は駆動周波数が高くなると駆動トルクの低下により脱調するおそれがある。また、大きな駆動周波数の変動による振動は印字品質の低下を招く。
(Second embodiment)
In the acceleration control of FIGS. 5 and 6, the excess frequency f 2 is high, and the frequency fluctuation f 2 −f 1 when switching from the excess frequency f 2 to the target frequency f 1 becomes large. When the drive frequency of the stepping motor 7 becomes high, the stepping motor 7 may step out due to a decrease in the drive torque. In addition, vibration due to large fluctuations in the drive frequency causes deterioration of print quality.
そこで、第2の実施の形態では、超過周波数f2及び周波数変動f2-f1の低減のため、MCU5は、図8に示すように、ステッピングモータ7を超過周波数f2まで加速した後、目標周波数f1まで徐々に減速させる。図8は、第2の実施の形態に係るステッピングモータ7の加速制御を示す図である。
Therefore, in the second embodiment, in order to reduce the excess frequency f 2 and the frequency fluctuation f 2 -f 1 , the
超過周波数f2から減速を開始するタイミングは、現在周波数fnと遅延時間Tdとの関係が式(1)となるタイミングである。
超過周波数f2から減速を開始するタイミングの算出方法を以下に説明する。図9はステッピングモータ7の駆動周波数と遅延時間との関係を示す図である。 The method of calculating the timing at which deceleration starts from the excess frequency f 2 will be described below. FIG. 9 is a diagram showing the relationship between the drive frequency of the stepping motor 7 and the delay time.
ステッピングモータが現在周波数fnから目標周波数f1まで減速度αで減速するのにかかる時間をTnとし、時間Tnの間にステッピングモータが駆動される駆動ステップ数Snを一定速度の目標周波数f1で駆動するのにかかる時間をT1とする。遅延時間TdがT1とTnとの差以下になるタイミングで減速を開始すれば、ステッピングモータの減速後に駆動周波数が目標周波数に至った時点で遅延が解消される。この遅延が解消されるタイミングは、図9の遅延ステップ数Sdが減速時の駆動ステップ数Sn以下となる、遅延時間Td経過後のタイミングであり、以下の式(2)で求められる。
超過周波数f2でステッピングモータ7が駆動されている場合、MCU5は、目標周波数f1が設定されると、式(2)に従って、超過周波数f2から減速を開始するタイミングを算出する。なお、この場合、超過周波数f2を式(2)の現在周波数fnと見る。
When the stepping motor 7 is driven by the excess frequency f 2 , the
図10は、MCU5で実行される加速制御を示すフローチャートである。図10では、図8に示すステッピングモータ7の加速制御が行われる。尚、図6と同一の処理には同一のステップ番号を付し、その説明を省略する。
FIG. 10 is a flowchart showing the acceleration control executed by the
まず、MCU5はS1~S10の処理を実行する。S10の処理の後、MCU5は現在が減速開始タイミングであるか否かを判別する(S21)。尚、減速開始タイミングは、現在周波数fnと遅延時間Tdとの関係が上記式(1)となるタイミングであり、予めMCU5によって算出されている。現在が減速開始タイミングでない場合には(S21でNO)、MCU5は最大周波数fmaxを要求周波数に設定し(S22)、ステッピングモータ7を最大周波数fmaxまで加速するか、最大周波数fmaxでの駆動を継続する。一方、現在が減速開始タイミングである場合には(S21でYES)、ステッピングモータ7を目標周波数f1に減速するように目標周波数f1を要求周波数に設定する(S23)。
First, the
次に、MCU5は要求周波数が現在周波数fnと同一であるか否かを判別する(S24)。ここでは、MCU5はステッピングモータ7の加減速が必要であるか否かを判別している。要求周波数が現在周波数fnと同一である場合にはステッピングモータ7の加減速が不要であると判断し、要求周波数が現在周波数fnと同一でない場合にはステッピングモータ7の加減速が必要であると判断する。
Next, the
要求周波数が現在周波数fnと同一である場合には(S24でYES)、MCU5は要求周波数をステッピングモータ7の設定周波数として設定する(S25)。要求周波数が現在周波数fnと同一でない場合には(S24でNO)、MCU5は要求周波数が現在周波数fnよりも大きいか否かを判別する(S26)。ここでは、MCU5はステッピングモータ7の加減又は減速のいずれが必要であるか否かを判別している。要求周波数が現在周波数fnよりも大きい場合にはステッピングモータ7の加速が必要であると判断し、要求周波数が現在周波数より小さい場合にはステッピングモータ7の減速が必要であると判断する。
When the required frequency is the same as the current frequency fn (YES in S24), the
要求周波数が現在周波数fnよりも大きい場合には(S26でYES)、MCU5は要求周波数と加速周波数の小さい方をステッピングモータ7の設定周波数として設定し(S27)、S5の処理に進む。要求周波数が現在周波数fnよりも小さい場合には(S26でNO)、MCU5は要求周波数と減速周波数の大きい方をステッピングモータ7の設定周波数として設定し(S28)、S5の処理に進む。減速周波数は現在周波数fnから所定値だけ減速された駆動周波数である。S28の処理により、ステッピングモータ7の駆動周波数を現在周波数fnから目標周波数f1まで段階的に減少させることができる。
When the required frequency is larger than the current frequency fn (YES in S26), the
(第3の実施の形態)
図11は、第3の実施の形態に係るステッピングモータ7の加速制御を示す図である。ステッピングモータ7を停止状態から駆動させる場合、モータ停止相で数十ms程度の整定時間分ステッピングモータ7を励磁させる整定待機処理が必要となる。このため、停止状態から印字を開始すると実際に印字されるまでに整定待機処理分の遅延が生じてしまう。
(Third embodiment)
FIG. 11 is a diagram showing acceleration control of the stepping motor 7 according to the third embodiment. When the stepping motor 7 is driven from a stopped state, a settling standby process for exciting the stepping motor 7 for a setting time of about several tens of ms in the motor stop phase is required. Therefore, when printing is started from the stopped state, there is a delay due to the settling standby process until the actual printing is performed.
従って、図11では、印字先頭での遅延時間Tdの初期値を整定時間とするか、又は整定待機処理開始時を印字開始時とすることで、整定時間による遅延を解消する。例えば、図6のS4の遅延時間Tdの初期値を整定時間とすることで、整定時間による遅延を解消することができる。 Therefore, in FIG. 11, the delay due to the settling time is eliminated by setting the initial value of the delay time Td at the beginning of printing as the settling time or setting the start of the settling standby process as the print start time. For example, by setting the initial value of the delay time T d in S4 of FIG. 6 as the settling time, the delay due to the settling time can be eliminated.
(第4の実施の形態)
図12は、第4の実施の形態に係るステッピングモータ7の加速制御を示す図である。
(Fourth Embodiment)
FIG. 12 is a diagram showing acceleration control of the stepping motor 7 according to the fourth embodiment.
図12では、MCU5は、超過ステップ数Soがステッピングモータ起動時及びステッピングモータ停止前の2つの遅延ステップ数の合計である2Sdと等しくなるように、ステッピングモータ7を超過周波数f2まで加速させ、ステッピングモータ7の駆動周波数が超過周波数f2に到達した後にステッピングモータ7を目標周波数f1まで段階的に減速させる。つまり、超過ステップ数Soが加速時及び減速時の遅延ステップ数の合計2Sdと等しくなるように、ステッピングモータ7を予め加速させている。
In FIG. 12, the
MCU5は目標周波数が設定された場合に、減速時の遅延ステップ数Sd2を予め算出する。加速時の遅延ステップ数Sd1が減速時の遅延ステップ数Sd2と同一である場合には、MCU5は、加速時の遅延ステップ数Sd1を2倍することにより加速時及び減速時の合計の遅延ステップ数2Sdを算出してもよい。
When the target frequency is set, the
図13は、MCU5で実行される加速制御を示すフローチャートである。図13では、図12に示すステッピングモータ7の加速制御が行われる。尚、図10と同一の処理には同一のステップ番号を付し、その説明を省略する。
FIG. 13 is a flowchart showing the acceleration control executed by the
まず、MCU5はS1~S3の処理を実行する。その後、MCU5は遅延時間Tdを初期化する(S4A)。このとき、MCU5はステッピングモータ7の停止前の減速による遅延時間TDを印字先頭での遅延時間Tdの初期値として設定する。これにより、停止直前の減速による遅延を解消する。その後、手順はS5の処理に進む。
First, the
MCU5はS6~S9の処理を実行する。S9の処理後、MCU5は、現在がステッピングモータ停止直前の減速タイミングであるか否かを判別する(S31)。停止直前の減速タイミングとは、例えば、図12の符号Aで示す区間の開始タイミングに相当する。現在が停止直前の減速タイミングでない場合には(S31でNO)、MCU5は駆動周波数f1を目標周波数として設定してステッピングモータを駆動し(S32)、S10の処理に進む。一方、現在が停止直前の減速タイミングである場合には(S31でYES)、MCU5はステッピングモータを減速制御するために、減速周波数を目標周波数として設定し(S33)、S10の処理に進む。
The
第1~第3の実施の形態では、目標周波数f1は一定の値としていたが、S33では、停止前の減速中に減速周波数を目標周波数とすることで、停止前の減速中に遅延時間が増加することを防いでいる。 In the first to third embodiments, the target frequency f 1 is set to a constant value, but in S33, by setting the deceleration frequency as the target frequency during deceleration before stopping, the delay time during deceleration before stopping is set. Is prevented from increasing.
S10の処理後、MCU5は、再び現在が停止直前の減速タイミングであるか否かを判別する(S34)。現在が停止直前の減速タイミングである場合には(S34でYES)、ステッピングモータを減速させるためにMCU5は起動周波数を要求周波数として設定し(S35)、S24の処理に進む。現在が停止直前の減速タイミングでない場合には(S34でNO)、S21の処理に進む。
After the processing of S10, the
(第5の実施の形態)
図14は、第5の実施の形態に係るステッピングモータ7の加速制御を示す図である。
(Fifth Embodiment)
FIG. 14 is a diagram showing acceleration control of the stepping motor 7 according to the fifth embodiment.
第1~第4の実施の形態では、目標周波数f1に対して最大周波数fmaxが十分に大きいか又は印字長が長くないと、遅延を解消することができない。一方、予め印字長が判明している場合には、目標周波数f1に対して大きすぎない目標周波数f1を補正した補正周波数f1’を用いることによって遅延を解消することができる。 In the first to fourth embodiments, the delay cannot be eliminated unless the maximum frequency f max is sufficiently large with respect to the target frequency f 1 or the print length is long. On the other hand, when the print length is known in advance, the delay can be eliminated by using the correction frequency f 1'corrected for the target frequency f 1 which is not too large for the target frequency f 1 .
目標周波数f1を超えて駆動した超過ステップ数Soは、図14に示す2つの超過ステップ数So1と超過ステップ数So2との合計であり、それぞれ図14中の式で表される。 The excess step number So driven beyond the target frequency f 1 is the total of the two excess step number So1 and the excess step number So2 shown in FIG. 14, and is represented by the equation in FIG. 14, respectively.
印字開始時に目標周波数f1と印字長S[step]が確定している場合、超過ステップ数Soが加速時及び減速時の遅延ステップ数Sdの和2Sdと等しくなると、式(3)が成立する。
このときの補正周波数f1’は式(4)で表される。
MCU5は、目標周波数f1と印字長S[step]とから補正周波数f1’を算出する。加速時には、ステップ毎に加速周波数を目標周波数に設定し、補正周波数f1’に到達するまで加速を継続する。定速時には、算出した補正周波数f1’を目標周波数に設定する。減速時には、ステップ毎に減速周波数を目標周波数に設定する。 The MCU 5 calculates the correction frequency f 1'from the target frequency f 1 and the print length S [step]. At the time of acceleration, the acceleration frequency is set to the target frequency for each step, and the acceleration is continued until the correction frequency f 1'is reached. At constant speed, the calculated correction frequency f 1'is set as the target frequency. At the time of deceleration, the deceleration frequency is set to the target frequency for each step.
このように、MCU5は、加速時、定速時及び減速時のそれぞれで目標周波数を動的に切替え、切り替えられた目標周波数で駆動するようにステッピングモータ7を制御するので、加速時及び減速時の遅延を解消することができる。
In this way, the
また、第5の実施の形態では、目標周波数を切り替える際の周波数変動を他の実施の形態よりも抑えることができる。 Further, in the fifth embodiment, the frequency fluctuation when switching the target frequency can be suppressed as compared with the other embodiments.
尚、上述したサーマルプリンタ1内のMCU5が実行するプログラムの一部をコンピュータ11が実行するようにしてもよい。
The
尚、本発明は、上述した実施の形態に限定されるものではなく、その要旨を逸脱しない範囲内で種々変形して実施することが可能である。 The present invention is not limited to the above-described embodiment, and can be variously modified and implemented within a range that does not deviate from the gist thereof.
1 サーマルプリンタ
2 モータドライバ
3 電源
4 分圧回路
5 MCU(Micro Controller Unit)
6 通信インタフェース(I/F)
7 ステッピングモータ
8 サーマルヘッド
1
6 Communication interface (I / F)
7 Stepping
Claims (7)
前記モータの駆動を制御する制御手段と、
を備え、
前記制御手段は、印字開始から設定された印字速度に達するまでの印字時間の遅延を計数し、該遅延を解消するように前記設定された印字速度を超えて加速する加速制御をおこなう
ことを特徴とする印刷装置。 The motor that drives the platen roller and
A control means for controlling the drive of the motor and
Equipped with
The control means counts the delay of the printing time from the start of printing to reaching the set printing speed, and performs acceleration control for accelerating beyond the set printing speed so as to eliminate the delay. Printing equipment.
前記モータの駆動を制御する制御手段と、A control means for controlling the drive of the motor and
を備え、Equipped with
前記制御手段は、設定された印字速度に対する印字時間の遅延を計数し、該遅延を解消するように前記設定された印字速度を超えて加速する加速制御をおこない、The control means counts the delay of the printing time with respect to the set printing speed, and performs acceleration control for accelerating beyond the set printing speed so as to eliminate the delay.
前記制御手段は、印字終了直前の減速による遅延を含めて前記加速制御をおこなうことを特徴とする印刷装置。The control means is a printing apparatus that performs the acceleration control including a delay due to deceleration immediately before the end of printing.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017254783A JP7059002B2 (en) | 2017-12-28 | 2017-12-28 | Printing equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017254783A JP7059002B2 (en) | 2017-12-28 | 2017-12-28 | Printing equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2019119114A JP2019119114A (en) | 2019-07-22 |
JP7059002B2 true JP7059002B2 (en) | 2022-04-25 |
Family
ID=67305886
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017254783A Active JP7059002B2 (en) | 2017-12-28 | 2017-12-28 | Printing equipment |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7059002B2 (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004215440A (en) | 2003-01-07 | 2004-07-29 | Canon Inc | Stepping motor controller |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2538943B2 (en) * | 1987-10-08 | 1996-10-02 | 沖電気工業株式会社 | Printer |
JPH06276774A (en) * | 1993-03-22 | 1994-09-30 | Nippon Reliance Kk | Positioning control method for motor |
-
2017
- 2017-12-28 JP JP2017254783A patent/JP7059002B2/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004215440A (en) | 2003-01-07 | 2004-07-29 | Canon Inc | Stepping motor controller |
Also Published As
Publication number | Publication date |
---|---|
JP2019119114A (en) | 2019-07-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9770925B2 (en) | Recording apparatus and winding method | |
US8598816B2 (en) | Motor control apparatus and image forming apparatus | |
US8833894B2 (en) | Motor control device and image forming apparatus | |
US8866432B2 (en) | Motor control device and image forming apparatus | |
JP7059002B2 (en) | Printing equipment | |
US20120305621A1 (en) | Conveyance device, printing device, and conveyance method | |
US11201573B2 (en) | Driving device, image forming apparatus, and control program | |
US5291114A (en) | Method of and apparatus for controlling a sheet feeding motor used in a printer | |
JPH0664275A (en) | Carriage motor control device of printer | |
JP2003079189A (en) | Driving method of dc motor, method and apparatus for feeding sheet, imaging apparatus, and image reader | |
US20080055612A1 (en) | Printer and control method therefor | |
US5177422A (en) | Recording control system for a recording apparatus | |
CN109278419B (en) | Printer, control method and terminal equipment | |
JP2005186509A (en) | Line type thermal printer and its divide driving method | |
JP2018069716A (en) | Printer and medium conveying device | |
JP4449194B2 (en) | Printing device | |
JP7007442B2 (en) | Printer | |
JP2006256227A (en) | Printer and method for controlling motor for printer | |
JP5963492B2 (en) | Conveying apparatus and recording apparatus | |
JP7358252B2 (en) | Power supply device, image forming device, and control method | |
US10511241B2 (en) | Motor control device and printer | |
JP3945362B2 (en) | Printing apparatus having a DC motor | |
JPH06115139A (en) | Method of controlling thermal printer | |
WO2024100142A1 (en) | A tape drive | |
JP2019177960A (en) | Recording device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20201218 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20211018 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20211207 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20220204 |
|
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: 20220405 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20220413 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7059002 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |