IEC 104 quality flags (IV, NT, OV) and CP56Time2a time tags
How quality descriptors report offline Modbus devices to SCADA and how the 7-byte CP56Time2a timestamp is encoded
Quick answer: Every IEC 104 point carries quality descriptor bits: IV (Invalid, 0x80) when a Modbus device stops responding, NT (Not Topical, 0x40) before the first read or clock sync, and OV (Overflow, 0x01) when a scaled integer exceeds its range. Time-tagged ASDUs (types 30–37) append a 7-byte CP56Time2a millisecond timestamp.
IEC 60870-5 Quality Descriptor Bits (QDS, SIQ, DIQ)
Every monitored point in IEC 60870-5-104/101 carries quality flags so the SCADA control center knows whether a measurement is trustworthy or stale. When a downstream Modbus RTU or TCP device disconnects or returns an exception, a proper gateway must never freeze silent stale numbers as "good"—it marks the affected IOAs with Invalid (IV):
| Bit | Flag | Full Name | How Max IEC Gateway Sets It |
|---|---|---|---|
Bit 7 (0x80) | IV | Invalid | Set to 1 when the Modbus device fails to respond after configured retries or returns a Modbus exception, or before the first successful poll. |
Bit 6 (0x40) | NT | Not Topical | Set to 1 on startup before the point has ever been read from the Modbus device, or when the clock is unsynchronized with "invalid until synchronized" enabled. |
Bit 5 (0x20) | SB | Substituted | Indicates a value forced/overridden by an operator or simulator. |
Bit 4 (0x10) | BL | Blocked | Indicates transmission of the point is blocked. |
Bit 0 (0x01) | OV | Overflow | For measured values (QDS): set to 1 if a scaled value exceeds the target integer/normalized range (e.g., outside -32768..+32767 for M_ME_NB_1). |
The 7-Byte CP56Time2a Time Tag Structure
Time-tagged IEC 104 types—such as M_SP_TB_1 (30), M_DP_TB_1 (31), M_ME_TD_1 (34), M_ME_TE_1 (35), M_ME_TF_1 (36), and M_IT_TB_1 (37)—append a 7-byte (56-bit) binary timestamp (CP56Time2a) recording the exact millisecond the change was detected at the gateway:
| Byte(s) | Field | Range / Bits | Notes |
|---|---|---|---|
0–1 | Milliseconds | 0..59,999 ms (16-bit unsigned, little-endian) | Combines seconds (0..59) × 1000 + milliseconds (0..999). |
2 | Minutes + IV + RES1 | Bits 0–5: Minute (0..59)Bit 7: IV (Invalid time) | Bit 7 (IV) is 1 if the gateway clock has not yet been synchronized by C_CS_NA_1 (103) or NTP. |
3 | Hours + SU | Bits 0–4: Hour (0..23)Bit 7: SU (Summer Time / DST) | Max IEC Gateway supports either UTC (recommended for SCADA) or local time with automatic SU bit handling. |
4 | Day of Week + Day of Month | Bits 0–4: Day of Month (1..31)Bits 5–7: Day of Week ( 1=Mon..7=Sun) | Encoded in a single byte. |
5 | Month | Bits 0–3: Month (1..12) | 1 = January .. 12 = December. |
6 | Year | Bits 0–6: Year (0..99, i.e., 2000–2099) | Two-digit year offset from 2000 (e.g., 26 = 2026). |
Frequently asked questions
Should I use M_ME_NC_1 (13) or M_ME_TF_1 (36) for floating-point telemetry?
Use M_ME_NC_1 (13, without time tag) for General Interrogation responses (COT 20) and cyclic updates, and M_ME_TF_1 (36, with 7-byte CP56Time2a time tag) when your SCADA historian requires outstation-timestamped spontaneous events (COT 3), including events buffered while the TCP link was down.
What happens to IEC 104 quality flags when a Modbus RTU meter is unplugged?
As soon as a Modbus poll fails after its configured retries, Max IEC Gateway marks all IOAs mapped to that device with QDS = 0x80 (IV = Invalid) and transmits a spontaneous update (COT 3) so the SCADA HMI immediately highlights the points as bad/offline.
Test IEC 104 commands & telemetry live with Max IEC Gateway
Download the free 30-day trial for Windows 10/11 or Linux x64 and inspect every Modbus poll and IEC 104 ASDU in the live web traffic monitor.
Download Free Trial All IEC 104 Guides