Skip to content

Commit 6657657

Browse files
Yohrogjaniversen
authored andcommitted
Fix usage of AsyncModbusTcpClient in client docs page (#2169)
1 parent 170d92b commit 6657657

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/source/client.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,16 +132,16 @@ is done in a few simple steps, like the following synchronous example::
132132

133133
and a asynchronous example::
134134

135-
from pymodbus.client import ModbusAsyncTcpClient
135+
from pymodbus.client import AsyncModbusTcpClient
136136

137-
client = ModbusAsyncTcpClient('MyDevice.lan') # Create client object
137+
client = AsyncModbusTcpClient('MyDevice.lan') # Create client object
138138
await client.connect() # connect to device, reconnect automatically
139139
await client.write_coil(1, True, slave=1) # set information in device
140140
result = await client.read_coils(2, 3, slave=1) # get information from device
141141
print(result.bits[0]) # use information
142142
client.close() # Disconnect device
143143

144-
The line :mod:`client = ModbusAsyncTcpClient('MyDevice.lan')` only creates the object it does not activate
144+
The line :mod:`client = AsyncModbusTcpClient('MyDevice.lan')` only creates the object it does not activate
145145
anything.
146146

147147
The line :mod:`await client.connect()` connects to the device (or comm port), if this cannot connect successfully within

0 commit comments

Comments
 (0)