We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c6367c commit c9a69e9Copy full SHA for c9a69e9
README.rst
@@ -177,19 +177,19 @@ This library can be used with asyncio.
177
178
while True:
179
180
- # Wait for RPDO 1
181
- t = await tpdo.await_for_reception(1)
+ # Wait for TPDO 1
+ t = await node.tpdo[1].await_for_reception(1)
182
if not t:
183
continue
184
185
- # Get the PDO value
+ # Get the TPDO 1 value
186
rpm = node.tpdo[1]['MotorSpeed Actual'].get_raw()
187
print(f'SPEED on motor {nodeid}:', rpm)
188
189
# Sleep a little
190
await asyncio.sleep(0.2)
191
192
- # Send PDO with
+ # Send RPDO 1 with some data
193
node.rpdo[1]['Some variable'].set_phys(42)
194
node.rpdo[1].transmit()
195
0 commit comments