G-code reference

G50: Maximum spindle speed (lathe)

G50 is maximum spindle speed (lathe). With S, caps the spindle RPM during constant surface speed. It is non-modal, so it acts only on the line it is written on.

What G50 does

On a Fanuc lathe, G50 with an S word sets the highest RPM the spindle may reach under G96. Without it, constant surface speed raises the RPM as the tool nears the centre, which can exceed what the chuck and part can safely hold. With X and Z words instead, G50 sets the coordinate system, an older use most shops replace with work offsets.

TypeG-code
MachineLathe (G-code system A)
GroupNon-modal
ModalNo: acts only on its own line

G50 example

G50 S2500

Never spin faster than 2500 RPM.

WordWhat it means here
G50Maximum spindle speed (lathe)
S2500spindle speed, or a speed limit or surface speed with some codes

Codes people confuse with G50

CodeWhat it does instead
G96 Constant surface speed. S is a cutting speed (m/min or ft/min); RPM changes with diameter.
G97 Constant RPM. S is a fixed spindle speed in RPM.

Memory hook: Put G50 S before G96, every time.

Where controls differ

  • Fanuc mill: On a mill, G50 cancels scaling; a different meaning entirely.

Other codes in the non-modal group

These also act only on their own line.

  • G04 Dwell
  • G09 Exact stop (one block)
  • G10 Programmable data input
  • G28 Return to reference position
  • G30 Return to second reference position
  • G52 Local coordinate system
  • G53 Machine coordinate move
  • G65 Macro call

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: G50

  1. What does G50 do? (Lathe)

  2. Which code: With S, caps the spindle RPM during constant surface speed.(Lathe)

  3. What does G96 do? (Lathe)

Show the answers
  1. With S, caps the spindle RPM during constant surface speed.
  2. G50
  3. S is a cutting speed (m/min or ft/min); RPM changes with diameter.

Drill this code with the rest of the core set

More practice hubs

Frequently asked questions

What does G50 mean in CNC programming?
Maximum spindle speed (lathe). With S, caps the spindle RPM during constant surface speed.
Is G50 modal?
No. G50 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 G50 and G96?
G50 (maximum spindle speed (lathe)): with S, caps the spindle RPM during constant surface speed. G96 (constant surface speed): s is a cutting speed (m/min or ft/min); RPM changes with diameter. A way to remember it: put G50 S before G96, every time.
What is the difference between G50 and G97?
G50 (maximum spindle speed (lathe)): with S, caps the spindle RPM during constant surface speed. G97 (constant RPM): s is a fixed spindle speed in RPM. A way to remember it: put G50 S before G96, every time.

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.

Free preview · no card Try G-Code Sprint