JPH05223594A - Transfer information detector using encoder - Google Patents

Transfer information detector using encoder

Info

Publication number
JPH05223594A
JPH05223594A JP6197391A JP6197391A JPH05223594A JP H05223594 A JPH05223594 A JP H05223594A JP 6197391 A JP6197391 A JP 6197391A JP 6197391 A JP6197391 A JP 6197391A JP H05223594 A JPH05223594 A JP H05223594A
Authority
JP
Japan
Prior art keywords
pulse
circuit
output
sampling
pulse signals
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
JP6197391A
Other languages
Japanese (ja)
Inventor
Yukihiro Sugimoto
行弘 杉本
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.)
Olympus Corp
Original Assignee
Olympus Optical 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 Olympus Optical Co Ltd filed Critical Olympus Optical Co Ltd
Priority to JP6197391A priority Critical patent/JPH05223594A/en
Publication of JPH05223594A publication Critical patent/JPH05223594A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Transmission And Conversion Of Sensor Element Output (AREA)

Abstract

PURPOSE:To obtain the information detector which can exactly prevent misjudg ment due to chattering or bounds and detect the transfer direction and the transfer distance of a measurement object. CONSTITUTION:The following are provided: a means 3b for sampling encoder output; a wave-shaping means 4b for correcting sampling data during discontinuity of high level state by a predetermined sampling turn or more; and a pulse edge detecting means 5 for detecting a phase variation of a plurality of wave- shaped pulse signals different in phase. Further provided are a means for stopping count upon simultaneous variation of a plurality of pulse signals and a direction judging means for judging that the transfer direction of a measurement object is invariable upon simultaneous variation of a plurality of pulse signals and even variation of any pulse signal.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、エンコーダ出力信号に
基づいて測定対象物体の移動距離および移動方向を検出
する移動情報検出装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a moving information detecting device for detecting a moving distance and a moving direction of an object to be measured based on an encoder output signal.

【0002】[0002]

【従来の技術】従来より、測定対象物体の移動に応じて
エンコーダからA相、B相の2つのパルス信号を発生
し、この両パルス信号の位相差から移動方向を判別する
と共に、パルス信号のパルス数をカウントすることによ
って移動量を検出する装置がある。
2. Description of the Related Art Conventionally, two pulse signals of A phase and B phase are generated from an encoder according to the movement of an object to be measured, and the moving direction is discriminated from the phase difference between the both pulse signals. There is a device that detects the amount of movement by counting the number of pulses.

【0003】エンコーダには、機械式、光学式、磁気式
等があり、光学式および磁気式は機械式に比べて大型で
消費電力が大きくかつ高価格であることから、小形、安
価、低消費電力が求められる場合には機械式のものが用
いられる。
The encoder includes mechanical type, optical type, magnetic type and the like. The optical type and magnetic type are large in size, large in power consumption and high in price as compared with the mechanical type. When electric power is required, a mechanical type is used.

【0004】ところで、機械式エンコーダは機械的なス
イッチ機構によって速度に応じた周期のパルス信号を発
生させているため、出力信号に多くのノイズが含まれ
る。そのため、従来のエンコーダは、図9に示すよう
に、エンコーダ1から出力されたパルス信号を抵抗及び
コンデンサからなるローパスフィルタを通してノイズを
除去してから位相差の検出やパルス数のカウントを行っ
ていた。
By the way, since the mechanical encoder generates a pulse signal having a cycle corresponding to the speed by a mechanical switch mechanism, the output signal contains a lot of noise. Therefore, in the conventional encoder, as shown in FIG. 9, noise is removed from the pulse signal output from the encoder 1 through a low-pass filter including a resistor and a capacitor, and then the phase difference is detected and the number of pulses is counted. ..

【0005】図10は機械式エンコーダの原理図を示し
ている。同図に示すように、互いに位相の異なる矩形波
状の可動部にA相及びB相用の接触子がそれぞれ設けら
れている。測定対象物体の移動に連動して可動部を移動
させることによって、接触子と可動部とがオン−オフを
繰返してA相及びB相の各接触子からパルス信号が出力
される。両パルス信号のパルス数は、可動部での矩形波
の1周期に相当することからパルス数をカウントするこ
とによって移動距離が分かる。また、測定対象物体が同
一方向に移動しているときは、両パルス信号の位相関係
は変わらないので、位相変化があった時点で移動方向が
反転したことを判別することができる。このように機械
式エンコーダは、接触子と可動部との機械的な接点によ
ってパルス信号を発生するものであることから、切換わ
る際にチャタリングが生じたり、オン状態で接触子が瞬
間的に離れてオフ状態となってしまうバウンズが生じる
可能性が高い。
FIG. 10 shows the principle of a mechanical encoder. As shown in the figure, the rectangular wave-shaped movable parts having different phases are provided with contacts for A-phase and B-phase, respectively. By moving the movable part in conjunction with the movement of the object to be measured, the contactor and the movable part are repeatedly turned on and off, and a pulse signal is output from each of the A-phase and B-phase contactors. Since the number of pulses of both pulse signals corresponds to one period of the rectangular wave in the movable part, the moving distance can be known by counting the number of pulses. Further, when the object to be measured is moving in the same direction, the phase relationship between the two pulse signals does not change, so it is possible to determine that the moving direction has been reversed at the time when the phase change occurs. As described above, since the mechanical encoder generates a pulse signal by the mechanical contact between the contact and the movable part, chattering may occur at the time of switching or the contact may be momentarily separated in the ON state. There is a high possibility that there will be bounces that will be turned off.

【0006】上述した原因によって発生するチャタリン
グやバウンズが実際のパルス信号の周波数よりも非常に
小さい場合には図9に示すローパスフィルターによって
除去することができる。
When the chattering or the bounce caused by the above-mentioned cause is much smaller than the frequency of the actual pulse signal, it can be removed by the low pass filter shown in FIG.

