Haas G150 Pocket Milling: How to Use It Like a Pro
Category : Haas
I must admit I used to think this feature was a waste of time. But I didn’t realise that some folks don’t have a CAM sytem so long hand programming would take ages.
CNC Training Call David: 07834 858 407
30 five star ratings on Google (just saying)
I got to work on a 1995 very old but brings back great memories for an old bastard like me.

Dirty old beast but then so am I and I still have my uses.
The Haas G150 pocket milling command is a versatile and powerful feature for CNC machinists looking to machine pocket shapes. By defining a pocket’s geometry in a subprogram and then using G150 to call it, you can streamline your code.
What is Haas G150 Pocket Milling?
The G150 G-code command on Haas CNC mills is designed for general-purpose pocket milling. It allows machinists to mill out complex pocket shapes by defining the geometry once in a subprogram, then calling it using a single line of code in the main program.
G150 Explained
The G150 command uses a range of parameters to control the milling operation:
- P – Subprogram number that defines the pocket shape, can be internal or external (but not on my old machine)
- X, Y – Starting location (usually the pre-drilled entry hole)
- Z – Final pocket depth
- I or J – Step-over distance in X or Y direction, make sure you only include one as you will get an alarm
- K – Finish allowance for a final pass
- Q – Incremental Z depth per pass
- R – Height for pocket, depth is from here
- F – Feed rate
- D – Tool diameter offset register (for G41/G42)
- L – Optional repeat count with incremental positioning
Writing the Pocket Geometry Subprogram
The subprogram specified by the P code outlines the pocket’s perimeter. Important rules:
- Must be a closed loop (start and end at the same point)
- Max 40 moves (linear or circular)
- Start move should go from entry hole to the boundary
- Final move must not go back to the entry hole
- Use cutter comp G41 with lead-in/lead-out moves add to cycle.
This example it really simple try it out first just to make sure all is ok. You can then hit it with a much more complex shape.
On older controls you have to put the shape in an external sub program like O500 you can’t use internal sub routine.
Full G150 Pocket Milling Example Program
O1 (Main Program)
T1 M06 (10mm Endmill)
M1
G90 G54 G00 X0 Y0 (Move to start position)
S2000 M03 (Spindle on)
G43 H01 Z1.0 M08 (Tool length comp + coolant)
G01 Z0.1 F50. (Feed to pre-drilled hole)
G150 P600 G41 D01 I2. K.2 Z-10. Q3. R0 F200.
G40 G00 Z100. M09 (Cancel comp + retract)
G53 G49 Z0.0 (Return to machine zero)
M30
N600 (Pocket Geometry Subprogram)
G01 Y20.
X-100.
Y-20.
X100.
Y20.
X0
M99
Best Practices for Using G150 on Haas Machines
- Pre-drill a starting hole at the X, Y location to avoid plunging. There is no separate plunge feed so this means you can mill it much quicker without worrying about down feeding.
- Always simulate the toolpath before running it live. Graphics are pretty shit on my old beast but will definitely pick out typos n silly error.
- Use G41 with the correct D offset for cutter comp
- Keep the subprogram under 40 moves and ensure it’s a clean, closed loop
- The subprogram can be internal or external control looks first for internal.
Troubleshooting Common G150 Errors
- “Pocket Definition Error” – Check that the subprogram has fewer than 40 moves and ends correctly
- Tool crashes on entry – Verify that X/Y starting point is inside the pocket boundary
- Wrong pocket size – Make sure G41/G42 and D offset are correctly used
- I and J, I put both of these in I2. J0 and it wouldn’t work. You have to miss one of them out.
By understanding and correctly applying Haas G150 pocket milling, you can save time, reduce code complexity, and improve pocketing accuracy on your Haas CNC machines.
Beats the shit out of long hand programming it all. No it’s not the best tool path but if you don’t have CAD/CAM it will save you loads of time.


