Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPH0375882B2 - - Google Patents
[go: Go Back, main page]

JPH0375882B2 - - Google Patents

Info

Publication number
JPH0375882B2
JPH0375882B2 JP57141808A JP14180882A JPH0375882B2 JP H0375882 B2 JPH0375882 B2 JP H0375882B2 JP 57141808 A JP57141808 A JP 57141808A JP 14180882 A JP14180882 A JP 14180882A JP H0375882 B2 JPH0375882 B2 JP H0375882B2
Authority
JP
Japan
Prior art keywords
input
output
data
memory
execution
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP57141808A
Other languages
Japanese (ja)
Other versions
JPS5932004A (en
Inventor
Yukio Kato
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.)
Omron Corp
Original Assignee
Omron Tateisi Electronics Co
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 Omron Tateisi Electronics Co filed Critical Omron Tateisi Electronics Co
Priority to JP57141808A priority Critical patent/JPS5932004A/en
Publication of JPS5932004A publication Critical patent/JPS5932004A/en
Publication of JPH0375882B2 publication Critical patent/JPH0375882B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Program-control systems
    • G05B19/02Program-control systems electric
    • G05B19/04Program control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Program control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0428Safety, monitoring

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Testing And Monitoring For Control Systems (AREA)
  • Safety Devices In Control Systems (AREA)
  • Programmable Controllers (AREA)

Description

【発明の詳細な説明】 (1) 発明の分野 この発明はプログラマブル・コントローラに関
し、特に、ユーザプログラムを実行する回路部分
の異常動作に対処する技術に関する。
DETAILED DESCRIPTION OF THE INVENTION (1) Field of the Invention The present invention relates to a programmable controller, and particularly to a technique for dealing with abnormal operation of a circuit portion that executes a user program.

(2) 従来技術とその問題点 継電器ラダー図式で代表される最近の多くのプ
ログラマブル・コントローラは、サイクリツク実
行方式と称されるアーキテクチヤを採用している
もので、ユーザプログラムをメモリから順番に読
出し、その各命令に従つて入出力メモリにストア
されているデータについて演算処理をし、かつそ
の処理結果でもつて上記入出力メモリのデータを
書換える命令実行手段と、外部から入出力回路に
与えられている入力データを上記入出力メモリの
所定エリアにストアするとともに、上記入出力メ
モリの所定エリアの出力データを入出力回路に転
送して外部に出力する入出力更新手段とを有し、
上記命令実行手段によるユーザプログラムの一巡
実行と上記入出力更新手段の動作を交互に繰り返
すことにより、ユーザプログラムで表現されたシ
ーケンス制御を実現するようになつている。
(2) Prior art and its problems Many recent programmable controllers, represented by the relay ladder diagram, employ an architecture called a cyclic execution method, in which user programs are sequentially read from memory. , an instruction execution means for performing arithmetic processing on the data stored in the input/output memory according to each instruction, and rewriting the data in the input/output memory with the processing results; input/output updating means for storing input data stored in a predetermined area of the input/output memory in a predetermined area of the input/output memory, and transferring output data of the predetermined area of the input/output memory to an input/output circuit and outputting the output data to the outside;
The sequence control expressed in the user program is realized by alternately repeating one cycle of execution of the user program by the instruction execution means and the operation of the input/output updating means.

また一般に、上記の命令実行手段は汎用のマイ
クロプロセツサ(CPUと称す)を用いて構成さ
れている。そのため、このCPUを外部からのノ
イズで誤動作させないために、ハードウエア的に
充分な保護対策を施す必要がある。
Generally, the above-mentioned instruction execution means is constructed using a general-purpose microprocessor (referred to as a CPU). Therefore, in order to prevent this CPU from malfunctioning due to external noise, it is necessary to take sufficient hardware protection measures.

また、プログラマブル・コントローラは工場の
生産ライン等の悪環境条件下に設置されるのが通
例で、充分なノイズ対策を講ずるのに加えて、万
が一CPUが暴走した場合にも、速やかにこれを
検知し、制御対象機器を重大事故に導かないよう
に2重3重の安全対策が必要とされる。
In addition, programmable controllers are usually installed in harsh environmental conditions such as factory production lines, so in addition to taking sufficient noise countermeasures, they can quickly detect if the CPU goes out of control. However, double and triple safety measures are required to prevent controlled equipment from causing serious accidents.