【0007】[0007]

【発明が解決しようとする課題】一方、小形化、低価格
化を狙った場合には、機械式エンコーダは簡単な構造と
なるため、このような簡単な構造のエンコーダを速く動
かした時などはノイズの周波数とパルス信号の周波数と
が近くなる。このようなノイズを除去するためにはロー
パスフィルターの時定数を大きくしなければならない。
On the other hand, when aiming at downsizing and cost reduction, the mechanical encoder has a simple structure. Therefore, when an encoder having such a simple structure is moved at high speed, etc. The frequency of the noise and the frequency of the pulse signal are close to each other. In order to remove such noise, the time constant of the low pass filter must be increased.

【0008】ところが、時定数の大きなローパスフィル
ターを用いると、プルアップ抵抗の影響による立上が
り,立下がりの時定数の差によって、図11に示すよう
に両パルス信号の位相が一部で逆転してしまったり、ま
た図12に示すようにパルス信号自体が埋れてしまい、
その結果、正確な移動方向および移動量を検出すること
ができなくなる。
However, when a low-pass filter having a large time constant is used, the phase of both pulse signals is partially reversed as shown in FIG. 11 due to the difference between the rising and falling time constants due to the influence of the pull-up resistance. Or the pulse signal itself is buried as shown in FIG.
As a result, it becomes impossible to accurately detect the moving direction and the moving amount.

【0009】また、バウンズという現象は、一方の接触
子が接触して摺動している際に瞬間的に離れてしまうも
のであるが、図13に示すように特に他方の接触子の切
換え時にその振動から同時に大きく離れてしまう可能性
が高く、その時点での方向判定を行うことができなくな
ると共に、バウンズからの復帰時には位相関係が逆転し
てしまうため、実際の移動方向とは反対方向の誤判定を
行ってしまうという問題がある。
Also, the phenomenon of bounce is that when one of the contacts is in contact and sliding, it is momentarily separated, but as shown in FIG. 13, especially when the other contact is switched. There is a high possibility that it will be greatly separated from the vibration at the same time, and it will not be possible to determine the direction at that time, and the phase relationship will be reversed when returning from the bounce, so the direction opposite to the actual movement direction There is a problem of making an erroneous determination.

【0010】本発明は以上のような実情に鑑みてなされ
たもので、チャタリングやバウンズによる誤判定を確実
に防止でき、測定対象物体の移動方向および移動距離を
正確に検出することのできる移動情報検出装置を提供す
ることを目的とする。
The present invention has been made in view of the above circumstances, and it is possible to reliably prevent erroneous determinations due to chattering and bounces, and to accurately detect the moving direction and moving distance of an object to be measured. An object is to provide a detection device.

【0011】[0011]

【課題を解決するための手段】本発明は上記目的を達成
するために、測定対象物体の移動に応じてエンコーダか
ら出力されるパルス信号を取込み、該パルス信号のパル
ス数をカウントして前記測定対象物体の移動距離を検出
する移動情報検出装置において、前記パルス信号をその
周期よりも短い周期でサンプリングする手段と、前記サ
ンプリング手段によるサンプリングによって得られたサ
ンプリングデータが、所定サンプル回数以上にわたって
ハイレベル状態を持続していない場合には、該サンプリ
ングデータをローレベルに修正する波形成形手段とを具
備した構成とした。
In order to achieve the above object, the present invention takes in a pulse signal output from an encoder according to the movement of an object to be measured and counts the number of pulses of the pulse signal to perform the measurement. In a movement information detection device for detecting a movement distance of a target object, means for sampling the pulse signal at a cycle shorter than the cycle, and sampling data obtained by the sampling by the sampling means have a high level for a predetermined number of times or more. When the state is not maintained, a waveform shaping means for correcting the sampling data to a low level is provided.

【0012】また、本発明は上記目的を達成するため
に、測定対象物体の移動に応じてエンコーダから出力さ
れる互いに位相が異なる複数のパルス信号を取込み、こ
れらパルス信号のパルス数および位相変化に基づいて前
記測定対象物体の移動距離および移動方向を検出する移
動情報検出装置において、前記各パルス信号の変化をそ
れぞれ検出するパルスエッジ検出手段と、前記パルスエ
ッジ検出手段によって前記各パルス信号が同時に変化し
たことを検出した場合には、前記パルス信号のカウント
を停止させる手段とを具備した構成とし、
In order to achieve the above object, the present invention takes in a plurality of pulse signals having different phases output from the encoder according to the movement of the object to be measured, and calculates the pulse number and phase change of these pulse signals. In a movement information detection device for detecting the movement distance and movement direction of the measurement target object based on the pulse edge detection means for detecting a change in each of the pulse signals, and the pulse signal simultaneously changed by the pulse edge detection means When it is detected, a configuration including means for stopping the counting of the pulse signal,

【0013】さらに、前記パルスエッジ検出手段によっ
て前記複数のパルス信号が同時に変化したことを検出し
た場合には、次にいずれかのパルス信号が変化しても前
記測定対象物体の移動方向は不変であると判断する方向
判定手段を具備した構成とした。
Further, when the pulse edge detecting means detects that the plurality of pulse signals change at the same time, the moving direction of the object to be measured does not change even if any one of the pulse signals changes next time. It is configured to include a direction determining means for determining that there is.

【0014】[0014]

【作用】本発明によれば、エンコーダから出力されたパ
ルス信号が、サンプリング手段によってその周期よりも
短い周期でサンプリングされる。波形成形手段では、そ
のサンプリングデータが所定サンプル回数以上にわたっ
てハイレベル状態を持続しない場合には、その間にある
ハイレベルのサンプリングデータがローレベルに修正さ
れる。所定サンプル回数以上にわたってハイレベル状態
を持続しない場合にはチャタリングである可能性が高い
ため、そのサンプリングデータをローレベルに修正する
ことにより、チャタリングによるノイズが除去されたパ
ルス信号が得られる。
According to the present invention, the pulse signal output from the encoder is sampled by the sampling means at a cycle shorter than that cycle. When the sampling data does not remain in the high level state for a predetermined number of times or more, the waveform shaping means corrects the high level sampling data in the meantime to the low level. If the high level state is not maintained for a predetermined number of times or more, chattering is likely to occur. Therefore, by correcting the sampling data to low level, a pulse signal from which noise due to chattering is removed can be obtained.

【0015】また、本発明によれば、エンコーダから出
力される各パルス信号の変化が、パルスエッジ検出手段
によってそれぞれ検出され、この検出の結果、各パルス
信号が同時に変化したときには、パルス信号のカウント
が停止される。パルス信号が同時に変化したときには方
向判定が不能になるため、この様な場合にカウントを停
止することによって誤った方向へのカウントが防止され
る。
Further, according to the present invention, the change of each pulse signal output from the encoder is detected by the pulse edge detecting means respectively, and as a result of this detection, when the pulse signals simultaneously change, the pulse signal count is counted. Is stopped. When the pulse signals change at the same time, the direction cannot be determined. Therefore, in such a case, counting is stopped to prevent counting in the wrong direction.

【0016】さらに、本発明によれば、複数のパルス信
号が同時に変化したときには、次にいずれかのパルス信
号が変化しても測定対象物体の移動方向は不変であると
判断される。複数のパルス信号が同時または極めて短い
時間内に変化するのは、一方が切換わった時の振動によ
って他方がバウンズして変化したときなので、次にパル
ス信号が変化した時点はバウンズから復帰した時点とな
る。従って、バウンズから復帰した時点で信号が変化す
ることによって逆方向にカウントされてしまうといった
不都合が防止され、さらにカウントされなかった分が補
われる。
Further, according to the present invention, when a plurality of pulse signals change at the same time, it is determined that the moving direction of the object to be measured is unchanged even if any one of the pulse signals changes next time. Multiple pulse signals change at the same time or within a very short time when the other one bounces and changes due to the vibration when one is switched, so the next time the pulse signal changes is the time when the bounce returns. Becomes Therefore, it is possible to prevent the inconvenience that the signal is counted in the opposite direction due to the change of the signal at the time of returning from the bounce, and the uncounted portion is compensated.

【0017】[0017]

【実施例】以下、本発明の一実施例について説明する。
図1には一実施例に係る移動情報検出装置の機能ブロッ
ク図を示す。
EXAMPLE An example of the present invention will be described below.
FIG. 1 shows a functional block diagram of a movement information detection device according to an embodiment.

【0018】この装置は、エンコーダ1から出力される
互いに位相の異なるA相およびB相のパルス信号a,b
が、それぞれ対応するローパスフィルター2a,2bに
入力し、各ローパスフィルター2a,2bの出力が、パ
ルス信号a,bのパルス幅よりも十分に短い周期でサン
プリング回路3a,3bによってサンプリングされる。
サンプリング回路3a,3bでサンプリングして得られ
たサンプリング信号は、それぞれ対応する波形成形回路
4a,4bに入力される。
This device is provided with A-phase and B-phase pulse signals a and b output from the encoder 1 and having different phases.
Are input to the corresponding low-pass filters 2a and 2b, respectively, and the outputs of the low-pass filters 2a and 2b are sampled by the sampling circuits 3a and 3b at a cycle sufficiently shorter than the pulse width of the pulse signals a and b.
The sampling signals obtained by sampling by the sampling circuits 3a and 3b are input to the corresponding waveform shaping circuits 4a and 4b, respectively.

【0019】波形成形回路4a,4bは、入力信号を後
述する信号処理によってチャタリング等のノイズを除去
したパルス信号に波形成形する。この波形成形回路4
a,4bの出力信号は、エッジパルス出力回路5,方向
判定回路6,同時変化検出回路7にそれぞれ入力され
る。
The waveform shaping circuits 4a and 4b shape the input signal into a pulse signal from which noise such as chattering is removed by signal processing described later. This waveform shaping circuit 4
The output signals of a and 4b are input to the edge pulse output circuit 5, the direction determination circuit 6, and the simultaneous change detection circuit 7, respectively.

【0020】エッジパルス出力回路5は、入力信号の立
上がりおよび立下がりを検出して、その検出結果をカウ
ントパルス信号としてパルス遮断回路8を介してカウン
ト回路9へ出力する。方向判定回路6は、両入力信号の
位相情報から測定対象物体の移動方向または回転方向を
判定して、その方向判定信号を判定反転回路10を介し
てカウント回路9へ出力する。
The edge pulse output circuit 5 detects the rising edge and the falling edge of the input signal, and outputs the detection result as a count pulse signal to the count circuit 9 via the pulse cutoff circuit 8. The direction determination circuit 6 determines the moving direction or rotation direction of the object to be measured from the phase information of both input signals, and outputs the direction determination signal to the counting circuit 9 via the determination inversion circuit 10.

【0021】同時変化検出回路7は、両入力信号が同時
に或いは極めて短時間の内に変化したときには、同時変
化検出信号をパルス遮断回路8および同時変化検出保持
回路11へ出力する。パルス遮断回路8は、その同時変
化検出回路7からの同時変化検出信号を受けてカウント
パルスがカウント回路9へ入力するのを遮断する。
The simultaneous change detection circuit 7 outputs a simultaneous change detection signal to the pulse interruption circuit 8 and the simultaneous change detection holding circuit 11 when both input signals change simultaneously or within an extremely short time. The pulse cutoff circuit 8 receives the simultaneous change detection signal from the simultaneous change detection circuit 7 and cuts off the input of the count pulse to the count circuit 9.

