JPH07106079B2 - Motor drive system - Google Patents

Motor drive system

Info

Publication number
JPH07106079B2
JPH07106079B2 JP15149087A JP15149087A JPH07106079B2 JP H07106079 B2 JPH07106079 B2 JP H07106079B2 JP 15149087 A JP15149087 A JP 15149087A JP 15149087 A JP15149087 A JP 15149087A JP H07106079 B2 JPH07106079 B2 JP H07106079B2
Authority
JP
Japan
Prior art keywords
speed
curve
level
transition
speed level
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
JP15149087A
Other languages
Japanese (ja)
Other versions
JPS63316700A (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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP15149087A priority Critical patent/JPH07106079B2/en
Publication of JPS63316700A publication Critical patent/JPS63316700A/en
Publication of JPH07106079B2 publication Critical patent/JPH07106079B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Character Spaces And Line Spaces In Printers (AREA)
  • Control Of Stepping Motors (AREA)

Description

【発明の詳細な説明】 〔概要〕 本発明は、ステップモータの駆動方式において、複数の
速度レベル間を最適な駆動曲線に沿って遷移させるよう
にしたことにより、モータの滑らかな加減速を可能に
し、従来の急激な加減速に伴う騒音や振動等を著しく減
少させたものである。
DETAILED DESCRIPTION OF THE INVENTION [Outline] The present invention enables smooth acceleration / deceleration of a motor by making a transition between a plurality of speed levels along an optimal drive curve in a step motor drive system. In addition, the noise and vibration associated with the conventional rapid acceleration / deceleration are significantly reduced.

〔産業上の利用分野〕[Industrial application field]

本発明は、例えばサーマルプリンタ等に使用されるステ
ップモータの駆動方式に係り、特には複数の速度レベル
間での高速かつ最適な遷移を実現するモータ駆動方式に
関する。
The present invention relates to a driving method for a step motor used in, for example, a thermal printer, and more particularly to a motor driving method for realizing high-speed and optimum transition between a plurality of speed levels.

特に、用紙をモータで送りながら1行分の長さを持つラ
イン状のヘッドで印字を行うようなサーマルラインプリ
ンタにおいては、以前はヘッドの駆動能力に応じて印字
速度制限がなされていたため、モータの駆動速度につい
ては問題とならなかったが、最近はIC搭載ヘッドが実用
化されて高速印字が可能となったため、これに十分に対
応し得るモータ駆動方式が必要となってきた。
In particular, in a thermal line printer that prints with a linear head having a length of one line while feeding a sheet with a motor, the printing speed was previously limited according to the driving ability of the head. The driving speed was not a problem, but since the head with an IC has been put into practical use recently and high-speed printing has become possible, a motor drive system that can sufficiently cope with this has become necessary.

〔従 来 の 技 術〕[Conventional technology]

従来、例えば上述したサーマルプリンタにおける高速印
字を実現するためのモータ駆動方式としては、第8図に
示すように、印字領域をヘッドの駆動能力に応じた一定
の速度レベルで駆動し、改行スペース領域だけ高速レベ
ルで駆動するようにした方式がある。
Conventionally, for example, as a motor drive system for realizing high-speed printing in the above-mentioned thermal printer, as shown in FIG. 8, the print area is driven at a constant speed level according to the drive capacity of the head, and the line feed space area is driven. There is a system that only drives at a high speed level.

〔発明が解決しようとする問題点〕[Problems to be solved by the invention]

上記従来のモータ駆動方式では、第8図に明らかなよう
に、速度レベルを遷移させる際の加速および減速が急
激、且つ略直線的に行われるため、その加減速直後に大
きな騒音が生じると共に、モータに振動が生じて印字品
質に悪影響が及ぶという問題点があった。
In the above-mentioned conventional motor drive system, as is apparent from FIG. 8, since acceleration and deceleration at the time of changing the speed level are performed rapidly and substantially linearly, a large noise is generated immediately after the acceleration and deceleration, and There is a problem in that the vibration of the motor causes the print quality to be adversely affected.

本発明は、上記問題点に鑑み、モータの滑らかな加減速
を可能にして、騒音や振動を著しく低減できるモータ駆
動方式を提供することを目的とする。
In view of the above problems, it is an object of the present invention to provide a motor drive system that enables smooth acceleration / deceleration of a motor and can significantly reduce noise and vibration.

〔問題点を解決するための手段〕[Means for solving problems]

本発明のモータ駆動方式は、ステップモータを定速駆動
させるための複数の速度レベルを有し、その中の任意の
第1の速度レベルから任意の第2の速度レベルに遷移さ
せる際、この遷移に伴うステップ数と上記第1、第2の
速度レベルとに基づき、上記遷移中に取り得る最高速度
レベルと、第1の速度レベルから最高速度レベルまでの
最適加速曲線と、最高速度レベルから第2の速度レベル
までの最適減速曲線とを決定することを特徴とするもの
である。
The motor drive system of the present invention has a plurality of speed levels for driving the step motor at a constant speed, and when making a transition from any first speed level among them to any second speed level, this transition is performed. Based on the number of steps involved and the first and second speed levels, the maximum speed level that can be taken during the transition, the optimum acceleration curve from the first speed level to the maximum speed level, and the maximum speed level The optimal deceleration curve up to a speed level of 2 is determined.

〔作用〕[Action]

本発明では、第1の速度レベルから第2の速度レベルに
遷移させる際、第1の速度レベルから最適な加速曲線に
沿って上記最高速度レベルまで至り、更にこの最高速度
レベルから最適な減速曲線に沿って第2の速度レベルま
で至る。このように加速および減速は最適曲線に沿って
行われるので、非常に滑らかなものとなり、よって騒音
や振動が著しく低減される。
According to the present invention, when transitioning from the first speed level to the second speed level, the first speed level reaches the above-mentioned maximum speed level along the optimum acceleration curve, and further, from this maximum speed level to the optimum deceleration curve. Along to a second speed level. In this way, acceleration and deceleration are carried out along the optimum curve, so that the acceleration and deceleration are extremely smooth, and noise and vibration are significantly reduced.

〔実施例〕〔Example〕

以下、本発明の実施例について、図面を参照しながら説
明する。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.

第1図は、本発明の一実施例を適用したサーマルライン
プリンタの回路ブロック図である。本回路は、CPU1、RO
M2、RAM3、フレームメモリ4、外部I/O5、拡張用漢字CG
(キャラクタジェネレータ)6、メモリマネジメントレ
ジスタ7等から構成されている。なお、ROM2は、後述す
るプログラムルーチンやタイムテーブル等を格納してい
る。RAM3はワーク用バッファRAMであり、CGデータ展開
ルーチンのローディング部としても用いられる。フレー
ムメモリ4は例えば64KByteの記憶容量を持ち、ロード
データ展開プログラムのデータローディング部およびCG
変換データ再配置部として用いられる。外部I/O5は、例
えばセントロニクスパラレルインタフェース(セントロ
ニクス社準拠パラレルインタフェース)8、センサ9、
パネル(スイッチ、LED等)10、ヘッド11、紙送り用の
モータ12等に対するデータの入出力を行う。メモリマネ
ジメントレジスタ7は、RAM3やフレームメモリ4を管理
するためのマネジメントレジスタ部である。
FIG. 1 is a circuit block diagram of a thermal line printer to which an embodiment of the present invention is applied. This circuit is CPU1, RO
M2, RAM3, frame memory 4, external I / O5, Kanji CG for expansion
(Character generator) 6, memory management register 7 and the like. The ROM 2 stores a program routine, a timetable, etc., which will be described later. RAM3 is a work buffer RAM and is also used as a loading unit for a CG data expansion routine. The frame memory 4 has a storage capacity of, for example, 64 KBytes, and has a data loading unit for a load data expansion program and a CG.
It is used as a conversion data rearrangement unit. The external I / O 5 is, for example, a Centronics parallel interface (parallel interface conforming to Centronics) 8, a sensor 9,
Data is input and output to and from the panel (switch, LED, etc.) 10, head 11, motor 12 for paper feeding, and the like. The memory management register 7 is a management register unit for managing the RAM 3 and the frame memory 4.

次に、本実施例における主要な処理を第2図に基づいて
説明する。
Next, the main processing in this embodiment will be described with reference to FIG.

まず、セントロニクスパラレルインタフェース8でデー
タ受信し、改行命令が入った場合にCPU1でRAM3内の状態
チャックを行う。すなわち、RAM3内に格納されているス
テップ数(用紙を送るためのモータ12のステップ数であ
り、「定速印字ステップ数」、「加速ステップ数」、
「定速ステップ数」等がある)、現在レベル(現在の速
度レベル)、最終レベル(最終的な目標となる速度レベ
ル)をチェックする。
First, the Centronics parallel interface 8 receives data, and when a line feed command is input, the CPU 1 checks the state in the RAM 3. That is, the number of steps stored in the RAM3 (the number of steps of the motor 12 for feeding the paper, "constant speed printing step number", "acceleration step number",
Check the current level (current speed level) and final level (final target speed level).

なお、速度レベルとはモータ12を定速駆動させる際の速
度に相当するものであり、印字濃度に応じてn段(n≧
2)設定されている。
The speed level corresponds to the speed at which the motor 12 is driven at a constant speed, and n steps (n ≧) depending on the print density.
2) It is set.

続いてCPU1は、上記チェックに基づいて最適な遷移曲線
を計算する。ここで遷移曲線とは、速度レベルが切換わ
る際に描く速度曲線(加速曲線もしくは減速曲線)であ
り、本実施例では正規分布曲線を用いる。この曲線は、
以下のようにして得ている。
Subsequently, the CPU 1 calculates the optimum transition curve based on the above check. Here, the transition curve is a speed curve (acceleration curve or deceleration curve) drawn when the speed level is switched, and a normal distribution curve is used in this embodiment. This curve is
It is obtained as follows.

すなわち、速度レベルが切換わる際の加速度曲線とし
て、 を用い、この式を級数展開すると、 となるので、これにより速度曲線f(x)は、 で得られる。この式における、A、l、mに具体的な数
値を適宜代入して曲線近似することにより、最適な速度
曲線を見つけ出すことができる。例えばA=1.8、l=
9、m=5とした場合等に最適な速度曲線が得られる。
そこで、この速度曲線f(x)を各速度レベル間で作成
することにより、レベル数nおよび方向(加速と減速)
に応じ、例えば第5図に示すような2×nC2通りの遷移
曲線が得られる。
That is, as the acceleration curve when the speed level changes, Using, the series expansion of this equation yields Therefore, the velocity curve f (x) is Can be obtained at. By substituting specific numerical values for A, l, and m in this equation as appropriate and performing curve approximation, an optimum speed curve can be found. For example, A = 1.8, l =
An optimal velocity curve can be obtained when 9, m = 5.
Therefore, by creating this speed curve f (x) between each speed level, the number of levels n and direction (acceleration and deceleration)
According to the above, for example, 2 × n C 2 transition curves as shown in FIG. 5 are obtained.

そこでCPU1では、上述したチェックによって得られたス
テップ数、現在レベル、および最終レベルに基づいて、
上記2×nC2通りの遷移曲線の中から最適な曲線を求め
る。最適曲線を求めるための処理を第3図(a)に示
す。
Therefore, in CPU1, based on the number of steps, the current level, and the final level obtained by the above check,
The optimum curve is obtained from the above 2 × n C 2 transition curves. The process for obtaining the optimum curve is shown in FIG.

同図において、改行命令があった場合に、まずステップ
a1で定速印字幅(定速で印字する領域の幅)を計算し、
改行幅(行の先頭から次の行の先頭までの幅)が上記定
速印字幅を越えるかどうかをステップa2で判断する。越
えない場合、すなわち定速印字領域が次の定速印字領域
と一部重なる場合は、改行スペース幅がないので、ステ
ップa3で「定速印字ステップ数」だけをセットし、残り
の「換速ステップ数」、「定速送りステップ数」、「減
速ステップ数」を0にする。これにより、定速印字でそ
のまま進むことになる。
In the figure, if there is a line feed command, first step
Calculate the constant speed print width (width of the area printed at constant speed) with a 1 ,
Linefeed width (the width from the beginning of the line to the beginning of the next line) to determine if it exceeds the constant speed printing width in step a 2. If not exceeded, i.e. if the constant speed printing regions overlap portion and the next constant-speed printing area, because breaking space is no width, set only "constant-speed printing step number" in step a 3, the remaining "conversion The "speed step number", "constant speed feed step number", and "deceleration step number" are set to zero. As a result, constant speed printing is performed as it is.

一方、ステップa2において、改行幅が定速印字幅を越え
ると判断された時は、改行スペース幅があるとして、ス
テップa4に進む。ステップa4では、改行幅から定速印字
幅を減算することにより、改行スペース幅を求める。な
お、上記改行幅、定速印字幅、改行スペース幅等の領域
幅は、いずれもステップ数で求めてある。次にステップ
a5に進み、印字濃度に応じた最終レベルを計算し、この
最終レベルが上記改行スペース幅(ステップ数)に対し
妥当かどうかを確認する。すなわち、速度が1レベル遷
移するために必要な最小ステップ数(s)は予め決まっ
ているため(例えばs=4)、現在レベルと最終レベル
との間に例えばmレベルだけの差がある場合には、上記
改行スペース幅がs×mステップ以上であることが必要
であり、このような条件を満たしているかどうかを確認
する。続いてステップa6で、現在レベルおよび最終レベ
ルをセットする。
On the other hand, when it is determined in step a 2 that the line feed width exceeds the constant speed print width, it is determined that there is a line feed space width, and the process proceeds to step a 4 . In step a 4, by subtracting the constant speed printing width from line feed, determine the breaking space width. The area widths such as the line feed width, the constant speed print width, and the line feed space width are all obtained by the number of steps. Next step
Proceed to a 5 to calculate the final level according to the print density, and check whether this final level is appropriate for the line feed space width (step number). That is, since the minimum number of steps (s) required for the speed to shift by one level is predetermined (for example, s = 4), when there is a difference of only m levels between the current level and the final level, Requires the line feed space width to be s × m steps or more, and confirms whether such a condition is satisfied. Then in step a 6, to set the current level and final level.

次に、上記ステップa4〜a6で得られた改行スペース幅、
現在レベル、および最終レベルに基づき、ステップa7
最適曲線を求める。この処理は、まず、予めROM2内に格
納された曲線インデックステーブル(速度レベルが0〜
n−1の場合を第4図(a)に示す)を用いて、現在レ
ベルから最高速度レベルを経て最終レベルまで遷移する
際の速度の立上り(加速)および立下り(減速)に必要
な最小ステップ数を求める。なお、上述のように、速度
が1レベル遷移するために必要な最小ステップ数は決ま
っており、例えば4ステップである。曲線インデックス
テーブルの具体的な使用方法については、後述する。
Next, the line feed space width obtained in steps a 4 to a 6 above,
Based on the current level, and the final level, obtaining an optimum curve at step a 7. In this process, first, the curve index table (speed level 0 to
n-1 case is shown in Fig. 4 (a)), and the minimum required for speed rising (acceleration) and falling (deceleration) when transitioning from the current level to the final level through the maximum speed level. Calculate the number of steps. As described above, the minimum number of steps required for the speed to make one level transition is fixed, and is, for example, 4 steps. A specific method of using the curve index table will be described later.

上記加速および減速に必要な最小ステップ数が求まれ
ば、加速時に始点レベルと終点レベル、および減速時の
始点レベルと終点レベルが決まり、これにより最適曲線
(加速曲線および減速曲線)が決定する。最適曲線は、
その始点レベルをi、終点レベルをjとすれば、予めRO
M2内に格納された曲線アドレステーブル(速度レベルが
0〜n−1の場合を第4図(c)に示す)の中から、曲
線アドレスCURVi,j(0≦i、j≦n−1)として取出
される。曲線アドレステーブル内の各曲線アドレスCURV
i,jは、第5図に示したそれぞれの遷移曲線に対応して
いる。
If the minimum number of steps required for the acceleration and deceleration is obtained, the starting point level and the ending point level during acceleration, and the starting point level and the ending point level during deceleration are determined, and the optimum curves (acceleration curve and deceleration curve) are determined accordingly. The optimum curve is
If the starting level is i and the ending level is j, then RO
Curve address CURV i, j (0 ≦ i, j ≦ n−1) is selected from the curve address table stored in M2 (the case where the speed level is 0 to n−1 is shown in FIG. 4 (c)). ) Is taken out. Each curve address CURV in the curve address table
i and j correspond to the respective transition curves shown in FIG.

