JPH05188068A - Servo motor speed detecting device - Google Patents

Servo motor speed detecting device

Info

Publication number
JPH05188068A
JPH05188068A JP4004964A JP496492A JPH05188068A JP H05188068 A JPH05188068 A JP H05188068A JP 4004964 A JP4004964 A JP 4004964A JP 496492 A JP496492 A JP 496492A JP H05188068 A JPH05188068 A JP H05188068A
Authority
JP
Japan
Prior art keywords
pulse
servo motor
sampling
register
count value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP4004964A
Other languages
Japanese (ja)
Inventor
Shiro Horiguchi
史郎 堀口
Masahiro Uehara
正裕 上原
Tadashi Kawaguchi
忠史 河口
Takehiko Nakada
健彦 中田
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.)
Kobe Steel Ltd
Original Assignee
Kobe Steel 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 Kobe Steel Ltd filed Critical Kobe Steel Ltd
Priority to JP4004964A priority Critical patent/JPH05188068A/en
Publication of JPH05188068A publication Critical patent/JPH05188068A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Control Of Electric Motors In General (AREA)

Abstract

PURPOSE:To provide a speed detecting device capable of detecting the speed closer to the actual rotating speed of a servo motor at the sampling time for speed detection. CONSTITUTION:The clock pulse number in each output pulse cycle of a pulse encoder PG is counted by a counter 13. A CPU 17 computes the rotating speed of a servo motor in two encoder output pulse cycles from the inverse number of these cycles immediately before sampling and before that, on the basis of the clock pulse count value latched to a first register 14. The rotating speed of the servo motor at the sampling time is then computed from the obtained servo motor rotating speed in the encoder output pulse cycles immediately before sampling and before that, the count value in these two cycles, and the clock pulse count value to be latched to a second register 16 until sampling after the generation of encoder output pulses immediately before sampling.

Description

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

【0001】[0001]

【産業上の利用分野】この発明は、サーボモータに取り
付けられたパルスエンコーダの出力パルスに基づいてサ
ーボモータの回転速度を検出する、サーボモータの速度
検出装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a servomotor speed detecting device for detecting the rotational speed of a servomotor based on the output pulse of a pulse encoder attached to the servomotor.

【0002】[0002]

【従来の技術】この種の従来の速度検出装置の一例が、
特開昭59−160766号公報に示されている。この
従来の速度検出装置は、サーボモータに取り付けられた
パルスエンコーダからの各出力パルスの周期を一定周期
で発生するクロックパルスを用いてカウントするカウン
タと、カウンタした出力パルス周期を記憶しておくレジ
スタと、出力パルス周期の逆数を予めデータテーブルと
して記憶させておくメモリを有し、一定のサンプリング
周期における最新のエンコーダ出力パルスの周期を上記
レジスタから読み取り、そのエンコーダ出力パルス周期
を上記メモリのアドレスに変換してこのメモリより出力
パルス周期の逆数を読み出して、サーボモータの回転速
度を検出するようにしたものである。
2. Description of the Related Art An example of a conventional speed detecting device of this type is
It is disclosed in JP-A-59-160766. This conventional speed detection device includes a counter that counts the period of each output pulse from a pulse encoder attached to a servomotor using a clock pulse that is generated at a constant period, and a register that stores the counted output pulse period. And a memory that stores the reciprocal of the output pulse cycle in advance as a data table.The latest encoder output pulse cycle in a fixed sampling cycle is read from the register, and the encoder output pulse cycle is stored in the address of the memory. The conversion is performed and the reciprocal of the output pulse period is read from this memory to detect the rotation speed of the servo motor.

【0003】[0003]

【発明が解決しようとする課題】ところが、上述した従
来の速度検出装置では、サンプリング周期におけるサン
プリング直前のエンコーダ出力パルス周期に基づいてサ
ーボモータ回転速度を算出するようにしたものであるか
ら、サーボモータが加速あるいは減速されている場合、
速度検出のためのサンプリング時点におけるそのときの
実際のサーボモータ回転速度と算出されたサーボモータ
回転速度との間に誤差が生じ、例えば多関節型ロボット
ではその動作軌跡精度が悪くなるという不具合がある。
However, in the above-mentioned conventional speed detecting device, the servo motor rotation speed is calculated based on the encoder output pulse cycle immediately before sampling in the sampling cycle. Is being accelerated or decelerated,
There is a problem that an error occurs between the actual servo motor rotation speed at that time at the time of sampling for speed detection and the calculated servo motor rotation speed, and, for example, in an articulated robot, the motion locus accuracy thereof deteriorates. ..

【0004】この発明は、上記の点に鑑みてなされたも
のであって、サーボモータが加速あるいは減速されてい
る場合においても、速度検出のためのサンプリング時点
におけるそのときの実際のサーボモータ回転速度により
近い速度を検出できる、サーボモータの速度検出装置の
提供を目的とする。
The present invention has been made in view of the above points, and even when the servomotor is accelerated or decelerated, the actual servomotor rotation speed at that time at the sampling point for speed detection. It is an object of the present invention to provide a speed detection device for a servo motor, which can detect a speed closer to.

【0005】[0005]

