Skip to main content

TCP Client Redundancy

To increase the availability of the system, you can use a second controller with a redundant Modbus TCP Client combined with CODESYS Redundancy. The CODESYS Redundancy acts as a "backend" to synchronize the application on the two controllers. The native Modbus system redundancy (SR) ensures smooth data exchange with the field devices.

The Modbus TCP Client with CODESYS Redundancy is used via the RedundancyManager function block from the IoDrvModbusTCPlibrary.

Usage

For each TCP client used, you need to create an instance of the RedundancyManager function block in a unsynchronized data area, such as a global variable list. In addition, you need to add the DataSyncAlways entry in the configuration file of the runtime system (*.cfg) in order to synchronize the data at the start of each cycle.

[CmpRedundancy]
DataSyncAlways=1

Behavior

Even when the RedundancyManager function block is used, no switch-over or synchronization actions are performed by CODESYS Modbus. Modbus communication reacts only to the redundancy state of the respective controller.

When an existing redundancy link is operated between the two controllers, Modbus communication runs only via the active controller. When the active controller is switched over, the Modbus communication of the now passive controller is terminated and established on the now active controller.

When the system is initially booted without a redundancy link, Modbus communication is established only via the controller with ID 1.

If the redundancy link is lost in runtime mode, then Modbus communication will become active on both controllers. Any possible problems caused by this, such as duplicate communication, are not handled by this function block.