G73 / G83 Peck Drilling Reposition Location - Mach4
Symptoms
- The Z axis does not retract far enough and chip does not sufficiently clear from the drill flutes. Increase HSP.
- Z retracts too far and the cycle time is unnecessarily long. Reduce HSP
- When feeding in, the Z axis switches from rapid rate to feed rate too soon, and increases the cycle time. Reduce FRP.
Solution
Mach4 has two machine parameters that affect the reposition behavior with regards to peck drilling. There are multiple ways to change those values.
Older Mach 4 pound variables
In versions of Mach 4 older than 4.2.0.3779 (prior to 2018-05-04) these were pound variables. Those values can be changed in G-Code like this:
#5114=250
#5115=100
Current Mach 4 Mach Parameters
In versions after 4.2.0.3779 (2018-05-04) these parameters have been moved to the Mach Parameters. You can set these values in the MachMotion plugin, in the G-Code, or on the dashboard after adding the appropriate widget.
- The values are in increments of .0001" or .001mm.
- The default value for HSP 5114 is 250 (.0250) or 600 (.600mm) [or 1000 (.1000"]
- The default value for FRP 5115 is 100 (.0100") or 250 (.250mm)
MachMotion Plugin
To change the values in the MachMotion plugin disable the control, then pull down Configure | Plugins | MachMotion
G-Code
Add these lines to your G-Code above the G73 or G83 lines. Adjust the values for each parameter to suit your needs.
G10 L50
N5114 R250 (HSP = 0.0250")
N5115 R100 (FRP = 0.0100")
G11
Dashboard Widget
You can also add these parameters to the dashboard and rename the labels. The dashboard parameter values can be changed by clicking in the value field and entering a new value.
![]() |
HSP and FRP meaning
SV_HSP_CLEARANCE / #5114
High Speed Peck (HSP) drilling cycle (G73) rapid retract clearance.
(integer specifying .0001" or .001mm increments, depending on machine units)
This parameter defines how far the tool retracts away from the bottom of each peck. Increase this value until the chips are consistently clearing from the flutes of the tool.
G83 always fully retracts to the retract plane, and HSP values do not affect G83 motion.
G code Examples
Machine units are inches
G00 G90 G54 G17 G40 G49 G80 (Safe start line)
M06 T01 (Tool change)
M03 S2500 (Start spindle)
G10 L50 (Set offsets)
N5114 R250 (HSP = 0.0250")
N5115 R100 (FRP = 0.0100")
G11 (Clear offsets)
G00 X1.0 Y-1.0 (Rapid to XY position)
G43 H1 Z0.5 (Activate tool offset 1 and move to Z initial point)
G73 G99 X1.0 Y-1.0 Z-1.0 Q0.1 R0.25 F10 (Peck drill cycle start)
X2.0 Y-1.0 (Drill second hole)
X3.0 Y-1.0 (Drill third hole)
G80 (Canned cycle cancel)
G53 G00 Z0 (Return Z to home)
M30 (Program end and rewind)
%
Machine units are millimeters
G00 G90 G54 G17 G40 G49 G80 (Safe start line)
M06 T01 (Tool change)
M03 S2500 (Start spindle)
G10 L50 (Set offsets)
N5114 R600 (HSP = 0.600 mm)
N5115 R200 (FRP = 0.250 mm)
G11 (Clear offsets)
G00 X1.0 Y-1.0 (Rapid to XY position)
G43 H1 Z0.5 (Activate tool offset 1 and move to Z initial point)
G73 G99 X1.0 Y-1.0 Z-1.0 Q0.1 R0.25 F10 (Peck drill cycle start)
X2.0 Y-1.0 (Drill second hole)
X3.0 Y-1.0 (Drill third hole)
G80 (Canned cycle cancel)
G53 G00 Z0 (Return Z to home)
M30 (Program end and rewind)
%
SV_FRP_CLEARANCE / #5115
Full Retract Peck drilling cycle (G73, G83) rapid clearance before feed starts.
(integer specifying .0001" or .001mm increments, depending on machine machine units)
While the tool is moving in to start the next peck, you can have it move at a rapid rate. The FRP value is the distance above the bottom of the previous peck at which you want this move to switch from a rapid to a feed rate move.
You can tune your cycle times by keeping your HSP values to the smallest distance necessary to clear the chip, and keeping your FRP values to the smallest value necessary for the motion to safely change to a feed rate before reaching the part.
The G83 Full Retract Peck Drilling cycle behaves the same as G73, except every rapid retract goes to the retract plane (R parameter). Only the FRP parameter affects the G83 behavior.
G code Examples
Machine units are inches
G10 L50
N5115 R100 (Set FRP to 0.01")
G11
G83 X0 Y0 Z-2 R.5 Q.5 F20
G10 L50
N5114 R500 (Set HSP to 0.05")
N5115 R100 (Set FRP to 0.01")
G11
G73 X0 Y0 Z-2 R.5 Q.5 F20
Machine units are millimeters
G10 L50
N5115 R250 (Set FRP to 0.025mm)
G11
G83 X0 Y0 Z-50.8 R12.7 Q12.7 F500
G10 L50
N5114 R250 (Set HSP to 0.025mm)
N5115 R100 (Set FRP to 0.010mm)
G11
G73 X0 Y0 Z-50.8 R12.7 Q12.7 F500
Keywords: 14513