JP4232589B2 - Duplex controller and its equalization mode decision method - Google Patents

Duplex controller and its equalization mode decision method Download PDF

Info

Publication number
JP4232589B2
JP4232589B2 JP2003327647A JP2003327647A JP4232589B2 JP 4232589 B2 JP4232589 B2 JP 4232589B2 JP 2003327647 A JP2003327647 A JP 2003327647A JP 2003327647 A JP2003327647 A JP 2003327647A JP 4232589 B2 JP4232589 B2 JP 4232589B2
Authority
JP
Japan
Prior art keywords
program
fixed
controller
equalization
executed
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP2003327647A
Other languages
Japanese (ja)
Other versions
JP2005092695A (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.)
Fuji Electric Co Ltd
Original Assignee
Fuji Electric Systems 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 Fuji Electric Systems Co Ltd filed Critical Fuji Electric Systems Co Ltd
Priority to JP2003327647A priority Critical patent/JP4232589B2/en
Publication of JP2005092695A publication Critical patent/JP2005092695A/en
Application granted granted Critical
Publication of JP4232589B2 publication Critical patent/JP4232589B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Description

本発明は、待機冗長の二重化構成にした二重化コントローラ(プログラマブルコントローラ)における等値化処理等に関する。   The present invention relates to an equalization process and the like in a duplex controller (programmable controller) having a duplex configuration of standby redundancy.

現在、プラント、工場などでは、工作機械や計測装置等の機器のシーケンス制御に多くのプログラマブルコントローラ等のコントローラを用い、FA(ファクトリーオートメーション)化を実現している。   Currently, in plants, factories, etc., FA (factory automation) is realized by using many controllers such as programmable controllers for sequence control of machines such as machine tools and measuring devices.

このようなプログラマブルコントローラ・システムでは、信頼性を向上させるためにCPUモジュール(コントローラ本体)を待機冗長の2重化構成にする場合がある。待機冗長の冗長2重化構成は、2つのCPUモジュールを1組とし、一方を稼動系、他方を待機系とし、稼動系CPUモジュールを待機系CPUモジュールが監視して、稼動系CPUモジュールに障害等の切替え要因が生じたならば待機系CPUモジュールが稼動系に切り替る構成である。   In such a programmable controller system, in order to improve reliability, the CPU module (controller body) may have a standby redundant dual configuration. The redundant redundant configuration of standby redundancy consists of two CPU modules as one set, one as the active system and the other as the standby system. If a switching factor such as this occurs, the standby CPU module is switched to the active system.

図7に2重化して冗長性を持たせたコントローラの一般的なシステム構成を示す。
図示の2重化コントローラシステムは、CPUモジュール101−1、CPUモジュール101−2、及び各制御対象機器とのデータ入出力を行う複数のI/Oユニット102−1〜102−nより成るI/O群102から構成されている。尚、ここでは、CPUモジュール101−1が稼動系、CPUモジュール101−2がその待機系となっている場合を例にして説明する。
FIG. 7 shows a general system configuration of the controller which is duplicated to provide redundancy.
The duplex controller system shown in the figure includes an I / O unit including a CPU module 101-1, a CPU module 101-2, and a plurality of I / O units 102-1 to 102-n for inputting / outputting data to / from each control target device. The O group 102 is configured. Here, a case where the CPU module 101-1 is an active system and the CPU module 101-2 is a standby system will be described as an example.

稼動系となっているCPUモジュール101は、その内部に格納されたプログラム(通常、定周期に実行されるプログラム;定周期プログラム)を実行することで、各I/Oユニット102−1〜102−nに対して制御データを出力して(又は各I/Oユニットからセンサ計測値等を読み出して)、各制御対象機器を制御する。   The CPU module 101 which is an active system executes each of the I / O units 102-1 to 102-102 by executing a program stored therein (usually a program executed at regular intervals; a regular cycle program). Control data is output to n (or a sensor measurement value or the like is read from each I / O unit) to control each control target device.

一方、待機系となっているCPUモジュール101−2は、稼動系のCPUモジュール101−1を監視しており、稼動系CPUモジュール101−1に故障等の何らかの切替え要因が生じると、稼動/待機切り替え処理を実行して、CPUモジュール101−2が稼動系となって、CPUモジュール101-1が行っていた処理を引き継ぐ。   On the other hand, the standby CPU module 101-2 monitors the active CPU module 101-1, and if any switching factor such as a failure occurs in the active CPU module 101-1, the active / standby CPU module 101-1 is activated. By executing the switching process, the CPU module 101-2 becomes the active system, and the process performed by the CPU module 101-1 is taken over.

CPUモジュール101−1及びCPUモジュール101−2には、一定周期で起動されて実行される複数の定周期プログラム(ここでは、仮にA、B、Cの3つの定周期プログラム)が格納されており、稼動系となっているCPUモジュール101−1のみがこれらの定周期プログラムを実行してI/O機器の制御処理を行い、待機系となっているCPUモジュール101−2ではこれらの定周期プログラムは実行されない。これらの定周期プログラムには、優先レベルがあり(優先レベル:A>B>C)、優先レベルが高い定周期プログラムの起動周期になると、優先レベルの低い実行中の定周期プログラムは割り込みがかかって中断され、優先レベルの高い定周期プログラムが優先的に実行される。   The CPU module 101-1 and the CPU module 101-2 store a plurality of fixed-cycle programs that are activated and executed at a fixed cycle (here, three fixed-cycle programs A, B, and C). Only the CPU module 101-1 in the active system executes these periodic programs to perform control processing of the I / O device, and the CPU module 101-2 in the standby system executes these periodic programs. Is not executed. These fixed-cycle programs have priority levels (priority level: A> B> C). When the startup cycle of a fixed-cycle program with a high priority level is reached, the fixed-cycle program being executed with a low priority level is interrupted. The fixed-cycle program with a high priority level is preferentially executed.

CPUモジュール101−1、CPUモジュール101−2及びI/O群102は、システムバス103によって接続されており、稼動系CPUモジュール101−1はシステムバス103を介して各I/Oユニット102−1〜102−nに対して出力データ(制御データ)を送信し、またI/Oユニット102−1〜102−nからは接続されている制御対象機器からの計測値等の入力データを受信している。   The CPU module 101-1, the CPU module 101-2 and the I / O group 102 are connected by a system bus 103, and the active system CPU module 101-1 is connected to each I / O unit 102-1 via the system bus 103. Output data (control data) to 102-n, and input data such as measured values from connected control target devices is received from the I / O units 102-1 to 102-n. Yes.

また2重化されているCPUモジュール101−1とCPUモジュール101−2との間には等値化バス104を備え、稼動系/待機系の切替えが生じたときに制御データの整合性を持たせる為、この等値化バス104を介して稼動系CPUモジュール101−1から待機系CPUモジュール101−2に制御データを送信して等値化処理を行っている。   Further, an equalization bus 104 is provided between the duplicated CPU module 101-1 and CPU module 101-2 so that the control data is consistent when switching between the active system and the standby system occurs. Therefore, the equalization processing is performed by transmitting control data from the active CPU module 101-1 to the standby CPU module 101-2 via the equalization bus 104.

図8に示すように、従来の2重化コントローラでは、稼動系CPUモジュール101−1にて定周期プログラムA、B、Cが実行された場合、他の定周期プログラムによる処理が完了して固定で優先レベルが最も低い定周期プログラムCに処理が戻り、その定周期プログラムCによる演算処理が終了後に、定周期プログラムA、B、Cで使用される全ての制御データに対する等値化を行う。よって定周期プログラムA、B、C内で行われる各処理の実行順序は、入力処理→プログラム演算→出力処理となり、また最も優先レベルが低い定周期プログラムCは等値化処理が入るのでその処理実行順序は、入力処理→プログラム演算→制御データ等値化→出力処理となる。尚、図上に示す“入”が入力処理、“演”がプログラム演算、“等”が制御データ等値化、“出”が出力処理を意味する。   As shown in FIG. 8, in the conventional duplex controller, when the periodic programs A, B, and C are executed by the active system CPU module 101-1, processing by the other periodic programs is completed and fixed. Then, the processing returns to the fixed cycle program C having the lowest priority level, and after the calculation processing by the fixed cycle program C is completed, equalization is performed on all control data used in the fixed cycle programs A, B, and C. Therefore, the execution order of each process performed in the periodic programs A, B, and C is input processing → program calculation → output processing, and the periodic program C having the lowest priority level is subjected to equalization processing. The execution order is input processing → program operation → control data equalization → output processing. In the figure, “ON” means input processing, “Den” means program calculation, “etc.” means control data equalization, and “OUT” means output processing.

