LinuxCNC G7

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.

Source checked3/3 values · 2026-10-26

Specification

1 source
Languagegcode
CodeG7
SyntaxG7
DialectLinuxCNC

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.
↑↓ navigate↵ openesc close