REMAP: gang lathe tool orientation

More
13 Apr 2026 02:43 #345472 by spumco
REMAP: gang lathe tool orientation was created by spumco
Learning how to actually operate the lathe I built, and I've confused myself over tool orientation.

Gang-tool lathe, with front and back tools.  Defined in INI as a back tool lathe, but that can change if needed.

I use Fusion for CAM, and the standard LCNC post for fusion.  The post handles front/back tool orientation by setting the 'turret' value in the F360 tool library to 103 or 104.  When the post sees a '103' for the turret, it outputs all X-moves with negative values.  Opposite for '104'.

While this results in appropriate tool motion, the LCNC backplot is wrong, kinda.  The toolpaths are appropriately displayed as negative X (below centerline), but the tool tip indicator is approaching across the centerline - looks kinda crashy.

Having researched the forum a while back about gang-tool lathes, I found the 'trick' about using G10 to rotate the WCS 180 degrees around Z for back tools.  So I've got a couple M-codes to do just that - flip back and forth between back and front tool views.

Caught me off guard the first time I flipped the X axis and jogs were backwards.  I somehow thought it was just the display/backplot that rotated...

But that got me thinking about the point of this long-winded post.  Can I use the lathe tool orientation value (parameter #5413) to drive the M-code WCS flip during a tool change?  And leave all tools as 'front turret' in F360 so the post only outputs X positive numbers?

I've got a lathe-fanucy test config on deck (remap T) for testing.  Maybe add a conditional check for the value of #5413?  Something like:
O<toolchange> sub
(debug, Tool requested = #<tool>)
#<wear> = [10000 + FIX[ #<tool>  / 100]]
#<tool> = [#<tool> MOD 100]
M6 T#<tool>
G43 H#<tool>
O100 IF [#<wear> GT 10000]
    G43.2 H#<wear>
O100 ENDIF
#<pocket> = #<tool>

(NEW WCS FLIP HERE - M268=FRONT, M269=BACK)
O101 IF [#5413 LT 1]
   (abort, tool missing orientation value)
O101 ELSEIF [#5413 EQ 1]
   M268
O101 ELSEIF [#5413 EQ 2]
   M268
O101 ELSEIF [#5413 EQ 6]
   M268
O101 ELSE
   M269
O101 ENDIF
(END WCS FLIP HERE)

(debug, tool = #<tool> wear = #<wear>)
O<toolchange> endsub [0]

Anyone see any holes in my theory or suggestions for improvement?

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

Time to create page: 0.054 seconds
Powered by Kunena Forum