Skip to main content

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


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)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page