Error combining cutter compensation (G41/42) with work offset (G55)

  • RotarySMP
  • RotarySMP's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
16 Feb 2026 12:32 #343047 by RotarySMP
Hi all,
At 19:55 in this video...

 

I was making a set of lathe tool height adjusters, and used a loop with G55 to repeat my tool paths along a piece of stock. This worked great for engraving and drilling such as this code...
o100 Sub
 G0 X0 Y0
 G0 Z5
 G01 Z-2 F100
 G01 Y-14.5 F1000
 G01 X10.5 Y-20 
 G01 X21
 G01 X30 Y-14.5
 G01 Y0
 G01 X0
 G0 Z50
o100 endsub

#50 = 0
G17 G21 G54 G90
; OP 1 engraver outline
M6 T16 G43; Drag engraver

o110 while [#50 LE 5]
    G10 L2 P2 X[#5221]  Y[#5222 -23* #50] Z[#5223]
    G55
    o100 call
    #50 = [#50 + 1]
o110 endwhile
M2


However, my last tool path was a 10mm endmill to cut the contour, and I just reused the engraved path and added G42 to cutter comp it. This errored out with Linuxcnc throwing this message.
 

Here is the code...
o100 Sub
 G0 X-10 Y0
 G0 Z5
 G01 Z-2.5 F100
 G01 X0 Y0
 G01 Y-14.5 F1000
 G01 X10.5 Y-20 
 G01 X21
 G01 X30 Y-14.5
 G01 Y0
 G01 X0
  G01 Z-5.5 F100
 G01 X0 Y0
 G01 Y-14.5 F1000
 G01 X10.5 Y-20 
 G01 X21
 G01 X30 Y-14.5
 G01 Y0
 G01 X0
  G01 Z-7.75 F100
 G01 X0 Y0
 G01 Y-14.5 F1000
 G01 X10.5 Y-20 
 G01 X21
 G01 X30 Y-14.5
 G01 Y0
 G01 X0
  G01 Z-10.5 F100
 G01 X0 Y0
 G01 Y-14.5 F1000
 G01 X10.5 Y-20 
 G01 X21
 G01 X30 Y-14.5
 G01 Y0
 G01 X0
 G0 Z50
o100 endsub

G17 G21 G40 G54 G90
M6 T10 G43; 10mm end mill
G42
G0 X-10 Y0
G0 Z50
M1
S3000 M3
G4 P4
#50 = 0
o110 while [#50 LE 5]
    G10 L2 P2 X[#5221]  Y[#5222 -23* #50] Z[#5223]
    G55
    o100 call
    #50 = [#50 + 1]
o110 endwhile
M5 M9 G40
M2


Is this just a simple error on my side? I didn't find anything in the reference doc's on cutter comp and work offsets not working together.
Cheers,
Mark
 
Attachments:

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

More
16 Feb 2026 15:23 #343051 by andrax
You're missing a G40. 

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

  • RotarySMP
  • RotarySMP's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
16 Feb 2026 21:17 #343070 by RotarySMP
There is one at the end Should there be another?

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

More
16 Feb 2026 21:42 #343073 by andrax
No, G40 must come first.A change is only possible without tool compensation. 
G40
...
G52
 

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

Time to create page: 0.128 seconds
Powered by Kunena Forum