JPH1091603A - Start-up synchronism establishing method and abnormality monitoring method for dual-cpu system - Google Patents

Start-up synchronism establishing method and abnormality monitoring method for dual-cpu system

Info

Publication number
JPH1091603A
JPH1091603A JP8242018A JP24201896A JPH1091603A JP H1091603 A JPH1091603 A JP H1091603A JP 8242018 A JP8242018 A JP 8242018A JP 24201896 A JP24201896 A JP 24201896A JP H1091603 A JPH1091603 A JP H1091603A
Authority
JP
Japan
Prior art keywords
data
cpu
storage area
monitoring
monitoring data
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.)
Withdrawn
Application number
JP8242018A
Other languages
Japanese (ja)
Inventor
Masahiko Teranishi
正彦 寺西
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.)
Fujitsu VLSI Ltd
Fujitsu Ltd
Original Assignee
Fujitsu VLSI Ltd
Fujitsu 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 Fujitsu VLSI Ltd, Fujitsu Ltd filed Critical Fujitsu VLSI Ltd
Priority to JP8242018A priority Critical patent/JPH1091603A/en
Publication of JPH1091603A publication Critical patent/JPH1091603A/en
Withdrawn legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To complete the start-up synchronism in a short time and shorten a system start-up time by making a 1st CPU reads initialization data by a 2nd CPU out and writes 1st response data, and the 2nd CPU read the 1st response data out and write 2nd response data. SOLUTION: The 1st and 2nd CPUs 11 and 21 write 1st and 2nd initialization data in a DPROM 30 respectively to initialize the system. The 1st CPU 11 reads out the 2nd initialization data out and rewrites the contents of the RAM 30 into the 1st response data. The 2nd CPU 21 reads out the 1st response data out and rewrites the contents of the RAM 30 into the 2nd response data. The 1st CPU 11 reads the 2nd response data out and considers that the start-up synchronism with the 2nd CPU 21 is established. The 2nd CPU 21 waits for a certain time and considers that the start-up synchronism with the 1st CPU 11 is established.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明はデュアルCPUシス
テムに係り、詳しくはその立ち上げ同期確立方法及び異
常監視方法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a dual CPU system, and more particularly, to a startup synchronization establishing method and an abnormality monitoring method.

【0002】近年、デュアルCPUシステムはその利用
範囲が広範囲化及び複雑化している。それに伴って、該
デュアルCPUシステムはより高速化、高精度化及び簡
略化が求められている。
[0002] In recent years, the use range of a dual CPU system has been widened and complicated. Accordingly, higher speed, higher accuracy and simplification of the dual CPU system are required.

【0003】[0003]

【従来の技術】従来、工業用ロボットや搬送装置等にお
いては、被加工物を把持したり、押さえ付けたり、回転
させたりする複数のアームが備えられている。各アーム
はそれぞれ他のアームとの間で予め定められた連携動作
が行われることにより、被加工物は加工されたり、所定
の場所に搬送される。つまり、各アーム毎に該アームを
駆動制御するための制御装置が設けられている。そし
て、制御装置によってアームは所定の動作を実行する。
又、各制御装置は他の制御装置との間で互いにデータの
授受を行って自身のアームと他のアームとの間でのスム
ースな連携動作を可能にしている。
2. Description of the Related Art Conventionally, an industrial robot, a transfer device, and the like are provided with a plurality of arms for gripping, pressing, and rotating a workpiece. The workpiece is processed or transported to a predetermined location by performing a predetermined cooperative operation with each of the other arms. That is, a control device for controlling the drive of each arm is provided for each arm. Then, the arm performs a predetermined operation by the control device.
Further, each control device exchanges data with another control device to enable smooth cooperative operation between its own arm and another arm.

【0004】図1は2つの制御装置のデータ授受を説明
するためのシステム構成を示す。このシステム構成はデ
ュアルCPUシステムである。第1の制御装置10は第
1の中央処理装置(CPU)11、RAM及びROM等
からなる第1の固有メモリ12、及び、第1の周辺イン
タフェース13とから構成されている。又、第2の制御
装置20は第2の中央処理装置(CPU)21、RAM
及びROM等からなる第2の固有メモリ22、及び、第
2の周辺インタフェース23とから構成されている。
又、第1及び第2の制御装置10,20との間には、両
制御装置10,20から読み書きが可能なデュアルポー
トRAM(以下、DPRAMという)30が設けられて
いる。
FIG. 1 shows a system configuration for explaining data transfer between two control devices. This system configuration is a dual CPU system. The first control device 10 includes a first central processing unit (CPU) 11, a first specific memory 12 including a RAM and a ROM, and a first peripheral interface 13. Further, the second control device 20 includes a second central processing unit (CPU) 21, a RAM,
And a second specific interface 22 composed of a ROM and the like, and a second peripheral interface 23.
A dual-port RAM (hereinafter, referred to as DPRAM) 30 readable and writable by both the control devices 10 and 20 is provided between the first and second control devices 10 and 20.

【0005】そして、第1のCPU11と第2のCPU
21は、DPRAM30を介して送信データの授受を行
い互いにそれぞれのアームを駆動制御する。この送信デ
ータの授受は、両CPU11,21が同時にデータ書き
込みするといった衝突を避けるために、図示しない割り
込み回路が設けられたりバス調停回路が設けられてい
る。
A first CPU 11 and a second CPU 11
Reference numeral 21 transmits and receives transmission data via the DPRAM 30 and controls the driving of each arm. An interrupt circuit (not shown) or a bus arbitration circuit (not shown) is provided in order to avoid a collision in which the CPUs 11 and 21 write data at the same time when transmitting and receiving the transmission data.

【0006】つまり、例えば第1のCPU11が第2の
CPU21のための送信データをDPRAM30に書き
込む際、割り込み回路又はバス調停回路を介して第1の
CPU11から第2のCPU21に割り込み信号を出力
する。そして、第1のCPU11が送信データを書き込
みが終了するまで第2のCPU21は該データの読み取
り又はDPRAM30へのデータの書き込み動作を中断
させる。これによって、両CPU11,21の送信デー
タの書き込み又は読み取りによる衝突は回避されように
なっている。
That is, for example, when the first CPU 11 writes transmission data for the second CPU 21 to the DPRAM 30, an interrupt signal is output from the first CPU 11 to the second CPU 21 via an interrupt circuit or a bus arbitration circuit. . Then, the second CPU 21 suspends the operation of reading the data or writing the data to the DPRAM 30 until the first CPU 11 finishes writing the transmission data. As a result, a collision due to writing or reading of transmission data between the two CPUs 11 and 21 is avoided.

【0007】又、特開平5−346908号公報には、
割り込み回路を使用しないでDPRAM30を介してデ
ータの授受を行うシステムが提案されている。このシス
テムは、DPRAMにサブCPUからメインCPUへの
データ転送に用いるステータスエリアとデータエリアか
ら構成される専用の記憶領域とメインCPUからサブC
PUへのデータ転送に用いるステータスエリアとデータ
エリアから構成される専用の記憶領域とをそれぞれ設け
たものである。従って、サブCPUからメインCPUへ
のデータとメインCPUからサブCPUへのデータはそ
れぞれ別々の記憶領域に書き込まれ読み出されるため、
両CPUのデータの書き込み又は読み取りによる衝突は
回避される。
Further, Japanese Patent Application Laid-Open No. Hei 5-346908 discloses that
A system for exchanging data via the DPRAM 30 without using an interrupt circuit has been proposed. This system has a dedicated storage area composed of a status area and a data area used for data transfer from the sub CPU to the main CPU in the DPRAM, and a sub C
A status area used for data transfer to the PU and a dedicated storage area composed of a data area are provided. Therefore, data from the sub CPU to the main CPU and data from the main CPU to the sub CPU are written and read in separate storage areas, respectively.
Collisions due to data writing or reading of both CPUs are avoided.

【0008】又、図1に示すシステムにおいて、第1及
び第2の制御装置10,20には、図示しないウォッチ
ドッグタイマ等のハードウェアがそれぞれ併せて設けら
れている。ウォッチドッグタイマは、第1及び第2のC
PU11,21が何らかの原因で暴走を起こしたかどう
か監視する回路である。これは例えば第1のCPU11
が暴走して正常な状態でないにも拘わらず、第2のCP
U21がDPRAM30に書き込まれた正常でない第1
のCPU11からの送信データに基づいて処理動作を実
行するのを回避するためである。
In the system shown in FIG. 1, the first and second controllers 10 and 20 are provided with hardware such as a watchdog timer (not shown). The watchdog timer includes a first and a second C
This is a circuit for monitoring whether the PU 11 or 21 has runaway for some reason. This is, for example, the first CPU 11
Despite the runaway and abnormal condition, the second CP
Unusual first U21 written to DPRAM 30
This is to avoid executing the processing operation based on the transmission data from the CPU 11.

【0009】[0009]

【発明が解決しようとする課題】ところで、第1及び第
2の制御装置10,20を同時にシステム電源を立ち上
げたり、又、リセットにより第1及び第2のCPU1
1,21が同時にスタートする場合、第1及び第2のC
PU11,21はそれぞれ独立してシステムの初期化の
ための処理動作実行する。この時、第1及び第2のCP
U11,21の該システムの初期化の動作処理は負荷等
によって相違する。つまり、第1及び第2のCPU1
1,21は初期化を完了する時間がそれぞれ相違する。
その結果、初期化を完了した後に、第1及び第2のCP
U11、21がアームを動作させるための処理をそれぞ
れ独立して実行すると、各アームの動作タイミングがズ
レて予め定めた連携動作ができなくなる。そこで、速く
初期化が終わったCPUは、他方のCPUが初期化を完
了するまで待機した後(立ち上げ同期がとれた後)、両
CPU11,21がアームの連携動作のプログラム処理
を開始することが望ましい。
By the way, the first and second control devices 10 and 20 are simultaneously turned on the system power supply, or the first and second CPUs 1 and 20 are reset.
1 and 21 start simultaneously, the first and second C
The PUs 11 and 21 independently execute processing operations for system initialization. At this time, the first and second CPs
The operation processing for initialization of the system of U11 and U21 differs depending on the load and the like. That is, the first and second CPUs 1
1 and 21 have different initialization completion times.
As a result, after completing the initialization, the first and second CPs
If U11 and 21 independently execute the processing for operating the arms, the operation timing of each arm is shifted, and the predetermined cooperative operation cannot be performed. Therefore, the CPU that has been initialized quickly waits until the other CPU completes the initialization (after the start-up is synchronized), and then the CPUs 11 and 21 start the program processing of the cooperative operation of the arms. Is desirable.

【0010】しかしながら、両CPU11,21がシス
テムの初期化を完了する時間は分からないため、電源立
ち上げ又はリセットから初期化が完了する時間(立ち上
げ同期完了時間)を安全を見込んで十分に長い時間を設
定し、該時間が経過したとき両CPU11,21は初期
化が完了し立ち上げ同期がとれたとして次の処理動作に
移るようしていた。従って、立ち上げ同期時間は安全を
見込んだ十分に長い時間となるため、システムの起動時
間が長くなるといった問題が生じていた。
However, since the time for the CPUs 11 and 21 to complete the system initialization is not known, the time required for the initialization to be completed after power-on or reset (start-synchronization completion time) is sufficiently long in view of safety. A time is set, and when the time elapses, both CPUs 11 and 21 assume that initialization has been completed and startup synchronization has been achieved, and then proceed to the next processing operation. Therefore, since the start-up synchronization time is a sufficiently long time in consideration of safety, there has been a problem that the system startup time is prolonged.

【0011】又、前記したCPUの異常を監視する場
合、ウォッチドッグタイマを用いる関係から異常判定に
時間がかかり判定結果を出す前に正常に動作する方のC
PUは誤動作するといった問題を有していた。さらに、
ウォッチドッグタイマ等の回路を設けることから各制御
装置10,20の回路規模が大きくなるといった問題も
有していた。
When monitoring the above-mentioned abnormality of the CPU, it is time-consuming to judge the abnormality due to the use of a watchdog timer.
The PU has a problem that it malfunctions. further,
Provision of a circuit such as a watchdog timer also has a problem that the circuit scale of each of the control devices 10 and 20 becomes large.

【0012】本発明は上記問題を解決するためになされ
たものであって、その目的は立ち上がり同期を短時間で
完了させシステム起動時間の短縮化を図ることができる
とともに、CPUの異常検出のための検出回路を用いな
いで異常検出を判定することができ回路規模の簡略化を
図ることができるデュアルCPUシステムを提供するこ
とにある。
SUMMARY OF THE INVENTION The present invention has been made to solve the above-mentioned problem. It is an object of the present invention to shorten the start-up synchronization in a short time to shorten the system start-up time, and to detect a CPU abnormality. It is an object of the present invention to provide a dual CPU system which can judge abnormality detection without using the detection circuit and can simplify the circuit scale.

【0013】[0013]

