G-code reference
G150 G-Code: General Purpose Pocket Milling (Haas)
General Purpose Pocket Milling (Haas) — Haas canned cycle that clears any closed pocket whose outline is written in a subprogram, with stepover, depth steps and finishing allowances. Saves writing…
| Property | Value |
|---|---|
| Code | G150 |
| Function | General Purpose Pocket Milling (Haas) |
| Modal group | 00 |
| Type | One-shot (non-modal) — active only in its own block |
| Used on | Milling machines |
| Syntax | G150 P_ X_ Y_ Z_ Q_ R_ I_ J_ K_ D_ F_ |
What does G150 do?
Haas canned cycle that clears any closed pocket whose outline is written in a subprogram, with stepover, depth steps and finishing allowances. Saves writing long pocketing code at the machine.
G150 is a one-shot code: it only acts in the block where it is written, and the previously active modal codes take over again afterwards.
Syntax and parameters
G150 P_ X_ Y_ Z_ Q_ R_ I_ J_ K_ D_ F_| Address | Meaning |
|---|---|
P | Subprogram with the pocket outline |
Q | Depth per pass |
I / J | Stepover / finish allowance |
R | Retract plane |
G150 example program
G150 P1000 X0 Y0 Z-6.0 Q2.0 R2.0 I4.0 J0.3 K0.1 G41 D01 F400.
M30
O01000
G01 Y20.0
X40.0
Y0
X0
M99▶ Open this example in the G-code viewer
Tips and common mistakes
- The pocket outline must be closed and start at the X/Y entry point.
Controller compatibility
G150 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.
Related codes
- G12 — Circular Pocket Milling CW (Haas) / Polar Interpolation (Lathe G12.1)
- G13 — Circular Pocket Milling CCW (Haas) / Cancel Polar Interpolation (G13.1)