Quick Guide to the G83 CNC Code [Peck Drilling]

a graphic of a cnc machine with text that says learn g code today G83 peck drilling cycle

G83 is a modal command that sets the CNC machine to run a peck drilling cycle.

The practice of peck drilling refers to drilling a hole in a series of steps (pecks) instead of drilling the complete depth of the hole in a single pass.

Want to learn more about CNC G Code?

Differences between peck drilling and standard drilling

The main difference between peck and standard drilling is that the peck drilling process removes the material in multiple steps, while standard drilling is a one-step process.

Both commands are intended to make holes, but the peck drilling cycle allows more control over how the hole is drilled.

illustration that shows the difference between peck drilling and standard drilling in a CNC machine

Peck drilling is the first option for CNC programmers when making blind holes. The pecking process helps break chips as well as remove them and any other debris from the hole during the drilling process.

Trouble removing chips from the hole when drilling can cause size and/or surface finish issues.

Standard drilling is far more common when dealing with simple through (thru) holes.

When to use a G83 code?

When you need to drill deep holes in a workpiece, that would need more than one step to avoid jamming or tool breakage.

G83 is especially useful for drilling blind holes when you want to achieve a clean finish.

When not to use a G83 code?

If you want to make a shallow hole, you won’t probably need the G83 code.

There is no need for the tool to take on several pecks if the depth of the hole is less than an inch (depending on the material and tool).

The G83 command works best when you follow a general rule: if the depth of the hole is 3 to 4 times greater than its diameter, use G83. 

G83 code format

The format for using a G83 command is shown below:

G98 (or G99) G83 X2.0 Y3.0 R1.0 Z-5.0 Q1.0 F25.0

It would be easy to assume that the Z location is the location of the start of the hole. In reality, it is the Z location for the bottom of the hole drilling movement.

Keep in mind that the X and Y coordinates of the hole are not usually in the same line as the G81 command.

In most programs you will see the G81 code in this format:

X2.0 Y3.0

G98 G83 R1.0 Z-5.0 Q1.0 F25.0

The program first identifies the coordinates of the hole and then starts the drilling process.

Parameters used with a G83 code

  • F – Feedrate
  • R – Position of the R plane (clearance level)
  • X – Hole position in X-Axis
  • Y – Hole position in Y-Axis
  • Z – Position of the Z Axis at the bottom of hole
  • Q – Depth to increase on each depth
  • P – Dwell time at the bottom of the hole
  • K or L – Number of cycle repetitions

The feed rate (F) is dependent on the material that is being cut and the diameter of the drilling tool that you are using.

The retracting value (R) or clearance level refers to the plane perpendicular to the Z-axis where the tool can move safely from one hole to another.

Also, some machines might use L instead of K for cycle repetition (depending on the model and machine type). If you are the programmer, remember to check the machine’s manual for further details.

What to think about when using a G83 code?

Peck depth

The bigger the peck distance is, the fastest the drilling operation will be. So, in this sense, choosing an appropriate peck distance can speed up machining time.

Usually, when using G83, the maximum peck distance recommended will be equal to the hole’s diameter. However, you must be careful with hard materials and heavy chips that can come out of the hole during the process. 

Some CNC models have variable-depth peck controllers, and you could play with them to decrease peck distance in each pass by taking a big peck in the first step and then taking shorter ones to avoid plugging up the tool.

Be sure to check the machine’s manual first to see the available options for controllers.

Positioning mode

When using the G83 drilling cycle, you will need to be aware of the positioning mode that is currently active.

If G90 is active, the machine will read all locations as relative to a single zero location.

If G91 is active, the machine will read all locations as relative to its current position.

Pay careful attention to your current positioning mode because using the wrong one can easily result in a machine crash.

graph paper example of absolute positioning with multiple points as examples
graph paper example of incremental positioning with multiple points as examples

The difference between the two modes is shown above. When in absolute mode, the machine will move relative to a fixed zero location.

When in incremental mode, the machine will move relative its current location.

Look at the first move in the pictures above. They both start at (0,0). They both move up one block in the Y axis.

On the second move, in absolute mode the machine the machine is still reading the new location as from the fixed zero location. 

In incremental mode the move is from the machines current location which is why the move is 1 block shorter in the Y axis.

Retract planes

The retract plane is the location that the machine will return to after each canned cycle.

There are two codes that affect retract planes. G98 will cause the machine to return to the Z location at the start of the canned cycle. G99 will

visualization of how a cnc machine moves using g98 and g99 codes shows motion of travel for the machine

Selecting a retract plane that is above any potential obstacles in the machine such as fixtures, clamps, or the part itself will allow the machine to safely move between each hole drilling location.

If the R plane is too low it could cause damage on the workpiece and lead to disaster. However, if an R plane is too high above the workpiece’s surface, it could increase machining time, due to the extra time needed to go all the way up to the R value after each drilling. 

How to cancel a G83 code?

The G80 command is used to cancel a G83 code as well as all other canned cycles.

If the G83 command is not canceled, then the machine will continue to drill holes in every location given in the program.

G83 vs G73

The most similar code to G83 is G73.

They are both peck drilling cycles with one key difference. G83 will retract completely out of the hole after each peck to the retract plane. G73 will only retract to the start of each peck.

The G73 canned cycle is a peck drilling cycle but with a shorter retract intended for relatively shallow holes. Meanwhile, the G83 command is peck drilling with a full retract intended for deep holes.

an illustration that shows the difference between the G73 and G83 CNC codes

Both commands are meant to help break and clear chips. G83 does a better job of this by fully retracting out of the hole but with the added expense of a longer cycle time.

On the other hand, G73 is designed to break up stringy chips, while G83 is intended to pull chips up and out of deep holes.

G83 vs similar codes

Besides G73 there are a few other G-codes for drilling holes with slight variations in the drilling process which make them better to use in certain circumstances.

Code

Name

Function

Standard drilling

Drill simple, shallow holes and center drilling

Spot drilling

Standard drilling cycle with a dwell at the bottom of the hole

Peck drilling - full retract

Drill into the part in steps (pecks) and after each peck, fully retract from the hole

Peck drilling - stepped drilling

Similar to G83, but instead of retracting completely out of the hole, the machine will pull back a specified amount and then resume drilling

Want to learn more about CNC G Code?

Leave a Comment