G-code reference

G10 G-Code: Programmable Data Input (Set Offsets)

Programmable Data Input (Set Offsets) — Writes offsets from the program into the control: work offsets, tool length and radius offsets. This is useful for setting fixtures automatically and for…

By cnccode · Updated
PropertyValue
CodeG10
FunctionProgrammable Data Input (Set Offsets)
Modal group00
TypeOne-shot (non-modal) — active only in its own block
Used onMills and lathes
SyntaxG10 L2 P_ X_ Y_ Z_ (work offset) / G10 L1 P_ R_ (tool offset)

What does G10 do?

Writes offsets from the program into the control: work offsets, tool length and radius offsets. This is useful for setting fixtures automatically and for probing routines.

G10 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
G10 L2 P_ X_ Y_ Z_  (work offset)  /  G10 L1 P_ R_  (tool offset)
AddressMeaning
L2Work offsets G54–G59 (P1=G54 … P6=G59, P0 = external/common)
L20Additional work offsets G54.1 P1–P48
L1 / L10–L13Tool offsets: L10 geometry H, L11 wear H, L12 geometry D, L13 wear D
POffset number
ROffset value

G10 example program

Example
G90 G10 L2 P1 X-350.125 Y-220.400 Z-410.000 (set G54)
G10 L10 P5 R125.433 (tool 5 length geometry)
G10 L12 P5 R5.0 (tool 5 radius)

▶ Open this example in the G-code viewer

Tips and common mistakes

  • G90 writes absolute values; G91 adds to the existing value.
  • A mistake here silently moves every following cut — verify with single block.
  • Parameter writing (G10 L50) exists but should be used with great care.

Controller compatibility

G10 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 G10 modal?
No. G10 is a one-shot (group 00) code and only acts in the block where it appears.
What does G10 mean in CNC?
G10 means Programmable Data Input (Set Offsets). Writes offsets from the program into the control: work offsets, tool length and radius offsets. This is useful for setting fixtures automatically and for probing routines.
What is the difference between G10 and G54?
G10 is Programmable Data Input (Set Offsets), while G54 is Work Coordinate System 1. See the G54 page for its syntax and examples.
Can I use G10 on a lathe?
Yes, G10 is used on both mills and lathes, although some parameters differ between them.