JPH02290177A - Control of driving of servomotor for serial printer - Google Patents

Control of driving of servomotor for serial printer

Info

Publication number
JPH02290177A
JPH02290177A JP1107309A JP10730989A JPH02290177A JP H02290177 A JPH02290177 A JP H02290177A JP 1107309 A JP1107309 A JP 1107309A JP 10730989 A JP10730989 A JP 10730989A JP H02290177 A JPH02290177 A JP H02290177A
Authority
JP
Japan
Prior art keywords
servo motor
speed
carriage
processing
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP1107309A
Other languages
Japanese (ja)
Other versions
JP2758201B2 (en
Inventor
Motonori Kirihara
桐原 基範
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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry Co 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 Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP1107309A priority Critical patent/JP2758201B2/en
Publication of JPH02290177A publication Critical patent/JPH02290177A/en
Application granted granted Critical
Publication of JP2758201B2 publication Critical patent/JP2758201B2/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 Electric Motors In General (AREA)

Abstract

PURPOSE:To prevent the overshoot of a carriage speed due to a load fluctuation and the generation of the overrun error of CPU process by a method wherein the driving of a carriage driving motor is stopped when a limit speed is exceeded during sensor slit offering process from the carriage driving motor. CONSTITUTION:When a carriage speed V has exceeded a limit speed VC, the driving of a motor is cut off. The value of the speed VC is between the station ary speed VT of a carriage and an objective control speed V1 and is higher than the stationary speed VT of the carriage by about 5%. In the condition of V>=VC, a current conducted through the motor follows the ratio a background processing time, occupying in an unit time, to the processing time of an IPT.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明はシリアルプリンタのサーボモータ駆動制1′B
方法に関するものである。
Detailed Description of the Invention (Field of Industrial Application) The present invention is directed to a servo motor drive control system 1'B of a serial printer.
It is about the method.

(従来の技術) 従来、シリアルプリンタのサーボモータ駆動制御方法に
おいては、サーボモータの駆動it流値を次式に基づい
て算出した指令値にに従って決定している. すなわち、サーボモータの現在の回転速度をVとし、サ
ーボモータの制御目標値を■1とし、制御部における処
理能力に対応するサーボモータの回転速度の限界値をV
c  (vc <Vl )とし、サーボ系のゲインをG
としたとき、 V≦V,のとき K=( V,−V)  ・G Ve≦V<Vl (7)とき K=0 ■,≦Vのとき K=−( V.−V)C となる. (発明が解決しようとする課!i!!!)しかしながら
、上記構成のシリアルプリンタのサーボモータ駆動制御
方法においては、上記式の算出処理をファームウェア処
理によるバックグランド処理で行った場合、印字割込み
処理がバックグランド処理に優先して実行されるため、
負荷変動によりキャリッジ速度が速くなってオーバシュ
ートすると、バックグランド処理が実行される時間的な
余裕がなくなり、上記算出処理自体が実行されな《なる
.その結果、サーボモータの現在の回転速度が制御部に
おける処理能力に対応するサーボモータの回転速度の限
界値を超えて、vc≦V となっても指令値Kが0とならない.そして、モータが
停止されず、キャリンジの速度が増し暴走ずるなどの障
害が発生ずる場合がある.したがって、バックグランド
処理を十分実行することができるようにCPυ処理のマ
ージンを取る必要がある. ところが、キャリッジの負荷変動のバラツキは、温度、
湿度、mti部の精度等に依存し、ファームウエアの設
計時点において正確に予測することが困難であり、CP
IJ処理のマージンを必要以上に大きく取る必要がある
. 本発明は、上記従来のシリアルプリンタのサーボモータ
駆動制御方法の問題点を解決して、速度制御をファーム
ウエア処理によるバックグランド処理で行う場合、負荷
変動でキャリッジ速度がオーバシュートし、CPυ処理
のオーバランエラーが発生するのを防止し、過大なCP
U処理マージンの設定を不要にすることができる、シリ
アルプリンタのサーボモータ駆動制御方法を提供するこ
とを目的とする. (課題を解決するための手段) そのために、本発明のシリアルプリンタのサーボモータ
駆動制御方法は、サーボモータに供給する駆8電流を制
御してサーボモータの回転速度をプログラムにより制御
するシリアルプリンタのサーボモータ駆動制御方式にお
いて、サーボモータの現在の回転速度をVとし、サーボ
モータの制御目標値を■,とし、制御部における処理能
力に対応するサーボモータの回転速度の限界値をV,(
vc<vt)とし、サーボ系のゲインをGとしたとき、 V≦V1のとき、 K− (V,−V)C; V>Vlのとき、 K−− (V.−V)G に基づいて算出した指令値にに従ってサーボモータの駆
動電流値を決定するとともに、これをバックグランド処
理で実行し、 ■≧Vcのとき K=0 に基づいて算出した指令値にに従ってサーボモータの駆
動電流値を決定するとともに、これをサーボモータに取
り付けられたエンコーダから発生させた割込み信号によ
る割込み処理で実行する.(作用) 本発明によれば、上記のようにサーボモータの現在の回
転速度を■とし、サーボモータの制御目標値をV.とじ
、制御部における処理能力に対応するサーボモータの回
転速度の限界値をvc (v。〈v1)とし、サーボ系
のゲインをGとしたときに、 ■≦■1のとき、 K= (V,−V)G V>V,のとき、 K=−(V.−V)G に基づいて算出した措令値にに従ってサーボモータの駆
動電流値を決定するとともに、これをバックグランド処
理で実行し、 V≧Vcのとき K=0 に基づいて算出した指令値にに従ってサーボモータの駆
動電流値を決定するとともに、これをサーボモータに取
り付けられたエンコーダから発生させた割込み信号によ
る割込み処理で実行するようにしてあるので、キャリソ
ジの負荷変動によりオーバシュートが生じた場合でも、
ファームウエアの処理時間の限界を超えることがない。
(Prior Art) Conventionally, in a servo motor drive control method for a serial printer, a servo motor drive IT flow value is determined according to a command value calculated based on the following equation. That is, the current rotation speed of the servo motor is V, the control target value of the servo motor is 1, and the limit value of the rotation speed of the servo motor corresponding to the processing capacity of the control section is V.
c (vc < Vl), and the gain of the servo system is G
When V≦V, K=( V, -V) ・G When Ve≦V<Vl (7), K=0 ■, When ≦V, K=-( V.-V)C .. (The problem that the invention attempts to solve! is executed with priority over background processing,
If the carriage speed increases due to load fluctuations and overshoots, there is no longer enough time for background processing to be executed, and the above calculation process itself is not executed. As a result, even if the current rotational speed of the servomotor exceeds the limit value of the rotational speed of the servomotor corresponding to the processing capacity of the control unit and vc≦V, the command value K does not become 0. Then, the motor may not be stopped and the speed of the carriage increases, causing problems such as runaway movement. Therefore, it is necessary to provide a margin for the CPυ processing so that the background processing can be executed sufficiently. However, variations in carriage load fluctuations are caused by temperature,
It depends on humidity, accuracy of mti part, etc., and it is difficult to predict accurately at the time of firmware design.
It is necessary to provide a larger margin for IJ processing than necessary. The present invention solves the problems of the conventional servo motor drive control method for serial printers as described above, and when speed control is performed in background processing by firmware processing, the carriage speed overshoots due to load fluctuations and the CPυ processing is Prevents overrun errors from occurring and prevents excessive CP.
The purpose of this invention is to provide a servo motor drive control method for a serial printer that makes it unnecessary to set a U processing margin. (Means for Solving the Problems) For this purpose, the servo motor drive control method for a serial printer of the present invention is a serial printer that controls the drive current supplied to the servo motor to control the rotational speed of the servo motor by a program. In the servo motor drive control method, the current rotation speed of the servo motor is V, the control target value of the servo motor is
vc<vt) and the gain of the servo system is G. When V≦V1, K- (V, -V)C; when V>Vl, K-- (V.-V)G. The drive current value of the servo motor is determined according to the command value calculated based on the command value, and this is executed in background processing. ■When ≥Vc, the drive current value of the servo motor is determined according to the command value calculated based on This is executed by interrupt processing using an interrupt signal generated from the encoder attached to the servo motor. (Function) According to the present invention, as described above, the current rotational speed of the servo motor is set to ■, and the control target value of the servo motor is set to V. When the limit value of the rotational speed of the servo motor corresponding to the processing capacity of the control unit is vc (v.<v1), and the gain of the servo system is G, when ■≦■1, K= (V , -V)G When V>V, the drive current value of the servo motor is determined according to the command value calculated based on K=-(V.-V)G, and this is executed in background processing. , When V≧Vc, the drive current value of the servo motor is determined according to the command value calculated based on K=0, and this is executed by interrupt processing using an interrupt signal generated from the encoder attached to the servo motor. Therefore, even if overshoot occurs due to load fluctuation of the cartridge, the
Firmware processing time limits are not exceeded.

(実施例) 以下、本発明の実施例について図面を参照しながら詳細
に説明する. 第2図は、本発明のシリアルプリンタのサーボモータ駆
動制御方法が適用されるシリアルドットプリンタの概略
構造図である。
(Example) Hereinafter, an example of the present invention will be described in detail with reference to the drawings. FIG. 2 is a schematic structural diagram of a serial dot printer to which the servo motor drive control method for a serial printer of the present invention is applied.

図において、シリアノレドットフ゜リンタのキ中リッジ
部11には印字ヘッド12が実装され、キャリッジシャ
フト10に移動可能に取着されている.DCサーボモー
タ8の軸にはドライブギャl3が固着されており、該ド
ライブギャl3とアイドルプーl715間にはドライブ
ベルト9が張設されている.上記キャリソジ部11は該
ドライブベルト9に対し固着されている。
In the figure, a print head 12 is mounted on a central ridge portion 11 of a Syrian dot printer, and is movably attached to a carriage shaft 10. A drive gal 13 is fixed to the shaft of the DC servo motor 8, and a drive belt 9 is stretched between the drive gal 13 and the idle pulley 1715. The carriage body 11 is fixed to the drive belt 9.

上記DCサーボモータ8の後部には、モータ軸に固着さ
れたスリソト円仮16とフォトセンサl4からなるエン
コーダl7が取り付けられていて、該スリット円板l6
には複数のスリットが形成されている。
At the rear of the DC servo motor 8, an encoder l7 consisting of a slit disk 16 fixed to the motor shaft and a photosensor l4 is attached, and the slit disk l6
A plurality of slits are formed in the.

上記スリノト円板l6とフォトセンサl4は、2相エン
コーダを構成していて、一定の位相差をもつ二つのパル
ス信号をDCサーボモータ8の一定の回転角度ごとに出
力する。この出力によりDCサーボモータ8の回転速度
、回転角度、回転方向を検出することができる. 第1図は、本発明のシリアルプリンタのサーボモータ駆
動制御方法により、上記DCサーポモータ8を回転させ
、キャリンジ部l1を移動させるための制御回路ブロッ
ク回である。
The Surinoto disc l6 and the photosensor l4 constitute a two-phase encoder, which outputs two pulse signals having a constant phase difference at every constant rotation angle of the DC servo motor 8. This output allows the rotation speed, rotation angle, and rotation direction of the DC servo motor 8 to be detected. FIG. 1 is a block diagram of a control circuit for rotating the DC servo motor 8 and moving the carriage portion l1 according to the servo motor drive control method for a serial printer of the present invention.

この制111回路は、マイクロプロセッサ1、マイクロ
プロセノサ1により実行されるプログラムを格納するR
OM ( リードオンリメモリ)2,プログラムにより
処理されるデータを格納するRAM (ランダムアクセ
スメモリ)3、モータ駆動回路5及び速度検出/割込み
発生回路6で構成されている.上記モーク駆動回路5は
、DCサーボモータ8を回転させる駆動信号を送出する
もので、例えば第3図に示すような回路で構成される. 上記モータ駆動回路5によるとフォワード回転指令F〇
一信号及びリバースH転指令REV信号を与えてDCサ
ーボモータ8の回転方向を設定するとともに、デューテ
ィ量設定信号によりDCサーボモータ8に流れる電流を
制?ILて後述するデエーティ量を設定することができ
る。
This control circuit 111 is an R
It consists of an OM (read only memory) 2, a RAM (random access memory) 3 that stores data processed by a program, a motor drive circuit 5, and a speed detection/interrupt generation circuit 6. The moke drive circuit 5 sends out a drive signal to rotate the DC servo motor 8, and is composed of a circuit as shown in FIG. 3, for example. According to the motor drive circuit 5, the rotation direction of the DC servo motor 8 is set by giving the forward rotation command F〇1 signal and the reverse H rotation command REV signal, and the current flowing to the DC servo motor 8 is controlled by the duty amount setting signal. ? It is possible to set the amount of deity, which will be described later, using IL.

つまり、第4図に示すように、デューティ量を100に
設定する場合にはデューティ量設定信号をON状態に保
持し、DCサーボモータ8に流れる電流は最大となる.
また、デューティ量を50に設定する場合には、デュー
ティ量設定信号のON状態とOFF状態を同一時間にし
、断続的にON−OFFさせる.この時DCサーボモー
タ8に流れる電流は最大電流の50χとなる.さらに、
デューティ費をOに設定する場合にはデューティ量設定
信号をOFFにし、DCサーポモーク8に流れる電流を
Oとする.このように、ON,OFFそれぞれの時間を
変えてデューティ盪設定信号を断続的にON−OFFす
ることにより、DCサーボモータ8に流れる電流を変化
させてOCサーボモータ8のトルクを任意に設定するこ
とかできる. 次に、速度検出/割込み発生回路6を構成するエッシハ
ルス発生回路を第5図、該エッジパルス一 発生回路のタイムチャートを第6図に示す.該エッジパ
ルス発生回路5lは、DCサーボモータ8の速度を検出
するため、エンコーダl7からの二相信号φA及びφB
の立ち上がり及び立ち下がりエッジを検出して、それぞ
れのエッジに対応したパルスを発生させる回路である.
すなわち、第6図に示すように、φAの立ち上がり及び
立ち下がりエッジよりゲートl出力が、φBの立ち上が
り及び立ち下がりエノジからゲート2出力が得られ、該
ゲー}1出力及びゲート2出力がゲート3に入力されエ
ッジパルスが出力される. 第7図は速度検出回路を示す図、第8図は該速度検出回
路のタイムチャートである. 図において、速度検出回路71は、上記エッジパルス発
生回路5lで発生させたエッジパルスの間隔を一定のク
ロックでカウントすることによりエッジパルス間隔の時
間を測定するためのものである.測定された時間は、8
ビットバイナリカウンタ72及び8ビットラッチ回路7
3を介して出力される.ここで、スリットセンサからの
信号φA,  φBをもとにして発生するエッジパルス
間に対応する時間内にキャリ・フジが移動する距離をl
とすると、lはセンサスリット゛の物理的な大きさで決
まる定数となる.よってキャリッジの移動速度Vはv−
17(Nx tctw ) となる.ここで、 N:エッジパルス間のカウント数(クロック数)tcl
:  1クロックの時間 である. 続いて、第9図に割込み発生回路を、第10図に割込み
発生回路のフローチャートを示す.割込み発生回路9l
はファームウェアの印字処理を起動するためのIP?信
号を発生させるものであり、印字の密度に応じてエッジ
パルスがカウントされ出力される. すなわち、エッジパルスが1/480’に1回出力され
るようなエンコーダを使用した場合、120 ドット/
インチのドット密度で印字しようとすれば、IP?出力
はエッジパルス4回に1回の割合で出力する必要がある
.よって第9図に示すようにマイクロプロセッサにより
設定可能なオートリロードカウンタによりIP?信号を
得る。
That is, as shown in FIG. 4, when setting the duty amount to 100, the duty amount setting signal is held in the ON state, and the current flowing through the DC servo motor 8 becomes maximum.
Further, when setting the duty amount to 50, the ON state and OFF state of the duty amount setting signal are set to be the same time, and the duty amount setting signal is turned ON and OFF intermittently. At this time, the current flowing through the DC servo motor 8 is the maximum current of 50χ. moreover,
When setting the duty cost to O, the duty amount setting signal is turned OFF and the current flowing through the DC servo moke 8 is set to O. In this way, by intermittently turning ON and OFF the duty setting signal by changing the ON and OFF times, the current flowing through the DC servo motor 8 is changed, and the torque of the OC servo motor 8 can be arbitrarily set. I can do it. Next, FIG. 5 shows the Essihalus generation circuit constituting the speed detection/interrupt generation circuit 6, and FIG. 6 shows a time chart of the edge pulse generation circuit. The edge pulse generation circuit 5l receives two-phase signals φA and φB from the encoder l7 in order to detect the speed of the DC servo motor 8.
This circuit detects the rising and falling edges of , and generates pulses corresponding to each edge.
That is, as shown in FIG. 6, the gate l output is obtained from the rising and falling edges of φA, the gate 2 output is obtained from the rising and falling edges of φB, and the gate 1 and gate 2 outputs are obtained from the gate 3. is input and an edge pulse is output. FIG. 7 is a diagram showing the speed detection circuit, and FIG. 8 is a time chart of the speed detection circuit. In the figure, a speed detection circuit 71 is for measuring the time between edge pulses by counting the interval between edge pulses generated by the edge pulse generating circuit 5l using a constant clock. The measured time is 8
Bit binary counter 72 and 8-bit latch circuit 7
Output via 3. Here, the distance that the carry Fuji moves within the time corresponding to the edge pulses generated based on the signals φA and φB from the slit sensor is expressed as l.
Then, l is a constant determined by the physical size of the sensor slit. Therefore, the moving speed V of the carriage is v-
17(Nx tctw). Here, N: number of counts (number of clocks) between edge pulses tcl
: The time is one clock. Next, FIG. 9 shows the interrupt generation circuit, and FIG. 10 shows the flowchart of the interrupt generation circuit. Interrupt generation circuit 9l
Is this the IP for starting the firmware printing process? It generates a signal, and edge pulses are counted and output according to the printing density. In other words, if you use an encoder that outputs an edge pulse once every 1/480', 120 dots/
If you want to print with inch dot density, IP? It is necessary to output the output at a rate of once every four edge pulses. Therefore, as shown in FIG. 9, the IP? Get a signal.

以上のような構成のプリンタにおいて、バックグランド
処理とIPT処理の関係を第11図に、キャリンジの速
度を制御するプログラムのフローチャートを第12図及
び第13図に示す. 第!l図において、バックグランド処理はループになっ
ており常に走っている。一方、IP↑処理は、第10図
に示すようにキャリッジの走行速度及び印字密度に依存
し、バックグランド処理に対し非同期で割り込んでくる
. 上記プログラム構造において、キャリッジ速度の制御は
バックグランド処理で行う.第12図にバックグランド
処理中の速度制御のフローチャートを示す. ステップ■ 速度検出装iff71 (第7図参照)か
らカウント値Nを読み出す. ステップ■ 読み出したカウント値Nよリキャリッジ速
度Vを算出する. V = j! /(N X tctx )ステップ■ 
現在のキャリフジ速度Vと、キャリッジ速度制御におい
て目標とするvIとの大小関係を判定する. ステップ■ V≦V. である場合、キャリッジ速度が目標速度に到達していな
いので、加速トルクを加える処理を行う.すなわち、目
標速度V,とキャリッジ達度Vの速度差を求め、系のゲ
インGを乗じて加速トルクの大きさKを算出する. ステップ■ V>V, である場合、キャリッジ速度が目標速度を上回っている
ので、減速トルクを加える処理行う.すなわち、キャリ
ッジ速度Vと目標速度v1の速度差を求め、系のゲイン
Gを乗じて減速トルクの大きさKを算出する. ステップ■ DCサーボモータ8に減速トルクを発生さ
せるため、モータの回転方向を逆に設定する.ステップ
■ ステップ■又は■で算出した加速トルク又は減速ト
ルクの大きさKを、DCサーボモータ8に流す電流値に
変換し、更にその電流値に対応するデューティ量に変換
する. ステップ■ ステップ■で変換したデューティ量をモー
タ駆動回路5に出力する. 以上の処理を繰り返すことによりキャリッジ速度を目標
速度に追従させることができる.しかし、キャリッジと
キャリッジシャフト間の摩P!変化、リボンによるl1
!擦変化等が発生すると、キャリッジ速度のオーバシュ
ートが発生し、速度が目標速度を越えることがあるが、
キャリッジの定常速度と目標速度の定常偏差は、通常、
目標速度の15χ〜20χであるので、ファームウエア
の処理の時間的マージンは、キャリンジが目標速度にな
ってもCPυがオーバランしないように、少なくとも上
記定常偏差以上必要となってくる。
In the printer configured as described above, the relationship between background processing and IPT processing is shown in FIG. 11, and flowcharts of a program for controlling the speed of the carriage are shown in FIGS. 12 and 13. No.! In Figure 1, background processing is in a loop and is constantly running. On the other hand, the IP↑ process depends on the carriage running speed and print density, as shown in FIG. 10, and interrupts the background process asynchronously. In the above program structure, carriage speed control is performed in background processing. Figure 12 shows a flowchart of speed control during background processing. Step ■ Read the count value N from the speed detector iff71 (see Figure 7). Step ■ Calculate the recarriage speed V from the read count value N. V = j! /(N X tctx) step■
The magnitude relationship between the current carriage speed V and the target vI in carriage speed control is determined. Step■ V≦V. If , the carriage speed has not reached the target speed, so processing is performed to add acceleration torque. That is, the speed difference between the target speed V and the carriage arrival level V is determined, and the magnitude K of the acceleration torque is calculated by multiplying the speed difference by the system gain G. Step ■ If V>V, the carriage speed exceeds the target speed, so a process of adding deceleration torque is performed. That is, the speed difference between the carriage speed V and the target speed v1 is determined and multiplied by the system gain G to calculate the magnitude K of the deceleration torque. Step ■ To generate deceleration torque in the DC servo motor 8, set the rotation direction of the motor in the opposite direction. Step ■ The magnitude K of the acceleration torque or deceleration torque calculated in step ■ or ■ is converted into a current value flowing through the DC servo motor 8, and further converted into a duty amount corresponding to the current value. Step ■ Output the duty amount converted in step ■ to the motor drive circuit 5. By repeating the above process, the carriage speed can be made to follow the target speed. However, the friction between the carriage and the carriage shaft P! Change, l1 by ribbon
! When friction changes occur, the carriage speed may overshoot and the speed may exceed the target speed.
The steady deviation between the steady speed of the carriage and the target speed is usually
Since the target speed is 15x to 20x, the time margin for firmware processing is required to be at least the above-mentioned steady-state deviation so that CPυ does not overrun even if the carriage reaches the target speed.

