(Solved) G43 not being applied in g-code

  • spumco
  • Away
  • Platinum Member
  • Platinum Member
More
27 Apr 2026 04:34 #345964 by spumco
Revisiting an issue I noticed here:

forum.linuxcnc.org/10-advanced-configura...l-orientation#345715

At the time I wasn't sure if this was a GUI issue, or something in my config.  I've since switched GUIs (Axis, FlexGUI, and Qtpyvcp) and the issue is the same across all three GUIs.

Problem I have is that G43 isn't being applied consistently during a program.  G43 works via MDI, and all three GUI tool-change buttons.

I've tried every permutation:
Tn M6 G43
Tn M6 G43 Hn
M6 Tn G43
M6 Tn G43 Hn

And the same as above, but with G43 on another line.  Also tried an M1 after the tool change line(s) - even a few lines down - but LCNC just isn't applying the tool offset.

When I run a program, LCNC excutes the tool change - new tool number is displayed in all three GUIs - but doesn't apply the offset.

Tool number doesn't matter - whatever tool offset was previously applied remains active after the Tn M6 line.

Under Axis I was using the "T" remap from the sim lathe-fanucy
Under qtpyvcp, I commented out the "T" and "M6" remap and was just using the 'stock' M6

I'm sure this is something on my end and unlikely to be an LCNC problem.  Maybe the remap.py and stdglue.py used by my other remapped M-codes is interfering with 'normal' M6/G43?

Anyone have an idea what would interfere with G43 being applied during a program, but not via MDI or a GUI-based command?
Attachments:

Please Log in or Create an account to join the conversation.

More
27 Apr 2026 10:55 #345969 by andrax
Replied by andrax on topic (Solved) G43 not being applied in g-code
Do you have a sample program that uses the G43 call?

Please Log in or Create an account to join the conversation.

  • spumco
  • Away
  • Platinum Member
  • Platinum Member
More
27 Apr 2026 11:35 #345972 by spumco
Replied by spumco on topic (Solved) G43 not being applied in g-code

Do you have a sample program that uses the G43 call?

Not handy at the moment, but the issue persists across multiple programs.  First noticed on a fairly simple turning pgm with 3 tool changes, but the same thing happens when I just hand code or trim down a pgm for testing.

I can double-check for something abnormal later, but is there something I (or the post processor) could put in a program which would cause LCNC to ignore G43?  It's not like there's a GOTO statement skipping over the G43 words.

Please Log in or Create an account to join the conversation.

More
27 Apr 2026 12:42 #345984 by andrax
Replied by andrax on topic (Solved) G43 not being applied in g-code
Please try to provide a program excerpt. I would like to take a look at it and test it on my system.
The following user(s) said Thank You: spumco

Please Log in or Create an account to join the conversation.

  • spumco
  • Away
  • Platinum Member
  • Platinum Member
More
27 Apr 2026 21:32 #345994 by spumco
Replied by spumco on topic (Solved) G43 not being applied in g-code
Here's a program snip from the last round of unsuccessful testing:

Warning: Spoiler!


As I mentioned earlier, I've also tried the G43 on a separate line, with and without the Hn word.  I added the M1 just to stop the pgm before the spindle ramps up during testing.

The X-values are all negative based my post processor (gang tool slant bed back-lathe, X+ is 'up', and T2 is on the 'negative' side of things).  The motion is correct for my particular setup.

If I start the above program with T2 loaded and offsets applied (via MDI or GUI cmd), everything works...until the next tool change.

I've also attached my remap.py and stdglue.py just in case there's something in there messing things up.

Thanks for having a look.
Attachments:

Please Log in or Create an account to join the conversation.

More
28 Apr 2026 09:59 #346001 by andrax
Replied by andrax on topic (Solved) G43 not being applied in g-code
I see
G53...
G43...
G54...
G43 currently refers to the machine coordinates. Then you select coordinate system 1.
That might be why G43 becomes ineffective.
Write G54 before G43
G53...
G54...
G43...
In MIDI, by the way, the last coordinate system is always active, so G54.

I hope this helps

regards
The following user(s) said Thank You: spumco

Please Log in or Create an account to join the conversation.

  • spumco
  • Away
  • Platinum Member
  • Platinum Member
More
28 Apr 2026 10:42 #346002 by spumco
Replied by spumco on topic (Solved) G43 not being applied in g-code
I was under the impression that a 'G0 G53 Xnnn' line doesn't change the active WCS to the machine coordinates, it just causes LCNC to move to a machine coordinate for that line only.

Second, if a change in WCS causes the tool offsets to be removed everyone using LCNC would have to write programs with G43 after every WCS change.

More importantly, the order of G53-G43-G54 is what is output by the Fusion 360 standard LCNC turning post.  I can't be the only one using that post; if that order was wrong everyone who uses the post would be having the same problem.

I will certainly try out your suggestion this evening even if I'm dubious.  And thank you for giving it some thought.

Please Log in or Create an account to join the conversation.

More
28 Apr 2026 12:08 #346005 by andrax
Replied by andrax on topic (Solved) G43 not being applied in g-code
I'm not entirely sure about this either.
At least G10 only affects the currently selected coordinate system. As soon as you switch, your shift disappears.
It could be the same with G43, since you're applying the length correction to G53.

Just try it out.

Please Log in or Create an account to join the conversation.

More
28 Apr 2026 13:02 #346006 by MaHa
Replied by MaHa on topic (Solved) G43 not being applied in g-code
You can check for G43 in Linuxcnc status. Eg Axis:


 


M6 turns off G43, 
so G43 in a line with M6, sets G49 
Attachments:

Please Log in or Create an account to join the conversation.

More
28 Apr 2026 15:37 #346011 by Aciera
Replied by Aciera on topic (Solved) G43 not being applied in g-code

so G43 in a line with M6, sets G49

Not sure I understand this right but 'M6 Tn G43' certainly works fine for me.

@spumco
Have you tried without 'RETAIN_G43 = 1' in the ini file? (you have one line commenting it out and another later on activating it)

Please Log in or Create an account to join the conversation.

Time to create page: 0.161 seconds
Powered by Kunena Forum