Closed GullinBustin closed 5 months ago
@bnjmnp Do you want any changes to merge this PR? Nowadays we need this update to use SDOs.
Many thanks for you contribution. The check on the working counter for SDO read and write seems resonalbe. Sorry that I did not merge the PR very quickly, I wanted to take the time to run my tests on this.
Maybe I should also apply this to mbx_receive()
. It would align more nicely if wk errors would also raise an exception there. What do you think?
In sdo_read and sdo_write, the working counter is saved as a local variable named result, but it is not used anywhere. When SDO read/write is performed on a ECAT device, It is not possible to know if connections fail or if a timeout occurs because the working counter is not shared, and sdo_read/sdo_write does not raise any exception in these cases. In this PR, sdo_read/sdo_write raise a WkcError when the 'result' value is not higher than 0 and adds the 'result' value as a property in the exception.