また、装置のバラツキ等により−負荷の変動が設計時の
予想を越えて大きくなった場合、cpuのオーバランが
発生する. そこで第13図に示すフローチャートによる処理をIP
丁処理で実施する。
Additionally, if the load fluctuations become larger than expected at the time of design due to device variations, CPU overruns occur. Therefore, the process according to the flowchart shown in FIG.
Carry out the process using chlorine.

この処理においては、キャリッジ速度Vがリミノト速度
■。を越えると、モータの駆動が切られる。また、vc
はキャリッジの定常速度■〒と制1『目標とする速度V
,の間にあり、キャリッジの定常連度■,より51程度
高速の値である。
In this process, the carriage speed V is the riminoto speed ■. If the value exceeds 0.005, the motor drive will be cut off. Also, vc
is the steady speed of the carriage.
, and is about 51 times faster than the constant constant speed of the carriage.

ステップ■ 速度検出装置71(第7図)からカウント
値Nを読み出す. ステップ@ 読み出したカウント値Nよりキャリッジ速
度■を算出する. V = 1 /(N X tctw )ステップ@ キ
ャリッジ速度■とキャリッジ速度の限界値vcとの大小
関係を判定する。
Step ■ Read the count value N from the speed detection device 71 (Fig. 7). Step @ Calculate the carriage speed ■ from the read count value N. V = 1/(N x tctw) step @ The magnitude relationship between the carriage speed ■ and the carriage speed limit value vc is determined.

