JPH04281396A - Control device for stepping motor - Google Patents

Control device for stepping motor

Info

Publication number
JPH04281396A
JPH04281396A JP6376691A JP6376691A JPH04281396A JP H04281396 A JPH04281396 A JP H04281396A JP 6376691 A JP6376691 A JP 6376691A JP 6376691 A JP6376691 A JP 6376691A JP H04281396 A JPH04281396 A JP H04281396A
Authority
JP
Japan
Prior art keywords
stepping motor
speed
down counter
control
rotation
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.)
Pending
Application number
JP6376691A
Other languages
Japanese (ja)
Inventor
Mitsuru Mamizuka
馬見塚 満
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.)
Ricoh Co Ltd
Original Assignee
Ricoh 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP6376691A priority Critical patent/JPH04281396A/en
Publication of JPH04281396A publication Critical patent/JPH04281396A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To prevent a step-out condition from being generated by applying timer interruption at each fixed time, and performing motor control based on an encoder pulse counting value at the point of time of the interruption. CONSTITUTION:In the case of performing speed control and position control of a stepping motor 6 by a computer comprising microprocessors (MPU)1, ROM2 and RAM3, a pulse signal from an encoder 8, output in accordance with rotation of the stepping motor 6, is added or subtracted by an up/down counter 9 to apply interruption to the MPU1 with a fixed time interval by a timer circuit 5, and speed setting is performed relating to the stepping motor 6 based on a counting value of the up/down counter 9.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明は、OA機器などの各種駆
動源に用いられるステッピングモータの速度制御及び位
置制御を行うための制御装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a control device for controlling the speed and position of a stepping motor used in various drive sources such as office automation equipment.

【0002】0002

【従来の技術】モータの回転角度と入力パルス数が比例
し、回転制御を正確に行うことのできるステッピングモ
ータは、複写機、ファクシミリなど各種のOA機器に用
いられている。この種のモータの制御方法としては、ス
テッピングモータに与えるパルス信号のパルス間隔を可
変することによって回転速度が制御される。その制御装
置の構成は、例えば特開昭63−56199では、パル
ス間隔に対応する計数値データと、この計数値データご
とに加減速モードあるいは定速モードの別の示すビット
データとを記憶した記憶手段と、この記憶手段のデータ
が加減速モードを示すデータか定速モードを示すデータ
かに応じて信号を出力する計数手段と、この計数手段に
よりステッピングモータにパルスを出力する手段と、デ
ータのビットデータにより前記計数手段に計数値データ
の設定許可または禁止を行うようになっている。
2. Description of the Related Art Stepping motors, in which the rotation angle of the motor is proportional to the number of input pulses and whose rotation can be accurately controlled, are used in various office automation equipment such as copying machines and facsimile machines. As a method of controlling this type of motor, the rotation speed is controlled by varying the pulse interval of a pulse signal applied to the stepping motor. The configuration of the control device is, for example, in JP-A No. 63-56199, a memory that stores count value data corresponding to the pulse interval and bit data indicating another acceleration/deceleration mode or constant speed mode for each count value data. means for outputting a signal depending on whether the data in the storage means indicates acceleration/deceleration mode or constant speed mode; means for outputting pulses to the stepping motor by the counting means; Bit data is used to permit or prohibit setting of count value data in the counting means.

【0003】0003

【発明が解決しようとする課題】しかし、従来のステッ
ピングモータの制御は、通常、オープンループであり、
設定したパルス数に応じて回転動作を行うものであった
。このため、急激な負荷変動や高速な速度変化を行わせ
た場合には、駆動制御に追従できず、脱調状態を生じて
いた。本発明の目的は、上記した従来技術の実情に鑑み
てなされたもので、脱調状態を生じないようにしたステ
ッピングモータの制御装置を提供することにある。
[Problems to be Solved by the Invention] However, conventional stepping motor control is usually an open loop;
It rotated according to the set number of pulses. For this reason, when sudden load fluctuations or rapid speed changes are made, the drive control cannot be followed, resulting in a step-out state. SUMMARY OF THE INVENTION An object of the present invention, which has been made in view of the above-mentioned actual state of the prior art, is to provide a control device for a stepping motor that prevents step-out conditions from occurring.

