DNP3 (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. Specifically, it was developed to facilitate communications between various types of data acquisition and control equipment. It plays a crucial role in SCADA systems, where it is used by SCADA Master Stations, Remote Terminal Units (RTUs), and Intelligent Electronic Devices (IEDs). It is used only for communications between a master station and RTUs or IEDs. ICCP, the Inter-Control Centre Protocol, is used for inter-master station communications.
This DNP3 MORSE interface support DNP3 message carry only over RS232/422 or RS485 standart, TCP/IP transport should be carried via IP-MORSE – IP mode.
DNP3 is based on the standards of the International Electrotechnical Commission (IEC) Technical Committee 57, Working Group 03 who have been working on an OSI 3 layer “Enhanced Performance Architecture” (EPA) protocol standard for telecontrol applications.
An FT3 frame is defined as a fixed length header block followed by optional data blocks. Each block has a 16-bit CRC appended to it. The IEC specifies that the header fields consist of 2 start bytes, 1 byte length, 1 byte control, a destination address and an optional fixed length user data field. In this implementation the fixed length user data field is defined as a source address.
DNP3 Header description:
SYNC [0x0564] | 0x0564The Start field is 2 bytes in length. The first byte is a 05 hexadecimal and the second byte is a 64 hexadecimal too. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
LENGTH | The length field is 1 byte in length and specifies the count of user bytes in the frame. The CONTROL,DESTINATION and SOURCE field sizes are included in this count. The minimum value for this field is 5 and the maximum value is 255. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
CONTROL | The control field contains the direction of the frame, type of frame and flow control information. Figure 2 defines the fields of the control byte. Station A is defined as the designated master station. Station B is not a master station. The primary station is the originator of the message, the source of the message. The secondary station is the destination station.
|
Destination address | The Destination address field is 2 bytes in size and specifies the address of the station that the frame is directed to. The first byte of the address is the low order byte and the second byte is the high order. The address 0xffff is defined as an all stations address. |
Source address | The source address field is 2 bytes in size and specifies the address of the station that the frame originated from. The first byte of the address is the low order byte and the second byte is the high order. |
HEADER CRC | A two byte cyclic redundancy check is appended to each block in a frame. |
USER DATA BLOCK | The blocks following the header may contain from 1 to 16 bytes of user data. If more than 16 user data bytes follow the header (block 0), each block must contain 16 bytes of data except for the last block. The last block will contain the leftover. Each data block has a CRC appended to it. |
Terminology used:
Primary station — CU ... CU — Secondary station
Both radiomodems (CU) work in the same way.
Primary station transmiting:
0564 0BC4 0400 0300 E42B E5C0 0102 0006 985C
05 64 | – 2 bytes – DNP3 frame start |
0B | – 1 byte – Length field |
C4 | – 1 byte – Control field – primary station transmit |
0400 | – 2 bytes – Destination address – 0004 decimal |
0300 | – 2 bytes – Source address – 0003 decimal |
E42B | – 2 bytes – DNP3 header CRC |
E5C0 0102 0006 | – 8 bytes – DNP3 data payload |
985C | – 2 bytes – CRC of data payload |
Response (Secondary station):
18:33:26.058 tx 17 | S01 0564 0A44 0300 0400 7CAE E0C0 8100 00C1 F0
05 64 | – 2 bytes – DNP3 frame start |
0A | – 1 byte – Length field |
44 | – 1 byte – Control field – secondary station transmit |
0300 | – 2 bytes – Destination address – 0003 decimal |
0400 | – 2 bytes – Source address – 0004 decimal |
7CAE | – 2 bytes – DNP3 header CRC |
E0C0 8100 00 | – 7 bytes – DNP3 data payload |
C1F0 | – 2 bytes – CRC of data payload |
DNP3 parameters: (m)ode :RADIOSLAVE (q)uit
(m)ode :RADIOMASTRER/RADIOSLAVE | mode don’t any sense, the destination address is always create by destination addres of datagrams, set e. g. the value M |