Hi Clive,
It took me a bit of head scratching to pickup G76 in UCCNC (sim to LinuxCNC), as I had used Mach3 for Lathe prior and its different.
I wound up creating the attached calculator in Excel to get me in the ball park, and from there I would tweak the I, J, K values on either the male or female thread till I was happy with the fit. So in the end, my actual GCode is slightly off of calculated values based on starting with thread chart data...
First, a few warnings for you:
-- I am not a pro at lathe GCode, and by no means is there zero chance I have not made a mistake in what I tell you
-- I work in SI inch units, but I did make a page and attempted to convert it to metric for you.
-- I work in DIAMETER mode, the values and GCode sample is based on diameter mode. even thread depth K, depth per pass J, and the I offset value are a 'diameter'. If you work in radius, cut everything in half.
-- In the code I run on my part, I set the Q value to 0 instead of 29 (I'm machining Delrin in this example, and I was happier with the finish plunging straight in instead of at tooth leadin angle)
-- The biggest hiccup I think I ran into was making sure to set the I value to a negative number for OD threads, and setting I to a positive value for ID threads. Evey thing else is positive.
-- Calculate a comfortable drive line diameter to start from, and make sure you move to that diameter before starting your G76.
And here is some sample chunks of a Gcode file (WARNING: DIAMETER MODE AND INCH UNITS, for a slightly modified .875-20 thread) :
OD Male Thread:
- Code: Select all
M6 T0505 (M6 THREADING TOOL 5)
G0 X2 Z4
G00 X0.925
G00 Z1.75
G00 X0.986 (driveline x0.986, UC uses this diam to set clearance for return)
M03 S800
G4 P2
M08
G76 P.05 Z1.365 I-.116 J.020 K.070 E0 L0 Q0 H3
ID Female thread:
- Code: Select all
M6 T1111 (ID M6 THreading tool 11 )
G00 X2 Z2.5
G00 X0.7
G00 Z1.1
G00 X0.710 (Driveline 0.710, this diam becomes the clearance)
M03 S800
G76 P.05 Z0.590 I0.112 J.020 K.060 E0 L0 Q0 H3
Good luck
Eric