【0004】0004

【課題を解決するための手段】上記目的を達成するため
に、本発明は、ステッピングモータの速度制御及び位置
制御を共通のマイクロプロセッサを用いて行うステッピ
ングモータの制御装置において、前記ステッピングモー
タの回転に応じたパルス信号を出力するエンコーダと、
該エンコーダの出力パルスを加算または減算するアップ
ダウンカウンタと、前記マイクロプロセッサに割り込み
を行うタイマ回路と、前記アップダウンカウンタの計数
値に基づいて現在位置での設定速度を確保するためのパ
ルス数を前記ステッピングモータへ付与する制御手段と
を備えている。上記制御手段は、速度制御及び位置制御
を高精度に行えるように、前記ステッピングモータの回
転開始と共に一定間隔に前記タイマ回路を起動させて割
り込みをかけ、前記アップダウンカウンタの計数値に対
応してテーブル値を前記ステッピングモータに速度設定
し、定速回転に達した後は速度設定値を変更せず、減速
位置ではインクリメントしたテーブル値に従って速度設
定をし、タイマ割り込みが所定回数に達した時点で逆回
転の指示を行うようにするのが望ましい。
Means for Solving the Problems In order to achieve the above object, the present invention provides a stepping motor control device that uses a common microprocessor to control the speed and position of a stepping motor. an encoder that outputs a pulse signal according to the
an up/down counter that adds or subtracts the output pulses of the encoder; a timer circuit that interrupts the microprocessor; and a number of pulses to ensure the set speed at the current position based on the count of the up/down counter. and control means for applying control to the stepping motor. In order to perform speed control and position control with high precision, the control means activates the timer circuit at regular intervals when the stepping motor starts rotating, and generates an interrupt corresponding to the count value of the up/down counter. Set the speed of the stepping motor using the table value, do not change the speed setting value after reaching a constant rotation speed, set the speed according to the incremented table value at the deceleration position, and when the timer interrupt reaches the predetermined number of times. It is desirable to give instructions for reverse rotation.

【0005】[0005]

【作用】上記した手段によれば、一定時間々隔でタイマ
回路による割り込みがマイクロプロセッサにかけられ、
その時のアップダウンカウンタの計数値に応じたテーブ
ル値が速度設定値としてステッピングモータに付与され
る。したがって、加速、定速、減速に応じた速度制御及
び位置制御が一定時間々隔に行われるので、立ち上がり
、急激な負荷変動などに起因する脱調を防止することが
できる。また、マイクロプロセッサはタイマ割り込み時
にのみ制御動作をすれば済み、高速動作のマイクロプロ
セッサを用いる必要がない。
[Operation] According to the above-mentioned means, an interrupt by the timer circuit is applied to the microprocessor at regular intervals,
A table value corresponding to the count value of the up/down counter at that time is given to the stepping motor as a speed setting value. Therefore, speed control and position control corresponding to acceleration, constant speed, and deceleration are performed at regular time intervals, making it possible to prevent synchronization caused by start-up, rapid load fluctuations, and the like. Furthermore, the microprocessor only needs to perform control operations during timer interrupts, and there is no need to use a high-speed microprocessor.

【0006】[0006]

【実施例】以下、本発明の実施例について図面を参照し
ながら説明する。図1は本発明によるステッピングモー
タの制御装置の一実施例を示すブロック図である。制御
装置は、MPU(マイクロ・プロセッサ・ユニット)1
を主体に構成され、バスを介してROM(リード・オン
リー・メモリ)2及びRAM(ランダム・アクセス・メ
モリ)3が接続されている。ROM2にはモータ制御を
実行するためのプログラムが格納され、RAM3には、
MPU1の動作に必要なスタック及びテンポラリな数値
のほか制御実行に伴うデータが記憶される。MPU1は
、複数の入/出力端子(I/O)及び割込入力端子(I
NT)を備え、割込入力端子(INT)には割り込み用
のタイマ回路5に接続されたアンドゲート4が接続され
ている。MPU1の入/出力端子(I/O)には、ステ
ッピングモータ6を駆動するためのドライバ7及びステ
ッピングモータ6の回転数を検出するエンコーダ8の出
力パルスをカウントするアップダウンカウンタ9の各々
が接続されている。タイマ回路5は、一定時間々隔で出
力信号を発生し、アンドゲート4がMPU1から出力さ
れる制御信号との論理積が成立するときに、MPU1の
割込入力端子(INT)に割込信号を印加する。
Embodiments Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing an embodiment of a stepping motor control device according to the present invention. The control device is MPU (micro processor unit) 1
A ROM (read only memory) 2 and a RAM (random access memory) 3 are connected via a bus. ROM2 stores a program for executing motor control, and RAM3 stores a program for executing motor control.
In addition to the stack and temporary numerical values necessary for the operation of the MPU 1, data accompanying control execution is stored. The MPU 1 has multiple input/output terminals (I/O) and interrupt input terminals (I/O).
NT), and an AND gate 4 connected to an interrupt timer circuit 5 is connected to an interrupt input terminal (INT). A driver 7 for driving the stepping motor 6 and an up/down counter 9 for counting output pulses of an encoder 8 for detecting the number of rotations of the stepping motor 6 are connected to the input/output terminal (I/O) of the MPU 1. has been done. The timer circuit 5 generates an output signal at regular time intervals, and when the AND gate 4 is logically ANDed with the control signal output from the MPU 1, it outputs an interrupt signal to the interrupt input terminal (INT) of the MPU 1. Apply.

【0007】次に、以上の構成による実施例の動作につ
いて、図2の速度線図を参照して説明する。ROM2に
は、MPU1を動作させるためのプログラムのほか、図
2に示す速度線図に対応した数値テーブルが書き込まれ
ている。電源を投入したとき及びリセットがかけられた
状態では、タイマ回路5に割り込み時間間隔を設定する
。起動前は図2のAの時点にあり、ステッピングモータ
6にはパルス列が与えられていない(すなわち、割り込
みが許可されていない)。起動信号が与えられると、M
PU1はアップダウンカウンタ9のリセットを行うと共
に、速度設定用テーブルからデータを読み出してドライ
バ7にパルス列データの書き込み及びタイマ割り込みの
許可を行う。これにより、ステッピングモータ6が起動
する。ステッピングモータ6が回転を開始すると、ステ
ッピングモータ6の回転軸に連結されているエンコーダ
8の出力パルスがアップダウンカウンタ9に入力される
。ついで、図2のBの時点で一定間隔にタイマ割り込み
を行い、アップダウンカウンタ9の値を読み取る。この
読取値に対応したテーブル(ROM2に設けられている
)の値をドライバ7に設定する。このテーブルの値は、
現在の速度の次の速度を設定するための値である。 さらに、Cの時点は、定速回転に移る時点であり、速度
線図に対応したテーブルはインクリメントはされない。 また、アップダウンカウンタ9はカウントを続行し、タ
イマ回路5も動作を継続している。図2のDの時点は、
アップダウンカウンタ9の値が減速位置に達した時点で
あり、ROM2の速度線図に対応したテーブルをインク
リメントし、次のデータを読み出してドライバ7に設定
する。これにより、減速動作が開始する。
Next, the operation of the embodiment with the above configuration will be explained with reference to the speed diagram shown in FIG. In addition to a program for operating the MPU 1, a numerical value table corresponding to the speed diagram shown in FIG. 2 is written in the ROM 2. When the power is turned on and in a reset state, an interrupt time interval is set in the timer circuit 5. Before startup, the stepping motor 6 is at time A in FIG. 2, and no pulse train is applied to the stepping motor 6 (that is, no interrupts are permitted). When a start signal is given, M
The PU 1 resets the up/down counter 9, reads data from the speed setting table, writes pulse train data to the driver 7, and permits timer interrupts. As a result, the stepping motor 6 is activated. When the stepping motor 6 starts rotating, an output pulse from an encoder 8 connected to the rotating shaft of the stepping motor 6 is input to an up/down counter 9. Next, at time point B in FIG. 2, a timer interrupt is performed at regular intervals, and the value of the up/down counter 9 is read. A value in a table (provided in the ROM 2) corresponding to this read value is set in the driver 7. The values in this table are
This is a value for setting the next speed after the current speed. Further, the time point C is the time point when the rotation starts at a constant speed, and the table corresponding to the speed diagram is not incremented. Further, the up/down counter 9 continues counting, and the timer circuit 5 also continues to operate. At time D in Figure 2,
When the value of the up/down counter 9 reaches the deceleration position, the table corresponding to the speed diagram in the ROM 2 is incremented, and the next data is read and set in the driver 7. This starts the deceleration operation.

