Discrete ManufacturingFree generatorPDF, Excel, Word exportMachining

Fanuc G83 Peck Drilling Cycle Code Generator for CNC Mills

G83 is the standard peck drilling cycle for deep holes on Fanuc style mills and machining centers. This generator builds the full block, with tool call, coolant and cancel code, from your hole data.

Fill in

Generated code
Download:

Fanuc G83 peck drilling program

O2083 (DRILL 8.5 MM X 40 DEEP)
G21 G17 G40 G49 G80 G90
T5 M06
G54 G00 X25.0 Y40.0
G43 H5 Z50.0
S3000 M03
M08
G98 G83 X25.0 Y40.0 Z-42.5 R2.0 Q4.0 F300
(ADD MORE HOLES HERE AS X Y ONLY)
G80
M09
G91 G28 Z0
G90
M05
M30

Address reference

Z-42.5 is the final hole depth, R2.0 is the rapid plane above the part, Q4.0 is the depth of each peck, and F300 is the feed. G98 chooses whether the tool returns to the initial plane (G98) or the R plane (G99) between holes. G80 cancels the canned cycle.

Check the code against your control manual: some controls need Q as a positive value without a decimal, and Haas uses G83 with an optional I, J, K set for variable peck. For through-spindle coolant, use the M code defined by your machine builder. Include the point length in the depth if the hole must be full diameter to the bottom.

Version control for NC programs

Optional: we can show how to tie NC program revisions to routings and work orders in your ERP.

Optional. The tool and every export work without this. No spam.

How to use the generator

Enter the hole position, the final depth (a negative Z in the work coordinate system), the R plane just above the part and the peck depth Q. Set the spindle speed and feed from your tooling data. If you have several holes, copy the generated G83 line and keep only X and Y on the following lines, because the cycle stays active until G80. Paste the block into your editor and review before running.

  • R plane is usually 2 to 5 mm above the part surface.
  • Q is the depth of each peck, not the total depth.
  • G80 must cancel the cycle before any other movement.

How G83 works

G83 drills to the first peck depth, then retracts fully to the R plane to clear chips and let coolant reach the bottom of the hole, then rapids back to just above the last depth and drills the next peck. This full retract is the difference from G73, which only pulls back a small distance to break the chip. G83 is slower but safer for deep holes in sticky material such as stainless or aluminium, where chips pack the flutes.

Worked example

For an 8.5 mm drill and a 40 mm deep hole, the drill point adds roughly 0.3 times the diameter, or about 2.5 mm, so a Z of minus 42.5 gives full diameter to 40 mm. At 3000 rpm and a feed of 0.1 mm per rev, the feed is 300 mm per minute. A peck of 4 mm, about half the drill diameter, is a common starting point for a hole depth of 4 to 5 times the diameter.

Common mistakes

Frequent errors are forgetting G80 so the next move drills a hole, leaving G98 on and plunging into a clamp, setting the R plane below the part surface and rubbing the feed, and ignoring the point length. Always dry run on a spare vice, and check that tool length offsets are active with G43 before the first G83. Log the peck and feed in the setup sheet so the next operator can tune them.

Frequently Asked Questions

What is the difference between G83 and G73?

G83 retracts fully to the R plane between pecks to evacuate chips. G73 only retracts a small amount to break the chip. Use G83 for deep holes and sticky chips, and G73 for shallower holes where speed matters more.

What does Q mean in G83?

Q is the depth of each peck, the distance the drill advances before it retracts. It is a positive number in the work coordinate system units and does not include the sign of the final Z.

What is the difference between G98 and G99?

G98 returns the tool to the initial plane after each hole, which clears clamps and fixtures. G99 returns only to the R plane, which saves time when moving between holes on a flat surface.

How deep should I peck?

A common starting point is 0.5 to 1 times the drill diameter per peck for holes deeper than three diameters, going shallower in stainless or when chips pack. Through-coolant drills often run much deeper pecks or none.

If your drilling parameters are scattered across setup sheets, Netray can help you store and version NC programs and tooling data alongside the routing in your ERP.