Home › G-codes › Haas NGC › G10
G10 Programmable offset setting / Set offsets from the program
Haas NGC G-code · Mill, Lathe
On mills: Programmable offset setting
Writes work offsets, tool length offsets and diameter offsets from the program. L picks the offset type and P picks the offset number.
Format
G10 L P [R] [X Y Z A B]
Addresses
| Address | What it does |
|---|---|
L2 | Work offset G52 and G54 to G59 |
L10 | Tool length geometry for H |
L1 or L11 | Tool length wear for H |
L12 | Tool diameter geometry for D |
L13 | Tool diameter wear for D |
L20 | Extra work offsets G110 to G129 and G154 P |
P | Offset number to write |
R | Offset value for tool length or diameter |
X Y Z A B | Work offset values |
How it works
Non-modal, group 00.
Example program
G90 G10 L2 P1 X-12.5 Y-8.25 Z0. (SET G54 TO THESE MACHINE VALUES)
G10 L10 P5 R-6.125 (SET TOOL 5 LENGTH GEOMETRY)
G91 G10 L11 P5 R-.002 (ADD -.002 TO TOOL 5 LENGTH WEAR)
G90 (BACK TO ABSOLUTE)
G10 L10 P5 R-6.125 (SET TOOL 5 LENGTH GEOMETRY)
G91 G10 L11 P5 R-.002 (ADD -.002 TO TOOL 5 LENGTH WEAR)
G90 (BACK TO ABSOLUTE)
Example is in inch. Check offsets and clearances first.
Watch out for
- In G90 the value replaces the offset. In G91 the value is added to the offset already there.
- A wrong P number silently overwrites the wrong offset. Double check before running.
On lathes: Set offsets from the program
Writes tool or work offset values from the program instead of typing them on the offset page. L picks the offset type and P picks the offset number.
Format
G10 L P [X] [Z] [U] [W] [R] [Q]
Addresses
| Address | What it does |
|---|---|
L | Offset type. L2 work offsets G54 to G59, L10 tool geometry, L1 or L11 tool wear, L20 G110 to G129 and G154 offsets |
P | Offset number. P0 is COMMON, P1 to P6 are G54 to G59 |
X Z | Offset value to set |
U W | Amount added to the existing X or Z offset |
R | Tool nose radius |
Q | Tool tip direction |
How it works
Non-modal, group 00.
Example program
(SET G54 Z TO MACHINE Z-12.5)
G10 L2 P1 Z-12.5 (G54 WORK OFFSET Z)
(ADD .001 TO TOOL 1 X WEAR)
G10 L11 P1 U.001 (X WEAR, INCREMENTAL)
G10 L2 P1 Z-12.5 (G54 WORK OFFSET Z)
(ADD .001 TO TOOL 1 X WEAR)
G10 L11 P1 U.001 (X WEAR, INCREMENTAL)
Example is in inch. Check offsets and clearances first.
Watch out for
- G10 overwrites offsets with no warning. Check the L and P values twice.
- U and W add to the offset. X and Z replace it.
- Wear offsets set this way are good for automatic size correction between parts.
Related codes
G10 on other controls
The same number can mean something different on another control.
| Control | Meaning |
|---|---|
| Fanuc | Programmable data input, offsets |
| Mazak (EIA) | Program data setting, offsets |
| Okuma OSP | Cancel coordinate shift and rotation |
| Mitsubishi M70 M80 | Program data input for offsets |
| Brother Speedio | Programmable data input |
| Heidenhain TNC (ISO) | Rapid straight line, polar |
| Fagor 8055 8065 | Mirror image cancel |
| Mach3 Mach4 | Set offsets from the program |
| Centroid CNC12 Acorn | Set parameter or offset from program |
| Hurco WinMax (NC) | Data setting, offsets by program |
| Fadal | Programmable data input |
Every G-code for Haas NGC 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 G10 in the app All Haas NGC G-codes