Closed alexVinarskis closed 5 months ago
Thank you for sharing. Often there are issues getting devices into OP state, and this could be worth looking into. I'll check that a bit further if there is some time.
I finally tried your update on the example and merged your PR, sorry that it took me so long. Thank you again for your contribution.
There is a potential mistake in example, which had me banging head for quite some time with my motor controller: DC sync needed be performed during
SAFEOP=>OP
transition, being first action. [source, search ofSAFE
]. At the same time, English source, claims it shall be performed duringPREOP=>OP
[source, search forPREOP
], so there is clearly some misaligned. IMO its safe to assume English is wrong, as:PREOP=>OP
transition. OnlyPREOP=>SAFEOP
and thenSAFEOP=>OP
.SAFEOP=>OP
.(not official source though):
![Screenshot from 2023-07-31 21-24-16](https://github.com/bnjmnp/pysoem/assets/51450005/e37f8265-2950-494a-a2db-dbe5ed168ce6)
I am not sure why it works in current example, I guess it depends per implementation, and some devices are less picky.
Hope this helps someone not to repeat my mistakes :) I can't find 100% solid and correct definition in EtherCAT standard when exactly this particular part shall be performed. Not sure this change shall be merged in right away, but wanted to raise this issue/inconsistency.