Skip to content

motion: a shared home/limit input does not trip a joint that stands still - #4956

Merged
BsAtHome merged 1 commit into
LinuxCNC:masterfrom
grandixximo:home-shared-limits
Dec 3, 2026
Merged

BsAtHome merged 1 commit into
LinuxCNC:masterfrom
grandixximo:home-shared-limits

Conversation

@grandixximo

Copy link
Copy Markdown
Contributor

A machine with one switch input wired to the home and limit pins of several joints cannot home today. When joint 0 presses the switch, joint 2's limit pin goes high and trips, although both joints set HOME_IGNORE_LIMITS and HOME_IS_SHARED: HOME_IGNORE_LIMITS only covers the joint that is homing, and the docs tell users to mask the other joints' limits in HAL (https://forum.linuxcnc.org/24-hal-components/59433-joint-x-homing-signal-possible-bug).

With this PR a joint with both flags ignores its limit input while any joint homes, as long as motion is in free mode and the joint's own free planner is idle. While homing runs nothing else moves such a joint (jogs are refused), so only the shared switch can be pressed; a jog still running when the home started keeps its limit. Absolute encoder joints are left out, as homing drops HOME_IS_SHARED for them. Motion keeps the combined flag per joint from the homing parameters, so the homing module API is unchanged. The HOME_IGNORE_LIMITS docs now describe this instead of the HAL masking.

tests/home-shared-limits wires one input to the home and limit pins of joints 0 and 2: a Home All (joint 2, then joint 0) homes without a trip, and moving the switch under joint 0 afterwards trips the limit. It fails on master. It is a new test because no existing homing test shares a switch input with limit pins.

This is independent of #4955, which touches the same forum report from the joint.N.homing side.

…till

A machine with one switch input wired to the home and limit pins of several joints could not home: when X pressed the switch, Z's limit pin went high and tripped, although both joints set HOME_IGNORE_LIMITS and HOME_IS_SHARED. HOME_IGNORE_LIMITS only covered the joint that was homing, so the docs told users to mask the other joints' limits in HAL (forum thread 59433).

A joint with both flags now ignores its limit input while any joint homes, in free mode, as long as its own free planner is idle. While homing runs nothing else moves such a joint (jogs are refused), so only the shared switch can be pressed; a jog still running when the home started keeps its limit. Absolute encoder joints are left out, as homing drops HOME_IS_SHARED for them. Motion keeps the combined flag per joint from the homing parameters, so the homing module API is unchanged.

tests/home-shared-limits wires one input to the home and limit pins of joints 0 and 2: a Home All (joint 2, then joint 0) homes without a trip, and moving the switch under joint 0 afterwards trips the limit. It is a new test because no existing homing test shares a switch input with limit pins.
@andypugh

andypugh commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

Having followed the forum thread this new behaviour has my approval.

@BsAtHome
BsAtHome merged commit 1f5771b into LinuxCNC:master Dec 3, 2026
19 checks passed
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.

3 participants