Commit c161ab3
DS402: Allow handling the operation mode via PDO. (#257)
* pdo: Document relation between start() and the period attribute.
* pdo: Add a property to check if period updates are transmitted.
* p402: Skip sending the controlword RPDO if configured with a period.
Transmitting the RPDO only makes sense if the value takes effect
immediately. If there is already a cyclic task configured, or the
transmission type configuration requires a SYNC to be sent for the
change to apply, there is no sense in sending the PDO automatically in
the controlword setter.
* p402: Use RPDO to set the operation mode if possible.
Fall back to the previous behavior using SDO if the relevant object
0x6060 is not mapped to an RPDO.
* p402: Use TPDO to get the operation mode if possible.
Fall back to the previous behavior using SDO if the relevant object
0x6061 is not mapped to a TPDO. The property getter still blocks
until an up-to-date value was received, by waiting for the respective
TPDO up to a configurable timeout of 0.2 seconds by default. If the
TPDO does not look like it will be transmitted regularly (from its
is_periodic property), the method will not block and just return the
last received TPDO's value.
A lookup cache tpdo_pointers is added to keep track of the needed
pdo.Map instance, analog to the rpdo_pointers.
* p402: Improve documentation on PDO tracking dicts.
Consistently use empty dict literal for initialization. Provide more
useful comments about the expected contents.
* p402: Check PDO configuration for the Operation Mode objects.
Switching operation modes for several drives simultaneously must be
done via PDO. There is still a fallback mechanism via SDO, but a
warning should be issued when that is about to be used.
Co-authored-by: André Filipe Silva <af-silva@users.noreply.github.com>1 parent 1a0ebd7 commit c161ab3
2 files changed
Lines changed: 55 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | | - | |
| 189 | + | |
| 190 | + | |
190 | 191 | | |
191 | 192 | | |
192 | 193 | | |
| |||
273 | 274 | | |
274 | 275 | | |
275 | 276 | | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
276 | 294 | | |
277 | 295 | | |
278 | 296 | | |
| |||
459 | 477 | | |
460 | 478 | | |
461 | 479 | | |
462 | | - | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
463 | 484 | | |
464 | 485 | | |
465 | 486 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
| 205 | + | |
205 | 206 | | |
206 | 207 | | |
207 | 208 | | |
208 | 209 | | |
209 | 210 | | |
210 | | - | |
211 | | - | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
212 | 214 | | |
213 | 215 | | |
214 | 216 | | |
| |||
220 | 222 | | |
221 | 223 | | |
222 | 224 | | |
| 225 | + | |
223 | 226 | | |
224 | 227 | | |
225 | 228 | | |
| |||
236 | 239 | | |
237 | 240 | | |
238 | 241 | | |
| 242 | + | |
239 | 243 | | |
240 | 244 | | |
241 | 245 | | |
| |||
259 | 263 | | |
260 | 264 | | |
261 | 265 | | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
262 | 276 | | |
263 | 277 | | |
264 | 278 | | |
| |||
335 | 349 | | |
336 | 350 | | |
337 | 351 | | |
338 | | - | |
| 352 | + | |
339 | 353 | | |
340 | 354 | | |
341 | 355 | | |
| |||
354 | 368 | | |
355 | 369 | | |
356 | 370 | | |
357 | | - | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
358 | 383 | | |
359 | 384 | | |
360 | 385 | | |
| |||
435 | 460 | | |
436 | 461 | | |
437 | 462 | | |
438 | | - | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
439 | 466 | | |
440 | 467 | | |
441 | 468 | | |
| |||
0 commit comments