G10: Programmable data input
What G10 does
G10 lets a program set values that are normally typed into the offset pages, such as work offsets or tool length and radius offsets. The L word picks which table is written. Because it overwrites stored offsets, a wrong G10 line can move every later cut, so it is used carefully and mostly by experienced programmers.
| Type | G-code |
|---|---|
| Machine | Mill and lathe |
| Group | Non-modal |
| Modal | No: acts only on its own line |
G10 example
G10 L2 P1 X-300. Y-200. Z-400. Set work offset G54 (P1) to these machine positions.
| Word | What it means here |
|---|---|
G10 | Programmable data input |
L2 | repeat count, or which data table G10 writes |
P1 | a parameter: dwell time, program number, sequence number or cycle setting, depending on the code |
X-300. | X axis target (on a lathe, the diameter) |
Y-200. | Y axis target |
Z-400. | Z axis target or depth |
Codes people confuse with G10
| Code | What it does instead |
|---|---|
G92 | Set coordinate system (shift). Tells the control that the current position has the given coordinates. |
G54 | Work offset 1. Selects the first work coordinate system, where program zero is on the part. |
Other codes in the non-modal group
These also act only on their own line.
Meanings follow the common Fanuc-style standard that Haas, Okuma (EIA mode), Mitsubishi, LinuxCNC and most other controls share for this code. Options and parameters change details from machine to machine, so check the manual for your control.
Quick check: G10
-
What does
G10do? (Mill and lathe) -
Which code: Writes offsets (work offsets, tool offsets) from inside the program.(Mill and lathe)
-
What does
G92do? (Mill)
Show the answers
- Writes offsets (work offsets, tool offsets) from inside the program.
- G10
- Tells the control that the current position has the given coordinates.
Frequently asked questions
- What does G10 mean in CNC programming?
- Programmable data input. Writes offsets (work offsets, tool offsets) from inside the program.
- Is G10 modal?
- No. G10 acts only on the line where it is written; the next line goes back to whatever modal codes were already active.
- What is the difference between G10 and G92?
- G10 (programmable data input): writes offsets (work offsets, tool offsets) from inside the program. G92 (set coordinate system (shift)): tells the control that the current position has the given coordinates.
- What is the difference between G10 and G54?
- G10 (programmable data input): writes offsets (work offsets, tool offsets) from inside the program. G54 (work offset 1): selects the first work coordinate system, where program zero is on the part.
G-Code Sprint is an educational practice tool only. It is not a CNC simulator, machine controller, safety manual, or replacement for instruction. Always follow your instructor, employer, machine manual, and shop procedures.