Skip to main content

Distributed Clocks (DC)

New to EtherCAT

DC is an optional feature, and not every application needs it. If you control a single device or simple I/O, you do not need to configure DC. Cases that need DC: synchronized motion across multiple servo axes, and high-precision synchronized sampling. Not sure whether you need it? Leave it unconfigured for now; if the device requires DC synchronization, the state transition reports an explicit error.

What is DC?​

DC (Distributed Clocks) is a hardware unit inside the EtherCAT slave controller (ESC). It synchronizes the local clocks of different EtherCAT devices to one common system time.

Distributed clocks are the hardware basis for precise synchronization: they make all slaves work together at microsecond-level accuracy. Not every slave supports DC; check the device's ESI file to confirm support.

Why is DC needed?​

In high-precision motion control and synchronization applications, several devices must act in precise synchrony:

DC application scenarios​

ApplicationDescription
Multi-axis motion controlSeveral servo axes move in precise synchrony, as used in printing, packaging, electronics assembly and similar
Distributed I/OI/O modules at different locations sample inputs and drive outputs in synchrony
High-speed measurementSeveral sensors sample in synchrony so the data shares one time base
Synchronized outputMultiple PWM, pulse and similar signals are output in precise synchrony

How DC works​

Device roles​

From the point of view of DC synchronization, devices that use DC fall into two roles:

  • Reference clock (Reference Clock - R): holds the system time and provides the time base for all other synchronized devices
  • Slave clock (Slave Clocks - S): adjusts against the reference clock, follows the system time and stays within the permitted deviation
Choosing the reference clock

The master scores the candidates by DC capability, the SYNC0 configuration in the ESI and PDO preference, and picks the reference clock — usually the first slave in the ring that has DC capability. The choice is sticky: a controlled switch happens only when the original reference station is no longer a candidate, or when the topology or the capability evidence changes; during OP the switch is deferred. Do not change it manually.

Synchronization process​

DC hardware synchronization has two stages:

Initial synchronization​

Align each slave's local clock — independent to begin with — to the system time:

Drift compensation​

Continuously compensate the deviation of the local clock from the system time (caused by differences in quartz oscillator parameters, temperature drift, aging and similar):

Drift compensation commands are sent together with the process data frames, keeping synchronization accuracy over time.

SYNC signals​

The DC unit can generate two synchronization signals: SYNC0 and SYNC1.

What SYNC0 and SYNC1 are for​

SignalTypical use
SYNC0Triggers input data sampling so that all slaves read their inputs at the same moment
SYNC1Triggers output data updates so that all slaves update their outputs at the same moment

Used together, SYNC0 and SYNC1 make it possible to:

  • have all slaves sample inputs at the same precise instant
  • have all slaves update outputs at the same precise instant
  • reserve data processing time through the offset of SYNC1 from SYNC0

DC configuration parameters​

DC configuration splits into master configuration and slave configuration.

Master configuration (global)​

Settings that apply to the whole network:

ParameterDescription
Reference ClockThe reference clock device (selected automatically; do not change it manually)
SYNC Shift TimeThe timing relationship between the start of the master control task and generation of the SYNC0 event

Slave configuration (per slave)​

Individual settings for each slave (taken from the ESI file):

SYNC0 configuration:

  • Cycle Time: SYNC0 cycle time (either proportional to the communication cycle, or fixed)
  • Shift Time: extra offset time for this slave

SYNC1 configuration:

  • Cycle Time: SYNC1 cycle time (either synchronized to the communication cycle or to SYNC0)
  • Shift Time: offset of SYNC1 relative to SYNC0
Important

Slave DC configuration is defined by the ESI file: defaults the device manufacturer set for the application. Do not change slave configuration manually, or normal device operation may be affected.

DC synchronization mode​

The DC-based synchronization mode is called DC-Synchronous mode; only slaves whose ESI file declares DC support are synchronized.

Available states​

Synchronization mechanismPREOPSAFEOPOP
DC clock synchronization✓✓✓
SYNC signals✗✓✓

DC clock synchronization runs in every state, while SYNC signals are active only in SAFEOP and OP.

Synchronization accuracy​

DC synchronization deviation is typically within a few microseconds:

MetricTypical value
Clock synchronization accuracyDeviation can be kept within a few microseconds
SYNC0/SYNC1 jitterDepends on the ESC type (a device-level figure)
Multi-axis synchronization errorDeviation can be kept within a few microseconds

With a suitable slave ESC and DC configuration, this accuracy meets the synchronization requirements of common multi-axis motion control.

