G50: Maximum spindle speed (lathe)
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.
| Type | G-code |
|---|---|
| Machine | Lathe (G-code system A) |
| Group | Non-modal |
| Modal | No: acts only on its own line |
G50 example
G50 S2500 Never spin faster than 2500 RPM.
| Word | What it means here |
|---|---|
G50 | Maximum spindle speed (lathe) |
S2500 | spindle speed, or a speed limit or surface speed with some codes |
Codes people confuse with G50
| Code | What 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.
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
-
What does
G50do? (Lathe) -
Which code: With S, caps the spindle RPM during constant surface speed.(Lathe)
-
What does
G96do? (Lathe)
Show the answers
- With S, caps the spindle RPM during constant surface speed.
- G50
- S is a cutting speed (m/min or ft/min); RPM changes with diameter.
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.