【課題を解決するための手段】上記の目的を達成するた
めに、第1の発明に係るサーボモータの速度検出装置
は、サーボモータに取り付けられたパルスエンコーダの
出力パルスに基づいてサーボモータの回転速度を検出す
る速度検出装置において、パルスエンコーダの各出力パ
ルスの周期におけるクロックパルス数を計数するクロッ
クパルスカウンタと、前記クロックパルスカウンタによ
る計数値をパルスエンコーダの出力パルス発生毎にラッ
チする第1のレジスタと、前記クロックパルスカウンタ
による計数値をサンプリング信号に基づいてラッチする
第2のレジスタと、前記第1のレジスタにラッチされる
クロックパルス計数値に基づいて、サンプリング直前お
よびその前のエンコーダ出力パルス周期の逆数からこれ
ら2つの周期におけるサーボモータの回転速度を算出
し、サンプリング直前およびその前のエンコーダ出力パ
ルス周期におけるサーボモータ回転速度,これら2つの
周期における前記第1のレジスタにラッチされていたク
ロックパルス計数値,および前記第2のレジスタにラッ
チされるサンプリング信号発生時のクロックパルス計数
値からサンプリング時点におけるサーボモータの回転速
度を算出する演算処理手段とを備えたことを特徴とする
ものである。
In order to achieve the above object, a speed detecting device for a servo motor according to a first aspect of the present invention rotates a servo motor based on an output pulse of a pulse encoder attached to the servo motor. In a speed detection device for detecting a speed, a clock pulse counter for counting the number of clock pulses in each cycle of output pulses of a pulse encoder, and a first value for latching a count value by the clock pulse counter every time an output pulse of the pulse encoder is generated. A register, a second register that latches the count value of the clock pulse counter based on a sampling signal, and an encoder output pulse immediately before and before sampling based on the clock pulse count value latched by the first register From the reciprocal of the cycle, The rotation speed of the servo motor is calculated, the servo motor rotation speed in the encoder output pulse cycle immediately before and before sampling, the clock pulse count value latched in the first register in these two cycles, and the second Arithmetic processing means for calculating the rotation speed of the servo motor at the time of sampling from the clock pulse count value when the sampling signal latched in the register is generated.

【0006】また、第2の発明に係るサーボモータの速
度検出装置は、サーボモータに取り付けられたパルスエ
ンコーダの出力パルスに基づいてサーボモータの回転速
度を検出する速度検出装置において、パルスエンコーダ
の出力パルスを分周する分周器と、前記分周器によって
分周されたパルスエンコーダの各出力分周パルスの周期
におけるクロックパルス数を計数するクロックパルスカ
ウンタと、前記クロックパルスカウンタの計数値をパル
スエンコーダの出力分周パルス発生毎にラッチする第1
のレジスタと、前記クロックパルスカウンタの計数値を
サンプリング信号に基づいてラッチする第2のレジスタ
と、前記第1のレジスタにラッチされるクロックパルス
計数値に基づいて、サンプリング直前およびその前のエ
ンコーダ出力分周パルス周期の逆数からこれら2つの周
期におけるサーボモータの回転速度を算出し、サンプリ
ング直前およびその前のエンコーダ出力分周パルス周期
におけるサーボモータ回転速度,これら2つの周期にお
ける前記第1のレジスタにラッチされていたクロックパ
ルス計数値,前記第2のレジスタにラッチされるサンプ
リング信号発生時のクロックパルス計数値,および前記
分周器の分周比情報からサンプリング時点におけるサー
ボモータの回転速度を算出する演算処理手段とを備えた
ことを特徴とするものである。
Further, a speed detecting device for a servo motor according to a second aspect of the present invention is a speed detecting device for detecting a rotation speed of a servo motor based on an output pulse of a pulse encoder attached to the servo motor. A frequency divider that divides a pulse, a clock pulse counter that counts the number of clock pulses in each cycle of output divided pulses of the pulse encoder that is divided by the frequency divider, and a count value of the clock pulse counter 1st to latch each time the encoder output divided pulse is generated
Register, a second register for latching the count value of the clock pulse counter based on a sampling signal, and an encoder output immediately before and before sampling based on the clock pulse count value latched by the first register. The rotation speed of the servo motor in these two cycles is calculated from the reciprocal of the divided pulse cycle, and the servo motor rotation speed in the encoder output divided pulse cycle immediately before and before sampling is stored in the first register in these two cycles. The rotation speed of the servo motor at the time of sampling is calculated from the latched clock pulse count value, the clock pulse count value when the sampling signal is latched in the second register, and the frequency division ratio information of the frequency divider. And an arithmetic processing unit. Than it is.

【0007】[0007]

【作用】第1の発明に係るサーボモータの速度検出装置
においては、パルスエンコーダの各出力パルスの周期に
おけるクロックパルス数がクロックパルスカウンタによ
り計数され、パルスエンコーダの出力パルス発生毎に第
1のレジスタには、エンコーダ出力パルスの周期におけ
るクロックパルスの数を示すクロックパルス計数値がラ
ッチされる。一方、サンプリング信号に基づいて第2の
レジスタには、サンプリング直前におけるエンコーダ出
力パルス発生後からサンプリングまでの間のクロックパ
ルスの数を示すクロックパルス計数値がラッチされる。
In the servo motor speed detecting device according to the first aspect of the invention, the clock pulse counter counts the number of clock pulses in each cycle of the output pulses of the pulse encoder, and the first register is generated every time the output pulse of the pulse encoder is generated. A clock pulse count value indicating the number of clock pulses in the cycle of the encoder output pulse is latched in. On the other hand, based on the sampling signal, the second register latches the clock pulse count value indicating the number of clock pulses from immediately after the generation of the encoder output pulse immediately before the sampling to the sampling.

【0008】そして、演算処理手段により、第1のレジ
スタにラッチされるクロックパルス計数値に基づいて、
サンプリング直前およびその前のエンコーダ出力パルス
周期の逆数からこれら2つの周期におけるサーボモータ
の回転速度が算出される。得られたサンプリング直前お
よびその前のエンコーダ出力パルス周期におけるサーボ
モータ回転速度,これら2つの周期における上記第1の
レジスタにラッチされていたクロックパルス計数値,お
よび上記第2のレジスタにラッチされるサンプリング信
号発生時のクロックパルス計数値から、サンプリング時
点におけるサーボモータの回転速度が算出される。これ
により、サンプリング時点におけるそのときの実際のサ
ーボモータ回転速度により近い速度を検出ことができ
る。
Then, based on the clock pulse count value latched in the first register by the arithmetic processing means,
The rotation speed of the servo motor in these two cycles is calculated from the reciprocal of the encoder output pulse cycle immediately before and before the sampling. Servo motor rotation speeds in the encoder output pulse cycle immediately before and before the obtained sampling, clock pulse count values latched in the first register in these two cycles, and sampling latched in the second register The rotation speed of the servo motor at the time of sampling is calculated from the clock pulse count value when the signal is generated. This makes it possible to detect a speed that is closer to the actual servo motor rotation speed at the time of sampling.

【0009】また、分周器によりパルスエンコーダの出
力パルスを分周するようにした第2の発明に係るサーボ
モータの速度検出装置では、パルスエンコーダの各出力
分周パルスの周期におけるクロックパルス数がクロック
パルスカウンタにより計数され、パルスエンコーダの出
力分周パルス発生毎に第1のレジスタには、エンコーダ
出力分周パルスの周期におけるクロックパルスの数を示
すクロックパルス計数値がラッチされる。一方、サンプ
リング信号に基づいて第2のレジスタには、サンプリン
グ直前におけるエンコーダ出力分周パルス発生後からサ
ンプリングまでの間のクロックパルスの数を示すクロッ
クパルス計数値がラッチされる。
Further, in the speed detecting device for the servo motor according to the second aspect of the present invention in which the output pulse of the pulse encoder is divided by the frequency divider, the number of clock pulses in each cycle of the output divided pulse of the pulse encoder is The clock pulse counter counts, and a clock pulse count value indicating the number of clock pulses in the cycle of the encoder output divided pulse is latched in the first register every time the output divided pulse of the pulse encoder is generated. On the other hand, based on the sampling signal, the second register latches the clock pulse count value indicating the number of clock pulses from immediately after the generation of the encoder output divided pulse immediately before sampling to the sampling.

【0010】そして、演算処理手段により、第1のレジ
スタにラッチされるクロックパルス計数値に基づいて、
サンプリング直前およびその前のエンコーダ出力分周パ
ルス周期の逆数からこれら2つの周期におけるサーボモ
ータの回転速度が算出される。得られたサンプリング直
前およびその前のエンコーダ出力分周パルス周期におけ
るサーボモータ回転速度,これら2つの周期における上
記第1のレジスタにラッチされていたクロックパルス計
数値,上記第2のレジスタにラッチされるサンプリング
信号発生時のクロックパルス計数値,および上記分周器
の分周比情報からから、サンプリング時点におけるサー
ボモータの回転速度が算出される。これにより、サーボ
モータがより高速領域で加速あるいは減速駆動される場
合おいても、サンプリング時点におけるそのときの実際
のサーボモータ回転速度により近い速度を検出ことがで
きる。
Then, based on the clock pulse count value latched in the first register by the arithmetic processing means,
The rotation speed of the servo motor in these two cycles is calculated from the reciprocal of the encoder output divided pulse cycle immediately before and before the sampling. The servo motor rotation speed in the encoder output divided pulse cycle immediately before and before the obtained sampling, the clock pulse count value latched in the first register in these two cycles, and latched in the second register The rotation speed of the servo motor at the time of sampling is calculated from the clock pulse count value when the sampling signal is generated and the frequency division ratio information of the frequency divider. As a result, even when the servomotor is accelerated or decelerated in a higher speed region, a speed closer to the actual servomotor rotation speed at that time at the time of sampling can be detected.

【0011】[0011]

【実施例】以下、実施例に基づいてこの発明を説明す
る。図1は第1の発明の一実施例によるサーボモータの
速度検出装置の構成を示すブロック図、図2は図1に示
す速度検出装置の動作を説明するための図である。
EXAMPLES The present invention will be described below based on examples. 1 is a block diagram showing the structure of a speed detecting device for a servo motor according to an embodiment of the first invention, and FIG. 2 is a diagram for explaining the operation of the speed detecting device shown in FIG.

【0012】図1において、11は波形整形回路であり、
図示しないサーボモータの軸に連結されたパルスエンコ
ーダPGからのパルス信号は、波形整形回路11にて整形さ
れ、エンコーダ出力パルス信号EPiとして第1フリップ
フロップ12に入力される(図2の(a)参照)。第1フ
リップフロップ12には、また、図示しないクロックパル
ス発生器からのクロックパルス信号CP が入力されるよ
うになっている(図2の(b)参照)。第1フリップフ
ロップ12は、エンコーダ出力パルス信号EPi入力時にお
けるクロックパルス信号CP の立ち上がりに同期して、
セットエンコーダパルス信号(以下、SETEP信号と
いう。)と、クロックパルスカウンタ13に与えるリセッ
トエンコーダパルス信号(以下、RSTEP信号とい
う。)とを発生させるためのものである(図2の(c)
及び(d)参照)。
In FIG. 1, 11 is a waveform shaping circuit,
The pulse signal from the pulse encoder PG connected to the shaft of the servo motor (not shown) is shaped by the waveform shaping circuit 11 and input to the first flip-flop 12 as the encoder output pulse signal E Pi ((a in FIG. 2). )reference). A clock pulse signal C P from a clock pulse generator (not shown) is also input to the first flip-flop 12 (see FIG. 2B). The first flip-flop 12 synchronizes with the rising edge of the clock pulse signal C P when the encoder output pulse signal E Pi is input,
This is for generating a set encoder pulse signal (hereinafter referred to as SETEP signal) and a reset encoder pulse signal (hereinafter referred to as RSTEP signal) to be supplied to the clock pulse counter 13 ((c) in FIG. 2).
And (d)).

【0013】クロックパルス信号CP が入力されるクロ
ックパルスカウンタ13は、上記のRSTEP信号の立ち
上がりに同期してリセットされ、各エンコーダ出力パル
ス信号EPiの周期に対応する期間における、つまり各エ
ンコーダ出力パルス信号EPiの周期におけるクロックパ
ルス信号CP の数を計数するものである(図2の(e)
参照)。このクロックパルスカウンタ13の計数値は、上
記SETEP信号の立ち上がりに同期して第1レジスタ
14にラッチされるようになっている(図2の(f)参
照)。
The clock pulse counter 13 to which the clock pulse signal C P is input is reset in synchronization with the rising edge of the RSTEP signal, and in the period corresponding to the cycle of each encoder output pulse signal E Pi , that is, each encoder output. The number of clock pulse signals C P in the cycle of the pulse signal E Pi is counted ((e) in FIG. 2).
reference). The count value of the clock pulse counter 13 is synchronized with the rising edge of the SETEP signal in the first register.
It is designed to be latched by 14 (see FIG. 2 (f)).

【0014】一方、図示しないサンプリングパルス発生
器からサンプリングパルス信号SP が発生されるように
なっており(図2の(g)参照)、このサンプリングパ
ルス信号SP とクロックパルス信号CP とが第2フリッ
プフロップ15に入力されるように構成されている。第2
フリップフロップ15は、サンプリングパルス信号SP
力時におけるクロックパルス信号CP の立ち上がりに同
期して、セットサンプリング信号(以下、SETSP信
号という。)とリセットサンプリング信号(以下、RS
TSP信号という。)とを発生させるためのものである
(図2の(h)参照)。なお、RSTSP信号は、イニ
シャライズなどのために用いられる信号である。
On the other hand, a sampling pulse signal S P is generated from a sampling pulse generator (not shown) (see (g) of FIG. 2), and the sampling pulse signal S P and the clock pulse signal C P are generated. It is configured to be input to the second flip-flop 15. Second
The flip-flop 15 synchronizes with a rising edge of the clock pulse signal C P when the sampling pulse signal S P is input, and a set sampling signal (hereinafter, referred to as SETSP signal) and a reset sampling signal (hereinafter, RS).
It is called a TSP signal. ) And (see (h) of FIG. 2). The RSTSP signal is a signal used for initialization and the like.

【0015】クロックパルスカウンタ13に接続される第
2レジスタ16は、上記第2フリップフロップ15からのS
ETSP信号の立ち上がりに同期して、クロックパルス
カウンタ13の計数値をラッチするものである(図2の
(i)参照)。
The second register 16 connected to the clock pulse counter 13 is an S register from the second flip-flop 15 described above.
The count value of the clock pulse counter 13 is latched in synchronization with the rising edge of the ETSP signal (see (i) in FIG. 2).

【0016】演算処理手段としての中央処理装置(以
下、CPUという。)17は、記憶手段としてのメモリ18
を備え、割り込み信号として上記SETEP信号及びS
ETSP信号が入力されることにより、所定の制御プロ
グラムに従って後述するようにサンプリング時点におけ
るサーボモータの回転速度の算出に必要な演算処理を実
行し、その回転速度信号VS を図示しないサーボモータ
速度制御部へ出力するものである。
A central processing unit (hereinafter referred to as a CPU) 17 as an arithmetic processing means, a memory 18 as a storage means.
And the SETEP signal and S as the interrupt signal.
When the ETSP signal is input, the arithmetic processing necessary for calculating the rotation speed of the servo motor at the sampling point is executed according to a predetermined control program as described later, and the rotation speed signal V S is used for servo motor speed control (not shown). It is to be output to the department.

【0017】CPU17は、SETEP信号による割り込
み要求を受ける毎に、そのときに第1レジスタ14にラッ
チされている、各エンコーダ出力パルスEPi,i=1〜
nの周期におけるクロックパルスCP の数を示す計数値
i ,i=1〜nを読み込む。また、SETSP信号に
よる割り込み要求を受けると、そのときに第2レジスタ
16にラッチされている、サンプリング直前におけるエン
コーダ出力パルスEPn発生後からサンプリングまでの間
のクロックパルスの数を示すクロックパルス計数値CSを
読み込むようになっている。
Each time the CPU 17 receives an interrupt request by the SETEP signal, each encoder output pulse E Pi , i = 1 to 1 latched in the first register 14 at that time.
A count value C i , i = 1 to n indicating the number of clock pulses C P in the cycle of n is read. Also, when an interrupt request by the SETSP signal is received, at that time, the second register
The clock pulse count value CS, which is latched in 16, indicating the number of clock pulses from the time the encoder output pulse E Pn immediately before sampling occurs to the time sampling is read.

【0018】次に、図1〜図4を参照しながら、上記構
成になる速度検出装置におけるCPUによるサーボモー
タ回転速度の算出の手順を以下に説明する。図3は図1
に示す速度検出装置のCPUによるサーボモータ回転速
度の算出手順を説明するためのフローチャート、図4は
図1に示す速度検出装置のCPUによるサーボモータ回
転速度の算出手順を説明するための他のフローチャート
である。
Next, with reference to FIGS. 1 to 4, a procedure for calculating the servo motor rotation speed by the CPU in the speed detecting device having the above-described structure will be described below. FIG. 3 shows FIG.
FIG. 4 is a flow chart for explaining the procedure of calculating the servo motor rotation speed by the CPU of the speed detection apparatus shown in FIG. Is.

【0019】エンコーダ出力パルスEPi入力によって第
1フリップフロップ12から出力されるSETEP信号に
よる割り込み要求を受けると、そのときに第1レジスタ
14によりラッチされている、各エンコーダ出力パルスE
Piの周期におけるクロックパルスCP の数を示すクロッ
クパルス計数値Ci を読み込む(ステップS101)。そし
て、このクロックパルス計数値Ci に基づいて、エンコ
ーダ出力パルスEPiの周期の逆数からその周期における
サーボモータの回転速度Vi を算出し、この回転速度V
i とクロックパルス計数値Ci とをメモリ18に格納して
おく(ステップS102)。このような動作がSETEP信
号による割り込み要求が発生する毎に順次繰り返される
ことになる(i=1〜n)。
When an interrupt request by the SETEP signal output from the first flip-flop 12 is received by the encoder output pulse E Pi input, at that time, the first register
Each encoder output pulse E latched by 14
A clock pulse count value C i indicating the number of clock pulses C P in the period of Pi is read (step S101). Then, based on this clock pulse count value C i , the rotation speed V i of the servo motor in that cycle is calculated from the reciprocal of the cycle of the encoder output pulse E Pi , and this rotation speed V i is calculated.
i and the clock pulse count value C i are stored in the memory 18 (step S102). Such an operation is sequentially repeated every time an interrupt request by the SETEP signal is generated (i = 1 to n).

【0020】上記のサーボモータの回転速度Vi (rp
m)は、次式により算出される。 Vi =〔1/(Ci ・TC)〕・60/P ここで、i=1〜nであり、TCはクロックパルスCP
周期(秒)、PはパルスエンコーダPGの1回転当たりの
パルス数である。
The rotation speed V i (rp) of the servo motor
m) is calculated by the following equation. V i = [1 / (C i · TC)] · 60 / P where i = 1 to n, TC is the period (seconds) of the clock pulse C P , and P is one revolution of the pulse encoder PG. The number of pulses.