■≧■, であればキャリッジ速度Vはリミット値■。を越えてい
るのでステンプ0に進み、モータ駆動を切る。
If ■≧■, then the carriage speed V is the limit value■. Since it exceeds , proceed to step 0 and turn off the motor drive.

vくvc であれば、他のIPT処理ステップ[相]に進む.ステ
ップO デューティ量0をモータ駆動回路5に出力し、
モークの駆動杏切り、ステップ■に進む. ステップ■ rPT内で行う他の処理を実行する。
If vc, proceed to another IPT processing step [phase]. Step O Outputs the duty amount 0 to the motor drive circuit 5,
Drive the mork and proceed to step ■. Step ■ Execute other processing within rPT.

上記lPT内で行う他の処理を行った場合のタイムチャ
ートを第14図に示す。
FIG. 14 shows a time chart when other processing is performed within the IPT.

図において、(a)はV<vcの場合のIP?処理、バ
ックグランド処理及びモータ電流のタイムチャートを示
す. ■〈vcであるのでIPT処理内でモータの電流カット
を行わない.したがって、モータ電流はバックグランド
処理で行う速度制御で設定する(V−V)Gに相当する
値にに従って制御されることになる. 次に(ハ)はV,>V≧Vcの場合を示す.V≧Vcで
あるのでIPT処理中で電流カットを行い、バックグラ
ンド処理内で(V,−V)Cに相当する電流を設定する
.この場合、第10図(b)のモータ電流に示すように
モータ電流が間欠的に流れ、加速トルクを減少させる。
In the figure, (a) is the IP? when V<vc? A time chart of processing, background processing, and motor current is shown. ■〈Since it is VC, the motor current is not cut during IPT processing. Therefore, the motor current is controlled according to the value corresponding to (V-V)G set by speed control performed in background processing. Next, (c) shows the case of V,>V≧Vc. Since V≧Vc, current is cut during IPT processing, and a current corresponding to (V, -V)C is set during background processing. In this case, the motor current flows intermittently as shown in the motor current in FIG. 10(b), reducing the acceleration torque.

V≧Vcにおいて、モータに流れる電流は単位時間に占
めるバックグランド処理時間とIPT処理時間の比に従
う。IPT処理時間の比が大きくなるに従っ′ζ、DC
サーボモータ8に流れる電流は減少し、バックグランド
処理時間が0になる時、すなわちファームウェアの処理
の限界になると、(C)に示すようにモータ電流はOに
なり、DCサーボモータ8に加速トルクが加わることが
なくなる. ここで、vcはキャリッジの定常速度V↑よりりも5χ
高い速度に設定するので、通常キャリンジ速度はvcを
越えることはない.仮にキャリッジ負荷変動によるオー
バシュートで越えることがあってもファームウエアの処
理時間の限界を越えることがなく、ファームウエア処理
時間不足によるCPυのオーバランを防ぐことができる
When V≧Vc, the current flowing to the motor follows the ratio of the background processing time to the IPT processing time per unit time. As the ratio of IPT processing time increases, ′ζ, DC
The current flowing through the servo motor 8 decreases, and when the background processing time becomes 0, that is, when the firmware processing reaches the limit, the motor current becomes O as shown in (C), and the acceleration torque is applied to the DC servo motor 8. will no longer be added. Here, vc is 5χ than the steady speed V↑ of the carriage.
Since the speed is set to high, the carrying speed usually does not exceed vc. Even if the limit is exceeded due to overshoot due to carriage load fluctuation, the firmware processing time limit will not be exceeded, and overrun of CPυ due to insufficient firmware processing time can be prevented.

