homing: bound the homing moves, return from a failed latch move - #4578
Open
grandixximo wants to merge 1 commit into
Open
grandixximo wants to merge 1 commit into
grandixximo wants to merge 1 commit into
Conversation
Every homing move is planned to twice the joint's travel, so a joint with a dead switch searches until it hits a limit switch or the end of its travel, a joint whose switch is stuck on backs off the same way, and a switch that fails after its first trip sends the latch move the same way at latch speed. Operators who retry the homing move the joint further each time. Add [JOINT_n]HOME_SEARCH_DIST for the search move and HOME_LATCH_DIST for the back-off, latch and index moves, both defaulting to 0, the old unbounded behaviour. A search that runs out stops where it is and the homing is aborted; the next attempt searches on from there. When one of the other moves runs its full length the joint reports which move, moves back to where that move began at the same speed, and the homing is aborted. The other joints of the sequence stop at once; those synchronized with the joint return to the start of their own current move as well. tests/home-dist covers a dead switch, a switch stuck on, a switch that dies after its first trip, and a synchronized pair with both switches stuck on.
Contributor
Author
|
@Sigma1912 is the other one #4577 😁 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every homing move is planned to twice the joint's travel. With a dead home switch the search runs until a limit switch stops it, or into the end of the travel when the limit switch doubles as the home switch and is ignored. A switch stuck on sends the initial back-off the same way at search speed, which on a Z axis with its switch at the top means down into the table. A switch that fails after its first trip sends the latch move the same way at latch speed. Operators who retry the homing drive the joint further with every attempt.
This adds two
[JOINT_n]keys, both defaulting to 0, which keeps today's behaviour:HOME_SEARCH_DIST: the farthest the search move may travel without finding the switch.HOME_LATCH_DIST: the farthest each of the moves made next to the switch may travel: the back-off waiting for the switch to clear, the latch move, and the index pulse search. A few times the trip overshoot (search speed squared over twice the acceleration) plus the width of the switch's active zone covers them; with an index it must also cover one encoder revolution.A search that runs out stops where it is and the homing is aborted with an error; the next attempt searches on from there, since a search may legitimately need the whole travel and a joint that has not found its switch yet is no worse off further along. The real use is a continuous rotary joint: its soft limits sit far apart, so today a dead switch spins it until someone hits estop;
HOME_SEARCH_DISTa little over one revolution turns that into an abort after one turn.When one of the moves bounded by
HOME_LATCH_DISTruns its full length the joint reports which move, moves back to where that move began at the speed of that move, and the homing is aborted. The machine stays on. The other joints of the sequence stop at once, and the joints synchronized with it (negativeHOME_SEQUENCE) move back to the start of their own current move too, so a coupled pair ends where it started. A joint homed repeatedly against a stuck or intermittent switch therefore stays put instead of creeping. A limit switch hit during the return aborts as before.tests/home-distcovers a dead switch, a switch stuck on, a switch that dies after its first trip, and a synchronized pair with both switches stuck on: the search stops at its bound, the other moves come back to where they began, the expected message is reported and the machine stays on.The homing module interface gains the two distances in
set_joint_homing_params();homecomp.compis updated.