Eliminating PLC Clock Jitter in SIMATIC PCS 7 Redundant OS Time Synchronization

Eliminating PLC Clock Jitter in SIMATIC PCS 7 Redundant OS Time Synchronization

Time synchronization jitter—where an S7-400 controller clock exhibits erratic time jumps or alternating offsets when time synchronization is enabled on redundant OS servers—is caused by competing, unsynchronized time masters broadcasting conflicting clock telegrams across the plant bus. In PCS 7 systems, this typically occurs when both redundant OS servers act as independent SIMATIC Mode time masters with slight clock drift between them, when there is a mismatch between UTC and local time offsets, or when SIMATIC Mode (broadcast on CP 443-1/ISO) collides with NTP Mode (RFC 2030) on the plant bus. To eliminate jitter, configure a single central external NTP master clock (such as a GPS receiver or SICLOCK) for all redundant servers and CPUs, ensure all devices are set to UTC, and designate redundant servers strictly as time slaves or configure coordinated active/standby master arbitration.

Table of Contents

Executive Summary

Precise, deterministic time synchronization across all controllers (AS), operator servers (OS), and historical archive servers is a fundamental cornerstone of SIMATIC PCS 7. Deterministic sequence of events (SOE) recording, alarm logging, and historical trend correlation require millisecond-level timestamp parity across the entire control architecture. However, plant engineers frequently encounter a perplexing phenomenon known as 'PLC time jitter', where a controller clock experiences periodic step jumps, oscillating back and forth by seconds or fractions of a second.

Crucially, this clock instability often manifests only when time synchronization is enabled on redundant WinCC OS servers, disappearing completely when synchronization is deactivated. The root cause is almost invariably dual-master contention: redundant OS servers with uncoordinated local clocks both attempting to drive the AS controller clock via broadcast telegrams, or conflicting protocols (SIMATIC Mode vs. NTP) transmitting asynchronous timestamps. This technical guide analyzes the mechanics of time distribution in PCS 7, identifies protocol conflicts, and provides the step-by-step procedure to establish a stable, jitter-free NTP-synchronized master clock hierarchy.

Architecture and Fundamental Mechanics

Time synchronization in PCS 7 operates across two primary network domains: the Terminal Bus (connecting clients and servers) and the Plant Bus (connecting servers and AS controllers):
1. Synchronization Protocols:
* NTP Mode (Network Time Protocol): Conforms to RFC 2030 (Simple NTP). Time frames are transmitted via UDP port 123 using universal coordinated time (UTC). Modern PCS 7 architectures mandate NTP for both Terminal and Plant bus synchronization.
* SIMATIC Mode: A legacy Siemens proprietary protocol operating directly on Layer 2 (MAC broadcast/ISO) via CP 443-1 and CP 1623. In SIMATIC Mode, a designated master broadcasts snap frames at periodic intervals (typically every 10 seconds).
2. The Mechanism of Time Jitter:
* When redundant OS servers (OS Server 1 and OS Server 2) are both configured as time masters on the Plant Bus without being synchronized to a common external reference clock, their internal hardware real-time clocks (RTC) will inevitably drift apart by several milliseconds to hundreds of milliseconds.
* OS Server 1 broadcasts a time frame (e.g., 12:00:00.150). The AS controller CP 443-1 receives the frame and adjusts the S7-400 CPU system clock.
* Moments later, OS Server 2 broadcasts its time frame (e.g., 12:00:00.020). The S7-400 CPU receives this frame and steps its internal clock backwards to match OS Server 2.
* This rapid alternating adjustment manifests as clock jitter, causing erratic trend logs, duplicate alarm entries, and disrupted PID derivative calculations.
3. UTC vs. Local Time Clashes: If one server or CP is configured for local daylight saving time while the controller expects UTC, the CPU clock will jump by exactly 1 or 2 hours every synchronization cycle.
4. Recommended Architecture: In a compliant PCS 7 design, redundant OS servers MUST NOT operate as unsynchronized time masters. Instead, a dedicated hardware time transmitter (e.g., SICLOCK TC 100/TC 400 or certified GPS/NTP server) serves as the primary time master. All OS servers, ES, and S7-400 CPUs/CPs synchronize as NTP clients directly to this master reference.

Step-by-Step Implementation Procedure

Step 1: Establish a Central NTP Reference Clock

  1. Ensure a dedicated hardware NTP time server (e.g., GPS clock, SICLOCK, or central plant domain controller) is installed on the plant network.
  2. Note the static IP addresses of the primary NTP server (and secondary NTP server if redundant).
  3. Confirm that UDP port 123 is open across all plant network switches and firewalls.

Step 2: Configure Time Synchronization in S7-400 CPU and CP 443-1

  1. Open HW Config for the S7-400 / S7-400H station.
  2. Double-click the industrial Ethernet communication processor (CP 443-1) to open its Object Properties.
  3. Navigate to the Time-of-Day Synchronization tab:
    * Check the box Enable NTP time-of-day synchronization.
    * Enter the IP addresses of the primary and secondary external NTP servers.
    * Set the synchronization interval to 10 seconds.
    * Ensure the checkbox Forward time-of-day synchronization to CPU is CHECKED.
  4. Double-click the S7-400 CPU to open its Object Properties.
  5. On the Diagnostics/Clock tab, verify that synchronization on the MPI/internal bus is set to As slave.
  6. Save and compile HW Config, then download to the AS.

Step 3: Configure WinCC Time Synchronization on OS Servers

  1. Open WinCC Explorer on the primary OS Server (OS_SRV01).
  2. In the navigation tree, open the Time Synchronization editor.
  3. Configure the settings:
    * In the 'Time synchronization via Terminal Bus' section: select Use NTP or Slave.
    * In the 'Time synchronization via Plant Bus' section: if using an external NTP server, UNCHECK 'Make this computer the time master'. Configure the OS Server as a time slave, or configure it to synchronize via the local CP 1623 NTP client.
    * Ensure the option 'UTC' (Coordinated Universal Time) is selected globally.
  4. Repeat the exact same configuration on the partner redundant OS Server (OS_SRV02).

Step 4: Align Windows Operating System Time Service

  1. On both OS Servers, open Windows Command Prompt as Administrator.
  2. Configure the Windows Time service (w32time) to synchronize against the central NTP master:
    cmd w32tm /config /manualpeerlist:"192.168.1.100,0x8 192.168.1.101,0x8" /syncfromflags:manual /reliable:yes /update net stop w32time && net start w32time w32tm /resync /force
  3. Verify that both OS servers achieve sub-millisecond synchronization to the central NTP source.

Step 5: Verify CPU Diagnostic Buffer and Trend Records

  1. In SIMATIC Manager, open PLC > Module Information for the S7-400 CPU.
  2. Navigate to the Time System tab and confirm that the CPU clock status is 'Synchronized' with 0 ms jitter.
  3. Inspect the CPU Diagnostic Buffer to verify there are no time-jump warnings or synchronization fault events.

Verification

  1. In SIMATIC Manager, monitor the S7-400 CPU clock in real time (PLC > Set Time of Day): observe the second and millisecond counter for 5 minutes and confirm smooth, continuous progression with zero backwards steps.
  2. In WinCC Runtime, open an analog process trend on an OS Client: verify that trend curves plot smoothly without vertical discontinuities, gaps, or jagged reversals.
  3. Inspect the WinCC Alarm Logging window: generate a test process alarm and verify that the timestamp matches the exact millisecond time recorded in the AS diagnostic buffer.
  4. Disconnect OS Server 1 from the network and verify that the AS clock remains perfectly stable, confirming that redundant servers are not transmitting conflicting master clock telegrams.

Limitations and Operational Precautions

  1. Never combine SIMATIC Mode (Layer 2 MAC broadcast) and NTP Mode on the same physical plant bus; mixing protocols creates competing time sources that destabilize CPU clocks.
  2. Redundant OS servers must never be configured as independent time masters unless they are synchronized to an external master clock of stratum 2 or higher.
  3. High network traffic or multicast storms on industrial Ethernet switches can delay time synchronization frames; ensure industrial switches support IEEE 1588 / PTP or prioritize NTP traffic.
  4. Changing CPU time backwards while SFC sequences or batch recipes are active can trigger step sequence timeouts or batch aborts; perform major clock reconfigurations during planned plant outages.

Engineer FAQ

Why did disabling time sync on the OS servers stop the PLC clock jitter?

With time sync disabled on the servers, the conflicting broadcast frames ceased. The PLC clock was left to run freely on its internal quartz oscillator without being constantly readjusted by competing servers.

Should PCS 7 systems use UTC or local time for controllers?

PCS 7 controllers, communication processors, and WinCC internal databases must ALWAYS use UTC (Coordinated Universal Time). WinCC faceplates and alarm lists convert UTC to local plant time for operator display.

What is the difference between SIMATIC Mode and NTP Mode?

SIMATIC Mode uses proprietary Layer 2 MAC broadcast frames over ISO transport. NTP Mode uses standard Layer 3 / UDP port 123 packets conforming to RFC 2030, which can route across subnets and integrate with standard network time servers.

Can an S7-400H CPU act as the master clock for the entire plant?

While technically possible, it is not recommended in PCS 7 architectures. S7-400 CPUs have standard quartz crystals that drift significantly over time. A dedicated GPS or NTP master clock (such as SICLOCK) should always be used.

Do I need a special license for WinCC Time Synchronization?

The WinCC Time Synchronization editor and client/server time synchronization components are included in standard WinCC and PCS 7 OS licenses. Consult an authorized Siemens distributor or the Siemens Industry Mall for hardware time server pricing and procurement.

Technical References

Related Articles

Related Tags

  • Time Synchronization
  • NTP
  • Clock Jitter
  • S7-400
  • CP 443-1
20 respuestas