Skip to content
Contact Get Started

G & M Code List

A code that is not on this list is not skipped. The block stops and the program ends, deliberately: running a move without the compensation or transformation it asked for looks like a normal move right up until it is not.

CodeDoes
G0rapid positioning
G1linear feed
G2 / G3circular feed, clockwise / counter-clockwise
G33thread cutting, constant pitch
G34 / G35thread cutting, increasing / decreasing pitch
G6.2NURBS interpolation
CodeDoes
G17 / G18 / G19working plane XY / XZ / YZ
G20 / G21inches / millimetres
G70 / G71inches / millimetres, the DIN spelling
G90 / G91absolute / incremental
CodeDoes
G93inverse time feed
G94feed per minute
G95feed per revolution
G96constant surface speed
G97direct spindle speed
CodeDoes
G53one block in machine coordinates
G54G59select work coordinate system 1 to 6
G59.1 / G59.2 / G59.3work coordinate system 7 / 8 / 9
G52local coordinate shift
G92set the coordinate system from the current position
G92.1 / G92.2 / G92.3cancel, suspend, restore that shift
G54.4workpiece setting error compensation
G10write an offset; see Tool & Work Offsets
CodeDoes
G40cutter compensation off
G41 / G42cutter compensation left / right
G41.2 / G42.23D cutter compensation, left / right
G43 / G44tool length offset, positive / negative
G49tool length offset off
G43.4 / G43.5tool centre point control
G43.8 / G43.9tool direction compensation / retained TCPC
G45G48single and double tool offset increase and decrease
CodeDoes
G73peck drilling, short retract to break the chip
G74left-hand tapping
G76fine boring: orient the spindle and shift clear
G80cancel the cycle
G81drilling
G82drilling with a dwell at the bottom
G83peck drilling, full retract each peck
G84tapping
G85G89boring, in five variants; G87 and G88 run as plain drilling, see Canned Cycles
G98 / G99between holes, return to the initial level / the R plane
G84.2 / G84.3rigid tapping

See Canned Cycles for what each one does at the bottom of the hole and the words they take.

CodeDoes
G50 / G51scaling off / on
G50.1 / G51.1mirroring off / on
G68 / G69coordinate rotation on / off
G68.2tilted working plane
G53.1align the tool to the tilted plane
G7.1cylindrical interpolation
G12.1 / G13.1polar coordinate interpolation on / off
CodeDoes
G61exact stop mode
G62automatic corner override
G64continuous path, velocity-based cornering
G64.1continuous path with geometric corner smoothing; P sets the tolerance
G60single-direction positioning
G9exact stop, this block only
G8acceleration control (DIN dialect)
G5 / G5.1high-speed machining modes
CodeDoes
G27reference position check
G28return to the reference position. Axis words name an intermediate point to pass through, and only the axes named return: G91 G28 Z0. sends Z alone, straight up
G29return from the reference position
G30return to a second reference position, the same way
G31probe until it triggers; see Probing
G22 / G23obstacle protection on / off. Starts on; G23 is refused from a part program
CodeDoes
G4dwell
G63tapping mode
G65call a macro; see Custom Macros

G66, the modal macro call, is not implemented. G38.2 is refused. G31 is the probing move here.

CodeDoes
M0program stop
M1optional stop
M2program end
M30program end and rewind
M3 / M4spindle on, clockwise / counter-clockwise
M5spindle stop
M19spindle orient
M6tool change
M7 / M8mist / flood coolant on
M9coolant off
M50 / M51coolant 3 / coolant 4 on
M10 / M11clamp / unclamp
M34 / M35normal / reduced clamp pressure
M25 / M26tailstock, two positions
M54 / M55tailstock retract / advance
M40M45gear range select
M48 / M49feed and spindle override enable / disable
M60pallet change
M70 / M71punch off / on
M98 / M99call a subprogram / return

A machine may define M codes of its own beyond these; they reach the PLC unchanged.