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

G90 and G91 - Distance Mode

Details:
Interpretation of the CS-code can be in one of two distance modes: absolute or incremental.

To go into absolute distance mode, program: G90. In absolute distance mode, axis numbers (X, Y, Z, A) usually represent positions in terms of the currently active coordinate system. Any exceptions to that rule are described explicitly in this section describing G-codes.

To go into incremental distance mode, program: G91. In incremental distance mode, axis numbers (X, Y, Z, A) usually represent increments from the current values of the numbers.

I and J numbers always represent increments, regardless of the distance mode setting. K numbers represent increments.

  • G90 Example

    Last Updated Feb 28, 2011
    - Download G90 Code Example   


    (Sample Program G90EX21:)
    (Workpiece Size: X4, Y3, Z1)
    (Tool: Tool #2, 1/2" Slot Drill)
    (Tool Start Position: X0, Y0, Z1)

    N2 G90 G80 G40 G54 G20 G17 G50 G94 G64 (safety block)
    N5 G90 G20 (Set to absolute mode)
    N10 M06 T2 G43 H2
    N12 M03 S1200
    N15 G00 X1 Y1
    N20 Z0.125
    N25 G01 Z-0.125 F5
    N30 X3
    N35 Y2
    N40 X1
    N45 Y1
    N50 G00 Z1
    N55 X0 Y0
    N60 M05
    N65 M30

  • G91 Example

    Last Updated Feb 28, 2011
    - Download G91 Code Example   


    (Sample Program G91EX22:)
    (Workpiece Size: X4, Y3, Z1)
    (Tool: Tool #2, 1/4" Slot Drill)
    (Tool Start Position: X0, Y0, Z1)

    N2 G90 G80 G40 G54 G20 G17 G50 G94 G64 (safety block)
    N5 G90 G20
    N10 M06 T2 G43 H2
    N15 M03 S1200
    N20 G00 X1 Y1
    N25 Z0.125
    N30 G01 Z-0.125 F5
    N35 G91 X1 Y1 (Set to incremental mode)
    N40 Y-1
    N45 X1
    N50 Y1
    N55 G90 G00 Z1
    N60 X0 Y0
    N65 M05
    N70 M30

  • All Machine Code Reference Examples

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