6. Redundancy with NX3030 CPU
315
ï‚· Do not mix symbolic variables declaration with ATs in the GVLs. Separate GVLs must be
created where in one the AT variables will be declared and in another, the symbolic variables
ï‚· Do not store a variable address in a redundant variable (use a redundant variable as a pointer), as
the variable addresses may be different in the PLCA and PLCB
ï‚· Do not use the function blocks for RTC reading and writing in redundant POUs. More details can
be found on the chapter RTC Clock
Non-redundant Program Limitations (NonSkippedPrg)
In a POU from the program type which aren’t redundant, the case of a NonSkippedPrg POU, the
following limitations must be respected for a correct functioning of the half-clusters:
 The traditional function blocks TON and TOF can’t be used as they use the IEC timer. When the
Stand-by PLC goes to Active state (with the other half-cluster coming out of Active state), the
IEC timer is synchronized, causing a discontinuity in the timer value. The function blocks
TON_NR and TOF_NR must be used instead, available in the NextoStandard library. See
Configuration – Non-Redundant Timer
ï‚· POUs from the program type written in the SFC language (Sequence Function Chart) must not be
used, as they use the IEC timer for transition timing
ï‚· Do not mix symbolic variables declaration with ATs in the GVLs. Separate GVLs must be
created where in one the AT variables will be declared and in another, the symbolic variables
Getting the Redundancy State of a Half-Cluster
It is possible to verify the redundancy state of a half-cluster in the Redundancy Diagnostics Structure:
VAR
eRedStateLocal : REDUNDANCY_STATE;
END_VAR
eRedStateLocal := DG_NX4010.tRedundancy.RedDgnLoc.sGeneral_Diag.eRedState;
This way, the user can control a program logic that depends on redundancy state of the PLC.
Reading Non-Redundant Diagnostics
A redundant project, besides present redundant diagnostics (Redundancy Diagnostics Structure or the
diagnostics from a PROFIBUS remote), presents also non-redundant diagnostics (diagnostics from
the modules NX5000, NX5001, NX3030, etc.). These non-redundant diagnostics could be invalid
and must not be considered at the first instants in Active state, as they aren’t synchronized with the
other PLC (the diagnostic state when the remote PLC was active is unknown). Therefore, these
diagnostics must be ignored during the first moments in Active state, until they have valid values.
Typically the time during which the diagnostics should not be considered is 5 s.
The example below shows how to not consider the diagnostics bSlaveNotPresent and
bPbusCommFail from the NX5000 PROFIBUS Master module:
Logic in NonSkippedPrg:
PROGRAM NonSkippedPrg
VAR
TON_DiagEnable : TON_NR;
bDiagEnable : BOOL;
bIsActiveState : BOOL;
bIsActiveState_old : BOOL;
END_VAR
bIsActiveState := (DG_NX4010.tRedundancy.RedDgnLoc.sGeneral_Diag.eRedState =
REDUNDANCY_STATE.ACTIVE);
TON_DiagEnable(IN:= (bIsActiveState = bIsActiveState_old), PT:= T#5S, Q=> bDiagEnable);
bIsActiveState_old := bIsActiveState;
Logic in ActivePrg:
IF NonSkippedPrg.bDiagEnable THEN
IF DG_NX5001.tGeneral.bSlaveNotPresent OR DG_NX5001.tGeneral.bPbusCommFail THEN