Skip to content

First Steps /help #25

@brandonfwl

Description

@brandonfwl

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions