Login to enhance your online experience. Login or Create an Account

G98 and G99 - Canned Cycle Return Level

Details:
When the spindle retracts during canned cycles, there is a choice of how far it retracts:

  1. Retract perpendicular to the selected plane to the position indicated by the R word;
  2. Retract perpendicular to the selected plane to the position that axis was in just before the canned cycle started (unless that position is lower than the position indicated by the R word, in which case use the R word position).

To use option 1, program: G99. To use option 2, program: G98. Remember that the R word has different meanings in absolute distance mode and incremental distance mode.

G98 and G99 - Canned Cycle Return Level

  • G98 Example

    Last Updated Feb 28, 2011
    - Download G98 Code Example   


    (Sample Program G98EX24:)
    (Workpiece Size: X3, Y3, Z1)
    (Tool: Tool #3, 3/8" HSS Drill)
    (Tool Start Position: X0, Y0, Z1)

    N2 G90 G80 G40 G54 G20 G17 G50 G94 G64 (safety block)
    N5 G90 G80 G20
    N10 M06 T3 G43 H3
    N15 M03 S1200
    N20 G00 X1 Y1
    N25 Z0.5
    N30 G98 G81 Z-0.25 R0.25 F3 (Set initial plane to Z0.5)
    N35 X2
    N40 Y2
    N45 X1
    N50 G80 G00 Z1
    N52 X0 Y0
    N55 M05
    N60 M30

  • G99 Example

    Last Updated Feb 28, 2011
    - Download G99 Code Example   


    (Sample Program G99EX25:)
    (Workpiece Size: X3, Y3, Z1)
    (Tool: Tool #3, 1/2" HSS Drill)
    (Tool Start Position: X0, Y0, Z1)

    N2 G90 G80 G40 G54 G20 G17 G50 G94 G64 (safety block)
    N5 G90 G80 G20
    N10 M06 T3 G43 H3
    N15 M03 S1200
    N20 G00 X1 Y1
    N25 Z0.5
    N30 G99 G81 Z-0.25 R0.25 F3 (Set rapid to retract plane)
    N35 X2
    N40 Y2
    N45 X1
    N50 G80 G00 Z1
    N55 X0 Y0
    N60 M05
    N65 M30

  • All Machine Code Reference Examples

    Last Updated Sep 16, 2016
    - Download Machine Code Reference Examples