EtherCAT Distributed Clocks - default settings

General

The distributed clock technology in the EtherCAT system enables synchronized operation of local clocks in all EtherCAT devices (master and slaves). If an EtherCAT slave supports distributed clocks (DC), its ESC (EtherCAT slave controller) contains a hardware-based clock (usually 64 bit, in rarer cases 32 bit) with a resolution of 1 bit = 1 ns. These local clocks can be used for synchronous outputs or data acquisition (e.g. of analog value inputs). An EtherCAT slave may support DC, but does not have to. Mixed operation in the EtherCAT system is possible, so long as the EtherCAT master supports DC.

One device is the reference clock, all other DC-capable devices are continuously synchronized with an accuracy of generally less than 100 ns. The synchronization process and the method of communication of EtherCAT dictate that the first DC-capable slave in the system represents the reference clock ("M" in Fig. Topology of the EtherCAT system with DC-capable devices). Via a special telegram the subsequent slaves cyclically receive information about the state of the reference clock and readjust themselves based on this time.

Data from the readjustment process provide important diagnostic information about the state of the distributed clock system.

EtherCAT Distributed Clocks - default settings 1:
topology of the EtherCAT system with DC-capable devices

The TwinCAT EtherCAT master deals with the basic topology-dependent calculations, the adjustment during EtherCAT startup and the continuous synchronization. The corresponding settings are specified in the System Manager configurator dialogs.

Additional notes and more detailed information about the distributed clocks system can be found in the respective sections.

EtherCAT Distributed Clocks - default settings 2:

Distributed clocks in operation

The distributed clock system is synchronized when EtherCAT starts up during the transition from PREOP to OP. The slaves are set to OP state. In DC-capable slaves proper synchronization in OP state is usually important. Otherwise the slaves automatically return to PREOP state. TwinCAT 2.11 can synchronize such devices and switch them to OP.

Default settings for the EtherCAT master

EtherCAT Distributed Clocks - default settings 3:

Effectiveness of modifications

The distributed clock system is analyzed and calculated when EtherCAT starts up. Changes in the settings of this system therefore always require activation of the modified configuration and an EtherCAT restart.

By default the distributed clocks system (DC) is calculated such that the usual I/O configurations can run in a stable manner. Nevertheless, it may be advisable to adjust the settings during machine commissioning using the diagnostic tools provided.

EtherCAT Distributed Clocks - default settings 4:
distributed clock master settings

By default is “Automatic DC mode selection” is active. “DC in use” should only be selected for explicit modifications of the automatic configuration.

Element

Detail

Explanation

Effects

DC mode

Automatic DC mode selection

Default setting, automatic selection of the ReferenceClock

 

 

DC in use

The ReferenceClock (see next paragraph) and the synchronization direction (see section “Coupling of EtherCAT”) can be selected manually.

If only one EtherCAT device is available in the configuration and DC slaves are used, “Independent DC Time” should be selected (exception: external synchronization).

Take care when changing these settings! The stability of the whole system may be impaired.

Settings

Continuous Runtime Measuring

Cyclic measurement of the intervals between the devices during runtime.

This process also takes places for EtherCAT.

For new applications under TwinCAT 2.11 it is advisable to deactivate this function

 

Sync Window monitoring

If activated, EtherCAT DevState shows in bit 12 whether all DC devices are maintaining their local clocks within the specified window (see Fig. DevState with SyncWindow monitoring display). A cyclic BRD command on x092C (system time difference) is used for this.
The information is only usable if the first EtherCAT device also contains the ReferenceClock clock.

 

 

Show DC system time (64-bit)

If activated, the current DC time is displayed in the inputs of the EtherCAT master as a copy from the master clock. Since the read out process is subject to the fieldbus transport, preference should be given to the PLC blocks in order to obtain the current DC system time.

