JP2021152855A - Memory equivalent method for dual-series control system - Google Patents

Memory equivalent method for dual-series control system Download PDF

Info

Publication number
JP2021152855A
JP2021152855A JP2020150457A JP2020150457A JP2021152855A JP 2021152855 A JP2021152855 A JP 2021152855A JP 2020150457 A JP2020150457 A JP 2020150457A JP 2020150457 A JP2020150457 A JP 2020150457A JP 2021152855 A JP2021152855 A JP 2021152855A
Authority
JP
Japan
Prior art keywords
memory
equivalent
data
state change
calculation
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.)
Granted
Application number
JP2020150457A
Other languages
Japanese (ja)
Other versions
JP7468260B2 (en
Inventor
文彦 森
Fumihiko Mori
文彦 森
秀郎 ▲高▼崎
秀郎 ▲高▼崎
Hideo Takasaki
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.)
Meidensha Corp
Meidensha Electric Manufacturing Co Ltd
Original Assignee
Meidensha Corp
Meidensha Electric Manufacturing Co Ltd
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 Meidensha Corp, Meidensha Electric Manufacturing Co Ltd filed Critical Meidensha Corp
Publication of JP2021152855A publication Critical patent/JP2021152855A/en
Application granted granted Critical
Publication of JP7468260B2 publication Critical patent/JP7468260B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Programmable Controllers (AREA)

Abstract

To provide a PLC duplex system that can speed up equivalent processing by forming equivalent data in parallel with CPU memory access and omitting memory reading when forming transmission data.SOLUTION: A master PLC101 and a slave PLC102 of a PLC duplication system comprises: a CPU201 which executes an operation according to a sequence instruction; and a RAM 203 for calculation which stores calculation results of FPGA 202 and CPU 201 equipped with an equivalent circuit that executes memory equivalent processing. A program and calculation result data are stored in the RAM 203. The FPGA 202 is equipped with an equivalent circuit including an MUX204, an equivalent memory 205, a state change detection unit 206, a state change status register 207, a DMAC208, a TxBUF209, a DMAC210, a communication controller 211, an RxBuf212, and a DMAC213.SELECTED DRAWING: Figure 2

Description

本発明は、主系のメモリデータを等価データとして、従系のメモリに反映させる二重系制御システムのメモリ等価方式に関する。 The present invention relates to a memory equivalent method of a dual system control system in which the memory data of the main system is reflected in the memory of the slave system as equivalent data.

プログラマブルロジックコントローラ(programmable logic controller:以下、PLCとする。)は、シーケンス演算処理を主な動作とし、異常発生時の動作継続のため、二重化システムが構築されことが少なくない。 A programmable logic controller (hereinafter referred to as PLC) has a main operation of sequence calculation processing, and a redundant system is often constructed to continue the operation when an abnormality occurs.

図1に基づき概略を説明すれば、PLC二重化システムは、主系(制御系)となるマスターPLC101と、従系(待機系)となるスレーブPLC102とにより構成されている。 To explain the outline based on FIG. 1, the PLC duplication system is composed of a master PLC 101 as a main system (control system) and a slave PLC 102 as a slave system (standby system).

マスターPLC101およびスレーブPLC102は、それぞれシーケンス命令を実行するCPU103,110と、プログラムおよびデータを格納するメモリ104,109と、メモリにライトしたアドレス値およびデータ値を保持する送信用/受信用FIFO105,108と、互いの通信を実行する通信コントローラ106,107とを備えている。 The master PLC 101 and the slave PLC 102 are the CPUs 103 and 110 that execute sequence instructions, the memories 104 and 109 that store programs and data, and the transmission / reception FIFA 105 and 108 that hold the address values and data values written in the memories. And communication controllers 106 and 107 that execute communication with each other.

そして、正常時にはマスターPLC101の演算結果に基づき接続機器が制御される一方、異常時には主系を高速でスレーブPLC102に切り替える。このときマスターPLC101の演算結果、即ちメモリ104の内容をスレーブPLC102のメモリ109に反映させる等価処理を行うことにより、制御機器の入出力情報をスレーブPLC102に展開する。 Then, in the normal state, the connected device is controlled based on the calculation result of the master PLC 101, and in the abnormal state, the main system is switched to the slave PLC 102 at high speed. At this time, the input / output information of the control device is expanded to the slave PLC 102 by performing the equivalent process of reflecting the calculation result of the master PLC 101, that is, the contents of the memory 104 in the memory 109 of the slave PLC 102.

特開平8−180030号公報Japanese Unexamined Patent Publication No. 8-180030 特開2019−117482号公報Japanese Unexamined Patent Publication No. 2019-117482

前述のようにPLCを二重化する場合にはメモリ104,109の内容を等価にする必要がある。この点について特許文献1では、メモリ104にライトしたアドレス値とデータ値とをデータ更新の有無に関係なく、等価処理を行っている。 When the PLC is duplicated as described above, it is necessary to make the contents of the memories 104 and 109 equivalent. Regarding this point, in Patent Document 1, equivalent processing is performed on the address value and the data value written in the memory 104 regardless of whether or not the data is updated.

しかしながら、更新されていないデータを送信する必要はなく、通信量に無駄を生じるおそれがあった。そこで、特許文献2では、更新されたアドレスデータおよび更新データを送受信時にバッファリングする方式を採用しているものの、
CPU103のメモリライトの都度バッファの内容が更新されるため、バッファのオーバフローが生じ、却って等価処理が遅延するおそれがある。
However, it is not necessary to transmit unupdated data, which may result in waste of communication volume. Therefore, although Patent Document 2 employs a method of buffering updated address data and updated data at the time of transmission / reception,
Since the contents of the buffer are updated each time the memory write of the CPU 103 is performed, the buffer overflows, and the equivalent processing may be delayed.

本発明は、このような従来の問題を解決するためになされ、主系演算部のメモリアクセスに並行して従系に送信する等価データを作成し、送信時のメモリ読込を省略することで等価処理の高速化を図っている。 The present invention has been made to solve such a conventional problem, and is equivalent by creating equivalent data to be transmitted to a slave system in parallel with memory access of a main system arithmetic unit and omitting memory reading at the time of transmission. We are trying to speed up the processing.

(1)本発明は、主系と従系の制御装置を備え、
前記主系の演算結果を等価データとして、前記従系に反映させる二重系制御システムのメモリ等価方式であって、
前記主系および前記従系は、
前記演算結果を格納する演算用メモリと、
前記等価データを格納する等価用メモリと、
を備えることを特徴としている。
(1) The present invention includes a main system and a slave system control device.
It is a memory equivalent method of a dual system control system that reflects the calculation result of the main system as equivalent data in the slave system.
The main system and the slave system
An arithmetic memory for storing the arithmetic results and
Equivalent memory for storing the equivalent data and
It is characterized by having.

(2)前記主系の一態様は、前記演算用メモリへの前記演算結果の格納と同時進行で前記等価用メモリに前記等価データを格納する。 (2) In one aspect of the main system, the equivalent data is stored in the equivalent memory at the same time as the storage of the calculation result in the calculation memory.

(3)前記主系の他の態様は、前記等価データと前記等価用メモリの格納データとを比較し、前記両データの不一致を状変として検出する状変検出部を備え、
前記状変があったメモリブロックの情報を前記従系に送信する一方、
前記従系は、前記送信データに含まれるメモリブロックの情報に基づき前記等価用メモリの記憶データを更新する。
(3) Another aspect of the main system includes a state change detection unit that compares the equivalent data with the stored data of the equivalent memory and detects a discrepancy between the two data as a state change.
While transmitting the information of the memory block in which the state has changed to the slave system,
The slave system updates the storage data of the equivalent memory based on the information of the memory block included in the transmission data.

