JPH03268001A - Controller - Google Patents
ControllerInfo
- Publication number
- JPH03268001A JPH03268001A JP6712290A JP6712290A JPH03268001A JP H03268001 A JPH03268001 A JP H03268001A JP 6712290 A JP6712290 A JP 6712290A JP 6712290 A JP6712290 A JP 6712290A JP H03268001 A JPH03268001 A JP H03268001A
- Authority
- JP
- Japan
- Prior art keywords
- output
- circuit
- signal
- backup
- controller
- 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
Links
- 230000005856 abnormality Effects 0.000 claims abstract description 15
- 238000000034 method Methods 0.000 claims abstract description 15
- 230000002159 abnormal effect Effects 0.000 claims abstract description 6
- 230000007257 malfunction Effects 0.000 claims description 2
- 238000010586 diagram Methods 0.000 description 6
- 238000006243 chemical reaction Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 230000007423 decrease Effects 0.000 description 2
- 230000005012 migration Effects 0.000 description 1
- 238000013508 migration Methods 0.000 description 1
Landscapes
- Feedback Control In General (AREA)
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明はマイクロプロセッサを搭載したプロセス用調節
計のバックアップの方法及び回路に関する。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a backup method and circuit for a process controller equipped with a microprocessor.
マイクロプロセッサを搭載したプロセス用調節計は、そ
のマイクロプロセッサが暴走した場合においても制御出
力の維持あるいは手動操作が要求されマイクロプロセッ
サから成る主回路とは別にバックアップ回路を設けてい
る。A process controller equipped with a microprocessor is required to maintain control output or perform manual operation even if the microprocessor goes out of control, and is therefore provided with a backup circuit separate from the main circuit consisting of the microprocessor.
マイクロプロセッサの動作は通常ウォッチドッグタイマ
と呼ばれるタイマにより監視されている。The operation of a microprocessor is usually monitored by a timer called a watchdog timer.
このタイマは通常の演算周期より長く設定してあり正常
動作で一周期終了した場合にリセットし、マイクロプロ
セッサは次の周期の演算を実行する。This timer is set to be longer than the normal calculation cycle, and is reset when one cycle is completed in normal operation, and the microprocessor executes the calculation in the next cycle.
しかし、マイクロプロセッサの暴走あるいは何らかの異
常で正常に終了しない場合には、このウォッチドッグタ
イマをリセットすることができず、タイムアツプする。However, if the process does not end normally due to a runaway of the microprocessor or some other abnormality, the watchdog timer cannot be reset and times up.
そして、このタイムアツプ信号により調節計の異常を外
部に知らせたり、あるいは調節計内部でバックアップに
切替えたりする。This time-up signal is used to notify the outside of the controller of an abnormality, or to switch to backup within the controller.
ここで第3図を用いて、従来技術によるバックアップへ
の切替方法を説明する。Here, a method of switching to backup according to the prior art will be explained using FIG.
第3図において、1は入力端子、入力回路2はアナログ
入力信号1例えばDC1〜50を取り込みA/D変換を
行うものである。制御演算回路3は、PID等の制御演
算をマイクロプロセッサを用いて行うものである。出力
回路4は演算結果をD/A変換し操作出力信号DC4〜
20mA等の信号に変換するものである。5は出力端子
で操作端に接続される。6はウォッチドッグタイマで制
御演算が正常に行われている場合、制御演算回路から毎
周期リセット信号が出力され、これによりタイマをリセ
ットする。このリセット信号が出力されない場合、ウォ
ッチドッグタイマはリセットされず、マイクロプロセッ
サの異常と見なされ。In FIG. 3, reference numeral 1 denotes an input terminal, and an input circuit 2 receives an analog input signal 1, for example, DC1-50, and performs A/D conversion. The control calculation circuit 3 performs control calculations such as PID using a microprocessor. The output circuit 4 D/A converts the calculation result and outputs the operation output signal DC4~
This converts it into a signal such as 20mA. 5 is an output terminal connected to the operating end. Reference numeral 6 denotes a watchdog timer, and when the control calculation is performed normally, a reset signal is outputted every cycle from the control calculation circuit, thereby resetting the timer. If this reset signal is not output, the watchdog timer will not be reset and it will be considered a microprocessor error.
タイムアツプする。そして、゛このタイムアツプ信号は
、調節計の異常として外部に接点として出力したり、調
節計内部でマニュアルバックアップ切替信号として使用
される。7はホールド回路で、ウォッチドッグタイマの
タイムアツプ信号をホールド信号として、出力回路4の
出力をホールドする。出力回路8は7でホールドした信
号を操作出力信号等に変換するものである。9は、7,
8を総合して、バックアップ回路と称したものである。Time up. Then, this time-up signal is output as a contact point to the outside as an abnormality in the controller, or is used as a manual backup switching signal inside the controller. A hold circuit 7 holds the output of the output circuit 4 using the time-up signal of the watchdog timer as a hold signal. The output circuit 8 converts the signal held in step 7 into an operation output signal or the like. 9 is 7,
8 are collectively referred to as a backup circuit.
場合によっては10も含む。10は出力切替回路で、主
回路とバックアップ回路の出力を切替える回路で、ウォ
ッチドッグタイマのタイムアツプ信号によりバックアッ
プ回路に切替る。In some cases, it may even include 10. Reference numeral 10 denotes an output switching circuit, which switches between the output of the main circuit and the backup circuit, and switches to the backup circuit in response to a time-up signal from the watchdog timer.
次に第4図に調節計のソフトウェアのフロー図を示す。Next, FIG. 4 shows a flow diagram of the controller software.
イニシャライズは各種LSIの初期設定や、データの初
期値を設定する。入力処理はアナログ入力を取込みA/
D変換処理を行う。制御演算処理はPID等の制御演算
を行う。出力処理は、演算結果をD/A変換し操作出力
信号とする処理を行う。周期待ちは、調節計の制御演算
周期(通常0.1 秒〜1秒)を一定に保つための時間
待ちである。ウォッチドッグタイマリセットは、正常に
一周期を終了したので異常検出を行うウォッチドッグタ
イマをリセットするものである。また、このウォッチド
ッグタイマは1通常、制御演算周期の2〜3倍に設定さ
れる。Initialize initializes various LSIs and initial values of data. Input processing takes analog input A/
Performs D conversion processing. The control calculation process performs control calculations such as PID. The output process performs D/A conversion of the calculation result and outputs the operation output signal. The cycle wait is a time wait to keep the control calculation cycle (usually 0.1 seconds to 1 second) of the controller constant. The watchdog timer reset is to reset the watchdog timer that detects an abnormality since it has completed one cycle normally. Further, this watchdog timer is normally set to two to three times the control calculation period.
第5図にバックアップへの移行動作を示す。矢印Aの時
点で主回路のマイクロプロセッサに異常が発生し、その
出力が減少して行ったとする。すると、その周期は正常
に終了できず、ウォッチドッグタイマがリセットされな
いため、ウォッチドッグタイマ出力は一定時間後に変化
し、タイムアツプする。このタイムアツプ信号によりバ
ックアップ回路のホールド回路部によりその時点の出力
をホールドし、出力切替を経て出力端子に出力する。な
お、第3図のブロック図には記入しなかったが、ホール
ド回路の後段にアップ/ダウン回路を設けることにより
手動操作も可能となる。FIG. 5 shows the operation of transitioning to backup. Assume that an abnormality occurs in the microprocessor of the main circuit at the point of arrow A, and its output decreases. Then, the cycle cannot end normally and the watchdog timer is not reset, so the watchdog timer output changes after a certain period of time and times up. In response to this time-up signal, the hold circuit section of the backup circuit holds the output at that time, and outputs it to the output terminal through output switching. Although not shown in the block diagram of FIG. 3, manual operation is also possible by providing an up/down circuit after the hold circuit.
上記従来技術は、第5図に示したように、矢印Aの時点
で異常となり出力が変化しているにもかかわらず、一定
時間経過した後の、すでに異常値となっている出力値を
ホールドしてバックアップ動作をする場合があるという
欠点があった。マイクロプロセッサの異常には種々のも
のがあり、常に出力信号を第5図のように乱すとは限ら
ないので常に異常値をバックアップすることにはならな
い。しかし、異常になってみないと出力がどうなるか分
らないのではバックアップ回路とは言えない。また確率
の問題として片付けることもできない。従来も、この欠
点には早くから気付き、ホールド回路の入力部に時定数
の大きなフィルターを挿入し、出力が変動しても、バッ
クアップ回路の出力は大きく変化しないようにしていた
。しかし、追従速度が遅くなるため根本的な対策にはな
っていなかった。As shown in FIG. 5, the above conventional technology holds the output value, which has already become an abnormal value, after a certain period of time has passed, even though the output has changed due to an abnormality at the point of arrow A. The drawback is that there are cases where backup operations are performed. There are various types of abnormalities in microprocessors, and since the output signal is not always disturbed as shown in FIG. 5, abnormal values cannot always be backed up. However, if you don't know what the output will be until something goes wrong, you can't call it a backup circuit. Nor can it be dismissed as a matter of probability. In the past, this drawback was noticed early on and a filter with a large time constant was inserted into the input section of the hold circuit to prevent the output of the backup circuit from changing significantly even if the output fluctuated. However, this was not a fundamental countermeasure because the tracking speed became slow.
本発明の目的は、上記欠点を改善し、マイクロプロセッ
サがどまような異常を起しても、正常時の出力値でバッ
クアップすることのできる調節計のバックアップ方式を
提供することにある。SUMMARY OF THE INVENTION An object of the present invention is to provide a backup method for a controller that can improve the above-mentioned drawbacks and can back up the output value with a normal output value even if the microprocessor malfunctions in any way.
上記目的を達成するため、本発明においては、バックア
ップ回路のホールド回路のホールド信号を、ウォッチド
ッグタイマのタイムアツプ信号ではなくリセット信号と
したものである。In order to achieve the above object, in the present invention, the hold signal of the hold circuit of the backup circuit is not the time-up signal of the watchdog timer but a reset signal.
ウォッチドッグタイマのリセット信号は一周期の演算が
正常に終了したときに出力されるものであるから、この
信号により倍周期出力値をホールドしておけば、たとえ
次の周期で異常となった場合においても、−周期前の正
常動作時の出力値でバックアップすることができる。The watchdog timer reset signal is output when one cycle of calculation ends normally, so if you use this signal to hold the double cycle output value, even if an error occurs in the next cycle, Also, it is possible to back up the output value during normal operation - period before.
以下、本発明の一実施例を第1図を用いて説明する。ブ
ロック図は従来例である第3図とほとんど同じで、符号
も全く同じであるので各部の機能の説明は省略する。従
来例と異るのは、バックアップ回路9のホールド回路7
のホールド信号としてウォッチドッグタイマ6のリセッ
ト信号としているところである。このリセット信号で倍
周期出力値をホールドすることにより、マイクロプロセ
ッサ異常によりウォッチドッグタイマ6がタイムアツプ
して出力切替回路10がバックアップ側に切替った場合
には一周期前の正常時の出力値を出力することができる
のでプロセスを乱すことがなく安全である。第2図に本
発明のバックアップ方式を採用した調節計のバックアッ
プ移行例を示す。An embodiment of the present invention will be described below with reference to FIG. The block diagram is almost the same as the conventional example shown in FIG. 3, and the reference numerals are also the same, so a description of the functions of each part will be omitted. What is different from the conventional example is the hold circuit 7 of the backup circuit 9.
The hold signal is used as a reset signal for the watchdog timer 6. By holding the double cycle output value with this reset signal, if the watchdog timer 6 times up due to a microprocessor error and the output switching circuit 10 switches to the backup side, the normal output value from one cycle ago will be used. Since it can be output, it is safe and does not disturb the process. FIG. 2 shows an example of backup migration of a controller that employs the backup method of the present invention.
矢印Aの時点で異常が発生し、出力が減少してゆくが、
バックアップ回路9のホールド回路7には、−周期前の
正常終了時の出力値がホールドされている。したがって
、バックアップ回路9の出力値(b)は、異常が発生す
る前の値のままとなっている。そして一定時間後にウォ
ッチドッグタイマ6がタイムアツプして出力回路が切替
ると、調節計出力(c)は異常発生前の値でホールドさ
れる。An abnormality occurs at the point of arrow A, and the output decreases, but
The hold circuit 7 of the backup circuit 9 holds the output value at the time of normal termination - period before. Therefore, the output value (b) of the backup circuit 9 remains at the value before the abnormality occurred. When the watchdog timer 6 times up after a certain period of time and the output circuit is switched, the controller output (c) is held at the value before the occurrence of the abnormality.
調節計のマイクロプロセッサが異常となった場合、本発
明によれば以上のように、異常となる前の出力値でホー
ルドされる。また、ウォッチドッグタイマがタイムアツ
プするまでの期間は非常に短時間であるので無視するこ
とができる。When the microprocessor of the controller becomes abnormal, according to the present invention, as described above, the output value before the abnormality is held. Furthermore, the period until the watchdog timer times out is very short and can be ignored.
本発明によれば、調節計のマイクロプロセッサがどんな
モードで異常となっても、異常前の出力値で出力をバッ
クアップすることができるので、プロセスを乱すことな
く完全に維持することができるという効果がある。According to the present invention, even if the microprocessor of the controller becomes abnormal in any mode, the output can be backed up with the output value before the abnormality, so the effect is that the process can be maintained completely without disturbing it. There is.
第1図は本発明の一実施例を示す機能ブロック図、第2
図は本発明の一実施例の動作を説明するための図、第3
図は従来技術を示す図、第4図は調節計のソフトウェア
のフロー図、第5図は従来技術の動作を説明するための
図である。
1・・・入力端子、2・・・入力回路、3・・・制御演
算回路。
4・・・出力回路、5・・・出力端子、6・・・ウォッ
チドッグタイマ、7・・・ホールド回路、8・・・出力
回路、9第1図
第
2
図
第
図
第3図
暢
図Fig. 1 is a functional block diagram showing one embodiment of the present invention;
The figure is a diagram for explaining the operation of one embodiment of the present invention.
4 is a flowchart of controller software, and FIG. 5 is a diagram for explaining the operation of the prior art. 1... Input terminal, 2... Input circuit, 3... Control calculation circuit. 4... Output circuit, 5... Output terminal, 6... Watchdog timer, 7... Hold circuit, 8... Output circuit, 9 Figure 1 Figure 2 Figure 3 Figure 3
Claims (1)
ッサから成る主回路の動作が異常となつたとき、前記主
回路の出力を保持し、あるいは手動操作が可能なように
バックアップ回路が設けられているプロセス用調節計に
おいて、主回路のマイクロプロセッサの動作を監視する
ウォッチドッグタイマのリセット信号により前記主回路
の出力信号をバツクアツプ回路で保持し、前記ウォッチ
ドッグタイマのタイムアップ信号により調節計の出力回
路を主回路からバックアップ回路へ切替え、バックアッ
プ回路は保持していた出力回路の出力信号を出力するよ
うに構成し、主回路のマイクロプロセッサが異常となつ
た場合においても、異常となる直前の出力値からバック
アップを可能としたことを特徴とするプロセス用調節計
。1. For processes equipped with a microprocessor and equipped with a backup circuit to maintain the output of the main circuit or enable manual operation when the main circuit consisting of the microprocessor malfunctions. In the controller, the output signal of the main circuit is held in a backup circuit by the reset signal of the watchdog timer that monitors the operation of the microprocessor of the main circuit, and the output signal of the controller is held in the backup circuit by the time-up signal of the watchdog timer. The circuit is switched to a backup circuit, and the backup circuit is configured to output the output signal of the output circuit that was being held, so that even if the main circuit's microprocessor becomes abnormal, it will back up from the output value immediately before the abnormality. A process controller characterized by being able to.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP6712290A JPH03268001A (en) | 1990-03-19 | 1990-03-19 | Controller |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP6712290A JPH03268001A (en) | 1990-03-19 | 1990-03-19 | Controller |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH03268001A true JPH03268001A (en) | 1991-11-28 |
Family
ID=13335783
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP6712290A Pending JPH03268001A (en) | 1990-03-19 | 1990-03-19 | Controller |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH03268001A (en) |
-
1990
- 1990-03-19 JP JP6712290A patent/JPH03268001A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JPS6152496B2 (en) | ||
JPH03268001A (en) | Controller | |
JPH06324721A (en) | Method for detecting falling-off of connection unit | |
JPS5878239A (en) | Operation controlling circuit | |
JPS6389941A (en) | Monitor and control equipment for microprocessor applied equipment | |
JP4182621B2 (en) | Control signal input circuit | |
JPH05257748A (en) | Microprocessor device | |
JP2625549B2 (en) | Controller control mechanism | |
JPH0612294A (en) | Monitor device | |
JPH02310634A (en) | System for supervising runaway of program | |
JPH04358203A (en) | Sequence controller | |
JPS63282858A (en) | System for preventing program runaway | |
JPH08123704A (en) | Controller | |
JPS62123531A (en) | Cpu supervisory unit | |
JPH04182842A (en) | Timer monitoring method | |
JPH09319408A (en) | Interrupt signal monitor circuit and programmable controller | |
JPS62147538A (en) | Reset system for watchdog timer for device using microcomputer | |
JPH0519897A (en) | Resetting control circuit of information processor | |
JPS62256162A (en) | Duplex computer system switching control device | |
JPH04105151A (en) | Input/output controller | |
JPH0277806A (en) | Monitoring system for control signal | |
JPS58184667A (en) | Information processing unit | |
JPS63237147A (en) | Supervisory system for input/output actions in computer system | |
JPH053017B2 (en) | ||
JPS645322B2 (en) |