以上のようにして最適曲線(曲線アドレスCURVi,j)が
求まったら、CPU1は、第3図(b)に基づき、予めROM2
内に格納されたタイムテーブル(第4図(d))の中か
ら上記曲線アドレスCURVi,jに入っている時間データを
取出し(ステップb1)、モータ12のタイマセットを行う
(ステップb2)。これによりモータ12が最適曲線に沿っ
て駆動される。
When the optimum curve (curve address CURV i, j ) is obtained as described above, the CPU 1 reads the ROM2 in advance based on FIG. 3 (b).
Stored timetable within the curve address CURV i from among (FIG. 4 (d)), extracts the time data contained in j (step b 1), performs the timer setting of the motor 12 (step b 2 ). As a result, the motor 12 is driven along the optimum curve.

なお、上記タイムテーブルは、曲線アドレスCURVi,j
対応する遷移曲線を各ステップ間の時間間隔からなる一
連の時間データで表わしたものであり、アドレスCURV
i,jには速度レベルがiからjまで達するのに必要な最
小ステップ数に等しい数の時間データが入っている。例
えば、CURV0,0、CURV1,1、・・・・・・・、CURV
n−1,n−1には、速度レベルの変化がない(定速)た
め、それぞれ1個の時間データが入っている。CURV0,1
には、速度レベルが0から1まで達するのに必要な最小
ステップ数をkとすると、k個の時間データT0,0、T
0,1、・・・、T0,k−1が入っている。また、CURVi,j
とCURVj,iには、互いに同じ個数の時間データが互いに
逆方向に並んで入っている。
The above time table represents the transition curve corresponding to the curve address CURV i, j as a series of time data consisting of time intervals between steps.
i, j contains a number of time data equal to the minimum number of steps required for the velocity level to reach from i to j. For example, CURV 0,0 , CURV 1,1 , ..., CURV
Since there is no change in the speed level (constant speed) , n-1 and n-1 each contain one piece of time data. CURV 0,1
Where k is the minimum number of steps required for the velocity level to reach 0 to 1, k time data T 0,0 , T
0 , 1 , ..., T 0, k−1 are included. Also, CURV i, j
And CURV j, i contain the same number of time data arranged in opposite directions.

プリンタの改行時には、以上のようにしてモータ12が駆
動されるが、前述した最適曲線を求める処理の具体例に
ついて、第3図(c)を用いて説明する。
The motor 12 is driven as described above at the time of line feed of the printer. A specific example of the above-described processing for obtaining the optimum curve will be described with reference to FIG.

まず、改行命令があった場合に、ステップc1で改行幅l
=0がどうか、すなわち今回の印字領域と次回の印字領
域とが重なり合っているかどうかを確認する。l=0で
あればステップc2に進み、速度レベルL1=L2=L3=0に
する。ここで、速度レベルL1、L3はそれぞれ前述した現
在レベル、最終レベルであり、速度レベルL2は改行時に
取り得る最高の速度レベルである。L1、L2、L3はすべて
0にされることにより、n段(ここではn=8とする)
の速度レベルのうちの最低のレベルに設定される。すな
わちモータの速度は変化せずそのまま一定となる。
First, if there is a line feed command, in step c 1 the line feed width l
= 0, that is, whether the print area of this time and the print area of the next time overlap with each other is confirmed. If l = 0, the process proceeds to step c 2 to set the speed level L 1 = L 2 = L 3 = 0. Here, the speed levels L 1 and L 3 are the above-mentioned current level and final level, respectively, and the speed level L 2 is the maximum speed level that can be taken at the time of line feed. Since L 1 , L 2 and L 3 are all set to 0, n stages (here, n = 8)
Is set to the lowest of the speed levels. That is, the motor speed does not change and remains constant.

