JP2969844B2 - Programmable controller - Google Patents
Programmable controllerInfo
- Publication number
- JP2969844B2 JP2969844B2 JP19104890A JP19104890A JP2969844B2 JP 2969844 B2 JP2969844 B2 JP 2969844B2 JP 19104890 A JP19104890 A JP 19104890A JP 19104890 A JP19104890 A JP 19104890A JP 2969844 B2 JP2969844 B2 JP 2969844B2
- Authority
- JP
- Japan
- Prior art keywords
- processing
- scan
- input
- execution
- order
- 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 - Fee Related
Links
Landscapes
- Safety Devices In Control Systems (AREA)
- Programmable Controllers (AREA)
Description
【発明の詳細な説明】 [産業上の利用分野] 本発明は、複数のシーケンス処理をそれぞれ独立した
周期で実行するいわゆるマルチスキャン方式を備えたプ
ログラマブルコントローラの二重化制御方式に関するも
のである。Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a dual control system of a programmable controller having a so-called multi-scan system that executes a plurality of sequence processes at independent periods.
[従来の技術] システムの高信頼性が要求される制御システムにおい
ては同一構成の制御装置を2台並列に接続する二重化構
成をとることが多い。一般にこのような二重化構成をと
るプログラマブルコントローラの場合、入力部と出力部
は共通にして演算部だけを二重化する構成となってい
る。すなわち、共通の入力部から入力されたデータは二
重化された演算部において並列処理された後、演算結果
が共通の出力部へ出力される。ここで二重化された演算
部の一方が故障しても健全なもう一方の演算部で処理が
継続されるためシステムが停止することはない。[Related Art] In a control system that requires high reliability of the system, a duplex configuration in which two control devices having the same configuration are connected in parallel is often adopted. Generally, in the case of a programmable controller having such a duplex configuration, the input section and the output section are made common and only the arithmetic section is duplicated. That is, data input from the common input unit is processed in parallel by the duplicated operation unit, and the operation result is output to the common output unit. Here, even if one of the duplicated operation units fails, the processing is continued in the other sound operation unit, so that the system does not stop.
しかし、このようなプラグラマブルコントローラにお
いて演算内容を複数に分割し、それぞれの演算に優先順
位と周期をもたせるいわゆるマルチスキャン方式を実現
しようとすると、二重化された演算部の同期ずれが問題
となる。すなわち、優先度の低いスキャン(低位スキャ
ン)に優先度の高いスキャン(高位スキャン)が割り込
んで実行されると、両系の演算部の同期ずれによる割り
込みアドレスの違いから、両系においてスキャン間の共
有データが不一致となり、その結果シーケンス処理の動
作不一致や出力データの不一致を発生する可能性があ
る。However, in such a pluggable controller, when the operation content is divided into a plurality of parts and an attempt is made to realize a so-called multi-scan system in which each operation has a priority and a period, a synchronization shift between the duplicated operation units becomes a problem. In other words, if a low-priority scan (low-order scan) is interrupted and executed by a high-priority scan (high-order scan), a difference in the interrupt address due to a synchronization error between the arithmetic units of both systems causes a difference between the scans in both systems. There is a possibility that the shared data becomes inconsistent, resulting in an inconsistency in the operation of the sequence processing and an inconsistency in the output data.
これを防止する方法として特開昭59−72506号公報に
見られるように、アドレス比較器とアドレスラッチ回路
をもうけて両系のマイクロプロセッサの実行アドレスを
比較し、実行アドレスの大きい方を処理が進んでいると
みなしてホールドする一方、実行アドレスの小さい方を
処理が遅れているとみなして処理を継続することで両系
同一アドレスで割り込み処理を実行する方法がある。As a method for preventing this, as disclosed in Japanese Patent Application Laid-Open No. Sho 59-72506, an address comparator and an address latch circuit are provided to compare the execution addresses of the microprocessors of both systems. There is a method in which interrupt processing is executed at the same address in both systems by holding the data while assuming that it is proceeding and holding the processing while assuming that the processing with a smaller execution address is delayed and continuing the processing.
[発明が解決しようとする課題] 以上説明したような従来技術ではマイクロプロセッサ
の1命令ごとに同期をとるために特殊なハードウエアを
必要とするうえ、最近のマイクロプロセッサのように必
ずしも実行しないアドレスをプリフェッチするようなも
のを採用した場合、この方式の実現は相当に困難なもの
となる。[Problems to be Solved by the Invention] In the prior art described above, special hardware is required for synchronizing each instruction of the microprocessor, and an address which is not always executed like a recent microprocessor is required. If a method that prefetches the data is adopted, the realization of this method becomes considerably difficult.
この問題を解決するには、低位スキャンのシーケンス
処理において共有データをアクセスする区間を割り込み
禁止にして高位スキャンの割り込み実行を制限する方法
が考えられる。しかし、この方法では高位スキャンの入
出力処理の定周期性が損なわれるという問題点がある。In order to solve this problem, a method is conceivable in which interrupts are prohibited in a section for accessing shared data in the low-order scan sequence processing, and interrupt execution of the high-order scan is restricted. However, this method has a problem that the periodicity of the input / output processing of the high-order scan is lost.
この発明は上記のような問題点を解消するためになさ
れたもので、スキャン固有のシーケンス処理と入出力処
理を別々のタイミングで割り込み実行することにより、
入出力処理の定周期性を損なうことなく、スキャン間の
共有データの一致性を保証するプログラマブルコントロ
ーラを提供することを目的としている。The present invention has been made in order to solve the above-described problems. By performing scan-specific sequence processing and input / output processing at different timings,
An object of the present invention is to provide a programmable controller that guarantees the consistency of shared data between scans without impairing the periodicity of input / output processing.
[課題を解決するための手段] 以上の目的を達成するため、この発明は次のような構
成としている。すなわち、マルチスキャン方式を備えた
二重化プログラマブルコントローラにおいて、優先度の
高いスキャン(高位スキャン)のシーケンス処理と入出
力処理を別々のタイミングで割り込み実行する手段と、
優先度の低いスキャン(低位スキャン)において前記シ
ーケンス処理の割り込み実行を禁止し前記入出力処理の
割り込み実行を許可する割り込み制限区間と、前記割り
込み実行のタイミングで二重系の同期をとる同期制御手
段を備え、スキャン固有のシーケンス処理と入出力処理
を実行するものである。Means for Solving the Problems In order to achieve the above object, the present invention has the following configuration. That is, in a redundant programmable controller having a multi-scan system, means for interrupting execution of sequence processing and input / output processing of a high-priority scan (high-order scan) at different timings;
An interrupt restriction section for prohibiting interrupt execution of the sequence processing and permitting execution of interrupts for the input / output processing in low-priority scans (low-order scans), and synchronization control means for synchronizing dual systems at the timing of the interrupt execution And performs scan-specific sequence processing and input / output processing.
[作用] 低位スキャンのシーケンス処理において、スキャン間
の共有データをアクセスする区間を割り込み制限区間と
することにより、高位スキャンのシーケンス処理の割り
込み実行が禁止され、二重系におけるスキャン間の共有
データの一致性が保証される。また、高位スキャンの入
出力処理は前記割り込み制限区間においても割り込み実
行が許可されているため入出力処理の定周期性が損なわ
れることはない。[Operation] In the low-order scan sequence processing, by setting the section for accessing the shared data between scans as an interrupt restriction section, the interrupt execution of the high-order scan sequence processing is prohibited, and the shared data between scans in the duplex system is prohibited. Consistency is guaranteed. Further, in the input / output processing of the high-order scan, the execution of an interrupt is permitted even in the interrupt-limited section, so that the periodicity of the input / output processing is not impaired.
[実施例] 以下、本発明の実施例を図に示して説明する。[Example] Hereinafter, an example of the present invention will be described with reference to the drawings.
第1図は本発明の実施例を示すブロック図で、プログ
ラマブルコントローラ1は入力部2と、二重化された演
算部3a、3bと、出力部4と、二重化同期制御部5を備え
ている。FIG. 1 is a block diagram showing an embodiment of the present invention. A programmable controller 1 includes an input unit 2, duplicated operation units 3a and 3b, an output unit 4, and a duplicate synchronization control unit 5.
第2図は本発明の実施例を示すフローチャートであ
る。スキャン処理10は演算部3a、3bにおいて複数存在
し、それぞれ優先順位をもって定周期で実行されるもの
で、次のステップを実行する。FIG. 2 is a flowchart showing an embodiment of the present invention. A plurality of scan processes 10 exist in the operation units 3a and 3b, and are executed at regular intervals with priorities, and execute the following steps.
(1)演算部3aと3bの出力処理開始のタイミングを合わ
せるために、二重化同期制御部5を用いて同期処理を行
なう。(ステップ1) (2)前回スキャンの演算結果の出力処理を行なう。
(ステップ2) (3)演算部3aと3bの入力処理開始のタイミングを合わ
せるために二重化同期制御部5を用いて同期処理を行な
う。(ステップ3) (4)今回スキャン用の入力処理を行なう。(ステップ
4) (5)低位スキャンの割り込み制限状態値を参照し、割
り込み制限区間内(真)であれば処理を中断して低位ス
キャンに実行を移し、割り込み制限区間外(偽)であれ
ば次のステップに進む。(ステップ5) (6)演算部3aと3bのシーケンス処理開始のタイミング
を合わせるために二重化同期制御部5を用いて同期処理
を行なう。(ステップ6) (7)自スキャンの割り込み制限状態値を“真”にす
る。(ステップ7) (8)複数の分割されたシーケンス処理単位の一つを実
行する。(ステップ8) (9)自スキャンの割り込み制限状態値を“偽”にす
る。(ステップ9) (10)処理を中断している高位スキャンがあればそちら
へ実行を移す。(ステップ10) (11)残りのシーケンス処理単位についてステップ7か
らステップ10を繰り返す。(ステップ11) 低位スキャンのシーケンス処理はそれぞれ高位スキャ
ンの実行周期時間よりも短い実行時間となるような処理
単位に分割されていると同時に割り込み制限区間となっ
ている。すなわち、高位スキャンの入出力処理は常に低
位スキャンに割り込んで実行可能であるが、高位スキャ
ンのシーケンス処理は,低位スキャンにおいて前記ステ
ップ8のシーケンス処理を実行中は割り込み制限状態値
が“真”になっているため、実行禁止となる。また低位
スキャンのステップ8とステップ9が終了すると割り込
み制限状態値が“偽”となるため、高位スキャンのシー
ケンス処理は実行可能となる。(1) In order to match the timing of the start of the output processing of the arithmetic units 3a and 3b, the synchronous processing is performed using the duplicated synchronous control unit 5. (Step 1) (2) Output processing of the calculation result of the previous scan is performed.
(Step 2) (3) Synchronization processing is performed using the dual synchronization control unit 5 in order to match the timing of starting the input processing of the operation units 3a and 3b. (Step 3) (4) Input processing for the current scan is performed. (Step 4) (5) With reference to the interrupt limit state value of the low-order scan, if it is within the interrupt limit section (true), the processing is interrupted and the execution is shifted to the low-order scan, and if it is outside the interrupt limit section (false). Proceed to the next step. (Step 5) (6) Synchronization processing is performed using the duplex synchronization control unit 5 in order to match the timing of the start of the sequence processing by the arithmetic units 3a and 3b. (Step 6) (7) Set the self-scanning interrupt restriction state value to “true”. (Step 7) (8) One of a plurality of divided sequence processing units is executed. (Step 8) (9) The self-scanning interrupt restriction state value is set to “false”. (Step 9) (10) If there is a high-order scan in which the processing is suspended, the execution is moved to that. (Step 10) (11) Steps 7 to 10 are repeated for the remaining sequence processing units. (Step 11) The low-order scan sequence processing is divided into processing units each having an execution time shorter than the execution cycle time of the high-order scan, and at the same time, an interrupt restriction section. That is, the input / output processing of the high-order scan can always be executed by interrupting the low-order scan. However, the sequence processing of the high-order scan is such that the interrupt restriction state value becomes “true” during the execution of the sequence processing of step 8 in the low-order scan. Execution is prohibited. Further, when Steps 8 and 9 of the low-order scan are completed, the interrupt restriction state value becomes “false”, so that the sequence processing of the high-order scan can be executed.
このように、低位スキャンのシーケンス処理実行中は
高位スキャンのシーケンス処理の実行を防止できるた
め、二重系においてスキャン間の共有データの不一致を
生じることはない。また、高位スキャンの入出力処理は
常に割り込み実行が可能であるから、入出力処理の定周
期性を損なうこともない。As described above, the execution of the high-order scan sequence processing can be prevented during the execution of the low-order scan sequence processing, so that there is no inconsistency in the shared data between scans in the duplex system. Further, since the input / output processing of the high-order scan can always be executed by interruption, the fixed periodicity of the input / output processing is not impaired.
[発明の効果] 以上述べたように、本発明によれば、マイクロプロセ
ッサの1命令ごとに二重系の同期をとる必要がないた
め、特殊なハードウェアは不要である。また、入出力処
理の定周期性を損なうことなくマルチスキャン方式が実
現できるため、二重化に伴う性能低下を防止できる効果
がある。[Effects of the Invention] As described above, according to the present invention, there is no need to synchronize the dual system for each instruction of the microprocessor, so that special hardware is not required. In addition, since the multi-scan method can be realized without impairing the periodicity of the input / output processing, there is an effect that a reduction in performance due to duplication can be prevented.
第1図は二重化されたプログラマブルコントローラのブ
ロック図、第2図は本発明によるプログラマブルコント
ローラのスキャン動作を示すフローチャートである。 1……プログラマブルコントローラ 2……入力部、3a、3b……演算部 4……出力部、5……同期制御部 10……スキャン処理FIG. 1 is a block diagram of a duplicated programmable controller, and FIG. 2 is a flowchart showing a scanning operation of the programmable controller according to the present invention. 1 Programmable controller 2 Input part 3a, 3b Operation part 4 Output part 5 Synchronous control part 10 Scan processing
Claims (1)
周期と優先順位をもって実行するマルチスキャン方式を
備えた二重化プログラマブルコントローラにおいて、優
先度の高いスキャンのシーケンス処理と入出力処理を別
々のタイミングで割り込み実行する手段と、優先度の低
いスキャンにおいて前記シーケンス処理の割り込み実行
を禁止し前記入出力処理の割り込み実行を許可する割り
込み制限区間と、前記割り込み実行のタイミングで二重
系の同期をとる同期制御手段を備え、スキャン固有のシ
ーケンス処理と入出力処理を実行することを特徴とする
プログラマブルコントローラ。In a redundant programmable controller having a multi-scan system for executing a plurality of sequence processes with independent cycles and priorities, interrupt execution of a high-priority scan sequence process and an input / output process at different timings. Means for interrupting, executing interrupts of the sequence processing in low-priority scanning, and permitting execution of interrupts of the input / output processing, and synchronization control means for synchronizing dual systems at the timing of the execution of the interrupts. A programmable controller that performs scan-specific sequence processing and input / output processing.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP19104890A JP2969844B2 (en) | 1990-07-18 | 1990-07-18 | Programmable controller |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP19104890A JP2969844B2 (en) | 1990-07-18 | 1990-07-18 | Programmable controller |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH04100110A JPH04100110A (en) | 1992-04-02 |
| JP2969844B2 true JP2969844B2 (en) | 1999-11-02 |
Family
ID=16268025
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP19104890A Expired - Fee Related JP2969844B2 (en) | 1990-07-18 | 1990-07-18 | Programmable controller |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2969844B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP6225091B2 (en) * | 2014-10-17 | 2017-11-01 | 三菱日立パワーシステムズ株式会社 | Multiplexing control apparatus and method, and apparatus control system and method |
-
1990
- 1990-07-18 JP JP19104890A patent/JP2969844B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JPH04100110A (en) | 1992-04-02 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JPH0454255B2 (en) | ||
| JP2969844B2 (en) | Programmable controller | |
| JPH07287608A (en) | Duplex synchronous control device for programmable controller | |
| JP3405513B2 (en) | Redundant controller for programmable controller | |
| JPH0877039A (en) | Test method | |
| JPH01246602A (en) | Special function unit for programmable controller | |
| JP2526835B2 (en) | Duplex synchronous control system of programmable controller | |
| JPH064301A (en) | Time division interrupt control method | |
| JPH0736720A (en) | Redundant computer equipment | |
| JPH11306038A (en) | Parallel arithmetic processing device and method | |
| JPH10326199A (en) | Interrupt Synchronizer in Dual System | |
| JP2947195B2 (en) | Interrupt mask control method | |
| JPH1185226A (en) | Multi-scan type redundant programmable controller | |
| JPH0573296A (en) | Microcomputer | |
| JPH1124944A (en) | Process synchronization method | |
| JPS61226839A (en) | Event processing system | |
| JP2544015B2 (en) | Micro program processor | |
| JPH06332874A (en) | How to start the test program | |
| JPS6033654A (en) | Inter-microprocessor data transferring system | |
| JPS6156814B2 (en) | ||
| JPH0693240B2 (en) | Program synchronization circuit | |
| JPH0934729A (en) | Dispatcher control system | |
| JPS6175436A (en) | Microprogram controller | |
| JPS5972506A (en) | Sequence controller | |
| JPH04199411A (en) | Control system for information processing system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| LAPS | Cancellation because of no payment of annual fees |