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.

More
17 Apr 2026 19:06 #345650 by andypugh
Replied by andypugh on topic REMAP: gang lathe tool orientation
You might have problems with tool radius compensation if you use the orientation, but only if you are doing compensation in the control rather than in the CAM.
So, basically, as a purely graphical fix, it will probably work.
You will need to have different orientations in the CAM tool table and the control tool table, but there is no auto-synching anyway, so that's not a problem.
The following user(s) said Thank You: spumco

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

More
19 Apr 2026 04:54 #345715 by spumco
Replied by spumco on topic REMAP: gang lathe tool orientation
Well, that works nicely with only a minor issue remaining.

Backplot display now follows actual tool orientation, according to the orientation value in the tool table.  Had to swap the orientation M-codes; was confused until I remembered I have the configuration set to BACKTOOL in the INI file (X is up/away).

What's a little odd is that rotating the WCS doesn't alter jog direction on the handwheel.  X+ moves the table up/away, and X- moves the table down/towards the operator regardless of the WCS flip.

Remaining Issue: Something is off in the remap or toolchange.ngc, because G43 isn't automatically applied despite being in the .ngc file.  G43 works in the lathe-fanucy sim, but not on mine for some reason.

Down-facing "normal" tool - T5:
 

Up-facing "back" tool - T2
 
 
Attachments:

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

More
19 Apr 2026 05:05 #345716 by spumco
Replied by spumco on topic REMAP: gang lathe tool orientation

You will need to have different orientations in the CAM tool table and the control tool table, but there is no auto-synching anyway, so that's not a problem.
 


Not that I can tell.

I set all tools to "turret 104" - i.e. back-tools - in Fusion, and make sure all tools are oriented the same way.  Fusion simulation always shows the tool above the part.  I just have to make sure spindle direction is appropriate for the particular tool.

The tool orientation value isn't passed from Fusion to the post, so the 'flip' only happens in LCNC.

I've not tested Fusion's 'turn below center' setting yet, so that behavior and post output remains to be seen.  I think if you select an OD boring tool and create an ID turning toolpath it will automatically reverse the spindle direction and output negative-X values.  Would be rather user-friendly if it works as advertised...

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

More
19 Apr 2026 15:27 #345738 by spumco
Replied by spumco on topic REMAP: gang lathe tool orientation
Tested F360's' "turn below center" feature and it seems to work quite well with the standard LCNC post.

Example:
  • Tool is a 'back' tool, but on my backtool-defined lathe the tool is pointing away from the operator (up).
  • Tool defined in F360 as 'normal' orientation, i.e. tip down.  F360 defaults to a slant-bed turret lathe, so X+ is up in the simulation.
  • Tool set to 'turret 104' for post 'gang-tool on X+ turret'
OP1 OD turning looks good:
Warning: Spoiler!

 


OP2 ID turning, with 'turn in negative X' enabled:
Warning: Spoiler!

 

Tool is set in the LCNC tool table with orientation as T2 (earlier post), so the backplot looks like reality with the WCS rotation M-code.

It seems like this workflow and post means I don't have to set up different tools in the same library for multi-function ID/OD tools.  Nice.
 
Attachments:

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

More
19 Apr 2026 16:29 #345741 by andypugh
Replied by andypugh on topic REMAP: gang lathe tool orientation
I am surprised that you have tool cones and not lathe tool shapes in the graphics. You should have a reasonably accurate picture of an insert.
You may need to set up frontangle and backangle in the LinuxCNC tool table for that to work, as well as the orientation.
The following user(s) said Thank You: spumco

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

More
19 Apr 2026 17:54 - 19 Apr 2026 17:57 #345743 by spumco
Replied by spumco on topic REMAP: gang lathe tool orientation
I set up front and back angles, but it needed diameter to start displaying the inset shape.

However... it's displaying the tool tip past centerline when the tool is at X0.  I tried fiddling with the table angles (-87 & -32 vs 342.5 & 287.5) and it didn't make a difference.

Same display issue when the WCS rotation is in effect.

Below photos has tool #2 active.

 
Attachments:
Last edit: 19 Apr 2026 17:57 by spumco. Reason: angle maths

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

Time to create page: 0.150 seconds
Powered by Kunena Forum