Sinumerik 840D and 840D sl G commands sorted by G group: motion, planes, offsets, frames, feed types, continuous-path mode and the keyword commands that share the groups.
On a Sinumerik control, G commands are organized in numbered G groups. Only one command per group can be written in a block. A command stays active until another command of the same group replaces it (modal), or it acts only in its own block (non-modal). Many groups contain keywords instead of G numbers, for example TRANS, BRISK or CUT2D.
This page lists the groups that matter for everyday milling and turning. Groups for punching, nibbling, grinding, spline transitions and OEM extensions are left out. The “Default” column shows the command that is active after power-on, reset or program end in the delivery state. The machine builder can change these defaults, so the actual state on a machine may differ.
Machining cycles such as CYCLE81 are described on the page Cycles.
Differences to Fanuc-style G-codes
Several numbers have a different meaning than on Fanuc controls. G70/G71 select inch/metric (Fanuc: G20/G21). G74 is a reference point approach and G75 a fixed-point approach, they are no cycles. G500 deselects the work offset. G53 is non-modal and switches off the programmable and settable frames for one block. Leading zeros are optional, G0 and G00 are the same command.
Essential G-codes
Command
Description
G0
Rapid traverse
G1
Straight line at feedrate
G2
Arc, clockwise
G3
Arc, counterclockwise
G4
Dwell
G17
Working plane X/Y, tool axis Z
G18
Working plane Z/X, tool axis Y
G40
Cutter radius compensation off
G41
Cutter radius compensation, tool left of the contour
G42
Cutter radius compensation, tool right of the contour
G54
Work offset 1
G500
Work offset deselected
G64
Continuous-path mode
G71
Metric input
G90
Absolute dimensions
G91
Incremental dimensions
G94
Feed in mm/min
G95
Feed in mm/rev
G96
Constant cutting speed
G97
Constant spindle speed
Full reference
Type: m = modal, s = non-modal (block by block).
Group 1: Modal motion commands
Command
Description
Type
Default
G0
Rapid traverse
m
G1
Linear interpolation at feedrate
m
Yes
G2
Circular interpolation clockwise
m
G3
Circular interpolation counterclockwise
m
CIP
Arc defined by an intermediate point and end point
m
CT
Arc that continues tangentially from the previous element
m
ASPLINE
Akima spline
m
BSPLINE
B-spline
m
CSPLINE
Cubic spline
m
POLY
Polynomial interpolation
m
G33
Thread cutting, constant lead
m
G34
Thread cutting, lead increasing linearly
m
G35
Thread cutting, lead decreasing linearly
m
G331
Rigid tapping, cutting move
m
G332
Rigid tapping, return move
m
INVCW
Involute, clockwise
m
INVCCW
Involute, counterclockwise
m
G335
Convex thread, clockwise
m
G336
Convex thread, counterclockwise
m
Group 2: Non-modal motion and dwell
Command
Description
Type
Default
G4
Dwell time
s
G63
Tapping with compensating chuck, no synchronization
s
G74
Approach reference point
s
G75
Approach fixed point
s
G147
Soft approach on a straight line
s
G247
Soft approach on a quarter circle
s
G347
Soft approach on a semicircle
s
G148
Soft departure on a straight line
s
G248
Soft departure on a quarter circle
s
G348
Soft departure on a semicircle
s
REPOSL, REPOSQ, REPOSH
Return to the contour after an interruption (straight, quarter circle, semicircle)
s
REPOSA, REPOSQA, REPOSHA
As above, moving all axes
s
G5, G7
Oblique plunge grinding and its compensating move
s
Group 3: Programmable frames, limits and pole
Command
Description
Type
Default
TRANS
Programmable zero offset, replaces previous programmable frame
s
ATRANS
Programmable zero offset, added to the current frame