また、ファームウェアの処理限界は、■,より5z程度
高くとるだけでよ<、CPUの利用効率を上げることが
できる。
In addition, the processing limit of the firmware can be increased by just 5z higher than ■, and the CPU utilization efficiency can be increased.

なお、本発明は上記実施例に限定されるものではなく、
本発明の趣旨に基づいて種々の変形が可能であり、これ
らを本発明の範囲から俳除するものではない. (発明の効果) 以上、詳細に説明したように本発明によれば、サーボモ
ータの現在の回転速度をVとし、サーポモータの制)7
J目標値をV,とし、制御部における処理能力に対応す
るサーボモータの回転速度の限界値をvc  ( V 
c < V + )とし、サーボ系のゲインをGとした
とき、 V≦Vlのとき、 K= (V.−V)G V>V,のとき、 K=− (V,−V)G に基づいて算出した指令値にに従ってサーボモータの駆
動電流値を決定するとともに、これをバックグランド処
理で実行し、 V≧Vcのとき K=0 に基づいて算出した指令値にに従ってサーボモータの駆
動電流値を決定するとともに、これをサーボモータに取
り付けられたエンコーダより発生させた割込み信号によ
る割込み処理の中で実行するようにしてあるので、キャ
リッジの負荷変動によリオーバシュートが生じた場合で
も、ファームウェアの処理時間の限界を超えることがな
い.したがって、シリアルプリンタのキャリツジ駆動用
モータからのセンサスリフト割込み処理中にあるリミッ
トの速度を越えた場合、キャリツジ駆動用モータの駆動
を停止するという処理を実施するようにしたので、キャ
リッジの速度は自動的にファームウェアの処理限界以下
に押さえられる.また、CPυのオーバランを防止でき
、かつファームウェア処理時間のマージンを少なくする
ことが可能になり、CPuオーバランによるプリンタ装
置の障害を防止し、cpuの使用効率を上げることがで
きる.
Note that the present invention is not limited to the above embodiments,
Various modifications are possible based on the spirit of the present invention, and these are not excluded from the scope of the present invention. (Effects of the Invention) As described above in detail, according to the present invention, the current rotational speed of the servo motor is V, and the control of the servo motor) 7
Let the J target value be V, and the limit value of the rotational speed of the servo motor corresponding to the processing capacity in the control unit be vc (V
c < V + ), and the gain of the servo system is G. When V≦Vl, K= (V.-V)G When V>V, K=- (V,-V)G The drive current value of the servo motor is determined according to the command value calculated based on this, and this is executed in background processing, and when V≧Vc, the drive current value of the servo motor is determined according to the command value calculated based on K=0. The value is determined and executed during interrupt processing using an interrupt signal generated by the encoder attached to the servo motor, so even if reovershoot occurs due to carriage load fluctuation, Firmware processing time limits are not exceeded. Therefore, if the speed exceeds a certain limit during sensor lift interrupt processing from the serial printer's carriage drive motor, the carriage drive motor is stopped, so the carriage speed is automatically adjusted. This can be kept below the processing limit of the firmware. Furthermore, it is possible to prevent CPυ overruns and reduce the margin of firmware processing time, thereby preventing printer device failures due to CPU overruns and increasing CPU usage efficiency.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図はDCサーボモータを回転させるための制御回路
ブロック図、第2図は本発明のシリアルプリンタのサー
ボモータ駆動制御方法が適用されるシリアルドットプリ
ンタの概略構造図、第3図はサーボモータの駆動回路図
、第4図はモータ駆動回路におけるデューティ量設定時
状態図、第5図はエッジパルス発生回路図、第6図はエ
ッジパルス発生回路のタイムチャート、第7図は速度検
出回路図、第8図は速度検出回路のタイムチャート、第
9図は割込み発生回路図、第10図は割込み発生回路図
のタイムチャート、第11図はバックグランド処理とI
P?処理の関係を示す図、第12図はキャリッジの速度
を制御するプログラムのフローチャート、第13図はI
P?処理のフローチャート、第14図はバックグランド
処理中の速度制御のフローチャートである. l・・・マイクロプロセッサ、5・・・モータ駆動回路
、6・・・速度検出/割込発生回路、8・・・DCサー
ボモータ.
Fig. 1 is a block diagram of a control circuit for rotating a DC servo motor, Fig. 2 is a schematic structural diagram of a serial dot printer to which the servo motor drive control method for a serial printer of the present invention is applied, and Fig. 3 is a servo motor block diagram. 4 is a state diagram when setting the duty amount in the motor drive circuit, 5 is an edge pulse generation circuit diagram, 6 is a time chart of the edge pulse generation circuit, and 7 is a speed detection circuit diagram. , Fig. 8 is a time chart of the speed detection circuit, Fig. 9 is an interrupt generation circuit diagram, Fig. 10 is a time chart of the interrupt generation circuit diagram, and Fig. 11 is a background processing and I
P? Figure 12 is a flowchart of a program that controls the speed of the carriage, and Figure 13 is a diagram showing the relationship between processes.
P? Flowchart of Processing FIG. 14 is a flowchart of speed control during background processing. l...Microprocessor, 5...Motor drive circuit, 6...Speed detection/interrupt generation circuit, 8...DC servo motor.

