Home › G-codes › Siemens 808D ISO › G87
G87 Back boring cycle / Side peck drilling cycle
Siemens 808D ISO G-code · Mill, Lathe
On mills: Back boring cycle
Orients the spindle, shifts by Q, rapids down through the hole to R at the bottom, shifts back, starts the spindle CW and bores upward to Z. Used for back counterbores.
Format
Addresses
| Address | What it does |
|---|---|
X Y | Hole position |
Z | Top end of the back bore |
R | Start plane at the bottom of the hole |
Q | Tool shift, positive |
P | Dwell, internal units |
F | Feed rate |
K | Repeats, in this block only. Use G91 to space them |
How it works
Modal, group 9. Cancel with G80 or G00 to G03.
Example program
G90 G54 G00 X50. Y50. S400 M03 (HOLE POSITION)
G43 Z50. H07 (LENGTH OFFSET)
G98 G87 Z-15. R-32. Q3. P1000 F80. (BACK BORE FROM Z-32 UP TO Z-15)
…
The full 6-line example is in the app. Example is in inch. Check offsets and clearances first.
Watch out for
- Lift off direction is set in GUD _ZSFI[5] and the spindle stop angle in _ZSFR[2], not in Fanuc parameters.
- Set the stop angle so the tool tip points away from the shift. In G17 the manual example has the tip pointing +X.
- Q is always positive and stored modally. Without Q there is no shift and the tool can hit the bore.
On lathes: Side peck drilling cycle
Drills along X into the side of the part with pecks of depth Q, using Z and the C axis to position. Without Q it drills to depth in one pass.
Format
Addresses
| Address | What it does |
|---|---|
Z C | Hole position, Z and C angle |
X U | Hole bottom |
R | Initial point to R point distance, radius value, signed |
Q | Peck depth, no sign |
P | Dwell at the hole bottom |
F | Cutting feed |
K | Number of repeats, this block only |
M | M code that clamps the C axis, if needed |
How it works
Modal, G group 10. Cancel with G80.
Example program
G00 X55.0 Z-15.0 C0.0 (HOLE 1 POSITION)
G87 X20.0 R-2.0 Q4000 F80.0 (PECK 4 MM ALONG X)
C120.0 (HOLE 2)
…
The full 6-line example is in the app. Example is in inch. Check offsets and clearances first.
Watch out for
- USER DATA _ZSFI[20] = 0 runs high-speed peck (short retract, set in _ZSFR[21]); 1 retracts to the R point every peck. Without Q it drills in one pass.
- R is the signed distance from the initial point to the R point, not an absolute position. R is always a radius value.
- Cancel with G80 or any group 01 code (G00, G01, G02, G03). The cycle data stay stored until changed or cancelled.
Related codes
G76 · G80 · G98 · G83 · G88 · G89
G87 on other controls
The same number can mean something different on another control.
| Control | Meaning |
|---|---|
| Fanuc | Back boring cycle |
| Haas NGC | Boring cycle, stop and manual retract |
| Mazak (EIA) | Side drilling cycle, live tool |
| Okuma OSP | Back boring cycle |
| Mitsubishi M70 M80 | Back boring cycle |
| Brother Speedio | Back boring cycle |
| Fagor 8055 8065 | Rectangular pocket canned cycle |
| LinuxCNC Tormach | Back boring cycle, not implemented |
| Mach3 Mach4 | Back boring |
| Hurco WinMax (NC) | Back bore (ISNC) or chip breaker (BNC) |
| Fadal | Bore in and out, Fadal G87 |
| Swiss (Citizen Star) | Side drilling cycle |
Every G-code for Siemens 808D ISO in your pocket. The app has the full example programs, search by number or shop word, a line decoder and calculators for tapping, threading and drilling.
Open G87 in the app All Siemens 808D ISO G-codes