JPH0656387B2 - Rotation direction discrimination method - Google Patents

Rotation direction discrimination method

Info

Publication number
JPH0656387B2
JPH0656387B2 JP1622186A JP1622186A JPH0656387B2 JP H0656387 B2 JPH0656387 B2 JP H0656387B2 JP 1622186 A JP1622186 A JP 1622186A JP 1622186 A JP1622186 A JP 1622186A JP H0656387 B2 JPH0656387 B2 JP H0656387B2
Authority
JP
Japan
Prior art keywords
rotation direction
microcomputer
rotating body
interrupt
present
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 - Fee Related
Application number
JP1622186A
Other languages
Japanese (ja)
Other versions
JPS62172265A (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.)
Ricoh Co Ltd
Original Assignee
Ricoh 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP1622186A priority Critical patent/JPH0656387B2/en
Publication of JPS62172265A publication Critical patent/JPS62172265A/en
Publication of JPH0656387B2 publication Critical patent/JPH0656387B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Optical Transform (AREA)
  • Optical Systems Of Projection Type Copiers (AREA)
  • Control By Computers (AREA)
  • Control Of Position Or Direction (AREA)
  • Control Of Velocity Or Acceleration (AREA)
  • Indicating Or Recording The Presence, Absence, Or Direction Of Movement (AREA)
  • Transmission And Conversion Of Sensor Element Output (AREA)
  • Exposure Or Original Feeding In Electrophotography (AREA)

Description

【発明の詳細な説明】 技術分野 本発明は回転体の回転方向判別方式に関し、特に、複写
機等の光学走査系駆動制御に好適な、回路構成を簡単に
した回転方向判別方式に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a rotational direction discriminating method of a rotating body, and more particularly to a rotational direction discriminating method suitable for optical scanning system drive control of a copying machine or the like and having a simple circuit configuration. .

従来技術 従来の回転方向判別方式は、回転エンコーダの出力をフ
リップフロップ等の論理回路を介して、マイクロコンピ
ュータの入力ポートに接続し、該入力ポートの論理値に
よって、回転体の回転方向を判別していた。
2. Description of the Related Art In the conventional rotation direction determination method, the output of a rotation encoder is connected to an input port of a microcomputer via a logic circuit such as a flip-flop, and the rotation direction of a rotating body is determined by the logical value of the input port. Was there.

以下、従来用いられていた回転方向判別方式の具体例
を、第3図〜第5図を用いて説明する。
Hereinafter, a specific example of the conventionally used rotation direction determination method will be described with reference to FIGS.

第3図は従来の回転方向判別方式の一例を示す構成図、
第4図はそのタイミングチャート、第5図は同じく回転
方向判別処理のフローチャートである。
FIG. 3 is a configuration diagram showing an example of a conventional rotation direction determination method,
FIG. 4 is a timing chart thereof, and FIG. 5 is a flow chart of the rotation direction discrimination processing.

図において、1はマイクロコンピュータ、2はDタイプ
・ネガティブエッジトリガ・フリップフロップ(以下、
単に「フリップフロップ」という)、またa,bは回転
エンコーダの2相の出力を示している。
In the figure, 1 is a microcomputer, 2 is a D type negative edge trigger flip-flop (hereinafter,
It is simply referred to as a "flip-flop"), and a and b indicate two-phase outputs of the rotary encoder.

第4図は上記回転方向判別方式において、回転体の回転
方向が正転(CW)から逆転(CCW)に移るタイミン
グを示している。
FIG. 4 shows the timing when the rotation direction of the rotating body shifts from the forward rotation (CW) to the reverse rotation (CCW) in the above rotation direction determination method.

回転エンコーダのA,B相出力a,bは、抵抗,コンデ
ンサおよびインバータから成る波形整形インバータ回路
により処理されて、信号cおよびdの波形となる。該信
号c,信号dは、上記フリップフロップ2のクロック入
力,D入力に、それぞれ、接続されている。
The A and B phase outputs a and b of the rotary encoder are processed by a waveform shaping inverter circuit composed of a resistor, a capacitor and an inverter to obtain the waveforms of signals c and d. The signals c and d are respectively connected to the clock input and D input of the flip-flop 2.

上記構成により、信号cの立下りエッジによりトリガさ
れ、信号dの論理値がQ出力に現われ、信号eとなる。
With the above configuration, triggered by the falling edge of the signal c, the logical value of the signal d appears at the Q output and becomes the signal e.

