Drilling by hand in a program is tedious: approach, feed down, come back up, move to the next hole, repeat. Five lines per hole. Canned cycles do all of that with a single line, and from then on you only have to give coordinates to repeat it.
How a canned cycle works
When you program a cycle, the machine memorises the complete movement. From then on, every new X or Y coordinate you write runs the whole cycle at that point. That is why the program comes out so short, and why you have to remember to cancel it.
Two parameters appear in all of them:
- R — the retract plane. The height the tool positions at before feeding down, and the one it returns to between holes. Set it a couple of millimetres above the part.
- Z — the final depth of the hole, measured from the work offset.
G81 — Simple drilling
Feeds down to Z and comes back up. For shallow holes, up to about three times the drill diameter.
G81 Z-12. R2. F150 X75. Y30. X75. Y60. G80
Three lines, three identical holes, and the G80 that closes it.
G82 — Drilling with a dwell
The same as G81 but it pauses for a moment at the bottom before retracting, with the P parameter in milliseconds. That dead time cleans up the bottom and improves the finish.
G82 Z-6. R2. P300 F120
Used for counterbores, flat-bottomed pockets and whenever the bottom of the hole has to come out clean.
G83 — Deep drilling with full peck
The important one. It feeds down an amount Q, retracts all the way to the R plane to clear the chip, feeds down again and repeats until the final depth.
G83 Z-45. Q6. R2. F120
Pecks of 6 mm each, with a full retract. It is slow, but it is what stops the drill seizing on its own chip and snapping. Past three diameters of depth, peck.
G73 — Short peck (chip breaking)
Like G83 but the retract is minimal, just enough to break the chip, without leaving the hole. Much faster, but it clears chips less well.
G73 Z-30. Q5. R2. F140
Good in short-chipping materials and at medium depths. In stainless, or in very deep holes, use G83.
Which one to use
- Up to 3 diameters deep: G81.
- A bottom that has to come out clean, or a counterbore: G82.
- 3 to 5 diameters, ductile material: G73.
- More than 5 diameters, or stainless, or chips that will not clear: G83.
The same three mistakes every time
Not cancelling with G80. The cycle stays active, and the next move you program to position yourself drills. It is the number-one failure with canned cycles and it shows up in simulation as holes where you never drew any.
An R plane below something. If there is a clamp, a stop or a taller part between two holes, retracting to the R plane will not clear it. With obstacles in the way, use a high R or reposition manually.
Too large a Q. Pecking 15 mm at a time with a 6 mm drill is not pecking: the chip still does not come out. As a rule of thumb, Q between half a diameter and one diameter.
Before the cycle, the spot drill
A drill with no guide wanders as it enters, above all on an irregular or sloping surface. A spot drill or a centre drill before the hole saves you off-centre holes. It is one more tool and thirty seconds of program, and the difference in positional accuracy is plain to see.
If you want to see a canned cycle inside a complete program, reading a real program line by line has one annotated with its G81 and its G80.
Need a part machined? The directory of Spanish machine shops lists more than 700 workshops across Spain with their processes, materials and certifications verified, filterable by province. And if you are learning, the CNC Path takes you from G-code to your first part.