【0022】判定反転回路10は、同時変化検出保持回
路11が同時変化検出回路7からの同時変化検出信号を
保持することによって、次のエッジで方向反転した方向
判定回路6からの方向判定信号をさらに反転させた方向
判定信号をカウント回路ヘ出力する。
The decision inversion circuit 10 holds the simultaneous change detection signal from the simultaneous change detection circuit 7 by the simultaneous change detection and holding circuit 11 so that the direction decision signal from the direction decision circuit 6 is inverted at the next edge. Further, the inverted direction determination signal is output to the counting circuit.

【0023】カウント回路9は、エッジパルス出力回路
5からパルス遮断回路8を介して入力するカウントパル
ス信号のパルス数をカウントし、方向判定回路6から判
定反転回路10を介して入力する方向判定信号に応じて
カウント値をアップダウンさせたカウント値を出力す
る。本実施例の具体的な回路構成を図2〜図4に示す。
The count circuit 9 counts the number of pulses of the count pulse signal input from the edge pulse output circuit 5 via the pulse cutoff circuit 8, and the direction determination signal input from the direction determination circuit 6 via the determination inversion circuit 10. The count value is output by increasing or decreasing the count value. Specific circuit configurations of this embodiment are shown in FIGS.

【0024】ローパスフィルター2aは、抵抗r1,r
2およびコンデンサC1からなり、エンコーダ出力信号
a,bの位相関係に影響を与えない程度の時定数に設定
されている。
The low pass filter 2a includes resistors r1 and r
2 and a capacitor C1 and is set to a time constant that does not affect the phase relationship between the encoder output signals a and b.

【0025】このローパスフィルター2aの出力はサン
プリング回路3aとなるフリップフロップ21のD端子
に入力される。サンプリング回路3aは、システムクロ
ックCLK1をフリップフロップ20で2分周したクロ
ックCLK2で動作する。すなわち、エンコーダ出力信
号はシステムクロックCLK1の1/2のサンプリング
クロックでサンプリングされる。
The output of the low-pass filter 2a is input to the D terminal of the flip-flop 21 which serves as the sampling circuit 3a. The sampling circuit 3a operates with a clock CLK2 obtained by dividing the system clock CLK1 by 2 in the flip-flop 20. That is, the encoder output signal is sampled at a sampling clock half the system clock CLK1.

【0026】波形成形回路4aは、その入力段に設けら
れたフリップフロップ22のD端子にサンプリング回路
3a出力が入力される。このフリップフロップ22のQ
出力はAND回路23、24にそれぞれ入力される。な
お、一方のAND回路23の入力端子には、さらにサン
プリング回路3a出力が入力される。この2つのAND
回路23、24出力はOR回路25の両入力端子に入力
され、このOR回路出力が出力段に設けられたフリップ
フロップ26のD端子に入力される。フリップフロップ
26のQ出力はエッジパルス出力回路5に入力されると
共に、他方のAND回路24の入力端子に入力される。
なお、波形成形回路4aの各フリップフロップ22,2
6も、サンプリング回路3aと同じクロックCLK2で
動作する。
In the waveform shaping circuit 4a, the output of the sampling circuit 3a is input to the D terminal of the flip-flop 22 provided in its input stage. Q of this flip-flop 22
The outputs are input to the AND circuits 23 and 24, respectively. The output of the sampling circuit 3a is further input to the input terminal of one of the AND circuits 23. AND of these two
The outputs of the circuits 23 and 24 are input to both input terminals of the OR circuit 25, and the output of the OR circuit is input to the D terminal of the flip-flop 26 provided in the output stage. The Q output of the flip-flop 26 is input to the edge pulse output circuit 5 and the input terminal of the other AND circuit 24.
The flip-flops 22, 2 of the waveform shaping circuit 4a are
6 also operates on the same clock CLK2 as the sampling circuit 3a.

【0027】また、エンコーダ1の位相B側に対応する
ローパスフィルター2b,サンプリング回路3b,波形
成形回路4bも、上述した位相A側の構成と同じ構成と
なっている。
The low-pass filter 2b, the sampling circuit 3b, and the waveform shaping circuit 4b corresponding to the phase B side of the encoder 1 also have the same configuration as the above-described phase A side.

【0028】エッジパルス出力回路5は、各相毎にフリ
ップフロップ27,28および排他的論理和回路29,
30がそれぞれ設けられている。フリップフロップ2
7,28および排他的論理和回路29,30には、波形
成形回路4a,4bの出力S1,S2が入力される。排
他的論理和回路29,30の他方の入力端子には、それ
ぞれ対応するフリップフロップ27,28のQ出力が入
力されている。
The edge pulse output circuit 5 includes flip-flops 27 and 28 and an exclusive OR circuit 29 for each phase.
30 are provided respectively. Flip flop 2
The outputs S1 and S2 of the waveform shaping circuits 4a and 4b are input to the 7 and 28 and the exclusive OR circuits 29 and 30, respectively. The Q outputs of the corresponding flip-flops 27 and 28 are input to the other input terminals of the exclusive OR circuits 29 and 30, respectively.

【0029】方向判定回路6は、6つのフリップフロッ
プ31〜36と、OR回路37と、インバータ38とか
らなる。フリップフロップ31,32の各D端子には、
エッジパルス出力回路5のフリップフロップ27,28
の各Q出力S5,S6が入力する。フリップフロップ3
3〜36は方向判定用に使われ、そのD端子およびクロ
ック端子には、フリップフロップ31,32のQ出力
(非反転)および反転出力が、図示の如く組合わされて
入力されている。
The direction determination circuit 6 is composed of six flip-flops 31 to 36, an OR circuit 37, and an inverter 38. The D terminals of the flip-flops 31 and 32 are
Flip-flops 27, 28 of the edge pulse output circuit 5
The respective Q outputs S5 and S6 are input. Flip flop 3
Reference numerals 3 to 36 are used for the direction determination, and the Q output (non-inverted) and the inverted output of the flip-flops 31 and 32 are combined and input to the D terminal and the clock terminal thereof as shown in the figure.

