6. HX3040 Redundancy
264
Operation Principles
This section describes the redundant CPU functions, along with its behavior and states. In addition to
that, it presents the concepts as well as programming and configuration constraints.
Single Redundant Project
Due to the identification register previously described, there is a single project for the redundant
CPU, identical for both CPUA and CPUB.
Configuration parameters that must be different for CPUA and CPUB (e.g. Ethernet interface IP
addresses) are doubled in the redundant CPU project (one for the CPUA and another for the CPUB).
Each CPU will take into account the correspondent one, after analyzing its identification register.
Redundant Project Structure
Redundancy Template
A redundant CPU project is automatically created from a model, named Redundancy Template.
Tasks and basic POUs (program) are also created. The following sections describe the creation
process.
Cyclic Tasks: MainTask and ProtTask
The redundant CPU project can present two tasks: MainTask and ProtTask, both cyclic. The next
item is optional and is created by the Wizard. The user can adjust the task cycle time.
MainPrg Program
The MainTask is connected to a single POU (program type), called MainPrg. The MainPrg program
is created automatically.
The following code refers to the MainPrg, in ST language:
IF isFirstCycle THEN
StartPrg();
isFirstCycle := FALSE;
ELSE
NonSkippedPrg();
IF fbRedundancyManagement.bActiveCPU THEN
EngineeringPrg();
AlarmPrg();
UserPrg();
END_IF;
END_IF;
MainPrg calls two other POUs of program type:
In the first execution cycle, only StartPrg is called. It runs in both Active and Non-Active CPU,
as MainPrg variables are non-redundant.
After the first execution cycle, NonSkippedPrg is always called, as it runs in both Active and
Non-Active CPU. As for the EngineeringPrg, AlarmPrg e UserPrg POUs, they are called only
whenever the condition “fbRedundancyManagement.bActiveCPU = TRUE” is true; in other
words, when the CPU is in active state.
Therefore, NonSkippedPrg will always run in both CPUs (CPUA and CPUB), regardless of its
redundancy state. As for the EngineeringPrg, AlarmPrg and UserPrg POUs, they will run only in the
CPU with active state.