Python读取modbus RTU协议
下载modbus_tk库
1 | pip3 install modbus_tk |
execute主要函数
参考文章Python玩转modbus
软件模拟
- vspd
- modbus slave
虚拟COM1和COM2

modbus slave连接COM2口

更改从机数据

Python读取
1 | import serial |
输出
1 | Succeed to open port |
1 | pip3 install modbus_tk |
参考文章Python玩转modbus
虚拟COM1和COM2

modbus slave连接COM2口

更改从机数据

1 | import serial |
输出
1 | Succeed to open port |