Skip to content

Conversation

@BsAtHome
Copy link
Contributor

This PR addresses a race condition between a joint's homing status indicator and the state machine running the homing procedure. It was well reproducible using linuxcncrsh sending successive homing commands.

Root cause:
The joint's homing status is deasserted when a joint has been processed. This status update happens in both the EMC_STAT sent via NML and the HAL pins for the joints. It was possible to send a second homing command via NML and fail before the previous homing action was completed, even though the system indicated no homing in progress.

The previously homing joint was marked ready with homed status asserted and homing status deasserted. However, the state machine running the homing process was not yet done and had the homing_active internal state still asserted, even tough all joints' homing status had been cleared. The processing of the subsequent homing command would fail with an error because homing_active was still asserted.

The solution is to delay the deassertion of the joints' homing status indicator until the state machine is done, as indicated by homing_active. This was fixed for both the NML EMC_STAT and HAL pins.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant