Protocols and data

IEC 60870 timestamps and quality descriptors

How IEC 60870-5-101 and 104 carry time and quality: the CP56Time2a time tag, its invalid and summer-time bits, and the quality flags overflow, blocked, substituted, not topical and invalid.

An IEC 60870-5-101 or 104 value can carry two kinds of context: a time tag, which says when the outstation recorded it, and a quality descriptor, which says whether it can be used. Both are easy to drop in a gateway or a historian, and both are needed to put events in the right order and to keep bad values out of reports.

This guide is part of the IEC 60870 and IEC 61850 series.

CP56Time2a

Types with a time tag, such as M_ME_TF_1 (type 36), carry a 7-byte time called CP56Time2a:

ByteContent
1 and 2Milliseconds within the minute, 0 to 59,999
3Minutes (0 to 59) and the IV bit: the time is invalid
4Hours (0 to 23) and the SU bit: summer time
5Day of month (1 to 31) and day of week (1 to 7, or 0 when not used)
6Month (1 to 12)
7Year within the century (0 to 99)

The MZ Automation library also implements the shorter CP24Time2a (minutes, seconds and milliseconds only), used by some IEC 101 types, and CP16Time2a for elapsed times.

Three points need care:

  • The IV bit. When set, the outstation's clock was not synchronised. The value is fine, but its time is not.
  • Time zone. CP56Time2a has no time zone field. Agree whether each outstation uses UTC or local time, and what the SU bit means for it.
  • Two-digit year. The century is implied. Store full dates after decoding.

Time tag and arrival time

The time tag says when the outstation recorded the value. The control centre receives it later, sometimes much later after a lost connection. Keep both times:

TimeSourceUse
Time tagOutstation clockOrder of events; interval energy
Arrival timeReceiver clockLink health; how late the data is

Types without a time tag, such as M_ME_NC_1 (type 13), have only the arrival time. Do not present that as the time of measurement. The telemetry timestamp guide covers the same rule for any protocol.

Synchronise outstation clocks, either with the clock synchronisation command (C_CS_NA_1, type 103) or with a network time source. Record which method each station uses, and alarm on the IV bit.

The quality descriptor

Measured values and status points carry a quality descriptor. The MZ Automation library and the Beckhoff type reference define the flags:

FlagBitMeaning
OV, overflow0x01 (measured values)The value is outside its range
BL, blocked0x10The value is blocked for transmission, and shows its state at the time it was blocked
SB, substituted0x20An operator or an automatic function supplied the value, not the normal source
NT, not topical0x40The value was not updated at the last opportunity; it may be out of date
IV, invalid0x80The value cannot be used; the source detected a fault

A quality of 0 means none of the flags is set. The flags are independent: a value can be substituted and not topical at once.

Commission time and quality

Test with the outstation owner, using a simulator where possible:

  1. Check that time tags and arrival times are both stored, and that their difference is small under normal conditions.
  2. Remove clock synchronisation and check that the IV bit appears at the receiver.
  3. Block or substitute one value at the outstation and check that BL or SB arrives.
  4. Disconnect a source behind the outstation and check that IV or NT arrives, not a steady value.
  5. Restore everything and check that the flags clear.

The stale data guide explains how to handle each state in reports and calculations.

Telecontrol and EpiSensor systems

Edge does not implement IEC 60870-5. It applies the same rules to the data it collects: every reading carries the time of measurement, and a device that stops reporting shows as stale rather than as a steady value. The IEC 101 vs 104 guide explains where a telecontrol link and an EpiSensor system meet.

Common questions

What is CP56Time2a?

The 7-byte binary time tag of IEC 60870-5: two bytes of milliseconds within the minute, then minutes, hours, day of month and day of week, month, and a two-digit year. It includes an invalid bit, set when the outstation's clock is not synchronised, and a summer-time bit.

What does NT (not topical) mean in IEC 104?

The value was not updated successfully at the last opportunity, so it may be out of date. It is not necessarily wrong, but it is not a current reading.

What is the difference between invalid and not topical?

Invalid (IV) means the value cannot be used: the source detected a fault. Not topical (NT) means the value may be valid but has not been refreshed recently. Both should stop the value being treated as a new measurement.