Skip to content

Commit f66cd63

Browse files
authored
Correct wrong example in doc. (#2812)
1 parent ad1a30f commit f66cd63

File tree

4 files changed

+2
-19
lines changed

4 files changed

+2
-19
lines changed

doc/source/_static/examples.tgz

-101 Bytes
Binary file not shown.

doc/source/_static/examples.zip

-110 Bytes
Binary file not shown.

doc/source/client.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ Synchronous example
130130
client = ModbusTcpClient('MyDevice.lan') # Create client object
131131
client.connect() # connect to device
132132
client.write_coil(1, True, device_id=1) # set information in device
133-
result = client.read_coils(2, 3, device_id=1) # get information from device
133+
result = client.read_coils(2, count=3, device_id=1) # get information from device
134134
print(result.bits[0]) # use information
135135
client.close() # Disconnect device
136136

@@ -150,7 +150,7 @@ Asynchronous example
150150
client = AsyncModbusTcpClient('MyDevice.lan') # Create client object
151151
await client.connect() # connect to device, reconnect automatically
152152
await client.write_coil(1, True, device_id=1) # set information in device
153-
result = await client.read_coils(2, 3, device_id=1) # get information from device
153+
result = await client.read_coils(2, count=3, device_id=1) # get information from device
154154
print(result.bits[0]) # use information
155155
client.close() # Disconnect device
156156

doc/source/simulator/datamodel.rst

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,3 @@ Class definitions
3939
:undoc-members:
4040
:show-inheritance:
4141
:member-order: bysource
42-
43-
44-
Action data class examples
45-
^^^^^^^^^^^^^^^^^^^^^^^^^^
46-
47-
48-
.. autoclass:: pymodbus.simulator.SimDataMinMax
49-
:members:
50-
:undoc-members:
51-
:show-inheritance:
52-
:member-order: bysource
53-
54-
.. autoclass:: pymodbus.simulator.SimDataIncrement
55-
:members:
56-
:undoc-members:
57-
:show-inheritance:
58-
:member-order: bysource

0 commit comments

Comments
 (0)