CNC lathe · G-code

G50: spindle speed limit

G50 S- caps the spindle RPM, so constant surface speed (G96) can’t run away as the tool nears the centre. Haas lists it as one-shot (group 00). Format below from Haas, its maker. LinuxCNC has no such code.

Worked example

Cap the spindle before turning on constant surface speed. Written for this page in the Haas format.

G50 S3000 (never above 3000 RPM)G96 S400 M03 (constant surface speed on)G00 X1.5 Z0.1

How each control writes it

Haas G50 S-

One source: Haas Automation, the control's maker

S
Maximum spindle RPM
  • The spindle will not exceed S; it is meant for constant surface speed (G96).
  • On DS-series machines it also limits the secondary spindle.
  • To cancel, program another G50 with the machine’s maximum RPM.

Source: Haas Automation, lathe G50

Controls without it

  • LinuxCNC: LinuxCNC has no G50 speed limit. It caps constant surface speed with D on the G96 line instead: G96 D2500 S400. Source (archived Oct 29, 2026)

No Fanuc row yet: that chapter of the 0i manual has not been read.

Haas follows Fanuc's numbering, but options and parameters differ between controls: check your control's manual.