(4)本発明の一態様として、前記等価用メモリを含む等価回路をすべて集積回路に実装している。 (4) As one aspect of the present invention, all the equivalent circuits including the equivalent memory are mounted on the integrated circuit.

(5)本発明の他の態様として、前記等価用メモリは前記等価回路が実装された集積回路の外部に高速メモリとして実装されている。 (5) As another aspect of the present invention, the equivalent memory is mounted as a high-speed memory outside the integrated circuit in which the equivalent circuit is mounted.

(6)前記従系の一態様は、前記演算用メモリと前記等価用メモリの選択を切替可能となっている。 (6) In one aspect of the slave system, the selection of the calculation memory and the equivalent memory can be switched.

(7)前記切替の他の態様は、演算部の演算実行・不実行に応じて制御されている。 (7) The other mode of the switching is controlled according to the calculation execution / non-execution of the calculation unit.

(8)本発明のさらに他の態様として、前記主系は、前記等価データを作成する際に集積回路の広帯域バスを介して、少なくとも前記演算用メモリからのデータ転送可能な等価データ生成部を備える
(9)前記等価データ生成部の一態様として、前記等価データ生成部は、前記等価データと前記等価用メモリの格納データとを比較し、前記両データの不一致を状変として検出して第1の状変ステータスにセットする状変検出部と、
前記メモリ状変ステータスから前記状変のあったメモリブロックの情報を取得して前記等価メモリに格納し、該格納されるメモリブロックの情報に応じた第2の状変ステータスをセットして通信部に転送するデータ転送部と、を備え、
前記データ転送部は、前記広域バスを介して前記演算用メモリから前記状変のデータを読込、前記広域バスを介して前記等価用メモリにデータを記述する。
(8) As still another aspect of the present invention, the main system provides an equivalent data generation unit capable of transferring at least data from the arithmetic memory via the broadband bus of the integrated circuit when creating the equivalent data. (9) As one aspect of the equivalent data generation unit, the equivalent data generation unit compares the equivalent data with the stored data of the equivalent memory, detects a discrepancy between the two data as a state change, and detects the discrepancy between the two data as a state change. The state change detection unit that sets the state change status of 1 and
The information of the memory block having the state change is acquired from the memory state change status and stored in the equivalent memory, and the second state change status corresponding to the information of the stored memory block is set and the communication unit. Equipped with a data transfer unit to transfer to
The data transfer unit reads the state-altered data from the arithmetic memory via the wide area bus, and describes the data in the equivalent memory via the wide area bus.

本発明によれば、主系演算部のメモリアクセスに並行して従系に送信する等価用データが作成されるため、送信時のメモリ読込を省略でき、この点で等価処理の高速化が可能となる。 According to the present invention, since the equivalent data to be transmitted to the slave system is created in parallel with the memory access of the main system arithmetic unit, it is possible to omit the memory reading at the time of transmission, and in this respect, the equivalent processing can be speeded up. It becomes.

従来のPLC二重化システムを示す概略図。The schematic which shows the conventional PLC duplication system. 実施例1のPLCの構成図。The block diagram of PLC of Example 1. 同 状変検出部の動作を示すシーケンス図。The sequence diagram which shows the operation of the same state change detection part. (a)はメモリのブロック分割例を示す図、(b)状変ステータスレジスタの設定を示す図。(A) is a diagram showing an example of dividing a memory block, and (b) is a diagram showing a setting of a state change status register. 実施例2のPLCの構成図。The block diagram of PLC of Example 2. 同 制御動作を示すシーケンス図。A sequence diagram showing the same control operation. 実施例3のマスターPLCおよびスレーブPLCの概略図。The schematic diagram of the master PLC and the slave PLC of Example 3. 図7中の等価データ生成部の構成図。The block diagram of the equivalent data generation part in FIG. 実施例3の動作を示すシーケンス図。The sequence diagram which shows the operation of Example 3. FIG.

以下、本発明の実施形態に係る二重系制御システムのメモリ等価方式を説明する。ここではPLC二重化システムに前記メモリ等価方式が適用されている。 Hereinafter, the memory equivalent method of the dual system control system according to the embodiment of the present invention will be described. Here, the memory equivalent method is applied to the PLC duplication system.

図2〜図4に基づき実施例1のPLC二重化システムを説明する。このPLC二重化システムは、従来と同様に主系(制御系)となるマスターPLC101と、従系(待機系)となるスレーブPLC102とにより構成されている。 The PLC duplication system of the first embodiment will be described with reference to FIGS. 2 to 4. This PLC duplication system is composed of a master PLC 101 as a main system (control system) and a slave PLC 102 as a slave system (standby system) as in the conventional case.

各PLC101,102は、図2に示すように、シーケンス命令に従って演算を実行するCPU201と、メモリ等価処理を実行する等価回路を実装したFPGA(field-programmable gate array:集積回路)202と、CPU201の演算時にアクセスされる演算用のRAM(Random Access Memory:以下、演算用メモリとする。)203と、を備えている。この演算用メモリ203には、プログラムと演算結果のデータが格納され、CPU201の作業用として用いられる。 As shown in FIG. 2, each of the PLCs 101 and 102 includes a CPU 201 that executes an operation according to a sequence instruction, an FPGA (field-programmable gate array) 202 that implements an equivalent circuit that executes a memory equivalent process, and a CPU 201. It includes a RAM for calculation (Random Access Memory: hereinafter referred to as a memory for calculation) 203 that is accessed at the time of calculation. The calculation memory 203 stores the data of the program and the calculation result, and is used for the work of the CPU 201.

FPGA202には、MUX(以下、マルチプレクサとする。)204,等価用RAM(以下、等価用メモリとする。)205,状変検出部206,状変ステータスレジスタ207,DMAC208,TxBUF(以下、送信バッファとする。)209,DMAC210,通信コントローラ211,RxBuf(以下、受信バッファとする。)212,DMAC213を含む等価回路が実装されている。 The FPGA 202 includes a MUX (hereinafter referred to as a multiplexer) 204, an equivalent RAM (hereinafter referred to as an equivalent memory) 205, a state change detection unit 206, a state change status register 207, a DMAC208, and a TxBUF (hereinafter referred to as a transmission buffer). An equivalent circuit including 209, DMAC210, communication controller 211, RxBuf (hereinafter referred to as a reception buffer) 212, and DMAC213 is implemented.

具体的にはマルチプレクサ204は、送信時と受信時のアドレスとデータを選択し、マスターPLC101であれば送信時に「A」が選択される一方、スレーブPLC102であれば受信時に「B」が選択される。 Specifically, the multiplexer 204 selects the address and data at the time of transmission and reception, and if it is the master PLC 101, "A" is selected at the time of transmission, while if it is the slave PLC 102, "B" is selected at the time of reception. NS.

マスターPLC101のCPU201が演算用メモリ203にライトアクセスした際にはマルチプレクサ204により「A」が選択され、等価用メモリ205に演算用メモリ203と同じ内容がライトされる。また、状変検出部206は、CPU201が演算用メモリ203にデータをライトした際、前回値からのデータ更新(以下、「状変」と省略する。)を検出する。 When the CPU 201 of the master PLC 101 writes access to the arithmetic memory 203, the multiplexer 204 selects “A”, and the equivalent memory 205 is written with the same contents as the arithmetic memory 203. Further, when the CPU 201 writes data to the calculation memory 203, the state change detection unit 206 detects a data update from the previous value (hereinafter, abbreviated as “state change”).