【0008】図2のEの時点は、速度が0になった時点
であり、MPU1はタイマ割り込みの回数を計数してい
る。Fの時点は、タイマ割り込みが所定の回数だけ行わ
れた時点(すなわち所定時間経過)であり、MPU1は
逆方向に回転するようドライバ7に指示する。さらに、
Gの時点は、回転方向が反転し、一定間隔にタイマ割り
込みを行い、アップダウンカウンタ9の値を読み取って
いる状態にある。この読取値に対応したテーブルの値を
ドライバ7に設定する。このときのアップダウンカウン
タ9は、減算カウントを行っている。Hの時点は、Cの
時点と同様に定速回転に移る時点であり、速度線図に対
応したテーブルはインクリメントはされない。このとき
、アップダウンカウンタ9はカウントを続行し、タイマ
回路5も動作を継続している。Iの時点は、アップダウ
ンカウンタ9の値が減速位置に達した時点で、Dの時点
と同様の動作をしている。さらに、Jの時点は、アップ
ダウンカウンタ9の値が0になった時点であり、スター
ト時の位置へ復帰したことを示している。以上のように
してステッピングモータの速度制御及び位置制御が確実
に実行される。
[0008] At time E in FIG. 2, the speed becomes 0, and the MPU 1 is counting the number of timer interrupts. At time F, the timer interrupt has been performed a predetermined number of times (that is, a predetermined time has elapsed), and the MPU 1 instructs the driver 7 to rotate in the opposite direction. moreover,
At time G, the rotation direction is reversed, timer interrupts are performed at regular intervals, and the value of the up/down counter 9 is read. A table value corresponding to this read value is set in the driver 7. At this time, the up/down counter 9 is performing subtraction counting. At time H, like time C, the rotation starts at a constant speed, and the table corresponding to the speed diagram is not incremented. At this time, the up/down counter 9 continues counting, and the timer circuit 5 also continues to operate. At time I, when the value of the up/down counter 9 reaches the deceleration position, the same operation as at time D is performed. Further, at time J, the value of the up/down counter 9 becomes 0, indicating that the vehicle has returned to its starting position. In the manner described above, speed control and position control of the stepping motor are reliably executed.

【0009】[0009]

