Skip to content

DNP 3.0

DNP 3.0 (Distributed Network Protocol 3.0)是一种通信协议,主要用于工业自动化领域,特别是在电力系统中,用于监控和数据采集(SCADA)系统。它允许远程终端单元(RTU)和主站系统之间进行可靠的数据交换。

设备设置

字段说明
host设备 IP 地址
port设备端口号, 默认20000
masterid主站 ID, 默认1
slaveid从站 ID, 默认2
class0123_intervalClass0123 拉取间隔, 默认20000毫秒
class123_intervalClass123 拉取间隔, 默认1000毫秒
time_sync时间同步, 默认 No

支持的数据类型

  • uint8
  • uint16
  • int16
  • uint32
  • int32
  • float
  • bit

地址格式

obj.var.index(.attribute)

CROB.index:counter:on-time:off-time

obj 和 var

在 DNP 3.0 协议中,使用 obj 和 var 来定义一个对象类型,index 指定一组对象实体的具体的对象,下表索引从0开始。attribute 目前只支持 value,如果不填写,默认为value。

目前支持下列对象:

objvar对象r/w类型
11binary inputrbit
12binary input with statusrbit
21binary input change without timerbit
22binary input change with absolute timerbit
23binary input change without relative timerbit
101binary outputrbit
102binary output with statusrbit
103binary output change with timerbit
20132-bit binary counter with flagruint32/int32
20216-bit binary counter with flagruint16/uint16
20532-bit binary counter without flagruint32/int32
20616-bit binary counter without flagruint16/int16
21132-bit frozen binary counterruint32/int32
21216-bit frozen binary counterruint16/int16
30132-bit analog inputruint32/int32
30216-bit analog inputruint16/int16
30332-bit analog input without flagruint32/int32
30532-bit float analog inputrfloat
32132-bit analog input change without timeruint32/int32
32216-bit analog input change without timeruint16/int16
32332-bit analog input change with timeruint32/int32
32416-bit analog input change with timeruint16/int16
32732-bit float analog input change with timerfloat
40132-bit analog outputruint32/int32
40216-bit analog outputruint16/int16
40332-bit float analog outputrflaot
41132-bit analog output blockwuint32/int32
41216-bit analog output blockwuint16/int16
41332-bit float analog output blockwfloat
42732-bit float analog output event with timerfloat

CROB(Control Relay Output Block)是一个特殊的对象,用于驱动开关型输出设备 (binary output),只写,类型为 uint8, 因为其除了 Control Code 之外,还需要设置 counter,on-time 和 off-time。 Control Code 取值如下:

Control CodeAction
1output pluse on
2output pluse off
3output latch on
4output latch off
65output pluse on + close
66output pluse off + close
67output latch on + close
68output latch off + close
129output pluse on + trip
130output pluse off + trip
131output latch on + trip
132output latch off + trip
+16+ queue
+32+ clear

地址示例

地址数据类型说明
1.2.0bitbinary input 下标0的值
1.2.1bitbinary input 下标1的值
2.2.1bitbinary input 下标1的值,带绝对时间戳
CROB.0:0:0:0bit控制 biary output 下标0输出
40.1.0bit32-bit binary output 下标0的值