Skip to main content

DNP3 Data Source

The DNP3 (Distributed Network Protocol 3) data source allows Mango to communicate with industrial devices that speak the DNP3 protocol, commonly used in SCADA systems for utilities, water treatment, oil and gas, and power distribution. Mango supports both DNP3 IP (communication over TCP/IP networks) and DNP3 Serial (communication over RS-232 or RS-485 serial connections). The data source functions as a DNP3 master, polling remote outstations for class-based event data and static data.

DNP3 uses class-based polling (Class 1, 2, 3 events) and periodic integrity polls (Class 0) to collect data. The data source supports event timestamps from DNP3 objects, binary and analog inputs and outputs, and command operations for controlling remote devices.

Overview

PropertyValue
ModulemangoAutomation-Dnp3
ProtocolDNP3 (IEEE 1815)
DirectionBidirectional
Typical UseSCADA communication with substations and RTUs

Prerequisites

  • A DNP3-compatible device (outstation) accessible over TCP/IP or serial connection.
  • Knowledge of the device's slave address and the master address to assign to Mango.
  • The device must support Class 0 polls (static data) and Class 1/2/3 event polls (using Object Group 60, Variation 2).
  • For DNP3 IP: network access to the device on the configured TCP port.
  • For DNP3 Serial: a serial port (RS-232 or RS-485) connected to the device, with matching baud rate and communication parameters.
  • Both the device and the Mango server should use the same NTP server if DNP3 object timestamps are used for logging, to ensure time synchronization.

Configuration

Data Source Settings

SettingDescription
NameA descriptive name for the data source.
Source AddressThe DNP3 master address assigned to this data source. This is the address Mango registers with on the network.
Slave AddressThe address of the remote outstation device you wish to communicate with.
Update periodHow often Mango performs a class event poll (Class 1, 2, 3).
Relative static data poll ratioThe ratio at which the data source performs an integrity poll (Class 0). For example, a ratio of 5 means an integrity poll occurs every 5th poll cycle.
Scan all classes on static data pollWhen checked, the integrity poll includes Class 0, 1, 2, and 3 together. When unchecked, only Class 0 is polled during the integrity scan.

DNP3 IP Settings

For IP-based connections, you also configure:

SettingDescription
HostIP address or hostname of the DNP3 outstation.
PortTCP port number for the DNP3 connection.

DNP3 Serial Settings

For serial connections, you also configure:

SettingDescription
Serial portThe system serial port (e.g., /dev/ttyS0 on Linux, COM1 on Windows).
Baud rateCommunication speed. Must match the outstation configuration.
Data bitsNumber of data bits per character (typically 8).
Stop bitsNumber of stop bits (typically 1).
ParityError-checking mode: None, Even, or Odd.

Polling Behavior

Each poll cycle, the data source polls for Class 1, 2, and 3 events. The data source only polls a specific class if at least one data point has been configured for that class. During the integrity scan, the data source polls either Class 0 alone or all four classes, depending on the Scan all classes on static data poll setting.

Unsolicited messages and time synchronization are not currently supported by this data source.

Data Point Configuration

Adding Points

You can add a single point by defining its index, or add several data points at once by defining minimum and maximum indexes. This bulk-add feature is useful when the outstation has many sequential points of the same type.

Point Settings

SettingDescription
Data typeThe DNP3 object type (e.g., binary input, analog input, binary output, analog output).
IndexThe point index (address) on the outstation.
Class 0When checked, this point is updated during Class 0 (integrity) scans.
Data classWhich event class (1, 2, or 3) this point receives updates from.
Index address sizePoints with an index above 256 require a 16-bit index configuration.

Supported DNP3 Objects

The data source supports the following DNP3 object groups and variations:

DescriptionGroupVariation
32-bit analog input status301
16-bit analog input status302
32-bit analog input status without flag303
16-bit analog input status without flag304
32-bit floating analog input status305
32-bit analog input event w/o time321
16-bit analog input event w/o time322
32-bit analog input event with time323
16-bit analog input event with time324
32-bit floating analog input event w/o time325
32-bit floating analog input event with time327
32-bit analog output status411
16-bit analog output status412
32-bit floating analog output status413
Binary input status packed format11
Binary input status with flags12
Binary input event without time21
Binary input event with absolute time22
Binary output status packed format101
Binary output status with flags102
Binary output CROB121

