Skip to content

Commit c3f20d3

Browse files
committed
change default modbus port to 502 from 5020
1 parent c1ab4a3 commit c3f20d3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/doc/zh/comm/modbus.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ slave = modbus.Slave(
117117
0x00, 10,
118118
0x00, 10,
119119
0, 1, # 我们使用的是 TCP 模式, 忽略波特率和rtu地址即可
120-
5020, False # TCP 端口号, 后者为 是否打印 debug 信息
120+
502, False # TCP 端口号, 后者为 是否打印 debug 信息
121121
)
122122

123123
### 以下代码与 RTU 部分一致

examples/protocol/comm_modbus_tcp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
0x00, 10, # input registers
1010
0x00, 10, # holding registers
1111
0, 1, # serial 115200-8N1, slave, ignore
12-
5020, False # tcp port, debug OFF
12+
502, False # tcp port, debug OFF
1313
)
1414

1515

0 commit comments

Comments
 (0)