System and Operating Modes of the S7-400H
6.3 Operating states of the CPUs
Operating states describe the behavior of the CPUs at any given point in time.
Knowledge of the operating states of the CPUs is useful for programming startup, the test, and the error diagnostics.
Operating states from POWER ON to system redundancy
Generally speaking, the two CPUs enjoy equal rights so that either can be the master or the standby CPU. For reasons of legibility, the illustration presumes that the master CPU (CPU 0) is started up before the standby CPU (CPU 1) was switched on.
Figure 6-2 deals with the operating states of the two CPUs, from POWER ON up to system redundancy. The HOLD (refer to chapter 6.3.5) and
TROUBLESHOOTING (refer to chapter 6.3.6) operating states are not included, because these take a special position.
Updating dynamic
Figure 6-2 System and operating modes of the redundant system
长沙工控帮教育科技有限公司整理
Explanations relating to Figure 6-2
Table 6-2 Explanations relating to figure 6-2 System and Operating Modes of the Fault-Tolerant System
Item Description
1. Once the power supply has been turned on, the two CPUs (CPU 0 and CPU 1) are in the STOP mode.
2. CPU 0 goes into STARTUP state and executes OB100 or OB102 according to the startup mode, see also chapter 6.3.2.
3. If startup is successful, the master CPU (CPU 0) changes to stand--alone mode.
Now, only themaster CPU now executes the user program.
At the transition to the COUPLING system state, no block may be opened by the ”Monitor” option, and no tag table may be active.
4. If the standby CPU (CPU 1) requests COUPLING, the master and standby CPUs compare their user programs. If any differences are found, the master CPU updates the user program of the standby CPU, see also chapter 6.3.3.
5. The update starts when coupling is completed, see also chapter 7.3.2. The master CPU updates the dynamic data of the standby CPU in this step.
Dynamic data are inputs, outputs, timers, counters, flags and data blocks..
The memory content is thus identical in both CPUs as a result of the update, see also chapter 6.3.3.
6. The master and standby CPUs are in RUN after the update and process the user program in synchronism.
Exception: master/standby changeover for configuration/program modification.
redundant state is only possible if both CPUs are of the same release and the same firmware version.
6.3.1 STOP operating state
Except for the additions described below, the behavior of S7-400H CPUs in STOP corresponds with that of standard S7-400 CPUs.
When you download a configuration to one of the CPUs while both are in STOP, make allowances for the points outlined below:
• Start the CPU to which you downloaded the configuration first, in order to set it up for master mode.
• By initiating the system startup request on the PG, you first start the CPU to which an online connection exists,regardless of the master or standby status.
Notice
A system startup may trigger a master-standby changeover.
长沙工控帮教育科技有限公司整理
CPU memory reset
The CPU memory reset function affects only the selected CPU. To reset both CPUs, you must do so successively.
6.3.2 STARTUP operating state
Except for the additions described below, the STARTUP behavior of S7-400H CPUs corresponds with that of standard S7-400 CPUs.
Startup
The redundant CPUs distinguish between the cold restart and restart (warm restart).
Fault-tolerant CPUs do not support hot restarts.
Startup processing of the master CPU
The startup system status of an S7-400H is always processed by the master CPU..
During STARTUP, the master CPU compares the online I/O configuration with the hardware configuration that you created offline in STEP 7. If any differences are found, the master CPU reacts in the same way as a standard S7-400 CPU.
The master CPU checks and configures:
• the switched I/O
• its assigned one--sided I/O
Startup of the standby CPU
The standby startup routine does not call an OB100 or OB102.
The standby CPU checks and configures:
• its assigned one--sided I/O
Further information
For detailed information on STARTUP states, refer to the Programming with STEP 7 manual.
长沙工控帮教育科技有限公司整理
6.3.3 COUPLING and UPDATE operating states
The master CPU checks and updates the memory contents of the standby CPU before the redundant system assumes redundant mode. This action involves two successive phases, namely the coupling and update phases.
The master CPU is always in RUN and the standby CPU is in COUPLING or UPDATE status during the coupling and update phases.
In addition to the coupling and update functions which are carried out in order to establish system redundancy, the system also supports coupling and updating in combination with master/standby changeover.
For detailed information on coupling and updating, refer to chapter 7.
6.3.4 Operating State RUN
Except for the additions described below, the RUN behavior of S7-400H CPUs corresponds with that of standard S7-400 CPUs.
The user program is executed by at least one of the two CPUs in the following system modes:
• Stand--alone mode
• Coupling, updating
• Redundant mode
Stand--alone mode, coupling, updating
In the system states mentioned above, the master CPU is in RUN and executes the user program in stand--alone mode.
Redundant system Mode
The master and standby CPUs are always in RUN when operating in redundant state, execute the user program in synchronism, and perform mutual checks.
In redundant state, it is not possible to test the user program with breakpoints.
Redundant state is only supported with CPUs of the same release and firmware version. Redundancy will be lost if one of the error listed in Table 6-3 occurs.
Table 6-3 Causes of error leading to redundancy loss
Cause of error Reaction
Failure of one CPU Refer to chapter 11.1.1
Failure of the redundancy coupling (synchronization module or fiber-optic cable)
Refer to chapter 11.1.5
RAM comparison error See chapter 6.3.6.
长沙工控帮教育科技有限公司整理
Redundant use of modules
The following rule applies to redundant state:
Modules interconnected in redundant mode, such as DP slave interface module IM 153-2, must have the same order number, version and firmware version.
6.3.5 HOLD operating state
Except for the additions described below, the HOLD behavior of S7-400H CPUs corresponds with that of standard S7-400 CPUs.
The HOLD state takes an exceptional position, for it is used only for test purposes.
Prerequisite of the HOLD state
A transition to HOLD is only available during STARTUP and in RUN of the stand--alone unit.
Characteristics
• Coupling and update operations are not available while the redundant CPU is in HOLD state, and the standby CPU remains in STOP and outputs a diagnostics message.
• It is not possible to set breakpoints if the redundant system remains in redundant state.
长沙工控帮教育科技有限公司整理
6.3.6 TROUBLESHOOTING operating state
The TROUBLESHOOTING state is only available in redundant system state.
The self-test routine compares the master and standby CPUs, and reports an error if any differences are found. Errors could be caused by hardware faults, checksum errors and RAM/PIO comparison errors.
The following events will trigger the TROUBLESHOOTING state:
1. If a one-sided call of OB121 (only on one CPU) is output in redundant mode, the CPU assumes a hardware fault and enters the TROUBLESHOOTING state. The partner CPU assumes master mode, and continues operation in stand--alone mode if required.
2. When a checksum error occurs on only one of the redundant CPUs, this CPU will enter the TROUBLESHOOTING state. The partner CPU assumes master mode, and continues operation in stand--alone mode if required.
3. When a RAM/PIO comparison error is detected in redundant mode, the standby CPU enters the TROUBLESHOOTING state (defaultreaction), and the master CPU continues operation in stand--alone mode.
The reaction to RAM/PIQ comparison errors can be modified in the configuration (for example, the standby CPU goes into STOP).
4. When a multpile--bit error occurs on only one of the redundant CPUs, this CPU will enter the TROUBLESHOOTING state. The partner CPU assumes master mode, and continues operation in stand--alone mode if required.
However: OB84 is called when a single--bit error occurs on one of the
redundant CPUs, and the CPU will not enters the TROUBLESHOOTING state.
The TROUBLESHOOTING state is set in order to localize a faulty. The standby CPU executes the entire self-test, while the master CPU remains in RUN.
When a hardware error is detected, the CPU enters the DEFECTIVE status, otherwise the CPU is coupled again.
The redundant system recovers redundant state, and an automatic master-standby changeover will be carried out. This ensures that when the next error is detected in troubleshooting mode, the hardware of the previous master CPU is tested.
The CPU inTROUBLESHOOTING state does not allow online access, for
example, by the PG. The TROUBLESHOOTING state is indicated at the RUN and STOP LEDs. See chapter 4.3.
For further information on the self-test, refer to chapter 6.4.
长沙工控帮教育科技有限公司整理