JPH0540510A - Controller - Google Patents

Controller

Info

Publication number
JPH0540510A
JPH0540510A JP19812091A JP19812091A JPH0540510A JP H0540510 A JPH0540510 A JP H0540510A JP 19812091 A JP19812091 A JP 19812091A JP 19812091 A JP19812091 A JP 19812091A JP H0540510 A JPH0540510 A JP H0540510A
Authority
JP
Japan
Prior art keywords
cpu
execution
monitoring
mode
control device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP19812091A
Other languages
Japanese (ja)
Inventor
Sadahiro Kimura
禎宏 木村
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP19812091A priority Critical patent/JPH0540510A/en
Publication of JPH0540510A publication Critical patent/JPH0540510A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To stop a controlled system within a period of time as short as possible when a CPU for execution malfunctions, and to execute the arithmetic processing of the CPU for execution at high speed when malfunction need not be detected. CONSTITUTION:The CPU 22A for execution to execute a program, the CPU 11B for monitoring capable of operating in a first mode and a second mode, and a control circuit 15 to switch the operation of the CPU 11B for monitoring between the first mode and the second mode are provided. In the first mode, the CPU 11B for monitoring monitors the CPU 11A for execution, and when it detects the malfunction, it stops the operation of the CPU 11A for execution. In the second mode, it aids the arithmetic processing of the CPU 11A for execution through a shared memory 19. Thus, when the CPU for execution malfunctions, the controlled system can be stopped within the period of time as short as possible. When the malfunction need not be detected, the arithmetic processing of the CPU for execution can be executed at high speed.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】この発明は、制御装置に関し、さ
らに詳しく言えば、実行用CPUの動作を監視する監視
用CPUを備えた制御装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a control device, and more particularly to a control device having a monitoring CPU for monitoring the operation of an execution CPU.

【0002】[0002]

【従来の技術】図7は、従来の工作機械用の数値制御装
置の一例のCPUバスを示すブロック図である。従来の
数値制御装置(60)は、プログラムを実行し数値制御
装置(60)全体を制御する実行用CPU(61)と、
プログラムやデータを記憶するメモリ(62)と、実行
用CPU(61)により制御されるI/O装置の一つで
あるウォッチドッグタイマ(63)と、実行用CPU
(61)がアドレス線に出力するアドレス信号に応じて
アクセスする対象を振り分けるアドレスデコーダ(6
4)とを備えている。
2. Description of the Related Art FIG. 7 is a block diagram showing a CPU bus as an example of a conventional numerical control apparatus for machine tools. A conventional numerical control device (60) includes an execution CPU (61) for executing a program and controlling the entire numerical control device (60),
A memory (62) for storing programs and data, a watchdog timer (63) which is one of I / O devices controlled by the execution CPU (61), and an execution CPU
An address decoder (6) for allocating an object to be accessed according to an address signal output to the address line by (61)
4) and are provided.

【0003】ウォッチドッグタイマ(63)は、実行用
CPU(61)の動作の異常を検出するために、所定の
スキャンタイム毎にフラグの状態をハードウェアで監視
する装置である。実行用CPU(61)は、ウォッチド
ッグタイマ(63)のフラグを1スキャンが終了する毎
にリセットする。実行用CPU(61)が何らかの外部
または内部の異常により誤動作して、所定のスキャンタ
イム内にウォッチドッグタイマ(63)のフラグがリセ
ットされないと、ウォッチドッグタイマ(63)は実行
用CPU(61)の動作が異常であると判定する。
The watchdog timer (63) is a device for monitoring the state of a flag by hardware at every predetermined scan time in order to detect an abnormal operation of the execution CPU (61). The execution CPU (61) resets the flag of the watchdog timer (63) each time one scan is completed. If the execution CPU (61) malfunctions due to some external or internal abnormality and the flag of the watchdog timer (63) is not reset within a predetermined scan time, the watchdog timer (63) causes the execution CPU (61) to operate. It is determined that the operation of is abnormal.

【0004】したがって、上記従来の数値制御装置(6
0)では、実行用CPU(61)が誤動作した時のスキ
ャンが終了するまでその誤動作を検出することができ
ず、誤動作の検出が遅れる問題がある。
Therefore, the above-mentioned conventional numerical control device (6
In 0), there is a problem that the malfunction cannot be detected until the scanning when the execution CPU (61) malfunctions is completed, and the detection of the malfunction is delayed.

【0005】実行用CPUの誤動作を迅速に検出する技
術として、特開昭63−5439号公報に開示された技
術がある。この技術は、実行用CPUと2台以上の監視
用CPUからなる多重化システムにおいて、監視用CP
Uの出力信号と実行用CPUの出力信号を比較すること
によりこれらのCPUを常に監視し、いずれかのCPU
が誤動作したことを検出すると、誤動作したCPUを切
り放して処理を続行するようにしたものである。
As a technique for quickly detecting a malfunction of the execution CPU, there is a technique disclosed in Japanese Patent Laid-Open No. 63-5439. This technology is used for monitoring CP in a multiplex system consisting of an execution CPU and two or more monitoring CPUs.
These CPUs are constantly monitored by comparing the output signal of the U and the output signal of the execution CPU, and any CPU
Is detected, the CPU that has malfunctioned is disconnected and the processing is continued.

【0006】この技術によれば、CPUによって他のC
PUの動作を常に監視するので、誤動作があればその時
点で直ちに検出される。このため、ウォッチドッグタイ
マ(63)により誤動作を検出する場合よりも短い時間
でCPUの誤動作を検出することができる。
According to this technique, another C
Since the operation of the PU is constantly monitored, any malfunction is immediately detected at that time. Therefore, the malfunction of the CPU can be detected in a shorter time than when the malfunction is detected by the watchdog timer (63).

【0007】[0007]

【発明が解決しようとする課題】ウォッチドッグタイマ
(63)を用いた従来の数値制御装置(60)では、上
述したように、実行用CPU(61)の誤動作を即座に
検出できず、最悪の場合、1スキャンタイムだけ検出が
遅れる。このため、制御対象である工作機械が誤動作す
る恐れがあり、さらに、場合によってはオペレータに危
害を及ぼす恐れがある問題がある。
In the conventional numerical control device (60) using the watchdog timer (63), as described above, the malfunction of the execution CPU (61) cannot be immediately detected, which is the worst case. In this case, the detection is delayed by one scan time. Therefore, the machine tool to be controlled may malfunction, and in some cases, the operator may be harmed.

【0008】また、誤動作検出のために実行用CPU
(61)のソフトウェア資源を使用するため、実行用C
PU(61)が工作機械の制御に必要な演算処理に専念
できず、演算処理が遅くなる問題がある。
Further, an execution CPU for detecting malfunctions
Since the software resource of (61) is used, the execution C
There is a problem in that the PU (61) cannot concentrate on the arithmetic processing necessary for controlling the machine tool, and the arithmetic processing becomes slow.

【0009】特開昭63−5439号公報に記載の多重
化システムは、一つのCPUに故障が生じてもシステム
ダウンしないようにするものであり、数値制御装置やプ
ログラマブルコントローラなどの工作機械用の制御装置
とは性格が異なっている。これらの制御装置では、誤動
作を引き起こした原因を取り除かないまま処理を続行す
ることは却って危険であり、誤動作を検出した場合は処
理を停止してオペレータに報告する方が好ましい。
The multiplexing system disclosed in Japanese Patent Laid-Open No. 63-5439 prevents the system from going down even if one CPU fails, and is used for machine tools such as numerical controllers and programmable controllers. The character is different from the control device. In these control devices, it is rather dangerous to continue the process without removing the cause of the malfunction, and it is preferable to stop the process and report it to the operator when the malfunction is detected.

【0010】また、この多重化システムは、多くのCP
Uを使用するので高価であり、この点でも前記の工作機
械用の制御装置には適用が困難である。
In addition, this multiplex system has many CPs.
Since U is used, it is expensive, and also in this respect, it is difficult to apply it to the control device for the machine tool.

【0011】そこで、この発明の目的は、実行用CPU
が誤動作すると極力短い時間内に制御対象を停止するこ
とができるとともに、誤動作の検出が不要なときは実行
用CPUの演算処理を高速に行なえる制御装置を提供す
ることにある。
Therefore, an object of the present invention is to provide a CPU for execution.
It is an object of the present invention to provide a control device capable of stopping a controlled object within an extremely short time when a malfunction occurs, and capable of performing the arithmetic processing of the execution CPU at high speed when detection of the malfunction is unnecessary.

【0012】この発明の他の目的は、廉価であり、数値
制御装置やプログラマブルコントローラなどの工作機械
用の制御装置として好適な制御装置を提供することにあ
る。
Another object of the present invention is to provide a control device which is inexpensive and suitable as a control device for machine tools such as a numerical control device and a programmable controller.

【0013】[0013]

【課題を解決するための手段】この発明の制御装置は、
プログラムを実行する実行用CPUと、第1モードおよ
び第2モードで動作可能な監視用CPUと、その監視用
CPUの動作を第1モードと第2モードの間で切り換え
る切換手段とを具備してなり、前記監視用CPUは、前
記第1モードでは前記実行用CPUを監視して誤動作を
検出するとその実行用CPUの動作を停止させ、前記第
2モードでは前記実行用CPUの演算処理を補助するこ
とを特徴とする。
The control device of the present invention comprises:
An execution CPU that executes a program, a monitoring CPU that can operate in the first mode and the second mode, and a switching unit that switches the operation of the monitoring CPU between the first mode and the second mode are provided. In the first mode, the monitoring CPU monitors the execution CPU and stops the operation of the execution CPU when detecting a malfunction, and assists the arithmetic processing of the execution CPU in the second mode. It is characterized by

【0014】この発明の制御装置では、前記実行用CP
Uを実行用モジュールに設け、また前記監視用CPUを
監視用モジュールに設けて、その監視用モジュールを前
記実行用モジュールに取り外し可能に取り付けることが
できる。
In the control device of the present invention, the execution CP is
U can be provided in the execution module, the monitoring CPU can be provided in the monitoring module, and the monitoring module can be detachably attached to the execution module.

【0015】[0015]

【作用】この発明の制御装置は、第1モードでは、監視
用CPUが実行用CPUの動作を常に監視しその誤動作
を検出するので、誤動作が生じると直ちに検出され、ウ
ォッチドッグタイマのようにスキャンタイムの終了を待
つ必要がない。そこで、実行用CPUに誤動作が生じる
と直ちに実行用CPUの動作を停止して、制御対象を停
止させることができる。
In the control device of the present invention, in the first mode, the monitoring CPU constantly monitors the operation of the execution CPU and detects a malfunction thereof. Therefore, when the malfunction occurs, it is detected immediately and scans like a watchdog timer. You don't have to wait for the end of time. Therefore, when a malfunction occurs in the execution CPU, the operation of the execution CPU can be stopped immediately to stop the controlled object.

【0016】第2モードでは、誤動作の検出をしないの
で、実行用CPUは制御用の演算処理に専念でき、さら
に、監視用CPUの補助を受けることができる。このた
め、実行用CPUの演算処理が高速化される。
In the second mode, since the malfunction is not detected, the execution CPU can concentrate on the control arithmetic processing and can receive the assistance of the monitoring CPU. Therefore, the arithmetic processing of the execution CPU is speeded up.

【0017】また、この発明の制御装置は、実行用CP
Uに監視用CPUを付加するだけでよいので、廉価に製
造することができる。
Further, the control device according to the present invention is a CP for execution.
Since it suffices to add a monitoring CPU to U, it can be manufactured at low cost.

【0018】さらに、数値制御装置やプログラマブルコ
ントローラなどの工作機械用の制御装置では、夜間や無
人運転時には誤動作の監視が必要であるが、オペレータ
が付いている時や加工シミュレーションを行なっている
時には監視は必要でない。そこで、前者の時には第1モ
ードを選択し、後者の時には第2モードを選択すれば、
これらの制御装置に好適に使用できる。
Further, in a control device for machine tools such as a numerical control device and a programmable controller, it is necessary to monitor malfunctions at night or during unmanned operation, but it is necessary to monitor when there is an operator or when performing a machining simulation. Is not necessary. Therefore, if the first mode is selected in the former case and the second mode is selected in the latter case,
It can be suitably used for these control devices.

【0019】[0019]

【実施例】以下、添付図面に基づいてこの発明の実施例
を説明する。なお、これにより、この発明が限定される
ものではない。
Embodiments of the present invention will be described below with reference to the accompanying drawings. However, this does not limit the present invention.

【0020】(実施例1)図3は、この発明の制御装置
を工作機械用の数値制御装置に適用した実施例を示すハ
ードウェア構成図である。図3において、数値制御装置
(10)は、プログラムを実行し数値制御装置(10)
全体を制御する実行用CPU(11A)と、実行用CP
U(11A)の動作を監視する監視用CPU(11B)
とを備えている。
(Embodiment 1) FIG. 3 is a hardware configuration diagram showing an embodiment in which the control device of the present invention is applied to a numerical control device for machine tools. In FIG. 3, the numerical control device (10) executes a program to execute the numerical control device (10).
Execution CPU (11A) for controlling the whole and execution CP
Monitoring CPU (11B) for monitoring the operation of U (11A)
It has and.

【0021】監視用CPU(11B)は、第1モードと
第2モードで異なる動作を行なう。第1モードでは、実
行用CPU(11A)を監視し、実行用CPU(11
A)が誤動作すると実行用CPU(11A)の動作を停
止させる。第2モードでは、実行用CPU(11A)の
演算処理を補助する。
The monitoring CPU (11B) performs different operations in the first mode and the second mode. In the first mode, the execution CPU (11A) is monitored and the execution CPU (11A) is monitored.
When A) malfunctions, the operation of the execution CPU (11A) is stopped. In the second mode, the arithmetic processing of the execution CPU (11A) is assisted.

【0022】制御回路(15)は、監視用CPU(11
B)から実行用CPU(11A)の誤動作を検出した旨
の信号を受け取り、実行用CPU(11A)に停止信号
を送って動作を停止させる。また、監視用CPU(11
B)の動作モードを第1モードと第2モードの間で切り
換える。
The control circuit (15) includes a monitoring CPU (11
A signal indicating that a malfunction of the execution CPU (11A) has been detected is received from B), and a stop signal is sent to the execution CPU (11A) to stop the operation. In addition, the monitoring CPU (11
The operation mode of B) is switched between the first mode and the second mode.

【0023】メモリ(12)は、プログラムやデータを
格納する。表示制御回路(21)は、デジタル信号を映
像信号に変換してCRTなどの表示装置(21)に表示
する。キーボード(22)は、監視用CPU(11B)
の動作モードを選択する場合など、数値制御装置(1
0)に各種データを入力するために使用する。
The memory (12) stores programs and data. The display control circuit (21) converts a digital signal into a video signal and displays it on a display device (21) such as a CRT. The keyboard (22) is a monitoring CPU (11B)
Numerical control device (1
It is used to input various data in 0).

【0024】位置制御回路(23)は、実行用CPU
(11A)からの制御信号に応じてサーボアンプ(2
4)に制御信号を出力する。サーボアンプ(24)は、
位置制御回路(23)が出力する制御信号を受けてサー
ボモータ(25)の速度制御を行なう。タコジェネレー
タ(26)は、サーボモータ(25)の速度を計測し得
られた速度データをサーボアンプ(24)に帰還させ
る。位置検出器(27)は、パルスコーダなどからな
り、タコジェネレータ(26)の出力を受け取って位置
制御回路(23)に位置データを帰還させる。なお、位
置制御回路(23)などの要素は工作機械の制御軸数分
だけ必要であるが、ここでは1軸分のみ示してある。
The position control circuit (23) is a CPU for execution.
In response to the control signal from (11A), the servo amplifier (2
The control signal is output to 4). The servo amplifier (24)
Receiving the control signal output from the position control circuit (23), the speed of the servo motor (25) is controlled. The tacho generator (26) measures the speed of the servo motor (25) and feeds back the speed data obtained to the servo amplifier (24). The position detector (27) is composed of a pulse coder or the like, receives the output of the tacho generator (26), and feeds back the position data to the position control circuit (23). Elements such as the position control circuit (23) are necessary for the number of control axes of the machine tool, but only one axis is shown here.

【0025】入出力回路(28)は、外部とデジタル信
号の授受を行う。手動パルス発生器(29)は、各制御
軸を手動でデジタル的に移動させるために使用する。
The input / output circuit (28) exchanges digital signals with the outside. The manual pulse generator (29) is used to manually move each control axis digitally.

【0026】次に、上記数値制御装置(10)の実行用
CPU(11A)と監視用CPU(11B)の動作を説
明する。図1は、監視用CPU(11B)が第1モード
すなわち監視モードにある場合のCPUバスを示すブロ
ック図であり、図2は、監視用CPU(11B)が第2
モードすなわち演算補助モードにある場合のCPUバス
を示すブロック図である。
Next, the operations of the execution CPU (11A) and the monitoring CPU (11B) of the numerical controller (10) will be described. FIG. 1 is a block diagram showing the CPU bus when the monitoring CPU (11B) is in the first mode, that is, the monitoring mode, and FIG. 2 shows the monitoring CPU (11B) being second.
FIG. 3 is a block diagram showing a CPU bus in a mode, that is, a calculation assist mode.

【0027】まず最初に、監視用CPU(11B)が第
1モード(監視モード)にある場合の動作について説明
する。図1において、(13)は表示制御回路(2
1)、位置制御回路(23)、入出力回路(28)など
のI/O装置、(14)は実行用CPU(11A)がア
ドレス線に出力するアドレス信号に応じてアクセスする
対象を振り分けるアドレスデコーダである。
First, the operation when the monitoring CPU (11B) is in the first mode (monitoring mode) will be described. In FIG. 1, (13) is a display control circuit (2
1), I / O devices such as the position control circuit (23) and the input / output circuit (28), and (14) is an address for allocating an access target according to an address signal output from the execution CPU (11A) to an address line. It is a decoder.

【0028】監視用CPU(11B)は、第1モードで
は、実行用CPU(11A)と同様にプログラムから命
令を解読するが、その命令を実行しないで、解読した内
容を内部にある比較回路で、実行用CPU(11A)が
アドレス線とデータ線に出力する内容と比較する。すな
わち、実行用CPU(11A)がアドレス線とデータ線
にそれぞれアドレス信号とデータ信号を出力すると、監
視用CPU(11B)はそれらの信号を受け取り、それ
らの信号を監視用CPU(11B)自身がプログラムを
解読して得た内容と比較し、両者が一致していれば実行
用CPU(11A)の動作は正常であり、不一致であれ
ば異常すなわち誤動作をしていると判定する。
In the first mode, the monitoring CPU (11B) decodes an instruction from a program in the same manner as the execution CPU (11A), but does not execute the instruction, and the decoded content is stored in an internal comparison circuit. , And the content output from the execution CPU (11A) to the address line and the data line. That is, when the execution CPU (11A) outputs an address signal and a data signal to the address line and the data line, respectively, the monitoring CPU (11B) receives these signals, and the monitoring CPU (11B) itself receives these signals. The contents are compared with the contents obtained by decoding the program, and if the two match, it is determined that the operation of the execution CPU (11A) is normal, and if they do not match, it is abnormal, that is, malfunctioning.

【0029】監視用CPU(11B)は、このようにし
て、実行用CPU(11A)の行うメモリ(12)、I
/O(13)へのアクセスを各命令毎にすべて監視し、
実行用CPU(11A)が実行すべき命令を正しく実行
しないと、実行用CPU(11A)が誤動作したと判定
し、誤動作検出信号を制御回路(15)に出力する。そ
の誤動作の検出は、プログラムの一つの命令の実行時間
内に行なわれる。誤動作検出信号を受け取った制御回路
(15)は、実行用CPU(11A)に停止信号を送
り、それによって実行用CPU(11A)は動作を停止
する。
In this way, the monitoring CPU (11B) executes the memory (12) and I executed by the execution CPU (11A).
Monitor all accesses to / O (13) for each instruction,
If the execution CPU (11A) does not correctly execute the instruction to be executed, it is determined that the execution CPU (11A) has malfunctioned, and a malfunction detection signal is output to the control circuit (15). The malfunction is detected within the execution time of one instruction of the program. The control circuit (15) which has received the malfunction detection signal sends a stop signal to the execution CPU (11A), whereby the execution CPU (11A) stops its operation.

【0030】監視用CPU(11B)のこの動作を図4
のフローチャートに従って説明すると、次の通りであ
る。ステップS1では、監視用CPU(11B)は、実
行用CPU(11A)がアドレス線およびデータ線に出
力したアドレス信号およびデータ信号、または実行用C
PU(11A)に入力されるデータ線のデータ信号を受
け取る。
This operation of the monitoring CPU (11B) is shown in FIG.
It will be described below in accordance with the flowchart of FIG. In step S1, the monitoring CPU (11B) causes the execution CPU (11A) to output the address signal and the data signal to the address line and the data line, or the execution C.
The data signal of the data line input to PU (11A) is received.

【0031】ステップS2では、受け取った信号をプロ
グラムの命令の解読を行なって得た内容と比較する。
In step S2, the received signal is compared with the contents obtained by decoding the program instruction.

【0032】ステップS3では、実行用CPU(11
A)の信号と解読した内容とが一致しているか否かを判
定する。一致していると判定すると、ステップS1に戻
り、ステップS1〜S3の動作を繰り返す。
In step S3, the execution CPU (11
It is determined whether or not the signal of A) and the decoded content match. If it is determined that they match, the process returns to step S1 and the operations of steps S1 to S3 are repeated.

【0033】一致していないと判定すると、ステップS
4に進み、誤動作検出信号を制御回路(15)に出力す
る。誤動作検出信号を受け取った制御回路(15)は、
実行用CPU(11A)に停止信号を出力し、これを受
けて実行用CPU(11A)は動作を停止する。
If it is determined that they do not match, step S
In step 4, the malfunction detection signal is output to the control circuit (15). The control circuit (15) receiving the malfunction detection signal,
A stop signal is output to the execution CPU (11A), and in response to this, the execution CPU (11A) stops its operation.

【0034】次に、図2に基づいて、監視用CPU(1
1B)が第2モード(演算補助モード)にある場合の動
作について説明する。図2において、(19)は、実行
用CPU(11A)および監視用CPU(11B)が読
み出し/書き込み可能な共有メモリ、(18A)(18
B)は、実行用CPU(11A)と監視用CPU(11
B)が排他的に共有メモリ(19)にアクセスできるよ
うに制御するアービタ(調停回路)である。アービタ
(18A)(18B)の有効、無効は、制御回路(1
5)によって切り換えられる。アービタ(18A)(1
8B)は、第2モードを選択すると有効になり、第1モ
ードを選択すると無効になる。
Next, based on FIG. 2, the monitoring CPU (1
The operation when 1B) is in the second mode (calculation assistance mode) will be described. In FIG. 2, (19) is a shared memory readable / writable by the execution CPU (11A) and the monitoring CPU (11B), and (18A) (18
B) is the execution CPU (11A) and the monitoring CPU (11A).
B) is an arbiter (arbitration circuit) that controls so that the shared memory (19) can be exclusively accessed. Whether the arbiter (18A) (18B) is valid or invalid is determined by the control circuit (1
It is switched by 5). Arbiter (18A) (1
8B) becomes valid when the second mode is selected, and becomes invalid when the first mode is selected.

【0035】第2モードでは、アービタ(18A)(1
8B)が有効になっており、また、実行用CPU(11
A)と監視用CPU(11B)はいずれも、アービタ
(18A)(18B)を介して共有メモリ(19)にア
クセスが可能である。実行用CPU(11A)と監視用
CPU(11B)の共有メモリ(19)へのアクセスの
タイミングは、アービタ(18A)(18B)によって
調整される。実行用CPU(11A)が演算処理してい
る間、監視用CPU(11B)は適宜共有メモリ(1
9)にアクセスしてデータの読み出し/書き込みを行な
い、実行用CPU(11A)の演算を補助する。このた
め、実行用CPU(11A)の演算が高速化される。
In the second mode, the arbiter (18A) (1
8B) is enabled, and the execution CPU (11
Both A) and the monitoring CPU (11B) can access the shared memory (19) via the arbiters (18A) (18B). The timing of access to the shared memory (19) by the execution CPU (11A) and the monitoring CPU (11B) is adjusted by the arbiters (18A) (18B). While the execution CPU (11A) is performing the arithmetic processing, the monitoring CPU (11B) appropriately uses the shared memory (1
9) is accessed to read / write data to assist the arithmetic operation of the execution CPU (11A). Therefore, the calculation of the execution CPU (11A) is accelerated.

【0036】第2モードでは、監視用CPU(11B)
は、通常の実行用のCPUとして動作しており、このと
きは実行用CPU(11A)を監視できない。監視が必
要な場合には、第1モードに切り換えれば直ちに監視用
のCPUとして機能し、実行用CPU(11A)の誤動
作を検出できる。
In the second mode, the monitoring CPU (11B)
Operates as a normal execution CPU, and cannot monitor the execution CPU (11A) at this time. When the monitoring is required, the CPU immediately functions as the monitoring CPU by switching to the first mode, and the malfunction of the execution CPU (11A) can be detected.

【0037】(実施例2)図5は、この発明の制御装置
を工作機械用の数値制御装置に適用した他の実施例のC
PUバスを示すブロック図である。図5において、数値
制御装置(30)は、実行用モジュール(30a)と監
視用モジュール(30b)を備えて構成されている。実
行用モジュール(30a)は、実行用CPU(31
A)、メモリ(32)、I/O装置(33)、アドレス
デコーダ(34)およびバッファ(40)を備えてい
る。監視用モジュール(30b)は、監視用CPU(3
1B)および制御回路(35)を備えている。
(Embodiment 2) FIG. 5 shows C of another embodiment in which the control device of the present invention is applied to a numerical control device for machine tools.
It is a block diagram which shows a PU bus. In FIG. 5, the numerical controller (30) includes an execution module (30a) and a monitoring module (30b). The execution module (30a) includes the execution CPU (31
A), a memory (32), an I / O device (33), an address decoder (34) and a buffer (40). The monitoring module (30b) includes a monitoring CPU (3
1B) and a control circuit (35).

【0038】監視用モジュール(30b)は、回路基板
上に構成されており、実行用モジュール(30a)に設
けた接続部(41)に取り外し可能に取り付けてある。
こうすると、監視用モジュール(30b)が必要でない
時には取り外して、実行用モジュール(30a)だけで
使用することができる。
The monitoring module (30b) is constructed on a circuit board and is detachably attached to the connecting portion (41) provided in the execution module (30a).
In this way, when the monitoring module (30b) is not needed, it can be removed and used only by the execution module (30a).

【0039】(実施例3)図6は、この発明の制御装置
を工作機械用の数値制御装置に適用したさらに他の実施
例のCPUバスを示すブロック図である。この実施例で
は、1個の実行用CPU(51A)と2個の監視用CP
U(51B)(51C)を設け、各CPU(51A)
(51B)(51C)に対してそれぞれ別の安定化電源
(52A)(52B)(52C)から電源を供給するよ
うにしている。図示しない他の構成は、実施例1の構成
と同じである。
(Embodiment 3) FIG. 6 is a block diagram showing a CPU bus of still another embodiment in which the control device of the present invention is applied to a numerical control device for machine tools. In this embodiment, one execution CPU (51A) and two monitoring CPs
U (51B) (51C) provided, each CPU (51A)
Power is supplied to (51B) and (51C) from separate stabilizing power supplies (52A), (52B) and (52C). Other configurations not shown are the same as the configurations of the first embodiment.

【0040】実行用CPU1(51A)の誤動作が監視
用CPU(51B)(51C)のいずれかによって検出
されると、実施例1と同様にして実行用CPU(51
A)の動作が停止される。一般に、CPUの誤動作は安
定化電源の不安定動作に起因することがほとんどである
ので、この実施例によればこれに起因する誤動作が解消
される。
When a malfunction of the execution CPU 1 (51A) is detected by any of the monitoring CPUs (51B) (51C), the execution CPU (51) is performed in the same manner as in the first embodiment.
The operation of A) is stopped. In general, the malfunction of the CPU is almost always caused by the unstable operation of the stabilized power supply, and according to this embodiment, the malfunction caused by the malfunction is eliminated.

【0041】なお、上記実施例1〜3では監視用CPU
を一つあるいは二つ設けているが、三つ以上設けてもよ
い。また、上記実施例1ではウォッチドッグタイマを設
けていないが、I/O装置(13)にウォッチドッグタ
イマを備え、監視用CPU(11B)が実行用CPUと
して動作しているとき(第2モード)は、そのウォッチ
ドッグタイマによって実行用CPU(11A)を監視す
るようにしてもよい。さらに、上記実施例2において、
実行用モジュール(30a)にウォッチドッグタイマを
設け、そのウォッチドッグタイマによって実行用CPU
(11A)を監視するようにしてもよい。
In the first to third embodiments, the monitoring CPU is used.
Although one or two are provided, three or more may be provided. Although the watchdog timer is not provided in the first embodiment, when the watchdog timer is provided in the I / O device (13) and the monitoring CPU (11B) operates as the execution CPU (second mode). ), The watchdog timer may monitor the execution CPU (11A). Furthermore, in Example 2 above,
A watchdog timer is provided in the execution module (30a), and the execution CPU is executed by the watchdog timer.
(11A) may be monitored.

【0042】上記実施例1〜3では、工作機械用の数値
制御装置について説明したが、この発明は、プログラマ
ブルコントローラなどのシーケンス制御装置にも適用が
可能である。要は、実行用CPUを有する制御装置であ
れば、任意の装置に適用できるものである。
In the above-described first to third embodiments, the numerical control device for machine tools has been described, but the present invention can also be applied to a sequence control device such as a programmable controller. In short, the control device can be applied to any device as long as it has a CPU for execution.

【0043】[0043]

【発明の効果】以上説明したように、この発明の制御装
置によれば、実行用CPUが誤動作すると、極力短い時
間内にその制御対象を停止することができる。また、誤
動作の検出が不要なときには、実行用CPUの演算処理
を高速で行なうことができる。さらに、この発明の制御
装置は、廉価であり、しかも、数値制御装置やプログラ
マブルコントローラなどの工作機械用の制御装置として
好適である。
As described above, according to the control device of the present invention, when the execution CPU malfunctions, the controlled object can be stopped within the shortest possible time. Further, when it is unnecessary to detect a malfunction, the arithmetic processing of the execution CPU can be performed at high speed. Furthermore, the control device of the present invention is inexpensive and is suitable as a control device for machine tools such as a numerical control device and a programmable controller.

【0044】実行用CPUを実行用モジュールに設け、
監視用CPUを監視用モジュールに設けて、その監視用
モジュールを実行用モジュールに取り外し可能に取り付
けた場合は、実行用CPUの監視を必要とする使用者の
みが監視用CPUを利用するようにすることができて、
経済的であり、さらに、実行用モジュールに監視用モジ
ュールを追加することにより、簡単に制御装置の信頼性
を上げることができる効果がある。
The execution CPU is provided in the execution module,
When the monitoring CPU is provided in the monitoring module and the monitoring module is detachably attached to the execution module, only the user who needs to monitor the execution CPU uses the monitoring CPU. You can
It is economical, and by adding the monitoring module to the execution module, it is possible to easily increase the reliability of the control device.

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

【図1】この発明の制御装置を工作機械用の数値制御装
置に適用した実施例のCPUバスを示すブロック図で、
監視用CPUが第1モード(監視モード)にある場合を
示す。
FIG. 1 is a block diagram showing a CPU bus of an embodiment in which a control device of the present invention is applied to a numerical control device for machine tools,
The case where the monitoring CPU is in the first mode (monitoring mode) is shown.

【図2】この発明の制御装置を工作機械用の数値制御装
置に適用した実施例のCPUバスを示すブロック図で、
監視用CPUが第2モード(演算補助モード)にある場
合を示す。
FIG. 2 is a block diagram showing a CPU bus of an embodiment in which the control device of the present invention is applied to a numerical control device for machine tools,
The case where the monitoring CPU is in the second mode (calculation assistance mode) is shown.

【図3】この発明の制御装置を工作機械用の数値制御装
置に適用した実施例を示すハードウェア構成図である。
FIG. 3 is a hardware configuration diagram showing an embodiment in which the control device of the present invention is applied to a numerical control device for machine tools.

【図4】この発明の制御装置を工作機械用の数値制御装
置に適用した実施例の監視用CPUの動作を示すフロー
チャートである。
FIG. 4 is a flowchart showing the operation of a monitoring CPU of an embodiment in which the control device of the present invention is applied to a numerical control device for machine tools.

【図5】この発明の制御装置を工作機械用の数値制御装
置に適用した他の実施例のCPUバスを示すブロック図
である。
FIG. 5 is a block diagram showing a CPU bus of another embodiment in which the control device of the present invention is applied to a numerical control device for machine tools.

【図6】この発明の制御装置を工作機械用の数値制御装
置に適用したさらに他の実施例のCPUバスを示すブロ
ック図である。
FIG. 6 is a block diagram showing a CPU bus of still another embodiment in which the control device of the present invention is applied to a numerical control device for machine tools.

【図7】従来の数値制御装置の一例のCPUバスを示す
ブロック図である。
FIG. 7 is a block diagram showing a CPU bus of an example of a conventional numerical control device.

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

10 数値制御装置 11A 実行用CPU 11B 監視用CPU 12 メモリ 13 I/O装置 14 アドレスデコーダ 15 制御回路 18A、18B アービタ 19 共有メモリ 21 表示制御回路 21A 表示装置 22 キーボード 23 位置制御回路 24 サーボアンプ 25 サーボモータ 26 タコジェネレータ 27 位置検出器 28 入出力回路 29 手動パルス発生器 30 数値制御装置 30a 実行用モジュール 30b 監視用モジュール 31A 実行用CPU 31B 監視用CPU 32 メモリ 33 I/O装置 34 アドレスデコーダ 35 制御回路 40 バッファ 41 接続部 50 数値制御装置 51A 実行用CPU 51B、51C 監視用CPU 52A、52B、52C 安定化電源 10 Numerical Control Device 11A Execution CPU 11B Monitoring CPU 12 Memory 13 I / O Device 14 Address Decoder 15 Control Circuit 18A, 18B Arbiter 19 Shared Memory 21 Display Control Circuit 21A Display Device 22 Keyboard 23 Position Control Circuit 24 Servo Amplifier 25 Servo Motor 26 Tacho Generator 27 Position Detector 28 Input / Output Circuit 29 Manual Pulse Generator 30 Numerical Control Device 30a Execution Module 30b Monitoring Module 31A Execution CPU 31B Monitoring CPU 32 Memory 33 I / O Device 34 Address Decoder 35 Control Circuit 40 buffer 41 connection part 50 numerical control apparatus 51A execution CPU 51B, 51C monitoring CPU 52A, 52B, 52C stabilized power supply

─────────────────────────────────────────────────────
─────────────────────────────────────────────────── ───

【手続補正書】[Procedure amendment]

【提出日】平成3年11月19日[Submission date] November 19, 1991

【手続補正1】[Procedure Amendment 1]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0002[Name of item to be corrected] 0002

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0002】[0002]