Claims (1)

【特許請求の範囲】 サーボモータに供給する駆動電流を制御してサーボモー
タの回転速度をプログラムにより制御するシリアルプリ
ンタのサーボモータ駆動制御方法において、 (a)サーボモータの現在の回転速度をVとし、サーボ
モータの制御目標値をV_1とし、制御部における処理
能力に対応するサーボモータの回転速度の限界値をV_
c(V_c<V_1)とし、サーボ系のゲインをGとし
たとき、 V≦V_1のとき、 K=(V_1−V)G V>V_1のとき、 K=−(V_1−V)G に基づいて算出した指令値Kに従ってサーボモータの駆
動電流値を決定するとともに、これをバックグランド処
理の中で実行し、 (b)V≧V_cのとき K=0 に基づいて算出した指令値にに従ってサーボモータの駆
動電流値を決定するとともに、これをサーボモータに取
り付けられたエンコーダより発生させた割込み信号によ
る割込み処理の中で実行することを特徴とするシリアル
プリンタのサーボモータ駆動制御方法。
[Claims] In a servo motor drive control method for a serial printer, which controls the drive current supplied to the servo motor to control the rotation speed of the servo motor according to a program, (a) the current rotation speed of the servo motor is set to V; , the control target value of the servo motor is V_1, and the limit value of the rotation speed of the servo motor corresponding to the processing capacity of the control unit is V_
c (V_c<V_1) and the gain of the servo system is G. When V≦V_1, K=(V_1-V)G When V>V_1, K=-(V_1-V)G Based on The drive current value of the servo motor is determined according to the calculated command value K, and this is executed in the background processing. (b) When V≧V_c, the servo motor is driven according to the command value calculated based on K=0 1. A servo motor drive control method for a serial printer, characterized in that the drive current value of the servo motor is determined, and this is executed during interrupt processing using an interrupt signal generated from an encoder attached to the servo motor.
JP1107309A 1989-04-28 1989-04-28 Servo motor drive control method for serial printer Expired - Fee Related JP2758201B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1107309A JP2758201B2 (en) 1989-04-28 1989-04-28 Servo motor drive control method for serial printer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1107309A JP2758201B2 (en) 1989-04-28 1989-04-28 Servo motor drive control method for serial printer

Publications (2)

Publication Number Publication Date
JPH02290177A true JPH02290177A (en) 1990-11-30
JP2758201B2 JP2758201B2 (en) 1998-05-28

Family

ID=14455819

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1107309A Expired - Fee Related JP2758201B2 (en) 1989-04-28 1989-04-28 Servo motor drive control method for serial printer

Country Status (1)

Country Link
JP (1) JP2758201B2 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5559590A (en) * 1978-10-24 1980-05-06 Ibm Printer
JPS61285503A (en) * 1985-06-12 1986-12-16 Hitachi Ltd Digital control method
JPS63265581A (en) * 1987-04-23 1988-11-02 Oki Electric Ind Co Ltd Control system for driving servomotor of serial printer

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5559590A (en) * 1978-10-24 1980-05-06 Ibm Printer
JPS61285503A (en) * 1985-06-12 1986-12-16 Hitachi Ltd Digital control method
JPS63265581A (en) * 1987-04-23 1988-11-02 Oki Electric Ind Co Ltd Control system for driving servomotor of serial printer

Also Published As

Publication number Publication date
JP2758201B2 (en) 1998-05-28

Similar Documents

Publication Publication Date Title
US4775945A (en) Print head motor control system with automatic drive parameter calculations
US4777609A (en) Print head motor control system having steady state velocity compensation
US3731176A (en) Deceleration and stop-lock motor control apparatus
EP0417312A1 (en) Feedforward control unit for servomotor
US4459675A (en) Printer control system with error count averaging
EP0452497B1 (en) Carriage controller of a printer
US5304906A (en) Collision detecting method using an observer
CA1055564A (en) Adaptive control circuit for a stepping motor
US4486693A (en) Motor velocity control
US4103216A (en) Stepping motor closed loop constant velocity control system
EP0164256A1 (en) Motor control apparatus for reel-to-reel tape drive system
EP0077455B1 (en) Print head control system with controlled acceleration and deceleration
CA1284347C (en) Method and device for controlling the acceleration of an electric stepping motor
US3721811A (en) Apparatus for commanding a deceleration in numerical control systems
US4169991A (en) Variable print speed control
US4541747A (en) Motor drive control circuit to restrict motor temperature rise below an upper limit
JP2645350B2 (en) Serial dot matrix printer
US3619757A (en) Variable speed closed loop digital servosystem
JPH02290177A (en) Control of driving of servomotor for serial printer
US4291262A (en) Servo positioning apparatus
EP0403658A1 (en) Method of controlling the speed of a servomotor
JP2001078476A (en) Device and method for controlling dc motor
US4689528A (en) Printer
US4586152A (en) Method and apparatus for counting an infinite length with a counter of finite length
JP3026910B2 (en) Drive control method for electronic equipment

Legal Events

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

Free format text: PAYMENT UNTIL: 20080313

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20090313

Year of fee payment: 11

LAPS Cancellation because of no payment of annual fees