JPS6237100A - Controller for stepping motor - Google Patents

Controller for stepping motor

Info

Publication number
JPS6237100A
JPS6237100A JP17500385A JP17500385A JPS6237100A JP S6237100 A JPS6237100 A JP S6237100A JP 17500385 A JP17500385 A JP 17500385A JP 17500385 A JP17500385 A JP 17500385A JP S6237100 A JPS6237100 A JP S6237100A
Authority
JP
Japan
Prior art keywords
pulse
drive
signal
frequency
stepping motor
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
JP17500385A
Other languages
Japanese (ja)
Inventor
Toshiyuki Yanaka
俊之 谷中
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP17500385A priority Critical patent/JPS6237100A/en
Publication of JPS6237100A publication Critical patent/JPS6237100A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P8/00Arrangements for controlling dynamo-electric motors rotating step by step
    • H02P8/14Arrangements for controlling speed or speed and torque

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Control Of Stepping Motors (AREA)

Abstract

PURPOSE:To control a slow-down and a speed-up minutely by applying driving pulses optimum to an actuating system to a stepping motor. CONSTITUTION:A CPU 1 prepares pulse patterns in response to the pulse informations of driving pulses to be inputted. A ROM 2 stores programs and data controlling each unit. A RAM 3 consists of a pulse pattern table memory storing the pulse patterns, and functions as a work memory. A timer 5 serves as a pulse generating means, and generates driving pulses 27 in response to the pulse patterns written to the pulse pattern table memory and drives a stepping motor 10.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明は、ステッピングモータに印加する駆動パルス
の周波数を時間とともに可変させてステッピングモータ
の駆動を制御するステッピングモータの制御装置に関す
るものである。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a stepping motor control device that controls the driving of a stepping motor by varying the frequency of driving pulses applied to the stepping motor over time.

〔従来の技術〕[Conventional technology]

アクチュエータとしてステッピングモータを駆動させる
場合、印加する駆動パルスのパターンを使用する系の仕
様に応じて設定しなければならない。
When driving a stepping motor as an actuator, the pattern of driving pulses to be applied must be set according to the specifications of the system used.

駆動パルスのパターンは、下記の項目について考慮して
決定される。
The drive pulse pattern is determined by considering the following items.

(1)ステッピングモータは、特性上急激な始動、停止
が行えず、駆動パルスの周波数を徐々に立ち上げ(スロ
ーアップ)たり徐々に立ち下げる(スローダウン)こと
が必要である。
(1) Due to its characteristics, a stepping motor cannot be started or stopped rapidly, and it is necessary to gradually increase (slow-up) or gradually decrease (slow-down) the frequency of drive pulses.

(2)系の負荷変動および環境に対するマージン。(2) Margin for system load fluctuations and environment.

(3)系の共振。(3) System resonance.

(4)運動の仕様(速度2時間9位置9回転方向)。(4) Movement specifications (speed 2 hours 9 positions 9 rotation directions).

従って、最適な駆動パルスのパターンを決定するには駆
動パルスのパターンを可変に設定できるステッピングモ
ータ用の制御装置が必要である。
Therefore, in order to determine the optimal drive pulse pattern, a stepping motor control device that can variably set the drive pulse pattern is required.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

ところが、従来、この種の装置においては、台形駆動ま
たは三角形駆動(駆動パルスの周波数を時間とともに直
線的に変化させてスローアップおよびスローダウンを達
成する駆動方法)を採用して、ステッピングモータ(以
下ステップモータと略す)を制御しているため、その直
線の傾きや長さを可変することはできても、スローアッ
プ、スローダウンにおける多様な駆動、例えば駆動パル
スの周波数が時間とともに対数的に変化させる駆動や駆
動パルスの周波数と時間の関係が折れ線的な形式となる
駆動はできず、ステップモータの始動、停止の最適な駆
動パルスパターンを決定する範囲が限定されてしまい、
アクチュエートする系に見合う最適な駆動パルスをステ
ップモータに印加できない等の問題点があった。
However, conventionally, this type of device has adopted a trapezoidal drive or a triangular drive (a drive method in which the frequency of the drive pulse is linearly changed over time to achieve slow-up and slow-down), and has been used to drive a stepping motor (hereinafter referred to as "stepping motor"). Since the step motor (abbreviated as step motor) is controlled, the slope and length of the straight line can be varied, but there are various types of drive during slow-up and slow-down, such as the frequency of the drive pulse changing logarithmically over time. It is not possible to perform a drive in which the relationship between the frequency and time of the drive pulse is linear, and the range for determining the optimal drive pulse pattern for starting and stopping the step motor is limited.
There have been problems such as the inability to apply an optimal drive pulse to the step motor that matches the system to be actuated.

この発明は上記の問題点を解消するためになされたもの
で、アクチュエートする系に最適な駆動パルスをステッ
プモータに供給できるステッピングモータの制御装置を
提供することを目的とする。
The present invention has been made to solve the above-mentioned problems, and an object of the present invention is to provide a stepping motor control device that can supply a stepping motor with drive pulses that are optimal for the system to be actuated.

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

この発明に係るステッピングモータの制御装置は、入力
手段より入力される駆動パルスのパルス情報に応じてパ
ルスパターンを作成するパルスパターン作成手段と、パ
ルスパターンを格納するパルスパターンテーブルメモリ
と、このパルスパターンテーブルメモリに書き込まれた
パルスパターンに応じて駆動パルスを発生させステッピ
ングモータを駆動するパルス発生手段を設けたものであ
る。
A stepping motor control device according to the present invention includes: a pulse pattern creation means for creating a pulse pattern according to pulse information of a drive pulse inputted from an input means; a pulse pattern table memory for storing the pulse pattern; and a pulse pattern table memory for storing the pulse pattern. This device is provided with pulse generating means for generating drive pulses to drive the stepping motor in accordance with the pulse pattern written in the table memory.

〔作用〕[Effect]