【0030】一方、OR回路37には、エッジパルス出
力回路5の各排他的論理和回路29,30の出力S3,
S4が入力される。このOR回路37の出力S7はイン
バータ38を介して上記フリップフロップ33〜36の
各クリア端子に入力される。これらフリップフロップ3
3〜36のQ出力は、OR回路39に入力され、このO
R回路出力S9は判定反転回路10へ出力される。
On the other hand, the OR circuit 37 has outputs S3 of the exclusive OR circuits 29 and 30 of the edge pulse output circuit 5, respectively.
S4 is input. The output S7 of the OR circuit 37 is input to each clear terminal of the flip-flops 33 to 36 via the inverter 38. These flip-flops 3
The Q outputs of 3-36 are input to the OR circuit 39, and
The R circuit output S9 is output to the decision inversion circuit 10.

【0031】同時変化検出回路7は、方向反転回路6と
共用するOR回路37と、パルス遮断回路8と共用する
排他的論理和回路41と、OR回路37および排他的論
理和回路41の出力が入力される排他的論理和回路42
と、この排他的論理和回路42の出力が入力されるフリ
ップフロップ43とから構成されている。なお、排他的
論理和回路41は、OR回路37と同様に信号S3,S
4が入力される。
The simultaneous change detection circuit 7 outputs the OR circuit 37 shared with the direction inversion circuit 6, the exclusive OR circuit 41 shared with the pulse interruption circuit 8, and the outputs of the OR circuit 37 and the exclusive OR circuit 41. Exclusive OR circuit 42 to be input
And a flip-flop 43 to which the output of the exclusive OR circuit 42 is input. The exclusive OR circuit 41, like the OR circuit 37, outputs the signals S3 and S.
4 is input.

【0032】パルス遮断回路8は、エッジパルス出力回
路5からの信号S3,S4が入力する排他的論理和回路
41と、この排他的論理和回路41の出力S10がD端
子に入力し、反転出力をカウントパルスS13として出
力するフリップフロップ44とからなる。フリップフロ
ップ44の反転出力S13がカウントパルスとしてカウ
ント回路9へ出力される。
In the pulse cutoff circuit 8, the exclusive OR circuit 41 to which the signals S3 and S4 from the edge pulse output circuit 5 are input, and the output S10 of this exclusive OR circuit 41 is input to the D terminal and the inverted output is obtained. Of the flip-flop 44 for outputting as a count pulse S13. The inverted output S13 of the flip-flop 44 is output to the count circuit 9 as a count pulse.

【0033】同時変化検出保持回路11は、フリップフ
ロップ45からなる。このフリップフロップ45は、D
端子に定電圧が印加され、クロック端子にパルス遮断回
路8のフリップフロップ44の反転出力S13が入力さ
れ、さらにクリア端子にフリップフロップ43の反転出
力S12が入力される。
The simultaneous change detection / holding circuit 11 comprises a flip-flop 45. This flip-flop 45 is D
A constant voltage is applied to the terminal, the inverted output S13 of the flip-flop 44 of the pulse cutoff circuit 8 is input to the clock terminal, and the inverted output S12 of the flip-flop 43 is input to the clear terminal.

【0034】判定反転回路10は、排他的論理和回路4
6からなり、フリップフロップ45の反転出力S14お
よび方向判定回路6のOR回路39の出力S9を入力信
号とする。この排他的論理和回路46の出力S15は方
向判定信号としてカウント回路9へ出力される。以上の
ように構成された本実施例では以下のような動作を示
す。
The decision inverting circuit 10 includes an exclusive OR circuit 4
6 and uses the inverted output S14 of the flip-flop 45 and the output S9 of the OR circuit 39 of the direction determination circuit 6 as input signals. The output S15 of the exclusive OR circuit 46 is output to the counting circuit 9 as a direction determination signal. The present embodiment configured as described above exhibits the following operation.

【0035】先ず、波形成形回路4a,4bにおけるチ
ャタリング等のノイズ除去動作について図5を参照して
説明する。なお、各波形成形回路4a,4bにおけるノ
イズ除去動作は共に同じ動作となるので、ここではA相
側の波形成形回路4aについて説明する。
First, a noise removing operation such as chattering in the waveform shaping circuits 4a and 4b will be described with reference to FIG. Since the noise removal operation in each of the waveform shaping circuits 4a and 4b is the same operation, the waveform shaping circuit 4a on the A phase side will be described here.

【0036】エンコーダ1から出力され、サンプリング
回路3aでシステムクロックCLK1の1/2のサンプ
リングクロックでサンプリングされたデータCは、フリ
ップフロップ22,26によって2クロック間保持さ
れ、サンプリングデータcとこれよりも1クロック前の
サンプリングデータdが一方のAND回路23で比較さ
れ、サンプリングデータdとそれよりも1クロック前の
サンプリングデータeとが他方のAND回路24で比較
される。そして、サンプリングデータdがハイレベルで
その前後のデータc,eがローレベルの時は、AND回
路23,24が共に不成立となってフリップフロップ2
6に、サンプリングデータdをローレベルに修正したデ
ータが入力され、この修正されたデータS1が次のクロ
ックでエッジパルス出力回路5へ出力される。
The data C output from the encoder 1 and sampled by the sampling circuit 3a at a sampling clock half the system clock CLK1 is held for two clocks by the flip-flops 22 and 26, and the sampling data c and the sampling data c are stored. The sampling data d one clock before is compared by one AND circuit 23, and the sampling data d and the sampling data e one clock before that are compared by the other AND circuit 24. When the sampling data d is at the high level and the data c and e before and after it are at the low level, the AND circuits 23 and 24 are both not established and the flip-flop 2
Data obtained by modifying the sampling data d to a low level is input to 6, and the modified data S1 is output to the edge pulse output circuit 5 at the next clock.

