HaModControl (FB)

FUNCTION_BLOCK HaModControl EXTENDS AbbLConCA

HaModControl function block handles the AC500 high availability operation such as change over from primary to secondary CPU in case of an error with related diagnostics. Further it is used for data transfer between high availability CPUs. This is a mandatory function block for HA application. RuntimeError may occur during operation, but they will not generate Error output = TRUE. This allows the system to run and revert to an error free state.

InOut:

Scope

Name

Type

Initial

Comment

Inherited from

Input

Enable

BOOL

FALSE

A rising edge (Enable = TRUE) starts the operation, the output Busy goes to TRUE. All other inputs are read and considered continuously. A falling edge (Enable = FALSE) aborts the operation. During Aborting the Busy is still TRUE. Afterward all outputs are reset.

AbbLConCA

Output

Busy

BOOL

FALSE

Operation is running (while output Error is FALSE)

AbbLConCA

Error

BOOL

FALSE

Operation is stopped with error (while output Busy is FALSE). This output is TRUE for at least one cycle or until Enable is set to FALSE. The output ErrorID gives more details about the error.

AbbLConCA

Input

SyncSlot

BYTE

0

2: Slot number on which Sync Communication is configured. Range 1 TO 2.
1 - Eth1
2 - Eth2

SecSlot

BYTE

0

3: Slot number on which second communication LifeCom2 is configured. Range 1 to 3.
1 - Eth1 modbus tcp as lo
2 - Eth2 modbus tcp as lo
3 can lc

IpAdrCpuASync

STRING(16)

‘0.0.0.0’

4: IP Address(on which SYNC Communication is configured) of AC500 CPU connected to PLC A

IpAdrCpuBSync

STRING(16)

‘0.0.0.0’

5: IP Address(on which SYNC Communication is configured) of AC500 CPU connected to PLC B

IpAdrCpuALifecom2

STRING(16)

‘0.0.0.0’

6: IP Address(on which 2nd LifeCom Communication is configured) of AC500 CPU connected to PLC A

IpAdrCpuBLifecom2

STRING(16)

‘0.0.0.0’

7: IP Address(on which 2nd LifeCom Communication is configured) of AC500 CPU connected to PLC B

ManualChgOver

BOOL

FALSE

8: TRUE- Manual changeover from primary to secondary PLC

SupprChgOver

BOOL

FALSE

9: TRUE- Suppress changeover from primary to secondary PLC. If used this input should be activated in both the CPU at the same time else system may behave randomly.
Suppress changeover feature is recommended to use only during network reconfiguration and not during any other switchover scenarios for example PLC STOP

Output

CfgError

WORD

0

3: Each bit of the word represents different configuration errors. CfgError is valid only when Error = TRUE
Bit0 - CI module configuration error,
Bit1 - 1<SyncSlot>3,
Bit2 - 1<SecSlot>3,
Bit3 - IpAdrCpuASync invalid,
Bit4 - IpAdrCpuBSync invalid,
Bit5 - IpAdrCpuALifecom2 invalid,
Bit6 - IpAdrCpuBLifecom2 invalid,
Bit7 - IpAdrCpuASync = IpAdrCpuBSync or IpAdrCpuALifecom2 = IpAdrCpuBLifecom2.

RuntimeError

WORD

0

4: Each bit of the word represents different Runtime errors
Bit0 - CI module lost,
Bit1 - Other CPU not active,
Bit2 - Lifecom1 is lost(part of Sync),
Bit3 - Lifecom2 is lost,
Bit4 - Sync lost,
Bit5 - Error in sync,
Bit6 - Ethernet status,
Bit7- Other PLC Lost communication to CI52x,
Bit8- CAN_HEADER FB has error,
Bit9- CAN_DATA FB has error,
Bit10- fbGetOwnIP FB has error
Bit3 - Lifecom2 is lost RuntimeError will not be TRUE if the PLC is in STOP status. This is because Modbus is still responding even when PLC is in STOP

Cfg

WORD

0

5: Each bit of the word represents different Configuration
Bit0 - Sync via CAN enabled,
Bit1 - Sync via UDP enabled,
Bit2 - LifeCom2 via CAN is enabled,
Bit3 - LifeCom2 via UDP is enabled,
Bit4 - LifeCom2 via Modbus TCP is enabled,
Bit5 - Initialization for Ethernet configuration,
Bit6 - Sync via TCP enabled.