G96 is a G-code command that instructs a CNC machine to maintain a constant surface speed (CSS) for a rotating tool or workpiece. Surface speed is the linear speed at which the cutting edge of the tool moves relative to the workpiece surface. It is usually measured in meters per minute (m/min) or feet per minute (ft/min).
Usage format
The general format of the G96 command is:
G96 Snnn
where nnn
is the desired surface speed in the machine’s units (m/min or ft/min).
For example, G96 S200
means to keep the surface speed at 200 m/min or 200 ft/min, depending on the machine’s settings.
Explanation
The purpose of using G96 is to achieve a consistent and optimal cutting condition for the tool and the workpiece. By keeping the surface speed constant, the tool will have a uniform wear and temperature, resulting in a better surface finish and tool life. The workpiece will also have a consistent material removal rate and quality.
To maintain a constant surface speed, the machine will automatically adjust the spindle speed (RPM) according to the diameter of the tool or the workpiece. The spindle speed is inversely proportional to the diameter, meaning that as the diameter increases, the spindle speed decreases, and vice versa. This ensures that the tool or the workpiece always travels at the same linear speed.
The formula for calculating the spindle speed from the surface speed and the diameter is:
where RPM is the spindle speed in revolutions per minute, CSS is the surface speed in meters per minute, and D is the diameter in millimeters.
Example
Suppose we want to turn a cylindrical workpiece with a diameter of 100 mm using a lathe with a G96 command. We set the surface speed to 200 m/min using G96 S200
. The machine will calculate the spindle speed as follows:
The machine will then rotate the workpiece at 636 RPM.
As the tool moves along the workpiece, the diameter will decrease. For example, when the diameter reaches 80 mm, the machine will recalculate the spindle speed as follows:
The machine will then increase the spindle speed to 795 RPM to maintain the same surface speed.
Here is a text diagram to illustrate the example:
100 mm
<-------------->
| |
| | 200 m/min
| |<---------->
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
<-------------->
80 mm