JP7538021B2 - PLC and PLC systems - Google Patents
PLC and PLC systems Download PDFInfo
- Publication number
- JP7538021B2 JP7538021B2 JP2020207478A JP2020207478A JP7538021B2 JP 7538021 B2 JP7538021 B2 JP 7538021B2 JP 2020207478 A JP2020207478 A JP 2020207478A JP 2020207478 A JP2020207478 A JP 2020207478A JP 7538021 B2 JP7538021 B2 JP 7538021B2
- Authority
- JP
- Japan
- Prior art keywords
- plc
- data
- program
- buffer memory
- output
- 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.)
- Active
Links
- 230000015654 memory Effects 0.000 claims description 164
- 230000005856 abnormality Effects 0.000 claims description 28
- 238000004891 communication Methods 0.000 claims description 28
- 238000013500 data storage Methods 0.000 claims 4
- 230000010365 information processing Effects 0.000 description 21
- 238000000034 method Methods 0.000 description 14
- 238000010586 diagram Methods 0.000 description 10
- 230000006378 damage Effects 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- JJWKPURADFRFRB-UHFFFAOYSA-N carbonyl sulfide Chemical compound O=C=S JJWKPURADFRFRB-UHFFFAOYSA-N 0.000 description 1
- 230000005672 electromagnetic field Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 230000005855 radiation Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
Images
Landscapes
- Programmable Controllers (AREA)
Description
本発明は、PLC、及びPLCシステムに関する。 The present invention relates to a PLC and a PLC system.
プログラマブルロジックコントローラ(PLC)は、工場に設けられた機械や設備の制御装置である。工場には複数のPLCが設置される。PLCには1台又は複数台の機械や設備、センサが取り付けられている。PLCは、プログラムを実行して制御対象の機械や設備に制御信号を出力する。複数のPLCがネットワークに接続されており、互いにデータをやり取りできる。 A programmable logic controller (PLC) is a control device for machines and equipment installed in a factory. Multiple PLCs are installed in a factory. One or more machines, equipment, and sensors are attached to the PLC. The PLC executes a program and outputs control signals to the machines and equipment to be controlled. Multiple PLCs are connected to a network, allowing them to exchange data with each other.
従来、PLCの故障を原因とするシステムの停止を回避する手段として、あるPLCの制御プログラムを他のPLCで2重に実行し、一方の異常を検知すると、正常なPLCの出力を、制御対象に出力する技術が知られている。例えば、特許文献1。 As a means of avoiding a system shutdown due to a PLC failure, a technique is known in which a control program for a certain PLC is executed in duplicate on another PLC, and when an abnormality is detected in one PLC, the output of the normal PLC is output to the controlled object. For example, see Patent Document 1.
PLCが設置される工場内の環境としては、サーボモータ、インバータ、高圧電力装置など多種多様な装置がPLCに接続され、あるいはPLCの付近に配置されている。そのため、放射ノイズ、電源の瞬時停電、電磁界などにより、CPUモジュール内のメモリに格納されたデータの破壊が発生しやすくなる。また、CPUモジュール内のメモリのデータ破壊の現象は、宇宙線によっても生じる。 In the factory environment where PLCs are installed, a wide variety of devices such as servo motors, inverters, and high-voltage power devices are connected to the PLC or placed near the PLC. This makes it easy for data stored in the memory in the CPU module to be destroyed by radiation noise, momentary power outages, electromagnetic fields, etc. Data destruction in the memory in the CPU module can also be caused by cosmic rays.
特許文献1では、ソフトエラーを検出するために定期的にメモリの異常をチェックする。ソフトエラーを検出するために、メモリ全体のチェックをするのは時間がかかるため、異常が起きた時にリアルタイムに対応できない可能性がある。 In Patent Document 1, memory is periodically checked for abnormalities to detect soft errors. Checking the entire memory to detect soft errors takes time, so there is a possibility that real-time response cannot be made when an abnormality occurs.
PLCの分野では、異常が発生しても運転を継続する技術が望まれている。 In the field of PLC, there is a demand for technology that allows operations to continue even if an abnormality occurs.
本開示の一態様であるPLCシステムは、I/O機器を介して制御対象に接続される複数のPLCと、複数のPLCを管理する上位制御装置とを備えるPLCシステムであって、上位制御装置は、それぞれのPLCに対して、該PLC自身に接続された制御対象を制御する制御プログラムを自己プログラムとして割り当てるとともに、PLCシステム全体で1実行周期内に3箇所又はそれ以上でそれぞれの制御プログラムが並行に実行されるように、PLCシステムに含まれる他のPLCの制御プログラムを他プログラムとして上位制御装置及び複数のPLCに割り当て、PLCは、プロセッサと、メインメモリと、通信部と、を備え、通信部は、自己の制御対象から送信された入力データを記憶する第1入力用バッファメモリと、第1入力用バッファメモリに記憶する第1入力データに対する自己プログラムの実行結果である第1出力データを記憶する第1出力用バッファメモリと、上位制御装置又は複数のPLCから受信した当該PLCの制御プログラムの実行結果を第2出力データとして記憶する少なくとも2つの第2出力用バッファメモリと、第1出力用バッファメモリに記憶するデータと第2出力用バッファメモリに記憶するデータの多数決を取り、多数派のデータをI/O機器を介して前記制御対象に出力する多数決回路と、を備え、PLCのプロセッサは、多数決により少数派となるデータが存在する場合、多数決により多数派となった上位制御装置又はPLCのメインメモリのデータを多数決により少数派となった上位制御装置又はPLCのメインメモリのデータで再書き込みする、PLCシステム。
本開示の一態様であるPLCは、I/O機器を介して制御対象に接続される複数のPLCと、複数のPLCを管理する上位制御装置とを備えるPLCシステムに含まれるPLCであって、プロセッサと、メインメモリと、通信部と、を備え、メインメモリは、PLCが制御対象を制御する制御プログラムである自己プログラムと、PLCシステムに含まれる他のPLCの制御プログラムである他プログラムとを記憶し、それぞれの制御プログラムはコントローラシステム全体で1実行周期内に3箇所以上で並行に実行されるように割り当てられており、通信部は、自己の制御対象から送信された入力データを記憶する第1入力用バッファメモリと、第1入力用バッファメモリに記憶する第1入力データに対する自己プログラムの実行結果である第1出力データを記憶する第1出力用バッファメモリと、上位制御装置又は複数のPLCが他プログラムとして実行した当該PLCの制御プログラムの実行結果を第2出力データとして記憶する少なくとも2つの第2出力用バッファメモリと、第1出力用バッファメモリに記憶するデータと第2出力用バッファメモリに記憶するデータの多数決を取り、多数派のデータを前記I/O機器を介して前記制御対象に出力する多数決回路と、を備え、プロセッサは、多数決により多数派となった上位制御装置又はPLCのメインメモリのデータを多数決により少数派となった上位制御装置又はPLCのメインメモリのデータで再書き込みする。
A PLC system according to one aspect of the present disclosure is a PLC system including a plurality of PLCs connected to control objects via I/O devices, and an upper control device that manages the plurality of PLCs, in which the upper control device assigns, to each PLC , a control program that controls the control object connected to the PLC itself as its own program, and assigns control programs of other PLCs included in the PLC system to the upper control device and the plurality of PLCs as other programs so that each control program is executed in parallel at three or more locations within one execution cycle in the entire PLC system, the PLC includes a processor, a main memory, and a communication unit, and the communication unit includes a first input buffer memory that stores input data transmitted from the control object of the PLC, and a second input buffer memory that stores the first input buffer memory. a first output buffer memory that stores first output data which is a result of execution of the PLC's own program against first input data stored in the first output buffer memory; at least two second output buffer memories that store as second output data a result of execution of the control program of the PLC received from a higher-level control device or a plurality of PLCs; and a majority voting circuit that takes a majority vote between the data to be stored in the first output buffer memory and the data to be stored in the second output buffer memory and outputs the majority data to the control target via an I/O device, wherein when there is data which is the minority as a result of the majority vote, the processor of the PLC rewrites the data in the higher-level control device or main memory of the PLC which is the majority as a result of the majority vote with the data in the higher-level control device or main memory of the PLC which is the minority as a result of the majority vote.
A PLC according to one aspect of the present disclosure is a PLC included in a PLC system including a plurality of PLCs connected to control targets via I/O devices and a host control device that manages the plurality of PLCs, and includes a processor, a main memory, and a communication unit. The main memory stores a self program, which is a control program by which the PLC controls the control target, and other programs, which are control programs of other PLCs included in the PLC system, and each control program is assigned to be executed in parallel at three or more locations within one execution period in the entire controller system. The communication unit stores a first input buffer memory that stores input data transmitted from the control target, and a first input buffer memory that stores input data transmitted from the control target. The system comprises a first output buffer memory for storing first output data which is the result of execution of its own program against input data, at least two second output buffer memories for storing second output data which is the result of execution of the control program of the PLC executed as another program by a higher-level control device or a plurality of PLCs, and a majority voting circuit for taking a majority vote between the data to be stored in the first output buffer memory and the data to be stored in the second output buffer memory and outputting the majority data to the control target via the I/O device, and the processor rewrites the data in the main memory of the higher-level control device or PLC which is the majority by majority vote with the data in the main memory of the higher-level control device or PLC which is the minority by majority vote.
本発明の一態様により、PLCシステムで異常が発生しても運転を継続することができる。 One aspect of the present invention allows the PLC system to continue operation even if an abnormality occurs.
[第1の開示]
図1は、本開示のPLC(プログラマブルロジックコントローラ)システム100の概略図である。PLCシステム100は、上位制御装置であるPC12と、PC12とデイジーチェーンで接続された複数(本開示では、5個)のPLC14(PLC141~145)と、複数のPLC14の各々に接続されたI/O機器16とを備える。またI/O機器16には、各PLC14の制御対象18が接続されている。制御対象18は、工作機械や搬送機、ロボットなどの工場内の機械である。
[First Disclosure]
1 is a schematic diagram of a PLC (Programmable Logic Controller) system 100 according to the present disclosure. The PLC system 100 includes a
PC12とPLC14は、例えばEtherCAT(登録商標)システムによって接続されている。通信方式はEtherCATに限定されず、シリアル通信、PLC間データリンクなどでもよい。また、接続方式はデイジーチェーンでなくともよい。
EtherCATを含むEthernetの通信では、フレームを送受信する。フレームの先頭には、送信先のアドレス情報が記載されている。フレームを受信したPLC14は、自アドレスのフレームを入力し、自アドレス以外のフレームを後段のPLC14に転送する。また、PLC14からPC12にデータを送信する場合、PLC14は、後段から送られてきたPC12宛のフレームを前段に接続されたPC12又はPLC14に送信する。
The PC 12 and the
In Ethernet communications including EtherCAT, frames are sent and received. The beginning of a frame contains destination address information. When a
図2は、PC12の概略構成図、図3は、PLC14の概略構成図である。図2に示すPC12は、CPU等のプロセッサ20と、メインメモリ(記憶部)22と、通信部24とを備える。図3に示すPLC14は、CPU等のプロセッサ30とメインメモリ(記憶部)32と、通信部34とを備える。
PLC14の通信部34は、デイジーチェーンで他のPLC14及びPC12の通信部34、24と接続されている(図1参照)。PLC14のメインメモリ32は、複数のPLC14の各々で実行(処理)される複数のプログラムn(プログラム1~プログラム5)を記憶している。このプログラムnは、PLC14nの制御対象18を制御するためのプログラムである。添え字は、PLC14とプログラムの対応関係を表現する。例えば、PLC141の制御プログラムはプログラム1であり、PLC142の制御プログラムは制御プログラム2であり、PLC143の制御プログラムはプログラム3である。以下、PLC14が自己の制御対象18を制御するためのプログラムを自己プログラムと呼ぶ。また、自己に割り当てられた他のPLC14の制御プログラムを他プログラムと呼ぶ。
Fig. 2 is a schematic diagram of the
The
5つのプログラム1~5は、図4に示すように、PC12、PLC14に分散して割り当てられる。このとき、1つのプログラムが必ず3つの情報処理装置(PC12又はPLC14)で実行されるようにプログラムを割り当てる。なお、割り当てる数は3つ以上でもよい。ここでは、3つの情報処理装置(PC12又はPLC14)に制御プログラムを割り当てる例を説明する。
As shown in FIG. 4, the five programs 1 to 5 are distributed and assigned to the
図4では、PC12に「プログラム1」と「プログラム3」、PLC141に「プログラム1」と「プログラム3」、PLC142に「プログラム2」と「プログラム4」と「プログラム5」、PLC143に「プログラム3」と「プログラム1」、PLC144に「プログラム4」と「プログラム2」と「プログラム5」、PLC145に「プログラム5」と「プログラム2」と「プログラム4」が割り当てられている。
In FIG. 4, “Program 1” and “Program 3” are assigned to PC 12, “Program 1” and “Program 3” to PLC 14-1 , “Program 2”, “
PLC141の自己プログラムであるプログラム1は、「PLC141」と「PLC142」と「PLC143」の3つの情報処理装置に割り当てられている。PLC142の自己プログラムであるプログラム2は、「PLC142」と「PLC144」と「PLC145」に割り当てられている。PLC143の自己プログラムであるプログラム3は、「PC12」と「PLC141」と「PLC143」に割り当てられている。PLC144の自己プログラムであるプログラム4は、「PLC142」と「PLC144」と「PLC145」に割り当てられている。PLC145の自己プログラムであるプログラム5は、「PLC142」と「PLC144」と「PLC145」に割り当てられている。このように、各制御プログラムは3つの情報処理装置(PC12又はPLC14)に割り当てられる。
Program 1, which is the own program of PLC 141 , is assigned to three information processing devices, "PLC 141 ", "PLC 142 ", and "PLC 143 ". Program 2, which is the own program of PLC 142 , is assigned to "PLC 142 ", "PLC 144 ", and "PLC 145 ". Program 3 , which is the own program of
制御プログラムの割り当ては以下のようにして行う。
制御プログラムの割り当てでは、最初に、各PLC14に自己プログラムをロードする。そして、各PLC14でプログラムを実行し、制御プログラムの負荷情報を算出する。PLC14は、負荷情報をPC12に出力する。PC12は、PLC14からの負荷情報を全て取得する。PC12は、1実行周期におけるPC12のプロセッサの最大負荷Lpmax、1実行周期内におけるPLC14の最大負荷Lmaxを超えず、かつ、負荷率が例えば90%を超えないように制御プログラムを割り当てる。負荷率とは、PLC14にかかる負荷を最大負荷Lmaxで除算した値である。例えば、プログラム1の負荷をL1とすると、プログラム1の実行によってかかる負荷の負荷率は、L1/Lmaxである。
The control programs are assigned as follows.
In the allocation of the control programs, first, the own program is loaded into each
PC12及びPLC14は、割り当てられた制御プログラムを1実行周期ごとに並行して同時に実行する。1実行周期とは、制御プログラムの実行を開始して次の実行を開始するまでの期間である。PC12及びPLC14は、1実行周期ごとに割り当てられた制御プログラムを繰り返し実行する。本開示では、図5に示すように、PLC141は「プログラム1」と「プログラム3」を繰り返し実行する。PLC142は「プログラム2」と「プログラム4」とプログラム5」を繰り返し実行する。PLC143は「プログラム3」と「プログラム1」を繰り返し実行する。PLC144は「プログラム4」と「プログラム2」と「プログラム5」を繰り返し実行する。PLC145は「プログラム5」と「プログラム2」と「プログラム4」を繰り返し実行する。PC12は「プログラム1」と「プログラム3」を繰り返し実行する。1実行周期が終了し次の実行周期が開始する前の期間は、入出力データの更新を行う。入出力データの更新については、図7を参照して後段で説明する。
The
次に、図6を参照して、PLC14のハードウェア構成について説明する。PLC14の通信部34は、プロセッサ30と通信を行うためのシステムバスI/F40、第1入力用バッファメモリ42、第2入力用バッファメモリ44、第1出力用バッファメモリ46、第2出力用バッファメモリ48、第3出力用バッファメモリ50、PLCに接続されたI/O機器16と通信を行うためのMAC52、PC12及び自己以外の他のPLC14と通信を行うためのMAC54、多数決回路56を備える。
Next, the hardware configuration of the
なお、PC12は、以下に説明するPLC14の機能をエミュレートする。PC12のメインメモリ22はPLC14の他プログラムを記憶している。PC12は、PLC14から第2入力データを受信しメインメモリ22に記憶する。PC12は、PLC14の実行周期に合わせて他プログラムを実行し、第3出力データを作成する。PC12は、第3出力データを対応するPLC14に出力する。PLC14は、第3出力データを第2出力用バッファメモリ48に記憶する。すなわち、PC12は、他プログラムの実行と、他のPLC14のデータ更新を行う。PC12は、第1入力用バッファメモリ42、第1出力用バッファメモリ46、多数決回路56に対応する機能は備えない。
The
通信部34のシステムバスI/F40とプロセッサ30とはシステムバス60によって接続されている。MAC52は、例えばMII(メディア・インデペンデント・インターフェース)62を介してPHYチップ64と接続されている。PHYチップ64は、I/O機器16を介して制御対象に接続されている。
MAC54は、MII66を介してPHYチップ68、70に接続されている。PHYチップ68は前段のPLC14又はPC12に接続されている。PHYチップ70は、後段のPLC14に接続されている。前段のPLC14又はPC12から受信したフレームは、MAC54に入力される。MAC54は、入力したフレームが自己宛てのフレームか否かを判定し、自己宛てのフレームでない場合には、後段のPLC14に転送する。自己宛てのフレームの場合には、フレームに含まれる入力データを読み出す。
また、MAC54は、第3出力用バッファメモリ50に記憶する他プログラムの実行結果を、対応する他のPLC14に出力する。他のPLC14は、受信した第3出力データを第2出力データとして第2出力用バッファメモリ48に記憶する。
MAC54は、第1入力用バッファメモリ42に記憶する制御対象からの入力データを、対応する他のPLC14に出力する。他のPLC14は、受信した入力データを用いてPLC14の制御プログラムを他プログラムとして実行する。
The system bus I/
The
Further, the
The
MAC52、54は、データリンク層の通信処理を行う。PHYチップ64、68、70は、物理層の通信処理を行う。PLC14は、PHYチップ64及びMAC52、I/O機器16を介して、制御対象と通信を行う。PLC14は、MAC54及びPHYチップ68を介して前段のPLC14又はPC12と通信を行う。PLC14は、MAC54及びPHYチップ70を介して後段のPLC14と通信を行う。
The
第1入力用バッファメモリ42は、PLC14の制御対象からのデータを記憶する。第1入力用バッファメモリ42に記憶した第1入力データは、システムバスI/F40を介してメインメモリ32に記憶される。
The first
第2入力用バッファメモリ44は、他のPLC14から受信した第2入力データを記憶する。第2入力用バッファメモリ44の数は、各PLC14に割り当てられた他プログラムと同数又はそれ以上設けられる。図4の例では、PLC141に割り当てられた他プログラム(プログラム3)は1つであるため、第2入力用バッファメモリの数44は1つである。PLC142に割り当てられた他プログラム(プログラム4及びプログラム5)は2つであるため、第2入力用バッファメモリ44の数は2つになる。PLC143に割り当てられた他プログラム(プログラム1)の数は1つであるため、第2入力用バッファメモリ44の数は1つになる。PLC144に割り当てられた他プログラム(プログラム2及びプログラム5)の数は2つであるため、第2入力用バッファメモリ44の数は2つになる。PLC145に割り当てられた他プログラム(プログラム2及びプログラム4)の数は2つであるため、第2入力用バッファメモリ44の数は2つになる。ただし、一つのメモリデバイスが、複数のバッファ用メモリの役割の担う形となってもよい。
第2入力用バッファメモリ44に記憶した第2入力データは、システムバスI/F40を介してメインメモリ32に記憶される。
The second
The second input data stored in the second
プロセッサ30は、メインメモリ32に記憶された自己プログラムと他プログラムとを実行する。自己プログラムとは、上述したように、PLC14が自己の制御対象を制御するための制御プログラムである。自己プログラムを実行する際、プロセッサ30は、メインメモリ32から第1入力データを読み出し、自己プログラムを実行する。第1入力データの実行結果は、システムバスI/F40を介して第1出力用バッファメモリ46に記憶される。
他プログラムとは、上述したように、PLC14に割り当てられた他のPLC14の制御プログラムである。図4の例では、PLC141の他プログラムは、PLC143の自己プログラム(プログラム3)である。
PLC14は、実行周期を開始する前に他のPLC14からの第2入力データを更新している。プロセッサ30は、他のPLC143から取得した第2入力データをメインメモリ32から読み出し、他プログラムを実行する。
The
As described above, the other program is a control program of another
Before starting the execution cycle, the
プロセッサ30は、他プログラムの実行結果である第3出力データを、第3出力用バッファメモリ50に記憶する。第3出力用バッファメモリ50は、PLC14が実行する他プログラムの数だけ設けられる。第3出力用バッファメモリ50に記憶した第3出力データは、MAC54でフレーム化され、他のPLC14へ出力される。
The
他のPLC14又はPC12から出力された第3出力データは、第2出力用バッファメモリ48に記憶される。第2出力用バッファメモリ48は、PLC14の制御プログラムを他プログラムとして実行する情報処理装置(PC12又は他のPLC14)の個数だけ設けられる。図4の例では、2つの情報処理装置(PC12とPLC143)がPLC141の制御プログラム(プログラム1)を実行するので、PLC141には、PC12用とPLC143用の2つの第2出力用バッファメモリ48が設けられる。2つの情報処理装置(PLC144及びPLC145)がPLC142の制御プログラム(プログラム2)を実行するので、PLC142にはPLC144用とPLC145用の2つPLC142の第2出力用バッファメモリ48が設けられる。
The third output data output from the
1実行周期が完了し、次の実行周期が開始するまでの間に、入出力データの更新を行う。入出力データの更新では、第1入力用バッファメモリ42、第2入力用バッファメモリ44、第1出力用バッファメモリ46、第2出力用バッファメモリ48、第3出力用バッファメモリ50の入出力データが更新される。
The input/output data is updated between the completion of one execution cycle and the start of the next execution cycle. When updating the input/output data, the input/output data in the first
図7は、PLC14とPC12、他のPLC14との間の入出力データの更新処理を示している。データの更新は、1実行周期の完了から次の実行周期の開始までの間に行う。1実行周期が完了すると、自己プログラムの実行結果である第1出力データ、及び他プログラムの実行結果である第3出力データが生成されメインメモリ32に記憶される。PLC14は、第1出力データで第1出力用バッファメモリ46を更新する内部処理を行う。PC12は、第3出力データで第3出力用バッファメモリ50を更新する内部処理を行う。
時刻T1において、PLC14は、I/O機器16と通信を行い。制御対象18から入力データを取得する。時刻T2において、PLC14は、第1入力データで第1入力用バッファメモリ42を更新する。第1入力データの値はシステムバスI/F40を介してメインメモリ32に記憶される。
時刻T3において、PLC14は、他のPLC14及びPC12と通信を行う。この通信において、PLC14は、他のPLC14及びPC12に、第3出力用バッファメモリ50に記憶した他プログラムの実行結果と、第1入力用バッファメモリ42に記憶した制御対象18からの入力データをPC12及び他のPLC14に出力する。同時に、PLC14は、他のPLC14の制御対象18からの入力データと、PC12及び他のPLC14の第3出力データを入力する。
時刻T4において、PLC14は、他のPLC14の制御対象からの入力データで、第2入力用バッファメモリ44を更新し、他のPLC14及びPC12からの第3出力データで第2出力用バッファメモリ48を更新する。
7 shows an update process of input/output data between the
At time T1, the
At time T3, the
At
このように、入出力データを更新すると、PLC14は、次の実行周期に入り、プロセッサ30は、自己プログラムと他プログラムを実行する。
In this way, when the input/output data is updated, the
本開示のPLCシステム100では、PC12及び複数のPLC14が同じ制御プログラムを並行して同時に実行するロックステップ方式になっている。PLC14は、次の実行周期のための入力データと、手前の実行周期における制御プログラムの実行結果を記憶している。1つの制御プログラムは、PLC14と他のPLC14又はPC12の3箇所で実行する。制御プログラムの実行結果は、第1出力用バッファメモリ46、及び第2出力用バッファメモリ48に記憶される。
The PLC system 100 of the present disclosure uses a lock-step method in which the
多数決回路56は、第1出力用バッファメモリ46と第2出力用バッファメモリ48に記憶する実行結果の多数決を取る。多数決回路56は、複数のデータを入力し、入力したデータのなかで最も多いデータ(多数派のデータ)を出力する。全てのデータが同じであれば、そのデータを出力する。多数決回路56は、既知の論理回路であるため技術的な説明は省略する。
The
多数決回路56の出力は、MAC52、PHYチップ64、I/O機器16を介して制御対象18に出力される。制御対象18は、多数決回路56の内容に従い動作する。
多数決回路56が少数派を検出すると、プロセッサ30は、異常発生時のプログラムを起動し、少数派の実行結果を出力したバッファメモリ(第1出力用バッファメモリ46、又は第2出力用バッファメモリ48)を特定する。プロセッサ30は、バッファメモリ(第1出力用バッファメモリ46又は第2出力用バッファメモリ48)に対応するPC12又はPLC14を特定する。
第1出力用バッファメモリ46が少数派の場合、プロセッサ30は、他のPLC14やPC12から自己のPLC14で使用するメインメモリの内容(入力情報、中間処理情報、制御プログラム)を受信する。PLC14は、受信したメインメモリの内容の再書き込みを行う。
また、PC12の実行結果が少数派の場合、PLC14のメインメモリ32からPC12で使用するメインメモリの内容(入力情報、中間処理情報、制御プログラム)を読み出しPC12に転送する。PC12は受信したメインメモリの内容の再書き込みを行う。
他のPLC14の実行結果が少数派の場合、対応するPLC14で使用するメインメモリの内容(入力情報、中間処理情報、制御プログラム)を対応するPLC14に転送する。対応するPLC14は、受信したメインメモリの内容の再書き込みを行う。
異常がソフトエラーによるものであれば、メモリの再書き込みを行うことで異常は解消される。再書き込みは、PLC14の制御と別に動作するため、PLC14の制御を遅延させることなく、ソフトエラーを解消することができる。
The output of the
When the
When the first
Furthermore, if the execution results of the
When the execution results of the
If the abnormality is due to a soft error, the abnormality can be resolved by rewriting the memory. Since the rewriting is performed separately from the control of the
プロセッサ30は、その後、異常の発生回数をカウントする。ソフトエラーは、ハードウェアの物理的な損傷が伴わないため、メモリを再書き込みして再度同じ動作を行うとソフトエラーは解消し正常に動作する。ソフトエラーは、再現性がないことが多く、また連続性がないため、同じ出力用バッファメモリ(第1出力用バッファメモリ46又は第2出力用バッファメモリ48)が連続して複数回少数派になった場合には、ソフトエラー以外の異常が発生したとみなしてオペレータに警告を出力する。
ソフトエラー以外の異常としては、プロセッサ30やMAC52、54などのチップの故障や、通信経路の故障などハードウェアの故障がある。本開示のPLCシステムでは、ソフトエラー以外の異常の有無を検出しても、異常を解消したり、異常の発生原因を特定したりすることはできない。
The
Abnormalities other than soft errors include hardware failures such as failures of chips such as the
本開示のPLCシステム100では、3つのバッファメモリのいずれかにソフトエラーが発生しても、残りの2つのバッファメモリに問題がなければ、そのデータを利用してそのまま処理を継続することができる。 In the PLC system 100 disclosed herein, even if a soft error occurs in one of the three buffer memories, as long as there are no problems with the remaining two buffer memories, processing can continue as is using that data.
次いで、図8を参照して、本開示のPLCシステム100の動作を説明する。前処理として、PLCシステム100は、制御プログラムの割り当てを行う。制御プログラムの割り当ての演算は、PC12が行うが他の情報処理装置で行ってもよい。PLC14は各々の制御プログラムを実行する。そして、制御プログラムの負荷を算出する(ステップS1)。PC12は、制御プログラムがPLC14及びPC12の最大負荷Lmax及びLpmaxを超えない範囲で、負荷率が超えないようにPC12及びPLC14に制御プログラムを割り当てる。このとき、各制御プログラムを3つの情報処理装置(PC12及びPLC14)に割り当てる(ステップS2)。
Next, the operation of the PLC system 100 of the present disclosure will be described with reference to FIG. 8. As preprocessing, the PLC system 100 assigns control programs. The calculation of the control program assignment is performed by the
PLCシステム100は、PC12及びPLC14の入出力データを更新する。最初の更新では、プログラムを実行していないので、自身の制御対象からの入力データで第1入力用バッファメモリ42を更新し、他のPLC14の制御対象からの入力データで第2入力用バッファメモリ44を更新する。
2回目以降の更新では、制御プログラムの実行結果も更新する。プロセッサ30は、第1入力データと第2入力データをメインメモリ32に記憶し、自己プログラムと他プログラムとを実行する。そして、自己プログラムの実行結果で第1出力用バッファメモリ46を更新し、他プログラムの実行結果で第3出力用バッファメモリ50を更新する。
その後、第3出力データを他のPLC14に出力するとともに、PC12及び他のPLC14からの第3出力データを受信し、第2出力用バッファメモリ48を更新する(ステップS3)。
The PLC system 100 updates the input/output data of the
In the second and subsequent updates, the execution result of the control program is also updated. The
Thereafter, the third output data is output to the
このとき多数決回路56は、第1出力用バッファメモリ46に記憶する第1出力データと、第2出力用バッファメモリ48に記憶する第2出力データの多数決をとる(ステップS4)。多数決回路56は、多数派のデータを制御対象18に出力する(ステップS5)。制御対象18は、多数派のデータに従って動作する。
入出力データを更新すると、プロセッサ30は、一実行周期で自己プログラム及び他プログラムを実行する(ステップS6)。
At this time, the
After updating the input/output data, the
ステップS4の制御プログラムの実行は、PLC14のプロセッサ30で行う処理であり、多数派データの出力は、通信部34の多数決回路56で行う処理であるため、並行して行うことができる。
The execution of the control program in step S4 is a process performed by the
多数派データを出力することにより問題なく運転を継続できる場合には(ステップS7;Yes)、ステップS2に移行し、入出力データの更新を行う。オペレータの指示により運転を停止したり、ソフトエラー以外の問題が発生したり、作業が完了した場合には(ステップS7;No)、PLCシステム100の運転を終了する。 If operation can be continued without problems by outputting the majority data (step S7; Yes), proceed to step S2 and update the input/output data. If operation is stopped at the operator's instruction, a problem other than a soft error occurs, or the work is completed (step S7; No), the operation of the PLC system 100 is terminated.
図9を参照して少数派が発生した場合の処理について説明する。ステップS4の多数決の結果、少数派が存在した場合、プロセッサ30は異常発生時のプログラムを起動する。異常発生時の処理において、プロセッサ30は、少数派を記憶しているバッファメモリを基に、異常が疑われるPC12又はPLC14を特定する(ステップS11)。
少数派のPC12又はPLC14は、ソフトエラーの発生が疑われるため、プロセッサ30は、多数派のPC12又はPLC14からメモリの内容(入力情報、中間処理情報、制御プログラムなど)を読み出し。少数派のPC12又はPLC14のメモリにコピーする(ステップS12)。
また、プロセッサ30は、多数決の結果をカウントしており、同じバッファメモリが連続して少数派の場合には(ステップS13;Yes)、ソフトエラー以外の異常が発生した可能性があるため、オペレータに警告を発する(ステップS14)。前回と異なるバッファメモリが少数派となる場合には(ステップS13;No)、ソフトエラーは解消したと考えられる。
The process when a minority occurs will be described with reference to Fig. 9. If a minority exists as a result of the majority decision in step S4, the
Since the
The
なお、図9に示す少数派が発生した場合の処理と図8に示す制御プログラムを実行する処理のタスクやコアを別にしてもよい。このような構成にすることで、2つの処理が並列して実行できるようになり、制御プログラムの実行に遅延が発生しない。 The processing when a minority occurs as shown in FIG. 9 and the processing for executing the control program as shown in FIG. 8 may be performed using different tasks or cores. With such a configuration, the two processes can be executed in parallel, and no delay occurs in the execution of the control program.
以上説明したように、本開示のPLCシステム100は、複数のPLC14を含み、3つ以上の情報処理装置(PC12又はPLC14)に各PLC14の制御プログラムを分配する。そして、PLC14の1実行周期に合わせて、3つ以上の情報処理装置(PC12又はPLC14)における制御プログラムの実行結果をバッファメモリ(第1出力用バッファメモリ46及び第2出力用バッファメモリ48)に記憶し、多数決回路56を用いて実行結果の多数決を取る。
このとき多数派の値を制御対象に出力することにより、3つ以上の情報処理装置(PC12又はPLC14)のいずれかにおいてソフトエラーが発生しても、ソフトエラーの影響を受けない実行結果を選択することができる。ソフトエラーは、メモリの再書き込みにより解消される。同じバッファメモリ(第1出力用バッファメモリ46又は第2出力用バッファメモリ48)が連続して複数回少数派となる場合には、ソフトエラー以外の異常が発生したことが分かる。
As described above, the PLC system 100 of the present disclosure includes a plurality of
In this case, by outputting the majority value to the controlled object, even if a soft error occurs in any of the three or more information processing devices (
PLCシステム100は、同じ制御プログラムを同じ実行周期で繰り返し実行するので、制御プログラムを複数の情報処理装置(PC12又はPLC14)に多重化して割り当てるだけで、同期的に動作する多重システムを構築することができる。制御プログラムを多重化して実行することにより、1つの情報処理装置(PC12又はPLC14)で異常が発生してもシステムの運転を継続することができる。
Since the PLC system 100 repeatedly executes the same control program at the same execution cycle, a multiplexed system that operates synchronously can be constructed simply by multiplexing and assigning the control program to multiple information processing devices (
なお、本開示では、3つの情報処理装置(PC12又はPLC14)に制御プログラムを割り当てるとしたが、4つ以上の情報処理装置に制御プログラムを割り当ててもよい。4つ以上の情報処理装置に制御プログラムを割り当てると、1つの情報処理装置がメモリの再書き込みにより停止した状態であっても、多数決を取ることができる。すなわち、4つ以上の情報処理装置に制御プログラムを割り当てると、1つの情報処理装置が異常な状態であっても、3つ以上継続して動作するので多数決を取ることができる。
また、可動中の情報処理装置が2台になり、多数決が取れなくなった場合には、ECCなどの異常検出技術を用いて正常なメモリの選択するようにしてもよい。このとき、異常検出の方法を、多数決からECCなどに変更したことをオペレータに通知してもよい。オペレータは、通知を参考にPLCシステム100を運転継続するか否かを判断してもよい。
In the present disclosure, the control program is assigned to three information processing devices (
Furthermore, when the number of operational information processing devices becomes two and a majority vote cannot be obtained, a normal memory may be selected using an abnormality detection technique such as ECC. At this time, an operator may be notified that the abnormality detection method has been changed from the majority vote to ECC or the like. The operator may refer to the notification to determine whether or not to continue operating the PLC system 100.
100 PLCシステム
12 PC
14 PLC
16 I/O機器
18 制御対象
20 プロセッサ
22 メインメモリ
24 通信部
30 プロセッサ
32 メインメモリ
34 通信部
42 第1入力用バッファメモリ
44 第2入力用バッファメモリ
46 第1出力用バッファメモリ
48 第2出力用バッファメモリ
50 第3出力用バッファメモリ
56 多数決回路
100
14 PLC
16 I/
Claims (8)
前記上位制御装置は、
それぞれの前記PLCに対して、該PLC自身に接続された前記制御対象を制御する制御プログラムを自己プログラムとして割り当てるとともに、1実行周期内に前記PLCシステムの3箇所又はそれ以上でそれぞれの前記制御プログラムが並行に実行されるように、前記PLCシステムに含まれる他のPLCの制御プログラムを他プログラムとして前記上位制御装置及び前記複数のPLCに割り当て、
前記PLCは、
プロセッサと、
メインメモリと、
通信部と、を備え、
前記通信部は、
自己の制御対象から送信された入力データを記憶する第1入力用バッファメモリと、
前記第1入力用バッファメモリに記憶する第1入力データに対する前記自己プログラムの実行結果である第1出力データを記憶する第1出力用バッファメモリと、
前記上位制御装置又は前記複数のPLCから受信した当該PLCの制御プログラムの実行結果を第2出力データとして記憶する少なくとも2つの第2出力用バッファメモリと、
前記第1出力用バッファメモリに記憶するデータと前記第2出力用バッファメモリに記憶するデータの多数決を取り、多数派のデータを前記I/O機器を介して前記制御対象に出力する多数決回路と、
を備え、
前記PLCのプロセッサは、
前記多数決により少数派となるデータが存在する場合、前記多数決により多数派となった前記上位制御装置又は前記PLCのメインメモリのデータを、前記多数決により少数派となった前記上位制御装置又は前記PLCのメインメモリに再書き込みする、PLCシステム。 A PLC system including a plurality of PLCs connected to control targets via I/O devices, and a host control device that manages the plurality of PLCs,
The upper control device includes:
a control program for controlling the control target connected to each of the PLCs is assigned as a self program to each of the PLCs, and control programs of other PLCs included in the PLC system are assigned as other programs to the upper control device and the plurality of PLCs so that each of the control programs is executed in parallel at three or more locations in the PLC system within one execution period;
The PLC comprises:
A processor;
A main memory;
A communication unit,
The communication unit is
a first input buffer memory for storing input data transmitted from a control target of the first input buffer memory;
a first output buffer memory for storing first output data which is a result of executing the self program on first input data stored in the first input buffer memory;
at least two second output buffer memories for storing execution results of the control programs of the PLCs received from the higher-level control device or the plurality of PLCs as second output data;
a majority decision circuit that takes a majority decision between the data to be stored in the first output buffer memory and the data to be stored in the second output buffer memory, and outputs the majority data to the control target via the I/O device;
Equipped with
The processor of the PLC
When there is data that becomes the minority due to the majority vote, the PLC system rewrites the data in the main memory of the higher-level control device or the PLC that becomes the majority due to the majority vote into the main memory of the higher-level control device or the PLC that becomes the minority due to the majority vote.
前記メインメモリに記憶する他プログラムの制御対象からの入力データである第2入力データを記憶する第2入力用バッファメモリと、
前記第2入力データを用いて前記他プログラムを実行した実行結果である第3出力データを記憶する第3出力用データ記憶部と、
を備え、
前記第3出力用データ記憶部に記憶する第3出力データを対応するPLCに出力する、請求項1記載のPLCシステム。 The communication unit is
a second input buffer memory for storing second input data which is input data from a control target of another program stored in the main memory;
a third output data storage unit configured to store third output data that is an execution result of executing the other program using the second input data;
Equipped with
2. The PLC system according to claim 1, wherein the third output data stored in the third output data storage section is output to a corresponding PLC.
前記多数決により同じ上位制御装置又はPLCが少数派となる回数をカウントし、同じ上位制御装置又はPLCが連続して少数派となる場合、前記PLCのオペレータに異常を警告する、請求項1記載のPLCシステム。 The processor of the PLC
2. The PLC system according to claim 1, wherein the number of times the same upper level control device or PLC becomes the minority by the majority vote is counted, and if the same upper level control device or PLC becomes the minority consecutively, an operator of the PLC is warned of an abnormality.
前記PLCのプロセッサは、前記メインメモリの異常の有無を検知し、
前記通信部は、自己のPLCのメインメモリが正常であれば、異常が検知されたPLCに正常なデータを出力する、請求項1記載のPLCシステム。 While rewriting the main memory of the PLC that is in the minority by the majority vote,
The processor of the PLC detects the presence or absence of an abnormality in the main memory,
2. The PLC system according to claim 1, wherein the communication unit outputs normal data to the PLC in which an abnormality has been detected if the main memory of the PLC itself is normal.
プロセッサと、
メインメモリと、
通信部と、を備え、
前記メインメモリは、前記PLCが前記制御対象を制御する制御プログラムである自己プログラムと、前記PLCシステムに含まれる他のPLCの制御プログラムである他プログラムとを記憶し、それぞれの制御プログラムは1実行周期内に前記PLCシステムの3箇所以上で並行に実行されるように割り当てられており、
前記通信部は、
自己の制御対象から送信された入力データを記憶する第1入力用バッファメモリと、
前記第1入力用バッファメモリに記憶する第1入力データに対する前記自己プログラムの実行結果である第1出力データを記憶する第1出力用バッファメモリと、
前記上位制御装置又は前記複数のPLCが他プログラムとして実行した当該PLCの制御プログラムの実行結果を第2出力データとして記憶する少なくとも2つの第2出力用バッファメモリと、
前記第1出力用バッファメモリに記憶するデータと前記第2出力用バッファメモリに記憶するデータの多数決を取り、多数派のデータを前記I/O機器を介して前記制御対象に出力する多数決回路と、
を備え、
前記プロセッサは、前記多数決により多数派となった前記上位制御装置又は前記PLCのメインメモリのデータを、前記多数決により少数派となった前記上位制御装置又は前記PLCのメインメモリに再書き込みする、PLC。 A PLC included in a PLC system including a plurality of PLCs connected to control targets via I/O devices and a host control device that manages the plurality of PLCs,
A processor;
A main memory;
A communication unit,
the main memory stores a self program, which is a control program by which the PLC controls the control target, and other programs, which are control programs of other PLCs included in the PLC system, and each control program is assigned to be executed in parallel at three or more locations of the PLC system within one execution period;
The communication unit is
a first input buffer memory for storing input data transmitted from a control target of the first input buffer memory;
a first output buffer memory for storing first output data which is a result of executing the self program on first input data stored in the first input buffer memory;
at least two second output buffer memories for storing, as second output data, execution results of the control programs of the PLCs executed by the higher-level control device or the plurality of PLCs as other programs;
a majority decision circuit that takes a majority decision between the data to be stored in the first output buffer memory and the data to be stored in the second output buffer memory, and outputs the majority data to the control target via the I/O device;
Equipped with
The processor rewrites data in the main memory of the higher-level control device or the PLC that has become the majority by the majority vote to the main memory of the higher-level control device or the PLC that has become the minority by the majority vote.
前記メインメモリに記憶する他プログラムの制御対象からの入力データである第2入力データを記憶する第2入力用バッファメモリと、
前記第2入力データを用いて前記他プログラムを実行した実行結果である第3出力データを記憶する第3出力用データ記憶部と、
を備え、
前記第3出力用データ記憶部に記憶する第3出力データを対応するPLCに出力する、請求項5記載のPLC。 The communication unit is
a second input buffer memory for storing second input data which is input data from a control target of another program stored in the main memory;
a third output data storage unit configured to store third output data that is an execution result of executing the other program using the second input data;
Equipped with
6. The PLC according to claim 5, wherein the third output data stored in the third output data storage section is output to a corresponding PLC.
前記PLCのプロセッサは、前記メインメモリの異常の有無を検知し、
前記通信部は、自己のPLCのメインメモリが正常であれば、異常が検知されたPLCに正常なデータを出力する、請求項5記載のPLC。 While rewriting the main memory of the PLC that is in the minority by the majority vote,
The processor of the PLC detects the presence or absence of an abnormality in the main memory,
6. The PLC according to claim 5, wherein the communication unit outputs normal data to the PLC in which an abnormality has been detected if the main memory of the PLC itself is normal.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2020207478A JP7538021B2 (en) | 2020-12-15 | 2020-12-15 | PLC and PLC systems |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2020207478A JP7538021B2 (en) | 2020-12-15 | 2020-12-15 | PLC and PLC systems |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2022094533A JP2022094533A (en) | 2022-06-27 |
| JP7538021B2 true JP7538021B2 (en) | 2024-08-21 |
Family
ID=82162441
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2020207478A Active JP7538021B2 (en) | 2020-12-15 | 2020-12-15 | PLC and PLC systems |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP7538021B2 (en) |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH09114507A (en) * | 1995-10-19 | 1997-05-02 | Toyo Electric Mfg Co Ltd | Redundant device for programmable logic controller |
-
2020
- 2020-12-15 JP JP2020207478A patent/JP7538021B2/en active Active
Also Published As
| Publication number | Publication date |
|---|---|
| JP2022094533A (en) | 2022-06-27 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7328370B2 (en) | Safety controller with simplified interface | |
| US11022962B2 (en) | High availability industrial automation system having primary and secondary industrial automation controllers and method of communicating information over the same | |
| CN101393430A (en) | Method and apparatus for upgrading and providing control redundancy in process plants | |
| US10901399B2 (en) | High availability industrial automation controller and method of operating the same | |
| US20190056970A1 (en) | Method for computer-aided coupling a processing module into a modular technical system and modular technical system | |
| US8335573B2 (en) | Safety-oriented control system | |
| JP2013235300A (en) | Safety signal processing system | |
| US20160291565A1 (en) | Automation system | |
| EP2012217B1 (en) | Multi-component system | |
| US20230236551A1 (en) | Method of controlling an automation system having control redundancy, and automation system | |
| JP7538021B2 (en) | PLC and PLC systems | |
| US7792594B2 (en) | Redundant automation system comprising a master and a standby automation device | |
| CN102576221B (en) | Method for providing safety functions | |
| JPH09330106A (en) | Control system with backup function | |
| US10606232B2 (en) | Controller system and control method | |
| US5140593A (en) | Method of checking test program in duplex processing apparatus | |
| US20220214954A1 (en) | Electronic device for use in an automation system, and an automation system | |
| JP4232589B2 (en) | Duplex controller and its equalization mode decision method | |
| JPH0895614A (en) | Control device | |
| JP2001306348A (en) | Redundant information processing system | |
| JP3884643B2 (en) | Process control device | |
| JP2000040039A (en) | Daisy chain failure avoidance system | |
| JP2003140704A (en) | Process controller | |
| JP5227653B2 (en) | Multiplexed computer system and processing method thereof | |
| JP4117685B2 (en) | Fault-tolerant computer and its bus selection control method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20230809 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20240327 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20240402 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20240529 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20240716 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20240808 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7538021 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |