3 offset compensation, Offset compensation, Table 27: registers for offset compensation – BECKHOFF EtherCAT Technology Section I User Manual

Page 75

Advertising
background image

Distributed Clocks

Slave Controller

– Technology

I-55

Summary of Propagation Delay Calculation between Slaves

t

AB

= ((t

A1

– t

A0

)

– (t

B2

– t

B0

) + t

Diff

) / 2

t

BA

= ((t

A1

– t

A0

)

– (t

B2

– t

B0

)

– t

Diff

) / 2

t

BC

= ((t

B1

– t

B0

)

– (t

C1

– t

C0

) + t

Diff

) / 2

t

CB

= ((t

B1

– t

B0

)

– (t

C1

– t

C0

)

– t

Diff

) / 2

t

CD

= t

DC

= (t

C1

– t

C0

) / 2

t

EF

= t

FE

= (t

E1

– t

E0

) / 2

t

BE

= t

EB

= ((t

B2

– t

B1

)

– (t

E1

– t

E0

)) / 2

Propagation Delays between Reference Clock and Slave Clocks

The System Time Delay register of each slave clock takes the propagation delay from the Reference
Clock to the slave. This delay is calculated like this:

t

Ref_B

= t

AB

t

Ref_C

= t

AB

+ t

BC

t

Ref_D

= t

AB

+ t

BC

+ t

CD

t

Ref_E

= t

AB

+ t

BC

+ t

CD

+ t

DC

+ t

CB

+ t

BE

t

Ref_F

= t

AB

+ t

BC

+ t

CD

+ t

DC

+ t

CB

+ t

BE

+ t

EF

9.1.3

Offset Compensation

The local time of each device is a free-running clock which typically will not have the same time as the
Reference Clock. To achieve the same absolute System Time in all devices, the offset between the
Reference Clock and every slave device

’s clock is calculated by the master. The offset time is written

to register System Time Offset to adjust the local time for every individual device. Small offset errors
are eliminated by the drift compensation after some time, but this time might become extremely high
for large offset errors

– especially for 64 bit DCs.

Each DC slave calculates its local copy of the System time using its local time and the local offset
value:

t

Local copy of System Time

= t

Local time

+ t

Offset

This time is used for SyncSignal generation and time stamping of LatchSignals. It is also provided to
the PDI for use by µControllers.

The System Time of the Reference Clock is bound to the master clock by calculating the difference
and compensating it using the System Time Offset of the Reference Clock.

Registers used for Offset Compensation are listed in Table 27.

Table 27: Registers for Offset Compensation

Register Address

Name

Description

0x0910:0x0917

System Time

Local copy of System Time (read from PDI)

0x0918:0x091F

Receive Time ECAT
Processing Unit

Local Time (t

Local time

)

0x0920:0x0927

System Time Offset

Difference between local time and System
Time (t

Offset

)

Advertising