You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DS402: Increase delay to check status on homing start. (#252)
* ds402: Increase delay to check status on homing start.
The Statusword is examined immediately after setting the Controlword
command to start homing. That is very likely to fail because of the
round-trip time until the Statusword is actually updated from a TPDO.
To work around that, the delay between each check of the Statusword
should be moved before the actual comparison, and its default value
increased.
Introduce a new constant TIMEOUT_CHECK_HOMING to configure that with a
default value of 100 ms. This replaces the previously used
INTERVAL_CHECK_STATE which is only 10 ms by default.
An even better solution would be to wait for the Statusword to be
updated by a received PDO, but that would be much more complex.
* Apply interval to is_homed() method as well.
Same problem as in the homing() method, PDO updates of the Statusword
need at least one SYNC / PDO cycle duration.
* Factor out common _homing_status() method.
Move the common code from is_homed() and homing() to a method for
internal use. Add a comment why the delay is necessary and how it
should possibly be replaced by an RPDO reception check. Should the
latter be implemented, there will be only one place to change it.
0 commit comments