Python Modbus RTU over TCP connect fail

222 views Asked by At

I am trying to read and write data on RTU over Modbus TCP with python. But it prints false, this means client.connect() has failed.

from pymodbus.client import ModbusTcpClient    
from pymodbus.transaction import ModbusRtuFramer as ModbusFramer

client = ModbusTcpClient("192.168.1.232", port=502, framer=ModbusFramer)
success = client.connect()
print(success)

Could anyone help to check this problem?Thanks

0

There are 0 answers