0% found this document useful (0 votes)
9 views

DNP_Function_codes

The document outlines various function codes used in DNP (Distributed Network Protocol) for communication between master and outstation devices. It details the purpose and usage of each function code, including Confirm, Read, Write, Select, Operate, Direct Operate, and various freeze functions, as well as restart functions. Each function code includes specific requirements for message structure and expected responses, emphasizing the importance of proper communication protocols.

Uploaded by

toshi.naman
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

DNP_Function_codes

The document outlines various function codes used in DNP (Distributed Network Protocol) for communication between master and outstation devices. It details the purpose and usage of each function code, including Confirm, Read, Write, Select, Operate, Direct Operate, and various freeze functions, as well as restart functions. Each function code includes specific requirements for message structure and expected responses, emphasizing the importance of proper communication protocols.

Uploaded by

toshi.naman
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 30

DNP

Function Codes
Confirm (function code 0)
 The confirm function is used to confirm the reception of a message
fragment when the application control field (AC) in the received
fragment has the CON bit set
 any station receiving a message fragment with the CON bit set MUST
respond with a CONFIRMation message BEFORE sending any other
application layer message
 any station that sends a message fragment with the CON bit set must
wait until the CONFIRMation message arrives before continuing with
message fragment transmission or another transaction.
Read (function code 1)
 The read function is the basic code used for requesting
data objects from a Outstation.

 The object, qualifier and range field are coded in such a


way that their size can be calculated allowing requests
for multiple objects or ranges to be sent in a single
message.

 The number of multiple requests allowed in a single


message is defined in the device profile of each device
DNP is implemented on.
Read (function code 1)

Single object request

Multiple objects request


Read (function code 1)

• Read object group n variation x.


• The qualifier code specifies a range field with a 1 octet
start and stop sub-field.
• The range field specifies 3 objects starting at index 7 to
index 9 inclusive.
• The index size has no meaning and is set to 0.
• The Outstation may respond within the range specified.
This method is useful for requesting specific data that is
known to be valid at the time of the request.
Read (function code 1)

• Read object group n, variation x.


• The qualifier code specifies a range field with a 4 octet start
and stop sub-field.
• The range field specifies 3 objects starting at index 70000
to index 70002 inclusive.
• The Index Size field has no meaning and is set to 0.
• The Outstation may respond within the range specified.
This method is useful
requesting specific data that is known to be valid at the time
of the request.
Write (function code 2)
 The write function code is used for moving
objects from a master station to an Outstation
 The object header is defined the same as in a
read request.
 The response from the Outstation is always a
function code followed by the IIN.
 Typical uses of the Write function are to
download
 configuration or files to an Outstation and to set
the time in the Outstation.
Write (function code 2)

Single object range write

Multiple object or multiple write


Write (function code 2)
 This request below set the time in the outstation

The qualifier specifies a 1 octet quantity; the quantity


field specifies 1 object and the Object field identifies the
object as a Time and Date Object.
Write Responses
 The response to a Write request can only
consist of the IIN (Internal Indications) that
indicates the success of the Write operation
and so there is no ASDU portion of a Write
response.

 The response always uses the Response


function code.
Select (function code 3)
 The select function code is used to select one or more
control points at an Outstation.
 These may be control relay outputs, analog outputs or
pattern control blocks.
 This function does not output or activate the new state
or value but makes them ready (arms them) and reports
their status.
 An additional operate message must be sent to the
Outstation to actually activate the request.
 The select message causes the Outstation to starts a
timer.
 The operate message must be received correctly before
the timer expires in order for the activation to take place.
Select Response
 The Outstation responds to a select message by
arming the specified points (specified by the
index preceding the control blocks) and
returning the request in the response
 The response is identical to the request except
that it includes the IIN and modified status bytes
 The status bytes state the success or failure of
the Select request.
Select (function code 3)

• Object following this header is group n (must be a control


block object relating to outputs or setpoints), variation v.
• The qualifier code specifies a range field with a 1 octet
quantity of control blocks.
• The index size specifies 1 octet indices prefixing each
control block.

The Outstation response control objects must match the control


objects (byte for byte) in the request or the operate message will
not be sent.
Operate (function code 4)
 The operate function code is used to
activate one or more control or analog
outputs at an Outstation.

 A matching message using the select


function code must previously have been
received, and the arm timer must still be
active before the activation will take place
Operate (function code 4)

•Object following this header is group n (must be a control block


object relating to outputs or setpoints), variation v.
•The qualifier code specifies a range field with a 1 octet quantity of
control blocks.

•Object following this header is group n, variation v.


•The qualifier code specifies a range field with a 1 octet quantity
of control blocks.
•Indication of the success or failure of the operations is returned
in the Output Status bytes
Direct Operate (function code 5)
 The direct operate function code is used to
activate one or more outputs or setpoints
at an Outstation.

 A preceding select message is not


required.
Direct Operate (function code 5)

• Object following this header is group n, variation v


• The qualifier code specifies a range field with a 1 octet quantity
of control blocks.

• Object following this header is group n, variation v


• The qualifier code specifies a range field with a 1 octet quantity
of control blocks.
Direct Operate No Acknowledgement
(function code 5)
 The direct operate No Acknowledgement
function code is used to activate one or
more outputs or setpoints at a Outstation.
 A preceding select message is not
required.
 Outstation does not respond with a
message to the master station.
Direct Operate No Acknowledgement
(function code 5)

• Object following this header is group n, variation v


• The qualifier code specifies a range field with a 1 octet
quantity of control blocks.
IMMEDIATE FREEZE (function code 7)

 This function code is used to copy the specified


data objects to a freeze buffer.
 Upon reception of the message, the Outstation
should copy the current values of the specified
data objects to their appropriate freeze buffers.
 The objects which were frozen can be
requested (in another request) by asking for
frozen objects.
IMMEDIATE FREEZE (function code 7)

Typically, only counter objects are frozen.


IMMEDIATE FREEZE No Ack (function
code 8)
 This function code works identically to the previous
function code (Immediate Freeze) except that no
Outstation response is needed.
 Typically, this function code is used to perform a global
freeze on all Outstations belonging to the master.
 In this case, the SEND-NO REPLY services of the Data
Link Layer may have to be used in certain environments.
Freeze and clear (function code 9)
 This function code is used to copy the specified data to
a freeze buffer like the freeze immediate function code
but then the Outstation clears ( to 0 ) the specified data
objects.
 Typically, this function code is used to freeze counters
or accumulators and then reset them to 0.
Freeze and clear No ack(function
code 10)
 This function code works identically to the
previous function code (Freeze and Clear)
except that no Outstation response is
needed.
 Typically, this function code is used to
perform a global freeze and clear on all
Outstations belonging to the master.
Freeze with time (function code 11)
 This function code initiates the periodic freezing
of the specified data objects.
 The Time and Date with Interval object sent
preceding the objects to freeze is described in the
table below
Freeze with time (function code 11)

Example: A time object specifies the time of day as 2:32 pm and


an interval of 10 minutes. The first freeze will occur at 2:32 pm
and subsequent freezes every 10 minutes starting from 2:42 pm.
FREEZE WITH TIME - NO ACKNOWLEDGEMENT
(function code 12)
 This function code works identically to the
previous function code (Freeze With Time)
except that no Outstation response is needed.
 Typically, this function code is used to perform a
global freeze with time on all Outstations
belonging to the master.
 In this case, the SEND-NO REPLY services of
the Data Link Layer may have to be used in
certain environments
Cold Restart (function code 13)

 The cold restart function code makes the


Outstation perform a complete restart of the user
application , as if it has been newly powered up.

 The Outstation, upon receiving the Cold Restart request


will response with a Time Delay Object (Time Delay
Fine or Time Delay Course) which specifies a time
interval until the Outstation will be ready for further
communications
WARM Restart (function code 14)

 This code restart function code specifies that the


Outstation perform a restart, but it is not
necessary to run through the entire reset
sequence
 The DNP application may reset itself without
resetting other subsystems or processes
 Typically this function makes an Outstation
application initialize its configuration and clear
events stored in its local buffers.
WARM Restart (function code 14)

 This code restart function code specifies that the


Outstation perform a restart, but it is not
necessary to run through the entire reset
sequence
 The DNP application may reset itself without
resetting other subsystems or processes
 Typically this function makes an Outstation
application initialize its configuration and clear
events stored in its local buffers.

You might also like