JPH0731630Y2 - External event count circuit - Google Patents

External event count circuit

Info

Publication number
JPH0731630Y2
JPH0731630Y2 JP18784687U JP18784687U JPH0731630Y2 JP H0731630 Y2 JPH0731630 Y2 JP H0731630Y2 JP 18784687 U JP18784687 U JP 18784687U JP 18784687 U JP18784687 U JP 18784687U JP H0731630 Y2 JPH0731630 Y2 JP H0731630Y2
Authority
JP
Japan
Prior art keywords
pulse
preset
external event
output
circuit
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.)
Expired - Lifetime
Application number
JP18784687U
Other languages
Japanese (ja)
Other versions
JPH0191340U (en
Inventor
秀樹 林
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.)
Fuji Electric Co Ltd
Original Assignee
Fuji Electric 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 Fuji Electric Co Ltd filed Critical Fuji Electric Co Ltd
Priority to JP18784687U priority Critical patent/JPH0731630Y2/en
Publication of JPH0191340U publication Critical patent/JPH0191340U/ja
Application granted granted Critical
Publication of JPH0731630Y2 publication Critical patent/JPH0731630Y2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Transmission And Conversion Of Sensor Element Output (AREA)

Description

【考案の詳細な説明】 〔産業上の利用分野〕 この考案は、被検出回転体における例えば回転数,回動
角度などを検出する外部イベントカウント回路に係り、
特に正確にプリセットおよびカウントを可能にした回路
構成に関する。
DETAILED DESCRIPTION OF THE INVENTION [Industrial Application Field] The present invention relates to an external event counting circuit for detecting, for example, the number of rotations, a rotation angle, etc. of a detected rotating body
Particularly, the present invention relates to a circuit configuration that enables accurate presetting and counting.

〔従来の技術〕[Conventional technology]

第3図はこの種の外部イベントカウント回路の構成を示
す図で、1は不図示の被検出回転体に直結されるエンコ
ーダ、2は波形整形回路、3は、プログラマブル・カウ
ンタ、4はマイクロコンピュータ、7は反転バッファ、
8はデータバス、9はR・W(読み書き)信号線であ
る。
FIG. 3 is a diagram showing the configuration of an external event counting circuit of this type. 1 is an encoder directly connected to a rotating body to be detected (not shown), 2 is a waveform shaping circuit, 3 is a programmable counter, and 4 is a microcomputer. , 7 is an inversion buffer,
Reference numeral 8 is a data bus, and 9 is an RW (read / write) signal line.

第3図において、被検出回転体に直結されたエンコーダ
1は回転体の正転・逆転方向に応じたパルス5,5′を出
力する。ここで、エンコーダ1からは2個の出力パルス
5,5′が出力されるが、例えば第4図に示されるように
MパルスよりもNパルスが遅れて出力されるものを正転
パルスとし、第5図に示されるようにM′パルスより
N′パルスが先行して出力されるものを逆転パルスとし
て判断するのである。エンコーダ1より出力されるパル
スは伝送距離が長い場合は波形が歪むので波形整形回路
2において歪んでいる波形が修正された後正転または逆
転の外部イベントパルス6が出力され、この出力信号は
反転バッファ7を経てプログラマブル・カウンタ3のク
ロック端子にカウント入力として印加される。
In FIG. 3, the encoder 1 directly connected to the rotating body to be detected outputs pulses 5, 5'corresponding to the forward and reverse rotation directions of the rotating body. Here, two output pulses from the encoder 1
5, 5'is output. For example, as shown in FIG. 4, a pulse output N pulses later than the M pulse is defined as a forward rotation pulse, and as shown in FIG. The N'pulse that is output first is judged as the reverse pulse. The pulse output from the encoder 1 has a distorted waveform when the transmission distance is long. Therefore, the distorted waveform is corrected by the waveform shaping circuit 2 and then the external event pulse 6 of normal rotation or reverse rotation is output, and this output signal is inverted. It is applied as a count input to the clock terminal of the programmable counter 3 via the buffer 7.

