Automation Glossary • DNP3 Time Synchronization

What Is DNP3 Time Synchronization?

Merobix Engineering • • 7 min read

DNP3 timestamps events at the source, which only helps if the source clock is right. Time synchronization is how the master keeps outstation clocks aligned so that timestamps across a system mean the same thing. This page explains the DNP3 time-sync mechanism, the flag an outstation raises when it needs its clock set, and why the whole event model depends on it.

Back to Blog

DNP3 Time Synchronization in one line: DNP3 time synchronization is the process by which a master sets and maintains an outstation's clock so that event timestamps are accurate and comparable. The outstation raises a need-time bit in its internal indication field when its clock has not been set or has drifted, and the master responds by writing the current time (a time-and-date object, group 50). Accurate synchronization is what makes a cross-outstation sequence of events meaningful.

How a Master Sets Outstation Time

The outstation asks, and the master answers. An outstation signals that it wants its clock set by setting the need-time bit in the internal indication (IIN) field it returns on responses. The master notices that flag on its next poll and writes the current time to the outstation using a time-and-date object in group 50. Once written, the need-time bit clears until the outstation decides its clock has drifted again.

The write can account for link delay so the outstation applies a corrected time rather than the moment the master composed the message. There are also record-based time-sync variants for higher accuracy. The core loop, though, is simple: the outstation requests time via a flag, and the master supplies it via a write - the same flag whose lingering presence is what a technician chases when clearing a need-time IIN flag.

Why Time Sync Underpins the Event Model

DNP3's whole value proposition for disturbances rests on time. Because events are timestamped at the outstation, a DNP3 sequence of events can reconstruct the order and timing of changes after the fact. But that only works if the outstation clock is correct. An unset or drifted clock produces events whose relative order is fine but whose absolute times are wrong, so they cannot be lined up against events from other outstations.

This is why DNP3 time sync often rides alongside a facility time source. A master may itself be disciplined by NTP and then propagate time down to outstations over DNP3, so the whole system shares one reference. Where sub-millisecond alignment across devices is required, a dedicated time distribution is used instead. The design principle is the same either way: no time source, no trustworthy sequence of events, and DNP3's timestamps are only as good as the clock behind them.

Serial Versus Networked Links: Picking the Sync Procedure

The standard offers more than one way to deliver time, and the link decides which one fits. On a serial channel with predictable latency, the master can first issue delay measurement (function code 23), timing a round trip so it knows roughly how long a message takes to arrive, and then write the group 50 time corrected for that delay. On routed networks the round trip varies from message to message, so a measured delay is already stale by the time it is applied; the record-current-time procedure (function code 24) addresses this by having the outstation latch the arrival moment of a specific frame, which the master then references when it writes the time. Using the serial-style procedure over a routed network is a classic way to end up with confidently wrong clocks.

There is also the option of not using DNP3 for time at all. An outstation that can discipline its clock from a local or network time source independently of the protocol removes the master from the loop entirely, and many modern devices support this. Whichever way a site goes, the design rule is the same: pick exactly one authoritative time source per outstation and disable the rest, because two writers fighting over one clock produce timestamp steps and reversals that are far harder to interpret afterward than steady, predictable drift would have been.

Sync Interval, Drift, and Events Already in the Buffer

How often to sync is a site-specific decision driven by two things: how fast the outstation's oscillator drifts, and how much timestamp error the application can tolerate. A system reconstructing cause and effect across multiple outstations needs much tighter alignment than one that only cares about same-day trending. The outstation raises its need-time flag on whatever schedule its configuration sets, but a master does not have to wait for the flag - many also sync on their own schedule as insurance. Drift behavior is per the device's documentation and worth verifying empirically: watch how far the clock walks between syncs during commissioning, and set the interval from that evidence rather than from habit.

One subtlety catches people repeatedly: a time write fixes the clock going forward, never backward. Events waiting in the event buffer were stamped at the moment they were captured, so events generated while the clock was wrong keep their wrong timestamps even after the master syncs. After an outstation restart, everything recorded before the first time write carries suspect times, which is one reason the restart sequence - the null unsolicited response announcing the restart, then the master clearing the restart indication and writing time promptly - deserves to be fast and automatic rather than waiting on the next scheduled poll cycle to come around.

Verifying Time Sync in the Field

A short verification pass during commissioning saves a great deal of confusion later:

  1. Force a test event at a known moment against a trusted reference clock, and compare the outstation's event timestamp with the reference.
  2. Capture the exchange and confirm the group 50 write is present, along with the delay measurement or record-current-time step if the design calls for one.
  3. Watch the need-time indication clear after the write, and note how long the device runs before raising it again.
  4. Repeat the test event across several outstations and check that their timestamps line up with each other, since cross-device alignment is the entire point of the exercise.
  5. Document which source disciplines each clock, so nobody quietly adds a second one later.

The cross-device check in step four is the one that finds real problems. Each outstation can pass a solo check while the population disagrees with itself, because different devices may be synced by different masters, on different schedules, or through different procedures. Lining up one physical event across every outstation that saw it is the closest thing to a ground-truth test the field offers, and it takes minutes while the crew is already on site.

Frequently Asked Questions

How does a DNP3 outstation request a time set?

It sets the need-time bit in the internal indication field returned on its responses. The master sees the flag on its next poll and writes the current time using a group 50 time-and-date object, which clears the flag until the clock drifts again.

What object does DNP3 use to set time?

A time-and-date object in group 50. The master writes the current time to the outstation, optionally corrected for link delay so the outstation applies an accurate time rather than the moment the message was composed.

Why does DNP3 event timing depend on time sync?

Events are timestamped at the outstation. If its clock is unset or drifted, the absolute times are wrong and events cannot be compared across outstations. Accurate time synchronization is what makes a cross-device sequence of events trustworthy.

Does a time write correct events already sitting in the buffer?

No. Timestamps are applied when the event is captured, so anything recorded while the clock was wrong keeps its wrong time even after synchronization. That makes prompt time sync after a restart important: until the first write lands, every event the outstation records carries a suspect timestamp, and no later correction will repair it.

Should the master sync time over a routed network the same way as over serial?

Not with the serial-style procedure. A delay measured on a routed network does not predict the delay of the next message, so the correction can mislead rather than help. Use the record-current-time procedure, or let the outstation take time from a network time source directly where it supports that, and keep a single authoritative source per device either way.

Sources and verification

This page references the protocol specifications published by the organizations below. Editions, product capabilities, and documentation change over time - confirm current requirements and specifications directly with the source.

Merobix is not affiliated with, endorsed by, or sponsored by these organizations; their names are used only to identify the standards and products discussed.

More in Industrial Protocols
CIP Sync  •  NTP Time Sync  •  PTP (IEEE 1588)  •  SCADA to ERP master data sync  •  DNP3 Need Time IIN Flag  •  All Industrial Protocols →
Free SCADA operator training
Merobix University - 70 video lessons & 261 quiz questions, from first login to compliance reporting. No demo call required.
Start free →