【0021】そして、今回のサンプリング周期において
サンプリングパルス信号SP の入力によって第2フリッ
プフロップ15から出力されるSETSP信号による割り
込み要求を受けると、そのときに第2レジスタ16にラッ
チされている、サンプリング直前におけるエンコーダ出
力パルスEPn発生後からサンプリングまでの間のクロッ
クパルスの数を示すクロックパルス計数値CSを読み込む
(ステップS201)。
When an interrupt request by the SETSP signal output from the second flip-flop 15 is received by the input of the sampling pulse signal S P in this sampling cycle, the sampling latched in the second register 16 at that time is received. A clock pulse count value CS indicating the number of clock pulses from immediately after the occurrence of the encoder output pulse EPn to the sampling immediately before is read (step S201).

【0022】このクロックパルス計数値CSと、メモリ18
に格納されていた、サンプリング直前のエンコーダ出力
パルスEPnの周期におけるサーボモータ回転速度Vn
びその前のエンコーダ出力パルスEpn-1の周期における
サーボモータ回転速度Vn-1 と、これら2つの周期にお
けるクロックパルス計数値Cn ,Cn-1 とから、次式に
より、サンプリング時点におけるサーボモータの回転速
度VS を算出する(ステップS202)。 VS =〔(Vn −Vn-1 )/(Cn −Cn-1 )〕・(−
CS)+Vn なお、この場合、サーボモータが一定速度で駆動されて
いるときには、VS =Vn となる。
This clock pulse count value CS and the memory 18
Was stored in a servo motor speed V n-1 in the servo motor speed V n and the period of the encoder output pulse E pn-1 before the in the period of the encoder output pulses E Pn sampling immediately before, these two From the clock pulse count values C n and C n-1 in the cycle, the rotation speed V S of the servo motor at the time of sampling is calculated by the following equation (step S202). V S = [(V n -V n-1) / (C n -C n-1) ] - (-
CS) + V n In this case, when the servo motor is driven at a constant speed, V S = V n .

【0023】上記のような動作がサンプリング周期毎に
行われることになる。これにより、サーボモータが加速
あるいは減速されている場合においても、速度検出のた
めのサンプリング時点におけるそのときの実際のサーボ
モータ回転速度により近い速度を検出することができ、
例えば多関節型ロボットの制御に適用することにより、
その動作軌跡精度を高めることができる。
The above-mentioned operation is performed every sampling cycle. As a result, even when the servo motor is accelerated or decelerated, it is possible to detect a speed closer to the actual servo motor rotation speed at that time at the sampling point for speed detection,
For example, by applying it to the control of an articulated robot,
The motion locus accuracy can be improved.

【0024】図5は第2の発明の一実施例によるサーボ
モータの速度検出装置の構成を示すブロック図である。
パルスエンコーダからの出力パルスを分周器により分周
するようにした点以外は実質的に図1に示す構成と同一
である。
FIG. 5 is a block diagram showing the structure of a servomotor speed detecting device according to an embodiment of the second invention.
The configuration is substantially the same as that shown in FIG. 1 except that the output pulse from the pulse encoder is divided by a frequency divider.

【0025】図5において、21は波形整形回路であり、
図示しないサーボモータの軸に連結されたパルスエンコ
ーダPGからのパルス信号は、波形整形回路21にて整形さ
れから分周器(プログラマブル分周器)29に入力され、
この分周器29により分周される。分周器29からのエンコ
ーダ出力分周パルス信号EBPiは、第1フリップフロップ
22に入力される。第1フリップフロップ22には、また、
図示しないクロックパルス発生器からのクロックパルス
信号CP が入力されるようになっている。第1フリップ
フロップ22は、上記分周パルス信号EBPi入力時における
クロックパルス信号CP の立ち上がりに同期して、セッ
トエンコーダパルス信号(以下、SETEBP信号とい
う。)と、クロックパルスカウンタ23に与えるリセット
エンコーダパルス信号(以下、RSTEBP信号とい
う。)とを発生させるためのものである。
In FIG. 5, 21 is a waveform shaping circuit,
The pulse signal from the pulse encoder PG connected to the axis of the servo motor (not shown) is shaped by the waveform shaping circuit 21 and then input to the frequency divider (programmable frequency divider) 29.
The frequency is divided by this frequency divider 29. The encoder output divided pulse signal EB Pi from the frequency divider 29 is the first flip-flop.
Entered in 22. In the first flip-flop 22,
A clock pulse signal C P from a clock pulse generator (not shown) is input. The first flip-flop 22 is synchronized with the rising of the clock pulse signal C P when the divided pulse signal EB Pi is input, and a set encoder pulse signal (hereinafter, referred to as a SETEBP signal) and a reset given to the clock pulse counter 23. This is for generating an encoder pulse signal (hereinafter referred to as an RSTEBP signal).

【0026】クロックパルス信号CP が入力されるクロ
ックパルスカウンタ23は、上記のRSTEBP信号の立
ち上がりに同期してリセットされ、各分周パルス信号EB
Piの周期に対応する期間における、つまり各エンコーダ
出力分周パルス信号EBPiの周期におけるクロックパルス
信号CP の数を計数するものである。このクロックパル
スカウンタ23の計数値は、上記第1フリップフロップ22
からのSETEBP信号の立ち上がりに同期して第1レ
ジスタ24にラッチされるようになっている。
The clock pulse counter 23 to which the clock pulse signal C P is input is reset in synchronization with the rising edge of the RSTEBP signal, and each divided pulse signal EB is reset.
The number of clock pulse signals C P in the period corresponding to the period of Pi , that is, in the period of each encoder output divided pulse signal EB Pi is counted. The count value of the clock pulse counter 23 is the first flip-flop 22.
The signal is latched in the first register 24 in synchronization with the rising edge of the SETEBP signal.

