Introducing the Time Synchronization Service
Original instructions
Overview
The time synchronization service establishes accuracy among computer clocks on an Ethernet system. For example, the time of one client may be synchronized either with another server, a referenced time source such as a radio or satellite receiver, or a GPS time server.
Typical time service configurations use redundant servers and diverse network paths to establish high accuracy and reliability. Time service accuracy can be within a millisecond on LANs and within tens of milliseconds on WANs.
Use the time synchronization service for:
Features of the Service
The time synchronization service offers:
Controller projects use a function block to read the clock, a feature that allows events or variables in the project to be time stamped. Time stamping is accurate to:
Time Synchronization and Time Stamps
The BMX NOE 01x0 Ethernet communications modules send a source time-synchronization signal to a CPU. The NOE’s firmware includes an NTP client, which provides time synchronization. The synchronization process occurs as follows:
The NTP Client ...
Result
1
... requests a time synchronization signal from the NTP server over an Ethernet network.
The NTP server sends a signal.
2
... stores the time.
3
... sends a message to the clock system counter in the CPU.
The CPU updates its internal clock. The CPU’s clock is now typically within 5 ms of the NTP server, with a worst case of 10 ms.
Before the next time synchronization signal, the CPU’s clock is updated each ms by an internal timer.
Use the R_NTPC function block in either MAST, FAST, or Interrupt sections to read the clock from the PLC application.
All the CPUs on an Ethernet network should be synchronized with the same NTP server.
Time Synchronization Terms
Term
Description of Service
local clock offset
Accurate local time adjustments are made via a local clock offset. The local clock offset is calculated as:
((T2 - T1) + (T3 - T4))2
where:
  • T1 = time when NTP request is transmitted from the module
  • T2 = time when NTP server receives the request (provided by the module in response)
  • T3 = time when the NTP server transmits the response (provided to the module in the response)
  • T4 = time when NTP response is received by the module
time accuracy
The local time error is < 10 ms compared to the referenced NTP server’s time.
  • typical: 5 ms
  • worst case: <10 ms
settling time
Maximum accuracy is obtained after 2 updates from the NTP server.
polling period dependency
Accuracy depends on the polling period. Less than 10 ms of error is guaranteed for polling periods of 120 s or less. To obtain the best possible accuracy (when your network bandwidth allows), reduce the polling period to a small value—e.g., a polling time of 5 s provides better accuracy than a time of 30 s.
time zone
The default format is universal time, coordinated (UTC). Optionally you may configure the service to use a local time zone—e.g., GMT+1 for Barcelona or Paris
daylight saving time
The module automatically adjusts the time change in the spring and fall.
leap second
To compensate for the deceleration of the earth’s rotation, the module automatically inserts a leap second in the UTC time every 18 months via an international earth rotation service (IERS).
Leap seconds are inserted automatically as needed. When needed, they are inserted at the end of the last minute in June or December, as commanded by the NTP server.