Commit 4e35ae4d authored by Ivan Tyagov's avatar Ivan Tyagov

Multiple coils case.

parent 14fb6c09
......@@ -2,6 +2,13 @@ from pymodbus.client.sync import ModbusTcpClient
client = ModbusTcpClient('localhost')
client.write_coil(1, True)
client.write_coil(2, False)
result = client.read_coils(1,1)
print(result.bits[0])
result = client.read_coils(2,1)
print(result.bits[0])
client.close()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment