JPH0381839A - Method for resetting system - Google Patents

Method for resetting system

Info

Publication number
JPH0381839A
JPH0381839A JP1219400A JP21940089A JPH0381839A JP H0381839 A JPH0381839 A JP H0381839A JP 1219400 A JP1219400 A JP 1219400A JP 21940089 A JP21940089 A JP 21940089A JP H0381839 A JPH0381839 A JP H0381839A
Authority
JP
Japan
Prior art keywords
program
signal
system reset
time
timer
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
JP1219400A
Other languages
Japanese (ja)
Inventor
Tomoji Ito
伊藤 知二
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.)
Toshiba Corp
Original Assignee
Toshiba Corp
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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP1219400A priority Critical patent/JPH0381839A/en
Publication of JPH0381839A publication Critical patent/JPH0381839A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To improve the reliability of the whole system by preparing timer circuits corresponding to respective programs, surely detecting program runaway in each program processing operation, and outputting a system reset signal. CONSTITUTION:The timer circuits 111 to 11n corresponding to n programs for processing process data inputted from a plant are connected and respective detection start signals SA1 to SAn, detection end signals ED1 to EDn and timer reset signals TR1 to TRn are inputted to these timer circuits 111 to 11n. Each timer circuit counts up the time required from the start of processing operation of its corresponding program up to the processing operation end and when the required time exceeds the allowable time, a program set signal PR1 or PRn is outputted. The output signal is used as the system reset signal SR of the whole system as it is through an OR circuit 12. Even if program runaway occurs in plural programs, each of them surely is detected and the signal SR is outputted, so that the reliability of the whole system sharply is improved.

Description

【発明の詳細な説明】 [発明の効果] (産業上の利用分野) 本発明はコンピュータ等の複数のプログラムを備えた情
報処理システムにおけるシステムリセット方式に係わり
、特に、各プログラム毎に該当プログラムが暴走したか
否かを検出して、確実にプログラム暴走を検出してシス
テムリセット信号を出力するようにしたシステムリセッ
ト方式に関する。
[Detailed Description of the Invention] [Effects of the Invention] (Industrial Application Field) The present invention relates to a system reset method in an information processing system such as a computer that includes a plurality of programs. The present invention relates to a system reset method that detects whether or not program runaway has occurred, reliably detects program runaway, and outputs a system reset signal.

(従来の技術) 例えば、工場等に配設されるプロセス制御システムにお
いては、制御対象としてのプラントから例えば一定周期
T0毎に出力されるプロセスデータに対して種々のデー
タ処理を順次実行していき、最終的にプラントへ送出す
る制御量を算出する。この場合、一般にデータ処理の種
類毎に独立したプログラムを複数個記憶させておき、一
つのプログラムによるデータ処理が終了すると、次のプ
ログラムを起動して次のデータ処理を実行するようにし
ている。
(Prior Art) For example, in a process control system installed in a factory, etc., various data processes are sequentially executed on process data outputted from the plant as a control target, for example, at regular intervals T0. , calculates the control amount to be finally sent to the plant. In this case, generally a plurality of independent programs are stored for each type of data processing, and when data processing by one program is completed, the next program is started to execute the next data processing.

なお、並行してデータ処理が可能なプログラムに対して
は複数のプログラムが並行的に処理動作される場合もあ
る。
Note that for programs that can process data in parallel, a plurality of programs may be processed in parallel.

そして、このようなプロセス制御装置において、データ
処理結果である制御量が一定周期T。毎に出力されない
場合はプログラム暴走している場合が多い。プログラム
暴走が発生すると、一定周期T0を越えたある時点で誤
ったデータ処理結果が出力され、誤った制御量がプラン
トへ送出される懸念がある。
In such a process control device, the control amount, which is the result of data processing, has a constant period T. If the output is not output every time, the program is likely to run out of control. When program runaway occurs, there is a concern that an incorrect data processing result will be output at a certain point beyond the fixed period T0, and an incorrect control amount will be sent to the plant.

このような事態になることを予め回避するために、一般
に、プロセス制御システムにはプログラムが暴走したこ
とを検出して全部のプログラムの処理動作状態を初期状
態に強制的に戻すシステムリセット信号を出力するシス
テムリセット機能が組込まれている。
To prevent this from happening, generally, a process control system outputs a system reset signal that detects when a program has run out of control and forcibly returns the processing operating state of all programs to their initial state. Built-in system reset function.

第9図および第10図は上述したシステムリセット機能
を具体的に示す回路図及びタイムチャートである。すな
わち、タイマ回路1内に、カウンタからなる計数部2.
計数部2ヘクロック信号を出力する発振器3、検出レベ
ル記憶部4、比較部5等が組込まれている。そして、一
連のプログラム処理動作状態始に先立って計数部2ヘタ
イマリセット信号TRTを出力する。そして、一連のプ
ログラム処理動作が終了して、新たなプロセスデータが
入力すると、このプロセスデータに対する一連のプログ
ラム処理動作の開始に先立って再度タイマリセット信号
TR↑を出力する。
FIGS. 9 and 10 are circuit diagrams and time charts specifically showing the system reset function described above. That is, within the timer circuit 1, there is a counting section 2. consisting of a counter.
An oscillator 3 that outputs a clock signal to the counting section 2, a detection level storage section 4, a comparison section 5, and the like are incorporated. Then, a timer reset signal TRT is output to the counter 2 prior to the start of a series of program processing operation states. When a series of program processing operations is completed and new process data is input, the timer reset signal TR↑ is output again before starting a series of program processing operations for this process data.

したがって、一連のプログラムが順番にかつ正常に動作
している場合には、計数部2へ一定周期T0毎にタイマ
リセット信号TRTが人力される。
Therefore, when a series of programs are operating in order and normally, the timer reset signal TRT is manually inputted to the counting section 2 at regular intervals T0.

よって、計数部2はタイマリセット信号TR〒が入力す
ると発振器3から入力されているクロック信号のクロッ
ク数の計数値を0ヘクリアする。そして、再度クロック
数の計数をOから開始する。
Therefore, when the timer reset signal TR is inputted, the counting section 2 clears the count value of the number of clocks of the clock signal inputted from the oscillator 3 to zero. Then, counting of the number of clocks is started again from O.

計数値CNは比較器5へ入力され、検出レベル記憶部4
に記憶されている許容値LDTと比較される。この許容
値LDTは検出レベル信号LDTにて予め検出レベル記
憶部4に設定されている。そして、許容値LDアは、正
常な周期T。でタイマリセット信号TR,が入力してい
る限りにおいては、計数値CNが到達しない値に設定さ
れている。
The count value CN is input to the comparator 5, and the detection level storage unit 4
It is compared with the tolerance value LDT stored in . This allowable value LDT is set in advance in the detection level storage section 4 using the detection level signal LDT. The allowable value LDA is a normal cycle T. As long as the timer reset signal TR is being input, the count value CN is set to a value that will not be reached.

したがって、正常時においては、計数値CNは許容値L
D↑より小さいので、比較部5からシステムリセット信
号SRが出力されることはない。
Therefore, under normal conditions, the count value CN is the allowable value L
Since it is smaller than D↑, the system reset signal SR is not outputted from the comparator 5.

ここで、例えば1つのプログラムの処理動作が別の処理
ステップへ移動したり、外来雑音によって、1つのプロ
グラムの内容が書き替えられたりすると、そのプログラ
ム処理動作が発散したりして、所定所要時間内に終了し
なくなる。したがって、一連のプログラム処理動作が許
容時間内に終了しなくなり、前述したタイマリセット信
号TRTは出力されなく、計数部3の計数値CNが検出
レベル記憶部4に記憶されている許容値LD〒を越える
。その結果、タイマ回路1からハイ(H)レベルのシス
テムリセット信号SRが出力される。
Here, for example, if the processing operation of one program moves to another processing step, or the contents of one program are rewritten due to external noise, the program processing operation may diverge, and the required time will be It will not end within Therefore, the series of program processing operations will not be completed within the permissible time, the above-mentioned timer reset signal TRT will not be output, and the count value CN of the counting unit 3 will not exceed the permissible value LD〒 stored in the detection level storage unit 4. exceed. As a result, the timer circuit 1 outputs a high (H) level system reset signal SR.

しかしながら、第9図および第10図に示すような構成
のシステムリセット方式においてもまだ次のような問題
がある。
However, the system reset method having the configuration shown in FIGS. 9 and 10 still has the following problems.

すなわち、前述したように、検出レベル記憶部4内に設
定される許容値LD、は、一連のプログラム処理動作の
開始から終了までの所要時間に対して余裕をみて設定さ
れた値である。よって、個々のプログラムの所要時間に
対する許容値ではない。
That is, as described above, the allowable value LD set in the detection level storage section 4 is a value set with a margin in mind for the time required from the start to the end of a series of program processing operations. Therefore, it is not an acceptable value for the time required for each individual program.

したがって、例えば、一つのプログラムが暴走して、該
当プログラムの所要時間が所定の所要時間より大幅に長
くなったとしても、他のプログラムに何等かの異常が生
じて、所要時間が短くなった場合には、両方の所要時間
が相殺されて、全体の所要時間に対応する計数値CNが
許容値LD。
Therefore, for example, even if one program runs out of control and the required time for that program becomes significantly longer than the specified required time, if some abnormality occurs in another program and the required time becomes shorter. In this case, both required times are canceled out, and the count value CN corresponding to the total required time is the allowable value LD.

以下になる場合がある。このような場合、タイマ回路1
はシステムリセット信号SRを出力しない。
The following may occur. In such a case, timer circuit 1
does not output the system reset signal SR.

よって、各プログラムが正常に処理動作したと見なされ
る。しかし、実際には、入力したプロセスデータは誤っ
てデータ処理されている。
Therefore, it is considered that each program has processed normally. However, in reality, the input process data is incorrectly processed.

(発明が解決しようとする課題) このように、従来のシステムリセット方式によれば、複
数のプログラムからなる一連のプログラムを一つのプロ
グラムと見なして、その合計所要時間に対応して許容時
間を設定して、その総合計の許容時間でもってプログラ
ム暴走の有無を監視していたので、複数のプログラムに
同時に異常が生じた場合には、正確にプログラム暴走を
検出できない問題があった。
(Problem to be Solved by the Invention) As described above, according to the conventional system reset method, a series of programs consisting of multiple programs is regarded as one program, and the allowable time is set according to the total time required. Since the presence or absence of program runaway was monitored based on the total allowable time, there was a problem in that program runaway could not be accurately detected when abnormalities occurred in multiple programs at the same time.

本発明はこのような事情に鑑みてなされたものであり、
各プログラム毎にタイマ回路を設けることによって、各
プログラム処理動作時におけるプログラム暴走を確実に
検出でき、直ちにシステムリセット信号を出力すること
によって、システム全体の信頼性を大幅に向上できるシ
ステムリセット方式を提供することを目的とする。
The present invention was made in view of these circumstances, and
By providing a timer circuit for each program, we can reliably detect program runaway during each program processing operation, and provide a system reset method that can greatly improve the reliability of the entire system by immediately outputting a system reset signal. The purpose is to

C発明の構成] (課題を解決するための手段) 上記課題を解消するために本発明は、複数のプログラム
における各プログラムの処理実行過程でプログラム処理
が暴走したときこのプログラム暴走を検出してシステム
リセット信号を出力するシステムリセット方式において
、 各プログラム毎に設けられ、該当プログラムの処理動作
開始から処理動作終了までの所要時間を計時し、この所
要時間が予め定められた許容時間を越えたときプログラ
ムリセット信号を出力する複数のタイマ回路と、この各
タイマ回路から出力されるプログラムリセット信号の論
理和信号をシステムリセット信号として出力する論理和
回路とを備えたちのでる。
C Configuration of the Invention] (Means for Solving the Problems) In order to solve the above problems, the present invention detects runaway program processing when program processing runs out of control in the processing execution process of each program in a plurality of programs. In the system reset method that outputs a reset signal, it is provided for each program and measures the time required from the start of the processing operation to the end of the processing operation of the corresponding program, and when the required time exceeds a predetermined allowable time, the program It includes a plurality of timer circuits that output reset signals, and an OR circuit that outputs a logical sum signal of program reset signals output from each of the timer circuits as a system reset signal.

また、別の発明においては、上記各手段に加えて、各タ
イマ回路へ予め設定する各許容時間は各プログラムの処
理内容に応じて各タイマ毎に設定できるようにしている
Further, in another invention, in addition to the above-mentioned means, each allowable time set in advance for each timer circuit can be set for each timer according to the processing content of each program.

(作用) このように構成されたシステムリセット方式によれば、
各プログラム毎にタイマ回路が設けられており、該当プ
ログラムの処理動作開始から処理動作終了までの所要時
間が計時され、その所要時間が許容時間を越えるとプロ
グラムリセット信号が出力される。そして、このプログ
ラムリセット信号が論理和回路を介してそのまま全体の
システムリセット信号となる。
(Operation) According to the system reset method configured in this way,
A timer circuit is provided for each program to measure the time required from the start of the processing operation to the end of the processing operation of the corresponding program, and when the required time exceeds the allowable time, a program reset signal is output. Then, this program reset signal directly becomes the entire system reset signal via the OR circuit.

すなわち、たとえ複数のプログラムに同時にプロゲラ、
ム暴走が生−じたとしても、確実に検出されシ・ステム
リセット信号が出力される。
That is, even if multiple programs are progera at the same time,
Even if a system runaway occurs, it is reliably detected and a system reset signal is output.

また、別の発明においては、各プログラム毎にそのプロ
グラムの処理内容に応じた許容時間が各タイマ回路に設
定される。すなわち、処理内容や処理時間が異なる種々
のプログラムが組込まれたシステムに最適条件で対応で
きる。
Further, in another invention, an allowable time is set in each timer circuit for each program according to the processing content of that program. In other words, it is possible to support a system in which various programs with different processing contents and processing times are incorporated under optimal conditions.

(実施例) 以下本発明の一実施例を図面を用いて説明する。(Example) An embodiment of the present invention will be described below with reference to the drawings.

第1図は実施例のシステムリセット方式を示すブロック
図である。なお、説明を簡単にするために、プロセス制
御システムに組込まれた場合について説明する。
FIG. 1 is a block diagram showing the system reset method of the embodiment. Note that to simplify the explanation, a case will be described in which the present invention is incorporated into a process control system.

プラントから入力されたプロセスデータをデータ処理す
るn個の各プログラム(1)〜(n)毎にタイマ回路1
1.〜11.が設けられており、各タイマ回路11+〜
11.には、それぞれ、検出レベル信号LD、検出開始
信号SA、−8A、、検出終了信号ED、〜ED、、 
タイマリセット信号TRl−TR,が入力される。そし
て、各タイマ回路11□〜11.からプログラム暴走時
に出力される各プログラムリセット信号PR,−PR。
A timer circuit 1 is provided for each of n programs (1) to (n) that process process data input from the plant.
1. ~11. are provided, and each timer circuit 11+~
11. , detection level signal LD, detection start signal SA, -8A, detection end signal ED, ~ED, , respectively.
A timer reset signal TRl-TR is input. And each timer circuit 11□-11. Each program reset signal PR, -PR is output when a program runs out of control.

は1個の論理和回路12を介してシステムリセット信号
SRとして出力される。また、各タイマ回路111〜1
1.には発振器13からクロック信号aが入力される。
is outputted as a system reset signal SR via one OR circuit 12. In addition, each timer circuit 111 to 1
1. A clock signal a is input from the oscillator 13 to the oscillator 13.

タイマ回路111は第2図に示すように構成されている
。例えば図示しないプロセッサから出力される該当プロ
グラム(1)に対する処理動作開始を示す検出開始信号
SA、がフリップフロップ14のセット端子Sへ人力さ
れ、同じく該当該当プログラム(1)に対する処理動作
終了を示す検出終了信号EN1がフリップフロップ14
のリセット端子Rへ入力される。フリップフロップ14
における出力端子Qの出力信号すがカウンタにて形成さ
れた計数部15のゲート端子Gへ入力される。
The timer circuit 111 is configured as shown in FIG. For example, a detection start signal SA indicating the start of the processing operation for the corresponding program (1) output from a processor (not shown) is inputted to the set terminal S of the flip-flop 14, and a detection signal SA indicating the end of the processing operation for the corresponding program (1) is also detected. End signal EN1 is sent to flip-flop 14
It is input to the reset terminal R of. flip flop 14
The output signal from the output terminal Q is input to the gate terminal G of the counting section 15 formed by a counter.

この計数部15のクロック端子CPには発振器13から
クロック信号aが入力される。計数部15はゲート端子
Gに入力されるフリップフロップ14の出力信号すがH
レベル期間中はクロック端子CPに印加されるクロック
信号aのクロック数を計数してその計数値CNを次の比
較器16へ送出する。
A clock signal a is input from the oscillator 13 to the clock terminal CP of the counting section 15 . The counting unit 15 receives the output signal SugaH of the flip-flop 14 which is input to the gate terminal G.
During the level period, the number of clocks of the clock signal a applied to the clock terminal CP is counted and the counted value CN is sent to the next comparator 16.

また、前記検出終了信号EN、はオアゲート17を介し
て計数部15のリセット端子Rへ入力される。゛また、
このリセット端子Rには前述したプロセッサから前記オ
アゲート17を介してタイマリセット信号TR,が入力
される。計数部15はリセット端子RにHレベル信号が
人力すると、前記計数値CNをOにリセットする。
Further, the detection end signal EN is inputted to the reset terminal R of the counting section 15 via the OR gate 17.゛Also,
A timer reset signal TR is inputted to this reset terminal R from the aforementioned processor via the OR gate 17. The counting section 15 resets the count value CN to O when an H level signal is input to the reset terminal R.

さらに、プロセッサから検出レベル信号LDが検出レベ
ル記憶部18へ入力される。検出レベル記憶部18は検
出レベル信号LDで設定された許容時間に対応する許容
値LDを記憶し、比較器16へ送出する。比較器16は
入力した計数値CNと許容値LDとを比較して、計数値
CNが許容値LDを越えるとHレベルのプログラムリセ
ット信号PR,を出力する。なお、許容値LDは各プロ
グラム(1)〜(n)を実行する場合の各所定所要時間
に所定の猶予時間を加算した許容時間に対応する値に設
定されている。この実施例では所定所要時間の約2倍に
設定されている。
Further, a detection level signal LD is input from the processor to the detection level storage section 18. The detection level storage unit 18 stores a tolerance value LD corresponding to the tolerance time set by the detection level signal LD, and sends it to the comparator 16. The comparator 16 compares the input count value CN and the allowable value LD, and when the count value CN exceeds the allowable value LD, outputs an H level program reset signal PR. Note that the allowable value LD is set to a value corresponding to the allowable time obtained by adding a predetermined grace time to each predetermined required time for executing each of the programs (1) to (n). In this embodiment, the time is set to approximately twice the predetermined required time.

なお、他のタイマ回路11□〜117も同一構成である
Note that the other timer circuits 11□ to 117 also have the same configuration.

このような回路構成を有したシステムリセット方式にお
いて、図示しないプロセッサは、プロセスデータが入力
すると、予め定められた順序で各プログラム(1)〜(
n)を順次実行していく。また、並行処理が可能なプロ
グラムに対しては複数のプログラムが同時に実行される
。そして、各プログラム(1)〜(n)は第3図の流れ
図に従って実行される。
In a system reset method having such a circuit configuration, when process data is input, a processor (not shown) executes each program (1) to (1) in a predetermined order.
n) in sequence. Furthermore, for programs that can be processed in parallel, multiple programs are executed simultaneously. Each of the programs (1) to (n) is executed according to the flowchart shown in FIG.

すなわち、一つのプログラムを実行する場合には、S(
ステップ)1にて該当プログラムに対応するタイマ回路
11へ検出レベル信号LDを送出する。次に、S2にて
同じく該当タイマ回路11へ検出開始信号SAを送出す
る。しかるのち、S3にて該当プログラムに対する実施
の処理を実行する。該当プログラムの処理が終了すると
84にて該当タイマ回路11へ検出終7信SENを出力
する。
In other words, when executing one program, S(
In step) 1, the detection level signal LD is sent to the timer circuit 11 corresponding to the corresponding program. Next, in S2, a detection start signal SA is similarly sent to the corresponding timer circuit 11. Thereafter, in S3, execution processing for the corresponding program is executed. When the processing of the corresponding program is completed, a detection end signal SEN is outputted to the corresponding timer circuit 11 at 84.

第4図は例えばプログラム(1)に対応するタイマ回路
111の動作を示すタイムチャートである。
FIG. 4 is a time chart showing the operation of the timer circuit 111 corresponding to, for example, program (1).

所定周期T0でプロセスデータが入力している状態にお
いては、プログラム(1)も所定周期T0で起動される
。そして、正常な場合には、プログラム処理動作の所要
時間が許容時間を越えことはないので、比較部16から
Hレベレのプログラムリセット信号PR,が出力される
ことはない。しかし、何等かの原因にて該当プログラム
(1)が暴走すると検出終了信号EN、が出力されない
ので、計数部15はリセットされなく、計数値CNが許
容値LDを越えて、比較部16からプログラムリセット
信号PR,が出力される。
In a state where process data is being input at a predetermined period T0, program (1) is also started at a predetermined period T0. In a normal case, the time required for the program processing operation does not exceed the allowable time, so the comparator 16 never outputs the program reset signal PR at the H level. However, if the corresponding program (1) goes out of control for some reason, the detection end signal EN is not output, so the counter 15 is not reset and the count value CN exceeds the allowable value LD, causing the comparator 16 to output the program. A reset signal PR is output.

タイマ回路11.から出力されたプログラムリセット信
号P Rrは論理和回路12を経てシステムリセット信
号SRとして出力される。システムリセット信号Sが出
力されると、現在実行中のプログラムを含めて全部のプ
ログラム(1)〜(n)が初期状態に戻る。
Timer circuit 11. The program reset signal PRr outputted from the logical sum circuit 12 is outputted as a system reset signal SR. When the system reset signal S is output, all programs (1) to (n) including the currently executing program return to their initial states.

他のプログラム(2)〜(n)に対しても同様の処理動
作を行う。
Similar processing operations are performed for other programs (2) to (n).

このように、各プログラム(1)〜(n)に対してそれ
ぞれ個別にタイマ回路111〜11.、を設けることに
よって、各プログラム毎にプログラム暴走を検出して、
システムリセット信号SRを出力するようにしている。
In this way, the timer circuits 111 to 11 . By providing , program runaway is detected for each program, and
A system reset signal SR is output.

したがって、従来方式のように、複数のプログラムで同
時にプログラム異常が生じて、各プログラム異常が互い
に相殺して、結果として、一連のプログラム処理動作の
所要時間が許容時間内に収まって、プログラム異常が検
出されないと言う事態を回避できる。
Therefore, unlike the conventional method, program abnormalities occur in multiple programs at the same time, and each program abnormality cancels out each other.As a result, the time required for a series of program processing operations falls within the allowable time, and the program abnormality occurs. It is possible to avoid the situation of not being detected.

よって、このシステムリセット方式を適用したシステム
の信頼性を大幅に向上できる。
Therefore, the reliability of the system to which this system reset method is applied can be greatly improved.

なお、タイマ回路11は第2図に示した実施例以外に種
々の回路が考えられる。例えば、計数部15のゲート端
子GをHレベル固定として、フリップフロップ14の出
力信号すと発振器13のクロック信号aとの論理積信号
をクロック端子CPへ印加することも可能である。
Note that various circuits other than the embodiment shown in FIG. 2 are conceivable for the timer circuit 11. For example, it is also possible to fix the gate terminal G of the counting section 15 at H level and apply the AND signal of the output signal of the flip-flop 14 and the clock signal a of the oscillator 13 to the clock terminal CP.

また、実施例では、フリップフロップ14.計数部15
.検出レベル記憶部18.比較部16とをそれぞれ個別
の回路部材で構成したが、初期値がプリセットできる減
算カウンタを用いてもよい。
Further, in the embodiment, the flip-flop 14. Counting part 15
.. Detection level storage unit 18. Although the comparator 16 is constructed of individual circuit members, a subtraction counter whose initial value can be preset may also be used.

この場合、初期値に許容値LDを設定して、この初期値
LDをクロック信号aにて減算していく。
In this case, an allowable value LD is set as the initial value, and this initial value LD is subtracted using the clock signal a.

そして、検出終了信号ENがリセット端子Rに入力する
と計数値CNを初期値LDに戻す。また、計数値CNが
0まで減算されるとプログラムリセット信号PRを出力
する。
Then, when the detection end signal EN is input to the reset terminal R, the count value CN is returned to the initial value LD. Furthermore, when the count value CN is subtracted to 0, a program reset signal PR is output.

第5図は本発明の他の実施例に係わるシステムリセット
方式を示すプロセッサ側のプログラム制御を示す流れ図
である。なお、各回路構成は第1図および第2図と同様
である。
FIG. 5 is a flowchart showing program control on the processor side showing a system reset method according to another embodiment of the present invention. Note that each circuit configuration is the same as in FIGS. 1 and 2.

流れ図が開始されると、S5にて実行しようとするプロ
グラムに対応するタイマ回路11へ検出終了信号ENを
送出する。次にプログラムの所定所要時間に対応する検
出レベル信号LDPを送出して、検出レベル記憶部18
に許容値LD、を設定する。次に、検出開始信号SAを
送出し、該当プログラムの処理を実行する。プログラム
処理が終了すると、検出終了信号ENを送出する。
When the flowchart starts, a detection end signal EN is sent to the timer circuit 11 corresponding to the program to be executed in S5. Next, a detection level signal LDP corresponding to a predetermined required time of the program is sent to the detection level storage section 18.
Set the allowable value LD to . Next, a detection start signal SA is sent out, and the processing of the corresponding program is executed. When the program processing is completed, a detection end signal EN is sent.

次に、S6にて、プログラム開始猶予時間′に対応する
検出レベル信号LD、を送出して、検出レベル記憶部1
8に許容値LDIを設定する。次に、S7にて検出開始
信号SAを送出する。
Next, in S6, the detection level signal LD corresponding to the program start grace time is sent to the detection level storage unit 1.
Set the allowable value LDI to 8. Next, in S7, a detection start signal SA is sent out.

S8にて次のプロセスデータ入力があれば、S5へ戻り
、検出終了信号ENを出力して、次のデータ処理のため
のプログラム処理を開始する。
If the next process data is input in S8, the process returns to S5, outputs the detection end signal EN, and starts program processing for the next data process.

なお、S8にて次のプロセスデータが入力されていなけ
れば、プロセス制御システム自体が停止したか、プロセ
スデータ入力が停止されたので、検出修了信号ENを出
力してこの異常検出動作を停止させる。
Note that if the next process data is not input in S8, either the process control system itself has stopped or the process data input has been stopped, so the detection completion signal EN is output to stop this abnormality detection operation.

第6図は、第5図の流れ図に従って、各信号LDp 、
LDt 、SA、EDを送出した場合のタイマ回路11
の動作を示すタイムチャートである。
FIG. 6 shows each signal LDp,
Timer circuit 11 when sending LDt, SA, and ED
3 is a time chart showing the operation of FIG.

このような構成のシステムリセット方式であれば、一つ
のプロセスデータに対するプログラム処理動作が修了し
てから、次のプロセスデータに対するプログラム処理動
作開始までの時間が許容時間を越えた場合は、何等かの
異常が生じてプログラムが起動されなかったと判断して
、プログラム暴走時と同様にプログラムリセット信号P
Rが出力される。
If the system reset method has such a configuration, if the time from the completion of the program processing operation for one process data to the start of the program processing operation for the next process data exceeds the allowable time, something will happen. It is determined that an error has occurred and the program has not been started, and the program reset signal P is sent as in the case of program runaway.
R is output.

すなわち、この実施例においては、プログラム処理動作
期間およびプログラム処理動作停止期間において異常が
生じた場合にはシステムリセット信号SRが出力される
ので、システム全体の信頼性をさらに向上できる。
That is, in this embodiment, if an abnormality occurs during the program processing operation period and the program processing operation stop period, the system reset signal SR is output, so that the reliability of the entire system can be further improved.

第7図は本発明のさらに別の実施例に係わるシステムリ
セット方式を示すプロセッサ側のプログラム制御を示す
流れ図である。なお、各回路構成は第1図および第2図
と同様である。
FIG. 7 is a flowchart showing program control on the processor side, showing a system reset method according to yet another embodiment of the present invention. Note that each circuit configuration is the same as in FIGS. 1 and 2.

この実施例においては、各プログラム(1)〜(n)に
対応する各タイマ回路11.〜11.の各検出レベル記
憶部18へ設定する許容値LDを各プログラム(1〉〜
(n)の処理内容および処理動作時間に応じて、各プロ
グラム(1)〜(n)毎に設定するようにしている。
In this embodiment, each timer circuit 11.corresponds to each program (1) to (n). ~11. Each program (1>~
It is set for each program (1) to (n) according to the processing content and processing operation time of (n).

すなわち、流れ図が開始されると、S9にて今回実行す
べきプログラムを判断して、実行するプログラムが決定
すると、該当プログラムに対して予め設定された許容時
間に対応する検出レベル信号LDを該当タイマ回路11
へ送出して、検出レベル記憶部18に対応する許容値L
Dを設定する。
That is, when the flowchart is started, the program to be executed this time is determined in S9, and when the program to be executed is determined, the detection level signal LD corresponding to the permissible time set in advance for the corresponding program is sent to the corresponding timer. circuit 11
to the detection level storage unit 18 and store the corresponding tolerance value L in the detection level storage unit 18.
Set D.

このように、各プログラム(1)〜(n)毎に該当プロ
グラムに最適の許容時間LD、〜LD、を設定できるの
で、プロセスデータをデータ処理する場合に、各データ
処理に対応した最適処理長さのプログラムを設計するこ
とが可能となる。
In this way, the optimal allowable time LD, ~LD, can be set for each program (1) to (n), so when processing process data, the optimal processing length corresponding to each data processing can be set. This makes it possible to design a program that is easy to use.

ちなみに、許容時間を全部のプログラム(1)〜(n)
に亘って一定値LDに設定した場合には、各プログラム
においてプログラム暴走が発生して、システムリセット
信号SRが出力されるまでの時間が一定しないので、プ
ログラムによっては長時間暴走状態が継続して、その間
に他のプログラムに悪影響を与える懸念があった。よっ
て従来方式においては、各プログラムの所要時間が大き
く異な4ないように各プログラムを設計する必要かあっ
た。
By the way, the allowable time for all programs (1) to (n)
If a constant value LD is set for a long time, program runaway occurs in each program and the time until the system reset signal SR is output is not constant, so some programs may remain in a runaway state for a long time. , there were concerns that it would have a negative impact on other programs during that time. Therefore, in the conventional system, it is necessary to design each program so that the time required for each program does not vary greatly.

第8図は本発明のさらに別の実施例に係わるシステムリ
セット方式を示すプロセッサ側のプログラム制御を示す
流れ図である。なお、各回路構成は第1図および第2図
と同様である。
FIG. 8 is a flowchart showing program control on the processor side, showing a system reset method according to yet another embodiment of the present invention. Note that each circuit configuration is the same as in FIGS. 1 and 2.

この実施例は、各プログラム(1)〜(n)が時系列的
に実行される場合を示し、それぞれのプログラム(X)
 、 (Y) 、 (Z)の各所要時間が比較的長い場
合で、かつ各所要時間が大きく異なる場合を示す。
This example shows a case where each program (1) to (n) is executed in chronological order, and each program (X)
, (Y), and (Z) are relatively long, and the required times are significantly different.

したがって、各プログラム毎対応する許容値LDx 、
LDy 、LDzの値がそれぞれ異なる。
Therefore, the corresponding tolerance value LDx for each program,
The values of LDy and LDz are different.

すなわち、流れ図が開始されると、S10にて先頭のプ
ログラム(X)の所定所要時間に対応する検出レベル信
号LDXを該当プログラムに対応するタイマ回路11x
へ送出する。そして、該当タイマ回路11xへ検出開始
信号SAを送出し、実際のプログラム(X)の処理を行
う。プログラム処理が終了すると、該当タイマ回路11
xへ検出終了信号ENを送出する。
That is, when the flowchart is started, in S10, the detection level signal LDX corresponding to the predetermined required time of the first program (X) is sent to the timer circuit 11x corresponding to the program.
Send to. Then, a detection start signal SA is sent to the corresponding timer circuit 11x, and the actual program (X) is processed. When the program processing is completed, the corresponding timer circuit 11
A detection end signal EN is sent to x.

以上で一つのプログラム(X)に対する処理が終了した
ので、S11にて次のプログラム(Y)に対するプログ
ラム処理を開始する。そして、同様な手順でプログラム
(Y)に対するプログラム処理が終了すると、S12以
降にて最終のプログラム(Z)に対するプログラム処理
を実行する。
Since the processing for one program (X) has been completed above, the program processing for the next program (Y) is started in S11. Then, when the program processing for the program (Y) is completed in the same procedure, the program processing for the final program (Z) is executed from S12 onwards.

次に、このように各プログラムを時系列的に実行する場
合のプログラム暴走を検出する特徴を説明する。
Next, the feature of detecting program runaway when each program is executed in chronological order as described above will be explained.

例えば、各プログラム(X) 、 (Y) 、 (Z)
の所要時間をそれぞれ5ss、  1sec 、  1
0secと大きく離れている場合においては、全体の所
要時間は11.05secとなる。この場合、第9図に
示した従来手法によると、全体の許容時間は例えば15
 secとなる。
For example, each program (X), (Y), (Z)
The required time is 5ss, 1sec, 1, respectively.
In the case of a large distance of 0 sec, the total required time is 11.05 sec. In this case, according to the conventional method shown in FIG. 9, the total allowable time is, for example, 15
sec.

この場合、最初にプログラム(X)が実行されるので、
プログラム(X)にプログラム暴走が生じた場合には、
暴走が発生してから約15秒経過した後にシステムリセ
ット信号SRが出力されることになる。この15秒間は
暴走状態が継続しているので、その15秒間に誤った制
御量がプラントへ送出される懸念かあ−る。
In this case, program (X) is executed first, so
If program runaway occurs in program (X),
The system reset signal SR will be output about 15 seconds after the runaway occurs. Since the runaway state continues for these 15 seconds, there is a concern that an incorrect control amount may be sent to the plant during those 15 seconds.

しかし、第8図の実施例においては、上記15秒間の許
容時間を各プログラム(X) 、 (Y) 、 (Z)
に割り振って各プログラム(X) 、 (Y) 、 (
Z)毎にプログラムの所要時間に対応した各許容時間を
設定することによって、たとえプログラム暴走が発生し
たとしても、そのプログラム暴走の継続時間を最小限に
抑制できる。したがって、システムの安全性をさらに向
上できる。
However, in the embodiment shown in FIG. 8, each program (X), (Y), (Z)
and each program (X), (Y), (
By setting each allowable time corresponding to the required time of the program for each program (Z), even if a program runaway occurs, the duration of the program runaway can be minimized. Therefore, the safety of the system can be further improved.

[発明の効果] 以上説明したように本発明のシステムリセット方式によ
れば、各プログラム毎にプログラム処理動作開始から処
理動作終了までの所要時間を計時するタイマ回路を設け
、所要時間が許容時間を越えるとシステムリセット信号
を送出するようにしている。したがって、各プログラム
処理動作時における各プログラム暴走を確実に検出でき
、直ちにシステムリセット信号を出力することによって
、全部のプログラムを初期状態に強制的に戻すことがで
き、システム全体の信頼性を大幅に向上できる。
[Effects of the Invention] As explained above, according to the system reset method of the present invention, a timer circuit is provided for each program to measure the time required from the start of the program processing operation to the end of the processing operation, and the required time is set to the allowable time. When the limit is exceeded, a system reset signal is sent. Therefore, it is possible to reliably detect each program runaway during each program processing operation, and by immediately outputting a system reset signal, all programs can be forcibly returned to their initial state, greatly improving the reliability of the entire system. You can improve.

また、各プログラム毎に許容時間を設定することによっ
て、より短時間でプログラム暴走を検出でき、上記信頼
性をさらに向上できる。
Further, by setting a permissible time for each program, program runaway can be detected in a shorter time, and the reliability can be further improved.

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

第1図乃至第4図は本発明の一実施例に係わるシステム
リセット方式を示すものであり、第1図は全体の構成を
示すブロック図、第2図はタイマ回路を示すブロック図
、第、3図は動作を示す流れ図、第4図は動作を示すタ
イムチャートであり、第5図は本発明の他の実施例に係
わるシステムリセット方式の動作を示す流れ図、第6図
は同実施例方式の動作を示すタイムチャート、第7図お
よび第8図はそれぞれ本発明のさらに別の実施例に係わ
るシステムリセット方式の動作を示す流れ図、第9図は
従来のシステムリセット方式を示すブロック図、第10
図は同従来方式の動作を示すタイムチヤードである。 11□〜11.・・・タイマ回路、12・・・論理和回
路、13・・・発振器、14・・・フリップフロップ、
15・・・計数部、16・・・比較部、17・・・オア
ケート、18・・・検出レベル記憶部。
1 to 4 show a system reset method according to an embodiment of the present invention, FIG. 1 is a block diagram showing the overall configuration, FIG. 2 is a block diagram showing a timer circuit, 3 is a flowchart showing the operation, FIG. 4 is a time chart showing the operation, FIG. 5 is a flowchart showing the operation of the system reset method according to another embodiment of the present invention, and FIG. 6 is the method of the same embodiment. 7 and 8 are flowcharts showing the operation of a system reset method according to still another embodiment of the present invention, and FIG. 9 is a block diagram showing the conventional system reset method, and FIG. 10
The figure is a time chart showing the operation of the conventional method. 11□〜11. ... timer circuit, 12 ... OR circuit, 13 ... oscillator, 14 ... flip-flop,
15... Counting section, 16... Comparing section, 17... Orate, 18... Detection level storage section.

Claims (2)

【特許請求の範囲】[Claims] (1)複数のプログラムにおける各プログラムの処理実
行過程でプログラム処理が暴走したときこのプログラム
暴走を検出してシステムリセット信号を出力するシステ
ムリセット方式において、各プログラム毎に設けられ、
該当プログラムの処理動作開始から処理動作終了までの
所要時間を計時し、この所要時間が予め定められた許容
時間を越えたときプログラムリセット信号を出力する複
数のタイマ回路と、この各タイマ回路から出力されるプ
ログラムリセット信号の論理和信号をシステムリセット
信号として出力する論理和回路とを備えたシステムリセ
ット方式。
(1) In a system reset method that detects program runaway when program processing runs out of control during the processing execution process of each program in a plurality of programs and outputs a system reset signal, a system reset signal is provided for each program.
A plurality of timer circuits that measure the time required from the start of the processing operation to the end of the processing operation of the applicable program and output a program reset signal when the required time exceeds a predetermined allowable time, and an output from each of these timer circuits. A system reset method that includes an OR circuit that outputs an OR signal of program reset signals that are output as a system reset signal.
(2)各タイマ回路へ予め設定する各許容時間は各プロ
グラムの処理内容に応じて各タイマ毎に設定されること
を特徴とする請求項1記載のシステムリセット方式。
(2) The system reset method according to claim 1, wherein each allowable time set in advance for each timer circuit is set for each timer according to the processing content of each program.
JP1219400A 1989-08-25 1989-08-25 Method for resetting system Pending JPH0381839A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1219400A JPH0381839A (en) 1989-08-25 1989-08-25 Method for resetting system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1219400A JPH0381839A (en) 1989-08-25 1989-08-25 Method for resetting system

Publications (1)

Publication Number Publication Date
JPH0381839A true JPH0381839A (en) 1991-04-08

Family

ID=16734820

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1219400A Pending JPH0381839A (en) 1989-08-25 1989-08-25 Method for resetting system

Country Status (1)

Country Link
JP (1) JPH0381839A (en)

Similar Documents

Publication Publication Date Title
US4566111A (en) Watchdog timer
JPH0528063A (en) Microcomputer
JPH0381839A (en) Method for resetting system
JPH06168163A (en) Method and device for monitoring cpu
US4710928A (en) Method and apparatus for detecting the uncontrollable operation of a control system
JPH0346853B2 (en)
JPS5855535B2 (en) Multi-computer device for vehicles
JPS59148961A (en) Monitoring system of operation of processor
JPH04283840A (en) Diagnostic method for information processor
JPH09160808A (en) Flow monitor device for program
JP3147054B2 (en) Microprocessor diagnostic device
JPH05257748A (en) Microprocessor device
JPS6051141B2 (en) Program runaway detection method
JPS5936786B2 (en) Failure detection device for weighing machine control
JPS60198649A (en) Loop detection control system
JPH02150942A (en) Bus abnormality detecting circuit
JPS60243751A (en) Supervisory circuit of incorrect interruption in computer
JPS5834855B2 (en) Computer monitoring method
JPH05143375A (en) Processor malfunction monitoring device
JPH02114339A (en) Cpu monitoring device
JPH0375882B2 (en)
JPH02246726A (en) Method of detecting monitoring failure of digital relay
JPS61177548A (en) Retrying control system
JPH01193945A (en) System for detecting program error
JPS58158747A (en) Programable controller