【発明の効果】本発明は上記の通り構成されているので
、次に記載する効果を奏する。請求項1のステッピング
モータの制御装置においては、ステッピングモータの速
度制御及び位置制御を共通のマイクロプロセッサを用い
て行うステッピングモータの制御装置において、前記ス
テッピングモータの回転に応じたパルス信号を出力する
エンコーダと、該エンコーダの出力パルスを加算または
減算するアップダウンカウンタと、前記マイクロプロセ
ッサに割り込みを行うタイマ回路と、前記アップダウン
カウンタの計数値に基づいて現在位置での設定速度を確
保するためのパルス数を前記ステッピングモータへ付与
する制御手段とを設けるようにしたので、立ち上がり、
急激な負荷変動などに起因する脱調を防止することがで
きる。請求項2のステッピングモータの制御装置におい
ては、制御手段を、前記ステッピングモータの回転開始
と共に一定間隔に前記タイマ回路を起動させて割り込み
をかけ、前記アップダウンカウンタの計数値に対応して
テーブル値を前記ステッピングモータに速度設定し、定
速回転に達した後は速度設定値を変更せず、減速位置で
はインクリメントしたテーブル値に従って速度設定をし
、タイマ割り込みが所定回数に達した時点で逆回転の指
示を行うようにしたので、マイクロプロセッサはタイマ
割り込み時にのみ動作させればよく、高速動作のマイク
ロプロセッサを使う必要がなくなる。
[Effects of the Invention] Since the present invention is constructed as described above, it achieves the following effects. In the stepping motor control device according to claim 1, the stepping motor control device performs speed control and position control of the stepping motor using a common microprocessor, and an encoder that outputs a pulse signal according to the rotation of the stepping motor. an up/down counter for adding or subtracting output pulses from the encoder; a timer circuit for interrupting the microprocessor; and a pulse for ensuring a set speed at the current position based on the count value of the up/down counter. Since the stepper motor is provided with a control means for applying a number to the stepping motor,
It is possible to prevent synchronization caused by sudden load fluctuations. In the stepping motor control device according to claim 2, the control means activates the timer circuit at regular intervals upon the start of rotation of the stepping motor to generate an interrupt, and calculates a table value corresponding to the count value of the up/down counter. Set the speed to the stepping motor, do not change the speed setting value after reaching constant speed rotation, set the speed according to the incremented table value at the deceleration position, and reverse rotation when the timer interrupt reaches the predetermined number of times. Since the microprocessor only needs to operate at timer interrupts, there is no need to use a high-speed microprocessor.

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

【図1】本発明によるステッピングモータの制御装置の
一実施例を示すブロック図である。
FIG. 1 is a block diagram showing an embodiment of a stepping motor control device according to the present invention.

【図2】本発明の実施例の動作を示す速度線図を参照し
て説明する。
FIG. 2 will be described with reference to a speed diagram showing the operation of the embodiment of the present invention.

【符号の説明】[Explanation of symbols]

1  マイクロ・プロセッサ・ユニット(MPU)2 
 リード・オンリー・メモリ(ROM)3  ランダム