Logging Behavior

Data points assigned to an event class (1, 2, or 3) log all DNP3 class events from the device buffer directly to the time series database in sequence, regardless of the data point's configured logging settings. If a protocol timestamp is available from the DNP3 object, it is used. Otherwise, the polling time is used. Any additional logging configurations assigned to the point (such as interval logging) remain active alongside the event-driven logging.

Commands (Setting Output Points)

For points of type OUTPUT (binary output or analog output), you can define default command parameters. When a value is set at runtime, the following commands apply:

Binary Output Commands

CommandDescription
pon / poffPulse on / Pulse off
lon / loffLatch on / Latch off
close / tripClose / Trip

All commands can be followed by two optional parameters specifying TIME ON and TIME OFF in milliseconds. For example: pon,500,200 sends a pulse-on command with 500 ms on-time and 200 ms off-time.

You can also enter simple values: 1, 0, true, or false. In this case, the default command configured on the point is used. For example, if a binary point is registered with CLOSE/TRIP as the default command and TIME ON = 1000, TIME OFF = 0:

  • Writing 1 sends the CLOSE command with TIME ON 1000, TIME OFF 0.
  • Writing 0 sends the TRIP command with TIME ON 1000, TIME OFF 0.
  • Writing pon sends a PULSE ON command with TIME ON 1000, TIME OFF 0 (using the default times).
  • Writing poff,300,0 sends a PULSE OFF command with TIME ON 300, TIME OFF 0 (overriding the defaults).

Common Patterns

Utility SCADA Monitoring

DNP3 is the dominant protocol in electric utility SCADA systems. A typical configuration involves one Mango DNP3 IP data source per remote terminal unit (RTU) or intelligent electronic device (IED). Configure the master and slave addresses to match your SCADA network addressing scheme, set the poll period to a few seconds for event classes, and use a static data poll ratio of 10-30 to perform periodic integrity checks.

Mixed IP and Serial Deployments

Some installations have a mix of IP-accessible and serial-connected outstations. Create separate DNP3 IP and DNP3 Serial data sources for each connection type. Both types share the same data point configuration format, so points can be configured consistently across the deployment.

Monitoring Analog Inputs with Event Logging

For analog measurements (temperatures, pressures, flow rates), configure data points using analog input objects (Group 30) with an appropriate event class. The outstation will report value changes as events with timestamps, and Mango logs these directly to the time series database using the outstation's timestamp. This preserves the exact time the value changed on the remote device, rather than using the Mango poll time.

Troubleshooting

No Data Received

  1. Address mismatch -- verify that the source address (master) and slave address match the outstation's configuration.
  2. No points configured for event class -- the data source only polls a class if at least one point is assigned to it. Ensure points have the correct data class.
  3. Class 0 not checked -- if a point should update during integrity polls, make sure the Class 0 checkbox is enabled.
  4. Device does not support event polling -- the device must support Class poll requests (Object Group 60, Variation 2).

Timestamp Discrepancies

  1. NTP synchronization -- if the device and Mango server use different time sources, logged timestamps may appear inconsistent. Use the same NTP server on both.
  2. Mixed logging -- points with both DNP3 event timestamps and Mango interval logging may show duplicate or interleaved entries. This is expected behavior.

Command Failures

  1. Wrong command syntax -- binary output commands must use the exact syntax: pon, poff, lon, loff, close, or trip, optionally followed by comma-separated time parameters.
  2. Point not configured as output -- verify the point type supports write operations (binary output CROB or analog output).
  3. Index address size -- if the point index is above 256, ensure the 16-bit index address size is configured.

Communication Timeouts

  1. Network issues -- for DNP3 IP, verify network connectivity to the outstation's IP address and port.
  2. Serial configuration mismatch -- for DNP3 Serial, confirm the baud rate, data bits, stop bits, and parity match the outstation exactly.
  3. Outstation offline -- check that the outstation device is powered on and functioning.