RedundancyManager (FB)

FUNCTION_BLOCK RedundancyManager

This FB can be used to manage MODBUS communication when using CODESYS Redundancy. It does NOT handle the case of both PLCs becoming standanlone and will activate MODBUS communication on both PLCs. When this FB is used I/O-Mapping should either only be done to exisiting variables or the addresses of the newly created variables need to be added to the “Registered Areas” of the redundancy configuration

InOut:

Scope

Name

Type

Comment

Input

xForceStart

BOOL

Can only be used to enable MODBUS communication on the second PLC in case of a startup without link and has no effect otherwise

Inout

client

IoDrvModbusTCP

Modbus Client Instance

Output

xRedundancyActive

BOOL

CODESYS PLC Redundancy is available

PLC_ID

INT

PLC-ID = 1/2 if redundancy is activated

RedundancyState

RDCY.RedundancyState

Current state of CODESYS PLC Redundancy

xConnected

BOOL

Redundant PLCs can communicate via the configured redundancy link

xSync

BOOL

Redundant PLCs are synchronized, for details see RedundancyState output

xPrimary

BOOL

MODBUS TCP Client is Primary

xBackup

BOOL

MODBUS TCP Client is Backup