JPH07104841A - Abnormality detecting method for programmable controller - Google Patents

Abnormality detecting method for programmable controller

Info

Publication number
JPH07104841A
JPH07104841A JP5247770A JP24777093A JPH07104841A JP H07104841 A JPH07104841 A JP H07104841A JP 5247770 A JP5247770 A JP 5247770A JP 24777093 A JP24777093 A JP 24777093A JP H07104841 A JPH07104841 A JP H07104841A
Authority
JP
Japan
Prior art keywords
data
abnormality
cpu
bus
written
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
JP5247770A
Other languages
Japanese (ja)
Inventor
Shigenobu Omori
重信 大森
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.)
Fuji Electric Co Ltd
Original Assignee
Fuji Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Electric Co Ltd filed Critical Fuji Electric Co Ltd
Priority to JP5247770A priority Critical patent/JPH07104841A/en
Publication of JPH07104841A publication Critical patent/JPH07104841A/en
Pending legal-status Critical Current

Links

Landscapes

  • Testing And Monitoring For Control Systems (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)
  • Programmable Controllers (AREA)

Abstract

PURPOSE:To detect the bus abnormality before the runaway of a CPU by read ing data written in a memory and confirming matching between those data and write data. CONSTITUTION:After a sequence program is stored in a RAM 4, the program is executed at a CPU 1 according to the instruction of start given by a user. Next, specified data are written in the specified area of a RAM 7A inside an extended unit 9 by the CPU 1 and afterwards, those specified data are read out. The CPU 1 decides the presence/absence of abnormality at the extended unit 7 by investigating whether the read data are matched with the written data or not. When macthing is not decided, namely, when any abnormality generates at an external bus 9 or inside the extended unit 7, since the specified data are not written in the RAM 7A, data appearing on appear on the external bus 9 with the read processing of the CPU 1 are different from the specified data, and the CPU 1 issues an alarm showing the detection of abnormality.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、電子機器を制御するプ
ログラマブルコントローラに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a programmable controller for controlling electronic equipment.

【0002】[0002]

【従来の技術】従来、プログラマブルコントローラは、
ユーザが制御内容を自由に組変えることができる制御機
器として知られている。プログラマブルコントローラ本
体に故障がおきると、システム全体が異常を来すので、
従来では次のような方法でプログラマブルコントローラ
の異常を検出している。プログラマブルコントローラ内
に、一定時間を検知すると、異常検知信号を発生するウ
オッチドッグタイマーを設ける。プログラマブルコント
ローラ内のCPUから、上記一定時間より短い時間でウ
オッチドッグタイマーに対してリセットをかける。この
ため、CPUが正常に作動している間は、ウオッチドッ
グタイマーは異常検知信号を発生しない。けれども、C
PUが接続されているバスに雑音が発生したり、断線異
常によりCPUが異常停止したり、暴走した場合、リセ
ットがウオッチドッグタイマーにかからないので、ウオ
ッチドッグタイマーから異常検知信号が発生される。こ
の異常検知信号によりシステム停止回路が作動して、シ
ステム全体を初期状態に設定する。
2. Description of the Related Art Conventionally, programmable controllers are
It is known as a control device that allows the user to freely change the control contents. If the programmable controller fails, the entire system will malfunction.
Conventionally, the abnormality of the programmable controller is detected by the following method. A watchdog timer that generates an abnormality detection signal when a fixed time is detected is provided in the programmable controller. From the CPU in the programmable controller, the watchdog timer is reset in a time shorter than the above fixed time. Therefore, the watchdog timer does not generate an abnormality detection signal while the CPU is operating normally. But C
When the bus to which the PU is connected generates noise, the CPU abnormally stops due to a disconnection abnormality, or runs out of control, the watchdog timer is not reset and therefore the watchdog timer generates an abnormality detection signal. This abnormality detection signal activates the system stop circuit to set the entire system to the initial state.

【0003】[0003]

