-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Description
I tried to run:
//
from pymodbus.client.sync import ModbusTcpClient
client = ModbusTcpClient('myStaticIP, port=myPort')
client.connect()
rr = client.connect()
print rr
client.write_coil(1, True)
result = client.read_coils(1,1)
print result.bits[0]
client.close()
//
Output is as follows:
//
True
Traceback (most recent call last):
File "./test.py", line 11, in
print result.bits[0]
AttributeError: 'NoneType' object has no attribute 'bits'
//
Tried on Ubuntu 12.10, Linux Mint 15 and BeagleBone (Black). All different boxes, with good ping responses from Modbus client. Modbus client is an IDEC FC5A-D12 running as Modbus TCP Slave.
Any help would be great!
Metadata
Metadata
Assignees
Labels
No labels