この発明においては、パルスパターン作成手段が入力手
段より入力される駆動パルスのパルス情報に応じてパル
スパターンを作成すると、このパルスパターンがパルス
パターンテーブルメモリに書き込まれる。パルス発生手
段は、パルスパターンテーブルメモリに書き込まれたパ
ルスパターンに応じて駆動パルスを出力する。
In this invention, when the pulse pattern creation means creates a pulse pattern according to the pulse information of the drive pulse inputted from the input means, this pulse pattern is written into the pulse pattern table memory. The pulse generating means outputs drive pulses according to the pulse pattern written in the pulse pattern table memory.

〔実施例〕〔Example〕

第1図はこの発明の一実施例を示すステッピングモータ
の制御装置を説明する構成ブロック図であり、1はCP
Uで、各ユニットを制御する。また、CPUIはこの発
明のパルスパターン作成手段をなしている。2はROM
で、各ユニットを制御するプログラムおよびデータを格
納している。
FIG. 1 is a block diagram illustrating a control device for a stepping motor according to an embodiment of the present invention, and 1 is a block diagram illustrating a control device for a stepping motor according to an embodiment of the present invention.
U controls each unit. Further, the CPUI constitutes a pulse pattern creation means of the present invention. 2 is ROM
It stores programs and data that control each unit.

3はこの発明のパルスパターンテーブルメモリをなすR
AMで、ワークメモリとして機能する。4はタイマで、
表示、キー人力または内部の時間管理に使用される。5
はこの発明のパルス発生手段をなすタイマで、後述する
駆動パルス27を出力する。タイマ4.5は、例えばプ
ログラマブル・インターバルタイマIC(8253また
は8254)等のワンチップで構成される。6はI10
ボートで、データバス17と外部を接続する。工10ポ
ート6は、例えばプログラマブル・ペリフェラルインタ
フェースIC(8255)を使用している。7.8はド
ライバ、9はステップモータドライバ回路で、駆動パル
ス27に応じてステップモータ10を駆動するのに適し
た駆動信号32を出力する。11はアドレスデコーダで
、アドレスバス18の信号ニ応シテ、ROM2 、、R
AM3 。
3 is R forming the pulse pattern table memory of this invention.
AM functions as a working memory. 4 is a timer,
Used for display, key manual or internal time management. 5
is a timer which constitutes a pulse generating means of the present invention, and outputs a drive pulse 27, which will be described later. The timer 4.5 is composed of a single chip such as a programmable interval timer IC (8253 or 8254), for example. 6 is I10
The data bus 17 is connected to the outside using the boat. For example, a programmable peripheral interface IC (8255) is used for the port 6 of the device 10. 7.8 is a driver, and 9 is a step motor driver circuit, which outputs a drive signal 32 suitable for driving the step motor 10 in response to the drive pulse 27. 11 is an address decoder which responds to the signals of the address bus 18, ROM2, , R
AM3.

タイマ4.タイマ5.I10ボート6のいずれかを選択
するセレクト信号22.23,24゜25.26を作成
する。12は水晶発振子で、基準クロック信号16を発
生する。13.14はエツジトリガ型のフリップフロッ
プ(以下・FFと呼ぶ)である。15は表示・キー人力
装置で、ドライバ8を介してキー人力データを入力する
とともに、出力データを受けて表示する。19はクロッ
ク信号(CLK)で、基準クロック信号16を分周して
作成する。20はリード信号(RD)、21はライト信
号(WR)、28は出力パルス信号(OUTI)で、タ
イマ4から出力される。
Timer 4. Timer 5. Select signals 22, 23, 24 and 25, 26 for selecting one of the I10 ports 6 are created. A crystal oscillator 12 generates a reference clock signal 16. 13 and 14 are edge trigger type flip-flops (hereinafter referred to as FF). Reference numeral 15 denotes a display/key manual input device through which key manual data is input via the driver 8, and output data is received and displayed. A clock signal (CLK) 19 is generated by frequency-dividing the reference clock signal 16. 20 is a read signal (RD), 21 is a write signal (WR), and 28 is an output pulse signal (OUTI), which are output from the timer 4.

29は出力パルス信号(OUT2)で、タイマ5から出
力される。30はモータ情報で、ステップモータドライ
バ回路9に必要な情報(ステップ角9回転方向、電流の
0N−OFF 、カウントダウン等)と駆動信号32の
状態を示す。33はタイマ駆動信号(GATE L)で
、タイマ4の始動、停止を制御する。34はタイマ駆動
信号(GATE2)で、タイマ5の始動、停止を制御す
る。35はリセット信号で、エツジトリガ型のフリップ
フロップ13をリセットする。36はリセット信号で、
エツジトリガ型フリップフロップ14をリセットする。
29 is an output pulse signal (OUT2), which is output from the timer 5. Reference numeral 30 denotes motor information, which indicates information necessary for the step motor driver circuit 9 (step angle 9 rotation direction, current ON-OFF, countdown, etc.) and the state of the drive signal 32. A timer drive signal (GATE L) 33 controls starting and stopping of the timer 4. A timer drive signal (GATE2) 34 controls starting and stopping of the timer 5. A reset signal 35 resets the edge trigger type flip-flop 13. 36 is a reset signal,
The edge trigger type flip-flop 14 is reset.

37は割込信号で、CPU1の割込端子R3Tlに入力
される。38は割込信号で、CPU1の割込端子R3T
2に入力される。
37 is an interrupt signal, which is input to the interrupt terminal R3Tl of the CPU1. 38 is an interrupt signal, which is connected to the interrupt terminal R3T of CPU1.
2 is input.

