DNP3
DNP3 (Distributed Network Protocol) was developed to give standards-based communication between control centre computers, RTUs and IEDs (Intelligent Electronic Devices) in the electricity distribution industry. Today it is also widely used outside electrical power, in water and wastewater, transport, and oil and gas.
DNP3 follows the IEC Technical Committee 57 standards and works as a three-layer OSI “Enhanced Performance Architecture” (EPA) protocol. It was first developed in November 1993 by Harris Corporation and Distributed Automation Products, and ownership later passed to the DNP3 User Group.
inSCADA supports DNP3 over TCP/IP in both the Master and the Outstation (Slave) role.
What the protocol is for
Section titled “What the protocol is for”DNP3 is optimised for SCADA work in particular — carrying data acquisition and control commands between computers. Unlike general-purpose internet protocols (mail, documents, multimedia) it is built for industrial communication.
Master and outstation
Section titled “Master and outstation”DNP3 communication has two basic roles:
- Master: the side that polls outstations to collect data and sends control commands
- Outstation (slave): the side that holds the field data in its database and answers the master’s polls
The master keeps its picture of the outstation databases current by polling — asking each outstation to send the values it holds.
System topologies
Section titled “System topologies”One-to-one: a single master talks to a single outstation over a dedicated or dial-up line.
Multi-drop: a single master talks to several outstations in turn. Each outstation answers only the messages addressed to it. The link may be several telephone lines, fibre optic, or radio.
Hierarchical: an intermediate unit acts as both a master (to the outstations below it) and an outstation (to the master above it) — a sub-master.
TCP/IP: many manufacturers offer products that carry DNP3 messages over TCP/IP in place of the traditional link layer, which makes economical data collection from geographically scattered devices possible.
Data types (object groups)
Section titled “Data types (object groups)”DNP3 classifies data by group and variation number:
| Data type | Description | Read | Write |
|---|---|---|---|
| Binary Input | A digital input — a physical or logical boolean state | ✓ | — |
| Double Input | A double-bit digital input | ✓ | — |
| Binary Output | A digital output — open/close, start/stop | ✓ | ✓ |
| Counter | A counter value (kWh and the like) | ✓ | — |
| Frozen Counter | A frozen counter | ✓ | — |
| Analog Input | A measured or calculated analogue value | ✓ | — |
| Analog Output | An analogue output — a physical or logical value such as a setpoint | ✓ | ✓ |
Static and event data
Section titled “Static and event data”Static data are the present values — a binary input’s current open/closed state, or an analogue value at the moment it is sent.
Event data are tied to something that mattered: a change of state, a threshold crossed, a momentary reading. DNP3 can report events with or without a timestamp.
An outstation produces an event when a binary input changes state, or when an analogue value crosses its configured deadband.
Event classes
Section titled “Event classes”DNP3 sorts events into three classes:
- Class 1: highest priority
- Class 2: medium priority
- Class 3: low priority
The master can poll class 1, 2, 3 or any combination of them separately.
Analogue variations
Section titled “Analogue variations”The static analogue data formats:
- 32-bit integer (with flag)
- 16-bit integer (with flag)
- 32-bit integer
- 16-bit integer
- 32-bit floating point (with flag)
- 64-bit floating point (with flag)
Flag: an 8-bit field carrying online state, restart, loss of communication, forced data and over-range.
Unsolicited responses
Section titled “Unsolicited responses”An outstation can send a response without being polled. The mode is useful in a system with many outstations where the master has to learn of a change at once: rather than waiting for the polling cycle, the outstation reports the change directly.
Layer architecture
Section titled “Layer architecture”Link layer
Section titled “Link layer”Provides a reliable physical link with error detection and duplicate-frame detection. The maximum payload is 250 bytes (excluding CRC), and the total maximum frame length including CRC and headers is 292 bytes.
- CRC: a CRC octet pair for every 16 data bytes detects a communication error
- Addressing: 65,520 separate addresses are available
Transport layer
Section titled “Transport layer”Splits a long application-layer message into small packets for the link layer to carry. It needs only 1 byte of overhead.
Application layer (fragments)
Section titled “Application layer (fragments)”Messages are split into fragments sized to the receiving device’s buffer (typically 2048–4096 bytes). In a noisy environment, reducing the fragment size can improve the chance a message gets through.
Implementation levels
Section titled “Implementation levels”DNP3 accepts that not every device needs every feature:
- Level 1: the basic functions only
- Level 2: more functions, groups and variations
- Level 3: the most complete implementation
Parameter reference
Section titled “Parameter reference”The connection, device, frame and variable parameters are described in full on the sub-pages:
- DNP3 Master — master configuration and parameter detail
- DNP3 Outstation — slave configuration