6. HX3040 Redundancy
265
Oppositely to the MainPrg, which cannot and must not be modified, the user may modify other
programs. When the redundant project is created from the Redundancy Template, the programs are
“empty”, although it is possible to the user insert them a code.
StartPrg Program
This POU runs only once, at the first cycle of each one of the CPUs.
EngineeringPrg Program
This POU is blocked for edition and the program automatically generates it. It maps the variables
used for engineering conversions. See Engineering Conversion chapter.
UserPrg Program
The main goal of this program, which is executed only in the active CPU, is to control the final user
process.
This program normally acts over the redundant variables, among which are the direct representation
variables (%I and %Q) associated to the local I/O system. For further information see Redundant
CPU Programming- MainTask.
NonSkippedPrg Program
This program runs in both CPUs (CPUA and CPUB) regardless of the redundancy state. It is
typically used for functions such as:
Manage switchover conditions, which normally are not contemplated by, default by the
redundant CPU, that is, they can vary from user to user. E.g., a given user will be able to execute
a switchover to the Stand-by CPU if the Active CPU is not in communication with the SCADA
system. As for other user, for instance, one would not whish a switchover on this situation.
Other activities, which, for some reason, need to be executed in both the Active CPU and the
Standby CPU.
For further information see Redundant CPU Programming- MainTask - NonSkippedPrg.
AlarmPrg Program
In this POU the system generates the automatic code responsible for assigning the alarm, which can
be set in the Alarms tab of the HX3040 CPU.
ProtPrg Program
The ProtTask is associated to a single POU (program type). This program is created in case the user
defines its use during the project creation for redundancy purposes.
The following code refers to the ProtPrg, in ST language:
NonSkippedProtPrg();
IF fbRedundancyManagement.bActiveCPU THEN
UserProtPrg();
END_IF
ProtPrg call other POUs of program type:
NonSkippedPrg is always called, as it runs in both Active and Non-Active CPU and presents a
higher priority than NonSkippedPrg. As for the UserProtPrg it is called only whenever the
condition “fbRedundancyManagement.bActiveCPU = TRUE” is true; in other words, when the
CPU is in active state.