【0027】一方、サンプリングパルス発生器(図示省
略)からのサンプリングパルス信号SP とクロックパル
ス信号CP とが第2フリップフロップ25に入力されるよ
うに構成されている。第2フリップフロップ25は、サン
プリングパルス信号SP 入力時におけるクロックパルス
信号CP の立ち上がりに同期して、セットサンプリング
信号(以下、SETSP信号という。)とリセットサン
プリング信号(以下、RSTSP信号という。)とを発
生させるためのものである。なお、RSTSP信号は、
分周器29の分周動作の制御のために用いられる信号であ
る。
On the other hand, the sampling pulse signal S P and the clock pulse signal C P from the sampling pulse generator (not shown) are input to the second flip-flop 25. The second flip-flop 25 synchronizes with the rising edge of the clock pulse signal C P when the sampling pulse signal S P is input, and a set sampling signal (hereinafter, SETSP signal) and a reset sampling signal (hereinafter, RSTSP signal). To generate and. The RSTSP signal is
This is a signal used for controlling the frequency dividing operation of the frequency divider 29.

【0028】クロックパルスカウンタ23に接続される第
2レジスタ26は、上記の第2フリップフロップ25からの
SETSP信号の立ち上がりに同期して、クロックパル
スカウンタ23の計数値をラッチするものである。
The second register 26 connected to the clock pulse counter 23 latches the count value of the clock pulse counter 23 in synchronization with the rising edge of the SETSP signal from the second flip-flop 25.

【0029】CPU27は、メモリ28を備え、割り込み信
号として上記SETEBP信号及びSETSP信号が入
力されることにより、所定の制御プログラムに従ってサ
ンプリング時点におけるサーボモータの回転速度の算出
に必要な演算処理を実行し、その回転速度信号VS を図
示しないサーボモータ速度制御部へ出力するものであ
る。
The CPU 27 is provided with a memory 28, and by executing the SETEBP signal and the SETSP signal as interrupt signals, executes the arithmetic processing necessary for calculating the rotation speed of the servo motor at the sampling time according to a predetermined control program. The rotation speed signal V S is output to a servo motor speed control unit (not shown).

【0030】CPU27は、SETEBP信号による割り
込み要求を受ける毎に、そのときに第1レジスタ24にラ
ッチされている、各エンコーダ出力パルスEBPi,i=1
〜nの周期におけるクロックパルスCP の数を示す計数
値Ci ,i=1〜nを読み込む。また、SETSP信号
による割り込み要求を受けると、そのときに第2レジス
タ26にラッチされている、サンプリング直前におけるエ
ンコーダ出力分周パルス発生後からサンプリングまでの
間のクロックパルスの数を示すクロックパルス計数値CS
を読み込むようになっている。
Each time the CPU 27 receives an interrupt request by the SETEBP signal, each encoder output pulse EB Pi , i = 1 latched in the first register 24 at that time.
Count values C i , i = 1 to n indicating the number of clock pulses C P in a cycle of up to n are read. Further, when an interrupt request by the SETSP signal is received, a clock pulse count value latched in the second register 26 at that time, which indicates the number of clock pulses from immediately after the generation of the encoder output divided pulse immediately before sampling to the sampling CS
Is designed to read.

【0031】一方、30はプリセットレジスタであり、こ
のプリセットレジスタ30はCPU27から与えられる分周
比情報を先に述べた分周器29に設定するためのものであ
る。なお、分周器29による分周比を1/Nで表すと、こ
の実施例では、分周比情報は分周値Nで示されるもので
ある。
On the other hand, 30 is a preset register, and this preset register 30 is for setting the frequency division ratio information given from the CPU 27 to the frequency divider 29 described above. If the frequency division ratio of the frequency divider 29 is represented by 1 / N, the frequency division ratio information is represented by the frequency division value N in this embodiment.

【0032】そして、分周器29からのエンコーダ出力分
周パルス信号EBPiは、第1フリップフロップ22に入力さ
れるとともに、分周パルスカウンタ31にも入力されるよ
うに構成されている。分周パルスカウンタ31は、上記第
2フリップフロップ25からのRSTSP信号の立ち上が
りに同期してリセットされ、サンプリング周期における
エンコーダ出力分周パルス信号EBPiの数を計数するため
のものである。
The encoder output divided pulse signal EB Pi from the divider 29 is input to the first flip-flop 22 and also to the divided pulse counter 31. The frequency division pulse counter 31 is reset in synchronization with the rising edge of the RSTSP signal from the second flip-flop 25 and counts the number of encoder output frequency division pulse signals EB Pi in the sampling cycle.

【0033】この分周パルスカウンタ31の計数値は、第
2フリップフロップ25からのSETSP信号の立ち上が
りに同期して第3レジスタ32にラッチされるようになっ
ている。そして、第3レジスタ32にラッチされたサンプ
リング周期におけるエンコーダ出力分周パルス信号EBPi
の数を示すエンコーダ出力分周パルス計数値は、SET
SP信号による割り込みの発生により、CPU27に読み
込まれるようになっている。CPU27は、上記エンコー
ダ出力分周パルス計数値に基づいて次回のサンプリング
周期における所定の分周比情報を定め、この所定分周比
情報をプリセットレジスタ30に与える動作を行う。
The count value of the divided pulse counter 31 is latched in the third register 32 in synchronization with the rising edge of the SETSP signal from the second flip-flop 25. Then, the encoder output divided pulse signal EB Pi in the sampling period latched in the third register 32
The encoder output divided pulse count value indicating the number of
When an interrupt is generated by the SP signal, it is read by the CPU 27. The CPU 27 determines predetermined frequency division ratio information in the next sampling cycle based on the encoder output frequency division pulse count value, and performs an operation of giving the predetermined frequency division ratio information to the preset register 30.

【0034】上記のように構成される速度検出装置にお
いても、図1に示す速度検出装置と同様にして、CPU
27により、第1レジスタ24にラッチされるクロックパル
ス計数値に基づいて、サンプリング直前およびその前の
エンコーダ出力分周パルス周期の逆数からこれら2つの
周期におけるサーボモータの回転速度が算出される。そ
して、サンプリング直前およびその前のエンコーダ出力
分周パルス周期におけるサーボモータ回転速度,これら
2つの周期における第1レジスタ24にラッチされていた
クロックパルス計数値,第2レジスタ26にラッチされる
サンプリング信号発生時のクロックパルス計数値,およ
び分周器の分周比情報からサンプリング時点におけるサ
ーボモータの回転速度が算出される。
Also in the speed detecting device constructed as described above, the CPU is operated in the same manner as the speed detecting device shown in FIG.
Based on the clock pulse count value latched in the first register 24, the rotation speed of the servo motor in these two cycles is calculated from the reciprocal of the encoder output frequency division pulse cycle immediately before and before sampling by 27. Then, the servo motor rotation speed in the encoder output divided pulse cycle immediately before and before sampling, the clock pulse count value latched in the first register 24 in these two cycles, and the sampling signal generated in the second register 26 are generated. The rotation speed of the servo motor at the time of sampling is calculated from the clock pulse count value at time and the frequency division ratio information of the frequency divider.