状変ステータスレジスタ207は、状変検出部206により検出された状変のあった演算用メモリ203のブロック番号を保持する。このときDMAC208は、状変ステータスレジスタ207の保持情報を参照して、等価用メモリ205から状変があったブロックを送信バッファ209に転送する。ここで転送された送信データを送信バッファ209が一時的に保持する。 The state change status register 207 holds the block number of the calculation memory 203 with the state change detected by the state change detection unit 206. At this time, the DMAC 208 refers to the holding information of the status register 207 and transfers the block having the status change from the equivalent memory 205 to the transmission buffer 209. The transmission buffer 209 temporarily holds the transmission data transferred here.

マスターPLC101であればDMAC210は、送信バッファ209の保持内容を通信コントローラ211に転送する。一方、スレーブPLC102であれば通信コントローラ211の受信したデータを受信バッファ212に転送する。 If it is the master PLC 101, the DMAC 210 transfers the contents held in the transmission buffer 209 to the communication controller 211. On the other hand, if it is the slave PLC 102, the data received by the communication controller 211 is transferred to the reception buffer 212.

マスターPLC101の通信コントローラ211は、転送された送信バッファ209の保持内容をスレーブPLC102に送信動作させる。一方、スレーブPLC102の通信コントローラ211は、マスターPLC101から送信されたデータを受信動作させる。 The communication controller 211 of the master PLC 101 transmits the transferred contents of the transmission buffer 209 to the slave PLC 102. On the other hand, the communication controller 211 of the slave PLC 102 receives and operates the data transmitted from the master PLC 101.

ここで受信されたマスターPLC101からのデータは受信バッファ212により一時的に保持される。このときマルチプレクサ204により「B」が選択され、スレーブPLC102のDMAC213が受信バッファ212の保持内容を等価用メモリ205に転送する。 The data received here from the master PLC 101 is temporarily held by the reception buffer 212. At this time, “B” is selected by the multiplexer 204, and the DMAC 213 of the slave PLC 102 transfers the contents held by the reception buffer 212 to the equivalent memory 205.

(1)マスターPLC101の送信動作
マスターPLC101は、次のプロセス(S01〜S06)で送信動作を行う。
(1) Transmission operation of the master PLC 101 The master PLC 101 performs a transmission operation in the following processes (S01 to S06).

S01〜S03:前述のようにCPU201が演算用メモリ203に演算データをライトするとき(S01)、マルチプレクサ204が送信時動作し、FPGA202内部の等価用メモリ205に同じデータをライトする(S02)。 S01 to S03: As described above, when the CPU 201 writes the arithmetic data to the arithmetic memory 203 (S01), the multiplexer 204 operates at the time of transmission and writes the same data to the equivalent memory 205 inside the FPGA 202 (S02).

すなわち、マルチプレクサ204と等価用メモリ205とを用いることにより、CPU201の演算用メモリ203へのライトデータの複製が等価データとして作成保存される。したがって、マスターPLC101がスレーブPLC102に等価データを送信する際に演算用メモリ203を読み込む必要がなく、等価処理を高速化することができる。 That is, by using the multiplexer 204 and the equivalent memory 205, the duplication of the write data in the arithmetic memory 203 of the CPU 201 is created and saved as the equivalent data. Therefore, it is not necessary for the master PLC 101 to read the arithmetic memory 203 when transmitting the equivalent data to the slave PLC 102, and the equivalent processing can be speeded up.

このとき等価用メモリ205へのアクセスがFPGA202上で行わることから、CPU201から演算用メモリ203へのアクセスと同時進行で等価データを作成でき、この点でも等価処理が高速化する。また、状変検出部206にて等価用メモリ205の状変の検出動作を実行し、状変があれば状変ステータスレジスタ207の該当ビットを「1」に設定する(S03)。 At this time, since the access to the equivalent memory 205 is performed on the FPGA 202, the equivalent data can be created at the same time as the access from the CPU 201 to the arithmetic memory 203, and the equivalent processing is speeded up in this respect as well. Further, the state change detection unit 206 executes the state change detection operation of the equivalent memory 205, and if there is a state change, the corresponding bit of the state change status register 207 is set to "1" (S03).

S04,S05:PLC101のラダープログラムの実行停止時(CPU201の演算不実行時)に状変検出部206が、状変ステータスレジスタ207のビットを「0」から「1」に変更したブロックを検出すれば、DMAC208を起動させる(S04)。 S04, S05: When the execution of the ladder program of the PLC 101 is stopped (when the operation of the CPU 201 is not executed), the state change detection unit 206 detects a block in which the bit of the state change status register 207 is changed from "0" to "1". For example, DMAC208 is activated (S04).

これにより等価用メモリ205から送信バッファ209にDMA転送される(S05)。ここで送信するデータ(以下、状変データとする。)は、状変があったブロックに限定されるので、通信量を抑制することができる。 As a result, DMA transfer is performed from the equivalent memory 205 to the transmission buffer 209 (S05). Since the data transmitted here (hereinafter referred to as state change data) is limited to the block in which the state change has occurred, the amount of communication can be suppressed.

S06:CPU201のソフトウェア動作によりDMAC210を起動させ、状変データを送信バッファ209から通信コントローラ211へDMA転送する。 S06: The DMAC 210 is started by the software operation of the CPU 201, and the state change data is DMA-transferred from the transmission buffer 209 to the communication controller 211.

この転送と並行してS04,S05の処理を実行し、状変ステータスレジスタ207の前回続きのビットから「1」が設定されたビットを検索する。ここで送信バッファ209は複数の通信フレーム分の容量を有しており、正常な受信リプライが来れば上書きする一方、異常であればS06のDMA転送を再度行う。 The processes of S04 and S05 are executed in parallel with this transfer, and the bit in which "1" is set is searched from the bits following the previous time in the state change status register 207. Here, the transmission buffer 209 has a capacity for a plurality of communication frames, and if a normal reception reply arrives, it overwrites it, and if it is abnormal, the DMA transfer of S06 is performed again.

送信バッファ209に格納されたすべてのフレームが送信待ちの場合には、オーバフロー回避のため、S05のDMA転送を中断する。その間の演算用メモリ203の状変は、状変ステータスレジスタ207に記録される。 When all the frames stored in the transmission buffer 209 are waiting for transmission, the DMA transfer of S05 is interrupted to avoid overflow. The state change of the arithmetic memory 203 during that period is recorded in the state change status register 207.

(2)スレーブPLC102の受信動作
スレーブPLC102の受信動作は、次のプロセス(S11〜S15)で受信動作を行う。
(2) Reception operation of slave PLC102 In the reception operation of slave PLC102, the reception operation is performed in the following processes (S11 to S15).

S11,S12:スレーブPLC102がマスターPLC101からの状変データ送信を受信すれば、通信コントローラ211はDMAC210を起動させ(S11)、受信バッファ212へDMA転送を行う(S12)。 S11, S12: When the slave PLC 102 receives the state change data transmission from the master PLC 101, the communication controller 211 activates the DMAC 210 (S11) and performs DMA transfer to the reception buffer 212 (S12).

S13,S14:CPU201のソフトウェア動作で受信バッファ212をリードし、受信フレームの状変データに含まれるブロック番号を取得し(S13)、CPU201のソフトウェア動作でDMAC213を起動させる。このときマルチプレクサ204が受信時動作するため、状変データを受信バッファ212から等価用メモリ205にDMA転送が可能となる(S14)。 S13, S14: The reception buffer 212 is read by the software operation of the CPU 201, the block number included in the state change data of the reception frame is acquired (S13), and the DMAC 213 is started by the software operation of the CPU 201. At this time, since the multiplexer 204 operates at the time of reception, the state change data can be DMA-transferred from the reception buffer 212 to the equivalent memory 205 (S14).

なお、DMAC213は、受信バッファ212の内容を検定し、受信フレームに異常がなければCPU201のソフトウェア動作でマスターPLC101に正常受信の応答を送信する一方、異常があれば同PLC101に再送要求の通知を送信する。 The DMAC 213 verifies the contents of the reception buffer 212, and if there is no abnormality in the reception frame, the software operation of the CPU 201 transmits a normal reception response to the master PLC 101, while if there is an abnormality, the DMAC 213 notifies the PLC 101 of the retransmission request. Send.

S15:スレーブPLC102のラダープログラム実行停止時(CPU201の演算不実行時)において、S13で取得したブロック番号からCPU201がソフトウェア動作で等価用メモリ205と演算用メモリ203との書き込みアドレスを算出する。 S15: When the ladder program execution of the slave PLC 102 is stopped (when the calculation of the CPU 201 is not executed), the CPU 201 calculates the write address of the equivalent memory 205 and the calculation memory 203 from the block number acquired in S13 by software operation.

算出された書き込みアドレスを等価用メモリ205から演算用メモリ203へ転送し、演算用メモリ203の該当アドレスに上書きする。これにより両PLC101,102のメモリデータが等価となり、等価処理が完了する。 The calculated write address is transferred from the equivalent memory 205 to the arithmetic memory 203, and the corresponding address of the arithmetic memory 203 is overwritten. As a result, the memory data of both PLCs 101 and 102 become equivalent, and the equivalent processing is completed.

(3)状変検出動作
図3に基づき状変検出部206の動作を説明する。CPU201が演算用メモリ203にライトアクセスする際、状変検出部206が等価用メモリ205の同じアドレスのデータをリードする。
(3) State change detection operation The operation of the state change detection unit 206 will be described with reference to FIG. When the CPU 201 makes write access to the arithmetic memory 203, the state change detection unit 206 reads the data at the same address in the equivalent memory 205.

状変検出部206は、CPU201の演算用メモリ203へのライトデータと、自身のリードした等価用メモリ205のリードデータとを比較する。比較の結果、前記両データが不一致であれば、該不一致部分のアドレスデータが書き換えられることになる。 The state change detection unit 206 compares the write data of the CPU 201 to the arithmetic memory 203 with the read data of the equivalent memory 205 that it has read. As a result of the comparison, if the two data do not match, the address data of the mismatched portion will be rewritten.

この状態を等価データの「状変」と認識し、状変のあったブロック領域の状変ステータスレジスタ207の該当ビットを「1」に設定する。図3中のライトアクセス「1」が「状変あり」の動作を示し、同「2」が「状変なし」の動作を示している。 This state is recognized as the "state change" of the equivalent data, and the corresponding bit of the state change status register 207 of the block area where the state change has occurred is set to "1". In FIG. 3, the light access "1" indicates the operation of "with state change", and the same "2" indicates the operation of "without state change".

図4に基づき一例を説明する。ここでは演算用メモリ203は、図4(a)に示すように、「256ブロック」に分割されている。一方、状変ステータスレジスタ207は、図4(b)に示すように、図4(a)のメモリブロック数に応じて「32ビット×8レジスタ」が用意されている。そして、メモリブロック「31」に「状変あり」と認識され、「状変ステータスレジスタ#0」の該当ビットが「1」に設定されている。なお、演算用メモリ203のメモリブロック分割および状変ステータスレジスタ207の構成は、図4に限定されるものではなく、他の分割数および構成を用いてもよいものとする。 An example will be described with reference to FIG. Here, the arithmetic memory 203 is divided into "256 blocks" as shown in FIG. 4A. On the other hand, as shown in FIG. 4B, the state change status register 207 is provided with "32-bit x 8 registers" according to the number of memory blocks in FIG. 4A. Then, the memory block "31" is recognized as "having a state change", and the corresponding bit of the "state change status register # 0" is set to "1". The configuration of the memory block division and the state change status register 207 of the arithmetic memory 203 is not limited to FIG. 4, and other division numbers and configurations may be used.

このような状変検出動作にあたって、等価用メモリ205がFPGA202の内部に実装されているため、該等価用メモリ205のアクセス時間を外部デバイスである演算用メモリ203の半分以下にすることができる。 In such a state change detection operation, since the equivalent memory 205 is mounted inside the FPGA 202, the access time of the equivalent memory 205 can be reduced to half or less of the arithmetic memory 203 which is an external device.

したがって、CPU201の演算用メモリ203へのライトアクセス中に等価用メモリ205のリードとライトが可能となる。その結果、状変検出動作によるメモリアクセス増加での速度低下を回避でき、この点で状変検出動作の速度を向上させることが可能となる。 Therefore, it is possible to read and write the equivalent memory 205 during the write access to the arithmetic memory 203 of the CPU 201. As a result, it is possible to avoid a decrease in speed due to an increase in memory access due to the state change detection operation, and in this respect, it is possible to improve the speed of the state change detection operation.

PLC二重化システムは、正常時にマスターPLC101の演算結果に基づき接続機器などを制御する一方、異常時に主系を高速でスレーブPLC102に切り替えるため、メモリ等価の処理が行われている。 The PLC duplication system controls connected devices and the like based on the calculation result of the master PLC 101 in the normal state, and switches the main system to the slave PLC 102 at high speed in the case of an abnormality, so that memory equivalent processing is performed.

ただし、スレーブCPU201の演算データにより等価データが上書きされることを防止する観点から演算中の等価処理が禁止されている。この点につき実施例1も、S15の処理がスレーブPLC102のラダープログラム実行停止時に行われている。 However, the equivalent processing during the calculation is prohibited from the viewpoint of preventing the equivalent data from being overwritten by the calculation data of the slave CPU 201. Regarding this point, also in the first embodiment, the processing of S15 is performed when the execution of the ladder program of the slave PLC 102 is stopped.

その結果、スレーブPLC102は、演算不実行中に等価処理を行わざるを得なく、メモリ等価までに時間がかかるおそれがあった。そこで、実施例2のPLC二重化システムは、スレーブPLC102の演算実行中の等価処理を可能にすることでメモリ等価の時間短縮化を図っている。 As a result, the slave PLC 102 has no choice but to perform the equivalent processing while the calculation is not executed, and there is a possibility that it takes time to equalize the memory. Therefore, the PLC duplication system of the second embodiment aims to shorten the time equivalent to the memory by enabling the equivalent processing during the calculation execution of the slave PLC 102.

≪構成例≫
図5に基づき実施例2の構成例を説明する。ここでは実施例1のFPGA202からマルチプレクサ204および等価用メモリ205が削除されている。
<< Configuration example >>
A configuration example of the second embodiment will be described with reference to FIG. Here, the multiplexer 204 and the equivalent memory 205 are deleted from the FPGA 202 of the first embodiment.

その一方でメモリ(RAM)402,メモリ(RAM)403,演算部マルチプレクサ405,等価部マルチプレクサ(MUX)406,マルチプレクサ(MUX)制御部407の構成が追加されている。また、実施例2では、図5中のRAM203をCPU201の演算用メモリではなく、別用途に使用可能な外部メモリとする。 On the other hand, the configurations of the memory (RAM) 402, the memory (RAM) 403, the arithmetic unit multiplexer 405, the equivalent unit multiplexer (MUX) 406, and the multiplexer (MUX) control unit 407 have been added. Further, in the second embodiment, the RAM 203 in FIG. 5 is not a calculation memory of the CPU 201 but an external memory that can be used for another purpose.

すなわち、メモリ402,403にはCPU201の演算結果/等価データが格納される。また、演算部マルチプレクサ405は、演算結果を格納するメモリ領域(メモリ402,403)の選択/選択の切替を行う。等価部マルチプレクサ406は、等価データを格納するメモリ領域(メモリ402,403)の選択/選択の切替を行う。 That is, the calculation result / equivalent data of the CPU 201 is stored in the memories 402 and 403. Further, the calculation unit multiplexer 405 selects / switches the memory areas (memory 402, 403) for storing the calculation result. The equivalent unit multiplexer 406 selects / switches the memory areas (memories 402 and 403) for storing equivalent data.

このとき両マルチプレクサ405,406の制御は、マルチプレクサ制御部407の出力する演算部選択信号408・等価部選択信号409により実行されている。そして、このような構成のPLC101,102は次のように動作する。 At this time, the control of both multiplexers 405 and 406 is executed by the arithmetic unit selection signal 408 and the equivalent unit selection signal 409 output by the multiplexer control unit 407. Then, the PLCs 101 and 102 having such a configuration operate as follows.

≪マスターPLC101の送信動作≫
マスターPLC101のCPU201の演算時には、マルチプレクサ制御部407が演算部選択信号408を演算部マルチプレクサ405に出力する一方、等価部選択信号409を等価部マルチプレクサ406に出力する。
<< Transmission operation of master PLC101 >>
When the CPU 201 of the master PLC 101 is calculated, the multiplexer control unit 407 outputs the calculation unit selection signal 408 to the calculation unit multiplexer 405, while the equivalent unit selection signal 409 is output to the equivalent unit multiplexer 406.

これによりメモリ402が演算用メモリに選択される一方、メモリ403が等価用メモリに選択される。したがって、CPU201の演算結果がメモリ402に格納され、メモリ402へのデータ書き込みと並行してメモリ403に等価データが書き込まれる。 As a result, the memory 402 is selected as the arithmetic memory, while the memory 403 is selected as the equivalent memory. Therefore, the calculation result of the CPU 201 is stored in the memory 402, and the equivalent data is written in the memory 403 in parallel with writing the data to the memory 402.

その結果、実施例1と同様にCPU201の演算データの書き込み時に等価データが作成保存され、メモリの等価処理を高速化する効果が得られる。その後、PLC101のラダープログラム実行停止時に状変検出部206が、状変の検出動作を実行し、実施例1と同じ送信動作を実行する。 As a result, as in the first embodiment, the equivalent data is created and saved when the arithmetic data of the CPU 201 is written, and the effect of speeding up the equivalent processing of the memory can be obtained. After that, when the execution of the ladder program of the PLC 101 is stopped, the state change detection unit 206 executes the state change detection operation, and executes the same transmission operation as in the first embodiment.

≪スレーブPLC102の受信動作≫
図6のタイムチャートに基づきスレーブPLC102の受信動作をCPU201の演算実行中と演算不実行中とに分けて説明する。図6中の「A」のタイミングはCPU201の演算実行中を示し、同「B」のタイミングは同演算不実行中を示し、演算の実行・不実行に応じてメモリ領域(メモリ402,403)の選択/選択の切替が制御されている。
<< Reception operation of slave PLC102 >>
Based on the time chart of FIG. 6, the reception operation of the slave PLC 102 will be described separately for the calculation execution of the CPU 201 and the non-calculation execution. The timing of "A" in FIG. 6 indicates that the operation of the CPU 201 is being executed, the timing of "B" indicates that the operation is not being executed, and the memory areas (memory 402, 403) correspond to the execution / non-execution of the operation. Selection / selection switching is controlled.

(1)まず、前記「A」のタイミングにおける動作例を説明する。ここではマルチプレクサ制御部407から演算部マルチプレクサ405に演算部選択信号が出力され、メモリ402が演算用メモリとして選択される。したがって、CPU201はメモリ402にアクセスしながら演算を実行し、演算結果はメモリ402に格納される。 (1) First, an operation example at the timing of "A" will be described. Here, the multiplexer control unit 407 outputs a calculation unit selection signal to the calculation unit multiplexer 405, and the memory 402 is selected as the calculation memory. Therefore, the CPU 201 executes the calculation while accessing the memory 402, and the calculation result is stored in the memory 402.

このとき通信コントローラ211が、マスターPLC101からの送信フレームを受信すればS11〜S14の処理が実行される。また、マルチプレクサ制御部407が、演算部選択信号408を演算部マルチプレクサ405に出力する一方、等価部選択信号409を等価部マルチプレクサ406に出力する。 At this time, if the communication controller 211 receives the transmission frame from the master PLC 101, the processes of S11 to S14 are executed. Further, the multiplexer control unit 407 outputs the calculation unit selection signal 408 to the calculation unit multiplexer 405, while outputting the equivalent unit selection signal 409 to the equivalent unit multiplexer 406.

これによりメモリ402が引き続き演算用メモリに選択される一方、メモリ403が等価用メモリに選択される。すなわち、マルチプレクサ制御部407により演算用と等価用のメモリ領域(メモリ402,403)が選択制御される。 As a result, the memory 402 is continuously selected as the arithmetic memory, while the memory 403 is selected as the equivalent memory. That is, the multiplexer control unit 407 selectively controls the memory areas (memories 402 and 403) for calculation and equivalent.

その結果、S15の処理をスレーブPLC102のラダープログラム実行時にも行うことが可能となる。したがって、CPU201の演算の実行・不実行にかかわらずメモリの等価処理が可能となり、メモリ等価にかかる時間を大幅に短縮できる。 As a result, the processing of S15 can be performed even when the ladder program of the slave PLC 102 is executed. Therefore, the memory equivalent processing can be performed regardless of whether the operation of the CPU 201 is executed or not, and the time required for the memory equivalent can be significantly shortened.

(2)つぎに前記「B」のタイミングにおける動作例を説明する。ここではマルチプレクサ制御部407は、演算部選択信号408および等価部選択信号409を両マルチプレクサ405,406に出力し、演算用と等価用のメモリ領域(メモリ402,403)を切替制御する。 (2) Next, an operation example at the timing of "B" will be described. Here, the multiplexer control unit 407 outputs the calculation unit selection signal 408 and the equivalent unit selection signal 409 to both multiplexers 405 and 406, and switches and controls the memory areas (memories 402 and 403) for calculation and equivalent.

すなわち、以後は演算用にメモリ403が選択される一方、等価用にメモリ402が選択され、S15の処理が実行される。これによりマスターPLC101の処理結果がすべて反映された等価の状態でスレーブPLC102の動作が可能となる。 That is, after that, the memory 403 is selected for the calculation, the memory 402 is selected for the equivalent, and the process of S15 is executed. As a result, the slave PLC 102 can be operated in an equivalent state in which all the processing results of the master PLC 101 are reflected.

ここで実施例1では、スレーブPLC102は、CPU201の演算実行中にマスターPLC101から送信された等価データを等価用メモリ205に保存し、同演算不実行中(ラダープログラムの実行停止時)に等価用メモリ205の保存データを演算用メモリ203にコピーしていた。 Here, in the first embodiment, the slave PLC 102 saves the equivalent data transmitted from the master PLC 101 during the execution of the calculation of the CPU 201 in the equivalent memory 205, and performs the equivalent data during the non-execution of the calculation (when the execution of the ladder program is stopped). The stored data in the memory 205 was copied to the calculation memory 203.

これに対して実施例2では、メモリ領域(メモリ402,403)を演算用と等価用とに選択可能ため、演算実行中に等価データを作成保存でき、この点で演算不実行中のコピー処理を削減することができる。したがって、スレーブ演算部401は、図6中の「C」に示すように、直ちに次の演算を開始でき、この点で演算開始までの待ち時間がなく、処理速度を高速化することができる。 On the other hand, in the second embodiment, since the memory area (memory 402, 403) can be selected for the calculation and the equivalent, the equivalent data can be created and saved during the calculation, and in this respect, the copy process during the non-calculation execution. Can be reduced. Therefore, as shown in "C" in FIG. 6, the slave calculation unit 401 can immediately start the next calculation, and at this point, there is no waiting time until the calculation starts, and the processing speed can be increased.

PLC二重化システムでは、マスターPLC101の演算結果をスレーブPLC102に反映させるメモリ等価処理を行うことで制御機器の入出力情報などがスレーブPLC102に展開される。 In the PLC duplication system, the input / output information of the control device and the like are expanded to the slave PLC 102 by performing the memory equivalent processing that reflects the calculation result of the master PLC 101 on the slave PLC 102.

ところが、前述のようにスレーブPLC102の演算中にデータが上書きされることを防止するため、演算中にはメモリ等価処理が行えない。そのため、スレーブPLC102の演算不実行中に行うこととなるが、メモリ等価までに時間がかかってしまう。 However, as described above, in order to prevent the data from being overwritten during the calculation of the slave PLC 102, the memory equivalent processing cannot be performed during the calculation. Therefore, it is performed while the operation of the slave PLC 102 is not executed, but it takes time to equalize the memory.

また、演算不実行の時間が極めて短い(演算処理の負荷が大きい)場合に等価データを作成する処理を実施できないタイミングが発生するおそれがある。そこで、実施例3のPLC二重化システムは、FPGA202に実装された広帯域バスを介して高速に演算用メモリ203からデータ転送可能にしている。 In addition, when the time for non-execution of calculation is extremely short (the load of calculation processing is large), there is a possibility that a timing may occur in which the process of creating equivalent data cannot be executed. Therefore, the PLC duplication system of the third embodiment enables data transfer from the arithmetic memory 203 at high speed via the broadband bus mounted on the FPGA 202.

≪構成例≫
図7に基づき実施例3の構成例を説明する。
<< Configuration example >>
A configuration example of Example 3 will be described with reference to FIG. 7.

(1)マスターPLC101は、CPU201,演算用メモリ203,等価用メモリ205,通信コントローラ(等価データ送信部)211,等価データ生成部300を実装している。 (1) The master PLC 101 implements a CPU 201, a calculation memory 203, an equivalent memory 205, a communication controller (equivalent data transmission unit) 211, and an equivalent data generation unit 300.

ここで演算用メモリ203・等価データ生成部300間のメモリバスbと、等価データ生成部300・等価用メモリ205間の等価バスcとには、広帯域のオンチップが使用され、短時間での高速データコピーが可能となっている。 Here, a wide band on-chip is used for the memory bus b between the arithmetic memory 203 and the equivalent data generation unit 300 and the equivalent bus c between the equivalent data generation unit 300 and the equivalent data generation unit 205 in a short time. High-speed data copy is possible.

等価データ生成部300は、CPU201の演算不実行のタイミングで状変のあったメモリブロックのメモリデータのみをコピーし、等価データを作成する。また、等価データ生成部300は、図8に示すように、状変検出部311,メモリ状変ステータス312,データ転送部313,等価用RAM状変ステータス314を実装する。 The equivalent data generation unit 300 copies only the memory data of the memory block whose state has changed at the timing when the calculation of the CPU 201 is not executed, and creates the equivalent data. Further, as shown in FIG. 8, the equivalent data generation unit 300 implements the state change detection unit 311, the memory state change status 312, the data transfer unit 313, and the equivalent RAM state change status 314.

状変検出部311は、演算用メモリ203へのライトデータと等価用メモリ205のリードデータとを比較し、該両データの不一致を状変として検出して前記状変ステータス312にセットする。 The state change detection unit 311 compares the write data to the arithmetic memory 203 with the read data of the equivalent memory 205, detects a discrepancy between the two data as a state change, and sets the state change status 312.

データ転送部313は、前記状変ステータス312から状変のあったメモリブロックの情報(状変データ)を取得して等価用メモリ205に格納し、該格納された情報に応じた前記状変ステータス314をセットする。なお、通信コントローラ211は、前記状変ステータス314にセットされた情報をスレーブPLC102に送信する制御を行う。 The data transfer unit 313 acquires the information (state change data) of the memory block in which the state has changed from the state change status 312, stores the information (state change data) in the equivalent memory 205, and stores the state change status according to the stored information. Set 314. The communication controller 211 controls to transmit the information set in the state change status 314 to the slave PLC 102.

(2)スレーブPLC102
スレーブPLC102は、図7に示すように、CPU201,演算用メモリ203,等価用メモリ205,通信コントローラ211,等価反映部301を実装し、CPU201は演算用メモリ203にアクセスしながら演算を実行する。
(2) Slave PLC102
As shown in FIG. 7, the slave PLC 102 implements the CPU 201, the calculation memory 203, the equivalent memory 205, the communication controller 211, and the equivalent reflection unit 301, and the CPU 201 executes the calculation while accessing the calculation memory 203.

通信コントローラ211はマスターPLC101からのデータ送信に対する受信動作を制御し、等価データを演算用メモリ203に蓄積する。このとき等価反映部301は、CPU201の演算不実行状態の際に演算用メモリ203から状変のあった領域のメモリデータ、即ち状変データのみを等価用メモリ205にコピーする。 The communication controller 211 controls the reception operation for data transmission from the master PLC 101, and stores the equivalent data in the calculation memory 203. At this time, the equivalent reflection unit 301 copies only the memory data of the area where the state change has occurred from the calculation memory 203, that is, the state change data to the equivalent memory 205 when the calculation is not executed by the CPU 201.

その結果、状変のあったメモリブロックのみが等価反映部301によりコピーされ、状変のないメモリブロックのコピーが不要となる。また、スレーブPLC102の演算実行中にマスターPLC101で状変データを予めスレーブPLC102の演算用メモリ203に保存しておくことにより、通信によるデータ送受信にかかる処理を削減でき、この点で等価処理の時間短縮に貢献できる。 As a result, only the memory block having the state change is copied by the equivalent reflection unit 301, and the copy of the memory block without the state change becomes unnecessary. Further, by preserving the state change data in the calculation memory 203 of the slave PLC 102 in advance during the calculation execution of the slave PLC 102, the processing required for data transmission / reception by communication can be reduced, and in this respect, the equivalent processing time. Can contribute to shortening.

≪動作例≫
図9に基づきマスターPLC101の動作例を説明する。ここでは前記状変ステータス312,314は簡略化のため、3ビットのデータとして記載するが、これに限定されることなく、メモリ内部の分割数に応じて可変とする。
≪Operation example≫
An operation example of the master PLC 101 will be described with reference to FIG. Here, the state change statuses 312 and 314 are described as 3-bit data for simplification, but the data is not limited to this and is variable according to the number of divisions inside the memory.

なお、図6と同様に図9中の「A」のタイミングはCPU201の演算実行中を示し、同「B」のタイミングは同演算不実行中を示し、同「C」のタイミングはCPU201の次の演算開始中を示している。 As in FIG. 6, the timing of “A” in FIG. 9 indicates that the calculation of CPU 201 is being executed, the timing of “B” indicates that the calculation is not being executed, and the timing of “C” is next to CPU 201. Indicates that the calculation of is starting.

(1)まず、前記「A」のタイミングにおける動作例を説明すれば、マスターPLC101のCPU201は、演算用メモリ203にアクセスしながら演算を実行する。この演算用メモリ203への書き込み動作の際に状変検出部311は、メモリバスa1を介して演算用メモリ203へのライトデータを取得する。 (1) First, to explain the operation example at the timing of "A", the CPU 201 of the master PLC 101 executes the calculation while accessing the calculation memory 203. During the writing operation to the calculation memory 203, the state change detection unit 311 acquires write data to the calculation memory 203 via the memory bus a1.

ここで取得したライトデータと、メモリバスa2を介してリードした等価用メモリ205のリードデータとを比較して状変を検出する。図9中では「状変あり#0〜#2」が状変の検出を示し、状変検出後に前記状変ステータス312がセットされる。 The state change is detected by comparing the write data acquired here with the read data of the equivalent memory 205 read via the memory bus a2. In FIG. 9, “with state change # 0 to # 2” indicates detection of state change, and the state change status 312 is set after the state change is detected.

(2)つぎに前記「B」のタイミングにおける動作例を説明する。ここではデータ転送部313が、前記状変ステータス312から状変を読み出し、読み出された状変のあったメモリブロック番号を抽出する。 (2) Next, an operation example at the timing of "B" will be described. Here, the data transfer unit 313 reads the state change from the state change status 312, and extracts the read memory block number of the state change.

抽出されたメモリブロック番号に該当するメモリアドレスに基づきメモリバスbを介して演算用メモリ203から状変を含むメモリデータをリードする。これと同時進行で前記リードしたメモリデータを等価用メモリ205に等価バスcを介してライトする(メモリコピー動作)。 Based on the memory address corresponding to the extracted memory block number, the memory data including the state change is read from the calculation memory 203 via the memory bus b. At the same time as this, the read memory data is written to the equivalent memory 205 via the equivalent bus c (memory copy operation).

このときオンチップで広帯域なメモリバスbおよび等価バスcを使用することで短時間でのデータ転送が可能となるため、メモリコピー動作が高速化し、メモリ等価の処理速度を向上させることができる。したがって、演算不実行の時間が極めて短い場合(演算処理の負荷が大きい場合)にも等価データを作成することができる。 At this time, by using the wideband memory bus b and the equivalent bus c on-chip, data transfer can be performed in a short time, so that the memory copy operation can be speeded up and the processing speed equivalent to the memory can be improved. Therefore, equivalent data can be created even when the time for non-execution of calculation is extremely short (when the load of calculation processing is large).

その後、矢印P〜Rに示すように、転送したデータを書き込んだメモリブロック番号に対応する前記メモリ状変ステータス314をセットし、転送完了を示すため前記メモリ状変ステータス312をクリアする(矢印S〜U参照)。 After that, as shown by arrows P to R, the memory state change status 314 corresponding to the memory block number in which the transferred data is written is set, and the memory state change status 312 is cleared to indicate the transfer completion (arrow S). ~ U).

また、前記メモリ状変ステータス314がセットされた後、通信コントローラ211はスレーブPLC102の演算状態に関わらず等価データをスレーブPLC102に送信させる。なお、矢印Vに示すように、送信完了したメモリブロック番号に該当する前記状変ステータス314はクリアされるものとする。 Further, after the memory state change status 314 is set, the communication controller 211 causes the slave PLC 102 to transmit equivalent data regardless of the calculation state of the slave PLC 102. As shown by the arrow V, the state change status 314 corresponding to the memory block number for which transmission has been completed shall be cleared.

(3)最後に「C」のタイミングにおける動作例を説明する。この場合には「A」のタイミングと同様、マスターPLC101のCPU201は演算用メモリ203にアクセスしながら演算を実行し、さらに状変を検出する。 (3) Finally, an operation example at the timing of "C" will be described. In this case, similarly to the timing of “A”, the CPU 201 of the master PLC 101 executes the calculation while accessing the calculation memory 203, and further detects the state change.

この動作と並行して通信コントローラ211は、前記状変ステータス314にセットされたメモリブロック番号のメモリデータをスレーブPLC102に送信させる制御が可能である。 In parallel with this operation, the communication controller 211 can control the slave PLC 102 to transmit the memory data of the memory block number set in the state change status 314.

すなわち、演算実行中に前記状変ステータス314のセット情報を送信でき、この点でメモリ等価の時間短縮に貢献できる。このとき等価用メモリ205は、演算中に変化しないので、演算実行中でも等価用メモリ205からデータを読み出しながら状変データを作成することが可能である。 That is, the set information of the state change status 314 can be transmitted during the execution of the calculation, and in this respect, the time equivalent to the memory can be shortened. At this time, since the equivalent memory 205 does not change during the calculation, it is possible to create the state change data while reading the data from the equivalent memory 205 even during the execution of the calculation.

なお、本発明は、上記実施形態に限定されるものではなく、各請求項に記載された範囲内で変形して実施することができる。例えば図2のFPGA202を備えたマスターPLC101と、図5のFPGA202を備えたスレーブPLC102とを用いてもよい。 The present invention is not limited to the above embodiment, and can be modified and implemented within the range described in each claim. For example, a master PLC 101 having the FPGA 202 of FIG. 2 and a slave PLC 102 having the FPGA 202 of FIG. 5 may be used.

この場合にもCPU201の演算データの書き込み時に等価データを作成保存でき、またCPU201の演算の実行・不実行にかかわらずメモリの等価処理が可能となる。さらに実施例1,2ではFPGA202の内部メモリ205,402,403を用いたが、CPU201が作業用として使用するRAMの半分以下のアクセス時間の外部メモリ203を用いてもよいものとする。 In this case as well, the equivalent data can be created and saved when the operation data of the CPU 201 is written, and the equivalent processing of the memory can be performed regardless of whether the operation of the CPU 201 is executed or not. Further, although the internal memories 205, 402, and 403 of the FPGA 202 are used in the first and second embodiments, the external memory 203 having an access time of less than half of the RAM used by the CPU 201 for work may be used.

また、図7中の等価データ生成部300と等価反映部301の双方の機能を併せ持った構成をマスターPLC101,スレーブPLC102に実装させてもよいものとする。 Further, a configuration having both functions of the equivalent data generation unit 300 and the equivalent reflection unit 301 in FIG. 7 may be mounted on the master PLC 101 and the slave PLC 102.

101…マスターPLC(主系)
102…スレーブPLC(従系)
201…CPU
202…FPGA(集積回路)
402,403…メモリ
204…MUX(マルチプレクサ)
205…等価用RAM
206,311…状変検出部
207…状変ステータス
208,210…DMAC
209…TxBuf
210…RxBuf
211…通信コントローラ(通信部)
300…等価データ作成部
312…メモリ状変ステータス(第1の状変ステータス)
313…データ転送部
314…等価用RAM状変ステータス(第2の状変ステータス)
402,403…メモリ
405…演算部マルチプレクサ
406…等価部マルチプレクサ
407…マルチプレクサ制御部
408…演算部選択信号
409…等価部選択信号
101 ... Master PLC (main system)
102 ... Slave PLC (subordinate)
201 ... CPU
202 ... FPGA (integrated circuit)
402, 403 ... Memory 204 ... MUX (multiplexer)
205 ... Equivalent RAM
206, 311 ... State change detection unit 207 ... State change status 208, 210 ... DMAC
209 ... TxBuf
210 ... RxBuf
211 ... Communication controller (communication unit)
300 ... Equivalent data creation unit 312 ... Memory state change status (first state change status)
313 ... Data transfer unit 314 ... Equivalent RAM state change status (second state change status)
402, 403 ... Memory 405 ... Arithmetic unit multiplexer 406 ... Equivalent unit multiplexer 407 ... multiplexer control unit 408 ... Arithmetic unit selection signal 409 ... Equivalent unit selection signal

