JPH0566809A - Diagnostic system for sequence controller - Google Patents
Diagnostic system for sequence controllerInfo
- Publication number
- JPH0566809A JPH0566809A JP3254361A JP25436191A JPH0566809A JP H0566809 A JPH0566809 A JP H0566809A JP 3254361 A JP3254361 A JP 3254361A JP 25436191 A JP25436191 A JP 25436191A JP H0566809 A JPH0566809 A JP H0566809A
- Authority
- JP
- Japan
- Prior art keywords
- execution
- data
- object code
- cpu
- dual
- 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.)
- Granted
Links
Abstract
Description
【0001】[0001]
【産業上の利用分野】本発明は、鉄鋼プラント、化学プ
ラント、製紙プラント等の製造現場に設置されるシーケ
ンスコントローラに係わり、特にそのシーケンスコント
ローラの診断方式に関するものである。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a sequence controller installed in a manufacturing site such as a steel plant, a chemical plant and a papermaking plant, and more particularly to a diagnostic method for the sequence controller.
【0002】[0002]
【従来の技術】図4は、従来のシーケンスコントローラ
の一実施例を示す図である。エディタ10で作成された
ソースコード9はコンパイラ8により実行オブジェクト
コード7に変換され、プログラムメモリ2に入力され
る。CPU1はプログラムメモリ2の実行オブジェクト
コード7に従ってデータメモリ3をコントロールする。
このように従来のシーケンスコントローラでは、CPU
1やデータメモリ3の診断用の特別な回路がなく、診断
用に作成した単純なロジックの実行結果をチェックして
CPUの診断を行ったり、データメモリをパリティチェ
ックによって診断していた。2. Description of the Related Art FIG. 4 is a diagram showing an embodiment of a conventional sequence controller. The source code 9 created by the editor 10 is converted into the execution object code 7 by the compiler 8 and input into the program memory 2. The CPU 1 controls the data memory 3 according to the execution object code 7 of the program memory 2.
Thus, in the conventional sequence controller, the CPU
There is no special circuit for diagnosing 1 or the data memory 3, and the CPU is diagnosed by checking the execution result of the simple logic created for the diagnosis, or the data memory is diagnosed by the parity check.
【0003】[0003]
【発明が解決しようとする課題】このようにCPUやデ
ータメモリの診断は単純な方式のものしかなく、信頼性
が低いという欠点があった。本発明は実行オブジェクト
コードの双対オブジェクトコードとトレースバッファに
トレースされた入出力信号を用いることにより、信頼性
の高いシーケンスコントローラの診断方式を提供するこ
とを目的とする。As described above, the diagnosis of the CPU and the data memory has only a simple method, and has a drawback of low reliability. An object of the present invention is to provide a highly reliable diagnostic method for a sequence controller by using a dual object code of an execution object code and an input / output signal traced in a trace buffer.
【0004】[0004]
【課題を解決するための手段】シーケンスコントローラ
において、動作異常が発生した場合には診断モードに入
り、プログラムメモリ上に、ソースプログラムのコンパ
イル時に生成されていた実行オブジェクトコードの双対
オブジェクトコードをロードする。この双対オブジェク
トを実際に動作させる場合の入力データとして、実行モ
ードの実行時にトレースしておいたデータをビット反転
させて入力する。In the sequence controller, when an operation abnormality occurs, a diagnostic mode is entered and the dual object code of the execution object code generated at the time of compiling the source program is loaded on the program memory. .. As input data for actually operating this dual object, the data traced at the time of execution in the execution mode is bit-inverted and input.
【0005】[0005]
【作用】この状態で双対オブジェクトを実行するとCP
Uでは、実行オブジェクト実行時の命令と双対の命令が
実行される。また、データメモリ上には、実行オブジェ
クト実行時とビットが完全に反転したデータが入出力さ
れる。この時CPU、データメモリに異常がなければ実
行結果をビット反転をした値は、実行モードのトレース
データと一致する。逆にCPUに異常があって、AND
演算やOR演算が正常に処理できない場合や、データメ
モリに異常があって、あるビットが常時ON、常時OF
Fとなってしまった場合には、実行結果のビット反転を
した値は実行モードのトレースデータと一致しない。こ
れによりCPU及び、データメモリの診断を実行する。[Operation] When the dual object is executed in this state, CP
In U, a dual instruction with the instruction at the time of execution of the execution object is executed. In addition, data whose bit is completely inverted from that when the execution object is executed is input / output to / from the data memory. At this time, if there is no abnormality in the CPU and the data memory, the value obtained by bit-reversing the execution result matches the trace data in the execution mode. On the contrary, if there is something wrong with the CPU, AND
When a certain operation or OR operation cannot be processed normally, or there is an error in the data memory, a certain bit is always ON, always OF
When it becomes F, the bit-inverted value of the execution result does not match the trace data in the execution mode. As a result, the CPU and the data memory are diagnosed.
【0006】[0006]
【実施例】以下本発明を図面に示す一実施例に基づいて
説明する。図1は本発明の一実施例を説明するためのシ
ーケンスコントローラのブロック図である。エディタ1
0で作成されたソースコード9はコンパイラ8により実
行オブジェクトコード7に変換される。この時、実行オ
ブジェクトコード7を双対オブジェクトコード変換プロ
グラム17に入力することにより、双対オブジェクトコ
ード16が生成される。ここで双対オブジェクトコード
16の生成方法について図2、図3に従って説明する。
回路図21が与えられたとすると、この回路図は論理式
22 (A・C+B)・D = E であらわされる。この論理式と双対の論理式を論理式2
5DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described below based on an embodiment shown in the drawings. FIG. 1 is a block diagram of a sequence controller for explaining an embodiment of the present invention. Editor 1
The source code 9 created with 0 is converted into the execution object code 7 by the compiler 8. At this time, the dual object code 16 is generated by inputting the execution object code 7 into the dual object code conversion program 17. Here, a method of generating the dual object code 16 will be described with reference to FIGS.
Given the circuit diagram 21, this circuit diagram is represented by the logical expression 22 (A · C + B) · D = E. This logical expression and the logical expression of dual are logical expression 2
5
【0007】[0007]
【数1】[Equation 1]
【0008】と定義する。この論理式をド・モルガンの
法則により展開すると論理式24It is defined as If this formula is expanded according to De Morgan's law, formula 24
【0009】[0009]
【数2】[Equation 2]
【0010】となる。この論理式の回路図は23であ
る。この二つの回路図を実際のオブジェクトコードに対
応させて図式化したものが図3である。オブジェクトコ
ード26と27を比較すると、AND命令とOR命令が
入れ替わっている。また、データ部はすべて反転されて
いる。図1の双対オブジェクトコード変換プログラム1
7ではこの性質を用いてAND命令のコードをOR命令
のコードに、OR命令のコードをAND命令のコードに
変換する。このとき、データ部は変換しない。データ部
の変換はトレースバッファ11からデータメモリ入力信
号領域3aにロードする際に、データビット反転処理プ
ログラム12によって反転する。実行モードにおいて
は、実行オブジェクトコード7がプログラムメモリ2に
ロードされ、動作機械6の信号入力装置4を介してデー
タメモリ入力信号領域3aにロードされる。処理を実行
した結果はデータメモリ信号出力領域3bから信号出力
装置5を介して動作機械6に出力される。実行時の入力
信号、出力信号、内部信号はトレースバッファ11にス
トアされる。診断モードにおいては、双対オブジェクト
コード16がプログラムメモリ2にロードされる。また
入出力信号はデータビット反転処理プログラム12によ
ってビット反転されデータメモリの入出力信号領域3
a、3bにロードされる。処理結果は診断時演算結果用
バッファ13に出力される。さらにトレースバッファ1
1の演算結果と、診断時演算結果用バッファ13のデー
タをビット反転処理20で処理した結果が、比較器14
にかけられ診断結果出力装置15に出力される。診断結
果は比較器14への二つの入力が等しければ正常であ
り、等しくなければCPU1もしくは、データメモリ3
あるいは両方の異常である。[0010] The circuit diagram of this logical expression is 23. FIG. 3 is a diagrammatic representation of these two circuit diagrams corresponding to the actual object code. Comparing the object codes 26 and 27, the AND instruction and the OR instruction are interchanged. Also, the data part is all inverted. Dual object code conversion program 1 of FIG.
In 7, the code of the AND instruction is converted into the code of the OR instruction and the code of the OR instruction is converted into the code of the AND instruction by using this property. At this time, the data part is not converted. The conversion of the data portion is inverted by the data bit inversion processing program 12 when loading from the trace buffer 11 to the data memory input signal area 3a. In the execution mode, the execution object code 7 is loaded into the program memory 2 and loaded into the data memory input signal area 3a via the signal input device 4 of the operating machine 6. The result of executing the processing is output from the data memory signal output area 3b to the operating machine 6 via the signal output device 5. The input signal, output signal, and internal signal at the time of execution are stored in the trace buffer 11. In the diagnostic mode, the dual object code 16 is loaded into the program memory 2. Further, the input / output signal is bit-inverted by the data bit inversion processing program 12, and the input / output signal area 3 of the data memory is
a and 3b are loaded. The processing result is output to the diagnostic operation result buffer 13. Further trace buffer 1
1 and the result of processing the data in the diagnostic operation result buffer 13 by the bit inversion processing 20 is the comparator 14
And is output to the diagnostic result output device 15. The diagnosis result is normal if the two inputs to the comparator 14 are equal, and if not equal, the CPU 1 or the data memory 3
Or both are abnormal.
【0011】[0011]
【発明の効果】このようにして本発明によれば、信頼性
の高いシーケンスコントローラの診断方式を提供するこ
とができる。As described above, according to the present invention, it is possible to provide a highly reliable diagnostic method for a sequence controller.
【図1】本発明の診断機能を持つシーケンスコントロー
ラのブロック図FIG. 1 is a block diagram of a sequence controller having a diagnostic function of the present invention.
【図2】論理回路の双対変換の例FIG. 2 Example of dual conversion of logic circuit
【図3】双対変換前後のオブジェクトコードの対比を図
にしたものFIG. 3 is a diagram showing a comparison of object codes before and after dual conversion.
【図4】従来のシーケンスコントローラのブロック図FIG. 4 is a block diagram of a conventional sequence controller.
1 CPU 2 プログラムメモリ 3 データメモリ 3a 入力信号 3b 出力信号 3c 内部信号 4 信号入力装置 5 信号出力装置 6 動作機械 7 実行オブジェクトコード 8 コンパイラ 9 ソースコード 10 エディタ 11 トレースバッファ 12 データビット反転処理プログラム 13 診断時演算結果用バッファ 14 比較器 15 診断結果出力装置 16 双対オブジェクトコード 17 双対オブジェクトコード変換プログラム 18、19 実行モードと診断モードの切換えスイッチ 20 ビット反転処理 21 論理式22の回路図 22 論理式 23 論理式24の回路図 24 論理式 25 論理式22と双対の論理式 26、27 オブジェクトコード 1 CPU 2 Program Memory 3 Data Memory 3a Input Signal 3b Output Signal 3c Internal Signal 4 Signal Input Device 5 Signal Output Device 6 Operating Machine 7 Execution Object Code 8 Compiler 9 Source Code 10 Editor 11 Trace Buffer 12 Data Bit Inversion Processing Program 13 Diagnostics Time operation result buffer 14 Comparator 15 Diagnostic result output device 16 Dual object code 17 Dual object code conversion program 18, 19 Execution mode / diagnostic mode changeover switch 20 Bit inversion process 21 Circuit diagram of logical expression 22 Logical expression 23 Logical Circuit diagram of Expression 24 24 Logical expression 25 Logical expression 22 and dual logical expression 26, 27 Object code
Claims (1)
のコンパイラとコンパイラが生成した実行オブジェクト
コードを双対オブジェクトコードに変換するプログラム
によってソースプログラムのコンパイル時に、生成され
た実行オブジェクトコードの双対オブジェクトコードを
生成し、実行モードでは、入力信号、出力信号、内部信
号をトレースバッファにトレースし、動作異常が確認さ
れた場合に診断モードに切り替え、前記双対オブジェク
トコードをプログラムメモリにロードし、トレースデー
タのビットを反転させて入出力信号としてプログラムを
実行し、その実行結果とトレースデータの比較を行うこ
とによって、CPU及び、データメモリの診断をするよ
うにしたことを特徴とするシーケンスコントローラの診
断方式。1. In a sequence controller, an ordinary compiler and a program for converting an execution object code generated by the compiler into a dual object code generate a dual object code of the generated execution object code when compiling the source program, and execute the program. In the mode, the input signal, output signal, and internal signal are traced to the trace buffer, and when abnormal operation is confirmed, the mode is switched to the diagnostic mode, the dual object code is loaded into the program memory, and the bit of the trace data is inverted. A diagnostic method for a sequence controller, characterized in that a CPU and a data memory are diagnosed by executing a program as an input / output signal and comparing the execution result with trace data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP03254361A JP3104761B2 (en) | 1991-09-05 | 1991-09-05 | Diagnostic method of sequence controller |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP03254361A JP3104761B2 (en) | 1991-09-05 | 1991-09-05 | Diagnostic method of sequence controller |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH0566809A true JPH0566809A (en) | 1993-03-19 |
JP3104761B2 JP3104761B2 (en) | 2000-10-30 |
Family
ID=17263923
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP03254361A Expired - Fee Related JP3104761B2 (en) | 1991-09-05 | 1991-09-05 | Diagnostic method of sequence controller |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3104761B2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0740348U (en) * | 1993-12-29 | 1995-07-18 | 株式会社京三製作所 | Electronic interlocking device |
-
1991
- 1991-09-05 JP JP03254361A patent/JP3104761B2/en not_active Expired - Fee Related
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0740348U (en) * | 1993-12-29 | 1995-07-18 | 株式会社京三製作所 | Electronic interlocking device |
Also Published As
Publication number | Publication date |
---|---|
JP3104761B2 (en) | 2000-10-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20150220378A1 (en) | Safety computing device, safety input device, safety output device, and safety controller | |
JPH0566809A (en) | Diagnostic system for sequence controller | |
JP2003167755A (en) | Fault diagnostic method and device for signal processing system | |
JPS62293441A (en) | Data outputting system | |
JP2548378B2 (en) | RAS check function inspection method | |
JPH0137771B2 (en) | ||
SU765809A2 (en) | Microprogramme processor | |
JPH09204317A (en) | Diagnostic device for error detecting/correcting circuit | |
JPS60122432A (en) | Interruption function diagnostic system in computer system | |
KR0169908B1 (en) | Back-end of compiler using intermediate codes and tis method for generating assembly codes | |
JPS63123133A (en) | Error processing system | |
JPH03129531A (en) | Control device | |
KR960038609A (en) | System self diagnosis device and control method | |
JPS63208134A (en) | Software abnormality detecting system | |
JPS61210441A (en) | Bug detecting method for program | |
JPH02103643A (en) | Interruption generation circuit for debug | |
KR19990000214U (en) | Encoder Signal Processing Equipment | |
JPS61131128A (en) | Self-diagnosis system | |
JPH09101184A (en) | Status detection circuit | |
JPH03142503A (en) | Programmable controller | |
JPH07261812A (en) | Sequencer diagnostic device | |
JPH01191948A (en) | Diagnosis controller | |
JPH02264333A (en) | Intermediate language development processing system | |
JPH1091479A (en) | Program debugging system, program debugging method and storage medium storing debugging program | |
JPS63146103A (en) | Sequence controller |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
LAPS | Cancellation because of no payment of annual fees |