【従来の技術】図7は、従来の制御装置の中の工作機械
用の数値制御装置の一例のCPUバスを示すブロック図
である。従来の数値制御装置(60)は、プログラムを
実行し数値制御装置(60)全体を制御する実行用CP
U(61)と、プログラムやデータを記憶するメモリ
(62)と、実行用CPU(61)により制御されるI
/O装置の一つであるウォッチドッグタイマ(63)
と、実行用CPU(61)がアドレス線に出力するアド
レス信号に応じてアクセスする対象を振り分けるアドレ
スデコーダ(64)とを備えている。
2. Description of the Related Art FIG. 7 is a block diagram showing a CPU bus as an example of a numerical controller for a machine tool in a conventional controller . The conventional numerical control device (60) is an execution CP that executes a program and controls the entire numerical control device (60).
U (61), memory (62) for storing programs and data, and I controlled by execution CPU (61)
Watchdog timer (63) which is one of the I / O devices
And an address decoder (64) for allocating an access target according to an address signal output from the execution CPU (61) to the address line.

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 プログラムを実行する実行用CPUと、
第1モードおよび第2モードで動作可能な監視用CPU
と、その監視用CPUの動作を第1モードと第2モード
の間で切り換える切換手段とを具備してなり、前記監視
用CPUは、前記第1モードでは前記実行用CPUを監
視して誤動作を検出するとその実行用CPUの動作を停
止させ、前記第2モードでは前記実行用CPUの演算処
理を補助することを特徴とする制御装置。
1. An execution CPU for executing a program,
Monitoring CPU operable in the first mode and the second mode
And a switching means for switching the operation of the monitoring CPU between the first mode and the second mode, and the monitoring CPU monitors the execution CPU in the first mode to detect a malfunction. When detected, the operation of the execution CPU is stopped, and in the second mode, the arithmetic processing of the execution CPU is assisted.
【請求項2】 前記実行用CPUが実行用モジュールに
設けてあり、また前記監視用CPUが監視用モジュール
に設けてあって、その監視用モジュールが前記実行用モ
ジュールに取り外し可能に取り付けてある請求項1に記
載の制御装置。
2. The execution CPU is provided in the execution module, the monitoring CPU is provided in the monitoring module, and the monitoring module is detachably attached to the execution module. Item 2. The control device according to Item 1.
JP19812091A 1991-08-07 1991-08-07 Controller Pending JPH0540510A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP19812091A JPH0540510A (en) 1991-08-07 1991-08-07 Controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP19812091A JPH0540510A (en) 1991-08-07 1991-08-07 Controller

Publications (1)

Publication Number Publication Date
JPH0540510A true JPH0540510A (en) 1993-02-19

Family

ID=16385790

Family Applications (1)

Application Number Title Priority Date Filing Date
JP19812091A Pending JPH0540510A (en) 1991-08-07 1991-08-07 Controller

Country Status (1)

Country Link
JP (1) JPH0540510A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5311783A (en) * 1989-08-31 1994-05-17 Nikkiso Company Ltd. System for automatically shifting a measuring range of surface area measuring device
JP2007136617A (en) * 2005-11-18 2007-06-07 Nachi Fujikoshi Corp Robot control device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5717019A (en) * 1980-07-07 1982-01-28 Fanuc Ltd Numerical controller
JPS62243009A (en) * 1986-04-15 1987-10-23 Fanuc Ltd Numerical controller having diagnostic cassette

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5717019A (en) * 1980-07-07 1982-01-28 Fanuc Ltd Numerical controller
JPS62243009A (en) * 1986-04-15 1987-10-23 Fanuc Ltd Numerical controller having diagnostic cassette

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5311783A (en) * 1989-08-31 1994-05-17 Nikkiso Company Ltd. System for automatically shifting a measuring range of surface area measuring device
JP2007136617A (en) * 2005-11-18 2007-06-07 Nachi Fujikoshi Corp Robot control device

Similar Documents

Publication Publication Date Title
JP2009003862A (en) A plurality of component systems
US6184904B1 (en) Central processing unit for a process control system
JPH0540510A (en) Controller
JPH06324721A (en) Method for detecting falling-off of connection unit
JP2508305B2 (en) Initial value determination device
JPH08171504A (en) Emulation device
JP2000148544A (en) Dump output system
JPH02281343A (en) Cpu operation monitor system
JP2880658B2 (en) Runaway detection device for multitask program
JPH06202712A (en) Simulation device for programmable controller
KR100240963B1 (en) Plc apparatus and control method
JPH10247185A (en) Fault diagnostic system for processor
JPH0212531A (en) Interruption control system for virtual computer
JPH0540666A (en) Interruption monitoring device for integrated circuit microprocessor
JPH06113369A (en) Transmission terminal equipment
JP2505044B2 (en) Interrupt control method
JPH04105151A (en) Input/output controller
JPH0764822A (en) Microcomputer
EP0381140A2 (en) Data processing apparatus
JPS6322339B2 (en)
JPH0251742A (en) Preventing system for program runaway
JPS63109545A (en) Self-diagnostic system for hardware
JP2000227881A (en) Process controller
JPH06348370A (en) Computer with system reset function
JPH06223046A (en) Bus tracing execution method