Repository navigation
motion: a shared home/limit input does not trip a joint that stands still - #4956
Merged
Merged
Conversation
…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.
Collaborator
|
Having followed the forum thread this new behaviour has my approval. |
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.
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.homingside.