JPH05164768A - Speed controller for dc motor - Google Patents

Speed controller for dc motor

Info

Publication number
JPH05164768A
JPH05164768A JP33169591A JP33169591A JPH05164768A JP H05164768 A JPH05164768 A JP H05164768A JP 33169591 A JP33169591 A JP 33169591A JP 33169591 A JP33169591 A JP 33169591A JP H05164768 A JPH05164768 A JP H05164768A
Authority
JP
Japan
Prior art keywords
encoder
motor
speed
interrupt
processing
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
JP33169591A
Other languages
Japanese (ja)
Other versions
JP3049671B2 (en
Inventor
Naoki Hatsutori
直幾 服部
Yuko Nojiri
雄幸 野尻
Ichiro Hashimoto
一郎 橋本
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP3331695A priority Critical patent/JP3049671B2/en
Publication of JPH05164768A publication Critical patent/JPH05164768A/en
Application granted granted Critical
Publication of JP3049671B2 publication Critical patent/JP3049671B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Transmission And Conversion Of Sensor Element Output (AREA)

Abstract

PURPOSE:To eliminate the need of a frequency dividing circuit by carrying out the pseudoexecution of frequency division on encoder signals at the time of operating a DC motor at a high speed. CONSTITUTION:The title speed controller is coupled with the rotating shaft of a DC motor and has a plurality of set speed values by using a two-phase encoder which output signals having a phase difference at frequencies corresponding to the speed of the motor. The speed controller is provided with a means which fetches the count value of the number of encoder pulses and the count value of encoder period measuring time at every edge input of encoder signals, performs two independent interruption processing using each edge input of the two-phase encoder as interrupt signals, and carries out the pseudoexecution of frequency division on the edge input of the encoder signals by masking its own interruption and canceling the masking of another interruption in each interrupt processing when the speed of the motor is high.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は直流電動機の速度制御装
置に係り、さらに詳細には、電動機の回転軸に結合され
たエンコーダを速度検出手段とする直流電動機の速度制
御装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a speed control device for a DC motor, and more particularly to a speed control device for a DC motor which uses an encoder coupled to a rotary shaft of the motor as speed detecting means.

【0002】[0002]

【従来の技術】直流電動機の回転軸に結合され、電動機
の速度に応じた周波数信号を出力する従来形直流電動機
の速度制御装置は、図4に示すように、エンコーダのパ
ルス数を計数する第1カウンタと、同じく前記エンコー
ダの時間間隔を計数する第2カウンタと、一定周期ごと
に速度演算の起動をかけるタイミング発生手段とによっ
て速度の算出をおこなう。
2. Description of the Related Art A speed control device for a conventional DC motor, which is connected to a rotary shaft of a DC motor and outputs a frequency signal according to the speed of the motor, is designed to count the number of pulses of an encoder as shown in FIG. The speed is calculated by the 1 counter, the second counter which also counts the time interval of the encoder, and the timing generating means for activating the speed calculation at every constant cycle.

【0003】すなわち、第1カウンタ,第2カウンタの
値をエンコーダ信号の入力ごとに書込み・読出し可能な
記憶手段に逐次格納しておき、一定周期ごとのタイミン
グ信号が入力される直前に格納された値(図5中の
1,P6,T1,T6)をさらに別の記憶手段の格納す
る。
That is, the values of the first counter and the second counter are sequentially stored in a writable / readable storage means for each input of an encoder signal, and are stored immediately before a timing signal is input at regular intervals. The values (P 1 , P 6 , T 1 , T 6 in FIG. 5) are stored in another storage means.

【0004】そして、一定周期ごとに起動がかかる演算
処理において、前記記憶手段に格納された値にもとづ
き、第2カウンタの値T6からT1を減算することによ
り、一定周期内の時間幅Twを算出する。
Then, in the arithmetic processing which is activated every fixed period, the time width Tw within the fixed period is reduced by subtracting T 1 from the value T 6 of the second counter based on the value stored in the storage means. To calculate.

【0005】また、第1カウンタの値P6からP1を減算
することにより、前記時間幅Twの間に入力されるエン
コーダパルス数Pnを算出する。
Further, the number Pn of encoder pulses input during the time width Tw is calculated by subtracting P 1 from the value P 6 of the first counter.

【0006】そして、前記時間幅Twとエンコーダパル
ス数とから、次式によって直流電動機の速度を求める。
Then, from the time width Tw and the number of encoder pulses, the speed of the DC motor is calculated by the following equation.

【0007】[0007]

【数1】直流電動機の速度N=K・Pn/Tw なお、この種技術に関連する従来例としては、たとえば
特開昭60−60651号公報を挙げることができる。
## EQU1 ## Speed of DC motor N = K.Pn / Tw As a conventional example related to this type of technology, there is, for example, JP-A-60-60651.

【0008】[0008]

【発明が解決しようとする課題】ところで、直流電動機
を低速から高速まで広範囲に速度制御する場合、或る一
定のサンプリング時間中にエンコーダパルスの入力がな
ければならず、低速時においても或る一定のサンプリン
グ時間中に確実にエンコーダパルスが入力されるよう、
この低速時に合わせてエンコーダの分解能を設定する必
要がある。
By the way, in the case of controlling the speed of the DC motor over a wide range from low speed to high speed, it is necessary to input the encoder pulse during a certain sampling time, and even at a low speed, there is a certain constant. Make sure that the encoder pulse is input during the sampling time of
It is necessary to set the resolution of the encoder according to this low speed.

【0009】その結果、高速時においては、単位時間当
りのエンコーダパルス入力数が増大し、前記エンコーダ
のエッジ入力を処理開始要求信号とする第1カウンタ,
第2カウンタのデーダ格納処理が頻繁におこなわれ、極
端な場合、データ格納処理が終了する前に次のエッジ入
力による処理開始要求が発生してしまい、エンコーダパ
ルス入力によるデータ格納処理以外の処理をおこなう時
間がなくなってしまういう状態に陥る。
As a result, at high speeds, the number of encoder pulse inputs per unit time increases, and the first counter that uses the edge input of the encoder as the processing start request signal,
The data storage processing of the second counter is frequently performed, and in an extreme case, a processing start request by the next edge input occurs before the data storage processing ends, and processing other than data storage processing by encoder pulse input is performed. It falls into a state where there is no time to do it.

【0010】このため、従来においては、高速設定時に
おけるエンコーダパルス入力によるデータ格納処理の実
行頻度を低減するため、エンコーダの分周回路を設置す
るようにしている。
Therefore, in the past, in order to reduce the execution frequency of the data storage process by the encoder pulse input at the time of high speed setting, the frequency divider circuit of the encoder is installed.

【0011】本発明の目的は、エンコーダ入力ごとの格
納処理が頻繁におこなわれる高速設定時において、エン
コーダの分周回路を不要とした、安価な直流電動機の速
度制御装置を提供することにある、
It is an object of the present invention to provide an inexpensive DC motor speed control device that does not require a frequency divider circuit for an encoder at a high speed setting in which storage processing for each encoder input is frequently performed.

【0012】[0012]

【課題を解決するための手段】前記目的は、直流電動機
の回転軸に結合され、電動機の速度に応じた周波数で互
いに位相差を有する信号を出力する2相エンコーダを速
度検出手段として、複数の速度設定値を有する直流電動
機の速度制御装置において、前記エンコーダ信号のエッ
ジ入力ごとに、エンコーダパルス数の計数カウンタ値お
よびエンコーダの周期を計測する時間計数カウンタ値を
取り込み、前記2相エンコーダのそれぞれのエッジ入力
を割込要求信号とする2つの独立した割込処理をおこな
い、電動機の速度が高速の場合それぞれの割込処理のな
かで自分自身の割込をマスクし、他方の割込のマスクを
解除して、エンコーダ信号のエッジ入力を擬似的に分周
する手段を備えることによって達成される。
A plurality of two-phase encoders, which are coupled to a rotary shaft of a DC motor and output signals having a phase difference at a frequency corresponding to the speed of the motor, are used as speed detecting means. In a speed control device for a DC electric motor having a speed setting value, a count counter value of the encoder pulse number and a time count counter value for measuring the period of the encoder are taken in for each edge input of the encoder signal, and each of the two-phase encoders is loaded. Performs two independent interrupt processes with the edge input as the interrupt request signal, and masks its own interrupt in each interrupt process when the motor speed is high, and masks the other interrupt. It is achieved by providing means for canceling and pseudo-dividing the edge input of the encoder signal.

【0013】[0013]

【作用】互いに位相差を有する2相のエンコーダ信号に
関し、進相信号をA相,遅相信号をB相とする。
With respect to the two-phase encoder signals having a phase difference with each other, the advance signal is the A phase and the delay signal is the B phase.

【0014】また、A相信号のエッジ入力を処理開始要
求信号として実行される処理を処理1とし、A相信号よ
り位相の遅れたB相信号のエッジ入力を処理開始要求信
号として実行される処理、すなわち処理1の開始からエ
ンコーダの位相差に相当する時間だけ遅れて実行が開始
される処理を処理2とする。
Further, the processing executed by using the edge input of the A-phase signal as the processing start request signal is called processing 1, and the processing executed by the edge input of the B-phase signal whose phase is delayed from the A-phase signal as the processing start request signal. That is, the process that is started after the process 1 is started with a delay corresponding to the phase difference of the encoder is referred to as process 2.

【0015】処理1では、エンコーダパルス数を計数す
る第1カウンタとエンコーダの時間間隔を計数する第2
カウンタのデータ格納処理、さらに処理1の再実行の禁
止と処理2の再実行の許可をおこなう。
In the process 1, the first counter for counting the number of encoder pulses and the second counter for counting the time interval of the encoder.
Data storage processing of the counter, prohibition of re-execution of processing 1, and permission of re-execution of processing 2 are performed.

【0016】一方、処理2では、処理2の再実行の禁止
と処理1の再実行の許可をおこなう。
On the other hand, in the process 2, the re-execution of the process 2 is prohibited and the re-execution of the process 1 is permitted.

【0017】しかして、処理1の実行が終了する前に発
生する処理2の処理開始要求信号は無視され、また処理
2が実行されないため、処理1の再実行はおこなわれな
い。
However, the processing start request signal of the processing 2 generated before the completion of the processing 1 is ignored, and the processing 2 is not executed, so that the processing 1 is not re-executed.

【0018】つまり、エンコーダ信号のA相,B相のエ
ッジ入力の時間が処理1の実行に要する時間よりも短い
場合(直流電動機の高速運転時)は、B相のエッジ入力
にもとづく処理2が実行されないため、次のA相信号の
エッジ入力による処理1の開始要求は受け付けられなく
なる。
That is, when the time for inputting the A phase and B phase edges of the encoder signal is shorter than the time required for executing the process 1 (during high-speed operation of the DC motor), the process 2 based on the B phase edge input is performed. Since it is not executed, the request to start the process 1 due to the next edge input of the A-phase signal cannot be accepted.

【0019】そして、次のB相信号のエッジ入力を請け
て処理2が実行されるまで処理1の実行は許可されな
い。
The execution of the process 1 is not permitted until the process 2 is executed by accepting the next edge input of the B-phase signal.

【0020】したがって、エンコーダのA相信号のエッ
ジ入力によって実行を開始するデータ格納処理は、直流
電動機の速度が速く、エンコーダのA相,B相信号のエ
ッジ入力の時間間隔が短くなる場合には、処理開始要求
信号が無視され、その結果、直流電動機の高速運転時に
おいては、データ格納処理の実行頻度を自動的に低減
し、エンコーダ信号を分周したものと同様の効果を得る
ことができる。
Therefore, the data storing process which is started by the edge input of the A phase signal of the encoder is performed when the speed of the DC motor is high and the time interval of the edge input of the A phase and B phase signals of the encoder is short. The processing start request signal is ignored, and as a result, during high-speed operation of the DC motor, the frequency of execution of data storage processing is automatically reduced, and the same effect as that obtained by dividing the encoder signal can be obtained. ..

【0021】[0021]

【実施例】以下、本発明を、図1〜図4の一実施例にも
とづいて説明すると、図1は本発明装置によって2相エ
ンコーダの各相のエッジ入力を割込要求信号とする割込
処理のフローチャートである。
BEST MODE FOR CARRYING OUT THE INVENTION The present invention will be described below with reference to one embodiment shown in FIGS. 1 to 4. In FIG. It is a flowchart of a process.

【0022】また、図2は図1に示すフローにしたが
い、直流電動機が低速で運転される場合のエンコーダ信
号と割込処理とのタイミングチャート、図3は同じく図
1に示すフローにしたがい、直流電動機が高速で運転さ
れる場合のエンコーダ信号と割込処理とのタイミングチ
ャートである。
Further, FIG. 2 is a timing chart of an encoder signal and an interrupt process when the DC motor is operated at a low speed according to the flow shown in FIG. 1, and FIG. 3 is also a flow chart shown in FIG. 6 is a timing chart of an encoder signal and an interrupt process when the electric motor is operated at high speed.

【0023】さらに、図4は本発明装置の速度制御部を
説明する図である。
Further, FIG. 4 is a diagram for explaining the speed control section of the device of the present invention.

【0024】しかして、互いに90°の位相差を有する
エンコーダの進相信号のエッジ入力を処理開始要求信号
とする処理を割込処理1とし、遅相信号のエッジ入力を
処理開始要求信号とする処理を割込処理2とする。
Therefore, the processing of using the edge input of the phase advance signals of the encoders having the phase difference of 90 ° as the processing start request signal is the interrupt processing 1, and the edge input of the delay signal is the processing start request signal. The process is called interrupt process 2.

【0025】ここで、割込処理1,割込処理2の処理内
容を図1により説明する。
Here, the processing contents of the interrupt processing 1 and the interrupt processing 2 will be described with reference to FIG.

【0026】割込処理1では、エンコーダパルス数を計
数する第1カウンタの値とパルス間隔時間を計数する第
2カウンタの値を書込み・読出し可能な記憶手段に格納
する処理と、割込処理1のマスクと、割込処理2の割込
要求信号の解除、および割込処理2のマスク解除をおこ
なう。
In the interrupt processing 1, the value of the first counter for counting the number of encoder pulses and the value of the second counter for counting the pulse interval time are stored in the writable / readable storage means, and the interrupt processing 1 , The interrupt request signal of the interrupt processing 2 is released, and the mask of the interrupt processing 2 is released.

【0027】一方、割込処理2では、割込処理2のマス
クと、割込処理1の割込要求信号のクリア、および割込
処理1のマスク解除をおこなう。
On the other hand, in the interrupt process 2, the mask of the interrupt process 2, the interrupt request signal of the interrupt process 1 is cleared, and the mask of the interrupt process 1 is released.

【0028】つまり、直流電動機の速度計測に必要なデ
ータの格納処理は、割込処理1によっておこなう。
That is, the process of storing the data required for measuring the speed of the DC motor is performed by the interrupt process 1.

【0029】次に、前記割込処理1と割込処理2との実
際の実行タイミングを、図2および図3により説明す
る。
Next, the actual execution timing of the interrupt processing 1 and the interrupt processing 2 will be described with reference to FIGS. 2 and 3.

【0030】なお、図2は、直流動機が低速で運転され
ている状態を表したものである。
FIG. 2 shows a state in which the DC motor is operating at a low speed.

【0031】直流電動機が低速で運転されている場合、
エンコーダ周期は長く、進相信号であるA相信号の立上
りエッジ入力と遅相信号であるB相信号の立上りエッジ
入力との間隔時間は長い。
When the DC motor is operated at a low speed,
The encoder cycle is long, and the interval time between the rising edge input of the A-phase signal that is a phase advance signal and the rising edge input of the B-phase signal that is a phase delay signal is long.

【0032】このため、A相信号の立上りエッジ入力と
B相信号の立上りエッジ入力との間に先の割込処理1を
実行でき、速度計測に必要なデータの格納処理を終了す
ることができる。
Therefore, the interrupt processing 1 can be executed between the rising edge input of the A-phase signal and the rising edge input of the B-phase signal, and the processing for storing the data required for speed measurement can be completed. ..

【0033】また、割込処理1,割込処理2の実行に要
する時間をt1,t2として、t1≧t2の関係があるとす
れば、一度割込処理1を実行してから再び割込処理1を
実行するまでの間(エンコーダの1周期分に相当)に
は、割込処理に消費されるt1+t2の時間を差し引いて
も、常にt1+t2に相当する以上の空き時間が存在し、
この空き時間を使って速度計測のためのデータ格納以外
の処理を実行することができる。
Further, assuming that there is a relation of t 1 ≧ t 2 where t 1 and t 2 are the times required to execute the interrupt processing 1 and the interrupt processing 2, after the interrupt processing 1 is executed once, Until the interrupt processing 1 is executed again (corresponding to one cycle of the encoder), even if the time of t 1 + t 2 consumed by the interrupt processing is subtracted, it always corresponds to t 1 + t 2 or more. There is free time
Using this free time, processing other than data storage for speed measurement can be executed.

【0034】図3は、直流電動機が高速で運転されてい
る状態を表したものである。
FIG. 3 shows a state in which the DC motor is operating at high speed.

【0035】直流電動機が高速で運転されている場合、
A相信号とB相信号との時間差は短くなる。
When the DC motor is operated at high speed,
The time difference between the A-phase signal and the B-phase signal becomes short.

【0036】したがって、図3に示すように、A相信号
の立上りエッジ入力とB相信号の立上りエッジ入力との
間隔時間は短くなり、割込要求信号1−1にもとづく割
込処理1の実行が終了する前に、割込処理2の要求信号
2−1が発生する。
Therefore, as shown in FIG. 3, the interval time between the rising edge input of the A-phase signal and the rising edge input of the B-phase signal becomes short, and the interrupt processing 1 based on the interrupt request signal 1-1 is executed. , The request signal 2-1 of the interrupt processing 2 is generated.

【0037】しかし、このとき発生する前記要求信号2
−1は無視され、割込処理2は実行されない。
However, the request signal 2 generated at this time
-1 is ignored and interrupt processing 2 is not executed.

【0038】したがって、割込処理1は、再実行がマス
クされたままとなり、割込要求信号1−2も無視される
ことになる。
Therefore, the interrupt processing 1 remains masked for re-execution, and the interrupt request signal 1-2 is also ignored.

【0039】このため、速度計測をおこなうためのデー
タ格納処理をおこなう割込処理1は、要求信号1−1に
もとづき実行された後は、要求信号1−3が発生するタ
イミングまで実行されない。
Therefore, the interrupt processing 1 for performing the data storage processing for speed measurement is not executed until the timing at which the request signal 1-3 is generated after being executed based on the request signal 1-1.

【0040】その結果、見かけ上エンコーダ信号のA相
信号を分周したかのような動作をおこなうことができ
る。
As a result, it is possible to perform an operation as if the A-phase signal of the encoder signal was apparently divided.

【0041】また、割込処理1に要する時間は、エンコ
ーダ1周期の時間よりも短いという条件の下では、割込
処理1の実行終了から割込処理2の実行開始までには、
割込処理1に要する時間をt1とすると、最低でも1/4
1の空き時間が存在するので、この空き時間を使って
速度計測をおこなうためのデータ処理をおこなうことが
できる。
Further, under the condition that the time required for the interrupt processing 1 is shorter than the time for one cycle of the encoder 1, from the end of execution of the interrupt processing 1 to the start of execution of the interrupt processing 2,
If the time required for interrupt processing 1 is t 1 , then at least 1/4
Since there is a vacant time of t 1 , data processing for speed measurement can be performed using this vacant time.

【0042】このように、2相のエンコーダのエッジ入
力を、要求信号による2つの割込みを使ったエンコーダ
の周期に応じて、自動的にあたかもエンコーダ信号を分
周したような動作をおこなうことができる。
In this way, the edge input of the two-phase encoder can be automatically operated as if the encoder signal was divided according to the cycle of the encoder using the two interrupts by the request signal. ..

【0043】ここで、前記したごとき速度制御を実現す
るための概略構成を、図4にもとづいて説明すると、図
4には、エンコーダのA相信号を入力とする割込処理1
の要求信号入力端子,エンコーダパルス数,パルス間隔
時間を計数する第1カウンタ,第2カウンタの入力端
子、およびB相信号を入力信号とする割込信号2の要求
信号入力端子が示されている。
Here, a schematic structure for realizing the speed control as described above will be described with reference to FIG. 4. In FIG. 4, an interrupt process 1 in which an A phase signal of an encoder is input is shown.
Request signal input terminal, encoder pulse number, first counter for counting pulse interval time, second counter input terminal, and request signal input terminal for interrupt signal 2 having B phase signal as input signal. ..

【0044】ところで、以上の内容は、割込処理1に要
する時間が常にエンコーダの1周期よりも短いという前
提条件で話を進めてきたが、直流電動機の制御設定速度
の上限値に合わせてエンコーダの周期、および割込処理
に要する時間を設定しても、直流電動機に何等かの異常
が生じ、想定していなかった速度で運転がおこなわれる
可能性がある。
By the way, the above description has been made on the premise that the time required for the interrupt processing 1 is always shorter than one cycle of the encoder, but the encoder is adjusted according to the upper limit value of the control set speed of the DC motor. Even if the cycle and the time required for the interrupt processing are set, some abnormality may occur in the DC motor and the operation may be performed at an unexpected speed.

【0045】このように、割込処理1に要する時間より
もエンコーダ1周期の時間が短いという直流電動機の速
度異常検知について以下に述べる。
The speed abnormality detection of the DC motor, in which the time for one encoder cycle is shorter than the time required for the interrupt processing 1 as described above, will be described below.

【0046】割込処理に要する時間よりもエンコーダの
1周期の時間が短いのであるから、割込処理1を実行し
ている途中で再度割込処理1の要求信号が発生すること
になる。
Since the one cycle of the encoder is shorter than the time required for the interrupt processing, the request signal for the interrupt processing 1 is generated again during the execution of the interrupt processing 1.

【0047】したがって、割込処理1を実行するなか
で、再度割込処理1の要求信号が発生したかどうかをチ
ェックすることで速度異常を監視し、異常を検知したな
らば、割込処理1,割御処理2の両方をマスクするとと
もに、直流電動機を停止させるなどの制御をおこなえば
よい。
Therefore, during execution of the interrupt processing 1, the speed abnormality is monitored by checking again whether the request signal of the interrupt processing 1 is generated, and if the abnormality is detected, the interrupt processing 1 It is only necessary to mask both the allocation processes 2 and perform control such as stopping the DC motor.

【0048】また、このことは、割込処理1が終了する
と同時に、割込処理2の実行を開始してしまうような異
常時において、マイコンが2つの割込処理以外の処理を
おこなわなくなってしまい、プログラムが暴走してしま
うことを未然に防止する手段となる。
Further, this means that the microcomputer will not perform any processing other than the two interrupt processings in the abnormal situation in which the execution of the interrupt processing 2 is started at the same time when the interrupt processing 1 ends. , It is a means to prevent the program from running out of control.

【0049】[0049]

【発明の効果】以上、本発明によれば、エンコーダ入力
ごとの格納処理が頻繁におこなわれる直流電動機の高速
運転において、データ格納処理の実行頻度を自動的に低
減し、エンコーダ信号を自動的に擬似分周することで、
エンコーダの分周回路を不要とした、安価な直流電動機
の速度制御装置を提供することができる。
As described above, according to the present invention, in high-speed operation of a DC motor in which storage processing is frequently performed for each encoder input, the frequency of data storage processing is automatically reduced and encoder signals are automatically generated. By dividing by pseudo,
It is possible to provide an inexpensive DC motor speed control device that does not require a frequency divider circuit for an encoder.

【0050】また、本発明によれば、あらかじめ設定さ
れる直流電動機の最高速度にもとづくエンコーダ周期
と、速度計測に必要な割込処理に要する時間との関係か
ら、瞬時に速度異常を検知すると同時に、想定されるエ
ンコーダパルス数を上回るエンコーダ信号が入力された
場合のプログラムの暴走を未然に防ぐことができる。
Further, according to the present invention, from the relationship between the preset encoder cycle based on the maximum speed of the DC motor and the time required for the interrupt processing required for speed measurement, the speed abnormality is detected at the same time. It is possible to prevent program runaway when an encoder signal that exceeds the expected number of encoder pulses is input.

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

【図1】本発明装置によって2相エンコーダの各相のエ
ッジ入力を割込要求信号とする割込処理のフローチャー
トである。
FIG. 1 is a flow chart of an interrupt process in which an edge input of each phase of a two-phase encoder is used as an interrupt request signal by the device of the present invention.

【図2】図1に示すフローにしたがい、直流電動機が低
速で運転される場合のエンコーダ信号と割込処理とのタ
イミングチャートである。
FIG. 2 is a timing chart of an encoder signal and an interrupt process when the DC motor is operated at a low speed according to the flow shown in FIG.

【図3】同じく図1に示すフローにしたがい、直流電動
機が高速で運転される場合のエンコーダ信号と割込処理
とのタイミングチャートである。
FIG. 3 is a timing chart of an encoder signal and an interrupt process when the DC motor is operated at high speed according to the flow shown in FIG.

【図4】本発明装置の速度制御部を説明する図である。FIG. 4 is a diagram illustrating a speed control unit of the device of the present invention.

【図5】直流電動機のエンコーダパルス数とパルス間隔
時間との計数タイミングチャートである。
FIG. 5 is a counting timing chart of the number of encoder pulses of the DC motor and the pulse interval time.

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

1,P2,P3,P4,P5,P6,P7…第1カウンタ
値、T1,T2,T3,T4,T5,T6,T7…第2カウン
タ値、1−1,1−2,1−3…割込処理1の割込要求
信号、2−1,2−2,2−3…割込処理2の割込要求
信号、t1…割込処理1の実行時間、t2…割込処理25
の実行時間、T…エンコーダ周期。
P 1, P 2, P 3 , P 4, P 5, P 6, P 7 ... first counter value, T 1, T 2, T 3, T 4, T 5, T 6, T 7 ... second counter Value, 1-1, 1-2, 1-3 ... interrupt request signal of interrupt processing 1, 2-1, 2-2, 2-3 ... interrupt request signal of interrupt processing 2, t 1 ... Execution time of interrupt processing 1, t 2 ... Interrupt processing 25
Execution time, T ... Encoder cycle.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】直流電動機の回転軸に結合され、電動機の
速度に応じた周波数で互いに位相差を有する信号を出力
する2相エンコーダを速度検出手段として、複数の速度
設定値を有する直流電動機の速度制御装置において、 前記エンコーダ信号のエッジ入力ごとに、エンコーダパ
ルス数の計数カウンタ値およびエンコーダの周期を計測
する時間計数カウンタ値を取り込み、前記2相エンコー
ダのそれぞれのエッジ入力を割込要求信号とする2つの
独立した割込処理をおこない、電動機の速度が高速の場
合それぞれの割込処理のなかで自分自身の割込をマスク
し、他方の割込のマスクを解除して、エンコーダ信号の
エッジ入力を擬似的に分周する手段を有することを特徴
とする直流電動機の速度制御装置。
1. A DC motor having a plurality of speed setting values, wherein a two-phase encoder coupled to a rotary shaft of the DC motor and outputting signals having a phase difference at a frequency corresponding to the speed of the motor is used as a speed detecting means. In the speed control device, for each edge input of the encoder signal, a count counter value of the encoder pulse number and a time count counter value for measuring the cycle of the encoder are taken in, and each edge input of the two-phase encoder is set as an interrupt request signal. If the speed of the motor is high, mask your own interrupt in each interrupt process, unmask the other interrupt, and set the edge of the encoder signal. A speed control device for a DC motor, characterized in that it has means for artificially dividing an input.
JP3331695A 1991-12-16 1991-12-16 DC motor speed control device Expired - Lifetime JP3049671B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3331695A JP3049671B2 (en) 1991-12-16 1991-12-16 DC motor speed control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3331695A JP3049671B2 (en) 1991-12-16 1991-12-16 DC motor speed control device

Publications (2)

Publication Number Publication Date
JPH05164768A true JPH05164768A (en) 1993-06-29
JP3049671B2 JP3049671B2 (en) 2000-06-05

Family

ID=18246552

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3331695A Expired - Lifetime JP3049671B2 (en) 1991-12-16 1991-12-16 DC motor speed control device

Country Status (1)

Country Link
JP (1) JP3049671B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105738642A (en) * 2016-02-03 2016-07-06 上海新源工业控制技术有限公司 T-method motor speed measurement method of four-way parallel sampling

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105738642A (en) * 2016-02-03 2016-07-06 上海新源工业控制技术有限公司 T-method motor speed measurement method of four-way parallel sampling

Also Published As

Publication number Publication date
JP3049671B2 (en) 2000-06-05

Similar Documents

Publication Publication Date Title
US4584528A (en) Speed detecting method and apparatus
WO2011114438A1 (en) Speed detection device
JPH05164768A (en) Speed controller for dc motor
JP2685962B2 (en) Encoder error detection device
JPH06348507A (en) Microcomputer
JPH08119553A (en) Control device for elevator
JPH05189403A (en) Virtual time measuring method for simulation
KR0129983B1 (en) Motor control apparatus
JPS5967459A (en) Method for detecting engine speed of internal combustion engine
JP2944543B2 (en) Interrupt control device
KR100193486B1 (en) Apparatus and method for implementing time task schedule
JP2557785Y2 (en) Single chip microcomputer
JPS6051141B2 (en) Program runaway detection method
JPS62259101A (en) Speed arithmetic system
JPS61166632A (en) Interruption processor
JP3068317B2 (en) Microcomputer
JP3308670B2 (en) Event-driven processing equipment failure detection device
JPH082724Y2 (en) Load control device
JPS6354891B2 (en)
JPH01196636A (en) Runout detecting device for processor
JPH0498540A (en) Processor load monitoring system
JPH06195245A (en) Monitor timer device
JPH03140870A (en) Abnormal speed detector
JPH04192037A (en) Semiconductor integrated circuit
JPS5935250A (en) Program controller