# LinuxCNC G7

Instructions · `G7` · verification: source checked

G7 is a LinuxCNC G-code that puts the X axis of a lathe into diameter mode. In diameter mode an X axis move is half the distance to the centre of the lathe, so programming X1 moves the cutter to 0.500" from the centre and produces a 1" diameter part.

## Specification

| Property | Value |
|---|---|
| Language | gcode |
| Code | G7 |
| Syntax | G7 |
| Dialect | LinuxCNC |

## Study notes

- G7 takes no parameters; it is programmed as a bare G7 on its own line.
- G8 Lathe Radius Mode is the opposite mode, but the document gives no reference entry for G8.
- G8 is default at power up, so the lathe is in radius mode until G7 is programmed.
- G96 constant surface speed is not affected by radius or diameter mode.
- In the G76 threading cycle, when G7 is in force the I, J and K values are diameter measurements rather than radius measurements.
- Example given in the document: X1 moves the cutter to 0.500" from the lathe centre, giving a 1" diameter part.

## Sources

1. [G-Codes](https://linuxcnc.org/docs/html/gcode/g-code.html#gcode:g7) (accessed 2026-10-26)

---

Source page: https://machineschema.com/instruction/gcode-g07  
JSON: https://machineschema.com/instruction/gcode-g07.json  
License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Cite Machine Schema and the original sources.
