Skip to content

G50: limiting the maximum spindle speed

G50 sets the rpm ceiling the lathe spindle cannot exceed, and it is programmed before turning on constant surface speed with G96. You need it because with G96 the control raises the rpm as the diameter drops, and when facing toward the center the diameter tends to zero: with no limit, the command would be to spin at the machine's maximum speed with a part that may not be able to take it. It is one of the few lines in a lathe program whose absence can end with the part out of the chuck.

For reference only: syntax changes with the control, the post-processor and the machine parameters. Check the official manual and run a simulation before cutting. Legal notice.

The brands and control names mentioned belong to their owners and are used only to identify the equipment. GetGCode is not affiliated with or endorsed by any manufacturer, ISO or ASME: this is our own content, not official documentation. Legal notice.

Family
Lathe
Machine
Turning, Mill-turn
Risk
High
Example
G50 S2500

Syntax by control

Fanuc (lathe)
G50 S2500
Sets the limit at 2500 rpm. It is written once before the first G96 and stays active until another G50 changes it or the program ends. It does not move anything by itself.
Haas (lathe)
G50 S2500
Same syntax. Haas also has a machine setting that sets an overall ceiling, but the one in the program is what protects the specific part in the chuck, and that is what changes from one batch to the next.
Fanuc on older controls
G50 X.. Z..
On older controls, G50 with coordinates also set the work coordinate system, before G54 to G59 became common. If you see a G50 with X and Z in an old program, that is what it is, not a spindle speed limit.
Siemens 840D / 828D
LIMS=2500 / G96 S200 M3
Siemens uses LIMS for the spindle speed limit under constant surface speed. It also allows several limits for machines with multiple spindles or channels, using the corresponding channel syntax.
Milling machine
G50 cancels the scaling factor
On a mill, G50 is something completely different: it cancels the G51 scaling factor. They share a number by history, not by function.

Address letters used with it

LetterWhat it setsUnit
SMaximum rpm the spindle can reach. It is a ceiling, not a spindle command: by itself it does not start the spindle or change the current speed.rpm
G96Constant surface speed, which is what makes the limit necessary. The S of G96 is in meters per minute, not rpm.m/min
G97Constant rpm. With G97 active the G50 limit is still there, but it stops being critical because the rpm does not change on its own.rpm
X / Z (older controls)In the old variant of G50, the coordinates that set the work coordinate system. Today that job is done by G54 to G59 and the tool offsets.mm

Worked example

Facing and OD turning a Ø200 mm flange, with the stock slightly larger than Ø202 so that the X202. pass actually cuts, held in soft jaws, where the spindle speed limit is what stops the spindle from running away as the tool reaches the center of the face. The chosen limit comes from what the workholding allows with that part and that overhang, not from what the machine can deliver.

O0950 (BRIDA D200 - REFRENTADO Y CILINDRADO)
( Program header. )
G21 G40 G99
( Millimeters, no tool nose radius compensation and feed per revolution. )
T0101
( External roughing insert. )
G50 S1200
( 1200 rpm limit. With a Ø200 flange in soft jaws, that is a reasonable ceiling: centrifugal force grows with the square of the rpm and with the radius of the part. )
G96 S180 M03
( Constant surface speed at 180 m/min. At Ø200 that is about 285 rpm; at Ø20 it would be 2865, but the G50 cuts it off at 1200. )
G00 X205. Z0.5 M08
( Approach outside the outer diameter, with 0.5 mm of stock left on the face. )
G01 X-1.6 F0.25
( Facing past the center. This is where the limit does its job: as the diameter drops, the control asks for more rpm and stays pinned at 1200. )
G00 Z2.
( Moves off the face. )
G00 X202.
( Positions for the OD turning. )
G01 Z-30. F0.3
( OD turning pass. Here the diameter is constant, so the rpm is too. )
G00 X250. Z50. M09
( Retract to a safe position and coolant off. )
G97 S500
( Goes back to constant rpm before finishing, a good habit so the next operation does not inherit the mode. )
M05 M30
( Spindle stopped and end of program. )
Open the simulator to check the example

Practical keys to using G50 in the workshop

Why the spindle runs away without G50

With G96 the control holds the cutting speed constant, and cutting speed is the product of diameter and rpm. If the diameter drops by half, the rpm doubles; if it drops to a tenth, the rpm goes up tenfold. When facing toward the center, the diameter tends to zero and the theoretical command tends to infinity, so the machine accelerates to its maximum. With a small, well-clamped part that may cause no trouble; with a large flange in soft jaws, centrifugal force can overcome the chuck pressure. G50 is what sets the ceiling before that happens.

What limit to set and where it comes from

The number is not the machine's maximum speed: it is what that workholding, that part and that overhang can safely take. Chuck manufacturers publish curves of clamping force against rpm, and the available force falls as the jaws open and the speed goes up. On top of that you have to add the imbalance of a part that is not symmetrical, the condition of the chuck and the actual hydraulic pressure. In practice, the shop starts from the chuck manufacturer's recommendation and goes lower if the part is large, irregular or held by a small surface.

G50 on a lathe and G50 on a mill

The same number has two meanings that have nothing to do with each other. On a lathe it is the spindle speed limit; on a mill, it cancels the scaling factor turned on by G51. In addition, on older lathe controls, G50 with X and Z coordinates set the work coordinate system, a use that G54 to G59 have since replaced. There is no risk of confusion on the machine, because each control implements its own version, but there is when you read generic documentation or recover programs from old machines.

Mistakes that cost you a part (or a tool)

  • Turning on G96 without first setting a G50: when facing toward the center the spindle accelerates to the machine's maximum.
  • Setting the limit at the spindle's maximum speed instead of what the workholding can take: the limit no longer protects anything.
  • Inheriting the G50 from an earlier program with a much smaller part and not reviewing it when you set up a large one.
  • Confusing the S of G50, which is rpm, with the S of G96, which is meters per minute.
  • Assuming the machine's overall setting already protects you: that is a machine ceiling and it knows nothing about the part in the chuck.
  • Leaving G96 active for operations that need a fixed rpm, such as threading or drilling on center, instead of switching to G97.
  • Not reviewing the limit when you switch to soft jaws opened wider, where the available clamping force is lower.

Frequently asked questions

Does G50 start the spindle?

No. It only sets a ceiling. The spindle starts with M03 or M04 and the speed is commanded by G96 or G97. If you program G50 S2000 and then G97 S800, the spindle runs at 800: the limit only acts when the calculated speed tries to go past 2000.

What value should I use?

Whatever the part and workholding together can safely take, which comes from the chuck documentation and from experience with that part. For large or irregular parts, or parts held by a small surface, you go lower. You do not use the machine's maximum speed: that is the same as setting no limit.

Do I need G50 if I work in G97?

With G97 the rpm is what you program and it does not change on its own, so the limit is not critical. Even so, leaving it in the header costs nothing and protects you the day someone adds a G96 partway through the program and forgets about it.

Is it the same as the limit on the machine screen?

Not exactly. The machine one is an overall ceiling that protects the spindle and applies to everything that runs; the G50 one is in the program and protects that specific part. When both are set, the lower of the two rules, which is how it should be.

What is the Siemens equivalent?

LIMS, which is written before G96 and does exactly the same job. On machines with multiple channels or spindles, Siemens lets you set several limits with the corresponding syntax. If you convert a program from Fanuc to Siemens, that G50 has to become a LIMS and not disappear.

Related codes

G96/G97G51/G50G76G70/G71/G72/G73M03/M04/M05

Other codes in Lathe

See the full list of G and M codes

Related apps