CNC MACHINISTTRAINING

FEATURE

G-Codes List for CNC Machine Programming

G-codes are preparatory commands used in CNC programs. They set the machine control to a particular mode or operation. A CNC machinist must understand when to use each command to produce a part efficiently.

The following G-codes are used on many modern CNC milling machines:

  • G00 – Rapid positioning
  • G01 – Linear interpolation
  • G02 – Clockwise circular interpolation
  • G03 – Counterclockwise circular interpolation
  • G04 – Dwell; use as a separate block
  • G05 – High-speed machining or look-ahead on Fanuc controls
  • G09 – Exact-stop check for one block
  • G10 – Programmable data input or data setting
  • G11 – Cancel data-setting mode
  • G15 – Cancel polar-coordinate command
  • G16 – Polar-coordinate command
  • G17 – Select the XY plane
  • G18 – Select the ZX plane
  • G19 – Select the YZ plane
  • G20 – Input in imperial units
  • G21 – Input in metric units
  • G22 – Stored-stroke check on
  • G23 – Stored-stroke check off
  • G25 – Spindle-speed fluctuation detection on
  • G26 – Spindle-speed fluctuation detection off
  • G27 – Machine-zero position check
  • G28 – Return to machine zero or reference point 1
  • G29 – Return from machine zero
  • G30 – Return to machine zero or reference point 2
  • G31 – Skip function
  • G40 – Cancel cutter-radius compensation
  • G41 – Cutter-radius compensation left
  • G42 – Cutter-radius compensation right
  • G43 – Positive tool-length compensation
  • G44 – Negative tool-length compensation
  • G45 – Position compensation, single increase
  • G46 – Position compensation, single decrease
  • G47 – Position compensation, double increase
  • G48 – Position compensation, double decrease
  • G49 – Cancel tool-length offset
  • G50 – Cancel scaling
  • G51 – Scaling
  • G52 – Set a local coordinate system
  • G53 – Machine coordinate system
  • G54 – Work-coordinate offset 1
  • G55 – Work-coordinate offset 2
  • G56 – Work-coordinate offset 3
  • G57 – Work-coordinate offset 4
  • G58 – Work-coordinate offset 5
  • G59 – Work-coordinate offset 6
  • G60 – Single-direction positioning
  • G61 – Exact-stop mode
  • G62 – Automatic corner-override mode
  • G63 – Tapping mode
  • G64 – Cutting mode
  • G65 – Custom macro call
  • G66 – Modal custom macro call
  • G67 – Cancel modal custom macro call
  • G68 – Coordinate-system rotation
  • G69 – Cancel coordinate-system rotation
  • G73 – High-speed peck-drilling cycle for deep holes
  • G74 – Left-hand threading cycle
  • G76 – Fine-boring cycle
  • G80 – Cancel fixed cycle
  • G81 – Drilling cycle
  • G82 – Spot-drilling cycle
  • G83 – Peck-drilling cycle for deep holes
  • G84 – Right-hand threading cycle
  • G85 – Boring cycle
  • G86 – Boring cycle
  • G87 – Back-boring cycle
  • G88 – Boring cycle
  • G89 – Boring cycle
  • G90 – Absolute-dimensioning mode
  • G91 – Incremental-dimensioning mode
  • G92 – Tool-position register
  • G98 – Return to the initial level during a fixed cycle
  • G99 – Return to the R-level during a fixed cycle

Using Multiple G-Codes

Two compatible G-codes may appear in the same program block. For example, G00 and G90 can be combined to move rapidly to a position using absolute coordinates.

G-code behavior and availability vary by controller and machine. Always confirm commands against the programming manual for the specific CNC machine before running a program.

5.0 out of 5Based on 1 rating