ROM2にあらかじめ書き込まれている制御プログラム
に応じて、CPU1は表示・キー人力装置15を使用し
て操作者が入力した情報をドライバ8.I10ポート6
を介してRAM3にある書式で格納する。特に、表示・
キー人力の制御は、タイマ4で発生する一定周期のパル
ス信号によって割込みをFF13を介してCPU1の割
込端子R5Tlにかけることにより実行される。
According to a control program written in advance in the ROM 2, the CPU 1 transfers information input by the operator using the display/key manual device 15 to the driver 8. I10 port 6
It is stored in RAM 3 in a certain format via . In particular, display and
The key manual control is executed by applying an interrupt to the interrupt terminal R5Tl of the CPU 1 via the FF 13 in response to a constant cycle pulse signal generated by the timer 4.

次にCPUIはRAM3に格納された情報に応じてタイ
マ5に所定の駆動パルス27を発生するようにタイマ5
にデータを書き込む。CPUIは表示・キー人力装置1
5からステップモータ1゜を始動させる始動信号(MO
TOR・ON信号のHレベル状8)を受けると、RAM
3に蓄えられた情報のうち、ステップモータドライバ回
路9に必要な情報(ステップ角2回転方向、電流の0N
−OFF、カウントダウン等)をI10ボート6を介し
て モータ情報3oとして出力し、さらにドライバ7を
介してステップモータドライバ回路9に与える。その後
、CPUIは駆動パルス27を出力させるためにタイマ
駆動信号34をHレベル状態にする。これにより発生し
た駆動パルス27はドライバ7を介してステップモータ
ドライバ回路9に供給されてステップモータドライバ回
路9は、駆動パルス27のエツジ(立ち下り)を検知す
る毎にステップモータ1oが1ステツプ角だけ回転する
ようにモータ各相への電流を駆動信号32として与える
。また、駆動パルス27はドライバ7を介して出力パル
ス信号29としてFF13に送られ、出力パルス信号2
9のエツジ(立ち下り)を検出し、CPU1の割込端子
R5T1に割込信号37として与えられる。ここでの割
り込み処理は、所定のパルスの数がステップモータドラ
イバ回路9に出力されたかどうかを割込回数(出力パル
ス信号29のエツジ(立ち下がり回数))をカウントす
ることにより判断する。
Next, the CPU instructs the timer 5 to generate a predetermined drive pulse 27 in accordance with the information stored in the RAM 3.
Write data to. CPUI display/key human power device 1
A starting signal (MO
When receiving the H level 8) of the TOR ON signal, the RAM
Among the information stored in 3, the information necessary for the step motor driver circuit 9 (step angle 2 rotation direction, current 0N)
-OFF, countdown, etc.) is output as motor information 3o via the I10 boat 6, and further provided to the step motor driver circuit 9 via the driver 7. Thereafter, the CPUI sets the timer drive signal 34 to an H level state in order to output the drive pulse 27. The drive pulse 27 generated thereby is supplied to the step motor driver circuit 9 via the driver 7, and the step motor driver circuit 9 rotates the step motor 1o by one step angle every time an edge (falling edge) of the drive pulse 27 is detected. A current is applied as a drive signal 32 to each phase of the motor so that the motor rotates by the same amount. Further, the drive pulse 27 is sent to the FF 13 as an output pulse signal 29 via the driver 7, and the output pulse signal 2
The edge (falling edge) of 9 is detected and applied as an interrupt signal 37 to the interrupt terminal R5T1 of the CPU1. In this interrupt processing, whether or not a predetermined number of pulses have been output to the step motor driver circuit 9 is determined by counting the number of interrupts (the number of edges (falling number) of the output pulse signal 29).

CPU1は、所定数のパルスの出力を終了した時、また
は表示・キー人力装置15からモータの停止信号(MO
TOR10N信号のLレベル状8)を受けた時、タイマ
5の駆動パルス27を停止させるため、タイマ駆動信号
34をLレベル状態にする。
When the CPU 1 finishes outputting a predetermined number of pulses, or receives a motor stop signal (MO
When receiving the L level state 8) of the TOR10N signal, the timer drive signal 34 is set to the L level state in order to stop the drive pulse 27 of the timer 5.

次に第2図(a)〜(d)を参照しながらタイマ5の動
作について説明する。
Next, the operation of the timer 5 will be explained with reference to FIGS. 2(a) to 2(d).

第2図(a)〜l)はタイマ5の動作を説明するタイム
チャートである。
FIGS. 2(a) to 2(l) are time charts illustrating the operation of the timer 5. FIG.

この図において、(a)はクロック信号19を示し、(
b)はタイマ駆動信号34を示し、Hレベル状態でカウ
ントをイネーブルにし、Lレベル状態で駆動パルス27
をHレベル状態に設定する。(C)は駆動パルス27(
出力パルス信号29)を示し、(d)はライト信号21
でLレベル状態で、カウンタ設定値nをタイマ5に書き
込む。
In this figure, (a) shows the clock signal 19, and (
b) shows the timer drive signal 34, which enables counting when in the H level state and the drive pulse 27 when in the L level state.
is set to H level. (C) is the drive pulse 27 (
(d) shows the output pulse signal 29), and (d) shows the write signal 21.
In the L level state, the counter setting value n is written to the timer 5.

この図かられかるように、駆動パルス27は、そのカウ
ンタ設定値nの半分をカウントするとL状態となり(た
だし、nが奇数の場合は、(n−1)72分カウントす
ると)、カウンタ設定値nが、例えばr6Jからr4J
に変わると、現在のカウント出力の変化点Aから、新し
いカウンタ設定値(n=4)で動作する。このような動
作は、プログラマブル・インターバルタイマIC(82
53または8254)等のワンチップのタイマ5を使用
する場合は、そのモードを「3」に設定すればよい。モ
ードの設定はタイマ5の内部レジスタ(図示しない)に
データを書き込むことで行う。このようにカウンタ設定
値を変えることによって駆動パルス27.出力パルス信
号29の周波数を可変できる。
As can be seen from this figure, the drive pulse 27 becomes the L state when half of the counter setting value n is counted (however, if n is an odd number, when counting (n-1) 72 minutes), the driving pulse 27 reaches the counter setting value n is, for example, r6J to r4J
When the current count output changes to point A, the counter operates with a new counter setting value (n=4). Such operation is performed using a programmable interval timer IC (82
When using a one-chip timer 5 such as 53 or 8254), the mode may be set to "3". The mode is set by writing data to an internal register (not shown) of the timer 5. By changing the counter setting value in this way, the driving pulse 27. The frequency of the output pulse signal 29 can be varied.

同様にタイマ4もプログラマブルφインターバルタイマ
IC(8253または8254)等のワンチップで構成
される場合は、モードをF3jに設定する。タイマ4の
出力パルス信号28はFF13を介してCPU1の割込
端子R5Tlに入力されている。ここでの割込は、表示
およびキー人力の処理を行うので、一定周期で割り込み
がかかればよく、タイマ4にある定数をカウンタ設定値
として一度書き込むことにより実現される。
Similarly, when the timer 4 is configured with a single chip such as a programmable φ interval timer IC (8253 or 8254), the mode is set to F3j. The output pulse signal 28 of the timer 4 is input to the interrupt terminal R5Tl of the CPU 1 via the FF 13. Since the interrupt here performs display and key manual processing, it is sufficient that the interrupt occurs at a fixed period, and this can be realized by once writing a constant in the timer 4 as a counter setting value.

次に第3図および第4図を参照しながら駆動パルス27
および出力パルス信号29を発生させる方法について説
明する。
Next, referring to FIGS. 3 and 4, the driving pulse 27 is
and a method of generating the output pulse signal 29 will be explained.

第3図はRAM3に格納されるパルス情報を説明する図
であり、Xはステップ番号を示し、  fxはステップ
X時の駆動パルス27(出力パルス信号29)の周波数
を示し、PxはステップX時の駆動パルス27(出力パ
ルス信号29)の数を示し、CXはステップX時の駆動
パルス27(出力パルス信号29)のカウンタ5のカウ
ンタ設定値を示し、ΔtxはステップXの時間を示して
いる。なお、nはRAM3の容量から決定される有限な
整数である。これらの情報は、RAM5上の所定の位置
にテーブルデータとして格納されており、随時読み出す
ことができる。
FIG. 3 is a diagram explaining the pulse information stored in the RAM 3, where X indicates the step number, fx indicates the frequency of the drive pulse 27 (output pulse signal 29) at step X, and Px indicates the frequency at step X. CX indicates the counter setting value of the counter 5 of the drive pulse 27 (output pulse signal 29) at step X, and Δtx indicates the time of step X. . Note that n is a finite integer determined from the capacity of the RAM 3. This information is stored as table data at a predetermined location on the RAM 5, and can be read out at any time.

また、周波数fx とカウンタ設定値CXの関係は、ク
ロック信号19の周波数をfΦとすると、Cx”fΦ/
 f xで与えられ、CXはfxから自動的に計算され
る。格納された情報、特に駆動パル7.27の数P8と
カウンタ設定値C× 、ステップXに基づいて駆動パル
ス27を発生させる。
Furthermore, the relationship between the frequency fx and the counter setting value CX is as follows: If the frequency of the clock signal 19 is fΦ, then Cx"fΦ/
fx, and CX is automatically calculated from fx. The drive pulse 27 is generated based on the stored information, particularly the number P8 of drive pulses 7.27, the counter setting value Cx, and the step X.

第4図(a)、(b)は駆動パルス27のスローアップ
パルスパターンを説明するタイムチャートで、同図(a
)において、第3図と同一のものには同じ符号を付して
いる。同図(b)において、縦軸は周波数f×を示し、
横軸は時間Δt×を示している。
FIGS. 4(a) and 4(b) are time charts for explaining the slow-up pulse pattern of the drive pulse 27, and FIG.
), the same parts as in FIG. 3 are given the same reference numerals. In the same figure (b), the vertical axis indicates the frequency f×,
The horizontal axis indicates time Δt×.

駆動パルス27のパルスパターン情報の入力は、基本的
には、ステップ数nと各ステップでの駆動パルスの周波
数f×と駆動パルスP×を表示・キー人力装置15のキ
ーボードより入力し、RAMa上に設定することで行う
(形式1と略す)。この際のステップ数nはメモリ容量
に限界があるので、ある上限を有する。下限はn=1で
ある。
To input the pulse pattern information of the drive pulse 27, basically, input the number of steps n, the frequency fx of the drive pulse at each step, and the drive pulse Px from the keyboard of the display/key human power device 15, and then input it on the RAMa. This is done by setting (abbreviated as format 1). The number of steps n at this time has a certain upper limit because there is a limit to the memory capacity. The lower limit is n=1.

なお、カウンタ設定値CXおよびステップXの時間Δt
8は自動的にCPU1が下記節(1)。
Note that the counter setting value CX and the time Δt of step
8, CPU1 automatically executes the following section (1).

(2)式で計算する。Calculate using formula (2).

Cx=fΦ/ f x    ・・・・・・(1)Δt
 X = CX  −Px    ・−・−(2)ただ
し、fΦはクロック信号19の周波数で、初期時に設定
する。
Cx=fΦ/ f x (1) Δt
X = CX - Px (2) where fΦ is the frequency of the clock signal 19 and is set at the initial stage.

第4図(b)で実線で示される駆動パルス27のパター
ンは、周波数の異なるパルスの連結点を含むように駆動
パルス27の立ち下りから立ち下りまでの周期を計ると
、中間の周波数のパルスとみなせるパルスパターンとな
る。これはスローアップおよびスローダウンを行う際に
、時間に対する周波数の変化を小さくする方向に働き、
スムーズな駆動を実現する。
The pattern of the drive pulse 27 shown by the solid line in FIG. 4(b) is a pulse with an intermediate frequency when the period from fall to fall of the drive pulse 27 is measured to include connection points of pulses with different frequencies. This is a pulse pattern that can be considered as . This works to reduce the change in frequency over time when slowing up and slowing down.
Achieve smooth drive.