上記信号eは、マイクロコンピュータ1の入力ポートP
A1に接続されている。これにより、回転体の回転方向
は、第5図のフローチャートに示す如く、上記入力ポー
トPA1の論理値を読取ることによって判別できるとい
うものである。
The signal e is the input port P of the microcomputer 1.
It is connected to A1. As a result, the rotation direction of the rotating body can be determined by reading the logical value of the input port PA1 as shown in the flowchart of FIG.

従来の回転方向判別方式は、このように、上記フリップ
フロップ2の如き論理回路素子が必要であるという問題
があった。
As described above, the conventional rotation direction determination method has a problem that a logic circuit element such as the flip-flop 2 is required.

目 的 本発明は上記事情に鑑みてなされたもので、その目的と
するところは、従来の回転方向判別方式における上述の
如き問題を解消し、上記フリップフロップの如き論理回
路素子を必要としない、回路構成を簡単にした、回転体
の回転方向判別方式を提供することにある。
The present invention has been made in view of the above circumstances, and an object of the present invention is to solve the above-mentioned problems in the conventional rotation direction determination method and not to use a logic circuit element such as the flip-flop. An object of the present invention is to provide a method for discriminating the rotational direction of a rotating body, which has a simple circuit configuration.

構 成 本発明の上記目的は、回転体に接続されたそれぞれ位相
の異なる2相の波形出力を発生する回転エンコーダの出
力信号により、マイクロコンピュータが前記回転体の回
転方向を判別する回転方向判別方式において、前記回転
エンコーダの1相を前記マイクロコンピュータのノンマ
スカブル割込み入力に接続し、他の1相をマイクロコン
ピュータの入力ポートに接続して、前記入力ポートの論
理値により回転体の回転方向を判別することを特徴とす
る回転方向判別方式によって達成される。
Configuration The above object of the present invention is a rotation direction determination method in which a microcomputer determines the rotation direction of the rotating body by the output signal of a rotary encoder that is connected to the rotating body and generates two-phase waveform outputs having different phases. In, the one phase of the rotary encoder is connected to the non-maskable interrupt input of the microcomputer, the other one phase is connected to the input port of the microcomputer, and the rotation direction of the rotating body is determined by the logical value of the input port. This is achieved by the rotation direction discrimination method characterized by the above.

以下、実施例に基づいて、本発明の構成をより詳細に説
明する。
Hereinafter, the configuration of the present invention will be described in more detail based on examples.

第2図は本発明の一実施例を示す回転方向判別装置の構
成図である。図において、1はマイクロコンピュータ、
a,bは回転エンコーダの2相の出力を示している。ま
た、信号c,dは上記信号a,bを波形整形インバート
したものである。以上の点は第3図に示した従来例と同
様である。
FIG. 2 is a block diagram of a rotation direction discriminating apparatus showing an embodiment of the present invention. In the figure, 1 is a microcomputer,
Reference characters a and b indicate two-phase outputs of the rotary encoder. Further, the signals c and d are obtained by subjecting the signals a and b to waveform shaping inversion. The above points are the same as in the conventional example shown in FIG.

本実施例と第3図に示した従来方式との構成上の差異
は、信号cがマイクロコンピュータ1のノンマスカブル
割込み入力(以下、「NMI」という)に、信号dが同
ポートPA1に、それぞれ接続されている点である。
The difference between the present embodiment and the conventional system shown in FIG. 3 is that the signal c is connected to the non-maskable interrupt input (hereinafter referred to as “NMI”) of the microcomputer 1 and the signal d is connected to the same port PA1. That is the point.

本実施例の動作を、以下、第1図(A)〜(D)に基づいて説
明する。
The operation of this embodiment will be described below with reference to FIGS. 1 (A) to (D).

第1図(A)は、上記マイクロコンピュータ1の上記NM
I割込み処理のフローチャートである。NMI入力の立
下りエッジを検出すると、マイクロコンピュータ1は現
在実行中の命令終了後に、EI/DI(割込み可能/割
込み禁止)状態にかかわらず、NMI割込み処理ルーチ
ンに入る。
FIG. 1 (A) shows the NM of the microcomputer 1.
It is a flowchart of I interrupt processing. When the falling edge of the NMI input is detected, the microcomputer 1 enters the NMI interrupt processing routine after completion of the instruction currently being executed, regardless of the EI / DI (interrupt enable / interrupt disable) state.