Claims (9)

主系と従系の制御装置を備え、
前記主系の演算結果を等価データとして、前記従系に反映させる二重系制御システムのメモリ等価方式であって、
前記主系および前記従系は、
前記演算結果を格納する演算用メモリと、
前記等価データを格納する等価用メモリと、
を備えることを特徴とする二重系制御システムのメモリ等価方式。
Equipped with main system and slave control devices
It is a memory equivalent method of a dual system control system that reflects the calculation result of the main system as equivalent data in the slave system.
The main system and the slave system
An arithmetic memory for storing the arithmetic results and
Equivalent memory for storing the equivalent data and
A memory equivalent method of a dual control system characterized by being equipped with.
前記主系は、前記演算用メモリへの前記演算結果の格納と同時進行で前記等価用メモリに前記等価データを格納する
ことを特徴とする請求項1記載の二重系制御システムのメモリ等価方式。
The memory equivalent method of the dual system control system according to claim 1, wherein the main system stores the equivalent data in the equivalent memory at the same time as storing the calculation result in the calculation memory. ..
前記主系は、前記等価データと前記等価用メモリの格納データとを比較し、前記両データの不一致を状変として検出する状変検出部を備え、
前記状変があったメモリブロックの情報を前記従系に送信する一方、
前記従系は、前記送信データに含まれるメモリブロックの情報に基づき前記等価用メモリの記憶データを更新する
ことを特徴とする請求項1または2記載の二重系制御システムのメモリ等価方式。
The main system includes a state change detection unit that compares the equivalent data with the stored data of the equivalent memory and detects a discrepancy between the two data as a state change.
While transmitting the information of the memory block in which the state has changed to the slave system,
The memory equivalent method of the dual system control system according to claim 1 or 2, wherein the slave system updates the stored data of the equivalent memory based on the information of the memory block included in the transmission data.
前記等価用メモリを含む等価回路をすべて集積回路に実装している
ことを特徴とする請求項1〜3のいずれかに記載の二重系制御システムのメモリ等価方式。
The memory equivalent method of the dual system control system according to any one of claims 1 to 3, wherein all the equivalent circuits including the equivalent memory are mounted on the integrated circuit.
前記等価用メモリは、前記等価回路が実装された集積回路の外部に高速メモリとして実装されている
ことを特徴とする請求項4記載の二重系制御システムのメモリ等価方式。
The memory equivalent method of the dual control system according to claim 4, wherein the equivalent memory is mounted as a high-speed memory outside the integrated circuit on which the equivalent circuit is mounted.
前記従系は、前記演算用メモリと前記等価用メモリの選択を切替可能なことを特徴とする請求項1〜5のいずれかに記載の二重系制御システム。 The dual system control system according to any one of claims 1 to 5, wherein the slave system can switch the selection between the arithmetic memory and the equivalent memory. 前記切替は、演算部の演算実行・不実行に応じて制御されていることを特徴とする請求項6記載の二重系制御システムのメモリ等価方式。 The memory equivalent method of the dual system control system according to claim 6, wherein the switching is controlled according to the calculation execution / non-execution of the calculation unit. 前記主系は、前記等価データを作成する際に集積回路の広帯域バスを介して、少なくとも前記演算用メモリからのデータ転送可能な等価データ生成部を備える
ことを特徴とする請求項1〜7のいずれかに記載の二重系制御システムのメモリ等価方式。
The main system includes at least an equivalent data generator capable of transferring data from the arithmetic memory via a broadband bus of an integrated circuit when creating the equivalent data, according to claims 1 to 7. The memory equivalent method of the dual control system described in either.
前記等価データ生成部は、前記等価データと前記等価用メモリの格納データとを比較し、前記両データの不一致を状変として検出して第1の状変ステータスにセットする状変検出部と、
前記メモリ状変ステータスから前記状変のあったメモリブロックの情報を取得して前記等価メモリに格納し、該格納されるメモリブロックの情報に応じた第2の状変ステータスをセットして通信部に転送するデータ転送部と、を備え、
前記データ転送部は、前記広域バスを介して前記演算用メモリから前記状変のデータを読み込み、
前記広域バスを介して前記等価用メモリにデータを記述することを特徴とする請求項8記載の二重系制御システムのメモリ等価方式。
The equivalent data generation unit compares the equivalent data with the stored data in the equivalent memory, detects a discrepancy between the two data as a state change, and sets the state change status to the first state change status.
The information of the memory block having the state change is acquired from the memory state change status and stored in the equivalent memory, and the second state change status corresponding to the information of the stored memory block is set and the communication unit. Equipped with a data transfer unit to transfer to
The data transfer unit reads the data of the state change from the calculation memory via the wide area bus, and reads the data of the state change.
The memory equivalent method of the dual system control system according to claim 8, wherein data is described in the equivalent memory via the wide area bus.
JP2020150457A 2020-03-24 2020-09-08 Memory equivalence method for dual control systems. Active JP7468260B2 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2020053284 2020-03-24
JP2020053284 2020-03-24

Publications (2)

Publication Number Publication Date
JP2021152855A true JP2021152855A (en) 2021-09-30
JP7468260B2 JP7468260B2 (en) 2024-04-16

Family

ID=77887335

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020150457A Active JP7468260B2 (en) 2020-03-24 2020-09-08 Memory equivalence method for dual control systems.

Country Status (1)

Country Link
JP (1) JP7468260B2 (en)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000242316A (en) 1999-02-23 2000-09-08 Takaoka Electric Mfg Co Ltd Doubled data synchronization system

Also Published As

Publication number Publication date
JP7468260B2 (en) 2024-04-16

Similar Documents

Publication Publication Date Title
US6453391B2 (en) Multiplexed computer system
US7631244B2 (en) Soft error correction method, memory control apparatus and memory system
CN108733594B (en) Memory controller and data storage device
JP5518103B2 (en) Transmission control device and PLC including the transmission control device
JP5034979B2 (en) START-UP DEVICE, START-UP METHOD, AND START-UP PROGRAM
KR20170048084A (en) Apparatus and Method for Operating Write-Ahead-Logging
JP2021152855A (en) Memory equivalent method for dual-series control system
JP3281211B2 (en) Information processing apparatus having synchronous memory and synchronous memory
JP4446968B2 (en) Data processing device
CN109358903B (en) Data access device and access error notification method
JPS5953631B2 (en) storage controller
US20190391840A1 (en) Memory module
JP5251690B2 (en) Remote copy system and remote copy method
JP2011070259A (en) Data transfer device and data transfer method
JP6646322B2 (en) Multi-system computer and program for multi-system computer
JP6757717B2 (en) Memory management in multiprocessor systems
JP2004258935A (en) Semiconductor device
JP4030951B2 (en) Data duplication apparatus and method
TW201837725A (en) Memory controller and data storage device
JP5087884B2 (en) Data processing unit and data processing apparatus using the same
JP2005025371A (en) Disk array device and data write control method
CN113625942A (en) Semiconductor device with a plurality of transistors
JP2000353106A (en) Device and method for transferring data
JP2020173511A (en) Data transfer device, and data transfer method and computer program
JPH07287694A (en) Multiplex processing system and memory synchronous control method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20230221

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20231116

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20231219

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20240117

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: 20240305

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20240318

R150 Certificate of patent or registration of utility model

Ref document number: 7468260

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150