How Canned Cycles Work with G98 & G99 - Haas Automation Tip of the Day
3 Video Views·Jun 7, 2026
Today, Mark explains canned cycles and tells you everything you need to know about how they function on your Haas machine. You'll also learn about clearance planes (“R” planes) and G98/G99.
Here is the updated link to the bonus content:
https://www.haascnc.com/video/Video-B...
Don't miss any "TIP OF THE DAY" videos. Click here (http://ow.ly/s28l30mTiUo) to join our email list!
If you enjoyed this video, please hit the like button and share it with a friend who'll find it helpful . . . and thanks!
Follow Haas:
Facebook – / haasautomati. .
Instagram – / haas_automa. .
Twitter – / haas_automation
AI Generated·May contain errors
Hello and welcome to this Haas tip of the day. My name is Mark and right now we're going to look at
our G98, G99 can cycle clearance planes. With these we're going to avoid wasting time by
cutting air and we're also going to avoid running into stuff. Now I have this sample part clamped
to the table. We've milled it in half, a cross-section view, so we can see our four holes,
our two clamps, and our one inch deep pocket and we should be all set. It's about time to
hit cycle start. Wait, were those clamps there when I wrote the program? Those clamps are fine.
Whoa, that was cool. I mean that was horrible. Clearly my drill has a problem with those clamps.
Now we're going to have to program that drill to go up and over the clamps and to do that we're
going to use a G98 and a G99 code. But before we can fix our clamp problem we need a basic
understanding of our can cycles. To do this we're going to unpack the code at the whiteboard.
Well here's our program. Now our can cycle starts with our G81 line and goes all the way until we
cancel it with the G80. Just prior to our can cycle we positioned our z-axis. Now the control
is going to store that value as our z starting position. Just lock that value in your memory for
a minute we'll come right back to it. With our can cycles the control is going to move in four
very predictable ways. One, it's going to position our xy location. Two, the tool is going to rapid
from the z value where it was at to our r plane r.1. Three, our tool is going to feed to our z depth
and after it's drilled the hole it's going to wrap it back up to our clearance plane.
But where is this? Well we have two options. We can either use a G98 or a G99. Now if we use a G98
the tool after it's done drilling the hole is going to wrap it back up to
that z starting position that we talked about earlier. If we use a G99 that tool is going to
wrap it back to our r plane. To recap the control is going to use the same order of operations for
all these holes. One, two, three, four. First, it's going to position the xy. Second, it's going
to wrap it to the r plane. Third, it's going to feed to our z depth. And fourth, it's going to
either wrap it back to our z starting position if a G98 was commanded or it's going to wrap it back
to our r plane if a G99 was commanded. Now it's worth noting that G98 is used by the control
by default. So even though we haven't commanded a G98 we're still using it. Well now that we've
covered the basics of our can cycles we can come back and address those clamps. One, two, three,
four. Our drill actually drilled the hole that was step three. Step four, because we were using a G98
means that the tool is going to wrap it back to that z starting position. What was our z starting
position? Z 0.5. Wait a second, our clamps are like an inch off the part. That z starting position
isn't high enough. If we change that z 0.5 to a z 2.0 our tool should be able to hop up and over.
Let me change the drill and we'll take a look and see how it does. Well we've altered our program
and now our tool is hopping up and over our clamps and returns to that same z 2.0 starting
position after each drilled hole. Well that worked great. We dodged those clamps and we didn't break
our tool but we wasted a lot of time cutting air on those last two holes. We're better than that.
Well let's get this program ready for production and tighten up those clearance planes. Now we've
made some changes to our whiteboard. We changed our z 0.5 to z 2.0 and we also wrote in that
implicit G98. The first line here is our first hole. It ran pretty good. At the end of that hole
it retracted two inches above the part which cleared that clamp that was resting in between
holes one and two. So now we're ready for hole two. Now this second hole is going to go through the
same normal order of operations. When it's done drilling the hole it's going to retract but
there's no longer a reason to go two inches above the part. We've already cleared the clamp. So from
here on out we're going to use a G99. When it's done drilling it's going to retract to this R.1
value. Perfect. For holes three and four we're going to do something a little different. These
holes are special. They're actually sitting at the bottom of a one inch deep pocket. If we feed
all the way from 0.1 inch above the part we're going to be cutting a lot of air. So we're going
to change our R plane to R minus 0.9. This is going to fit the part perfectly. Now some of you
might be asking why did I change my rapid plane instead of my Z starting position? Well we can
only set our Z start position once per can cycle prior to entering that can cycle. Once we're going
line by line, hole by hole, we can only change it from a G98 to a G99 or change our R value. Let's
go ahead and make a change to our code and watch the program run. So we're using a G98 with a Z
start point of two inches so it pops over that first clamp and then we use an R plane of minus
0.9 for those third and fourth holes so we avoid cutting air. Well we did it. Our tools are now
hopping up and over clamps and diving efficiently into pockets. Now you're ready to try this on your
own programs but before you do be sure to move your tool and work offsets well off the part
until you've proven your programs. Today's program is available by clicking on the bonus content
at the end of this video. That's it and thanks for watching this Haas Tip of the Day.