【発明が解決しようとする課題】このような異常検知方
法を採用することでプログラマブルコントローラ内の異
常には対処できるようになった。しかしながら、最近
は、プログラマブルコントローラの処理速度が高速化し
ているので上述のウオッチドッグタイマーが異常を検知
してから、システム停止までの間に、システムに悪影響
を与えてしまう。これに加えて、バススイッチやインタ
ーフェースを介してプログラマブルコントローラに接続
した増設ユニット側に故障が発生しても、バススイッチ
によりバスが遮断されているので、CPU側ではその異
常に気が付かない。
By adopting such an abnormality detecting method, it becomes possible to cope with an abnormality in the programmable controller. However, recently, since the processing speed of the programmable controller has been increased, the system is adversely affected between the time when the watchdog timer detects an abnormality and the time when the system is stopped. In addition to this, even if a failure occurs on the extension unit side connected to the programmable controller via the bus switch or interface, the bus is blocked by the bus switch, so the CPU side does not notice the abnormality.

【0004】そこで、本発明は、上述の点に鑑みて、C
PUが正常に作動している間はプログラマブルコントロ
ーラの内部バスの異常や外部接続したユニットの異常を
検知できるようにウオッチドッグタイマーの異常検知時
間よりも早く上記バス異常を検知することの可能なプロ
グラマブルコントローラの異常検知方法を提供すること
を目的とする。
Therefore, in view of the above points, the present invention provides C
Programmable to detect the above bus abnormality earlier than the watchdog timer abnormality detection time so that the internal bus abnormality of the programmable controller and the abnormality of the externally connected unit can be detected while the PU is operating normally An object is to provide a method of detecting an abnormality in a controller.

【0005】[0005]

【課題を解決するための手段】このような目的を達成す
るために、本発明は、CPUを有し、該CPUによりシ
ーケンス演算を繰り返し実行することにより電子機器の
自動制御を実行するプログラマブルコントローラの異常
検出方法において、前記シーケンス演算の繰り返し毎
に、前記CPUは、当該CPUとバスを介して接続する
メモリに特定データの書き込みを行い、次に、書き込ま
れたデータの読み出しを行い、当該読み出されたデータ
および前記書き込みを行ったデータの一致判定を行い、
不一致判定が得られた時は、前記バスまたは前記メモリ
に異常が発生したことを検出することを特徴とする。
In order to achieve such an object, the present invention provides a programmable controller which has a CPU and which automatically executes electronic control by repeatedly executing a sequence operation by the CPU. In the abnormality detection method, each time the sequence operation is repeated, the CPU writes specific data to a memory connected to the CPU via a bus, then reads the written data, and reads the read data. The data that has been written and the data that has been written is determined to match,
When a non-coincidence determination is obtained, it is detected that an abnormality has occurred in the bus or the memory.

【0006】[0006]

【作用】本発明は、信号線やメモリの異常検出方法とし
てメモリに書き込んだデータの読み出しを行って、その
データが書き込みデータと一致することを確認する方法
があることに着目し、この異常検出方法をCPUのシー
ケンス演算に同期して実行することでバス異常によりC
PUが暴走する前にバス異常を検出する。
The present invention focuses on the fact that there is a method of detecting the abnormality of the signal line or the memory by reading the data written in the memory and confirming that the data matches the written data. By executing the method in synchronism with the sequence operation of the CPU, C
A bus error is detected before the PU goes out of control.

【0007】[0007]

【実施例】以下、図面を参照して本発明の実施例を詳細
に説明する。
Embodiments of the present invention will now be described in detail with reference to the drawings.

【0008】本発明の説明に先立って本発明を適用した
プログラマブルコントローラのシステム構成を図2を用
いて説明する。図2において、中央演算処理装置(CP
U)1はシステムROM(リードオンリーメモリ)3に
格納されたシステムプログラムに従って、内部バス8、
外部バス9に接続された以下の回路の制御を実行する。
CPU1はビット演算プロセッサ(B.P)2と共にユ
ーザが予め作成したシーケンスプログラム、すなわち、
自動制御の対象の制御内容を規定したプログラムを実行
する。一般的にはCPU1は数値計算、データ関連の処
理を実行し、B.P2はアンド、オアなどのビット演算
を実行する。これらの処理を実行するためのシーケンス
プログラムはシステムRAM(ランダムアクセスメモ
リ)4に格納されている。データメモリ5は自動制御の
対象の電子機器から受信し、シーケンス演算に使用する
接点データ、シーケンス演算の結果、定められる接点デ
ータを記憶する。バススイッチ6は複数の入出力ユニッ
ト(不図示)の他、増設ユニット7と接続し、CPU1
が増設ユニット7のアドレスを指定した時に内部バス8
と外部バス9とを接続する。本実施例の増設ユニット7
は入出力ユニットであり、制御信号レベルの接点データ
を電子機器との間の転送信号レベルに相互変換する。こ
の信号変換のために増設ユニット7内には接点データを
一時記憶しておくためのRAM7Aが設けられている。
Prior to the description of the present invention, the system configuration of a programmable controller to which the present invention is applied will be described with reference to FIG. In FIG. 2, a central processing unit (CP
U) 1 is an internal bus 8 according to a system program stored in a system ROM (read only memory) 3.
The control of the following circuits connected to the external bus 9 is executed.
The CPU 1 is a sequence program created in advance by the user together with the bit arithmetic processor (BP) 2, that is,
Executes a program that defines the control contents of the automatic control target. Generally, the CPU 1 executes numerical calculation and data-related processing, and P2 executes bit operations such as AND and OR. A sequence program for executing these processes is stored in the system RAM (random access memory) 4. The data memory 5 stores contact data received from an electronic device to be automatically controlled and used for sequence calculation, a result of the sequence calculation, and predetermined contact data. The bus switch 6 is connected to not only a plurality of input / output units (not shown) but also an extension unit 7,
Internal bus 8 when the address of extension unit 7 is specified
And the external bus 9 are connected. Expansion unit 7 of this embodiment
Is an input / output unit, which mutually converts contact data at a control signal level into a transfer signal level with an electronic device. A RAM 7A for temporarily storing contact data in the extension unit 7 for this signal conversion is provided.

【0009】このようなシステム構成において実行され
る異常検知処理を図1を用いて説明する。図1はROM
3に格納されたシステムプログラムの処理内容を示す。
電源投入、シーケンスプログラムのRAM4への格納の
後、ユーザからの起動の指示により図1のプログラムが
CPU1において実行される。CPU1はスキャンベー
ス処理をステップS1で実行する。スキャンベース処理
とは、データメモリ5に記憶されている接点データを読
み出して、入出力ユニットや増設ユニット7に転送する
処理、これらのユニットから接点データを読み出してデ
ータメモリ5に格納する処理、プログラマブルコントロ
ーラ内の回路の故障診断処理を実行する処理のことであ
る。次に、CPU1は増設ユニット7内のRAM7Aの
特定領域に特定データを書き込み、次にその特定データ
を読み出す(ステップS2→S3)。CPU1は読み出
したデータが書き込みのデータと一致しているか否かを
調べることにより増設ユニット7の異常の有無を判定す
る。一致判定が得られない場合、すなわち、外部バス9
もしくは増設ユニット7内に異常がある場合は上記特定
データがRAM7Aに書き込まれないので、CPU1の
読み出し処理により外部バス9上に現われるデータは特
定データとは異なったものとなる。このようにして異常
を検出したCPU1は異常検出の旨の警報を発生するな
どの従来と同様の異常処理を実行する(ステップS4→
S6)。
The abnormality detection processing executed in such a system configuration will be described with reference to FIG. Figure 1 ROM
3 shows the processing contents of the system program stored in FIG.
After the power is turned on and the sequence program is stored in the RAM 4, the CPU 1 executes the program shown in FIG. The CPU 1 executes scan-based processing in step S1. Scan-based processing is processing for reading contact data stored in the data memory 5 and transferring it to the input / output unit or extension unit 7, processing for reading contact data from these units and storing it in the data memory 5, programmable It is a process of executing a failure diagnosis process of a circuit in the controller. Next, the CPU 1 writes specific data in a specific area of the RAM 7A in the expansion unit 7, and then reads the specific data (steps S2 → S3). The CPU 1 determines whether or not there is an abnormality in the extension unit 7 by checking whether the read data matches the written data. When the coincidence judgment cannot be obtained, that is, the external bus 9
Alternatively, when there is an abnormality in the extension unit 7, the specific data is not written in the RAM 7A, so that the data appearing on the external bus 9 by the reading process of the CPU 1 is different from the specific data. The CPU 1 that has detected the abnormality in this way executes the same abnormality processing as in the conventional method such as issuing an alarm indicating that the abnormality has been detected (step S4 →
S6).

【0010】一方、異常なしの判定が得られたばあい
は、CPU1はデータメモリ5内の入力接点データを用
いて、RAM4のシーケンスプログラム(ユーザプログ
ラム)によりシーケンス演算を実行する。この演算の結
果、得られる接点データが出力用としてデータメモリ5
に書き込まれる(ステップS5)。図1の処理手順はス
テップ1に戻り、上述の手順が繰り返し実行される(ス
テップS1 S5のループ処理)。ウオッチドッグタイ
マーのカウントアップ時間は、通常、上記ループ周期よ
り長く設定されるので、従来では増設ユニットに異常が
発生した場合、この異常の発生によりCPU1が暴走し
た後、ウオッチドッグタイマーがカウントアップして初
めて異常が検出された。これに対して本実施例では1ル
ープ処理時間後に異常が検出される。
On the other hand, when it is determined that there is no abnormality, the CPU 1 uses the input contact data in the data memory 5 to execute the sequence operation by the sequence program (user program) of the RAM 4. The contact data obtained as a result of this calculation is output to the data memory 5 for output.
Is written in (step S5). The processing procedure of FIG. 1 returns to step 1, and the above procedure is repeatedly executed (loop processing of steps S1 and S5). Normally, the count-up time of the watchdog timer is set longer than the above loop cycle. Therefore, when an abnormality occurs in the extension unit, the watchdog timer counts up after the CPU1 runs out of control due to the abnormality. The first time an abnormality was detected. On the other hand, in this embodiment, the abnormality is detected after one loop processing time.

【0011】本実施例の他に次の例を実施できる。In addition to this embodiment, the following example can be implemented.

【0012】1)本実施例では増設ユニットのみの異常
を検出する例を説明したが図2の内部バス8および外部
バス9接続する回路の異常をも検出できる。この場合、
異常の検出の対象の回路内に特定データを書き込み、記
憶するラッチ、レジスタ、メモリ等の記憶回路を設け
る。また、メモリ自信がバスに接続されている場合は、
特定データ記憶領域を設ける。さらに回路ごとに異なる
特定データを割り当てておくと、バスの異常と回路の異
常を識別できる。たとえば、図2の内部バス8が断線し
た場合、すべての回路について異常判定(図1のS4の
処理)が得られる。また、外部バス9が断線した場合
は、外部バス9に接続した回路が異常の判定となり、内
部バス8の回路については正常の判定となる。また、外
部バス9や内部バス8のそれぞれに複数の回路が接続さ
れている場合には、バス自身が異常の時は、そのバスに
接続の回路全てについて異常の判定が得られる。そこ
で、内部バス8が異常となった時の異常判定のパター
ン、外部バス9が異常となった時の異常判定のパター
ン、個々の回路が異常となった時の異常判定のパターン
をROM4内に用意しておき図1のステップS4の正常
有無判定時に異常判定が得られたときにどの異常判定パ
ターンに合致するかをCPU1により識別すると、異常
箇所を限定することができる。このための処理手順は特
に記載しなくても当業者であれば容易に理解し得よう。
1) In this embodiment, an example of detecting an abnormality in only the extension unit has been described, but an abnormality in the circuit connected to the internal bus 8 and the external bus 9 in FIG. 2 can also be detected. in this case,
A storage circuit, such as a latch, a register, or a memory, for writing and storing specific data is provided in the circuit of the abnormality detection target. Also, if the memory confidence is connected to the bus,
Provide a specific data storage area. Further, by assigning different specific data to each circuit, it is possible to identify a bus abnormality and a circuit abnormality. For example, when the internal bus 8 of FIG. 2 is disconnected, abnormality determination (processing of S4 of FIG. 1) can be obtained for all circuits. When the external bus 9 is disconnected, the circuit connected to the external bus 9 is determined to be abnormal, and the circuit of the internal bus 8 is determined to be normal. Further, when a plurality of circuits are connected to each of the external bus 9 and the internal bus 8, when the bus itself is abnormal, it is possible to obtain the abnormality determination for all the circuits connected to the bus. Therefore, an abnormality determination pattern when the internal bus 8 becomes abnormal, an abnormality determination pattern when the external bus 9 becomes abnormal, and an abnormality determination pattern when individual circuits become abnormal are stored in the ROM 4. If the CPU 1 identifies which abnormality determination pattern matches when the abnormality determination is obtained in the normality determination in step S4 of FIG. 1, the abnormal location can be limited. Those skilled in the art can easily understand the processing procedure for this purpose, even if they are not particularly described.

【0013】[0013]