プログラマブル・カウンタ3はマイクロコンピュータ4
とデータバス8とR・W信号線9と接続されており、プ
ログラマブル・カウンタ3へのプリセットデータのプリ
セットは、マイクロコンピュータ4からデータバス8上
にプリセットデータが出力され、次いでR・W信号線9
を介してライトパルスが出力されるとプリセットデータ
がラッチされ、この後プログラマブル・カウンタ3のク
ロック端子に最初にカウント入力される入力パルスによ
りプリセットされる。このようなプログラマブル・カウ
ンタは、通常プリセットデータをプリセットする際にマ
イクロコンピュータ4からのプリセット指令を受ける端
子を備えているのであるが、第3図に示すプログラマブ
ル・カウンタ3は価格を安価にするためにプリセット指
令を受ける端子を無くして端子数を少なくしたものであ
り、プリセットデータのプリセットをカウント入力と兼
用したものである。プログラマブル・カウンタ3にてカ
ウントされたデータはR・W信号線9からのリードパル
スによりデータバス8を介してマイクロコンピュータ4
に入力され、前記被検出回転体の回転数などを検出す
る。
The programmable counter 3 is a microcomputer 4
, The data bus 8 and the R / W signal line 9 are connected to each other. For presetting the preset data to the programmable counter 3, the microcomputer 4 outputs the preset data to the data bus 8 and then the R / W signal line. 9
The preset data is latched when the write pulse is output via the, and then preset by the input pulse which is first count-input to the clock terminal of the programmable counter 3. Such a programmable counter normally has a terminal for receiving a preset command from the microcomputer 4 when presetting preset data, but the programmable counter 3 shown in FIG. The number of terminals is reduced by eliminating the terminals for receiving the preset command, and the preset of the preset data is also used as the count input. The data counted by the programmable counter 3 is transferred to the microcomputer 4 via the data bus 8 by the read pulse from the RW signal line 9.
Is input to the detection target rotating body to detect the number of rotations and the like.

〔考案が解決しようとする課題〕[Problems to be solved by the device]

第6図は第3図におけるプログラマブル・カウンタ3を
仮に4Bitバイナリーカウンタとし、A・B・C・Dをプ
リセットデータ入力、QA・QB・QC・QDをカウンタ出力、
ライトパルスの立上りエッジa1で4つのフリップフロッ
プが動作されると考えた場合の第3図に示す回路のタイ
ミングチャートである。
In FIG. 6, the programmable counter 3 in FIG. 3 is assumed to be a 4-bit binary counter, A / B / C / D is preset data input, Q A / Q B / Q C / Q D is counter output,
4 is a timing chart of the circuit shown in FIG. 3 when it is considered that four flip-flops are operated at the rising edge a 1 of the write pulse.

第6図においては、ライトパルスの立下りがプリセット
データラッチタイミングaとして描かれているが、これ
は高価なプログラマブル・カウンタの場合であって、第
3図に示した端子数を削減した安価なプログラマブル・
カウンタ3はクロック端子への入力パルスがないとプリ
セットできないので、第1パルスbが入力されるまでは
動作せず、第1パルスbが入力して初めてプリセットデ
ータ(図の場合2進数「0101」=5)fがプリセットさ
れる。従って、ランダムにパルスが入力される外部イベ
ントパルスをカウントする時にはプリセットデータが外
部イベントパルスに依存して行われるために正確にプリ
セットすることが不可能、すなわち信頼性が低いという
問題があった。また、この場合前述の第1パルスbはプ
リセット用のパルスとなり、実際にカウントされるのは
第2パルスc以降からである。このため第4パルスe時
にカウント出力gは(2進数「1000」=8)となり実際
のカウント値(プリセットデータ「5」+4=9)と異
なってくる。このように従来の回路では正確なプリセッ
トおよびカウントができないという欠点があった。
In FIG. 6, the falling edge of the write pulse is drawn as the preset data latch timing a, but this is the case of an expensive programmable counter, and the number of terminals shown in FIG. Programmable
Since the counter 3 cannot be preset without an input pulse to the clock terminal, it does not operate until the first pulse b is input, and the preset data (binary number “0101” in the figure is not shown until the first pulse b is input. = 5) f is preset. Therefore, when counting external event pulses to which pulses are randomly input, preset data cannot be accurately preset because the preset data depends on the external event pulse, that is, reliability is low. Further, in this case, the above-mentioned first pulse b becomes a preset pulse, and is actually counted after the second pulse c. Therefore, the count output g at the time of the fourth pulse e is (binary number “1000” = 8), which is different from the actual count value (preset data “5” + 4 = 9). As described above, the conventional circuit has a drawback that accurate presetting and counting cannot be performed.

