CNC Lathe | G87 Cycle | Side Drilling

G87 Cycle Introduction

G87 cycle is used in CNC turning machines with driven tool for drilling holes from the side to the workpiece. It is the same as the G83 cycle as a command format, the only difference is that it is used for drilling holes in the X axis direction, not in the Z axis direction. After the command is used, drilling to the other coordinates is continued by positioning the Z axis or C axis. The G87 cycle continues to run until the G80 command arrives.

G87 Cycle Format

G87 X(U)_ R_ P_ F_ Q_ K_ M_ ;


X_ or U_ : Final drilling depth (X for absolute, U for incremental)
R_ : The distance from the initial level to point R level
P_ : Dwell time at the bottom of a hole
F_ : Cutting feedrate
Q_ : Depth of cut for each cutting feed
K_ : Number of repeats (When it is needed.)
M_ : M code for C-axis clamp (When it is needed.)

If depth of cut (Q) is not specified for each drilling, the normal drilling cycle is used. The tool is then retracted from the bottom of the hole in rapid traverse.

Same format can be use for G83 cycle also to drill from Z axis side.

G87 Cycle Examples

G87 CNC Program Example – 1

O1234 ;
M51 ; Setting C-axis index mode ON
M3 S2000 ; Rotating the drill
G00 X50.0 C0.0 Z-20.0 ; Positioning the drill along the Z- and C-axes
G87 X20.0 R5.0 Q5000 F5.0 M31 ; Drilling hole 1
C90.0 Q5000 M31 ; Drilling hole 2
C180.0 Q5000 M31 ; Drilling hole 3
C270.0 Q5000 M31 ; Drilling hole 4
G80 M05 ; Canceling the drilling cycle and stopping drill rotation
M50 ; Setting C-axis index mode off
M30 ; Program end
M31 : C axis Clamp