【0037】従って、波形成形回路4aでは、2サンプ
ル以上ハイレベル状態が続かない場合にはチャタリング
と見なして、そのデータに関する出力信号eはローレベ
ルに修正される。このような処理によってチャタリング
ノイズが除去される。波形成形回路4よりも後段の動作
について図6および図7に示すタイムチャートを参照し
て説明する。
Therefore, in the waveform shaping circuit 4a, when the high level state does not continue for 2 samples or more, it is regarded as chattering, and the output signal e related to the data is corrected to the low level. Chattering noise is removed by such processing. The operation subsequent to the waveform shaping circuit 4 will be described with reference to the time charts shown in FIGS. 6 and 7.

【0038】パルスエッジ出力回路5では、波形成形さ
れたデータS1,S2が、フリップフロップ27,28
にそれぞれ入力され、このフリップフロップ27,28
がシステムクロックCLK1の立下がりで動作して、そ
れぞれ半クロック分だけ遅延した信号S5,S6を出力
する。
In the pulse edge output circuit 5, the waveform-shaped data S1 and S2 are flip-flops 27 and 28.
Are input to the flip-flops 27 and 28, respectively.
Operates at the falling edge of the system clock CLK1 and outputs signals S5 and S6 delayed by half a clock, respectively.

【0039】一方、排他的論理和回路29,30では、
波形成形された信号S1,S2と、それらよりも半クロ
ック分だけ遅延した信号S5,S6がそれぞれ入力され
る。そして、信号S1,S2が変化する時点で、半クロ
ック分のパルス信号S3,S4を出力する。このように
して、波形成形された信号S1,S2が変化する時点で
半クロック分のパルス信号S3,S4が出力される。
On the other hand, in the exclusive OR circuits 29 and 30,
The waveform-shaped signals S1 and S2 and the signals S5 and S6 delayed by half a clock from them are input, respectively. Then, when the signals S1 and S2 change, pulse signals S3 and S4 for half a clock are output. In this way, pulse signals S3 and S4 for half a clock are output when the waveform-shaped signals S1 and S2 change.

【0040】方向判定回路6では、先ずOR回路37に
よってパルス信号S3,S4が合成され、その合成信号
S7によって方向判定用のフリップフロップ33〜36
がリセットされる。その後、フリップフロップ31,3
2で遅延されたA相,B相のエッジ部分を示すパルス信
号S3,S4が、フリップフロップ33〜36に入力し
て、その方向判定結果が方向判定信号S9として出力さ
れる。
In the direction determining circuit 6, first, the OR circuit 37 synthesizes the pulse signals S3 and S4, and the synthesized signal S7 synthesizes the direction determining flip-flops 33 to 36.
Is reset. After that, flip-flops 31, 3
The pulse signals S3 and S4 indicating the edge portions of the A phase and B phase delayed by 2 are input to the flip-flops 33 to 36, and the direction determination result is output as the direction determination signal S9.

【0041】一方、A相,B相の各信号S1,S2のエ
ッジ部分を示すパルス信号S3,S4は、パルス遮断回
路8の排他的論理和回路41に入力されている。排他的
論理和回路41は、パルス信号S3,S4が同時に変化
したときには、出力S10がローレベルとなる。そし
て、排他的論理和回路41およびOR回路37の両出力
信号S10,S7が排他的論理和回路42に入力され
て、OR回路37からパルスS7が出力され、排他的論
理和回路41からパルスS10が出力されないとき、即
ちA相,B相の各信号S1,S2が同時に変化したとき
にのみ、同時変化検出信号S11が出力される。
On the other hand, the pulse signals S3 and S4 indicating the edge portions of the A-phase and B-phase signals S1 and S2 are input to the exclusive OR circuit 41 of the pulse cutoff circuit 8. In the exclusive OR circuit 41, the output S10 becomes low level when the pulse signals S3 and S4 change at the same time. Then, both output signals S10 and S7 of the exclusive OR circuit 41 and the OR circuit 37 are inputted to the exclusive OR circuit 42, the pulse S7 is outputted from the OR circuit 37, and the pulse S10 is outputted from the exclusive OR circuit 41. Is not output, that is, the simultaneous change detection signal S11 is output only when the A-phase and B-phase signals S1 and S2 simultaneously change.

【0042】フリップフロップ43は、排他的論理和回
路42からのグリッチノイズを除去するために挿入した
ものであり、ネガティブな同時変化検出信号S12を出
力する。
The flip-flop 43 is inserted to remove the glitch noise from the exclusive OR circuit 42, and outputs the negative simultaneous change detection signal S12.

【0043】この同時変化検出信号S12は、同時変化
検出保持回路11のフリップフロップ45のクリア端子
に入力され、パルス遮断回路8のパルス信号S10がフ
リップフロップ44を介して、その反転出力S13がカ
ウント回路9へ出力されるまで保持される。そして、同
時変化検出保持回路11が同時変化検出パルスS12を
保持している間は、フリップフロップ45の反転出力S
14はハイレベルと成っているため、判定反転回路10
の排他的論理和回路46によって、方向判定回路6の判
定出力S9は反転されて信号S15がカウント回路9へ
入力する。
The simultaneous change detection signal S12 is input to the clear terminal of the flip-flop 45 of the simultaneous change detection holding circuit 11, and the pulse signal S10 of the pulse cutoff circuit 8 is counted through the flip-flop 44 and its inverted output S13 is counted. It is held until output to the circuit 9. Then, while the simultaneous change detection holding circuit 11 holds the simultaneous change detection pulse S12, the inverted output S of the flip-flop 45 is obtained.
Since 14 is at a high level, the decision inversion circuit 10
By the exclusive OR circuit 46, the decision output S9 of the direction decision circuit 6 is inverted and the signal S15 is input to the count circuit 9.

【0044】この様なカウントパルスS13および方向
判定信号S15が入力するカウント回路9では、図8に
示すように、エンコーダ信号が同時に変化した場合に
は、カウントパルスS13の入力が遮断されるためにカ
ウントは行われず、バウンズが復帰した時点で同方向に
カウントを開始する。
In the count circuit 9 to which the count pulse S13 and the direction determination signal S15 are input, as shown in FIG. 8, when the encoder signals change at the same time, the input of the count pulse S13 is cut off. No counting is performed, and when the bounce is restored, counting is started in the same direction.

【0045】この様に本実施例によれば、波形成形回路
4a,4bでサンプリングデータが一定のサンプル回数
以上にわたってハイレベル状態を維持しない場合に、そ
のサンプリングデータはチャタリングノイズであるとし
て、そのサンプリングデータをローレベルに修正するよ
うにしたので、時定数の大きいローパスフィルターを使
わなくてもチャタリングをデジタル的に除去することが
でき、位相が逆転して移動方向の判定結果を誤ったり、
信号が埋もれて移動距離や移動方向の検出が不可能にな
るといった不都合を確実に防止できる。
As described above, according to the present embodiment, when the waveform shaping circuits 4a and 4b do not maintain the high level state for a certain number of times or more, it is determined that the sampling data is chattering noise. Since the data is corrected to low level, chattering can be digitally removed without using a low-pass filter with a large time constant, the phase is reversed and the judgment result of the moving direction is incorrect,
It is possible to reliably prevent the inconvenience that the signal is buried and the moving distance and the moving direction cannot be detected.

【0046】また、A相、B相のエンコーダ信号a,b
が同時に変化した場合には、パルス遮断回路8によって
カウントパルスS13の出力を停止し、かつエンコーダ
信号a,bが同時に変化した後の最初のパルス変化で
は、そのパルス変化で移動方向が反転したものと判断し
ないように方向判定結果を反転させるようにしたので、
方向判定不能時に誤った方向へのカウントを防止でき、
バウンズからの復帰時に誤った方向にカウントしてしま
うのを防止でき、方向判定不能のためにカウントできな
かった分を補うことができる。
Further, encoder signals a and b for A phase and B phase
, The output of the count pulse S13 is stopped by the pulse interruption circuit 8 and the moving direction is reversed by the pulse change in the first pulse change after the encoder signals a and b have changed simultaneously. I decided to reverse the direction judgment result so that it would not be judged,
It is possible to prevent counting in the wrong direction when the direction cannot be determined.
It is possible to prevent counting in the wrong direction when returning from the bounce, and it is possible to compensate for the amount that could not be counted because the direction cannot be determined.

【0047】[0047]

【発明の効果】以上詳記したように本発明によれば、チ
ャタリングやバウンズによる誤判定を確実に防止でき、
測定対象物体の移動方向および移動距離を正確に検出す
ることのできる移動情報検出装置を提供できる。
As described above in detail, according to the present invention, it is possible to reliably prevent erroneous determinations due to chattering and bounces.
It is possible to provide a movement information detection device that can accurately detect the movement direction and movement distance of a measurement target object.

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

【図1】本発明の一実施例に係る移動情報検出装置の機
能ブロック図。
FIG. 1 is a functional block diagram of a movement information detection device according to an embodiment of the present invention.

【図2】一実施例に係る移動情報検出装置の前段の回路
構成図。
FIG. 2 is a circuit configuration diagram of a front stage of the movement information detection device according to the embodiment.

【図3】一実施例に係る移動情報検出装置の中段の回路
構成図。
FIG. 3 is a circuit configuration diagram of the middle stage of the movement information detection device according to the embodiment.

【図4】一実施例に係る移動情報検出装置の後段の回路
構成図。
FIG. 4 is a circuit configuration diagram of a rear stage of the movement information detection device according to the embodiment.

【図5】チャタリングノイズ除去動作を示す波形成形回
路部分のタイムチャートを示す図。
FIG. 5 is a diagram showing a time chart of a waveform shaping circuit part showing a chattering noise removal operation.

【図6】一実施例に係る移動情報検出装置の方向反転処
理に係わる部分のタイムチャートの一部を示す図。
FIG. 6 is a diagram showing a part of a time chart of a portion related to a direction reversal process of the movement information detection device according to the embodiment.

【図7】一実施例に係る移動情報検出装置の最終段での
方向反転処理に係わるタイムチャートを示す図。
FIG. 7 is a diagram showing a time chart relating to direction reversal processing at the final stage of the movement information detection apparatus according to the embodiment.

【図8】一実施例に係る移動情報検出装置の方向反転処
理に伴うカウント結果を説明するための図。
FIG. 8 is a diagram for explaining a counting result associated with the direction reversal processing of the movement information detection device according to the embodiment.

【図9】従来の機械式エンコーダとその信号処理回路と
を示す図。
FIG. 9 is a diagram showing a conventional mechanical encoder and its signal processing circuit.

【図10】機械式エンコーダの動作原理を説明するため
の図。
FIG. 10 is a diagram for explaining the operation principle of a mechanical encoder.

【図11】時定数の低いローパスフィルターを用いチャ
タリングノイズの影響を受けた波形図。
FIG. 11 is a waveform diagram affected by chattering noise using a low-pass filter having a low time constant.

【図12】時定数の高いローパスフィルターを用いた場
合のエンコーダの出力信号の波形図。
FIG. 12 is a waveform diagram of an output signal of an encoder when a low pass filter having a high time constant is used.

【図13】切換え時のバウンズによる位相変化を示す
図。
FIG. 13 is a diagram showing a phase change due to bounces at the time of switching.

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

