JPH0434170B2 - - Google Patents

Info

Publication number
JPH0434170B2
JPH0434170B2 JP61247640A JP24764086A JPH0434170B2 JP H0434170 B2 JPH0434170 B2 JP H0434170B2 JP 61247640 A JP61247640 A JP 61247640A JP 24764086 A JP24764086 A JP 24764086A JP H0434170 B2 JPH0434170 B2 JP H0434170B2
Authority
JP
Japan
Prior art keywords
clock pulse
monitoring
value
preset
clk
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
JP61247640A
Other languages
Japanese (ja)
Other versions
JPS63101917A (en
Inventor
Takeshi Sugawara
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.)
Kyosan Electric Manufacturing Co Ltd
Original Assignee
Kyosan Electric Manufacturing 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 Kyosan Electric Manufacturing Co Ltd filed Critical Kyosan Electric Manufacturing Co Ltd
Priority to JP61247640A priority Critical patent/JPS63101917A/en
Publication of JPS63101917A publication Critical patent/JPS63101917A/en
Publication of JPH0434170B2 publication Critical patent/JPH0434170B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Multi Processors (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、複数のプロセツサを備える制御装置
において、各プロセツサが用いる共通のクロツク
パルスに周波数の異常等が生じたか否かの監視を
行なう方法に関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a method for monitoring whether or not a frequency abnormality has occurred in a common clock pulse used by each processor in a control device equipped with a plurality of processors. It is something.

〔従来の技術〕[Conventional technology]

鉄道の信号保安用制御装置等においては、高信
頼性と共にフエールセーフ性が要求され、複数の
プロセツサを備える装置が一般に採用されてお
り、その一例を挙げれば第4図のブロツク図に示
すとおりとなつている。
In railway signal safety control equipment, etc., high reliability and fail-safe performance are required, and equipment equipped with multiple processors is generally employed.One example of this is shown in the block diagram of Figure 4. It's summery.

すなわち、マイクロプロセツサ等を用いた同一
形式のプロセツサ(以下、CPU)11,12を設
け、各々に対し、各同一形式の固定メモリ(以
下、ROM)21,22、可変メモリ(以下、
RAM)31,32および入出力回路(以下、I/
O)41,42を周辺に配したうえ、これらを各組
毎に母線51,52により接続し、CPU11,12
対しては、発振器(以下、OSC)6から共通の
クロツクパルスCLKCを供給しており、これに基
づき、CPU11,12が互いに同期して制御動作を
行なつている。
That is, processors (hereinafter referred to as CPUs) 1 1 and 1 2 of the same type using microprocessors or the like are provided, and fixed memories (hereinafter referred to as ROMs) 2 1 and 2 2 of the same type and variable memories (hereinafter referred to as ROM) 2 1 and 2 2 of the same type are provided for each processor. below,
RAM) 3 1 , 3 2 and input/output circuit (hereinafter referred to as I/
O) 4 1 and 4 2 are arranged around the periphery, and each set is connected by bus bars 5 1 and 5 2 , and the CPUs 1 1 and 1 2 are connected to a common oscillator (hereinafter referred to as OSC) 6. A clock pulse CLK C is supplied, and based on this, the CPUs 1 1 and 1 2 perform control operations in synchronization with each other.

ここにおいて、CPU11,12は、ROM21,2
中へ格納されている同一の命令を各個に実行し、
RAM31,32に対し必要とするデータをアクセ
スしながら各種演算処理を含む制御動作を互いに
並行して行ない、I/O41,42を介する入力デ
ータに応じて制御上の判断を行なつたうえ、I/
O41,42を介して制御データの送出を行なつて
おり、制御動作中には、入力データの周波数判
別、入力データに応ずるタイマー動作等の時間的
処理を含むものとなつている。
Here, CPU1 1 , 1 2 is ROM2 1 , 2
Execute the same instructions stored in 2 individually,
Control operations including various arithmetic operations are performed in parallel with each other while accessing necessary data from RAM3 1 and 32 , and control decisions are made according to input data via I/Os 41 and 42 . Taue, I/
Control data is sent via O4 1 and O4 2 , and the control operation includes time processing such as frequency determination of input data and timer operation according to input data.

したがつて、時間的処理は、OSC6からのク
ロツクパルスCLKCを基準として実行され、これ
の周波数変化、発振不安定等が生ずれば、時間的
処理の結果に誤りを生じ、制御状況が危険側とな
るおそれを招来するため、別途に監視用のクロツ
クパルスCLKSを発生するOSC7を設け、これに
よつてクロツクパルスCLKCと同一周波数のクロ
ツクパルスCLKSを発生しており、これをCPU1
,12の各々と対応するカウンタ(以下、CUT)
1,82へ各個与え、これによつてクロツクパル
スCLKSのカウントを各個に行なわせている。
Therefore, temporal processing is executed based on the clock pulse CLK C from OSC 6, and if this frequency changes or oscillation becomes unstable, the temporal processing results will be incorrect and the control situation may become dangerous. To prevent this, an OSC 7 that generates a clock pulse CLK S for monitoring is separately provided, and this generates a clock pulse CLK S with the same frequency as the clock pulse CLK C , which is sent to the CPU 1.
Counters corresponding to each of 1 , 1 and 2 (hereinafter referred to as CUT)
8 1 and 8 2 respectively, thereby causing each clock pulse CLK S to be counted.

一方、CPU11,12は、クロツクパルスCLKC
に基づくタイマー処理により一定周期のタイミン
グを規定し、これに応じてCUT81,82の各カ
ウント値をチエツクすると共に、CUT81,82
に対しリセツトおよびカウントの再開を指令して
おり、CUT81,82は一定周期毎にクロツクパ
ルスCLKSのカウントを反復することにより、ク
ロツクパルスCLKCとCLKSとの周波数が同一で
あれば、一定周期間の各カウント値が常に一定で
あるのに対し、クロツクパルスCLKCの発生状況
に異常を生ずれば一定周期が変動し、これに応じ
てチエツク時点の各カウント値が一定外となるた
め、これによつてクロツクパルスCLKCの異常を
判断するものとなつている。
On the other hand, CPUs 1 1 and 1 2 use the clock pulse CLK C
The timing of a certain period is defined by timer processing based on , and the count values of CUT8 1 and 8 2 are checked accordingly.
The CUTs 81 and 82 repeat counting the clock pulse CLK S at regular intervals, so that if the frequencies of the clock pulses CLK C and CLK S are the same, the clock pulses CLK C and CLK S are kept constant. While each count value between cycles is always constant, if an abnormality occurs in the generation status of clock pulse CLK C , the constant cycle will fluctuate, and accordingly, each count value at the time of check will be outside the constant range. This is used to determine whether the clock pulse CLK C is abnormal.

また、CUT81,82の各カウント値を含む母
線51,52の各データビツトは比較器(以下、
CMP)9により常時比較されており、両入力の
一致に応じて交番信号を送出し、これをI/O4
,42へ与えI/O41,42の出力データを交番
信号状としているが、両入力の不一致に応じて交
番信号を一定レベルへ固定するため、I/O41
2の出力データも一定レベルとなり、出力デー
タを受取る回路において、交番信号を整流し制御
出力としていることにより、CPU11,12の制御
動作に不一致を生ずれば制御出力が消滅し、リレ
ー等が必ず復旧して制御状況が安全側となる。
In addition, each data bit of bus lines 5 1 and 5 2 including each count value of CUT 8 1 and 8 2 is connected to a comparator (hereinafter referred to as
CMP) 9, and when both inputs match, an alternating signal is sent out and this is sent to the I/O4.
The output data of I/Os 4 1 and 4 2 supplied to I/Os 4 1 and 4 2 is in the form of an alternating signal.
The output data of CPU 1 1 and 1 2 is also at a constant level, and in the circuit that receives the output data, the alternating signal is rectified and used as a control output, so if there is a mismatch between the control operations of CPU 1 1 and 1 2 , the control output disappears, and the relay etc. will definitely recover and the control situation will be on the safe side.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

しかし、第4図の構成においては、CUT81
2を2個必要とし、構成が複雑化すると共に、
CUT81,82のカウント値に1カウントの差で
も発生すれば、実用上特に支障のない場合であつ
てもCMP9の交番信号が一定レベルとなり、制
御動作の停止が必要以上に行なわれる問題を生じ
ている。
However, in the configuration shown in FIG. 4, CUT8 1 ,
8 2 is required, the configuration becomes complicated, and
If even a one-count difference occurs between the count values of CUT81 and CUT82 , the alternating signal of CMP9 will be at a constant level even in cases where there is no practical problem, causing the problem that the control operation will be stopped more than necessary. It is occurring.

〔問題点を解決するための手段〕[Means for solving problems]

前述の問題を解決するため、本発明はつぎの手
段により構成するものとなつている。
In order to solve the above-mentioned problem, the present invention is constructed by the following means.

すなわち、上述の制御装置において、共通のク
ロツクパルスと同一周波数の監視用クロツクパル
スを別途に発生し、この監視用クロツクパルスを
プリセツタブルカウンタによりカウントすると共
に、共通のクロツクパルスに基づく一定周期毎の
タイミングにより前記カウンタへ交互に異なる初
期値をプリセツトし、このプリセツトの直前にお
ける前記カウンタのカウント値と初期値へ一定周
期の間の監視用クロツクパルスによるカウント数
を加算した値とを比較し、この比較結果の不一致
により共通のクロツクパルスに異常の生じたもの
と判断している。
That is, in the above-mentioned control device, a monitoring clock pulse having the same frequency as the common clock pulse is separately generated, and this monitoring clock pulse is counted by a presettable counter, and the monitoring clock pulse is counted by a presettable counter, and the above-mentioned clock pulse is generated at regular intervals based on the common clock pulse. Different initial values are alternately preset to the counter, and the count value of the counter immediately before presetting is compared with the value obtained by adding the count number generated by the monitoring clock pulse during a certain period to the initial value. Therefore, it was determined that an abnormality occurred in the common clock pulse.

〔作用〕[Effect]

したがつて、一定周期毎のカウント値が交互に
異なり、プリセツタブルカウンタおよび監視用ク
ロツクパルスの異常も監視できると共に、これら
および共通のクロツクパルスが正常であれば、一
定周期毎のカウント値が常に予測値どおりとなる
のに対し、共通のクロツクパルスに異常を生ずれ
ばカウント値と予測値とが不一致となる。
Therefore, the count value at each fixed period is alternately different, and it is possible to monitor abnormalities in the presettable counter and the monitoring clock pulse.If these and the common clock pulse are normal, the count value at each fixed period can always be predicted. However, if an abnormality occurs in the common clock pulse, the count value and the predicted value will not match.

〔実施例〕〔Example〕

以下、実施例を示す図によつて本発明の詳細を
説明する。
Hereinafter, details of the present invention will be explained with reference to figures showing examples.

第1図は構成を示すブロツク図であり、第4図
とほぼ同様であるが、共通のクロツクパルス
CLKCと同一周波数の監視用クロツクパルス
CLKSを別途に発生するOSC7の出力は、プリセ
ツタブルカウンタ(以下、PCT)11へ与えら
れ、これがクロツクパルスCLKSのカウントを行
なうものになつていると共に、PCT11と母線
1,52との間には、双方向および単方向のバツ
フア回路(以下、BAF)12,13が各個に挿
入されている。
Figure 1 is a block diagram showing the configuration, which is almost the same as Figure 4, but with a common clock pulse.
Monitoring clock pulse with the same frequency as CLK C
The output of the OSC 7, which separately generates CLK S , is given to a presettable counter (hereinafter referred to as PCT) 11 , which counts the clock pulse CLK S. Bidirectional and unidirectional buffer circuits (hereinafter referred to as BAF) 12 and 13 are respectively inserted between them.