なお、駆動パルス27の立ち上りで駆動信号32にトリ
ガをかける場合は第4図(b)に示す点線の駆動パター
ンとなる。
Note that when the drive signal 32 is triggered at the rising edge of the drive pulse 27, the drive pattern shown by the dotted line shown in FIG. 4(b) is obtained.

次に第5図(a)、(b)を参照しながら駆動パルス2
7の設定動作について説明する。
Next, while referring to FIGS. 5(a) and (b), drive pulse 2
The setting operation in step 7 will be explained.

第5図(a)、(b)はこの発明の一実施例を示すパル
ス情報のテーブル設定動作を説明するフローチャートで
ある。(1)〜(10) 、 (11)〜(14)は各
ステップを示す。
FIGS. 5(a) and 5(b) are flowcharts illustrating a pulse information table setting operation showing an embodiment of the present invention. (1) to (10) and (11) to (14) indicate each step.

まず、モータ始動信号、すなわち駆動信号32がHレベ
ル状態になるのを待機しく1)、駆動信号32を受ける
まではキー人力受は付は状B(タイマ駆動信号34がL
レベル状態1割り込みはイネーブル状態、タイマ4,5
はモードr3J状態)で、駆動信号32がHレベル状態
になったら、ワーキングレジスタCNT(出力パルス信
号29の数をカウントする加算カウンタとして使用)と
ワーキングレジスタX(実行しているステップ数をカウ
ントする加算カウンタとして使用)とフラグレジスタF
LGをrOJにクリアする(2)。次にステップ時のカ
ウンタ設定値Co をRAM3から読み出し、タイマ5
にセットしく3)、タイマ駆動信号34をHレベルに設
定することで(4)、タイマ5のカウントを開始し、ス
テップ0時の駆動パルス27.出力パルス信号29を出
力させる。駆動パルス27.出力パルス信号29が出力
されると、第5図(b)に示す割込みルーチンに進み、
出力パルス信号29のエツジ(ここでは立下り)毎にか
かる。割込み処理では、ワーキングレジスタCNTにr
lJを加算しく11)、出力された出力パルス信号29
の数をカウントし、ワーキングレジスタCNTがステッ
プ0時のパルス数Po と同等となったか、すなわち、
ステップ0時のパルスの数Poだけ実際に駆動パルス2
7.出力パルス信号29が出力されたかどうかを判断し
く12)、NOならば第5図(b)に示すフローを終了
し、YESならばフラグレジスタFLGをrlJに設定
(13)、ワーキングレジスタCNTをrOJにクリア
しく14)、割込処理をぬけて第5図(a)に示すメイ
ンルーチン処理に戻り、フラグFLGが「1jになるの
を待機しく5)、タイマ5のカウンタへの設定値C1を
新しく書き込まず前に設定した値Coの周波数fOで駆
動パルス27.出力パルス信号29を出力する。フラグ
FLGがrlJになったら、フラグFLGをrOJにク
リアしく6)、ワーキングレジスタXがステップ数nに
等しいかどうかを判断しく?)、Noならば、すなわち
、ワーキングレジスタXの値がステップ数nより小さい
場合は、ワーキングレジスタXに「1jを加え(8)、
タイマ5に次のステップ1のカウンタ設定値C1を設定
しく8)、次の周波数f1となる駆動パルス27.出力
パルス信号29を出力する。この動作をワーキングレジ
スタXがステップ数nと等しくなる、すなわち、指定し
た駆動パルス27がすべて駆動パルス27.出力パルス
信号29として出力されるまで繰り返す。
First, wait for the motor start signal, that is, the drive signal 32 to go to the H level state (1), and until the drive signal 32 is received, the key manual receiver is in the state B (the timer drive signal 34 is at the L level).
Level status 1 interrupt is enabled, timers 4 and 5
is in mode r3J state), and when the drive signal 32 becomes H level, working register CNT (used as an addition counter to count the number of output pulse signals 29) and working register X (used as an addition counter to count the number of steps being executed) (used as an addition counter) and flag register F
Clear LG to rOJ (2). Next, the counter setting value Co at the time of step is read from RAM3, and the timer 5
3), and by setting the timer drive signal 34 to H level (4), the timer 5 starts counting, and the drive pulse 27. at step 0 is set. The output pulse signal 29 is output. Drive pulse 27. When the output pulse signal 29 is output, the process proceeds to the interrupt routine shown in FIG. 5(b).
This occurs at every edge (falling edge in this case) of the output pulse signal 29. In interrupt processing, r is set in working register CNT.
11) and the output pulse signal 29
Count the number of pulses and check whether the working register CNT is equal to the number of pulses Po at step 0, that is,
The number of pulses Po at step 0 is actually the driving pulse 2.
7. It is determined whether the output pulse signal 29 has been output (12). If NO, the flow shown in FIG. 14), skips the interrupt processing and returns to the main routine processing shown in FIG. The drive pulse 27 and output pulse signal 29 are output at the frequency fO of the previously set value Co without writing a new one.When the flag FLG becomes rlJ, the flag FLG is cleared to rOJ6), and the working register ), if No, that is, if the value of working register X is smaller than the number of steps n, add 1j to working register
Set the counter setting value C1 for the next step 1 in the timer 58), and set the drive pulse 27.8 to have the next frequency f1. An output pulse signal 29 is output. This operation is performed so that the working register X becomes equal to the number of steps n, that is, all of the specified drive pulses 27. This process is repeated until the output pulse signal 29 is output.

一方、ステップ(7)の判断でYESの場合、すなわち
、ワーキングレジスタXとステップ数nが等しくなると
タイマ駆動信号34をLレベル状態にし、タイマ5のカ
ウントを停止させ、駆動パルス27.出力パルス信号2
9をHレベル状態に設定して制御を終了する(10)。
On the other hand, if the determination in step (7) is YES, that is, if the working register Output pulse signal 2
9 is set to the H level state and the control is ended (10).

次に第6図〜第8図を参照しながらこの発明による駆動
パルス27のパターン情報入力動作について説明する。
Next, the pattern information input operation of the drive pulse 27 according to the present invention will be described with reference to FIGS. 6 to 8.

第6図は駆動パルス27の周波数と出力するパルスの数
との関係を示す相関図であり、縦軸は周波数f×を示し
、横軸は出力パルスaPxを示している。以下、駆動パ
ルス27の始動周波数F。
FIG. 6 is a correlation diagram showing the relationship between the frequency of the drive pulse 27 and the number of output pulses, where the vertical axis shows the frequency fx and the horizontal axis shows the output pulse aPx. The following is the starting frequency F of the drive pulse 27.

から安定周波aF 1まで、出力パルス数P】でスロー
アップ(形式2と略す)する場合の動作について説明す
る。なお、ステップ数n!はrloJとする。
The operation when slowing up (abbreviated as format 2) with the number of output pulses P from 1 to the stable frequency aF1 will be explained. In addition, the number of steps is n! is rloJ.

入力するパルス情報は、スローアップ時の始動周波数F
o  、安定周波数Fio出力するパルスの数P+  
、ステップの数nl である。
The input pulse information is the starting frequency F during slow-up.
o, number of pulses to output stable frequency Fio P+
, the number of steps nl.

各ステップXの駆動パルス27の周波数fXと出力する
パルスの数Pxは、下記第(3)、(4)式%式% これらをcptyiが自動的に計算する(x=0〜n+
)、この場合も、カウンタ設定値C×とステップXの時
間Δtxは上記第(1)、(2)式で求められる。なお
、周波数fx と時間との関係は直線とはならない。
The frequency fX of the drive pulse 27 of each step
), also in this case, the counter setting value Cx and the time Δtx of step X are determined by the above equations (1) and (2). Note that the relationship between frequency fx and time is not a straight line.

第7図は駆動パルス27の周波数と時間との関係を示す
相関図であり、縦軸は周波数f×を示(し、横軸はステ
ップXの時間Δt×を示している。以下、周波数f×と
時間Δ1xが直線関係を保ちながら、駆動パルス27の
始動周波数FOから安定周波数F、まで、出力パルス数
F、でスローアップする(形式3と略す)場合の駆動パ
ルスパターンのデータ入力とその変換動作について説明
する。
FIG. 7 is a correlation diagram showing the relationship between the frequency and time of the drive pulse 27, where the vertical axis shows the frequency f× (and the horizontal axis shows the time Δt× of step X. Hereinafter, the frequency f Data input of the drive pulse pattern when the drive pulse 27 is slowed down by the number of output pulses F from the starting frequency FO to the stable frequency F while maintaining a linear relationship between x and time Δ1x (abbreviated as format 3). The conversion operation will be explained.

入力するパルス情報は、スローアップ時の始動周波数F
o  、安定周波数F+  、出力するパルスの数P+
  、ステップの数n+  (=8)である。
The input pulse information is the starting frequency F during slow-up.
o, stable frequency F+, number of output pulses P+
, the number of steps is n+ (=8).

各ステップXの駆動パルス27の周波数f×と出力する
パルスの数PX と時間tX 、Δを−との関係は、下
記節(5)〜(12)式で与えられる。
The relationship between the frequency fx of the driving pulse 27 of each step X, the number PX of output pulses, the time tX, and Δ - is given by the following equations (5) to (12).

fO=Fo             ・・・・・・−
・・(5)fX=α・Δtx−++fx−+(x=1〜
n+)  −−([3)ただし、a =(F42−Fo
2 )/(2・nl)   ・・・−(7)PX =P
] /rz   (x=o”rz ) ・・・−(8)
to =Q              ・・・・・・
(8)tX=tx−1+Δtx−+(x=1〜n+) 
   ”・・(10)Δto=fΦ・Pa / f o
       =(11)ただし、fΦはクロック信号
19の周波数Δtx= tX+ tx−1(x=1〜n
+)      ・・・・・(12)このうち、第(5
)式、第(8)式、第(9)式、第(11)式よりステ
770時の周波数fo  、パルスの数Po と時間t
o  、Δto を求め、それらの値と、第(6)式、
第(8)式、第(10)式、第(12)式より次のステ
ップ1時の周波数f1 、パルスの数P+  、時間t
l  、Δt1を求める。この動作をステップn】時ま
で繰り返し、周波数fX+パルスの数Pう 9時間tx
  、Δt8を求める。この場合第7図に示されるよう
に、時間txと駆動パルス27の周波数f×とは直線関
係になるが、パルスの数Px と駆動パルス27の周波
数f×とは第8図に示されるように直線とはならない。
fO=Fo ・・・・・・−
...(5) fX=α・Δtx−++fx−+(x=1~
n+) --([3) However, a = (F42-Fo
2)/(2・nl)...-(7)PX=P
] /rz (x=o”rz) ...-(8)
to=Q・・・・・・
(8) tX=tx-1+Δtx-+(x=1~n+)
”...(10)Δto=fΦ・Pa/fo
= (11) However, fΦ is the frequency Δtx of the clock signal 19 = tX + tx-1 (x = 1 to n
+) ・・・・・・(12) Of these, the (5th)
), Equation (8), Equation (9), and Equation (11), the frequency fo at step 770, the number of pulses Po, and the time t
o and Δto are calculated, and their values and equation (6),
From equations (8), (10), and (12), the frequency f1 at the next step 1, the number of pulses P+, and the time t
Find l and Δt1. This operation is repeated until step n], and frequency fX + number of pulses P is 9 hours tx
, Δt8 are determined. In this case, as shown in FIG. 7, the time tx and the frequency fx of the drive pulse 27 have a linear relationship, but the number of pulses Px and the frequency fx of the drive pulse 27 have a linear relationship as shown in FIG. is not a straight line.

