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…

By cnccode · Updated
PropertyValue
CodeG150
FunctionGeneral Purpose Pocket Milling (Haas)
Modal group00
TypeOne-shot (non-modal) — active only in its own block
Used onMilling machines
SyntaxG150 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

Format
G150 P_ X_ Y_ Z_ Q_ R_ I_ J_ K_ D_ F_
AddressMeaning
PSubprogram with the pocket outline
QDepth per pass
I / JStepover / finish allowance
RRetract plane

G150 example program

Example
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.

Frequently asked questions

Is G150 modal?
No. G150 is a one-shot (group 00) code and only acts in the block where it appears.
What does G150 mean in CNC?
G150 means 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 long pocketing code at the machine.
What is the difference between G150 and G12?
G150 is General Purpose Pocket Milling (Haas), while G12 is Circular Pocket Milling CW (Haas) / Polar Interpolation (Lathe G12.1). See the G12 page for its syntax and examples.
Can I use G150 on a lathe?
Usually not with the same meaning: G150 is documented here for milling machines. Check your control manual for the equivalent.