Configuration using Web Based Management and Command Line Interface
4.5 The Switch menu
SCALANCE X-300 / X-400
Configuration Manual, 10/2014, C79000-G8976-C187-22
237
messages cyclically, in the example shown at time t
0
. The time t
1
when this message arrived
is stored by the slave. In a second message (follow-up message), the master informs the
slave of the exact time t
0
when the synchronization message was sent.
However, with only these two values, neither the deviation of the slave clock nor the
message delay time can be calculated. For this reason, the slave then sends a delay request
message to the master and stores the time t
2
at which this message was sent. Using a delay
response message, the master informs the slave of the time t
3
at which it received this
message.
In the following calculations, it is assumed that the transfer of a message from the master to
the slave takes exactly the same amount of time as the transfer of a message in the opposite
direction. This is the situation on a direct cable connection.
From the calculated values for
Δ
Sync
and Δ
DelReq
the difference between the time of receipt
and time of sending is obtained:
Δ
Sync
= t
1
- t
0
Δ
DelReq
= t
3
- t
2
If the time of the slave time deviates from the time of the master by the amount Δ
t
, these two
calculations still do not provide
the actual value for the message delay time Δ
D
because the
send and receive times are based on different reference systems. The simplest way to
calculate the actual message delay time Δ
D
is to take the average value:
Δ
D
= (Δ
Sync
+ Δ
DelReq
) / 2
The deviati
on of the slave clock Δ
t
results when Δ
Sync
is reduced by the actual message
delay time Δ
D
:
Δ
t
= Δ
Sync
-
Δ
D
If Δ
t
is positive, the clock of the slave is "fast". If Δ
t
has a negative value, the clock of slave is
"slow".
Example
At time t
0
= 14 μs, the maste
r sends a sync message that arrives at the slave at time t
1
= 28
μs. The value for Δ
Sync
is calculated from this:
Δ
Sync
= t
1
- t
0
= 28 μs
-
14 μs = 14 μs
If the clocks of the master and slave were exactly synchronized, the message delay time
would be 14 µs which cannot however be concluded based on this single measurement.
For this reason, the slave sends a delay request message at time t
2
= 40 μs that arrives at
the master at time t
3
= 38 μs. The value for Δ
DelReq
is the difference between the time of
receipt and time of sending this message:
Δ
DelReq
= t
3
- t
2
= 38
μ
s - 40
μ
s = -2
μ
s
The actual message delay time Δ
D
is the average value of Δ
Sync
and Δ
DelReq
because this
eliminates the time deviation of the two device clocks:
Δ
D
= (Δ
Sync
+ Δ
DelReq
) / 2
Δ
D
=
(14 μs
-
2 μs) / 2 = 6 μs