A ModbusRTU Over TCP/IP library, depends on modbus_tk.
Project description
modbus_tcprtu
A ModbusRTU Over TCP/IP library, depends on modbus_tk. It's often use with 485-to-TCP converter.
# must install modbus_tk
import modbus_tk.defines as cst
from modbus_tcprtu import TcpRtuMaster
# create a master
master = TcpRtuMaster(host='127.0.0.1', port=9001)
master.set_timeout(2)
for i in range(10):
# read data from modbus
# just use as modbus_tk.Master
print(i, master.execute(1, cst.READ_HOLDING_REGISTERS, 0, i + 1))
CHANGES
1.0.0
- First version
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
modbus_tcprtu-1.0.0.tar.gz
(2.7 kB
view hashes)