We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a4dfbee commit 1a21371Copy full SHA for 1a21371
canopen/profiles/p402.py
@@ -369,12 +369,14 @@ def on_TPDOs_update_callback(self, mapobject):
369
@property
370
def statusword(self):
371
"""Returns the last read value of the Statusword (0x6041) from the device.
372
- :raise ValueError: The Object 0x6041 (Statusword) is not configured in this device.
+ If the the object 0x6041 is not configured in any TPDO it will fallback to the SDO mechanism
373
+ and try to tget the value.
374
"""
375
try:
376
return self.tpdo_values[0x6041]
377
except KeyError:
- raise KeyError('The object 0x6041 (Statusword) is not configured in this device.')
378
+ logger.warning('The object 0x6041 is not supported by the PDO mechanism, fallback to SDO')
379
+ return self.sdo[0x6041].raw = value
380
381
382
def controlword(self):
0 commit comments