第2図は、第1図における各部の動作状況およ
び波形を示すタイミングチヤートであり、この例
では、CPU11がクロツクパルスCLKCに基づく
タイマー処理により一定周期Tのタイミングaを
定め、これに応ずる割込処理により、PCT11
に対しBAF12を介して異なる初期値Aまたは
Bを一定周期T毎にプリセツトすると共に、この
プリセツト直前におけるPCT11のカウント値
をCPU11,12が各々BAF12,13を介して
交互に読込み、カウント値のチエツクを行なうも
のとなつている。
FIG. 2 is a timing chart showing the operating status and waveforms of each part in FIG . By processing, PCT11
, a different initial value A or B is preset at regular intervals T via the BAF 12, and the CPUs 1 1 and 1 2 alternately read the count value of the PCT 11 immediately before this preset via the BAF 12 and 13, and calculate the count value. It is designed to check the following.

したがつて、タイミングa毎にPCT11へ初
期値AおよびBが交互にプリセツトされ、これを
基準としてPCT11がクロツクパルスCLKSbの
カウントを一定周期Tの間行ない、これを反復す
るものとなり、この間のカウント数をnとすれ
ば、PCT11のカウント内容をcに示すとおり、
初期値Aがプリセツトされた一定周期Tの終了す
る直前ではカウント値がA+n、初期値Bがプリ
セツトされた一定周期Tの終了する直前ではカウ
ント値がB+nとなり、プリセツト値に応じてA
+nまたはB+nを予測値として用い、この予測
値とカウント値とを比較し、一致していれば正
常、不一致であればクロツクパルスCLKCの異常
またはOSC7乃至PCT11の異常と判断できる。
Therefore, the initial values A and B are alternately preset to the PCT 11 at each timing a, and the PCT 11 counts the clock pulses CLK S b for a fixed period T based on these values, and this is repeated. If the count number is n, the count contents of PCT11 are as shown in c.
Immediately before the end of the constant period T for which the initial value A is preset, the count value becomes A+n, and just before the end of the constant period T for which the initial value B is preset, the count value becomes B+n, and then the count value changes to A according to the preset value.
Using +n or B+n as a predicted value, this predicted value and the count value are compared, and if they match, it is determined that the clock pulse CLK C is abnormal, or if they do not match, it is determined that the clock pulse CLK C is abnormal or the OSC7 to PCT11 are abnormal.

なお、初期値をAまたはBのみとすれば、A+
nまたはB+nのカウント値となつたときに
PCT11がカウントを停止した場合、OSC7乃
至PCT11の異常であるにもかかわらずカウン
ト値と予測値とが常に一致し、これらの異常が判
断不能となる。
Note that if the initial value is only A or B, then A+
When the count value reaches n or B+n
When the PCT 11 stops counting, the count value always matches the predicted value even though there is an abnormality in the OSC 7 to PCT 11, and these abnormalities cannot be determined.

第3図は、CPU11が行なう割込処理のフロー
チヤートであり、第2図のタイミングaに応じて
実行され、BAF12を介する「PCTのカウント
値NC読込み」101を行なつてから、後述の
「偶数フラグ・セツト?」102をチエツクし、
これがY(YES)であれば初期値Aのプリセツト
された一定周期であるため、「NC=A+n?」1
11を判断し、これがYのときは正常であり、
「偶数フラグ・リセツト」112を行なつてから
「PCTへBプリセツト」113を行ない、主ルー
チンへ復帰する。
FIG. 3 is a flowchart of the interrupt processing performed by the CPU 11 , which is executed in accordance with timing a in FIG . Check "Even number flag set?" 102,
If this is Y (YES), it is a preset constant period of initial value A, so "N C = A + n?" 1
11 is judged, and if this is Y, it is normal,
After performing "even flag reset" 112, "B preset to PCT" 113 is performed, and the process returns to the main routine.

一方、ステツプ102がN(NO)のときは、
初期値Bのプリセツトされた一定周期であり、
「NC=B+n?」121を判断し、これがYであ
れば正常なため、「偶数フラグ・セツト」123
を行ない、「PCTへAプリセツト」124を行な
つてから主ルーチンへ復帰する。
On the other hand, when step 102 is N (NO),
It is a preset constant period of initial value B,
Determine “N C = B + n?” 121, and if it is Y, it is normal, so “Even number flag set” 123
After performing "A preset to PCT" 124, the program returns to the main routine.

以上に対し、ステツプ111または121によ
る比較結果が不一致であり、いずれかがNとなれ
ば「異常処理」131へ移行し、制御停止、警報
表示等を行なう。
Regarding the above, if the comparison result at step 111 or 121 is non-coincidence, and either one is N, the process moves to "abnormality processing" 131, where control is stopped, an alarm is displayed, etc.

なお、CPU12においては、プリセツトを行な
わずともよいが、CMP9との関係上、同一処理
とすればよい。
It should be noted that the CPU 12 does not need to perform presetting, but due to the relationship with the CMP 9, the same processing may be performed.

したがつて、単一のPCT11により十分目的
が達せられると共に、複数のカウンタを用いてい
ないため、必要以上の制御停止を生ぜず、制御状
況が安定となる。
Therefore, the purpose can be sufficiently achieved with a single PCT 11, and since a plurality of counters are not used, there is no need to stop the control more than necessary, and the control situation becomes stable.

ただし、CPU11,12乃至I/O41,42の構
成を3組以上の多重プロセツサ・システムとした
場合にも適用できると共に、一定周期Tのタイミ
ングを別途のタイマーにより行ない、これをクロ
ツクパルスCLKCにより動作させてもよく、カウ
ント値の比較に許容範囲を設けてもよい等、種々
の変形が自在である。
However, it can also be applied to the case where the configuration of the CPU 1 1 , 1 2 to the I/O 4 1 , 4 2 is a multiprocessor system with three or more sets, and the timing of the constant period T is performed by a separate timer, and this is controlled by the clock pulse. Various modifications are possible, such as being able to operate using CLK C or setting a permissible range for comparison of count values.

〔発明の効果〕〔Effect of the invention〕

以上の説明により明らかなとおり本発明によれ
ば、簡単かつ安価な構成により、共通のクロツク
パルスに対する監視が確実になされると共に、み
だりに制御停止を生ぜず、共通のクロツクパルス
により動作する複数のCPUを備え、時間的処理
を行なう各種の制御装置において顕著な効果が得
られる。
As is clear from the above description, according to the present invention, a common clock pulse can be reliably monitored with a simple and inexpensive configuration, and a plurality of CPUs operated by a common clock pulse can be provided without causing control stoppage. , remarkable effects can be obtained in various control devices that perform temporal processing.

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

第1図乃至第3図は本発明の実施例を示し、第
1図はブロツク図、第2図は第1図における各部
の動作状況を示すタイミングチヤート、第3図は
割込処理のフローチヤート、第4図は従来例のブ
ロツク図である。 11,12……CPU(プロセツサ)、21,22……
ROM(固定メモリ)、31,32……RAM(可変メ
モリ)、6,7……OSC(発振器)、11……PCT
(プリセツタブルカウンタ)、CLKC,CLKS……
クロツクパルス、T……一定周期、A,B……初
期値。
1 to 3 show an embodiment of the present invention, FIG. 1 is a block diagram, FIG. 2 is a timing chart showing the operating status of each part in FIG. 1, and FIG. 3 is a flowchart of interrupt processing. , FIG. 4 is a block diagram of a conventional example. 1 1 , 1 2 ... CPU (processor), 2 1 , 2 2 ...
ROM (fixed memory), 3 1 , 3 2 ... RAM (variable memory), 6, 7 ... OSC (oscillator), 11 ... PCT
(presettable counter), CLK C , CLK S ...
Clock pulse, T... constant period, A, B... initial value.

Claims (1)

【特許請求の範囲】[Claims] 1 複数のプロセツサを備え、共通のクロツクパ
ルスにより前記各プロセツサが同一の時間的処理
を互いに同期して行なう制御装置において、前記
クロツクパルスと同一周波数の監視用クロツクパ
ルスを別途に発生し、該監視用クロツクパルスを
プロセツタブルカウンタによりカウントすると共
に、前記共通のクロツクパルスに基づく一定周期
毎のタイミングにより前記カウンタへ交互に異な
る初期値をプリセツトし、該プリセツトの直前に
おける前記カウンタのカウント値と前記初期値へ
前記一定周期の間の監視用クロツクパルスによる
カウント数を加算した値とを比較し、該比較結果
の不一致により前記共通のクロツクパルスに異常
の生じたものと判断することを特徴とした制御装
置のクロツクパルス監視方法。
1. In a control device that includes a plurality of processors and in which each of the processors performs the same temporal processing in synchronization with each other using a common clock pulse, a monitoring clock pulse having the same frequency as the clock pulse is separately generated, and the monitoring clock pulse is While counting by a presettable counter, different initial values are preset to the counter alternately at fixed cycle timing based on the common clock pulse, and the count value of the counter immediately before the preset and the constant value are set to the initial value. A clock pulse monitoring method for a control device, characterized in that a value obtained by adding up the counts of monitoring clock pulses during a cycle is compared with a value obtained by adding up the number of counts caused by a monitoring clock pulse during a cycle, and it is determined that an abnormality has occurred in the common clock pulse due to a discrepancy in the comparison result.
JP61247640A 1986-10-20 1986-10-20 Method for supervising clock pulse in control device Granted JPS63101917A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61247640A JPS63101917A (en) 1986-10-20 1986-10-20 Method for supervising clock pulse in control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61247640A JPS63101917A (en) 1986-10-20 1986-10-20 Method for supervising clock pulse in control device

Publications (2)

Publication Number Publication Date
JPS63101917A JPS63101917A (en) 1988-05-06
JPH0434170B2 true JPH0434170B2 (en) 1992-06-05

Family

ID=17166504

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61247640A Granted JPS63101917A (en) 1986-10-20 1986-10-20 Method for supervising clock pulse in control device

Country Status (1)

Country Link
JP (1) JPS63101917A (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100359726B1 (en) * 1999-11-23 2002-11-04 엘지전자 주식회사 Apparatus for clock monitoring by using counter of clock period

Also Published As

Publication number Publication date
JPS63101917A (en) 1988-05-06

Similar Documents

Publication Publication Date Title
JPS60263235A (en) Microcomputer system
GB2065939A (en) Arrangement having a programmabel electrical circuit and monitoring menas
JPH0463417B2 (en)
JP3714141B2 (en) Runaway monitoring device for electronic control system
JPH0434170B2 (en)
JPH06168163A (en) Method and device for monitoring cpu
US4710928A (en) Method and apparatus for detecting the uncontrollable operation of a control system
JPS622685Y2 (en)
JPS5920061A (en) Watchdog timer
JPS6051141B2 (en) Program runaway detection method
JPH04182743A (en) Restarting method for microprocessor
JPS61226843A (en) Device for detecting interruption abnormality
JPS5983438A (en) Program failure detecting system
JPS60262252A (en) Monitor system for runaway of microprocessor
JP2749994B2 (en) Numerical control unit
JP2000035903A (en) Runaway monitoring device for microcomputer
JPH0110653Y2 (en)
JP5768434B2 (en) Mutual monitoring system
JPS5868166A (en) Processor fault monitoring device
JPH02105946A (en) Monitoring system for cpu operation by address bus
JPS60100235A (en) Self-diagnosing circuit
JPH09237205A (en) Program runaway detector
JPS59148961A (en) Monitoring system of operation of processor
JPH02134225A (en) Controlling device used in injection molding apparatus
JPH04259045A (en) Watchdog timer monitoring system

Legal Events

Date Code Title Description
R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees