Adeeb Robotics

Distributed Clocks Configuration

Achieve sub-microsecond synchronization across all axes with EtherCAT DC.

Overview

EtherCAT Distributed Clocks (DC) synchronize all slave devices to a single reference clock with sub-microsecond accuracy. The first DC-capable slave in the ring becomes the reference clock; all others discipline their local clocks against it.

Enabling Distributed Clocks

Add the following to /etc/adeeb/master.conf:

[distributed_clocks]
enabled = true
sync0_cycle_time_ns = 1000000   # 1 ms
sync0_shift_time_ns = 125000    # 125 µs shift from cycle start
drift_filter_gain = 0.01

Reference Clock Selection

By default, the master selects the first DC-capable slave as the reference. To pin a specific slave:

[distributed_clocks]
reference_slave = 1   # 0-indexed position in ring

Propagation Delay Measurement

The master automatically measures propagation delays during startup by sending frames and measuring the time difference at each slave port. This runs once at PREOP → SAFEOP transition and repeats if topology changes are detected.

View measured delays:

adeeb-ctl dc show-delays

Tuning Synchronization Quality

Validating Synchronization

adeeb-ctl dc stats --interval 5s

Target values for production deployments: mean error < 100 ns, max jitter < 1 µs.

Further Reading