I am trying to communicate and read the words on a Mitsubishi PLC (Q06udeh) using the following code:
from pymodbus.client.sync import ModbusTcpClient
client = ModbusTcpClient('10.1.1.4',port=5007)
client.connect()
result = client.read_holding_registers(1,1)
print result
t = result.registers[0]
print t
I am getting following output:
None
Traceback (most recent call last):
File "C:\Users\serkan\Desktop\sasda.py", line 8, in <module>
t = result.registers[0]
AttributeError: 'NoneType' object has no attribute 'registers'
No matter how I changed the accessing words with different parameters no hope, I still have no success.
Please help.