【0035】これにより、パルスエンコーダの出力パル
スを分周する分周器を備えた上記速度検出装置による
と、サーボモータがより高速領域で加速あるいは減速駆
動される場合おいても、サンプリング時点におけるその
ときの実際のサーボモータ回転速度により近い速度を検
出ことができる。
As a result, according to the speed detecting device having the frequency divider for dividing the output pulse of the pulse encoder, even when the servomotor is accelerated or decelerated in a higher speed range, the speed at the sampling time is increased. It is possible to detect a speed that is closer to the actual servo motor rotation speed at that time.

【0036】[0036]

【発明の効果】以上述べたように、請求項1の発明によ
るサーボモータの速度検出装置によると、サンプリング
周期におけるサンプリング直前およびその前のエンコー
ダ出力パルス周期の逆数からこれら2つの周期における
サーボモータの回転速度を算出し、得られたサンプリン
グ直前およびその前のエンコーダ出力パルス周期におけ
るサーボモータ回転速度,これら2つの周期におけるク
ロックパルス計数値,およびサンプリング直前における
エンコーダ出力パルス発生後からサンプリングまでの間
のクロックパルス計数値から、サンプリング時点におけ
るサーボモータの回転速度を算出するように構成したも
のであるから、サーボモータが加速あるいは減速されて
いる場合においても、速度検出のためのサンプリング時
点におけるそのときの実際のサーボモータ回転速度によ
り近い速度を検出することができ、この速度検出装置を
例えば多関節型ロボットの制御に適用することにより、
その動作軌跡精度を高めることができる。
As described above, according to the speed detecting device for a servo motor according to the first aspect of the present invention, from the reciprocal of the encoder output pulse period immediately before and before the sampling in the sampling period, the servo motor in these two periods is detected. The rotation speed is calculated, and the servo motor rotation speed in the encoder output pulse cycle obtained immediately before and before the sampling, the clock pulse count value in these two cycles, and the time immediately after the encoder output pulse immediately before sampling until the sampling Since the rotation speed of the servo motor at the time of sampling is calculated from the clock pulse count value, even if the servo motor is accelerated or decelerated, it can be calculated at the time of sampling for speed detection. Can be detected speed close to the actual servo motor speed, by applying the speed detection device, for example, in the control of the articulated robot,
The motion locus accuracy can be improved.

【0037】また、請求項2の発明によるサーボモータ
の速度検出装置によると、パルスエンコーダの出力パル
スを分周する分周器を備えた構成としたものであるか
ら、サーボモータがより高速領域で加速あるいは減速駆
動される場合おいても、サンプリング時点におけるその
ときの実際のサーボモータ回転速度により近い速度を検
出ことができる。
Further, according to the speed detecting device for the servo motor of the second aspect of the present invention, since the servo motor has a structure provided with a frequency divider for dividing the output pulse of the pulse encoder, the servo motor can operate in a higher speed range. Even when acceleration or deceleration driving is performed, it is possible to detect a speed that is closer to the actual servo motor rotation speed at the time of sampling.

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

【図1】第1の発明の一実施例によるサーボモータの速
度検出装置の構成を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of a speed detection device for a servo motor according to an embodiment of the first invention.

【図2】図1に示す速度検出装置の動作を説明するため
の図である。
FIG. 2 is a diagram for explaining the operation of the speed detection device shown in FIG.

【図3】図1に示す速度検出装置のCPUによるサーボ
モータ回転速度の算出手順を説明するためのフローチャ
ートである。
FIG. 3 is a flowchart for explaining a procedure of calculating a servo motor rotation speed by a CPU of the speed detection device shown in FIG.

【図4】図1に示す速度検出装置のCPUによるサーボ
モータ回転速度の算出手順を説明するための他のフロー
チャートである。
FIG. 4 is another flowchart for explaining the procedure of calculating the servo motor rotation speed by the CPU of the speed detection device shown in FIG.

【図5】第2の発明の一実施例によるサーボモータの速
度検出装置の構成を示すブロック図である。
FIG. 5 is a block diagram showing a configuration of a speed detection device for a servo motor according to an embodiment of the second invention.

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

11,21…波形整形回路 12,22…第1フリップフロップ
13,23…クロックパルスカウンタ 14,24…第1レジ
スタ 15,25…第2フリップフロップ 16,26…第2レ
ジスタ 17,27…CPU 18,28…メモリ 29…分周器
30…プリセットレジスタ 31…分周パルスカウンタ
32…第3レジスタ PG…パルスエンコーダ
11, 21 ... Waveform shaping circuit 12, 22 ... First flip-flop
13, 23 ... Clock pulse counter 14, 24 ... First register 15, 25 ... Second flip-flop 16, 26 ... Second register 17, 27 ... CPU 18, 28 ... Memory 29 ... Divider
30 ... Preset register 31 ... Divided pulse counter
32 ... 3rd register PG ... Pulse encoder

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 サーボモータに取り付けられたパルスエ
ンコーダの出力パルスに基づいてサーボモータの回転速
度を検出する速度検出装置において、 パルスエンコーダの各出力パルスの周期におけるクロッ
クパルス数を計数するクロックパルスカウンタと、 前記クロックパルスカウンタによる計数値をパルスエン
コーダの出力パルス発生毎にラッチする第1のレジスタ
と、 前記クロックパルスカウンタによる計数値をサンプリン
グ信号に基づいてラッチする第2のレジスタと、 前記第1のレジスタにラッチされるクロックパルス計数
値に基づいて、サンプリング直前およびその前のエンコ
ーダ出力パルス周期の逆数からこれら2つの周期におけ
るサーボモータの回転速度を算出し、サンプリング直前
およびその前のエンコーダ出力パルス周期におけるサー
ボモータ回転速度,これら2つの周期における前記第1
のレジスタにラッチされていたクロックパルス計数値,
および前記第2のレジスタにラッチされるサンプリング
信号発生時のクロックパルス計数値からサンプリング時
点におけるサーボモータの回転速度を算出する演算処理
手段と、 を備えたことを特徴とするサーボモータの速度検出装
置。
1. A speed detection device for detecting a rotation speed of a servo motor based on an output pulse of a pulse encoder attached to a servo motor, wherein a clock pulse counter for counting the number of clock pulses in a cycle of each output pulse of the pulse encoder. A first register that latches the count value of the clock pulse counter each time an output pulse of a pulse encoder is generated; a second register that latches the count value of the clock pulse counter based on a sampling signal; Based on the clock pulse count value latched in the register of, the servo motor rotation speed in these two cycles is calculated from the reciprocal of the encoder output pulse cycle immediately before and before sampling, and the encoder output pulse immediately before and before sampling is calculated. Lap Wherein the servo motor speed, these two periods in the first
Clock pulse count value latched in the register
And a processing means for calculating the rotation speed of the servo motor at the time of sampling from the clock pulse count value when the sampling signal latched in the second register is generated, and a speed detection device for the servo motor. ..
【請求項2】 サーボモータに取り付けられたパルスエ
ンコーダの出力パルスに基づいてサーボモータの回転速
度を検出する速度検出装置において、 パルスエンコーダの出力パルスを分周する分周器と、 前記分周器によって分周されたパルスエンコーダの各出
力分周パルスの周期におけるクロックパルス数を計数す
るクロックパルスカウンタと、 前記クロックパルスカウンタの計数値をパルスエンコー
ダの出力分周パルス発生毎にラッチする第1のレジスタ
と、 前記クロックパルスカウンタの計数値をサンプリング信
号に基づいてラッチする第2のレジスタと、 前記第1のレジスタにラッチされるクロックパルス計数
値に基づいて、サンプリング直前およびその前のエンコ
ーダ出力分周パルス周期の逆数からこれら2つの周期に
おけるサーボモータの回転速度を算出し、サンプリング
直前およびその前のエンコーダ出力分周パルス周期にお
けるサーボモータ回転速度,これら2つの周期における
前記第1のレジスタにラッチされていたクロックパルス
計数値,前記第2のレジスタにラッチされるサンプリン
グ信号発生時のクロックパルス計数値,および前記分周
器の分周比情報からサンプリング時点におけるサーボモ
ータの回転速度を算出する演算処理手段と、 を備えたことを特徴とするサーボモータの速度検出装
置。
2. A speed detecting device for detecting a rotation speed of a servo motor based on an output pulse of a pulse encoder attached to a servo motor, wherein the frequency divider divides the output pulse of the pulse encoder, and the frequency divider. A clock pulse counter that counts the number of clock pulses in each cycle of output divided pulses of the pulse encoder divided by; and a first value that latches the count value of the clock pulse counter every time the output divided pulse of the pulse encoder is generated. A register, a second register for latching the count value of the clock pulse counter based on a sampling signal, and an encoder output portion immediately before and before sampling based on the clock pulse count value latched by the first register. From the reciprocal of the circular pulse period, The rotation speed of the motor is calculated, the servo motor rotation speed in the encoder output divided pulse cycle immediately before and before sampling, the clock pulse count value latched in the first register in these two cycles, and the second Arithmetic processing means for calculating the rotation speed of the servo motor at the time of sampling from the clock pulse count value when the sampling signal latched in the register and the frequency division ratio information of the frequency divider are provided. Servo motor speed detector.
JP4004964A 1992-01-14 1992-01-14 Servo motor speed detecting device Withdrawn JPH05188068A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4004964A JPH05188068A (en) 1992-01-14 1992-01-14 Servo motor speed detecting device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4004964A JPH05188068A (en) 1992-01-14 1992-01-14 Servo motor speed detecting device

Publications (1)

Publication Number Publication Date
JPH05188068A true JPH05188068A (en) 1993-07-27

Family

ID=11598276

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4004964A Withdrawn JPH05188068A (en) 1992-01-14 1992-01-14 Servo motor speed detecting device

Country Status (1)

Country Link
JP (1) JPH05188068A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20000008601A (en) * 1998-07-14 2000-02-07 윤종용 Motor speed detector
CN114518782A (en) * 2022-01-02 2022-05-20 深圳市禾望电气股份有限公司 Micro control unit, motor rotating speed measuring method and system and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20000008601A (en) * 1998-07-14 2000-02-07 윤종용 Motor speed detector
CN114518782A (en) * 2022-01-02 2022-05-20 深圳市禾望电气股份有限公司 Micro control unit, motor rotating speed measuring method and system and storage medium

Similar Documents

Publication Publication Date Title
JPS5913957A (en) Speed detecting circuit
KR930002719B1 (en) Apparatus and method for increasing the accuracy of the encoder output
KR900002511B1 (en) Speed detecting device
JPH05188068A (en) Servo motor speed detecting device
JPH07229910A (en) Pulse counter circuit
JP2807710B2 (en) Digital servo controller
JPH05188067A (en) Servo motor speed detecting device
JPH061279B2 (en) Digital speed detector
JPH04233467A (en) Method and apparatus for measuring speed of motor
JP2002311040A (en) Speed detector
JPH0344506B2 (en)
JPS5923196B2 (en) Digital servo system
JPH05188066A (en) Servo motor speed detecting device
JPH05248893A (en) Backup type absolute position encoder
JP3364954B2 (en) Drive control device
JPS59155715A (en) Digital type multi-shaft position and speed detecting apparatus
JP2600975B2 (en) Speed control method for synchronous motor
JPH0340847B2 (en)
JP3227712B2 (en) Digital servo method for rotating body
KR970007588B1 (en) Circuit of standard frequency generation and speed detection spindle motor
JP3609891B2 (en) Microcomputer
JPH0627436Y2 (en) Pen head feeder for plotter
JPH08140383A (en) Controller for servo motor
JPH11174074A (en) Correction circuit for speed pulse
JPH05184184A (en) Motor driving circuit

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 19990408