Sinumerik 840D G-codes: reference by group

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

CommandDescription
G0Rapid traverse
G1Straight line at feedrate
G2Arc, clockwise
G3Arc, counterclockwise
G4Dwell
G17Working plane X/Y, tool axis Z
G18Working plane Z/X, tool axis Y
G40Cutter radius compensation off
G41Cutter radius compensation, tool left of the contour
G42Cutter radius compensation, tool right of the contour
G54Work offset 1
G500Work offset deselected
G64Continuous-path mode
G71Metric input
G90Absolute dimensions
G91Incremental dimensions
G94Feed in mm/min
G95Feed in mm/rev
G96Constant cutting speed
G97Constant spindle speed

Full reference

Type: m = modal, s = non-modal (block by block).

Group 1: Modal motion commands

CommandDescriptionTypeDefault
G0Rapid traversem
G1Linear interpolation at feedratemYes
G2Circular interpolation clockwisem
G3Circular interpolation counterclockwisem
CIPArc defined by an intermediate point and end pointm
CTArc that continues tangentially from the previous elementm
ASPLINEAkima splinem
BSPLINEB-splinem
CSPLINECubic splinem
POLYPolynomial interpolationm
G33Thread cutting, constant leadm
G34Thread cutting, lead increasing linearlym
G35Thread cutting, lead decreasing linearlym
G331Rigid tapping, cutting movem
G332Rigid tapping, return movem
INVCWInvolute, clockwisem
INVCCWInvolute, counterclockwisem
G335Convex thread, clockwisem
G336Convex thread, counterclockwisem

Group 2: Non-modal motion and dwell

CommandDescriptionTypeDefault
G4Dwell times
G63Tapping with compensating chuck, no synchronizations
G74Approach reference points
G75Approach fixed points
G147Soft approach on a straight lines
G247Soft approach on a quarter circles
G347Soft approach on a semicircles
G148Soft departure on a straight lines
G248Soft departure on a quarter circles
G348Soft departure on a semicircles
REPOSL, REPOSQ, REPOSHReturn to the contour after an interruption (straight, quarter circle, semicircle)s
REPOSA, REPOSQA, REPOSHAAs above, moving all axess
G5, G7Oblique plunge grinding and its compensating moves

Group 3: Programmable frames, limits and pole

CommandDescriptionTypeDefault
TRANSProgrammable zero offset, replaces previous programmable frames
ATRANSProgrammable zero offset, added to the current frames
ROTProgrammable rotation, replaces previous programmable frames
AROTProgrammable rotation, added to the current frames
ROTSRotation defined by solid angless
AROTSAdditive rotation by solid angless
SCALEScale factor, replaces previous programmable frames
ASCALEScale factor, added to the current frames
MIRRORMirroring, replaces previous programmable frames
AMIRRORMirroring, added to the current frames
G25Lower working area limit, or minimum spindle speeds
G26Upper working area limit, or maximum spindle speeds
G58Programmable offset, absolute part replaced axis by axiss
G59Programmable offset, additive part replaced axis by axiss
G110Pole referenced to the last programmed positions
G111Pole referenced to the origin of the workpiece coordinate systems
G112Pole referenced to the last valid poles

Group 6: Plane selection

CommandDescriptionTypeDefault
G17Plane of 1st and 2nd geometry axis (X/Y), infeed in ZmYes
G18Plane of 3rd and 1st geometry axis (Z/X), infeed in Ym
G19Plane of 2nd and 3rd geometry axis (Y/Z), infeed in Xm

Group 7: Cutter radius compensation

CommandDescriptionTypeDefault
G40Compensation offmYes
G41Tool runs on the left of the contourm
G42Tool runs on the right of the contourm

Group 8: Settable work offsets

CommandDescriptionTypeDefault
G500Settable work offset offmYes
G54Work offset 1m
G55Work offset 2m
G56Work offset 3m
G57Work offset 4m
G505 to G599Work offsets 5 to 99m

How many of the offsets G505 to G599 exist depends on the machine configuration.

Group 9: Suppressing frames and offsets

CommandDescriptionTypeDefault
G53Programmable and settable frames off for one blocks
G153As G53, also the basic frames offs
SUPAAs G153, also handwheel offsets, external offset, PRESET and overlaid motion offs
SUPDActive tool offsets off for one blocks

Group 10: Exact stop and continuous-path mode

CommandDescriptionTypeDefault
G60Exact stop at each block endmYes
G64Continuous-path modem
G641Continuous-path mode, corners rounded within a programmed distance (ADIS, ADISPOS)m
G642Continuous-path mode, rounding within axis tolerancesm
G643As G642, rounding computed inside the blockm
G644Continuous-path mode, rounding with highest possible dynamicsm
G645As G642, also smoothing tangential block transitionsm

Group 11 and 12: Exact stop details

CommandDescriptionTypeDefault
G9Exact stop in this block onlys
G601Next block starts when the fine exact stop window is reachedmYes
G602Next block starts when the coarse exact stop window is reachedm
G603Next block starts when interpolation of the current block endsm

Group 13: Inch and metric

CommandDescriptionTypeDefault
G70Lengths in inchm
G71Lengths in mmmYes
G700Lengths and feedrates in inch and inch/minm
G710Lengths and feedrates in mm and mm/minm