従来、CPUの暴走を監視する安全対策として
は、いわゆるウオツチドグタイマによるものがよ
く採用されている。ウオツチドグタイマというの
は、CPUによりユーザプログラムの一巡実行時
間(サイクルタイム)が所定の基準時間以内に収
まつているか否かを各サイクル毎に監視するもの
である。上記の基準時間は、ユーザプログラムを
正常に一巡実行するに要する最大時間より僅かに
大きな時間に設定されているもので、CPUがな
んらかの要因により暴走した場合、上記基準時間
内にユーザプログラムの実行が終了せず、この時
間超過がCPUの暴走として検知される。
Conventionally, a so-called watchdog timer has often been adopted as a safety measure to monitor CPU runaway. A watchdog timer is a device that monitors whether or not the cycle time of a user program by the CPU is within a predetermined reference time for each cycle. The above reference time is set to be slightly longer than the maximum time required to successfully execute one round of the user program, so if the CPU goes out of control for some reason, the user program will not be executed within the above reference time. It does not finish, and this time exceedance is detected as a runaway CPU.

従来のプログラマブル・コントローラでは、ウ
オツチドグタイマによつてCPUの暴走が検知さ
れたとき、CPUによるユーザプログラムの実行
動作を停止し、プログラマブル・コントローラの
制御出力を強制的にオフにし、制御動作を完全に
停止して被制御機器が安全側におかれるように構
成している。
In conventional programmable controllers, when a runaway of the CPU is detected by the watchdog timer, the CPU stops executing the user program, forcibly turns off the control output of the programmable controller, and stops the control operation. It is configured to completely stop and place the controlled equipment on the safe side.

しかし、CPUの暴走原因を分析してみると、
なんらかのハードウエアの破損等による永久故障
と、極く偶発的で一時的なノイズによつて生ずる
異常とがある。前者の永久故障の場合、プログラ
マブル・コントローラの制御動作を全面的に停止
するのは適切である。しかし、後者のノイズの影
響等による偶発的で一時的な異常の場合、CPU
の本質的な異常ではなく、異常原因がなくなつた
状態ではCPUは正常動作が可能である。従来で
は後者の場合にもプログラマブル・コントローラ
の制御動作を全面的に停止しているが、これは
CPUの一時的にしろ異常によつて入出力メモリ
のデータが混乱してしまつているので、制御動作
を続行したくてもできず、当然の措置であつた。
However, when we analyze the cause of the CPU runaway, we find that
There are permanent failures due to some kind of hardware damage, and abnormalities caused by extremely random and temporary noise. In the case of the former permanent failure, it is appropriate to completely stop the control operations of the programmable controller. However, in the case of the latter accidental and temporary abnormality due to the influence of noise, etc., the CPU
This is not an essential abnormality, and the CPU can operate normally when the cause of the abnormality is gone. Conventionally, control operations of the programmable controller were completely stopped in the latter case, but this
Since the data in the input/output memory had become confused due to a temporary abnormality in the CPU, it was impossible to continue the control operation even if we wanted to, so this was a natural measure.

このように、従来のプログラマブル・コントロ
ーラでは、ノイズの影響等による偶発的で一時的
な異常で、しかもその直後に正常動作に復帰でき
るような異常によつてCPUが暴走した場合でも、
永久故障が生じた場合と同様に制御動作を全面的
に停止しており、プログラマブル・コントローラ
の使用環境が特に悪い場合等には、度々制御対象
である生産ラインを止めてしまうような不都合が
生じる。
In this way, with conventional programmable controllers, even if the CPU goes out of control due to an accidental, temporary abnormality due to the influence of noise, etc., and which can return to normal operation immediately afterwards,
As in the case of a permanent failure, the control operation is completely stopped, and if the environment in which the programmable controller is used is especially bad, the inconvenience of frequently stopping the production line that is the object of control may occur. .

(3) 発明の目的 この発明の目的は、上述したウオツチドグタイ
マによりCPUの暴走が検知されたとき、直ちに
制御動作を全面的に停止してしまうのではなく
て、正しいデータに基づいてユーザプログラムを
再実行させ、一時的なノイズの影響等による異常
が解消すればそのまま制御動作を継続することが
できるようにしたプログラマブル・コントローラ
を提供することにある。
(3) Purpose of the Invention The purpose of the present invention is that when CPU runaway is detected by the watchdog timer described above, the control operation is not completely stopped immediately, but the control operation is stopped immediately by the user based on correct data. To provide a programmable controller in which a program can be re-executed and control operations can be continued if an abnormality caused by temporary noise or the like is resolved.

