JPS6266341A - Runaway detecting circuit for cpu - Google Patents

Runaway detecting circuit for cpu

Info

Publication number
JPS6266341A
JPS6266341A JP60207412A JP20741285A JPS6266341A JP S6266341 A JPS6266341 A JP S6266341A JP 60207412 A JP60207412 A JP 60207412A JP 20741285 A JP20741285 A JP 20741285A JP S6266341 A JPS6266341 A JP S6266341A
Authority
JP
Japan
Prior art keywords
cpu
signal
circuit
flop
flip
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.)
Pending
Application number
JP60207412A
Other languages
Japanese (ja)
Inventor
Kazuaki Saeki
和明 佐伯
Kazuo Tokiyoda
常世田 和夫
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.)
RAITO SEISAKUSHO KK
Nikon Corp
Original Assignee
RAITO SEISAKUSHO KK
Nippon Kogaku KK
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 RAITO SEISAKUSHO KK, Nippon Kogaku KK filed Critical RAITO SEISAKUSHO KK
Priority to JP60207412A priority Critical patent/JPS6266341A/en
Publication of JPS6266341A publication Critical patent/JPS6266341A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To detect the runaway of a CPU and to prevent a device from having a fatal problem by providing a CPU runaway detecting circuit between the CPU and a device to be controlled. CONSTITUTION:An oscillator 2 sends out a period T1a interruption signal to the CPU 1, which responds to it to send out signals S1 and S2 for setting and resetting a flip-flop 4 through a decoder 3. A monostable multivibrator 5 maintains a high level for a constant period (T1<T<2T1) longer than the interruption signal by the setting of the flip-flop 4 and a tri-state circuit 7 sends the signal from the CPU to a motor 9 through a driving circuit 8 during said period. When the CPU 1 runs away, neither of the response signals S1 and S2 from the CPU by the interruption signal is obtained, the monostable multivibrator 5 is at a low level continuously, and the tri-state circuit 7 does not transmit the signal from the CPU to the driving device 8.

Description

【発明の詳細な説明】 (発明の技術分野) 本発明はCPUを使用して電気回路をコントロールする
装置に関するものである。
DETAILED DESCRIPTION OF THE INVENTION (Technical Field of the Invention) The present invention relates to a device that uses a CPU to control an electric circuit.

(発明の背景〕 CPUを用いてモーター等の負荷をコントロールする装
置はプログラムによってドライバー回路等を0N10F
F しているため、ノイズや信号観測時の回路のショー
ト等によりCPUを暴走させてしまうと、モーター等が
回りっばなしになったりして装置をこわすなどの欠点が
あった。
(Background of the Invention) A device that uses a CPU to control loads such as motors etc. uses a program to control driver circuits, etc. to 0N10F.
Because of this, if the CPU were to run out of control due to noise or a short circuit during signal observation, the motor etc. would stop spinning and the device would be damaged.

(発明の目的) 本発明はこれらの欠点を解決し、万が−Cpuが暴走し
ても装置としての致命的な問題点を出さないための暴走
検出回路を得ることを目的とする。
(Object of the Invention) An object of the present invention is to solve these drawbacks and provide a runaway detection circuit that prevents fatal problems from occurring as a device even if the CPU goes out of control.

(発明の概要) 本発明は被制御装置9の制御を行な5 CPU1に周期
的な割込信号を出力する割込信号出力回路2を設けると
共に、前記CPUが前記割込信号に対応して少くとも一
つのコントロール信号を発生するようになし−(第2図
のフローチャート参照)、前記コントロール信号によっ
て前記割込信号発生回路の出力信号の周期よりも長い所
定時間、所定のレベルを維持する警報信号S4を出力す
る警報信号発生回路(3,4,5)を設け、前記警報信
号が前記所定のレベルであるか否かによって前記CPU
が暴走しているか否かを検出することを特徴とするCP
Uの暴走検出回路である。
(Summary of the Invention) The present invention provides an interrupt signal output circuit 2 that controls a controlled device 9 and outputs periodic interrupt signals to the CPU 1, and that the CPU an alarm that generates at least one control signal (see the flowchart in FIG. 2) and maintains a predetermined level by the control signal for a predetermined period longer than the period of the output signal of the interrupt signal generation circuit; An alarm signal generation circuit (3, 4, 5) that outputs a signal S4 is provided, and the CPU
A CP characterized by detecting whether or not the is running out of control.
This is the U runaway detection circuit.

(実施例) 第1図は本発明の一実施例のブロック図であって、CP
U1によってモータ9の回転制御を行なう場合を例とし
て示しである。
(Embodiment) FIG. 1 is a block diagram of an embodiment of the present invention, in which the CP
An example is shown in which the rotation of the motor 9 is controlled by U1.

CPU1 (割込みの入力を専用LSIによって行なう
場合はこれを含む)の割込入力端子には例えば100 
Hz  のクロックパルスを出力する発振器2が接続さ
れている。CPU1のアドレスバスにはアドレスデコー
ダ3が接続され、アドレスデコーダ3の出力端子の一つ
はフリップフロップ40セツト端子Sに接続され、他の
一つはフリップフロップ4のリセット端子Rに接続され
、さらに他の一つはDフリップフロップのクロック端子
CKに接続されている。フリップフロップ4の出力端子
はリドリガーのモノマルチ5の入力端子に接続されてい
る。モノマルチ5は入力端子に生じたパルスによって所
定パルス巾Tのパルスを出力する。このパルス巾Tは、
発振器2から出力されるクロックパルスの周期T1との
間で’r、<T<2TIなる関係にある。モノマルチ5
の出力端子は3ステ一ト回路7の制御端子に接続されて
いる。
For example, the interrupt input terminal of CPU1 (including this if interrupt input is performed by a dedicated LSI) has a value of 100.
An oscillator 2 is connected which outputs clock pulses of Hz. An address decoder 3 is connected to the address bus of the CPU 1, one of the output terminals of the address decoder 3 is connected to the set terminal S of the flip-flop 40, the other one is connected to the reset terminal R of the flip-flop 4, and The other one is connected to the clock terminal CK of the D flip-flop. The output terminal of the flip-flop 4 is connected to the input terminal of the monomulti 5 of the Ridrigger. The monomulti 5 outputs a pulse having a predetermined pulse width T in response to a pulse generated at its input terminal. This pulse width T is
The relationship with the period T1 of the clock pulse output from the oscillator 2 is 'r,<T<2TI. mono multi 5
The output terminal of is connected to the control terminal of the three-state circuit 7.

CPU1のデータバスにはDフリップフロップ6のD端
子に接続され、Dフリップフロップ6の出力端子は3ス
テ一ト回路70入力端子に接続されている。3ステ一ト
回路7は出力端子がプルダウンされており、制御端子が
ハイレベルの間口−インピーダンスであって、入力端子
のハイレベル信号(モータ回転命令)を出力端子に伝達
し、制御端子がローレベルになるとハイインピーダンス
となって、入力端子のハイレベル信号が出力端子に伝達
されることを阻止する。3ステ一ト回路7の出力端子は
駆動回路8の入力端子に接続され、駆動回路8の出力端
子はモータ9に接続されている。
A data bus of the CPU 1 is connected to a D terminal of a D flip-flop 6, and an output terminal of the D flip-flop 6 is connected to an input terminal of a three-state circuit 70. In the three-state circuit 7, the output terminal is pulled down, the control terminal has a high-level frontage impedance, and the high-level signal (motor rotation command) of the input terminal is transmitted to the output terminal, and the control terminal is low-level. When the level is reached, the impedance becomes high and prevents the high level signal at the input terminal from being transmitted to the output terminal. An output terminal of the three-state circuit 7 is connected to an input terminal of a drive circuit 8, and an output terminal of the drive circuit 8 is connected to a motor 9.

この回路の動作を以下CPU1のフローチャートを示す
第2図及び回路のタイムチャートである第3図を参照し
つつ説明する。
The operation of this circuit will be explained below with reference to FIG. 2, which is a flow chart of the CPU 1, and FIG. 3, which is a time chart of the circuit.

(1)  発振器2により100 Hz  のパルス(
第3図(a))がCPU1の割込入力端子に入力すると
、CPU1は10m5  毎に割込みをかけられる(第
2図のステップ20)。なお、ステップ20の割込の飛
び先とは発振器2からのパルスでCPU1へ割込みが入
った場合の飛び先である。
(1) Oscillator 2 generates a 100 Hz pulse (
When the signal shown in FIG. 3(a) is input to the interrupt input terminal of the CPU 1, the CPU 1 is interrupted every 10 m5 (step 20 in FIG. 2). Note that the interrupt jump destination in step 20 is the jump destination when an interrupt is input to the CPU 1 by a pulse from the oscillator 2.

(II)割込みが入るとCPU1はプログラムにより制
御されてアドレスデコーダ3にコントロール信号を出力
する(例えば所定のアドレスに対してOUT命令を行な
う)。
(II) When an interrupt occurs, the CPU 1 is controlled by the program and outputs a control signal to the address decoder 3 (for example, issues an OUT command to a predetermined address).

すなわちまず、アドレスデコーダ3からフリップフロッ
プ4をセットするだめの信号S1(第3図(b))が出
力されるようにコントロール信号を出力しくステップ2
1〕、引き続いてアドレスデコーダ3がらフリップフロ
ップ4をリセットするための信号S2 (第3図(b)
〕が出力されるようにコントロール信号を出力する(ス
テップ22)。
That is, first, step 2 is performed to output a control signal so that the address decoder 3 outputs the signal S1 (FIG. 3(b)) for setting the flip-flop 4.
1], followed by a signal S2 for resetting the flip-flop 4 from the address decoder 3 (Fig. 3(b)).
] is output (step 22).

011)従って、フリップフロップ4から発振器2のク
ロックパルスに同期してパルスS3が出力される(第3
図(C))。
011) Therefore, the pulse S3 is output from the flip-flop 4 in synchronization with the clock pulse of the oscillator 2 (the third
Figure (C)).

