Requirement 1 + 2: synchronization
In an EtherCAT system the distributed clocks concept (DC) is used for synchronization of local clocks in the EtherCAT components.
Synchronization of local EtherCAT devices
General:
- 1 ns time resolution corresponds to 1 digit, scope of 64 bits corresponds to approx. 584 years
- The EtherCAT master must keep the distributed clocks synchronous within the system accuracy (EtherCAT: <100 ns) using synchronization datagrams.
- Not all EtherCAT devices have to support this feature. If a slave does not support this concept, the master will not include it in the synchronization. If the EtherCAT master does not support this feature, DC is also ineffective in all slaves.
- such a clock also runs in the EtherCAT master, in this case software-based.
- in the system one of the existing clocks is selected as reference clock and used for synchronizing all other clocks. This reference clock is usually one of the EtherCAT slave clocks, not the EtherCAT master clock. The clock of the first EtherCAT slave in the topology that supports distributed clocks is usually automatically selected as reference clock.
- a distinction is made between
- the EtherCAT master (the software that “manages” the EtherCAT slaves with Ethernet frames) and the EtherCAT slaves managed by it.
- the reference clock, which is usually located in the first DC slave, and the slave clocks whose time is based on it, including the clock in the EtherCAT master.
Master:
- During the system start phase the EtherCAT master must set the local time of the reference clock and the other slave clocks to the current time and subsequently minimize deviations between the clocks through cyclic synchronization datagrams.
- in the event of topology changes the EtherCAT master must re-synchronize the clocks accordingly
- not all EtherCAT masters support this procedure
- the EtherCAT master in the Beckhoff TwinCAT automation suite fully supports distributed clocks.
Slave:
- Due to the high precision required this local clock is implemented in hardware (ASIC, FPGA).
- Distributed clocks are managed in the EtherCAT slave controller (ESC) in registers 0x0900 - 0x09FF. Specifically, the local synchronized time runs in the 8 byte from 0x0910.

In Fig. Mapping of DC to the topology the 3rd EtherCAT slave was selected as DC reference clock as a sample. The local time of this slave is now used to adjust all other distributed clocks, i.e. all other EtherCAT slaves and the clock of the EtherCAT master. This is achieved through synchronization datagrams, which the EtherCAT master sends cyclically.
![]() | TwinCAT clock readjustment The TwinCAT clock that determines the real-time must track the DC ReferenceClock to ensure that the PLC/NC tasks in the real-time context of the controller run synchronous with the distributed clocks. If more than one EtherCAT system is used on a control system, only one of these systems can provide the ReferenceClock for TwinCAT. The other EtherCAT systems have then to follow the TwinCAT clock. |
This procedure ensures that all devices supporting DC always have local access to a time that is identical (within the DC synchronization precision) in all devices.
The system now operates based on the time base of the selected DC reference clock and its local clock generator/quartz with TDC. Due to production tolerances this time base is rarely the same as the official sidereal time/coordinated world time UTC TUTC or another reference time. This means that 1 msUTC is never exactly 1 msDC, TDC≠ TUTC. Over longer periods also drift processes may also change the ratio. As long as DC is used for relative processes within the EtherCAT system, the deviation from the UTC is irrelevant. However, if the DC time is to be used for data logging with a global time base, for sample, the DC time base must be synchronized with the UTC time base. This is described in section Requirement 3.