bnjmnp / pysoem

Cython wrapper for the Simple Open EtherCAT Master Library
MIT License
95 stars 36 forks source link

fixup: example: DC sync on S=>O #114

Closed alexVinarskis closed 5 months ago

alexVinarskis commented 11 months ago

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=>OPtransition, being first action. [source, search of SAFE]. At the same time, English source, claims it shall be performed during PREOP=>OP [source, search for PREOP], so there is clearly some misaligned. IMO its safe to assume English is wrong, as:

(not official source though): Screenshot from 2023-07-31 21-24-05 Screenshot from 2023-07-31 21-24-16

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.

bnjmnp commented 11 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.

bnjmnp commented 5 months ago

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.