0% found this document useful (0 votes)
85 views16 pages

Protocol DNP3 Master

DNP3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
85 views16 pages

Protocol DNP3 Master

DNP3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

DNP 3.

0
Master Communication Protocol

Summary
1. GENERAL INFO ......................................................................................................... 1
1.1 Summary ................................................................................................................................................................ 1
1.2 Data Objects Supported .................................................................................................................................... 1
1.3 General operation ................................................................................................................................................ 4

2. CHANNEL SETTINGS .............................................................................................. 5


2.1 Protocol Options .................................................................................................................................................. 5
2.2 Settings .................................................................................................................................................................. 5
2.3 Timeout .................................................................................................................................................................. 6
2.4 Initial State ........................................................................................................................................................... 6

3. NODES SETTINGS.................................................................................................... 7
3.1 Channel Data (Primary and Backup) ............................................................................................................... 7

4. POINTS SETTINGS ................................................................................................... 9


4.1 General ................................................................................................................................................................... 9
4.2 Point Types ........................................................................................................................................................... 9
4.3 Point Address ..................................................................................................................................................... 13
4.4 Access Type ........................................................................................................................................................ 14

000053.01 i
GENERAL INFO

1. GENERAL INFO
1.1 Summary
Communication Driver Name: DNP30.
Current Version: 1.0.
Implementation DLL: T.ProtocolDriver.DNP30.dll.
Protocol: DNP3.0 Master standard protocol.
Interface: TCP/IP or Serial.
Description: This driver is used for communication with remote IEDs (Intelligent Eletronic
Devices) using the protocol DNP 3.0 Level 2. Communication can be done through multi-point
serial channel or LAN using Ethernet and TCP-IP. In the last case, each IED has an IP address.
IEDs types supported: Any compatilble DNP 3.0 IED.
Communication block size: Maximum 250 bytes, FT 1.2 format.
Protocol Options: Mode “LinkConfirm" and master station address.
Multi-threading: User defined, five threads per comunication node, by default.
Max number of nodes: User defined.
PC Hardware requirements: Standard PC Ethernet interface board, RS485 or RS232 port.

1.2 Data Objects Supported


The table below shows the DNP objects and variants supported by this implementation.

Object Request (Master) Answer (Slave)


Obj. Var Description Function Qualifier. Function Qualifier
Codes Codes (Hex) Codes Codes
(decimal) (decimal) (Hex)
1 0 Binary Input (any variation) 1 00,01,06
22 00,01,06 129
1 1 Single Bit Binary Input (packed) 1 00,01,06 129 00, 01
1 2 Binary Input with status 129 00, 01
2 0 Binary Input event (any variation) 1 06,07,08
2 1 Binary Input change without time 1 06,07,08 129,130 17,18
2 2 Binary Input change with absolut time 1 06,07,08 129,130 17,18
2 3 Binary Input change with relative time 1 06,07,08 129,130 17,18
3 0 Double bit Binary input – Any variation 22 00,01,06
3 1 Double-bit Binary Input – Packed 1 00,01,06 129 00, 01
3 2 Double-bit Binary Input – With flags 1 00,01,06 129 00, 01
4 0 Double- 1 06,07,08
bit Binary Input Event Any Variation
4 1 Double-bit Binary Input Event – without 1 06,07,08 129,130 17,18
time
4 2 Double-bit Binary Input Event- with 1 06,07,08 129,130 17,18
absolute time
4 3 Double-bit Binary Input Event - with 1 06,07,08 129,130 17,18
relative time
10 1 Binary Output – Any Variation 1 00,01,06
10 2 Binary Output – status with flags 1 00,01,06 129
12 1 Control relay output block 3,4,5 17,28 129 Echo of
request
20 0 Binary Counter – all variations
20 1 Counter – 32-bit with flag 1 00,01,06 129 00, 01
00053.01 1
GENERAL INFO

20 2 Counter – 16-bit with flag 1 00,01,06 129 00, 01


20 5 Counter – 32-bit without flag 1 00,01,06 129 00, 01
20 6 Counter – 16-bit without flag 1 00,01,06 129 00, 01
21 0 Frozen counter – all variations
21 1 Frozen Counter – 32-bit with flag 1 00,01,06 129 00, 01
21 2 Frozen Counter – 16-bit with flag 1 00,01,06 129 00, 01
21 3 Frozen Counter – 32-bit without flag 1 00,01,06 129 00, 01
21 4 Frozen Counter – 16-bit without flag 1 00,01,06 129 00, 01
22 0 Counter Event – Any Variation 1 06
22 1 Counter Event – 32-bit with flag 1 06,07,08 129,130 17,18

22 2 Counter Event – 16-bit with flag 1 06,07,08 129,130 17,18

23 0 Frozen Counter Event – Any Variation 1 06,07,08

23 1 Frozen Counter Event – 32- 1 06,07,08 129,130 17,18

bit with flag


23 2 Frozen Counter Event – 16- 1 06,07,08 129,130 17,18

bit with flag


30 0 Analog Input – all variations 1, 22 00,01,06
30 1 32 Bits Analog Input 1 00,01,06 129 00, 01
30 2 16 Bit Analog input with flag 1 00,01,06 129 00, 01
30 3 32 Bits Analog Input without flag 1 00,01,06 129 00, 01
30 4 16 Bit Analog input without flag 1 00,01,06 129 00, 01
30 5 Short Floating Point (32bits) 1 00,01,06 129 00, 01
32 0 Analog Input event – all variations 1 06,07,08
32 1 32 Bits Analog Input event 1 06,07,08 129,130 17,18
32 2 16 Bit Analog event without flag 1 06,07,08 129,130 17,18
32 3 32 Bit Analog event with flag 1 06,07,08 129,130 17,18
32 4 16 Bit Analog event with flag 1 06,07,08 129,130 17,18
32 5 Analog input event single float – 1 06,07,08 129,130 17,18
without time
32 7 Analog input event single float –with 1 06,07,08 129,130 17,18
time
40 0 Analog Output Status–any variation 1
40 1 Analog Output Status – 32bits with 1 00,01,06 129 00, 01
flag
40 2 Analog Output Status -16bits with flag 1 00,01,06 129 00, 01
40 3 Analog output status – Single float 1 00,01,06 129 00, 01
with flag
41 1 32Bit Analog output block 3,4,5,6 17,28 129 Echo of
request
41 2 16 Bit Analog output block 3,4,5,6 17,28 129 Echo of
request
41 3 Analog output block – Single float 3,4,5,6 17,28 129 Echo of
request
50 1 Time and Data – Absolut time 1,2 0x07 129 07
51 1 Time and Date CTO – 129,130 07

Absolute time, synchronized


51 2 Time and Date CTO – 129,130 07

Absolute time, unsynchronized


52 1 Time Delay – Coarse 129 07
52 2 Time Delay – Fine 129 07

2 00053.01
GENERAL INFO

60 1 Class 0 data 1 0x06


60 2 Class 1 data 1,20,21 06,07,08
60 3 Class 2 data 1,20,21 06,07,08
60 4 Class 3 data 1,20,21 06,07,08
80 1 Internal indications 1,2 00,01 129 01

In the master mode protocol implementation, master only performs the requests highlighted in
blue. The server equipment responds using the answers highlighted in yellow. Note that it is up to the
server equipment deciding how to respond and the master must support all the features of level 2 to be
used as a possible answer.

The objects, object variations, function codes and qualifiers have their standard meanings in
DNP. Tables with the function code and qualifiers are shown below:

Function Code Descrição Origem


1 Read Master
2 Write Master
3 Select Master
4 Oper Master
5 Direct Oper (without selection) Master
6 Direct Oper (without ack) Master
7 Freeze Immediately Master
8 Freeze Immediately (without ack) Master
9 Freeze and Clear Master
10 Freeze and Read Master
13 Restart (Cold) Master
14 Restart (Warm) Master
20 Enable non requested messages Master
21 Disable non requested messages Master
22 Assigns class for an object Master
23 Measurement with delay Master
129 Response Slave
130 Non Requested Response (doesn´t exist on Slave
level 2)

Qualifier Code Use on Request Use on Response


00,01 Static Points range (class 0) or a Static Object
single point with a number
06 All points Invalid

00053.01 3
GENERAL INFO

07,08 A limited number of events A single point without number (this is a


timestamp)
A single point without number (this
is a timestamp)
17, 28 Controls (one or more unrelated Event Objects (one or more unrelated
points) points)

DNP has the concept of data classes, defined four classes:

Class 0: Corresponds to the static points, analog or digital. Its content is the value of a variable
analog or digital, input or output in a given time;
Class 1, 2 e 3: Events corresponding to class 0 variables transitions, state transitions or internal
relay situations that causes an event.

A common practice in the DNP IEDs is to associate the state variation of digital variables or
dead band pass of analog variable to classes 1, 2 or 3 events. Thus, modifying the state / value of these
variables will cause events to be transmitted at the request of the respective classes of events (60 / 2
60 / 3 and 60 / 4). Periodically, it may be requested a class 0 reading (60 / 1), for checking integrity.

Comments:
Static variables not assigned to a class, do not cause events;
Class to variable association should be done on the IED, using a proper program. Action.Net
SCADA runs data acquisition through the classes, however, without defining which variable belongs to a
class.

1.3 General operation


The normal master sequence operation is showed below.
 Once started, as the first step, it sends read request for events of class 1, 2 and 3 (60 / 2 60 /
3 and 60 / 4), for all IEDs;
 In sequence, sends class 0 read request (read integrity - 60 / 1) for all IEDs;
 Periodically, with time intervals as defined in the initialization file, makes classes 0, 1, 2 and 3
(60 / 1 to 60 / 4) readings;
 When it’s received a message with IIN (Internal Indication) stating that IED requires
synchronization, sends timing message (50.1). This message is only sent at the request of a
remote IED;
 When it’s received a message with IIN stating that a restart has occurred, a “clear device flag”
write (80/1) is done, and goes back to the first step;
 When the user commands a digital output or an analog output, is sent the respective request
to the IED (12/1 or 41/2);

4 00053.01
channel settings

2. CHANNEL SETTINGS
2.1 Protocol Options
LinkConfirmMode – Protocol mode in which, in link layer, all requests should be confirmed by
the remote IED. The default content is “Enabled”.

Accept Unsolicited DNP – Enabling this option leads to the dispatch of a Enable Unsolicited
Messages message (Function Code = 20) from the master to the slave at the start of a channel
execution, right after the Class 0 request and every time the master receives “RESTART”
indication in the Internal Indications field.

MasterStationID - Number between 1 and 65534, univocal and correspondent to the master
station address. This way, the master informs his own address to the slave when sending him a
message. Some slaves reply to the master disregarding this number, others demand that the
address declared on the slave matches the one from the master. The default for this field is
“65534”.
Quality changes timestamp – Enabling this option will lead to alteration in the tag present
timestamp when a new reading of a flagged object is received, even if there is no alteration on
the tag status (value), but there is quality alteration.

Figure 1 – Protocol Options

2.2 Settings
Serial and MultSerial Channel:
Com: Communication Port used on the computer;
BaudRate
DataBits: 8
StopBits: 1 or 2
Parity: None, Even Odd;
DTR: on, off
RTS: on,off
CTS: on, off;
Port configuration must match with remote IEDs configurations.

00053.01 5
channel settings

Figure 2 – Serial Channel Settings

TCP/IP channels:
 ShareNodeSameIP: Accepts IED with the same IP.

Figure 3 – TCP/IP Settings

2.3 Timeout

Defines limit times for transmission and reception of message characters and the
number of retries.

Figure 4 –Timeout Attributes

2.4 Initial State


Defines how the channel will initiate: enabled or disabled. If the channel is disabled, no
message will be sent or received through it. In other words, the channel will be deactivated.

Figure 5 – Channel Initial State

6 00053.01
NODES SETTINGS

3. NODES SETTINGS
Each node represents a remote station (IED). The user can configure multiple
workstations into a single channel for serial communication. In the case of TCP-IP
communication, only one node is supported for each channel. In this case, there must be set as
many channel as there are nodes.

3.1 Channel Data (Primary and Backup)


Attribute set associated to the node (channel), which refers to its address and other
attributes presented below:

Figure 6 – Channel Data

In case of TCP-IP Communication:


IP Address – Type the IP Address of the IED server.
Port – Input the port number on which the IED will receive communication.

For any case:


IgnoreBitOnLine –"Enabled" indicates that the driver should ignore the indication "BitOnLine"
which is entered by the IED at point failure or normalization.

WaitForIdleToCmd – if “enabled” indicates that a command will only be sent when the sampling
communication is stopped, i.e. not occurring.

AI sample time(ms) – Time in milliseconds between 2 consecutives analog points values


requests. (type 30 Objects request, all variations).

BI sample time(ms) - Time in milliseconds between 2 consecutives digital points values


requests. (type 1 Objects request, all variations).

00053.01 7
NODES SETTINGS

Class 0 sample time(ms) – Time in milliseconds between 2 consecutive all points requests.

Class 1 sample time(ms) – Time in milliseconds between 2 consecutive class 1 points requests.

Class 2 sample time(ms) – Time in milliseconds between 2 consecutive class 2 points requests.

Class 3 sample time(ms) – Time in milliseconds between 2 consecutive class 3 points requests.

Counters sample time(ms) - Time in milliseconds between 2 consecutives counters values


requests (Object type 21 request, all variations).

Backup Station – The same settings made to the main station can be made to one backup
workstation (alternative IED) if the there is one in the facility.

8 00053.01
POINTS SETTINGS

4. POINTS SETTINGS
4.1 General
The points can be input or output.
The entry points, i.e. points that are acquired through the protocol have basically two main
parameters: The point type and address.
Output points, used for remote controls, have besides the type and address, a parameter
(ControlCode) for specifying the output operation. On Action.NET, given an IED address map, for points
of the same type, address numbers must be unique.
Point States or point values are reported by IED through Information Objects defined in the
standard. These objects have variations such as with or without "timestamp". Every time the IED reports
an Information Object with "timestamp", this will be listed in Action.Net as an attribute of the point that
corresponds to this object. When there is no "timestamp", Action.Net will fill it with the current time of
the computer hosting Action.Net.

Action.Net communication module on master mode, implements:


 Digital points read;
 Analog points read;
 Counters read;
 Analog and Digital points commands;
 Select Before Operate commands;

4.2 Point Types


The implemented Action.Net point types, listed below, are defined based on the data objects
defined in the standard. For each type of point, whichever are the object variation received on the IED,
with or without “flag”, with or without timestamp, the acquired values will be placed in points with the
types listed below. On the Points table, the field “Address” is used to choose he type of point and to
specify its address.

Figure 7 – Options for Points Type

00053.01 9
POINTS SETTINGS

AI- Analog Input


Scalar Analog measurement used for transmission of analog quantities. Used to receive data
sent through objects 30 and 32 and all its variations. They are numbers 16 or 32-bit integers.

BI - Binary Input
Simple binary entry point, value 0 or 1. Used to receive data sent through objects 1 and 2 and all
its variations.

RAO –Read Analog Output


Point for reading the contents of analog output of 16 bits or 32 bits. Used for the reception of
objects of types 40 and 41.

CRO - Control Relay Output


Digital output point used to control the switches and circuit breakers. The DNP object 12,
including a Control Code (8 bits), is used to indicate the type of command and execution details. When
chosen, a field will show requesting this code information. After clicking on the right arrow ( ), a
window with the selected attributes for the present value will appear. If the user changes the selected
attributes and press the return arrow ( ), a new value associated to the selected values will be
generated.

Figure 8 – Command Attribute

The possible values are presented in the table below with the respective associated actions:

ControlCode Action
1 Output Pulse ON
2 Output Pulse OFF
3 Output Latch ON
4 Output Latch OFF
65 Output Pulse ON + Close
66 Output Pulse OFF + Close
67 Output Latch ON + Close
68 Output Latch OFF + Close
129 Output Pulse ON + Trip
130 Output Pulse OFF + Trip
131 Output Latch ON + Trip
132 Output Latch OFF + Trip

10 00053.01
POINTS SETTINGS

+ 16 Queue + Trip
+ 32 Clear + Trip

CT – Counter
Binary counter 16 or 32 bits, received from the IEDs through the 20 objects and all their
variations. This number has the last state of counter, in the instant it is read.

FRZ - Frozen Counter


Binary counter 16 or 32 bits, received from the IED through the object 21 and its variations,
which contains information of a counter in the last time it was "frozen." The frozen value shows the
value of the counter (the same index) when the last freeze operation was performed on the counter of
slave IED.

AO - Analog Output Satus or Block (16bits)


Analog output for a 16-bit DA converter, using type 40 objects (actual value to be applied to the
drive) or 41 (amount required to be achieved in the analogue output), both on variation 2 (16 bits).

AOL - Analog Output long (32 bits)


Analog output for a 32-bit DA converter, using type 40 objects (actual value to be applied to the
drive) or 41 (amount required to be achieved in the analogue output),both on variation in 1 (16 bits).

AIF - Analog Input Floating (32 bits)


Measurement used for analog transmission of analog quantities. Used to receive data sent over
type 100 objects and all their variations. Floating point numbers are 32 or 64-bit IEEE-754 format.

IIN - Internal Indications


On this implementation, it is possible to get access to the Internal Indication statuses or to the
response status of commands defining tags with IIN type, for these to receive these informations from
the communication module.
These IED internal indication statuses are reported through flags placed on the transmitted
objects on the communication.
In order to receive the IIN, an analog int tag must be defined with IIN type and 65000 address.
This tag will receive the register with the bits whose meaning are presented in the following table.
In order to receive the statuses from the most recently sent commands, an analog int tag must
be defined with IIN type and 65001 address.

IIN: 16 bits sent in every slave answer with control data - Address: 65000

BIT Origin Description Content


0 IIN Broadcast Returns 1 if slave receives a broadcast message
(address = FFFF)
1 IIN Class 1 Returns 1 if slave has class 1 events
2 IIN Class 2 Returns 1 if slave has class 2 events
3 IIN Class 3 Returns 1 if slave has class 3 events
4 IIN Clock Synchronization Returns 1 if slave asks for clock synchronization
5 IIN Outputs set to local Returns 1 if slave has any output set to local
6 IIN Problem Returns 1 if slave has a problem

00053.01 11
POINTS SETTINGS

7 IIN Restart Returns 1 if slave has restarted


8 IIN Function not Implemented Returns 1 if a function asked by the master, was
not implemented in the slave
9 IIN Unknown Object Returns 1 if slave has not certain object at all or in
a specific class
10 IIN Inavalid Data Returns 1 if slave has an invalid parameter in the
qualifier or the address range is invalid
11 IIN Overflow Returns 1 if slave buffer has an overflow
12 IIN Busy Returns 1 if the request was received but is already
running
13 IIN Corrupted Data Returns 1 if the parametric data was corrupted
14 IIN Reserved Always 0
15 IIN Reserved Always 0

Status field: 8 bits sent as answer to a command. Address: 65001


BIT Origin Description Content
0 Status Accepted Command Returns 1 after a correct command
1 Status Not Accepted Command Returns 1 if occurred a timeout between select and
operate
2 Status Select Fault Returns 1 if occurred a operate without prior select
3 Status Format Error Returns 1 if command has en error in format
4 Status Control not supported Returns 1 if operation was not supported
5 Status Full Queue Returns 1 if the request queue on the slave is full or
the point is already active.
6 Status Hardware Error Returns 1 if occurred a hardware error while the
command was processed
7 Not used

These IIN can be defined in dictionaries and showed on event lists and/or alarms. This way, for
example purpose, a dictionary associated to a variable which contain the resulting status of a command
is showed below. In sequence, the definition of this variable and a template of its declation on the
Device table points.

Figure 9 – Dictionary associated to Command Attribute

12 00053.01
POINTS SETTINGS

Figure 10 – Variable Tag which receives a Command Result

Figure 11 – Declaration of a point which receiver the resulto f a DNP3 command

4.3 Point Address


The Address field to be filled in the registration of a point is what the standard calls “Index”. It
means a 16-bit number that is the indicative index [0 to n-1] of each of the points of the same type
mapped within the IED.
For example purposes, a points table filled with several types of points is presented below. The
digital output type points (CRO), as mentioned above, have their control code, besides the address.

129 = Pulse ON +
TRIP

Figure 12 – Points table example with diferente types of points

00053.01 13
POINTS SETTINGS

To implement discrete digital input points, it is enough to use the “Bit” attribute of a tag, for
each of the points that define the discrete digital input value. Therefore, for example, a switch with two
contacts that define its state:

Tag ADDRESS Complement


SEL_LINHA_01.SC89_1 8 Switch Open
SEL_LINHA_01.SC89_1 9 Switch Closed

It is defined as an AnalogInt Tag and the Bit attribute of this 16-bits variable (AnalogInt) is used
on the node table to address two points, as in the figure below:

The values assumed by the SEL_LINHA_01.SC89_1 variable will be:

Tag Bit 0 Bit 1 VALUE MEANING


SEL_LINHA_01.SC89_1 0 0 0 UNDEFINED
SEL_LINHA_01.SC89_1 1 0 1 OPEN
SEL_LINHA_01.SC89_1 0 1 2 CLOSED
SEL_LINHA_01.SC89_1 1 1 3 ERROR

4.4 Access Type


Since it is a communication module in client mode, there is need for a few own characteristics
for parametrization of the Access Type field on the Points table:

For reading type points, the Access Type must be defined with:
ReadOnStartup= On;
ReadPooling= Always;
ReadPoolongRate: 500 mili
WriteEvent= Changed;
AccepUnsolictited = On;

For command type points (CRO, AO and AOL), the Access Type must be defined with:
ReadPooling = Never;
WriteEnable = On
WriteEvent= Changed;

14 00053.01

You might also like