この中で、マイクロコンピュータ1はポートPAIの論
理値を読取り、マイクロコンピュータの内部メモリ(ラ
ンダムアクセスメモリ、以下、「RAM」という)中に
設定されている回転方向を示すフラグ(CWFLG)
を、“1”または“0”にセットする。
Among them, the microcomputer 1 reads the logical value of the port PAI, and the flag (CWFLG) indicating the rotation direction set in the internal memory (random access memory, hereinafter referred to as “RAM”) of the microcomputer.
Is set to "1" or "0".

回転方向判別は、第1図(B)に示す如く、上記フラグC
WLGが“1”であるか“0”であるかを判断し、正転
(CWFLG=1),逆転(CWFLG=0)を判別す
る。
As shown in FIG. 1 (B), the direction of rotation is determined by the above flag C.
It is determined whether the WLG is “1” or “0”, and the forward rotation (CWFLG = 1) and the reverse rotation (CWFLG = 0) are determined.

なお、NMI割込みは前述の如く、EI/DI状態にか
かわれず、割込み処理に入るため、上記NMI割込みの
終了時には、EI命令を実行するか否かを判断する必要
がある。これは、割込み処理に入ると、自動的に、DI
状態になり、EI命令を実行しない限り、DI状態のま
まとなるためである。
As described above, the NMI interrupt does not depend on the EI / DI state and enters the interrupt process. Therefore, at the end of the NMI interrupt, it is necessary to judge whether or not to execute the EI instruction. This is automatically set to DI when interrupt processing starts.
This is because the DI state is maintained unless the EI instruction is executed.

そのため、第1図(C)に示す如く、NMI割込み以外の
割込み処理に入ったとき、および第1図(D)に示す如
く、DI実行前に、マイクロコンピュータ1の前記内部
RAMに設定されているEIFLGを“0”にし、EI
命令実行前に“1”にセットする。
Therefore, as shown in FIG. 1 (C), when the interrupt processing other than the NMI interrupt is entered, and as shown in FIG. 1 (D), before the DI is executed, it is set in the internal RAM of the microcomputer 1. The EIFLG that is present to "0", and EI
Set to "1" before executing the instruction.

第1図(A)に示す如く、NMI割込み処理終了前に、こ
のEIFLGの値により、EI命令を実行するか否かを
判断する。
As shown in FIG. 1 (A), before the NMI interrupt processing is completed, it is determined whether or not the EI instruction is executed according to the value of this EIFLG.

本発明において、信号cを他のマスカブル割込みでなく
NMIとしている理由は、以下の通りである。すなわ
ち、通常のマスカブル割込みは、EI状態でないと割込
み処理が実行されないため、前記信号cを他のマスカブ
ル割込みに接続した場合には、DI状態のときに信号c
の割込み入力が入った場合、すぐ割込み処理が実行され
ず、信号dのチェックができなくなり、その後、EI状
態になった時点で、割込み処理が実行されても、信号d
の状態は、上述の割込み入力が入った時点での状態と同
じであるという保証はないため、回転方向のチェックに
誤差が生じてしまうことになるからである。
In the present invention, the reason why the signal c is an NMI instead of another maskable interrupt is as follows. That is, since the normal maskable interrupt does not execute the interrupt processing unless it is in the EI state, when the signal c is connected to another maskable interrupt, the signal c is output in the DI state.
When the interrupt input of is input, the interrupt process is not executed immediately and the signal d cannot be checked. After that, even if the interrupt process is executed at the time when the EI state is entered, the signal d
This is because there is no guarantee that the state of (1) is the same as the state at the time when the interrupt input is input, and therefore an error will occur in the checking of the rotation direction.

以上述べた如く、本実施例によれば、従来の如き論理回
路素子を必要とせずに、プログラムにより、回転方向を
判別することができる。
As described above, according to the present embodiment, the rotation direction can be determined by the program without the need for the conventional logic circuit element.

上記実施例の説明においては回転体全般について説明し
た通り、本発明は回転体に接続された2相の回転エンコ
ーダを使用する回転方向判別方式であり、回転体の制御
すべてに適用可能である。特に、複写機の光学走査系制
御、すなわち、スキャナ,スライダ(原稿台移動式複写
機)等の走査系の精密往復動制御において有効である。
As described in the above description of the rotating body in general, the present invention is a rotation direction determination method that uses a two-phase rotary encoder connected to the rotating body, and is applicable to all control of the rotating body. In particular, it is effective in controlling the optical scanning system of a copying machine, that is, in controlling the precise reciprocating motion of a scanning system such as a scanner and a slider (a document table moving type copying machine).

効 果 以上述べた如く、本発明によれば、回転体の回転方向判
別を、簡単な回路構成により実施することが可能になる
という顕著な効果を奏するものである。
Effect As described above, according to the present invention, it is possible to determine the rotation direction of the rotating body with a simple circuit configuration.

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

第1図(A)〜(D)は本発明の一実施例における処理のフロ
ーチャート、第2図は本発明の一実施例の構成図、第3
図は従来の回転方向判別方式の一例を示す構成図、第4
図はそのタイミングチャート、第5図はその回転方向判
別処理のフローチャートである。 1:マイクロコンピュータ、a,b:回転エンコーダの
出力、c,d:波形整形後の上記出力。
1 (A) to (D) are flow charts of processing in one embodiment of the present invention, FIG. 2 is a configuration diagram of one embodiment of the present invention, and FIG.
FIG. 4 is a block diagram showing an example of a conventional rotation direction determination method,
FIG. 5 is a timing chart thereof, and FIG. 5 is a flowchart of the rotation direction discrimination processing. 1: microcomputer, a, b: output of rotary encoder, c, d: the above output after waveform shaping.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】回転体に接続されたそれぞれ位相の異なる
2相の波形出力を発生する回転エンコーダの出力信号に
より、マイクロコンピュータが前記回転体の回転方向を
判別する回転方向判別方式において、前記回転エンコー
ダの1相を前記マイクロコンピュータのノンマスカブル
割込み入力に接続し、他の1相を前記マイクロコンピュ
ータの入力ポートに接続して、前記入力ポートの論理値
により回転体の回転方向を判別することを接続とする回
転方向判別方式。
1. A rotating direction discriminating method in which a microcomputer discriminates a rotating direction of the rotating body by an output signal of a rotary encoder which is connected to the rotating body and generates two-phase waveform outputs having different phases. One phase of the encoder is connected to the non-maskable interrupt input of the microcomputer, the other phase is connected to the input port of the microcomputer, and the logical direction of the input port is used to determine the rotation direction of the rotating body. Rotation direction determination method.
JP1622186A 1986-01-27 1986-01-27 Rotation direction discrimination method Expired - Fee Related JPH0656387B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1622186A JPH0656387B2 (en) 1986-01-27 1986-01-27 Rotation direction discrimination method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1622186A JPH0656387B2 (en) 1986-01-27 1986-01-27 Rotation direction discrimination method

Publications (2)

Publication Number Publication Date
JPS62172265A JPS62172265A (en) 1987-07-29
JPH0656387B2 true JPH0656387B2 (en) 1994-07-27

Family

ID=11910473

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1622186A Expired - Fee Related JPH0656387B2 (en) 1986-01-27 1986-01-27 Rotation direction discrimination method

Country Status (1)

Country Link
JP (1) JPH0656387B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7220083B2 (en) 2003-10-15 2007-05-22 Tdy Industries, Inc. Cutting insert for high feed face milling
US9586264B2 (en) 2009-04-28 2017-03-07 Kennametal Inc. Double-sided cutting insert for drilling tool

Also Published As

Publication number Publication date
JPS62172265A (en) 1987-07-29

Similar Documents

Publication Publication Date Title
JPH0743653B2 (en) Interrupt controller
US4740915A (en) Method of controlling a microprocessor to monitor input signals at irregular mutually intersecting intervals
JP2661222B2 (en) Pulse output device
JPH0656387B2 (en) Rotation direction discrimination method
JPS6218939B2 (en)
JPS6136665B2 (en)
JP3049671B2 (en) DC motor speed control device
JPS6234353Y2 (en)
JPH076545Y2 (en) Signal discrimination circuit
JP2680573B2 (en) Automatic phase adjustment device
JP2725463B2 (en) Servo motor speed detector
JPS63198814A (en) Detecting method for speed, position, and rotating direction
JP2610286B2 (en) Floppy disk interface circuit
JP2990111B2 (en) Timer circuit
JPS6349964A (en) Handshake controller
JPH0470655B2 (en)
JPS6363932B2 (en)
JPH027767A (en) Picture input device
JPH0146960B2 (en)
JPS5896253A (en) Detecting method for velocity of rotating body
JPS63174117A (en) Clocking circuit for microprocessor
JPS6297171A (en) Floppy disk device
JPS63102074A (en) Card writer
JPS6126683B2 (en)
JPH05134749A (en) Steering angle detection device

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees