System Structure

A HA-Modbus TCP system is characterized by two AC500 PLCs with the following features:

  • Identical application program with additional HA function blocks that are loaded in both PLCs
  • Fieldbus devices CI52x-MODTCP are connected via Modbus TCP
  • Synchronization of both PLCs (sync connection and lifecom2)

The application program should be divided into at least three main tasks/ programs, which then communicate via internal structures of the libraries and dedicated internal memory areas for HA-Sync array and the Modbus cluster memory(ies):

../_images/eccded55991418a90a317f340f9c3d27

Principle structure of the HA system and recommended tasks

  • The HA program/ task should be called at highest priority as it is responsible for the core HA functionality.
  • Another separate task has to be called for the Modbus communication function blocks at lower priority and (depending on CPU performance) fast cycle time to ensure sufficient update rates on the Modbus without overloading the PLC with communication.
  • The main application program parts should be called in a separate task with even lower priority and a larger cycle time as above tasks.

The following picture describes the placement of the main HA-Modbus TCP libraries function blocks to realize a High Availability System – with the tasks as described above.

../_images/ebf48acc991419d10a317f3420a3e784

HA programming: Simplified operation (red blocks are mandatory HA function blocks, dotted lines show optional function blocks)

The normal main/ application program does not need to consider HA separately, if it uses the HA utility function blocks from the HA-Modbus TCP library, as they internally synchronize necessary data.

Only for additional own calculated variables or function blocks where the user wants synchronization the use of the HA_MOD_DATA_SYNC function block is needed.

Following steps are performed:

  • Status of the inputs connected to CI52x clusters is transferred to both PLCs simultaneously in every PLC cycle. They are received by the CI52x function block.
  • In the HA program the HA_MOD_CONTROL function block collects all diagnosis, Sync and lifecom2 data from the field and/ or the other PLC. Then, it decides if a switchover is necessary based on a simple decision matrix.
  • The application program should make use of the special HA utility function blocks which automatically sync their internal values with the other PLC. To synchronize other further user values, the HA_MOD_DATA_SYNC function block can be used (optional function block).
  • At the end of the program, the generated output values are send, by transferring from the primary PLC respective buffers to the CI52x-MODTCP bus module(s) via CI52x functrion block and Modbus TCP. The secondary PLC is prepared to send but stays “silent” (not sending output values).

All the prepared sync data is synchronized with the secondary PLC. Typically only integral values (timers, counters, PID, …) have to be synchronized, as both PLCs are running and calculating closely in parallel and based on the same input values. For further information, please refer to library function block documentation and the example projects.

Note

HA control function block must always be called in a task which has the highest priority.

To avoid synchronization related errors, all instances of the HA_MOD_DATA_SYNC function block and HA utility function blocks must be added in the same task and POU.

Note

If any CI52x-MODTCP module is powered off and on, there is no need to power restart the complete system. The module will be recognized once the communication is re-established.

Note

The AC500 High Availability System itself only takes care of the first fault. For example, in case of a second fault the primary PLC remains primary PLC until the second fault occurs. This results in no further switch overs (manual switch overs included).

As the network with redundancy is expected to manage itself a second layer of independent redundancy exists, but e.g. a ring also only can tolerate one error, then repair is necessary.