Skip to content

Commit 37bd4b9

Browse files
authored
Merge pull request #490 from ZhouBox/v2.10
dnp 3.0:new doc
2 parents 55b068d + 76b7e0a commit 37bd4b9

File tree

3 files changed

+211
-1
lines changed

3 files changed

+211
-1
lines changed

directory.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,10 @@
448448
"path": "configuration/south-devices/codesys3/demo"
449449
}
450450
]
451+
},
452+
{
453+
"title": "DNP 3.0",
454+
"path": "configuration/south-devices/dnp3/dnp3"
451455
}
452456
]
453457
},
@@ -1116,6 +1120,10 @@
11161120
"path": "configuration/south-devices/codesys3/demo"
11171121
}
11181122
]
1123+
},
1124+
{
1125+
"title": "DNP 3.0",
1126+
"path": "configuration/south-devices/dnp3/dnp3"
11191127
}
11201128
]
11211129
},
@@ -1351,4 +1359,4 @@
13511359
]
13521360
}
13531361
]
1354-
}
1362+
}
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
## DNP 3.0
2+
3+
DNP 3.0 (Distributed Network Protocol 3.0) is a communication protocol primarily used in the industrial automation field, especially in power systems for supervisory control and data acquisition (SCADA) systems. It enables reliable data exchange between remote terminal units (RTUs) and master station systems.
4+
5+
## Device Settings
6+
7+
| Field | Description |
8+
| ------------------ | ----------------------------------------- |
9+
| host | Device IP address |
10+
| port | Device port number, default 20000 |
11+
| masterid | Master station ID, default 1 |
12+
| slaveid | Slave station ID, default 2 |
13+
| class0123_interval | Class0123 pull interval, default 20000 ms |
14+
| class123_interval | Class123 pull interval, default 1000 ms |
15+
| time_sync | Time synchronization, default No |
16+
17+
## Supported Data Types
18+
19+
* uint8
20+
* uint16
21+
* int16
22+
* uint32
23+
* int32
24+
* float
25+
* bit
26+
27+
## Address Format
28+
29+
> obj.var.index(.attribute)
30+
>
31+
> CROB.index:counter:on-time:off-time
32+
33+
### obj and var
34+
35+
In the DNP 3.0 protocol, obj and var are used to define an object type, and index specifies a specific object within a group of objects. The attribute currently only supports value. If not specified, the default is value.
36+
37+
Currently supported objects are as follows:
38+
39+
| obj | var | Object | r/w | Type |
40+
| --- | --- | ------------------------------------------ | --- | ------------- |
41+
| 1 | 1 | binary input | r | bit |
42+
| 1 | 2 | binary input with status | r | bit |
43+
| 2 | 1 | binary input change without time | r | bit |
44+
| 2 | 2 | binary input change with absolute time | r | bit |
45+
| 2 | 3 | binary input change without relative time | r | bit |
46+
| 10 | 1 | binary output | r | bit |
47+
| 10 | 2 | binary output with status | r | bit |
48+
| 10 | 3 | binary output change with time | r | bit |
49+
| 20 | 1 | 32-bit binary counter with flag | r | uint32/int32 |
50+
| 20 | 2 | 16-bit binary counter with flag | r | uint16/uint16 |
51+
| 20 | 5 | 32-bit binary counter without flag | r | uint32/int32 |
52+
| 20 | 6 | 16-bit binary counter without flag | r | uint16/int16 |
53+
| 21 | 1 | 32-bit frozen binary counter | r | uint32/int32 |
54+
| 21 | 2 | 16-bit frozen binary counter | r | uint16/int16 |
55+
| 30 | 1 | 32-bit analog input | r | uint32/int32 |
56+
| 30 | 2 | 16-bit analog input | r | uint16/int16 |
57+
| 30 | 3 | 32-bit analog input without flag | r | uint32/int32 |
58+
| 30 | 5 | 32-bit float analog input | r | float |
59+
| 32 | 1 | 32-bit analog input change without time | r | uint32/int32 |
60+
| 32 | 2 | 16-bit analog input change without time | r | uint16/int16 |
61+
| 32 | 3 | 32-bit analog input change with time | r | uint32/int32 |
62+
| 32 | 4 | 16-bit analog input change with time | r | uint16/int16 |
63+
| 32 | 7 | 32-bit float analog input change with time | r | float |
64+
| 40 | 1 | 32-bit analog output | r | uint32/int32 |
65+
| 40 | 2 | 16-bit analog output | r | uint16/int16 |
66+
| 40 | 3 | 32-bit float analog output | r | flaot |
67+
| 41 | 1 | 32-bit analog output block | w | uint32/int32 |
68+
| 41 | 2 | 16-bit analog output block | w | uint16/int16 |
69+
| 41 | 3 | 32-bit float analog output block | w | float |
70+
| 42 | 7 | 32-bit float analog output event with time | r | float |
71+
72+
CROB (Control Relay Output Block) is a special object associated with actuating on/off type output devices, write-only, type `uint8`, because it requires setting counter, on-time, and off-time in addition to Control Code.
73+
74+
Control Code values are as follows:
75+
76+
| Control Code | Action |
77+
| ------------ | ------------------------- |
78+
| 1 | output pluse on |
79+
| 2 | output pluse off |
80+
| 3 | output latch on |
81+
| 4 | output latch off |
82+
| 65 | output pluse on + close |
83+
| 66 | output pluse off + close |
84+
| 67 | output latch on + close |
85+
| 68 | output latch off + close |
86+
| 129 | output pluse on + trip |
87+
| 130 | output pluse off + trip |
88+
| 131 | output latch on + trip |
89+
| 132 | output latch off + trip |
90+
| +16 | + queue |
91+
| +32 | + clear |
92+
93+
## Address Examples
94+
95+
| Address | Data Type | Description |
96+
| ------------ | --------- | ----------------------------------------------------- |
97+
| 1.2.0 | bit | Value of binary input index 0 |
98+
| 1.2.1 | bit | Value of binary input index 1 |
99+
| 2.2.1 | bit | Value of binary input index 1 with absolute timestamp |
100+
| CROB.0:0:0:0 | bit | Control binary output index 0 output |
101+
| 40.1.0 | bit | Value of 32-bit binary output index 0 |
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# DNP 3.0
2+
3+
DNP 3.0 (Distributed Network Protocol 3.0)是一种通信协议,主要用于工业自动化领域,特别是在电力系统中,用于监控和数据采集(SCADA)系统。它允许远程终端单元(RTU)和主站系统之间进行可靠的数据交换。
4+
5+
6+
## 设备设置
7+
8+
| 字段 | 说明 |
9+
| ------------------ | --------------------------------- |
10+
| host | 设备 IP 地址 |
11+
| port | 设备端口号, 默认20000 |
12+
| masterid | 主站 ID, 默认1 |
13+
| slaveid | 从站 ID, 默认2 |
14+
| class0123_interval | Class0123 拉取间隔, 默认20000毫秒 |
15+
| class123_interval | Class123 拉取间隔, 默认1000毫秒 |
16+
| time_sync | 时间同步, 默认 No |
17+
18+
## 支持的数据类型
19+
20+
* uint8
21+
* uint16
22+
* int16
23+
* uint32
24+
* int32
25+
* float
26+
* bit
27+
28+
## 地址格式
29+
30+
> obj.var.index(.attribute)
31+
>
32+
> CROB.index:counter:on-time:off-time
33+
34+
### obj 和 var
35+
36+
在 DNP 3.0 协议中,使用 obj 和 var 来定义一个对象类型,index 指定一组对象实体的具体的对象,下表索引从0开始。attribute 目前只支持 value,如果不填写,默认为value。
37+
38+
目前支持下列对象:
39+
40+
| obj | var | 对象 | r/w | 类型 |
41+
| --- | --- | ------------------------------------------ | --- | ------------- |
42+
| 1 | 1 | binary input | r | bit |
43+
| 1 | 2 | binary input with status | r | bit |
44+
| 2 | 1 | binary input change without time | r | bit |
45+
| 2 | 2 | binary input change with absolute time | r | bit |
46+
| 2 | 3 | binary input change without relative time | r | bit |
47+
| 10 | 1 | binary output | r | bit |
48+
| 10 | 2 | binary output with status | r | bit |
49+
| 10 | 3 | binary output change with time | r | bit |
50+
| 20 | 1 | 32-bit binary counter with flag | r | uint32/int32 |
51+
| 20 | 2 | 16-bit binary counter with flag | r | uint16/uint16 |
52+
| 20 | 5 | 32-bit binary counter without flag | r | uint32/int32 |
53+
| 20 | 6 | 16-bit binary counter without flag | r | uint16/int16 |
54+
| 21 | 1 | 32-bit frozen binary counter | r | uint32/int32 |
55+
| 21 | 2 | 16-bit frozen binary counter | r | uint16/int16 |
56+
| 30 | 1 | 32-bit analog input | r | uint32/int32 |
57+
| 30 | 2 | 16-bit analog input | r | uint16/int16 |
58+
| 30 | 3 | 32-bit analog input without flag | r | uint32/int32 |
59+
| 30 | 5 | 32-bit float analog input | r | float |
60+
| 32 | 1 | 32-bit analog input change without time | r | uint32/int32 |
61+
| 32 | 2 | 16-bit analog input change without time | r | uint16/int16 |
62+
| 32 | 3 | 32-bit analog input change with time | r | uint32/int32 |
63+
| 32 | 4 | 16-bit analog input change with time | r | uint16/int16 |
64+
| 32 | 7 | 32-bit float analog input change with time | r | float |
65+
| 40 | 1 | 32-bit analog output | r | uint32/int32 |
66+
| 40 | 2 | 16-bit analog output | r | uint16/int16 |
67+
| 40 | 3 | 32-bit float analog output | r | flaot |
68+
| 41 | 1 | 32-bit analog output block | w | uint32/int32 |
69+
| 41 | 2 | 16-bit analog output block | w | uint16/int16 |
70+
| 41 | 3 | 32-bit float analog output block | w | float |
71+
| 42 | 7 | 32-bit float analog output event with time | r | float |
72+
73+
CROB(Control Relay Output Block)是一个特殊的对象,用于驱动开关型输出设备 (binary output),只写,类型为 `uint8`, 因为其除了 Control Code 之外,还需要设置 counter,on-time 和 off-time。
74+
Control Code 取值如下:
75+
| Control Code | Action |
76+
| ------------ | ------------------------- |
77+
| 1 | output pluse on |
78+
| 2 | output pluse off |
79+
| 3 | output latch on |
80+
| 4 | output latch off |
81+
| 65 | output pluse on + close |
82+
| 66 | output pluse off + close |
83+
| 67 | output latch on + close |
84+
| 68 | output latch off + close |
85+
| 129 | output pluse on + trip |
86+
| 130 | output pluse off + trip |
87+
| 131 | output latch on + trip |
88+
| 132 | output latch off + trip |
89+
| +16 | + queue |
90+
| +32 | + clear |
91+
92+
93+
## 地址示例
94+
95+
| 地址 | 数据类型 | 说明 |
96+
| ------------ | -------- | ------------------------------------ |
97+
| 1.2.0 | bit | binary input 下标0的值 |
98+
| 1.2.1 | bit | binary input 下标1的值 |
99+
| 2.2.1 | bit | binary input 下标1的值,带绝对时间戳 |
100+
| CROB.0:0:0:0 | bit | 控制 biary output 下标0输出 |
101+
| 40.1.0 | bit | 32-bit binary output 下标0的值 |

0 commit comments

Comments
 (0)