そこで、本考案の目的は前述した従来装置の欠点を除去
し、外部イベントパルスをカウントする際にもプリセッ
トデータを正確にプリセットおよびカウントすることが
可能な外部イベントカウント回路を提供することにあ
る。
Therefore, an object of the present invention is to eliminate the above-mentioned drawbacks of the conventional device and to provide an external event count circuit capable of accurately presetting and counting preset data even when counting external event pulses.

〔課題を解決するための手段〕[Means for Solving the Problems]

前述した目的を達成するため本考案は、被検出回転体に
直結された被検出回転体の動きを捕らえてパルス信号を
出力するエンコーダと、このエンコーダからのパルス信
号を波形整形する波形整形回路と、この波形整形回路か
らの出力が外部イベントパルスとしてクロック端子に印
加され、最終段のマイクロコンピュータから出力される
プリセットデータをライトパルスによりラッチし、この
プリセットデータをラッチしてから最初にクロック端子
に印加されるパルスによりプリセットデータがプリセッ
トされるプログラマブル・カウンタと、このプログラマ
ブル・カウンタのカウントデータを入力して被検出回転
体の回転数,回動角度などを検出するマイクロコンピュ
ータとを備えた外部イベントカウント回路において、前
記マイクロコンピュータはライトパルスに引き続いてプ
リセット指令パルスを出力し、前記プログラマブル・カ
ウンタのクロック端子に外部イベントパルスとプリセッ
ト指令パルスの論理和をとって出力する論理回路の出力
端を接続したことを特徴とする。
In order to achieve the above-mentioned object, the present invention provides an encoder that outputs a pulse signal by capturing the movement of a detected rotating body directly connected to the detected rotating body, and a waveform shaping circuit that shapes the pulse signal from this encoder. , The output from this waveform shaping circuit is applied to the clock terminal as an external event pulse, the preset data output from the microcomputer at the final stage is latched by the write pulse, and this preset data is latched first and then to the clock terminal. An external event including a programmable counter whose preset data is preset by an applied pulse, and a microcomputer which inputs the count data of the programmable counter and detects the number of rotations, the rotation angle, etc. of the detected rotating body. In the counting circuit, the microcomputer The data output device outputs a preset command pulse subsequent to the write pulse, and connects the output terminal of a logic circuit that outputs the logical sum of the external event pulse and the preset command pulse to the clock terminal of the programmable counter. To do.

〔作用〕[Action]

本考案における外部イベントカウント回路は、マイクロ
コンピュータからライトパルスに引き続いてプリセット
指令パルスを出力し、このプリセット指令パルスと外部
イベントパルスとの論理和をとってプログラマブル・カ
ウンタのクロック端子に与えることにより、外部イベン
トパルスに関係なく正確にプリセットデータをプリセッ
トすることができ、また外部イベントパルスを確実にカ
ウントできる。
The external event count circuit in the present invention outputs a preset command pulse subsequent to the write pulse from the microcomputer, and takes the logical sum of the preset command pulse and the external event pulse to give to the clock terminal of the programmable counter. The preset data can be accurately preset regardless of the external event pulse, and the external event pulse can be reliably counted.

〔実施例〕〔Example〕

第1図はこの考案の一実施例を示すブロック図で、エン
コーダ1から出力される出力パルス5,5′を波形整形回
路2に入力する。波形整形回路2で波形整形されて出力
された外部イベントパルス(P1)6を論理和回路10(以
下、これをNOR回路という)の入力端子10aに入力し、NO
R回路10のもう一方の入力端子10bにマイクロコンピュー
タ4から出力されるプリセット指令パルス(P2)11を入
力させる。そして、NOR回路10からの出力パルス(P3)1
2をプログラマブル・カウンタ3のクロック端子に入力
させる。また、プログラマブル・カウンタ3はマイクロ
コンピュータ4とデータバス8で接続されており、マイ
クロコンピュータ4からR・W信号線9に出力されるラ
イトパルスおよびリードパルスによりプリセットデータ
の入力およびカウントデータの出力を行う。
FIG. 1 is a block diagram showing an embodiment of the present invention, in which output pulses 5 and 5'output from an encoder 1 are input to a waveform shaping circuit 2. The external event pulse (P 1 ) 6 waveform-shaped by the waveform shaping circuit 2 and output is input to the input terminal 10a of the logical sum circuit 10 (hereinafter referred to as NOR circuit), and NO
A preset command pulse (P 2 ) 11 output from the microcomputer 4 is input to the other input terminal 10b of the R circuit 10. Then, the output pulse (P 3 ) 1 from the NOR circuit 10
Input 2 to the clock terminal of programmable counter 3. The programmable counter 3 is connected to the microcomputer 4 via a data bus 8. The programmable counter 3 inputs preset data and outputs count data in response to a write pulse and a read pulse output from the microcomputer 4 to the RW signal line 9. To do.

第2図は第1図におけるプログラマブル・カウンタ3を
例えば4Bitバイナリーカウンタとし、A・B・C・Dを
プリセットデータ入力、QA・QB・QC・QDをカウント出
力、ライトパルスの立上りエッジで4つのフリップフロ
ップが動作させらると考えた場合の第1図に示す回路の
タイミングチャートである。第2図におけるライトパル
スの立下りaがプリセットデータのラッチタイミングで
あって、データラッチ後にプリセット指令パルス(P2
11を出力することにより外部イベントパルス(P1)6に
関係なくNOR回路10の出力パルス(P3)12は“H"レベル
になる。従って、プリセットデータラッチ後、出力パル
ス(P3)12が“H"レベルになることにより確実にプリセ
ットデータ(図の場合2進数「0101」=5)fをプリセ
ットできる。また、プリセット指令パルス(P2)11によ
ってプリセットされるため、外部イベントパルス(P1
6は第1パルスbより順次カウントが始まり第4パルス
e時のカウント出力gもカウント値(プリセットデータ
「5」+4=9)と等しく、また、プリセットデータf
とプリセット直前のカウント出力が等しい場合において
も、確実に第1パルスbよりカウント出力が変化し、パ
ルス入力をカウントすることができる。
FIG. 2 shows the programmable counter 3 shown in FIG. 1 as a 4-bit binary counter, for example, A / B / C / D is preset data input, Q A / Q B / Q C / Q D is count output, and the rising edge of the write pulse. 6 is a timing chart of the circuit shown in FIG. 1 when it is considered that four flip-flops are operated at the edge. The falling edge a of the write pulse in FIG. 2 is the latch timing of the preset data, and after the data latch, the preset command pulse (P 2 )
By outputting 11, the output pulse (P 3 ) 12 of the NOR circuit 10 becomes “H” level regardless of the external event pulse (P 1 ) 6. Therefore, after the preset data is latched, the output pulse (P 3 ) 12 becomes “H” level, whereby the preset data (binary number “0101” = 5 in the case of FIG. 5) can be reliably preset. In addition, since it is preset by the preset command pulse (P 2 ) 11, the external event pulse (P 1 )
6 starts counting sequentially from the first pulse b, the count output g at the time of the fourth pulse e is also equal to the count value (preset data “5” + 4 = 9), and the preset data f
Even when the count outputs immediately before presetting are equal, the count outputs surely change from the first pulse b and the pulse inputs can be counted.

〔考案の効果〕[Effect of device]

以上に説明したとおり本考案においては、被検出回転体
に直結された被検出回転体の動きを捕らえてパルス信号
を出力するエンコーダと、このエンコーダからのパルス
信号を波形整形する波形整形回路と、この波形整形回路
からの出力が外部イベントパルスとしてクロック端子に
印加され、最終段のマイクロコンピュータから出力され
るプリセットデータをライトパルスによりラッチし、こ
のプリセットデータをラッチしてから最初にクロック端
子に印加されるパルスによりプリセットデータがプリセ
ットされるプログラマブル・カウンタと、このプログラ
マブル・カウンタのカウントデータを入力して被検出回
転体の回転数,回動角度などを検出するマイクロコンピ
ュータとを備えた外部イベントカウント回路において、
前記マイクロコンピュータはライトパルスに引き続いて
プリセット指令パルスを出力し、前記プログラマブル・
カウンタのクロック端子に外部イベントパルスとプリセ
ット指令パルスの論理和をとって出力する論理回路の出
力端を接続するように構成し、論理回路によって外部イ
ベントパルスとプリセット指令パルスの論理和をとって
プログラマブル・カウンタのクロック端子に与えること
により、外部イベントパルスに依存することなくプリセ
ットデータをプリセットすることができ、また外部イベ
ントパルスを正確にカウントすることができるという効
果を有する。
As described above, in the present invention, an encoder that outputs a pulse signal by capturing the movement of the detected rotating body directly connected to the detected rotating body, and a waveform shaping circuit that shapes the pulse signal from this encoder, The output from this waveform shaping circuit is applied to the clock terminal as an external event pulse, the preset data output from the microcomputer at the final stage is latched by the write pulse, and this preset data is latched and then applied to the clock terminal first. External event count provided with a programmable counter in which preset data is preset by generated pulses, and a microcomputer for inputting the count data of the programmable counter to detect the number of rotations, the rotation angle, etc. of the detected rotating body. In the circuit
The microcomputer outputs a preset command pulse following the write pulse, and the programmable
It is configured to connect the output terminal of a logic circuit that outputs the logical OR of the external event pulse and the preset command pulse to the clock terminal of the counter, and programmable by logical OR of the external event pulse and the preset command pulse by the logical circuit. By giving it to the clock terminal of the counter, the preset data can be preset without depending on the external event pulse, and the external event pulse can be accurately counted.

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

第1図はこの考案の一実施例を示す外部イベントカウン
ト回路のブロック図、第2図は第1図のプリセットタイ
ミングチャート図、第3図は従来の外部イベントカウン
タ回路のブロック図、第4図はエンコーダ出力正転パル
スを示す波形図、第5図はエンコーダ出力逆転パルスを
示す波形図、第6図は第3図のプリセットタイミングチ
ャート図である。 1:エンコーダ、2:波形整形回路、3:プログラマブル・カ
ウンタ、4:マイクロコンピュータ、8:データバス、9:R
・W信号線、10:論理和回路。
FIG. 1 is a block diagram of an external event count circuit showing an embodiment of the present invention, FIG. 2 is a preset timing chart diagram of FIG. 1, FIG. 3 is a block diagram of a conventional external event counter circuit, and FIG. Is a waveform diagram showing an encoder output forward rotation pulse, FIG. 5 is a waveform diagram showing an encoder output reverse rotation pulse, and FIG. 6 is a preset timing chart diagram of FIG. 1: Encoder, 2: Waveform shaping circuit, 3: Programmable counter, 4: Microcomputer, 8: Data bus, 9: R
-W signal line, 10: OR circuit.

Claims (1)

【実用新案登録請求の範囲】[Scope of utility model registration request] 【請求項1】被検出回転体に直結された被検出回転体の
動きを捕らえてパルス信号を出力するエンコーダと、こ
のエンコーダからのパルス信号を波形整形する波形整形
回路と、この波形整形回路からの出力が外部イベントパ
ルスとしてクロック端子に印加され、最終段のマイクロ
コンピュータから出力されるプリセットデータをライト
パルスによりラッチし、このプリセットデータをラッチ
してから最初にクロック端子に印加されるパルスにより
プリセットデータがプリセットされるプログラマブル・
カウンタと、このプログラマブル・カウンタのカウント
データを入力して被検出回転体の回転数,回動角度など
を検出するマイクロコンピュータとを備えた外部イベン
トカウント回路において、前記マイクロコンピュータは
ライトパルスに引き続いてプリセット指令パルスを出力
し、前記プログラマブル・カウンタのクロック端子に外
部イベントパルスとプリセット指令パルスの論理和をと
って出力する論理回路の出力端を接続したことを特徴と
する外部イベントカウント回路。
1. An encoder for detecting the movement of a detected rotary body directly connected to the detected rotary body and outputting a pulse signal, a waveform shaping circuit for shaping the pulse signal from this encoder, and a waveform shaping circuit for the waveform shaping circuit. Output is applied to the clock pin as an external event pulse, the preset data output from the microcomputer at the final stage is latched by the write pulse, this preset data is latched, and then the preset pulse is first applied to the clock pin. Programmable with preset data
In an external event count circuit provided with a counter and a microcomputer for inputting count data of the programmable counter to detect the number of rotations, a rotation angle, etc. of a detected rotary body, the microcomputer is provided with a write pulse following the write pulse. An external event counting circuit, wherein a preset command pulse is output, and an output terminal of a logic circuit which outputs a logical sum of an external event pulse and a preset command pulse is connected to a clock terminal of the programmable counter.
JP18784687U 1987-12-10 1987-12-10 External event count circuit Expired - Lifetime JPH0731630Y2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP18784687U JPH0731630Y2 (en) 1987-12-10 1987-12-10 External event count circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP18784687U JPH0731630Y2 (en) 1987-12-10 1987-12-10 External event count circuit

Publications (2)

Publication Number Publication Date
JPH0191340U JPH0191340U (en) 1989-06-15
JPH0731630Y2 true JPH0731630Y2 (en) 1995-07-19

Family

ID=31478976

Family Applications (1)

Application Number Title Priority Date Filing Date
JP18784687U Expired - Lifetime JPH0731630Y2 (en) 1987-12-10 1987-12-10 External event count circuit

Country Status (1)

Country Link
JP (1) JPH0731630Y2 (en)

Also Published As

Publication number Publication date
JPH0191340U (en) 1989-06-15

Similar Documents

Publication Publication Date Title
US4308500A (en) Incremental encoder for measuring positions of objects such as rotating shafts
JPH0731630Y2 (en) External event count circuit
JPH0342810B2 (en)
JPS6135974Y2 (en)
JPH0580604B2 (en)
JPH0511562B2 (en)
SU1401586A1 (en) Device for checking pulse trains
SU1644120A2 (en) Device for data input
JPH0753312Y2 (en) Pulse counting device
SU1631441A1 (en) Device for determining sense of rotation
JP2619939B2 (en) Synchronous pattern detection circuit
JP2575936Y2 (en) Maximum temperature detection circuit for multiple temperature sensors
JPH0546365Y2 (en)
JPS5831525B2 (en) A-D
JP2906850B2 (en) Time-division switch monitoring circuit
JPS628059A (en) System for detecting pulse input signal
JPS6251525B2 (en)
JP2602404Y2 (en) Counter circuit
KR890007146A (en) Position Feedback Control System and Method of Industrial Equipment System Using Incremental Encoder
JPH01194709A (en) Phase discrimination circuit
JP2519114B2 (en) Data transmission equipment
KR0161383B1 (en) Index period detecting apparatus in a floppy disc driver controller
JPH0716974Y2 (en) Encoder noise removal circuit
JPS61278954A (en) I/o interface device
JPH0660922B2 (en) Encoder disconnection detector