CNC machining - G98 and G99

G98 and G99 are essential G-codes in CNC machining that control the return point after a canned cycle. These codes significantly impact machining efficiency and safety. G98 returns the tool to the initial Z plane, while G99 returns it to the R-plane after the canned cycle. Understanding their differences and applications is crucial for optimizing CNC operations.

On mills, G98 and G99 determine the tool’s retraction depth after a canned cycle. G98 mode returns the tool to the initial Z plane, typically set as the “Safe Z” in CAM programs. This allows for rapid movement without collisions. G99 mode, on the other hand, returns the tool to the R-plane, which is usually closer to the workpiece. The R-plane is specified at the beginning of the canned cycle.

For lathes, G98 and G99 serve a different purpose. They set the feedrate mode, determining how feedrate is specified. G98 sets feedrate per minute, while G99 sets feedrate per revolution. This distinction is crucial for precise control of cutting operations on lathes.

“G98 lets you enter the chipload of your tool as the feedrate. That’s pretty sweet because you can enter feedrates that are independent of the spindle rpms, which just saves you making calculations.”

G98 and G99 on mills: Optimizing tool movement

G98 and G99 play a vital role in optimizing tool movement during milling operations. Their proper use can significantly reduce cycle times and enhance machining efficiency. G98 is particularly useful when obstacles like clamps or fixtures are present between hole locations.

When G98 is active, the tool retracts to the initial Z plane after completing a canned cycle. This higher retraction point ensures clearance over obstacles. In contrast, G99 retracts the tool only to the R-plane, which is typically closer to the workpiece surface. This shorter retraction can save time when moving between closely spaced holes without obstacles.

Consider the following example of a G82 counterbore cycle:

Z15.0 M08;
G82 G99 Z-4.0 R1.0 P500 F50.0;
X20.0;
G98 X40.0;
G99 X20.0;
G80;

In this program, G99 is used initially to minimize retraction distance. However, G98 is employed when moving to the third hole (X40.0) to clear a clamp. The program then switches back to G99 for the final hole. This strategic use of G98 and G99 optimizes cycle time while ensuring safe tool movement.

Read  Can you plasma cut aluminum?

G98 and G99 on lathes: Precision feedrate control

On lathes, G98 and G99 serve a different but equally crucial function. They control the feedrate mode, allowing for precise adjustment of cutting speeds. This capability is essential for achieving desired surface finishes and maintaining tool life.

G98 sets the feedrate in units per minute. For instance, F100 with G98 active would result in a feedrate of 100 inches per minute. This mode is useful for operations where a consistent linear speed is desired.

G99, conversely, sets the feedrate in units per revolution. With G99 active, F0.004 would mean 4 thousandths of an inch per spindle revolution. This mode is particularly advantageous when working with varying spindle speeds or when a consistent chip load is required.

The choice between G98 and G99 on lathes depends on the specific machining operation and desired outcome. G99 is often preferred for its ability to maintain consistent chip formation regardless of spindle speed changes.

Practical applications of G98 and G99

The strategic use of G98 and G99 can significantly impact machining efficiency and quality. In milling operations, these codes are crucial for navigating around fixtures and optimizing cycle times. For instance, when drilling multiple holes on a workpiece with clamps, G98 can be used to clear the clamps, while G99 can be employed for faster movements between unobstructed holes.

Consider the following scenario:

OperationG-codeRetraction HeightPurpose
Hole 1G99R-planeFast retraction
Hole 2G99R-planeFast retraction
Hole 3G98Initial Z-planeClear clamp
Hole 4G99R-planeFast retraction

This approach minimizes cycle time while ensuring safe tool movement. It’s important to note that G98 and G99 are modal, meaning they remain active until changed. Programmers must be mindful of this when sequencing operations.

Read  Top Industries Utilizing CNC Machining Services

In lathe operations, the choice between G98 and G99 affects the consistency of chip formation and surface finish. G99 (feedrate per revolution) is often preferred for turning operations as it maintains a consistent chip load regardless of diameter changes.

“I use G98 as a safety to clear clamps and fixtures,” states Pete, an experienced CNC programmer.

This statement underscores the importance of G98 in ensuring safe tool movements, particularly in complex setups with multiple fixtures or workholding devices.

Advanced techniques and considerations

While the basic principles of G98 and G99 are straightforward, their effective use in complex machining scenarios requires careful consideration. Advanced CNC programmers often combine these codes with other G-codes to create highly optimized toolpaths.

For instance, G98 and G99 can be used in conjunction with G96 (Constant Surface Speed) on lathes. This combination allows for maintaining optimal cutting conditions across varying diameters while also controlling the feedrate precisely. The result is improved surface finish and tool life.

In milling operations, the choice between G98 and G99 can impact tool wear and machining accuracy. Excessive use of G98 for safety can lead to increased cycle times and potentially more tool wear due to longer air cutting times. Conversely, overly aggressive use of G99 might risk collisions in complex part geometries.

Consider the following best practices:

  • Use G99 as the default for closely spaced holes to minimize cycle time
  • Switch to G98 when clearing obstacles or moving to a new area of the workpiece
  • In deep hole drilling, use G98 for pecking cycles to ensure proper chip evacuation
  • For lathe operations, match G98/G99 selection with the appropriate spindle speed control (G96/G97)

By mastering these advanced techniques, CNC programmers can significantly enhance machining efficiency and quality. The key lies in understanding the machining context and applying G98 and G99 judiciously to balance safety, speed, and precision.