Home › G-codes › Mach3 Mach4 › G12
G12 Circle or pocket, clockwise
Mach3 Mach4 G-code · Mill
Cuts a full circle clockwise around the current position, then returns to center. A quick way to open a bore or cut an O ring groove.
Format
G12 I [J] F [P] [Q]
Addresses
| Address | What it does |
|---|---|
I | Radius the tool moves out along X |
J | Mach4 Y part of the lead in, sets the lead in angle |
Q | Mach4 start radius for a pocket |
P | Mach4 step over for a pocket |
F | Feed rate |
How it works
Non modal in practice. Runs once from the current point.
Example program
G0 G20 G90 G54 G17 G40 G49 G80 (SAFE START, INCH)
T1 M6 (TOOL CHANGE)
S6000 M3 (SPINDLE ON)
G0 X1.5 Y0.25 (HOLE CENTER)
…
T1 M6 (TOOL CHANGE)
S6000 M3 (SPINDLE ON)
G0 X1.5 Y0.25 (HOLE CENTER)
…
The full 8-line example is in the app. Example is in inch. Check offsets and clearances first.
Watch out for
- The current XY position is the circle center. Move there first.
- Mach3 moves the tool center out by I. Take the tool radius off the hole radius and check the size in the toolpath display.
- XY plane only. Not a Fanuc code, so it does not move to other controls.
Related codes
G12 on other controls
The same number can mean something different on another control.
| Control | Meaning |
|---|---|
| Haas NGC | Circular pocket milling clockwise |
| Heidenhain TNC (ISO) | Clockwise arc, polar |
Every G-code for Mach3 Mach4 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 G12 in the app All Mach3 Mach4 G-codes