ステップc1においてl≠0であれば、ステップc3でlが
定数(改行の最大幅)を越えているかどうかを判断し、
越えていない時だけステップc4に進む。ステップc4
は、定速印字幅をモータのステップ数で計算し、これを
Aに入れる。続いて、ステップc5で、Aがlよりも大き
いかどうか、すなわち定速印字幅の方が改行幅よりも大
きいかどうかを判断する。l<Aの場合は、改行スペー
スがないとしてステップc6に進み、Aにlを入れると共
に、B=C=D=0にし、ステップc2に移る。ここで、
A、B、C、Dは、それぞれ定速印字ステップ数、加速
ステップ数、定速送りステップ数、減速ステップ数を表
わしている。すなわちステップc6では、改行スペースが
ないことから、定速印字のためのステップ数だけを設定
する。
If l ≠ 0 in step c 1 , it is determined in step c 3 whether l exceeds a constant (maximum width of line feed),
Proceed to step c 4 only if not exceeded. In step c 4 , the constant speed print width is calculated by the number of steps of the motor, and this is put in A. Then, in step c 5 , it is determined whether A is larger than l, that is, whether the constant speed print width is larger than the line feed width. For l <A, the process proceeds to step c 6 as no breaking space, together put l to A, to B = C = D = 0, the procedure proceeds to step c 2. here,
A, B, C, and D represent the constant speed printing step number, the acceleration step number, the constant speed feeding step number, and the deceleration step number, respectively. That is, in step c 6, since there is no breaking space is set only the number of steps for the constant speed printing.

ステップc5においてl≧Aの場合は、改行スペースがあ
るとしてステップc7に進み、L3に入っている前回の最終
レベルを今回の現在レベルとしてL1に入れる。続いてc8
で、lからAを減算することにより、改行スペース幅を
求め、この値をlに入れる。次にステップc9で次行の印
字が可能かどうか、すなわち次行の印字データがあるか
どうかを判断し、印字不可能であればステップc10で最
終レベルL3=0とし、ステップc13に進む。印字可能で
あれば、ステップc11で印字デューティを計算し、その
結果に基づいて最終レベルL3を求める。その後、ステッ
プc12でL3=0かどうかを判断し、L3≠0であればステ
ップc13に進む。ステップc13では、現在レベルL1から最
終レベルL3に至るのに必要なステップ数が改行スペース
内にあるかどうかを判断する。必要なステップ数があれ
ばそのままステップc16に進む。必要なステップ数がな
ければステップc14に移って、改行スペース分のステッ
プ数で遷移可能な速度レベルをL3に入れ、これをワーク
(WORK)領域に格納した後にステップc16に進む。一
方、ステップc12においてL3=0で次行が用紙送りだけ
の場合は、ステップc15で次行のステップ数を改行スペ
ース幅lに加えてからステップc16に進む。
If l ≧ A in step c 5 , it is determined that there is a line feed space, and the process proceeds to step c 7 , and the last final level in L 3 is entered in L 1 as the current current level. Then c 8
Then, the line feed space width is obtained by subtracting A from l, and this value is put into l. Next, in step c 9, it is determined whether the next line can be printed, that is, whether there is print data for the next line. If printing is not possible, the final level L 3 = 0 is set in step c 10 , and step c 13 Proceed to. Printing possible, the print duty calculated in step c 11, obtaining the final level L 3 based on the results. After that, in step c 12 , it is determined whether or not L 3 = 0. If L 3 ≠ 0, the process proceeds to step c 13 . In step c 13, it determines whether the number of steps required to reach the current level L 1 to the last level L 3 is in line feed space. If there is a required number of steps, proceed directly to step c 16 . Without the number of steps required shifts to step c 14, a transition can speed level taking into L 3 in the number of steps of breaking space component, the process proceeds to this step c 16 after stored in the work (WORK) region. On the other hand, if the next line in the L 3 = 0 in step c 12 only paper feed proceeds from the addition of the number of steps of the next line to the line feed space width l in step c 15 to step c 16.

ステップc16では、現在レベルL1から最終レベルL3まで
至るのに必要な最小ステップ数を改行スペース幅lから
減じ、その値をlに入れる。続いてステップc17で、上
記減算値lが0よりも大きいかどうか、すなわち加速で
きるだけの改行スペースあるかどうかを判断し、l≦0
の場合だけステップc18で加速ステップ数Bおよび減速
ステップ数Dを0としてから、ステップC19に進む。
At step c 16 , the minimum number of steps required to reach the current level L 1 to the final level L 3 is subtracted from the line feed space width l, and the value is put into l. Followed by step c 17, whether the subtraction value l is greater than 0, that is, whether there newline space to accelerate, l ≦ 0
The acceleration step number B and the deceleration step number D from a 0 in the case of only step c 18, the process proceeds to step C 19.

ステップc19では、前述した曲線インデックスステーブ
ル(速度レベルが0〜n−1の場合を第4図(a)に、
その一例としてn=8とした場合を同図(b)に示し
た)を用いて各ステップ数(加速ステップ数B、定速送
りステップ数C、減算ステップ数D)を求める。
In step c 19 , the above-mentioned curve index stable (when the speed level is 0 to n−1 is shown in FIG.
As an example thereof, the case where n = 8 is shown in FIG. 7B) is used to obtain each step number (acceleration step number B, constant speed feed step number C, subtraction step number D).

一例として、現在レベルL1=1、最終レベルL3=5、改
行スペース幅l=35ステップであり、1レベル遷移する
のに必要な最小ステッフ数が4である場合について考え
る。この場合は、先ず速度レベルL1=1からL2=7(最
高速度レベル)を経てL3=5に至ることができるかどう
かを判断する。まず第4図(b)に示した曲線インテッ
クスステーブルの縦軸「1」と横軸「7」との交点が
「6」であることから、L1=1からL2=7に遷移するに
は、最低6×4=24ステップ必要であることがわかる。
続いて縦軸「7」と横軸の「5」との交点が「2」であ
ることから、L2=7からL3=5に遷移するには最低2×
4=8ステップ必要であることがわかる。これらのこと
から加速および減速には少なくとも24+8=32ステップ
必要であることがわかり、これと比較して改行スペース
幅l=35ステップに余裕がある(32<35)ことから、速
度レベルL2=7による定速送りステップ数を35=32=3
ステップと決めることができる。以上のことから、加速
ステップB=24、定速(速度レベル7)送りステップC
=3、減速ステップD=8ステップと設定することによ
り、改行スペース内でL1=1からL2=7を経てL3=5に
至ることができる。
As an example, consider a case where the current level L 1 = 1, the final level L 3 = 5, the line feed space width l = 35 steps, and the minimum number of steps required to make one level transition is 4. In this case, it is first judged whether or not the speed level L 1 = 1 can be reached to L 2 = 7 (maximum speed level) to L 3 = 5. First, since the intersection point of the vertical axis “1” and the horizontal axis “7” of the curve intex table shown in FIG. 4 (b) is “6”, transition from L 1 = 1 to L 2 = 7. It can be seen that at least 6 × 4 = 24 steps are required.
Then, since the intersection of the vertical axis “7” and the horizontal axis “5” is “2”, at least 2 × is required to transition from L 2 = 7 to L 3 = 5.
It can be seen that 4 = 8 steps are required. From these, it can be seen that at least 24 + 8 = 32 steps are required for acceleration and deceleration. Compared with this, there is a margin in the line feed space width l = 35 steps (32 <35), so the speed level L 2 = 35 = 32 = 3 for constant speed feed step by 7
It can be decided as a step. From the above, acceleration step B = 24, constant speed (speed level 7) feed step C
= 3 and deceleration step D = 8 steps, it is possible to reach L 3 = 5 from L 1 = 1 to L 2 = 7 in the line feed space.

