The Factory Where the Alarm Comes Before the Cause
Look through a plant's fault history and you'll sometimes find effects recorded before their causes. A "conveyor stopped" alarm might show 10:02:15, while the "inverter overcurrent" that caused it shows 10:02:48. Nothing happened out of order. The PLC and the MES server were just 33 seconds apart.
When PLCs, HMIs, machine PCs, and MES servers each run their own clocks, you get problems like these:
Korea doesn't use daylight saving time, but clock drift is still common. Clocks get set by hand at installation and never touched again, dead RTC batteries reset the time on every reboot, or nobody configured synchronization at all. A typical quartz oscillator with ±20 ppm error drifts about 1.7 seconds a day, or roughly 52 seconds a month.
Where Should the Timestamp Come From?
A single event can carry three different timestamps:
Network latency and collector buffering can put anywhere from a few hundred milliseconds to several minutes between them. Event time is what you analyze. Collection time is what you check against when you can't trust the machine's clock. So store both, separately. OPC UA separates SourceTimestamp and ServerTimestamp for the same reason.
You also need one time zone rule for every layer. We recommend storing everything in UTC and converting to KST only for display. When timestamps travel as strings, use ISO 8601 with an explicit offset, such as `2026-11-09T10:02:15.120+09:00`, so values without a zone never get mixed in.
NTP or PTP?
NTP
On a factory LAN, NTP usually holds accuracy within a millisecond, a few milliseconds at worst. That's enough for most MES work: alarm sequencing, production records, and cycle-time calculation.
PTP (IEEE 1588)
With switches and NICs that support hardware timestamping, PTP reaches sub-microsecond accuracy. It's meant for multi-axis motion synchronization, high-speed vibration measurement, and equipment where events are less than a millisecond apart. The cost is infrastructure, since you need switches that act as boundary clocks or transparent clocks.
Building an Internal Time Service
Don't let OT devices reach internet time servers directly. A typical design looks like this:
Handling Equipment That Can't Be Synchronized
For legacy machines whose clocks you can't change, there are usually two options:
Either way, keep monitoring the error. Log "machine time minus collection time" for each machine every hour, and send an alert when it goes past your tolerance (for example, one second). A sudden jump usually means a dead battery or a reboot.
In a historian or time-series database, events can share a timestamp, and corrections can make timestamps run backward. Store a per-machine sequence number and treat it as the final word on ordering.
Adoption Checklist
How POLYGLOTSOFT Approaches It
POLYGLOTSOFT builds data collection that records both event time and collection time at the point of capture, with a dashboard that monitors clock error for every machine. We can design the whole thing with you around your site's conditions, from the internal time servers to legacy equipment correction and ordering guarantees in your historian. If you want to know whether you can trust the timestamps in your factory data, get in touch any time.
