G-code reference
G87 G-Code: Back Boring Cycle
Back Boring Cycle — Orients the spindle, shifts the bar, rapids through the hole, shifts back and bores upward. Used for counterbores on the back side of a part.
| Property | Value |
|---|---|
| Code | G87 |
| Function | Back Boring Cycle |
| Modal group | 09 |
| Type | Modal — stays active until replaced by another code of the same group |
| Used on | Milling machines |
| Syntax | G87 X_ Y_ Z_ R_ Q_ F_ |
What does G87 do?
Orients the spindle, shifts the bar, rapids through the hole, shifts back and bores upward. Used for counterbores on the back side of a part.
G87 is modal: once programmed it remains in effect for the following blocks until another code from modal group 09 replaces it or the control is reset.
Syntax and parameters
G87 X_ Y_ Z_ R_ Q_ F_| Address | Meaning |
|---|---|
Q | Shift amount |
G87 example program
G87 X0 Y0 Z-30.0 R-45.0 Q0.5 F50.▶ Open this example in the G-code viewer
Tips and common mistakes
- Check the shift direction parameter on the control before the first run.
Controller compatibility
G87 follows the ISO/Fanuc dialect used by Fanuc, Haas, Brother, Doosan, Hurco (ISO mode), Mazak (EIA/ISO mode), Okuma (G-code mode) and Siemens in ISO dialect mode. Parameters, option packages and builder-specific behaviour can differ, so confirm the details in your machine's programming manual before running a new program.