JP2021152855A - Memory equivalent method for dual-series control system - Google Patents
Memory equivalent method for dual-series control system Download PDFInfo
- 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
Links
- 230000015654 memory Effects 0.000 title claims abstract description 222
- 238000000034 method Methods 0.000 title claims description 24
- 230000005540 biological transmission Effects 0.000 claims abstract description 31
- 238000004891 communication Methods 0.000 claims abstract description 25
- 238000001514 detection method Methods 0.000 claims abstract description 25
- 230000009977 dual effect Effects 0.000 claims description 13
- MHABMANUFPZXEB-UHFFFAOYSA-N O-demethyl-aloesaponarin I Natural products O=C1C2=CC=CC(O)=C2C(=O)C2=C1C=C(O)C(C(O)=O)=C2C MHABMANUFPZXEB-UHFFFAOYSA-N 0.000 description 9
- 238000010586 diagram Methods 0.000 description 9
- 230000005856 abnormality Effects 0.000 description 4
- 230000002159 abnormal effect Effects 0.000 description 2
- 230000003139 buffering effect Effects 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000004904 shortening Methods 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Images
Landscapes
- Programmable Controllers (AREA)
Abstract
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
マスターPLC101およびスレーブPLC102は、それぞれシーケンス命令を実行するCPU103,110と、プログラムおよびデータを格納するメモリ104,109と、メモリにライトしたアドレス値およびデータ値を保持する送信用/受信用FIFO105,108と、互いの通信を実行する通信コントローラ106,107とを備えている。
The
そして、正常時にはマスターPLC101の演算結果に基づき接続機器が制御される一方、異常時には主系を高速でスレーブPLC102に切り替える。このときマスターPLC101の演算結果、即ちメモリ104の内容をスレーブPLC102のメモリ109に反映させる等価処理を行うことにより、制御機器の入出力情報をスレーブPLC102に展開する。
Then, in the normal state, the connected device is controlled based on the calculation result of the
前述のようにPLCを二重化する場合にはメモリ104,109の内容を等価にする必要がある。この点について特許文献1では、メモリ104にライトしたアドレス値とデータ値とをデータ更新の有無に関係なく、等価処理を行っている。
When the PLC is duplicated as described above, it is necessary to make the contents of the
しかしながら、更新されていないデータを送信する必要はなく、通信量に無駄を生じるおそれがあった。そこで、特許文献2では、更新されたアドレスデータおよび更新データを送受信時にバッファリングする方式を採用しているものの、
CPU103のメモリライトの都度バッファの内容が更新されるため、バッファのオーバフローが生じ、却って等価処理が遅延するおそれがある。
However, it is not necessary to transmit unupdated data, which may result in waste of communication volume. Therefore, although
Since the contents of the buffer are updated each time the memory write of the
本発明は、このような従来の問題を解決するためになされ、主系演算部のメモリアクセスに並行して従系に送信する等価データを作成し、送信時のメモリ読込を省略することで等価処理の高速化を図っている。 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二重化システムに前記メモリ等価方式が適用されている。 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
各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
FPGA202には、MUX(以下、マルチプレクサとする。)204,等価用RAM(以下、等価用メモリとする。)205,状変検出部206,状変ステータスレジスタ207,DMAC208,TxBUF(以下、送信バッファとする。)209,DMAC210,通信コントローラ211,RxBuf(以下、受信バッファとする。)212,DMAC213を含む等価回路が実装されている。
The
具体的にはマルチプレクサ204は、送信時と受信時のアドレスとデータを選択し、マスターPLC101であれば送信時に「A」が選択される一方、スレーブPLC102であれば受信時に「B」が選択される。
Specifically, the
マスターPLC101のCPU201が演算用メモリ203にライトアクセスした際にはマルチプレクサ204により「A」が選択され、等価用メモリ205に演算用メモリ203と同じ内容がライトされる。また、状変検出部206は、CPU201が演算用メモリ203にデータをライトした際、前回値からのデータ更新(以下、「状変」と省略する。)を検出する。
When the
状変ステータスレジスタ207は、状変検出部206により検出された状変のあった演算用メモリ203のブロック番号を保持する。このときDMAC208は、状変ステータスレジスタ207の保持情報を参照して、等価用メモリ205から状変があったブロックを送信バッファ209に転送する。ここで転送された送信データを送信バッファ209が一時的に保持する。
The state
マスターPLC101であればDMAC210は、送信バッファ209の保持内容を通信コントローラ211に転送する。一方、スレーブPLC102であれば通信コントローラ211の受信したデータを受信バッファ212に転送する。
If it is the
マスターPLC101の通信コントローラ211は、転送された送信バッファ209の保持内容をスレーブPLC102に送信動作させる。一方、スレーブPLC102の通信コントローラ211は、マスターPLC101から送信されたデータを受信動作させる。
The
ここで受信されたマスターPLC101からのデータは受信バッファ212により一時的に保持される。このときマルチプレクサ204により「B」が選択され、スレーブPLC102のDMAC213が受信バッファ212の保持内容を等価用メモリ205に転送する。
The data received here from the
(1)マスターPLC101の送信動作
マスターPLC101は、次のプロセス(S01〜S06)で送信動作を行う。
(1) Transmission operation of the
S01〜S03:前述のようにCPU201が演算用メモリ203に演算データをライトするとき(S01)、マルチプレクサ204が送信時動作し、FPGA202内部の等価用メモリ205に同じデータをライトする(S02)。
S01 to S03: As described above, when the
すなわち、マルチプレクサ204と等価用メモリ205とを用いることにより、CPU201の演算用メモリ203へのライトデータの複製が等価データとして作成保存される。したがって、マスターPLC101がスレーブPLC102に等価データを送信する際に演算用メモリ203を読み込む必要がなく、等価処理を高速化することができる。
That is, by using the
このとき等価用メモリ205へのアクセスがFPGA202上で行わることから、CPU201から演算用メモリ203へのアクセスと同時進行で等価データを作成でき、この点でも等価処理が高速化する。また、状変検出部206にて等価用メモリ205の状変の検出動作を実行し、状変があれば状変ステータスレジスタ207の該当ビットを「1」に設定する(S03)。
At this time, since the access to the
S04,S05:PLC101のラダープログラムの実行停止時(CPU201の演算不実行時)に状変検出部206が、状変ステータスレジスタ207のビットを「0」から「1」に変更したブロックを検出すれば、DMAC208を起動させる(S04)。
S04, S05: When the execution of the ladder program of the
これにより等価用メモリ205から送信バッファ209にDMA転送される(S05)。ここで送信するデータ(以下、状変データとする。)は、状変があったブロックに限定されるので、通信量を抑制することができる。
As a result, DMA transfer is performed from the
S06:CPU201のソフトウェア動作によりDMAC210を起動させ、状変データを送信バッファ209から通信コントローラ211へDMA転送する。
S06: The
この転送と並行して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
送信バッファ209に格納されたすべてのフレームが送信待ちの場合には、オーバフロー回避のため、S05のDMA転送を中断する。その間の演算用メモリ203の状変は、状変ステータスレジスタ207に記録される。
When all the frames stored in the
(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
S13,S14:CPU201のソフトウェア動作で受信バッファ212をリードし、受信フレームの状変データに含まれるブロック番号を取得し(S13)、CPU201のソフトウェア動作でDMAC213を起動させる。このときマルチプレクサ204が受信時動作するため、状変データを受信バッファ212から等価用メモリ205にDMA転送が可能となる(S14)。
S13, S14: The
なお、DMAC213は、受信バッファ212の内容を検定し、受信フレームに異常がなければCPU201のソフトウェア動作でマスターPLC101に正常受信の応答を送信する一方、異常があれば同PLC101に再送要求の通知を送信する。
The
S15:スレーブPLC102のラダープログラム実行停止時(CPU201の演算不実行時)において、S13で取得したブロック番号からCPU201がソフトウェア動作で等価用メモリ205と演算用メモリ203との書き込みアドレスを算出する。
S15: When the ladder program execution of the
算出された書き込みアドレスを等価用メモリ205から演算用メモリ203へ転送し、演算用メモリ203の該当アドレスに上書きする。これにより両PLC101,102のメモリデータが等価となり、等価処理が完了する。
The calculated write address is transferred from the
(3)状変検出動作
図3に基づき状変検出部206の動作を説明する。CPU201が演算用メモリ203にライトアクセスする際、状変検出部206が等価用メモリ205の同じアドレスのデータをリードする。
(3) State change detection operation The operation of the state
状変検出部206は、CPU201の演算用メモリ203へのライトデータと、自身のリードした等価用メモリ205のリードデータとを比較する。比較の結果、前記両データが不一致であれば、該不一致部分のアドレスデータが書き換えられることになる。
The state
この状態を等価データの「状変」と認識し、状変のあったブロック領域の状変ステータスレジスタ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
このような状変検出動作にあたって、等価用メモリ205がFPGA202の内部に実装されているため、該等価用メモリ205のアクセス時間を外部デバイスである演算用メモリ203の半分以下にすることができる。
In such a state change detection operation, since the
したがって、CPU201の演算用メモリ203へのライトアクセス中に等価用メモリ205のリードとライトが可能となる。その結果、状変検出動作によるメモリアクセス増加での速度低下を回避でき、この点で状変検出動作の速度を向上させることが可能となる。
Therefore, it is possible to read and write the
PLC二重化システムは、正常時にマスターPLC101の演算結果に基づき接続機器などを制御する一方、異常時に主系を高速でスレーブPLC102に切り替えるため、メモリ等価の処理が行われている。
The PLC duplication system controls connected devices and the like based on the calculation result of the
ただし、スレーブ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
その結果、スレーブPLC102は、演算不実行中に等価処理を行わざるを得なく、メモリ等価までに時間がかかるおそれがあった。そこで、実施例2のPLC二重化システムは、スレーブPLC102の演算実行中の等価処理を可能にすることでメモリ等価の時間短縮化を図っている。
As a result, the
≪構成例≫
図5に基づき実施例2の構成例を説明する。ここでは実施例1のFPGA202からマルチプレクサ204および等価用メモリ205が削除されている。
<< Configuration example >>
A configuration example of the second embodiment will be described with reference to FIG. Here, the
その一方でメモリ(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
すなわち、メモリ402,403にはCPU201の演算結果/等価データが格納される。また、演算部マルチプレクサ405は、演算結果を格納するメモリ領域(メモリ402,403)の選択/選択の切替を行う。等価部マルチプレクサ406は、等価データを格納するメモリ領域(メモリ402,403)の選択/選択の切替を行う。
That is, the calculation result / equivalent data of the
このとき両マルチプレクサ405,406の制御は、マルチプレクサ制御部407の出力する演算部選択信号408・等価部選択信号409により実行されている。そして、このような構成のPLC101,102は次のように動作する。
At this time, the control of both
≪マスターPLC101の送信動作≫
マスターPLC101のCPU201の演算時には、マルチプレクサ制御部407が演算部選択信号408を演算部マルチプレクサ405に出力する一方、等価部選択信号409を等価部マルチプレクサ406に出力する。
<< Transmission operation of master PLC101 >>
When the
これによりメモリ402が演算用メモリに選択される一方、メモリ403が等価用メモリに選択される。したがって、CPU201の演算結果がメモリ402に格納され、メモリ402へのデータ書き込みと並行してメモリ403に等価データが書き込まれる。
As a result, the
その結果、実施例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
≪スレーブ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
(1)まず、前記「A」のタイミングにおける動作例を説明する。ここではマルチプレクサ制御部407から演算部マルチプレクサ405に演算部選択信号が出力され、メモリ402が演算用メモリとして選択される。したがって、CPU201はメモリ402にアクセスしながら演算を実行し、演算結果はメモリ402に格納される。
(1) First, an operation example at the timing of "A" will be described. Here, the
このとき通信コントローラ211が、マスターPLC101からの送信フレームを受信すればS11〜S14の処理が実行される。また、マルチプレクサ制御部407が、演算部選択信号408を演算部マルチプレクサ405に出力する一方、等価部選択信号409を等価部マルチプレクサ406に出力する。
At this time, if the
これによりメモリ402が引き続き演算用メモリに選択される一方、メモリ403が等価用メモリに選択される。すなわち、マルチプレクサ制御部407により演算用と等価用のメモリ領域(メモリ402,403)が選択制御される。
As a result, the
その結果、S15の処理をスレーブPLC102のラダープログラム実行時にも行うことが可能となる。したがって、CPU201の演算の実行・不実行にかかわらずメモリの等価処理が可能となり、メモリ等価にかかる時間を大幅に短縮できる。
As a result, the processing of S15 can be performed even when the ladder program of the
(2)つぎに前記「B」のタイミングにおける動作例を説明する。ここではマルチプレクサ制御部407は、演算部選択信号408および等価部選択信号409を両マルチプレクサ405,406に出力し、演算用と等価用のメモリ領域(メモリ402,403)を切替制御する。
(2) Next, an operation example at the timing of "B" will be described. Here, the
すなわち、以後は演算用にメモリ403が選択される一方、等価用にメモリ402が選択され、S15の処理が実行される。これによりマスターPLC101の処理結果がすべて反映された等価の状態でスレーブPLC102の動作が可能となる。
That is, after that, the memory 403 is selected for the calculation, the
ここで実施例1では、スレーブPLC102は、CPU201の演算実行中にマスターPLC101から送信された等価データを等価用メモリ205に保存し、同演算不実行中(ラダープログラムの実行停止時)に等価用メモリ205の保存データを演算用メモリ203にコピーしていた。
Here, in the first embodiment, the
これに対して実施例2では、メモリ領域(メモリ402,403)を演算用と等価用とに選択可能ため、演算実行中に等価データを作成保存でき、この点で演算不実行中のコピー処理を削減することができる。したがって、スレーブ演算部401は、図6中の「C」に示すように、直ちに次の演算を開始でき、この点で演算開始までの待ち時間がなく、処理速度を高速化することができる。
On the other hand, in the second embodiment, since the memory area (
PLC二重化システムでは、マスターPLC101の演算結果をスレーブPLC102に反映させるメモリ等価処理を行うことで制御機器の入出力情報などがスレーブPLC102に展開される。
In the PLC duplication system, the input / output information of the control device and the like are expanded to the
ところが、前述のようにスレーブPLC102の演算中にデータが上書きされることを防止するため、演算中にはメモリ等価処理が行えない。そのため、スレーブPLC102の演算不実行中に行うこととなるが、メモリ等価までに時間がかかってしまう。
However, as described above, in order to prevent the data from being overwritten during the calculation of the
また、演算不実行の時間が極めて短い(演算処理の負荷が大きい)場合に等価データを作成する処理を実施できないタイミングが発生するおそれがある。そこで、実施例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
≪構成例≫
図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
ここで演算用メモリ203・等価データ生成部300間のメモリバスbと、等価データ生成部300・等価用メモリ205間の等価バスcとには、広帯域のオンチップが使用され、短時間での高速データコピーが可能となっている。
Here, a wide band on-chip is used for the memory bus b between the
等価データ生成部300は、CPU201の演算不実行のタイミングで状変のあったメモリブロックのメモリデータのみをコピーし、等価データを作成する。また、等価データ生成部300は、図8に示すように、状変検出部311,メモリ状変ステータス312,データ転送部313,等価用RAM状変ステータス314を実装する。
The equivalent
状変検出部311は、演算用メモリ203へのライトデータと等価用メモリ205のリードデータとを比較し、該両データの不一致を状変として検出して前記状変ステータス312にセットする。
The state
データ転送部313は、前記状変ステータス312から状変のあったメモリブロックの情報(状変データ)を取得して等価用メモリ205に格納し、該格納された情報に応じた前記状変ステータス314をセットする。なお、通信コントローラ211は、前記状変ステータス314にセットされた情報をスレーブPLC102に送信する制御を行う。
The
(2)スレーブPLC102
スレーブPLC102は、図7に示すように、CPU201,演算用メモリ203,等価用メモリ205,通信コントローラ211,等価反映部301を実装し、CPU201は演算用メモリ203にアクセスしながら演算を実行する。
(2) Slave PLC102
As shown in FIG. 7, the
通信コントローラ211はマスターPLC101からのデータ送信に対する受信動作を制御し、等価データを演算用メモリ203に蓄積する。このとき等価反映部301は、CPU201の演算不実行状態の際に演算用メモリ203から状変のあった領域のメモリデータ、即ち状変データのみを等価用メモリ205にコピーする。
The
その結果、状変のあったメモリブロックのみが等価反映部301によりコピーされ、状変のないメモリブロックのコピーが不要となる。また、スレーブPLC102の演算実行中にマスターPLC101で状変データを予めスレーブPLC102の演算用メモリ203に保存しておくことにより、通信によるデータ送受信にかかる処理を削減でき、この点で等価処理の時間短縮に貢献できる。
As a result, only the memory block having the state change is copied by the
≪動作例≫
図9に基づきマスターPLC101の動作例を説明する。ここでは前記状変ステータス312,314は簡略化のため、3ビットのデータとして記載するが、これに限定されることなく、メモリ内部の分割数に応じて可変とする。
≪Operation example≫
An operation example of the
なお、図6と同様に図9中の「A」のタイミングはCPU201の演算実行中を示し、同「B」のタイミングは同演算不実行中を示し、同「C」のタイミングはCPU201の次の演算開始中を示している。
As in FIG. 6, the timing of “A” in FIG. 9 indicates that the calculation of
(1)まず、前記「A」のタイミングにおける動作例を説明すれば、マスターPLC101のCPU201は、演算用メモリ203にアクセスしながら演算を実行する。この演算用メモリ203への書き込み動作の際に状変検出部311は、メモリバスa1を介して演算用メモリ203へのライトデータを取得する。
(1) First, to explain the operation example at the timing of "A", the
ここで取得したライトデータと、メモリバスa2を介してリードした等価用メモリ205のリードデータとを比較して状変を検出する。図9中では「状変あり#0〜#2」が状変の検出を示し、状変検出後に前記状変ステータス312がセットされる。
The state change is detected by comparing the write data acquired here with the read data of the
(2)つぎに前記「B」のタイミングにおける動作例を説明する。ここではデータ転送部313が、前記状変ステータス312から状変を読み出し、読み出された状変のあったメモリブロック番号を抽出する。
(2) Next, an operation example at the timing of "B" will be described. Here, the
抽出されたメモリブロック番号に該当するメモリアドレスに基づきメモリバス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
このときオンチップで広帯域なメモリバス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
また、前記メモリ状変ステータス314がセットされた後、通信コントローラ211はスレーブPLC102の演算状態に関わらず等価データをスレーブPLC102に送信させる。なお、矢印Vに示すように、送信完了したメモリブロック番号に該当する前記状変ステータス314はクリアされるものとする。
Further, after the memory
(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
この動作と並行して通信コントローラ211は、前記状変ステータス314にセットされたメモリブロック番号のメモリデータをスレーブPLC102に送信させる制御が可能である。
In parallel with this operation, the
すなわち、演算実行中に前記状変ステータス314のセット情報を送信でき、この点でメモリ等価の時間短縮に貢献できる。このとき等価用メモリ205は、演算中に変化しないので、演算実行中でも等価用メモリ205からデータを読み出しながら状変データを作成することが可能である。
That is, the set information of the
なお、本発明は、上記実施形態に限定されるものではなく、各請求項に記載された範囲内で変形して実施することができる。例えば図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
この場合にも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
また、図7中の等価データ生成部300と等価反映部301の双方の機能を併せ持った構成をマスターPLC101,スレーブPLC102に実装させてもよいものとする。
Further, a configuration having both functions of the equivalent
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 ...
205 ... Equivalent RAM
206, 311 ... State
209 ... TxBuf
210 ... RxBuf
211 ... Communication controller (communication unit)
300 ... Equivalent
313 ...
402, 403 ...
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〜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.
前記メモリ状変ステータスから前記状変のあったメモリブロックの情報を取得して前記等価メモリに格納し、該格納されるメモリブロックの情報に応じた第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.
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) |
Citations (1)
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 |
-
2020
- 2020-09-08 JP JP2020150457A patent/JP7468260B2/en active Active
Patent Citations (1)
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 | |
US6263409B1 (en) | Data processing system and method for substituting one type of request for another for increased performance when processing back-to-back requests of certain types | |
JP5518103B2 (en) | Transmission control device and PLC including the transmission control device | |
KR101750744B1 (en) | Apparatus and Method for Operating Write-Ahead-Logging | |
JP5034979B2 (en) | START-UP DEVICE, START-UP METHOD, AND START-UP PROGRAM | |
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 | |
JP6757717B2 (en) | Memory management in multiprocessor systems | |
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 | |
JP2004258935A (en) | Semiconductor device | |
JP2000040057A (en) | Computer system, buffer controller and transferring method | |
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 |
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 |