(4) 発明の構成と効果 この発明は、上記の目的を達成するために、ユ
ーザプログラムをメモリから順番に読出し、その
各命令に従つて入出力メモリにストアされている
データについて演算処理をし、かつその処理結果
でもつて上記入出力メモリのデータを書換える命
令実行手段と、外部から入出力回路に与えられて
いる入力データを上記入出力メモリの所定エリア
にストアするとともに、上記入出力メモリの所定
エリアの出力データを入出力回路に転送して外部
に出力する入出力更新手段とを有し、上記命令実
行手段によるユーザプログラムの一巡実行と上記
入出力更新手段の動作を交互に繰り返すサイクリ
ツク実行方式のプログラマブル・コントローラに
おいて; 上記命令実行手段によるユーザプログラムの一
巡実行時間が所定の基準時間以内に収まつている
か否かを各実行動作毎に監視する実行時間監視手
段と、上記入出力更新手段の動作毎に更新された
上記入出力メモリの最新データを退避メモリにス
トアするデータ退避手段と、上記命令実行手段の
動作中に上記監視手段にてプログラム実行時間の
基準時間T1の超過が検出されたとき、上記命令
実行手段の動作を中断させ、上記退避メモリのデ
ータを上記入出力メモリに移した後、上記命令実
行手段を再起動してユーザプログラムを最初から
実行し直させる再実行制御手段と、上記入出力更
新手段およびデータ退避手段の動作中に上記監視
手段にて入出力更新およびデータ退避の処理基準
時間T2の超過が検出されたとき、装置全体の制
御動作を停止する制御動作停止手段と、 を有することを特徴とする。
(4) Structure and Effects of the Invention In order to achieve the above object, the present invention sequentially reads a user program from a memory and performs arithmetic processing on data stored in an input/output memory according to each instruction. , and an instruction execution means for rewriting the data in the input/output memory with the processing result; and input/output updating means for transferring output data of a predetermined area of the input/output circuit to the input/output circuit and outputting it to the outside, and a cyclic circuit that alternately repeats one round execution of the user program by the instruction execution means and the operation of the input/output updating means. In an execution-type programmable controller; execution time monitoring means for monitoring whether the execution time of one round of the user program by the instruction execution means is within a predetermined reference time for each execution operation, and the input/output updating means; Data saving means stores the latest data of the input/output memory, which is updated every time the means operates, in a saving memory, and the monitoring means detects whether the program execution time exceeds the reference time T 1 during the operation of the instruction execution means. When detected, the operation of the instruction execution means is interrupted, the data in the save memory is transferred to the input/output memory, and then the instruction execution means is restarted to re-execute the user program from the beginning. When the monitoring means detects that the input/output updating and data saving processing reference time T2 has exceeded the control means, the input/output updating means, and the data saving means are in operation, the control operation of the entire device is stopped. It is characterized by having the following: control operation stopping means;

この構成によれば、例えば一時的なノイズの影
響等により命令実行手段の動作中にプログラム実
行時間の基準時間T1の超過が検出されても、そ
のノイズの影響等が直後に解消しておれば、上記
再実行制御手段により退避メモリに退避されてい
た正しい入出力データに従つて正しくユーザプロ
グラムの実行処理が行われ、これによつてプログ
ラマブル・コントローラの制御動作は問題なく継
続することとなり、制御対象となる生産ラインを
ちよつとしたノイズで度々停止させてしまうとい
うような不都合が解消できる。
According to this configuration, even if it is detected that the program execution time exceeds the reference time T1 during the operation of the instruction execution means due to the influence of temporary noise, for example, the influence of the noise is immediately resolved. For example, the re-execution control means correctly executes the user program in accordance with the correct input/output data saved in the save memory, thereby allowing the control operation of the programmable controller to continue without any problem. This eliminates the inconvenience of frequently stopping the production line to be controlled due to small noises.

また、入出力更新手段およびデータ退避手段動
作中に入出力更新およびデータ退避の処理基準時
間T2の超過が検出されたときは、制御動作を全
面的に停止するので、制御対象機器を重大事故か
ら防止できるという効果を有する。
Additionally, if it is detected that the processing standard time T2 for input/output updating and data saving is exceeded while the input/output updating means and data saving means are operating, the control operation will be completely stopped, thereby causing serious damage to the controlled equipment. It has the effect of preventing from

(5) 実施例の説明 第1図はこの発明に係るプログラマブル・コン
トローラの概略構成を示すブロツク図である。こ
のプログラマブル・コントローラは、ユーザプロ
グラムが格納されるユーザプログラムメモリ3
と、外部入力信号が与えられるとともに外部出力
信号を送出する入出力回路6と、入出力回路6に
対応した入出力データのバツフアメモリとなる入
出力メモリ4と、入出力メモリ4の最新のデータ
を退避させておくための退避メモリ5と、ユーザ
プログラムメモリ3の各命令を順次高速に実行
し、その各命令に従つて入出力メモリ4にストア
されているデータについて演算処理し、かつその
処理結果でもつて入出力メモリ4のデータを書換
える命令実行手段と、外部から入出力回路6に与
えられている入力データを入出力メモリ4の所定
エリアにストアするとともに、入出力メモリ4の
所定エリアの出力データを入出力回路6に転送し
て外部に出力する入出力更新手段と、命令実行手
段によるユーザプログラムの一巡実行時間が所定
の基準時間以内に収まつているか否かを各実行動
作毎に監視するウオツチドグタイマ8を中心とす
る実行時間監視手段と、上記入出力更新手段の動
作毎に更新された上記入出力メモリ4のデータを
退避メモリ5にストアするデータ退避手段と、上
記命令実行手段の動作中に上記ウオツチドグタイ
マ8にて時間超過が検出されたとき、上記命令実
行手段の動作を中断させ、退避メモリ5のデータ
を入出力メモリ4に移した後、上記命令実行手段
を再起動してユーザプログラムを最初から実行し
直させる再実行制御手段としてのフリップフロッ
プ10、リセツトパルス発生回路7、ゲート11
等を備えている。
(5) Description of Embodiments FIG. 1 is a block diagram showing a schematic configuration of a programmable controller according to the present invention. This programmable controller has a user program memory 3 in which user programs are stored.
, an input/output circuit 6 that receives an external input signal and sends out an external output signal, an input/output memory 4 that serves as a buffer memory for input/output data corresponding to the input/output circuit 6, and an input/output memory 4 that stores the latest data in the input/output memory 4. Each instruction in the save memory 5 for saving and the user program memory 3 is executed in sequence at high speed, and the data stored in the input/output memory 4 is processed according to each instruction, and the processing results are an instruction execution means for rewriting data in the input/output memory 4, and storing input data given to the input/output circuit 6 from the outside in a predetermined area of the input/output memory 4; The input/output update means that transfers the output data to the input/output circuit 6 and outputs it to the outside, and the instruction execution means check for each execution operation whether the round execution time of the user program is within a predetermined reference time. Execution time monitoring means centered on the watchdog timer 8 for monitoring; data saving means for storing data in the input/output memory 4 updated each time the input/output updating means operates in the saving memory 5; and the above instructions. When the watchdog timer 8 detects an overtime while the execution means is operating, the operation of the instruction execution means is interrupted, the data in the save memory 5 is transferred to the input/output memory 4, and then the instruction is executed. A flip-flop 10, a reset pulse generation circuit 7, and a gate 11 as re-execution control means for restarting the means and re-executing the user program from the beginning.
etc.

上記命令実行手段、入出力更新手段、データ退
避手段おびその他の全体的なタイミング制御は
CPU1によつて実現されている。つまり、CPU
1はシステムプログラムメモリ2に格納されたシ
ステムプログラムを実行することにより、上述の
各制御手段の動作を実現している。
The above instruction execution means, input/output updating means, data saving means and other overall timing control are
This is realized by CPU1. In other words, the CPU
1 implements the operations of each control means described above by executing a system program stored in a system program memory 2.

CPU1は、上記実行時間監視手段に関連し、
ユーザプログラムの実行処理に先立つてプログラ
ム実行時間の基準時間T1をウオツチドグタイマ
8に入力するとともに、信号LDを発して基準時
間T1をウオツチドグタイマ8にプリセツトす
る。ウオツチドグタイマ8はその後パルス発生回
路9からのクロツク信号によつてダウンカウント
されていき、タイムアツプすると信号TUを出力
し、フリップフロップ10をセツトする。基準時
間T1以内にCPU1によるユーザプログラムの
一巡実行が完了すると、CPU1は上記の入出力
更新手段およびデータ退避手段の動作に先立つ
て、入出力更新およびデータ退避の処理基準時間
T2をウオツチドグタイマ8にプリセツトする。
CPU1は入出力更新処理およびデータ退避処理
を行なうと、再びウオツチドグタイマ8に上述し
た基準時間T1をプリセツトし、ユーザプログラ
ムの実行処理を行なう。
The CPU 1 is related to the execution time monitoring means,
Prior to execution of the user program, a reference time T1 of the program execution time is input to the watchdog timer 8, and a signal LD is generated to preset the reference time T1 in the watchdog timer 8. Thereafter, the watchdog timer 8 is counted down by the clock signal from the pulse generating circuit 9, and when the time is up, it outputs the signal TU and sets the flip-flop 10. When one cycle of execution of the user program by the CPU 1 is completed within the reference time T1, the CPU 1 uses a watchdog timer to set the processing reference time T2 for input/output updating and data saving before operating the input/output updating means and data saving means. Preset to 8.
After the CPU 1 performs the input/output update process and the data save process, it again presets the above-mentioned reference time T1 in the watchdog timer 8 and executes the user program.

このようにCPU1は命令実行手段、入出力更
新手段、データ退避手段の各動作をウオツチドグ
タイマ8に基準時間T1および基準時間T2をプ
リセツトしながら繰り返すもので、各動作が正常
に基準時間内に収まつておれば、ウオツチドグタ
イマ8はタイムアツプすることがなく、フリップ
フロツプ10はリセツトされたままとなつてい
る。
In this way, the CPU 1 repeats each operation of the instruction execution means, input/output updating means, and data saving means while presetting the reference time T1 and reference time T2 in the watchdog timer 8, so that each operation is performed normally within the reference time. If the value is within , the watchdog timer 8 will not time up and the flip-flop 10 will remain reset.

なんらかの異常によつてウオツチドグタイマ8
がタイムアツプし、フリツプフロツプ10がセツ
トされると、フリツプフロツプ10の出力Q=
“1”がCPU1の入力端ERFに印加されるととも
に、ゲート15に印加される。また同時に、フリ
ツプフロツプ10の出力Qが“1”に立上がつた
のに応答し、リセツトパルス発生回路7から所定
幅の微分パルスが発生し、そのパルス信号がゲー
ト11を介してCPU1のリスタート入力端PRES
に印加される。
Watchdog timer 8 due to some abnormality.
When the time-up occurs and flip-flop 10 is set, the output of flip-flop 10 becomes Q=
“1” is applied to the input terminal ERF of the CPU 1 and is also applied to the gate 15. At the same time, in response to the output Q of the flip-flop 10 rising to "1", a differential pulse of a predetermined width is generated from the reset pulse generation circuit 7, and the pulse signal is sent to the restart input of the CPU 1 via the gate 11. edge pres
is applied to

第2図はCPU1によつて実行されるシステム
プログラムの概要を示すフローチヤートである。
以下このフローチヤートに従つてCPU1の制御
動作を順番に説明する。
FIG. 2 is a flowchart showing an overview of the system program executed by the CPU 1.
The control operations of the CPU 1 will be explained below in order according to this flowchart.

このプログラマブル・コントローラに電源を投
入すると、図示していない電源投入検知回路から
パワーオンリセツト信号が発生し、このリセツト
信号がゲート12を介してフリツプフロツプ10
に入力され、これをリセツトするとともに、ゲー
ト11を介してCPU1のリスタート入力端RES
に印加され、CPU1がそのシステムプログラム
を先頭から実行開始することとなる。
When power is applied to this programmable controller, a power-on reset signal is generated from a power-on detection circuit (not shown), and this reset signal is passed through gate 12 to flip-flop 10.
is input to the restart input terminal RES of CPU1 via gate 11.
is applied, and the CPU 1 starts executing the system program from the beginning.

最初のステツプ100では、CPU1の入力端ERF
に印加されているフリツプフロツプ10の出力Q
の論理状態をチエツクする。電源投入時にはフリ
ツプフロツプ10がリセツトされているので、
ERFは“0”で、ステツプ101へ進む。ステツプ
101で信号CLRを“1”にしてフリップフロップ
10をリセツト状態に保ち、次のステツプ102で
イニシヤル処理を実行し、次のステツプ103で上
述した命令実行動作の基準時間T1をウオツチド
グタイマ8にプリセツトし、次のステツプ104で
信号CLRを“0”に戻す。
In the first step 100, the input terminal ERF of CPU1 is
The output Q of flip-flop 10 applied to
Check the logical state of Since the flip-flop 10 is reset when the power is turned on,
ERF is "0" and the process advances to step 101. step
At step 101, the signal CLR is set to "1" to keep the flip-flop 10 in the reset state, at the next step 102, initial processing is executed, and at the next step 103, the reference time T1 of the instruction execution operation described above is set by the watchdog timer 8. In the next step 104, the signal CLR is returned to "0".

次にステツプ105でユーザプログラムの実行中
であることを示す信号SCANを“1”にし、次の
ステツプ106でユーザプログラムを一巡実行し、
ユーザプログラムを最後まで(END命令まで)
実行終了すると、ステツプ107で信号SCANを
“0”に戻す。
Next, in step 105, the signal SCAN indicating that the user program is being executed is set to "1", and in the next step 106, the user program is executed once,
Complete the user program to the end (until the END instruction)
When the execution is completed, the signal SCAN is returned to "0" in step 107.

なお、信号SCANが“1”になると、ゲート1
3の出力、すなわち退避メモリ5のリード/ライ
ト信号がリード状態“1”に保たれ、退避メモリ
5のデータが書換えられるのを防ぐ。また、信号
SCAN=“1”がインバータ14を介してゲート
15に入力されると、ゲート15の出力が“0”
に保たれ、この状態でウオツチドグタイマ8がタ
イムアツプしてフリツプフロツプ10の出力Qが
“1”になつても、CPU1に停止信号HALTが印
加されないとともに、入出力回路6の全出力オフ
指令信号が発せられないようになつている。
Note that when the signal SCAN becomes “1”, gate 1
3, that is, the read/write signal of the save memory 5 is kept in the read state "1" to prevent the data in the save memory 5 from being rewritten. Also, the signal
When SCAN="1" is input to the gate 15 via the inverter 14, the output of the gate 15 becomes "0"
In this state, even if the watchdog timer 8 times up and the output Q of the flip-flop 10 becomes "1", the stop signal HALT is not applied to the CPU 1, and the all output OFF command signal of the input/output circuit 6 is not applied. It has become impossible for me to utter it.

次にCPU1は入出力更新およびデータ退避の
処理を行なうが、それに先立つて、まずステツプ
108で入出力更新およびデータ退避の処理基準時
間T2をウオツチドグタイマ8にプリセツトす
る。次のステツプ109で入出力更新動作を行ない、
次のステツプ110でデータ退避処理を行ない、こ
れらを終了したならば、ステツプ111でプログラ
ム実行処理の基準時間T1をウオツチドグタイマ
8にプリセツトし、先のステツプ105→106と進
み、ユーザプログラムの実行処理を行なう。
Next, CPU1 performs input/output update and data saving processing, but before that, it first performs a step
At 108, a processing reference time T2 for input/output updating and data saving is preset in the watchdog timer 8. In the next step 109, input/output update operation is performed,
In the next step 110, data saving processing is performed, and once these are completed, in step 111, the reference time T1 for program execution processing is preset in the watchdog timer 8, and the process proceeds to the previous steps 105→106, and the user program is Perform execution processing.

CPU1が正常に動作している間は、上述した
ステツプ105、106、107、108、109、110、111が
繰り返される。
While the CPU 1 is operating normally, steps 105, 106, 107, 108, 109, 110, and 111 described above are repeated.

上述の動作中において、信号SCANが“1”と
なつているユーザプログラムの実行動作中にウオ
ツチドグタイマ8がタイムアツプしたとする。こ
の場合、フリツプフロツプ10がセツトされ、出
力Qが“1”となり、リセツトパルス発生回路7
からリセツトパルスが発生し、そのパルス信号が
ゲート11を介してCPU1のリスタート入力端
RESに印加される。
Assume that during the above-described operation, the watchdog timer 8 times out while the user program for which the signal SCAN is "1" is being executed. In this case, the flip-flop 10 is set, the output Q becomes "1", and the reset pulse generating circuit 7
A reset pulse is generated from
Applied to RES.

CPU1はこのリスタートパルス信号を受けて
そのときの動作を中断し、システムプログラムを
先頭から(ステツプ100から)実行を開始する。
ステツプ100でフリップフロップ10の出力状態
をチエツクするが、このときQ=ERF=“1”と
なつているのでステツプ112に進む。
Upon receiving this restart pulse signal, the CPU 1 interrupts the current operation and starts executing the system program from the beginning (from step 100).
At step 100, the output state of the flip-flop 10 is checked, and since Q=ERF="1" at this time, the process advances to step 112.

ステツプ112では、退避メモリ5に退避してあ
つた最新の入出力更新時のデータを、ユーザプロ
グラムの実行時間が超過するという異常でデータ
が破壊されているであろう入出力メモリ4に戻
す。次のステツプ113でユーザプログラムの処理
時間の基準時間T1をウオツチドグタイマ8にプ
リセツトし、次のステツプ114で信号CLRを発し
てゲート12を介してフリツプフロツプ10をリ
セツトする。そしてステツプ105→106と進み、再
びユーザプログラムを先頭から実行し直させる。
In step 112, the data saved in the save memory 5 at the time of the latest input/output update is returned to the input/output memory 4, where the data may have been destroyed due to an abnormality in which the execution time of the user program exceeded. In the next step 113, the reference time T1 of the user program processing time is preset in the watchdog timer 8, and in the next step 114, the signal CLR is generated to reset the flip-flop 10 via the gate 12. The process then proceeds to steps 105 and 106, and the user program is re-executed from the beginning.

このときには、退避メモリ5に退避してあつた
入出力データに基づいてユーザプログラムが実行
されるので、CPU1がちよつとしたノイズで一
時的に暴走を起こしたような場合には、上述のユ
ーザプログラムの実行し直しを行なえば、正しく
これを実行することができ、シーケンス制御の連
続性が全く損われることがない。
At this time, the user program is executed based on the input/output data saved in the save memory 5, so if the CPU 1 temporarily goes out of control due to small noise, the user program described above will be executed. If it is re-executed, it can be executed correctly, and the continuity of sequence control will not be impaired at all.

なお、入出力更新動作あるいはデータ退避動作
中にCPU1が暴走し、ウオツチドグタイマ8が
タイムアツプしてフリツプフロツプ10がセツト
された場合、このとき信号SCANは“0”である
ので、フリツプフロツプ10の出力Qが“1”に
なると、ゲート15の出力が“1”となり、
CPU1のホルト入力HALTが“1”となつて
CPU1の動作が停止するとともに、入出力回路
6の外部出力信号が強制的に全てオフにされる。
つまり、入出力更新動作中あるいはデータ退避動
作中にCPU1に暴走が起これば、入出力メモリ
4、退避メモリ5あるいは入出力回路6のデータ
が混乱させられて回復しようがないので、プログ
ラマブル・コントローラの制御動作を全面的に停
止している。
Note that if the CPU 1 goes out of control during an input/output update operation or a data save operation, and the watchdog timer 8 times up and the flip-flop 10 is set, the signal SCAN is "0" at this time, so the output of the flip-flop 10 is When Q becomes "1", the output of gate 15 becomes "1",
The halt input HALT of CPU1 becomes “1”
The operation of the CPU 1 is stopped, and all external output signals of the input/output circuit 6 are forcibly turned off.
In other words, if the CPU 1 goes out of control during an input/output update operation or a data save operation, the data in the input/output memory 4, save memory 5, or input/output circuit 6 will be confused and cannot be recovered. Control operations have been completely stopped.

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

第1図はこの発明の一実施例によるプログラマ
ブル・コントローラの全体構成を示すブロツク
図、第2図は第1図におけるCPU1のシステム
プログラムの概要を示すフローチヤートである。 1……CPU、3……ユーザプログラムメモリ、
4……入出力メモリ、5……退避メモリ、6……
入出力回路、8……ウオツチドグタイマ。
FIG. 1 is a block diagram showing the overall configuration of a programmable controller according to an embodiment of the present invention, and FIG. 2 is a flowchart showing an overview of the system program of CPU 1 in FIG. 1...CPU, 3...User program memory,
4... Input/output memory, 5... Save memory, 6...
Input/output circuit, 8...Watchdog timer.

Claims (1)

【特許請求の範囲】 1 ユーザプログラムをメモリから順番に読出
し、その各命令に従つて入出力メモリにストアさ
れているデータについて演算処理をし、かつその
処理結果でもつて上記入出力メモリのデータを書
換える命令実行手段と、外部から入出力回路に与
えられている入力データを上記入出力メモリの所
定エリアにストアするとともに、上記入出力メモ
リの所定エリアの出力データを入出力回路に転送
して外部に出力する入出力更新手段とを有し、上
記命令実行手段によるユーザプログラムの一巡実
行と上記入出力更新手段の動作を交互に繰り返す
サイクリツク実行方式のプログラマブル・コント
ローラにおいて; 上記命令実行手段によるユーザプログラムの一
巡実行時間が所定の基準時間以内に収まつている
か否かを各実行動作毎に監視する実行時間監視手
段と、上記入出力更新手段の動作毎に更新された
上記入出力メモリの最新データを退避メモリにス
トアするデータ退避手段と、上記命令実行手段の
動作中に上記監視手段にてプログラム実行時間の
基準時間T1の超過が検出されたとき、上記命令
実行手段の動作を中断させ、上記退避メモリのデ
ータを上記入出力メモリに移した後、上記命令実
行手段を再起動してユーザプログラムを最初から
実行し直させる再実行制御手段と、上記入出力更
新手段およびデータ退避手段の動作中に上記監視
手段にて入出力更新およびデータ退避の処理基準
時間T2の超過が検出されたとき、装置全体の制
御動作を停止する制御動作停止手段と、 を有することを特徴とするプログラマブル・コン
トローラ。
[Claims] 1. Read a user program in order from memory, perform arithmetic processing on the data stored in the input/output memory according to each instruction, and use the processing results to read the data in the input/output memory. A command execution means for rewriting and storing input data given to the input/output circuit from the outside in a predetermined area of the input/output memory, and transferring output data of the predetermined area of the input/output memory to the input/output circuit. In a programmable controller of a cyclic execution type, the programmable controller has input/output updating means for outputting to the outside, and alternately repeats one round execution of a user program by the instruction execution means and the operation of the input/output updating means; Execution time monitoring means for monitoring whether the program round execution time is within a predetermined reference time for each execution operation, and the latest input/output memory updated every time the input/output updating means operates. When the monitoring means detects that the program execution time exceeds the reference time T1 during the operation of the data saving means for storing data in the saving memory and the instruction execution means, the operation of the instruction execution means is interrupted. , re-execution control means for restarting the instruction execution means to re-execute the user program from the beginning after moving the data in the save memory to the input/output memory; and the input/output updating means and the data saving means. A programmable device comprising: control operation stopping means for stopping the control operation of the entire device when the monitoring means detects that the input/output update and data saving processing reference time T 2 has exceeded during operation. ·controller.
JP57141808A 1982-08-16 1982-08-16 Programmable controller Granted JPS5932004A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP57141808A JPS5932004A (en) 1982-08-16 1982-08-16 Programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP57141808A JPS5932004A (en) 1982-08-16 1982-08-16 Programmable controller

Publications (2)

Publication Number Publication Date
JPS5932004A JPS5932004A (en) 1984-02-21
JPH0375882B2 true JPH0375882B2 (en) 1991-12-03

Family

ID=15300604

Family Applications (1)

Application Number Title Priority Date Filing Date
JP57141808A Granted JPS5932004A (en) 1982-08-16 1982-08-16 Programmable controller

Country Status (1)

Country Link
JP (1) JPS5932004A (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
ES2278531B1 (en) * 2006-01-18 2008-03-01 Francisco Aguir Celeiro METHOD FOR USER PROTECTION IN VISUAL INTERACTION DEVICES.
JP7470184B2 (en) 2020-04-24 2024-04-17 株式会社Fuji Circuit forming method and circuit forming device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS54157059A (en) * 1978-05-31 1979-12-11 Toshiba Corp Output control unit

Also Published As

Publication number Publication date
JPS5932004A (en) 1984-02-21

Similar Documents

Publication Publication Date Title
JPH0346854B2 (en)
JPH0375882B2 (en)
JPH11259340A (en) Reactivation control circuit for computer
JPS59148961A (en) Monitoring system of operation of processor
JP2009053752A (en) Watchdog processing method and abnormality detection circuit
JP2659067B2 (en) Microcomputer reset circuit
JP7394276B2 (en) PLC system error state control method
JPS5855535B2 (en) Multi-computer device for vehicles
JPH0612294A (en) Monitoring device
CN110832459A (en) vehicle control device
JPS6034132B2 (en) programmable controller
JPS63123138A (en) Detection circuit for out-of-control of microcomputer
JP2024175590A (en) Abnormality monitoring method and control system
JPS61145617A (en) Power supply disconnection circuit
WO2025216309A1 (en) Information processing method and information processing device
JPH0251748A (en) Microcomputer
JP3473002B2 (en) Data processing device and data processing method
JPS63255742A (en) data processing equipment
JPS5940641Y2 (en) Control device using microprocessor
JPS6341094B2 (en)
JPH04195437A (en) Program runaway monitoring device
JPS63174144A (en) Reset control circuit for microprocessor
JPH01211001A (en) Controller using microprocessor
JPS6252647A (en) Monitoring system for run away of microprocessor
JPS61175829A (en) Malfunction preventing system of computer for automobile