4ψ パルスS、を入力するリドリガーのモノマルチ5
からはパルスS3の立上りによって前述したパルス巾の
パルスS4が警報信号として出力される(第3図(d)
)。
Ridriger mono multi 5 inputting 4ψ pulse S
Then, with the rise of pulse S3, pulse S4 having the above-mentioned pulse width is output as an alarm signal (Fig. 3(d)).
).

(v)パルスS4の出力によって3ステ一ト回路7はロ
ーインピーダンスすなわち、Dフリップフロップ6の出
力信号が伝達される状態になる。そして、モノマルチ5
から出力されるパルスS4のパルス巾Tは、発振器2の
クロックパルスの周期T、に対して上述した如くT、〈
T〈2T1の関係にあるから、CPU1が正常に作動し
、発振器2からの割込みを受入れる状態にある場合には
3ステ一ト回路7は常にローインピーダンスの状態にあ
る。
(v) The output of the pulse S4 brings the three-state circuit 7 into a low impedance state, that is, into a state where the output signal of the D flip-flop 6 is transmitted. And Mono Multi 5
As described above, the pulse width T of the pulse S4 output from the oscillator 2 is equal to the period T of the clock pulse of the oscillator 2.
Since the relationship is T<2T1, the three-state circuit 7 is always in a low impedance state when the CPU 1 is operating normally and is in a state of accepting interrupts from the oscillator 2.

すなわち、第3図において、割込信号が時刻t、で生じ
、時刻t2で信号S1が生ずるとフリップフロップ4は
セットされ、モノマルチ5はハイレベルになり、時刻t
3で信号S2が生ずるとフリップフロップ4はリセット
される。モノマルチ5は1.5T1時間後の時刻t、で
ローレベルになるはずであるが、その前の時刻t4で同
上の如くフリップフロップ4がセットされるので、リド
リガー機能によって新たなパルス54−2が生じている
から、ハイレベルを維持している。
That is, in FIG. 3, when the interrupt signal is generated at time t, and the signal S1 is generated at time t2, the flip-flop 4 is set, the monomulti 5 becomes high level, and the signal S1 is generated at time t2.
When the signal S2 occurs at 3, the flip-flop 4 is reset. The monomulti 5 should become low level at time t after 1.5T1 hours, but since the flip-flop 4 is set as above at time t4 before that, a new pulse 54-2 is generated by the redrigger function. is occurring, which is why it maintains a high level.

■ もしCPU1が暴走すると、上述の(11)、(i
iflの動作が行なわれなくなるため、モノマルチ5か
らのパルスS4は消滅し、3ステ一ト回路7はハイイン
ピーダンスになる。すなわち、第3図の時刻t6でフリ
ップフロップ4がセットされ、時刻t、でリセットされ
た後再びセットされないから、パルスS4はフリップフ
ロップ4が最後にセットされた時刻t6から1.5T、
時間後の時刻t8でローレベルになる。
■ If CPU1 goes out of control, the above (11), (i
Since the ifl operation is no longer performed, the pulse S4 from the monomulti 5 disappears, and the three-state circuit 7 becomes high impedance. That is, since the flip-flop 4 is set at time t6 in FIG. 3, reset at time t, and then not set again, the pulse S4 is 1.5T from time t6 when the flip-flop 4 is last set.
After time, at time t8, it becomes low level.

暴走検出回路はこのような構成であるから、モータ9を
駆動するためにcpulからDフリップフロップ6に対
するOUT命令が実行されると、CPU1は、デコーダ
3がDフリップフロップ6のクロック端子CKに同期信
号S、を入力せしめるためのコントロール信号を出力す
ると同時に、データバスにモータ9の回転命令信号S6
を出力し、その結果、回転命令信号S6が同期信号S、
に同期してDフリップフロップ6に記憶される。この回
転命令信号S6は3ステ一ト回路7を通ってモータ駆動
回路8に伝達され、モータ9が回転する。CPU1が暴
走して、回転命令信号S6がDフリップフロップ6から
出つ放しになっても、3ステ一ト回路7がすみやかに)
1イインピーダンスになるのでモータ9は停止する。
Since the runaway detection circuit has such a configuration, when the OUT command from cpul to the D flip-flop 6 is executed to drive the motor 9, the CPU 1 detects that the decoder 3 is synchronized with the clock terminal CK of the D flip-flop 6. At the same time, a control signal for inputting the signal S is outputted, and at the same time, a rotation command signal S6 for the motor 9 is sent to the data bus.
As a result, the rotation command signal S6 becomes the synchronization signal S,
is stored in the D flip-flop 6 in synchronization with the . This rotation command signal S6 is transmitted to the motor drive circuit 8 through the three-state circuit 7, and the motor 9 rotates. Even if the CPU 1 goes out of control and the rotation command signal S6 is left out of the D flip-flop 6, the 3-state circuit 7 is activated immediately.)
Since the impedance becomes 1, the motor 9 stops.

なお、以上の実施例は、本発明の暴走検出回路をCPU
1によってモータ9を駆動する回路に用いたものであっ
たが、モノマルチ5からのパルスによって例えば表示素
子を点灯するようになせば、表示素子の消灯によってC
PU1の暴走を知ることができる。
In addition, in the above embodiment, the runaway detection circuit of the present invention is
1 was used in the circuit that drives the motor 9, but if the pulse from the monomulti 5 were used to light up a display element, for example, the C
You can know if PU1 is running out of control.

さらに、アドレスデコーダ3から出力される信号S1、
S2は、3つ以上の信号であっても構わない。この場合
にも、これらの信号の組み合わせによって警報信号$4
を発生させるようになせば良い。
Furthermore, the signal S1 output from the address decoder 3,
S2 may be three or more signals. In this case as well, the combination of these signals generates an alarm signal of $4.
All you have to do is make it happen.

また、発振器2からのパルスに応答した出力を行うとい
う面を考えると、CPU1のリセット時の状態と同じ状
態をCPU1の暴走時に作ることができる。たとえば、
前述の実施例において3ステ一ト回路7とドライバー8
との間にD−Aコンバーターを接続した場合、D−Aコ
ンバーターの人力を適当な値になる様にプルアップ、又
はプルダウンするととで、CPU1が暴走した場合に負
荷をリセット時と同じ状態にする事ができる。
Furthermore, considering the aspect of outputting in response to pulses from the oscillator 2, the same state as the state when the CPU 1 is reset can be created when the CPU 1 runs out of control. for example,
In the above embodiment, the three-state circuit 7 and the driver 8
If a D-A converter is connected between the DA converter and the D-A converter, by pulling up or pulling down the human power of the D-A converter to an appropriate value, if CPU1 goes out of control, the load will be in the same state as when it was reset. I can do that.

(発明の効果) 以上のように本発明によれば、プログラムでシステムを
コントロールしている場合などもしも何らかの理由でC
PUが暴走してしまった場合にすみやかに警告を行なう
ことができ、さらにオペレータが暴走に気付く前に電気
的(プログラムによらず〕にモータ等の負荷を停止させ
る事もでき、装置を破壊してしまったり、人災におよぶ
ことをすみやかに防ぐ様にすることができる。
(Effects of the Invention) As described above, according to the present invention, if for some reason the system is controlled by a program, etc.
If the PU runs out of control, a warning can be issued promptly, and the load such as a motor can be stopped electrically (not based on a program) before the operator notices the runaway, thereby preventing damage to the equipment. It is possible to promptly prevent accidents from occurring or resulting in human disasters.

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

第1図は本発明の一実施例のブロック図、第2図は、C
PUの暴走検出を行なう場合に必要なCPUのプログラ
ムのフローチャート、第3図は、回路の動作を説明する
ためのタイムチャートである。 (主要部分の符号の説明) 1 ・・・・・・CPU 2・・・・・・発振器 3・・・・・・アドレスデコーダ 4・・・・・RSフリップフロップ 5・・・・・リドリガーのモノマルチ 出願人 二 日本光学工業株式会社 株式会社 ライト製作所 第j図
FIG. 1 is a block diagram of an embodiment of the present invention, and FIG. 2 is a block diagram of an embodiment of the present invention.
FIG. 3 is a flowchart of a CPU program necessary for detecting a runaway of the PU, and is a time chart for explaining the operation of the circuit. (Explanation of symbols of main parts) 1 ... CPU 2 ... Oscillator 3 ... Address decoder 4 ... RS flip-flop 5 ... Ridrigger MonoMulti Applicant 2 Nippon Kogaku Kogyo Co., Ltd. Light Manufacturing Co., Ltd. Figure J

Claims (1)

【特許請求の範囲】[Claims]  被制御装置の制御を行なうCPUに周期的な割込信号
を出力する割込信号出力回路を設けると共に、前記CP
Uが前記割込信号に対応して少くとも一つのコントロー
ル信号を発生するようになし、前記コントロール信号に
よつて前記割込信号発生回路の出力信号の周期よりも長
い所定時間、所定のレベルを維持する警報信号を出力す
る警報信号発生回路を設け、前記警報信号が前記所定の
レベルであるか否かによつて前記CPUが暴走している
か否かを検出することを特徴とするCPUの暴走検出回
路。
An interrupt signal output circuit for outputting periodic interrupt signals to a CPU that controls a controlled device is provided, and the CPU
U generates at least one control signal in response to the interrupt signal, and the control signal maintains a predetermined level for a predetermined period longer than the cycle of the output signal of the interrupt signal generation circuit. A CPU runaway characterized by providing an alarm signal generation circuit that outputs an alarm signal to be maintained, and detecting whether or not the CPU is running out of control depending on whether the alarm signal is at the predetermined level. detection circuit.
JP60207412A 1985-09-19 1985-09-19 Runaway detecting circuit for cpu Pending JPS6266341A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60207412A JPS6266341A (en) 1985-09-19 1985-09-19 Runaway detecting circuit for cpu

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60207412A JPS6266341A (en) 1985-09-19 1985-09-19 Runaway detecting circuit for cpu

Publications (1)

Publication Number Publication Date
JPS6266341A true JPS6266341A (en) 1987-03-25

Family

ID=16539313

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60207412A Pending JPS6266341A (en) 1985-09-19 1985-09-19 Runaway detecting circuit for cpu

Country Status (1)

Country Link
JP (1) JPS6266341A (en)

Similar Documents

Publication Publication Date Title
EP1724915B1 (en) Independent safety processor for disabling the operation of high power devices
KR970071268A (en) Monitoring system for electronic control device
JPS58201154A (en) Mode monitoring device of microcomputer
JPS6266341A (en) Runaway detecting circuit for cpu
JP2008276360A (en) Electronic control device
JP3724034B2 (en) Control circuit for production equipment
JP2821034B2 (en) Inverter
JP2758324B2 (en) Encoder
JPH0273451A (en) Controller
JPH0378402A (en) Start controller for motor vehicle
JPH03188515A (en) Soft power source off system
KR0133014Y1 (en) Abnormal state monitoring device of control device
JP2860817B2 (en) PWM controller
JPH0681039U (en) Watchdog circuit diagnostic device
JPS6213153Y2 (en)
JPH0418044Y2 (en)
JPS63204336A (en) Malfunction prevention method
JPH04359696A (en) Inverter device and how to operate the inverter device
JPH01124035A (en) Output data control device
JPH0751430B2 (en) Elevator control device
JPH0385651A (en) Connection state confirming device at input/output interface part
JPS6347280A (en) elevator control device
JPS63237101A (en) clock operating device
JPH05324407A (en) Cpu monitor system
KR960017353A (en) Diagnostic circuit of runaway detection circuit