【課題を解決するための手段】請求項1に記載の発明
は、第1のCPUと第2のCPUとの間に双方のCPU
からアクセス可能なデュアルポートRAMを設け、該デ
ュアルポートRAMを介して両CPU間においてデータ
を送受信するデュアルCPUシステムにおいて、前記デ
ュアルポートRAMは、第1のCPUに対してデータ書
き込みを行いかつ第2のCPUに対してデータ読み出し
を行う第1の記憶領域と、第2のCPUに対してデータ
書き込みを行い第1のCPUに対してデータ読み出しを
行う第2の記憶領域とを設け、前記第1のCPUは、電
源立ち上げ時に、第1の初期化データを第1の記憶領域
に書き込んだ後、システムの初期化を行い、第2の記憶
領域に書き込まれる第2のCPUの第2の初期化データ
を読み取るまで待機した後、その第2の初期化データを
読み取った旨の第1の応答データを第1の記憶領域に書
き込み、該第2のCPUがその第1の応答データを読み
取るとともにその第1の応答データの読み取りに基づい
て第2の応答データを読み取るまで待機した後に、両C
PUの初期化が完了したと判断し、前記第2のCPU
は、電源立ち上げ時に、第2の初期化データを第2の記
憶領域に書き込んだ後、システムの初期化を行い、前記
第2の初期化データを読み取った旨の前記第1の応答デ
ータを読み取るまで待機した後、第2の記憶領域に前記
第1の応答データを読み取った旨の前記第2の応答デー
タを書き込んだ後に両CPUの初期化が完了したと判断
するようにしたデュアルCPUシステムにおける立ち上
げ同期確立方法をその要旨とする。
According to a first aspect of the present invention, both CPUs are provided between a first CPU and a second CPU.
In a dual-CPU system that provides a dual-port RAM accessible from the CPU and transmits and receives data between the two CPUs via the dual-port RAM, the dual-port RAM writes data to the first CPU and stores data in the second CPU. A first storage area for reading data from the first CPU and a second storage area for writing data to the second CPU and reading data from the first CPU; The first CPU writes the first initialization data in the first storage area at power-on, initializes the system, and writes the second initialization data of the second CPU in the second storage area. After waiting until the initialization data is read, first response data indicating that the second initialization data has been read is written to the first storage area, and the second response data is written to the first storage area. PU is after waiting until reading the second response data based on the reading of the first response data with reading the first response data, both C
It is determined that the initialization of the PU has been completed, and the second CPU
Writes the second initialization data into the second storage area when the power is turned on, initializes the system, and sends the first response data indicating that the second initialization data has been read. A dual CPU system configured to wait for reading and then determine that initialization of both CPUs has been completed after writing the second response data indicating that the first response data has been read into a second storage area The gist is the method of establishing startup synchronization in.

【0014】請求項2に記載の発明は、第1のCPUと
第2のCPUとの間に双方のCPUからアクセス可能な
デュアルポートRAMを設け、該デュアルポートRAM
を介して両CPU間においてデータを送受信するデュア
ルCPUシステムにおいて、前記デュアルポートRAM
は、前記第1のCPUに対して予め定めた複数種類の監
視用データのデータ書き込みを行いかつ前記第2のCP
Uに対してそのデータ読み出しを行う第1の記憶領域
と、前記第2のCPUに対して前記複数種類の監視用デ
ータのデータ書き込みを行いかつ前記第1のCPUに対
してデータ読み出しを行う第2の記憶領域とを設け、前
記第1のCPUは、第1の記憶領域に書き込んだ監視用
データと第2の記憶領域から読み取った監視用データと
を比較し、両監視用データが予め定めた関係にあるたび
ごとに第1の記憶領域の監視用データを予め定めた順序
で書き替えるとともに、予め定めた関係にないとき第1
の記憶領域の監視用データを書き替えないようにし、前
記第2のCPUは、第2の記憶領域に書き込んだ監視用
データと第1の記憶領域から読み取った監視用データと
を比較し、両監視用データが予め定めた関係にあるたび
ごとに第2の記憶領域の監視用データを予め定めた順序
で書き替えるとともに、予め定めた関係にないとき第2
の記憶領域の監視用データを書き替えないようにし、前
記第1及び第2のCPUは、それぞれ予め定めた関係が
成立しない時その回数をカウントし、関係が成立する時
そのカウント値をクリアするとともに、前記カウント値
が予め定めた値を超えた時、少なくともいずれか一方の
CPUが異常であると判断し、前記第1及び第2のCP
Uによる監視用データの初期書き込みは、第1のCPU
と第2のCPUのいずれか一方において、両監視用デー
タが予め定めた関係が成立し、他方において両監視用デ
ータが予め定めた関係が成立しないように監視用データ
を書き込み、前記第1及び第2のCPUによる監視用デ
ータの書き替え順序は、予め定めた関係が成立しない方
の両監視用データを予め定めた関係が成立するように監
視用データを書き替えて、第1及び第2のCPUにおい
て両監視用データが交互に予め定めた関係が成立するよ
うにしたデュアルCPUシステムにおける異常監視方法
をその要旨とする。
According to a second aspect of the present invention, there is provided a dual port RAM between the first CPU and the second CPU, the dual port RAM being accessible from both CPUs.
A dual CPU system for transmitting and receiving data between both CPUs via the
Performs data writing of a plurality of predetermined types of monitoring data on the first CPU and performs the second CP
A first storage area for reading the data from U, and a second storage area for writing the plurality of types of monitoring data to the second CPU and reading the data to the first CPU. The first CPU compares the monitoring data written in the first storage area with the monitoring data read from the second storage area, and the two monitoring data are determined in advance. The monitoring data in the first storage area is rewritten in a predetermined order each time the relationship is established, and the first
The second CPU compares the monitoring data written in the second storage area with the monitoring data read from the first storage area so that the monitoring data in the storage area is not rewritten. Each time the monitoring data has a predetermined relationship, the monitoring data in the second storage area is rewritten in a predetermined order.
The first and second CPUs respectively count the number of times when a predetermined relationship is not established, and clear the count value when the relationship is established when the relationship is not established. At the same time, when the count value exceeds a predetermined value, at least one of the CPUs is determined to be abnormal, and the first and second CPs are determined.
The initial writing of the monitoring data by U is performed by the first CPU
In one of the second CPU and the second CPU, the monitoring data is written such that the predetermined relationship is established between the two monitoring data, and the other is not written so that the predetermined relationship is not established between the two monitoring data. The rewriting order of the monitoring data by the second CPU is such that the monitoring data is rewritten so that the predetermined relationship is established between the two monitoring data for which the predetermined relationship is not established, and the first and second monitoring data are rewritten. The gist is an abnormality monitoring method in a dual CPU system in which both monitoring data alternately establish a predetermined relationship in the CPU.

【0015】請求項3に記載の発明は、第1のCPUと
第2のCPUとの間に双方のCPUからアクセス可能な
デュアルポートRAMを設け、該デュアルポートRAM
を介して両CPU間においてデータを送受信するデュア
ルCPUシステムにおいて、前記デュアルポートRAM
は、第1のCPUに対してデータ書き込みを行いかつ第
2のCPUに対してデータ読み出しを行う第1の記憶領
域と、第2のCPUに対してデータ書き込みを行い第1
のCPUに対してデータ読み出しを行う第2の記憶領域
とを設け、前記第1のCPUは、電源立ち上げ時に、第
1の初期化データを第1の記憶領域に書き込んだ後、シ
ステムの初期化を行い、第2の記憶領域に書き込まれる
第2のCPUの第2の初期化データを読み取るまで待機
し後、その第2の初期化データを読み取った旨の第1の
応答データを第1の記憶領域に書き込み、該第2のCP
Uがその第1の応答データを読み取るとともにその第1
の応答データの読み取りに基づいて前記第2の記憶領域
に書き込まれる第2の応答データを読み取るまで待機し
た後、両CPUの初期化が完了したと判断し、前記第2
のCPUは、電源立ち上げ時に、第2の初期化データを
第2の記憶領域に書き込んだ後、システムの初期化を行
い、前記第1の記憶領域に書き込まれる第1の初期化デ
ータを読み取った旨の第1の応答データを読み取るまで
待機した後、第2の記憶領域に前記第1の応答データを
読み取った旨の前記第2の応答データを書き込んだ後に
両CPUの初期化が完了したと判断し、両CPUの初期
化が完了した後、第1のCPUは、第1の記憶領域に対
して予め定めた複数種類の監視用データを書き込み、第
2のCPUは、第2の記憶領域に対して前記複数種類の
監視用データを書き込み、第1のCPUは、第1の記憶
領域に書き込んだ監視用データと第2の記憶領域から読
み取った監視用データとを比較し、両監視用データが予
め定めた関係にあるたびごとに第1の記憶領域の監視用
データを予め定めた順序で書き替えるとともに、予め定
めた関係にないとき第1の記憶領域の監視用データを書
き替えないようにし、第2のCPUは、第2の記憶領域
に書き込んだ監視用データと第1の記憶領域から読み取
った監視用データとを比較し、両監視用データが予め定
めた関係にあるたびごとに第2の記憶領域の監視用デー
タを予め定めた順序で書き替えるとともに、予め定めた
関係にないとき第2の記憶領域の監視用データを書き替
えないようにし、前記第1及び第2のCPUは、それぞ
れ予め定めた関係が成立しない時その回数をカウント
し、関係が成立する時そのカウント値をクリアするとと
もに、前記カウント値が予め定めた値を超えた時、少な
くともいずれか一方のCPUが異常であると判断し、前
記第1及び第2のCPUによる監視用データの初期書き
込みは、第1のCPUと第2のCPUのいずれか一方に
おいて、両監視用データが予め定めた関係が成立し、他
方において両監視用データが予め定めた関係が成立しな
いように監視用データを書き込み、前記第1及び第2の
CPUによる監視用データの書き替え順序は、予め定め
た関係が成立しない方の両監視用データを予め定めた関
係が成立するように監視用データを書き替えて、第1及
び第2のCPUにおいて両監視用データが交互に予め定
めた関係が成立するようにしたュアルCPUシステムに
おける異常監視方法をその要旨とする。
According to a third aspect of the present invention, there is provided a dual port RAM accessible between the first CPU and the second CPU from both CPUs.
A dual CPU system for transmitting and receiving data between both CPUs via the
Are a first storage area for writing data to the first CPU and reading data to the second CPU, and a first storage area for writing data to the second CPU.
A second storage area for reading data from the first CPU, the first CPU writes first initialization data to the first storage area when the power is turned on, and then initializes the system. And waits until the second initialization data of the second CPU written to the second storage area is read, and then sends the first response data indicating that the second initialization data has been read to the first CPU. In the storage area of the second CP
U reads the first response data and
After waiting for reading of the second response data written to the second storage area based on the reading of the response data, it is determined that the initialization of both CPUs has been completed.
The first CPU writes the second initialization data in the second storage area at power-on, initializes the system, and reads the first initialization data written in the first storage area. After waiting for reading of the first response data indicating that the first response data has been read, the initialization of both CPUs has been completed after writing the second response data indicating that the first response data has been read to the second storage area. After the initialization of both CPUs is completed, the first CPU writes a plurality of types of predetermined monitoring data in the first storage area, and the second CPU The first CPU writes the plurality of types of monitoring data in the area and compares the monitoring data written in the first storage area with the monitoring data read from the second storage area. Data is in a predetermined relationship. Each time, the monitoring data in the first storage area is rewritten in a predetermined order, and when the data is not in a predetermined relationship, the monitoring data in the first storage area is not rewritten. Comparing the monitoring data written in the second storage area with the monitoring data read from the first storage area, and monitoring the second storage area each time the two monitoring data have a predetermined relationship. The first and second CPUs rewrite the monitoring data in the predetermined order and do not rewrite the monitoring data in the second storage area when the monitoring data is not in the predetermined relationship. When the relationship is not established, the number of times is counted, and when the relationship is established, the count value is cleared.When the count value exceeds a predetermined value, at least one of the CPUs is abnormal. In the initial writing of the monitoring data by the first and second CPUs, a predetermined relationship between the two monitoring data is established in one of the first CPU and the second CPU, On the other hand, the monitoring data is written so that the predetermined relationship is not established between the two monitoring data, and the rewriting order of the monitoring data by the first and second CPUs is the same as the order in which the predetermined relationship is not established. In a dual CPU system, the monitoring data is rewritten so that a predetermined relationship is established between the monitoring data, and the first and second CPUs alternately establish a predetermined relationship between the two monitoring data. The gist is an abnormality monitoring method.

【0016】(作用)請求項1に記載の発明によれば、
第1のCPUは、電源立ち上げ時に、第1の初期化デー
タを第1の記憶領域に書き込む。第2のCPUは、電源
立ち上げ時に、第2の初期化データを第2の記憶領域に
書き込む。次に、第1のCPUは第2の記憶領域に前記
第2の初期化データが書き込まれるまで待機する。そし
て、第1のCPUは第2の初期化データを読み取ると第
1の記憶領域に第1の応答データを書き込み待機する。
(Operation) According to the first aspect of the present invention,
The first CPU writes first initialization data in a first storage area when the power is turned on. The second CPU writes the second initialization data in the second storage area when the power is turned on. Next, the first CPU waits until the second initialization data is written to the second storage area. When the first CPU reads the second initialization data, the first CPU writes the first response data in the first storage area and waits.

【0017】第2のCPUは、第1の記憶領域に書き込
まれた第1の応答データを読み取ると第2の記憶領域に
第2の応答データを書き込んだ後に両CPUの初期化が
完了したと判断する。一方、第1のCPUは第2の記憶
領域に書き込まれた第2の応答データを読み取ると両C
PUの初期化が完了したと判断する。
When the second CPU reads the first response data written in the first storage area, the second CPU writes the second response data in the second storage area, and then the initialization of both CPUs is completed. to decide. On the other hand, when the first CPU reads the second response data written in the second storage area,
It is determined that the initialization of the PU has been completed.

【0018】従って、両CPUにおけるそれぞのシステ
ムの初期化が完了する時間が相違しても両CPUのシス
テムが共に初期化するまで初期化が完了しないと判断さ
れる。しかも、この判断は両CPUの処理動作だけで行
うことができる。
Therefore, even if the time for completing the initialization of each system in both CPUs is different, it is determined that the initialization is not completed until both CPUs are initialized. Moreover, this determination can be made only by the processing operations of both CPUs.

【0019】請求項2に記載の発明によれば、第1の記
憶領域と第2の記憶領域は最初に第1のCPUと第2の
CPUのいずれか一方、例えば第1のCPUにおいて両
監視用データが予め定めた関係が成立し、第2のCPU
において両監視用データが予め定めた関係が成立しない
ように監視用データを書き込む。そして、比較後、関係
が成立した方の第1のCPUは成立しない第2のCPU
が次に成立するように監視用データを書き替える。この
時、この書き替えによって、第1のCPUにおける両監
視用データの関係は成立しなくなる。一方、第2のCP
Uにおいて書き替えによって該両監視用データは予め定
めた関係が成立することになる。そして、同様に今度は
第1のCPUにおいて両監視用データが予め定めた関係
が成立するように監視用データを書き替える。
According to the second aspect of the present invention, the first storage area and the second storage area are first monitored by either one of the first CPU and the second CPU, for example, the first CPU. Data has a predetermined relationship, and the second CPU
, The monitoring data is written such that the predetermined relationship between the two monitoring data does not hold. Then, after the comparison, the first CPU for which the relationship is established is not established for the second CPU.
Is rewritten so that the following holds true. At this time, the relationship between the two monitoring data in the first CPU is not established by this rewriting. On the other hand, the second CP
By rewriting in U, the two monitoring data have a predetermined relationship. Then, similarly, the first CPU rewrites the monitoring data so that the predetermined relationship is established between the two monitoring data.

【0020】従って、両CPUが正常に動作している
時、第1のCPUと第2のCPUにおいて、交互に予め
定められた関係が成立するように第1及び第2の記憶領
域に書き込まれる監視用データが書き替えられることに
なる。反対に、いずれか一方が正常に動作していないと
きには、上記書き替えが行われなくなりやがてその成立
しない回数がカウンタにより計測され異常と判断され
る。しかも、この判断は両CPUの処理動作だけで行う
ことができる。
Therefore, when both CPUs are operating normally, the first CPU and the second CPU alternately write data in the first and second storage areas so that a predetermined relationship is established. The monitoring data will be rewritten. Conversely, when one of them is not operating normally, the rewriting is not performed any more, and the number of times that the rewriting is not satisfied is measured by the counter, and it is determined that the rewriting is abnormal. Moreover, this determination can be made only by the processing operations of both CPUs.

【0021】請求項3に記載の発明によれば、電源立ち
上げ時においては請求項1に記載の発明と同様に両CP
Uが初期化されたことをが判断され、両CPUが初期化
されると直ちに請求項2に記載の発明と同様にいずれか
両CPUが正常に動作しているかどうかが判断される。
According to the third aspect of the present invention, when the power supply is turned on, both CPs are activated in the same manner as in the first aspect of the present invention.
It is determined that U has been initialized, and as soon as both CPUs are initialized, it is determined whether one of the two CPUs is operating normally in the same manner as in the second aspect of the invention.

【0022】[0022]

【発明の実施の形態】以下、本発明を具体化した一実施
形態を図面に従って説明する。尚、本実施形態では、図
1に示すデュアルCPUシステムにおいて割り込み回路
又はバス調停回路を用いないで送信データの授受を、ウ
ォッチドッグタイマを用いないで異常を検知するもので
ある。そのため、本実施形態ではDPRAM30の記憶
領域の構成と各CPU11,21の処理動作に特徴を有
することから、説明の便宜上、構成の同じものについて
符号を同じにしてその詳細は省略する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS One embodiment of the present invention will be described below with reference to the drawings. In the present embodiment, in the dual CPU system shown in FIG. 1, transmission / reception of transmission data is performed without using an interrupt circuit or a bus arbitration circuit, and abnormality is detected without using a watchdog timer. For this reason, the present embodiment is characterized by the configuration of the storage area of the DPRAM 30 and the processing operations of the CPUs 11 and 21. For convenience of explanation, the same components are denoted by the same reference numerals, and the details are omitted.

【0023】図2は、DPRAM30の記憶領域の構成
を説明するための模式図である。図2において、DPR
AM30は第1〜第6のデータエリア31〜36が設け
られ、各データエリア31〜36は前記第1及び第2の
CPU11,21との間でのデータ授受のために利用さ
れる。
FIG. 2 is a schematic diagram for explaining the configuration of the storage area of the DPRAM 30. In FIG.
The AM 30 is provided with first to sixth data areas 31 to 36, and each of the data areas 31 to 36 is used for exchanging data with the first and second CPUs 11 and 21.

【0024】第1の記憶領域としての第1のデータエリ
ア31は1バイトの記憶領域であって、第1のCPU1
1による識別データの書き込みのみ可能であるととも
に、第2のCPU21によるデータの読み込みのみ可能
な記憶領域である。第2のデータ領域としての第2のデ
ータエリア32は1バイトの記憶領域であって、第2の
CPU21による識別データの書き込みのみ可能である
ともに、第1のCPU11によるデータの読み込みのみ
可能な記憶領域である。そして、第1及び第2のデータ
エリア31,32は第1及び第2のCPU11,21の
立ち上げ同期確立のための処理動作、異常監視処理動作
及び送信データ転送処理動作のために利用される。
The first data area 31 as a first storage area is a 1-byte storage area, and the first CPU 1
1 is a storage area where only the identification data can be written by the first CPU 21 and only the data can be read by the second CPU 21. The second data area 32 as a second data area is a 1-byte storage area, in which only the identification data can be written by the second CPU 21 and the data can only be read by the first CPU 11. Area. The first and second data areas 31 and 32 are used for processing operations for establishing startup synchronization of the first and second CPUs 11 and 21, an abnormality monitoring processing operation, and a transmission data transfer processing operation. .

【0025】第3のデータエリア33は1バイトの記憶
領域であって、第1のCPU11による識別データの書
き込みのみ可能であるとともに、第2のCPU21によ
る識別データの読み込みのみ可能な記憶領域である。第
4のデータエリア34は1バイトの記憶領域であって、
第2のCPU21による識別データの書き込みのみ可能
であるとともに、第1のCPU11によるデータの読み
込みのみ可能な記憶領域である。そして、第3及び第4
のデータエリア33,34は第1及び第2のCPU1
1,21の送信データ転送処理動作のために利用され
る。
The third data area 33 is a 1-byte storage area in which only the identification data can be written by the first CPU 11 and only the identification data can be read by the second CPU 21. . The fourth data area 34 is a 1-byte storage area,
This is a storage area where only the identification data can be written by the second CPU 21 and only the data can be read by the first CPU 11. And the third and fourth
Data areas 33 and 34 are the first and second CPU 1
It is used for transmission data transfer processing operations of 1, 21.

【0026】第5のデータエリア35は、多数のバイト
からなる記憶領域であって、第1のCPU11による送
信データの書き込みのみ可能であるとともに、第2のC
PU21によるデータの読み込みのみ可能な記憶領域で
ある。第6のデータエリア34は多数のバイトからなる
記憶領域であって、第2のCPU21による送信データ
の書き込みのみ可能であるとともに、第1のCPU11
によるデータの読み込みのみ可能な記憶領域である。そ
して、第5及び第6のデータエリア35,36は第1及
び第2のCPU11,21の送信データ転送処理動作の
ために利用される。
The fifth data area 35 is a storage area composed of many bytes, in which only the transmission data can be written by the first CPU 11 and the second C area.
This is a storage area in which the PU 21 can only read data. The sixth data area 34 is a storage area composed of a large number of bytes, in which only the transmission data can be written by the second CPU 21 and the first CPU 11
Is a storage area from which data can only be read. The fifth and sixth data areas 35 and 36 are used for the transmission data transfer operation of the first and second CPUs 11 and 21.

【0027】次に、DPRAM30の構成に基づいて第
1及び第2のCPU11,21が実行する立ち上げ同期
確立処理動作、異常監視処理動作、及び、送信データ転
送処理動作について説明する。 (立ち上げ同期確立処理動作)立ち上げ同期確立処理動
作とは、前記第1及び第2の制御装置10,20の共通
電源スイッチを投入し立ち上げた時又はリセットがかか
った時、各CPU11,21がそれぞれシステムの初期
化を完了し互いにデータ授受が可能になったか判定する
までの処理動作をいう。図3は第1及び第2のCPU1
1,21の立ち上げ同期確立処理動作を説明するための
フローチャートを示す。
Next, the start-up synchronization establishing operation, the abnormality monitoring operation, and the transmission data transfer operation performed by the first and second CPUs 11 and 21 based on the configuration of the DPRAM 30 will be described. (Start-up synchronization establishment processing operation) The start-up synchronization establishment processing operation is performed when the common power switch of the first and second control devices 10 and 20 is turned on and started or when the CPU 11 is reset. Reference numeral 21 denotes processing operations from completion of initialization of the system to determination of whether data transmission / reception is possible with each other. FIG. 3 shows the first and second CPUs 1.
9 is a flowchart for explaining the startup synchronization establishment processing operation of the first and second embodiments.

【0028】共通電源スイッチを投入し立ち上げた時又
はリセットがかかった時、第1のCPU11は、ステッ
プ100にてDPRAM30の第1及び第2のデータエ
リア31,32を初期化、即ち、初期化データとしての
「00h(hは16進表記の意味)」を書き込んだ後
に、該システムの初期化を行う。一方、第2のCPU2
1は、ステップ200にて同様に第2及び第4のデータ
エリア32,34に初期化データとしての「00h」を
書き込んだ後に、システムの初期化を行う。
When the common power switch is turned on and activated or when a reset is applied, the first CPU 11 initializes the first and second data areas 31 and 32 of the DPRAM 30 in step 100, that is, initializes. After writing “00h (h means hexadecimal notation)” as the coded data, the system is initialized. On the other hand, the second CPU 2
In step 200, similarly, after writing "00h" as initialization data in the second and fourth data areas 32 and 34 in step 200, the system is initialized.

【0029】第1のCPU11は、システムの初期化を
完了すると、ステップ101において第2のデータエリ
ア32の内容を読み取りステップ102に移りその第2
のデータエリア32の内容が第2の初期化データとして
の「00h」かどうか判定する。つまり、このステップ
101,102において第2のCPU21がステップ2
00によるシステムの初期化が完了したかどうか判定す
る。従って、第1のCPU11は、第2のCPU21が
システムの初期化を完了するまでステップ101,10
2の動作を繰り返して待機することになる。
When the first CPU 11 completes the initialization of the system, it reads the contents of the second data area 32 in step 101 and proceeds to step 102 where the second data area 32 is read.
It is determined whether or not the content of the data area 32 is “00h” as the second initialization data. That is, in steps 101 and 102, the second CPU 21
It is determined whether the initialization of the system by 00 has been completed. Therefore, the first CPU 11 performs steps 101 and 10 until the second CPU 21 completes the initialization of the system.
The operation of Step 2 is repeated and the operation waits.

【0030】そして、今、第2のデータエリア32の内
容が「00h」の時、第1のCPU11はステップ10
3に移り第1のデータエリア31の内容を第1の初期化
データとしての「00h」から第1の応答データとして
の「FFh」に書き替えた後にステップ104に移る。
ステップ104において、第1のCPU11は第2のデ
ータエリア32の内容を読み取り、ステップ105にて
その読み取った内容が第2の応答データとしての「FF
h」かどうか判定する。
When the content of the second data area 32 is "00h", the first CPU 11
Then, the process proceeds to step 104, where the contents of the first data area 31 are rewritten from “00h” as the first initialization data to “FFh” as the first response data, and then the process proceeds to step 104.
In step 104, the first CPU 11 reads the contents of the second data area 32, and in step 105, the read contents are "FF" as the second response data.
h ”.

【0031】一方、第2のCPU21は、ステップ20
1において第1のデータエリア31の内容を読み取りス
テップ202に移りその第1のデータエリア31の内容
が第1の応答データとしての「FFh」かどうか判定す
る。つまり、第2のCPU21は、自身(第2のCP
U)が初期化されたことを第1のCPU11が判定しそ
の判定結果に基づく処理(第1のデータエリア31の内
容を「00h」から「FFh」に書き替え)が完了した
かどうか判定する。
On the other hand, the second CPU 21
In step 1, the content of the first data area 31 is read, and the process proceeds to step 202 to determine whether the content of the first data area 31 is "FFh" as first response data. That is, the second CPU 21 itself (the second CP)
The first CPU 11 determines that U) has been initialized, and determines whether the processing based on the determination result (rewriting the contents of the first data area 31 from “00h” to “FFh”) has been completed. .

【0032】第1のデータエリア31の内容が「FF
h」であると、第2のCPU21はステップ203にて
第2のデータエリア32の内容を第2の初期化データと
しての「00h」から第2の応答データとしての「FF
h」に書き替えた後にステップ204に移る。一方、第
1のCPU11は、ステップ104において、第2のデ
ータエリア32の書き替えられた内容を読み取り、ステ
ップ105にてその読み取った内容が「FFh」である
と判定して第2のCPU21との間において立ち上げ同
期が確立したとして異常監視処理動作のモードに移る。
When the content of the first data area 31 is "FF
h, the second CPU 21 in step 203 changes the contents of the second data area 32 from “00h” as the second initialization data to “FF” as the second response data.
After that, the process proceeds to step 204. On the other hand, the first CPU 11 reads the rewritten content of the second data area 32 in step 104, determines that the read content is “FFh” in step 105, It is determined that the startup synchronization has been established during the period, and the mode shifts to the mode of the abnormality monitoring processing operation.

【0033】一方、第2のCPU21は、第2のデータ
エリア32の内容を「00h」から「FFh」に書き替
えると、ステップ204に移り一定時間待機する。この
一定時間は、第1のCPU11が第2のデータアリア3
2に書き込まれた内容を読み取りその内容を判定するに
要する時間としている。そして、一定時間待機すると、
第2のCPU21は第1のCPU11との間において立
ち上げ同期が確立したとして異常監視処理動作のモード
に移る。
On the other hand, after rewriting the contents of the second data area 32 from "00h" to "FFh", the second CPU 21 proceeds to step 204 and waits for a certain time. During this fixed time, the first CPU 11 sets the second data area 3
2 is the time required to read the contents written in and determine the contents. And after waiting for a certain time,
The second CPU 21 determines that the startup synchronization has been established with the first CPU 11, and shifts to the mode of the abnormality monitoring processing operation.

【0034】このように立ち上げ同期処理動作におい
て、第1のCPU11の負荷が大きく第2のCPU21
よりシステムの初期化が遅れるとき、第2のCPU21
はステップ201,202において第1のCPU11が
システムの初期化を完了しステップ103にて第1のデ
ータエリア31の内容を「FFh」に書き替えるまで待
機している。第1のデータエリア31の内容が書き替え
られると、第2のCPU21は第2のデータエリア32
の内容を「FFh」に書き替える。つまり、この時点で
第1のCPU11は、初期化を完了し、その旨を待機し
ている第2のCPU21に知らせる。そして、第1CP
U11は第2CPU21がその旨を確認するまでステッ
プ104,105にて待つ。
In the startup synchronous processing operation, the load on the first CPU 11 is large and the second CPU 21
When the system initialization is further delayed, the second CPU 21
Waits until the first CPU 11 completes the initialization of the system in steps 201 and 202 and rewrites the contents of the first data area 31 to “FFh” in step 103. When the contents of the first data area 31 are rewritten, the second CPU 21
Is rewritten to “FFh”. That is, at this point, the first CPU 11 completes the initialization, and notifies the second CPU 21 that is waiting. And the first CP
U11 waits in steps 104 and 105 until the second CPU 21 confirms that.

【0035】第2のCPU21はステップ201,20
2において第1のCPU11が初期化したことを確認す
ると、第2のデータアリア32の「FFh」に書き替え
一定時間待機する。従って、一定時間は第1のCPU1
1が第2のデータアリア32に書き込まれた内容を読み
取りその内容を判定するに要する時間なので、該時間が
経過すると同時に第1のCPU11がステップ104,
105の処理動作を完了することになる。その結果、共
通電源スイッチを投入し立ち上げた時又はリセットがか
かった時、第1のCPU11のシステムの初期化が遅く
ても第2のCPU21は第1のCPU11がシステムの
初期化が完了するまでは次の処理動作に移らない。
The second CPU 21 executes steps 201 and 20
After confirming that the first CPU 11 has been initialized in Step 2, it is rewritten to "FFh" of the second data area 32 and waits for a certain time. Therefore, the first CPU 1
1 is the time required to read the contents written in the second data area 32 and determine the contents, so that the first CPU 11
The processing operation of 105 is completed. As a result, when the common power switch is turned on and activated or when a reset is applied, the second CPU 21 completes the system initialization of the first CPU 11 even if the system initialization of the first CPU 11 is late. Until the next processing operation.

【0036】一方、第1のCPU11の負荷が小さく第
2のCPU21よりシステムの初期化より速いとき、第
1のCPU11はステップ101,102において第2
のCPU21がシステムの初期化を完了しステップ10
1にて第2データエリア32の内容を「00h」に書き
替えるまで待機している。第2のデータエリア32の内
容が書き替えられると、第1のCPU11は第1のデー
タエリア31の内容を「FFh」に書き替える。つま
り、この時点で第1のCPU11は、第2のCPU21
がシステムの初期化を完了したことを確認した後にその
旨を第2のCPU21に知らせる。そして、第1のCP
U11は第2のCPU21がその旨を確認するまでステ
ップ104,105にて待つ。
On the other hand, when the load on the first CPU 11 is small and faster than the system initialization than the second CPU 21, the first CPU 11
CPU 21 completes the initialization of the system and
At 1, the process waits until the content of the second data area 32 is rewritten to “00h”. When the contents of the second data area 32 are rewritten, the first CPU 11 rewrites the contents of the first data area 31 to “FFh”. That is, at this point, the first CPU 11
Confirms that the initialization of the system has been completed, and notifies the second CPU 21 to that effect. And the first CP
U11 waits in steps 104 and 105 until the second CPU 21 confirms that.

【0037】従って、共通電源スイッチを投入し立ち上
げた時又はリセットがかかった時、第1のCPU11の
システムの初期化が第2のCPU21より速くても第1
のCPU11は第2のCPU21がシステムの初期化が
完了するまでは次の処理動作に移らない。
Therefore, when the common power switch is turned on and turned on, or when a reset is applied, the first CPU 11 is initialized faster than the second CPU 21 even if the system is initialized earlier.
CPU 11 does not proceed to the next processing operation until the second CPU 21 completes the system initialization.

【0038】しかも、互いにシステムの初期化が完了し
たかどうかを判断する場合に、第1及び第2データアリ
ア31,32の内容を書き替えるだけでよく、その書き
替えた内容をそれぞれ互いに読み取り認識することによ
り立ち上げ同期が確立したことを判断するようにした。
従って、従来のように、立ち上げ同期時間は安全を見込
んだ十分に長い時間を設定して該設定した時間が経過し
て立ち上げ同期が確立したと判断するのと比べて、タイ
マを用いることなく確実に立ち上げ同期が確立したこと
を認識することができるとともにシステムの起動時間を
短縮することができる。 (異常監視処理動作)異常監視処理動作とは、各CPU
11,21が異常かどうかを検出する処理動作をいう。
図4は第1及び第2のCPU11,21の異常監視処理
動作を説明するためのフローチャートを示す。
Moreover, when judging whether or not the initialization of the system has been completed, it is only necessary to rewrite the contents of the first and second data areas 31, 32, and the rewritten contents are read and recognized by each other. To determine that startup synchronization has been established.
Therefore, it is necessary to use a timer as compared with the conventional case where the start-up synchronization time is set to a sufficiently long time for safety and it is determined that the start-up synchronization has been established after the set time has elapsed. Thus, it is possible to surely recognize that the start-up synchronization has been established, and to shorten the system startup time. (Abnormality monitoring processing operation)
This refers to a processing operation for detecting whether or not 11 and 21 are abnormal.
FIG. 4 is a flowchart for explaining the abnormality monitoring processing operation of the first and second CPUs 11 and 21.

【0039】立ち上げ同期の処理動作が終了すると、第
1及び第2のCPU11,21は図4に示すフローチャ
ートに従った動作をそれぞれ実行する。第1のCPU1
1はステップ300にて第1の固有メモリ12に設けた
カウンタの内容をクリアした後にステップ301に移り
第1のデータエリア31に監視用データとしての「1F
h」の内容を書き込む。
When the startup synchronization processing operation is completed, the first and second CPUs 11 and 21 execute operations according to the flowchart shown in FIG. First CPU 1
1 clears the contents of the counter provided in the first unique memory 12 in step 300, and then proceeds to step 301 to store “1F” as monitoring data in the first data area 31.
h) is written.

【0040】「1Fh」の内容を書き込んだ後、第1の
CPU11は、ステップ302にて第1の固有メモリ1
2に設けた通信フラグの内容を読み取り、ステップ30
3にて該通信フラグの内容が立っているか、即ち「1」
かどうか判定する。つまり、該第1のCPU11におい
て第2のCPU21との間でデータの授受を行うための
送信データ転送処理のモードに移るかどうか判定する。
そして、通信フラグの内容が「1」のとき、第1のCP
U11はステップ304に移り後記する送信データ転送
処理動作を行うデータ転送ルーチンを実行した後にステ
ップ305に移る。
After writing the contents of “1Fh”, the first CPU 11 in step 302
2. Read the contents of the communication flag provided in
3 whether the content of the communication flag is set, that is, "1"
Is determined. That is, the first CPU 11 determines whether or not to shift to a transmission data transfer mode for exchanging data with the second CPU 21.
When the content of the communication flag is “1”, the first CP
U11 proceeds to step 304, executes a data transfer routine for performing a transmission data transfer processing operation described later, and then proceeds to step 305.

【0041】一方、通信フラグの内容が「0」のとき、
第1のCPU11は直ちにステップ305に移り第2の
データエリア32の内容を読み取る。続いて、第1のC
PU11はステップ306に移り、第1のデータエリア
31に書き込んだ内容とステップ305で読み取った第
2のデータエリア32の内容とを比較し予め定めた関係
にあるかどうか判定する。第1のデータエリア31の内
容に対する第2のデータエリア32の内容における関係
は予め決められていて、本実施形態では、「1Fh」対
「27h」、「27h」対「3Ch」、又は、「3C
h」対「1Fh」のいずれか1つに該当するかどうか判
定する。
On the other hand, when the content of the communication flag is "0",
The first CPU 11 immediately proceeds to step 305 and reads the contents of the second data area 32. Then, the first C
The PU 11 proceeds to step 306 and compares the content written in the first data area 31 with the content of the second data area 32 read in step 305 to determine whether or not a predetermined relationship exists. The relationship between the content of the first data area 31 and the content of the second data area 32 is predetermined, and in the present embodiment, “1Fh” vs. “27h”, “27h” vs. “3Ch”, or “3Fh”. 3C
h ”and“ 1Fh ”.

【0042】例えば、第1のデータエリア31の監視用
データの内容が「1Fh」、第2のデータエリア32の
監視用データとしての内容が「27h」の時には、該当
するとしてステップ307に移る。反対に、第1のデー
タエリア31の監視用データとしての内容が「1Fh」
に対して、第2のデータエリア32の監視用データとし
ての内容が「27h」以外の「3Ch」、又は、「1F
h」の時には、該当しないとしてステップ309に移
る。
For example, when the content of the monitoring data in the first data area 31 is "1Fh" and the content of the monitoring data in the second data area 32 is "27h", the process proceeds to step 307 as corresponding. Conversely, the content of the monitoring data in the first data area 31 is “1Fh”.
On the other hand, the content as monitoring data in the second data area 32 is “3Ch” other than “27h” or “1F”.
At the time of "h", it is determined that it does not correspond and the process proceeds to step 309.

【0043】ステップ307において、第1のCPU1
1は、第1のデータエリア31の内容をその時の第2の
データエリア32の内容に基づいて書き替える。本実施
形態では予め決められていて、その時の第2のデータエ
リア32の内容が「1Fh」なら第1のデータエリア3
1の内容を「27h」に、第2のデータエリア32の内
容が「27h」なら第1のデータエリア31の内容を
「3Ch」に、第2のデータエリア32の内容が「3C
h」なら第1のデータエリア31の内容を「1Fh」に
書き替える。
In step 307, the first CPU 1
1 rewrites the contents of the first data area 31 based on the contents of the second data area 32 at that time. In the present embodiment, it is determined in advance, and if the content of the second data area 32 at that time is “1Fh”, the first data area 3
1 is “27h”, if the content of the second data area 32 is “27h”, the content of the first data area 31 is “3Ch”, and the content of the second data area 32 is “3C”.
If "h", the contents of the first data area 31 are rewritten to "1Fh".

【0044】第1のデータエリア31の内容の書き替え
が済むと、第1のCPU11はステップ308に移り前
記第1の固有メモリ12に設けたカウンタの内容をクリ
アした後、前記したステップ302に戻り同様な動作を
実行する。
When the contents of the first data area 31 have been rewritten, the first CPU 11 proceeds to step 308 to clear the contents of the counter provided in the first unique memory 12 and then proceeds to step 302 described above. Return and execute the same operation.

【0045】一方、ステップ306において該当しない
として判定されステップ309に移ると、第1のCPU
11は前記カウンタの内容を1加算する。加算が済む
と、第1のCPU11はステップ310において該カウ
ンタの内容が予め定めた基準値Yを超えた値になったか
どうか判定する。つまり、前に行われたステップ306
の判定で該当しない回数が連続してY回(例えば10
回)を超えたかどうか判定し、Y回を超えない場合には
ステップ302に戻り前記と同様な動作を実行する。
又、Y回を超えた場合には、第1のCPU11は第2の
CPU21が異常であると判定し異常監視処理動作を終
了する。
On the other hand, if it is determined in step 306 that the condition does not apply and the process proceeds to step 309, the first CPU
11 adds 1 to the content of the counter. After the addition, the first CPU 11 determines in step 310 whether or not the content of the counter has exceeded a predetermined reference value Y. That is, the previously performed step 306
Y times (for example, 10 times)
It is determined whether the number of times has exceeded the number of times. If the number does not exceed the number of times of Y, the flow returns to step 302 to execute the same operation as described above.
If the number of times has exceeded Y times, the first CPU 11 determines that the second CPU 21 is abnormal and ends the abnormality monitoring processing operation.

【0046】一方、第2のCPU21は異常監視処理動
作に移るとステップ400にて第2の固有メモリ22に
設けたカウンタの内容をクリアした後にステップ401
に移り第2のデータエリア32に「27h」の内容を書
き込む。
On the other hand, when the second CPU 21 proceeds to the abnormality monitoring processing operation, it clears the contents of the counter provided in the second specific memory 22 in step 400 and then proceeds to step 401
Then, the contents of "27h" are written in the second data area 32.

【0047】「27h」の内容を書き込んだ後、第2の
CPU21は、ステップ402にて第1のデータエリア
31の内容を読み取り、ステップ403にて該内容が
「00h」かどうか判定する。つまり、第1のCPU1
1が後記する第2のCPU21に対してデータの授受を
行うための送信データ転送処理動作を実行させるために
第1のデータエリア31に「00h」の内容を書き込ん
だかどうか判定する。
After writing the contents of "27h", the second CPU 21 reads the contents of the first data area 31 in step 402, and determines whether or not the contents are "00h" in step 403. That is, the first CPU 1
It is determined whether or not 1 has written "00h" in the first data area 31 in order to execute a transmission data transfer processing operation for transmitting and receiving data to and from a second CPU 21 described later.

【0048】そして、第1のデータエリア31の内容が
「00h」のとき、第2のCPU21はステップ404
に移り第2のデータエリア32に「00h」を書き込
み、続いてステップ405に移り後記する送信データ転
送処理動作を行うデータ転送ルーチンを実行した後にス
テップ406に移る。
When the content of the first data area 31 is "00h", the second CPU 21 proceeds to step 404.
Then, "00h" is written in the second data area 32, and subsequently, the process proceeds to step 405, and after executing a data transfer routine for performing a transmission data transfer processing operation described later, proceeds to step 406.

【0049】一方、第1のデータエリア31の内容が
「00h」でないとき、第2のCPU21は直ちにステ
ップ406に移り第1のデータエリア31に書き込まれ
た内容と第2のデータエリア32に書き込んだ内容とを
比較し予め定めた関係にあるかどうか判定する。第1の
データエリア31の内容に対する第2のデータエリア3
2の内容における関係は予め決められていて、本実施形
態では、「27h」対「1Fh」、「3Ch」対「27
h」、又は、「1Fh」対「3Ch」のいずれか1つに
該当するかどうか判定する。
On the other hand, when the contents of the first data area 31 are not "00h", the second CPU 21 immediately proceeds to step 406 and writes the contents written in the first data area 31 and the second data area 32. Then, it is determined whether or not the contents are in a predetermined relationship by comparing the contents. Second data area 3 for the contents of first data area 31
The relationship in the content of No. 2 is predetermined, and in the present embodiment, “27h” vs. “1Fh”, “3Ch” vs. “27
h ”or one of“ 1Fh ”vs.“ 3Ch ”.

【0050】例えば、第1のデータエリア31の内容が
「27h」、第2のデータエリア32の内容が「1F
h」の時には、該当するとしてステップ407に移る。
反対に、第1のデータエリア31の内容が「27h」に
対して、第2のデータエリア32の内容が「1Fh」以
外の「27h」、又は、「3Ch」の時には、該当しな
いとしてステップ409に移る。ステップ407におい
て、第2のCPU21は、第2のデータエリア32の内
容をその時の第1のデータエリア31の内容に基づいて
書き替える。本実施形態では予め決められていて、その
時の第1のデータエリア31の内容が「1Fh」なら第
2のデータエリア32の内容を「27h」に、第1のデ
ータエリア31の内容が「27h」なら第2のデータエ
リア32の内容を「3Ch」に、第1のデータエリア3
1の内容が「3Ch」なら第2のデータエリア32の内
容を「1Fh」に書き替える。
For example, the content of the first data area 31 is "27h" and the content of the second data area 32 is "1F".
In the case of "h", it is determined to be applicable, and the process proceeds to step 407.
Conversely, when the content of the first data area 31 is "27h" and the content of the second data area 32 is "27h" other than "1Fh" or "3Ch", it is determined that the content does not correspond to step 409. Move on to In step 407, the second CPU 21 rewrites the contents of the second data area 32 based on the contents of the first data area 31 at that time. In this embodiment, the content of the first data area 31 is "27h" if the content of the first data area 31 is "1Fh" at that time, and the content of the first data area 31 is "27h". ", The content of the second data area 32 is set to" 3Ch "and the first data area 3
If the content of 1 is "3Ch", the content of the second data area 32 is rewritten to "1Fh".

【0051】第2のデータエリア32の内容の書き替え
が済むと、第2のCPU21はステップ408に移り前
記第2の固有メモリ22に設けたカウンタの内容をクリ
アした後、前記したステップ402に戻り同様な動作を
実行する。
After rewriting the contents of the second data area 32, the second CPU 21 proceeds to step 408, clears the contents of the counter provided in the second specific memory 22, and then proceeds to step 402 described above. Return and execute the same operation.

【0052】一方、ステップ406において該当しない
として判定されステップ409に移ると、第2のCPU
21は前記カウンタの内容を1加算する。加算が済む
と、第2のCPU21はステップ410において該カウ
ンタの内容が予め定めた基準値Zを超えた値になったか
どうか判定する。つまり、前に行われたステップ406
の判定で該当しない回数が連続してZ回(例えば10
回)を超えたかどうか判定し、Z回を超えない場合には
ステップ402に戻り前記と同様な動作を実行する。
又、Z回を超えた場合には、第2のCPU21は第1の
CPU11が異常であると判定し異常監視処理動作を終
了する。
On the other hand, if it is determined in step 406 that the condition does not apply and the process proceeds to step 409, the second CPU
21 adds 1 to the content of the counter. After the addition, the second CPU 21 determines in step 410 whether or not the content of the counter has exceeded a predetermined reference value Z. That is, step 406 performed earlier
The number of times that does not correspond to the judgment of (1) is continuously Z times (for example, 10
It is determined whether the number of times has exceeded the number of times. If the number does not exceed the number of times of Z, the flow returns to step 402 to execute the same operation as described above.
If the number of times exceeds Z, the second CPU 21 determines that the first CPU 11 is abnormal and ends the abnormality monitoring processing operation.

【0053】つまり、立ち上げ同期確率処理動作が終了
して異常監視処理動作に移ると、第1のCPU11はス
テップ301にて第1のデータエリア31に「1Fh」
を書き込み、第2のCPU21はステップ401にて第
2のデータエリア32に「27h」を書き込む。今、送
信データの授受が行われていない状態において、第1の
CPU11はステップ302、ステップ303を経てス
テップ305に移り第2のデータエリア32の「27
h」の内容を読み込んだ後にステップ306に移る。一
方、これと並行して第2のCPU21はステップ402
にて第1のデータエリア31の「1Fh」の内容を読み
取った後にステップ403を経てステップ406に移
る。
That is, when the startup synchronization probability processing operation is completed and the operation proceeds to the abnormality monitoring processing operation, the first CPU 11 stores “1Fh” in the first data area 31 in step 301.
Is written, and the second CPU 21 writes “27h” in the second data area 32 in step 401. Now, in a state where transmission / reception of data is not performed, the first CPU 11 proceeds to step 305 via steps 302 and 303, and proceeds to step 305 of the second data area 32.
After reading the contents of "h", the process proceeds to step 306. On the other hand, in parallel with this, the second CPU 21
After reading the contents of "1Fh" in the first data area 31, the process proceeds to step 406 via step 403.

【0054】ステップ306において、第1のCPU1
1は第1のデータエリア31の内容と第2のデータエリ
ア32の内容との関係を比較する。この時、第1のデー
タエリア31の内容が「1Fh」と第2のデータエリア
32の内容が「27h」であるため、第1のCPU11
は予め定めた関係にあると判定しステップ307に移
る。第1のCPU11は、その時の第2のデータエリア
32の内容に基づいて第1のデータエリア31の内容を
書き替える。この時、第2のデータエリア32の内容が
「27h」なので第1のデータエリア31の内容を「1
Fh」から「3Ch」に書き替える。そして、ステップ
308にてカウンタをクリアした後、第1のCPU11
は再びステップ302,303を経てステップ305に
移る。この時、第1のCPU11は、いまだ書き替えら
れていない第2のデータエリア32の「27h」の内容
を読み取る。
In step 306, the first CPU 1
1 compares the relationship between the contents of the first data area 31 and the contents of the second data area 32. At this time, since the contents of the first data area 31 are “1Fh” and the contents of the second data area 32 are “27h”, the first CPU 11
Are determined to have a predetermined relationship, and the flow proceeds to step 307. The first CPU 11 rewrites the contents of the first data area 31 based on the contents of the second data area 32 at that time. At this time, since the content of the second data area 32 is “27h”, the content of the first data area 31 is changed to “1”.
Fh ”to“ 3Ch ”. Then, after clearing the counter in step 308, the first CPU 11
Goes to step 305 again via steps 302 and 303. At this time, the first CPU 11 reads the content of “27h” in the second data area 32 that has not been rewritten.

【0055】一方、ステップ406において、第2のC
PU11は第1のデータエリア31の内容と第2のデー
タエリア32の内容との関係を比較する。この時、第1
のデータエリア31の内容が「1Fh」と第2のデータ
エリア32の内容が「27h」であるため、第2のCP
U21は予め定めた関係にないと判定しステップ409
に移る。第2のCPU21は、カウンタの内容を「1」
加算しステップ410にて該カウンタの内容がZ回を超
えたかどうかしたかチェックする。この時、まだZ回を
超えていないとして第2のCPU21はステップ402
に戻る。
On the other hand, in step 406, the second C
The PU 11 compares the relationship between the contents of the first data area 31 and the contents of the second data area 32. At this time, the first
Of the second data area 32 is "1h" and the content of the second data area 32 is "27h".
U21 determines that there is no predetermined relationship, and step 409
Move on to The second CPU 21 sets the content of the counter to “1”.
In step 410, it is checked whether or not the content of the counter has exceeded Z times. At this time, the second CPU 21 determines that the count has not exceeded Z times yet,
Return to

【0056】このステップ402において、第2のCP
U11はステップ307において第1のCPU11が書
き替えた第1のデータエリア31の「3Ch」の内容を
読み込むことになる。そして、第2のCPU21はこの
第1のデータエリア31の「3Ch」の内容と第2のデ
ータエリア32の「27h」の内容を比較し、予め定め
た関係にあると判定する。第2のCPU21はステップ
407にて第1のデータエリア31の内容が「3Ch」
なので第2のデータエリア32の内容を「27h」から
「1Fh」に書き替える。そして、ステップ408にて
カウンタをクリアした後、第2のCPU21は再びステ
ップ402に戻る。
In this step 402, the second CP
U11 reads the contents of “3Ch” in the first data area 31 rewritten by the first CPU 11 in step 307. Then, the second CPU 21 compares the content of “3Ch” in the first data area 31 with the content of “27h” in the second data area 32, and determines that there is a predetermined relationship. The second CPU 21 determines in step 407 that the content of the first data area 31 is “3Ch”.
Therefore, the content of the second data area 32 is rewritten from “27h” to “1Fh”. Then, after clearing the counter in step 408, the second CPU 21 returns to step 402 again.

【0057】一方、ステップ306において、第1のC
PU11は、前記ステップ305にて読み出した書き替
える前の第2のデータエリア32の「27h」の内容と
前に書き替えた第1のデータアリア31の「3Ch」と
の関係を比較する。そして、第1のCPU11は、予め
定めた関係にないと判定しステップ309に移る。第1
のCPU11は、カウンタの内容を「1」加算しステッ
プ310にて該カウンタの内容がY回を超えたかどうか
したかチェックする。この時、まだY回を超えていない
として第1のCPU11はステップ302,303を経
てステップ305に戻る。
On the other hand, in step 306, the first C
The PU 11 compares the content of “27h” in the second data area 32 before rewriting read in step 305 with the “3Ch” of the first data area 31 previously rewritten. Then, the first CPU 11 determines that there is no predetermined relationship, and proceeds to step 309. First
CPU 11 adds "1" to the content of the counter and checks in step 310 whether the content of the counter has exceeded Y times. At this time, the first CPU 11 returns to step 305 via steps 302 and 303, assuming that the number has not exceeded Y times.

【0058】このステップ305において、第1のCP
U11はステップ407において第2のCPU21が書
き替えた第2のデータエリア32の「1Fh」の内容を
読み込むことになる。そして、第1のCPU11はこの
第1のデータエリア31の「3Ch」の内容と第2のデ
ータエリア32の「1Fh」の内容を比較し、予め定め
た関係にあると判定する。第1のCPU11はステップ
307にて第2のデータエリア32の内容が「1Fh」
なので第1のデータエリア31の内容を「3Ch」から
「27h」に書き替える。そして、ステップ308にて
カウンタをクリアした後、第1のCPU11は再び前記
ステップ305に戻る。
In this step 305, the first CP
U11 reads the contents of “1Fh” in the second data area 32 rewritten by the second CPU 21 in step 407. Then, the first CPU 11 compares the content of “3Ch” in the first data area 31 with the content of “1Fh” in the second data area 32, and determines that there is a predetermined relationship. The first CPU 11 determines in step 307 that the content of the second data area 32 is “1Fh”.
Therefore, the content of the first data area 31 is rewritten from “3Ch” to “27h”. Then, after clearing the counter in step 308, the first CPU 11 returns to step 305 again.

【0059】従って、両CPU11,21が正常に動作
を行っている場合には、交互に第1及び第2のデータエ
リア31,32の内容が書き替えられるとともに、書き
替えられない時に「1」加算されたカウンタの内容を交
互にクリアすることになる。その結果、送信データの授
受が行われていない状態において両CPU11,21が
正常に動作している時には、第1及び第2のデータエリ
ア31,32の内容は常に予め定められた関係が交互に
成立する。そして、各カウンタの内容がY回及びZ回を
超えることがない。
Therefore, when both the CPUs 11 and 21 are operating normally, the contents of the first and second data areas 31 and 32 are rewritten alternately, and when the contents are not rewritten, "1" is set. The contents of the added counter are cleared alternately. As a result, when both CPUs 11 and 21 are operating normally in a state where transmission / reception of data is not performed, the contents of the first and second data areas 31 and 32 always have a predetermined relationship alternately. To establish. The content of each counter does not exceed Y times and Z times.

【0060】一方、第2のCPU21が何らかの原因で
異常をきたしステップ407の書き替えが行われない場
合には、第1のCPU11はステップ306において上
記した関係が成立しなくなってカウンタの内容がY回を
超えると、第2のCPU21が何らかの原因で異常をき
たしていると判定する。又、第1のCPU11が何らか
の原因で異常をきたしステップ307の書き替えが行わ
れない場合には、第2のCPU21はステップ406に
おいて上記した関係が成立しなくなってカウンタの内容
がZ回を超えると、第1のCPU11が何らかの原因で
異常をきたしていると判定する。
On the other hand, if the second CPU 21 causes an abnormality for some reason and the rewriting in step 407 is not performed, the first CPU 11 stops the relationship in step 306 and the content of the counter becomes Y. If the number of times has exceeded, the second CPU 21 determines that an abnormality has occurred for some reason. Also, if the first CPU 11 causes an abnormality for some reason and the rewriting in step 307 is not performed, the second CPU 21 does not satisfy the above relation in step 406 and the content of the counter exceeds Z times. Then, it is determined that the first CPU 11 has caused an abnormality for some reason.

【0061】従って、従来のように異常検出のための検
出回路を用いないで相手のCPUの異常を検出し判定す
ることができることになる。次に、途中で送信データの
授受が開始される場合における第1のCPU11が実行
するステップ304と、第2のCPU21が実行するス
テップ405のデータ転送ルーチン(送信データ転送処
理動作)について説明する。 (送信データ転送処理動作)送信データ転送処理動作と
は、各CPU11,21が互いにDPRAM30を介し
て相手方に送信データを転送するための処理動作であっ
て、本実施形態ではステップ304及びステップ405
のデータ転送ルーチンの処理動作をいう。ここでは、説
明の便宜上第1のCPU11から第2のCPU21に送
信データを送信する場合を例にして説明する。
Accordingly, it is possible to detect and determine the abnormality of the partner CPU without using a detection circuit for detecting the abnormality as in the related art. Next, a data transfer routine (transmission data transfer processing operation) of step 304 executed by the first CPU 11 and step 405 executed by the second CPU 21 when transmission / reception of transmission data is started halfway will be described. (Transmission Data Transfer Processing Operation) The transmission data transfer processing operation is a processing operation for each CPU 11 and 21 to transfer transmission data to each other via the DPRAM 30. In the present embodiment, steps 304 and 405 are performed.
Of the data transfer routine. Here, for convenience of explanation, a case where transmission data is transmitted from the first CPU 11 to the second CPU 21 will be described as an example.

【0062】今、第1のCPU11が第2のCPU21
に送信データを送信するために第1の固有メモリ12に
「1」なる通信フラグ及び送信フラグを立てると、第1
のCPU11はステップ302にて該通信フラグを読み
取りステップ303からステップ304のデータ転送ル
ーチンを実行する。
Now, the first CPU 11 is replaced with the second CPU 21
When the communication flag and the transmission flag of “1” are set in the first specific memory 12 to transmit the transmission data to the first
CPU 11 reads the communication flag in step 302 and executes the data transfer routine of steps 303 to 304.

【0063】図5、図6は第1及び第2のCPU11,
21のデータ転送ルーチンを説明するためのフローチャ
ートを示す。第1のCPU11は、まずステップ500
にて第1の固有メモリ12に「1」なる送信フラグを読
み取り、ステップ501にて該フラグが「1」であるこ
とを確認した後にステップ502に移る。ステップ50
2において、第1のCPU11は第1の固有メモリ12
に記憶している第2のCPU21に転送するための送信
データをDPRAM30の第5のデータエリア35に転
送し書き込みステップ503に移る。ステップ503に
おいて、第1のCPU11は第3のデータエリア33に
「FFh」の内容を書き込んだ後にステップ505に移
る。尚、ステップ501において、第1のCPU11に
て通信フラグが「0」の内容である時には、第1のCP
U11はステップ504にて第3のデータエリア33に
「00h」の内容を書き込んでステップ505に移る。
FIGS. 5 and 6 show the first and second CPUs 11 and 12, respectively.
21 is a flowchart for explaining a data transfer routine of No. 21; First, the first CPU 11 first proceeds to step 500.
At step 501, a transmission flag of "1" is read into the first unique memory 12, and at step 501, it is confirmed that the flag is "1". Step 50
2, the first CPU 11 is connected to the first specific memory 12
Is transferred to the fifth data area 35 of the DPRAM 30 and transferred to the write step 503. In step 503, the first CPU 11 writes the contents of “FFh” in the third data area 33, and then proceeds to step 505. In step 501, when the first CPU 11 sets the communication flag to "0", the first CP
U11 writes the content of "00h" in the third data area 33 in step 504, and proceeds to step 505.

【0064】つまり、第3のデータエリア33に書き込
まれる「FFh」は送信するためのデータがあることを
意味する内容である。又、第3のデータエリア33に書
き込まれる「00h」は送信するためのデータがないこ
とを意味する内容である。
In other words, "FFh" written in the third data area 33 has a content meaning that there is data to be transmitted. “00h” written in the third data area 33 is a content indicating that there is no data to be transmitted.

【0065】ステップ505において、第1のCPU1
1は第1のデータエリア31に「00h」の内容を書き
込む。この第1のデータエリア31に書き込まれた「0
0h」の内容は、第2のCPU21との間でデータの授
受を行うことを意味(この場合は第2のCPU21に対
して送信データがあることを意味)し、前記ステップ4
02〜404をへてステップ405のデータ転送ルーチ
ンを実行させるためのものである。
In step 505, the first CPU 1
1 writes the content of “00h” in the first data area 31. “0” written in the first data area 31
The content of “0h” means that data is exchanged with the second CPU 21 (in this case, that there is data to be transmitted to the second CPU 21).
This is for executing the data transfer routine of step 405 through steps 02-404.

【0066】第1のデータエリア31に「00h」を書
き込むと、第1のCPU11はステップ506、507
に移る。第1のCPU11はステップ506にて第2の
データエリア32の内容を読み取り、ステップ506に
てその内容が「FFh」かどうかチェックし、「FF
h」になるまで待機する。つまり、第1のCPU11
は、第2のCPU21が第5のデータエリア35に書き
込んだ送信データを読み込んだどうかをチェックし、読
み込みが完了するまで待機する。
When "00h" is written in the first data area 31, the first CPU 11 executes steps 506 and 507.
Move on to The first CPU 11 reads the contents of the second data area 32 at step 506, checks at step 506 whether the contents are "FFh",
h ”. That is, the first CPU 11
Checks whether the second CPU 21 has read the transmission data written in the fifth data area 35, and waits until the reading is completed.

【0067】一方、第2のCPU21は、第1のCPU
11によるステップ505における第1のデータエリア
31への「00h」の書き込みにより、図4に示すステ
ップ402,403及び404を経てステップ405の
データ転送ルーチン(送信データ転送処理動作)に移
る。尚、第2のCPU21は、ステップ404にて第2
のデータエリア32に「00h」を書き込むが、この
「00h」の内容は第5のデータエリア35に記録した
送信データの読み取りモードに入ったことを意味する内
容である。
On the other hand, the second CPU 21
By writing “00h” to the first data area 31 in step 505 by 11, the process proceeds to the data transfer routine (transmission data transfer processing operation) in step 405 via steps 402, 403 and 404 shown in FIG. Note that the second CPU 21 determines in step 404 that the second
"00h" is written in the data area 32 of the data area 32. The contents of the data area "00h" means that the transmission data recorded in the fifth data area 35 has been read.

【0068】データ転送ルーチンに入ると、第2のCP
U21は図5に示すステップ600に移り、第1のCP
U11が書き込んだ第3のデータエリア33の内容を読
み取ってステップ601に移る。この時、先に第1のC
PU11がステップ503において第3のデータエリア
33に「FFh」の内容を書き込んだので、第2のCP
U21はステップ601からステップ602に移る。ス
テップ602において、第2のCPU21は、第1のC
PU11がステップ502において第5のデータエリア
35に書き込んだ送信データを読み取り第2の固有メモ
リ22に書き込む。従って、この時点で第2のCPU1
1は第1のCPU11からの送信データを入力したこと
になる。
When entering the data transfer routine, the second CP
U21 moves to step 600 shown in FIG.
The contents of the third data area 33 written by U11 are read, and the flow proceeds to step 601. At this time, the first C
Since the PU 11 has written the content of “FFh” in the third data area 33 in step 503, the second CP
U21 moves from step 601 to step 602. In step 602, the second CPU 21 executes the first C
The PU 11 reads the transmission data written in the fifth data area 35 in Step 502 and writes the transmission data in the second specific memory 22. Therefore, at this time, the second CPU 1
1 means that the transmission data from the first CPU 11 has been input.

【0069】送信データを入力すると、第2のCPU2
1はステップ603にて該第2のCPU21が第1のC
PU11に送信データを送信するかどうか示す第2の固
有メモリ22に設けた送信フラグの内容を読み取りステ
ップ604に移る。ステップ604において、第2のC
PU21は該送信フラグが「1」かどうか、第1のCP
U11に送信するデータがあるかどうか判断する。この
場合、第1のCPU11に対して送信データを送信しな
いので、送信フラグは「0」となっていて、第2のCP
U21はステップ607に移り、第4のデータエリア3
4に「00h」に書き込んだ後にステップ608に移
る。
When the transmission data is input, the second CPU 2
In step 603, the second CPU 21 sets the first C
The content of the transmission flag provided in the second specific memory 22 indicating whether to transmit the transmission data to the PU 11 is read, and the process proceeds to Step 604. In step 604, the second C
The PU 21 determines whether the transmission flag is “1” and determines whether the first CP
It is determined whether there is data to be transmitted to U11. In this case, since the transmission data is not transmitted to the first CPU 11, the transmission flag is "0" and the second CP
U21 moves on to step 607, where the fourth data area 3
After writing “00h” to No. 4, the process proceeds to step 608.

【0070】尚、送信フラグが「1」のときには、送信
データがあるとして第2のCPU21はステップ605
に移り第2の固有メモリ22に記憶している第1のCP
U11に転送するための送信データをDPRAM30の
第6のデータエリア36に転送し書き込んだ後にステッ
プ606に移る。ステップ606において、第2のCP
U21は第4のデータエリア34に「FFh」の内容を
書き込んだ後にステップ608に移る。つまり、第4の
データエリア34に書き込まれる「FFh」は送信する
ためのデータがあることを第1のCPU11に知らせる
内容である。又、第4のデータエリア34に書き込まれ
る「00h」は送信するためのデータがないことを知ら
せる内容である。
When the transmission flag is "1", it is determined that there is transmission data, and the second CPU 21 proceeds to step 605.
To the first CP stored in the second specific memory 22.
After transferring and writing the transmission data to be transferred to U11 to the sixth data area 36 of the DPRAM 30, the process proceeds to step 606. In step 606, the second CP
U21 proceeds to step 608 after writing the contents of "FFh" in the fourth data area 34. That is, “FFh” written in the fourth data area 34 is a content that notifies the first CPU 11 that there is data to be transmitted. “00h” written in the fourth data area 34 is a content notifying that there is no data to be transmitted.

【0071】第1のCPU11からの送信データを入力
すると、ステップ608において第2のCPU21は第
2のデータエリア32に「FFh」の内容を書き込む。
つまり、第2のCPU21はステップ506,507に
て待機している第1のCPU11に読み込みが終了した
ことを知らせる。
When the transmission data from the first CPU 11 is input, the second CPU 21 writes the contents of “FFh” in the second data area 32 in step 608.
In other words, the second CPU 21 notifies the first CPU 11 waiting at steps 506 and 507 that the reading has been completed.

【0072】第1のCPU11は、第2のデータエリア
32に「FFh」の内容、即ち送信データが読み出され
たと判断してステップ508にて第4のデータエリア3
4の内容を読んだ後にステップ509に移る。ステップ
509において、第1のCPU11は、第4のデータエ
リア34の内容が「FFh」、即ち第2のCPU21か
らの送信データがあるかどうか判断する。この時、該エ
リア34の内容は「00h」なので、第1のCPU11
はステップ512に移る。尚、第4のデータエリア34
の内容が「FFh」の時、第1のCPU11は第2のC
PU21からの送信データがあるとしてステップ510
にて第6のデータエリア36に転送し書き込まれた送信
データを第1の固有メモリ12に書き込んでステップ5
11に移りその固有メモリ12に設けたデータ受信した
ことを示す受信フラグを立てた後にステップ512に移
る。
The first CPU 11 determines that the content of “FFh”, that is, the transmission data has been read out in the second data area 32, and determines in step 508 the fourth data area 3
After reading the contents of step No. 4, the process proceeds to step 509. In step 509, the first CPU 11 determines whether the contents of the fourth data area 34 are “FFh”, that is, whether there is transmission data from the second CPU 21. At this time, since the content of the area 34 is “00h”, the first CPU 11
Moves to step 512. The fourth data area 34
Is "FFh", the first CPU 11 sends the second C
Step 510 assuming that there is transmission data from PU 21
The transmission data transferred to and written in the sixth data area 36 is written in the first unique memory 12 and
Then, the process proceeds to step S11, where a reception flag provided in the unique memory 12 indicating that data has been received is set, and thereafter, the process proceeds to step S512.

【0073】ステップ512において、第1のCPU1
1は第1のデータエリア31に「3Ch」の内容を書き
込む。この「3Ch」の内容は、該転送ルーチンが完了
し図4に示す異常監視処理動作に戻るとき、最初の時だ
けステップ306及びステップ406において条件が合
うようにして異常監視処理動作が行うことができるよう
にするためのものである。
In step 512, the first CPU 1
1 writes the content of “3Ch” in the first data area 31. The contents of the "3Ch" indicate that when the transfer routine is completed and the process returns to the abnormality monitoring processing operation shown in FIG. This is to make it possible.

【0074】第1のデータエリア31に「3Ch」の内
容を書き込むと、第1のCPU11はステップ513,
514において第2のデータエリア32の内容が第2の
CPU21により「1Fh」に書き替えられるのを待
つ。
When the contents of "3Ch" are written in the first data area 31, the first CPU 11 proceeds to step 513,
At 514, the process waits for the content of the second data area 32 to be rewritten to “1Fh” by the second CPU 21.

【0075】一方、第2のCPU21は、第1のCPU
11により第1のデータエリア31の内容が「3Ch」
に書き替えられたことをステップ609,610にて判
断すると、ステップ611に移り第2のデータエリア3
2に「1Fh」の内容を書き込む。この「1Fh」の内
容は、前記したように該転送ルーチンが完了し図4に示
す異常監視処理動作に戻るとき、最初の時だけステップ
306及びステップ406において条件が合うようにし
て異常監視処理動作が行うことができるようにするため
のものである。そして、第2のCPU21はステップ6
12に移り第4のデータエリア34に「00h」の内容
を書き込んでデータ転送ルーチンを完了し異常監視処理
動作に戻る。
On the other hand, the second CPU 21
11, the content of the first data area 31 is "3Ch"
When it is determined in steps 609 and 610 that the data area has been rewritten,
Write the contents of “1Fh” to 2. As described above, when the transfer routine is completed and the process returns to the abnormality monitoring processing operation shown in FIG. 4, the contents of “1Fh” are set so that the conditions are met in steps 306 and 406 only at the first time. Is to be able to do. Then, the second CPU 21 proceeds to step 6
Then, the process proceeds to step 12, where "00h" is written in the fourth data area 34, the data transfer routine is completed, and the process returns to the abnormality monitoring processing operation.

【0076】第1のCPU11は、第2のCPU21に
より第2のデータエリア32の内容が「1Fh」に書き
替えられたことをステップ513,514にて判断する
と、ステップ515に移り第3のデータエリア33に
「00h」の内容を書き込んでデータ転送ルーチンを完
了し異常監視処理動作に戻る。
When the first CPU 11 determines in steps 513 and 514 that the content of the second data area 32 has been rewritten to “1Fh” by the second CPU 21, the process proceeds to step 515 and the third data The contents of "00h" are written in the area 33 to complete the data transfer routine and return to the abnormality monitoring processing operation.

【0077】従って、第1及び第2のCPU11,21
が異常監視処理動作に戻つた時、第1のデータエリア3
1に「3Ch」、第2のデータエリア32に「1Fh」
が書き込まれ、該両内容はステップ306で予め定めた
関係が成立し、ステップ406で次回に予め定めた関係
が成立する内容である。その結果、送信データ転送処理
動作が完了しても直ちに異常監視処理動作に復帰するこ
とができる。
Therefore, the first and second CPUs 11 and 21
Returns to the abnormality monitoring processing operation, the first data area 3
1 is “3Ch”, and the second data area 32 is “1Fh”
Are written, and the two contents are contents in which a predetermined relationship is established in step 306, and the next predetermined relationship is established in step 406. As a result, even when the transmission data transfer processing operation is completed, it is possible to immediately return to the abnormality monitoring processing operation.

【0078】次に、上記のように構成した工業用ロボッ
ト等のデュアルCPUシステムの特徴を以下に記載す
る。 (1)本実施の形態では、第1のCPU11と第2のC
PU21のそれぞれのシステムの初期化が相違しても立
ち上げ確立処理動作により、両システムが共に初期化が
完了するまでは次の処理動作に移らないようにした。し
かも、互いにシステムの初期化が完了したかどうかの判
断は、第1及び第2のCPU11,21によるDPRA
M30の第1及び第2データアリア31,32の内容を
書き替え、及び、その書き替えた内容をそれぞれ互いに
読み取り認識することにより立ち上げ同期が確立したか
どうか判断するだけである。
Next, the features of the dual CPU system such as the industrial robot configured as described above will be described below. (1) In the present embodiment, the first CPU 11 and the second C
Even if the initialization of each system of the PU 21 is different, a startup establishment processing operation prevents the next processing operation from proceeding until both systems have been initialized. In addition, the first and second CPUs 11 and 21 determine whether or not the system initialization has been completed.
It is only necessary to rewrite the contents of the first and second data areas 31 and 32 of the M30 and to read and recognize the rewritten contents respectively to determine whether the startup synchronization has been established.

【0079】従って、従来のように、タイマ回路を設
け、そのタイマ回路に立ち上げ同期時間は安全を見込ん
だ十分に長い時間を設定して該設定した時間が経過して
立ち上げ同期が確立したと判断するのと比べて、システ
ムの起動時間を短縮することができるとともに回路規模
を小さくすることができる。
Therefore, as in the prior art, a timer circuit is provided, and the start-up synchronization time is set to a sufficiently long time in consideration of safety, and the start-up synchronization is established after the set time has elapsed. It is possible to shorten the system start-up time and to reduce the circuit scale, as compared with the case where the judgment is made.

【0080】(2)本実施の形態では、第1のCPU1
1と第2のCPU21は異常監視処理動作によりそれぞ
れの相手方のシステムの異常を監視するようにした。し
かも、この異常監視処理動作は、第1及び第2のCPU
11,21によるDPRAM30の第1及び第2のデー
タエリア31,32の内容を予め定めた内容を予め定め
た順番で交互に書き替え、第1及び第2のデータエリア
31,32のその内容が予め定められた関係が交互に成
立するかどうかに基づいて異常の有無を判断するように
した。
(2) In the present embodiment, the first CPU 1
The first and second CPUs 21 monitor an abnormality of the system of each other by an abnormality monitoring processing operation. Moreover, this abnormality monitoring processing operation is performed by the first and second CPUs.
The contents of the first and second data areas 31 and 32 of the DPRAM 30 are rewritten alternately in a predetermined order by the contents 11 and 21, and the contents of the first and second data areas 31 and 32 are changed. The presence or absence of an abnormality is determined based on whether a predetermined relationship is established alternately.

【0081】従って、従来のように異常検出のためのウ
ォッチドタイマ等の検出回路を用いないで相手のCPU
の異常を検出し判定することができ、その分だけ回路規
模を小さくすることができる。
Therefore, instead of using a detection circuit such as a watched timer for abnormality detection as in the prior art,
Can be detected and determined, and the circuit scale can be reduced accordingly.

【0082】(3)本実施の形態では、常に一定の周期
で異常監視処理動作を実行している途中に送信データ転
送処理モードになって、第1及び第2のデータエリア3
1,32の内容が送信データ転送処理モードのための内
容に書き替えられる。そして、送信データ転送処理モー
ドにおいて該転送処理モードが終了するときには異常監
視処理動作ができるように第1及び第2のデータエリア
31,32の内容を異常監視動作における予め定めた関
係が成立する内容に書き替えるようにした。
(3) In this embodiment, the transmission data transfer processing mode is set during the execution of the abnormality monitoring processing operation at a constant cycle, and the first and second data areas 3 are set.
The contents of 1, 32 are rewritten to the contents for the transmission data transfer processing mode. When the transmission processing mode ends in the transmission data transfer processing mode, the contents of the first and second data areas 31 and 32 are set so that a predetermined relationship in the abnormality monitoring operation is established so that the abnormality monitoring processing operation can be performed. Was rewritten.

【0083】従って、その時々に送信データ転送処理動
作が行われ終了しても直ちに異常監視処理動作に移るこ
とができる。 (4)本実施形態では、立ち上げ同期確立処理動作にお
いて使用したDPRAM30の第1及び第2のデータエ
リア31,32は、異常監視処理動作及び送信データ転
送処理動作おいても使用するようにした。従って、DP
RAM30の使用効率が良く、メモリ容量の節約に寄与
することができる。
Accordingly, even when the transmission data transfer processing operation is performed at each time and the operation is completed, the operation can immediately proceed to the abnormality monitoring processing operation. (4) In the present embodiment, the first and second data areas 31 and 32 of the DPRAM 30 used in the startup synchronization establishment processing operation are also used in the abnormality monitoring processing operation and the transmission data transfer processing operation. . Therefore, DP
The use efficiency of the RAM 30 is good, which can contribute to saving of memory capacity.

【0084】尚、本発明は上記実施の形態に限定される
ものではなく、以下の態様で実施することができる。 (1)上記実施の形態では、第1〜第4のデータエリア
31〜34は8ビット割り当てた。つまり、第1〜第4
のデータエリア31〜34に書き込む内容を8ビットに
したが、これに限定されるものではなく、例えば、2ビ
ット、4ビット等適宜変更して実施してもよい。
The present invention is not limited to the above embodiment, but can be implemented in the following modes. (1) In the above embodiment, eight bits are allocated to the first to fourth data areas 31 to 34. That is, first to fourth
Although the contents to be written in the data areas 31 to 34 are 8 bits, the present invention is not limited to this. For example, 2 bits, 4 bits, or the like may be used as appropriate.

【0085】(2)上記実施の形態では、異常監視処理
動作において、第1のCPU11は、カウンタがY回
を、第2のCPU21はカウンタがZ回を超えた時に相
手方のCPUが異常と判定したが、その回数は例えば第
1のCPU11と第2のCPU21の処理能力に応じて
適宜変更して実施してもよい。
(2) In the above embodiment, in the abnormality monitoring processing operation, the first CPU 11 determines that the counterpart CPU is abnormal when the counter exceeds Y times and the second CPU 21 exceeds Z times. However, the number of times may be changed as appropriate according to the processing capacity of the first CPU 11 and the second CPU 21, for example.

【0086】[0086]

【発明の効果】請求項1の発明によれば、両CPUのシ
ステムが共に初期化するまで初期化が完了したとの判断
は両CPUの処理動作だけで行うことができるため、シ
ステムの起動時間を短縮することができ、かつ、回路規
模を簡略することができる。
According to the first aspect of the present invention, the determination that initialization has been completed can be made only by the processing operations of both CPUs until the system of both CPUs is initialized. Can be shortened, and the circuit scale can be simplified.

【0087】請求項2の発明によれば、両CPUの異常
の判断は両CPUの処理動作だけで行うことができるた
め、回路規模を簡略することができる。請求項3に記載
の発明によれば、両CPUのシステムが共に初期化する
まで初期化が完了したとの判断及び両CPUの異常の判
断は両CPUの処理動作だけで行うことができるため、
システムの起動時間を短縮することができ、かつ、回路
規模をより簡略することができる。
According to the second aspect of the present invention, the abnormality of both CPUs can be determined only by the processing operations of both CPUs, so that the circuit scale can be simplified. According to the third aspect of the present invention, the determination that initialization has been completed and the determination of an abnormality in both CPUs can be performed only by the processing operations of both CPUs until the systems of both CPUs are both initialized.
The system startup time can be reduced, and the circuit scale can be further simplified.

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

【図1】デュアルCPUシステムを説明するシステム構
成図。
FIG. 1 is a system configuration diagram illustrating a dual CPU system.

【図2】DPRAMの記憶領域の構成を説明する模式
図。
FIG. 2 is a schematic diagram illustrating a configuration of a storage area of a DPRAM.

【図3】立ち上げ同期確立処理動作のフローチャート。FIG. 3 is a flowchart of a startup synchronization establishment processing operation.

【図4】異常監視処理動作のフローチャート。FIG. 4 is a flowchart of an abnormality monitoring processing operation.

【図5】送信データ転送処理動作のフローチャート。FIG. 5 is a flowchart of a transmission data transfer processing operation.

【図6】送信データ転送処理動作のフローチャート。FIG. 6 is a flowchart of a transmission data transfer processing operation.

【符号の説明】[Explanation of symbols]

11 第1のCPU 12 第1の固有メモリ 21 第2のCPU 22 第2の固有メモリ 30 デュアルポートRAM(DPRAM) 31 第1の記憶領域としての第1のデータエリア 32 第2の記憶領域としての第2のデータエリア DESCRIPTION OF SYMBOLS 11 1st CPU 12 1st specific memory 21 2nd CPU 22 2nd specific memory 30 Dual port RAM (DPRAM) 31 1st data area as 1st storage area 32 2nd storage area Second data area

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 第1のCPUと第2のCPUとの間に双
方のCPUからアクセス可能なデュアルポートRAMを
設け、該デュアルポートRAMを介して両CPU間にお
いてデータを送受信するデュアルCPUシステムにおい
て、 前記デュアルポートRAMは、 前記第1のCPUに対してデータ書き込みを行いかつ第
2のCPUに対してデータ読み出しを行う第1の記憶領
域と、 前記第2のCPUに対してデータ書き込みを行い第1の
CPUに対してデータ読み出しを行う第2の記憶領域と
を設け、 前記第1のCPUは、電源立ち上げ時に、第1の初期化
データを第1の記憶領域に書き込んだ後、システムの初
期化を行い、第2の記憶領域に書き込まれる第2のCP
Uの第2の初期化データを読み取るまで待機した後、そ
の第2の初期化データを読み取った旨の第1の応答デー
タを第1の記憶領域に書き込み、該第2のCPUがその
第1の応答データを読み取るとともにその第1の応答デ
ータの読み取りに基づいて前記第2の記憶領域に書き込
まれる第2の応答データを読み取るまで待機した後に、
両CPUの初期化が完了したと判断し、 前記第2のCPUは、電源立ち上げ時に、第2の初期化
データを第2の記憶領域に書き込んだ後、システムの初
期化を行い、前記第2の初期化データを読み取った旨の
前記第1の応答データを読み取るまで待機した後、第2
の記憶領域に前記第1の応答データを読み取った旨の前
記第2の応答データを書き込んだ後に両CPUの初期化
が完了したと判断するようにしたデュアルCPUシステ
ムにおける立ち上げ同期確立方法。
1. A dual CPU system in which a dual port RAM accessible from both CPUs is provided between a first CPU and a second CPU, and data is transmitted and received between the two CPUs via the dual port RAM. The dual port RAM includes a first storage area for writing data to the first CPU and reading data to the second CPU, and writing data to the second CPU. A second storage area for reading data from the first CPU; the first CPU writes first initialization data to the first storage area when the power is turned on; Of the second CP written in the second storage area
After waiting until the second initialization data of U is read, first response data indicating that the second initialization data has been read is written to the first storage area, and the second CPU writes the first response data to the first storage area. After reading the first response data and waiting until reading the second response data written to the second storage area based on the reading of the first response data,
The second CPU determines that the initialization of both CPUs has been completed, writes the second initialization data to the second storage area when the power is turned on, and then initializes the system. After waiting until the first response data indicating that the initialization data of No. 2 has been read is read, the second response data is read.
And a method of establishing startup synchronization in a dual CPU system, wherein it is determined that the initialization of both CPUs has been completed after writing the second response data indicating that the first response data has been read into the storage area.
【請求項2】 第1のCPUと第2のCPUとの間に双
方のCPUからアクセス可能なデュアルポートRAMを
設け、該デュアルポートRAMを介して両CPU間にお
いてデータを送受信するデュアルCPUシステムにおい
て、 前記デュアルポートRAMは、 前記第1のCPUに対して予め定めた複数種類の監視用
データのデータ書き込みを行いかつ前記第2のCPUに
対してそのデータ読み出しを行う第1の記憶領域と、 前記第2のCPUに対して前記複数種類の監視用データ
のデータ書き込みを行いかつ前記第1のCPUに対して
データ読み出しを行う第2の記憶領域とを設け、 前記第1のCPUは、第1の記憶領域に書き込んだ監視
用データと第2の記憶領域から読み取った監視用データ
とを比較し、両監視用データが予め定めた関係にあるた
びごとに第1の記憶領域の監視用データを予め定めた順
序で書き替えるとともに、予め定めた関係にないとき第
1の記憶領域の監視用データを書き替えないようにし、 前記第2のCPUは、第2の記憶領域に書き込んだ監視
用データと第1の記憶領域から読み取った監視用データ
とを比較し、両監視用データが予め定めた関係にあるた
びごとに第2の記憶領域の監視用データを予め定めた順
序で書き替えるとともに、予め定めた関係にないとき第
2の記憶領域の監視用データを書き替えないようにし、 前記第1及び第2のCPUは、それぞれ予め定めた関係
が成立しない時その回数をカウントし、関係が成立する
時そのカウント値をクリアするとともに、前記カウント
値が予め定めた値を超えた時、少なくともいずれか一方
のCPUが異常であると判断し、 前記第1及び第2のCPUによる監視用データの初期書
き込みは、第1のCPUと第2のCPUのいずれか一方
において、両監視用データが予め定めた関係が成立し、
他方において両監視用データが予め定めた関係が成立し
ないように監視用データを書き込み、 前記第1及び第2のCPUによる監視用データの書き替
え順序は、予め定めた関係が成立しない方の両監視用デ
ータを予め定めた関係が成立するように監視用データを
書き替えて、第1及び第2のCPUにおいて両監視用デ
ータが交互に予め定めた関係が成立するようにしたデュ
アルCPUシステムにおける異常監視方法。
2. A dual CPU system in which a dual port RAM accessible from both CPUs is provided between a first CPU and a second CPU, and data is transmitted and received between the two CPUs via the dual port RAM. A first storage area for writing a plurality of types of predetermined monitoring data to the first CPU and reading the data to the second CPU; A second storage area for writing data of the plurality of types of monitoring data to the second CPU and reading data to the first CPU, wherein the first CPU The monitoring data written in the first storage area is compared with the monitoring data read from the second storage area, and both the monitoring data are determined in a predetermined relation. The monitoring data in the first storage area is rewritten in a predetermined order each time the monitoring data is stored, and the monitoring data in the first storage area is not rewritten when there is no predetermined relationship. CPU compares the monitoring data written in the second storage area with the monitoring data read from the first storage area, and each time both monitoring data have a predetermined relationship, the second storage The monitoring data in the area is rewritten in a predetermined order, and the monitoring data in the second storage area is not rewritten when there is no predetermined relationship. The first and second CPUs respectively When the relationship is not established, the number is counted, and when the relationship is established, the count value is cleared, and when the count value exceeds a predetermined value, at least one of the CPs is cleared. Is determined to be abnormal, and the initial writing of the monitoring data by the first and second CPUs is performed in one of the first CPU and the second CPU so that the monitoring data has a predetermined relationship. Holds,
On the other hand, the monitoring data is written so that the predetermined relationship is not established between the two monitoring data. In a dual CPU system, the monitoring data is rewritten so that a predetermined relationship is established between the monitoring data, and the first and second CPUs alternately establish a predetermined relationship between the two monitoring data. Abnormality monitoring method.
【請求項3】 第1のCPUと第2のCPUとの間に双
方のCPUからアクセス可能なデュアルポートRAMを
設け、該デュアルポートRAMを介して両CPU間にお
いてデータを送受信するデュアルCPUシステムにおい
て、 前記デュアルポートRAMは、 前記第1のCPUに対してデータ書き込みを行いかつ第
2のCPUに対してデータ読み出しを行う第1の記憶領
域と、 前記第2のCPUに対してデータ書き込みを行い第1の
CPUに対してデータ読み出しを行う第2の記憶領域と
を設け、 前記第1のCPUは、電源立ち上げ時に、第1の初期化
データを第1の記憶領域に書き込んだ後、システムの初
期化を行い、第2の記憶領域に書き込まれる第2のCP
Uの第2の初期化データを読み取るまで待機した後、そ
の第2の初期化データを読み取った旨の第1の応答デー
タを第1の記憶領域に書き込み、該第2のCPUがその
第1の応答データを読み取るとともにその第1の応答デ
ータの読み取りに基づいて前記第の記憶領域に書き込ま
れる第2の応答データを読み取るまで待機した後、両C
PUの初期化が完了したと判断し、 前記第2のCPUは、電源立ち上げ時に、第2の初期化
データを第2の記憶領域に書き込んだ後、システムの初
期化を行い、前記第1の記憶領域に書き込まれる第1の
初期化データを読み取った旨の第1の応答データを読み
取るまで待機した後、第2の記憶領域に前記第1の応答
データを読み取った旨の前記第2の応答データを書き込
んだ後に両CPUの初期化が完了したと判断し、 両CPUの初期化が完了した後、 第1のCPUは、第1の記憶領域に対して予め定めた複
数種類の監視用データを書き込み、第2のCPUは、第
2の記憶領域に対して前記複数種類の監視用データを書
き込み、 第1のCPUは、第1の記憶領域に書き込んだ監視用デ
ータと第2の記憶領域から読み取った監視用データとを
比較し、両監視用データが予め定めた関係にあるたびご
とに第1の記憶領域の監視用データを予め定めた順序で
書き替えるとともに、予め定めた関係にないとき第1の
記憶領域の監視用データを書き替えないようにし、 第2のCPUは、第2の記憶領域に書き込んだ監視用デ
ータと第1の記憶領域から読み取った監視用データとを
比較し、両監視用データが予め定めた関係にあるたびご
とに第2の記憶領域の監視用データを予め定めた順序で
書き替えるとともに、予め定めた関係にないとき第2の
記憶領域の監視用データを書き替えないようにし、 前記第1及び第2のCPUは、それぞれ予め定めた関係
が成立しない時その回数をカウントし、関係が成立する
時そのカウント値をクリアするとともに、前記カウント
値が予め定めた値を超えた時、少なくともいずれか一方
のCPUが異常であると判断し、 前記第1及び第2のCPUによる監視用データの初期書
き込みは、第1のCPUと第2のCPUのいずれか一方
において、両監視用データが予め定めた関係が成立し、
他方において両監視用データが予め定めた関係が成立し
ないように監視用データを書き込み、 前記第1及び第2のCPUによる監視用データの書き替
え順序は、予め定めた関係が成立しない方の両監視用デ
ータを予め定めた関係が成立するように監視用データを
書き替えて、第1及び第2のCPUにおいて両監視用デ
ータが交互に予め定めた関係が成立するようにしたデュ
アルCPUシステムにおける異常監視方法。
3. A dual CPU system in which a dual-port RAM accessible from both CPUs is provided between a first CPU and a second CPU, and data is transmitted and received between the two CPUs via the dual-port RAM. The dual port RAM includes a first storage area for writing data to the first CPU and reading data to the second CPU, and writing data to the second CPU. A second storage area for reading data from the first CPU; the first CPU writes first initialization data to the first storage area when the power is turned on; Of the second CP written in the second storage area
After waiting until the second initialization data of U is read, first response data indicating that the second initialization data has been read is written to the first storage area, and the second CPU writes the first response data to the first storage area. And waits until the second response data written in the second storage area is read based on the reading of the first response data.
The second CPU determines that the initialization of the PU has been completed, writes the second initialization data to the second storage area when the power is turned on, and then initializes the system. After waiting for reading first response data indicating that the first initialization data written to the storage area has been read, the second response indicating that the first response data has been read to the second storage area After writing the response data, it is determined that the initialization of both CPUs has been completed. After the initialization of both CPUs has been completed, the first CPU performs a plurality of types of predetermined monitoring for the first storage area. The data is written, the second CPU writes the plurality of types of monitoring data in the second storage area, and the first CPU writes the monitoring data written in the first storage area and the second storage area. Monitoring data read from the area The comparison is made, and the monitoring data in the first storage area is rewritten in a predetermined order each time the two monitoring data have a predetermined relationship, and the monitoring of the first storage area is performed when the two are not in the predetermined relation. The second CPU compares the monitoring data written in the second storage area with the monitoring data read from the first storage area, and determines that both monitoring data are predetermined. Rewriting the monitoring data of the second storage area in a predetermined order each time the relation is established, and not rewriting the monitoring data of the second storage area when the relation is not a predetermined relation, The first and second CPUs each count the number of times when a predetermined relationship is not established, clear the count value when the relationship is established, and when the count value exceeds a predetermined value. At this time, it is determined that at least one of the CPUs is abnormal, and the first writing of the monitoring data by the first and second CPUs is performed by either the first CPU or the second CPU. The relationship defined by the application data is established,
On the other hand, the monitoring data is written so that the predetermined relationship is not established between the two monitoring data. In a dual CPU system, the monitoring data is rewritten so that a predetermined relationship is established between the monitoring data, and the first and second CPUs alternately establish a predetermined relationship between the two monitoring data. Abnormality monitoring method.
JP8242018A 1996-09-12 1996-09-12 Start-up synchronism establishing method and abnormality monitoring method for dual-cpu system Withdrawn JPH1091603A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8242018A JPH1091603A (en) 1996-09-12 1996-09-12 Start-up synchronism establishing method and abnormality monitoring method for dual-cpu system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8242018A JPH1091603A (en) 1996-09-12 1996-09-12 Start-up synchronism establishing method and abnormality monitoring method for dual-cpu system

Publications (1)

Publication Number Publication Date
JPH1091603A true JPH1091603A (en) 1998-04-10

Family

ID=17083051

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8242018A Withdrawn JPH1091603A (en) 1996-09-12 1996-09-12 Start-up synchronism establishing method and abnormality monitoring method for dual-cpu system

Country Status (1)

Country Link
JP (1) JPH1091603A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007078925A1 (en) * 2005-12-30 2007-07-12 Intel Corporation Method and apparatus for a zero voltage processor sleep state
US7877637B2 (en) 2007-07-04 2011-01-25 Denso Corporation Multicore abnormality monitoring device
US7966511B2 (en) 2004-07-27 2011-06-21 Intel Corporation Power management coordination in multi-core processors
JP2013531288A (en) * 2010-05-20 2013-08-01 ナチュラル セキュリティー Mobile communication device, system and method for communicating between local terminal and multiple mobile devices
JPWO2013065687A1 (en) * 2011-11-04 2015-04-02 学校法人早稲田大学 Processor system and accelerator

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9841807B2 (en) 2004-07-27 2017-12-12 Intel Corporation Method and apparatus for a zero voltage processor sleep state
US7966511B2 (en) 2004-07-27 2011-06-21 Intel Corporation Power management coordination in multi-core processors
US8726048B2 (en) 2004-07-27 2014-05-13 Intel Corporation Power management coordination in multi-core processors
US9870044B2 (en) 2004-07-27 2018-01-16 Intel Corporation Method and apparatus for a zero voltage processor sleep state
US9081575B2 (en) 2004-07-27 2015-07-14 Intel Corporation Method and apparatus for a zero voltage processor sleep state
US9141180B2 (en) 2004-07-27 2015-09-22 Intel Corporation Method and apparatus for a zero voltage processor sleep state
US9223389B2 (en) 2004-07-27 2015-12-29 Intel Corporation Method and apparatus for a zero voltage processor
US9223390B2 (en) 2004-07-27 2015-12-29 Intel Corporation Method and apparatus for a zero voltage processor
US9235258B2 (en) 2004-07-27 2016-01-12 Intel Corporation Method and apparatus for a zero voltage processor
US7664970B2 (en) 2005-12-30 2010-02-16 Intel Corporation Method and apparatus for a zero voltage processor sleep state
WO2007078925A1 (en) * 2005-12-30 2007-07-12 Intel Corporation Method and apparatus for a zero voltage processor sleep state
US7877637B2 (en) 2007-07-04 2011-01-25 Denso Corporation Multicore abnormality monitoring device
JP2013531288A (en) * 2010-05-20 2013-08-01 ナチュラル セキュリティー Mobile communication device, system and method for communicating between local terminal and multiple mobile devices
JP2017091589A (en) * 2011-11-04 2017-05-25 学校法人早稲田大学 Processor core and processor system
US9846673B2 (en) 2011-11-04 2017-12-19 Waseda University Processor, accelerator, and direct memory access controller within a processor core that each reads/writes a local synchronization flag area for parallel execution
JPWO2013065687A1 (en) * 2011-11-04 2015-04-02 学校法人早稲田大学 Processor system and accelerator
US10095657B2 (en) 2011-11-04 2018-10-09 Waseda University Processor, accelerator, and direct memory access controller within a core reading/writing local synchronization flag area for parallel

Similar Documents

Publication Publication Date Title
US9594720B2 (en) Interface between a bus and a inter-thread interconnect
JP2829091B2 (en) Data processing system
KR100958685B1 (en) Dma controller, node, data transfer control method, and computer readable recording medium for recording program
JPH1091603A (en) Start-up synchronism establishing method and abnormality monitoring method for dual-cpu system
KR100357284B1 (en) The one chip asynchronous microprocessor Inter Processor Communication circuit
CN113741166A (en) Industrial control logic redundancy implementation method based on multi-CPU industrial system controller
JPS5833970B2 (en) Inter-processor communication method
JP5260369B2 (en) Distributed system
JP3293089B2 (en) PLC remote I / O system and PLC remote I / O system execution method
JPH1091567A (en) Input/output interface extension device
JPH10232704A (en) Duplex programmable controller
JPS5835602A (en) Programmable controller
JPH04229354A (en) Data tramsfer in dma mode between wake-up phases of microprocessor in interrupt waiting state for saving power consuption
JPS5917445B2 (en) Data transfer method
JPH07143148A (en) High speed cyclic transmitter
JP2809164B2 (en) Two-way data communication system
JP3938377B2 (en) Supervisory control device
JPS63201831A (en) Multiple arithmetic unit
JP2002196806A (en) Intelligent module for programmable controller
JPH0752425B2 (en) Data input / output control method for information processing system
JPH05233525A (en) Input/otuput processor
JPH0527146B2 (en)
JPH02219158A (en) Scsi interface circuit
JPH0546529A (en) Direct memory access system
JPH05342026A (en) Multiprocessor and synchronization control system for multiprocessor

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20031202