Hot Standby DDT Data Structure
Original instructions
Introduction
The T_M_ECPU_HSBY DDT is the exclusive interface between the M580 Hot Standby system and the application running in a BMEH58•040 or BMEH58•040S CPU. The DDT instance should appear as: ECPU_HSBY_1.
NOTICE
RISK OF UNINTENDED OPERATION
Review and manage the T_M_ECPU_HSBY DDT for proper operation of the system.
Failure to follow these instructions can result in equipment damage.
The T_M_ECPU_HSBY DDT presents three distinct sections:
Local PAC versus Remote PAC
The T_M_ECPU_HSBY DDT employs the terms local and remote:
Data Boundary Alignment
M580 BMEH58•040 and BMEH58•040S CPUs feature a 32-bit data design. For this reason, stored data objects are placed on a four-byte boundary.
T_M_ECPU_HSBY DDT
CAUTION
RISK OF UNINTENDED OPERATION
Before you execute a swap command (either by application logic or in the Control Expert GUI) confirm that the standby PAC is ready to assume the primary role by verifying that the value of its REMOTE_HSBY_STS.EIO_ERROR bit is 0.
Failure to follow these instructions can result in injury or equipment damage.
The T_M_ECPU_HSBY DDT consists of these objects:
Element
Type
Description
Written by
REMOTE_STS_VALID
BOOL
  • True: Both HSBY_LINK_ERROR and HSBY_SUPPLEMENTARY_LINK_ERROR are set to 0.
  • False (default): Both HSBY_LINK_ERROR and HSBY_SUPPLEMENTARY_LINK_ERROR are set to 1.
System
APP_MISMATCH
BOOL
The original application in the two PACs is different. (Default = false)
System
LOGIC_MISMATCH_ALLOWED
BOOL
  • True: The standby remains standby in case of logic mismatch.
  • False (default): The standby goes into wait state in case of logic mismatch.
Application
LOGIC_MISMATCH
BOOL
Different revisions of the same application exist in the two PACs. (Default = false)
System
SFC_MISMATCH
BOOL
  • True: The applications in the primary PAC and the standby PAC are different in at least one SFC section. In the event of a switchover, the graphs that are different are reset to their initial state.
  • False (default): All SFC sections are identical.
System
OFFLINE_BUILD_MISMATCH
BOOL
The two PACs are running different revisions of the same application.In this condition:
  • A data exchange between the two PACs may not be possible.
  • A swap or switchover may not be bumpless.
  • Neither PAC can be standby
(Default = false)
System
APP_BUILDCHANGE_DIFF
UINT
The number of build change differences between the applications in the primary PAC versus the standby PAC. Evaluated by the primary.
System
MAX_APP_BUILDCHANGE_DIFF
UINT
Maximum number of build change differences permitted by the Hot Standby system, from 0...50 (default = 20). Set in the Hot Standby tab as Number of modifications.
Application
FW_MISMATCH_ALLOWED
BOOL
Allows mismatched firmware between primary and standby CPUs:
  • True: the standby remains standby in case of FW mismatch.
  • False (default): the standby goes into wait state in case of FW mismatch. (Default = false)
Application
FW_MISMATCH
BOOL
The OS are different in the two PACs. (Default = false)
System
DATA_LAYOUT_MISMATCH
BOOL
The Data layout are different on the two PACs. The data transfer is partially performed. (Default = false)
System
DATA_DISCARDED
UINT
Number of KB sent by the primary and discarded by the standby (rounded up to the next KB). Represents data for variables added to primary, but not to standby. (Default = 0)
System
DATA_NOT_UPDATED
UINT
Number of KB not updated by the standby (rounded up to the next KB). Represents variables deleted from the primary that remain in the standby. (Default = 0)
System
BACKUP_APP_MISMATCH
BOOL
  • False (default): The backup application In the 2 Hot Standby PACs are equal.
    NOTE: The backup application resides in flash memory or on the SD memory card of the PAC. It is created either by the PLC → Project Backup... → Backup Save command, or by setting the %S66 system bit (Application Backup) to 1.
  • True: All other cases.
System
PLCA_ONLINE
BOOL
PAC A is configured to enter the primary or standby state. (Default = true)
NOTE: Executable only on PAC A.
Configuration
PLCB_ONLINE
BOOL
PAC B is configured to enter the primary or standby state. (Default = true)
NOTE: Executable only on PAC B.
Configuration
CMD_SWAP
BOOL
  • Set to 1 by program logic or animation table to initiate a switchover. The primary goes into wait, then the standby goes primary, finally the wait goes standby. The command is ignored if there is no standby.
    NOTE: Executable on both primary and standby.
  • Reset to 0 (default) by the system on switchover completion or if there is no standby.
NOTE:
  • This command is designed to be used by the application in response to detected errors. It is not intended to be used for periodic switchovers.
  • If the application has to switchover periodically, the period between switchovers must not be less than 120 seconds.
Application / System
CMD_APP_TRANSFER
BOOL
  • Set to 1 by program logic or animation table to start an application transfer from the primary to the standby. Executable only on the primary.
    NOTE: The application transferred is the backup application, stored in flash memory or on the SD card. If the application running does not match the backup application, perform an application backup (PLC → Project Backup... → Backup Save or set the %S66 system bit to 1) before performing the transfer.
  • Reset to 0 (default) by the system on transfer completion.
Application / System
CMD_RUN_AFTER_TRANSFER
BOOL[0...2]
  • Set to 1 by program logic or animation table to automatically start in Run after a transfer.
    NOTE: Executable only on the primary.
  • Reset to 0 (default) by the system after transfer completion and:
    • remote PAC is in Run
    • PAC is not primary
    • by animation table or logic command
Application / System
CMD_RUN_REMOTE
BOOL
  • Set to 1 by program logic or animation table to run the remote PAC. This command is ignored if the CMD_STOP_REMOTE is true.
    NOTE: Executable only on the primary.
  • Reset to 0 (default) by the system when the remote PAC enters standby or wait state.
Application / System
CMD_STOP_REMOTE
BOOL
  • Set to 1 by program logic or animation table to stop the remote PAC.
    NOTE: Executable on the primary, the standby, or a stopped PAC.
  • Reset to 0 (default) by the application to end the stop command.
Application
CMD_COMPARE_INITIAL_VALUE
BOOL
  • Set to 1 by program logic or animation table to begin a comparison of the initial values of variables exchanged by the two Hot Standby PACs.
    NOTE: Executable on both primary and standby only in Run mode.
  • Reset to 0 (default) by the system when the comparison is complete, or if the comparison is not possible.
Application / System
INITIAL_VALUE_MISMATCH
BOOL
  • True: if the initial values for exchanged variables are different or if the comparison is not possible.
  • False (false): if the initial values for exchanged variables are identical.
System
MAST_SYNCHRONIZED (1)
BOOL
  • True: if the exchanged data from the previous MAST cycle was received by the standby.
  • False (default): if the exchanged data from at least the previous MAST cycle was not received by the standby.
NOTE: Closely monitor the MAST_SYNCHRONIZED and FAST_SYNCHRONIZED variables related to the MAST and FAST tasks as indicated at the end of this table.
System
FAST_SYNCHRONIZED (1)
BOOL
  • True: if the exchanged data from the previous FAST cycle was received by the standby.
  • False (default): if the exchanged data from at least the previous FAST cycle was not received by the standby.
NOTE: Closely monitor the MAST_SYNCHRONIZED and FAST_SYNCHRONIZED variables related to the MAST and FAST tasks as indicated at the end of this table.
System
SAFE_SYNCHRONIZED
BOOL
  • True: if the exchanged data from the last SAFE cycle was received by the standby.
  • False (default): if, at least, the exchanged data from the last SAFE cycle was not received by the standby.
System
SAFETY_LOGIC_MISMATCH
BOOL
  • True: the SAFE logic part of the application is different in the two PACs.
  • False (default): the SAFE logic part of the application is identical in the two PACs.
NOTE: The content for this element is determined by comparing system word %SW169 for each PAC.
LOCAL_HSBY_STS
T_M_ECPU_HSBY_STS
Hot Standby status for the local PAC
(see below)
REMOTE_HSBY_STS
T_M_ECPU_HSBY_STS
Hot Standby status for the remote PAC
(see below)
(1):
  • Closely monitor the MAST_SYNCHRONIZED, FAST_SYNCHRONIZED, and SAFE_SYNCHRONIZED variables related to the MAST, FAST and SAFE tasks. If its value is zero (False), then the database exchanged between the primary and the standby PACs is not transmitted at each cycle. In this situation, change the configured period of this task with a higher value than its current execution time (for the MAST task: %SW0 > %SW30; for the FAST task %SW1 > %SW33; for the SAFE task %SW4 > %SW42. More details on %SW0 + %SW1 and %SW30 + %SW31 in EcoStruxure™ Control Expert, System Bits and Words, Reference Manual).
  • Example of consequence: upon an Application Program Transfer (APT) command, the primary PAC might not be able to transfer the program to the standby PAC.
T_M_ECPU_HSBY_STS Data Type
The T_M_ECPU_HSBY_STS data type presents the following elements:
Element
Type
Description
Written by
HSBY_LINK_ERROR
BOOL
  • True: No connection on the Hot Standby link.
  • False: The Hot Standby link is operational.
System
HSBY_SUPPLEMENTARY_LINK_ERROR
BOOL
  • True: No connection on the Ethernet RIO link.
  • False: The Ethernet RIO link is operational.
System
WAIT
BOOL
  • True: The PAC is in Run state but waiting to go primary or standby.
  • False: The PAC is in standby, primary or stop state.
System
RUN_PRIMARY
BOOL
  • True: The PAC is in primary state.
  • False: The PAC is in standby, wait or stop state.
System
RUN_STANDBY
BOOL
  • True: The PAC is in standby state.
  • False: The PAC is in primary, wait or stop state.
System
STOP
BOOL
  • True: The PAC is in stop state.
  • False: The PAC is in primary, standby or wait state.
System
PLC_A
BOOL
  • True: the PAC A/B/Clear switch is in “A” position.
  • False: the PAC switch is not in “A” position.
System
PLC_B
BOOL
  • True: the PAC A/B/Clear switch is in “B” position.
  • False: the PAC switch is not in “B” position.
System
EIO_ERROR
BOOL
  • True: The PAC does not detect any of the configured Ethernet RIO drops.
  • False: The PAC detects at least one configured Ethernet RIO drop.
NOTE: This bit is always false when no drop is configured.
System
SD_CARD_PRESENT
BOOL
  • True: A valid SD card is inserted.
  • False: No SD card, or an invalid SD card is inserted.
System
LOCAL_RACK_STS
BOOL]
  • True: The local rack configuration is OK.
  • False: The local rack configuration is not OK (for example, modules missing or in incorrect slots, etc.)
Application
MAST_TASK_STATE
BYTE
State of the MAST task:
  • 0: Not existent
  • 1: Stop
  • 2: Run
  • 3: Breakpoint
  • 4: Halt
System
FAST_TASK_STATE
BYTE
State of the FAST task:
  • 0: Not existent
  • 1: Stop
  • 2: Run
  • 3: Breakpoint
  • 4: Halt
System
SAFE_TASK_STATE
BYTE
State of the SAFE task:
  • 0: Not existent
  • 1: Stop
  • 2: Run
  • 3: Breakpoint
  • 4: Halt
System
REGISTER
WORD[0...63]
Unmanaged data added to the application via the Exchange on STBY attribute.
Application