もし、改行スペース幅lが32ステップ未満(例えば30ス
テップとする)である場合は、定速送りレベルL2を1レ
ベル下げて6(=7−1)とし、同様にして加速(L1
1からL2=6へ)および減速(L2=6からL3=5へ)の
ステップ数を求める。すると、加速には5×4=20ステ
ップ、減速には1×4=4ステップ必要であることがわ
かるので、定速送りには30−(20+4)=6ステップ与
えることができる。他の場合であっても、以上と同様に
してステップ数を求めることができる。
If the line feed space width l is less than 32 steps (for example, 30 steps), the constant speed feed level L 2 is lowered by 1 level to 6 (= 7-1), and similarly accelerated (L 1 =
Calculate the number of steps from 1 to L 2 = 6) and deceleration (from L 2 = 6 to L 3 = 5). Then, it can be seen that 5 × 4 = 20 steps are required for acceleration and 1 × 4 = 4 steps are required for deceleration, so 30− (20 + 4) = 6 steps can be given for constant speed feeding. Even in other cases, the number of steps can be obtained in the same manner as above.

ステップc19で各ステップ数B、C、Dが得られたら、
ステップc20に進む。ここでは、ステップc19においてL1
=L3の条件の時加速ステップ数Bもしくは減速ステップ
数Dの一方だけが0に設定された場合に、その不合理を
是正するため、0でない方とステップ数を定速送りステ
ップ数Cに加え、BおよびDをいずれも0にする。
When step numbers B, C, and D are obtained in step c 19 ,
The process proceeds to step c 20. Here, in step c 19 , L 1
When only one of acceleration step number B or deceleration step number D is set to 0 under the condition of = L 3 , the non-zero one and the step number are set to constant speed feed step number C to correct the irrationalities. In addition, both B and D are set to 0.

以上のようにしてステップ数B、C、Dの割振りが終了
したらステップc21に進み現在レベルL1、定速送りレベ
ルL2、最終レベルL3に基づき、第4図(c)に示した曲
線アドレステーブルの中から曲線アドレスCURVi,jを求
める。すなわち、(i,j)=(L1、L2)、(L2、L3)と
して得られる2つの曲線アドレスCURVi,jが、それぞれ
加速曲線、減速曲線に対応する。このようにして、改行
次の最適曲線を得ることができる。
Above way the number of steps by B, C, the current level L 1 proceeds to step c 21 When D allocation is completed, JOG level L 2, based on the final level L 3, as shown in Figure 4 (c) The curve address CURV i, j is obtained from the curve address table. That is, two curve addresses CURV i, j obtained as (i, j) = (L 1 , L 2 ) and (L 2 , L 3 ) correspond to the acceleration curve and the deceleration curve, respectively. In this way, the optimum curve after the line feed can be obtained.

次に、本実施例における上記処理によるモータ駆動の一
例を第6図(a)、(b)に示す。同図(a)は標準的
な遷移曲線を示しており、ここでは現在レベル0から加
速曲線r0,n−1に沿って最高レベルn−1に達し、そ
のまま最高レベルで定速送りされた後、減速曲線r
n−1,0(=−r0,n−1)に沿って最終レベル0に達し
ている。同図(b)は、現在レベルi(>0)から最終
レベル0に遷移す場合の遷移曲線を示しており、改行ス
ペースが十分にある場合は最高レベルn−1を経て最終
レベルまで達するが、改行スペースが狭くなるにつれて
最高レベルか低下し、定速送りを経ずに加速および減速
曲線(あるいは減速曲線のみ)に沿って遷移が行われる
ようになる。このように印字濃度に応じてn個の速度レ
ベルが設定されると共に、各レベルおよび改行スペース
幅に応じた最適な曲線が選択される。
Next, an example of the motor drive by the above processing in the present embodiment is shown in FIGS. 6 (a) and 6 (b). FIG. 7A shows a standard transition curve, in which the current level 0 reaches the maximum level n−1 along the acceleration curve r 0, n−1 and the constant speed feed is performed at the maximum level. After that, the deceleration curve r
The final level 0 is reached along n−1,0 (= −r 0, n−1 ). FIG. 7B shows a transition curve when the current level i (> 0) transits to the final level 0. When the line feed space is sufficient, the final level is reached through the highest level n-1. As the line feed space becomes narrower, the maximum level drops, and the transition is made along the acceleration and deceleration curves (or only the deceleration curve) without constant feed. Thus, n speed levels are set according to the print density, and the optimum curve is selected according to each level and the line feed space width.

以上説明したように本実施例では、プリンタの改行時に
滑らかな正規分布曲線に沿ってモータの加減速を行うよ
うにしたので、従来の急激な加減速に伴う騒音や振動等
を著しく減少することができ、これに伴い印字品質の向
上が実現される。また、各種テーブルを使用して演算処
理の簡略化を図ることができるため、従来は2個必要で
あったCPUをたった1個で済ませることができ、これに
伴い装置構成が簡単になり、低価格化が実現される。
As described above, in this embodiment, since the motor is accelerated and decelerated along a smooth normal distribution curve when the printer feeds a line, the noise and vibration associated with the conventional rapid acceleration and deceleration can be significantly reduced. The printing quality can be improved accordingly. Also, since various tables can be used to simplify the arithmetic processing, it is possible to use only one CPU, which previously required two CPUs, which simplifies the device configuration and reduces the cost. Price realization is realized.

なお、上記実施例では、遷移曲線として正規分布曲線を
用いたが、加減速時に滑らかに変化する曲線であれば、
正規分布曲線以外の曲線であってもよい。また、比較的
慣性モーメントの小さい機構に於いては、上記実施例の
駆動方式によって滑らかなモータ駆動が可能であった
が、慣性モーメントが大きくなるにつれて加速曲線と減
速曲線の対称性がくずれるため、第7図に示すような非
対称の曲線を用いる必要がある。これは、上記実施例の
手法に補正を加えて実現できる。
In the above embodiment, a normal distribution curve is used as the transition curve, but if it is a curve that changes smoothly during acceleration / deceleration,
It may be a curve other than the normal distribution curve. Further, in the mechanism having a relatively small moment of inertia, smooth motor driving was possible by the driving method of the above-mentioned embodiment, but the symmetry of the acceleration curve and the deceleration curve collapses as the moment of inertia increases, It is necessary to use an asymmetric curve as shown in FIG. This can be realized by adding a correction to the method of the above embodiment.

また本発明は、サーマルプリンタ以外であっても、ステ
ップモータを使用する各種の装置に適用できるものであ
る。
Further, the present invention can be applied to various devices using a step motor other than the thermal printer.

〔発明の効果〕〔The invention's effect〕

本発明のモータ駆動方式によれば、モータの加速および
減速が最適曲線に沿って行われるので、非常に滑らかな
加減速が可能になり、従ってモータの加減速時の騒音や
振動を著しく低減することができる。
According to the motor drive system of the present invention, since the acceleration and deceleration of the motor are performed along the optimum curve, very smooth acceleration / deceleration is possible, and therefore noise and vibration during the acceleration / deceleration of the motor are significantly reduced. be able to.

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

第1図は本発明の一実施例を適用したサーマルラインプ
リンタの回路ブロック図、 第2図は同実施例における主要な処理の流れを示すブロ
ック図、 第3図(a)は、同実施例における最適曲線を求める処
理を示すフローチャート、 第3図(b)は同実施例におけるモータのタイマセット
を行う処理を示すフローチャート、 第3図(c)は同実施例における最適曲線を求める処理
の具体例を示すフローチャート、 第4図(a)、(b)、(c)、(d)はそれぞれ上記
処理で使用する曲線インデックステーブル、曲線インデ
ックステーブルの一例、曲線アドレステーブル、タイム
テーブルを示す図、 第5図は同実施例で使用する遷移曲線の一例を示す図、 第6図(a)および(b)は同実施例におけるモータの
駆動例を示す図、 第7図は本発明の他の実施例に係る加減速曲線(慣性モ
ーメントが大きな負荷の場合)を示す図、 第8図は従来におけるモータの駆動例を示す図である。 1……CPU、 2……ROM、 3……RAM、 12……モータ。
FIG. 1 is a circuit block diagram of a thermal line printer to which an embodiment of the present invention is applied, FIG. 2 is a block diagram showing a main processing flow in the embodiment, and FIG. FIG. 3 (b) is a flowchart showing the process for obtaining the optimum curve in FIG. 3, FIG. 3 (b) is a flowchart showing the process for setting the motor timer in the same embodiment, and FIG. A flowchart showing an example, FIGS. 4A, 4B, 4C, and 4D show a curve index table used in the above processing, an example of a curve index table, a curve address table, and a time table, respectively. FIG. 5 is a diagram showing an example of a transition curve used in the same embodiment, FIGS. 6 (a) and 6 (b) are diagrams showing an example of driving a motor in the same embodiment, and FIG. Shows the acceleration and deceleration curve according to another embodiment of the invention (when the inertia moment of the heavy load), FIG. 8 is a diagram showing an example of driving the motor in the prior art. 1 ... CPU, 2 ... ROM, 3 ... RAM, 12 ... motor.

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 昭63−305796(JP,A) 特開 昭63−157698(JP,A) 特開 昭62−285862(JP,A) 特開 昭62−221899(JP,A) 特開 昭61−9197(JP,A) 実開 昭54−618(JP,U) ─────────────────────────────────────────────────── ─── Continuation of the front page (56) References JP-A-63-305796 (JP, A) JP-A-63-157698 (JP, A) JP-A-62-285862 (JP, A) JP-A-62- 221899 (JP, A) JP-A-61-9197 (JP, A) Actually developed 54-618 (JP, U)

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】可動対象を動かすために複数の速度レベル
の中のいずれかの速度レベルで定速駆動されるステップ
モータを、前記複数の速度レベルの中の任意の第1の速
度レベルから任意の第2の速度レベルに任意のステップ
数で遷移させるためのモータ駆動方式において、 前記複数の速度レベルの中で組み合わせ可能な2つの速
度レベル間の全てについて、該2つの速度レベル間を最
小のステップ数で連続的かつ滑らかに遷移し得る遷移曲
線を予め求めておき、 前記第1の速度レベルから前記第2の速度レベルへの遷
移に必要な前記任意のステップ数と、前記遷移曲線によ
る遷移に必要な前記最小のステップ数とに基づき、前記
第1の速度レベルから前記第2の速度レベルへの遷移中
に取り得る最高速度レベルを決定し、 前記全ての遷移曲線の中から、前記第1の速度レベルか
ら前記最高速度レベルまで上昇する遷移曲線を最適加速
曲線として選択すると共に、前記最高速度レベルから前
記第2の速度レベルまで加工する遷移曲線を最適減速曲
線として選択し、 前記ステップモータの速度を、前記第1の速度レベルか
ら前記最適加速曲線を経て前記最高速度レベルに遷移さ
せた後、該最高速度レベルから前記最適減速曲線を経て
前記第2の速度レベルに遷移させることを特徴とするモ
ータ駆動方式。
1. A step motor, which is driven at a constant speed at any one of a plurality of speed levels to move a movable object, from any first speed level of the plurality of speed levels. In the motor drive method for making a transition to the second speed level of the above in any number of steps, for all of the two speed levels that can be combined in the plurality of speed levels, the minimum speed between the two speed levels is minimized. A transition curve capable of continuous and smooth transition with the number of steps is previously obtained, and the arbitrary number of steps required for the transition from the first speed level to the second speed level and the transition with the transition curve Determining the maximum possible speed level during the transition from the first speed level to the second speed level, based on the minimum number of steps required for From among the above, a transition curve that rises from the first speed level to the maximum speed level is selected as an optimum acceleration curve, and a transition curve that processes from the maximum speed level to the second speed level is set as an optimum deceleration curve. And changing the speed of the stepping motor from the first speed level to the maximum speed level via the optimum acceleration curve, and then from the maximum speed level to the second speed level via the optimum deceleration curve. A motor drive method characterized by switching to.
【請求項2】前記遷移曲線を各ステップ間の時間間隔か
らなる時間データで表したタイムテーブルを予め作成
し、該タイムテーブルの中から前記最適加速曲線及び前
記最適減速曲線に対応した時間データを取り出すことを
特徴とする特許請求の範囲第1項記載のモータ駆動方
式。
2. A timetable in which the transition curve is represented by time data consisting of time intervals between steps is created in advance, and time data corresponding to the optimum acceleration curve and the optimum deceleration curve is selected from the timetable. The motor drive system according to claim 1, wherein the motor drive system is taken out.
【請求項3】前記遷移曲線は正規分布曲線であることを
特徴とする特許請求の範囲第2項記載のモータ駆動方
式。
3. The motor drive system according to claim 2, wherein the transition curve is a normal distribution curve.
【請求項4】前記可動対象は、サーマルプリンタにおけ
る印字用紙であることを特徴とする特許請求の範囲第1
項乃至第3項のいずれか1つに記載のモータ駆動方式。
4. The movable object is a printing sheet in a thermal printer.
The motor drive system according to any one of items 1 to 3.
【請求項5】前記複数の速度レベルは、前記サーマルプ
リンタにおける印字濃度に応じて決定されることを特徴
とする特許請求の範囲第4項記載のモータ駆動方式。
5. The motor drive system according to claim 4, wherein the plurality of speed levels are determined according to print density in the thermal printer.
【請求項6】前記遷移の伴う前記ステップ数は前記サー
マルプリンタにおける改行スペース幅分のステップ数で
あることを特徴とする特許請求の範囲第4項または第5
項記載のモータ駆動方式。
6. The method according to claim 4 or 5, wherein the number of steps involved in the transition is the number of steps corresponding to the line feed space width in the thermal printer.
The motor drive method described in the item.
JP15149087A 1987-06-19 1987-06-19 Motor drive system Expired - Fee Related JPH07106079B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP15149087A JPH07106079B2 (en) 1987-06-19 1987-06-19 Motor drive system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP15149087A JPH07106079B2 (en) 1987-06-19 1987-06-19 Motor drive system

Publications (2)

Publication Number Publication Date
JPS63316700A JPS63316700A (en) 1988-12-23
JPH07106079B2 true JPH07106079B2 (en) 1995-11-13

Family

ID=15519636

Family Applications (1)

Application Number Title Priority Date Filing Date
JP15149087A Expired - Fee Related JPH07106079B2 (en) 1987-06-19 1987-06-19 Motor drive system

Country Status (1)

Country Link
JP (1) JPH07106079B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016210137A (en) * 2015-05-12 2016-12-15 Necプラットフォームズ株式会社 Printing method, printing data generation device, printer and printing program

Also Published As

Publication number Publication date
JPS63316700A (en) 1988-12-23

Similar Documents

Publication Publication Date Title
US5822499A (en) Method and apparatus for printing data in accordance with a previously set parameter regardless of currently specified parameters
JPH07106079B2 (en) Motor drive system
JP2001327194A (en) Pulse oscillation ic and motor positioning control method and device using the ic
JP4781946B2 (en) Printer apparatus and control method thereof
JPH0733105B2 (en) Ruled line printing method
JP2901526B2 (en) Character generator
JPH03220624A (en) Optimum control system for printer
JP4586270B2 (en) Printing device
JPH0831094B2 (en) Data processing device
JPS63159061A (en) Printer
JP3028812B2 (en) Printer device
JP3006956B2 (en) Printing equipment
JPS63230375A (en) Printer
JPH02253964A (en) Printer device
JPS59155083A (en) Controller for carrier-feeding stepping motor in printer
JPH0211369A (en) Printer
JP2005078458A (en) Image forming apparatus
JPH0236956A (en) Video printer device
JPH01215557A (en) Word processor
JPH03119418A (en) Page printer
JP2000301755A (en) Printing control device and memory medium
JPH04316876A (en) Printer
JPH0596784A (en) Printer device
JPH0546331A (en) Printer
GB2146817A (en) Printing apparatus

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees