WO2020066737A1 - Cpu unit, cpu unit control method, information processing program, and recording medium - Google Patents

Cpu unit, cpu unit control method, information processing program, and recording medium Download PDF

Info

Publication number
WO2020066737A1
WO2020066737A1 PCT/JP2019/036311 JP2019036311W WO2020066737A1 WO 2020066737 A1 WO2020066737 A1 WO 2020066737A1 JP 2019036311 W JP2019036311 W JP 2019036311W WO 2020066737 A1 WO2020066737 A1 WO 2020066737A1
Authority
WO
WIPO (PCT)
Prior art keywords
unit
cpu unit
processing
execution
cpu
Prior art date
Application number
PCT/JP2019/036311
Other languages
French (fr)
Japanese (ja)
Inventor
桶田 英男
Original Assignee
オムロン株式会社
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 オムロン株式会社 filed Critical オムロン株式会社
Priority to CN201980051961.6A priority Critical patent/CN112534411A/en
Publication of WO2020066737A1 publication Critical patent/WO2020066737A1/en

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B9/00Safety arrangements
    • G05B9/02Safety arrangements electric
    • G05B9/03Safety arrangements electric with multiple-channel loop, i.e. redundant control systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements

Definitions

  • the present invention relates to a CPU unit and the like that are duplicated in a controller.
  • FIG. 8 is a diagram illustrating an outline of a conventional process of a CPU unit duplexed in a PLC.
  • each of the CPU units duplicated in the PLC repeatedly executes a self-diagnosis process, an instruction execution process, and an I / O refresh process in this order.
  • the period from when the I / O refresh processing is performed to when the next I / O refresh processing is performed is also referred to as “one cycle (one cycle)”. That is, each of the CPU units duplicated in the PLC executes the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing in this order in "one cycle (one cycle)".
  • a period required for “one cycle” that is, a period from the execution of the I / O refresh processing to the execution of the next I / O refresh
  • cycle time is also referred to as “cycle time”.
  • the self-diagnosis process is a process for diagnosing whether the hardware of the self-unit is operating normally, and in particular, whether there is any abnormality in the memory and the hard disk.
  • the instruction execution process is a process for executing a user program or the like, executes various operations using data obtained in the I / O refresh process executed in the previous cycle, and executes the I / O refresh process in the current cycle. This is the process of generating the data to be output.
  • the I / O refresh process is a process for exchanging data with an external device and an external unit other than the duplicated CPU unit of the other party, outputting data generated in the immediately preceding instruction execution process, and outputting the next cycle. This is a process of acquiring data used for the instruction execution process.
  • One of the duplicated CPU units in the PLC is an active system and the other is a standby system (STB), and mutually confirms the status of the duplicated CPU unit.
  • STB standby system
  • the active CPU unit goes down
  • the standby CPU unit is switched to the down active CPU unit to continue the operation.
  • the CPU unit serving as the execution system may be abbreviated as “ACT”
  • the CPU unit serving as the standby system may be abbreviated as “STB”.
  • ACT and STB are synchronized during the internal processing of each CPU unit, as shown in FIG. That is, in each of the ACT and the STB, at the timing when the self-unit completes the execution of the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing, an abnormality occurs in the unit of the other party to be duplexed. Make sure you are not. "Confirmation that no abnormality has occurred in the other unit to be duplexed", which is executed at the timing when the own unit completes execution of each of the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing. Is also referred to as “synchronization check processing”.
  • each of the ACT and the STB executes a synchronization check process at the completion of each of the self-diagnosis process, the instruction execution process, and the I / O refresh process, and performs synchronization (that is, when an abnormality occurs in the partner unit). Is not checked), and then the execution of the next process is started. Therefore, each of the ACT and the STB can start the execution of the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing at the same timing.
  • each of the ACT and the STB basically monitors the state of the other party (in other words, confirms), and if the ACT is abnormally stopped, the STB replaces the abnormally stopped ACT. Take over the driving.
  • each of the ACT and the STB executes the “cancel the duplication” process.
  • each of the ACT and the STB prevents the "cycle time from becoming extremely long by maintaining synchronization with the partner CPU unit in which the abnormality has occurred”. If the duplication is not canceled, that is, if “the next processing is not started until it is confirmed that no abnormality has occurred in the partner unit”, and if an abnormality occurs in the partner CPU unit, No abnormality has occurred ". Therefore, execution of the next process cannot be started, and the cycle time becomes extremely long.
  • FIG. 9 is a diagram for explaining the details of the self-diagnosis processing, the instruction execution processing, and the synchronization check processing executed at the completion of each of the I / O refresh processing.
  • each of the ACT and the STB confirms whether or not a notification that “the execution of the corresponding process has been completed” can be obtained from the partner CPU unit within the determination period.
  • the synchronization check processing is performed, for example, by providing a register (common register) that can be read and written by each CPU unit inside or outside each of the CPU units (that is, ACT and STB) that are duplicated in the PLC. ,realizable.
  • a register common register
  • the “own unit performs processing execution”. Is completed "in the common register.
  • Each CPU unit reads that "the own unit has completed the execution of the process" written in the common register by the other CPU unit, thereby confirming that the other CPU unit has completed the execution of the process. Confirm.
  • the CPU unit 99P completes the processing, that is, when the execution of the processing is completed, the REG1 of the common register 98 indicates that the processing has been completed (that is, “the own unit is Has been completed ").
  • the CPU unit 99Q recognizes that the CPU unit 99P has completed the processing.
  • the REG2 of the common register 98 indicates that the process has been completed (that is, “the own unit has completed the execution of the process”).
  • the CPU unit 99P recognizes that the CPU unit 99Q has completed the processing.
  • the CPU unit 99P and the CPU unit 99Q recognize that the processing has been completed, the CPU unit 99P and the CPU unit 99Q each shift to the next processing.
  • each CPU unit waits for a predetermined period from the time when the execution of the process by the own unit is completed, and then writes, to the common register 98, the writing of "the own unit has completed the execution of the process" by the partner CPU unit. Determine the presence or absence. For example, even if a predetermined period has elapsed from the time when the CPU unit 99P has completed the execution of the process, the CPU unit 99P will not write a message to the REG2 that "the unit has completed the execution of the process".
  • each CPU unit performs processing from completion of execution of processing by its own unit to determination of presence / absence of writing of “the own unit has completed execution of processing” by the partner CPU unit.
  • the predetermined period is also referred to as “waiting time”.
  • the prior art as described above is based on the premise that the hardware of the CPU unit duplicated in the PLC is almost the same, that is, both have substantially the same processing capacity. However, there is a problem that it is not possible to assume a case where is different.
  • each CPU unit has a common “waiting time” between the duplicated CPU units from the time when the execution of the processing by the own unit is completed. After the elapse, the CPU unit of the other party is determined to be abnormal.
  • the reason why the redundant CPU unit performs the synchronization check process using the common "waiting time" is as follows. That is, under the assumption that the processing capacity of the duplicated CPU units is the same, the time points at which the execution of the processing by the duplicated CPU units is completed should be substantially the same. In other words, under the assumption that the processing performance of the own unit and the CPU unit of the other party to be duplicated are the same, the time when the execution of the processing by the own unit is completed and the time when the execution of the processing by the other CPU unit is completed are completed. The time should be almost the same timing.
  • the "waiting time” used to determine the abnormality of the partner CPU unit that is, the "waiting time” used for the synchronization check processing is conventionally common to the duplicated CPU units. , For a fixed period of length.
  • the CPU unit is often used for a long period of time, for example, about 20 years or more, and during that time, the production of parts used in the CPU unit is stopped, and the CPU unit is largely renewed. May be done. Then, for example, when the hardware of the CPU unit is significantly renewed, the performance of the CPU unit before and after the renewal, that is, the processing capacity may greatly change.
  • the processing capacity is increased by a factor of four due to the renewal compared to before the renewal
  • the CPU unit after the renewal is about “10 ms (milliseconds)” during the period required to execute a certain process
  • the CPU before the renewal is executed.
  • the unit is about “40 ms”.
  • the “waiting time” used for the synchronization check process is fixed to “5 ms” common to both units, the CPU unit before the renewal and the CPU unit after the renewal. Make a decision.
  • the CPU unit after the renewal synchronizes, that is, the CPU unit before the renewal executes the certain process at a time when “5 ms” has elapsed from the time when the own unit has completed the execution of the certain process. It is determined whether the process has been completed. However, the CPU unit before the renewal cannot complete the execution of the certain process unless “30 ms” has elapsed from “the time when the CPU unit after the renewal has completed the execution of the certain process”. Therefore, the CPU unit after the renewal, from the time when 5 ms has passed from the time when the own unit has completed the execution of the certain process, the CPU unit before the renewal, "the CPU unit before the renewal executes the execution of the certain process.
  • the CPU unit before the renewal can complete the execution of the certain process if "30 ms" has elapsed from "the time when the CPU unit after the renewal completed execution of the certain process". . Therefore, if the CPU unit after the renewal has passed “30 ms” from the time when the own unit has completed the execution of the certain process, the CPU unit determines whether or not an abnormality has occurred in the CPU unit before the renewal. It can be determined correctly.
  • the CPU unit before the renewal starts when the own unit completes the execution of the certain process.
  • the determination is made after "30 ms" has elapsed. That is, the CPU unit before the renewal determines “whether or not an abnormality has occurred in the CPU unit after the renewal” after “30 ms” has elapsed from the time when the own unit has completed the execution of the certain process.
  • the CPU unit before the renewal and the CPU unit after the renewal recognize the completion of the processing of the other CPU unit, and then shift to the next processing. Then, the execution start of the next process is delayed.
  • the CPU unit after the renewal determines the abnormality of the partner CPU unit after a lapse of “30 ms” from the time when the own unit completes the execution of the certain process, and further, after “30 ms”, the CPU unit before the renewal Is performed to determine the abnormality. That is, the CPU unit after the renewal cannot start execution of the next process unless "60 ms" has elapsed from the point at which the own unit has completed execution of the certain process. That is, if the CPU unit before the renewal and the CPU unit before the renewal and the CPU unit after the renewal are set to a common “30 ms” for both, the completion of the determination of both is delayed.
  • a CPU unit is a CPU unit that is duplicated in a controller, and has a processing capability of its own unit and a processing capability of a partner CPU unit that is duplicated.
  • a setting unit that sets a waiting time in consideration of the ratio, and from the completion of execution of the processing in the own unit to the lapse of the waiting time set by the setting unit, the processing of the processing in the partner CPU unit.
  • a determination unit that determines that an abnormality has occurred in the partner CPU unit when execution completion cannot be confirmed.
  • a control method is a control method of a CPU unit that is duplicated in a controller, and includes a processing capability of the own unit and a processing of a duplicated CPU unit.
  • a synchronization check can be performed without providing an unnecessary waiting time in consideration of the difference in processing capacity between the CPU unit of the other party that is duplicated and its own unit. The effect is that the processing can be performed accurately.
  • FIG. 2 is a block diagram illustrating a main configuration of a CPU unit and the like according to the first embodiment of the present invention.
  • FIG. 2 is a diagram illustrating an outline of a process executed by each of two CPU units illustrated in FIG. 1.
  • FIG. 2 is a diagram illustrating a specific example of a process in which each of the two CPU units illustrated in FIG. 1 acquires performance information indicating the performance of the CPU unit of the other party to be duplicated.
  • FIG. 9 is a block diagram illustrating a main configuration of a CPU unit and the like according to a second embodiment of the present invention.
  • FIG. 5 is a diagram illustrating an example of a hardware configuration for realizing the CPU unit illustrated in FIG. 4.
  • FIG. 5 is a diagram illustrating an example of a hardware configuration for realizing the CPU unit illustrated in FIG. 4.
  • FIG. 5 is a diagram illustrating an outline of processing executed by each of two CPU units illustrated in FIG. 4.
  • FIG. 5 is a diagram illustrating a specific example of a process in which each of the two CPU units illustrated in FIG. 4 acquires performance information indicating the performance of a partner CPU unit to be duplexed.
  • FIG. 7 is a diagram for explaining an outline of processing performed by a CPU unit duplexed in a PLC up to the present.
  • FIG. 11 is a diagram for explaining details of a synchronization check process executed at the completion of execution of each of a self-diagnosis process, an instruction execution process, and an I / O refresh process.
  • FIG. 2 is a diagram illustrating an outline of processing executed by each of two CPU units (that is, first CPU unit 100A and second CPU unit 100B) described later with reference to FIG.
  • the first CPU unit 100A and the second CPU unit 100B are duplexed in the PLC 10, and one of them becomes an active system (ACT) and the other becomes a standby system (STB), and confirms the state of the other CPU unit.
  • ACT active system
  • STB standby system
  • each of the ACT and the STB repeatedly executes a self-diagnosis process, an instruction execution process, and an I / O refresh process in this order.
  • a set of “self-diagnosis processing, instruction execution processing, and I / O refresh processing” executed repeatedly in this order is referred to as “one cycle (one cycle)”.
  • the self-diagnosis process is a process for diagnosing whether the hardware of the own unit is operating normally.
  • the instruction execution process is a process for executing a user program or the like, executes various operations using data obtained in the I / O refresh process executed in the previous cycle, and executes the I / O refresh process in the current cycle. This is the process of generating the data to be output.
  • a control signal is generated for an external device other than the partner CPU unit, which is a control target of the PLC 10 (more precisely, the first CPU unit 100A or the second CPU unit 100B).
  • the I / O refresh process is a process for exchanging data with an external device and an external unit other than the duplicated CPU unit of the other party.
  • the I / O refresh process outputs data generated in the instruction execution process in the current cycle, and outputs the data. This is a process of acquiring data used for the instruction execution process in the cycle of.
  • the control signal generated in the instruction execution processing is output to a control target in the I / O refresh processing.
  • each of ACT first CPU unit 100A
  • STB second CPU unit 100B
  • ACT first CPU unit 100A
  • STB second CPU unit 100B
  • the “synchronization check process” is executed.
  • each of the ACT and the STB monitors (in other words, confirms) the status of the other CPU unit. If the ACT is abnormally stopped, the STB replaces the abnormally stopped ACT. Take over, driving.
  • the “synchronization check process” is a process of confirming that the partner CPU unit has completed execution of the process completed by the own unit in the same manner as the own unit, and it is not possible to confirm the completion of the process of the partner CPU unit. In this case, it is determined that an abnormality has occurred. For example, after the ACT completes the execution of each of the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing, the STB executes the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing. Confirm (determine) whether has been completed.
  • the ACT executes the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing. Confirm (determine) whether has been completed.
  • the first CPU unit 100A is ACT and the second CPU unit 100B is STB, if it is determined that an abnormality has occurred in the first CPU unit 100A, the second CPU unit 100B switches to ACT and continues operation. I do.
  • a “CPU unit of reference hardware (reference CPU unit)” is assumed in advance, and the performance Ab (processing capacity) and the processing time are defined in advance for this reference CPU unit.
  • the performance Ab of the reference CPU unit may be referred to as “performance Abb”.
  • Each of the ACT and the STB includes information indicating the performance Ab of the own unit, for example, information indicating “how much performance Ab the own unit has compared to the reference CPU unit” (self Machine performance information).
  • each of the ACT and the STB grasps each other's performance Ab (the relative performance Ab of the partner CPU unit with respect to the performance Abb of the reference CPU unit). Then, each of the ACT and the STB flexibly sets the waiting time Tw for the synchronization check process based on the grasped performance Ab.
  • the performance Ab of the own unit (the relative performance Ab of the own unit with respect to the performance Abb of the reference CPU unit) may be expressed as “performance Abm”.
  • the performance Ab of the partner CPU unit (the relative performance Ab of the partner CPU unit with respect to the performance Abb of the reference CPU unit) may be referred to as “performance Aby”.
  • the waiting time Tw for the synchronization check processing is set as follows. That is, when the performance Aby of the CPU unit of the other party to be duplicated is higher than the performance Abm of the own unit, that is, when the execution speed of the processing of the CPU unit of the other party to be duplicated is faster than that of the own unit, the normal waiting time Two is set to the waiting time Tw.
  • the performance Aby of the CPU unit of the other party to be duplicated is equal to the performance Abm of the own unit, that is, when the execution speed of the processing is the same between the CPU unit of the other party and the own unit to be duplicated.
  • the waiting time Tw is set.
  • the waiting time Tw is set to the other party. Is set according to the performance Aby of the CPU unit.
  • the performance Abm of the own unit is twice the performance Abb of the reference CPU unit and the performance Aby of the other CPU unit to be duplexed is 1/2 the performance Abb of the reference CPU unit, the performance Abm is the performance 4 times Aby.
  • the own unit requires “10 ms (milliseconds)” to execute a certain process to be subjected to the synchronization check process, the other CPU unit requires “40 ms”. Is set to “30 ms + normal waiting time Two”.
  • the performance Abm of the own unit is half the performance Abb of the reference CPU unit and the performance Aby of the other CPU unit to be duplexed is twice the performance Abb of the reference CPU unit, the performance Abm is the performance Abm. It is 1/4 times Aby.
  • the own unit requires “40 ms” to execute a certain process to be subjected to the synchronization check process, the other CPU unit requires “10 ms”. Is set to “normal waiting time Two”.
  • Each of the ACT (first CPU unit 100A) and the STB (second CPU unit 100B) flexibly sets the waiting time Tw of its own unit according to the difference in performance Ab between its own unit and the other CPU unit that is duplexed. .
  • each of the ACT and the STB executes “duplication processing” separately from a normal cycle. I do.
  • each of the ACT and the STB executes the “duplication process” before the “self-diagnosis process, the instruction execution process, and the I / O refresh process”, which are cyclically (periodically) repeatedly executed.
  • Each of the ACT and the STB grasps each other's performance Ab in the “duplication process” and enters a duplex state.
  • the performance information (own apparatus performance information) of each of the ACT and the STB is written to a nonvolatile memory included in each CPU unit, for example, when each CPU unit is produced.
  • the own device performance information is, for example, based on the performance Abb of the CPU unit having the specific hardware specifications (the above-mentioned “reference CPU unit”) as a reference, the performance Abb of the reference CPU unit and the performance Abb of the own unit.
  • Abm indicates what percentage of the performance is UP / DOWN.
  • Each of the ACT and the STB stores the performance information of its own unit in the nonvolatile memory of each CPU unit as “own device performance information”.
  • Each of the ACT and the STB transfers the own device performance information to each other in the duplex processing, and stores the own device performance information of the partner CPU unit as “other device performance information” in the non-volatile memory of each CPU unit. Store.
  • the own device performance information is 150% (that is, the processing execution speed (processing speed) is 1.5 times the reference CPU unit), and the other device performance information is 75% (the processing speed is lower than the reference CPU unit).
  • the difference between the performance Abs of the own unit and the partner CPU unit is grasped, and when the state becomes a duplex state, each of the ACT and the STB uses the difference of the performance Abs to determine the waiting time of the own unit. Set Tw.
  • Each of the ACT and the STB measures, for example, the execution time from the start of the execution of the “instruction execution” process of FIG. 2 to the completion of the execution in each CPU unit using the internal timer of each CPU unit.
  • the execution time of the ACT is “100 ms” in the “instruction execution” process
  • the difference between the performance Ab and the STB is “2 times” as described above, so that the other CPU unit (STB) is “200 ms”. "It will be.
  • the ACT executes a standby process for a period of “100 ms” from the completion of execution of the “instruction execution” process in its own unit, and then performs a synchronization check process related to the “instruction execution” process. Running.
  • the ACT executes the “instruction execution” process from the partner CPU unit (STB) from the completion of the execution of the “instruction execution” process in the own unit until “100 ms + normal waiting time Two” elapses. It is determined whether or not to acquire the notification of the completion of the execution.
  • the ACT sends a notification of the completion of the execution of the “instruction execution” process from the STB during a period from the completion of the execution of the “instruction execution” process in the own unit until “100 ms + normal waiting time Two” elapses. If the STB cannot be obtained, it is determined that an abnormality has occurred in the STB.
  • the STB executes the synchronization check process related to the “instruction execution” process immediately after completing the execution of the “instruction execution” process in the STB.
  • the STB performs the execution of the “instruction execution” process from the partner CPU unit (ACT) from the completion of the execution of the “instruction execution” process in its own unit to the lapse of the normal waiting time Two.
  • ACT is determined to be abnormal.
  • STB second CPU unit 100B
  • FIG. 1 is a block diagram showing a main configuration of a PLC 10 including a first CPU unit 100A and a second CPU unit 100B CPU unit according to the first embodiment of the present invention.
  • the PLC 10 includes a first CPU unit 100A and a second CPU unit 100B that are duplicated in the PLC 10.
  • Each of the first CPU unit 100A and the second CPU unit 100B is a functional unit that controls the control of the entire PLC 10.
  • the PLC 10 may further include a functional unit not shown in FIG.
  • the PLC 10 further includes a power supply unit (not shown) that supplies power to the entire PLC 10 including the first CPU unit 100A and the second CPU unit 100B, for example.
  • the PLC 10 also includes an unillustrated input unit for inputting a signal of a switch and a sensor attached to an appropriate position of a production device and an equipment device, an output unit for outputting a control signal to an actuator and the like, a communication unit for connecting to a communication network, and the like. It may include a functional unit.
  • each of the first CPU unit 100A and the second CPU unit 100B repeatedly executes the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing in this order.
  • I / O refresh processing various input signals acquired by the input unit and the like are taken into the I / O memory of each CPU unit (IN refresh), and the processing result of the instruction execution processing is written in the I / O memory.
  • Output (OUT refresh) to an output unit or the like.
  • the I / O refresh processing is performed by cyclically performing “each of the first CPU unit 100A and the second CPU unit 100B” and “an external unit and an external device other than the first CPU unit 100A and the second CPU unit 100B”. Data exchange.
  • various control signals output from the PLC 10 as a controller to a control target are generated. For example, based on a user program, a logical operation using an input signal taken into the I / O memory by IN refresh is performed. Is executed, and a control signal is generated.
  • the first CPU unit 100A and the second CPU unit 100B are duplicated in order to improve the safety and reliability of a control system controlled by the PLC 10, and both are connected by, for example, a bus between CPUs. If there is no abnormality in both the first CPU unit 100A and the second CPU unit 100B, execution of the same processing (each of self-diagnosis processing, instruction execution processing, and I / O refresh processing) is started at the same timing. For example, if there is no abnormality in both the first CPU unit 100A and the second CPU unit 100B, execution of the same user program using the same input signal is started at the same timing.
  • One of the first CPU unit 100A and the second CPU unit 100B is an active CPU unit (ACT), and the other is a standby CPU unit (STB).
  • ACT active CPU unit
  • STB standby CPU unit
  • the first CPU unit 100A which is an ACT, actually performs cyclic processing, reads and writes data from and to a memory, and transmits and receives control data (I / O data) to and from an external I / O device or the like. And controls the control system controlled by the PLC 10.
  • the second CPU unit 100B that is the STB executes the same user program as that executed by the first CPU unit 100A that is the ACT during standby (that is, while no abnormality occurs in the first CPU unit 100A that is the ACT). I do. However, the second CPU unit 100B, which is the STB, does not output the execution result (calculation execution result) of the executed user program to an external I / O device or the like.
  • the second CPU unit 100B which is an STB, receives processing results (calculation execution results and various input signals obtained by the first CPU unit 100A, which is an ACT) from the first CPU unit 100A, which is an ACT. Then, the second CPU unit 100B, which is the STB, updates the contents of the memory of the own unit based on the processing result and the like received from the first CPU unit 100A, which is the ACT. As a result, the identity of the contents of the memories of the second CPU unit 100B serving as the STB and the first CPU unit 100A serving as the ACT is secured.
  • the second CPU unit 100B When the first CPU unit 100A, which is ACT, fails, the second CPU unit 100B, which is STB, switches to the first CPU unit 100A, which is ACT, and performs operations such as actual control.
  • the entire PLC 10 can be continuously operated without immediately stopping. , Reliability is improved.
  • the PLC 10 includes, in addition to a first CPU unit 100A and a second CPU unit 100B that are duplicated in the PLC 10, a common register 200 that can execute writing and reading. To ensure the simplicity of the description, components that are not directly related to the present embodiment are omitted from the description and block diagrams. However, the PLC 10 may have the omitted configuration in accordance with the actual situation of implementation.
  • the common register 200 includes a first register 210 and a second register 220.
  • the first register 210 indicates, by the first CPU unit 100A, that the own unit (that is, the first CPU unit 100) executes a certain process (each of a self-diagnosis process, an instruction execution process, and an I / O refresh process). "Completed" is written. The information written to the first register 210 by the first CPU unit 100A is read by the second CPU unit 100B.
  • the second register 220 causes the second CPU unit 100 ⁇ / b> B to execute a process (each of the self-diagnosis process, the instruction execution process, and the I / O refresh process) performed by the own unit (that is, the second CPU unit 100 ⁇ / b> B). "Completed" is written. The information written to the second register 220 by the second CPU unit 100B is read by the first CPU unit 100A.
  • the first CPU unit 100A includes a capability acquisition unit 110A, a process execution unit 120A, a waiting time setting unit 160A, and a determination unit 170A as functional blocks in addition to the storage unit 130A.
  • the storage unit 130A stores the other function table 140A and the own function table 150A.
  • the second CPU unit 100B includes a capability acquisition unit 110B, a process execution unit 120B, a waiting time setting unit 160B, and a determination unit 170B as functional blocks in addition to the storage unit 130B.
  • the storage unit 130B stores the other function table 140B and the own function table 150B.
  • each of the capability acquiring unit 110A and the capability acquiring unit 110B is simply referred to as “the capability acquiring unit 110” unless it is necessary to particularly distinguish each of them.
  • the processing execution unit 120A and the processing execution unit 120B are simply referred to as “processing execution unit 120” when it is not necessary to particularly distinguish each of them.
  • the storage unit 130A and the storage unit 130B are simply referred to as the “storage unit 130” when it is not necessary to particularly distinguish each of them.
  • other function strength table 140A and the other function strength table 140B they are simply referred to as “other function strength table 140”.
  • self-function table 150 When there is no need to particularly distinguish each of the self-function table 150A and the self-function table 150B, it is simply referred to as “self-function table 150”. When there is no need to particularly distinguish between the waiting time setting unit 160A and the waiting time setting unit 160B, they are simply referred to as “waiting time setting unit 160”. When it is not necessary to particularly distinguish each of the determination unit 170A and the determination unit 170B, they are simply referred to as “determination unit 170”.
  • the functional blocks such as the capability acquisition unit 110, the processing execution unit 120, the waiting time setting unit 160, and the determination unit 170 are, for example, a CPU (central processing unit), a ROM (read only memory), an NVRAM (non- This can be realized by reading a program stored in a storage device (storage unit 130) realized by Volatile @ random @ access @ memory or the like into a RAM (random @ access @ memory) or the like (not shown) and executing it.
  • a CPU central processing unit
  • ROM read only memory
  • NVRAM non- This can be realized by reading a program stored in a storage device (storage unit 130) realized by Volatile @ random @ access @ memory or the like into a RAM (random @ access @ memory) or the like (not shown) and executing it.
  • the capability acquisition unit 110 acquires information (“performance information”) indicating the performance Aby (processing capability) of the CPU unit of the other party to be duplicated with reference to the own function table 150 of the other CPU unit.
  • the capability acquiring unit 110 stores the acquired performance information (other device performance information) of the other CPU unit in the other function capability table 140 of the own unit.
  • the capability acquisition unit 110 performs the “duplication process” illustrated in FIG. 2 once before the process execution unit 120 repeatedly executes the self-diagnosis process, the instruction execution process, and the I / O refresh process in this order. , The other device performance information is acquired.
  • FIG. 3 is a diagram illustrating a specific example of the process of “acquiring performance information indicating the performance Aby of the CPU unit of the other party to be duplexed” executed once in the “duplexing process”.
  • the capability acquiring unit 110A acquires performance information indicating the performance Aby of the second CPU unit 100B with reference to the function capability table 150B, and acquires the acquired performance information of the second CPU unit 100B (the other device). Performance information) is stored in the other function capability table 140A.
  • the capability acquisition unit 110B acquires performance information indicating the performance Aby of the first CPU unit 100A with reference to the function capability table 150A, and acquires the acquired performance information (other device performance information) of the first CPU unit 100A. It is stored in the other function strength table 140B.
  • the processing execution unit 120 repeatedly executes the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing in this order, and when the execution of each processing is completed, “the own unit has completed the execution of each processing”. Is written to the common register 200.
  • the process execution unit 120 When the execution of each process is completed, the process execution unit 120 notifies the waiting time setting unit 160 and the determination unit 170 that “the unit has completed the execution of each process”.
  • the process execution unit 120 sets the “execution time of each process (time from execution start to execution completion for each process)” to the waiting time setting unit 160 along with “the unit has completed execution of each process”. You may be notified. That is, the process execution unit 120 may measure the “execution time of each process” using the internal timer, and notify the waiting time setting unit 160 of the measured “execution time of each process”.
  • the processing execution unit 120A which has completed the execution of the instruction execution process, writes, to the first register 210, that "the unit has completed the execution of the instruction execution process", and the processing execution unit 120B, which has completed the execution of the instruction execution process, , "The own unit has completed the execution of the instruction execution process" is written in the second register 220.
  • the processing execution unit 120A which has completed the execution of the I / O refresh processing, writes in the first register 210 that "the unit has completed the execution of the I / O refresh processing", and completes the execution of the I / O refresh processing.
  • the executed processing unit 120B writes in the second register 220 that "the unit has completed the execution of the I / O refresh processing".
  • the process execution unit 120 executes each of the self-diagnosis process, the instruction execution process, and the I / O refresh process. Is started at the following timing. In other words, while it is not determined that an abnormality has occurred in each of the first CPU unit 100A and the second CPU unit 100B, the processing execution unit 120 executes each of the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing. Is started at the following timing.
  • the processing execution unit 120 performs each of the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing in a synchronization check processing after completion of the previous processing by the first CPU unit 100A and the second CPU unit. It starts after the normality with 100B is confirmed.
  • the processing execution unit 120 starts executing the instruction execution processing. .
  • the process execution unit 120 starts executing the I / O refresh process.
  • the normality of the first CPU unit 100A and the second CPU unit 100B is confirmed, and then the processing execution unit 120 starts executing the self-diagnosis processing in the next cycle. I do.
  • the waiting time setting unit 160 acquires the other device performance information by referring to the other function capability table 140, and acquires the own device performance information by referring to the own function capability table 150. Further, the waiting time setting unit 160 acquires from the processing execution unit 120 that “the unit has completed the execution of each processing”. The waiting time setting unit 160 adds the message “the unit has started executing each process” obtained from the process execution unit 120 before acquiring the message “the unit has completed execution of each process”. , Calculate the execution time of each process. That is, the waiting time setting unit 160 calculates the time “the own unit has started execution of each process” measured by the internal timer and the time “the own unit has completed execution of each process” measured by the internal timer. The execution time of each process is calculated. The execution time of each process may be measured by the process execution unit 120 using an internal timer, and may be notified from the process execution unit 120 to the waiting time setting unit 160.
  • the waiting time setting unit 160 calculates a “waiting time Tw” for a synchronization check process for each process from the acquired other device performance information, own device performance information, and the execution time of each process, and calculates the calculated waiting time.
  • the time Tw is notified to the determination unit 170.
  • the waiting time setting unit 160 uses the other device performance information, the own device performance information, and the execution time of each process to perform a “wait” for the synchronization check process for each process as follows. Time Tw ”is calculated.
  • the waiting time setting unit 160 sets the “normal Waiting time Two ”is referred to as“ waiting time Tw ”. Further, when the performance Aby of the CPU unit of the other party to be duplicated is equal to the performance Abm of the own unit, the waiting time setting unit 160 sets the “normal waiting time Two” to the “waiting time Tw”.
  • the “normal waiting time Two” is a period common to the first CPU unit 100A and the second CPU unit 100B whose length is determined in advance, and is set, for example, at the time of factory shipment of each unit and can be updated by the user. Period.
  • the “normal waiting time Two” is a period set on the assumption that the performance Ab is equal between the first CPU unit 100A and the second CPU unit 100B.
  • the waiting time setting unit 160 executes each processing to a value obtained by dividing the performance Abm of the own unit by the performance Aby of the other CPU unit.
  • the period multiplied by the time is referred to as an adjustment waiting time Ta.
  • the waiting time setting unit 160 sets the “period obtained by adding the adjustment waiting time Ta to the normal waiting time Two (that is,“ the normal waiting time Two + the adjustment waiting time Ta ”)” to the “waiting time Tw”.
  • the determination unit 170 determines, for the processing that has been completed by the processing execution unit 120 from the completion of execution of each processing by the processing execution unit 120 to the elapse of the waiting time Tw notified from the waiting time setting unit 160, the CPU of the other party. It is determined whether the unit has completed execution (synchronization check processing). For example, the determination unit 170 refers to the common register 200 at the time when the waiting time Tw has elapsed from the time “the own unit has completed the execution of each process”, and performs the duplexing for a certain process whose own unit has completed the execution. The execution of the other CPU unit is completed.
  • the determination unit 170 that has been notified of the “normal waiting time Two + the adjustment waiting time Ta” as the waiting time Tw executes the standby processing until the adjustment waiting time Ta elapses from the point of “the unit has completed execution of each process”. . Then, the determination unit 170 executes the synchronization check process after the completion of the execution of the standby process (that is, after the adjustment waiting time Ta has elapsed from the time when “the unit has completed execution of each process”). In other words, after the execution of the standby process is completed, the determination unit 170 can confirm that the execution of the process completed by the own unit is completed by the partner CPU unit before the normal waiting time Two elapses. ?
  • the determination unit 170 determines whether the completion of the execution by the partner CPU unit can be confirmed for the processing completed by the own unit before the normal waiting time Two elapses from the completion of the execution of the standby processing.
  • the “time when the execution of the standby process is completed” is “the time when the execution of a certain process that has been completed by the own unit is expected to be completed in the partner CPU unit”.
  • the determination unit 170 which has been notified of the “normal waiting time Two” as the waiting time Tw, immediately executes the synchronization check processing at the time of “the unit has completed execution of each processing”. That is, the determination unit 170 determines “whether it is possible to confirm that the execution of the processing that has been completed by the own unit is completed by the partner CPU unit before the normal waiting time Two elapses”. In other words, the determination unit 170 determines whether the execution completion of the own unit can be confirmed by the partner CPU unit before the normal waiting time Two elapses from the execution completion time of the own unit.
  • the determining unit 170A refers to the second register 220 of the common register 200, and determines whether or not there is a write to the effect that “the execution by the process execution unit 120B has been completed” for a certain process that has been completed by the process execution unit 120A. Confirm. If there is no write in the second register 220 that “the execution by the process execution unit 120B has been completed” for the certain process that has been completed by the process execution unit 120A, the determination unit 170A determines that an abnormality has occurred in the second CPU unit 100B. It is determined that an error has occurred.
  • the determination unit 170B refers to the first register 210 of the common register 200, and determines whether or not there is a write to the effect that “the execution by the process execution unit 120A has been completed” for a certain process that has been completed by the process execution unit 120B. Confirm. If there is no writing in the first register 210 that “the execution by the process execution unit 120A has been completed” for a certain process that has been completed by the process execution unit 120B, the determination unit 170B determines that the first CPU unit 100A has an error. It is determined that an error has occurred.
  • the storage unit 130 is a storage device that stores various data used by each of the first CPU unit 100A and the second CPU unit 100B.
  • the storage unit 130 stores (1) a control program, (2) an OS program, and (3) each of the first CPU unit 100A and the second CPU unit 100B that are executed by the first CPU unit 100A and the second CPU unit 100B.
  • An application program for executing various functions provided therein, and (4) various data to be read when the application program is executed may be temporarily stored.
  • the above data (1) to (4) are, for example, ROM (read only memory), flash memory, EPROM (Erasable Programmable ROM), EEPROM (registered trademark) (Electrically EPROM), HDD (Hard Disc Drive), etc.
  • Each of the first CPU unit 100A and the second CPU unit 100B may include a temporary storage unit (not shown).
  • the temporary storage unit is a so-called working memory that temporarily stores data used for calculation, calculation results, and the like in the course of various processes executed by each of the first CPU unit 100A and the second CPU unit 100B. Access Memory). Which data is stored in which storage device is appropriately determined based on the purpose of use, convenience, cost, physical restrictions, and the like of each of the first CPU unit 100A and the second CPU unit 100B.
  • the storage unit 130 further stores another function strength table 140 and own function strength table 150.
  • the other-function capability table 140 stores other-device performance information that is information indicating the performance Aby of the CPU unit of the other party to be duplicated.
  • the capability acquiring unit 110 stores the other device performance information acquired with reference to the own function table 150 of the CPU unit of the other party to be duplicated in the other function table 140 of the own unit. Store.
  • the own function table 150 stores own device performance information, which is information indicating the performance Abm of the own unit. For example, “How much performance Ab (processing capacity) of the own unit as compared with the reference CPU unit” is stored. Is provided, own device performance information is stored. The own device performance information is stored in the own function table 150 when each of the first CPU unit 100A and the second CPU unit 100B is shipped from the factory, for example.
  • each of the first CPU unit 100A and the second CPU unit 100B whose configuration has been described with reference to FIG. 1 is arranged as follows in order to facilitate understanding. That is, each of the first CPU unit 100A and the second CPU unit 100B is a duplicated CPU unit in the PLC 10 (controller), and includes the waiting time setting unit 160 (setting unit) and the determination unit 170.
  • the waiting time setting unit 160 sets the waiting time Tw in consideration of the ratio between the performance Abm (processing capacity) of the own unit and the performance Aby of the CPU unit of the other party to be duplicated.
  • the determination unit 170 cannot confirm that the execution of the process by the other CPU unit has been completed before the elapse of the waiting time Tw set by the waiting time setting unit 160 from the time when the execution of the process in the own unit is completed, It is determined that an abnormality has occurred in the CPU unit.
  • each of the first CPU unit 100A and the second CPU unit 100B sets the waiting time Tw in consideration of the ratio of the performance Ab (processing capacity) between the own CPU unit and the partner CPU unit. Then, each of the first CPU unit 100A and the second CPU unit 100B uses the set waiting time Tw to determine the synchronization between its own unit and the partner CPU unit (that is, the coincidence of the executed processes).
  • each of the first CPU unit 100A and the second CPU unit 100B is determined in advance as the waiting time Tw.
  • the normal waiting time Two is set.
  • each of the first CPU unit 100A and the second CPU unit 100B sets a predetermined “normal waiting time Two” as the waiting time Tw.
  • the other CPU unit should have already completed execution of the certain process when the own unit completes execution of a certain process. If the performance Ab is equal between the partner CPU unit and the own unit, the partner CPU unit should complete the execution of the certain process when the own unit completes the execution of a certain process.
  • each of the first CPU unit 100A and the second CPU unit 100B sets the normal waiting time Two as the waiting time Tw, thereby enabling the other CPU unit to set the normal waiting time Two. It is possible to accurately determine whether an abnormality has occurred in the CPU unit.
  • each of the first CPU unit 100A and the second CPU unit 100B sets “the normal waiting time Two plus the adjustment waiting time Ta as the waiting time Tw”.
  • the adjustment waiting time Ta is set in consideration of a difference in performance Ab between the own unit and the partner CPU unit. For example, the “difference between the time when the execution of the process in the own unit is completed and the time when the execution of the process in the partner CPU unit is expected to be completed” is the adjustment waiting time Ta.
  • each of the first CPU unit 100A and the second CPU unit 100B waits until “the time when the execution of the processing by the other CPU unit is expected to be completed (execution completion expected time)”. Then, each of the first CPU unit 100A and the second CPU unit 100B determines whether the completion of the execution of the processing by the partner CPU unit can be confirmed before the normal waiting time Two elapses from the predicted completion time of the execution.
  • each of the first CPU unit 100A and the second CPU unit 100B waits for a period from the completion of the execution of the processing in the own unit until the “period in which the adjustment wait time Ta is added to the normal wait time Two” elapses. It is determined whether the CPU unit can confirm the completion of the processing.
  • each of the first CPU unit 100A and the second CPU unit 100B sets the “adjustment waiting time Ta to the normal waiting time Twoo” as the waiting time Tw. By setting the “added period”, the above determination can be accurately performed.
  • each of the first CPU unit 100A and the second CPU unit 100B has a difference in performance Ab between its own unit and the partner CPU unit even when the performance Ab of the own unit and the partner CPU unit do not match.
  • an appropriate waiting time Tw can be set. That is, each of the first CPU unit 100A and the second CPU unit 100B performs the synchronization check processing without providing an unnecessary waiting time Tw in consideration of the difference in performance Ab between the CPU unit of the other party and the own unit. This has the effect that it can be performed accurately.
  • the processing includes a self-diagnosis processing, an instruction execution processing, and an I / O refresh processing.
  • the self-diagnosis process is a process for diagnosing whether there is any abnormality in the hardware of the own unit.
  • the instruction execution process is a process of generating a signal for controlling “an external device and an external unit other than the partner CPU unit”.
  • the I / O refresh process is a process of exchanging data with “an external device and an external unit other than the partner CPU unit”.
  • the waiting time setting unit 160 sets a waiting time Tw for each of the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing.
  • the determination unit 170 performs the determination, that is, the synchronization check process, for each of the self-diagnosis process, the instruction execution process, and the I / O refresh process.
  • Each of the first CPU unit 100A and the second CPU unit 100B synchronizes the self-diagnosis process, the instruction execution process, and the I / O refresh process between the self-unit and the partner CPU unit (that is, the process that has been completed). Match).
  • Each of the first CPU unit 100A and the second CPU unit 100B determines the synchronization between its own unit and the partner CPU unit at the timing of completion of execution of each of the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing. It has the effect of being able to.
  • Each of the first CPU unit 100A and the second CPU unit 100B executes the duplex processing once before repeatedly executing the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing in this order.
  • Each of the first CPU unit 100A and the second CPU unit 100B acquires the performance Aby of the partner CPU unit from the partner CPU unit in the duplex processing.
  • each of the first CPU unit 100A and the second CPU unit 100B repeats the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing in this order with the performance Aby of the partner CPU unit. Acquire once before executing.
  • Each of the first CPU unit 100A and the second CPU unit 100B takes into account the ratio of the acquired performance Aby of the partner CPU unit to the performance Abm of its own unit, and the waiting time used for the determination for each of the processes. Set Tw.
  • Each of the first CPU unit 100A and the second CPU unit 100B takes into account the performance Aby of the partner CPU unit acquired before repeatedly executing each of the processes, and the waiting time used for the determination of each process. This has an effect that Tw can be set.
  • Each of the first CPU unit 100A and the second CPU unit 100B executes the following processing as shown in FIG. That is, each of the first CPU unit 100A and the second CPU unit 100B repeatedly executes the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing in this order. Specifically, the processing execution unit 120 of each unit repeatedly executes the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing in this order. Before each of the first CPU unit 100A and the second CPU unit 100B (particularly, the capability acquisition unit 110 of each unit) performs the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing in this order. The duplication processing is executed once. Each of the first CPU unit 100A and the second CPU unit 100B acquires other device performance information indicating the performance Aby of the partner CPU unit to be duplexed in the duplexing process.
  • Each unit (particularly, the waiting time setting unit 160 of each unit) performs a synchronization check process for each process from the other device performance information, the own device performance information, and the execution time of each process completed by the own unit. Is set.
  • the waiting time setting unit 160 calculates the “adjustment waiting time Ta calculated in consideration of the ratio between the performance Abm of the own unit and the performance Aby of the CPU unit of the other party to be duplicated” for each process. . Then, the waiting time setting unit 160 adds a period obtained by adding the “adjusted waiting time Ta calculated for each process” to the “normal waiting time Two of each process” for the synchronization check process of each process. This is set as “waiting time Tw”.
  • the waiting time setting unit 160 sets the “adjustment waiting time Ta” of each process to a value obtained by multiplying the execution time of each process by “Abm / Aby”.
  • Each unit executes a synchronization check process after completion of each of the self-diagnosis process, the instruction execution process, and the I / O refresh process by the own unit. That is, the determination unit 170 refers to the common register 200, and executes the processing completed by the own unit by the partner CPU unit from the time when the execution of each processing by the own unit is completed to the time when the waiting time Tw elapses. Determine if it is complete.
  • the synchronization check process is a process of mutually monitoring the statuses of the CPU units of the other party to be duplicated. Specifically, the synchronization check process is a process of confirming (determining) whether or not the execution of the process has been completed in the CPU unit of the other party which has been completed in the own unit.
  • each unit When the synchronization can be confirmed in the synchronization check processing, each unit (particularly, the processing execution unit 120 of each unit) performs the next processing after the “processing in which execution completion by the own unit and the other CPU unit has been confirmed in the synchronization check processing”. Start running.
  • the synchronization check process is specifically executed as described below.
  • the process execution unit 120A when completing the execution of a certain process, stores, in the first register 210 of the common register 200, a message indicating that “the own unit (that is, the process execution unit 120A) has completed the execution of a certain process”.
  • the determination unit 170B recognizes that the first CPU unit 100A has completed execution of a certain process.
  • the process execution unit 120B stores, in the second register 220 of the common register 200, a message indicating that “the own unit (that is, the process execution unit 120B) has completed the execution of a certain process”. Write.
  • the determination unit 170A By reading the second register 220, the determination unit 170A recognizes that the second CPU unit 100B has completed execution of a certain process. When the determination unit 170A and the determination unit 170B each recognize "the completion of execution of a certain process by the partner CPU unit", the process execution unit 120A and the process execution unit 120B respectively perform the next process of the certain process. Start running.
  • the “processing executed by each of the first CPU unit 100A and the second CPU unit 100B” described above can be summarized as follows. That is, “the processing executed by each of the first CPU unit 100A and the second CPU unit 100B” is a control method of a CPU unit that is duplicated in the PLC 10 (controller), and includes a setting step and a determination step.
  • the setting step the waiting time Tw is set in consideration of the ratio between the performance Abm of the own unit and the performance Aby of the CPU unit to be duplicated.
  • the determination step includes, when the completion of the processing in the partner CPU unit cannot be confirmed from the time when the execution of the processing in the own unit is completed to the time when the waiting time Tw set in the setting step elapses, to the partner CPU unit. It is determined that an abnormality has occurred.
  • the control method uses the waiting time Tw set in consideration of the ratio of the performance Ab between the own unit and the other party's CPU unit to synchronize the own unit and the other party's CPU unit ( That is, it is determined whether the processes have been completed.
  • the control method sets a predetermined “normal waiting time Two” as the waiting time Tw.
  • the control method sets a predetermined “normal waiting time Two” as the waiting time Tw.
  • the other CPU unit should have already completed the execution of the certain process when the own unit completes the execution of a certain process. If the performance Ab is equal between the partner CPU unit and the own unit, the partner CPU unit should complete the execution of the certain process when the own unit completes the execution of a certain process.
  • each of the first CPU unit 100A and the second CPU unit 100B sets the normal waiting time Two as the waiting time Tw, thereby enabling the other CPU unit to set the normal waiting time Two. It is possible to accurately determine whether an abnormality has occurred in the CPU unit.
  • the control method sets the waiting time Tw as “the difference between the performance Ab and the normal waiting time Two. Is set in consideration of the adjustment waiting time Ta. Specifically, the difference between the time when the execution of the process in the own unit is completed and the time when the execution of the process in the partner CPU unit is expected to be completed is defined as the adjustment waiting time Ta.
  • the control method waits until “the time at which the execution of the processing in the partner CPU unit is expected to be completed”, and then the processing in the partner CPU unit until the “normal waiting time Two” elapses. It is determined whether the execution completion of can be confirmed. That is, in the control method, the execution of the process in the partner CPU unit is performed until the “period in which the adjustment wait time Ta is added to the normal wait time Two” from the completion of the execution of the process in the own unit. Determine whether completion can be confirmed.
  • the control method sets the “period obtained by adding the adjustment waiting time Ta to the normal waiting time Two” as the waiting time Tw.
  • the above determination can be accurately performed.
  • the control method can set an appropriate waiting time in consideration of the difference in the performance Ab between the own unit and the partner CPU unit. This has an effect that Tw can be set. That is, the control method can accurately perform the synchronization check processing without providing an unnecessary waiting time Tw in consideration of the difference in performance Ab between the CPU unit of the other party and the own unit to be duplicated. It works.
  • the performance Aby of the partner CPU unit used by the first CPU unit 100A and the second CPU unit 100B that are duplicated in the PLC 10 to set the “waiting time Tw” of the own unit is one type. .
  • the first CPU unit 300A and the second CPU unit 300B which are duplicated in the PLC 20 according to the present embodiment, have a plurality of performance Aby of the partner CPU unit used for setting the “waiting time Tw” of the own unit. It is. Hereinafter, the details will be described.
  • FIG. 5 is a diagram showing an example of a hardware configuration for realizing each of the first CPU unit 300A and the second CPU unit 300B. That is, each of the first CPU unit 300A and the second CPU unit 300B is realized using the memory 410, the CPU 420 (microcomputer), and the dedicated LSI (Large Scale Integration) 430.
  • the dedicated LSI is also called “ASIC (Application Specific Integrated Circuit)”, and an FPGA (Field Programmable Gate Array) may be used instead of the dedicated LSI.
  • first CPU unit 300A and second CPU unit 300B repeatedly executes a self-diagnosis process, an instruction execution process, and an I / O refresh process in the same order as each of first CPU unit 100A and second CPU unit 100B.
  • the self-diagnosis processing is mainly executed by the CPU 420
  • the instruction execution processing is mainly executed by the dedicated LSI 430
  • the I / O refresh processing is mainly executed by the CPU 420 via the dedicated LSI 430.
  • the performance Ab may be different between the first CPU unit 300A and the second CPU unit 300B for each processing.
  • the CPU 420 of the first CPU unit 300A may have higher performance Ab than the CPU 420 of the second CPU unit 300B
  • the dedicated LSI 430 of the first CPU unit 300A may have lower performance Ab than the dedicated LSI 430 of the second CPU unit 300B.
  • the first CPU unit 300A completes the execution of the self-diagnosis processing earlier than the second CPU unit 300B
  • the instruction execution processing of the first CPU unit 300A completes later than the second CPU unit 300B.
  • each of the first CPU unit 300A and the second CPU unit 300B grasps the performance Ab of its own unit and the partner CPU unit for each of the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing that are repeatedly executed. .
  • Each of the first CPU unit 300A and the second CPU unit 300B sets the “waiting time Tw” at the time of the synchronization check process for each process, using the performance Ab of the own unit and the partner CPU unit related to each process. I do.
  • FIG. 4 is a block diagram showing a main configuration of PLC 20 including first CPU unit 300A and second CPU unit 300B.
  • the PLC 20 may include a power supply unit, an input unit, an output unit, and a functional unit (not shown) such as a communication unit.
  • Each of the first CPU unit 300A and the second CPU unit 300B is a functional unit that controls the entire control of the PLC 10, like the first CPU unit 100A and the second CPU unit 100B.
  • the first CPU unit 300A and the second CPU unit 300B are duplicated in the PLC 20. That is, one of the first CPU unit 300A and the second CPU unit 300B serves as an active CPU unit (ACT), and the other serves as a standby CPU unit (STB), and monitors the state of each other. If the STB determines that an abnormality has occurred in the ACT during the synchronization check processing, the STB switches its own unit to the ACT instead of the CPU unit that has been the ACT, and continues operation.
  • ACT active CPU unit
  • STB standby CPU unit
  • the PLC 20 includes, in addition to the first CPU unit 300A and the second CPU unit 300B that are duplicated in the PLC 20, a common register 200 that can execute writing and reading. Since the common register 200 has already been described, the details will be omitted here.
  • the first CPU unit 300A includes a capability acquisition unit 310A, a process execution unit 120A, a waiting time setting unit 360A, and a determination unit 370A as functional blocks in addition to the storage unit 330A.
  • the storage unit 330A stores the other function table 340A and the own function table 350A.
  • the waiting time setting unit 360A includes a first waiting time setting unit 361A, a second waiting time setting unit 362A, and a third waiting time setting unit 363A
  • the determining unit 370A includes a first determining unit 371A, a second determining unit 372A, A third determination unit 373A is included.
  • the other function table 340A includes a first other function table 341A, a second other function table 342A, and a third other function table 343A.
  • the own function table 350A includes a first function table 351A, a second function table 352A, and a third function table 353A.
  • the second CPU unit 300B includes a capability acquisition unit 310B, a process execution unit 120B, a waiting time setting unit 360B, and a determination unit 370B as functional blocks in addition to the storage unit 330B.
  • the storage unit 330B stores the other function table 340B and the own function table 350B.
  • the waiting time setting unit 360B includes a first waiting time setting unit 361B, a second waiting time setting unit 362B, and a third waiting time setting unit 363B
  • the determining unit 370B includes a first determining unit 371B, a second determining unit 372B, A third determination unit 373B is included.
  • the other function table 340B includes a first other function table 341B, a second other function table 342B, and a third other function table 343B.
  • the own function table 350B includes a first function table 351B, a second function table 352B, and a third function table 353B.
  • the first CPU unit 300A and the second CPU unit 300B shown in FIG. 4 have the same configuration.
  • "A” is used for the configuration of the first CPU unit 300A, and the configuration of the second CPU unit 300B.
  • “B” is added.
  • the suffix “A” or “B” is abbreviated.
  • the functional blocks of the capability acquisition unit 310, the processing execution unit 120, the waiting time setting unit 360, the determination unit 370, and the like include, for example, a CPU (central processing unit), a ROM (read only memory), an NVRAM (non- This can be realized by reading a program stored in a storage device (storage unit 330) realized by Volatile (random access memory) or the like into a RAM (random access memory) (not shown) and executing the program.
  • a CPU central processing unit
  • ROM read only memory
  • NVRAM non- This can be realized by reading a program stored in a storage device (storage unit 330) realized by Volatile (random access memory) or the like into a RAM (random access memory) (not shown) and executing the program.
  • the capability acquisition unit 310 calculates the performance Aby (processing capability) of the duplicated CPU unit in each of the self-diagnosis process, the instruction execution process, and the I / O refresh process repeatedly executed by the process execution unit 120.
  • Information (“performance information").
  • the capability acquisition unit 310 stores the performance information of the partner CPU unit relating to each of the self-diagnosis process, the instruction execution process, and the I / O refresh process in the self-functionality table 350 of the partner CPU unit. Get by reference.
  • the capability acquisition unit 310 transmits the acquired “performance information (other device performance information) of the partner CPU unit related to each of the self-diagnosis process, the instruction execution process, and the I / O refresh process” to another function of the own unit. Stored in the force table 340.
  • the capability acquisition unit 310 performs the “duplication process” illustrated in FIG. 6 once before the process execution unit 120 repeatedly executes the self-diagnosis process, the instruction execution process, and the I / O refresh process in this order. In, the other device performance information related to each process is acquired.
  • the capability acquisition unit 310 refers to the first self-functionality table 351 of the CPU unit of the other party to be duplicated, and refers to the performance information indicating the performance Aby of the CPU unit of the other party to be duplicated in the self-diagnosis processing (for self-diagnosis). Other device performance information) ".
  • the capability acquiring unit 310 stores the acquired other device performance information for self-diagnosis in the first other function capability table 341 of the unit.
  • the capability acquisition unit 310 refers to the second self-functionality table 352 of the partner CPU unit to be duplicated and refers to “performance information indicating the performance Aby of the duplicated partner CPU unit related to the instruction execution process (for instruction execution). Other device performance information) ".
  • the capability acquiring unit 310 stores the acquired instruction execution other device performance information in the second other function capability table 342 of the own unit.
  • the capability acquiring unit 310 refers to the third self-functionality table 353 of the CPU unit of the other party to be duplicated, and reads the performance information (I relating to the I / O refresh processing indicating the performance Aby of the CPU unit of the other party to be duplicated. / O refresh other device performance information) ".
  • the capability acquiring unit 310 stores the acquired other device performance information for I / O refresh in the third other function capability table 343 of the unit.
  • FIG. 7 is a diagram illustrating a specific example of the process of “acquiring performance information indicating the performance Aby of the CPU unit of the other party to be duplexed” executed once in the “duplexing process”.
  • the capability acquisition unit 310A stores “performance information indicating the performance Aby of the second CPU unit 300B related to the self-diagnosis processing (self-diagnosis other device performance information)” in the first CPU unit 300B. It is acquired with reference to the own function table 351B.
  • the capability acquisition unit 310A stores the acquired self-diagnosis other-device performance information in the first other-function capability table 341A of the own unit.
  • the ability acquisition unit 310B refers to “performance information indicating the performance Aby of the first CPU unit 300A relating to the self-diagnosis processing (other-machine performance information for self-diagnosis)” and the first self-function capability table 351A of the first CPU unit 300A. And get.
  • the capability acquiring unit 310B stores the acquired self-diagnosis other-device performance information in the first other-function capability table 341B of the own unit.
  • the capability acquisition unit 310A refers to “performance information indicating the performance Aby of the second CPU unit 300B related to the instruction execution process (instruction execution other device performance information)” and the second own function table 352B of the second CPU unit 300B. And get.
  • the capability acquiring unit 310A stores the acquired instruction execution other device performance information in the second other function capability table 342A of the own unit.
  • the capability acquisition unit 310B refers to “performance information indicating the performance Aby of the first CPU unit 300A related to the instruction execution process (performance information of other device for instruction execution)” and the second own function table 352A of the first CPU unit 300A. And get.
  • the capability acquiring unit 310B stores the acquired instruction execution other device performance information in the second other function capability table 342B of the own unit.
  • the capability acquisition unit 310A stores the “performance information indicating the performance Aby of the second CPU unit 300B related to the I / O refresh process (the performance information of the other device for the I / O refresh process)” in the third function of the second CPU unit 300B. It is acquired with reference to the force table 353B.
  • the capability acquiring unit 310A stores the acquired other device performance information for I / O refresh processing in the third other function capability table 343A of the own unit.
  • the capability acquisition unit 310B stores the “performance information indicating the performance Aby of the first CPU unit 300A related to the I / O refresh process (I / O refresh process other device performance information)” in the third self-function of the first CPU unit 300A. It is acquired with reference to the force table 353A.
  • the capability acquiring unit 310B stores the acquired other device performance information for I / O refresh processing in the third other function capability table 343B of its own unit.
  • the process execution unit 120 repeatedly executes the self-diagnosis process, the instruction execution process, and the I / O refresh process in this order. Has completed execution of each process "in the common register 200.
  • the process execution unit 120 When the execution of each process is completed, the process execution unit 120 notifies the waiting time setting unit 360 and the determination unit 370 that “the unit has completed the execution of each process”.
  • the process execution unit 120 sets the “execution time of each process (the time from the start of execution to the completion of execution for each process)” in the waiting time setting unit 360 together with “the unit has completed execution of each process” in the waiting time setting unit 360. You may be notified. That is, the process execution unit 120 may measure the “execution time of each process” using the internal timer, and notify the waiting time setting unit 360 of the measured “execution time of each process”.
  • the waiting time setting unit 360 acquires the other device performance information by referring to the other function capability table 340, and acquires the own device performance information by referring to the own function capability table 350. Further, the waiting time setting unit 360 acquires from the processing executing unit 120 that “the unit has completed execution of each processing”. The waiting time setting unit 360 adds the message “the own unit has started executing each process” acquired from the process execution unit 120 before acquiring the message “the own unit has completed execution of each process”. , Calculate the execution time of each process. That is, the waiting time setting unit 360 calculates the time “the own unit has started execution of each process” measured by the internal timer and the time “the own unit has completed execution of each process” measured by the internal timer. The execution time of each process is calculated. The execution time of each process may be measured by the process execution unit 120 using an internal timer, and notified from the process execution unit 120 to the waiting time setting unit 360.
  • the waiting time setting unit 360 calculates a “waiting time Tw” for a synchronization check process for each process from the acquired other device performance information, own device performance information, and the execution time of each process, and calculates the calculated waiting time.
  • the determination unit 370 is notified of the time Tw.
  • the waiting time setting unit 360 uses the other device performance information, the own device performance information, and the execution time of each process to execute the “waiting” for the synchronization check process for each process as follows. Time Tw ”is calculated.
  • the waiting time setting unit 360 sets the “normal Waiting time Two ”is referred to as“ waiting time Tw ”.
  • the waiting time setting unit 360 sets the “normal waiting time Two” to the “waiting time Tw”.
  • the “normal waiting time Two” is a period common to the first CPU unit 300A and the second CPU unit 300B whose length is determined in advance, and is set, for example, at the time of factory shipment of each unit and can be updated by the user. Period.
  • the “normal waiting time Two” is that the performance Ab (particularly, the performance Ab related to each of the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing) is equal between the first CPU unit 300A and the second CPU unit 300B. Is a period set based on the assumption of
  • the waiting time setting unit 360 executes each process by dividing the performance Abm of the own unit by the performance Aby of the partner CPU unit. The period multiplied by the time is referred to as “adjustment waiting time Ta”.
  • the waiting time setting unit 360 sets the “period obtained by adding the adjustment waiting time Ta to the normal waiting time Two (that is,“ the normal waiting time Two + adjustment waiting time Ta ”)” is referred to as “waiting time Tw”.
  • “Wait time Tw” for synchronization check processing related to “self-diagnosis processing” is set by the first waiting time setting unit 361. .
  • the first waiting time setting unit 361 acquires the self-diagnosis other-device performance information by referring to the first other-function capability table 341, and refers to the first self-function capability table 351 to acquire the self-diagnosis own-device performance information. get. Further, the first waiting time setting unit 361 sends a message from the processing execution unit 120 indicating that “the own unit has started executing the self-diagnosis process” and that “the own unit has completed execution of the self-diagnosis process”. The execution time of the self-diagnosis processing is calculated from the notification.
  • the first waiting time setting unit 361 synchronizes the self-diagnosis process with the acquired self-diagnosis other-device performance information and self-diagnosis self-device performance information and the “execution time of the self-diagnosis process” calculated.
  • the “waiting time Tw” for the check processing is calculated.
  • the first waiting time setting unit 361 determines the ratio of “the performance Abm of the own unit related to the self-diagnosis processing” to “the performance Aby of the duplicated CPU unit related to the self-diagnosis processing”. Is calculated, the “adjustment waiting time Ta related to the self-diagnosis processing” is calculated. Then, the first waiting time setting unit 361 sets a period in which the calculated “adjustment waiting time Ta related to the self-diagnosis processing” is added to the “normal waiting time Two related to the self-diagnosis processing” for the self-diagnosis processing. Is set as the “waiting time Tw” for the synchronization check processing of the above.
  • the first waiting time setting unit 361 sets “adjustment waiting time Ta related to the self-diagnosis processing” to “0”.
  • the first waiting time setting unit 361 sets “adjustment waiting time Ta related to the self-diagnosis processing” to “Abm / Aby” as the execution time of the self-diagnosis processing of the own unit. / Aby ”).
  • the first waiting time setting unit 361 notifies the determining unit 370 of the “waiting time Tw for the synchronization check process for the self-diagnosis process” calculated by the above method.
  • the second waiting time setting unit 362 acquires the instruction execution other device performance information by referring to the second other function table 342, and refers to the second own function table 352 to acquire the instruction execution own device performance information. get. In addition, the second waiting time setting unit 362 receives a message from the processing execution unit 120 indicating that “the own unit has started execution of the instruction execution process” and that “the own unit has completed execution of the instruction execution process”. From the notification, the execution time of the instruction execution processing is calculated.
  • the second waiting time setting unit 362 synchronizes the instruction execution process with the acquired instruction execution other device performance information and the instruction execution own device performance information, and the “execution time of the instruction execution process” calculated.
  • the “waiting time Tw” for the check processing is calculated.
  • the second waiting time setting unit 362 calculates the ratio of “the performance Abm of the own unit related to the instruction execution process” to “the performance Aby of the other CPU unit to be duplicated related to the instruction execution process”. Is calculated, the “adjustment waiting time Ta related to the instruction execution process” is calculated. Then, the second waiting time setting unit 362 sets a period in which the calculated “adjustment waiting time Ta related to the instruction execution processing” is added to the “normal waiting time Two related to the instruction execution processing” for the instruction execution processing. Is set as the “waiting time Tw” for the synchronization check processing of the above.
  • the second waiting time setting unit 362 sets “adjustment waiting time Ta related to the instruction execution process” to “0”.
  • the second waiting time setting unit 362 sets “adjustment waiting time Ta related to the instruction execution processing” to “Abm / Aby” as “the execution time of the instruction execution processing of the own unit”. / Aby ”).
  • the first wait time setting unit 361 notifies the determination unit 370 of the “wait time Tw for the synchronization check process for the instruction execution process” calculated by the above method.
  • the third waiting time setting unit 363 acquires the other device performance information for I / O refresh with reference to the third other function table 343, and refers to the third own function table 353 to acquire the I / O refresh self-function. Get machine performance information. Further, the third waiting time setting unit 363 sends a message from the processing execution unit 120 stating that “the own unit has started executing the I / O refresh processing” and “the own unit has completed the execution of the I / O refresh processing”. Then, the execution time of the I / O refresh processing is calculated from the notification that "I did".
  • the third waiting time setting unit 363 calculates the I / O refresh other device performance information, the I / O refresh own device performance information, and the calculated “I / O refresh processing execution time”.
  • the “waiting time Tw” for the synchronization check processing for the I / O refresh processing is calculated.
  • the third waiting time setting unit 363 includes “the performance Abm of the own unit related to the I / O refresh processing” and “the performance Aby of the other CPU unit to be duplexed related to the I / O refresh processing”. , The "adjustment wait time Ta related to the I / O refresh processing" is calculated. Then, the third waiting time setting unit 363 adds a period in which the calculated “adjustment waiting time Ta related to the I / O refresh processing” is added to the “normal waiting time Two related to the I / O refresh processing”, This is set as a "waiting time Tw" for the synchronization check processing for the I / O refresh processing.
  • the third waiting time setting unit 363 sets “adjustment waiting time Ta related to I / O refresh processing” to “0”.
  • the third waiting time setting unit 363 sets “adjustment waiting time Ta related to I / O refresh processing” to “execution time of I / O refresh processing of the own unit”. Is multiplied by “Abm / Aby” ”.
  • the third wait time setting unit 363 notifies the determination unit 370 of the “wait time Tw” for the synchronization check process for the I / O refresh process calculated by the above method.
  • the determination unit 370 executes the synchronization check process after the elapse of the waiting time Tw notified from the waiting time setting unit 360 from the point of “the own unit has completed execution of each process”. For example, the determination unit 370 refers to the common register 200 at the time when the waiting time Tw has elapsed from the time “the own unit has completed the execution of each process”, and performs the duplexing for a certain process whose own unit has completed the execution. The execution of the other CPU unit is completed.
  • the determination unit 370 notified of the “normal waiting time Two + adjustment waiting time Ta” as the waiting time Tw executes the standby processing from the time “the own unit has completed execution of each process” until the adjustment waiting time Ta is reached. . Then, the determination unit 370 executes the synchronization check process after the execution of the standby process is completed (that is, after the adjustment waiting time Ta has elapsed from the time when “the own unit has completed the execution of each process”). That is, after the execution of the standby process is completed, the determination unit 370 can confirm that the execution of the process completed by the own unit is completed by the partner CPU unit before the normal waiting time Two elapses. ? In other words, the determination unit 370 determines whether the completion of the execution by the partner CPU unit can be confirmed for the processing that has been completed by the own unit before the normal waiting time Two elapses from the completion of the execution of the standby processing.
  • the determination unit 370 which has been notified of the “normal waiting time Two” as the waiting time Tw, immediately executes the synchronization check processing at the time of “the own unit has completed execution of each processing”. That is, the determination unit 370 determines whether or not it is possible to confirm that the CPU unit of the other party has completed the execution of the process completed by the own unit before the normal waiting time Two elapses. In other words, the determination unit 370 determines whether the execution completion of the own unit can be confirmed by the partner CPU unit before the normal waiting time Two elapses from the execution completion time of the own unit.
  • the first determination unit 371 executes synchronization check processing according to “Self-diagnosis processing”. In other words, the first determination unit 371 determines that the “waiting time Tw for the self-diagnosis processing” notified from the first waiting time setting unit 361 elapses from the completion of the self-diagnosis processing of the own unit. , It is checked whether the other CPU unit has completed the execution of the self-diagnosis processing. If the “waiting time Tw” for the self-diagnosis process has not elapsed before the completion of execution of the self-diagnosis process by the partner CPU unit cannot be confirmed, the first determination unit 371 determines the CPU of the partner device. It is determined that an error has occurred in the unit.
  • the second determination unit 372 executes a synchronization check process related to “instruction execution process”. That is, the second determination unit 372 determines whether the “wait time Tw” for the instruction execution process notified from the second wait time setting unit 362 elapses from the completion of the execution of the instruction execution process of the own unit. , It is checked whether the partner CPU unit has completed the execution of the instruction execution process. If it is not possible to confirm that “the other CPU unit has completed the execution of the instruction execution process” before the “wait time Tw” for the instruction execution process has elapsed, the second determination unit 372 determines It is determined that an error has occurred in the unit.
  • the third determination unit 373 executes a synchronization check process related to “I / O refresh process”. That is, the third determination unit 373 sets the “waiting time Tw” for the I / O refreshing process notified from the third waiting time setting unit 363 from the completion of the execution of the I / O refreshing process of the own unit. By the elapse of time, it is checked whether "the other CPU unit has completed the execution of the I / O refresh processing".
  • the third determination unit 373 determines It is determined that an abnormality has occurred in the CPU unit.
  • the determination unit 370A refers to the second register 220 of the common register 200, and determines whether or not there is a write indicating that “the execution by the process execution unit 120B has been completed” for a certain process that has been completed by the process execution unit 120A. Confirm. If there is no write in the second register 220 that “the execution by the process execution unit 120B has been completed” for a certain process that has been completed by the process execution unit 120A, the determination unit 370A determines that an abnormality has occurred in the second CPU unit 300B. It is determined that an error has occurred.
  • the determination unit 370B refers to the first register 210 of the common register 200, and determines whether or not there is a write indicating that “the execution by the process execution unit 120A has been completed” for a certain process that has been completed by the process execution unit 120B. Confirm. If there is no write in the first register 210 that “the execution by the process execution unit 120A has been completed” for a certain process that has been completed by the process execution unit 120B, the determination unit 370B determines that an abnormality has occurred in the first CPU unit 300A. It is determined that an error has occurred.
  • the storage unit 330 is a storage device that stores various data used by each of the first CPU unit 300A and the second CPU unit 300B.
  • the storage unit 330 stores (1) a control program, (2) an OS program, and (3) each of the first CPU unit 300A and the second CPU unit 300B executed by the first CPU unit 300A and the second CPU unit 300B.
  • An application program for executing various functions provided therein, and (4) various data to be read when the application program is executed may be temporarily stored.
  • the above data (1) to (4) are, for example, ROM (read only memory), flash memory, EPROM (Erasable Programmable ROM), EEPROM (registered trademark) (Electrically EPROM), HDD (Hard Disc Drive), etc.
  • Each of the first CPU unit 300A and the second CPU unit 300B may include a temporary storage unit (not shown).
  • the temporary storage unit is a so-called working memory that temporarily stores data used for calculation, calculation results, and the like in the course of various processes executed by each of the first CPU unit 300A and the second CPU unit 300B. Access Memory). Which data is stored in which storage device is appropriately determined based on the purpose of use, convenience, cost, physical restrictions, and the like of each of the first CPU unit 300A and the second CPU unit 300B.
  • the storage unit 330 further stores another function table 340 and own function table 350.
  • the other function capability table 340 stores other device performance information that is information indicating the performance Aby (processing capability) of the CPU unit of the other party to be duplicated.
  • the capability acquiring unit 310 stores the other device performance information acquired with reference to the own function table 350 of the CPU unit of the other party to be duplicated in the other function table 340 of the own unit. Store.
  • the performance indicating the performance Aby of the partner CPU unit to be duplicated which is related to the self-diagnosis processing and stored in the first self function table 351 of the partner CPU unit to be duplicated.
  • Information is stored by the capability acquisition unit 310.
  • the “performance indicating the performance Aby of the partner CPU unit to be duplicated which is related to the instruction execution processing and stored in the second own function table 352 of the partner CPU unit to be duplicated.
  • Information is stored by the capability acquisition unit 310.
  • the performance Aby of the partner CPU unit to be duplicated which is related to the I / O refresh processing and stored in the third own function table 353 of the partner CPU unit to be duplicated, is stored.
  • the “performance information shown” is stored by the capability acquisition unit 310.
  • the own function table 350 stores own device performance information that is information indicating the performance Abm (processing capacity) of the own unit. For example, “How much performance (the own unit is compared with the reference CPU unit) Own device performance information is stored.
  • the own device performance information is stored in the own function table 350 when each of the first CPU unit 300A and the second CPU unit 300B is shipped from the factory, for example.
  • the first self-functionality table 351 includes performance information indicating the performance Abm of the self-unit related to the self-diagnosis processing (particularly, relative performance Abm with respect to “performance Abb of the reference CPU unit related to the self-diagnosis processing”). ) "Is stored.
  • the second self-functionality table 352 includes “Performance information indicating the performance Abm of the own unit related to the instruction execution process (particularly, relative performance Abm with respect to“ performance Abb of the reference CPU unit related to the instruction execution process ”). ) "Is stored.
  • the third self-functionality table 353 includes performance information indicating the performance Abm of the own unit related to the I / O refresh processing (particularly, relative to the “performance Abb of the reference CPU unit related to the I / O refresh processing”). Performance Abm) "is stored.
  • each of the first CPU unit 300A and the second CPU unit 300B is a duplicated CPU unit in the PLC 20 (controller), similarly to each of the first CPU unit 100A and the second CPU unit 100B.
  • Each of the first CPU unit 300A and the second CPU unit 300B includes a waiting time setting unit 360 (setting unit) and a determination unit 370.
  • the waiting time setting unit 360 sets the waiting time Tw in consideration of the ratio between the performance Abm (processing capacity) of the own unit and the performance Aby of the CPU unit of the other party to be duplicated.
  • the determination unit 370 cannot confirm that the execution of the process by the other CPU unit has been completed before the elapse of the waiting time Tw set by the waiting time setting unit 360 from the time when the execution of the process in the own unit is completed, It is determined that an abnormality has occurred in the CPU unit.
  • each of the first CPU unit 300A and the second CPU unit 300B takes an appropriate wait time in consideration of the difference in performance Ab between the own unit and the partner CPU unit.
  • Time Tw can be set. That is, each of the first CPU unit 300A and the second CPU unit 300B performs the synchronization check processing without providing an unnecessary waiting time Tw in consideration of the difference in the performance Ab between the CPU unit of the other party and the own unit. Can be done accurately.
  • the processing includes a self-diagnosis processing, an instruction execution processing, and an I / O refresh processing.
  • the waiting time setting unit 360 includes a self-diagnosis process, an instruction execution process, , I / O refresh processing, a wait time Tw is set.
  • the determination unit 370 includes a self-diagnosis process, an instruction execution process, and an I / O refresh process. , The above-mentioned determination, that is, the synchronization check process is executed.
  • Each of the first CPU unit 300A and the second CPU unit 300B determines the synchronization between its own unit and the partner CPU unit at the timing of completion of each of the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing. be able to.
  • Each of the first CPU unit 300A and the second CPU unit 300B executes the duplexing process once before repeatedly executing the self-diagnosis process, the instruction execution process, and the I / O refresh process in this order.
  • Each of the first CPU unit 300A and the second CPU unit 300B acquires the performance Aby of the partner CPU unit from the partner CPU unit in the duplex processing.
  • Each of the first CPU unit 300A and the second CPU unit 300B takes into account the performance Aby of the partner CPU unit that has been acquired before repeatedly executing each of the processes, and the waiting time used for the determination of each of the processes. This has an effect that Tw can be set.
  • the waiting time setting unit 360 sets the waiting time Tw of each of the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing as follows. That is, the waiting time setting unit 360 considers the ratio between the performance Abm of the own unit and the performance Aby of the CPU unit of the partner, which are related to the execution of the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing. Then, the waiting time Tw of each process is set.
  • the first waiting time setting unit 361 performs the synchronization check processing for the self-diagnosis processing in consideration of the ratio between the performance Abm of the own unit and the performance Aby of the partner CPU unit in the self-diagnosis processing.
  • the second wait time setting unit 362 is a wait time for the synchronization check processing of the instruction execution processing, taking into account the ratio of the performance Abm of the own unit and the performance Aby of the partner CPU unit in the instruction execution processing. Tw is set.
  • the third waiting time setting unit 363 performs the synchronization check processing for the I / O refresh processing in consideration of the ratio between the performance Abm of the own unit and the performance Aby of the partner CPU unit related to the I / O refresh processing. Waiting time Tw is set.
  • Each of the first CPU unit 300A and the second CPU unit 300B considers a difference in performance Ab between the own unit and the partner CPU unit in each of the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing. , A waiting time Tw for each process is set.
  • each of the first CPU unit 100A and the second CPU unit 100B can set the waiting time Tw of each process according to the performance Ab of each of the own unit and the partner CPU unit related to each process. To play.
  • FIG. 6 is a diagram illustrating an outline of processing executed by each of first CPU unit 300A and second CPU unit 300B.
  • the processing executed by each of first CPU unit 300A and second CPU unit 300B shown in FIG. 6 is different from the processing executed by each of first CPU unit 100A and second CPU unit 100B shown in FIG. 2 in the following points. .
  • each of the first CPU unit 300A and the second CPU unit 300B grasps the performance Ab of the own unit and the partner CPU unit for each of the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing that are repeatedly executed. .
  • Each of the first CPU unit 300A and the second CPU unit 300B sets the “waiting time Tw” at the time of the synchronization check process for each process, using the performance Ab of the own unit and the partner CPU unit related to each process. I do.
  • Each of the first CPU unit 300A and the second CPU unit 300B indicates that the execution of each process by the partner CPU unit has been completed until the “waiting time Tw” for each process has elapsed since the completion of the execution of each process by the own unit. Is determined.
  • the processing executed by each of the first CPU unit 300A and the second CPU unit 300B is a control method of a CPU unit that is duplicated in the PLC 20 (controller), and includes a setting step and a determination step.
  • the setting step the waiting time Tw is set in consideration of the ratio between the performance Abm of the own unit and the performance Aby of the CPU unit to be duplicated.
  • the determination step includes, when the completion of the processing in the partner CPU unit cannot be confirmed from the time when the execution of the processing in the own unit is completed to the time when the waiting time Tw set in the setting step elapses, to the partner CPU unit. It is determined that an abnormality has occurred.
  • the processing executed by each of the first CPU unit 300A and the second CPU unit 300B indicates that even if the performance Ab does not match between the own CPU unit and the other CPU unit, the processing between the own CPU unit and the other CPU unit may not be performed.
  • an appropriate waiting time Tw can be set in consideration of the difference in the performance Ab. That is, “the processing executed by each of the first CPU unit 300A and the second CPU unit 300B” does not provide an unnecessary waiting time Tw in consideration of the difference in the performance Ab between the CPU unit of the other party to be duplicated and the own unit.
  • the synchronization check process can be performed accurately.
  • the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing transmission and reception of signals to and from a communication network different from the communication network in which signals are transmitted and received in the I / O refresh processing are performed.
  • Other communication processes may be repeatedly executed. That is, the self-diagnosis processing, the instruction execution processing, the I / O refresh processing, and other communication processing are repeatedly executed in this order, and after the execution of each of these processings is completed, the synchronization check processing relating to each of these processings is executed. May be done.
  • the control blocks of each of the first CPU unit 100A, the second CPU unit 100B, the first CPU unit 300A, and the second CPU unit 300B may be realized by a logic circuit (hardware) formed in an integrated circuit (IC chip) or the like, or may be a CPU (CenTral Processing Unit). And may be realized by software.
  • each of the first CPU unit 100A, the second CPU unit 100B, the first CPU unit 300A, and the second CPU unit 300B is a CPU that executes instructions of a program that is software for realizing each function, the above-described program and various data.
  • a ROM Read Only Memory
  • a storage device these are referred to as “recording media” recorded readable by a computer (or CPU), a RAM (Random Access Memory) for expanding the program, and the like.
  • the object of the present invention is achieved when the computer (or CPU) reads the program from the recording medium and executes the program.
  • a “temporary tangible medium”, for example, a tape, a disk, a card, a semiconductor memory, a programmable logic circuit, or the like can be used.
  • the program may be supplied to the computer via an arbitrary transmission medium (a communication network, a broadcast wave, or the like) capable of transmitting the program.
  • a transmission medium a communication network, a broadcast wave, or the like
  • the present invention can also be realized in the form of a data signal embedded in a carrier wave, in which the program is embodied by electronic transmission.
  • a CPU unit is a CPU unit that is duplexed in a controller, and takes a waiting time into consideration in consideration of a ratio between the processing capability of its own unit and the processing capability of a partner CPU unit that is duplicated.
  • the CPU unit uses the waiting time set in consideration of the processing capacity ratio between the own unit and the partner CPU unit, and performs communication between the own unit and the partner CPU unit.
  • the synchronization that is, the coincidence of the executed processing
  • the CPU unit sets a predetermined “normal waiting time” as the waiting time. I do. If the performance Ab is equal between the other CPU unit and the own unit, the control method sets a predetermined “normal waiting time” as the waiting time Tw.
  • the partner CPU unit has higher performance than the own unit, the partner CPU unit should have already completed execution of the certain process when the own unit completes execution of a certain process. . If the performance Ab is equal between the partner CPU unit and the own unit, the partner CPU unit should complete the execution of the certain process when the own unit completes the execution of a certain process.
  • the CPU unit sets the “normal waiting time” as the waiting time, so that the abnormality of the other CPU unit occurs. It can be accurately determined whether or not the occurrence has occurred.
  • the CPU unit considers the performance difference in the normal waiting time as the waiting time. Period after adding the adjusted waiting time ”. Specifically, the "difference between the time when the execution of the process in the own unit is completed and the time when the execution of the process in the partner CPU unit is expected to be completed" is defined as the adjustment waiting time.
  • the partner CPU unit When the performance of the partner CPU unit is lower than that of the own unit, the partner CPU unit has not completed execution of the certain process at the time when the self unit has completed execution of a certain process. Therefore, the CPU unit waits until “the time point at which the execution of the processing in the other CPU unit is expected to be completed”, and then the CPU unit in the other CPU unit until “normal waiting time” elapses. It is determined whether the execution completion of the process can be confirmed. In other words, the CPU unit performs the processing in the partner CPU unit from the time when the execution of the processing in the own unit is completed to the time when “the period in which the adjustment waiting time is added to the normal waiting time” elapses. Determine whether execution completion can be confirmed.
  • the CPU unit sets “the period in which the adjustment waiting time is added to the normal waiting time” as the waiting time. Thus, the above determination can be accurately performed.
  • the CPU unit considers the difference in the processing capability between the own unit and the counterpart CPU unit, even when the processing capabilities of the own unit and the counterpart CPU unit do not match. This has an effect that an appropriate waiting time can be set. That is, the CPU unit can accurately perform the synchronization check processing without providing an unnecessary waiting time in consideration of the difference in processing capacity between the CPU unit of the other party and the own unit to be duplicated. To play.
  • the processing includes: a self-diagnosis processing for diagnosing whether there is an abnormality in hardware of the own unit; Processing, and an I / O refresh processing for exchanging data with an external device other than the partner CPU unit.
  • the setting unit performs the self-diagnosis processing, the instruction execution processing, and the I / O processing.
  • the waiting time may be set for each of the refresh processing, and the determination unit may perform the determination for each of the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing.
  • the CPU unit synchronizes the self-diagnosis process, the instruction execution process, and the I / O refresh process between the self-unit and the counterpart CPU unit (that is, execution completion). Is determined).
  • the CPU unit may determine the synchronization between the self unit and the partner CPU unit at the timing of completion of execution of each of the self-diagnosis process, the instruction execution process, and the I / O refresh process. It has the effect of being able to do it.
  • the CPU unit Before repeatedly executing the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing in this order, the CPU unit according to an aspect of the present invention may increase the processing capability of the partner CPU unit.
  • the duplication processing obtained from the partner CPU unit may be executed once.
  • the CPU unit determines the processing capability of the partner CPU unit before repeatedly executing the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing in this order. Acquire once. Then, the CPU unit sets the waiting time used for the determination for each process in consideration of the ratio of the acquired processing capability of the partner CPU unit to the processing capability of the own unit.
  • the CPU unit sets the waiting time used for the determination on each process in consideration of the processing capability of the partner CPU unit acquired in advance before repeatedly executing each process.
  • the effect is that it can be done.
  • the setting unit may determine the waiting time of each of the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing by the self-diagnosis processing, the instruction execution processing.
  • the setting may be made in consideration of the ratio between the processing capacity of the own unit and the processing capacity of the CPU unit of the other party, relating to the execution of the processing and the I / O refresh processing.
  • the CPU unit is configured to execute the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing, respectively, in the processing capability of the own unit and the partner CPU unit.
  • the waiting time for each process is set in consideration of the difference.
  • the CPU unit sets the waiting time of each of the self-diagnosis process, the instruction execution process, and the I / O refresh process to the processing capability of the own unit and the counterpart CPU unit for each process. It can be set according to the effect.
  • the control method is a control method for a CPU unit that is duplicated in a controller, and in consideration of a ratio between the processing capability of the own unit and the processing capability of the other CPU unit that is duplicated, The completion of the execution of the process by the partner CPU unit cannot be confirmed from the setting step of setting the waiting time and the completion of the execution of the process in the own unit until the elapse of the waiting time set in the setting step And a determining step of determining that an abnormality has occurred in the partner CPU unit.
  • the control method uses the waiting time set in consideration of the processing capacity ratio between the own unit and the partner CPU unit, and uses the waiting time between the own unit and the partner CPU unit.
  • the synchronization that is, the coincidence of the executed processing
  • the control method sets a predetermined “normal waiting time” as the waiting time. I do. If the performance Ab is equal between the other CPU unit and the own unit, the control method sets a predetermined “normal waiting time” as the waiting time Tw.
  • the partner CPU unit has higher performance than the own unit, the partner CPU unit should have already completed execution of the certain process when the own unit completes execution of a certain process. . If the performance Ab is equal between the partner CPU unit and the own unit, the partner CPU unit should complete the execution of the certain process when the own unit completes the execution of a certain process.
  • the control method sets the “normal waiting time” as the waiting time so that the other CPU unit has no abnormality. It can be accurately determined whether or not the occurrence has occurred.
  • the control method sets “the normal waiting time to the performance difference in consideration of the performance difference” as the waiting time. Period after adding the adjusted waiting time ”. Specifically, the "difference between the time when the execution of the process in the own unit is completed and the time when the execution of the process in the partner CPU unit is expected to be completed" is defined as the adjustment waiting time.
  • the control method waits until “the time point at which the execution of the processing in the other party's CPU unit is expected to be completed”, and then, until the “normal waiting time” elapses, It is determined whether the execution completion of the process can be confirmed.
  • the control method performs the processing of the processing in the partner CPU unit from the time when the execution of the processing in the own unit is completed to the time when “the period in which the adjustment waiting time is added to the normal waiting time” elapses. Determine whether execution completion can be confirmed.
  • control method may set “a period obtained by adding the adjustment waiting time to the normal waiting time” as the waiting time. Thus, the above determination can be accurately performed.
  • the control method considers the difference in the processing capabilities between the own unit and the counterpart CPU unit even when the processing capacities of the own unit and the counterpart CPU unit do not match. This has an effect that an appropriate waiting time can be set. That is, the control method can accurately perform the synchronization check processing without providing an unnecessary waiting time in consideration of the difference in processing capacity between the CPU unit of the other party and the own unit to be duplicated. To play.
  • PLC 20 PLC 100A first CPU unit (CPU unit) 100B 2nd CPU unit (CPU unit) 300A first CPU unit (CPU unit) 300B 2nd CPU unit (CPU unit) 160 Time setting part (setting part) 360 time setting part (setting part) 170 Judgment unit 370 Judgment unit Ab Performance (processing capacity) Tw wait time

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Hardware Redundancy (AREA)
  • Safety Devices In Control Systems (AREA)
  • Programmable Controllers (AREA)

Abstract

The present invention prevents erroneous determinations related to synchronization even in the case where duplexed CPU units in a PLC have mutually different processing capacities. A first CPU unit (100A) sets a waiting time (Tw) for a synchronization check process, in consideration of the ratio between the ability (Abm) of the unit and the ability (Aby) of a second CPU unit (100B).

Description

CPUユニット、CPUユニットの制御方法、情報処理プログラム、および記録媒体CPU unit, CPU unit control method, information processing program, and recording medium
 本発明は、コントローラにおいて二重化されるCPUユニット等に関する。 The present invention relates to a CPU unit and the like that are duplicated in a controller.
 従来、PLC(プログラマブル・ロジック・コントローラ、Programmable Logic Controller)について、システムの安全性、信頼性を向上すること等を目的として、CPUユニットを二重化する構成が知られている。例えば、下掲の特許文献1には、二重化運転開始に先立ち、実行系のCPUユニットが、待機系のCPUユニットのユニットバージョンを取得し、自己が記憶保持する機能バージョンと比較して、ユニットバージョンが機能バージョン以上である場合に二重化運転可能と判断する構成が開示されている。以下、図8および図9を参照して、PLCにおけるCPUユニットの、従来までの二重化について説明する。 Conventionally, for a PLC (Programmable Logic Controller), there is known a configuration in which a CPU unit is duplicated for the purpose of improving system safety and reliability. For example, in Patent Document 1 below, prior to the start of the duplex operation, the CPU unit of the execution system acquires the unit version of the CPU unit of the standby system, compares it with the function version stored and retained by itself, and compares the unit version. A configuration is disclosed that determines that redundant operation is possible when is a function version or higher. Hereinafter, with reference to FIG. 8 and FIG. 9, a description will be given of the conventional duplication of the CPU unit in the PLC.
 図8は、PLCにおいて二重化されたCPUユニットの、従来までの処理の概要を説明する図である。図8に例示するように、PLCにおいて二重化されたCPUユニットの各々は、自己診断処理、命令実行処理、および、I/Oリフレッシュ処理を、この順に繰り返し実行する。I/Oリフレッシュ処理が実行されてから、次のI/Oリフレッシュ処理が実行されるまでを「1サイクル(1周期)」とも称する。つまり、PLCにおいて二重化されたCPUユニットの各々は、「1サイクル(1周期)」において、自己診断処理、命令実行処理、および、I/Oリフレッシュ処理を、この順で実行する。「1サイクル」に要する期間(つまり、I/Oリフレッシュ処理が実行されてから、次のI/Oリフレッシュが実行されるまでの期間)を、「サイクルタイム」とも称する。 FIG. 8 is a diagram illustrating an outline of a conventional process of a CPU unit duplexed in a PLC. As illustrated in FIG. 8, each of the CPU units duplicated in the PLC repeatedly executes a self-diagnosis process, an instruction execution process, and an I / O refresh process in this order. The period from when the I / O refresh processing is performed to when the next I / O refresh processing is performed is also referred to as “one cycle (one cycle)”. That is, each of the CPU units duplicated in the PLC executes the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing in this order in "one cycle (one cycle)". A period required for “one cycle” (that is, a period from the execution of the I / O refresh processing to the execution of the next I / O refresh) is also referred to as “cycle time”.
 自己診断処理は、自ユニットのハードウェアが正常に動作しているか、特にメモリおよびハードディスク等に異常がないかを診断する処理である。命令実行処理は、ユーザプログラム等を実行する処理であり、前の周期において実行されたI/Oリフレッシュ処理で取得したデータを用いて各種の演算を実行し、現在の周期におけるI/Oリフレッシュ処理で出力するデータを生成する処理である。I/Oリフレッシュ処理は、二重化された相手方のCPUユニット以外の、外部装置および外部ユニットとのデータ交換を実行する処理であり、直前の命令実行処理で生成されたデータを出力し、次の周期の命令実行処理に用いるデータを取得する処理である。 The self-diagnosis process is a process for diagnosing whether the hardware of the self-unit is operating normally, and in particular, whether there is any abnormality in the memory and the hard disk. The instruction execution process is a process for executing a user program or the like, executes various operations using data obtained in the I / O refresh process executed in the previous cycle, and executes the I / O refresh process in the current cycle. This is the process of generating the data to be output. The I / O refresh process is a process for exchanging data with an external device and an external unit other than the duplicated CPU unit of the other party, outputting data generated in the immediately preceding instruction execution process, and outputting the next cycle. This is a process of acquiring data used for the instruction execution process.
 PLCにおいて二重化されるCPUユニットは、一方が実行系とされ、他方が待機系(STB)とされ、互いに、二重化された相手方のCPUユニットの状態を確認する。そして、前記実行系のCPUユニットがダウンした場合、前記待機系のCPUユニットが、ダウンした前記実行系のCPUユニットに切り替わって、運転を継続する。以下、実行系とされたCPUユニットを「ACT」と略記し、待機系とされたCPUユニットを「STB」と略記することがある。 One of the duplicated CPU units in the PLC is an active system and the other is a standby system (STB), and mutually confirms the status of the duplicated CPU unit. When the active CPU unit goes down, the standby CPU unit is switched to the down active CPU unit to continue the operation. Hereinafter, the CPU unit serving as the execution system may be abbreviated as “ACT”, and the CPU unit serving as the standby system may be abbreviated as “STB”.
 ACTがダウンした場合のACTからSTBへの切替をスムーズに行なうため、ACTとSTBとは、図8に示すように、各CPUユニットの内部処理の途中で、同期をとっている。すなわち、ACTとSTBとの各々は、自ユニットが、自己診断処理、命令実行処理、および、I/Oリフレッシュ処理の各々の実行を完了したタイミングで、二重化される相手方のユニットに異常が発生していないことを確認する。自ユニットが、自己診断処理、命令実行処理、および、I/Oリフレッシュ処理の各々の実行を完了したタイミングで実行する、「二重化される相手方のユニットに異常が発生していないことの確認処理」を、「同期チェック処理」とも称する。 In order to smoothly switch from ACT to STB when ACT is down, ACT and STB are synchronized during the internal processing of each CPU unit, as shown in FIG. That is, in each of the ACT and the STB, at the timing when the self-unit completes the execution of the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing, an abnormality occurs in the unit of the other party to be duplexed. Make sure you are not. "Confirmation that no abnormality has occurred in the other unit to be duplexed", which is executed at the timing when the own unit completes execution of each of the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing. Is also referred to as “synchronization check processing”.
 内部処理の途中で同期をとることによって、各CPUユニットのサイクル(より正確には、各CPUユニットの内部処理の開始時刻)はずれることがなく、二重化されるCPUユニットは、同一の処理を同じタイミングで実行することができる。ACTとSTBとの各々は、自己診断処理、命令実行処理、および、I/Oリフレッシュ処理の各々の実行完了時点で、同期チェック処理を実行し、同期(つまり、相手方のユニットに異常が発生していないこと)を確認してから、次の処理の実行を開始する。したがって、ACTとSTBとの各々は、自己診断処理、命令実行処理、および、I/Oリフレッシュ処理の各々の実行を、同じタイミングで開始することができる。 By synchronizing during the internal processing, the cycle of each CPU unit (more precisely, the start time of the internal processing of each CPU unit) does not deviate, and the duplicated CPU units execute the same processing at the same timing. Can be run with Each of the ACT and the STB executes a synchronization check process at the completion of each of the self-diagnosis process, the instruction execution process, and the I / O refresh process, and performs synchronization (that is, when an abnormality occurs in the partner unit). Is not checked), and then the execution of the next process is started. Therefore, each of the ACT and the STB can start the execution of the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing at the same timing.
 ACTおよびSTBの各々は、基本的に、この同期チェック処理において、互いに相手の状態を監視し(言い換えれば、確認し)、ACTが異常停止していれば、STBが、異常停止したACTに代わって、運転を引き継ぐ。 In this synchronization check processing, each of the ACT and the STB basically monitors the state of the other party (in other words, confirms), and if the ACT is abnormally stopped, the STB replaces the abnormally stopped ACT. Take over the driving.
 ここで、「ACTまたはSTBが、同期対象(つまり、二重化された相手方のCPUユニット)の異常を検知できない(特に、ACTがSTBの異常を検知できない)」場合を想定して、ACTおよびSTBの各々は、以下のように同期チェック処理を実行する。すなわち、ACTおよびSTBの各々は、各同期チェック処理において、相手方のCPUユニットの応答を所定期間内に取得できなかった場合、「二重化された相手方のCPUユニットに異常が発生した(つまり、同期エラーが発生した)」と判定する。具体的には、ACTおよびSTBの各々は、各同期チェック処理において、相手方のCPUユニットから「対応する処理の実行を完了した」旨の通知を、判定期間内に取得できなかった場合、「二重化された相手方のCPUユニットに異常が発生した」と判定する。 Here, assuming a case where the ACT or STB cannot detect an abnormality of the synchronization target (that is, the duplicated CPU unit) (in particular, the ACT cannot detect an abnormality of the STB), Each performs a synchronization check process as follows. In other words, if each of the ACT and STB fails to acquire the response of the partner CPU unit within a predetermined period in each synchronization check process, the ACT and the STB indicate that an error has occurred in the duplicated partner CPU unit (that is, the synchronization error has occurred). Has occurred). " Specifically, if each of the ACT and the STB cannot obtain a notification indicating that “the execution of the corresponding process has been completed” from the partner CPU unit in the respective synchronization check processes within the determination period, An abnormality has occurred in the specified CPU unit of the other party ".
 「二重化された相手方のCPUユニットに異常が発生した」と判定すると、ACTおよびSTBの各々は、「二重化を解除する」処理を実行する。「二重化を解除する」ことによって、ACTおよびSTBの各々は、「異常が発生した相手方のCPUユニットとの同期を維持することによって、サイクルタイムが極端に長くなる」ことを防止している。二重化を解除しない場合、つまり、「相手方のユニットに異常が発生していないことを確認できるまで、次の処理の実行を開始しない」場合、相手方のCPUユニットに異常が発生すると、「相手方のユニットに異常が発生していないこと」の確認ができない。そのため、次の処理の実行を開始できず、サイクルタイムが極端に長くなる。 判定 す る When it is determined that “an error has occurred in the duplicated CPU unit of the other party”, each of the ACT and the STB executes the “cancel the duplication” process. By "cancelling the duplication", each of the ACT and the STB prevents the "cycle time from becoming extremely long by maintaining synchronization with the partner CPU unit in which the abnormality has occurred". If the duplication is not canceled, that is, if “the next processing is not started until it is confirmed that no abnormality has occurred in the partner unit”, and if an abnormality occurs in the partner CPU unit, No abnormality has occurred ". Therefore, execution of the next process cannot be started, and the cycle time becomes extremely long.
 図9は、自己診断処理、命令実行処理、および、I/Oリフレッシュ処理の各々の実行完了時点で実行される同期チェック処理の詳細を説明する図である。前述の通り、同期チェック処理において、ACTおよびSTBの各々は、相手方のCPUユニットから「対応する処理の実行を完了した」旨の通知を、判定期間内に取得できたかを確認する。 FIG. 9 is a diagram for explaining the details of the self-diagnosis processing, the instruction execution processing, and the synchronization check processing executed at the completion of each of the I / O refresh processing. As described above, in the synchronization check process, each of the ACT and the STB confirms whether or not a notification that “the execution of the corresponding process has been completed” can be obtained from the partner CPU unit within the determination period.
 同期チェック処理は、例えば、PLCにおいて二重化されるCPUユニット(つまり、ACTおよびSTB)の各々の内部、または、外部に、各CPUユニットが互いに読み書きすることのできるレジスタ(共通レジスタ)を設けることにより、実現できる。各CPUユニットは、同期チェック処理までの処理が完了した時点で、つまり、自己診断処理、命令実行処理、および、I/Oリフレッシュ処理の各々の実行完了時点で、「自ユニットが、処理の実行を完了した」旨を、共通レジスタに書き込む。各CPUユニットは、相手方のCPUユニットによって共通レジスタに書き込まれた、「自ユニットが、処理の実行を完了した」旨を読込むことによって、相手方のCPUユニットが、処理の実行を完了したことを確認する。 The synchronization check processing is performed, for example, by providing a register (common register) that can be read and written by each CPU unit inside or outside each of the CPU units (that is, ACT and STB) that are duplicated in the PLC. ,realizable. At the time when the processing up to the synchronization check processing is completed, that is, at the time when the execution of each of the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing is completed, the “own unit performs processing execution”. Is completed "in the common register. Each CPU unit reads that "the own unit has completed the execution of the process" written in the common register by the other CPU unit, thereby confirming that the other CPU unit has completed the execution of the process. Confirm.
 すなわち、図9に例示するように、CPUユニット99Pは、処理を完了すると、つまり、処理の実行を完了すると、共通レジスタ98のREG1に、処理が完了したこと(つまり、「自ユニットが、処理の実行を完了した」旨)を書き込む。CPUユニット99Qは、REG1を読み出すことで、CPUユニット99Pが処理を完了したことを認識する。また、CPUユニット99Qは、処理を完了すると、つまり、処理の実行を完了すると、共通レジスタ98のREG2に、処理が完了したこと(つまり、「自ユニットが、処理の実行を完了した」旨)を書き込む。CPUユニット99Pは、REG2を読み出すことで、CPUユニット99Qが処理を完了したことを認識する。CPUユニット99PとCPUユニット99Qとが互いに処理完了を認識したら、CPUユニット99PとCPUユニット99Qとは各々、次の処理に移行する。 That is, as illustrated in FIG. 9, when the CPU unit 99P completes the processing, that is, when the execution of the processing is completed, the REG1 of the common register 98 indicates that the processing has been completed (that is, “the own unit is Has been completed "). By reading out REG1, the CPU unit 99Q recognizes that the CPU unit 99P has completed the processing. When the CPU unit 99Q completes the process, that is, when the execution of the process is completed, the REG2 of the common register 98 indicates that the process has been completed (that is, “the own unit has completed the execution of the process”). Write. By reading REG2, the CPU unit 99P recognizes that the CPU unit 99Q has completed the processing. When the CPU unit 99P and the CPU unit 99Q recognize that the processing has been completed, the CPU unit 99P and the CPU unit 99Q each shift to the next processing.
 共通レジスタ98を利用する同期チェック処理を採用した場合、相手方のCPUユニットに異常が発生すると、相手方のCPUユニットによる「自ユニットが、処理の実行を完了した」旨は、共通レジスタ98に書き込まれない。そこで、各CPUユニットは、自ユニットによる処理の実行完了の時点から所定期間待機した後に、共通レジスタ98への、相手方のCPUユニットによる「自ユニットが、処理の実行を完了した」旨の書込みの有無を判定する。例えば、CPUユニット99Pは、CPUユニット99Pが処理の実行を完了した時点から所定期間経過しても、REG2に、「自ユニットが、処理の実行を完了した」旨が書き込まれないと、CPUユニット99Qに異常が発生したと判定する。CPUユニット99Qは、CPUユニット99Qが処理の実行を完了した時点から所定期間経過しても、REG1に、「自ユニットが、処理の実行を完了した」旨が書き込まれないと、CPUユニット99Pに異常が発生したと判定する。以下の説明においては、各CPUユニットが、自ユニットによる処理の実行完了の時点から、相手方のCPUユニットによる「自ユニットが、処理の実行を完了した」旨の書込みの有無を判定するまでの、前記所定期間を、「待ち時間」とも称する。 In the case where the synchronization check process using the common register 98 is adopted, when an error occurs in the partner CPU unit, the fact that “the own unit has completed the execution of the process” by the partner CPU unit is written in the common register 98. Absent. Therefore, each CPU unit waits for a predetermined period from the time when the execution of the process by the own unit is completed, and then writes, to the common register 98, the writing of "the own unit has completed the execution of the process" by the partner CPU unit. Determine the presence or absence. For example, even if a predetermined period has elapsed from the time when the CPU unit 99P has completed the execution of the process, the CPU unit 99P will not write a message to the REG2 that "the unit has completed the execution of the process". It is determined that an abnormality has occurred in 99Q. Even if a predetermined period has elapsed from the time when the CPU unit 99Q has completed the execution of the process, the CPU unit 99Q does not write "the unit has completed the execution of the process" to the REG1. It is determined that an abnormality has occurred. In the following description, each CPU unit performs processing from completion of execution of processing by its own unit to determination of presence / absence of writing of “the own unit has completed execution of processing” by the partner CPU unit. The predetermined period is also referred to as “waiting time”.
日本国公開特許公報「特開2005-122716号公報」Japanese Unexamined Patent Publication "JP 2005-122716 A"
 上述のような従来技術には、PLCにおいて二重化されるCPUユニットのハードウェアがほぼ同一であることを、つまり、両者がほぼ同一の処理能力を備えていることを前提としており、両者の処理能力が異なる場合を想定できていないという問題がある。 The prior art as described above is based on the premise that the hardware of the CPU unit duplicated in the PLC is almost the same, that is, both have substantially the same processing capacity. However, there is a problem that it is not possible to assume a case where is different.
 従来、二重化されるCPUユニットの処理能力はほぼ同一であるとの前提の下、各CPUユニットは、自ユニットによる処理の実行完了の時点から、二重化されるCPUユニットで共通の「待ち時間」が経過した後に、相手方のCPUユニットの異常を判定する。 Conventionally, under the assumption that the processing capabilities of the duplicated CPU units are almost the same, each CPU unit has a common “waiting time” between the duplicated CPU units from the time when the execution of the processing by the own unit is completed. After the elapse, the CPU unit of the other party is determined to be abnormal.
 二重化される従来までのCPUユニットが、共通の「待ち時間」を用いて、同期チェック処理を行なうのは、以下の理由からである。すなわち、二重化されるCPUユニットの処理能力が同一であるとの前提の下では、二重化されるCPUユニットによる処理の実行完了の時点は、ほぼ同じタイミングとなるはずである。言い換えれば、自ユニットと、二重化される相手方のCPUユニットとの処理能力が同一であるとの前提の下では、自ユニットによる処理の実行完了の時点と、相手方のCPUユニットによる処理の実行完了の時点とは、ほぼ同じタイミングとなるはずである。そのため、二重化されるCPUユニットの各々において、相手方のCPUユニットの異常を判定するのに用いられる、つまり、同期チェック処理に用いられる、「待ち時間」は、従来、二重化されるCPUユニットで共通の、長さの固定された期間であった。 (4) The reason why the redundant CPU unit performs the synchronization check process using the common "waiting time" is as follows. That is, under the assumption that the processing capacity of the duplicated CPU units is the same, the time points at which the execution of the processing by the duplicated CPU units is completed should be substantially the same. In other words, under the assumption that the processing performance of the own unit and the CPU unit of the other party to be duplicated are the same, the time when the execution of the processing by the own unit is completed and the time when the execution of the processing by the other CPU unit is completed are completed. The time should be almost the same timing. Therefore, in each of the duplicated CPU units, the "waiting time" used to determine the abnormality of the partner CPU unit, that is, the "waiting time" used for the synchronization check processing is conventionally common to the duplicated CPU units. , For a fixed period of length.
 しかしながら、CPUユニットは、例えば約20年以上の長期間にわたって使用されるケースが多く、その間に、CPUユニットに用いられている部品が生産中止されるなどして、CPUユニットについて大幅なリニューアルが実施されることがある。そして、例えばCPUユニットのハードウェアを大幅にリニューアルした場合、リニューアルの前後でCPUユニットの性能が、つまり、処理能力が、大きく変化することが考えられる。 However, the CPU unit is often used for a long period of time, for example, about 20 years or more, and during that time, the production of parts used in the CPU unit is stopped, and the CPU unit is largely renewed. May be done. Then, for example, when the hardware of the CPU unit is significantly renewed, the performance of the CPU unit before and after the renewal, that is, the processing capacity may greatly change.
 そして、リニューアル前のCPUユニットと、リニューアル後のCPUユニットとを二重化した場合、同期チェック処理に用いられる「待ち時間」を、二重化されるCPUユニットで共通とすると、同期チェック処理を正しく実行できない等の問題が発生する。 If the CPU unit before the renewal is duplicated with the CPU unit after the renewal, if the "waiting time" used for the synchronization check processing is common to the CPU units to be duplicated, the synchronization check processing cannot be executed correctly. Problems occur.
 (誤判定の発生)
 すなわち、同じ処理であっても、リニューアル前のCPUユニットと、リニューアル後のCPUユニットとでは実行完了の時点が異なるため、共通の「待ち時間」後に判定を実行すると、相手方のCPUユニットが正常に動作していても、異常と誤判定してしまう。
(Occurrence of misjudgment)
That is, even if the processing is the same, the execution completion time differs between the CPU unit before the renewal and the CPU unit after the renewal. Therefore, if the determination is made after a common “waiting time”, the other CPU unit normally operates. Even if it is operating, it is erroneously determined to be abnormal.
 例えば、リニューアルによってリニューアル前に比べ処理能力が4倍に増加した場合、或る処理の実行に要する期間は、リニューアル後のCPUユニットが約「10ms(ミリ秒)」であれば、リニューアル前のCPUユニットは約「40ms」となる。そして、リニューアル前のCPUユニットと、リニューアル後のCPUユニットとで、同期チェック処理に用いる「待ち時間」を、両ユニットに共通の、「5ms」に固定すると、リニューアル後のCPUユニットは、以下の判定を行ってしまう。 For example, if the processing capacity is increased by a factor of four due to the renewal compared to before the renewal, if the CPU unit after the renewal is about “10 ms (milliseconds)” during the period required to execute a certain process, the CPU before the renewal is executed. The unit is about “40 ms”. When the “waiting time” used for the synchronization check process is fixed to “5 ms” common to both units, the CPU unit before the renewal and the CPU unit after the renewal. Make a decision.
 すなわち、リニューアル後のCPUユニットは、自ユニットが前記或る処理の実行を完了した時点から「5ms」経過した時点で、同期を、つまり、リニューアル前のCPUユニットが、前記或る処理の実行を完了しているかを、判定する。しかしながら、リニューアル前のCPUユニットは、「リニューアル後のCPUユニットが前記或る処理の実行を完了した時点」から「30ms」経過した後でないと、前記或る処理の実行を完了することができない。そのため、リニューアル後のCPUユニットは、自ユニットが前記或る処理の実行を完了した時点から5ms経過した時点では、リニューアル前のCPUユニットから、「リニューアル前のCPUユニットが前記或る処理の実行を完了した」旨の通知を取得できない。したがって、リニューアル後のCPUユニットは、リニューアル前のCPUユニットが正常に動作している場合であっても、「リニューアル前のCPUユニットに異常が発生した(つまり、同期エラーが発生した)」と誤って判定してしまう。 That is, the CPU unit after the renewal synchronizes, that is, the CPU unit before the renewal executes the certain process at a time when “5 ms” has elapsed from the time when the own unit has completed the execution of the certain process. It is determined whether the process has been completed. However, the CPU unit before the renewal cannot complete the execution of the certain process unless “30 ms” has elapsed from “the time when the CPU unit after the renewal has completed the execution of the certain process”. Therefore, the CPU unit after the renewal, from the time when 5 ms has passed from the time when the own unit has completed the execution of the certain process, the CPU unit before the renewal, "the CPU unit before the renewal executes the execution of the certain process. I can't get the notification of "Completed." Therefore, even if the CPU unit before the renewal is operating normally, the CPU unit after the renewal may incorrectly report that an error has occurred in the CPU unit before the renewal (that is, a synchronization error has occurred). Judgment.
 (判定の遅延の発生)
 上述の例で、リニューアル前のCPUユニットと、リニューアル後のCPUユニットとに共通の「待ち時間」を、例えば「30ms」に固定することによって、リニューアル後のCPUユニットによる誤判定は防ぐことができる。
(Delay of judgment occurs)
In the above example, by fixing the "waiting time" common to the CPU unit before the renewal and the CPU unit after the renewal to, for example, "30 ms", erroneous determination by the CPU unit after the renewal can be prevented. .
 すなわち、リニューアル前のCPUユニットは、「リニューアル後のCPUユニットが前記或る処理の実行を完了した時点」から「30ms」経過した後であれば、前記或る処理の実行を完了することができる。したがって、リニューアル後のCPUユニットは、自ユニットが前記或る処理の実行を完了した時点から「30ms」経過した後であれば、「リニューアル前のCPUユニットに異常が発生したか否か」を、正しく判定することができる。 That is, the CPU unit before the renewal can complete the execution of the certain process if "30 ms" has elapsed from "the time when the CPU unit after the renewal completed execution of the certain process". . Therefore, if the CPU unit after the renewal has passed “30 ms” from the time when the own unit has completed the execution of the certain process, the CPU unit determines whether or not an abnormality has occurred in the CPU unit before the renewal. It can be determined correctly.
 ただし、「30ms」の待ち時間は、リニューアル前のCPUユニットと、リニューアル後のCPUユニットとで共通であるため、リニューアル前のCPUユニットは、自ユニットが前記或る処理の実行を完了した時点から「30ms」経過した後に判定を行なう。つまり、リニューアル前のCPUユニットは、自ユニットが前記或る処理の実行を完了した時点から「30ms」経過した後に、「リニューアル後のCPUユニットに異常が発生したか否か」を、判定する。 However, since the waiting time of “30 ms” is common to the CPU unit before the renewal and the CPU unit after the renewal, the CPU unit before the renewal starts when the own unit completes the execution of the certain process. The determination is made after "30 ms" has elapsed. That is, the CPU unit before the renewal determines “whether or not an abnormality has occurred in the CPU unit after the renewal” after “30 ms” has elapsed from the time when the own unit has completed the execution of the certain process.
 リニューアル前のCPUユニットと、リニューアル後のCPUユニットとは、互いに相手方のCPUユニットの処理完了を認識してから、次の処理に移行するため、両者の待ち時間を、両者に共通の「30ms」とすると、次の処理の実行開始が遅れる。リニューアル後のCPUユニットは、自ユニットが前記或る処理の実行を完了した時点から「30ms」経過した後に相手方のCPUユニットの異常を判定し、さらに、その「30ms」後に、リニューアル前のCPUユニットによる異常判定が実行される。つまり、リニューアル後のCPUユニットは、自ユニットが前記或る処理の実行を完了した時点から「60ms」した後でなければ、次の処理の実行を開始することができない。すなわち、リニューアル前のCPUユニットに合わせて、リニューアル前のCPUユニットと、リニューアル後のCPUユニットとが用いる待ち時間を両者に共通の「30ms」とすると、両者の判定が完了するのが遅くなる。 The CPU unit before the renewal and the CPU unit after the renewal recognize the completion of the processing of the other CPU unit, and then shift to the next processing. Then, the execution start of the next process is delayed. The CPU unit after the renewal determines the abnormality of the partner CPU unit after a lapse of “30 ms” from the time when the own unit completes the execution of the certain process, and further, after “30 ms”, the CPU unit before the renewal Is performed to determine the abnormality. That is, the CPU unit after the renewal cannot start execution of the next process unless "60 ms" has elapsed from the point at which the own unit has completed execution of the certain process. That is, if the CPU unit before the renewal and the CPU unit before the renewal and the CPU unit after the renewal are set to a common “30 ms” for both, the completion of the determination of both is delayed.
 リニューアル前のCPUユニットは、自ユニットが前記或る処理の実行を完了した時点から「30ms」経過した後でなければ判定を実行しないため、リニューアル後のCPUユニットに異常が発生した場合、運転継続のためのACTからSTBへの切替が遅れる。 Since the CPU unit before the renewal does not execute the determination unless "30 ms" has elapsed from the time when the own unit has completed the execution of the certain process, the operation is continued when the CPU unit after the renewal has an abnormality. Switching from ACT to STB for the delay.
 以上の通り、PLCにおいて二重化されるCPUユニットがほぼ同一の処理能力を備えることを前提とする従来技術には、二重化されるCPUユニットの処理能力が互いに異なる場合に、誤判定およびACTからSTBへの切替の遅延が発生するという問題がある。 As described above, in the related art on the premise that the duplicated CPU units have almost the same processing capability in the PLC, the erroneous determination and the ACT to STB transition are performed when the duplicated CPU units have different processing capabilities. There is a problem that a delay in switching occurs.
 上記の課題を解決するために、本発明の一態様に係るCPUユニットは、コントローラにおいて二重化されるCPUユニットであって、自ユニットの処理能力と、二重化される相手方のCPUユニットの処理能力との比を考慮して、待ち時間を設定する設定部と、自ユニットにおける処理の実行完了時点から、前記設定部によって設定された前記待ち時間を経過するまでに、前記相手方のCPUユニットにおける前記処理の実行完了を確認できないと、前記相手方のCPUユニットに異常が発生したと判定する判定部と、を備えている。 In order to solve the above-described problem, a CPU unit according to one embodiment of the present invention is a CPU unit that is duplicated in a controller, and has a processing capability of its own unit and a processing capability of a partner CPU unit that is duplicated. A setting unit that sets a waiting time in consideration of the ratio, and from the completion of execution of the processing in the own unit to the lapse of the waiting time set by the setting unit, the processing of the processing in the partner CPU unit. A determination unit that determines that an abnormality has occurred in the partner CPU unit when execution completion cannot be confirmed.
 上記の課題を解決するために、本発明の一態様に係る制御方法は、コントローラにおいて二重化されるCPUユニットの制御方法であって、自ユニットの処理能力と、二重化される相手方のCPUユニットの処理能力との比を考慮して、待ち時間を設定する設定ステップと、自ユニットにおける処理の実行完了時点から、前記設定ステップにて設定された前記待ち時間を経過するまでに、前記相手方のCPUユニットにおける前記処理の実行完了を確認できないと、前記相手方のCPUユニットに異常が発生したと判定する判定ステップと、を含んでいる。 In order to solve the above problem, a control method according to one embodiment of the present invention is a control method of a CPU unit that is duplicated in a controller, and includes a processing capability of the own unit and a processing of a duplicated CPU unit. A setting step of setting a waiting time in consideration of a ratio with the capacity, and a CPU unit of the other party from the time when the execution of the process in the own unit is completed to the time when the waiting time set in the setting step elapses. And determining that an abnormality has occurred in the partner CPU unit if the completion of execution of the processing cannot be confirmed.
 本発明の一態様によれば、PLCにおいて二重化されるCPUユニットについて、二重化される相手方のCPUユニットと自ユニットとの処理能力の違いを考慮して、不要な待ち時間を設けずに、同期チェック処理を正確に行なうことができるとの効果を奏する。 According to one aspect of the present invention, for a CPU unit that is duplicated in a PLC, a synchronization check can be performed without providing an unnecessary waiting time in consideration of the difference in processing capacity between the CPU unit of the other party that is duplicated and its own unit. The effect is that the processing can be performed accurately.
本発明の実施形態1に係るCPUユニット等の要部構成を示すブロック図である。FIG. 2 is a block diagram illustrating a main configuration of a CPU unit and the like according to the first embodiment of the present invention. 図1に示す2つのCPUユニットの各々が実行する処理の概要を説明する図である。FIG. 2 is a diagram illustrating an outline of a process executed by each of two CPU units illustrated in FIG. 1. 図1に示す2つのCPUユニットの各々が、二重化される相手方のCPUユニットの性能を示す性能情報を取得する処理の具体例を説明する図である。FIG. 2 is a diagram illustrating a specific example of a process in which each of the two CPU units illustrated in FIG. 1 acquires performance information indicating the performance of the CPU unit of the other party to be duplicated. 本発明の実施形態2に係るCPUユニット等の要部構成を示すブロック図である。FIG. 9 is a block diagram illustrating a main configuration of a CPU unit and the like according to a second embodiment of the present invention. 図4に示すCPUユニットを実現するハードウェア構成の一例を示す図である。FIG. 5 is a diagram illustrating an example of a hardware configuration for realizing the CPU unit illustrated in FIG. 4. 図4に示す2つのCPUユニットの各々が実行する処理の概要を説明する図である。FIG. 5 is a diagram illustrating an outline of processing executed by each of two CPU units illustrated in FIG. 4. 図4に示す2つのCPUユニットの各々が、二重化される相手方のCPUユニットの性能を示す性能情報を取得する処理の具体例を説明する図である。FIG. 5 is a diagram illustrating a specific example of a process in which each of the two CPU units illustrated in FIG. 4 acquires performance information indicating the performance of a partner CPU unit to be duplexed. PLCにおいて二重化されたCPUユニットの、従来までの処理の概要を説明する図である。FIG. 7 is a diagram for explaining an outline of processing performed by a CPU unit duplexed in a PLC up to the present. 自己診断処理、命令実行処理、および、I/Oリフレッシュ処理の各々の実行完了時点で実行される同期チェック処理の詳細を説明する図である。FIG. 11 is a diagram for explaining details of a synchronization check process executed at the completion of execution of each of a self-diagnosis process, an instruction execution process, and an I / O refresh process.
 〔実施形態1〕
 以下、本発明の一側面に係る実施の形態(以下、「本実施形態」とも表記する)を、図面に基づいて説明する。なお、図中同一または相当部分には同一符号を付してその説明は繰返さない。以下の各実施形態においては、機械および設備等の制御対象を制御するPLC(プログラマブル・ロジック・コントローラ、Programmable Logic Controller)10を、2つのCPUユニットが二重化されるコントローラの典型例として説明を行なう。
[Embodiment 1]
Hereinafter, an embodiment according to one aspect of the present invention (hereinafter, also referred to as “the present embodiment”) will be described with reference to the drawings. In the drawings, the same or corresponding portions have the same reference characters allotted, and description thereof will not be repeated. In the following embodiments, a PLC (Programmable Logic Controller) 10 that controls a control target such as a machine and equipment will be described as a typical example of a controller in which two CPU units are duplicated.
 以下では先ず、PLC10において二重化される第1CPUユニット100Aおよび第2CPUユニット100Bの各々についての理解を容易にするために、両者が各々実行する処理の概要を、図2を用いて説明する。 In the following, first, in order to facilitate understanding of each of the first CPU unit 100A and the second CPU unit 100B that are duplicated in the PLC 10, an outline of processing executed by each of them will be described with reference to FIG.
 §1.適用例
 図2は、図1を用いて後述する2つのCPUユニット(すなわち、第1CPUユニット100Aおよび第2CPUユニット100B)の各々が実行する処理の概要を説明する図である。第1CPUユニット100Aと第2CPUユニット100Bとは、PLC10において二重化され、一方が実行系(ACT)となるとともに、他方が待機系(STB)となり、互いに相手方のCPUユニットの状態を確認する。第1CPUユニット100Aと第2CPUユニット100Bとは、実行系のCPUユニット(ACT)がダウンした場合には、待機系のCPUユニット(STB)がACTに切り替わって運転を継続する。以下では、理解を容易にするため、第1CPUユニット100AがACTであり、第2CPUユニット100BがSTBである例を説明する。
§1. Application Example FIG. 2 is a diagram illustrating an outline of processing executed by each of two CPU units (that is, first CPU unit 100A and second CPU unit 100B) described later with reference to FIG. The first CPU unit 100A and the second CPU unit 100B are duplexed in the PLC 10, and one of them becomes an active system (ACT) and the other becomes a standby system (STB), and confirms the state of the other CPU unit. When the active CPU unit (ACT) goes down, the first CPU unit 100A and the second CPU unit 100B switch over to the ACT of the standby CPU unit (STB) to continue the operation. Hereinafter, for ease of understanding, an example in which the first CPU unit 100A is an ACT and the second CPU unit 100B is an STB will be described.
 (待ち時間の概要)
 図2に示すように、ACTおよびSTBの各々は、自己診断処理、命令実行処理、および、I/Oリフレッシュ処理を、この順で繰り返し実行する。以下では、繰り返しこの順に実行される「自己診断処理、命令実行処理、および、I/Oリフレッシュ処理」のセットを、「1サイクル(1周期)」と称する。
(Summary of waiting time)
As shown in FIG. 2, each of the ACT and the STB repeatedly executes a self-diagnosis process, an instruction execution process, and an I / O refresh process in this order. Hereinafter, a set of “self-diagnosis processing, instruction execution processing, and I / O refresh processing” executed repeatedly in this order is referred to as “one cycle (one cycle)”.
 自己診断処理は、自ユニットのハードウェアが正常に動作しているかを診断する処理である。命令実行処理は、ユーザプログラム等を実行する処理であり、前の周期において実行されたI/Oリフレッシュ処理で取得したデータを用いて各種の演算を実行し、現在の周期におけるI/Oリフレッシュ処理で出力するデータを生成する処理である。命令実行処理において、PLC10(より正確には、第1CPUユニット100Aまたは第2CPUユニット100B)の制御対象である、相手方のCPUユニット以外の外部装置に対する、制御信号が生成される。I/Oリフレッシュ処理は、二重化された相手方のCPUユニット以外の、外部装置および外部ユニットとのデータ交換を実行する処理であり、現在の周期の命令実行処理で生成されたデータを出力し、次の周期の命令実行処理に用いるデータを取得する処理である。命令実行処理において生成された制御信号は、I/Oリフレッシュ処理において、制御対象へと出力される。 The self-diagnosis process is a process for diagnosing whether the hardware of the own unit is operating normally. The instruction execution process is a process for executing a user program or the like, executes various operations using data obtained in the I / O refresh process executed in the previous cycle, and executes the I / O refresh process in the current cycle. This is the process of generating the data to be output. In the instruction execution processing, a control signal is generated for an external device other than the partner CPU unit, which is a control target of the PLC 10 (more precisely, the first CPU unit 100A or the second CPU unit 100B). The I / O refresh process is a process for exchanging data with an external device and an external unit other than the duplicated CPU unit of the other party. The I / O refresh process outputs data generated in the instruction execution process in the current cycle, and outputs the data. This is a process of acquiring data used for the instruction execution process in the cycle of. The control signal generated in the instruction execution processing is output to a control target in the I / O refresh processing.
 図2に示すように、ACT(第1CPUユニット100A)とSTB(第2CPUユニット100B)との各々は、自ユニットが、自己診断処理、命令実行処理、および、I/Oリフレッシュ処理の各々の実行を完了した後に、「同期チェック処理」を実行する。ACTおよびSTBの各々は、この同期チェック処理において、互いに相手方のCPUユニットの状態を監視し(言い換えれば、確認し)、ACTが異常停止していれば、STBが、異常停止したACTに代わって、運転を引き継ぐ。 As shown in FIG. 2, each of ACT (first CPU unit 100A) and STB (second CPU unit 100B) performs its own self-diagnosis processing, instruction execution processing, and I / O refresh processing. After that, the “synchronization check process” is executed. In this synchronization check process, each of the ACT and the STB monitors (in other words, confirms) the status of the other CPU unit. If the ACT is abnormally stopped, the STB replaces the abnormally stopped ACT. Take over, driving.
 「同期チェック処理」は、自ユニットが実行を完了した処理について、相手方のCPUユニットも自ユニットと同様に実行を完了しているかを確認する処理であり、相手方のCPUユニットの処理完了が確認できない場合、異常が発生したと判定される。例えば、ACTは、自己診断処理、命令実行処理、および、I/Oリフレッシュ処理の各々の実行を完了した後、STBが自己診断処理、命令実行処理、および、I/Oリフレッシュ処理の各々の実行を完了しているかを確認する(判定する)。例えば、STBは、自己診断処理、命令実行処理、および、I/Oリフレッシュ処理の各々の実行を完了した後、ACTが自己診断処理、命令実行処理、および、I/Oリフレッシュ処理の各々の実行を完了しているかを確認する(判定する)。 The “synchronization check process” is a process of confirming that the partner CPU unit has completed execution of the process completed by the own unit in the same manner as the own unit, and it is not possible to confirm the completion of the process of the partner CPU unit. In this case, it is determined that an abnormality has occurred. For example, after the ACT completes the execution of each of the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing, the STB executes the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing. Confirm (determine) whether has been completed. For example, after the STB completes the execution of the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing, the ACT executes the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing. Confirm (determine) whether has been completed.
 「同期チェック処理」において、ACTおよびSTBの各々は、自ユニットが或る処理の実行を完了してから所定時間(=待ち時間Tw)が経過した後、相手方のCPUユニットから「その或る処理の実行を完了した」旨の通知を取得したかを確認する。ACTおよびSTBの各々は、自ユニットが或る処理の実行を完了してから待ち時間Twが経過した後、相手方のCPUユニットの「その或る処理の実行を完了した」旨の通知を取得できないと、「二重化された相手方のCPUユニットに異常が発生した」と判定する。第1CPUユニット100AがACTであり、第2CPUユニット100BがSTBである場合、第1CPUユニット100Aに異常が発生したと判定すると、第2CPUユニット100Bは、自ユニットがACTへと切り替わって、運転を継続する。 In the “synchronization check process”, each of the ACT and the STB sends a “the certain process” from the partner CPU unit after a lapse of a predetermined time (= waiting time Tw) from the completion of the execution of the process by the own unit. Has been completed. " Each of the ACT and the STB cannot acquire the notification of “completion of the execution of the certain process” of the partner CPU unit after the waiting time Tw has elapsed since the execution of the certain process by the own unit is completed. Is determined as "an error has occurred in the duplicated CPU unit of the other party". When the first CPU unit 100A is ACT and the second CPU unit 100B is STB, if it is determined that an abnormality has occurred in the first CPU unit 100A, the second CPU unit 100B switches to ACT and continues operation. I do.
 前述の通り、ACT(第1CPUユニット100A)とSTB(第2CPUユニット100B)とで「待ち時間Tw」の長さを同じにした場合、ACTとSTBとで性能Abが異なると、誤判定およびACTからSTBへの切替の遅延が発生するという問題がある。そこで、ACTとSTBとの各々は、以下の処理を実行することにより、両者の性能Abが異なる場合であっても、不要な待ち時間Twを設けずに、正確な同期チェック処理を実行する。 As described above, if the ACT (first CPU unit 100A) and STB (second CPU unit 100B) have the same length of “waiting time Tw”, if the performance Ab differs between ACT and STB, erroneous determination and ACT There is a problem that a delay in switching from the STB to the STB occurs. Therefore, each of the ACT and the STB executes the following processing to execute an accurate synchronization check processing without providing an unnecessary waiting time Tw even when the performances Ab of the two are different.
 すなわち、先ず「基準となるハードウェアのCPUユニット(基準CPUユニット)」を予め想定しておき、この基準CPUユニットについて、予め性能Ab(処理能力)および処理時間を定義しておく。以下の説明においては、基準CPUユニットの性能Abを「性能Abb」と表すことがある。 That is, first, a “CPU unit of reference hardware (reference CPU unit)” is assumed in advance, and the performance Ab (processing capacity) and the processing time are defined in advance for this reference CPU unit. In the following description, the performance Ab of the reference CPU unit may be referred to as “performance Abb”.
 そして、ACTとSTBとの各々に、自ユニットの性能Abを示す情報を、例えば「自ユニットが、基準CPUユニットと比較して、どの程度の性能Abを備えているのか」を示す情報(自機性能情報)を、保有させておく。ACTとSTBとがPLC10において二重化される際、ACTとSTBとの各々は、互いの性能Ab(相手方のCPUユニットの、基準CPUユニットの性能Abbに対する相対的な性能Ab)を把握する。そして、ACTとSTBとの各々は、把握した互いの性能Abに基づいて、同期チェック処理のための待ち時間Twを柔軟に設定する。以下の説明においては、自ユニットの性能Ab(自ユニットの、基準CPUユニットの性能Abbに対する相対的な性能Ab)を、「性能Abm」と表すことがある。同様に、相手方のCPUユニットの性能Ab(相手方のCPUユニットの、基準CPUユニットの性能Abbに対する相対的な性能Ab)を、「性能Aby」と表すことがある。 Each of the ACT and the STB includes information indicating the performance Ab of the own unit, for example, information indicating “how much performance Ab the own unit has compared to the reference CPU unit” (self Machine performance information). When the ACT and the STB are duplicated in the PLC 10, each of the ACT and the STB grasps each other's performance Ab (the relative performance Ab of the partner CPU unit with respect to the performance Abb of the reference CPU unit). Then, each of the ACT and the STB flexibly sets the waiting time Tw for the synchronization check process based on the grasped performance Ab. In the following description, the performance Ab of the own unit (the relative performance Ab of the own unit with respect to the performance Abb of the reference CPU unit) may be expressed as “performance Abm”. Similarly, the performance Ab of the partner CPU unit (the relative performance Ab of the partner CPU unit with respect to the performance Abb of the reference CPU unit) may be referred to as “performance Aby”.
 具体的には、ACTとSTBとの各々は、PLC10において二重化される際、同期チェック処理のための待ち時間Twについて、以下のように設定を行なう。すなわち、二重化される相手方のCPUユニットの性能Abyが、自ユニットの性能Abmより高い場合、つまり、二重化される相手方のCPUユニットの方が自ユニットより処理の実行速度が早い場合、通常の待ち時間Twoを待ち時間Twに設定する。二重化される相手方のCPUユニットの性能Abyと、自ユニットの性能Abmとが等しい場合、つまり、二重化される相手方のCPUユニットと自ユニットとで処理の実行速度が等しい場合、通常の待ち時間Twoを待ち時間Twに設定する。二重化される相手方のCPUユニットの性能Abyが、自ユニットの性能Abmより低い場合、つまり、二重化される相手方のCPUユニットの方が自ユニットより処理の実行速度が遅い場合、待ち時間Twを、相手方のCPUユニットの性能Abyに合わせて設定する。 {Specifically, when the ACT and the STB are duplexed in the PLC 10, the waiting time Tw for the synchronization check processing is set as follows. That is, when the performance Aby of the CPU unit of the other party to be duplicated is higher than the performance Abm of the own unit, that is, when the execution speed of the processing of the CPU unit of the other party to be duplicated is faster than that of the own unit, the normal waiting time Two is set to the waiting time Tw. When the performance Aby of the CPU unit of the other party to be duplicated is equal to the performance Abm of the own unit, that is, when the execution speed of the processing is the same between the CPU unit of the other party and the own unit to be duplicated, the normal waiting time Two is set. The waiting time Tw is set. When the performance Aby of the CPU unit of the other party to be duplicated is lower than the performance Abm of the own unit, that is, when the execution speed of the processing of the CPU unit of the other party to be duplicated is lower than that of the own unit, the waiting time Tw is set to the other party. Is set according to the performance Aby of the CPU unit.
 例えば、自ユニットの性能Abmが基準CPUユニットの性能Abbの2倍であり、二重化される相手方のCPUユニットの性能Abyが基準CPUユニットの性能Abbの1/2倍であれば、性能Abmは性能Abyの4倍である。その場合、同期チェック処理の対象である或る処理を実行するのに、自ユニットが「10ms(ミリ秒)」要したならば、相手方のCPUユニットは「40ms」要することになるので、自ユニットの待ち時間Twを「30ms+通常の待ち時間Two」に設定する。 For example, if the performance Abm of the own unit is twice the performance Abb of the reference CPU unit and the performance Aby of the other CPU unit to be duplexed is 1/2 the performance Abb of the reference CPU unit, the performance Abm is the performance 4 times Aby. In this case, if the own unit requires “10 ms (milliseconds)” to execute a certain process to be subjected to the synchronization check process, the other CPU unit requires “40 ms”. Is set to “30 ms + normal waiting time Two”.
 例えば、自ユニットの性能Abmが基準CPUユニットの性能Abbの1/2倍であり、二重化される相手方のCPUユニットの性能Abyが基準CPUユニットの性能Abbの2倍であれば、性能Abmは性能Abyの1/4倍である。その場合、同期チェック処理の対象である或る処理を実行するのに、自ユニットが「40ms」要したならば、相手方のCPUユニットは「10ms」要することになるから、自ユニットの待ち時間Twを「通常の待ち時間Two」に設定する。 For example, if the performance Abm of the own unit is half the performance Abb of the reference CPU unit and the performance Aby of the other CPU unit to be duplexed is twice the performance Abb of the reference CPU unit, the performance Abm is the performance Abm. It is 1/4 times Aby. In this case, if the own unit requires “40 ms” to execute a certain process to be subjected to the synchronization check process, the other CPU unit requires “10 ms”. Is set to “normal waiting time Two”.
 ACT(第1CPUユニット100A)とSTB(第2CPUユニット100B)との各々は、自ユニットの待ち時間Twを、自ユニットと二重化される相手方のCPUユニットとの性能Abの差によって、柔軟に設定する。 Each of the ACT (first CPU unit 100A) and the STB (second CPU unit 100B) flexibly sets the waiting time Tw of its own unit according to the difference in performance Ab between its own unit and the other CPU unit that is duplexed. .
 (処理の具体例)
 図2に示すように、PLC10において第1CPUユニット100A(ACT)と第2CPUユニット100B(STB)とを二重化する場合、ACTとSTBとは各々、通常のサイクルとは別に、「二重化処理」を実行する。すなわち、ACTおよびSTBの各々は、サイクリック(周期的)に繰り返し実行する、「自己診断処理、命令実行処理、および、I/Oリフレッシュ処理」の前に、「二重化処理」を実行する。
(Specific example of processing)
As shown in FIG. 2, when the first CPU unit 100A (ACT) and the second CPU unit 100B (STB) are duplicated in the PLC 10, each of the ACT and the STB executes “duplication processing” separately from a normal cycle. I do. In other words, each of the ACT and the STB executes the “duplication process” before the “self-diagnosis process, the instruction execution process, and the I / O refresh process”, which are cyclically (periodically) repeatedly executed.
 ACTおよびSTBの各々は、「二重化処理」において、互いの性能Abを把握し、二重化状態となる。ACTおよびSTBの各々の性能情報(自機性能情報)は、例えば各CPUユニットの生産時に、各CPUユニットの備える不揮発性メモリに書き込まれる。この自機性能情報は、例えば、「特定のハードウェアの仕様のCPUユニット(前述の「基準CPUユニット」)の性能Abbを基準として、この基準CPUユニットの性能Abbに対して、自ユニットの性能Abmは、何%の性能UP/DOWNか」を示す。 Each of the ACT and the STB grasps each other's performance Ab in the “duplication process” and enters a duplex state. The performance information (own apparatus performance information) of each of the ACT and the STB is written to a nonvolatile memory included in each CPU unit, for example, when each CPU unit is produced. The own device performance information is, for example, based on the performance Abb of the CPU unit having the specific hardware specifications (the above-mentioned “reference CPU unit”) as a reference, the performance Abb of the reference CPU unit and the performance Abb of the own unit. Abm indicates what percentage of the performance is UP / DOWN.
 ACTおよびSTBの各々は、自ユニットの性能情報を、各CPUユニットの不揮発性メモリに、「自機性能情報」として格納している。ACTおよびSTBの各々は、この自機性能情報を二重化処理の中で互いに転送し合い、相手方のCPUユニットの自機性能情報を、「他機性能情報」として、各CPUユニットの不揮発性メモリに格納する。 Each of the ACT and the STB stores the performance information of its own unit in the nonvolatile memory of each CPU unit as “own device performance information”. Each of the ACT and the STB transfers the own device performance information to each other in the duplex processing, and stores the own device performance information of the partner CPU unit as “other device performance information” in the non-volatile memory of each CPU unit. Store.
 例えば、自機性能情報が150%(つまり、処理の実行速度(処理速度)が、基準CPUユニットの1.5倍)であり、他機性能情報が75%(処理速度が、基準CPUユニットの0.75倍)である場合、ACTは以下の情報を把握する。すなわち、ACTは、自ユニット(ACT)の処理速度は、相手方のCPUユニット(STB)の処理速度の「2倍(=1.5倍/0.75倍)」であることを把握する。 For example, the own device performance information is 150% (that is, the processing execution speed (processing speed) is 1.5 times the reference CPU unit), and the other device performance information is 75% (the processing speed is lower than the reference CPU unit). ACT knows the following information. That is, the ACT grasps that the processing speed of the own unit (ACT) is “2 times (= 1.5 times / 0.75 times)” the processing speed of the partner CPU unit (STB).
 例えば、自機性能情報が75%(処理速度が、基準CPUユニットの0.75倍)であり、他機性能情報が150%(つまり、処理の実行速度(処理速度)が、基準CPUユニットの1.5倍)である場合、STBは以下の情報を把握する。すなわち、自ユニット(STB)の処理速度は、相手方のCPUユニット(ACT)の処理速度の「1/2倍(=0.75倍/1.5倍)」であることを把握する。 For example, the own device performance information is 75% (the processing speed is 0.75 times that of the reference CPU unit), and the other device performance information is 150% (that is, the execution speed (processing speed) of the process is STB, the STB knows the following information. That is, it is understood that the processing speed of the own unit (STB) is “1 / times (= 0.75 times / 1.5 times)” the processing speed of the other CPU unit (ACT).
 「二重化処理」において、自ユニットと相手方のCPUユニットとの性能Abの差を把握して、二重化状態になると、ACTおよびSTBの各々は、この性能Abの差を用いて、自ユニットの待ち時間Twを設定する。 In the “duplexing process”, the difference between the performance Abs of the own unit and the partner CPU unit is grasped, and when the state becomes a duplex state, each of the ACT and the STB uses the difference of the performance Abs to determine the waiting time of the own unit. Set Tw.
 ACTおよびSTBの各々は、例えば、図2の「命令実行」処理の実行開始から実行完了までの実行時間を、各CPUユニットの備える内部タイマを用いて、各CPUユニットにおいて計測する。ここで、「命令実行」処理について、ACTの実行時間が「100ms」だとすると、前述の通り、STBとの性能Abの差は「2倍」だったので、相手方のCPUユニット(STB)は「200ms」かかることになる。 Each of the ACT and the STB measures, for example, the execution time from the start of the execution of the “instruction execution” process of FIG. 2 to the completion of the execution in each CPU unit using the internal timer of each CPU unit. Here, assuming that the execution time of the ACT is “100 ms” in the “instruction execution” process, the difference between the performance Ab and the STB is “2 times” as described above, so that the other CPU unit (STB) is “200 ms”. "It will be.
 そのため、ACTは、通常の待ち時間Twoに、「100ms(=200ms-100ms)」を加えた期間を、自ユニットの「命令実行」処理に係る同期チェック処理の待ち時間Twとして設定する。図2に示す例では、ACTは、自ユニットでの「命令実行」処理の実行完了時点から、「100ms」の期間、待機処理を実行し、その後に、「命令実行」処理に係る同期チェック処理を実行している。つまり、ACTは、自ユニットでの「命令実行」処理の実行完了時点から、「100ms+通常の待ち時間Two」が経過するまでの間に、相手方のCPUユニット(STB)から、「命令実行」処理の実行完了の通知を取得するか否かを判定する。そして、ACTは、自ユニットでの「命令実行」処理の実行完了時点から、「100ms+通常の待ち時間Two」が経過するまでの間に、STBから、「命令実行」処理の実行完了の通知を取得できないと、STBに異常が発生したと判定する。 Therefore, the ACT sets a period obtained by adding “100 ms (= 200 ms−100 ms)” to the normal waiting time Two as the waiting time Tw of the synchronization check process related to the “instruction execution” process of the own unit. In the example illustrated in FIG. 2, the ACT executes a standby process for a period of “100 ms” from the completion of execution of the “instruction execution” process in its own unit, and then performs a synchronization check process related to the “instruction execution” process. Running. That is, the ACT executes the “instruction execution” process from the partner CPU unit (STB) from the completion of the execution of the “instruction execution” process in the own unit until “100 ms + normal waiting time Two” elapses. It is determined whether or not to acquire the notification of the completion of the execution. The ACT sends a notification of the completion of the execution of the “instruction execution” process from the STB during a period from the completion of the execution of the “instruction execution” process in the own unit until “100 ms + normal waiting time Two” elapses. If the STB cannot be obtained, it is determined that an abnormality has occurred in the STB.
 「相手方のCPUユニット(ACT)の方が、性能Abが高く、または、性能Abが等しい(つまり、処理速度が速く、または、同じ)」ことを把握したSTBは、通常の待ち時間Twoをそのまま、自ユニットの「命令実行」処理に係る同期チェック処理の待ち時間Twとして設定する。図2に示す例では、STBは、自ユニットでの「命令実行」処理の実行を完了すると直ぐに、「命令実行」処理に係る同期チェック処理を実行している。つまり、STBは、自ユニットでの「命令実行」処理の実行完了時点から、通常の待ち時間Twoが経過するまでの間に、相手方のCPUユニット(ACT)から、「命令実行」処理の実行完了の通知を取得するか否かを判定する。そして、STBは、自ユニットでの「命令実行」処理の実行完了時点から、通常の待ち時間Twoが経過するまでの間に、ACTから、「命令実行」処理の実行完了の通知を取得できないと、ACTに異常が発生したと判定する。ACT(第1CPUユニット100A)に異常が発生したと判定すると、STB(第2CPUユニット100B)は、自ユニットがACTへと切り替わって、運転を継続する。 The STB that has grasped that the partner CPU unit (ACT) has higher performance Ab or equal performance Ab (that is, the processing speed is faster or the same), keeps the normal waiting time Two as it is. Is set as the waiting time Tw of the synchronization check process related to the “instruction execution” process of the own unit. In the example shown in FIG. 2, the STB executes the synchronization check process related to the “instruction execution” process immediately after completing the execution of the “instruction execution” process in the STB. In other words, the STB performs the execution of the “instruction execution” process from the partner CPU unit (ACT) from the completion of the execution of the “instruction execution” process in its own unit to the lapse of the normal waiting time Two. It is determined whether or not to obtain the notification. If the STB cannot acquire from the ACT a notification of the completion of the execution of the “instruction execution” process from the time when the normal waiting time Two elapses after the completion of the execution of the “instruction execution” process in its own unit. , ACT is determined to be abnormal. When it is determined that an abnormality has occurred in ACT (first CPU unit 100A), STB (second CPU unit 100B) switches its own unit to ACT and continues operation.
 §2.構成例
 これまでに図2を用いて概要を説明してきた第1CPUユニット100Aおよび第2CPUユニット100Bについて、次に、図1を参照してその詳細を説明していく。
§2. Configuration Example Next, the details of the first CPU unit 100A and the second CPU unit 100B whose outline has been described with reference to FIG. 2 will be described with reference to FIG.
 図1は、本発明の実施形態1に係る第1CPUユニット100Aおよび第2CPUユニット100BCPUユニットを含むPLC10の要部構成を示すブロック図である。図1に例示するように、PLC10は、PLC10において二重化される第1CPUユニット100Aと第2CPUユニット100Bとを含んでいる。第1CPUユニット100Aおよび第2CPUユニット100Bの各々は、PLC10全体の制御を統括する機能ユニットである。 FIG. 1 is a block diagram showing a main configuration of a PLC 10 including a first CPU unit 100A and a second CPU unit 100B CPU unit according to the first embodiment of the present invention. As exemplified in FIG. 1, the PLC 10 includes a first CPU unit 100A and a second CPU unit 100B that are duplicated in the PLC 10. Each of the first CPU unit 100A and the second CPU unit 100B is a functional unit that controls the control of the entire PLC 10.
 PLC10は、図1に図示していない機能ユニットをさらに備えていてもよい。PLC10は、例えば、第1CPUユニット100Aおよび第2CPUユニット100Bを含むPLC10の全体に電源を供給する、不図示の電源ユニットをさらに含んでいる。PLC10は、また、生産装置および設備装置の適所に取り付けたスイッチおよびセンサの信号を入力する入力ユニット、アクチュエータ等に制御信号を出す出力ユニット、通信ネットワークに接続するための通信ユニット等の不図示の機能ユニットを含んでいてもよい。 The PLC 10 may further include a functional unit not shown in FIG. The PLC 10 further includes a power supply unit (not shown) that supplies power to the entire PLC 10 including the first CPU unit 100A and the second CPU unit 100B, for example. The PLC 10 also includes an unillustrated input unit for inputting a signal of a switch and a sensor attached to an appropriate position of a production device and an equipment device, an output unit for outputting a control signal to an actuator and the like, a communication unit for connecting to a communication network, and the like. It may include a functional unit.
 前述の通り、第1CPUユニット100Aおよび第2CPUユニット100Bの各々は、自己診断処理、命令実行処理、および、I/Oリフレッシュ処理を、この順に繰り返し実行する。I/Oリフレッシュ処理は、入力ユニット等が取得した各種の入力信号を、各CPUユニットのI/Oメモリに取り込む処理(INリフレッシュ)と、命令実行処理の処理結果をI/Oメモリに書き込んで出力ユニット等へ出力する処理(OUTリフレッシュ)と、を含んでいる。つまり、I/Oリフレッシュ処理は、「第1CPUユニット100Aおよび第2CPUユニット100Bの各々」と、「第1CPUユニット100Aおよび第2CPUユニット100B以外の、外部のユニット、外部の装置」との、サイクリックなデータ交換である。命令実行処理では、コントローラであるPLC10が制御対象に対して出力する各種の制御信号が生成され、例えば、ユーザプログラムに基づいて、INリフレッシュでI/Oメモリに取り込んだ入力信号を用いた論理演算が実行され、制御信号が生成される。 As described above, each of the first CPU unit 100A and the second CPU unit 100B repeatedly executes the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing in this order. In the I / O refresh processing, various input signals acquired by the input unit and the like are taken into the I / O memory of each CPU unit (IN refresh), and the processing result of the instruction execution processing is written in the I / O memory. Output (OUT refresh) to an output unit or the like. In other words, the I / O refresh processing is performed by cyclically performing “each of the first CPU unit 100A and the second CPU unit 100B” and “an external unit and an external device other than the first CPU unit 100A and the second CPU unit 100B”. Data exchange. In the instruction execution processing, various control signals output from the PLC 10 as a controller to a control target are generated. For example, based on a user program, a logical operation using an input signal taken into the I / O memory by IN refresh is performed. Is executed, and a control signal is generated.
 PLC10においては、PLC10によって制御される制御システムの安全性、信頼性を向上するため、第1CPUユニット100Aと第2CPUユニット100Bとが二重化され、両者は、例えばCPU間バスにより接続される。第1CPUユニット100Aと第2CPUユニット100Bとは、両者に異常がなければ、同じタイミングで、同じ処理(自己診断処理、命令実行処理、および、I/Oリフレッシュ処理の各々)の実行を開始する。例えば、第1CPUユニット100Aと第2CPUユニット100Bとは、両者に異常がなければ、同じ入力信号を用いた、同じユーザプログラムの実行を、同じタイミングで、開始する。 In the PLC 10, the first CPU unit 100A and the second CPU unit 100B are duplicated in order to improve the safety and reliability of a control system controlled by the PLC 10, and both are connected by, for example, a bus between CPUs. If there is no abnormality in both the first CPU unit 100A and the second CPU unit 100B, execution of the same processing (each of self-diagnosis processing, instruction execution processing, and I / O refresh processing) is started at the same timing. For example, if there is no abnormality in both the first CPU unit 100A and the second CPU unit 100B, execution of the same user program using the same input signal is started at the same timing.
 第1CPUユニット100Aおよび第2CPUユニット100Bのうち、一方が実行系のCPUユニット(ACT)となり、他方が待機系のCPUユニット(STB)となる。前述の通り、本明細書においては、「第1CPUユニット100AがACTであり、第2CPUユニット100BがSTBである」例を説明するが、「第1CPUユニット100AがSTBであり、第2CPUユニット100BがACTである」場合も同様である。 One of the first CPU unit 100A and the second CPU unit 100B is an active CPU unit (ACT), and the other is a standby CPU unit (STB). As described above, in this specification, an example will be described in which “the first CPU unit 100A is an ACT and the second CPU unit 100B is an STB”, but “the first CPU unit 100A is an STB and the second CPU unit 100B is an STB. ACT ".
 ACTである第1CPUユニット100Aは、実際にサイクリックな処理を行い、メモリに対して読み書きを行ない、また、外部のI/O機器等との間で制御データ(I/Oデータ)の送受を行い、PLC10によって制御される制御システムの制御を司る。STBである第2CPUユニット100Bは、待機中(すなわち、ACTである第1CPUユニット100Aに異常が発生していない間)は、ACTである第1CPUユニット100Aが実行するのと同一のユーザプログラムを実行する。ただし、STBである第2CPUユニット100Bは、実行したユーザプログラムの実行結果(演算実行結果)を、外部のI/O機器等へ出力することはしない。また、STBである第2CPUユニット100Bは、ACTである第1CPUユニット100Aから処理結果(演算実行結果、および、ACTである第1CPUユニット100Aの取得した各種の入力信号)等を受信する。そして、STBである第2CPUユニット100Bは、ACTである第1CPUユニット100Aから受信した処理結果等により、自ユニットのメモリの内容を更新する。これにより、STBである第2CPUユニット100BとACTである第1CPUユニット100Aのメモリの内容の同一性が確保される。 The first CPU unit 100A, which is an ACT, actually performs cyclic processing, reads and writes data from and to a memory, and transmits and receives control data (I / O data) to and from an external I / O device or the like. And controls the control system controlled by the PLC 10. The second CPU unit 100B that is the STB executes the same user program as that executed by the first CPU unit 100A that is the ACT during standby (that is, while no abnormality occurs in the first CPU unit 100A that is the ACT). I do. However, the second CPU unit 100B, which is the STB, does not output the execution result (calculation execution result) of the executed user program to an external I / O device or the like. The second CPU unit 100B, which is an STB, receives processing results (calculation execution results and various input signals obtained by the first CPU unit 100A, which is an ACT) from the first CPU unit 100A, which is an ACT. Then, the second CPU unit 100B, which is the STB, updates the contents of the memory of the own unit based on the processing result and the like received from the first CPU unit 100A, which is the ACT. As a result, the identity of the contents of the memories of the second CPU unit 100B serving as the STB and the first CPU unit 100A serving as the ACT is secured.
 ACTである第1CPUユニット100Aが故障した場合、STBである第2CPUユニット100BがACTである第1CPUユニット100Aに切り替わって実際の制御等の動作を行う。PLC10において第1CPUユニット100Aと第2CPUユニット100Bとを二重化しておくことにより、ACTである第1CPUユニット100Aが故障しても、PLC10の全体が直ぐに停止することはなく、継続して運転できるので、信頼性が向上する。 When the first CPU unit 100A, which is ACT, fails, the second CPU unit 100B, which is STB, switches to the first CPU unit 100A, which is ACT, and performs operations such as actual control. By duplicating the first CPU unit 100A and the second CPU unit 100B in the PLC 10, even if the first CPU unit 100A that is the ACT fails, the entire PLC 10 can be continuously operated without immediately stopping. , Reliability is improved.
 (CPUユニットの詳細)
 図1に示すように、PLC10は、PLC10において二重化される第1CPUユニット100Aと第2CPUユニット100Bとに加え、両者が各々、書込および読込を実行することのできる共通レジスタ200を備えている。記載の簡潔性を担保するため、本実施の形態に直接関係のない構成は、説明およびブロック図から省略している。ただし、実施の実情に則して、PLC10は、当該省略された構成を備えてもよい。
(Details of CPU unit)
As shown in FIG. 1, the PLC 10 includes, in addition to a first CPU unit 100A and a second CPU unit 100B that are duplicated in the PLC 10, a common register 200 that can execute writing and reading. To ensure the simplicity of the description, components that are not directly related to the present embodiment are omitted from the description and block diagrams. However, the PLC 10 may have the omitted configuration in accordance with the actual situation of implementation.
 共通レジスタ200は、第1レジスタ210および第2レジスタ220を含む。 The common register 200 includes a first register 210 and a second register 220.
 第1レジスタ210は、第1CPUユニット100Aにより、「自ユニット(つまり、第1CPUユニット100)が、或る処理(自己診断処理、命令実行処理、および、I/Oリフレッシュ処理の各々)の実行を完了した」旨の情報が書き込まれる。第1CPUユニット100Aによって第1レジスタ210に書き込まれた情報は、第2CPUユニット100Bによって読み込まれる。 The first register 210 indicates, by the first CPU unit 100A, that the own unit (that is, the first CPU unit 100) executes a certain process (each of a self-diagnosis process, an instruction execution process, and an I / O refresh process). "Completed" is written. The information written to the first register 210 by the first CPU unit 100A is read by the second CPU unit 100B.
 第2レジスタ220は、第2CPUユニット100Bにより、「自ユニット(つまり、第2CPUユニット100B)が、或る処理(自己診断処理、命令実行処理、および、I/Oリフレッシュ処理の各々)の実行を完了した」旨の情報が書き込まれる。第2CPUユニット100Bによって第2レジスタ220に書き込まれた情報は、第1CPUユニット100Aによって読み込まれる。 The second register 220 causes the second CPU unit 100 </ b> B to execute a process (each of the self-diagnosis process, the instruction execution process, and the I / O refresh process) performed by the own unit (that is, the second CPU unit 100 </ b> B). "Completed" is written. The information written to the second register 220 by the second CPU unit 100B is read by the first CPU unit 100A.
 第1CPUユニット100Aは、記憶部130Aに加えて、機能ブロックとして、能力取得部110A、処理実行部120A、待ち時間設定部160A、および、判定部170Aを備えている。記憶部130Aは、他機能力テーブル140Aおよび自機能力テーブル150Aを格納している。 The first CPU unit 100A includes a capability acquisition unit 110A, a process execution unit 120A, a waiting time setting unit 160A, and a determination unit 170A as functional blocks in addition to the storage unit 130A. The storage unit 130A stores the other function table 140A and the own function table 150A.
 第2CPUユニット100Bは、記憶部130Bに加えて、機能ブロックとして、能力取得部110B、処理実行部120B、待ち時間設定部160B、および、判定部170Bを備えている。記憶部130Bは、他機能力テーブル140Bおよび自機能力テーブル150Bを格納している。 The second CPU unit 100B includes a capability acquisition unit 110B, a process execution unit 120B, a waiting time setting unit 160B, and a determination unit 170B as functional blocks in addition to the storage unit 130B. The storage unit 130B stores the other function table 140B and the own function table 150B.
 以下では、能力取得部110Aと能力取得部110Bとの各々を特に区別する必要がない場合は単に「能力取得部110」と称する。同様に、処理実行部120Aと処理実行部120Bとの各々を特に区別する必要がない場合は単に「処理実行部120」と称する。記憶部130Aと記憶部130Bとの各々を特に区別する必要がない場合は単に「記憶部130」と称する。他機能力テーブル140Aと他機能力テーブル140Bとの各々を特に区別する必要がない場合は単に「他機能力テーブル140」と称する。自機能力テーブル150Aと自機能力テーブル150Bとの各々を特に区別する必要がない場合は単に「自機能力テーブル150」と称する。待ち時間設定部160Aと待ち時間設定部160Bとの各々を特に区別する必要がない場合は単に「待ち時間設定部160」と称する。判定部170Aと判定部170Bとの各々を特に区別する必要がない場合は単に「判定部170」と称する。 In the following, each of the capability acquiring unit 110A and the capability acquiring unit 110B is simply referred to as “the capability acquiring unit 110” unless it is necessary to particularly distinguish each of them. Similarly, the processing execution unit 120A and the processing execution unit 120B are simply referred to as “processing execution unit 120” when it is not necessary to particularly distinguish each of them. The storage unit 130A and the storage unit 130B are simply referred to as the “storage unit 130” when it is not necessary to particularly distinguish each of them. When it is not necessary to particularly distinguish each of the other function strength table 140A and the other function strength table 140B, they are simply referred to as “other function strength table 140”. When there is no need to particularly distinguish each of the self-function table 150A and the self-function table 150B, it is simply referred to as “self-function table 150”. When there is no need to particularly distinguish between the waiting time setting unit 160A and the waiting time setting unit 160B, they are simply referred to as “waiting time setting unit 160”. When it is not necessary to particularly distinguish each of the determination unit 170A and the determination unit 170B, they are simply referred to as “determination unit 170”.
 能力取得部110、処理実行部120、待ち時間設定部160、および、判定部170等の各機能ブロックは、例えば、CPU(central processing unit)等が、ROM(read only memory)、NVRAM(non-Volatile random access memory)等で実現された記憶装置(記憶部130)に記憶されているプログラムを不図示のRAM(random access memory)等に読み出して実行することで実現できる。 The functional blocks such as the capability acquisition unit 110, the processing execution unit 120, the waiting time setting unit 160, and the determination unit 170 are, for example, a CPU (central processing unit), a ROM (read only memory), an NVRAM (non- This can be realized by reading a program stored in a storage device (storage unit 130) realized by Volatile @ random @ access @ memory or the like into a RAM (random @ access @ memory) or the like (not shown) and executing it.
  (機能ブロックの詳細)
 能力取得部110は、二重化される相手方のCPUユニットの性能Aby(処理能力)を示す情報(「性能情報」)を、相手方のCPUユニットの自機能力テーブル150を参照して取得する。能力取得部110は、取得した相手方のCPUユニットの性能情報(他機性能情報)を、自ユニットの他機能力テーブル140に格納する。
(Details of functional blocks)
The capability acquisition unit 110 acquires information (“performance information”) indicating the performance Aby (processing capability) of the CPU unit of the other party to be duplicated with reference to the own function table 150 of the other CPU unit. The capability acquiring unit 110 stores the acquired performance information (other device performance information) of the other CPU unit in the other function capability table 140 of the own unit.
 特に、能力取得部110は、処理実行部120が自己診断処理、命令実行処理、および、I/Oリフレッシュ処理を、この順で繰り返し実行する前に1回、図2に例示した「二重化処理」において、他機性能情報を取得する。 In particular, the capability acquisition unit 110 performs the “duplication process” illustrated in FIG. 2 once before the process execution unit 120 repeatedly executes the self-diagnosis process, the instruction execution process, and the I / O refresh process in this order. , The other device performance information is acquired.
 図3は、「二重化処理」において1回実行される、「二重化される相手方のCPUユニットの性能Abyを示す性能情報を取得する」処理の具体例を説明する図である。図3に示すように、能力取得部110Aは、第2CPUユニット100Bの性能Abyを示す性能情報を、自機能力テーブル150Bを参照して取得し、取得した第2CPUユニット100Bの性能情報(他機性能情報)を、他機能力テーブル140Aに格納する。また、能力取得部110Bは、第1CPUユニット100Aの性能Abyを示す性能情報を、自機能力テーブル150Aを参照して取得し、取得した第1CPUユニット100Aの性能情報(他機性能情報)を、他機能力テーブル140Bに格納する。 FIG. 3 is a diagram illustrating a specific example of the process of “acquiring performance information indicating the performance Aby of the CPU unit of the other party to be duplexed” executed once in the “duplexing process”. As illustrated in FIG. 3, the capability acquiring unit 110A acquires performance information indicating the performance Aby of the second CPU unit 100B with reference to the function capability table 150B, and acquires the acquired performance information of the second CPU unit 100B (the other device). Performance information) is stored in the other function capability table 140A. In addition, the capability acquisition unit 110B acquires performance information indicating the performance Aby of the first CPU unit 100A with reference to the function capability table 150A, and acquires the acquired performance information (other device performance information) of the first CPU unit 100A. It is stored in the other function strength table 140B.
 処理実行部120は、自己診断処理、命令実行処理、および、I/Oリフレッシュ処理を、この順で繰り返し実行し、各処理の実行を完了すると、「自ユニットが各処理の実行を完了した」旨を、共通レジスタ200に書き込む。 The processing execution unit 120 repeatedly executes the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing in this order, and when the execution of each processing is completed, “the own unit has completed the execution of each processing”. Is written to the common register 200.
 また、処理実行部120は、各処理の実行を完了すると、「自ユニットが各処理の実行を完了した」旨を、待ち時間設定部160および判定部170に通知する。処理実行部120は、待ち時間設定部160に、「自ユニットが各処理の実行を完了した」旨と共に、「各処理の実行時間(各処理について、実行開始から実行完了までの時間)」を通知してもよい。すなわち、処理実行部120は、内部タイマを用いて「各処理の実行時間」を計時し、計時した「各処理の実行時間」を待ち時間設定部160に通知してもよい。 When the execution of each process is completed, the process execution unit 120 notifies the waiting time setting unit 160 and the determination unit 170 that “the unit has completed the execution of each process”. The process execution unit 120 sets the “execution time of each process (time from execution start to execution completion for each process)” to the waiting time setting unit 160 along with “the unit has completed execution of each process”. You may be notified. That is, the process execution unit 120 may measure the “execution time of each process” using the internal timer, and notify the waiting time setting unit 160 of the measured “execution time of each process”.
 <処理の実行完了の書込>処理実行部120は、自己診断処理、命令実行処理、および、I/Oリフレッシュ処理の各々の実行を完了すると、その旨(つまり、「自ユニットが、その処理の実行を完了した」旨)を、共通レジスタ200に書き込む。すなわち、自己診断処理の実行を完了した処理実行部120Aは、「自ユニットが、自己診断処理の実行を完了した」旨を第1レジスタ210に書き込み、自己診断処理の実行を完了した処理実行部120は、「自ユニットが、自己診断処理の実行を完了した」旨を第2レジスタ220に書き込む。命令実行処理の実行を完了した処理実行部120Aは、「自ユニットが、命令実行処理の実行を完了した」旨を第1レジスタ210に書き込み、命令実行処理の実行を完了した処理実行部120Bは、「自ユニットが、命令実行処理の実行を完了した」旨を第2レジスタ220に書き込む。I/Oリフレッシュ処理の実行を完了した処理実行部120Aは、「自ユニットが、I/Oリフレッシュ処理の実行を完了した」旨を第1レジスタ210に書き込み、I/Oリフレッシュ処理の実行を完了した処理実行部120Bは、「自ユニットが、I/Oリフレッシュ処理の実行を完了した」旨を第2レジスタ220に書き込む。 <Write of completion of execution of processing> When the execution of each of the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing has been completed, the processing Is completed) in the common register 200. That is, the process execution unit 120A that has completed the execution of the self-diagnosis process writes, in the first register 210, a message that “the unit has completed execution of the self-diagnosis process” in the first register 210, and 120 writes into the second register 220 that “the unit has completed the execution of the self-diagnosis processing”. The processing execution unit 120A, which has completed the execution of the instruction execution process, writes, to the first register 210, that "the unit has completed the execution of the instruction execution process", and the processing execution unit 120B, which has completed the execution of the instruction execution process, , "The own unit has completed the execution of the instruction execution process" is written in the second register 220. The processing execution unit 120A, which has completed the execution of the I / O refresh processing, writes in the first register 210 that "the unit has completed the execution of the I / O refresh processing", and completes the execution of the I / O refresh processing. The executed processing unit 120B writes in the second register 220 that "the unit has completed the execution of the I / O refresh processing".
 <処理の実行開始のタイミング>第1CPUユニット100Aと第2CPUユニット100Bとが二重化されている間、処理実行部120は、自己診断処理、命令実行処理、および、I/Oリフレッシュ処理の各々の実行を、以下のタイミングで開始する。言い換えれば、第1CPUユニット100Aと第2CPUユニット100Bとの各々について異常が発生したと判定されない間、処理実行部120は、自己診断処理、命令実行処理、および、I/Oリフレッシュ処理の各々の実行を、以下のタイミングで開始する。 <Process Execution Start Timing> While the first CPU unit 100A and the second CPU unit 100B are duplicated, the process execution unit 120 executes each of the self-diagnosis process, the instruction execution process, and the I / O refresh process. Is started at the following timing. In other words, while it is not determined that an abnormality has occurred in each of the first CPU unit 100A and the second CPU unit 100B, the processing execution unit 120 executes each of the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing. Is started at the following timing.
 すなわち、処理実行部120は、自己診断処理、命令実行処理、および、I/Oリフレッシュ処理の各々の実行を、前の処理の実行完了後の同期チェック処理で、第1CPUユニット100Aと第2CPUユニット100Bとの正常が確認されてから、開始する。 That is, the processing execution unit 120 performs each of the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing in a synchronization check processing after completion of the previous processing by the first CPU unit 100A and the second CPU unit. It starts after the normality with 100B is confirmed.
 具体的には、自己診断処理の実行完了後の同期チェック処理において、第1CPUユニット100Aと第2CPUユニット100Bとの正常が確認されてから、処理実行部120は、命令実行処理の実行を開始する。命令実行処理の実行完了後の同期チェック処理において、第1CPUユニット100Aと第2CPUユニット100Bとの正常が確認されてから、処理実行部120は、I/Oリフレッシュ処理の実行を開始する。I/Oリフレッシュ処理の実行完了後の同期チェック処理において、第1CPUユニット100Aと第2CPUユニット100Bとの正常が確認されてから、処理実行部120は、次の周期における自己診断処理の実行を開始する。 Specifically, in the synchronization check processing after the completion of the execution of the self-diagnosis processing, the normality of the first CPU unit 100A and the second CPU unit 100B is confirmed, and then the processing execution unit 120 starts executing the instruction execution processing. . In the synchronization check process after the execution of the instruction execution process is completed, after the normality of the first CPU unit 100A and the second CPU unit 100B is confirmed, the process execution unit 120 starts executing the I / O refresh process. In the synchronization check processing after the execution of the I / O refresh processing is completed, the normality of the first CPU unit 100A and the second CPU unit 100B is confirmed, and then the processing execution unit 120 starts executing the self-diagnosis processing in the next cycle. I do.
 待ち時間設定部160は、他機能力テーブル140を参照して他機性能情報を取得し、自機能力テーブル150を参照して自機性能情報を取得する。また、待ち時間設定部160は、処理実行部120から、「自ユニットが各処理の実行を完了した」旨を取得する。待ち時間設定部160は、「自ユニットが各処理の実行を完了した」旨を取得する前に処理実行部120から取得していた「自ユニットが各処理の実行を開始した」旨と併せて、各処理の実行時間を演算する。すなわち、待ち時間設定部160は、内部タイマにより計時した「自ユニットが各処理の実行を開始した」時刻と、内部タイマにより計時した「自ユニットが各処理の実行を完了した」時刻とから、各処理の実行時間を演算する。なお、各処理の実行時間は、処理実行部120が内部タイマを用いて計時し、処理実行部120から待ち時間設定部160へと通知されてもよい。 The waiting time setting unit 160 acquires the other device performance information by referring to the other function capability table 140, and acquires the own device performance information by referring to the own function capability table 150. Further, the waiting time setting unit 160 acquires from the processing execution unit 120 that “the unit has completed the execution of each processing”. The waiting time setting unit 160 adds the message “the unit has started executing each process” obtained from the process execution unit 120 before acquiring the message “the unit has completed execution of each process”. , Calculate the execution time of each process. That is, the waiting time setting unit 160 calculates the time “the own unit has started execution of each process” measured by the internal timer and the time “the own unit has completed execution of each process” measured by the internal timer. The execution time of each process is calculated. The execution time of each process may be measured by the process execution unit 120 using an internal timer, and may be notified from the process execution unit 120 to the waiting time setting unit 160.
 待ち時間設定部160は、取得した他機性能情報、自機性能情報、および、各処理の実行時間から、各処理についての同期チェック処理のための「待ち時間Tw」を算出し、算出した待ち時間Twを、判定部170へ通知する。具体的には、待ち時間設定部160は、他機性能情報、自機性能情報、および、各処理の実行時間を用いて、以下のように、各処理についての同期チェック処理のための「待ち時間Tw」を算出する。 The waiting time setting unit 160 calculates a “waiting time Tw” for a synchronization check process for each process from the acquired other device performance information, own device performance information, and the execution time of each process, and calculates the calculated waiting time. The time Tw is notified to the determination unit 170. Specifically, the waiting time setting unit 160 uses the other device performance information, the own device performance information, and the execution time of each process to perform a “wait” for the synchronization check process for each process as follows. Time Tw ”is calculated.
 すなわち、他機性能情報に示される「二重化される相手方のCPUユニットの性能Aby」が、自機性能情報に示される「自ユニットの性能Abm」より高い場合、待ち時間設定部160は、「通常の待ち時間Two」を「待ち時間Tw」とする。また、二重化される相手方のCPUユニットの性能Abyが自ユニットの性能Abmに等しい場合、待ち時間設定部160は、「通常の待ち時間Two」を「待ち時間Tw」とする。 That is, when the “performance Aby of the CPU unit of the other party to be duplicated” indicated in the performance information of the other device is higher than the “performance Abm of the own device” indicated in the performance information of the own device, the waiting time setting unit 160 sets the “normal Waiting time Two ”is referred to as“ waiting time Tw ”. Further, when the performance Aby of the CPU unit of the other party to be duplicated is equal to the performance Abm of the own unit, the waiting time setting unit 160 sets the “normal waiting time Two” to the “waiting time Tw”.
 「通常の待ち時間Two」は、予め長さの決められている、第1CPUユニット100Aと第2CPUユニット100Bとで共通の期間であり、例えば、各ユニットの工場出荷時に設定され、ユーザによって更新可能な期間である。「通常の待ち時間Two」は、第1CPUユニット100Aと第2CPUユニット100Bとで性能Abが等しいとの前提で設定される期間である。 The “normal waiting time Two” is a period common to the first CPU unit 100A and the second CPU unit 100B whose length is determined in advance, and is set, for example, at the time of factory shipment of each unit and can be updated by the user. Period. The “normal waiting time Two” is a period set on the assumption that the performance Ab is equal between the first CPU unit 100A and the second CPU unit 100B.
 二重化される相手方のCPUユニットの性能Abyが自ユニットの性能Abmより低い場合、待ち時間設定部160は、自ユニットの性能Abmを相手方のCPUユニットの性能Abyで除した値に、各処理の実行時間を乗じた期間を、調整待ち時間Taとする。そして、待ち時間設定部160は、「通常の待ち時間Twoに調整待ち時間Taを加えた期間(つまり、「通常の待ち時間Two+調整待ち時間Ta」)」を、「待ち時間Tw」とする。 If the performance Aby of the partner CPU unit to be duplexed is lower than the performance Abm of the own unit, the waiting time setting unit 160 executes each processing to a value obtained by dividing the performance Abm of the own unit by the performance Aby of the other CPU unit. The period multiplied by the time is referred to as an adjustment waiting time Ta. Then, the waiting time setting unit 160 sets the “period obtained by adding the adjustment waiting time Ta to the normal waiting time Two (that is,“ the normal waiting time Two + the adjustment waiting time Ta ”)” to the “waiting time Tw”.
 判定部170は、処理実行部120による各処理の実行完了時点から、待ち時間設定部160から通知された待ち時間Twが経過するまでに、処理実行部120が実行完了した処理について、相手方のCPUユニットが実行を完了するかを判定する(同期チェック処理)。例えば、判定部170は、「自ユニットが各処理の実行を完了した」時点から待ち時間Twが経過した時点で、共通レジスタ200を参照し、自ユニットが実行を完了した或る処理について、二重化される相手方のCPUユニットの実行が完了しているかを確認する。 The determination unit 170 determines, for the processing that has been completed by the processing execution unit 120 from the completion of execution of each processing by the processing execution unit 120 to the elapse of the waiting time Tw notified from the waiting time setting unit 160, the CPU of the other party. It is determined whether the unit has completed execution (synchronization check processing). For example, the determination unit 170 refers to the common register 200 at the time when the waiting time Tw has elapsed from the time “the own unit has completed the execution of each process”, and performs the duplexing for a certain process whose own unit has completed the execution. The execution of the other CPU unit is completed.
 待ち時間Twとして「通常の待ち時間Two+調整待ち時間Ta」を通知された判定部170は、「自ユニットが各処理の実行を完了した」時点から調整待ち時間Taがするまで待機処理を実行する。そして、判定部170は、待機処理の実行完了後(つまり、「自ユニットが各処理の実行を完了した」時点から調整待ち時間Taが経過した後)に、同期チェック処理を実行する。すなわち、判定部170は、待機処理の実行完了後に、「通常の待ち時間Twoが経過するまでに、自ユニットが実行完了した処理の実行を、相手方のCPUユニットが完了していることを確認できるか」を判定する。言い換えれば、判定部170は、待機処理の実行完了時点から通常の待ち時間Twoが経過するまでに、自ユニットが実行完了した処理について、相手方のCPUユニットによる実行完了を確認できるかを判定する。「待機処理の実行完了時点」は、「自ユニットが実行完了した或る処理の、相手方のCPUユニットにおける実行が完了すると予想される時点」である。 The determination unit 170 that has been notified of the “normal waiting time Two + the adjustment waiting time Ta” as the waiting time Tw executes the standby processing until the adjustment waiting time Ta elapses from the point of “the unit has completed execution of each process”. . Then, the determination unit 170 executes the synchronization check process after the completion of the execution of the standby process (that is, after the adjustment waiting time Ta has elapsed from the time when “the unit has completed execution of each process”). In other words, after the execution of the standby process is completed, the determination unit 170 can confirm that the execution of the process completed by the own unit is completed by the partner CPU unit before the normal waiting time Two elapses. ? In other words, the determination unit 170 determines whether the completion of the execution by the partner CPU unit can be confirmed for the processing completed by the own unit before the normal waiting time Two elapses from the completion of the execution of the standby processing. The “time when the execution of the standby process is completed” is “the time when the execution of a certain process that has been completed by the own unit is expected to be completed in the partner CPU unit”.
 待ち時間Twとして「通常の待ち時間Two」を通知された判定部170は、「自ユニットが各処理の実行を完了した」時点で直ぐに、同期チェック処理を実行する。すなわち、判定部170は、「通常の待ち時間Twoが経過するまでに、自ユニットが実行完了した処理の実行を、相手方のCPUユニットが完了していることを確認できるか」を判定する。言い換えれば、判定部170は、自ユニットの実行完了時点から通常の待ち時間Twoが経過するまでに、自ユニットが実行完了した処理について、相手方のCPUユニットによる実行完了を確認できるかを判定する。 The determination unit 170, which has been notified of the “normal waiting time Two” as the waiting time Tw, immediately executes the synchronization check processing at the time of “the unit has completed execution of each processing”. That is, the determination unit 170 determines “whether it is possible to confirm that the execution of the processing that has been completed by the own unit is completed by the partner CPU unit before the normal waiting time Two elapses”. In other words, the determination unit 170 determines whether the execution completion of the own unit can be confirmed by the partner CPU unit before the normal waiting time Two elapses from the execution completion time of the own unit.
 判定部170Aは、共通レジスタ200の第2レジスタ220を参照し、処理実行部120Aが実行を完了した或る処理について、「処理実行部120Bによる実行が完了した」旨の書込があるかを確認する。判定部170Aは、処理実行部120Aが実行を完了した或る処理について、第2レジスタ220に「処理実行部120Bによる実行が完了した」旨の書込がないと、第2CPUユニット100Bに異常が発生したと判定する。 The determining unit 170A refers to the second register 220 of the common register 200, and determines whether or not there is a write to the effect that “the execution by the process execution unit 120B has been completed” for a certain process that has been completed by the process execution unit 120A. Confirm. If there is no write in the second register 220 that “the execution by the process execution unit 120B has been completed” for the certain process that has been completed by the process execution unit 120A, the determination unit 170A determines that an abnormality has occurred in the second CPU unit 100B. It is determined that an error has occurred.
 判定部170Bは、共通レジスタ200の第1レジスタ210を参照し、処理実行部120Bが実行を完了した或る処理について、「処理実行部120Aによる実行が完了した」旨の書込があるかを確認する。判定部170Bは、処理実行部120Bが実行を完了した或る処理について、第1レジスタ210に「処理実行部120Aによる実行が完了した」旨の書込がないと、第1CPUユニット100Aに異常が発生したと判定する。 The determination unit 170B refers to the first register 210 of the common register 200, and determines whether or not there is a write to the effect that “the execution by the process execution unit 120A has been completed” for a certain process that has been completed by the process execution unit 120B. Confirm. If there is no writing in the first register 210 that “the execution by the process execution unit 120A has been completed” for a certain process that has been completed by the process execution unit 120B, the determination unit 170B determines that the first CPU unit 100A has an error. It is determined that an error has occurred.
  (記憶部の詳細)
 記憶部130は、第1CPUユニット100Aと第2CPUユニット100Bとの各々が使用する各種データを格納する記憶装置である。なお、記憶部130は、第1CPUユニット100Aと第2CPUユニット100Bとの各々が実行する(1)制御プログラム、(2)OSプログラム、(3)第1CPUユニット100Aと第2CPUユニット100Bとの各々が有する各種機能を実行するためのアプリケーションプログラム、および、(4)該アプリケーションプログラムを実行するときに読み出す各種データを非一時的に記憶してもよい。上記の(1)~(4)のデータは、例えば、ROM(read only memory)、フラッシュメモリ、EPROM(Erasable Programmable ROM)、EEPROM(登録商標)(Electrically EPROM)、HDD(Hard Disc Drive)等の不揮発性記憶装置に記憶される。第1CPUユニット100Aと第2CPUユニット100Bとの各々は、図示しない一時記憶部を備えていてもよい。一時記憶部は、第1CPUユニット100Aと第2CPUユニット100Bとの各々が実行する各種処理の過程で、演算に使用するデータおよび演算結果等を一時的に記憶するいわゆるワーキングメモリであり、RAM(Random Access Memory)等の揮発性記憶装置で構成される。どのデータをどの記憶装置に記憶するのかについては、第1CPUユニット100Aと第2CPUユニット100Bとの各々の使用目的、利便性、コスト、または、物理的な制約等から適宜決定される。記憶部130はさらに、他機能力テーブル140および自機能力テーブル150を格納している。
(Details of storage unit)
The storage unit 130 is a storage device that stores various data used by each of the first CPU unit 100A and the second CPU unit 100B. The storage unit 130 stores (1) a control program, (2) an OS program, and (3) each of the first CPU unit 100A and the second CPU unit 100B that are executed by the first CPU unit 100A and the second CPU unit 100B. An application program for executing various functions provided therein, and (4) various data to be read when the application program is executed may be temporarily stored. The above data (1) to (4) are, for example, ROM (read only memory), flash memory, EPROM (Erasable Programmable ROM), EEPROM (registered trademark) (Electrically EPROM), HDD (Hard Disc Drive), etc. Stored in a non-volatile storage device. Each of the first CPU unit 100A and the second CPU unit 100B may include a temporary storage unit (not shown). The temporary storage unit is a so-called working memory that temporarily stores data used for calculation, calculation results, and the like in the course of various processes executed by each of the first CPU unit 100A and the second CPU unit 100B. Access Memory). Which data is stored in which storage device is appropriately determined based on the purpose of use, convenience, cost, physical restrictions, and the like of each of the first CPU unit 100A and the second CPU unit 100B. The storage unit 130 further stores another function strength table 140 and own function strength table 150.
 他機能力テーブル140には、二重化される相手方のCPUユニットの性能Abyを示す情報である他機性能情報が格納される。図3を用いて説明したように、能力取得部110は、二重化される相手方のCPUユニットの自機能力テーブル150を参照して取得した他機性能情報を、自ユニットの他機能力テーブル140に格納する。 (4) The other-function capability table 140 stores other-device performance information that is information indicating the performance Aby of the CPU unit of the other party to be duplicated. As described with reference to FIG. 3, the capability acquiring unit 110 stores the other device performance information acquired with reference to the own function table 150 of the CPU unit of the other party to be duplicated in the other function table 140 of the own unit. Store.
 自機能力テーブル150には、自ユニットの性能Abmを示す情報である自機性能情報が格納され、例えば、「自ユニットが、基準CPUユニットと比較して、どの程度の性能Ab(処理能力)を備えているのか」を示す自機性能情報が格納されている。自機性能情報は、例えば第1CPUユニット100Aと第2CPUユニット100Bとの各々の工場出荷時に、自機能力テーブル150に格納される。 The own function table 150 stores own device performance information, which is information indicating the performance Abm of the own unit. For example, “How much performance Ab (processing capacity) of the own unit as compared with the reference CPU unit” is stored. Is provided, own device performance information is stored. The own device performance information is stored in the own function table 150 when each of the first CPU unit 100A and the second CPU unit 100B is shipped from the factory, for example.
 (CPUユニットについての整理)
 これまでに図1を用いて構成を説明してきた第1CPUユニット100Aおよび第2CPUユニット100Bの各々について、その理解を容易にするため、以下のように整理しておく。すなわち、第1CPUユニット100Aおよび第2CPUユニット100Bの各々は、PLC10(コントローラ)において二重化されるCPUユニットであって、待ち時間設定部160(設定部)と判定部170とを備えている。待ち時間設定部160は、自ユニットの性能Abm(処理能力)と、二重化される相手方のCPUユニットの性能Abyとの比を考慮して、待ち時間Twを設定する。判定部170は、自ユニットにおける処理の実行完了時点から、待ち時間設定部160によって設定された待ち時間Twを経過するまでに、相手方のCPUユニットの前記処理の実行完了を確認できないと、相手方のCPUユニットに異常が発生したと判定する。
(Arrangement of CPU unit)
Each of the first CPU unit 100A and the second CPU unit 100B whose configuration has been described with reference to FIG. 1 is arranged as follows in order to facilitate understanding. That is, each of the first CPU unit 100A and the second CPU unit 100B is a duplicated CPU unit in the PLC 10 (controller), and includes the waiting time setting unit 160 (setting unit) and the determination unit 170. The waiting time setting unit 160 sets the waiting time Tw in consideration of the ratio between the performance Abm (processing capacity) of the own unit and the performance Aby of the CPU unit of the other party to be duplicated. If the determination unit 170 cannot confirm that the execution of the process by the other CPU unit has been completed before the elapse of the waiting time Tw set by the waiting time setting unit 160 from the time when the execution of the process in the own unit is completed, It is determined that an abnormality has occurred in the CPU unit.
 前記の構成によれば、第1CPUユニット100Aおよび第2CPUユニット100Bの各々は、自ユニットと相手方のCPUユニットとの性能Ab(処理能力)の比を考慮して待ち時間Twを設定する。そして、第1CPUユニット100Aおよび第2CPUユニット100Bの各々は、設定した待ち時間Twを利用して、自ユニットと相手方のCPUユニットとの同期(つまり、実行完了した処理の一致)を判定する。 According to the above configuration, each of the first CPU unit 100A and the second CPU unit 100B sets the waiting time Tw in consideration of the ratio of the performance Ab (processing capacity) between the own CPU unit and the partner CPU unit. Then, each of the first CPU unit 100A and the second CPU unit 100B uses the set waiting time Tw to determine the synchronization between its own unit and the partner CPU unit (that is, the coincidence of the executed processes).
 例えば、相手方のCPUユニットの方が自ユニットより性能Abが高い(つまり、処理の実行速度が早い)場合、第1CPUユニット100Aおよび第2CPUユニット100Bの各々は、待ち時間Twとして、予め決められた通常の待ち時間Twoを設定する。また、相手方のCPUユニットと自ユニットとで性能Abが等しい場合、第1CPUユニット100Aおよび第2CPUユニット100Bの各々は、待ち時間Twとして、予め決められた「通常の待ち時間Two」を設定する。 For example, when the performance Ab of the other CPU unit is higher than that of the own CPU unit (that is, the execution speed of the process is faster), each of the first CPU unit 100A and the second CPU unit 100B is determined in advance as the waiting time Tw. The normal waiting time Two is set. Further, when the performance Ab is equal between the partner CPU unit and the own unit, each of the first CPU unit 100A and the second CPU unit 100B sets a predetermined “normal waiting time Two” as the waiting time Tw.
 相手方のCPUユニットの方が自ユニットより性能Abが高い場合、自ユニットが或る処理の実行を完了した時点では既に相手方のCPUユニットはその或る処理の実行を完了しているはずである。また、相手方のCPUユニットと自ユニットとで性能Abが等しい場合、自ユニットが或る処理の実行を完了した時点で、相手方のCPUユニットは前記或る処理の実行を完了するはずである。 If the performance Ab of the other CPU unit is higher than that of the own unit, the other CPU unit should have already completed execution of the certain process when the own unit completes execution of a certain process. If the performance Ab is equal between the partner CPU unit and the own unit, the partner CPU unit should complete the execution of the certain process when the own unit completes the execution of a certain process.
 したがって、相手方のCPUユニットの方が自ユニットより性能Abが高い場合でも、第1CPUユニット100Aおよび第2CPUユニット100Bの各々は、待ち時間Twとして、通常の待ち時間Twoを設定することで、相手方のCPUユニットに異常が発生したか否かを正確に判定することができる。 Therefore, even when the performance of the other CPU unit is higher than that of the own CPU unit, each of the first CPU unit 100A and the second CPU unit 100B sets the normal waiting time Two as the waiting time Tw, thereby enabling the other CPU unit to set the normal waiting time Two. It is possible to accurately determine whether an abnormality has occurred in the CPU unit.
 例えば、相手方のCPUユニットの方が自ユニットより性能Abが低い場合、第1CPUユニット100Aおよび第2CPUユニット100Bの各々は、待ち時間Twとして、「通常の待ち時間Twoに、調整待ち時間Taを加えた期間」を設定する。調整待ち時間Taは、自ユニットと相手方のCPUユニットとの性能Abの差を考慮して設定される。例えば、「自ユニットにおける前記処理の実行完了時点と、相手方のCPUユニットにおける前記処理の実行が完了すると予想される時点との差」が、調整待ち時間Taとされる。 For example, when the performance Ab of the partner CPU unit is lower than that of the own CPU unit, each of the first CPU unit 100A and the second CPU unit 100B sets “the normal waiting time Two plus the adjustment waiting time Ta as the waiting time Tw”. Period "is set. The adjustment waiting time Ta is set in consideration of a difference in performance Ab between the own unit and the partner CPU unit. For example, the “difference between the time when the execution of the process in the own unit is completed and the time when the execution of the process in the partner CPU unit is expected to be completed” is the adjustment waiting time Ta.
 相手方のCPUユニットの方が自ユニットより性能Abが低い場合、自ユニットが或る処理の実行を完了した時点では、相手方のCPUユニットは、未だ前記或る処理の実行を完了していない。そこで、第1CPUユニット100Aおよび第2CPUユニット100Bの各々は、「相手方のCPUユニットにおける前記処理の実行が完了すると予想される時点(実行完了予想時点)」まで待機する。そして、第1CPUユニット100Aおよび第2CPUユニット100Bの各々は、実行完了予想時点から、通常の待ち時間Twoが経過するまでに、相手方のCPUユニットにおける前記処理の実行完了を確認できるかを判定する。つまり、第1CPUユニット100Aおよび第2CPUユニット100Bの各々は、自ユニットにおける前記処理の実行完了時点から、「調整待ち時間Taを、通常の待ち時間Twoに加えた期間」が経過するまでに、相手方のCPUユニットにおける前記処理の実行完了を確認できるかを判定する。 If the performance Ab of the other CPU unit is lower than that of the own unit, the other CPU unit has not completed execution of the certain process at the time when the own unit has completed execution of a certain process. Therefore, each of the first CPU unit 100A and the second CPU unit 100B waits until “the time when the execution of the processing by the other CPU unit is expected to be completed (execution completion expected time)”. Then, each of the first CPU unit 100A and the second CPU unit 100B determines whether the completion of the execution of the processing by the partner CPU unit can be confirmed before the normal waiting time Two elapses from the predicted completion time of the execution. That is, each of the first CPU unit 100A and the second CPU unit 100B waits for a period from the completion of the execution of the processing in the own unit until the “period in which the adjustment wait time Ta is added to the normal wait time Two” elapses. It is determined whether the CPU unit can confirm the completion of the processing.
 したがって、相手方のCPUユニットの方が自ユニットより性能Abが低い場合でも、第1CPUユニット100Aおよび第2CPUユニット100Bの各々は、待ち時間Twとして、「調整待ち時間Taを、通常の待ち時間Twoに加えた期間」を設定することで、前記の判定を正確に実行できる。 Therefore, even when the other CPU unit has a lower performance Ab than the own CPU unit, each of the first CPU unit 100A and the second CPU unit 100B sets the “adjustment waiting time Ta to the normal waiting time Twoo” as the waiting time Tw. By setting the “added period”, the above determination can be accurately performed.
 以上の通り、第1CPUユニット100Aおよび第2CPUユニット100Bの各々は、自ユニットと相手方のCPUユニットとで性能Abが一致しない場合であっても、自ユニットと相手方のCPUユニットとの性能Abの違いを考慮した、適切な待ち時間Twを設定できるとの効果を奏する。すなわち、第1CPUユニット100Aおよび第2CPUユニット100Bの各々は、二重化される相手方のCPUユニットと自ユニットとの性能Abの違いを考慮して、不要な待ち時間Twを設けずに、同期チェック処理を正確に行なうことができるとの効果を奏する。 As described above, each of the first CPU unit 100A and the second CPU unit 100B has a difference in performance Ab between its own unit and the partner CPU unit even when the performance Ab of the own unit and the partner CPU unit do not match. In consideration of the above, there is an effect that an appropriate waiting time Tw can be set. That is, each of the first CPU unit 100A and the second CPU unit 100B performs the synchronization check processing without providing an unnecessary waiting time Tw in consideration of the difference in performance Ab between the CPU unit of the other party and the own unit. This has the effect that it can be performed accurately.
 第1CPUユニット100Aおよび第2CPUユニット100Bの各々において、前記処理(同期チェック処理の対象となる処理)は、自己診断処理、命令実行処理、および、I/Oリフレッシュ処理を含む。自己診断処理は、自ユニットのハードウェアに異常がないかを診断する処理である。命令実行処理は、「相手方のCPUユニット以外の、外部装置および外部ユニット」を制御する信号を生成する処理である。I/Oリフレッシュ処理は、「相手方のCPUユニット以外の、外部装置および外部ユニット」との間でデータを交換する処理である。待ち時間設定部160は、自己診断処理、命令実行処理、および、I/Oリフレッシュ処理の各々について、待ち時間Twを設定する。判定部170は、自己診断処理、命令実行処理、および、I/Oリフレッシュ処理の各々について、前記判定を、つまり、同期チェック処理を実行する。 In each of the first CPU unit 100A and the second CPU unit 100B, the processing (processing to be subjected to the synchronization check processing) includes a self-diagnosis processing, an instruction execution processing, and an I / O refresh processing. The self-diagnosis process is a process for diagnosing whether there is any abnormality in the hardware of the own unit. The instruction execution process is a process of generating a signal for controlling “an external device and an external unit other than the partner CPU unit”. The I / O refresh process is a process of exchanging data with “an external device and an external unit other than the partner CPU unit”. The waiting time setting unit 160 sets a waiting time Tw for each of the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing. The determination unit 170 performs the determination, that is, the synchronization check process, for each of the self-diagnosis process, the instruction execution process, and the I / O refresh process.
 第1CPUユニット100Aおよび第2CPUユニット100Bの各々は、自己診断処理、命令実行処理、および、I/Oリフレッシュ処理の各々について、自ユニットと相手方のCPUユニットとの同期(つまり、実行完了した処理の一致)を判定する。 Each of the first CPU unit 100A and the second CPU unit 100B synchronizes the self-diagnosis process, the instruction execution process, and the I / O refresh process between the self-unit and the partner CPU unit (that is, the process that has been completed). Match).
 第1CPUユニット100Aおよび第2CPUユニット100Bの各々は、自己診断処理、命令実行処理、および、I/Oリフレッシュ処理の各々の実行完了のタイミングで、自ユニットと相手方のCPUユニットとの同期を判定することができるとの効果を奏する。 Each of the first CPU unit 100A and the second CPU unit 100B determines the synchronization between its own unit and the partner CPU unit at the timing of completion of execution of each of the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing. It has the effect of being able to.
 第1CPUユニット100Aおよび第2CPUユニット100Bの各々は、自己診断処理、命令実行処理、および、I/Oリフレッシュ処理を、この順で繰り返し実行する前に、二重化処理を1回実行する。第1CPUユニット100Aおよび第2CPUユニット100Bの各々は、二重化処理において、相手方のCPUユニットの性能Abyを、相手方のCPUユニットから取得する。 (1) Each of the first CPU unit 100A and the second CPU unit 100B executes the duplex processing once before repeatedly executing the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing in this order. Each of the first CPU unit 100A and the second CPU unit 100B acquires the performance Aby of the partner CPU unit from the partner CPU unit in the duplex processing.
 前記の構成によれば、第1CPUユニット100Aおよび第2CPUユニット100Bの各々は、相手方のCPUユニットの性能Abyを、自己診断処理、命令実行処理、および、I/Oリフレッシュ処理を、この順で繰り返し実行する前に、1回取得する。そして、第1CPUユニット100Aおよび第2CPUユニット100Bの各々は、取得した相手方のCPUユニットの性能Abyと、自ユニットの性能Abmとの比を考慮して、前記各処理についての前記判定に用いる待ち時間Twを設定する。 According to the above configuration, each of the first CPU unit 100A and the second CPU unit 100B repeats the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing in this order with the performance Aby of the partner CPU unit. Acquire once before executing. Each of the first CPU unit 100A and the second CPU unit 100B takes into account the ratio of the acquired performance Aby of the partner CPU unit to the performance Abm of its own unit, and the waiting time used for the determination for each of the processes. Set Tw.
 第1CPUユニット100Aおよび第2CPUユニット100Bの各々は、前記各処理を繰り返し実行する前に取得しておいた相手方のCPUユニットの性能Abyを考慮して、前記各処理についての前記判定に用いる待ち時間Twを、設定できるとの効果を奏する。 Each of the first CPU unit 100A and the second CPU unit 100B takes into account the performance Aby of the partner CPU unit acquired before repeatedly executing each of the processes, and the waiting time used for the determination of each process. This has an effect that Tw can be set.
 §3.動作例
 第1CPUユニット100Aおよび第2CPUユニット100Bの各々は、図2に示すように、以下の処理を実行する。すなわち、第1CPUユニット100Aおよび第2CPUユニット100Bの各々は、自己診断処理、命令実行処理、および、I/Oリフレッシュ処理を、この順で繰り返し実行する。具体的には、各ユニットの処理実行部120が、自己診断処理、命令実行処理、および、I/Oリフレッシュ処理を、この順で繰り返し実行する。また、第1CPUユニット100Aおよび第2CPUユニット100Bの各々(特に、各ユニットの能力取得部110)は、自己診断処理、命令実行処理、および、I/Oリフレッシュ処理を、この順で繰り返し実行する前に二重化処理を1回実行する。第1CPUユニット100Aおよび第2CPUユニット100Bの各々は、二重化処理において、二重化される相手方のCPUユニットの性能Abyを示す他機性能情報を取得する。
§3. Operation Example Each of the first CPU unit 100A and the second CPU unit 100B executes the following processing as shown in FIG. That is, each of the first CPU unit 100A and the second CPU unit 100B repeatedly executes the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing in this order. Specifically, the processing execution unit 120 of each unit repeatedly executes the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing in this order. Before each of the first CPU unit 100A and the second CPU unit 100B (particularly, the capability acquisition unit 110 of each unit) performs the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing in this order. The duplication processing is executed once. Each of the first CPU unit 100A and the second CPU unit 100B acquires other device performance information indicating the performance Aby of the partner CPU unit to be duplexed in the duplexing process.
 各ユニット(特に、各ユニットの処理実行部120)は、自己診断処理、命令実行処理、および、I/Oリフレッシュ処理の各処理の実行を完了すると、「自ユニットが各処理の実行を完了した」旨を、共通レジスタ200に書き込む。 When each unit (particularly, the processing execution unit 120 of each unit) completes the execution of each processing of the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing, the message “the own unit has completed the execution of each processing. Is written in the common register 200.
 各ユニット(特に、各ユニットの待ち時間設定部160)は、他機性能情報、自機性能情報、および、自ユニットが実行完了した各処理の実行時間から、各処理についての同期チェック処理のための「待ち時間Tw」を設定する。 Each unit (particularly, the waiting time setting unit 160 of each unit) performs a synchronization check process for each process from the other device performance information, the own device performance information, and the execution time of each process completed by the own unit. Is set.
 具体的には、待ち時間設定部160は、各処理について、「自ユニットの性能Abmと二重化される相手方のCPUユニットの性能Abyとの比を考慮して算出する調整待ち時間Ta」を算出する。そして、待ち時間設定部160は、「各処理について算出した、調整待ち時間Ta」を、「各処理の、通常の待ち時間Two」に追加した期間を、各処理についての同期チェック処理のための「待ち時間Tw」として設定する。 Specifically, the waiting time setting unit 160 calculates the “adjustment waiting time Ta calculated in consideration of the ratio between the performance Abm of the own unit and the performance Aby of the CPU unit of the other party to be duplicated” for each process. . Then, the waiting time setting unit 160 adds a period obtained by adding the “adjusted waiting time Ta calculated for each process” to the “normal waiting time Two of each process” for the synchronization check process of each process. This is set as “waiting time Tw”.
 「Abm/Aby」が「1」以下である場合、待ち時間設定部160は、各処理の「調整待ち時間Ta=0」とする。「Abm/Aby」が「1」より大きい場合、待ち時間設定部160は、各処理の「調整待ち時間Ta」を、各処理の実行時間に「Abm/Aby」を乗じた値とする。 場合 When “Abm / Aby” is equal to or less than “1”, the waiting time setting unit 160 sets “adjustment waiting time Ta = 0” for each process. When “Abm / Aby” is larger than “1”, the waiting time setting unit 160 sets the “adjustment waiting time Ta” of each process to a value obtained by multiplying the execution time of each process by “Abm / Aby”.
 各ユニット(特に、各ユニットの判定部170)は、自ユニットによる自己診断処理、命令実行処理、および、I/Oリフレッシュ処理の各々の実行完了後に、同期チェック処理を実行する。すなわち、判定部170は、共通レジスタ200を参照し、自ユニットによる各処理の実行完了時点から、待ち時間Twが経過するまでに、自ユニットが実行完了した処理について、相手方のCPUユニットが実行を完了するかを判定する。 Each unit (particularly, the determination unit 170 of each unit) executes a synchronization check process after completion of each of the self-diagnosis process, the instruction execution process, and the I / O refresh process by the own unit. That is, the determination unit 170 refers to the common register 200, and executes the processing completed by the own unit by the partner CPU unit from the time when the execution of each processing by the own unit is completed to the time when the waiting time Tw elapses. Determine if it is complete.
 同期チェック処理は、二重化される相手方のCPUユニットの状態を互いに監視する処理である。具体的には、同期チェック処理は、自ユニットにおいて実行の完了した処理について、二重化される相手方のCPUユニットにおいても、その処理の実行を完了しているかを確認する(判定する)処理である。 The synchronization check process is a process of mutually monitoring the statuses of the CPU units of the other party to be duplicated. Specifically, the synchronization check process is a process of confirming (determining) whether or not the execution of the process has been completed in the CPU unit of the other party which has been completed in the own unit.
 同期チェック処理において、同期が確認できないと、つまり、自ユニットで実行完了した処理について、相手方のCPUユニットにおける実行完了が確認できないと、第1CPUユニット100Aと第2CPUユニット100Bとは二重化を解消する。そして、例えばACTに異常が発生したと判定したSTBは、ACTに代わって自ユニットが運転を継続する。 (4) In the synchronization check process, if synchronization cannot be confirmed, that is, if the completion of execution of the process completed by the own unit cannot be confirmed by the partner CPU unit, the duplication between the first CPU unit 100A and the second CPU unit 100B is eliminated. Then, for example, when the STB determines that an abnormality has occurred in the ACT, its own unit continues to operate instead of the ACT.
 同期チェック処理において同期が確認できると、各ユニット(特に、各ユニットの処理実行部120)は、「同期チェック処理において自ユニットおよび相手方のCPUユニットによる実行完了が確認できた処理」の次の処理の実行を開始する。同期チェック処理は、具体的には、以下に示すように実行される。 When the synchronization can be confirmed in the synchronization check processing, each unit (particularly, the processing execution unit 120 of each unit) performs the next processing after the “processing in which execution completion by the own unit and the other CPU unit has been confirmed in the synchronization check processing”. Start running. The synchronization check process is specifically executed as described below.
 すなわち、処理実行部120Aは、或る処理の実行を完了すると、共通レジスタ200の第1レジスタ210に、「自ユニット(つまり、処理実行部120A)が、或る処理の実行を完了した」旨を書き込む。判定部170Bは、第1レジスタ210を読み出すことで、第1CPUユニット100Aが或る処理の実行を完了したことを認識する。また、処理実行部120Bは、或る処理の実行を完了すると、共通レジスタ200の第2レジスタ220に、「自ユニット(つまり、処理実行部120B)が、或る処理の実行を完了した」旨を書き込む。判定部170Aは、第2レジスタ220を読み出すことで、第2CPUユニット100Bが或る処理の実行を完了したことを認識する。判定部170Aと判定部170Bとが各々、「相手方のCPUユニットによる、或る処理の実行完了」を認識したら、処理実行部120Aと処理実行部120Bとは各々、その或る処理の次の処理の実行を開始する。 That is, when completing the execution of a certain process, the process execution unit 120A stores, in the first register 210 of the common register 200, a message indicating that “the own unit (that is, the process execution unit 120A) has completed the execution of a certain process”. Write. By reading the first register 210, the determination unit 170B recognizes that the first CPU unit 100A has completed execution of a certain process. Further, when completing the execution of a certain process, the process execution unit 120B stores, in the second register 220 of the common register 200, a message indicating that “the own unit (that is, the process execution unit 120B) has completed the execution of a certain process”. Write. By reading the second register 220, the determination unit 170A recognizes that the second CPU unit 100B has completed execution of a certain process. When the determination unit 170A and the determination unit 170B each recognize "the completion of execution of a certain process by the partner CPU unit", the process execution unit 120A and the process execution unit 120B respectively perform the next process of the certain process. Start running.
 これまで説明してきた「第1CPUユニット100Aおよび第2CPUユニット100Bの各々が実行する処理」は、以下のように整理することができる。すなわち、「第1CPUユニット100Aおよび第2CPUユニット100Bの各々が実行する処理」は、PLC10(コントローラ)において二重化されるCPUユニットの制御方法であって、設定ステップと、判定ステップとを含んでいる。設定ステップは、自ユニットの性能Abmと、二重化される相手方のCPUユニットの性能Abyとの比を考慮して、待ち時間Twを設定する。判定ステップは、自ユニットにおける処理の実行完了時点から、設定ステップにて設定された待ち時間Twを経過するまでに、相手方のCPUユニットにおける前記処理の実行完了を確認できないと、相手方のCPUユニットに異常が発生したと判定する。 The “processing executed by each of the first CPU unit 100A and the second CPU unit 100B” described above can be summarized as follows. That is, “the processing executed by each of the first CPU unit 100A and the second CPU unit 100B” is a control method of a CPU unit that is duplicated in the PLC 10 (controller), and includes a setting step and a determination step. In the setting step, the waiting time Tw is set in consideration of the ratio between the performance Abm of the own unit and the performance Aby of the CPU unit to be duplicated. The determination step includes, when the completion of the processing in the partner CPU unit cannot be confirmed from the time when the execution of the processing in the own unit is completed to the time when the waiting time Tw set in the setting step elapses, to the partner CPU unit. It is determined that an abnormality has occurred.
 前記の方法によれば、前記制御方法は、自ユニットと相手方のCPUユニットとの性能Abの比を考慮して設定した待ち時間Twを利用して、自ユニットと相手方のCPUユニットとの同期(つまり、実行完了した処理の一致)を判定する。 According to the above method, the control method uses the waiting time Tw set in consideration of the ratio of the performance Ab between the own unit and the other party's CPU unit to synchronize the own unit and the other party's CPU unit ( That is, it is determined whether the processes have been completed.
 例えば、相手方のCPUユニットの方が自ユニットより性能Abが高い(つまり、処理の実行速度が早い)場合、前記制御方法は、待ち時間Twとして、予め決められた「通常の待ち時間Two」を設定する。また、相手方のCPUユニットと自ユニットとで性能Abが等しい場合、前記制御方法は、待ち時間Twとして、予め決められた「通常の待ち時間Two」を設定する。 For example, when the performance Ab of the other CPU unit is higher than that of the own CPU unit (that is, the execution speed of the process is faster), the control method sets a predetermined “normal waiting time Two” as the waiting time Tw. Set. When the performance Ab is equal between the other CPU unit and the own unit, the control method sets a predetermined “normal waiting time Two” as the waiting time Tw.
 相手方のCPUユニットの方が自ユニットより性能Abが高い場合、自ユニットが或る処理の実行を完了した時点では既に相手方のCPUユニットは前記或る処理の実行を完了しているはずである。また、相手方のCPUユニットと自ユニットとで性能Abが等しい場合、自ユニットが或る処理の実行を完了した時点で、相手方のCPUユニットは前記或る処理の実行を完了するはずである。 If the performance Ab of the other CPU unit is higher than that of the own unit, the other CPU unit should have already completed the execution of the certain process when the own unit completes the execution of a certain process. If the performance Ab is equal between the partner CPU unit and the own unit, the partner CPU unit should complete the execution of the certain process when the own unit completes the execution of a certain process.
 したがって、相手方のCPUユニットの方が自ユニットより性能Abが高い場合でも、第1CPUユニット100Aおよび第2CPUユニット100Bの各々は、待ち時間Twとして、通常の待ち時間Twoを設定することで、相手方のCPUユニットに異常が発生したか否かを正確に判定することができる。 Therefore, even when the performance of the other CPU unit is higher than that of the own CPU unit, each of the first CPU unit 100A and the second CPU unit 100B sets the normal waiting time Two as the waiting time Tw, thereby enabling the other CPU unit to set the normal waiting time Two. It is possible to accurately determine whether an abnormality has occurred in the CPU unit.
 例えば、相手方のCPUユニットの方が自ユニットより性能Abが低い(つまり、処理の実行速度が遅い)場合、前記制御方法は、待ち時間Twとして、「通常の待ち時間Twoに、性能Abの差を考慮した調整待ち時間Taを加えた期間」を設定する。具体的には、「自ユニットにおける前記処理の実行完了時点と、相手方のCPUユニットにおける前記処理の実行が完了すると予想される時点との差」を、調整待ち時間Taとする。 For example, when the performance Ab of the other CPU unit is lower than that of the own CPU unit (that is, the execution speed of the process is slower), the control method sets the waiting time Tw as “the difference between the performance Ab and the normal waiting time Two. Is set in consideration of the adjustment waiting time Ta. Specifically, the difference between the time when the execution of the process in the own unit is completed and the time when the execution of the process in the partner CPU unit is expected to be completed is defined as the adjustment waiting time Ta.
 相手方のCPUユニットの方が自ユニットより性能Abが低い場合、自ユニットが或る処理の実行を完了した時点では、相手方のCPUユニットは、未だ前記或る処理の実行を完了していない。そこで、前記制御方法は、「相手方のCPUユニットにおける前記処理の実行が完了すると予想される時点」まで待機し、その後、「通常の待ち時間Two」が経過するまでに相手方のCPUユニットにおける前記処理の実行完了を確認できるかを判定する。つまり、前記制御方法は、自ユニットにおける前記処理の実行完了時点から、「調整待ち時間Taを、通常の待ち時間Twoに加えた期間」が経過するまでに、相手方のCPUユニットにおける前記処理の実行完了を確認できるかを判定する。 If the performance Ab of the other CPU unit is lower than that of the own unit, the other CPU unit has not completed execution of the certain process at the time when the own unit has completed execution of a certain process. Therefore, the control method waits until “the time at which the execution of the processing in the partner CPU unit is expected to be completed”, and then the processing in the partner CPU unit until the “normal waiting time Two” elapses. It is determined whether the execution completion of can be confirmed. That is, in the control method, the execution of the process in the partner CPU unit is performed until the “period in which the adjustment wait time Ta is added to the normal wait time Two” from the completion of the execution of the process in the own unit. Determine whether completion can be confirmed.
 したがって、相手方のCPUユニットの方が自ユニットより性能Abが低い場合でも、前記制御方法は、待ち時間Twとして、「調整待ち時間Taを、通常の待ち時間Twoに加えた期間」を設定することで、前記の判定を正確に実行できる。 Therefore, even when the performance Ab of the partner CPU unit is lower than that of the own CPU unit, the control method sets the “period obtained by adding the adjustment waiting time Ta to the normal waiting time Two” as the waiting time Tw. Thus, the above determination can be accurately performed.
 以上の通り、前記制御方法は、自ユニットと相手方のCPUユニットとで性能Abが一致しない場合であっても、自ユニットと相手方のCPUユニットとの性能Abの違いを考慮した、適切な待ち時間Twを設定できるとの効果を奏する。すなわち、前記制御方法は、二重化される相手方のCPUユニットと自ユニットとの性能Abの違いを考慮して、不要な待ち時間Twを設けずに、同期チェック処理を正確に行なうことができるとの効果を奏する。 As described above, even when the performance Ab does not match between the own unit and the partner CPU unit, the control method can set an appropriate waiting time in consideration of the difference in the performance Ab between the own unit and the partner CPU unit. This has an effect that Tw can be set. That is, the control method can accurately perform the synchronization check processing without providing an unnecessary waiting time Tw in consideration of the difference in performance Ab between the CPU unit of the other party and the own unit to be duplicated. It works.
 〔実施形態2〕
 本発明の他の実施形態について、図4から図7に基づいて説明すれば、以下のとおりである。なお記載の簡潔性を担保するため、実施形態1とは異なる構成(処理の手順および処理の内容)のみについて説明する。すなわち、実施形態1で記載された構成等は、本実施形態にもすべて含まれ得る。また、実施形態1で記載した用語の定義も同じである。
[Embodiment 2]
The following will describe another embodiment of the present invention with reference to FIGS. In order to ensure the simplicity of the description, only the configuration (procedure of processing and contents of processing) different from the first embodiment will be described. That is, the configuration and the like described in the first embodiment can all be included in the present embodiment. The definitions of the terms described in the first embodiment are the same.
 実施形態1において、PLC10において二重化される第1CPUユニット100Aと第2CPUユニット100Bとが、自ユニットの「待ち時間Tw」を設定するのに用いた相手方のCPUユニットの性能Abyは1種類であった。 In the first embodiment, the performance Aby of the partner CPU unit used by the first CPU unit 100A and the second CPU unit 100B that are duplicated in the PLC 10 to set the “waiting time Tw” of the own unit is one type. .
 これに対し、本実施形態に係る、PLC20において二重化される第1CPUユニット300Aと第2CPUユニット300Bとが、自ユニットの「待ち時間Tw」を設定するのに用いる相手方のCPUユニットの性能Abyは複数である。以下、詳細を説明する。 On the other hand, the first CPU unit 300A and the second CPU unit 300B, which are duplicated in the PLC 20 according to the present embodiment, have a plurality of performance Aby of the partner CPU unit used for setting the “waiting time Tw” of the own unit. It is. Hereinafter, the details will be described.
 図5は、第1CPUユニット300Aおよび第2CPUユニット300Bの各々を実現するハードウェア構成の一例を示す図である。すなわち、第1CPUユニット300Aおよび第2CPUユニット300Bの各々は、メモリ410と、CPU420(マイコン)と、専用LSI(Large Scale Integration)430とを用いて実現される。専用LSIは、「ASIC(Application Specific Integrated Circuit)」とも呼ばれ、専用LSIの代わりに、FPGA(Field Programmable Gate Array)が用いられてもよい。 FIG. 5 is a diagram showing an example of a hardware configuration for realizing each of the first CPU unit 300A and the second CPU unit 300B. That is, each of the first CPU unit 300A and the second CPU unit 300B is realized using the memory 410, the CPU 420 (microcomputer), and the dedicated LSI (Large Scale Integration) 430. The dedicated LSI is also called “ASIC (Application Specific Integrated Circuit)”, and an FPGA (Field Programmable Gate Array) may be used instead of the dedicated LSI.
 第1CPUユニット300Aおよび第2CPUユニット300Bの各々は、第1CPUユニット100Aおよび第2CPUユニット100Bの各々と同様に、自己診断処理、命令実行処理、および、I/Oリフレッシュ処理を、この順に繰り返し実行する。例えば、自己診断処理は主にCPU420で実行され、命令実行処理は主に専用LSI430で実行され、I/Oリフレッシュ処理は主に専用LSI430を経由してCPU420で実行される。 Each of first CPU unit 300A and second CPU unit 300B repeatedly executes a self-diagnosis process, an instruction execution process, and an I / O refresh process in the same order as each of first CPU unit 100A and second CPU unit 100B. . For example, the self-diagnosis processing is mainly executed by the CPU 420, the instruction execution processing is mainly executed by the dedicated LSI 430, and the I / O refresh processing is mainly executed by the CPU 420 via the dedicated LSI 430.
 自己診断処理、命令実行処理、および、I/Oリフレッシュ処理の各々が主として実行されるハードウェアが異なる場合、各処理について、第1CPUユニット300Aと第2CPUユニット300Bとで性能Abが異なる場合がある。例えば、第1CPUユニット300AのCPU420は、第2CPUユニット300BのCPU420より性能Abが高く、第1CPUユニット300Aの専用LSI430は、第2CPUユニット300Bの専用LSI430より性能Abが低いことがあり得る。この場合、自己診断処理については、第1CPUユニット300Aの方が第2CPUユニット300Bより早く実行完了し、命令実行処理については、第1CPUユニット300Aの方が第2CPUユニット300Bより遅く実行完了する。 When the hardware mainly executing each of the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing is different, the performance Ab may be different between the first CPU unit 300A and the second CPU unit 300B for each processing. . For example, the CPU 420 of the first CPU unit 300A may have higher performance Ab than the CPU 420 of the second CPU unit 300B, and the dedicated LSI 430 of the first CPU unit 300A may have lower performance Ab than the dedicated LSI 430 of the second CPU unit 300B. In this case, the first CPU unit 300A completes the execution of the self-diagnosis processing earlier than the second CPU unit 300B, and the instruction execution processing of the first CPU unit 300A completes later than the second CPU unit 300B.
 そこで、第1CPUユニット300Aおよび第2CPUユニット300Bの各々は、繰り返し実行する自己診断処理、命令実行処理、および、I/Oリフレッシュ処理の各々について、自ユニットおよび相手方のCPUユニットの性能Abを把握する。そして、第1CPUユニット300Aおよび第2CPUユニット300Bの各々は、各処理に係る自ユニットおよび相手方のCPUユニットの性能Abを用いて、各処理についての同期チェック処理の際の「待ち時間Tw」を設定する。以下、詳細を説明する。 Therefore, each of the first CPU unit 300A and the second CPU unit 300B grasps the performance Ab of its own unit and the partner CPU unit for each of the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing that are repeatedly executed. . Each of the first CPU unit 300A and the second CPU unit 300B sets the “waiting time Tw” at the time of the synchronization check process for each process, using the performance Ab of the own unit and the partner CPU unit related to each process. I do. Hereinafter, the details will be described.
 (CPUユニットの詳細)
 図4は、第1CPUユニット300Aおよび第2CPUユニット300Bを含むPLC20の要部構成を示すブロック図である。PLC20は、PLC10と同様に、電源ユニット、入力ユニット、出力ユニット、および、通信ユニット等の不図示の機能ユニットを含んでいてもよい。
(Details of CPU unit)
FIG. 4 is a block diagram showing a main configuration of PLC 20 including first CPU unit 300A and second CPU unit 300B. Like the PLC 10, the PLC 20 may include a power supply unit, an input unit, an output unit, and a functional unit (not shown) such as a communication unit.
 第1CPUユニット300Aおよび第2CPUユニット300Bの各々は、第1CPUユニット100Aおよび第2CPUユニット100Bの各々と同様に、PLC10全体の制御を統括する機能ユニットである。第1CPUユニット300Aと第2CPUユニット300Bとは、PLC20において二重化される。すなわち、第1CPUユニット300Aと第2CPUユニット300Bとは、一方が実行系のCPUユニット(ACT)となり、他方が待機系のCPUユニット(STB)となって、互いに相手の状態を監視する。同期チェック処理においてACTに異常が発生したと判定すると、STBは、それまでACTであったCPUユニットに代わって自ユニットがACTへと切り替わって、運転を継続する。本実施形態においては、「第1CPUユニット300AがACTであり、第2CPUユニット300BがSTBである」例を説明するが、「第1CPUユニット300AがSTBであり、第2CPUユニット300BがACTである」場合も同様である。 Each of the first CPU unit 300A and the second CPU unit 300B is a functional unit that controls the entire control of the PLC 10, like the first CPU unit 100A and the second CPU unit 100B. The first CPU unit 300A and the second CPU unit 300B are duplicated in the PLC 20. That is, one of the first CPU unit 300A and the second CPU unit 300B serves as an active CPU unit (ACT), and the other serves as a standby CPU unit (STB), and monitors the state of each other. If the STB determines that an abnormality has occurred in the ACT during the synchronization check processing, the STB switches its own unit to the ACT instead of the CPU unit that has been the ACT, and continues operation. In the present embodiment, an example in which “the first CPU unit 300A is ACT and the second CPU unit 300B is STB” will be described, but “the first CPU unit 300A is STB and the second CPU unit 300B is ACT”. The same applies to the case.
 図4に示すように、PLC20は、PLC20において二重化される第1CPUユニット300Aと第2CPUユニット300Bとに加え、両者が各々、書込および読込を実行することのできる共通レジスタ200を備えている。共通レジスタ200については既に説明しているので、ここでは詳細は略記する。 As shown in FIG. 4, the PLC 20 includes, in addition to the first CPU unit 300A and the second CPU unit 300B that are duplicated in the PLC 20, a common register 200 that can execute writing and reading. Since the common register 200 has already been described, the details will be omitted here.
 記載の簡潔性を担保するため、本実施の形態に直接関係のない構成は、説明およびブロック図から省略している。ただし、実施の実情に則して、PLC10は、当該省略された構成を備えてもよい。 (4) In order to ensure the simplicity of the description, components not directly related to the present embodiment are omitted from the description and the block diagram. However, the PLC 10 may have the omitted configuration in accordance with the actual situation of implementation.
 第1CPUユニット300Aは、記憶部330Aに加えて、機能ブロックとして、能力取得部310A、処理実行部120A、待ち時間設定部360A、および、判定部370Aを備えている。記憶部330Aは、他機能力テーブル340Aおよび自機能力テーブル350Aを格納している。 The first CPU unit 300A includes a capability acquisition unit 310A, a process execution unit 120A, a waiting time setting unit 360A, and a determination unit 370A as functional blocks in addition to the storage unit 330A. The storage unit 330A stores the other function table 340A and the own function table 350A.
 待ち時間設定部360Aは、第1待ち時間設定部361A、第2待ち時間設定部362A、第3待ち時間設定部363Aを含み、判定部370Aは、第1判定部371A、第2判定部372A、第3判定部373Aを含む。他機能力テーブル340Aは、第1他機能力テーブル341A、第2他機能力テーブル342A、第3他機能力テーブル343Aを含む。自機能力テーブル350Aは、第1自機能力テーブル351A、第2自機能力テーブル352A、第3自機能力テーブル353Aを含む。 The waiting time setting unit 360A includes a first waiting time setting unit 361A, a second waiting time setting unit 362A, and a third waiting time setting unit 363A, and the determining unit 370A includes a first determining unit 371A, a second determining unit 372A, A third determination unit 373A is included. The other function table 340A includes a first other function table 341A, a second other function table 342A, and a third other function table 343A. The own function table 350A includes a first function table 351A, a second function table 352A, and a third function table 353A.
 第2CPUユニット300Bは、記憶部330Bに加えて、機能ブロックとして、能力取得部310B、処理実行部120B、待ち時間設定部360B、および、判定部370Bを備えている。記憶部330Bは、他機能力テーブル340Bおよび自機能力テーブル350Bを格納している。 The second CPU unit 300B includes a capability acquisition unit 310B, a process execution unit 120B, a waiting time setting unit 360B, and a determination unit 370B as functional blocks in addition to the storage unit 330B. The storage unit 330B stores the other function table 340B and the own function table 350B.
 待ち時間設定部360Bは、第1待ち時間設定部361B、第2待ち時間設定部362B、第3待ち時間設定部363Bを含み、判定部370Bは、第1判定部371B、第2判定部372B、第3判定部373Bを含む。他機能力テーブル340Bは、第1他機能力テーブル341B、第2他機能力テーブル342B、第3他機能力テーブル343Bを含む。自機能力テーブル350Bは、第1自機能力テーブル351B、第2自機能力テーブル352B、第3自機能力テーブル353Bを含む。 The waiting time setting unit 360B includes a first waiting time setting unit 361B, a second waiting time setting unit 362B, and a third waiting time setting unit 363B, and the determining unit 370B includes a first determining unit 371B, a second determining unit 372B, A third determination unit 373B is included. The other function table 340B includes a first other function table 341B, a second other function table 342B, and a third other function table 343B. The own function table 350B includes a first function table 351B, a second function table 352B, and a third function table 353B.
 実施形態1における第1CPUユニット100Aおよび第2CPUユニット100Bと同様、図4に示す第1CPUユニット300Aおよび第2CPUユニット300Bは、互いに同様の構成を備えている。第1CPUユニット300Aおよび第2CPUユニット300Bの各々が共通して備える構成を特に区別する必要がある場合、第1CPUユニット300Aの構成である場合には「A」を、第2CPUユニット300Bの構成である場合には「B」を付す。第1CPUユニット300Aおよび第2CPUユニット300Bの各々が共通して備える構成について、どちらが備える構成であるかを特に区別する必要がない場合、「A」または「B」の添え字は略記する。 4 Similarly to the first CPU unit 100A and the second CPU unit 100B in the first embodiment, the first CPU unit 300A and the second CPU unit 300B shown in FIG. 4 have the same configuration. When it is necessary to particularly distinguish the configuration commonly provided by each of the first CPU unit 300A and the second CPU unit 300B, "A" is used for the configuration of the first CPU unit 300A, and the configuration of the second CPU unit 300B. In this case, “B” is added. When there is no particular need to distinguish which of the configurations the first CPU unit 300A and the second CPU unit 300B have in common, the suffix “A” or “B” is abbreviated.
 能力取得部310、処理実行部120、待ち時間設定部360、および、判定部370等の各機能ブロックは、例えば、CPU(central processing unit)等が、ROM(read only memory)、NVRAM(non-Volatile random access memory)等で実現された記憶装置(記憶部330)に記憶されているプログラムを不図示のRAM(random access memory)等に読み出して実行することで実現できる。 The functional blocks of the capability acquisition unit 310, the processing execution unit 120, the waiting time setting unit 360, the determination unit 370, and the like include, for example, a CPU (central processing unit), a ROM (read only memory), an NVRAM (non- This can be realized by reading a program stored in a storage device (storage unit 330) realized by Volatile (random access memory) or the like into a RAM (random access memory) (not shown) and executing the program.
  (機能ブロックの詳細)
 能力取得部310は、処理実行部120によって繰り返し実行される自己診断処理、命令実行処理、および、I/Oリフレッシュ処理の各々に係る、二重化される相手方のCPUユニットの性能Aby(処理能力)を示す情報(「性能情報」)を取得する。具体的には、能力取得部310は、自己診断処理、命令実行処理、および、I/Oリフレッシュ処理の各々に係る相手方のCPUユニットの性能情報を、相手方のCPUユニットの自機能力テーブル350を参照して取得する。能力取得部310は、取得した「自己診断処理、命令実行処理、および、I/Oリフレッシュ処理の各々に係る、相手方のCPUユニットの性能情報(他機性能情報)」を、自ユニットの他機能力テーブル340に格納する。
(Details of functional blocks)
The capability acquisition unit 310 calculates the performance Aby (processing capability) of the duplicated CPU unit in each of the self-diagnosis process, the instruction execution process, and the I / O refresh process repeatedly executed by the process execution unit 120. Information ("performance information"). Specifically, the capability acquisition unit 310 stores the performance information of the partner CPU unit relating to each of the self-diagnosis process, the instruction execution process, and the I / O refresh process in the self-functionality table 350 of the partner CPU unit. Get by reference. The capability acquisition unit 310 transmits the acquired “performance information (other device performance information) of the partner CPU unit related to each of the self-diagnosis process, the instruction execution process, and the I / O refresh process” to another function of the own unit. Stored in the force table 340.
 特に、能力取得部310は、処理実行部120が自己診断処理、命令実行処理、および、I/Oリフレッシュ処理を、この順で繰り返し実行する前に1回、図6に例示する「二重化処理」において、各処理に係る他機性能情報を取得する。 In particular, the capability acquisition unit 310 performs the “duplication process” illustrated in FIG. 6 once before the process execution unit 120 repeatedly executes the self-diagnosis process, the instruction execution process, and the I / O refresh process in this order. In, the other device performance information related to each process is acquired.
 能力取得部310は、二重化される相手方のCPUユニットの第1自機能力テーブル351を参照し、「自己診断処理に係る、二重化される相手方のCPUユニットの性能Abyを示す性能情報(自己診断用他機性能情報)」を取得する。能力取得部310は、取得した自己診断用他機性能情報を、自ユニットの第1他機能力テーブル341に格納する。 The capability acquisition unit 310 refers to the first self-functionality table 351 of the CPU unit of the other party to be duplicated, and refers to the performance information indicating the performance Aby of the CPU unit of the other party to be duplicated in the self-diagnosis processing (for self-diagnosis). Other device performance information) ". The capability acquiring unit 310 stores the acquired other device performance information for self-diagnosis in the first other function capability table 341 of the unit.
 能力取得部310は、二重化される相手方のCPUユニットの第2自機能力テーブル352を参照し、「命令実行処理に係る、二重化される相手方のCPUユニットの性能Abyを示す性能情報(命令実行用他機性能情報)」を取得する。能力取得部310は、取得した命令実行用他機性能情報を、自ユニットの第2他機能力テーブル342に格納する。 The capability acquisition unit 310 refers to the second self-functionality table 352 of the partner CPU unit to be duplicated and refers to “performance information indicating the performance Aby of the duplicated partner CPU unit related to the instruction execution process (for instruction execution). Other device performance information) ". The capability acquiring unit 310 stores the acquired instruction execution other device performance information in the second other function capability table 342 of the own unit.
 能力取得部310は、二重化される相手方のCPUユニットの第3自機能力テーブル353を参照し、「I/Oリフレッシュ処理に係る、二重化される相手方のCPUユニットの性能Abyを示す性能情報(I/Oリフレッシュ用他機性能情報)」を取得する。能力取得部310は、取得したI/Oリフレッシュ用他機性能情報を、自ユニットの第3他機能力テーブル343に格納する。 The capability acquiring unit 310 refers to the third self-functionality table 353 of the CPU unit of the other party to be duplicated, and reads the performance information (I relating to the I / O refresh processing indicating the performance Aby of the CPU unit of the other party to be duplicated. / O refresh other device performance information) ". The capability acquiring unit 310 stores the acquired other device performance information for I / O refresh in the third other function capability table 343 of the unit.
 図7は、「二重化処理」において1回実行される、「二重化される相手方のCPUユニットの性能Abyを示す性能情報を取得する」処理の具体例を説明する図である。図7に示すように、能力取得部310Aは、「自己診断処理に係る、第2CPUユニット300Bの性能Abyを示す性能情報(自己診断用他機性能情報)」を、第2CPUユニット300Bの第1自機能力テーブル351Bを参照して取得する。能力取得部310Aは、取得した自己診断用他機性能情報を、自ユニットの第1他機能力テーブル341Aに格納する。 FIG. 7 is a diagram illustrating a specific example of the process of “acquiring performance information indicating the performance Aby of the CPU unit of the other party to be duplexed” executed once in the “duplexing process”. As illustrated in FIG. 7, the capability acquisition unit 310A stores “performance information indicating the performance Aby of the second CPU unit 300B related to the self-diagnosis processing (self-diagnosis other device performance information)” in the first CPU unit 300B. It is acquired with reference to the own function table 351B. The capability acquisition unit 310A stores the acquired self-diagnosis other-device performance information in the first other-function capability table 341A of the own unit.
 能力取得部310Bは、「自己診断処理に係る、第1CPUユニット300Aの性能Abyを示す性能情報(自己診断用他機性能情報)」を、第1CPUユニット300Aの第1自機能力テーブル351Aを参照して取得する。能力取得部310Bは、取得した自己診断用他機性能情報を、自ユニットの第1他機能力テーブル341Bに格納する。 The ability acquisition unit 310B refers to “performance information indicating the performance Aby of the first CPU unit 300A relating to the self-diagnosis processing (other-machine performance information for self-diagnosis)” and the first self-function capability table 351A of the first CPU unit 300A. And get. The capability acquiring unit 310B stores the acquired self-diagnosis other-device performance information in the first other-function capability table 341B of the own unit.
 能力取得部310Aは、「命令実行処理に係る、第2CPUユニット300Bの性能Abyを示す性能情報(命令実行用他機性能情報)」を、第2CPUユニット300Bの第2自機能力テーブル352Bを参照して取得する。能力取得部310Aは、取得した命令実行用他機性能情報を、自ユニットの第2他機能力テーブル342Aに格納する。 The capability acquisition unit 310A refers to “performance information indicating the performance Aby of the second CPU unit 300B related to the instruction execution process (instruction execution other device performance information)” and the second own function table 352B of the second CPU unit 300B. And get. The capability acquiring unit 310A stores the acquired instruction execution other device performance information in the second other function capability table 342A of the own unit.
 能力取得部310Bは、「命令実行処理に係る、第1CPUユニット300Aの性能Abyを示す性能情報(命令実行用他機性能情報)」を、第1CPUユニット300Aの第2自機能力テーブル352Aを参照して取得する。能力取得部310Bは、取得した命令実行用他機性能情報を、自ユニットの第2他機能力テーブル342Bに格納する。 The capability acquisition unit 310B refers to “performance information indicating the performance Aby of the first CPU unit 300A related to the instruction execution process (performance information of other device for instruction execution)” and the second own function table 352A of the first CPU unit 300A. And get. The capability acquiring unit 310B stores the acquired instruction execution other device performance information in the second other function capability table 342B of the own unit.
 能力取得部310Aは、「I/Oリフレッシュ処理に係る、第2CPUユニット300Bの性能Abyを示す性能情報(I/Oリフレッシュ処理用他機性能情報)」を、第2CPUユニット300Bの第3自機能力テーブル353Bを参照して取得する。能力取得部310Aは、取得したI/Oリフレッシュ処理用他機性能情報を、自ユニットの第3他機能力テーブル343Aに格納する。 The capability acquisition unit 310A stores the “performance information indicating the performance Aby of the second CPU unit 300B related to the I / O refresh process (the performance information of the other device for the I / O refresh process)” in the third function of the second CPU unit 300B. It is acquired with reference to the force table 353B. The capability acquiring unit 310A stores the acquired other device performance information for I / O refresh processing in the third other function capability table 343A of the own unit.
 能力取得部310Bは、「I/Oリフレッシュ処理に係る、第1CPUユニット300Aの性能Abyを示す性能情報(I/Oリフレッシュ処理用他機性能情報)」を、第1CPUユニット300Aの第3自機能力テーブル353Aを参照して取得する。能力取得部310Bは、取得したI/Oリフレッシュ処理用他機性能情報を、自ユニットの第3他機能力テーブル343Bに格納する。 The capability acquisition unit 310B stores the “performance information indicating the performance Aby of the first CPU unit 300A related to the I / O refresh process (I / O refresh process other device performance information)” in the third self-function of the first CPU unit 300A. It is acquired with reference to the force table 353A. The capability acquiring unit 310B stores the acquired other device performance information for I / O refresh processing in the third other function capability table 343B of its own unit.
 処理実行部120は、実施形態1で説明したように、自己診断処理、命令実行処理、および、I/Oリフレッシュ処理を、この順で繰り返し実行し、各処理の実行を完了すると、「自ユニットが各処理の実行を完了した」旨を、共通レジスタ200に書き込む。 As described in the first embodiment, the process execution unit 120 repeatedly executes the self-diagnosis process, the instruction execution process, and the I / O refresh process in this order. Has completed execution of each process "in the common register 200.
 また、処理実行部120は、各処理の実行を完了すると、「自ユニットが各処理の実行を完了した」旨を、待ち時間設定部360および判定部370に通知する。処理実行部120は、待ち時間設定部360に、「自ユニットが各処理の実行を完了した」旨と共に、「各処理の実行時間(各処理について、実行開始から実行完了までの時間)」を通知してもよい。すなわち、処理実行部120は、内部タイマを用いて「各処理の実行時間」を計時し、計時した「各処理の実行時間」を待ち時間設定部360に通知してもよい。 When the execution of each process is completed, the process execution unit 120 notifies the waiting time setting unit 360 and the determination unit 370 that “the unit has completed the execution of each process”. The process execution unit 120 sets the “execution time of each process (the time from the start of execution to the completion of execution for each process)” in the waiting time setting unit 360 together with “the unit has completed execution of each process” in the waiting time setting unit 360. You may be notified. That is, the process execution unit 120 may measure the “execution time of each process” using the internal timer, and notify the waiting time setting unit 360 of the measured “execution time of each process”.
 待ち時間設定部360は、他機能力テーブル340を参照して他機性能情報を取得し、自機能力テーブル350を参照して自機性能情報を取得する。また、待ち時間設定部360は、処理実行部120から、「自ユニットが各処理の実行を完了した」旨を取得する。待ち時間設定部360は、「自ユニットが各処理の実行を完了した」旨を取得する前に処理実行部120から取得していた「自ユニットが各処理の実行を開始した」旨と併せて、各処理の実行時間を演算する。すなわち、待ち時間設定部360は、内部タイマにより計時した「自ユニットが各処理の実行を開始した」時刻と、内部タイマにより計時した「自ユニットが各処理の実行を完了した」時刻とから、各処理の実行時間を演算する。なお、各処理の実行時間は、処理実行部120が内部タイマを用いて計時し、処理実行部120から待ち時間設定部360へと通知されてもよい。 The waiting time setting unit 360 acquires the other device performance information by referring to the other function capability table 340, and acquires the own device performance information by referring to the own function capability table 350. Further, the waiting time setting unit 360 acquires from the processing executing unit 120 that “the unit has completed execution of each processing”. The waiting time setting unit 360 adds the message “the own unit has started executing each process” acquired from the process execution unit 120 before acquiring the message “the own unit has completed execution of each process”. , Calculate the execution time of each process. That is, the waiting time setting unit 360 calculates the time “the own unit has started execution of each process” measured by the internal timer and the time “the own unit has completed execution of each process” measured by the internal timer. The execution time of each process is calculated. The execution time of each process may be measured by the process execution unit 120 using an internal timer, and notified from the process execution unit 120 to the waiting time setting unit 360.
 待ち時間設定部360は、取得した他機性能情報、自機性能情報、および、各処理の実行時間から、各処理についての同期チェック処理のための「待ち時間Tw」を算出し、算出した待ち時間Twを、判定部370へ通知する。具体的には、待ち時間設定部360は、他機性能情報、自機性能情報、および、各処理の実行時間を用いて、以下のように、各処理についての同期チェック処理のための「待ち時間Tw」を算出する。 The waiting time setting unit 360 calculates a “waiting time Tw” for a synchronization check process for each process from the acquired other device performance information, own device performance information, and the execution time of each process, and calculates the calculated waiting time. The determination unit 370 is notified of the time Tw. Specifically, the waiting time setting unit 360 uses the other device performance information, the own device performance information, and the execution time of each process to execute the “waiting” for the synchronization check process for each process as follows. Time Tw ”is calculated.
 すなわち、他機性能情報に示される「二重化される相手方のCPUユニットの性能Aby」が、自機性能情報に示される「自ユニットの性能Abm」より高い場合、待ち時間設定部360は、「通常の待ち時間Two」を「待ち時間Tw」とする。二重化される相手方のCPUユニットの性能Abyと自ユニットの性能Abmとが等しい場合、待ち時間設定部360は、「通常の待ち時間Two」を「待ち時間Tw」とする。 That is, when the “performance Aby of the CPU unit of the other party to be duplicated” indicated in the performance information of the other device is higher than the “performance Abm of the own unit” indicated in the performance information of the own device, the waiting time setting unit 360 sets the “normal Waiting time Two ”is referred to as“ waiting time Tw ”. When the performance Aby of the CPU unit of the other party to be duplicated is equal to the performance Abm of the own unit, the waiting time setting unit 360 sets the “normal waiting time Two” to the “waiting time Tw”.
 「通常の待ち時間Two」は、予め長さの決められている、第1CPUユニット300Aと第2CPUユニット300Bとで共通の期間であり、例えば、各ユニットの工場出荷時に設定され、ユーザによって更新可能な期間である。「通常の待ち時間Two」は、第1CPUユニット300Aと第2CPUユニット300Bとで性能Ab(特に、自己診断処理、命令実行処理、および、I/Oリフレッシュ処理の各々に係る性能Ab)が等しいとの前提で設定される期間である。 The “normal waiting time Two” is a period common to the first CPU unit 300A and the second CPU unit 300B whose length is determined in advance, and is set, for example, at the time of factory shipment of each unit and can be updated by the user. Period. The “normal waiting time Two” is that the performance Ab (particularly, the performance Ab related to each of the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing) is equal between the first CPU unit 300A and the second CPU unit 300B. Is a period set based on the assumption of
 二重化される相手方のCPUユニットの性能Abyが自ユニットの性能Abmより低い場合、待ち時間設定部360は、自ユニットの性能Abmを相手方のCPUユニットの性能Abyで除した値に、各処理の実行時間を乗じた期間を、「調整待ち時間Ta」とする。二重化される相手方のCPUユニットの性能Abyが自ユニットの性能Abmより低い場合、待ち時間設定部360は、「通常の待ち時間Twoに調整待ち時間Taを加えた期間(つまり、「通常の待ち時間Two+調整待ち時間Ta」)」を「待ち時間Tw」とする。 If the performance Aby of the partner CPU unit to be duplexed is lower than the performance Abm of the own unit, the waiting time setting unit 360 executes each process by dividing the performance Abm of the own unit by the performance Aby of the partner CPU unit. The period multiplied by the time is referred to as “adjustment waiting time Ta”. When the performance Aby of the CPU unit of the other party to be duplicated is lower than the performance Abm of the own unit, the waiting time setting unit 360 sets the “period obtained by adding the adjustment waiting time Ta to the normal waiting time Two (that is,“ the normal waiting time Two + adjustment waiting time Ta ”)” is referred to as “waiting time Tw”.
 <「自己診断処理」に係る同期チェック処理のための「待ち時間」>「自己診断処理」に係る同期チェック処理のための「待ち時間Tw」は、第1待ち時間設定部361によって設定される。 <“Wait time” for synchronization check processing related to “self-diagnosis processing”> “Wait time Tw” for synchronization check processing related to “self-diagnosis processing” is set by the first waiting time setting unit 361. .
 第1待ち時間設定部361は、第1他機能力テーブル341を参照して自己診断用他機性能情報を取得し、第1自機能力テーブル351を参照して自己診断用自機性能情報を取得する。また、第1待ち時間設定部361は、処理実行部120からの、「自ユニットが自己診断処理の実行を開始した」旨、および、「自ユニットが自己診断処理の実行を完了した」旨の通知から、自己診断処理の実行時間を演算する。 The first waiting time setting unit 361 acquires the self-diagnosis other-device performance information by referring to the first other-function capability table 341, and refers to the first self-function capability table 351 to acquire the self-diagnosis own-device performance information. get. Further, the first waiting time setting unit 361 sends a message from the processing execution unit 120 indicating that “the own unit has started executing the self-diagnosis process” and that “the own unit has completed execution of the self-diagnosis process”. The execution time of the self-diagnosis processing is calculated from the notification.
 第1待ち時間設定部361は、取得した自己診断用他機性能情報および自己診断用自機性能情報と、演算して求めた「自己診断処理の実行時間」とから、自己診断処理についての同期チェック処理のための「待ち時間Tw」を算出する。 The first waiting time setting unit 361 synchronizes the self-diagnosis process with the acquired self-diagnosis other-device performance information and self-diagnosis self-device performance information and the “execution time of the self-diagnosis process” calculated. The “waiting time Tw” for the check processing is calculated.
 具体的には、第1待ち時間設定部361は、「自己診断処理に係る、自ユニットの性能Abm」と、「自己診断処理に係る、二重化される相手方のCPUユニットの性能Aby」との比を考慮して、「自己診断処理に係る、調整待ち時間Ta」を算出する。そして、第1待ち時間設定部361は、算出した「自己診断処理に係る、調整待ち時間Ta」を、「自己診断処理に係る、通常の待ち時間Two」に追加した期間を、自己診断処理についての同期チェック処理のための「待ち時間Tw」として設定する。「Abm/Aby」が「1」以下である場合、第1待ち時間設定部361は、「自己診断処理に係る、調整待ち時間Ta」を「0」とする。「Abm/Aby」が「1」より大きい場合、第1待ち時間設定部361は、「自己診断処理に係る、調整待ち時間Ta」を、「自ユニットの自己診断処理の実行時間に、『Abm/Aby』を乗じた値」とする。 Specifically, the first waiting time setting unit 361 determines the ratio of “the performance Abm of the own unit related to the self-diagnosis processing” to “the performance Aby of the duplicated CPU unit related to the self-diagnosis processing”. Is calculated, the “adjustment waiting time Ta related to the self-diagnosis processing” is calculated. Then, the first waiting time setting unit 361 sets a period in which the calculated “adjustment waiting time Ta related to the self-diagnosis processing” is added to the “normal waiting time Two related to the self-diagnosis processing” for the self-diagnosis processing. Is set as the “waiting time Tw” for the synchronization check processing of the above. When “Abm / Aby” is equal to or less than “1”, the first waiting time setting unit 361 sets “adjustment waiting time Ta related to the self-diagnosis processing” to “0”. When “Abm / Aby” is greater than “1”, the first waiting time setting unit 361 sets “adjustment waiting time Ta related to the self-diagnosis processing” to “Abm / Aby” as the execution time of the self-diagnosis processing of the own unit. / Aby ”).
 第1待ち時間設定部361は、上述の方法により算出した「自己診断処理についての同期チェック処理のための『待ち時間Tw』」を、判定部370へ通知する。 The first waiting time setting unit 361 notifies the determining unit 370 of the “waiting time Tw for the synchronization check process for the self-diagnosis process” calculated by the above method.
 <「命令実行処理」に係る同期チェック処理のための「待ち時間」>「命令実行処理」に係る同期チェック処理のための「待ち時間Tw」は、第2待ち時間設定部362によって設定される。 <“Wait time” for synchronization check processing related to “instruction execution processing”> “Wait time Tw” for synchronization check processing related to “instruction execution processing” is set by the second waiting time setting unit 362. .
 第2待ち時間設定部362は、第2他機能力テーブル342を参照して命令実行用他機性能情報を取得し、第2自機能力テーブル352を参照して命令実行用自機性能情報を取得する。また、第2待ち時間設定部362は、処理実行部120からの、「自ユニットが命令実行処理の実行を開始した」旨、および、「自ユニットが命令実行処理の実行を完了した」旨の通知から、命令実行処理の実行時間を演算する。 The second waiting time setting unit 362 acquires the instruction execution other device performance information by referring to the second other function table 342, and refers to the second own function table 352 to acquire the instruction execution own device performance information. get. In addition, the second waiting time setting unit 362 receives a message from the processing execution unit 120 indicating that “the own unit has started execution of the instruction execution process” and that “the own unit has completed execution of the instruction execution process”. From the notification, the execution time of the instruction execution processing is calculated.
 第2待ち時間設定部362は、取得した命令実行用他機性能情報および命令実行用自機性能情報と、演算して求めた「命令実行処理の実行時間」とから、命令実行処理についての同期チェック処理のための「待ち時間Tw」を算出する。 The second waiting time setting unit 362 synchronizes the instruction execution process with the acquired instruction execution other device performance information and the instruction execution own device performance information, and the “execution time of the instruction execution process” calculated. The “waiting time Tw” for the check processing is calculated.
 具体的には、第2待ち時間設定部362は、「命令実行処理に係る、自ユニットの性能Abm」と、「命令実行処理に係る、二重化される相手方のCPUユニットの性能Aby」との比を考慮して、「命令実行処理に係る、調整待ち時間Ta」を算出する。そして、第2待ち時間設定部362は、算出した「命令実行処理に係る、調整待ち時間Ta」を、「命令実行処理に係る、通常の待ち時間Two」に追加した期間を、命令実行処理についての同期チェック処理のための「待ち時間Tw」として設定する。「Abm/Aby」が「1」以下である場合、第2待ち時間設定部362は、「命令実行処理に係る、調整待ち時間Ta」を「0」とする。「Abm/Aby」が「1」より大きい場合、第2待ち時間設定部362は、「命令実行処理に係る、調整待ち時間Ta」を、「自ユニットの命令実行処理の実行時間に、『Abm/Aby』を乗じた値」とする。 Specifically, the second waiting time setting unit 362 calculates the ratio of “the performance Abm of the own unit related to the instruction execution process” to “the performance Aby of the other CPU unit to be duplicated related to the instruction execution process”. Is calculated, the “adjustment waiting time Ta related to the instruction execution process” is calculated. Then, the second waiting time setting unit 362 sets a period in which the calculated “adjustment waiting time Ta related to the instruction execution processing” is added to the “normal waiting time Two related to the instruction execution processing” for the instruction execution processing. Is set as the “waiting time Tw” for the synchronization check processing of the above. When “Abm / Aby” is equal to or less than “1”, the second waiting time setting unit 362 sets “adjustment waiting time Ta related to the instruction execution process” to “0”. When “Abm / Aby” is greater than “1”, the second waiting time setting unit 362 sets “adjustment waiting time Ta related to the instruction execution processing” to “Abm / Aby” as “the execution time of the instruction execution processing of the own unit”. / Aby ”).
 第1待ち時間設定部361は、上述の方法により算出した「命令実行処理についての同期チェック処理のための『待ち時間Tw』」を、判定部370へ通知する。 The first wait time setting unit 361 notifies the determination unit 370 of the “wait time Tw for the synchronization check process for the instruction execution process” calculated by the above method.
 <「I/Oリフレッシュ処理」に係る同期チェック処理のための「待ち時間」>「I/Oリフレッシュ処理」に係る同期チェック処理のための「待ち時間Tw」は、第3待ち時間設定部363によって設定される。 <“Wait time” for synchronization check processing related to “I / O refresh processing”> “Wait time Tw” for synchronization check processing related to “I / O refresh processing” is the third wait time setting unit 363 Is set by
 第3待ち時間設定部363は、第3他機能力テーブル343を参照してI/Oリフレッシュ用他機性能情報を取得し、第3自機能力テーブル353を参照してI/Oリフレッシュ用自機性能情報を取得する。また、第3待ち時間設定部363は、処理実行部120からの、「自ユニットがI/Oリフレッシュ処理の実行を開始した」旨、および、「自ユニットがI/Oリフレッシュ処理の実行を完了した」旨の通知から、I/Oリフレッシュ処理の実行時間を演算する。 The third waiting time setting unit 363 acquires the other device performance information for I / O refresh with reference to the third other function table 343, and refers to the third own function table 353 to acquire the I / O refresh self-function. Get machine performance information. Further, the third waiting time setting unit 363 sends a message from the processing execution unit 120 stating that “the own unit has started executing the I / O refresh processing” and “the own unit has completed the execution of the I / O refresh processing”. Then, the execution time of the I / O refresh processing is calculated from the notification that "I did".
 第3待ち時間設定部363は、取得したI/Oリフレッシュ用他機性能情報およびI/Oリフレッシュ用自機性能情報と、演算して求めた「I/Oリフレッシュ処理の実行時間」とから、I/Oリフレッシュ処理についての同期チェック処理のための「待ち時間Tw」を算出する。 The third waiting time setting unit 363 calculates the I / O refresh other device performance information, the I / O refresh own device performance information, and the calculated “I / O refresh processing execution time”. The “waiting time Tw” for the synchronization check processing for the I / O refresh processing is calculated.
 具体的には、第3待ち時間設定部363は、「I/Oリフレッシュ処理に係る、自ユニットの性能Abm」と、「I/Oリフレッシュ処理に係る、二重化される相手方のCPUユニットの性能Aby」との比を考慮して、「I/Oリフレッシュ処理に係る、調整待ち時間Ta」を算出する。そして、第3待ち時間設定部363は、算出した「I/Oリフレッシュ処理に係る、調整待ち時間Ta」を、「I/Oリフレッシュ処理に係る、通常の待ち時間Two」に追加した期間を、I/Oリフレッシュ処理についての同期チェック処理のための「待ち時間Tw」として設定する。「Abm/Aby」が「1」以下である場合、第3待ち時間設定部363は、「I/Oリフレッシュ処理に係る、調整待ち時間Ta」を「0」とする。「Abm/Aby」が「1」より大きい場合、第3待ち時間設定部363は、「I/Oリフレッシュ処理に係る、調整待ち時間Ta」を、「自ユニットのI/Oリフレッシュ処理の実行時間に、『Abm/Aby』を乗じた値」とする。 Specifically, the third waiting time setting unit 363 includes “the performance Abm of the own unit related to the I / O refresh processing” and “the performance Aby of the other CPU unit to be duplexed related to the I / O refresh processing”. , The "adjustment wait time Ta related to the I / O refresh processing" is calculated. Then, the third waiting time setting unit 363 adds a period in which the calculated “adjustment waiting time Ta related to the I / O refresh processing” is added to the “normal waiting time Two related to the I / O refresh processing”, This is set as a "waiting time Tw" for the synchronization check processing for the I / O refresh processing. When “Abm / Aby” is equal to or less than “1”, the third waiting time setting unit 363 sets “adjustment waiting time Ta related to I / O refresh processing” to “0”. When “Abm / Aby” is greater than “1”, the third waiting time setting unit 363 sets “adjustment waiting time Ta related to I / O refresh processing” to “execution time of I / O refresh processing of the own unit”. Is multiplied by “Abm / Aby” ”.
 第3待ち時間設定部363は、上述の方法により算出した「I/Oリフレッシュ処理についての同期チェック処理のための『待ち時間Tw』」を、判定部370へ通知する。 The third wait time setting unit 363 notifies the determination unit 370 of the “wait time Tw” for the synchronization check process for the I / O refresh process calculated by the above method.
 判定部370は、「自ユニットが各処理の実行を完了した」時点から、待ち時間設定部360から通知された待ち時間Twが経過した後に、同期チェック処理を実行する。例えば、判定部370は、「自ユニットが各処理の実行を完了した」時点から待ち時間Twが経過した時点で、共通レジスタ200を参照し、自ユニットが実行を完了した或る処理について、二重化される相手方のCPUユニットの実行が完了しているかを確認する。 The determination unit 370 executes the synchronization check process after the elapse of the waiting time Tw notified from the waiting time setting unit 360 from the point of “the own unit has completed execution of each process”. For example, the determination unit 370 refers to the common register 200 at the time when the waiting time Tw has elapsed from the time “the own unit has completed the execution of each process”, and performs the duplexing for a certain process whose own unit has completed the execution. The execution of the other CPU unit is completed.
 待ち時間Twとして「通常の待ち時間Two+調整待ち時間Ta」を通知された判定部370は、「自ユニットが各処理の実行を完了した」時点から調整待ち時間Taがするまで待機処理を実行する。そして、判定部370は、待機処理の実行完了後(つまり、「自ユニットが各処理の実行を完了した」時点から調整待ち時間Taが経過した後)に、同期チェック処理を実行する。すなわち、判定部370は、待機処理の実行完了後に、「通常の待ち時間Twoが経過するまでに、自ユニットが実行完了した処理の実行を、相手方のCPUユニットが完了していることを確認できるか」を判定する。言い換えれば、判定部370は、待機処理の実行完了時点から通常の待ち時間Twoが経過するまでに、自ユニットが実行完了した処理について、相手方のCPUユニットによる実行完了を確認できるかを判定する。 The determination unit 370 notified of the “normal waiting time Two + adjustment waiting time Ta” as the waiting time Tw executes the standby processing from the time “the own unit has completed execution of each process” until the adjustment waiting time Ta is reached. . Then, the determination unit 370 executes the synchronization check process after the execution of the standby process is completed (that is, after the adjustment waiting time Ta has elapsed from the time when “the own unit has completed the execution of each process”). That is, after the execution of the standby process is completed, the determination unit 370 can confirm that the execution of the process completed by the own unit is completed by the partner CPU unit before the normal waiting time Two elapses. ? In other words, the determination unit 370 determines whether the completion of the execution by the partner CPU unit can be confirmed for the processing that has been completed by the own unit before the normal waiting time Two elapses from the completion of the execution of the standby processing.
 待ち時間Twとして「通常の待ち時間Two」を通知された判定部370は、「自ユニットが各処理の実行を完了した」時点で直ぐに、同期チェック処理を実行する。すなわち、判定部370は、「通常の待ち時間Twoが経過するまでに、自ユニットが実行完了した処理の実行を、相手方のCPUユニットが完了していることを確認できるか」を判定する。言い換えれば、判定部370は、自ユニットの実行完了時点から通常の待ち時間Twoが経過するまでに、自ユニットが実行完了した処理について、相手方のCPUユニットによる実行完了を確認できるかを判定する。 The determination unit 370, which has been notified of the “normal waiting time Two” as the waiting time Tw, immediately executes the synchronization check processing at the time of “the own unit has completed execution of each processing”. That is, the determination unit 370 determines whether or not it is possible to confirm that the CPU unit of the other party has completed the execution of the process completed by the own unit before the normal waiting time Two elapses. In other words, the determination unit 370 determines whether the execution completion of the own unit can be confirmed by the partner CPU unit before the normal waiting time Two elapses from the execution completion time of the own unit.
 <「自己診断処理」に係る同期チェック処理>第1判定部371は、「自己診断処理」に係る同期チェック処理を実行する。すなわち、第1判定部371は、自ユニットの自己診断処理の実行完了時点から、第1待ち時間設定部361から通知された「自己診断処理のための『待ち時間Tw』」が経過するまでに、「相手方のCPUユニットが自己診断処理の実行を完了したか」を確認する。「自己診断処理のための『待ち時間Tw』」が経過するまでに、「相手方のCPUユニットが自己診断処理の実行を完了した」ことを確認できないと、第1判定部371は、相手方のCPUユニットに異常が発生したと判定する。 <Synchronization Check Processing According to “Self-diagnosis Processing”> The first determination unit 371 executes synchronization check processing according to “Self-diagnosis processing”. In other words, the first determination unit 371 determines that the “waiting time Tw for the self-diagnosis processing” notified from the first waiting time setting unit 361 elapses from the completion of the self-diagnosis processing of the own unit. , It is checked whether the other CPU unit has completed the execution of the self-diagnosis processing. If the “waiting time Tw” for the self-diagnosis process has not elapsed before the completion of execution of the self-diagnosis process by the partner CPU unit cannot be confirmed, the first determination unit 371 determines the CPU of the partner device. It is determined that an error has occurred in the unit.
 <「命令実行処理」に係る同期チェック処理>第2判定部372は、「命令実行処理」に係る同期チェック処理を実行する。すなわち、第2判定部372は、自ユニットの命令実行処理の実行完了時点から、第2待ち時間設定部362から通知された「命令実行処理のための『待ち時間Tw』」が経過するまでに、「相手方のCPUユニットが命令実行処理の実行を完了したか」を確認する。「命令実行処理のための『待ち時間Tw』」が経過するまでに、「相手方のCPUユニットが命令実行処理の実行を完了した」ことを確認できないと、第2判定部372は、相手方のCPUユニットに異常が発生したと判定する。 <Synchronization Check Process Related to “Instruction Execution Process”> The second determination unit 372 executes a synchronization check process related to “instruction execution process”. That is, the second determination unit 372 determines whether the “wait time Tw” for the instruction execution process notified from the second wait time setting unit 362 elapses from the completion of the execution of the instruction execution process of the own unit. , It is checked whether the partner CPU unit has completed the execution of the instruction execution process. If it is not possible to confirm that “the other CPU unit has completed the execution of the instruction execution process” before the “wait time Tw” for the instruction execution process has elapsed, the second determination unit 372 determines It is determined that an error has occurred in the unit.
 <「I/Oリフレッシュ処理」に係る同期チェック処理>第3判定部373は、「I/Oリフレッシュ処理」に係る同期チェック処理を実行する。すなわち、第3判定部373は、自ユニットのI/Oリフレッシュ処理の実行完了時点から、第3待ち時間設定部363から通知された「I/Oリフレッシュ処理のための『待ち時間Tw』」が経過するまでに、「相手方のCPUユニットがI/Oリフレッシュ処理の実行を完了したか」を確認する。「I/Oリフレッシュ処理のための『待ち時間Tw』」が経過するまでに、「相手方のCPUユニットが命令実行処理の実行を完了した」ことを確認できないと、第3判定部373は、相手方のCPUユニットに異常が発生したと判定する。 <Synchronization Check Process Related to “I / O Refresh Process”> The third determination unit 373 executes a synchronization check process related to “I / O refresh process”. That is, the third determination unit 373 sets the “waiting time Tw” for the I / O refreshing process notified from the third waiting time setting unit 363 from the completion of the execution of the I / O refreshing process of the own unit. By the elapse of time, it is checked whether "the other CPU unit has completed the execution of the I / O refresh processing". If it is not possible to confirm that “the other CPU unit has completed the execution of the instruction execution process” before the “waiting time Tw” for the I / O refresh process has elapsed, the third determination unit 373 determines It is determined that an abnormality has occurred in the CPU unit.
 判定部370Aは、共通レジスタ200の第2レジスタ220を参照し、処理実行部120Aが実行を完了した或る処理について、「処理実行部120Bによる実行が完了した」旨の書込があるかを確認する。判定部370Aは、処理実行部120Aが実行を完了した或る処理について、第2レジスタ220に「処理実行部120Bによる実行が完了した」旨の書込がないと、第2CPUユニット300Bに異常が発生したと判定する。 The determination unit 370A refers to the second register 220 of the common register 200, and determines whether or not there is a write indicating that “the execution by the process execution unit 120B has been completed” for a certain process that has been completed by the process execution unit 120A. Confirm. If there is no write in the second register 220 that “the execution by the process execution unit 120B has been completed” for a certain process that has been completed by the process execution unit 120A, the determination unit 370A determines that an abnormality has occurred in the second CPU unit 300B. It is determined that an error has occurred.
 判定部370Bは、共通レジスタ200の第1レジスタ210を参照し、処理実行部120Bが実行を完了した或る処理について、「処理実行部120Aによる実行が完了した」旨の書込があるかを確認する。判定部370Bは、処理実行部120Bが実行を完了した或る処理について、第1レジスタ210に「処理実行部120Aによる実行が完了した」旨の書込がないと、第1CPUユニット300Aに異常が発生したと判定する。 The determination unit 370B refers to the first register 210 of the common register 200, and determines whether or not there is a write indicating that “the execution by the process execution unit 120A has been completed” for a certain process that has been completed by the process execution unit 120B. Confirm. If there is no write in the first register 210 that “the execution by the process execution unit 120A has been completed” for a certain process that has been completed by the process execution unit 120B, the determination unit 370B determines that an abnormality has occurred in the first CPU unit 300A. It is determined that an error has occurred.
  (記憶部の詳細)
 記憶部330は、第1CPUユニット300Aと第2CPUユニット300Bとの各々が使用する各種データを格納する記憶装置である。なお、記憶部330は、第1CPUユニット300Aと第2CPUユニット300Bとの各々が実行する(1)制御プログラム、(2)OSプログラム、(3)第1CPUユニット300Aと第2CPUユニット300Bとの各々が有する各種機能を実行するためのアプリケーションプログラム、および、(4)該アプリケーションプログラムを実行するときに読み出す各種データを非一時的に記憶してもよい。上記の(1)~(4)のデータは、例えば、ROM(read only memory)、フラッシュメモリ、EPROM(Erasable Programmable ROM)、EEPROM(登録商標)(Electrically EPROM)、HDD(Hard Disc Drive)等の不揮発性記憶装置に記憶される。第1CPUユニット300Aと第2CPUユニット300Bとの各々は、図示しない一時記憶部を備えていてもよい。一時記憶部は、第1CPUユニット300Aと第2CPUユニット300Bとの各々が実行する各種処理の過程で、演算に使用するデータおよび演算結果等を一時的に記憶するいわゆるワーキングメモリであり、RAM(Random Access Memory)等の揮発性記憶装置で構成される。どのデータをどの記憶装置に記憶するのかについては、第1CPUユニット300Aと第2CPUユニット300Bとの各々の使用目的、利便性、コスト、または、物理的な制約等から適宜決定される。記憶部330はさらに、他機能力テーブル340および自機能力テーブル350を格納している。
(Details of storage unit)
The storage unit 330 is a storage device that stores various data used by each of the first CPU unit 300A and the second CPU unit 300B. The storage unit 330 stores (1) a control program, (2) an OS program, and (3) each of the first CPU unit 300A and the second CPU unit 300B executed by the first CPU unit 300A and the second CPU unit 300B. An application program for executing various functions provided therein, and (4) various data to be read when the application program is executed may be temporarily stored. The above data (1) to (4) are, for example, ROM (read only memory), flash memory, EPROM (Erasable Programmable ROM), EEPROM (registered trademark) (Electrically EPROM), HDD (Hard Disc Drive), etc. Stored in a non-volatile storage device. Each of the first CPU unit 300A and the second CPU unit 300B may include a temporary storage unit (not shown). The temporary storage unit is a so-called working memory that temporarily stores data used for calculation, calculation results, and the like in the course of various processes executed by each of the first CPU unit 300A and the second CPU unit 300B. Access Memory). Which data is stored in which storage device is appropriately determined based on the purpose of use, convenience, cost, physical restrictions, and the like of each of the first CPU unit 300A and the second CPU unit 300B. The storage unit 330 further stores another function table 340 and own function table 350.
 他機能力テーブル340には、二重化される相手方のCPUユニットの性能Aby(処理能力)を示す情報である他機性能情報が格納される。図3を用いて説明したように、能力取得部310は、二重化される相手方のCPUユニットの自機能力テーブル350を参照して取得した他機性能情報を、自ユニットの他機能力テーブル340に格納する。 (4) The other function capability table 340 stores other device performance information that is information indicating the performance Aby (processing capability) of the CPU unit of the other party to be duplicated. As described with reference to FIG. 3, the capability acquiring unit 310 stores the other device performance information acquired with reference to the own function table 350 of the CPU unit of the other party to be duplicated in the other function table 340 of the own unit. Store.
 第1他機能力テーブル341には、二重化される相手方のCPUユニットの第1自機能力テーブル351に格納されている「自己診断処理に係る、二重化される相手方のCPUユニットの性能Abyを示す性能情報」が、能力取得部310により格納される。 In the first other function table 341, “the performance indicating the performance Aby of the partner CPU unit to be duplicated, which is related to the self-diagnosis processing and stored in the first self function table 351 of the partner CPU unit to be duplicated. “Information” is stored by the capability acquisition unit 310.
 第2他機能力テーブル342には、二重化される相手方のCPUユニットの第2自機能力テーブル352に格納されている「命令実行処理に係る、二重化される相手方のCPUユニットの性能Abyを示す性能情報」が、能力取得部310により格納される。 In the second other function table 342, the “performance indicating the performance Aby of the partner CPU unit to be duplicated, which is related to the instruction execution processing and stored in the second own function table 352 of the partner CPU unit to be duplicated. “Information” is stored by the capability acquisition unit 310.
 第3他機能力テーブル343には、二重化される相手方のCPUユニットの第3自機能力テーブル353に格納されている「I/Oリフレッシュ処理に係る、二重化される相手方のCPUユニットの性能Abyを示す性能情報」が、能力取得部310により格納される。 In the third other function table 343, “the performance Aby of the partner CPU unit to be duplicated, which is related to the I / O refresh processing and stored in the third own function table 353 of the partner CPU unit to be duplicated, is stored. The “performance information shown” is stored by the capability acquisition unit 310.
 自機能力テーブル350には、自ユニットの性能Abm(処理能力)を示す情報である自機性能情報が格納され、例えば、「自ユニットが、基準CPUユニットと比較して、どの程度の性能(処理能力)を備えているのか」を示す自機性能情報が格納されている。自機性能情報は、例えば第1CPUユニット300Aと第2CPUユニット300Bとの各々の工場出荷時に、自機能力テーブル350に格納される。 The own function table 350 stores own device performance information that is information indicating the performance Abm (processing capacity) of the own unit. For example, “How much performance (the own unit is compared with the reference CPU unit) Own device performance information is stored. The own device performance information is stored in the own function table 350 when each of the first CPU unit 300A and the second CPU unit 300B is shipped from the factory, for example.
 第1自機能力テーブル351には、「自己診断処理に係る、自ユニットの性能Abmを示す性能情報(特に、「自己診断処理に係る、基準CPUユニットの性能Abb」に対する、相対的な性能Abm)」が格納されている。 The first self-functionality table 351 includes performance information indicating the performance Abm of the self-unit related to the self-diagnosis processing (particularly, relative performance Abm with respect to “performance Abb of the reference CPU unit related to the self-diagnosis processing”). ) "Is stored.
 第2自機能力テーブル352には、「命令実行処理に係る、自ユニットの性能Abmを示す性能情報(特に、「命令実行処理に係る、基準CPUユニットの性能Abb」に対する、相対的な性能Abm)」が格納されている。 The second self-functionality table 352 includes “Performance information indicating the performance Abm of the own unit related to the instruction execution process (particularly, relative performance Abm with respect to“ performance Abb of the reference CPU unit related to the instruction execution process ”). ) "Is stored.
 第3自機能力テーブル353には、「I/Oリフレッシュ処理に係る、自ユニットの性能Abmを示す性能情報(特に、「I/Oリフレッシュ処理に係る、基準CPUユニットの性能Abb」に対する、相対的な性能Abm)」が格納されている。 The third self-functionality table 353 includes performance information indicating the performance Abm of the own unit related to the I / O refresh processing (particularly, relative to the “performance Abb of the reference CPU unit related to the I / O refresh processing”). Performance Abm) "is stored.
 (CPUユニットについての整理)
 これまでに図4等を用いて構成を説明してきた第1CPUユニット300Aおよび第2CPUユニット300Bの各々について、その理解を容易にするため、以下のように整理しておく。すなわち、第1CPUユニット300Aおよび第2CPUユニット300Bの各々は、第1CPUユニット100Aおよび第2CPUユニット100Bの各々と同様に、PLC20(コントローラ)において二重化されるCPUユニットである。第1CPUユニット300Aおよび第2CPUユニット300Bの各々は、待ち時間設定部360(設定部)と判定部370とを備えている。待ち時間設定部360は、自ユニットの性能Abm(処理能力)と、二重化される相手方のCPUユニットの性能Abyとの比を考慮して、待ち時間Twを設定する。判定部370は、自ユニットにおける処理の実行完了時点から、待ち時間設定部360によって設定された待ち時間Twを経過するまでに、相手方のCPUユニットの前記処理の実行完了を確認できないと、相手方のCPUユニットに異常が発生したと判定する。
(Arrangement of CPU unit)
Each of the first CPU unit 300A and the second CPU unit 300B, whose configurations have been described with reference to FIG. 4 and the like, will be arranged as follows in order to facilitate understanding. That is, each of the first CPU unit 300A and the second CPU unit 300B is a duplicated CPU unit in the PLC 20 (controller), similarly to each of the first CPU unit 100A and the second CPU unit 100B. Each of the first CPU unit 300A and the second CPU unit 300B includes a waiting time setting unit 360 (setting unit) and a determination unit 370. The waiting time setting unit 360 sets the waiting time Tw in consideration of the ratio between the performance Abm (processing capacity) of the own unit and the performance Aby of the CPU unit of the other party to be duplicated. If the determination unit 370 cannot confirm that the execution of the process by the other CPU unit has been completed before the elapse of the waiting time Tw set by the waiting time setting unit 360 from the time when the execution of the process in the own unit is completed, It is determined that an abnormality has occurred in the CPU unit.
 したがって、第1CPUユニット300Aおよび第2CPUユニット300Bの各々は、第1CPUユニット100Aおよび第2CPUユニット100Bの各々と同様に、自ユニットと相手方のCPUユニットとの性能Abの違いを考慮した、適切な待ち時間Twを設定できる。すなわち、第1CPUユニット300Aおよび第2CPUユニット300Bの各々は、二重化される相手方のCPUユニットと自ユニットとの性能Abの違いを考慮して、不要な待ち時間Twを設けずに、同期チェック処理を正確に行なうことができる。 Therefore, each of the first CPU unit 300A and the second CPU unit 300B, like each of the first CPU unit 100A and the second CPU unit 100B, takes an appropriate wait time in consideration of the difference in performance Ab between the own unit and the partner CPU unit. Time Tw can be set. That is, each of the first CPU unit 300A and the second CPU unit 300B performs the synchronization check processing without providing an unnecessary waiting time Tw in consideration of the difference in the performance Ab between the CPU unit of the other party and the own unit. Can be done accurately.
 第1CPUユニット300Aおよび第2CPUユニット300Bの各々において、前記処理(同期チェック処理の対象となる処理)は、自己診断処理、命令実行処理、および、I/Oリフレッシュ処理を含む。待ち時間設定部360(具体的には、第1待ち時間設定部361、第2待ち時間設定部362、および、第3待ち時間設定部363の各々)は、自己診断処理、命令実行処理、および、I/Oリフレッシュ処理の各々について、待ち時間Twを設定する。判定部370(具体的には、第1判定部371、第2判定部372、および、第3判定部373の各々)は、自己診断処理、命令実行処理、および、I/Oリフレッシュ処理の各々について、前記判定を、つまり、同期チェック処理を実行する。 In each of the first CPU unit 300A and the second CPU unit 300B, the processing (processing to be subjected to the synchronization check processing) includes a self-diagnosis processing, an instruction execution processing, and an I / O refresh processing. The waiting time setting unit 360 (specifically, each of the first waiting time setting unit 361, the second waiting time setting unit 362, and the third waiting time setting unit 363) includes a self-diagnosis process, an instruction execution process, , I / O refresh processing, a wait time Tw is set. The determination unit 370 (specifically, each of the first determination unit 371, the second determination unit 372, and the third determination unit 373) includes a self-diagnosis process, an instruction execution process, and an I / O refresh process. , The above-mentioned determination, that is, the synchronization check process is executed.
 第1CPUユニット300Aおよび第2CPUユニット300Bの各々は、自己診断処理、命令実行処理、および、I/Oリフレッシュ処理の各々の実行完了のタイミングで、自ユニットと相手方のCPUユニットとの同期を判定することができる。 Each of the first CPU unit 300A and the second CPU unit 300B determines the synchronization between its own unit and the partner CPU unit at the timing of completion of each of the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing. be able to.
 第1CPUユニット300Aおよび第2CPUユニット300Bの各々は、自己診断処理、命令実行処理、および、I/Oリフレッシュ処理を、この順で繰り返し実行する前に、二重化処理を1回実行する。第1CPUユニット300Aおよび第2CPUユニット300Bの各々は、二重化処理において、相手方のCPUユニットの性能Abyを、相手方のCPUユニットから取得する。 (1) Each of the first CPU unit 300A and the second CPU unit 300B executes the duplexing process once before repeatedly executing the self-diagnosis process, the instruction execution process, and the I / O refresh process in this order. Each of the first CPU unit 300A and the second CPU unit 300B acquires the performance Aby of the partner CPU unit from the partner CPU unit in the duplex processing.
 第1CPUユニット300Aおよび第2CPUユニット300Bの各々は、前記各処理を繰り返し実行する前に取得しておいた相手方のCPUユニットの性能Abyを考慮して、前記各処理についての前記判定に用いる待ち時間Twを、設定できるとの効果を奏する。 Each of the first CPU unit 300A and the second CPU unit 300B takes into account the performance Aby of the partner CPU unit that has been acquired before repeatedly executing each of the processes, and the waiting time used for the determination of each of the processes. This has an effect that Tw can be set.
 第1CPUユニット300Aおよび第2CPUユニット300Bの各々において、待ち時間設定部360は、自己診断処理、命令実行処理、および、I/Oリフレッシュ処理の各々の待ち時間Twを、以下のように設定する。すなわち、待ち時間設定部360は、自己診断処理、命令実行処理、および、I/Oリフレッシュ処理の各々の実行に係る、自ユニットの性能Abmと、相手方のCPUユニットの性能Abyとの比を考慮して、各処理の待ち時間Twを、設定する。具体的には、第1待ち時間設定部361は、自己診断処理に係る、自ユニットの性能Abmと、相手方のCPUユニットの性能Abyとの比を考慮して、自己診断処理についての同期チェック処理のための待ち時間Twを、設定する。第2待ち時間設定部362は、命令実行処理に係る、自ユニットの性能Abmと、相手方のCPUユニットの性能Abyとの比を考慮して、命令実行処理についての同期チェック処理のための待ち時間Twを、設定する。第3待ち時間設定部363は、I/Oリフレッシュ処理に係る、自ユニットの性能Abmと、相手方のCPUユニットの性能Abyとの比を考慮して、I/Oリフレッシュ処理についての同期チェック処理のための待ち時間Twを、設定する。 In each of the first CPU unit 300A and the second CPU unit 300B, the waiting time setting unit 360 sets the waiting time Tw of each of the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing as follows. That is, the waiting time setting unit 360 considers the ratio between the performance Abm of the own unit and the performance Aby of the CPU unit of the partner, which are related to the execution of the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing. Then, the waiting time Tw of each process is set. Specifically, the first waiting time setting unit 361 performs the synchronization check processing for the self-diagnosis processing in consideration of the ratio between the performance Abm of the own unit and the performance Aby of the partner CPU unit in the self-diagnosis processing. Is set for the waiting time Tw. The second wait time setting unit 362 is a wait time for the synchronization check processing of the instruction execution processing, taking into account the ratio of the performance Abm of the own unit and the performance Aby of the partner CPU unit in the instruction execution processing. Tw is set. The third waiting time setting unit 363 performs the synchronization check processing for the I / O refresh processing in consideration of the ratio between the performance Abm of the own unit and the performance Aby of the partner CPU unit related to the I / O refresh processing. Waiting time Tw is set.
 第1CPUユニット300Aおよび第2CPUユニット300Bの各々は、自己診断処理、命令実行処理、および、I/Oリフレッシュ処理の各々に係る、自ユニットと相手方のCPUユニットとの性能Abの違いを考慮して、各処理の待ち時間Twを設定する。 Each of the first CPU unit 300A and the second CPU unit 300B considers a difference in performance Ab between the own unit and the partner CPU unit in each of the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing. , A waiting time Tw for each process is set.
 したがって、第1CPUユニット100Aおよび第2CPUユニット100Bの各々は、前記各処理の待ち時間Twを、前記各処理に係る自ユニットおよび相手方のCPUユニットの各々の性能Abに応じて、設定できるとの効果を奏する。 Therefore, each of the first CPU unit 100A and the second CPU unit 100B can set the waiting time Tw of each process according to the performance Ab of each of the own unit and the partner CPU unit related to each process. To play.
 (動作)
 図6は、第1CPUユニット300Aおよび第2CPUユニット300Bの各々が実行する処理の概要を説明する図である。図6に示す第1CPUユニット300Aおよび第2CPUユニット300Bの各々が実行する処理について、図2に示す第1CPUユニット100Aおよび第2CPUユニット100Bの各々が実行する処理との違いは、以下の点である。
(motion)
FIG. 6 is a diagram illustrating an outline of processing executed by each of first CPU unit 300A and second CPU unit 300B. The processing executed by each of first CPU unit 300A and second CPU unit 300B shown in FIG. 6 is different from the processing executed by each of first CPU unit 100A and second CPU unit 100B shown in FIG. 2 in the following points. .
 すなわち、第1CPUユニット300Aおよび第2CPUユニット300Bの各々は、繰り返し実行する自己診断処理、命令実行処理、および、I/Oリフレッシュ処理の各々について、自ユニットおよび相手方のCPUユニットの性能Abを把握する。そして、第1CPUユニット300Aおよび第2CPUユニット300Bの各々は、各処理に係る自ユニットおよび相手方のCPUユニットの性能Abを用いて、各処理についての同期チェック処理の際の「待ち時間Tw」を設定する。第1CPUユニット300Aおよび第2CPUユニット300Bの各々は、自ユニットによる各処理の実行完了時点から、各処理についての「待ち時間Tw」が経過するまでに、「相手方のCPUユニットによる各処理の実行完了」があるかを判定する。 That is, each of the first CPU unit 300A and the second CPU unit 300B grasps the performance Ab of the own unit and the partner CPU unit for each of the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing that are repeatedly executed. . Each of the first CPU unit 300A and the second CPU unit 300B sets the “waiting time Tw” at the time of the synchronization check process for each process, using the performance Ab of the own unit and the partner CPU unit related to each process. I do. Each of the first CPU unit 300A and the second CPU unit 300B indicates that the execution of each process by the partner CPU unit has been completed until the “waiting time Tw” for each process has elapsed since the completion of the execution of each process by the own unit. Is determined.
 その他の点においては、「第1CPUユニット300Aおよび第2CPUユニット300Bの各々が実行する処理」は、「第1CPUユニット100Aおよび第2CPUユニット100Bの各々が実行する処理」と同様である。 In other respects, “the processing executed by each of the first CPU unit 300A and the second CPU unit 300B” is the same as “the processing executed by each of the first CPU unit 100A and the second CPU unit 100B”.
 すなわち、「第1CPUユニット300Aおよび第2CPUユニット300Bの各々が実行する処理」は、PLC20(コントローラ)において二重化されるCPUユニットの制御方法であって、設定ステップと、判定ステップとを含んでいる。設定ステップは、自ユニットの性能Abmと、二重化される相手方のCPUユニットの性能Abyとの比を考慮して、待ち時間Twを設定する。判定ステップは、自ユニットにおける処理の実行完了時点から、設定ステップにて設定された待ち時間Twを経過するまでに、相手方のCPUユニットにおける前記処理の実行完了を確認できないと、相手方のCPUユニットに異常が発生したと判定する。 That is, “the processing executed by each of the first CPU unit 300A and the second CPU unit 300B” is a control method of a CPU unit that is duplicated in the PLC 20 (controller), and includes a setting step and a determination step. In the setting step, the waiting time Tw is set in consideration of the ratio between the performance Abm of the own unit and the performance Aby of the CPU unit to be duplicated. The determination step includes, when the completion of the processing in the partner CPU unit cannot be confirmed from the time when the execution of the processing in the own unit is completed to the time when the waiting time Tw set in the setting step elapses, to the partner CPU unit. It is determined that an abnormality has occurred.
 したがって、「第1CPUユニット300Aおよび第2CPUユニット300Bの各々が実行する処理」は、自ユニットと相手方のCPUユニットとで性能Abが一致しない場合であっても、自ユニットと相手方のCPUユニットとの性能Abの違いを考慮した、適切な待ち時間Twを設定できるとの効果を奏する。すなわち、「第1CPUユニット300Aおよび第2CPUユニット300Bの各々が実行する処理」は、二重化される相手方のCPUユニットと自ユニットとの性能Abの違いを考慮して、不要な待ち時間Twを設けずに、同期チェック処理を正確に行なうことができるとの効果を奏する。 Therefore, “the processing executed by each of the first CPU unit 300A and the second CPU unit 300B” indicates that even if the performance Ab does not match between the own CPU unit and the other CPU unit, the processing between the own CPU unit and the other CPU unit may not be performed. There is an effect that an appropriate waiting time Tw can be set in consideration of the difference in the performance Ab. That is, “the processing executed by each of the first CPU unit 300A and the second CPU unit 300B” does not provide an unnecessary waiting time Tw in consideration of the difference in the performance Ab between the CPU unit of the other party to be duplicated and the own unit. In addition, there is an effect that the synchronization check process can be performed accurately.
 §4.変形例
 これまで、第1CPUユニット100Aと第2CPUユニット100Bとが(または、第1CPUユニット300Aと第2CPUユニット300Bとが)、共通レジスタ200を利用して、同期チェック処理を行なう例を説明してきた。しかしながら、共通レジスタ200を利用する方法は、同期チェック処理の実現方法の一例にすぎない。同期チェック処理は、例えば、第1CPUユニット100Aと第2CPUユニット100Bとが(または、第1CPUユニット300Aと第2CPUユニット300Bとが)、互いのシリアルポートで通信を行いながら、同期をチェックする方法で実現されてもよい。第1CPUユニット100Aと第2CPUユニット100Bとは(または、第1CPUユニット300Aと第2CPUユニット300Bとは)、互いのシリアルポートで通信を行ないながら、互いに、相手方のCPUユニットの処理の実行完了を確認してもよい。
§4. Modified Example So far, an example has been described in which the first CPU unit 100A and the second CPU unit 100B (or the first CPU unit 300A and the second CPU unit 300B) perform a synchronization check process using the common register 200. . However, the method of using the common register 200 is only an example of a method for implementing the synchronization check process. The synchronization check processing is performed by, for example, a method in which the first CPU unit 100A and the second CPU unit 100B (or the first CPU unit 300A and the second CPU unit 300B) check synchronization while communicating with each other through serial ports. It may be realized. The first CPU unit 100A and the second CPU unit 100B (or the first CPU unit 300A and the second CPU unit 300B) communicate with each other through their serial ports and confirm the execution completion of the processing of the partner CPU unit with each other. May be.
 また、これまで自己診断処理、命令実行処理、および、I/Oリフレッシュ処理がこの順に繰り返し実行され、これらの各処理の実行完了後に、これらの各処理に係る同期チェック処理が実行される例を説明してきた。しかしながら、自己診断処理、命令実行処理、および、I/Oリフレッシュ処理に加えて、さらに別の処理が、自己診断処理、命令実行処理、および、I/Oリフレッシュ処理と同様に繰り返し実行されてもよい。その場合、この別の処理についても、実行完了後に同期チェック処理が実行されることになる。 Further, an example in which the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing are repeatedly executed in this order, and the synchronization check processing related to each of these processings is executed after the execution of each of these processings is completed. I have explained. However, in addition to the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing, another processing may be repeatedly executed similarly to the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing. Good. In this case, the synchronization check processing is also performed after the completion of the other processing.
 例えば、自己診断処理、命令実行処理、および、I/Oリフレッシュ処理に加えて、I/Oリフレッシュ処理で信号の送受信が行われる通信ネットワークとは別の通信ネットワークへの、信号の送受信を行なう「その他の通信処理」が、繰り返し実行されてもよい。すなわち、自己診断処理、命令実行処理、I/Oリフレッシュ処理、および、その他の通信処理が、この順に繰り返し実行され、これらの各処理の実行完了後に、これらの各処理に係る同期チェック処理が実行されてもよい。 For example, in addition to the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing, transmission and reception of signals to and from a communication network different from the communication network in which signals are transmitted and received in the I / O refresh processing are performed. Other communication processes "may be repeatedly executed. That is, the self-diagnosis processing, the instruction execution processing, the I / O refresh processing, and other communication processing are repeatedly executed in this order, and after the execution of each of these processings is completed, the synchronization check processing relating to each of these processings is executed. May be done.
 〔ソフトウェアによる実現例〕
 第1CPUユニット100A、第2CPUユニット100B、第1CPUユニット300A、および、第2CPUユニット300Bの各々の制御ブロック(特に、能力取得部110、処理実行部120、待ち時間設定部160、判定部170、能力取得部310、待ち時間設定部360、および、判定部370)は、集積回路(ICチップ)等に形成された論理回路(ハードウェア)によって実現してもよいし、CPU(CenTral Processing Unit)を用いてソフトウェアによって実現してもよい。
[Example of software implementation]
The control blocks of each of the first CPU unit 100A, the second CPU unit 100B, the first CPU unit 300A, and the second CPU unit 300B (particularly, the capability acquisition unit 110, the process execution unit 120, the waiting time setting unit 160, the determination unit 170, The acquiring unit 310, the waiting time setting unit 360, and the determining unit 370) may be realized by a logic circuit (hardware) formed in an integrated circuit (IC chip) or the like, or may be a CPU (CenTral Processing Unit). And may be realized by software.
 後者の場合、第1CPUユニット100A、第2CPUユニット100B、第1CPUユニット300A、および、第2CPUユニット300Bの各々は、各機能を実現するソフトウェアであるプログラムの命令を実行するCPU、上記プログラムおよび各種データがコンピュータ(またはCPU)で読み取り可能に記録されたROM(Read Only Memory)または記憶装置(これらを「記録媒体」と称する)、上記プログラムを展開するRAM(Random Access Memory)等を備えている。そして、コンピュータ(またはCPU)が上記プログラムを上記記録媒体から読み取って実行することにより、本発明の目的が達成される。上記記録媒体としては、「一時的でない有形の媒体」、例えば、テープ、ディスク、カード、半導体メモリ、プログラマブルな論理回路等を用いることができる。また、上記プログラムは、該プログラムを伝送可能な任意の伝送媒体(通信ネットワークや放送波等)を介して上記コンピュータに供給されてもよい。なお、本発明は、上記プログラムが電子的な伝送によって具現化された、搬送波に埋め込まれたデータ信号の形態でも実現され得る。 In the latter case, each of the first CPU unit 100A, the second CPU unit 100B, the first CPU unit 300A, and the second CPU unit 300B is a CPU that executes instructions of a program that is software for realizing each function, the above-described program and various data. Is provided with a ROM (Read Only Memory) or a storage device (these are referred to as “recording media”) recorded readable by a computer (or CPU), a RAM (Random Access Memory) for expanding the program, and the like. Then, the object of the present invention is achieved when the computer (or CPU) reads the program from the recording medium and executes the program. As the recording medium, a “temporary tangible medium”, for example, a tape, a disk, a card, a semiconductor memory, a programmable logic circuit, or the like can be used. Further, the program may be supplied to the computer via an arbitrary transmission medium (a communication network, a broadcast wave, or the like) capable of transmitting the program. Note that the present invention can also be realized in the form of a data signal embedded in a carrier wave, in which the program is embodied by electronic transmission.
 (付記事項)
 本発明の一態様に係るCPUユニットは、コントローラにおいて二重化されるCPUユニットであって、自ユニットの処理能力と、二重化される相手方のCPUユニットの処理能力との比を考慮して、待ち時間を設定する設定部と、自ユニットにおける処理の実行完了時点から、前記設定部によって設定された前記待ち時間を経過するまでに、前記相手方のCPUユニットにおける前記処理の実行完了を確認できないと、前記相手方のCPUユニットに異常が発生したと判定する判定部と、を備えている。
(Appendix)
A CPU unit according to one embodiment of the present invention is a CPU unit that is duplexed in a controller, and takes a waiting time into consideration in consideration of a ratio between the processing capability of its own unit and the processing capability of a partner CPU unit that is duplicated. A setting unit to be set, and if the completion of the execution of the process in the CPU unit of the other party cannot be confirmed before the elapse of the waiting time set by the setting unit from the time when the execution of the process in the own unit is completed, And a determination unit that determines that an abnormality has occurred in the CPU unit.
 前記の構成によれば、前記CPUユニットは、自ユニットと前記相手方のCPUユニットとの前記処理能力の比を考慮して設定した前記待ち時間を用いて、自ユニットと前記相手方のCPUユニットとの同期(つまり、実行完了した処理の一致)を判定する。 According to the above configuration, the CPU unit uses the waiting time set in consideration of the processing capacity ratio between the own unit and the partner CPU unit, and performs communication between the own unit and the partner CPU unit. The synchronization (that is, the coincidence of the executed processing) is determined.
 例えば、前記相手方のCPUユニットの方が自ユニットより性能が高い(つまり、処理の実行速度が早い)場合、前記CPUユニットは、前記待ち時間として、予め決められた「通常の待ち時間」を設定する。また、相手方のCPUユニットと自ユニットとで性能Abが等しい場合、前記制御方法は、待ち時間Twとして、予め決められた「通常の待ち時間」を設定する。 For example, when the other CPU unit has higher performance than its own unit (that is, the execution speed of the process is faster), the CPU unit sets a predetermined “normal waiting time” as the waiting time. I do. If the performance Ab is equal between the other CPU unit and the own unit, the control method sets a predetermined “normal waiting time” as the waiting time Tw.
 前記相手方のCPUユニットの方が自ユニットより性能が高い場合、自ユニットが或る処理の実行を完了した時点では既に前記相手方のCPUユニットは前記或る処理の実行を完了しているはずである。また、相手方のCPUユニットと自ユニットとで性能Abが等しい場合、自ユニットが或る処理の実行を完了した時点で、相手方のCPUユニットは前記或る処理の実行を完了するはずである。 If the partner CPU unit has higher performance than the own unit, the partner CPU unit should have already completed execution of the certain process when the own unit completes execution of a certain process. . If the performance Ab is equal between the partner CPU unit and the own unit, the partner CPU unit should complete the execution of the certain process when the own unit completes the execution of a certain process.
 したがって、前記相手方のCPUユニットの方が自ユニットより性能が高い場合でも、前記CPUユニットは、前記待ち時間として、前記「通常の待ち時間」を設定することで、前記相手方のCPUユニットに異常が発生したか否かを正確に判定することができる。 Therefore, even when the performance of the other CPU unit is higher than that of the own unit, the CPU unit sets the “normal waiting time” as the waiting time, so that the abnormality of the other CPU unit occurs. It can be accurately determined whether or not the occurrence has occurred.
 例えば、前記相手方のCPUユニットの方が自ユニットより性能が低い(つまり、処理の実行速度が遅い)場合、前記CPUユニットは、前記待ち時間として、「前記通常の待ち時間に、性能差を考慮した調整待ち時間を加えた期間」を設定する。具体的には、「自ユニットにおける前記処理の実行完了時点と、前記相手方のCPUユニットにおける前記処理の実行が完了すると予想される時点との差」を、前記調整待ち時間とする。 For example, when the performance of the other CPU unit is lower than that of the own CPU unit (that is, the execution speed of the process is slower), the CPU unit considers the performance difference in the normal waiting time as the waiting time. Period after adding the adjusted waiting time ”. Specifically, the "difference between the time when the execution of the process in the own unit is completed and the time when the execution of the process in the partner CPU unit is expected to be completed" is defined as the adjustment waiting time.
 前記相手方のCPUユニットの方が自ユニットより性能が低い場合、自ユニットが或る処理の実行を完了した時点では、前記相手方のCPUユニットは、未だ前記或る処理の実行を完了していない。そこで、前記CPUユニットは、「前記相手方のCPUユニットにおける前記処理の実行が完了すると予想される時点」まで待機し、その後、「通常の待ち時間」が経過するまでに前記相手方のCPUユニットにおける前記処理の実行完了を確認できるかを判定する。つまり、前記CPUユニットは、自ユニットにおける前記処理の実行完了時点から、「前記調整待ち時間を、前記通常の待ち時間に加えた期間」が経過するまでに、前記相手方のCPUユニットにおける前記処理の実行完了を確認できるかを判定する。 (4) When the performance of the partner CPU unit is lower than that of the own unit, the partner CPU unit has not completed execution of the certain process at the time when the self unit has completed execution of a certain process. Therefore, the CPU unit waits until “the time point at which the execution of the processing in the other CPU unit is expected to be completed”, and then the CPU unit in the other CPU unit until “normal waiting time” elapses. It is determined whether the execution completion of the process can be confirmed. In other words, the CPU unit performs the processing in the partner CPU unit from the time when the execution of the processing in the own unit is completed to the time when “the period in which the adjustment waiting time is added to the normal waiting time” elapses. Determine whether execution completion can be confirmed.
 したがって、前記相手方のCPUユニットの方が自ユニットより性能が低い場合でも、前記CPUユニットは、前記待ち時間として、「前記調整待ち時間を、前記通常の待ち時間に加えた期間」を設定することで、前記の判定を正確に実行できる。 Therefore, even when the performance of the other CPU unit is lower than that of the own unit, the CPU unit sets “the period in which the adjustment waiting time is added to the normal waiting time” as the waiting time. Thus, the above determination can be accurately performed.
 以上の通り、前記CPUユニットは、自ユニットと前記相手方のCPUユニットとで前記処理能力が一致しない場合であっても、自ユニットと前記相手方のCPUユニットとの前記処理能力の違いを考慮した、適切な前記待ち時間を設定できるとの効果を奏する。すなわち、前記CPUユニットは、二重化される相手方のCPUユニットと自ユニットとの処理能力の違いを考慮して、不要な待ち時間を設けずに、同期チェック処理を正確に行なうことができるとの効果を奏する。 As described above, the CPU unit considers the difference in the processing capability between the own unit and the counterpart CPU unit, even when the processing capabilities of the own unit and the counterpart CPU unit do not match. This has an effect that an appropriate waiting time can be set. That is, the CPU unit can accurately perform the synchronization check processing without providing an unnecessary waiting time in consideration of the difference in processing capacity between the CPU unit of the other party and the own unit to be duplicated. To play.
 本発明の一態様に係るCPUユニットにおいて、前記処理は、自ユニットのハードウェアに異常がないかを診断する自己診断処理、前記相手方のCPUユニット以外の外部装置を制御する信号を生成する命令実行処理、および、前記相手方のCPUユニット以外の外部装置との間でデータを交換するI/Oリフレッシュ処理を含み、前記設定部は、前記自己診断処理、前記命令実行処理、および、前記I/Oリフレッシュ処理の各々について、前記待ち時間を設定し、前記判定部は、前記自己診断処理、前記命令実行処理、および、前記I/Oリフレッシュ処理の各々について、前記判定を実行してもよい。 In the CPU unit according to one aspect of the present invention, the processing includes: a self-diagnosis processing for diagnosing whether there is an abnormality in hardware of the own unit; Processing, and an I / O refresh processing for exchanging data with an external device other than the partner CPU unit. The setting unit performs the self-diagnosis processing, the instruction execution processing, and the I / O processing. The waiting time may be set for each of the refresh processing, and the determination unit may perform the determination for each of the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing.
 前記の構成によれば、前記CPUユニットは、前記自己診断処理、前記命令実行処理、および、前記I/Oリフレッシュ処理の各々について、自ユニットと前記相手方のCPUユニットとの同期(つまり、実行完了した処理の一致)を判定する。 According to the above configuration, the CPU unit synchronizes the self-diagnosis process, the instruction execution process, and the I / O refresh process between the self-unit and the counterpart CPU unit (that is, execution completion). Is determined).
 したがって、前記CPUユニットは、前記自己診断処理、前記命令実行処理、および、前記I/Oリフレッシュ処理の各々の実行完了のタイミングで、自ユニットと前記相手方のCPUユニットとの同期を判定することができるとの効果を奏する。 Therefore, the CPU unit may determine the synchronization between the self unit and the partner CPU unit at the timing of completion of execution of each of the self-diagnosis process, the instruction execution process, and the I / O refresh process. It has the effect of being able to do it.
 本発明の一態様に係るCPUユニットは、前記自己診断処理、前記命令実行処理、および、前記I/Oリフレッシュ処理を、この順で繰り返し実行する前に、前記相手方のCPUユニットの処理能力を、前記相手方のCPUユニットから取得する二重化処理を、1回実行してもよい。 Before repeatedly executing the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing in this order, the CPU unit according to an aspect of the present invention may increase the processing capability of the partner CPU unit. The duplication processing obtained from the partner CPU unit may be executed once.
 前記の構成によれば、前記CPUユニットは、前記相手方のCPUユニットの処理能力を、前記自己診断処理、前記命令実行処理、および、前記I/Oリフレッシュ処理を、この順で繰り返し実行する前に、1回取得する。そして、前記CPUユニットは、取得した前記相手方のCPUユニットの処理能力と、自ユニットの前記処理能力との比を考慮して、前記各処理についての前記判定に用いる前記待ち時間を設定する。 According to the configuration, the CPU unit determines the processing capability of the partner CPU unit before repeatedly executing the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing in this order. Acquire once. Then, the CPU unit sets the waiting time used for the determination for each process in consideration of the ratio of the acquired processing capability of the partner CPU unit to the processing capability of the own unit.
 したがって、前記CPUユニットは、前記各処理を繰り返し実行する前に予め取得しておいた前記相手方のCPUユニットの処理能力を考慮して、前記各処理についての前記判定に用いる前記待ち時間を、設定することができるとの効果を奏する。 Therefore, the CPU unit sets the waiting time used for the determination on each process in consideration of the processing capability of the partner CPU unit acquired in advance before repeatedly executing each process. The effect is that it can be done.
 本発明の一態様に係るCPUユニットにおいて、前記設定部は、前記自己診断処理、前記命令実行処理、および、前記I/Oリフレッシュ処理の各々の前記待ち時間を、前記自己診断処理、前記命令実行処理、および、前記I/Oリフレッシュ処理の各々の実行に係る、自ユニットの処理能力と、前記相手方のCPUユニットの処理能力との比を考慮して設定してもよい。 In the CPU unit according to an aspect of the present invention, the setting unit may determine the waiting time of each of the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing by the self-diagnosis processing, the instruction execution processing. The setting may be made in consideration of the ratio between the processing capacity of the own unit and the processing capacity of the CPU unit of the other party, relating to the execution of the processing and the I / O refresh processing.
 前記の構成によれば、前記CPUユニットは、前記自己診断処理、前記命令実行処理、および、前記I/Oリフレッシュ処理の各々の実行に係る、自ユニットと前記相手方のCPUユニットとの処理能力における違いを考慮して、各処理の前記待ち時間を設定する。 According to the above configuration, the CPU unit is configured to execute the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing, respectively, in the processing capability of the own unit and the partner CPU unit. The waiting time for each process is set in consideration of the difference.
 したがって、前記CPUユニットは、前記自己診断処理、前記命令実行処理、および、前記I/Oリフレッシュ処理の各々の前記待ち時間を、各処理に係る自ユニットおよび前記相手方のCPUユニットの各々の処理能力に応じて設定できるとの効果を奏する。 Therefore, the CPU unit sets the waiting time of each of the self-diagnosis process, the instruction execution process, and the I / O refresh process to the processing capability of the own unit and the counterpart CPU unit for each process. It can be set according to the effect.
 本発明の一態様に係る制御方法は、コントローラにおいて二重化されるCPUユニットの制御方法であって、自ユニットの処理能力と、二重化される相手方のCPUユニットの処理能力との比を考慮して、待ち時間を設定する設定ステップと、自ユニットにおける処理の実行完了時点から、前記設定ステップにて設定された前記待ち時間を経過するまでに、前記相手方のCPUユニットにおける前記処理の実行完了を確認できないと、前記相手方のCPUユニットに異常が発生したと判定する判定ステップと、を含んでいる。 The control method according to one embodiment of the present invention is a control method for a CPU unit that is duplicated in a controller, and in consideration of a ratio between the processing capability of the own unit and the processing capability of the other CPU unit that is duplicated, The completion of the execution of the process by the partner CPU unit cannot be confirmed from the setting step of setting the waiting time and the completion of the execution of the process in the own unit until the elapse of the waiting time set in the setting step And a determining step of determining that an abnormality has occurred in the partner CPU unit.
 前記の方法によれば、前記制御方法は、自ユニットと前記相手方のCPUユニットとの前記処理能力の比を考慮して設定した前記待ち時間を用いて、自ユニットと前記相手方のCPUユニットとの同期(つまり、実行完了した処理の一致)を判定する。 According to the above method, the control method uses the waiting time set in consideration of the processing capacity ratio between the own unit and the partner CPU unit, and uses the waiting time between the own unit and the partner CPU unit. The synchronization (that is, the coincidence of the executed processing) is determined.
 例えば、前記相手方のCPUユニットの方が自ユニットより性能が高い(つまり、処理の実行速度が早い)場合、前記制御方法は、前記待ち時間として、予め決められた「通常の待ち時間」を設定する。また、相手方のCPUユニットと自ユニットとで性能Abが等しい場合、前記制御方法は、待ち時間Twとして、予め決められた「通常の待ち時間」を設定する。 For example, if the partner CPU unit has higher performance than the own unit (that is, the execution speed of the process is faster), the control method sets a predetermined “normal waiting time” as the waiting time. I do. If the performance Ab is equal between the other CPU unit and the own unit, the control method sets a predetermined “normal waiting time” as the waiting time Tw.
 前記相手方のCPUユニットの方が自ユニットより性能が高い場合、自ユニットが或る処理の実行を完了した時点では既に前記相手方のCPUユニットは前記或る処理の実行を完了しているはずである。また、相手方のCPUユニットと自ユニットとで性能Abが等しい場合、自ユニットが或る処理の実行を完了した時点で、相手方のCPUユニットは前記或る処理の実行を完了するはずである。 If the partner CPU unit has higher performance than the own unit, the partner CPU unit should have already completed execution of the certain process when the own unit completes execution of a certain process. . If the performance Ab is equal between the partner CPU unit and the own unit, the partner CPU unit should complete the execution of the certain process when the own unit completes the execution of a certain process.
 したがって、前記相手方のCPUユニットの方が自ユニットより性能が高い場合でも、前記制御方法は、前記待ち時間として、前記「通常の待ち時間」を設定することで、前記相手方のCPUユニットに異常が発生したか否かを正確に判定することができる。 Therefore, even when the other CPU unit has higher performance than the own CPU unit, the control method sets the “normal waiting time” as the waiting time so that the other CPU unit has no abnormality. It can be accurately determined whether or not the occurrence has occurred.
 例えば、前記相手方のCPUユニットの方が自ユニットより性能が低い(つまり、処理の実行速度が遅い)場合、前記制御方法は、前記待ち時間として、「前記通常の待ち時間に、性能差を考慮した調整待ち時間を加えた期間」を設定する。具体的には、「自ユニットにおける前記処理の実行完了時点と、前記相手方のCPUユニットにおける前記処理の実行が完了すると予想される時点との差」を、前記調整待ち時間とする。 For example, when the partner CPU unit has lower performance than the own CPU unit (that is, the execution speed of the process is slower), the control method sets “the normal waiting time to the performance difference in consideration of the performance difference” as the waiting time. Period after adding the adjusted waiting time ”. Specifically, the "difference between the time when the execution of the process in the own unit is completed and the time when the execution of the process in the partner CPU unit is expected to be completed" is defined as the adjustment waiting time.
 前記相手方のCPUユニットの方が自ユニットより性能が低い場合、自ユニットが或る処理の実行を完了した時点では、前記相手方のCPUユニットは、未だ前記或る処理の実行を完了していない。そこで、前記制御方法は、「前記相手方のCPUユニットにおける前記処理の実行が完了すると予想される時点」まで待機し、その後、「通常の待ち時間」が経過するまでに前記相手方のCPUユニットにおける前記処理の実行完了を確認できるかを判定する。つまり、前記制御方法は、自ユニットにおける前記処理の実行完了時点から、「前記調整待ち時間を、前記通常の待ち時間に加えた期間」が経過するまでに、前記相手方のCPUユニットにおける前記処理の実行完了を確認できるかを判定する。 (4) When the performance of the partner CPU unit is lower than that of the own unit, the partner CPU unit has not completed execution of the certain process at the time when the self unit completes execution of a certain process. Therefore, the control method waits until “the time point at which the execution of the processing in the other party's CPU unit is expected to be completed”, and then, until the “normal waiting time” elapses, It is determined whether the execution completion of the process can be confirmed. In other words, the control method performs the processing of the processing in the partner CPU unit from the time when the execution of the processing in the own unit is completed to the time when “the period in which the adjustment waiting time is added to the normal waiting time” elapses. Determine whether execution completion can be confirmed.
 したがって、前記相手方のCPUユニットの方が自ユニットより性能が低い場合でも、前記制御方法は、前記待ち時間として、「前記調整待ち時間を、前記通常の待ち時間に加えた期間」を設定することで、前記の判定を正確に実行できる。 Therefore, even when the performance of the other CPU unit is lower than that of the own CPU unit, the control method may set “a period obtained by adding the adjustment waiting time to the normal waiting time” as the waiting time. Thus, the above determination can be accurately performed.
 以上の通り、前記制御方法は、自ユニットと前記相手方のCPUユニットとで前記処理能力が一致しない場合であっても、自ユニットと前記相手方のCPUユニットとの前記処理能力の違いを考慮した、適切な前記待ち時間を設定できるとの効果を奏する。すなわち、前記制御方法は、二重化される相手方のCPUユニットと自ユニットとの処理能力の違いを考慮して、不要な待ち時間を設けずに、同期チェック処理を正確に行なうことができるとの効果を奏する。 As described above, the control method considers the difference in the processing capabilities between the own unit and the counterpart CPU unit even when the processing capacities of the own unit and the counterpart CPU unit do not match. This has an effect that an appropriate waiting time can be set. That is, the control method can accurately perform the synchronization check processing without providing an unnecessary waiting time in consideration of the difference in processing capacity between the CPU unit of the other party and the own unit to be duplicated. To play.
 本発明は上述した各実施形態に限定されるものではなく、請求項に示した範囲で種々の変更が可能であり、異なる実施形態にそれぞれ開示された技術的手段を適宜組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。 The present invention is not limited to the embodiments described above, and various modifications are possible within the scope shown in the claims, and embodiments obtained by appropriately combining technical means disclosed in different embodiments. Is also included in the technical scope of the present invention.
   10 PLC
   20 PLC
 100A 第1CPUユニット(CPUユニット)
 100B 第2CPUユニット(CPUユニット)
 300A 第1CPUユニット(CPUユニット)
 300B 第2CPUユニット(CPUユニット)
  160 時間設定部(設定部)
  360 時間設定部(設定部)
  170 判定部
  370 判定部
   Ab 性能(処理能力)
   Tw 待ち時間
10 PLC
20 PLC
100A first CPU unit (CPU unit)
100B 2nd CPU unit (CPU unit)
300A first CPU unit (CPU unit)
300B 2nd CPU unit (CPU unit)
160 Time setting part (setting part)
360 time setting part (setting part)
170 Judgment unit 370 Judgment unit Ab Performance (processing capacity)
Tw wait time

Claims (7)

  1.  コントローラにおいて二重化されるCPUユニットであって、
     自ユニットの処理能力と、二重化される相手方のCPUユニットの処理能力との比を考慮して、待ち時間を設定する設定部と、
     自ユニットにおける処理の実行完了時点から、前記設定部によって設定された前記待ち時間を経過するまでに、前記相手方のCPUユニットにおける前記処理の実行完了を確認できないと、前記相手方のCPUユニットに異常が発生したと判定する判定部と、
    を備えるCPUユニット。
    A CPU unit duplicated in the controller,
    A setting unit for setting a waiting time in consideration of a ratio between the processing capacity of the own unit and the processing capacity of the CPU unit of the other party to be duplicated;
    If it is not possible to confirm the completion of the execution of the processing by the other CPU unit from the time when the execution of the processing in the own unit is completed and before the elapse of the waiting time set by the setting unit, an abnormality occurs in the other CPU unit. A determining unit that determines that the occurrence has occurred;
    CPU unit comprising:
  2.  前記処理は、自ユニットのハードウェアに異常がないかを診断する自己診断処理、前記相手方のCPUユニット以外の外部装置を制御する信号を生成する命令実行処理、および、前記相手方のCPUユニット以外の外部装置との間でデータを交換するI/Oリフレッシュ処理を含み、
     前記設定部は、前記自己診断処理、前記命令実行処理、および、前記I/Oリフレッシュ処理の各々について、前記待ち時間を設定し、
     前記判定部は、前記自己診断処理、前記命令実行処理、および、前記I/Oリフレッシュ処理の各々について、前記判定を実行する
    請求項1に記載のCPUユニット。
    The processing includes a self-diagnosis processing for diagnosing whether there is any abnormality in the hardware of the own unit, an instruction execution processing for generating a signal for controlling an external device other than the counterpart CPU unit, and an instruction execution processing other than the counterpart CPU unit. Including an I / O refresh process for exchanging data with an external device,
    The setting unit sets the waiting time for each of the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing,
    The CPU unit according to claim 1, wherein the determination unit performs the determination for each of the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing.
  3.  前記自己診断処理、前記命令実行処理、および、前記I/Oリフレッシュ処理を、この順で繰り返し実行する前に、前記相手方のCPUユニットの処理能力を、前記相手方のCPUユニットから取得する二重化処理を、1回実行する
    請求項2に記載のCPUユニット。
    Before repeatedly executing the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing in this order, a duplex processing for acquiring the processing capacity of the partner CPU unit from the partner CPU unit is performed. 3. The CPU unit according to claim 2, wherein the CPU unit is executed once.
  4.  前記設定部は、前記自己診断処理、前記命令実行処理、および、前記I/Oリフレッシュ処理の各々の前記待ち時間を、前記自己診断処理、前記命令実行処理、および、前記I/Oリフレッシュ処理の各々の実行に係る、自ユニットの処理能力と、前記相手方のCPUユニットの処理能力との比を考慮して設定する
    請求項2または3に記載のCPUユニット。
    The setting unit may determine the waiting time of each of the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing by the self-diagnosis processing, the instruction execution processing, and the I / O refresh processing. 4. The CPU unit according to claim 2, wherein the CPU unit is set in consideration of a ratio between a processing capability of the own unit and a processing capability of the partner CPU unit in each execution.
  5.  コントローラにおいて二重化されるCPUユニットの制御方法であって、
     自ユニットの処理能力と、二重化される相手方のCPUユニットの処理能力との比を考慮して、待ち時間を設定する設定ステップと、
     自ユニットにおける処理の実行完了時点から、前記設定ステップにて設定された前記待ち時間を経過するまでに、前記相手方のCPUユニットにおける前記処理の実行完了を確認できないと、前記相手方のCPUユニットに異常が発生したと判定する判定ステップと、
    を含む制御方法。
    A method for controlling a CPU unit that is duplicated in a controller,
    A setting step of setting a waiting time in consideration of a ratio between the processing capacity of the own unit and the processing capacity of the CPU unit of the other party to be duplicated;
    If it is not possible to confirm the completion of the execution of the processing by the other CPU unit from the time when the execution of the processing in the own unit is completed to the time when the waiting time set in the setting step elapses, the other CPU unit may fail. A determining step of determining that an error has occurred;
    Control method including:
  6. 請求項1から4のいずれか一項に記載のCPUユニットとしてコンピュータを機能させるための情報処理プログラムであって、前記各部としてコンピュータを機能させるための情報処理プログラム。 An information processing program for causing a computer to function as the CPU unit according to any one of claims 1 to 4, wherein the information processing program causes the computer to function as each of the units.
  7. 請求項6に記載の情報処理プログラムを記録したコンピュータ読み取り可能な記録媒体。 A computer-readable recording medium storing the information processing program according to claim 6.
PCT/JP2019/036311 2018-09-25 2019-09-17 Cpu unit, cpu unit control method, information processing program, and recording medium WO2020066737A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201980051961.6A CN112534411A (en) 2018-09-25 2019-09-17 CPU unit, control method for CPU unit, information processing program, and recording medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2018-179162 2018-09-25
JP2018179162A JP7028124B2 (en) 2018-09-25 2018-09-25 CPU unit, CPU unit control method, information processing program, and recording medium

Publications (1)

Publication Number Publication Date
WO2020066737A1 true WO2020066737A1 (en) 2020-04-02

Family

ID=69950163

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2019/036311 WO2020066737A1 (en) 2018-09-25 2019-09-17 Cpu unit, cpu unit control method, information processing program, and recording medium

Country Status (3)

Country Link
JP (1) JP7028124B2 (en)
CN (1) CN112534411A (en)
WO (1) WO2020066737A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62159240A (en) * 1986-01-08 1987-07-15 Hitachi Ltd Control system for duplicated device
JP2006155239A (en) * 2004-11-29 2006-06-15 Canon Inc Software system, and control method, control program and storage medium for software system
JP2012128695A (en) * 2010-12-15 2012-07-05 Fuji Electric Co Ltd Input/output duplexing apparatus

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS57164345A (en) * 1981-04-01 1982-10-08 Nec Corp Failure detecting system for composite microcomputer
JP4787419B2 (en) * 2001-04-11 2011-10-05 株式会社大和証券グループ本社 Distributed processing server, distributed processing system, distributed processing method, and program
JP2004062603A (en) * 2002-07-30 2004-02-26 Dainippon Printing Co Ltd Parallel processing system, server, parallel processing method, program and recording medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62159240A (en) * 1986-01-08 1987-07-15 Hitachi Ltd Control system for duplicated device
JP2006155239A (en) * 2004-11-29 2006-06-15 Canon Inc Software system, and control method, control program and storage medium for software system
JP2012128695A (en) * 2010-12-15 2012-07-05 Fuji Electric Co Ltd Input/output duplexing apparatus

Also Published As

Publication number Publication date
JP2020052550A (en) 2020-04-02
CN112534411A (en) 2021-03-19
JP7028124B2 (en) 2022-03-02

Similar Documents

Publication Publication Date Title
KR100566338B1 (en) Fault tolerant computer system, re-synchronization method thereof and computer-readable storage medium having re-synchronization program thereof recorded thereon
KR101560497B1 (en) Method for controlling reset of lockstep replicated processor cores and lockstep system using the same
JP2006338094A (en) Multiple-system electronic computer
JP2017146897A (en) Microcontroller and electronic control unit
JP2006178636A (en) Fault tolerant computer and its control method
JP2019128638A (en) Duplex control system
WO2020066737A1 (en) Cpu unit, cpu unit control method, information processing program, and recording medium
US11639961B2 (en) Failure detection circuit and semiconductor device
JP2009098988A (en) Fault tolerant computer system
JP7073285B2 (en) Operation verification program, operation synchronization method and abnormality detection device
JP7047728B2 (en) Controller and controller control method
CN109308234B (en) Method for controlling multiple controllers on board card to carry out active/standby switching
JP7211173B2 (en) COMMUNICATION CONTROL DEVICE, ELECTRONIC DEVICE, COMMUNICATION CONTROL METHOD, AND COMMUNICATION CONTROL PROGRAM
JP4810488B2 (en) Duplex control apparatus and tracking method thereof
JP2005092695A (en) Duplication controller, and method for determining equalization mode thereof
JP5604799B2 (en) Fault tolerant computer
JP6977623B2 (en) Communications system
JPH0462081B2 (en)
JP2998804B2 (en) Multi-microprocessor system
JP4613019B2 (en) Computer system
JP6988863B2 (en) Protocol converters, data transmission methods, data transmission programs, and data transmission systems
JP2645880B2 (en) System clock duplication method
JPH05341803A (en) Duplex switching device for programmable controller
JP2006092061A (en) Duplex system of programmable controller
JP5449906B2 (en) Diagnostic method of signal for abnormal processing and duplex computer system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19865740

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19865740

Country of ref document: EP

Kind code of ref document: A1