Skip to content

Commit ca41c04

Browse files
authored
More doc corrections. (#2813)
1 parent f66cd63 commit ca41c04

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

doc/source/_static/examples.tgz

-1 Bytes
Binary file not shown.

doc/source/client.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,9 @@ anything.
160160
The line :mod:`await client.connect()` connects to the device (or comm port), if this cannot connect successfully within
161161
the timeout it throws an exception. If connected successfully reconnecting later is handled automatically
162162

163-
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.
163+
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.
164164

165-
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.
165+
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.
166166

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

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

219219
try:
220-
rr = await client.read_coils(1, 1, device_id=1)
220+
rr = await client.read_coils(1, count=1, device_id=1)
221221
except ModbusException as exc:
222222
_logger.error(f"ERROR: exception in pymodbus {exc}")
223223
raise exc

0 commit comments

Comments
 (0)