JPS61191285A - Motor controller - Google Patents

Motor controller

Info

Publication number
JPS61191285A
JPS61191285A JP60033155A JP3315585A JPS61191285A JP S61191285 A JPS61191285 A JP S61191285A JP 60033155 A JP60033155 A JP 60033155A JP 3315585 A JP3315585 A JP 3315585A JP S61191285 A JPS61191285 A JP S61191285A
Authority
JP
Japan
Prior art keywords
motor
pulse
speed
encoder
interrupt
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
JP60033155A
Other languages
Japanese (ja)
Other versions
JPH0614793B2 (en
Inventor
Yoshikazu Ikenoue
義和 池ノ上
Hiroaki Hamano
浜野 広明
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.)
Minolta Co Ltd
Original Assignee
Minolta 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 Minolta Co Ltd filed Critical Minolta Co Ltd
Priority to JP60033155A priority Critical patent/JPH0614793B2/en
Publication of JPS61191285A publication Critical patent/JPS61191285A/en
Publication of JPH0614793B2 publication Critical patent/JPH0614793B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime 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
    • H02P23/00Arrangements or methods for the control of AC motors characterised by a control method other than vector control
    • H02P23/16Controlling the angular speed of one shaft

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Control Of Electric Motors In General (AREA)

Abstract

PURPOSE:To improve the response of control by controlling the rotating speed of a motor by the both rising and falling edges of a pulse encoder at a low speed rotation time, thereby shortening a control period. CONSTITUTION:A pulse signal of an encoder 2 shaped to a rectangular wave by a waveform shaper 3 is input to an interrupt generator 4. Here, the output of an OR gate becomes 'H' by the rising and falling edges of an encoder pulse at low speed time, and an interrupt request INTRQ is input to the terminal INT of a microcomputer 6. The microcomputer 6 obtains the optimum current flowing amount corresponding to the set rotating speed at every interrupt signal, and controls to output to a DC motor. The speed of the motor is controlled only by one of the rising and falling edges of the output pulse of the encoder.

Description

【発明の詳細な説明】 産業上の利用分野 この発明のモータの速度制御装置に関し、特にモータ速
度を表わすパルスの時間間隔に対応してモータ速度を制
御する装置に関する。
DETAILED DESCRIPTION OF THE INVENTION Field of the Invention The present invention relates to a motor speed control device, and more particularly to a device for controlling a motor speed in response to a time interval of pulses representing the motor speed.

従来技術 この種の速度制御装置として移動体を駆動するモータに
パルスエンコーダを設けて移動体の移動速度に対応した
ピッチでパルスエンコーダからパルス信号を発生せしめ
、該パルス信号の時間間隔を計測することによってモー
タの回転速度を検出し、この速度信号を用いてモータの
回転速度を制御して前記移動体の移動速度を制御するも
のが提供されている。そして、このものにおいて、高精
度の制御を実行するには、時間の計測に利用されるパル
ス信号の周期は短かくする方が良い。
Prior Art This type of speed control device involves providing a pulse encoder on a motor that drives a moving object, generating pulse signals from the pulse encoder at a pitch corresponding to the moving speed of the moving object, and measuring the time interval of the pulse signals. There has been provided a device that detects the rotational speed of a motor by using this method, and controls the rotational speed of the motor using this speed signal to control the moving speed of the moving body. In this case, in order to perform highly accurate control, it is better to shorten the period of the pulse signal used for time measurement.

このため、 (1)  パルスエンコーダのパルス発生間隔を、機械
的に高密度化する。
For this reason, (1) The pulse generation interval of the pulse encoder is mechanically increased in density.

(2)パルス信号の立上りと立下りの両方で信号を取り
、2倍の周波数の計測信号を得る。
(2) Signals are taken at both the rise and fall of the pulse signal to obtain a measurement signal with twice the frequency.

等の方法がある。There are other methods.

たとえば、複写機の変倍光学走査系駆動機構の様に、複
写倍率に応じてモータの回転速度が変化したり、光学走
査系の往動と復動でモータの回転速度が異なるモータの
制御装置では、一般に、低速回転時でも十分な制御性能
を得る為にパルスエンコーダの周期をなるべく短く設定
するが、高速回転時には、処理装置の処理時間の余裕が
少なくなる。特に、倍率範囲が広い場合や、複写速度を
速くする為に、復動時の速度を速くした場合には、処理
装置はパルスエンコーダのパルスを処理するのに十分な
余裕が得られなくなるという問題が生じる。
For example, a motor control device in which the rotational speed of the motor changes depending on the copying magnification, such as a variable-magnification optical scanning system drive mechanism of a copying machine, or a motor control device in which the rotational speed of the motor differs depending on the forward and backward movement of the optical scanning system. In general, the cycle of the pulse encoder is set as short as possible in order to obtain sufficient control performance even when rotating at low speed, but when rotating at high speed, the margin of processing time of the processing device decreases. In particular, when the magnification range is wide or when the speed of backward movement is increased in order to increase the copying speed, the processing device does not have enough margin to process the pulses of the pulse encoder. occurs.

たとえば特開昭59−20014号ではパルスエンコー
ダからのパルスの立上りと立下りの両エツジを用いてい
る為、実質的なエンコーダ周波数が2倍となり、低回転
でも秀れた制御性能を得るが、1         高
回転時には、マイコン等を用いたディジタル制御システ
ムでは、処理が間に合わなくなるという問題がある。
For example, in JP-A-59-20014, since both the rising and falling edges of the pulse from the pulse encoder are used, the actual encoder frequency is doubled and excellent control performance is obtained even at low rotation speeds. 1. At high rotation speeds, there is a problem that digital control systems using microcomputers etc. cannot keep up with the processing.

一方、特開昭57−159306号公報では、モータの
回転速度によりパルスエンコーダからの1パルス、又は
、2パルスで制御を行なうようにしているが、この方法
ではモータの高速回転時にパルスの検出ができないとい
う問題がある。
On the other hand, in Japanese Patent Laid-Open No. 57-159306, control is performed using one pulse or two pulses from a pulse encoder depending on the rotational speed of the motor, but with this method, pulses cannot be detected when the motor is rotating at high speed. The problem is that it can't be done.

発明の目的 この発明は広い範囲のモータの回転速度に対して、安定
してかつ正確に速度制御を行ない得る速度制御装置を提
供することを目的とする。
OBJECTS OF THE INVENTION It is an object of the present invention to provide a speed control device that can perform speed control stably and accurately over a wide range of motor rotational speeds.

発明の構成 この発明の制御装置は移動体を駆動するモータを含む駆
動手段と、移動体の移動速度に対応したピッチで立上り
、立下りを繰返すパルス信号を発生ずる手段と、該パル
ス信号が入力され、各パルス信号の立上り、立下りの時
間間隔をそれぞれ独立的に計測する計測手段と、該計測
手段によって計測された時間間隔に対応して前記移動体
を駆動するモータの回転速度を制御する制御手段とを備
え、制御手段は設定値が所定の回転速度以下では、前記
パルス信号発生手段からのパルス立上りと立−3= 下りの両方の時間間隔に対応してモータ速度を制御し、
設定値が所定の回転速度具」二では、前記パルスの立上
りか立下りのどちらか一方の時間間隔にのみ対応してモ
ータ速度を制御するように構成されていることを特徴と
する。
Structure of the Invention The control device of the present invention includes a driving means including a motor for driving a moving object, a means for generating a pulse signal that repeatedly rises and falls at a pitch corresponding to the moving speed of the moving object, and a control device to which the pulse signal is input. a measuring means for independently measuring the time interval between the rise and fall of each pulse signal, and controlling the rotational speed of the motor that drives the moving body in accordance with the time interval measured by the measuring means. control means, the control means controls the motor speed in response to both the time interval of the rise and fall of the pulse from the pulse signal generating means when the set value is below a predetermined rotation speed;
The rotational speed device having a predetermined set value is characterized in that the motor speed is controlled only in response to the time interval of either the rising edge or the falling edge of the pulse.

実施例 以下、本発明に係る速度制御装置の一実施例を添付図面
に従って説明する。本実施例は直流モル夕を駆動源とす
る移動体の速度制御に用いた例である。従って、移動速
度は直流モータの回転数として検出される。
Embodiment Hereinafter, one embodiment of a speed control device according to the present invention will be described with reference to the accompanying drawings. This embodiment is an example in which a direct current mower is used for speed control of a moving body using a DC mower as a driving source. Therefore, the moving speed is detected as the number of rotations of the DC motor.

第1図は本実施例のブロック図を示す。1は駆動源であ
る直流モ〜りである。2はエンコーダで、直流モータ1
に連動し、その回転数に比例した周波数のパルス信号を
発生する。3は波形整形回路で、エンコーダ2の信号を
方形波に変換する。4は割込み発生回路で、波形整形さ
れたエンコーダ2のパルス信号の立上りと立下りとでマ
イクロコンピュータ6の割り込み端子INTに割込み要
求INTRQを発生する。この割込み要求はマイクロコ
ンピュータ6からの応答信号TNTAK によってリセ
ットされる。
FIG. 1 shows a block diagram of this embodiment. 1 is a direct current motor which is a driving source. 2 is an encoder, and DC motor 1
It generates a pulse signal with a frequency proportional to the rotation speed. A waveform shaping circuit 3 converts the signal from the encoder 2 into a square wave. Reference numeral 4 denotes an interrupt generating circuit which generates an interrupt request INTRQ to the interrupt terminal INT of the microcomputer 6 based on the rising and falling edges of the waveform-shaped pulse signal of the encoder 2. This interrupt request is reset by a response signal TNTAK from the microcomputer 6.

5は基準発振回路で、前記エンコーダ2からのパルス信
号の立上り、立下りの時間間隔を測定する丸めの固定周
波数パルスを発し、このパルスはマイクロコンビコータ
6の外部クロック端子ECKに入力される。マイクロコ
ンピュータ6では外部クロック端子ECKに入力される
固定周波数パルスを内部カウンタで計数することによっ
て時間測定を行う。7はDAコンバータで、マイクロコ
ンピュータ6からのモータ1への通電量を示すデジタル
信号をアナログ信号に変換する。8はドライバ回路で、
DAコンバータ7からのアナログ信号を増幅し、モータ
lを駆動する。
5 is a reference oscillation circuit which generates a rounded fixed frequency pulse for measuring the time interval between the rise and fall of the pulse signal from the encoder 2, and this pulse is input to the external clock terminal ECK of the microcombicoater 6. The microcomputer 6 measures time by counting fixed frequency pulses input to the external clock terminal ECK using an internal counter. 7 is a DA converter that converts a digital signal from the microcomputer 6 indicating the amount of current applied to the motor 1 into an analog signal. 8 is the driver circuit,
The analog signal from the DA converter 7 is amplified to drive the motor l.

マイクロコンピュータ6にはモータの起動を指示する信
号5TARTが入力されるようになっているとともにモ
ータ速度を指定する信号5PEEDが入力されるように
なっている。速度指定信号5PEEDは1のときは高速
、0のときは低速を示す。
A signal 5TART instructing to start the motor is input to the microcomputer 6, as well as a signal 5PEED specifying the motor speed. The speed designation signal 5PEED indicates high speed when it is 1, and low speed when it is 0.

第2図は前記割込み発生回路4の具体例を示し、エンコ
−ダ・パルスは立」ニリ用のフリップ・フロップF F
 +のクロック端子CK及びインバータINを介して立
下り用フリップ・フロップFF、のクロック端子CKに
入力される。フリップ・フロップF’F’、、 FFv
の出力端子QはオアゲートOr(にそれぞれ人力され、
オアゲートOr(の出力、即ち割込み要求rNTRQは
前記マイクロコンピュータ6に入力される。また、フリ
ップ・フリップPF、、F’F、のクリア端子Cにはマ
イクロコンピュータ6からの割込み応答TNTAKが入
力される。
FIG. 2 shows a specific example of the interrupt generating circuit 4, in which the encoder pulse is set by a flip-flop F F for rising and falling.
The signal is input to the clock terminal CK of the falling flip-flop FF via the positive clock terminal CK and the inverter IN. Flip-flop F'F',, FFv
The output terminal Q of is manually inputted to the OR gate Or(,
The output of the OR gate Or (that is, the interrupt request rNTRQ) is input to the microcomputer 6. Also, the interrupt response TNTAK from the microcomputer 6 is input to the clear terminal C of the flip-flip PF, , F'F. .

即ち、エンコーダ・パルスの立上り、立下りの両方でオ
アゲートORから割込み要求TNTRQを出力し、割込
み応答INTAKにてフリップ・フロップF’F、 、
T;’Fffiの出力Qを“L”とする。
That is, the interrupt request TNTRQ is output from the OR gate OR at both the rising and falling edges of the encoder pulse, and the flip-flop F'F, , at the interrupt response INTAK is output.
T;' Set the output Q of Fffi to "L".

第3図、第4図は本実施例のタイミングチャートを示し
、ここで本実施例の基本的な動作を説明する。
FIGS. 3 and 4 show timing charts of this embodiment, and the basic operation of this embodiment will be explained here.

第3図はエンコーダパルスの立上りまたは立下りエツジ
について片エツジ処理、第4図は両エツジ処理のタイミ
ングを示している。
FIG. 3 shows the timing of single edge processing for the rising or falling edge of the encoder pulse, and FIG. 4 shows the timing of both edge processing.

まず、波形整形回路3によって方形波に整形されたエン
コーダ2のパルス信号は、割込み発生回路4に入力され
る。ここで、エンコーダ・パルスの立」ニリe。、と立
下りedownのエツジでオアゲゲ−)01’(の出力
が用”となり、割込み要求INTRQがマイクロコンピ
ュータ6の端子TNTに入力される。このとき、マイク
ロコンピュータ6では、後に第6図で説明する外部割込
み処理ルーチンIN’I”−Eが起動される。この外部
割込み処理ルーチンINT−Eではマイクロコンピュー
タ6に内蔵された基準タイマTのサンプリングを行い、
現在の時間Tcを得る。この時間Tcは、現在の立上り
eup 、立下り”downに対応するエツジが前に発
生した時間と比較され、エツジ間隔T(が計算される。
First, the pulse signal of the encoder 2 that has been shaped into a square wave by the waveform shaping circuit 3 is input to the interrupt generation circuit 4 . Here, the encoder pulse rises. , and at the edge of falling EDOWN, the output of 01' becomes "use", and an interrupt request INTRQ is input to the terminal TNT of the microcomputer 6. An external interrupt processing routine IN'I"-E is started. In this external interrupt processing routine INT-E, the reference timer T built in the microcomputer 6 is sampled.
Obtain the current time Tc. This time Tc is compared with the time when the edge corresponding to the current rising edge "eup" and falling edge "down" occurred previously, and the edge interval T() is calculated.

エツジ間隔TIはデユーティ比と周波数が一定であれば
、立上りellp  の場合、立下りedown  の
場合ともに同じになる。ここでは、前の立上り時間がメ
モリTAに、立下り時間がメモリTBに記憶されている
ものとする。エツジ間隔TIが計算されると、現在の時
間が更新データとして、メモリTA、THに記憶される
。また、エツジ間隔Tlが計算されると、制御の目標で
ある設定回転数に対応する時間間隔データTSとTiか
らら最適通電量を求め、直流モータに出力される。
If the duty ratio and frequency are constant, the edge interval TI will be the same for both rising ellp and falling eddown. Here, it is assumed that the previous rise time and fall time are stored in the memory TA and the memory TB, respectively. Once the edge interval TI is calculated, the current time is stored as update data in the memories TA and TH. Furthermore, when the edge interval Tl is calculated, the optimum amount of current is determined from the time interval data TS and Ti corresponding to the set rotation speed, which is the control target, and is output to the DC motor.

このよう、に、エンコーダ・パルスのデユーティ比が出
力P。utの出力時間に影響を与える。従って、デユー
ティ比は50%に近付ける方が好ましい。しかし、エン
コーダパルスのデユーティ比を正確に50%にしなけれ
ばならないということを意味するものではない。即ち、
デユーティ比が一定であれば、サンプリング周波数を見
かけ上2倍にすることができるのであり、第3図に示す
ようにH:L=5:3のデユーティ比でも十分である。
In this way, the duty ratio of the encoder pulse is output P. Affects ut output time. Therefore, it is preferable that the duty ratio be close to 50%. However, this does not mean that the duty ratio of the encoder pulses must be exactly 50%. That is,
If the duty ratio is constant, the sampling frequency can be doubled in appearance, and a duty ratio of H:L=5:3 is sufficient as shown in FIG.

なお、注意を要するのは、エンコーダ・パルスの立上り
、立下りの一方のエツジが2回発生しないと、パルス間
隔が測定できないため、誤差も計算できない。そのため
、本実施例では、最初のエツジによる出力時はモータ1
は停止しているものとして、最大値を誤差として出力し
ている。
Note that unless one of the rising and falling edges of the encoder pulse occurs twice, the pulse interval cannot be measured and the error cannot be calculated. Therefore, in this embodiment, when outputting from the first edge, the motor 1
Assuming that it is stopped, the maximum value is output as the error.

第5図、第6図は、エンコーダ信号と、マイクロコンピ
ュータのエンコーダ信号に対する外部割込み処理ルーチ
ンの関係を示したものである。
5 and 6 show the relationship between the encoder signal and the microcomputer's external interrupt processing routine for the encoder signal.

第5図は、モータの設定回転速度が低い場合で、イ、口
で示した様に、両エツジ毎の処理を行なう。
FIG. 5 shows a case where the set rotational speed of the motor is low, and processing is performed for each edge as shown by A and A.

第6図は、モータの設定回転速度が高い場合で、本実施
例では、ハ、二と、両エツジで割込み処理は行なうが、
二では、通電量の計算等、実際の処理は殆んど行なわず
、処理時間も短かくなっている。そのため、第5図に示
したものより、高回転まで処理が可能となっている。
FIG. 6 shows a case where the set rotational speed of the motor is high. In this embodiment, interrupt processing is performed at both edges C and 2.
In the second method, there is almost no actual processing such as calculation of the amount of energization, and the processing time is short. Therefore, it is possible to process up to a higher rotation speed than that shown in FIG.

第7図〜第9図に、上記マイクロコンピュータ6のプロ
グラムのフローチャートを示す。以下、このフローチャ
ートに従って本実施例の動作について詳述する。
7 to 9 show flowcharts of the programs of the microcomputer 6. The operation of this embodiment will be described in detail below according to this flowchart.

第7図は主ルーチンのフローチャートで、ステップ#1
で電源が投入されると、ステップ#2でメモリ等の初期
化を行った後、ステップ#3でカウンタ割込みを許可す
る。マイクロコンピュータ6の外部クロック端子ECK
に基準発振回路4の固定周波数パルスが入力されると、
マイクロコンピュータ6ではこのパルスを内部の8ビツ
トカウンタで計数する。カウンタはパルスを256計数
すると0に戻り、再び計数を開始すると同時にカウンタ
割込みを発生ずる。
Figure 7 is a flowchart of the main routine, step #1
When the power is turned on, the memory and the like are initialized in step #2, and then counter interrupts are enabled in step #3. External clock terminal ECK of microcomputer 6
When the fixed frequency pulse of the reference oscillation circuit 4 is input to
The microcomputer 6 counts these pulses using an internal 8-bit counter. After counting 256 pulses, the counter returns to 0, and at the same time as it starts counting again, a counter interrupt is generated.

主ルーチン実行中で、かつ割込みが許可されているとき
に、カウンタ割込みが発生すると、主ルーチンは中断さ
れ、第8図に示すカウンタ割込み処理ルーチンTNT−
Cが起動される。このカウンタ割込み処理ルーチンIN
T−Cでは、ステップ#21でマイクロコンピュータ6
に内蔵された基準タイマTにカウンタの周期256を加
算し、基準タイマTを更新し、ステップ#22でカウン
タ割込み処理ルーチンを終了して主ルーチンに制御  
       御を戻す。これにより基準タイマTに現
在のカウンタの値Cを加え、基準発振回路5のパルス数
に換算された現在の時間、即ちスタート時点からの相対
的な時間を計算することができる。
If a counter interrupt occurs while the main routine is being executed and interrupts are enabled, the main routine is interrupted and the counter interrupt processing routine TNT-- shown in FIG.
C is activated. This counter interrupt processing routine IN
In T-C, microcomputer 6 is activated in step #21.
The counter period 256 is added to the built-in reference timer T, the reference timer T is updated, the counter interrupt processing routine is ended in step #22, and control is returned to the main routine.
return control. Thereby, by adding the current counter value C to the reference timer T, it is possible to calculate the current time converted into the number of pulses of the reference oscillation circuit 5, that is, the relative time from the start time.

一方、前記ステップ#3でカウンタ割込みを許可した後
、主ルーチンでは、ステップ#4でモータ回転開始信号
5TARTのチェックを続ける。
On the other hand, after allowing the counter interrupt in step #3, the main routine continues to check the motor rotation start signal 5TART in step #4.

この信号5TARTは、制御対象である移動体が複写機
の光学走査系であれば所定の複写動作に関連して出力さ
れる。5TARTが「l」になると、ステップ#5に進
み、速度指定信号5PEEDをチェックし、「1」で、
高速側が指定されると、ステップ#6でエンコーダ分周
切り換えフラグDFを「1」にし、設定パルス間隔TS
として、高速時の基準値TSHをセットする。逆に、速
度指定信号5PEEDが“0”の場合は、フラグDFを
クリアし、設定パルス間隔TSとして、低速時の基準値
T S Lをセットする。この速度指定信号5PEED
は、複写機の光学走査系では、複写倍率で定まる走査速
度の指定で、たとえば、低速側が等倍、高速側が縮小と
なる。次にステップ#8で割込み応答I NTAKを出
力し、割込み発生回路4をリセットする。そして、ステ
ップ#9でエンコーダ2からのパルス信号とプログラム
の同期を取るための変数5YNCに12」をセットする
。これによって、立上り、立下りの各エツジが2回発生
するまでの速度の誤差計算は実行されない。即ち、最初
の二つの割込み要求TNTRQの出力時は速度測定せず
(以下に説明するステップ#39.#42参照)、出力
P。U、から最大値を出力する。また、このステップ#
9ではエツジの区別をするためのフラグEDGEをクリ
アしておく。
This signal 5TART is output in connection with a predetermined copying operation if the moving object to be controlled is an optical scanning system of a copying machine. When 5TART becomes "l", proceed to step #5, check the speed designation signal 5PEED, and if it is "1",
When the high speed side is specified, the encoder frequency division switching flag DF is set to "1" in step #6, and the set pulse interval TS is set.
, the reference value TSH at high speed is set. Conversely, when the speed designation signal 5PEED is "0", the flag DF is cleared and the low speed reference value TSL is set as the set pulse interval TS. This speed designation signal 5PEED
In the optical scanning system of a copying machine, the scanning speed is specified by the copying magnification; for example, the lower speed side is equal magnification, and the higher speed side is reduction. Next, in step #8, an interrupt response INTAK is output, and the interrupt generation circuit 4 is reset. Then, in step #9, the variable 5YNC for synchronizing the pulse signal from the encoder 2 and the program is set to 12. As a result, speed error calculations are not performed until each rising edge and falling edge occur twice. That is, when the first two interrupt requests TNTRQ are output, the speed is not measured (see steps #39 and #42 described below), and the output is P. Output the maximum value from U. Also, this step #
In step 9, the flag EDGE for distinguishing edges is cleared.

前述のごとく測定の準備が終了すると、最初にモータ1
が停止しているものとして、ステップ#10で誤差ER
RORに最大値を出力し、モータIへの通電を開始する
。次に、ステップ#11で外部割込みを許可し、ステッ
プ#12で割込み応答I NTAKを「0」にクリアし
、割込み発生回路4のリセットを解除する。そして、ス
テップ#13で再びモータ回転開始信号5iTARTの
チェックを続け、信号5TARTが「0」になるまで待
機状態となる。
When the preparation for measurement is completed as described above, motor 1 is first
Assuming that the error ER is stopped, the error ER is
Outputs the maximum value to ROR and starts energizing motor I. Next, in step #11, external interrupts are enabled, and in step #12, the interrupt response INTAK is cleared to "0", and the reset of the interrupt generation circuit 4 is released. Then, in step #13, the motor rotation start signal 5iTART is checked again, and a standby state is entered until the signal 5TART becomes "0".

一方、通電を開始すると、モータlは回転を開始し、そ
れに連動してエンコーダ2からパルス信号が発生する。
On the other hand, when energization is started, the motor l starts rotating, and in conjunction with this, a pulse signal is generated from the encoder 2.

このパルス信号の立上りあるいは立下りのエツジが発生
ずると、割込み発生回路4の対応するフリップ・フロッ
プFr’、、FT”2がトリガされ、オアゲートORか
らマイクロコンピュータ6に割込み要求rNTRQが出
力される。マイクロコンピュータ6では、主ルーチン実
行中で、かつ割込みが許可されているときに、外部割込
み端子TNTに割込み要求INTRQが入力されると、
主ルーチンを一時中断し、第9図に示す外部割込み処理
ルーチンINT−Eを起動する。
When a rising or falling edge of this pulse signal occurs, the corresponding flip-flop Fr', FT"2 of the interrupt generation circuit 4 is triggered, and an interrupt request rNTRQ is output from the OR gate OR to the microcomputer 6. In the microcomputer 6, when an interrupt request INTRQ is input to the external interrupt terminal TNT while the main routine is being executed and interrupts are enabled,
The main routine is temporarily interrupted and an external interrupt processing routine INT-E shown in FIG. 9 is activated.

この外部割込み処理ルーチンINT−Eでは、ステップ
#30で基準タイマTに現在の内部カウンタCの値を加
えて現在の時間Tcを計算する。
In this external interrupt processing routine INT-E, in step #30, the current value of the internal counter C is added to the reference timer T to calculate the current time Tc.

そして、割込み要求INTRQをリセットするためにス
テップ#32で割込み応答INTAKを「l」にし、次
のエツジに備えてステップ#33で割込み応答INTA
Kを「0」に戻し、ステップ#34で、エツジ判別用フ
ラグEDGEを反転しておく。次に、ステップ#35で
フラグEDGEを判定する。フラグEDGEがrlJの
場合は、ステップ#36で、分周切り換えフラグDFを
チェックし、高速側(DF=1)の場合は、以後の処理
を省略する。上述の動作によって、#36のステップで
DF=1と判断されたときはステップ#45へ行くので
、パルスエンコーダの出力パルスのうちの立」二りか立
下りの一方のエツジのみでモータの速度制御を行なうこ
とになる。低速側(DP=0)の場合は、ステップ#3
7で現在のエツジの間隔T)を計算し、現在の時間Tc
を更新データとしてメモリTAに記憶しておく。次回は
ステップ#35で「NO」と判定され、ステップ#38
で現在のエツジ間隔TIを計算し、現在の時間Tcを更
新データとしてメモリTBに記憶しておく。
Then, in order to reset the interrupt request INTRQ, the interrupt response INTAK is set to "l" in step #32, and in preparation for the next edge, the interrupt response INTA is set to "l" in step #33.
K is returned to "0" and the edge discrimination flag EDGE is inverted in step #34. Next, in step #35, the flag EDGE is determined. If the flag EDGE is rlJ, the frequency division switching flag DF is checked in step #36, and if it is on the high speed side (DF=1), the subsequent processing is omitted. As a result of the above operation, when it is determined that DF=1 in step #36, the process goes to step #45, so the motor speed can be controlled using only one of the rising and falling edges of the output pulse of the pulse encoder. will be carried out. If the speed is low (DP=0), step #3
7, calculate the current edge interval T) and calculate the current time Tc
is stored in the memory TA as update data. Next time, the determination will be “NO” in step #35, and the process will proceed to step #38.
The current edge interval TI is calculated, and the current time Tc is stored in the memory TB as update data.

前記ステップ#37. #31j7−計算したエツジ間
隔Tlは、前述のごとく、起動時には意味のない値とな
る。そこで、エンコーダ・パルスとプログラムの同期を
取るため、ステップ#39で変数5YNCをチェックし
、今回のエツジ間隔Tiが有効であるか否かを調べる。
Said step #37. #31j7-As described above, the calculated edge interval Tl becomes a meaningless value at the time of startup. Therefore, in order to synchronize the encoder pulse and the program, the variable 5YNC is checked in step #39 to determine whether the current edge interval Ti is valid.

無効であれば、ステップ#42でlを減じ、ステップ#
43で外部割込み処理ルーチンを終了して主ルーチンに
制御を戻す。有効であれば、ステップ#40でモータ1
の設定回転数に対応するエンコーダ・パルスの間隔TS
 と今回のパルス間隔T4  から最適通電量Pout
を計算する。誤差ERRORを求める。そして、pou
tに比例した電力をモータ1に通電するため、ステップ
#41でDAコンバータ7からモータ電力を表わすアナ
ログ信号を出力する。
If invalid, l is subtracted in step #42 and step #
At step 43, the external interrupt processing routine is terminated and control is returned to the main routine. If valid, step #40 sets motor 1.
Encoder pulse interval TS corresponding to the set rotation speed of
From the current pulse interval T4, the optimum energization amount Pout
Calculate. Find the error ERROR. And pou
In order to supply electric power proportional to t to the motor 1, in step #41, the DA converter 7 outputs an analog signal representing the motor electric power.

ここで、最適通電量は、たとえば、次の様な関数f(T
I  、 TS)が考えられる。
Here, the optimum amount of current is, for example, the following function f(T
I, TS) are considered.

f(T T 、 T 5)−(T I −T 5)XK
、 +に2に、は誤差に対する応答を決める定数で、K
2は、負荷の摩擦等のロスに対応した定数である。
f(T T , T 5) - (T I - T 5) XK
, + and 2 are constants that determine the response to the error, and K
2 is a constant corresponding to loss such as load friction.

なお、この発明においては制御装置(実施例ではマイク
ロコンピュータ6)はあらかじめプログラムされたシー
ケンスを順次処理するものであってもよく、また」二連
の実施例において、モータの回転速度を制御する代りに
モータの回転力を制御するものであってもよい。
In addition, in this invention, the control device (microcomputer 6 in the embodiment) may be one that sequentially processes a pre-programmed sequence, and in the two embodiments, instead of controlling the rotational speed of the motor, Alternatively, the rotational force of the motor may be controlled.

発明の効果 以上詳述したようにこの発明によればモータの低速回転
時にはパルスエンコーダのパルスの立上りと立下りの両
エツジを用いてモータの回転速度を制御するので、制御
周期を短かくすることができるようになり、制御の応答
が良くなる。一方モータの高速回転時にはパルスエンコ
ーダのパルスの立上りか立下りかのいずれか一方のエツ
ジを用いているので、両エツジを処理する場合に比して
マイクロコンピュータ等の制御装置の処理速度を半減し
ても処理が可能となり、また、エンコーダパルスの処理
頻度が半減することによってソフトウェア処理が容易に
なる。
Effects of the Invention As detailed above, according to the present invention, when the motor rotates at low speed, both the rising and falling edges of the pulse of the pulse encoder are used to control the rotational speed of the motor, so that the control cycle can be shortened. The control response becomes better. On the other hand, when the motor rotates at high speed, either the rising edge or the falling edge of the pulse encoder pulse is used, which reduces the processing speed of the control device such as a microcomputer by half compared to the case where both edges are processed. In addition, software processing becomes easier by reducing the processing frequency of encoder pulses by half.

また、両エツジ処理でも、片エツジ処理でも、設定パル
ス間隔が変化しない為、制御は、殆んど変更しなくて良
いという利点もある。
Further, since the set pulse interval does not change whether it is double edge processing or single edge processing, there is also the advantage that control hardly needs to be changed.

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

図面は本発明に係る速度制御装置の一実施例を示し、第
1図はブロック図、第2図は割込み発生回路の回路図、
第3図はタイミングチャート図、第4図、第5図、第6
図、第7図、第8図、第9図はフローチャート図である
。 l・・・直流モータ、2・・・エンコーダ、3・・・波
形整形回路、4 割込み発生回路、訃・・基準発振回路
、6・・マイクロコンピュータ、7・・・DAコンバー
タ、訃・・ドライバ回路、5PEED・・・速度指定信
号。
The drawings show an embodiment of the speed control device according to the present invention, in which FIG. 1 is a block diagram, FIG. 2 is a circuit diagram of an interrupt generation circuit,
Figure 3 is a timing chart, Figures 4, 5, and 6.
7, 8, and 9 are flowcharts. l: DC motor, 2: encoder, 3: waveform shaping circuit, 4: interrupt generation circuit, 0: reference oscillation circuit, 6: microcomputer, 7: DA converter, 0: driver Circuit, 5PEED...speed designation signal.

Claims (1)

【特許請求の範囲】[Claims]  (1)移動体を駆動するモータを含む駆動手段と、移
動体の移動速度に対応したピッチで立上り,立下りを繰
返すパルス信号を発生する手段と、該パルス信号が入力
され、各パルス信号の立上り,立下りの時間間隔をそれ
ぞれ独立的に計測する計測手段と、該計測手段によって
計測された時間間隔に対応して前記移動体を駆動するモ
ータの回転速度を制御する制御手段とを備え、制御手段
は設定値が所定の回転速度以下では、前記パルス信号発
生手段からのパルス立上りと立下りの両方の時間間隔に
対応してモータ速度を制御し、設定値が所定の回転速度
以上では、前記パルスの立上りか立下りのどちらか一方
の時間間隔にのみ対応してモータ速度を制御するように
構成されていることを特徴とするモータ制御装置。
(1) A driving means including a motor that drives a moving object, a means for generating a pulse signal that repeatedly rises and falls at a pitch corresponding to the moving speed of the moving object, and the pulse signal is inputted and each pulse signal is comprising a measuring means for independently measuring the time intervals of rise and fall, and a control means for controlling the rotational speed of the motor that drives the moving body in accordance with the time intervals measured by the measuring means, When the set value is below a predetermined rotation speed, the control means controls the motor speed in accordance with the time intervals of both the rising and falling pulses from the pulse signal generating means, and when the set value is above the predetermined rotation speed, A motor control device characterized in that the motor speed is controlled in response to only the time interval of either the rising edge or the falling edge of the pulse.
JP60033155A 1985-02-20 1985-02-20 Motor control device Expired - Lifetime JPH0614793B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60033155A JPH0614793B2 (en) 1985-02-20 1985-02-20 Motor control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60033155A JPH0614793B2 (en) 1985-02-20 1985-02-20 Motor control device

Publications (2)

Publication Number Publication Date
JPS61191285A true JPS61191285A (en) 1986-08-25
JPH0614793B2 JPH0614793B2 (en) 1994-02-23

Family

ID=12378677

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60033155A Expired - Lifetime JPH0614793B2 (en) 1985-02-20 1985-02-20 Motor control device

Country Status (1)

Country Link
JP (1) JPH0614793B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62152384A (en) * 1985-12-25 1987-07-07 Nippon Kogaku Kk <Nikon> Frequency/voltage converter
JPH01286791A (en) * 1988-05-13 1989-11-17 Canon Electron Inc Speed controller
JPH02246783A (en) * 1989-03-15 1990-10-02 Sharp Corp Speed controller
US5278481A (en) * 1990-02-22 1994-01-11 British Technological Group Ltd. Control of stepping motors

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5920014A (en) * 1982-07-26 1984-02-01 Minolta Camera Co Ltd Speed controller

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5920014A (en) * 1982-07-26 1984-02-01 Minolta Camera Co Ltd Speed controller

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62152384A (en) * 1985-12-25 1987-07-07 Nippon Kogaku Kk <Nikon> Frequency/voltage converter
JPH01286791A (en) * 1988-05-13 1989-11-17 Canon Electron Inc Speed controller
JPH02246783A (en) * 1989-03-15 1990-10-02 Sharp Corp Speed controller
US5278481A (en) * 1990-02-22 1994-01-11 British Technological Group Ltd. Control of stepping motors

Also Published As

Publication number Publication date
JPH0614793B2 (en) 1994-02-23

Similar Documents

Publication Publication Date Title
US4346434A (en) Apparatus for controlling an electric motor
CA1158768A (en) System for controlling the speed of a magnetic tape transport motor
JPH036745B2 (en)
EP0082558A1 (en) Control signal generator arrangement for semiconductor switches
JPH0634634B2 (en) Generator load detector
JPS61191285A (en) Motor controller
US4646030A (en) Triggered frequency locked oscillator having programmable delay circuit
US4282570A (en) Method and apparatus for controlling an output current of a controlled rectifier
JPS5920014A (en) Speed controller
JPS6022485A (en) Speed controller of motor
RU12304U1 (en) DEVICE FOR CONTROL OF INVERTER WITH WIDTH-PULSE MODULATION
JPH0119597Y2 (en)
JP3364954B2 (en) Drive control device
JPS62273665A (en) Rotary body driving device
Lin A digital speed control for a chopper-fed DC motor by using the INTEL 8080 microcomputer
JP2565831Y2 (en) Motor control circuit
JPS62247781A (en) Speed control method for dc motor
JPH0328912B2 (en)
JPS61106081A (en) Speed controller of dc motor
KR940005139B1 (en) Arrangement for speed regulation of electric motor
JPH03173382A (en) Motor controller
JPS61221808A (en) Servo circuit
JPS6214892A (en) Constant position stop apparatus of electromotive sewing machine
JPH0361575U (en)
JPH04137104A (en) Extralow-speed driving device for precise positioning table

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term