【発明の効果】以上説明したように、本発明によれば、
従来よりも早く、異常を検出できるので、プログラマブ
ルコントローラが自動制御している電子機器に与える影
響が低減する。雑音(ノイズ)影響によりバスに異常が
発生しても、その異常を迅速に対処でき、プログラマブ
ルコントローラの信頼性を高めることができる。
As described above, according to the present invention,
Since the abnormality can be detected earlier than before, the influence of the programmable controller on the electronic device automatically controlled is reduced. Even if an abnormality occurs in the bus due to the influence of noise, the abnormality can be dealt with quickly and the reliability of the programmable controller can be improved.

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

【図1】図2のCPU1が実行する処理手順を示すフロ
ーチャートである。
FIG. 1 is a flowchart showing a processing procedure executed by a CPU 1 of FIG.

【図2】本発明実施例のシステム構成を示すブロック図
である。
FIG. 2 is a block diagram showing a system configuration of an embodiment of the present invention.

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

1 CPU 2 B.P 3 システムROM 4 システムRAM 5 データメモリ 6 バススイッチ 7 増設メモリ 8 内部バス 9 外部バス 1 CPU 2 B. P 3 System ROM 4 System RAM 5 Data memory 6 Bus switch 7 Expansion memory 8 Internal bus 9 External bus

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 CPUを有し、該CPUによりシーケン
ス演算を繰り返し実行することにより電子機器の自動制
御を実行するプログラマブルコントローラの異常検出方
法において、 前記シーケンス演算の繰り返し毎に、前記CPUは、当
該CPUとバスを介して接続するメモリに特定データの
書き込みを行い、 次に、書き込まれたデータの読み出しを行い、 当該読み出されたデータおよび前記書き込みを行ったデ
ータの一致判定を行い、 不一致判定が得られた時は、前記バスまたは前記メモリ
に異常が発生したことを検出することを特徴とするプロ
グラマブルコントローラの異常検出方法。
1. A method for detecting an abnormality in a programmable controller, comprising a CPU, wherein the CPU repeatedly executes a sequence operation to automatically control an electronic device, wherein the CPU is configured to: Specific data is written to the memory connected to the CPU via the bus, then the written data is read, the read data and the written data are checked for a match, and a mismatch is determined. When the above is obtained, it is detected that an abnormality has occurred in the bus or the memory.
JP5247770A 1993-10-04 1993-10-04 Abnormality detecting method for programmable controller Pending JPH07104841A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5247770A JPH07104841A (en) 1993-10-04 1993-10-04 Abnormality detecting method for programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5247770A JPH07104841A (en) 1993-10-04 1993-10-04 Abnormality detecting method for programmable controller

Publications (1)

Publication Number Publication Date
JPH07104841A true JPH07104841A (en) 1995-04-21

Family

ID=17168397

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5247770A Pending JPH07104841A (en) 1993-10-04 1993-10-04 Abnormality detecting method for programmable controller

Country Status (1)

Country Link
JP (1) JPH07104841A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011044177A (en) * 2010-11-05 2011-03-03 Canon Inc Temperature control device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011044177A (en) * 2010-11-05 2011-03-03 Canon Inc Temperature control device

Similar Documents

Publication Publication Date Title
JP2687927B2 (en) External bus failure detection method
JPH06324914A (en) Runaway detecting method for computer
US9483045B2 (en) Numerical controller
US7191359B2 (en) Fail-safe controller
JPH07104841A (en) Abnormality detecting method for programmable controller
JP2000259444A (en) Data processor and its testing method
JP5227653B2 (en) Multiplexed computer system and processing method thereof
JPS59201110A (en) Programmable controller
JPS61128302A (en) Programmable controller
JPH0612292A (en) Microcomputer
JPH03266154A (en) Information processor
KR0125945B1 (en) Method of operating monitoring for processor
JP2587881B2 (en) Image forming device
JPH05297901A (en) Process controller
JPS62166451A (en) History analyzing device for logical unit
JPH01196635A (en) Processor circuit
JPH0436841A (en) Microcomputer
JPH06250864A (en) Method for preventing generation of error output from programmable controller
JPH04257044A (en) Bus parity error generating position detecting system
JPS6250841B2 (en)
JPH0454656A (en) Electronic apparatus
JPH1055290A (en) Failure detection method for program by emulator
JPH01134632A (en) Detecting circuit for abnormality in computer
JPH04283803A (en) Programmable controller
JPH0471218B2 (en)