Which SIMATIC S7-300/S7-400 modules support the NTP time-of-day message and how do you activate this kind of time synchronization?
NTP synchronizes not just all sorts of clocks with each other but also establishes a hierarchy of NTP time servers and NTP clients. A hierarchy level is called a "stratum", whereby "stratum 1" is the highest level. Time servers of this level synchronize themselves to a reference time source; these can be radio clocks, GPS receivers or modem time services. Stratum One Time Servers make their time available to multiple NTP clients in the network, which are designated as "stratum 2".
In the NTP mode, the CP transmits time-of-day queries (in client mode) to the NTP server in the subnet (LAN) at regular intervals. Taking the responses from the servers as a basis, the most reliable and most precise time-of-day is ascertained, and the time-of-day of the station is synchronized. The advantage of this mode is that it enables the time-of-day to be synchronized over and beyond subnet limits. The precision depends on the quality of the NTP server used.
SIMATIC S7-300 components with the time synchronization function using the NTP.
|SIMATIC S7-300||Order number||Firmware|
|CP 343-1 IT||6GK7343-1GX11-0XE01)||V2.0|
1) Only the time-of-day of the internal CP diagnostics buffer is synchronized by means of the NTP.
ET 200 CPUs with the time synchronization function by means of the NTP.
|ET 200 CPU||Order number||Firmware|
|IM151-8 PN/DP CPU||6ES7151-8AB00-0AB0||V2.7|
|IM151-8 PN/DP CPU||6ES7151-8AB01-0AB0||V3.2|
|IM151-8F PN/DP CPU||6ES7151-8FB00-0AB0||V2.7|
|IM151-8F PN/DP CPU||6ES7151-8FB01-0AB0||V3.2|
|IM154-8 PN/DP CPU||6ES7154-8AB00-0AB0||V2.5|
|IM154-8 PN/DP CPU||6ES7154-8AB01-0AB0||V3.2|
|IM154-8F PN/DP CPU||6ES7154-8FB01-0AB0||V3.2|
|IM154-8FX PN/DP CPU||6ES7154-8FX01-0AB0||V3.2|
SIMATIC S7-400 components with the time synchronization function using the NTP.
|SIMATIC S7-400||Order number||Firmware|
|CPU 416F-3 PN/DP||6ES7 416-3FR05-0AB0||V5.0|
|CPU 416F-3 PN/DP||6ES7416-3ES06-0AB0||V6.0|
|CPU 416-5H PN/DP||6ES7416-5HS06-0AB0||V6.0|
|CPU 417-5H PN/DP||6ES7417-5HT06-0AB0||V6.0|
Activating the NTP for time synchronization
You set the time synchronization for the CPUs via the NTP in the hardware configuration of STEP 7.
Open the Properties dialog of the Industrial Ethernet CP to enable. In the "Time Synchronization" tab, set a check mark for "Activate NTP time-of-day synchronization".
Enter the IP addresses of the relevant NTP servers in the "NTP Server Addresses" field.
- The NTP mode does not support any automatic changeover between summer time and winter time. This is not provided for in the protocol. You must change the local time accordingly. NTP always transmits the coordinated world time (UTC) or Greenwich Mean Time (GMT).
How to calculate summer time is described in Entry ID: 19324378
- You cannot set any time zones when using the NTP time-of-day synchronization mode in S7-300 and S7-400 CPUs.
- In the case of CP343-1 IT with article number 6GK7343-1GX20-0XE0 and firmware V1.0 you must select the MPI address 2 for the CPU when using the "Set CPU time" function. As from firmware V1.1, setting the CPU time is independent of the MPI address.
Example of a time-of-day relay with S7-400 as time slave
In order to be able to use the NTP mode you must enable the "Activate NTP time-of-day synchronization" function in the Properties dialog of the Industrial Ethernet CP -> "Time-of-Day Synchronization" tab. Furthermore, at least one IP address of an NTP server must be specified with the "Add..." button and the "Forward time of day to a station" option must be enabled. The time zone and update interval should be set according to the requirements of the project.
A list of the active NTP servers (Stratum One Time Servers) is available at this link:
You can use these NTP servers for time-of-day synchronization. In this example the time-of-day synchronization is made by means of the Stratum One Time Server of the University of Erlangen-Nürnberg.
In the Properties dialog of the CPU you must configure the S7-400 CPU as time slave in the "Diagnostics/Clock" tab.
Example of a time-of-day relay with an S7-300 as time slave
In order to be able to use the NTP mode you must enable the "Activate NTP time-of-day synchronization" function in the Properties dialog of the Industrial Ethernet CP > "Time-of-Day Synchronization" tab. Furthermore, at least one IP address of an NTP server must be specified with the "Add..." button and the "Forward time of day to a station" option must be enabled. The time zone and update interval should be set according to the requirements of the project.
A list of active NTP servers (stratum 1) is available at the following internet site: http://support.ntp.org/bin/view/Servers/WebHome. These NTP servers can be used for time-of-day synchronization. In our example the time-of-day synchronization is made by means of the NTP server (stratum 1) of the University of Erlangen-Nürnberg.
Since the time-of-day of the S7-300 CPU is repeatedly set from the Industrial Ethernet CP, it is necessary to have a connection resource for this service of the S7-300 CPU. Please bear this in mind when configuring the system.
There is only need to configure time-of-day synchronization for the S7-300 CPU if you are using one of the following Industrial Ethernet CPs:
|SIMATIC S7-300||Order number||Firmware|
|CP343-1||6GK7343-1EX30-0XE0||as from V2.2|
|CP343-1 Adv||6GK7343-1GX30-0XE0||as from V1.0|
|CP343-1 Adv||6GK7343-1GX31-0XE0||as from V3.0|
|CP343-1 Lean||6GK7343-1CX10-0XE0||as from V2.2|
If you are using one of the above-mentioned Industrial Ethernet CPs, then you must make additional settings in the Properties dialog of the CPU. The settings depend on the configuration of the communication bus in the backplane bus of the CPU.
- The communication bus is configured as a party line, in other words it is physically "wired through" to the MPI interface on the CPU. This setup is found in CPUs from CPU 312 up to and including CPU 315-2 DP and the C7 devices. In this case, in the Properties dialog of the CPU you select the "Diagnostics/Clock" tab and set "As slave" for the synchronization mode on the MPI.
- The communication bus is not configured as a party line, in other words the MPI interface and the communication bus are separate. This bus setup is found in CPUs from CPU 315-2 PN/DP up to and including CPU 319-3 PN/DP. In this case, in the Properties dialog of the CPU you select the "Diagnostics/Clock" tab and set "As slave" for the synchronization mode in the PLC.
Open the NCM S7 diagnostics of the Industrial Ethernet CP to determine the status of the time synchronization.
Start the NCM S7 Diagnostics in the Windows START menu by means of "SIMATIC > STEP 7 > NCM S7 > Diagnostics".
Alternatively you can also open the NCM S7 Diagnostics with the SIMATIC Manager. Right-click the Industrial Ethernet CP and select the menu "PLC > Module status". In the "Module status" dialog you switch to the "General" tab and click on the "Special Diagnostics" button to open the NCM S7 Diagnostics of the Industrial Ethernet CP.
Information about time-of-day synchronization in SIMATIC mode or in NTP mode is available in the "Time-of-Day" tab.
Note the following points when interpreting the display:
Display of configured NTP servers
You can specify up to four NTP servers in the configuration. The relevant NTP servers are addressed by the CP and their reply messages evaluated. The NTP server with the greatest precision is chosen. This ensures that the station with the most precise time is synchronized.
Important here is the Status column. The following displays are possible here:
- NTP master
The CP accepts the configured NTP server for time-of-day synchronization. The CP assigns this status to just one of the configured NTP servers.
The configured NTP server is reachable in the network, but is not taken for time-of-day synchronization.
- Reachable (unsynchronized)
The configured NTP server is reachable in the network, but is not taken for time-of-day synchronization. The CP recognizes from the message that the NTP server is not synchronized.
- Not reachable
The NTP server is configured but cannot be reached under the specified IP address.
None of the configured NTP servers is displayed as NTP master
Sometimes all the NTP servers are displayed as Reachable - but none as NTP master.
- This indicates that the time-of-day of the NTP servers has been evaluated as imprecise.
In the CP's firmware there are various checks that are defined in the corresponding RFCs (Internet Standard).
- This might also have something to do with the synchronization of the NTP master. There are multiple time stamps in the NTP message. If an NTP server is not synchronized externally, this is noted accordingly in the time stamps in the messages. The consequence is that the time-of-day of these NTP servers is not accepted.
The fact that there is no potential NTP master among the reachable NTP servers is also indicated to the user in addition by a counter in the diagnostics. In this case the "How often the sampling interval was exceeded" counter is increased by 1 after expiry of the sampling interval.
All CPs that are older than the modules listed or which have an older firmware version do not react to the reply message of an NTP server if the server does not have an even-numbered NTP version, V2.x, V4.x, for example. You must then upgrade the module with the latest firmware version. All more recent modules that support time-of-day synchronization by means of NTP also accept reply messages from other NTP server versions.
SICLOCK TM time-of-day transmitter
The SICLOCK time-of-day transmitter is a separate unit that can transmit time-of-day messages by means of the Ethernet in SIMATIC or NTP mode.
- SICLOCK TM, article number: 2XV9450-1AR23, firmware as from April 2001
The SICLOCK works exclusively as time-of-day master and broadcasts time-of-day messages in Multicast or Broadcast mode by means of ISO Industrial Ethernet. In NTP mode it is also possible to operate by means of a router. The SICLOCK time-of-day can also be synchronized with a central time from a DCF 77 or GPS receiver.