G96 G-Code: Constant Surface Speed CNC Programming

CNCCookbook’s G-Code Tutorial

What is Constant Surface Speed?

If you’re familiar with feeds and speeds, or if you’ve ever read through a tooling catalog, surface speed is a quantity used to define how fast the tool tip can move across the workpiece. It is handier than spindle rpm because it is independent of diameter. For a given rpm, surface speed changes at every distance from the center.

For example, suppose we’re running a lathe at 2000 rpm, and we want to face off a 2″ diameter workpiece. At the start, the tool is 1″ from the center of the workpiece. At 2,000 rpm the surface speed may be calculated as follows:

Surface Speed = RPM * Pi * Diameter  [ From Cutting Speed Formulas ]

So, our surface speed is 2000 * 3.14 * 1, nearly 6300 inches per minute. Surface speed is traditionally expressed in either feet per minute or meters per minute, so we can divide by 12 inches to the foot and arrive at 523 SFM. However, when we get near the center, the surface speed falls off rapidly. At 1/8″ from the center, it is only 65 SFM–a lot slower!

Constant Surface Speed is a feature that allows us to specify spindle speed in terms of Surface Speed instead of RPM. The machine will automatically maintain the rpm’s needed to make sure cutting happens at the desired surface speed.

Pretty neat, huh?

Interestingly, you can even buy manual lathes with the CSS feature. Here’s one in operation so you can see and hear the speed change during facing:

Programming Constant Surface Speed with G96

With most controls, you simply enter a G96 g-code to tell the machine to run in Constant Surface Speed. An optional “D” word may be used to specify the maximum spindle rpm.

Note: Imagine a really large and not altogether well balanced workpiece held in a chuck. You’re facing off that workpiece, and you haven’t specified a maximum rpm with the D-Word. The workpiece spins faster and faster, vibrating more and more, the closer the tool gets to the center axis. This is probably a bad thing. You should consider always specifying a D-word rpm limit when running in CSS mode to keep the workpiece from spinning too fast!

That’s all there is to it. Now, any spindle “S” commands will be in terms of surface speed, either surface feet per minute or surface meters per minute depending on how your machine is setup.

To cancel G96 and return to normal rpm mode on the spindle, use “G97”.

Advantages of Constant Surface Speed

There are a couple of great advantages to specifying CSS with a G96:

1. Programming is so much easier. Surface speed is easy to come by for any tool you may use on any material. It’s so much easier to just key that in than to have to resort to a calculator to determine the appropriate rpm.

2. Better surface finish and tool life. The tool was designed to work at a particular speed. Having the speed change based on the diameter during a single cut does not create consistent results.

3. Faster cycles and shorter machining time.  Speeding up for smaller diameters can’t help but make your cycle times shorter.

4. More consistent surface finish, regardless of part diameter.  This is especially true if you use Constant Surface Speed along with g99 feed-per-revolution feedrates.

Disadvantages of Constant Surface Speed

Like anything, there are also disadvantages to be aware of when using CSS:

1. CSS makes no sense for center cutting operations, where the tool is at 0 on the X axis and only moving in Z. This happens, for example, during drilling, tapping, or reaming. No matter what surface speed you specify, the spindle will take off to its highest allowed rpm. So, you can’t use CSS for these operations!

2. Many controls require rpm mode during threading. The important thing when threading is to synchronize the motion of the two axes, not necessarily to maintain an exact surface speed over what amounts to a pretty small change in diameter from tip to trough of a thread.

3. Those balance problems I mentioned when talking about the “D” word rpm limit can come up in a hurry in CSS mode for an unwary operator. In addition, chucks and other workholding may have a maximum rpm that’s well below your spindle’s maximum rpm. Workpieces may not be held well enough to spin at max rpm. Remember, that when the tool gets to the center axis, your machine will be spinning at max rpms unless you’ve set some limits up. This can lead to some very serious accidents or even injury. Be careful when you’re running in a mode where the spindle can suddenly speed up by a lot!

4. It can slow you down. When you retract to go to another operation that may not even use CSS, why deal with decelerating the spindle only to have to accelerate it again for the next operation?

Best Practices for Using Constant Surface Speed

1. Use regular rpm mode (G97) until the tool is positioned to begin a path.

2. Switch to G96 at that point.

3. Make the pass.

4. Switch back to G97 before repositioning for the next pass.

5. Don’t use G96 for every cut. Use it only when the beginning and end of a cut will differ significantly in diameter.

6. Set a prudent rpm limit based on the specific case for every use of G96.

Other Resources

Lathe Cutting Speeds and Feeds Calculator


1. Try some CSS mode programming. Compare surface finish on a facing operation with and without CSS.

2. Experiment with setting an rpm limit using the D-word.


Next Article: G98 G-Code and G99 G-Code: Canned Cycle Return or Feedrate Modes

Recently updated on January 27th, 2024 at 12:36 pm