IEC 60870-5-104 is one of the most widely used SCADA communication protocols in power and industrial automation.
One of its most critical yet misunderstood components is time synchronization, achieved using the CP56Time2a format.
Accurate time coordination across remote terminal units (RTUs), intelligent electronic devices (IEDs), and control centers ensures that every event, command, and alarm can be correctly timestamped, sequenced, and analyzed.
Table of Contents
Why Time Synchronization Matters in SCADA
In a distributed control system, time is the invisible backbone of operational integrity.
Without synchronized clocks, events such as circuit breaker trips, load changes, or alarms may appear in the wrong order, leading to:
- Incorrect fault analysis
- Inaccurate sequence-of-event records
- Misoperation of protection logic
- Compliance issues with power system standards (e.g., IEC 61850, NERC CIP)
IEC 60870-5-104 solves this by embedding precise time tags within data messages, ensuring end-to-end time consistency.
What Is CP56Time2a?
CP56Time2a is the 7-byte timestamp format defined in IEC 60870-5-104 (and inherited from IEC 60870-5-101).
It represents date and time with millisecond precision and is used to time-stamp process information, events, and control commands.

Structure of CP56Time2a (7 Bytes)
| Field | Size (bits) | Range | Description |
|---|---|---|---|
| Milliseconds | 16 | 0–59,999 | Time within current minute |
| Minutes | 8 | 0–59 | Lower 6 bits used, bit 7 = invalid flag |
| Hours | 8 | 0–23 | Lower 5 bits used |
| Day of Month | 8 | 1–31 | Lower 5 bits used |
| Day of Week | 3 | 1–7 | Optional use |
| Month | 8 | 1–12 | Lower 4 bits used |
| Year | 8 | 0–99 | Offset from 2000 (e.g., 25 = 2025) |
Example (hex):0xE803 0x25 0x0B 0x15 0x09 0x19 → 2025-09-21 11:37:00.998
How Time Synchronization Works in IEC 60870-5-104
IEC 104 supports two-way time synchronization between the controlling station (master) and controlled stations (slaves/RTUs).
- Master sends a clock sync command (ASDU type C_CS_NA_1)
→ Contains CP56Time2a timestamp. - Slave adjusts its internal clock
→ Sets its system time to match the received value. - Acknowledgment returned
→ Confirms synchronization success.
Key Points:
- Synchronization is periodic (every few minutes or hours).
- Can also occur on startup or manually triggered by SCADA.
- Some systems cross-check with external NTP or GPS clocks for higher accuracy.
ASDUs Used for Time Synchronization
| ASDU Type ID | Name | Direction | Purpose |
|---|---|---|---|
| 103 | C_CS_NA_1 | Control direction | Clock synchronization command |
| 104 | C_CS_TA_1 | Control direction | Time synchronization with CP56Time2a |
| 70+ (various) | M_ME_TD_1, etc. | Monitor direction | Process data with time tag |
These ASDUs ensure that both control and monitoring directions can carry time information.
Encoding & Decoding CP56Time2a
Developers implementing IEC 104 drivers often need to parse or generate these timestamps.
Example:
Hex bytes received:0xC0 0x27 0x31 0x10 0x16 0x07 0x19
Decoded:
- Milliseconds: 0x27C0 → 10,000 ms = 10s
- Minute: 49 (0x31)
- Hour: 16 (0x10) → 16:49:10
- Day: 22 (0x16)
- Month: 7 (0x07)
- Year: 25 (0x19 → 2019+6=2025 approx.)
The byte order is little-endian — milliseconds are transmitted low byte first.
Integrating NTP and GPS Clock Sources
Modern SCADA networks often rely on NTP (Network Time Protocol) or GPS receivers as master time sources.
IEC 104 can work alongside these to maintain synchronization between physical and logical layers:
- GPS → NTP → SCADA Server → IEC 104 Clock Sync Command → RTUs
- Typical precision: ±1 ms for GPS, ±10 ms for NTP-synced systems
Best Practices:
- Use redundant NTP servers
- Monitor offset drift and round-trip delay
- Validate clock sync through Wireshark or diagnostic tools
Time Accuracy, Jitter, and Drift
Accuracy in IEC 104 systems depends on:
- Network latency and jitter
- TCP stack delays
- RTU processing speed
- Internal clock stability
A well-tuned network typically achieves ±1–5 ms synchronization error.
For power grid protection relays, the requirement may be tighter (<1 ms).
Comparing CP24Time2a vs CP56Time2a
| Feature | CP24Time2a (3 Bytes) | CP56Time2a (7 Bytes) |
|---|---|---|
| Range | Up to 1 day | Up to 100 years |
| Resolution | 1 ms | 1 ms |
| Application | Short-duration events | Full timestamped data |
| Used in | Older IEC 101/serial systems | IEC 104 and network-based systems |

