G Codes

we will be adding GCode definitions / explanations here. we will also put implementation specific notes here as needed. until then, please see the primer.

Some useful G-Codes are:

  • G0 - Rapid Motion
  • G1 - Coordinated Motion
  • G2 - Arc - Clockwise
  • G3 - Arc - Counter Clockwise
  • G4 - Dwell
  • G20 - Inches as units
  • G21 - Millimeters as units
  • G28 - Go Home
  • G30 - Go Home via Intermediate Point
  • G90 - Absolute Positioning
  • G91 - Incremental Positioning
  • G92 - Set current as home

G-Codes can have all kinds of arguments. Only a few of those are actually used here:

  • X absolute position
  • Y absolute position
  • Z absolute position
  • A position (rotary around X)
  • B position (rotary around Y)
  • C position (rotary around Z)
  • U Relative axis parallel to X
  • V Relative axis parallel to Y
  • W Relative axis parallel to Z
  • M code (another "action" register or Machine code(*)) (otherwise referred to as a "Miscellaneous" function")
  • F feed rate
  • S spindle speed
  • N line number
  • R Arc radius or optional word passed to a subprogram/canned cycle
  • P Dwell time or optional word passed to a subprogram/canned cycle
  • T Tool selection
  • I Arc data X axis
  • J Arc data Y axis.
  • K Arc data Z axis, or optional word passed to a subprogram/canned cycle
  • D Cutter diameter/radius offset
  • H Tool length offset
Unless otherwise stated, the content of this page is licensed under GNU Free Documentation License.