Introduction to DNP3
Transcript of Introduction to DNP3
-
8/13/2019 Introduction to DNP3
1/31/3 www.ni.c
Introduction to DNP3
1.
2.
3.4.
5.
6.
Table of Contents
Background
System and Message Architectures
Polling and PrioritizationNational Instruments DNP3 Tools
Implementation Level
Example Program: Analog Input
Background
DNP3 (Distributed Network Protocol) was developed by GE Harris to create a protocol specification for vendors of power grid SCADA (Supervisory Control and Data Acquisition) components to
standardize on. Since 1993, this open and public protocol has been managed by the DNP3 Users Group. DNP3 is commonly used in North American electric and water utilities for communicati
between SCADA masters and outstations like Remote Terminal Units (RTUs). A typical set-up involves master station computers that monitor all the system equipment and control their behavio
based on the collected data. Outstations are remote computers in the field that collect the sensor data and perhaps run local analysis to pass onto the master.
System and Message Architectures
DNP3 has the flexibility to connect a single master with one or more outstations over serial and Ethernet physical media. Other possible architectures include multiple master connections to a sing
outstation and peer-to-peer operations. Typically, the master initiates control commands for requesting data from or actuating devices managed by the outstation. The outstation responds to the
master by sending the appropriate information or confirmation.
Using an enhanced OSI 3-layer model, the protocol consists of a Data Link Layer, Transport Function, Application Layer, and User Layer. The Data Link Layer makes the physical link more reliab
with addressing and error detection. The Transport Function assembles Link Layer frames into larger Application Layer fragments. The Application Layer interprets the complete message and
indicates what data is desired to the User Layer. Each message can contain multiple data types, such as binary, analog, and counter inputs and outputs.
Figure 1. Enhanced 3-layer OSI model for DNP3.
Polling and Prioritization
The master stations use polling to keep their databases updated with the latest system states, closed-loop control, alarm notification, and more. DNP3 allows you to specify what kinds of data th
master wants to receive. refers to the most recently measured or calculated data points, whereas refers to any significant activity, such as state changes, new informationStatic data event data
and data that has past certain thresholds. To get static data, a master requests class 0 data from an outstation to receive present values. When requesting event data, DNP3 allows you organiz
or prioritize them into classes 1, 2, or 3 for greater granularity. Outstations can also be allowed to send for automatically updating the master with any crucial data changesunsolicited responses
DNP3 also has basic time synchronization functions, such as setting an outstations clock, time-stamping data points, and freezing certain input values so that the master can view data existing
multiple outstations at the same instant in time.
National Instruments DNP3 Tools
National Instruments provides a user level software called for programming LabVIEW targets as DNP3 outstation devices with advanced functionalit y, suNI-Industrial Communications for DNP3
as power quality monitoring, phasor measurements, and other smart grid-related analysis. These targets include Windows computers and NI real-time CompactRIO, Single-board RIO, PXI, and
PXIe controllers. NI-IndCom for DNP3 is installed on these targets and then utilizes the native Ethernet port to communicate with DNP3 masters.
In general, the programming API uses LabVIEW VI functions for performing an action, such as reading and writing from data points. The API uses LabVIEW property nodes for setting and gettin
DNP3 properties. For example, outstation session property nodes are used to set scan periods, unsolicited responses, and event configuration.
:Document Type Tutorial
: YesNI Supported
: Apr 15, 2011Publish Date
http://sine.ni.com/nips/cds/view/p/lang/en/nid/209092http://search.ni.com/nisearch/app/main/p/lang/en/pg/1/ap/tech/sn/catnav:tu,ssnav:dznhttp://search.ni.com/nisearch/app/main/p/lang/en/pg/1/ap/tech/sn/catnav:tu,ssnav:dznhttp://sine.ni.com/nips/cds/view/p/lang/en/nid/209092 -
8/13/2019 Introduction to DNP3
2/32/3 www.ni.c
1.
2.
3.
Figure 2. LabVIEW VI function palette for NI-IndCom for DNP3.
Figure 3. LabVIEW property nodes for NI-IndCom for DNP3.
Implementation Level
DNP3 has defined four levels of implementation, such that each level determines which data types, function codes, and qualifier codes can be used. For example, a Level 1 master only support
the most basic types and functions such as binary, analog, and counter inputs and events which comprise of about one-third of the total DNP3 definitions. NI-IndCom for DNP3 1.1 has Leve
outstation support.
Example Program: Analog Input
Below is the analog input example program that is included in the driver software. The section steps through the basic functions and properties used for programming a DNP3 outstation in
LabVIEW.
Figure 4. DNP3 analog input example program.
The function turns the LabVIEW target into a DNP3 outstation and sets the scan rate for checking inputs and sending responses.Create Outstation
The function creates a communication channel which encapsulates the physical layer, link layer, and transport function of DNP3. It also sets the ports or IP addresses forCreate Channel
masters that are allowed to connect to the outstation. Multiple channels may be created per outstation.
The function creates a connection between a local device (server) and a remote device (client) within a communication channel. Multiple sessions may be created perCreate Session
-
8/13/2019 Introduction to DNP3
3/33/3 www.ni.c
4.
5.
6.
7.
communication channel.
The function writes to a certain data point index using one of eight data types, including analog input. It can also generate an associated event or object flag.Write
The function destroys the session created by the Create Session function.Destroy Session
The function destroys the channel created by the Create Channel function.Destroy Channel
The function destroys the outstation reference created by the Create Outstation function.Destroy Outstation
For file transfer functions, NI-IndCom for DNP3 allows the master station to upload and download files from the LabVIEW-programmed outstation. For outstation time synchronizat ion, use the
Clock Time properties to set the frequency of clock synchronization or to manually request a re-synchronization.
Related Links:
NI-Industrial Communications for DNP3
Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial ma
not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS
TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF US
).http://ni.com/legal/termsofuse/unitedstates/us/
http://sine.ni.com/nips/cds/view/p/lang/en/nid/209092http://ni.com/legal/termsofuse/unitedstates/us/http://ni.com/legal/termsofuse/unitedstates/us/http://sine.ni.com/nips/cds/view/p/lang/en/nid/209092