Learn · 7 min
Canned cycles G81–G89
A canned cycle packs a whole hole into one block, rapid to R, feed to Z and out, and each further hole is just its X and Y until G80.
One line per hole
A canned cycle packs a whole hole into one block: rapid to the R plane, feed to Z, do something at the bottom, come back out. After the first hole, each further hole is just its X and Y. G80 ends the cycle; leave it out and the next X Y move drills another hole.
R is the plane just above the part where feeding starts. The initial plane is the Z the tool was at before the cycle. Between holes, G99 returns only to R (fast, for flat plate) and G98 returns to the initial plane (to clear clamps and steps).
G81 to G89 at a glance
G81 feeds in and rapids out: spot drills and shallow holes. G82 is G81 with a dwell P at the bottom, for spot faces and counterbores. G83 pecks and pulls out to R after every peck to clear the chips. G73 pecks with only a short back-off to break the chip.
G84 taps: it reverses the spindle at the bottom and feeds out; G74 is the same for a left-hand tap. G85 feeds in and feeds back out, for boring and reaming, so a rapid retract doesn’t mark the wall. G86 stops the spindle at the bottom and rapids out, which can leave a drag line. G89 is G85 with a dwell.
The words differ by control: Haas takes I, J and K for pecks that shrink, Mach4 takes its dwell in milliseconds, and LinuxCNC’s G84 is for a floating holder. Each cycle’s page shows its control’s own list.
When to peck
The drilling calculator’s rule is to drill straight to 3×D and peck past it: G83 for HSS and cobalt drills, G73 for solid carbide. Carbide with coolant through the drill goes straight to 8×D, and indexable drills never peck.
Count pecks from the R plane, not the top of the part: from R0.1 to Z-1.5 at Q0.25 is 1.6 ÷ 0.25 = 6.4, so 7 pecks. Without your drill maker’s figure, a peck of 1×D is the usual start.
Rigid and floating tapping
A tap moves one pitch every turn, so the feed must match the spindle: F = RPM × pitch in G94, or the pitch itself in G95. A 1/4-20 tap at 500 RPM feeds 500 × 0.05 = 25 in/min.
Rigid tapping locks the axis to the spindle so the tap sits in a solid holder: G84 on a Haas, G84.2 on Mach4, G33.1 on LinuxCNC, and M29 then G84 on Fanuc as published copies print it. A floating (tension/compression) holder lets the tap move a little, for machines that can’t keep the two in step.
Try it on a calculator
- Peck drilling program generator — A G81, G73 or G83 program for your holes in Haas, LinuxCNC or Mach4 syntax: the cycle by depth and drill, Q and the peck count from the R plane.
- Tapping cycle program generator — A rigid or floating tapping program for any UN or metric thread: F = RPM × pitch in G94 or the pitch in G95, and the right code on Haas, LinuxCNC, Mach4, Mach3 or Fanuc.
- Drilling speeds and feeds calculator — Drill, material and depth to RPM, feed, G81/G73/G83 and Z past the point.
Check yourself: 5 questions
Check yourself
0 of 5 answered