図9は、定周期プログラム実行中に稼動系/待機系CPUの切替えが発生した時のプログラムの実行状態を示す図である。尚、図9では、定周期プログラムはA〜Eの5つとなっているが、定周期プログラムが幾つであるかは関係ない(2つ以上であれば、本問題は発生する)。   FIG. 9 is a diagram showing a program execution state when the active / standby CPU is switched during execution of the fixed cycle program. In FIG. 9, there are five fixed-cycle programs A to E, but it does not matter how many fixed-cycle programs are present (if there are two or more, this problem occurs).

稼動系CPUモジュール101−1の各定周期プログラムの演算中に、稼動系/待機系切替え要因が発生した場合、稼動/待機の切替えを行って新たに稼動系となったCPUモジュール101−2は、制御データの整合性を保証するため、最後に制御データが等値化された図9のt1の時点の状態から処理を引き継いだ形で定周期プログラムを実行する。   When an active / standby system switching factor occurs during the calculation of each periodic program of the active system CPU module 101-1, the CPU module 101-2 that has newly become an active system by switching the active / standby system In order to guarantee the consistency of the control data, the fixed-cycle program is executed in the form of taking over the process from the state at the time t1 in FIG. 9 where the control data is finally equalized.

例えば、図9のt2の時点でCPUの切替え要因が発生した場合、新たに稼動系となるCPUモジュール101−2はt1の時点の状態からプログラムを実行する。しかしこの場合、定周期プログラムA、B、Cは、t2の時点で既にI/Oユニットに出力データの送信を行っている為、制御データとI/Oユニットからの出力の状態が不整合となる場合がある。また、最後に制御データが等値化された状態まで戻して処理を引き継ぐので戻り時間が大きくなってしまうことがある。   For example, when a CPU switching factor occurs at time t2 in FIG. 9, the CPU module 101-2 that newly becomes an active system executes the program from the state at time t1. However, in this case, since the periodic programs A, B, and C have already transmitted output data to the I / O unit at the time t2, the control data and the output state from the I / O unit are inconsistent. There is a case. In addition, since the control data is finally returned to the equalized state and the process is taken over, the return time may be increased.

また従来のコントローラでは、稼動系/待機系CPUの切替えが生じると切替え後の処理において、定周期プログラムの実行周期時間や各定周期プログラムの実行順番を維持できないという問題が生じる。   Further, in the conventional controller, when the active / standby CPU is switched, there is a problem that the execution cycle time of the fixed cycle program and the execution order of the fixed cycle programs cannot be maintained in the processing after the switching.

また従来のコントローラでは、稼動系/待機系CPUモジュールの切替えが生じると切替え後の処理において、定周期プログラムの実行周期時間や各定周期プログラムの実行順番を維持できないという問題が生じる。   In the conventional controller, when the active / standby CPU module is switched, there is a problem that the execution cycle time of the fixed cycle program and the execution order of the fixed cycle programs cannot be maintained in the processing after the switching.

以上説明した従来技術に関しては、例えば特許文献1、非特許文献1等に記載されている。
特開2002−149212号公報 「統合化制御システムMICREX−IXのコントロールステーションの制御機能」;富士時報 Vol.67 NO.6,1994、345−348頁
The related art described above is described in, for example, Patent Document 1, Non-Patent Document 1, and the like.
JP 2002-149212 A "Control function of the control station of the integrated control system MICREX-IX"; Fuji Time Report Vol. 67 NO. 6, 1994, pages 345-348

上述した問題に対して、本出願の出願人は、既に、特願2002−104380号の発明(以下、先出願と呼ぶ)を提案している。
尚、ここでは特に図示しないが、先出願の二重化コントローラシステムは、不図示のCPUモジュールa、CPUモジュールbを有し、図7の構成と同様、CPUモジュールa−CPUモジュールb間に等値化バスを設け、この等値化バスを介して等値化を行う構成であるものとする。また、ここでは、CPUモジュールaが稼動系、CPUモジュールbが待機系であるものとして説明する。
The applicant of the present application has already proposed the invention of Japanese Patent Application No. 2002-104380 (hereinafter referred to as a prior application) for the problems described above.
Although not specifically shown here, the dual controller system of the prior application has a CPU module a and a CPU module b (not shown), and is equalized between the CPU module a and the CPU module b as in the configuration of FIG. It is assumed that a bus is provided and equalization is performed via the equalization bus. In the following description, it is assumed that the CPU module a is an active system and the CPU module b is a standby system.

図10に示すように、先出願の二重化コントローラでは、稼動系CPUモジュールaにて定周期プログラムA、B、C(優先レベル:A>B>C)が実行される場合、各定周期プログラムの処理実行順番は、入力処理→プログラム演算→制御データ等値化→出力処理である。すなわち、各定周期プログラムA、B、Cを実行する毎に、制御データの等値化処理を行う(以下、このような等値化を“マルチ等値化”と呼ぶ。一方、上記従来の等値化を“シングル等値化”と呼ぶ)。このようなマルチ等値化を行うことによって、稼動/待機切り替えが生じたときに、等値化データとI/Oユニットへの出力データとの整合性が確保できると共に、稼動/待機切り替え時のオーバーヘッドを縮小できるという効果が得られる。   As shown in FIG. 10, in the duplex controller of the prior application, when the periodic program A, B, C (priority level: A> B> C) is executed in the active system CPU module a, The processing execution order is input processing → program operation → control data equalization → output processing. That is, every time each of the periodic programs A, B, and C is executed, control data equalization processing is performed (hereinafter, such equalization is referred to as “multi-equalization”. The equalization is called “single equalization”). By performing such multi-equalization, when operation / standby switching occurs, consistency between the equalized data and output data to the I / O unit can be ensured, and at the time of operation / standby switching. The effect that the overhead can be reduced is obtained.

また、従来のシングル等値化処理ではユーザが使用しているユーザデータを等値化しているのに対して、先出願のマルチ等値化処理では更にプログラム割り込み情報やプログラム実行スケジュール情報等のシステム情報も等値化している。   Further, in the conventional single equalization process, user data used by the user is equalized, whereas in the multi-equalization process of the prior application, a system such as program interrupt information and program execution schedule information is further provided. Information is also equalized.

図11はプログラム割り込み情報、図12はプログラム実行スケジュール情報の一例を示す図である。
図11では、定周期プログラムA、B,及びCと搭載している全ての定周期プログラムに対して、プログラム割込み情報としてプログラムカウンタや各種フラグやレジスタの値等を等値化している。尚、図11では、搭載されている全ての定周期プログラムに対しての情報をプログラム割込み情報として等値化しているが、等値化処理を行う時点で割込み退避されているプログラム等、必要なプログラムに対する情報のみを等値化する構成としても良い。また、尚、プログラムカウンタは、各定周期プログラム毎に、最後に実行したプログラム(行)を示すものである。
11 shows an example of program interrupt information, and FIG. 12 shows an example of program execution schedule information.
In FIG. 11, the program counter, various flags, register values, and the like are equalized as program interrupt information for all the periodic programs installed as the periodic programs A, B, and C. In FIG. 11, the information for all installed periodic programs is equalized as program interrupt information. However, a program that has been saved as an interrupt at the time of equalization processing is required. Only the information for the program may be equalized. The program counter indicates the last executed program (row) for each fixed cycle program.

稼動/待機の切替えが行われ、新たに稼働系となったCPUモジュールbは、等値化してあるプログラム割込み情報を使用して、割込み中断されていたプログラム実行を、中断時の状態から継続して行うことができる。   The CPU module b that has been switched to active / standby and becomes a new active system uses the program interrupt information that has been equalized to continue the program execution that was interrupted from the state at the time of interruption. Can be done.

また、図12に示すプログラム実行スケジュール情報は、各定周期プログラム毎に、その定周期プログラムの実行周期である定周期設定時間や、その定周期プログラムを前回実行した後の経過時間を示す実行周期経過時間等である。   The program execution schedule information shown in FIG. 12 includes, for each fixed-cycle program, a fixed-cycle setting time that is the execution cycle of the fixed-cycle program, and an execution cycle that indicates an elapsed time after the previous fixed-cycle program is executed. Elapsed time etc.

上記先出願の二重化コントローラシステムにおいては、稼動/待機の切り替えが起きると、図13に示すように、新たに稼動系になったCPUモジュールbは、等値化されていたシステム情報を元に、中断された定周期プログラムB、Cを、それぞれ、中断時点の状態から継続させて制御を続けることができる。図示の例では、定周期プログラムBを実行中に何らかの異常が発生した為に、稼動/待機の切り替えが行われたが、上記先出願ではシステム情報も等値化されているので、新たに稼動系になったCPUモジュールbは、定周期プログラムBの中断時点から継続してプログラム実行することができる。   In the duplexed controller system of the above-mentioned prior application, when the operation / standby switching occurs, as shown in FIG. 13, the CPU module b which has newly become the active system is based on the equalized system information. Control can be continued by continuing the interrupted fixed-cycle programs B and C from the state at the time of suspension. In the example shown in the figure, the operation / standby switching was performed because some abnormality occurred during the execution of the periodic program B. However, since the system information is equalized in the above-mentioned prior application, the operation is newly started. The CPU module b that has become a system can continuously execute the program from the point of interruption of the periodic program B.

しかしながら、このような制御は、CPUモジュールaが保持する定周期プログラムと、CPUモジュールbが保持する定周期プログラムとが一致していることが前提条件になっている。   However, such control is based on the precondition that the fixed cycle program held by the CPU module a matches the fixed cycle program held by the CPU module b.

もし、稼動系のCPUモジュールaが保持する定周期プログラムと待機系のCPUモジュールbが保持する定周期プログラムとが同一ではない場合、例えば図14に示すように稼動系のCPUモジュールaは定周期プログラムB、待機系のCPUモジュールbは定周期プログラムB’(B’はBの一部を変更したもの、すなわち改造版、バージョンアップ版等とする)を保持している状態で、稼動/待機切り替えが起きると、例えばプログラムカウンタが一致しないまま、定周期プログラムB’を実行をしてしまい、継続して制御ができなくなるという問題点があった。   If the fixed cycle program held by the active CPU module a is not the same as the fixed cycle program held by the standby CPU module b, for example, as shown in FIG. The program B and the standby CPU module b operate / standby while holding the periodic program B ′ (B ′ is a modified version of B, ie, a modified version, an upgraded version, etc.) When switching occurs, for example, the fixed cycle program B ′ is executed without matching the program counters, and there is a problem that control cannot be continued.

上記稼動系と待機系とで定周期プログラムが同一ではない場合とは、例えば以下に説明する状況で起こりえる。
すなわち、プログラマブルコントローラの運用現場では、現地で定周期プログラムの一部改造を行う場合があり、その際、システムを止めずに、改造後の定周期プログラムが正常に動作できるか否かを確認したい場合がある。この場合、稼動系のCPUモジュールaが定周期プログラム実行中に、待機系のCPUモジュールbに対してのみ改造後の定周期プログラムをダウンロードする。その後、稼動/待機切り替えを行い、新たに稼動系となったCPUモジュールbにおいて改造後の定周期プログラムを実行して、正常動作するか否かを確認する。もし、異常動作した場合には、再度、稼動/待機切り替えを行い、再度稼動系となったCPUモジュールaによって改造前の定周期プログラムが実行される状態に戻すと共に、待機系になったCPUモジュールbの定周期プログラムを改造前の状態に戻す。一方、もし正常動作することを確認できた場合には、稼動/待機の再切り替えは行わずに、CPUモジュールa(待機系になっている)に対して改造後の定周期プログラムをダウンロードする。
The case where the periodic program is not the same between the active system and the standby system may occur, for example, in the situation described below.
In other words, at the operation site of the programmable controller, there is a case where the fixed-cycle program is partially modified locally, and at that time, it is desired to check whether the fixed-cycle program after the modification can operate normally without stopping the system. There is a case. In this case, the modified periodic program is downloaded only to the standby CPU module b while the active CPU module a is executing the periodic program. Thereafter, the operation / standby switching is performed, and the fixed-cycle program after remodeling is executed in the CPU module b which has newly become an active system, and it is confirmed whether or not normal operation is performed. If an abnormal operation occurs, the operation / standby switching is performed again, and the CPU module a that has become active again returns to the state in which the fixed-cycle program before modification is executed, and the CPU module that has become standby. Return the periodic program of b to the state before the modification. On the other hand, if it can be confirmed that the operation is normal, the fixed-cycle program after the modification is downloaded to the CPU module a (in the standby system) without switching the operation / standby again.

以上述べた状況では、稼動系のCPUモジュールと待機系のCPUモジュールとで相互に定周期プログラムとが不一致となる時間帯が存在することになる。
あるいは、どちらか一方のCPUモジュールが故障する等してCPUモジュールを交換した場合(もし、稼動系のCPUモジュールが故障した場合、待機系のCPUモジュールが新たな稼動系となるが、通常、その後、人手により、故障したCPUモジュールを別のものに交換する)、交換したCPUモジュールには、本来、ペアCPUと同じ定周期プログラムが格納されているはずであるが、例えば人的ミス等により、異なる定周期プログラムが格納されている可能性がある。尚、ここで言う“異なる定周期プログラム”とは、全く異なることを意味するのではない。上記の通り、各定周期プログラムは、通常、随時改造(バージョンアップ)を行うものであり、ここではバージョンが異なる事を意味するものとする。
In the situation described above, there is a time zone in which the fixed-cycle program does not match between the active CPU module and the standby CPU module.
Or, if one of the CPU modules fails, etc., and the CPU module is replaced (if the active CPU module fails, the standby CPU module becomes a new active system, , Manually replace the failed CPU module with another one), the replaced CPU module should originally contain the same periodic program as the paired CPU, but due to human error, for example, A different periodic program may be stored. It should be noted that “different periodic program” mentioned here does not mean that it is completely different. As described above, each periodic program is usually remodeled (upgrade) at any time, and here, it means that the versions are different.

また、あるいは、新たなシステムを構築する場合、新たに設置した稼動/待機の2つのCPUモジュールには、同じ定周期プログラムが格納されているはずであるが、例えば人的ミス等により、相互に異なる定周期プログラムが格納されている場合も有り得る。例えば、一方には新バージョンを格納したのに、他方には間違えて旧バージョンの定周期プログラムを格納してある場合も有り得る。   Alternatively, when constructing a new system, the newly installed active / standby CPU modules should store the same periodic program. However, due to human error, for example, There may be cases where different periodic programs are stored. For example, there may be a case in which a new version is stored on one side and an old version of the periodic program is stored on the other side by mistake.

上述した状況は一例であるが、とにかく、何らかの理由で、本来同一であるべき稼動系CPUモジュールの定周期プログラムと待機系CPUモジュールの定周期プログラムとが同一ではなくなっている場合があり、このような状態で稼動/待機切り替えが生じると、上述した問題が発生することになる。

本発明の課題は、定周期プログラムの制御データ等値化処理の際に、各定周期プログラム実行毎に制御データ等値化処理を行うマルチ等値化を行う2重化コントローラシステムであって、稼動系と待機系とで相互に定周期プログラムが異なっていても問題なく稼動/待機切り替え後の制御が行える2重化コントローラシステム、その方法等を提供することである。
The situation described above is an example, but anyway, for some reason, the fixed-cycle program of the active CPU module and the fixed-cycle program of the standby CPU module that should be the same may not be the same. If the operation / standby switching occurs in such a state, the above-described problem occurs.

An object of the present invention is a duplex controller system for performing multi-equalization in which control data equalization processing is performed for each execution of a fixed-cycle program during control data equalization processing of a fixed-cycle program, To provide a duplex controller system capable of performing control after operation / standby switching without problems even if the periodic programs differ between the active system and the standby system, and a method thereof.

本発明による二重化コントローラシステムは、稼動系と待機系のコントローラを有し、複数の定周期プログラムを実行する2重化コントローラシステムにおいて、前記稼動系のコントローラ、待機系のコントローラは、それぞれ、前記稼動系コントローラにおいて各定周期プログラムが実行される毎に、システム情報も等値化するマルチ等値化処理を実行する等値化処理手段と、互いに他方のコントローラの定周期プログラムを読み出し、自コントローラの定周期プログラムと一致するか否かを照合する照合手段と、該照合手段によって不一致と判定された場合には、システム情報を必要としないシングル等値化モードによる等値化処理に切り替える等値化モード切替手段とを有するように構成する。   The duplex controller system according to the present invention has an active system and a standby system controller, and in a duplex controller system that executes a plurality of fixed-cycle programs, the active system controller and the standby system controller are respectively connected to the active system. Each time each periodic program is executed in the system controller, the equalization processing means for executing the multi-equalization process for equalizing the system information and the other controller's fixed period program are read from each other, and Equalization that switches to equalization processing in a single equalization mode that does not require system information when it is determined that there is a mismatch by the collation means for collating whether or not it matches the periodic program And mode switching means.

上述した構成の二重化コントローラシステムでは、通常時、先出願と同様、各定周期プログラム実行毎に等値化処理を行うマルチ等値化処理を実行しているので、等値化データとI/Oユニットへの出力データとの整合性が確保できると共に稼動/待機切り替え時のオーバーヘッドを縮小できる。更にこのマルチ等値化処理ではシステム情報も等値化されているので、稼動/待機切り替え要因が発生した場合、新たに稼動系になったコントローラは、定周期プログラムの中断時点から継続してプログラム実行することができる。   In the duplexed controller system having the above-described configuration, since the multi-equalization process is performed in the normal state, the multi-equalization process for performing the equalization process for each execution of the fixed-cycle program is executed as in the prior application. Consistency with the output data to the unit can be ensured and overhead during switching between operation and standby can be reduced. Furthermore, since the system information is also equalized in this multi-equalization process, if an operation / standby switching factor occurs, the newly active controller will continue to program from the point at which the periodic program is interrupted. Can be executed.

しかしながら、各コントローラが保持する定周期プログラムが相互に異なる場合(例えば、一方のみバージョンアップ版となった場合等)、等値化されたシステム情報を用いてプログラムの継続実行しようとすると、問題が生じる。   However, if the periodic programs held by each controller are different from each other (for example, when only one version is upgraded), there is a problem when trying to continue executing the program using equalized system information. Arise.

よって、上記照合手段によってプログラム不一致と判定された場合には、一時的に、シングル等値化モード(従来の等値化手法)へと切り替える。シングル等値化モードでは、定周期プログラムの中断時点から継続してプログラム実行することはできないので、上記の問題が生じることはない。尚、後にオペレータ等によって2つのコントローラの定周期プログラムを一致させる為の作業が行われた後には、再び、マルチ等値化モードへ戻すことになる。   Therefore, when it is determined that the program does not match by the checking means, the mode is temporarily switched to the single equalization mode (conventional equalization method). In the single equalization mode, since the program cannot be continuously executed from the point of interruption of the fixed cycle program, the above problem does not occur. It should be noted that after the operator or the like later performs an operation for matching the fixed period programs of the two controllers, the multi-equalization mode is restored.

前記照合手段による照合処理は、例えば、システムイニシャル時に実行する。
または、前記照合手段による照合処理は、例えば、前記稼動系コントローラが運用中に待機系コントローラが起動した時、該待機系コントローラにおいては該起動に伴って実行され、前記稼動系コントローラにおいては起動した待機系コントローラから出されるチェック要求に応じて実行される。
The collation process by the collation means is executed at the time of system initialization, for example.
Or, for example, when the standby controller is activated while the active controller is in operation, the verification process by the verification unit is executed in the standby controller along with the activation, and is activated in the active controller. It is executed in response to a check request issued from the standby controller.

あるいは、前記照合手段による照合処理は、前記稼動/待機系の両方のコントローラが運用中に、一方のコントローラの定周期プログラムが変更されたとき、該一方のコントローラにおいては該プログラム変更に伴って実行され、他方のコントローラにおいては前記一方のコントローラから出されるチェック要求に応じて実行される。   Alternatively, the collating process by the collating means is executed when the fixed-cycle program of one controller is changed while both the active / standby controllers are in operation, in accordance with the program change. The other controller is executed in response to a check request issued from the one controller.

上記チェック要求を出すのは、シングル等値化とマルチ等値化とでは、等値化するデータが異なる為(上記の通り、マルチ等値化ではシステム情報も等値化している)、どちらか一方のコントローラのみ、等値化モードを変更するのは問題が生じる為である。   Either the single equalization or the multi-equalization uses the same check request because the data to be equalized is different (as described above, the system information is also equalized in the multi-equalization). Only one controller changes the equalization mode because of a problem.

また、例えば、前記照合手段による照合処理実行中は、フェイルセーフの考え方により、定周期プログラムの一致/不一致に関係なく、前記シングル等値化モードによる等値化処理を実行する。   Further, for example, during the collation processing by the collation means, the equalization processing by the single equalization mode is executed regardless of the coincidence / non-coincidence of the periodic programs based on the fail-safe concept.

本発明の2重化コントローラシステム、そのプログラム単位等値化方法によれば、定周期プログラムの等値化処理において、各定周期プログラム実行毎にシステム情報を含むデータ等値化処理を行うことで、上記先出願の効果、すなわち等値化データとI/Oユニットへの出力データとの整合性が確保でき、稼動/待機切り替え時のオーバーヘッドを縮小でき、更に中断途中からプログラムを継続実行できるという効果が得られると共に、更に、稼動系と待機系とで定周期プログラムが異なる可能性がある場合に、稼動系、待機系それぞれにおいて相互に定周期プログラムが同一であるか否かはチェックして、同一ではない場合にはシングル等値化モードに移行することで、定周期プログラムが異なっていても問題なく稼動/待機切り替え後の制御が行える。   According to the duplex controller system and the program unit equalization method of the present invention, in the equalization processing of the fixed cycle program, the data equalization processing including the system information is performed for each execution of the fixed cycle program. The effect of the prior application, that is, the consistency between the equalized data and the output data to the I / O unit can be secured, the overhead at the time of switching between operation and standby can be reduced, and the program can be continuously executed from the middle of the interruption. If there is a possibility that the periodic program is different between the active system and the standby system, check whether the regular program is the same between the active system and the standby system. If they are not the same, it is possible to switch to single equalization mode, so that even if the periodic program is different, there is no problem after switching between operation and standby. Control can be performed.

以下、図面を参照して、本発明の実施の形態について説明する。
図1は、本実施の形態による2重化コントローラシステムにおけるプログラマブルコントローラ本体(CPUモジュール)の構成ブロック図である。
Embodiments of the present invention will be described below with reference to the drawings.
FIG. 1 is a configuration block diagram of a programmable controller main body (CPU module) in a duplex controller system according to the present embodiment.

図1に示す2重化コントローラシステムは、CPUモジュール1、CPUモジュール2とを有し、CPUモジュール1、CPUモジュール2、及び不図示の各種I/O群は、システムバス4を介して接続されている。更に、CPUモジュール1とCPUモジュール2との間には等値化バス3が設けられている。尚、ここでは、CPUモジュール1が稼動系、CPUモジュール2がその待機系となっているものとして説明する。   The duplex controller system shown in FIG. 1 includes a CPU module 1 and a CPU module 2, and the CPU module 1, the CPU module 2, and various I / O groups (not shown) are connected via a system bus 4. ing. Further, an equalization bus 3 is provided between the CPU module 1 and the CPU module 2. In the following description, it is assumed that the CPU module 1 is an active system and the CPU module 2 is a standby system.

CPUモジュール1、2は、プログラマブルコントローラ本体であるが、ここでは本例の説明に係わる構成のみを示し、他の構成は省略して示す。
図1において、稼動系のCPUモジュール1は、プログラムRAM11、データRAM12、等値化バス制御部13、受信バッファ用RAM14、及び制御部15等を有する。これら以外の構成については、上記の通り、ここでの説明には特に関係ないので省略している。
The CPU modules 1 and 2 are programmable controller bodies, but only the configuration relating to the description of this example is shown here, and the other configurations are omitted.
In FIG. 1, the active CPU module 1 includes a program RAM 11, a data RAM 12, an equalization bus control unit 13, a reception buffer RAM 14, a control unit 15, and the like. Other configurations are omitted because they are not particularly relevant to the description here, as described above.

プログラムRAM11には、ユーザプログラム11aが格納される。ユーザプログラム11aとは、例えば上記定周期プログラムである。尚、本例のシステムにおいては、プログラムRAM11には、更に、後述する図2〜図4に示すCPUモジュール1側の処理を制御部15によって実現させるアプリケーションプログラムも格納されている。   The program RAM 11 stores a user program 11a. The user program 11a is, for example, the above periodic program. In the system of this example, the program RAM 11 further stores an application program for realizing the processing on the CPU module 1 side shown in FIGS.

データRAM12は、ユーザデータ領域12aを有する。ユーザデータ領域12aには、例えば各定周期プログラム毎に対応する等値化データ(ユーザデータ)が格納されている。   The data RAM 12 has a user data area 12a. For example, equalization data (user data) corresponding to each fixed cycle program is stored in the user data area 12a.

等値化バス制御部13は、等値化バス3を介して等値化を行う為の等値化処理専用の構成であり、制御部15から等値化すべきデータを渡されると、待機側の等値化バス制御部23と連動して、この等値化データを待機側の受信バッファ用RAM24に格納させる機能を有する。尚、等値化バス制御部13は、例えば上記非特許文献1記載の“SGM(Sameness data Gather Memory control)”に相当する。   The equalization bus control unit 13 is a configuration dedicated to equalization processing for performing equalization via the equalization bus 3. When data to be equalized is passed from the control unit 15, In conjunction with the equalization bus controller 23, the equalization data is stored in the reception buffer RAM 24 on the standby side. The equalization bus control unit 13 corresponds to “SGM (Sameness data Gather Memory control)” described in Non-Patent Document 1, for example.

制御部15は、CPUモジュール1全体を制御する中央処理装置(CPUチップ等)であり、上記プログラムRAM11に格納されているアプリケーションプログラムを用いて、通常時は先出願と同様のマルチ等値化による等値化処理を実行し、定周期プログラムの一致/不一致を確認する必要がある状況では図2〜図4に示すCPUモジュール1側の処理を実行し、場合によっては一時的にシングル等値化による等値化処理へと移行する。つまり、制御部15は、各定周期プログラム実行毎に等値化を行うと共にこの等値化データにはシステム情報も含むようにするマルチ等値化処理を実行する等値化処理機能と、待機系のCPUモジュール2の定周期プログラムを読み出し、自CPUモジュールの定周期プログラムと一致するか否かの照合を行う照合機能と、この照合機能によって不一致と判定された場合には、上記等値化処理を、システム情報を必要としないシングル等値化モードによる等値化処理に切り替える等値化モード切替機能とを実現する。また、制御部15は、その内部のメモリに、上記システム情報を保持している。   The control unit 15 is a central processing unit (CPU chip or the like) that controls the entire CPU module 1, and normally uses multi-equalization similar to that of the prior application by using an application program stored in the program RAM 11. In a situation where it is necessary to execute equalization processing and confirm the coincidence / non-coincidence of the periodic programs, the CPU module 1 side processing shown in FIGS. The process shifts to the equalization process. That is, the control unit 15 performs equalization for each execution of each periodic program, and performs an equalization processing function for executing multi-equalization processing so that the equalized data includes system information, and standby The periodic function of the CPU module 2 of the system is read, and a collation function for collating whether or not it coincides with the regular period program of its own CPU module; An equalization mode switching function for switching the processing to an equalization process in a single equalization mode that does not require system information is realized. Further, the control unit 15 holds the system information in its internal memory.

また、待機系のCPUモジュール2は、プログラムRAM21、データRAM22、等値化バス制御部23、受信バッファ用RAM24、及び制御部25等を有する。この構成自体は、稼動系のCPUモジュール1と同じであるので、特に説明しないが、制御部25は、プログラムRAM21に格納されているアプリケーションプログラムを用いて、後述する図2〜図4に示すCPUモジュール2側の処理を実行する。また、制御部25は、制御部15とは異なり、各定周期プログラムの実行は行っていない。但し、これは、CPUモジュール2が待機系のときの話であり、稼動系のときには制御部25は各定周期プログラムの実行も行う。   The standby CPU module 2 includes a program RAM 21, a data RAM 22, an equalization bus control unit 23, a reception buffer RAM 24, a control unit 25, and the like. Since this configuration itself is the same as that of the active CPU module 1, although not specifically described, the control unit 25 uses an application program stored in the program RAM 21 to perform the CPU shown in FIGS. The process on the module 2 side is executed. Further, unlike the control unit 15, the control unit 25 does not execute each periodic program. However, this is a story when the CPU module 2 is a standby system, and when it is an active system, the control unit 25 also executes each periodic program.

図2、図3、図4に、制御部15、制御部25によって実行される等値化モード決定処理の具体例を示す。尚、図2〜図4の処理は、基本的には同じであり、上記“発明が解決しようとする課題”で述べた様々な状況に応じて、図2、図3、図4に各々示す場合に、稼動系と待機系とで定周期プログラムが一致するか否かをチェックし、必要に応じて一時的にシングル等値化モードへ移行する。尚、図2〜図4におけるCPUモジュール1−CPUモジュール2間のコマンド、プログラム送受信は、等値化バス3を介して行ってもよいし、システムバス4を介して行ってもよい。   2, 3, and 4 show specific examples of the equalization mode determination process executed by the control unit 15 and the control unit 25. The processes in FIGS. 2 to 4 are basically the same, and are shown in FIGS. 2, 3, and 4, respectively, according to various situations described in the above “problem to be solved by the invention”. In such a case, it is checked whether or not the fixed cycle programs match between the active system and the standby system, and if necessary, the mode is temporarily shifted to the single equalization mode. Note that commands and programs between the CPU module 1 and the CPU module 2 in FIGS. 2 to 4 may be transmitted / received via the equalization bus 3 or the system bus 4.

図2は、第1の実施例による等値化モード決定処理のフローチャート図である。
第1の実施例では、稼動系/待機系CPUモジュールの両方をほぼ一緒に起動したときに、等値化モード決定処理を実行する。これは、例えば上述した“稼動系/待機系CPUモジュールを新たに設置した場合”等を想定している。
FIG. 2 is a flowchart of the equalization mode determination process according to the first embodiment.
In the first embodiment, the equalization mode determination process is executed when both the active system / standby system CPU modules are activated almost together. This assumes, for example, the above-mentioned case “when an active / standby CPU module is newly installed”.

図2に示すように、稼動系のCPUモジュール1の制御部15は、システムイニシャル時、アプリケーションプログラム(定周期プログラム)の照合要求を出すと(ステップS11)、まず、それまでの等値化モードが何であるかに係わらず、強制的にシングル等値化モードにする(ステップS12)。つまり、フェイルセーフの考え方により、当該等値化モード決定処理中は、シングル等値化モードによる等値化処理を実行させる。次に、待機系のCPUモジュール2に対して、プログラム読出しコマンドを送信し、これに対して後述する待機系のCPUモジュール2側のステップS23の処理によって返信されてくる待機系のCPUモジュール2側のアプリケーションプログラムを受信して、例えば不図示のバッファ等に格納する(ステップS13)。   As shown in FIG. 2, when the controller 15 of the active CPU module 1 issues a collation request for an application program (fixed cycle program) at the time of system initialization (step S11), first, the equalization mode up to that time is first Regardless of what is, the single equalization mode is forcibly set (step S12). In other words, the equalization process in the single equalization mode is executed during the equalization mode determination process according to the fail-safe concept. Next, a program read command is transmitted to the standby CPU module 2, and the standby CPU module 2 side returned in response to the processing of step S23 on the standby CPU module 2 side to be described later. Are stored in a buffer (not shown), for example (step S13).

また、別途、後述する待機系のCPUモジュール2側のステップS24の処理によって、待機系のCPUモジュール2側からプログラム読出しコマンドが送られてきた場合には、稼動系のCPUモジュール1側のアプリケーションプログラムを待機系のCPUモジュール2に返信する(ステップS14)。   In addition, when a program read command is sent from the standby CPU module 2 side by the processing in step S24 on the standby CPU module 2 side, which will be described later, an application program on the active CPU module 1 side Is returned to the standby CPU module 2 (step S14).

次に、稼動系のCPUモジュール1は、ステップS13で受信・格納した待機系のCPUモジュール2側のアプリケーションプログラムと、自己のアプリケーションプログラムとの照合を行い、両者が一致するか否かを判定する(ステップS15)。この照合・一致判定は、既存の手法を用いればよく、例えば各プログラムを一行ずつ比較して一致・不一致を判定し、たとえ1行でも不一致である場合には、不一致と判定する。また、ここでは、プログラム不一致といっても、全く異なることは想定していない。例えば同じ定周期プログラムAであっても、例えばバージョン等が異なる場合等を想定している。よって、上記照合は、例えば、稼動系のCPUモジュール1の定周期プログラムAと、待機系のCPUモジュール2の定周期プログラムAとを比較・照合する。勿論、他の定周期プログラムB,C等も同様に比較・照合する。そして、全ての定周期プログラムが一致する場合に、一致と判定する。   Next, the active CPU module 1 collates the application program on the standby CPU module 2 side received and stored in step S13 with its own application program, and determines whether or not they match. (Step S15). For this collation / coincidence determination, an existing method may be used. For example, each program is compared line by line to determine coincidence / non-coincidence. In addition, here, it is not assumed that the program mismatch is completely different. For example, it is assumed that the same periodic program A has different versions. Therefore, for example, the collation compares and collates the fixed cycle program A of the active CPU module 1 with the fixed cycle program A of the standby CPU module 2. Of course, other periodic programs B, C, etc. are similarly compared and verified. When all the fixed cycle programs match, it is determined that they match.

もし一致すると判定された場合には等値化処理はマルチ等値化モードに変更し(上記ステップS12の処理によりシングル等値化モードになっているので)、もし不一致と判定された場合には等値化処理はシングル等値化モードのままとする(ステップS16)。   If it is determined that they match, the equalization processing is changed to the multi-equalization mode (because the processing in step S12 is in the single equalization mode), and if it is determined that they do not match, The equalization process remains in the single equalization mode (step S16).

尚、マルチ等値化モードとは、上述してある通り、上記先出願の等値化処理、すなわち各定周期プログラム実行毎に等値化を行うと共に該等値化データにはシステム情報も含むようにする等値化処理を実行するモードである。また、シングル等値化モードは、上述してある通り、従来の等値化処理、すなわち優先レベルが最も低い定周期プログラムの演算処理が終了後に、全ての定周期プログラムで使用される全ての制御データに対する等値化処理を実行するモードであり、このモードではシステム情報は等値化する必要はない。   The multi-equalization mode is, as described above, equalization processing of the above-mentioned prior application, that is, equalization is performed every execution of each periodic program, and the equalization data includes system information. In this mode, the equalization process is executed. In addition, as described above, the single equalization mode is used for all the controls used in all the periodic programs after the conventional equalization process, that is, the computation process of the periodic program with the lowest priority level is completed. In this mode, equalization processing is performed on data. In this mode, system information does not need to be equalized.

一方、図2における待機系のCPUモジュール2側の等値化モード決定処理は、稼動系のCPUモジュール1のそれと、ほぼ同じである。すなわち、制御部25は、システムイニシャル時、アプリケーションプログラム(定周期プログラム)の照合要求を出すと(ステップS21)、まず、それまでの等値化モードが何であるかに係わらず、強制的にシングル等値化モードにする(ステップS22)。つまり、フェイルセーフの考え方により、当該等値化モード決定処理中は、シングル等値化モードによる等値化処理を実行させる。次に、稼動系のCPUモジュール1側のアプリケーションプログラムの読み出しを行う(ステップS24)。   On the other hand, the equalization mode determination process on the standby CPU module 2 side in FIG. 2 is almost the same as that of the active CPU module 1. That is, when the control unit 25 issues a verification request for an application program (fixed cycle program) at the time of system initialization (step S21), first, regardless of what the previous equalization mode is, a forced single The equalization mode is set (step S22). In other words, the equalization process in the single equalization mode is executed during the equalization mode determination process according to the fail-safe concept. Next, the application program on the active CPU module 1 side is read (step S24).

また、稼動系のCPUモジュール1側のステップS13の処理によって、稼動系のCPUモジュール1側からプログラム読出しコマンドが送られてきた場合には、待機系のCPUモジュール2側のアプリケーションプログラムを稼動系のCPUモジュール1に返信する(ステップS23)。   Further, when a program read command is sent from the active CPU module 1 side by the processing of step S13 on the active CPU module 1, the application program on the standby CPU module 2 side is executed. A reply is sent to the CPU module 1 (step S23).

そして、自己のアプリケーションプログラムと稼動系のCPUモジュール1のアプリケーションプログラムとの照合を行い(ステップS25)、上記ステップS16と同様、その一致/不一致に応じて等値化モードを決定する(ステップS26)。   Then, the own application program and the application program of the active CPU module 1 are collated (step S25), and the equalization mode is determined according to the coincidence / mismatch as in step S16 (step S26). .

図3は、第2の実施例による等値化モード決定処理のフローチャート図である。
第2の実施例は、稼動系のCPUモジュール1が既に運転中の状態で、待機系のCPUモジュール2が立ち上がったときの等値化モード決定処理である。これは、例えば、上述した“一方のCPUモジュールが故障等した為、交換した場合”を想定している。
FIG. 3 is a flowchart of the equalization mode determination process according to the second embodiment.
The second embodiment is an equalization mode determination process when the active CPU module 1 is already in operation and the standby CPU module 2 starts up. This assumes, for example, “when one CPU module has been replaced because it has failed or the like”.

図3において、図2の処理と略同一の処理については同一のステップ番号を付してある。ここでは、図2の処理とは異なる部分についてのみ説明する。
図3の処理では、待機系のCPUモジュール2は、イニシャル処理によって起動すると、稼動系のCPUモジュール1が運用中であるか否かをチェックし、運用中である場合には、自己に対してアプリケーションプログラム(定周期プログラム)の照合要求を出して等値化モード決定処理を開始させるだけでなく、稼動系のCPUモジュール1に対して、アプリケーションプログラム照合要求コマンドを発行する(ステップS31)。尚、上記チェックの結果、運用中ではなかった場合には、図2の処理を行うことになる。
In FIG. 3, processes that are substantially the same as the processes in FIG. 2 are given the same step numbers. Here, only parts different from the processing of FIG. 2 will be described.
In the process of FIG. 3, when the standby CPU module 2 is activated by the initial process, the standby CPU module 2 checks whether or not the active CPU module 1 is in operation. In addition to issuing an application program (fixed cycle program) verification request and starting the equalization mode determination process, an application program verification request command is issued to the active CPU module 1 (step S31). If the result of the check indicates that the system is not in operation, the processing of FIG. 2 is performed.

稼動系のCPUモジュール1は、このアプリケーションプログラム照合要求コマンドを受信すると、等値化モード決定処理を開始する(ステップS41)。つまり、第1の実施例と比較すると、第2の実施例の場合は稼動系のCPUモジュール1は運用中であり、等値化モード決定処理開始のトリガとなるイニシャル処理が行われないが、本例の手法では稼動系のCPUモジュール1と待機系のCPUモジュール2とが同じ等値化モードにならなければ意味がない為、稼動系のCPUモジュール1においても等値化モード決定処理を行わせる為に、上記アプリケーションプログラム照合要求コマンドを発行する。その後の稼動系のCPUモジュール1側のステップS12〜S17、待機系のCPUモジュール2側のステップS22〜S27の処理は、図2の処理と略同様である。   When the active CPU module 1 receives the application program verification request command, it starts the equalization mode determination process (step S41). That is, compared with the first embodiment, in the case of the second embodiment, the active CPU module 1 is in operation and the initial process that triggers the start of the equalization mode determination process is not performed. In the method of this example, since there is no meaning unless the active CPU module 1 and the standby CPU module 2 are in the same equalization mode, the equalization mode determination process is also performed in the active CPU module 1. Therefore, the application program verification request command is issued. The subsequent steps S12 to S17 on the active CPU module 1 side and steps S22 to S27 on the standby CPU module 2 side are substantially the same as the processing in FIG.

図4は、第3の実施例による等値化モード決定処理のフローチャート図である。
第3の実施例では、例えば上述してあるように、どちらか一方のCPUモジュール(ここでは稼動系のCPUモジュール1)のアプリケーションプログラムが変更されたとき、他方のCPUモジュールは変更されていない場合もあるので、当該等値化モード決定処理を行う。
FIG. 4 is a flowchart of the equalization mode determination process according to the third embodiment.
In the third embodiment, for example, as described above, when an application program of one of the CPU modules (here, the active CPU module 1) is changed, the other CPU module is not changed. Therefore, the equalization mode determination process is performed.

図4において、図2の処理と略同一の処理については同一のステップ番号を付してある。ここでは、図2の処理とは異なる部分についてのみ説明する。
まず、図1には特に図示しなかったが、通常、各CPUモジュール1,2には、例えば何らかの専用線を介して、プログラマブルコントローラ支援装置5が接続されており、プログラマブルコントローラ支援装置5から既存のアプリケーションプログラムの改造版、バージョンアップ版等をダウンロードする。
In FIG. 4, the same step number is attached | subjected about the process substantially the same as the process of FIG. Here, only parts different from the processing of FIG. 2 will be described.
First, although not specifically shown in FIG. 1, a programmable controller support device 5 is usually connected to each of the CPU modules 1 and 2 via, for example, some dedicated line. Download the modified version, upgraded version, etc.

図示の場合、一例として、既存のアプリケーションプログラムCの変更版C’をダウンロードするものとする。
稼動系のCPUモジュール1は、プログラマブルコントローラ支援装置5から、変更コマンドと共に上記変更版のアプリケーションプログラムC’が送られてくると(ステップS51)、まず、メモリ等に保持している既存のアプリケーションプログラムCを、変更版のアプリケーションプログラムC’に置き換える処理を実行し(ステップS52)、続いて、自己に対してアプリケーションプログラム(定周期プログラム)の照合要求を出して等値化モード決定処理を開始させるだけでなく、待機CPU2に対して、アプリケーションプログラム照合要求コマンドを発行する(ステップS53)。
In the case shown in the figure, as an example, a modified version C ′ of an existing application program C is downloaded.
When the CPU module 1 of the active system receives the above-mentioned changed version of the application program C ′ from the programmable controller support device 5 together with the change command (step S51), first, the existing application program held in the memory or the like. A process of replacing C with the modified version of the application program C ′ is executed (step S52), and subsequently, a request for collation of the application program (fixed period program) is issued to start the equalization mode determination process. In addition, an application program verification request command is issued to the standby CPU 2 (step S53).

待機系のCPUモジュール2は、このアプリケーションプログラム照合要求コマンドを受信すると、等値化モード決定処理を開始する(ステップS61)。つまり、第1の実施例と比較すると、第2の実施例の場合は待機系のCPUモジュール2では等値化モード決定処理開始のトリガとなるイニシャル処理が行われないが、本例の手法では稼動系のCPUモジュール1と待機系のCPUモジュール2とが同じ等値化モードにならなければ意味がない為、待機系のCPUモジュール2においても等値化モード決定処理を行わせる為に、上記アプリケーションプログラム照合要求コマンドを発行する。その後の稼動系のCPUモジュール1側のステップS12〜S17、待機系のCPUモジュール2側のステップS22〜S27の処理は、図2の処理と略同様である。   When receiving the application program collation request command, the standby CPU module 2 starts the equalization mode determination process (step S61). That is, as compared with the first embodiment, in the second embodiment, the standby CPU module 2 does not perform the initial process that triggers the start of the equalization mode determination process. Since there is no meaning unless the active CPU module 1 and the standby CPU module 2 are in the same equalization mode, the standby CPU module 2 also performs the equalization mode determination process in the above-described case. Issue an application program verification request command. The subsequent steps S12 to S17 on the active CPU module 1 side and steps S22 to S27 on the standby CPU module 2 side are substantially the same as the processing in FIG.

以上説明した第1〜第3の実施例の等値化モード決定処理により、稼動系のCPUモジュール1と待機系のCPUモジュール2とでアプリケーションプログラムが不一致であるときには、図5のようなシステム情報の継続を必要としない最低レベル定周期プログラムエンドにての等値化を行うモード、すなわちシングル等値化モードに変更することで、図6に示すように、もし稼動系のCPUモジュール1側に異常発生等の稼動/待機切り替え要因が発生しても、新たに稼動系となったCPUモジュール2において最初から処理を実行し直すので(システム情報を用いて演算途中から処理を再開するものではないので)、稼動/待機切り替え後において、問題なく、定周期プログラム実行処理を継続することができる。   When the application program does not match between the active CPU module 1 and the standby CPU module 2 by the equalization mode determination process of the first to third embodiments described above, the system information as shown in FIG. By changing to the mode for performing equalization at the minimum level fixed period program end that does not require continuation of the program, that is, the single equalization mode, as shown in FIG. Even if an operation / standby switching factor such as an abnormality occurs, the CPU module 2 that newly becomes an active system re-executes the process from the beginning (the process is not resumed from the middle of the calculation using the system information). Therefore, after the operation / standby switching, the periodic program execution process can be continued without any problem.

また、フェイルセーフの考え方より、等値化モード決定処理中には、シングル等値化モードに切り替えておく。   Further, from the concept of fail-safe, the single equalization mode is switched during the equalization mode determination process.

本例の2重化コントローラシステムにおけるプログラマブルコントローラ本体(CPUモジュール)の構成ブロック図である。It is a block diagram of the programmable controller main body (CPU module) in the dual controller system of this example. 第1の実施例による等値化モード決定処理のフローチャート図である。It is a flowchart figure of the equalization mode determination process by a 1st Example. 第2の実施例による等値化モード決定処理のフローチャート図である。It is a flowchart figure of the equalization mode determination process by a 2nd Example. 第3の実施例による等値化モード決定処理のフローチャート図である。It is a flowchart figure of the equalization mode determination process by a 3rd Example. シングル等値化モード時のプログラム実行状態を示す図である。It is a figure which shows the program execution state at the time of single equalization mode. シングル等値化モードにおける稼動/待機切り替わり発生の際のプログラム実行状態を示す図である。It is a figure which shows the program execution state at the time of operation / standby switching generation | occurrence | production in single equalization mode. 2重化して冗長性を持たせたコントローラの一般的なシステム構成図である。FIG. 2 is a general system configuration diagram of a controller that is duplicated to provide redundancy. 従来の定周期プログラム実行状態の一例を示す図である。It is a figure which shows an example of the conventional fixed-cycle program execution state. 従来のシステムで定周期プログラム実行中に稼動系/待機系CPUの切替えが発生した時のプログラムの実行状態を示す図である。It is a figure which shows the execution state of a program when switching of active system / standby system CPU generate | occur | produces during the fixed-cycle program execution in the conventional system. 先出願のマルチ等値化処理による定周期プログラム実行状態の一例を示す図である。It is a figure which shows an example of the fixed period program execution state by the multi-equalization process of a prior application. プログラム割り込み情報の一例を示す図である。It is a figure which shows an example of program interruption information. プログラム実行スケジュール情報の一例を示す図である。It is a figure which shows an example of program execution schedule information. 稼動/待機切り替えの場合に、等値化したシステム情報によって中断途中から継続して演算処理する様子を示す図である。It is a figure which shows a mode that arithmetic processing is continued from the middle of interruption by the equalized system information in the case of operation / standby switching. 図13の処理において定周期プログラムが相互に異なる場合に生じる問題を説明する為の図である。It is a figure for demonstrating the problem which arises when a fixed period program differs in the process of FIG.

符号の説明Explanation of symbols

1 CPUモジュール(稼動系)
2 CPUモジュール(待機系)
3 等値化バス
4 システムバス
11 プログラムRAM
12 データRAM
13 等値化バス制御部
14 受信バッファ用RAM
15 制御部
21 プログラムRAM
22 データRAM
23 等値化バス制御部
24 受信バッファ用RAM
25 制御部
1 CPU module (working system)
2 CPU module (standby system)
3 Equalization bus 4 System bus 11 Program RAM
12 Data RAM
13 Equalization bus controller 14 Receive buffer RAM
15 Control unit 21 Program RAM
22 Data RAM
23 Equalization bus controller 24 Receive buffer RAM
25 Control unit

Claims (7)

稼動系と待機系のコントローラを有し、稼動系のコントローラが、それぞれに優先レベルがある複数の定周期プログラムを実行し、任意の定周期プログラム実行中にこの定周期プログラムよりも優先レベルが高い定周期プログラムの起動周期になると、前記実行中の定周期プログラムを中断して、該優先レベルが高い定周期プログラムを実行し、その後に中断していた定周期プログラムを中断時点から実行する2重化コントローラシステムにおいて、
前記稼動系のコントローラ、待機系のコントローラは、それぞれ、
前記稼動系コントローラにおいて各定周期プログラムが実行される毎に制御データの等値化処理を行い、その際にプログラムカウンタ値を含むシステム情報も等値化するマルチ等値化モードと、前記稼動系コントローラにおいて前記優先レベルが低い定周期プログラムを実行完了したときに、該定周期プログラムの制御データと該定周期プログラムを中断させて実行された全ての定周期プログラムの制御データの等値化処理を行い、前記システム情報の等値化は行わないシングル等値化モードの何れかのモードで等値化処理を行い、通常時は前記マルチ等値化モードで等値化処理を行う等値化処理手段と、
互いに他方のコントローラの定周期プログラムを読み出し、自コントローラの定周期プログラムと一致するか否かを照合する照合手段と、
該照合手段によって不一致と判定された場合には、前記等値化処理手段におけるモードを前記シングル等値化モードに切り替える等値化モード切替手段と、
を有することを特徴とする二重化コントローラシステム。
It has active and standby controllers, and the active controllers execute multiple fixed-cycle programs each with a priority level, and the priority level is higher than this fixed-cycle program during execution of any fixed-cycle program When the start cycle of the fixed cycle program comes, the fixed cycle program being executed is interrupted, the fixed cycle program having the higher priority level is executed, and then the interrupted fixed cycle program is executed from the point of interruption. In the controller system
The active system controller and the standby system controller are respectively
A multi-equalization mode for performing equalization processing of control data each time each fixed-cycle program is executed in the operating system controller and equalizing system information including a program counter value at that time, and the operating system When the execution of the periodic program with a low priority level is completed in the controller, the control data of the periodic program and the control data of all the periodic programs executed by interrupting the periodic program are equalized. Equalization processing is performed in any one of the single equalization modes, and the equalization processing is performed in the multi-equalization mode in normal times. Means,
A collation means for reading out the fixed cycle program of the other controller from each other and checking whether or not it matches the fixed cycle program of the own controller;
An equalization mode switching means for switching the mode in the equalization processing means to the single equalization mode when the matching means determines that there is a mismatch;
A duplex controller system characterized by comprising:
前記照合手段による照合処理は、システムイニシャル時に実行することを特徴とする請求項1記載の二重化コントローラシステム。   2. The duplex controller system according to claim 1, wherein the collating process by the collating unit is executed at the time of system initialization. 前記照合手段による照合処理は、前記稼動系コントローラが運用中に待機系コントローラが起動した時、該待機系コントローラにおいては該起動に伴って実行され、前記稼動系コントローラにおいては起動した待機系コントローラから出されるチェック要求に応じて実行されることを特徴とする請求項1記載の二重化コントローラシステム。   The verification process by the verification unit is executed when the standby controller is activated while the active controller is in operation, and is executed along with the activation in the standby controller, and from the activated standby controller in the active controller 2. The duplex controller system according to claim 1, wherein the controller is executed in response to a check request issued. 前記照合手段による照合処理は、前記稼動/待機系の両方のコントローラが運用中に、一方のコントローラの定周期プログラムが変更されたとき、該一方のコントローラにおいては該プログラム変更に伴って実行され、他方のコントローラにおいては前記一方のコントローラから出されるチェック要求に応じて実行されることを特徴とする請求項1記載の二重化コントローラシステム。   The collating process by the collating means is executed in accordance with the program change in the one controller when the fixed cycle program of one controller is changed while both the active / standby controllers are in operation. 2. The duplex controller system according to claim 1, wherein the other controller is executed in response to a check request issued from the one controller. 前記照合手段による照合処理実行中は、定周期プログラムの一致/不一致に関係なく、前記シングル等値化モードによる等値化処理を実行することを特徴とする請求項1〜4の何れかに記載の二重化コントローラシステム。   5. The equalization process in the single equalization mode is executed during execution of the collation process by the collation unit regardless of whether the periodic programs match or not. Duplex controller system. 稼動系と待機系のコントローラを有し、稼動系のコントローラが、それぞれに優先レベルがある複数の定周期プログラムを実行し、任意の定周期プログラム実行中にこの定周期プログラムよりも優先レベルが高い定周期プログラムの起動周期になると、前記実行中の定周期プログラムを中断して、該優先レベルが高い定周期プログラムを実行し、その後に中断していた定周期プログラムを中断時点から実行する2重化コントローラシステムにおける等値化モード決定方法であって、
前記稼動系のコントローラ、待機系のコントローラは、それぞれ、前記稼動系コントローラにおいて各定周期プログラムが実行される毎に制御データの等値化処理を行い、その際にプログラムカウンタ値を含むシステム情報も等値化するマルチ等値化モードと、前記稼動系コントローラにおいて前記優先レベルが低い定周期プログラムを実行完了したときに、該定周期プログラムの制御データと該定周期プログラムを中断させて実行された全ての定周期プログラムの制御データの等値化処理を行い、前記システム情報の等値化は行わないシングル等値化モードの何れかのモードで等値化処理を行い、通常時は前記マルチ等値化モードで等値化処理を行う等値化処理手段を有し、
少なくとも前記稼動/待機系の何れか一方のイニシャル時に又は何れか一方の前記定周期プログラム変更の際に、
互いに他方のコントローラの定周期プログラムを読み出し、自コントローラの定周期プログラムと一致するか否かを判定し、
該判定において不一致と判定された場合には、前記等値化処理手段におけるモードを前記シングル等値化モードに切り替えることを特徴とする等値化モード決定方法。
It has active and standby controllers, and the active controllers execute multiple fixed-cycle programs each with a priority level, and the priority level is higher than this fixed-cycle program during execution of any fixed-cycle program When the start cycle of the fixed cycle program comes, the fixed cycle program being executed is interrupted, the fixed cycle program having the higher priority level is executed, and then the interrupted fixed cycle program is executed from the point of interruption. An equalization mode determination method in a generalized controller system,
The operating system controller and the standby system controller perform equalization processing of control data every time each periodic program is executed in the operating system controller, and system information including a program counter value is also obtained at that time. The multi-equalization mode for equalization and when the execution of the fixed period program having the low priority level is completed in the active system controller, the control data of the fixed period program and the fixed period program are interrupted and executed. Perform equalization processing of control data of all fixed-cycle programs, perform equalization processing in any of the single equalization modes that do not perform equalization of the system information, and normally use the multi etc. Having equalization processing means for performing equalization processing in the valueization mode;
At least at the time of initializing one of the active / standby systems or at the time of changing one of the fixed-cycle programs,
Read the fixed cycle program of the other controller from each other, determine whether it matches the fixed cycle program of its own controller,
If it is determined that the discrepancy in the determination, the equalization mode determination method characterized by switching a mode in the equalization processing section to the single equalization mode.
稼動系と待機系のコントローラを有し、稼動系のコントローラが、それぞれに優先レベルがある複数の定周期プログラムを実行し、任意の定周期プログラム実行中にこの定周期プログラムよりも優先レベルが高い定周期プログラムの起動周期になると、前記実行中の定周期プログラムを中断して、該優先レベルが高い定周期プログラムを実行し、その後に中断していた定周期プログラムを中断時点から実行する2重化コントローラシステムを機能させるプログラムにおいて、It has active and standby controllers, and the active controllers execute multiple fixed-cycle programs each with a priority level, and the priority level is higher than this fixed-cycle program during execution of any fixed-cycle program When the start cycle of the fixed cycle program comes, the fixed cycle program being executed is interrupted, the fixed cycle program having the higher priority level is executed, and then the interrupted fixed cycle program is executed from the point of interruption. In the program that makes the controller system function,
前記稼動系コントローラの各定周期プログラムが実行される毎に制御データの等値化処理を行うとともに、プログラムカウンタ値を含むシステム情報も等値化するマルチ等値化モードと、前記稼動系コントローラの前記優先レベルが低い定周期プログラムを実行完了したときに、該定周期プログラムの制御データと該定周期プログラムを中断させて実行された全ての定周期プログラムの制御データの等値化処理を行う前記システム情報の等値化は行わないシングル等値化モードとの何れかのモードで等値化処理を行い、通常時は前記マルチ等値化モードで等値化処理を行うステップと、  A multi-equalization mode for equalizing system information including program counter values while performing equalization processing of control data every time each fixed-cycle program of the active system controller is executed, and When the execution of the fixed cycle program having a low priority level is completed, the control data of the fixed cycle program and the control data of all the fixed cycle programs executed by interrupting the fixed cycle program are equalized. Performing equalization processing in any of the single equalization modes that do not perform equalization of system information, and performing equalization processing in the multi-equalization mode in normal times;
互いに他方のコントローラの定周期プログラムを読み出し、自コントローラの定周期プログラムと一致するか否かを照合するステップと、  Reading each other's fixed-cycle program of the other controller and checking whether or not it matches the fixed-cycle program of its own controller;
該照合によって不一致と判定された場合には、前記マルチ等値化モードを前記シングル等値化モードに切り替えるステップ、  If it is determined by the collation that there is a mismatch, the step of switching the multi-equalization mode to the single equalization mode;
とを有するプログラム。  A program having
JP2003327647A 2003-09-19 2003-09-19 Duplex controller and its equalization mode decision method Expired - Lifetime JP4232589B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003327647A JP4232589B2 (en) 2003-09-19 2003-09-19 Duplex controller and its equalization mode decision method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003327647A JP4232589B2 (en) 2003-09-19 2003-09-19 Duplex controller and its equalization mode decision method

Publications (2)

Publication Number Publication Date
JP2005092695A JP2005092695A (en) 2005-04-07
JP4232589B2 true JP4232589B2 (en) 2009-03-04

Family

ID=34457461

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003327647A Expired - Lifetime JP4232589B2 (en) 2003-09-19 2003-09-19 Duplex controller and its equalization mode decision method

Country Status (1)

Country Link
JP (1) JP4232589B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102005037228A1 (en) * 2005-08-08 2007-02-15 Robert Bosch Gmbh Method and device for controlling a computer system
JP4650441B2 (en) * 2007-03-15 2011-03-16 三菱電機株式会社 Numerical control apparatus and numerical control system
JP5293141B2 (en) * 2008-12-16 2013-09-18 日本電気株式会社 Redundant system
CN104570720B (en) * 2014-11-26 2019-04-16 卡斯柯信号有限公司 A kind of redundancy management method for vehicle-mounted controller based on health degree
JP6813010B2 (en) * 2018-08-31 2021-01-13 横河電機株式会社 Availability systems, methods, and programs

Also Published As

Publication number Publication date
JP2005092695A (en) 2005-04-07

Similar Documents

Publication Publication Date Title
JP4330547B2 (en) Information processing system control method, information processing system, information processing system control program, and redundant configuration control device
US7647537B2 (en) Programmable logic device, information processing device and programmable logic device control method
US7890800B2 (en) Method, operating system and computing hardware for running a computer program
US7792594B2 (en) Redundant automation system comprising a master and a standby automation device
CN109254525B (en) Method and device for operating two redundant systems
US20030225813A1 (en) Programmable controller with CPU and communication units and method of controlling same
EP2787401B1 (en) Method and apparatus for controlling a physical unit in an automation system
JP4232589B2 (en) Duplex controller and its equalization mode decision method
JP6083480B1 (en) Monitoring device, fault tolerant system and method
JP2000285030A (en) Information processor
JPH09330106A (en) Control system with backup function
JP4281602B2 (en) Duplex controller system, its controller and program
JP4483876B2 (en) Storage device control method in duplex system
CN103164297B (en) Storage system, control device, and storage system control method of controlling storage system
JP5034584B2 (en) Duplex controller system, its active / standby controller
JP5227653B2 (en) Multiplexed computer system and processing method thereof
JP4867557B2 (en) Programmable controller
JP2001306348A (en) Redundant information processing system
JP4273905B2 (en) Duplex controller system and method
JP4810488B2 (en) Duplex control apparatus and tracking method thereof
JP2001256070A (en) Redundant processor
JP3547208B2 (en) Multiprocessor system and configuration method thereof
JP2021189988A (en) Electronic control device and control method of electronic control device
JP2013109532A (en) Device, method and program for diagnosis and restoration
KR100922409B1 (en) Information processing device and memory anomaly monitoring method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060914

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080423

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080507

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080704

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20081201

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111219

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4232589

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111219

Year of fee payment: 3

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111219

Year of fee payment: 3

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121219

Year of fee payment: 4

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121219

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131219

Year of fee payment: 5

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

EXPY Cancellation because of completion of term