DNP

The ClosedDNP Distributed Network Protocol is a set of communications protocols used between components in process automation systems. Its main use is in utilities such as electric and water companies. instruction sets up a datalogger as a DNP outstation device.

Syntax

DNP ( ComPort, BaudRate, Confirmation, TimeOffset [optional], MaxTimeDiff [optional], DNPTLS [optional] )

Remarks

This instruction sets up a datalogger COM port to service DNP commands.

Parameters

ComPort (Communications Port)

The communications port that will be used by the instruction. Right-click to display a list. Options vary depending on the instruction.

Alphanumeric Description
ComRS232 RS232 port of the datalogger
ComUSB USB of the datalogger
ComME Datalogger CS I/O port; modem enabled
Com310 Datalogger CS I/O port; COM310 modem
Com320 Datalogger CS I/O port; COM320 modem
ComSDC7 Datalogger CS I/O port; SDC7
ComSDC8 Datalogger CS I/O port; SDC8
ComSDC10 Datalogger CS I/O port; SDC10
ComSDC11 Datalogger CS I/O port; SDC11
ComC1 Datalogger control terminals 1 & 2
ComC3 Datalogger control terminals 3 & 4
ComU1 Universal terminal pair U1 (TX) & U2 (RX)
ComU3 Universal terminal pair U3 (TX) & U4 (RX)
ComU5 Universal terminal pair U5 (TX) & U6 (RX)
ComU7 Universal terminal pair U7 (TX) & U8 (RX)
ComU9 Universal terminal pair U9 (TX) & U10 (RX)
ComU11 Universal terminal pair U11 (TX) & U12 (RX)
ComRF Integrated radio communication

Type: Constant. For all instructions except SerialOpen, this parameter can also be a variable.

DNP PakBus datagram routing - DNP datagram allows remote DNP outstation devices to talk with a DNP Master without being directly connected to the Master. In order to implement DNP datagram, the ComPort parameter on a router datalogger is preceded with a minus sign (for example, -ComRS232) and the comport parameter on the remote datalogger is set to 0. You must use a different COM port for DNP3 and PakBus communications. The PakBus address of the DNP slave must match the DNP address of the slave.

DNP over TCP - Setting the ComPort parameter to a number >= 100 specifies a TCP port number and will enable listening on this TCP port for a socket connection instead of using one of the physical ComPorts. The default port number for DNP over TCP is 20000. The port number must match the port number specified in the DNP master for the master to make a connection with the datalogger.

BaudRate (Data Transmit Rate)

The rate, in bps, at which data is transmitted. The options are 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, and 115200. Selecting one of these options fixes the baud rate at that rate of communication.If a negative baud rate is entered, the first communication attempt will be at the specified baud rate, but if communication fails at that rate, the datalogger will go into autobaud mode (where it will try different rates until successful or until the instruction times out).

NOTE: Autobaud is not available on control ports used as com ports. Baud rate for SDC ports must be 9600 or greater. If a serial port is opened, it must be closed before changing the port baud rate.

NOTE: If you are using SerialOpen to control a SDM-SIOx (SDM-SI01A, SDM-SIO1A, SDM-SIO2R) automatic baud rate detection is not supported. Rather, setting the baud rate to a negative value enables automatic flow control (RTS/CTS). Click here for additional information.

Right-click this parameter to display a list.

Type: Constant. In SerialOpen, BaudRate can be a variable.

Confirmation (DNP Confirmation)

A parameter that is used to determine whether DNP3 data link layer confirmation is enabled or disabled, and to set the timeout interval for data link layer and application layer confirmation. In general, the use of data link layer confirmation is not recommended. Data link layer confirmation is always disabled for a TCP/IP link. The datalogger will always use application layer confirmation when transmitting event data or multi-fragment responses. The parameter is entered in the form of XSSS. X = 0 enables data link layer confirmation. X = 1 disables data link layer confirmation. SSS is the number of seconds the datalogger should wait for a response to data link layer confirmation and/or application layer confirmation before timing out. A timeout > 0 should always be entered.

Examples:

When using ComRS232, the datalogger usually goes into sleep mode after 40 seconds of inactivity on the communications port. After going to sleep with some interface methods it sometimes takes a packet of incoming data to wake it up and then a retry packet to get the message through. If packets continue arriving before the 40 second timeout, the datalogger should respond very quickly to the new packets.

Type: Constant or Variable

Optional Parameters

TimeOffset (Time Offset)

The local time offset, in seconds, from UTC. If the datalogger setting "UTC Offset" is a value other than -1 (disabled), this offset will be ignored and the UTC Offset value will be used. This parameter can be used to keep the datalogger clock set to local time when the DNP3 master is sending time synchronization commands to the datalogger, which are in UTC.

Type: Constant or Variable

MaxTimeDiff (Maximimum Difference in Time)

The maximum difference in time (ms) between the datalogger clock and the ClosedDNP3 Distributed Network Protocol is a set of communications protocols used between components in process automation systems. Its main use is in utilities such as electric and water companies. master clock that will be tolerated before the clock is changed upon command from the DNP3 master. If a 0 is entered, the datalogger clock will be set upon receipt of a time synchronization command from the DNP3 master. If a -1 is entered, the datalogger clock will not be set. If the datalogger is connected to a DNP3 master and a Loggernet server, a -1 can be entered in order to avoid problems that can arise from a DNP3 master and Loggernet server both setting the datalogger clock.

Type: Constant or Variable

DNPTLS

The DNPTLS parameter is an optional parameter used to enable TLS. If the parameter is set to 0 or is omitted, TLS is disabled. If the parameter is set to 1, TLS is enabled. Note that the CR800 Series, CR1000 and CR3000 do not support TLS.

Type: Constant or Variable