Haas Mill G83 Peck Drilling Cycle: Q, I, J, K and G98/G99

28 November 2026

Mentor CNC Editorial Team

G83 is the Haas mill canned cycle for drilling deep holes in pecks. The drill feeds down a set depth, rapids up to the R plane to clear chips, comes back in and repeats until it reaches Z depth. The manual recommends peck drilling for holes deeper than three times the drill diameter. For drilling cycles in general: CNC milling drilling cycles.

Quick reference: how to write a Haas G83

G83 G99 Z-40. Q6. R2. F150.          (constant peck)
G83 G99 Z-40. I8. J1. K3. R2. F150.  (reducing peck)

Addresses on the G83 line

AddressMeaning
X, YHole position (optional; while the cycle is active every new X-Y drills a hole)
ZHole depth, fed from the R plane
QConstant peck depth (when I, J, K are not used)
IFirst peck depth (when Q is not used)
JAmount each following peck is reduced by
KMinimum peck depth
PDwell at the bottom (optional)
RR plane, where rapid ends and feed starts
FFeed rate

Do not use Q together with I, J, K. The manual states this explicitly.

How does constant pecking with Q work?

Haas G83 normal peck drilling with Q
G83 with Q: each peck drills Q deep, the drill rapids to the R plane and restarts the feed a Setting 22 distance above the previous depth. (Image: Haas Automation Mill Programming Workbook)

The drill cuts Q deep on each peck, rapids up to the R plane, rapids back down to just above the previous peck depth and feeds on. That clearance above the previous depth is set by Setting 22.

When should you use I, J, K reducing pecks?

Haas G83 reducing peck drilling with I J K
G83 with I, J, K: the first peck is I, each following peck is reduced by J, and none is smaller than K. (Image: Haas Automation Mill Programming Workbook)

Chip evacuation gets harder as the hole gets deeper, so shorter pecks are wanted near the bottom. With I-J-K, the first peck is I, each following peck is J shorter, and no peck is smaller than K. The manual says the first peck (I) should usually be about one tool diameter.

What is the difference between G98 and G99?

Haas canned cycle G98 and G99 return planes
Left, G98: return to the initial start point after each hole. Right, G99: return to the R plane. (Image: Haas Automation Mill Programming Workbook)
  • G98: after each hole, Z returns to the initial height it had before the cycle was defined. Use it when clamps or steps lie between holes.
  • G99: Z returns to the R plane. It saves time when the path is clear.

You can switch G98/G99 while the cycle is active; the new choice applies to all following holes.

Settings that affect G83

SettingWhat it does
22 Can Cycle Delta ZHow far above the previous depth the drill restarts the feed (the retract amount in G73)
52 G83 Retract Above RHow far above the R plane the drill retracts to clear chips, so the R plane can stay close to the part
28 Can Cycle Act w/o X/YWhen on, the cycle drills a hole even if the defining block has no X-Y
57 Exact Stop Canned X-YWhen on, the X-Y move between holes always comes to an exact stop

The setting descriptions come from the Haas workbook and the NGC manual settings list; check the values on your machine’s Settings page.

Metric sample program

%
O02001 (HAAS G83 SAMPLE - DIMENSIONS ARE EXAMPLES)
(G54 X0 Y0 LOWER LEFT CORNER, Z0 TOP FACE)
(T5 = 8.5 MM DRILL, SETTING 9 = MM)
T5 M06
G00 G90 G17 G40 G49 G54
X20. Y20.
S1800 M03
G43 H05 Z25. M08
G83 G99 Z-40. Q6. R2. F150.
X60.
Y50.
X20.
G80 G00 Z25. M09
G53 G49 Z0. M05
M30
%
BlockExplanation
G43 H05 Z25.Tool length compensation; initial height Z25
G83 G99 Z-40. Q6. R2. F150.40 mm deep hole at X20 Y20; 6 mm pecks, R plane at Z2
X60. / Y50. / X20.Cycle active; the same hole is drilled at each new position, returning to the R plane in between
G80Cancels the cycle (G00 or G01 also cancel it)

A 40 mm hole with an 8.5 mm drill is about 4.7 times the diameter, within the range where the manual recommends pecking. Speed and feed are example values; take them from the tool maker’s catalog.

Common mistakes

  • Writing Q and I-J-K on the same line.
  • Setting the R plane too high: the drill feeds through air on every peck. Setting 52 exists for this.
  • Using G99 with obstacles between holes: the tool travels at R height and can hit a clamp.
  • Forgetting G80: the cycle stays active and the next X-Y move drills an unwanted hole.

FAQ

What is the difference between G83 and G73?

G73 is high-speed peck drilling: the drill does not return to the R plane on each peck, it backs off by the Setting 22 amount. G83 returns to the R plane on every peck and clears chips better.

Can I define the cycle without drilling at the current position?

Yes. Put L0 on the cycle line and no hole is drilled there; the control waits for the next X-Y position. This is used with bolt hole patterns: Haas G70, G71, G72 bolt hole patterns.

Safety notice and disclaimer

The program on this page is a training example and its dimensions are for illustration. Before running it on your machine, check the tool and work offsets, prove it out in graphics and run the first part in single block with reduced feed and rapid override. The same code can behave differently on different controls and software versions; the Haas operator’s manual always takes priority. Mentor CNC cannot be held responsible for damage or injury arising from the use of this information.

Mentor CNC logo

MENTOR CNC
CNC knowledge from the shop floor

Mentor CNC turns hands-on shop-floor experience in CNC turning, CNC milling, CNC controls, cutting tools and engineering calculations into clear, practical technical content.

Our goal is to help operators, students, engineers and shop owners reach accurate information faster and make safer, more efficient decisions in production.