Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified doc/source/_static/examples.tgz
Binary file not shown.
6 changes: 3 additions & 3 deletions doc/source/client.rst
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ anything.
The line :mod:`await client.connect()` connects to the device (or comm port), if this cannot connect successfully within
the timeout it throws an exception. If connected successfully reconnecting later is handled automatically

The line :mod:`await client.write_coil(1, True, device_id=1)` is an example of a write request, set address 1 to True on device 1.
The line :mod:`await client.write_coil(1, [True], device_id=1)` is an example of a write request, set address 1 to True on device 1.

The line :mod:`result = await client.read_coils(2, 3, device_id=1)` is an example of a read request, get the value of address 2, 3 and 4 (count = 3) from device 1.
The line :mod:`result = await client.read_coils(2, count=3, device_id=1)` is an example of a read request, get the value of address 2, 3 and 4 (count = 3) from device 1.

The last line :mod:`client.close()` closes the connection and render the object inactive.

Expand Down Expand Up @@ -217,7 +217,7 @@ All simple request calls (mixin) return a unified result independent whether it
The application should evaluate the result generically::

try:
rr = await client.read_coils(1, 1, device_id=1)
rr = await client.read_coils(1, count=1, device_id=1)
except ModbusException as exc:
_logger.error(f"ERROR: exception in pymodbus {exc}")
raise exc
Expand Down
Loading