1…エンコーダ、2…ローパスフィルタ、3…サンプリ
ング回路、4…波形成形回路、5…エッジパルス出力回
路、6…方向判定回路、7…同時変化検出回路、8…パ
ルス遮断回路、9…カウント回路、10…判定反転回
路、11…同時変化検出保持回路。
1 ... Encoder, 2 ... Low-pass filter, 3 ... Sampling circuit, 4 ... Waveform shaping circuit, 5 ... Edge pulse output circuit, 6 ... Direction determination circuit, 7 ... Simultaneous change detection circuit, 8 ... Pulse interruption circuit, 9 ... Count circuit 10 ... Judgment inversion circuit, 11 ... Simultaneous change detection holding circuit.

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 測定対象物体の移動に応じてエンコーダ
から出力されるパルス信号を取込み、該パルス信号のパ
ルス数をカウントして前記測定対象物体の移動距離を検
出する移動情報検出装置において、 前記パルス信号をその周期よりも短い周期でサンプリン
グする手段と、 前記サンプリング手段によるサンプリングによって得ら
れたサンプリングデータが、所定サンプル回数以上にわ
たってハイレベル状態を持続していない場合には、該サ
ンプリングデータをローレベルに修正する波形成形手段
と、を具備したことを特徴とする移動情報検出装置。
1. A movement information detection device for taking in a pulse signal output from an encoder according to the movement of an object to be measured, counting the number of pulses of the pulse signal, and detecting a moving distance of the object to be measured, When the pulse data is sampled at a cycle shorter than the cycle, and the sampling data obtained by the sampling by the sampling means does not maintain a high level state for a predetermined number of times or more, the sampling data is set to a low level. A movement information detection device, comprising: a waveform shaping unit that corrects the level.
【請求項2】 測定対象物体の移動に応じてエンコーダ
から出力される互いに位相が異なる複数のパルス信号を
取込み、これらパルス信号のパルス数および位相変化に
基づいて前記測定対象物体の移動距離および移動方向を
検出する移動情報検出装置において、 前記各パルス信号の変化をそれぞれ検出するパルスエッ
ジ検出手段と、 前記パルスエッジ検出手段によって前記各パルス信号が
同時に変化したことが検出されたとき前記パルス信号の
カウントを停止させる手段と、を具備したことを特徴と
する移動情報検出装置。
2. A plurality of pulse signals output from an encoder and having different phases according to the movement of the measurement target object are taken in, and the movement distance and movement of the measurement target object are based on the number of pulses and phase change of these pulse signals. In a movement information detection device for detecting a direction, a pulse edge detection unit that detects a change in each of the pulse signals, and the pulse signal when the pulse edge detection unit detects that each pulse signal changes at the same time A movement information detecting device comprising: means for stopping counting.
【請求項3】 前記パルスエッジ検出手段によって前記
複数のパルス信号が同時に変化したことが検出されたと
き、次にいずれかのパルス信号が変化しても前記測定対
象物体の移動方向は不変であると判断する方向判定手段
を具備したことを特徴とする請求項2記載の移動情報検
出装置。
3. When the pulse edge detection means detects that the plurality of pulse signals have changed at the same time, the moving direction of the object to be measured is unchanged even if any of the pulse signals changes next time. 3. The movement information detecting device according to claim 2, further comprising direction determining means for determining that
JP6197391A 1991-03-26 1991-03-26 Transfer information detector using encoder Withdrawn JPH05223594A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6197391A JPH05223594A (en) 1991-03-26 1991-03-26 Transfer information detector using encoder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6197391A JPH05223594A (en) 1991-03-26 1991-03-26 Transfer information detector using encoder

Publications (1)

Publication Number Publication Date
JPH05223594A true JPH05223594A (en) 1993-08-31

Family

ID=13186630

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6197391A Withdrawn JPH05223594A (en) 1991-03-26 1991-03-26 Transfer information detector using encoder

Country Status (1)

Country Link
JP (1) JPH05223594A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005345337A (en) * 2004-06-04 2005-12-15 Auto Network Gijutsu Kenkyusho:Kk Encoder signal processing system
JP2013137255A (en) * 2011-12-28 2013-07-11 Nidec Sankyo Corp Encoder and method of controlling the same
CN107957274A (en) * 2017-12-08 2018-04-24 长春理工大学 Multi-encoder fault diagnosis telemetry system and its monitoring method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005345337A (en) * 2004-06-04 2005-12-15 Auto Network Gijutsu Kenkyusho:Kk Encoder signal processing system
JP2013137255A (en) * 2011-12-28 2013-07-11 Nidec Sankyo Corp Encoder and method of controlling the same
CN107957274A (en) * 2017-12-08 2018-04-24 长春理工大学 Multi-encoder fault diagnosis telemetry system and its monitoring method

Similar Documents

Publication Publication Date Title
US4433919A (en) Differential time interpolator
US4868512A (en) Phase detector
JPH05223594A (en) Transfer information detector using encoder
JPH09505143A (en) Phase measuring device
JPH04346069A (en) Speed signal generating circuit
KR19980054686A (en) Speed detection method and apparatus in motor
JPH06189573A (en) Speed detector for encoder type motor
EP0065998A1 (en) Pulse detection circuit
JP3315780B2 (en) Noise removal device and period measurement device
JP2606229B2 (en) Noise removal circuit
JPH04285815A (en) Position counter circuit of rotary encoder
KR910001846B1 (en) Checking machine of velocity of motor
GB2379027A (en) Pulse mid-point detector
JP2968418B2 (en) Speed detector
JP4122128B2 (en) Edge detection circuit
JP3302864B2 (en) Motor rotation speed detection circuit
US4939756A (en) Two-phase encoder circuit
JPS5831525B2 (en) A-D
JP4385268B2 (en) Encoder signal processing circuit, hysteresis compensation method thereof, and recording medium for computer recording the method
KR970004261A (en) Position discrimination circuit by incremental encoder for motor control
JPS63133066A (en) Detection of speed
JP2818192B2 (en) Noise removal device
JP2917278B2 (en) Phase difference detection circuit
KR0133375Y1 (en) Signal processing apparatus for high speed counting two input signals
JP3195801B2 (en) Digital counter device

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: 19980514