CP56Time2a is now the de facto standard for network-based telemetry systems.
Time Zones, UTC, and Daylight Saving
While CP56Time2a encodes local time, it does not inherently include timezone data.
Therefore:
- The master and all RTUs must use the same timezone.
- For international systems, it’s recommended to use UTC with software offset handling.
- Avoid daylight-saving adjustments in automation servers — they can desynchronize systems unexpectedly.
Testing and Troubleshooting Time Synchronization
Testing tools:
- Wireshark with IEC 104 dissector
- Open-source simulators (e.g., lib60870, ScadaBR, OpenMUC)
Common issues:
- Incorrect CP56Time2a byte order
- Delay between NTP and IEC sync cycles
- Mismatch between master and slave time zones
Diagnostic tip:
In Wireshark, filter iec104.asdu.typeid == 103 to isolate synchronization messages.
Handling Failures and Redundant Clocks
In redundant IEC 104 systems:
- Both control paths may attempt synchronization.
- One must act as the primary clock source, and others stay standby.
- Redundant SCADA servers should verify time offset before broadcasting sync commands.
Set time synchronization intervals carefully (e.g., every 60–300 seconds) to avoid conflicts.
Best Practices for Reliable Time Synchronization
- Use CP56Time2a for all timestamped data.
- Designate one authoritative clock source.
- Implement redundant NTP/GPS masters.
- Verify time regularly with Wireshark traces.
- Keep all systems in UTC or uniform local time.
- Monitor drift and synchronization errors in SCADA diagnostics.
- Validate CP56Time2a decoding during acceptance testing.
Secure Time Synchronization and IEC 62351
The IEC 62351-5 standard introduces cryptographic authentication for IEC 104 messages, including time sync.
It prevents:
- Spoofed or manipulated timestamps
- Replay attacks on clock sync commands
- Unauthorized time resets by rogue devices
Adopting TLS-secured IEC 104 or IEC 62351-compliant extensions ensures safe synchronization in modern smart grids.
Summary Table: CP56Time2a Quick Reference
| Parameter | Value |
|---|---|
| Bytes | 7 |
| Resolution | 1 millisecond |
| Year offset | 2000 |
| Used in | IEC 101 / 104 / 61850 |
| Typical Sync Interval | 30–300 seconds |
| Master ASDU | C_CS_NA_1 |
| Common Issues | Time drift, timezone mismatch, firewall blocking |
| Tools | Wireshark, lib60870, OpenMUC, NTP, GPS receivers |
Conclusion
Time synchronization in IEC 60870-5-104 is not just a background process — it’s a cornerstone of accurate event reporting and reliable SCADA operation.
The CP56Time2a format provides a simple yet powerful way to ensure precise and traceable timestamps across every device in your control network.
When combined with modern NTP/GPS clocks, redundancy, and secure extensions (IEC 62351), IEC 104 becomes a robust protocol ready for the next generation of smart grid automation.
Next Step: Decode IEC 104 Frames in Practice
Now that you understand how CP56Time2a time synchronization works, take the next step and see how timestamps and ASDUs appear inside real IEC 60870-5-104 frames.
👉 Try the free IEC 60870-5-104 Frame Decoder to analyze and decode actual IEC 104 messages byte by byte — including CP56Time2a timestamps and ASDU types.
