G76 canned cycle

While UCCNC does not currently have a TURN Modual Here is the place to discuss your wants and wishes for TURN

G76 canned cycle

Postby Chlluk » Tue Jan 26, 2021 10:22 am

i have recently added an incremental 3 port encoder to my UCCNC controlled lathe. I have tried G33 (single line screwcutting) and all is fine.
I cannot get G76 to work at all. I have followed the format in the user guide for the parameter layout but still no joy.
Does anyone have a working gcode program in metric that i can try on my machine.
I note a large number of people have problems with this on internet blog sites.
Posts: 2
Joined: Tue Jan 26, 2021 10:08 am

Re: G76 canned cycle

Postby eabrust » Wed Jan 27, 2021 1:21 am

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.

UC Lathe Thread Calc.xlsx
(20.28 KiB) Downloaded 20 times

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
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
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

CraftyCNC: Plugins for UCCNC (and other neat stuff): http://www.craftycnc.com/plugins-for-uccnc/
Posts: 206
Joined: Fri Sep 16, 2016 2:32 am
Location: Near Shirland IL, USA

Re: G76 canned cycle

Postby Chlluk » Wed Jan 27, 2021 10:51 am

First Class
G76 now works. Reduced speed to 800, and noticed the use of the pause command . Have varied the necersary values and noticed the changes taking place. A big step forward.
Posts: 2
Joined: Tue Jan 26, 2021 10:08 am

Re: G76 canned cycle

Postby cncdrive » Wed Jan 27, 2021 12:48 pm


If the spindle speed reduction solved the problem then the issue is that the index signal is too short.
The higher the spindle RPM the shorter the index pulse is and there can be a speed point where the index signal is no more recognised by the controller,
because the pulse becomes too short for the controller to detect.
The index signal should be 20 microsec or longer.

If this is the problem and if you want to use higher spindle RPM then you will have to use a different index signal or have to get/make a pulse widening circuit.
Site Admin
Posts: 3626
Joined: Tue Aug 12, 2014 11:17 pm

Return to UCCNC TURN (CNC Lathe)

Who is online

Users browsing this forum: No registered users and 1 guest