6. HX3040 Redundancy
289
StartPrg Program
In this POU, the user can create logics and loops, and start variables as well. Such variables will run
only once at the first cycle of each RTU, and thus will not be called again during the project
execution.
If the user loads a new application, or if the PLC is turned on again, as well as under Reset Origin,
Reset Cold and Reset Warm conditions, this POU will be executed again.
UserPrg Program
In this POU, the user must create the main application, which is responsible for controlling the
process. This POU is called by the main POU (MainPrg), and it runs only in the Active CPU.
The user can also create additional POUs (program, function or function block), and call them or
instantiate them within the UserPrg for structuring purposes. You can also call functions and
instantiate function blocks defined in libraries.
Notice that all symbolic variables and function blocks instances defined in UserPrg will be redundant
variables.
Symbolic variables which are defined in additional POUs of program type, even when called within
UserPrg will only be redundant variables if you make them so (selecting this option in the
Redundancy Configuration object). By default, all user-created POUs are initially redundant.
ATTENTION:
Do not use VAR_TEMP variables in the redundant program.
NonSkippedPrg Program
This POU is intended for controls that must be performed on both CPUs (CPUA and CPUB),
regardless of their state redundancy. This POU is called by the main POU (MainPrg).
Notice that all symbolic variables and function blocks instances defined in NonSkippedPrg will be
non-redundant variables.
The user can also create additional POUs (program, function or function block), and call them or
instantiate them within the NonSkippedPrg for structuring purposes of your program. You can also
call functions and instantiate function blocks defined in libraries.
ATTENTION:
When you call additional program POUs within NonSkippedPrg, clear this item in the MasterTool
Redundancy Configuration window. By default, the symbolic variables declared within these POUs
are redundant but, within the NonSkippedPrg, one usually wants non-redundant variables. Normally
the NonSkippedPrg code is small, and it dismisses such POUs in its organization.
ATTENTION:
Do not use function blocks TOF_RET, TON_RET, TOF and TON in NonSkippedPrg programs. See
Limitations in the Programming of a Redundant CPU .
Disables GVL
The "Disables" GVL declares the disabling variables of MODBUS Master/Client requests. It is not
mandatory but is recommended to use the automatic generation of these variables, by clicking in the
correspondent item in the device requests tab. These variables are declared with BOOL type and
follow the subsequent structure:
Variable declaration of request disabling:
[Device name]_DISABLE_[Request number] : BOOL;