How master cycle time affects DC synchronization​

The master's cycle time (Cycle Time) has a major effect on DC synchronization and is a key factor in the overall synchronization performance of the system.

Effect of cycle time​

SYNC0/SYNC1 cycle configuration​

The SYNC0 and SYNC1 cycles are usually configured as a proportion of the master cycle time:

ConfigurationDescriptionWhere it fits
Synchronized to the cycle timeSYNC0 = N × master cycle timeMost applications (recommended)
Fixed cycleSYNC0 independent of the master cycle timeSpecial applications (such as high-speed sampling)
Common configuration

In most applications the SYNC0 cycle is set equal to the master cycle time (1:1), so every communication cycle contains exactly one synchronization event.

Effect of cycle time jitter​

Jitter in the master cycle time directly affects DC synchronization performance:

Ideal cycle time:
Cycle 1 Cycle 2 Cycle 3 Cycle 4
|---1ms---|---1ms---|---1ms---|---1ms---|
Stable, low jitter

Cycle time with jitter:
|--0.98ms--|--1.02ms--|--0.99ms--|--1.01ms--|
↑ Large jitter, degrades synchronization accuracy
Cycle time jitterEffect on DC synchronization
Within a few microsecondsGood; synchronization deviation can reach the few-microsecond level
1-10 µsFair; suits most motion control applications
> 10 µsPoor; may affect high-precision synchronization
> 100 µsUnacceptable; synchronization accuracy cannot be guaranteed

Choosing a cycle time​

Application typeRecommended cycle timeNotes
High-speed motion control250 µs - 500 µsMulti-axis servo, printing machinery
General motion control1 msMost common; balances performance and load
Distributed I/O1 ms - 4 msI/O modules, sensor acquisition
Low-speed process control10 ms - 100 msSlow control such as temperature and pressure
Important: device cycle time stability matters especially for high-precision equipment

The master must keep the cycle time stable; otherwise you get:

  • lower DC synchronization accuracy
  • unstable SYNC0/SYNC1 signals
  • synchronization failures in the slave application layer
  • jitter in motion control

Master cycle time and SYNC Shift Time​

SYNC Shift Time defines the timing relationship between the start of the master control task and the SYNC0 event.

Timeline​

TimeEventDescription
t = 0Master task startsControl logic processing begins and output data is prepared
t = Shift TimeSYNC0 firesSlaves sample inputs and update outputs in synchrony
t = cycle timeNext cycle startsThe master task starts again

Calculation​

SYNC Shift Time = cycle time × (50% ~ 80%)

Example: cycle time = 1000 µs
- Recommended range: 500 ~ 800 µs
- Typical value: 600 µs (60% of cycle time)

Effect of different Shift Time values​

Shift TimeShareAdvantageDrawbackWhere it fits
< 50%Too small-Data may not be readyNot recommended
50% - 60%ModerateBalances processing time and synchronization delay-General applications
60% - 80%LargeAmple data processing timeSlightly more delayComplex control logic
> 80%Too large-May collide with the next cycleNot recommended

What Shift Time does​

  1. Data processing time: reserves enough time for the master to finish the control logic calculation
  2. Communication margin: ensures output data reaches the slaves before SYNC0 fires
  3. Collision avoidance: prevents the current cycle's communication from colliding with the start of the next cycle's task
  4. Synchronization accuracy: guarantees that slaves sample and output at the precise instant, so multiple devices stay in synchrony

Example configuration​

The table below gives example configurations and recommended values (recommendations, not product limits; the cycle time has no product-imposed lower limit, and the configured value is applied as given):

Cycle timeRecommended Shift TimeNotes
125 µs70 - 100 µsHigh-speed applications that need fast response
250 µs140 - 200 µsVery high-speed multi-axis synchronization
500 µs280 - 400 µsHigh-speed motion control
1000 µs600 - 800 µsStandard motion control (most common)
4000 µs2500 - 3200 µsDistributed I/O

Monitoring the cycle time​

To keep DC synchronization quality, monitor the master cycle time continuously:

MetricTargetNotes
Average cycle time= setpoint ± 0.1%Keeps the cycle time accurate
Maximum jitterWithin a few microseconds (on Windows, 1.2 µs average / 4.5 µs maximum)Keeps jitter within an acceptable range
Maximum/minimum cycle time< ±1% deviationDetects abnormal conditions
Cycle timeout count0Avoids any timeout
SDK reference
  • Using the DarraRT real-time driver significantly reduces cycle jitter.