Repository navigation
interp: G43.1 and G43.2 axis words are offsets, never a move - #4675
Open
grandixximo wants to merge 1 commit into
Open
grandixximo wants to merge 1 commit into
grandixximo wants to merge 1 commit into
Conversation
Contributor
Author
|
@andypugh this fixes two things. Both are in 2.9 as well:
For 2.9, would you like a slimmer backport with only the first fix, a one-line change so G43.2 no longer moves? The second changes behaviour and seems a better fit for 2.10 only. |
A line with axis words and no motion code moves in the modal motion mode, except when G43.1 takes the axis words as offsets. Since G43.2 takes axis words as well (2df2871), the check above lets them through for G43.2 too, but the line still became a move: after G0, "G43.2 X0 Y0" applied the offset and then went to X0 Y0. The documentation says G43.2 causes no motion. A G-code in the same line that takes axis words of its own got them too: "G1 G43.1 Z5" set the offset and fed to Z5, "G92 G43.2 X1" left a G92 offset of -2, "G28 G43.1 Z1" went through Z1 on the way home. The documentation already calls motion on a G43.1 line an error. G43.1 and G43.2 with axis words now leave the modal motion alone, and a motion code or any other G-code that takes axis words in the same line is "Cannot use two g codes that both use axis values", as for G10 and G92. G80 in the line stays fine. tests/interp/g43-axis-words: no move from G43.1 or G43.2 under G0 or G1, G43 H and G49 with axis words still move with the new offset, and every rejected combination. Reported by Sigma1912.
grandixximo
force-pushed
the
g432-no-motion
branch
from
October 12, 2026 08:16
758ba3e to
0ed1bbd
Compare
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 G43.2 line with axis words also moves in the modal motion mode. Reported by Sigma1912 on the axis_mm sim and on real hardware:
enhance_block()turns axis words without a motion code into a move in the modal motion mode, and keeps G43.1 out of that. When G43.2 got axis words (2df2871, in 2.9.0), the check above it learned to accept them, but G43.2 was not kept out of the move. The documentation says G43.2 causes no motion.Looking at the other tool offset codes, G43.1 and G43.2 had a second problem: a G-code in the same line that takes axis words of its own got the same words too.
G1 G43.1 Z5set the offset and fed to Z5,G92 G43.2 X1set the tool offset and left a G92 offset of -2, andG28 G43.1 Z1went through Z1 on the way home. The G43.1 documentation already lists motion on the same line as an error, but it was never checked.With this change:
G43 H1 Z5).The G43.1 and G43.2 error lists in the G-code documentation name the rejected combinations.
tests/interp/g43-axis-wordsruns the interpreter only. It checks the reported sequence, that G43.1 and G43.2 move nothing under G0 or G1, that G43 H and G49 still move, and every rejected combination. It fails on master.I found no program in the tree that combines these codes on one line.