Skip to main content

Synchronization of Runtime Systems

The chronological sequence of the connection setup during the start routine is crucial for stable and efficient redundancy operation. The aim is to ensure a fully synchronized cyclic operation of the two redundant CODESYS runtime systems.

The functionality of the redundancy system is based on the following handshakes of the redundancy link:

  • Bootup messages determine the roles at startup.

  • Synchronization messages synchronize the application and time base.

  • Cycle messages ensure synchronous execution during operation.

If messages fail, then defined time limits ensure that the PLCs switch to a safe mode and remain operational.

Optimizing the start routine

The following information explains how the controllers determine their respective roles during startup, how data is synchronized, and how the IEC tasks are subsequently executed synchronously and in parallel on both systems.

You can set a time limit in the general redundancy settings. This value determines how long the system waits for feedback from the active PLC when establishing communication via redundant links. If this time is exceeded, then you can specifically adjust the redundancy communication to your system in order to ensure stable synchronization.

  1. Setting the starting value

    1. Open the editor to the Redundancy Configuration tab.

      You can navigate through the different tabs of the editor using the navigation on the left side. The specific settings for the selected tab are displayed on the right side.

    2. Switch to the Redundancy Settings tab.

      On the General tab, you will find the settings which are crucial for stable communication over the redundancy link and which should result in synchronous operation of the two runtime systems.

    3. Estimate a suitable time limit and enter the estimated value in the Timeout (ms) setting.

  2. Adjust this time limit gradually.

    If problems occur during synchronization or if synchronization is interrupted, then increase the estimate gradually. Continue doing this until the start routine is performed reliably and both runtime systems are running synchronously.

  3. Reading the measured values.

    You can use the provided library functions to read the actual measured communication times.

    This information helps to assess how far the set time limit can be reduced without affecting stability.