Skip to content

homing: run every leg of a synchronized home sequence together - #4577

Open
grandixximo wants to merge 1 commit into
LinuxCNC:masterfrom
grandixximo:homing-sync-group
Open

grandixximo wants to merge 1 commit into
LinuxCNC:masterfrom
grandixximo:homing-sync-group

Conversation

@grandixximo

@grandixximo grandixximo commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

A negative HOME_SEQUENCE only synchronized the final move. Search, back-off and latch ran per joint, so on a gantry one side moved while the other held, or the two moved apart, for distances the software cannot know (depth into the switch, misalignment of the switches). Each such leg racks the frame. On a stepper gantry with encoders it shows as a following error that comes and goes with where the previous cycle left the frame, which is what #4572 looked like.

This runs every leg of the group together: back off together when any side starts on its switch, search together, finish the search at latch speed once the first side has tripped, back off at latch speed once all have tripped, latch together. The sides are never driven apart by more than the switch misalignment plus the latch overshoot. On a simulated bridge with @Sigma1912's joint settings the peak strain drops from 1.02 mm to 0.56 mm, and a stuck-on switch drives the group together to the end of travel and aborts there.

Behaviour change for every negative-sequence config: the back-off from the switch runs at HOME_LATCH_VEL instead of HOME_SEARCH_VEL, and the legs wait for each other, so a cycle takes a little longer. Docs updated.

New test tests/home-sync-backoff: two joints coupled through a limit3 bridge (strain capped in size and rate), homed from far away, from HOME with one switch active, and with both sides inside their switches. The old code peaks at 1.2 to 1.3 mm of strain against a 1.05 mm limit.

A negative HOME_SEQUENCE only synchronized the final move. Search, back-off and latch ran per joint, so on a gantry one side moved while the other held, or the two moved in opposite directions, for distances the software cannot know: how deep a side sits in its switch, how far the switches are out of line. Each such leg racks the frame, and on a stepper gantry with encoders that is a following error that comes and goes with where the previous cycle left the frame (LinuxCNC#4572).

Run every leg together: back off together when any side starts on its switch, search together, finish the search at latch speed once the first side has tripped, back off at latch speed once all have tripped, latch together. The sides are then never driven apart by more than the misalignment of their switches plus the latch overshoot: 0.56 mm of strain instead of 1.02 mm with Sigma1912's settings on a simulated bridge. A stuck-on switch drives the group together to the end of travel and aborts there instead of twisting the frame.

tests/home-sync-backoff couples two joints through a limit3 bridge and homes the pair from far away, from HOME with one switch active, and with both sides inside their switches; the old code peaks at 1.2 to 1.3 mm of strain against a 1.05 mm limit.
@grandixximo

Copy link
Copy Markdown
Contributor Author

old scoped behavior on the test
image

new scoped behavior on the test
image

the simulated bridge strain (green line) tells the story

@Sigma1912

Copy link
Copy Markdown
Contributor

Testing on my gantry,
master:
Screenshot from 2026-09-20 14-15-49

with this patch:
Screenshot from 2026-09-20 14-12-49

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.

2 participants