[go: up one dir, main page]

JP7538021B2 - PLC and PLC systems - Google Patents

PLC and PLC systems Download PDF

Info

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
Application number
JP2020207478A
Other languages
Japanese (ja)
Other versions
JP2022094533A (en
Inventor
健一郎 栗原
基好 宮地
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.)
Fanuc Corp
Original Assignee
Fanuc Corp
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 Fanuc Corp filed Critical Fanuc Corp
Priority to JP2020207478A priority Critical patent/JP7538021B2/en
Publication of JP2022094533A publication Critical patent/JP2022094533A/en
Application granted granted Critical
Publication of JP7538021B2 publication Critical patent/JP7538021B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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.

特許第6356736号公報Patent No. 6356736

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.

PLCシステムの概略図である。FIG. 1 is a schematic diagram of a PLC system. PCの概略構成図である。FIG. 2 is a schematic diagram of a PC. PLCの概略構成図である。FIG. 2 is a schematic diagram of a PLC. PLCシステムへの制御プログラムの割り当て例を示す図である。FIG. 1 is a diagram illustrating an example of allocation of control programs to a PLC system. PC及びPLCにおける1実行周期ごとの動作を説明する図である。1 is a diagram illustrating operations in a PC and a PLC for each execution cycle. PLCのハードウェア構成を示す図である。FIG. 2 is a diagram illustrating a hardware configuration of a PLC. PLCシステムにおける入出力データの更新処理を説明する図である。FIG. 1 is a diagram illustrating an update process of input/output data in a PLC system. PLCシステムの動作を説明するフローチャートである。4 is a flowchart illustrating an operation of the PLC system. 多数決において少数派が発生した場合の処理を説明するフローチャートである。11 is a flowchart illustrating a process when a minority party occurs in a majority vote.

[第1の開示]
図1は、本開示のPLC(プログラマブルロジックコントローラ)システム100の概略図である。PLCシステム100は、上位制御装置であるPC12と、PC12とデイジーチェーンで接続された複数(本開示では、5個)のPLC14(PLC14~14)と、複数の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 PC 12, which is a host control device, a plurality of PLCs 14 (5 in the present disclosure, PLCs 14 1 to 14 5 ) connected to the PC 12 in a daisy chain, and I/O devices 16 connected to each of the plurality of PLCs 14. In addition, a control target 18 of each PLC 14 is connected to the I/O devices 16. The control target 18 is a machine in a factory, such as a machine tool, a conveyor, or a robot.

PC12とPLC14は、例えばEtherCAT(登録商標)システムによって接続されている。通信方式はEtherCATに限定されず、シリアル通信、PLC間データリンクなどでもよい。また、接続方式はデイジーチェーンでなくともよい。
EtherCATを含むEthernetの通信では、フレームを送受信する。フレームの先頭には、送信先のアドレス情報が記載されている。フレームを受信したPLC14は、自アドレスのフレームを入力し、自アドレス以外のフレームを後段のPLC14に転送する。また、PLC14からPC12にデータを送信する場合、PLC14は、後段から送られてきたPC12宛のフレームを前段に接続されたPC12又はPLC14に送信する。
The PC 12 and the PLC 14 are connected by, for example, an EtherCAT (registered trademark) system. The communication method is not limited to EtherCAT, and may be serial communication, a data link between PLCs, or the like. The connection method does not have to be a daisy chain.
In Ethernet communications including EtherCAT, frames are sent and received. The beginning of a frame contains destination address information. When a PLC 14 receives a frame, it inputs the frame addressed to itself and transfers frames addressed to other addresses to a subsequent PLC 14. When transmitting data from the PLC 14 to the PC 12, the PLC 14 transmits the frame addressed to the PC 12 sent from the subsequent stage to the PC 12 or the PLC 14 connected in the previous stage.

図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は、PLC14の制御対象18を制御するためのプログラムである。添え字は、PLC14とプログラムの対応関係を表現する。例えば、PLC14の制御プログラムはプログラム1であり、PLC14の制御プログラムは制御プログラム2であり、PLC14の制御プログラムはプログラム3である。以下、PLC14が自己の制御対象18を制御するためのプログラムを自己プログラムと呼ぶ。また、自己に割り当てられた他のPLC14の制御プログラムを他プログラムと呼ぶ。
Fig. 2 is a schematic diagram of the PC 12, and Fig. 3 is a schematic diagram of the PLC 14. The PC 12 shown in Fig. 2 includes a processor 20 such as a CPU, a main memory (storage unit) 22, and a communication unit 24. The PLC 14 shown in Fig. 3 includes a processor 30 such as a CPU, a main memory (storage unit) 32, and a communication unit 34.
The communication unit 34 of the PLC 14 is connected to the other PLCs 14 and the communication units 34, 24 of the PC 12 in a daisy chain (see FIG. 1). The main memory 32 of the PLC 14 stores a plurality of programs n (programs 1 to 5) that are executed (processed) by each of the plurality of PLCs 14. This program n is a program for controlling the control object 18 of the PLC 14 n . The subscripts express the correspondence between the PLCs 14 and the programs. For example, the control program of PLC 14 1 is program 1, the control program of PLC 14 2 is control program 2, and the control program of PLC 14 3 is program 3. Hereinafter, a program for a PLC 14 to control its own control object 18 is referred to as its own program. Also, the control program of another PLC 14 assigned to itself is referred to as another program.

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 PC 12 and the PLC 14. At this time, the programs are assigned so that one program is always executed by three information processing devices (PC 12 or PLC 14). Note that the number of programs assigned may be three or more. Here, an example is described in which control programs are assigned to three information processing devices (PC 12 or PLC 14).

図4では、PC12に「プログラム1」と「プログラム3」、PLC14に「プログラム1」と「プログラム3」、PLC14に「プログラム2」と「プログラム4」と「プログラム5」、PLC14に「プログラム3」と「プログラム1」、PLC14に「プログラム4」と「プログラム2」と「プログラム5」、PLC14に「プログラム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”, “Program 4”, and “Program 5” to PLC 14-2 , “Program 3” and “Program 1” to PLC 14-3, “Program 4”, “Program 2”, and “Program 5” to PLC 14-4 , and “Program 5”, “Program 2”, and “Program 4” to PLC 14-5 .

PLC14の自己プログラムであるプログラム1は、「PLC14」と「PLC14」と「PLC14」の3つの情報処理装置に割り当てられている。PLC14の自己プログラムであるプログラム2は、「PLC14」と「PLC14」と「PLC14」に割り当てられている。PLC14の自己プログラムであるプログラム3は、「PC12」と「PLC14」と「PLC14」に割り当てられている。PLC14の自己プログラムであるプログラム4は、「PLC14」と「PLC14」と「PLC14」に割り当てられている。PLC14の自己プログラムであるプログラム5は、「PLC14」と「PLC14」と「PLC14」に割り当てられている。このように、各制御プログラムは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 PLC 143, is assigned to "PC12", "PLC 141 ", and "PLC 143 ". Program 4 , which is the own program of PLC 144, is assigned to "PLC 142 ", "PLC 144 ", and "PLC 145 ". Program 5, which is the own program of PLC 145 , is assigned to "PLC 142 ", "PLC 144 ", and "PLC 145 ". In this manner, each control program is assigned to one of the three information processing devices (PC 12 or PLC 14).

制御プログラムの割り当ては以下のようにして行う。
制御プログラムの割り当てでは、最初に、各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 PLC 14. Then, each PLC 14 executes the program and calculates the load information of the control program. The PLC 14 outputs the load information to the PC 12. The PC 12 acquires all the load information from the PLC 14. The PC 12 allocates the control programs so that the maximum load Lpmax of the processor of the PC 12 in one execution cycle and the maximum load Lmax of the PLC 14 in one execution cycle are not exceeded, and the load factor does not exceed, for example, 90%. The load factor is a value obtained by dividing the load on the PLC 14 by the maximum load Lmax. For example, if the load of program 1 is L1, the load factor of the load caused by the execution of program 1 is L1/Lmax.

PC12及びPLC14は、割り当てられた制御プログラムを1実行周期ごとに並行して同時に実行する。1実行周期とは、制御プログラムの実行を開始して次の実行を開始するまでの期間である。PC12及びPLC14は、1実行周期ごとに割り当てられた制御プログラムを繰り返し実行する。本開示では、図5に示すように、PLC14は「プログラム1」と「プログラム3」を繰り返し実行する。PLC14は「プログラム2」と「プログラム4」とプログラム5」を繰り返し実行する。PLC14は「プログラム3」と「プログラム1」を繰り返し実行する。PLC14は「プログラム4」と「プログラム2」と「プログラム5」を繰り返し実行する。PLC14は「プログラム5」と「プログラム2」と「プログラム4」を繰り返し実行する。PC12は「プログラム1」と「プログラム3」を繰り返し実行する。1実行周期が終了し次の実行周期が開始する前の期間は、入出力データの更新を行う。入出力データの更新については、図7を参照して後段で説明する。 The PC 12 and the PLC 14 execute the assigned control programs in parallel at the same time for each execution cycle. One execution cycle is a period from when the execution of a control program starts until the next execution starts. The PC 12 and the PLC 14 repeatedly execute the assigned control programs for each execution cycle. In the present disclosure, as shown in FIG. 5, the PLC 14 1 repeatedly executes "Program 1" and "Program 3". The PLC 14 2 repeatedly executes "Program 2", "Program 4", and "Program 5". The PLC 14 3 repeatedly executes "Program 3" and "Program 1". The PLC 14 4 repeatedly executes "Program 4", "Program 2", and "Program 5". The PLC 14 5 repeatedly executes "Program 5", "Program 2", and "Program 4". The PC 12 repeatedly executes "Program 1" and "Program 3". During the period between the end of one execution cycle and the start of the next execution cycle, input/output data is updated. The update of input/output data will be described later with reference to FIG. 7.

次に、図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 PLC 14 will be described with reference to FIG. 6. The communication unit 34 of the PLC 14 includes a system bus I/F 40 for communicating with the processor 30, a first input buffer memory 42, a second input buffer memory 44, a first output buffer memory 46, a second output buffer memory 48, a third output buffer memory 50, a MAC 52 for communicating with the I/O device 16 connected to the PLC, a MAC 54 for communicating with the PC 12 and other PLCs 14 other than the PLC 14 itself, and a majority circuit 56.

なお、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 PC 12 emulates the functions of the PLC 14 described below. The main memory 22 of the PC 12 stores other programs of the PLC 14. The PC 12 receives second input data from the PLC 14 and stores it in the main memory 22. The PC 12 executes the other programs in accordance with the execution period of the PLC 14 and creates third output data. The PC 12 outputs the third output data to the corresponding PLC 14. The PLC 14 stores the third output data in the second output buffer memory 48. That is, the PC 12 executes the other programs and updates the data of the other PLC 14. The PC 12 does not have functions corresponding to the first input buffer memory 42, the first output buffer memory 46, and the majority circuit 56.

通信部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/F 40 of the communication unit 34 and the processor 30 are connected by a system bus 60. The MAC 52 is connected to a PHY chip 64 via, for example, an MII (Media Independent Interface) 62. The PHY chip 64 is connected to a control target via an I/O device 16.
The MAC 54 is connected to PHY chips 68, 70 via the MII 66. The PHY chip 68 is connected to the PLC 14 or PC 12 in the previous stage. The PHY chip 70 is connected to the PLC 14 in the subsequent stage. A frame received from the PLC 14 or PC 12 in the previous stage is input to the MAC 54. The MAC 54 determines whether the input frame is addressed to itself or not, and if it is not, it transfers it to the PLC 14 in the subsequent stage. If it is, the input data included in the frame is read out.
Further, the MAC 54 outputs the execution results of the other programs stored in the third output buffer memory 50 to the corresponding other PLC 14. The other PLC 14 stores the received third output data in the second output buffer memory 48 as second output data.
The MAC 54 outputs the input data from the control target stored in the first input buffer memory 42 to the corresponding other PLC 14. The other PLC 14 executes the control program of the PLC 14 as another program using the received input data.

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 MACs 52 and 54 perform communication processing at the data link layer. The PHY chips 64, 68 and 70 perform communication processing at the physical layer. The PLC 14 communicates with the control target via the PHY chip 64, the MAC 52 and the I/O device 16. The PLC 14 communicates with the previous PLC 14 or the PC 12 via the MAC 54 and the PHY chip 68. The PLC 14 communicates with the next PLC 14 via the MAC 54 and the PHY chip 70.

第1入力用バッファメモリ42は、PLC14の制御対象からのデータを記憶する。第1入力用バッファメモリ42に記憶した第1入力データは、システムバスI/F40を介してメインメモリ32に記憶される。 The first input buffer memory 42 stores data from the control object of the PLC 14. The first input data stored in the first input buffer memory 42 is stored in the main memory 32 via the system bus I/F 40.

第2入力用バッファメモリ44は、他のPLC14から受信した第2入力データを記憶する。第2入力用バッファメモリ44の数は、各PLC14に割り当てられた他プログラムと同数又はそれ以上設けられる。図4の例では、PLC14に割り当てられた他プログラム(プログラム3)は1つであるため、第2入力用バッファメモリの数44は1つである。PLC14に割り当てられた他プログラム(プログラム4及びプログラム5)は2つであるため、第2入力用バッファメモリ44の数は2つになる。PLC14に割り当てられた他プログラム(プログラム1)の数は1つであるため、第2入力用バッファメモリ44の数は1つになる。PLC14に割り当てられた他プログラム(プログラム2及びプログラム5)の数は2つであるため、第2入力用バッファメモリ44の数は2つになる。PLC14に割り当てられた他プログラム(プログラム2及びプログラム4)の数は2つであるため、第2入力用バッファメモリ44の数は2つになる。ただし、一つのメモリデバイスが、複数のバッファ用メモリの役割の担う形となってもよい。
第2入力用バッファメモリ44に記憶した第2入力データは、システムバスI/F40を介してメインメモリ32に記憶される。
The second input buffer memory 44 stores the second input data received from the other PLC 14. The number of the second input buffer memories 44 is equal to or greater than the number of other programs assigned to each PLC 14. In the example of FIG. 4, the number of the second input buffer memories 44 is one because the number of other programs (program 3) assigned to the PLC 14-1 is one. The number of the other programs (program 4 and program 5) assigned to the PLC 14-2 is two, so the number of the second input buffer memories 44 is two. The number of the other programs (program 1) assigned to the PLC 14-3 is one, so the number of the second input buffer memories 44 is one. The number of the other programs (program 2 and program 5) assigned to the PLC 14-4 is two, so the number of the second input buffer memories 44 is two. The number of the other programs (program 2 and program 4) assigned to the PLC 14-5 is two, so the number of the second input buffer memories 44 is two. However, one memory device may serve as a plurality of buffer memories.
The second input data stored in the second input buffer memory 44 is stored in the main memory 32 via the system bus I/F 40 .

プロセッサ30は、メインメモリ32に記憶された自己プログラムと他プログラムとを実行する。自己プログラムとは、上述したように、PLC14が自己の制御対象を制御するための制御プログラムである。自己プログラムを実行する際、プロセッサ30は、メインメモリ32から第1入力データを読み出し、自己プログラムを実行する。第1入力データの実行結果は、システムバスI/F40を介して第1出力用バッファメモリ46に記憶される。
他プログラムとは、上述したように、PLC14に割り当てられた他のPLC14の制御プログラムである。図4の例では、PLC14の他プログラムは、PLC14の自己プログラム(プログラム3)である。
PLC14は、実行周期を開始する前に他のPLC14からの第2入力データを更新している。プロセッサ30は、他のPLC14から取得した第2入力データをメインメモリ32から読み出し、他プログラムを実行する。
The processor 30 executes its own program and other programs stored in the main memory 32. As described above, the own program is a control program for the PLC 14 to control its own control target. When executing the own program, the processor 30 reads first input data from the main memory 32 and executes the own program. The execution result of the first input data is stored in the first output buffer memory 46 via the system bus I/F 40.
As described above, the other program is a control program of another PLC 14 that is assigned to the PLC 14. In the example of Fig. 4, the other program of PLC 14-1 is the own program (program 3) of PLC 14-3 .
Before starting the execution cycle, the PLC 14 updates the second input data from the other PLC 14. The processor 30 reads the second input data acquired from the other PLC 14 from the main memory 32 and executes the other program.

プロセッサ30は、他プログラムの実行結果である第3出力データを、第3出力用バッファメモリ50に記憶する。第3出力用バッファメモリ50は、PLC14が実行する他プログラムの数だけ設けられる。第3出力用バッファメモリ50に記憶した第3出力データは、MAC54でフレーム化され、他のPLC14へ出力される。 The processor 30 stores the third output data, which is the result of executing the other program, in the third output buffer memory 50. The third output buffer memory 50 is provided for each other program executed by the PLC 14. The third output data stored in the third output buffer memory 50 is framed by the MAC 54 and output to the other PLC 14.

他のPLC14又はPC12から出力された第3出力データは、第2出力用バッファメモリ48に記憶される。第2出力用バッファメモリ48は、PLC14の制御プログラムを他プログラムとして実行する情報処理装置(PC12又は他のPLC14)の個数だけ設けられる。図4の例では、2つの情報処理装置(PC12とPLC14)がPLC14の制御プログラム(プログラム1)を実行するので、PLC14には、PC12用とPLC14用の2つの第2出力用バッファメモリ48が設けられる。2つの情報処理装置(PLC14及びPLC14)がPLC14の制御プログラム(プログラム2)を実行するので、PLC14にはPLC14用とPLC14用の2つPLC14の第2出力用バッファメモリ48が設けられる。 The third output data output from the other PLC 14 or the PC 12 is stored in the second output buffer memory 48. The number of second output buffer memories 48 provided is equal to the number of information processing devices (PC 12 or other PLCs 14) that execute the control program of the PLC 14 as another program. In the example of Fig. 4, two information processing devices (PC 12 and PLC 143 ) execute the control program (program 1) of the PLC 141 , so two second output buffer memories 48 for the PC 12 and the PLC 143 are provided in the PLC 141. Two information processing devices (PLC 144 and PLC 145 ) execute the control program (program 2) of the PLC 142 , so two second output buffer memories 48 for the PLC 144 and the PLC 145 are provided in the PLC 142 .

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 input buffer memory 42, the second input buffer memory 44, the first output buffer memory 46, the second output buffer memory 48, and the third output buffer memory 50 is updated.

図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 PLC 14 and the PC 12, and between the PLC 14 and the other PLC 14. Data is updated between the completion of one execution cycle and the start of the next execution cycle. When one execution cycle is completed, first output data which is the execution result of the own program and third output data which is the execution result of the other program are generated and stored in the main memory 32. The PLC 14 performs an internal process to update the first output buffer memory 46 with the first output data. The PC 12 performs an internal process to update the third output buffer memory 50 with the third output data.
At time T1, the PLC 14 communicates with the I/O device 16 and acquires input data from the control target 18. At time T2, the PLC 14 updates the first input buffer memory 42 with the first input data. The value of the first input data is stored in the main memory 32 via the system bus I/F 40.
At time T3, the PLC 14 communicates with the other PLCs 14 and the PC 12. In this communication, the PLC 14 outputs to the other PLCs 14 and the PC 12 the execution results of the other programs stored in the third output buffer memory 50 and the input data from the control object 18 stored in the first input buffer memory 42 to the PC 12 and the other PLCs 14. At the same time, the PLC 14 inputs the input data from the control object 18 of the other PLC 14 and the third output data of the PC 12 and the other PLC 14.
At time T 4 , the PLC 14 updates the second input buffer memory 44 with input data from the controlled object of the other PLC 14 , and updates the second output buffer memory 48 with third output data from the other PLC 14 and the PC 12 .

このように、入出力データを更新すると、PLC14は、次の実行周期に入り、プロセッサ30は、自己プログラムと他プログラムを実行する。 In this way, when the input/output data is updated, the PLC 14 enters the next execution cycle, and the processor 30 executes its own program and other programs.

本開示の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 PC 12 and multiple PLCs 14 simultaneously execute the same control program in parallel. The PLC 14 stores input data for the next execution cycle and the execution results of the control program in the previous execution cycle. One control program is executed in three locations: the PLC 14 and another PLC 14 or the PC 12. The execution results of the control program are stored in the first output buffer memory 46 and the second output buffer memory 48.

多数決回路56は、第1出力用バッファメモリ46と第2出力用バッファメモリ48に記憶する実行結果の多数決を取る。多数決回路56は、複数のデータを入力し、入力したデータのなかで最も多いデータ(多数派のデータ)を出力する。全てのデータが同じであれば、そのデータを出力する。多数決回路56は、既知の論理回路であるため技術的な説明は省略する。 The majority circuit 56 takes a majority vote on the execution results stored in the first output buffer memory 46 and the second output buffer memory 48. The majority circuit 56 inputs multiple pieces of data and outputs the most prevalent data (majority data) among the input data. If all data are the same, that data is output. The majority circuit 56 is a known logic circuit, so a technical explanation will be omitted.

多数決回路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 majority circuit 56 is output to the control target 18 via the MAC 52, the PHY chip 64, and the I/O device 16. The control target 18 operates according to the contents of the majority circuit 56.
When the majority circuit 56 detects the minority, the processor 30 starts the program for when the abnormality occurs and identifies the buffer memory (the first output buffer memory 46 or the second output buffer memory 48) that outputs the execution result of the minority. The processor 30 identifies the PC 12 or the PLC 14 corresponding to the buffer memory (the first output buffer memory 46 or the second output buffer memory 48).
When the first output buffer memory 46 is in the minority, the processor 30 receives the contents of the main memory used in its own PLC 14 (input information, intermediate processing information, control programs) from another PLC 14 or the PC 12. The PLC 14 rewrites the received contents of the main memory.
Furthermore, if the execution results of the PC 12 are in the minority, the contents of the main memory used by the PC 12 (input information, intermediate processing information, control programs) are read from the main memory 32 of the PLC 14 and transferred to the PC 12. The PC 12 rewrites the received contents of the main memory.
When the execution results of the other PLC 14 are in the minority, the contents of the main memory used by the corresponding PLC 14 (input information, intermediate processing information, control program) are transferred to the corresponding PLC 14. The corresponding PLC 14 rewrites the received contents of the main memory.
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 PLC 14, the soft error can be resolved without delaying the control of the PLC 14.

プロセッサ30は、その後、異常の発生回数をカウントする。ソフトエラーは、ハードウェアの物理的な損傷が伴わないため、メモリを再書き込みして再度同じ動作を行うとソフトエラーは解消し正常に動作する。ソフトエラーは、再現性がないことが多く、また連続性がないため、同じ出力用バッファメモリ(第1出力用バッファメモリ46又は第2出力用バッファメモリ48)が連続して複数回少数派になった場合には、ソフトエラー以外の異常が発生したとみなしてオペレータに警告を出力する。
ソフトエラー以外の異常としては、プロセッサ30やMAC52、54などのチップの故障や、通信経路の故障などハードウェアの故障がある。本開示のPLCシステムでは、ソフトエラー以外の異常の有無を検出しても、異常を解消したり、異常の発生原因を特定したりすることはできない。
The processor 30 then counts the number of times the abnormality has occurred. Since soft errors do not cause physical damage to the hardware, rewriting the memory and performing the same operation again will resolve the soft error and allow normal operation. Since soft errors are often not reproducible and are not continuous, if the same output buffer memory (the first output buffer memory 46 or the second output buffer memory 48) becomes the minority several times in succession, it is assumed that an abnormality other than a soft error has occurred and a warning is output to the operator.
Abnormalities other than soft errors include hardware failures such as failures of chips such as the processor 30 and the MACs 52 and 54, and failures of communication paths. In the PLC system disclosed herein, even if the presence or absence of an abnormality other than a soft error is detected, it is not possible to eliminate the abnormality or identify the cause of the abnormality.

本開示の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 PC 12, but may be performed by another information processing device. The PLC 14 executes each control program. Then, the load of the control program is calculated (step S1). The PC 12 assigns the control programs to the PC 12 and the PLC 14 so that the load rate is not exceeded within a range in which the control programs do not exceed the maximum loads Lmax and Lpmax of the PLC 14 and the PC 12. At this time, each control program is assigned to three information processing devices (PC 12 and PLC 14) (step S2).

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 PC 12 and the PLC 14. In the first update, since no program is being executed, the first input buffer memory 42 is updated with input data from the control target of the PC 12 and the second input buffer memory 44 is updated with input data from the control target of the other PLC 14.
In the second and subsequent updates, the execution result of the control program is also updated. The processor 30 stores the first input data and the second input data in the main memory 32, and executes its own program and the other program. Then, the processor 30 updates the first output buffer memory 46 with the execution result of its own program, and updates the third output buffer memory 50 with the execution result of the other program.
Thereafter, the third output data is output to the other PLC 14, and the third output data is received from the PC 12 and the other PLC 14, and the second output buffer memory 48 is updated (step S3).

このとき多数決回路56は、第1出力用バッファメモリ46に記憶する第1出力データと、第2出力用バッファメモリ48に記憶する第2出力データの多数決をとる(ステップS4)。多数決回路56は、多数派のデータを制御対象18に出力する(ステップS5)。制御対象18は、多数派のデータに従って動作する。
入出力データを更新すると、プロセッサ30は、一実行周期で自己プログラム及び他プログラムを実行する(ステップS6)。
At this time, the majority decision circuit 56 makes a majority decision between the first output data stored in the first output buffer memory 46 and the second output data stored in the second output buffer memory 48 (step S4). The majority decision circuit 56 outputs the majority data to the control target 18 (step S5). The control target 18 operates according to the majority data.
After updating the input/output data, the processor 30 executes its own program and other programs in one execution cycle (step S6).

ステップS4の制御プログラムの実行は、PLC14のプロセッサ30で行う処理であり、多数派データの出力は、通信部34の多数決回路56で行う処理であるため、並行して行うことができる。 The execution of the control program in step S4 is a process performed by the processor 30 of the PLC 14, and the output of the majority data is a process performed by the majority circuit 56 of the communication unit 34, so they can be performed in parallel.

多数派データを出力することにより問題なく運転を継続できる場合には(ステップ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 processor 30 starts a program for when an abnormality occurs. In the process when an abnormality occurs, the processor 30 identifies the PC 12 or PLC 14 suspected of having an abnormality based on the buffer memory that stores the minority (step S11).
Since the minority PC 12 or PLC 14 is suspected of having a soft error, the processor 30 reads the memory contents (input information, intermediate processing information, control programs, etc.) from the majority PC 12 or PLC 14 and copies them to the memory of the minority PC 12 or PLC 14 (step S12).
The processor 30 also counts the results of the majority vote, and if the same buffer memory is in the minority consecutively (step S13; Yes), an abnormality other than a soft error may have occurred, so a warning is issued to the operator (step S14).If a buffer memory different from the previous time becomes the minority (step S13; No), the soft error is considered to have been resolved.

なお、図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 PLCs 14, and distributes a control program of each PLC 14 to three or more information processing devices (PCs 12 or PLCs 14). Then, in accordance with one execution cycle of the PLC 14, the execution results of the control programs in the three or more information processing devices (PCs 12 or PLCs 14) are stored in buffer memories (first output buffer memory 46 and second output buffer memory 48), and a majority vote of the execution results is taken using the majority circuit 56.
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 (PC 12 or PLC 14), it is possible to select an execution result that is not affected by the soft error. The soft error is eliminated by rewriting the memory. If the same buffer memory (first output buffer memory 46 or second output buffer memory 48) becomes the minority multiple times in succession, it is found that an abnormality other than a soft error has occurred.

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 (PC 12 or PLC 14). By multiplexing and executing the control program, the system can continue to operate even if an abnormality occurs in one information processing device (PC 12 or PLC 14).

なお、本開示では、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 (PC 12 or PLC 14), but the control program may be assigned to four or more information processing devices. When the control program is assigned to four or more information processing devices, a majority vote can be taken even if one information processing device is stopped due to memory rewriting. In other words, when the control program is assigned to four or more information processing devices, a majority vote can be taken because three or more continue to operate even if one information processing device is in an abnormal state.
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 PLC system 12 PC
14 PLC
16 I/O device 18 Control target 20 Processor 22 Main memory 24 Communication unit 30 Processor 32 Main memory 34 Communication unit 42 First input buffer memory 44 Second input buffer memory 46 First output buffer memory 48 Second output buffer memory 50 Third output buffer memory 56 Majority circuit

Claims (8)

I/O機器を介して制御対象に接続される複数のPLCと、前記複数のPLCを管理する上位制御装置とを備えるPLCシステムであって、
前記上位制御装置は、
それぞれの前記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が連続して少数派となる場合、前記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のメインメモリが正常であれば、異常が検知された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.
I/O機器を介して制御対象に接続される複数のPLCと、前記複数のPLCを管理する上位制御装置とを備えるPLCシステムに含まれるPLCであって、
プロセッサと、
メインメモリと、
通信部と、を備え、
前記メインメモリは、前記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が連続して少数派となる場合、前記PLCのオペレータに異常を警告する、請求項5記載のPLC。 The PLC of claim 5, wherein the processor of the PLC counts the number of times the same control device or PLC becomes the minority by the majority vote, and warns the operator of the PLC of an abnormality if the same upper-level control device or PLC is consecutively in the minority. 前記多数決により少数派となった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.
JP2020207478A 2020-12-15 2020-12-15 PLC and PLC systems Active JP7538021B2 (en)

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)

* Cited by examiner, † Cited by third party
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

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