How to Manually Program a Grooving Cycle on a CNC Lathe!

Machine & Design
2 followers
2 Video Views·Apr 26, 2026
In the 5th video in this series, Marc Cronin, aka @GCodeTutor manually programs a grooving cycle using two methods: point-to-point programming and by using a grooving cycle.
Hello, my name is Mark and I am G-Code Tutor and I'm here with Practical Machinist to continue this programming of a
part on a lathe. Now this lesson we're going to look at grooving and the grooving cycle.
Now before we start I'd like to remind you you should never type in a program you find online
to your machine and that includes my programs and this is because I teach a generic version of G-Code
but each machine can be slightly different and
the parameters on each machine can change the way G-Code works in each individual machine. So just be aware of that.
Okay, so we're going to start off this lesson by looking at the first line of G-Code,
N3 groove. So groove is our operator's note.
It tells the operator what this sequence is all about and N3 is our search number that I talk about a lot.
It's my way to find each section of the program when I'm using the search function on the Bannock controls.
Okay, so the next line up here is our safety line. Now I talk about this in great depth in previous videos.
So if you want to know more about this safety line,
I have a complete video with Practical Machinist on this subject and I also have a
description of our safety line there in the roughing sequence in this series of videos here.
Okay, so now we're going to switch over to our tool 3.
So this is the tool that I keep my grooving tool in and
we're pulling in tool data from number 3 in the datum table also.
So this sets our tool to tool 3 and offsets to tool 3 also and M6 is our tool change position.
That's going to rotate the turret and bring our tool into the center line.
So we're using a 0.1 of an inch grooving tool for this and you'll see why in a minute. Okay, so the next line here
we're using a speed clamp again because I'm going to be using G96, our
constant surface cutting speed. So our speed clamp, G50, sets the machine so it won't exceed this RPM.
So our spindle's never going to go above 2000 RPM.
So G96 sets our constant surface cutting speed and M03 there
turns the spindle on in a clockwise direction. If we got our tools loaded upside down, like quite often we do in lathes,
we might need M04.
Okay, so G00, our first rapid move. So we're rapid it in to 2.1 inches in diameter.
So that's bigger than our stock bar size and we've got 0.1 of an inch off the front face there.
So we're not going anywhere near any material.
We're bringing our tool into a good position to start machining and M08 turns on our coolant.
Now I like to turn on the coolant at this point.
There is nothing written in stone where you need to turn on the coolant
but I will suggest you turn it on before you start removing material. And our next line is another rapid move.
Now we could have omitted the G00 here because it's still active from the line above or we can add it.
It makes no difference to the program and the machine will like it either way.
So this first rapid move here is I'm rapid in to the position of our
groove there at the end of the thread. So we're using a 0.1 tool and the groove is 0.1.
So we're going to do this point-to-point this first groove and we're going to use a grooving cycle on the second groove.
So point-to-point we're already in position on Z and then we're going to switch over to G01 to give ourselves a feed rate
so we can start removing material. And we're going to feed all the way down to
0.562 that's 0.562 of an inch and we're coming down at
0.005 per RPM on that feed rate there. So a nice steady feed in. Now we've already removed material from the profile.
So if time is a problem, if your boss is on your back about making this program as quick as possible
we could have used a rapid move to cover some of that distance and then start feeding in when we get nearer the material.
I'm switching back over to G00 again to rapid back out to a safe working distance on that diameter.
So once that groove is machined we can then rapid back out.
So the beauty of putting a groove at the back of a thread like this is we don't have to worry about run out on
the thread. We know that a bolt is going to screw up flat against that one inch diameter there as
we screw anything onto this screw thread because that grooves there
so the threads not going to be tapered at the end so we can get a nice tight fit and
use that full length of the thread when we're screwing
something onto this thread.
Still in rapid mode, we're now going to move our cutter to the start position of the second groove. Now this groove
I'm going to do a little bit differently. We're going to be using a grooving cycle this time.
Now there's two different types of grooving cycles.
There's a single line version and the two line version. The same is screw cutting and roughing. Now
modern machines tend to use two line version
but not always so you need to check in your operator's manual to see which version your machine takes.
So I'm going to do a demonstration of the two line version here.
So G75 tells the machine that we are going to be using a grooving cycle and
our R value here is our retract amount after each peck. It works a bit like a pecking cycle with a drill.
It's going to retract a little bit and then it's going to go back in and put pressure on and start machining again.
So this is used to break the swarf so we don't end up with really long strings of swarf in the machine
doing all sorts of damage there. So this is used as a swarf breaker
to break that long swarf as it's coming off the groove.
So our second G75 line has a bit more information here. So let's go over what this information does.
So we're going to start off with our X and that is the final depth of our groove.
So that's the size that we're going to go to once the groove is complete.
Our Z position here is the final depth in Z of our groove.
So you can see how our groove is a little bit wider than our tool. We've got a 1.56
groove here and our tool's only 0.1.
So we need to edge over a little bit and that's what the grooving cycle does.
Now we can also change the peck size, the peck amount.
So if we're in metric, this would be in microns. If we're in imperial, it's thousandths of an inch usually.
That means we don't use a decimal point in the P and Q values here.
Now our Q value is the step over distance using the same format.
So this tells us how far our tool is going to step over to make that groove wider.
And finally there we have a feed rate so we can control the speed of that tool as we're removing material.
So that's all the information we need in a grooving cycle to be able to produce this groove.
So once the grooves been produced we can then wrap it back up to a safe working distance again.
So for that I'm using G00 and then coming up to 2.1 inches to give us a bit of clearance from that
stock bar size there.
So this next line G53 sets our machine datum.
So then we're working from a different datum. Before we were working from our G54 datum
which is set at the front face of the part. G53 is our machine datum.
So if we set our X and Z positions here, we're going back to our tool change position usually.
So we tend to have the machine datum zeroed at our tool change position. Again,
this is setting the parameters your machine may be different.
So you should always be aware of how your machine works when you're looking at someone else's code.
And now we're going to turn off the coolant here with M09.
So as the tool is going back to its tool change position the coolant stops and
that gives us chance to look in the machine and see what's going on to make sure everything is safe.
So M05 will stop our spindle and then G97 puts us back into RPM mode as far as our spindle is concerned.
So now we're back into G97. We're controlling the spindle speed directly and not calculating it from our surface size.
And finally, I finish off all my sequences with an M01.
So we can stop the machine using an optional stop if we wish to check the part and make sure everything is correct.
Now if you want to know more about grooving cycles and turning or
G-code programming, CAD CAM, machine shop maths, I have a range of courses over on my website at gcodetutor.com
where you can learn all this stuff with loads of free articles and some paid courses.