Group 14: Absolute and incremental

CommandDescriptionTypeDefault
G90Absolute dimensionsmYes
G91Incremental dimensionsm

Single values can be switched for one coordinate: X=AC(20) is absolute, X=IC(5) is incremental, regardless of G90/G91.

Group 15: Feed type and spindle speed mode

CommandDescriptionTypeDefault
G93Inverse time feedm
G94Feed per minute (mm/min, inch/min)mYes
G95Feed per revolution (mm/rev, inch/rev)m
G96Feed per revolution with constant cutting speedm
G97Feed per revolution, constant cutting speed offm
G931Feed given as travel time, constant path velocity offm
G961Feed per minute with constant cutting speedm
G971Feed per minute, constant cutting speed offm
G942Feed per minute, freezes cutting speed or spindle speedm
G952Feed per revolution, freezes cutting speed or spindle speedm
G962Feed per minute or per revolution with constant cutting speedm
G972Feed per minute or per revolution with constant spindle speedm
G973Feed per revolution, constant spindle speed without speed limit (ISO mode)m

Group 16: Feed at curved contours

CommandDescriptionTypeDefault
CFCProgrammed feed applies at the contour, for inside and outside arcsmYes
CFTCPProgrammed feed applies at the tool center pointm
CFINFeed reduced on inside arcs only, outside arcs at center point feedm

Group 17 and 18: Radius compensation at start, end and corners

CommandDescriptionTypeDefault
NORMTool stands perpendicular to the contour at start and end pointmYes
KONTTool travels around the contour point at start and endm
KONTTApproach and departure with constant tangentm
KONTCApproach and departure with constant curvaturem
G450Outside corners with a transition arcmYes
G451Outside corners at the intersection of the offset pathsm

Group 21: Acceleration profile

CommandDescriptionTypeDefault
BRISKAcceleration step without jerk limitationmYes
SOFTJerk-limited accelerationm
DRIVEAcceleration reduced as speed risesm

Group 22: Type of tool radius compensation

CommandDescriptionTypeDefault
CUT2D2½D compensation in the working planemYes
CUT2DF2½D compensation in the plane of the current frame (inclined plane)m
CUT3DC3D compensation, peripheral millingm
CUT3DF3D compensation, face milling with changing orientationm
CUT3DFS3D compensation, face milling with fixed orientation from G17 to G19m
CUT3DFF3D compensation, face milling with fixed orientation from G17 to G19 including frame rotationm
CUT3DCC3D peripheral milling with limiting surface, path on the machined surfacem
CUT3DCCD3D peripheral milling with limiting surface, path of the tool center pointm

Group 23: Collision check at inside contours

CommandDescriptionTypeDefault
CDOFCollision check offmYes
CDONCollision check on, bottlenecks are detectedm
CDOF2Collision check off for 3D peripheral millingm

Group 28 and 29: Working area limit and diameter programming

CommandDescriptionTypeDefault
WALIMONWorking area limit activemYes
WALIMOFWorking area limit offm
DIAMOFRadius programmingmYes
DIAMONDiameter programming, absolute and incremental valuesm
DIAM90Diameter programming for G90, radius for G91m
DIAMCYCOFDiameter programming off during cycle executionm

Group 30 and 39: Block compression and contour accuracy

CommandDescriptionTypeDefault
COMPOFBlock compression offmYes
COMPONCompressor for short linear blocksm
COMPCURVCompressor with constant curvaturem
COMPCADCompressor optimized for surface quality from CAD/CAM datam
COMPSURFCompressor for free-form surfacesm
CPRECOFProgrammable contour accuracy offmYes
CPRECONProgrammable contour accuracy on (value in CTOL)m

Group 47: Language mode

CommandDescriptionTypeDefault
G290Sinumerik modemYes
G291ISO dialect mode (Fanuc-style programs)m

Group 49 and 55: Point-to-point and rapid traverse

CommandDescriptionTypeDefault
CPPath motion, the tool point follows the pathmYes
PTPPoint-to-point, axes move synchronized in machine coordinatesm
PTPG0PTP for G0 only, path motion otherwisem
RTLIONG0 interpolates linearlymYes
RTLIOFG0 moves each axis independentlym

Group 52 and 53: Frame alignment for inclined machining

CommandDescriptionTypeDefault
PAROTOFRotation aligned to the workpiece offmYes
PAROTWorkpiece coordinate system rotated to match the workpiecem
TOROTOFRotation aligned to the tool offmYes
TOROT, TOROTZFrame rotated so Z points along the toolm
TOROTY, TOROTXFrame rotated so Y or X points along the toolm
TOFRAME, TOFRAMEZAs TOROT, frame set on the current tool orientationm
TOFRAMEY, TOFRAMEXAs TOROTY/TOROTX with TOFRAME behaviorm

Group 57 and 59: Corner deceleration and dynamics

CommandDescriptionTypeDefault
FENDNORMCorner deceleration offmYes
G62Slow down at inside corners with radius compensation activem
G621Slow down at every cornerm
DYNNORMStandard dynamic settingsmYes
DYNPOSDynamic settings for positioning and tappingm
DYNROUGHDynamic settings for roughingm
DYNSEMIFINDynamic settings for semi-finishingm
DYNFINISHDynamic settings for finishingm
DYNPRECDynamic settings for precision finishingm