第9図はこの発明による駆動パルスパターンの情報入力
動作を説明するフローチャートである。
FIG. 9 is a flowchart illustrating the information input operation of the drive pulse pattern according to the present invention.

なお、(21)〜〔31〕は各ステップを示す。また、
各ステップ(21)〜(31)の処理手順はサブルーチ
ン化されてROM2 、RAM3に格納されて、随時読
み出せるように構成されている。
Note that (21) to [31] indicate each step. Also,
The processing procedure of each step (21) to (31) is made into a subroutine and stored in the ROM 2 and RAM 3, so that it can be read out at any time.

まず、駆動パルス27のパルスパターンの入力形式の選
択を行い(21)、駆動パルス27のパルスパターンに
関する情報入力を行う(22)。次いで、入力形式を変
更するかどうかを判定しく23)、YESならばステッ
プ(22)に戻り、NOならばパルスパターンの情報入
力が終了したかどうかを判断しく24)、NOならばス
テップ(22)に戻り、YESならばテーブル作成方法
を選択する(25)。次いで。
First, the input format of the pulse pattern of the drive pulse 27 is selected (21), and information regarding the pulse pattern of the drive pulse 27 is input (22). Next, it is determined whether or not to change the input format (23), and if YES, the process returns to step (22); if NO, it is determined whether or not the pulse pattern information input has been completed (24), and if NO, step (22) is determined. ), and if YES, select the table creation method (25). Next.

入力形式およびテーブルの作成方法が一致するかどうか
を判断しく2B)、YESならばステップ(28)に進
み、NOならば作成方法を変更するかどうかを判断しく
27)、YESなら(25)に戻り、NOならばステッ
プ(21)に戻る。
Determine whether the input format and table creation method match (2B); if YES, proceed to step (28); if NO, determine whether to change the creation method (27); if YES, proceed to (25). Return, and if NO, return to step (21).

一方、ステップ(26)の判断で、YESの場合は、駆
動パルス27のパルスパターンのテーブルを作成しく2
8)、次いでテーブルを変換するかどうかを判断しく2
9)、この判断で、Noならば制御を終了してメインル
ーチンに戻り、YESならばテーブルをクリアするかど
うかを判断しく30)、YESならば(21)に戻り、
NOならば変更個所を指定して(31)、 ステップ(
25)に戻る。
On the other hand, if the determination in step (26) is YES, create a table of the pulse pattern of the drive pulse 27.
8), then decide whether to convert the table or not.
9) In this judgment, if No, the control ends and returns to the main routine, if YES, it is decided whether to clear the table 30), and if YES, returns to (21),
If NO, specify the changes (31) and proceed to step (
Return to 25).

なお、上記実施例では、駆動パルス27の周波数f、を
変更する時点は、駆動パルス27のエツジを検出して行
う場合について説明したが、同一の周波数f×を出力す
る時間Δt×をあらかじめ計算しておき、これを新たに
設けるカウンタで時間管理することにより、周波数fx
を変更する時点(時刻)を検出できる。
In the above embodiment, the case where the frequency f of the drive pulse 27 is changed is explained by detecting the edge of the drive pulse 27, but the time Δtx for outputting the same frequency fx may be calculated in advance. By managing the time using a newly installed counter, the frequency fx
It is possible to detect the point (time) at which the value changes.

また、上記実施例では駆動パルス25のパルスパターン
の情報入力方法におけるパルスの数Pxの代りに同一周
波数fxを出力するΔtX等、パルスの数の代りに時間
情報として入力すれば、運動の立ち上り時間、立ち下り
時間等の時間の設定がある場合、設定時間に合うように
駆動パルスのパターンを求めるのに有効である。
In addition, in the above embodiment, if time information is input instead of the number of pulses, such as ΔtX that outputs the same frequency fx instead of the number of pulses Px in the information input method of the pulse pattern of the drive pulse 25, the rise time of the movement , fall time, etc., this is effective for finding a drive pulse pattern that matches the set time.

さらに、駆動パルス27の数P×の入力と時間時間Δt
×の入力とを複合して行ってもよい。
Furthermore, the input of the number P× of drive pulses 27 and the time period Δt
This may be done in combination with the input of ×.

〔発明の効果〕〔Effect of the invention〕

以上説明したように、この発明は入力手段より入力され
る駆動パルスのパルス情報に応じてパルスパターンを作
成するパルスパターン作成手段と、パルスパターンを格
納するパルスパターンテーブルメモリと、このパルスパ
ターンテーブルメモリに書き込まれたパルスパターンに
応じて駆動パルスを発生させステッピングモータを駆動
するパルス発生手段を設けたので、駆動パルスパターン
の設定の自由度が高くなるため、アクチュエートする系
に最適な駆動パルスをステッピングモータに供給でき、
スローダウン、スローアップを細密に制御できる優れた
利点を有する。
As explained above, the present invention includes a pulse pattern creation means for creating a pulse pattern according to pulse information of a drive pulse inputted from an input means, a pulse pattern table memory for storing the pulse pattern, and a pulse pattern table memory for storing the pulse pattern. Since we have provided a pulse generation means that generates drive pulses to drive the stepping motor in accordance with the pulse pattern written in the Can be supplied to stepping motors,
It has the excellent advantage of being able to precisely control slowdown and slowup.

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

第1図はこの発明の一実施例を示すステッピングモータ
の制御装置を説明する構成ブロック図、第2図(a)〜
Cd)はタイマの動作を説明するタイムチャート、第3
図は第1図に示すRAMに格納されるパルス情報を説明
する図、第4図(a)、(b)は駆動パルスのスローア
ップパターンを説明するタイムチャート、第5図(a)
。 (b)はこの発明の一実施例を示すパルス情報のテーブ
ル設定動作を説明するフローチャート、第6図、第8図
は駆動パルスの周波数と出力するパルスの数との関係を
示す相関図、第7図は駆動パルスの周波数と時間との関
係を示す相関図、第9図はこの発明による駆動パルスパ
ターンの情報入力動作を説明するフローチャートである
。 図中、1はCPU、2はROM、3はRAM、4.5は
タイマ、6はI10ボート、7.8はドライバ、9はス
テップモータドライバ回路、10はステップモータ、]
1はアドレスデコーダ、12は水晶発振子、13.14
はエツジトリガ型のフリップフロップ、15は表示−キ
ー人力装置、16は基準クロック信号、17はデータバ
ス、]8はアドレスバス、19はクロック信号、20は
リード信号、21はライト信号、22〜26はセレクト
信号、27は駆動パルス、28゜29は出力パルス信号
、30はモータ情報、32は駆動信号、33.34はタ
イマ駆動信号、35.36はリセット信号、37.38
は割込信号である。 第6図 1x 第7図 0     一時間Δt8 第8図 一ノχントスのIKPX
FIG. 1 is a configuration block diagram illustrating a stepping motor control device showing one embodiment of the present invention, and FIG. 2(a) to
Cd) is a time chart explaining the operation of the timer, the third
The figures are diagrams explaining pulse information stored in the RAM shown in Figure 1, Figures 4 (a) and (b) are time charts explaining the slow-up pattern of drive pulses, and Figure 5 (a).
. (b) is a flowchart explaining the pulse information table setting operation showing an embodiment of the present invention; FIGS. 6 and 8 are correlation diagrams showing the relationship between the frequency of the drive pulse and the number of output pulses; FIG. 7 is a correlation diagram showing the relationship between drive pulse frequency and time, and FIG. 9 is a flowchart illustrating the information input operation of the drive pulse pattern according to the present invention. In the figure, 1 is the CPU, 2 is the ROM, 3 is the RAM, 4.5 is the timer, 6 is the I10 board, 7.8 is the driver, 9 is the step motor driver circuit, 10 is the step motor,]
1 is an address decoder, 12 is a crystal oscillator, 13.14
15 is an edge trigger type flip-flop, 15 is a display-key human input device, 16 is a reference clock signal, 17 is a data bus, ] 8 is an address bus, 19 is a clock signal, 20 is a read signal, 21 is a write signal, 22 to 26 is a select signal, 27 is a drive pulse, 28°29 is an output pulse signal, 30 is motor information, 32 is a drive signal, 33.34 is a timer drive signal, 35.36 is a reset signal, 37.38
is an interrupt signal. Fig. 6 1x Fig. 7 0 1 hour Δt8 Fig. 8 IKPX of 1 no χ tos

Claims (2)

【特許請求の範囲】[Claims] (1)ステッピングモータの駆動を可変速に制御するス
テッピングモータ制御装置において、入力手段より入力
される駆動パルスのパルス情報に応じてパルスパターン
を作成するパルスパターン作成手段と、前記パルスパタ
ーンを格納するパルスパターンテーブルメモリと、この
パルスパターンテーブルメモリに書き込まれた前記パル
スパターンに応じて前記駆動パルスを発生させ前記ステ
ッピングモータを駆動するパルス発生手段を設けたこと
を特徴とするステッピングモータ制御装置。
(1) A stepping motor control device that controls the driving of a stepping motor at a variable speed, comprising a pulse pattern creating means for creating a pulse pattern according to pulse information of a drive pulse inputted from an input means, and storing the pulse pattern. A stepping motor control device comprising: a pulse pattern table memory; and a pulse generating means for generating the drive pulses and driving the stepping motor according to the pulse pattern written in the pulse pattern table memory.
(2)パルスパターン作成手段は、駆動パルスの周波数
,駆動パルスの数を可変に作成し、パルスパターンテー
ブルメモリ上へ格納することを特徴とする特許請求の範
囲第(1)項記載のステッピングモータ制御装置。
(2) The stepping motor according to claim (1), wherein the pulse pattern creation means variably creates the frequency of the drive pulse and the number of drive pulses, and stores the created pulse pattern in a pulse pattern table memory. Control device.
JP17500385A 1985-08-10 1985-08-10 Controller for stepping motor Pending JPS6237100A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP17500385A JPS6237100A (en) 1985-08-10 1985-08-10 Controller for stepping motor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP17500385A JPS6237100A (en) 1985-08-10 1985-08-10 Controller for stepping motor

Publications (1)

Publication Number Publication Date
JPS6237100A true JPS6237100A (en) 1987-02-18

Family

ID=15988515

Family Applications (1)

Application Number Title Priority Date Filing Date
JP17500385A Pending JPS6237100A (en) 1985-08-10 1985-08-10 Controller for stepping motor

Country Status (1)

Country Link
JP (1) JPS6237100A (en)

Similar Documents

Publication Publication Date Title
US4134106A (en) Absolute resolver angle to digital converter circuit
JPS5927013B2 (en) Speed control method of magnetic tape feed motor
JPH0526439B2 (en)
JPS6237100A (en) Controller for stepping motor
JP2752514B2 (en) Program execution method of CNC device
JP4071776B2 (en) Pulse generation method and pulse generation apparatus, and motor control system using the same
JPS5853762B2 (en) Delay time control circuit
KR100760204B1 (en) Pulse generating method and pulse generator in motor control system
JP3289921B2 (en) Programmable controller
JPS62245338A (en) Software delaying system for data processor
JPH04250502A (en) Programmable controller
JP3514532B2 (en) Clock signal generator
JP2621477B2 (en) In-circuit emulator
JP3555726B2 (en) Pulse generator
JP2701410B2 (en) Sine wave PWM signal generator
JPH0854956A (en) Processor with throughput varying function
JPH05188068A (en) Servo motor speed detecting device
JP2004227303A (en) Pulse generating ic for motor control
JPH07163173A (en) Rotation control circuit for rotor
JPH0442090A (en) Electronic timepiece
SU694832A2 (en) Programmed control device
JPS6035983A (en) Controller of motor
JPH0876826A (en) Pulse generation circuit
JPH02137683A (en) Laser controller
JPS6035982A (en) Controller of motor