Skip to content

Commit

Permalink
change default modbus port to 502 from 5020
Browse files Browse the repository at this point in the history
  • Loading branch information
Neutree committed Dec 4, 2024
1 parent c1ab4a3 commit c3f20d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/doc/zh/comm/modbus.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ slave = modbus.Slave(
0x00, 10,
0x00, 10,
0, 1, # 我们使用的是 TCP 模式, 忽略波特率和rtu地址即可
5020, False # TCP 端口号, 后者为 是否打印 debug 信息
502, False # TCP 端口号, 后者为 是否打印 debug 信息
)

### 以下代码与 RTU 部分一致
Expand Down
2 changes: 1 addition & 1 deletion examples/protocol/comm_modbus_tcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
0x00, 10, # input registers
0x00, 10, # holding registers
0, 1, # serial 115200-8N1, slave, ignore
5020, False # tcp port, debug OFF
502, False # tcp port, debug OFF
)


Expand Down

0 comments on commit c3f20d3

Please sign in to comment.