・アクセス・メモリ(RAM)4  アンドゲート 5  タイマ回路 6  ステッピングモータ 7  ドライバ 8  エンコーダ 9  アップダウンカウンタ
1 Micro Processor Unit (MPU) 2
Read-only memory (ROM) 3 Random access memory (RAM) 4 AND gate 5 Timer circuit 6 Stepping motor 7 Driver 8 Encoder 9 Up/down counter

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】  ステッピングモータの速度制御及び位
置制御を共通のマイクロプロセッサを用いて行うステッ
ピングモータの制御装置において、前記ステッピングモ
ータの回転に応じたパルス信号を出力するエンコーダと
、該エンコーダの出力パルスを加算または減算するアッ
プダウンカウンタと、前記マイクロプロセッサに割り込
みを行うタイマ回路と、前記アップダウンカウンタの計
数値に基づいて現在位置での設定速度を確保するための
パルス数を前記ステッピングモータへ付与する制御手段
とを具備することを特徴とするステッピングモータの制
御装置。
1. A stepping motor control device that performs speed control and position control of the stepping motor using a common microprocessor, comprising: an encoder that outputs a pulse signal according to the rotation of the stepping motor; and an output pulse of the encoder. an up/down counter that adds or subtracts , a timer circuit that interrupts the microprocessor, and a number of pulses given to the stepping motor to ensure a set speed at the current position based on the counted value of the up/down counter. 1. A stepping motor control device comprising: a control means for controlling a stepping motor;
【請求項2】  前記制御手段は、前記ステッピングモ
ータの回転開始と共に一定間隔に前記タイマ回路を起動
させて割り込みをかけ、前記アップダウンカウンタの計
数値に対応してテーブル値を前記ステッピングモータに
速度設定し、定速回転に達した後は速度設定値を変更せ
ず、減速位置ではインクリメントしたテーブル値に従っ
て速度設定をし、タイマ割り込みが所定回数に達した時
点で逆回転の指示を行う制御内容を含むことを特徴とす
る請求項1記載のステッピングモータの制御装置。
2. The control means activates the timer circuit at regular intervals upon the start of rotation of the stepping motor to generate an interrupt, and transmits a table value to the stepping motor at a speed corresponding to the count value of the up/down counter. Control content that does not change the speed setting value after reaching constant speed rotation, sets the speed according to the incremented table value at the deceleration position, and instructs reverse rotation when the timer interrupt reaches a predetermined number of times. 2. The stepping motor control device according to claim 1, further comprising:
JP6376691A 1991-03-06 1991-03-06 Control device for stepping motor Pending JPH04281396A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6376691A JPH04281396A (en) 1991-03-06 1991-03-06 Control device for stepping motor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6376691A JPH04281396A (en) 1991-03-06 1991-03-06 Control device for stepping motor

Publications (1)

Publication Number Publication Date
JPH04281396A true JPH04281396A (en) 1992-10-06

Family

ID=13238831

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6376691A Pending JPH04281396A (en) 1991-03-06 1991-03-06 Control device for stepping motor

Country Status (1)

Country Link
JP (1) JPH04281396A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004502383A (en) * 2000-06-30 2004-01-22 センサーマチック・エレクトロニックス・コーポレーション Integrated enclosure and controller for video surveillance cameras
US9684616B2 (en) 2013-03-05 2017-06-20 Ricoh Company, Limited Motor control apparatus and motor control method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004502383A (en) * 2000-06-30 2004-01-22 センサーマチック・エレクトロニックス・コーポレーション Integrated enclosure and controller for video surveillance cameras
US9684616B2 (en) 2013-03-05 2017-06-20 Ricoh Company, Limited Motor control apparatus and motor control method

Similar Documents

Publication Publication Date Title
EP0094763B1 (en) Pulse motor control device
JPH08182366A (en) Drive controller for servo motor
US4489260A (en) Method of driving a stepping motor and a drive circuit thereof
JPH04281396A (en) Control device for stepping motor
KR900702440A (en) Servo controller
JPH03145996A (en) Drive unit for step motor
JP2002223584A (en) Controller for dc motor
JPH0434179B2 (en)
JP2741751B2 (en) Stepping motor drive system
JP2820724B2 (en) Drive control device for servo motor of image reading device
JP3251344B2 (en) Pulse output circuit
JP3512571B2 (en) Pulse generator
KR890003291B1 (en) Control device of sewing machine
JP2024048947A (en) Motor Control Device
JP2024048927A (en) Motor Control Device
JPH0421377A (en) Dynamic brake unit for synchronous motor
JPH0825261A (en) Control device for motor
JPS62138096A (en) Control circuit for pulse motor
JPH0753435Y2 (en) Motor speed controller
JPS61106096A (en) Pulse motor drive system
JPH0217897A (en) Driving of stepping motor
JPS6148360B2 (en)
JP2004104926A (en) Controller for stepping motor
JPH084398B2 (en) Pulse motor control circuit
JPH0819296A (en) Controller of motor