(see Fig. "DcSysTime" display in the TwinCAT tree")

 

EtherCAT Distributed Clocks - default settings 5:
"DcSysTime" display in the TwinCAT tree

Element

Detail

Explanation

Effects

SYNC shift time

 

The automatically calculated shift times for inputs and outputs are shown (grey fields). In additional the local slave shift events slave can be offset through manual entries.

Further information can be found in the general distributed clock section.

The results from the DC diagnostics should be reported here, if applicable.

In the event of synchronization problems, for the outputs +10–20 % of the cycle time, for inputs -10–20 % of the cycle time can be entered here as reference value (unit: µs).

Values >100 % of the cycle time are not meaningful.

EtherCAT Distributed Clocks - default settings 6:
DevState with SyncWindow display monitoring

Reference Clock selection

Manual selection of the reference clock for this EtherCAT system is only required in exceptional circumstances and should be done with caution. TwinCAT generally selects the correct DC-supporting slave, i.e. the first one.

EtherCAT Distributed Clocks - default settings 7:
Manual selection of the reference clock

If a different slave is selected manually

EtherCAT Distributed Clocks - default settings 9:
checkbox for manual selection

in the advanced slave settings.

EtherCAT Distributed Clocks - default settings 10:

Potential reference clock

If a slave without the required hardware support is marked as “potential Reference Clock”, the EtherCAT system has no reference clock after startup. The slaves will not switch to OP state and report PREOP_ERR. From version 2.11R2 build 2032, TwinCAT checks during each startup whether the selected reference clock also supports this function. The following logger message appears: "slave xx is reference clock device, but does not support dc!" (see Fig. "Event logger message: no support by reference clock")

In logger window TwinCAT 2.11R2 (from build 2028) will issue a message “DC not synchronized”, if a slave cannot be switched from PREOP to OP state because it is not synchronized. (see Fig. "Event logger message: no synchronization")

EtherCAT Distributed Clocks - default settings 11:
Event logger message: no support by reference clock
EtherCAT Distributed Clocks - default settings 12:
Event logger message: no synchronization

Default settings for EtherCAT slaves

The distributed clocks settings can be found in the advanced settings of the EtherCAT slave.

If the slave is intended by the manufacturer for DC operation, it includes such an operation mode; see Fig. Default slave setting – slave with and without DC capability below. Selection of this operation mode activates the integration of the slave into the synchronization mechanism on the master side.

EtherCAT Distributed Clocks - default settings 13:
Default slave setting – slave with and without DC capability
EtherCAT Distributed Clocks - default settings 14:

Distributed clock activation

If the settings “Enable” and “Use as potential Reference Clock” are activated for devices that do not support this functionality, the system may malfunction.
The function must be enabled by the device manufacturer.

EtherCAT Distributed Clocks - default settings 15:

Slave shift time settings

As in the master settings for all slaves, the SYNC times can be offset separately in the individual DC slaves.
Not the general instructions.

Checking for DC support

EtherCAT slaves with DC function are

If problems occur in the individual phases as a result of incorrect configuration, the target states are not reached and the logger window of the System Manager shows associated information (e.g. “DC invalid sync cfg”)

EtherCAT Distributed Clocks - default settings 16:
logger window showing information relating to invalid DC configuration of the slave

To check whether and to what extent a device supports distributed clocks, the local clock registers can be displayed online. In the online display call up the Properties dialog by right-clicking in the free space.

EtherCAT Distributed Clocks - default settings 17:
display of additional register values from the slaves

In this case select the 4 registers 0x0910 to 0x0916. The local DC clock runs in these 2-byte registers. Like certain other slave registers, the System Manager can read these cyclically online.

EtherCAT Distributed Clocks - default settings 18:
DC register selection

The register values are displayed and automatically updated by the System Manager.

EtherCAT Distributed Clocks - default settings 19:
display of DC register values

The following can be seen in Fig. Display of DC register values

EtherCAT Distributed Clocks - default settings 20:

Up-to-dateness of the online display

The System Manager reads and displays the values without claim of real-time and consistency. They have informative character and can provide an initial overview. The reading process takes up capacity in the acyclic EtherCAT communication, potentially at the expense of other applications
Not all slave ESC register values can be read by the System Manager/EtherCAT master.