MachineMate List of NC Programming Codes

NC Programming as per ISO (DIN 66025) and RS274

G codes simple definition
G 000 Rapid traverse
G 001 Linear interpolation with feedrate
G 002 Circular interpolation (clockwise)
G 003 Circular interpolation (counter clockwise)
G2/G3 Helical interpolation
G 004 Dwell time in milliseconds
G 005 Spline definition
G 006 Spline interpolation
G 007 Tangential circular interpolation / Helix interpolation / Polygon interpolation / Feedrate interpolation
G 008 Ramping function at block transition / Look ahead "off"
G 009 No ramping function at block transition / Look ahead "on"
G 010 Stop dynamic block preprocessing
G 011 Stop interpolation during block preprocessing
G 012 Circular interpolation (cw) with radius
G 013 Circular interpolation (ccw) with radius
G 014 Polar coordinate programming, absolute
G 015 Polar coordinate programming, relative
G 016 Definition of the pole point of the polar coordinate system
G 017 Selection of the X, Y plane
G 018 Selection of the Z, X plane
G 019 Selection of the Y, Z plane
G 020 Selection of a freely definable plane
G 021 Parallel axes "on"
G 022 Parallel axes "off"
G 024 Safe zone programming; lower limit values
G 025 Safe zone programming; upper limit values
G 026 Safe zone programming "off"
G 027 Safe zone programming "on"
G 033 Thread cutting with constant pitch
G 034 Thread cutting with dynamic pitch
G 035 Oscillation configuration
G 038 Mirror imaging "on"
G 039 Mirror imaging "off"
G 040 Path compensations "off"
G 041 Path compensation left of the work piece contour
G 042 Path compensation right of the work piece contour
G 043 Path compensation left of the work piece contour with altered approach
G 044 Path compensation right of the work piece contour with altered approach
G 050 Scaling
G 051 Part rotation; programming in degrees
G 052 Part rotation; programming in radians
G 053 Zero offset off
G 054 Zero offset #1
G 055 Zero offset #2
G 056 Zero offset #3
G 057 Zero offset #4
G 058 Zero offset #5
G 059 Zero offset #6
G 063 Feed / spindle override not active
G 066 Feed / spindle override active
G 070 Inch format active
G 071 Metric format active
G 072 Interpolation with precision stop "off"
G 073 Interpolation with precision stop "on"
G 074 Move to home position
G 075 Curvature function activation
G 076 Curvature acceleration limit
G 078 Normalcy function "on" (rotational axis orientation)
G 079 Normalcy function "off"
G 080 Canned cycle "off"
G 081 Drilling to final depth canned cycle
G 082 Spot facing with dwell time canned cycle
G 083 Deep hole drilling canned cycle
G 084 Tapping or Thread cutting with balanced chuck canned cycle
G 085 Reaming canned cycle
G 086 Boring canned cycle
G 087 Reaming with measuring stop canned cycle
G 088 Boring with spindle stop canned cycle
G 089 Boring with intermediate stop canned cycle
G 090 Absolute programming
G 091 Incremental programming
G 092 Position preset
G 093 Constant tool circumference velocity "on" (grinding wheel)
G 094 Feed in mm / min (or inch / min)
G 095 Feed per revolution (mm / rev or inch / rev)
G 096 Constant cutting speed "on"
G 097 Constant cutting speed "off"
G 098 Positioning axis signal to PLC
G 099 Axis offset

G 100 Polar transformation "off"
G 101 Polar transformation "on"
G 102 Cylinder barrel transformation "on"; cartesian coordinate system
G 103 Cylinder barrel transformation "on," with real-time-radius compensation (RRC)
G 104 Cylinder barrel transformation with center line migration (CLM) and RRC
G 105 Polar transformation "on" with polar axis selections
G 106 Cylinder barrel transformation "on" polar-/cylinder-coordinates
G 107 Cylinder barrel transformation "on" polar-/cylinder-coordinates with RRC
G 108 Cylinder barrel transformation polar-/cylinder-coordinates with CLM and RRC
G 109 Axis transformation programming of the tool depth
G 110 Power control axis selection/channel 1
G 111 Power control pre-selection V1, F1, T1/channel 1 (Voltage, Frequency, Time)
G 112 Power control pre-selection V2, F2, T2/channel 1
G 113 Power control pre-selection V3, F3, T3/channel 1
G 114 Power control pre-selection T4/channel 1
G 115 Power control pre-selection T5/channel 1
G 116 Power control pre-selection T6/pulsing output
G 117 Power control pre-selection T7/pulsing output
G 120 Axis transformation; orientation changing of the linear interpolation rotary axis
G 121 Axis transformation; orientation change in a plane
G 125 Electronic gear box; plain teeth
G 126 Electronic gear box; helical gearing, axial
G 127 Electronic gear box; helical gearing, tangential
G 128 Electronic gear box; helical gearing, diagonal
G 130 Axis transformation; programming of the type of the orientation change
G 131 Axis transformation; programming of the type of the orientation change
G 132 Axis transformation; programming of the type of the orientation change
G 133 Zero lag thread cutting "on"
G 134 Zero lag thread cutting "off"
G 140 Axis transformation; orientation designation work piece fixed coordinates
G 141 Axis transformation; orientation designation active coordinates
G 160 ART activation
G 161 ART learning function for velocity factors "on"
G 162 ART learning function deactivation
G 163 ART learning function for acceleration factors
G 164 ART learning function for acceleration changing
G 165 Command filter "on"
G 166 Command filter "off"
G 170 Digital measuring signals; block transfer with hard stop
G 171 Digital measuring signals; block transfer without hard stop
G 172 Digital measuring signals; block transfer with smooth stop
G 175 SERCOS-identification number "write"
G 176 SERCOS-identification number "read"
G 180 Axis transformation "off"
G 181 Axis transformation "on" with not rotated coordinate system
G 182 Axis transformation "on" with rotated / displaced coordinate system
G 183 Axis transformation; definition of the coordinate system
G 184 Axis transformation; programming tool dimensions
G 186 Look ahead; corner acceleration; circle tolerance
G 188 Activation of the positioning axes
G 190 Diameter programming deactivation
G 191 Diameter programming "on" and display of the contact point
G 192 Diameter programming; only display contact point diameter
G 193 Diameter programming; only display contact point actual axes center point

G 200 Corner smoothing "off"
G 201 Corner smoothing "on" with defined radius
G 202 Corner smoothing "on" with defined corner tolerance
G 203 Corner smoothing with defined radius up to maximum tolerance
G 210 Power control axis selection/Channel 2
G 211 Power control pre-selection V1, F1, T1/Channel 2
G 212 Power control pre-selection V2, F2, T2/Channel 2
G 213 Power control pre-selection V3, F3, T3/Channel 2
G 214 Power control pre-selection T4/Channel 2
G 215 Power control pre-selection T5/Channel 2
G 216 Power control pre-selection T6/pulsing output/Channel 2
G 217 Power control pre-selection T7/pulsing output/Channel 2
G 220 Angled wheel transformation "off"
G 221 Angled wheel transformation "on"
G 222 Angled wheel transformation "on" but angled wheel moves before others
G 223 Angled wheel transformation "on" but angled wheel moves after others
G 265 Distance regulation – axis selection
G 270 Turning finishing cycle
G 271 Stock removal in turning
G 272 Stock removal in facing
G 274 Peck finishing cycle
G 275 Outer diameter / internal diameter turning cycle
G 276 Multiple pass threading cycle

G 310 Power control axes selection /channel 3
G 311 Power control pre-selection V1, F1, T1/channel 3
G 312 Power control pre-selection V2, F2, T2/channel 3
G 313 Power control pre-selection V3, F3, T3/channel 3
G 314 Power control pre-selection T4/channel 3
G 315 Power control pre-selection T5/channel 3

G 316 Power control pre-selection T6/pulsing output/Channel 3
G 317 Power control pre-selection T7/pulsing output/Channel 3

Note that some of the above G-codes are not standard. Specific control features, such as laser power control, enable those optional codes.

M codes simple definition
M 000 Unconditional stop
M 001 Conditional stop
M 002 End of program
M 003 Spindle clockwise
M 004 Spindle counterclockwise
M 005 Spindle stop
M 006 Tool change (see Note below)
M 019 Spindle orientation
M 020 Start oscillation (configured by G35)
M 021 End oscillation
M 030 End of program
M 040 Automatic spindle gear range selection
M 041 Spindle gear transmission step 1
M 042 Spindle gear transmission step 2
M 043 Spindle gear transmission step 3
M 044 Spindle gear transmission step 4
M 045 Spindle gear transmission step 5
M 046 Spindle gear transmission step 6
M 070 Spline definition, beginning and end curve 0
M 071 Spline definition, beginning tangential, end curve 0
M 072 Spline definition, beginning curve 0, end tangential
M 073 Spline definition, beginning and end tangential
M 080 Delete rest of distance using probe function, from axis measuring input
M 081 Drive On application block (resynchronize axis position via PLC signal during the block)

M 101 to M108 Turn off fast output byte bit 1 (to 8)
M 109 Turn off all (8) bits in the fast output byte
M 111 to M118 Turn on fast output byte bit 1 (to 8)
M 121 to M128 Pulsate (on/off) fast output byte bit 1 (to 8)
M 140 Distance regulation “on” (configured by G265)
M 141 Distance regulation “off”
M 150 Delete rest of distance using probe function, for a probe input (one of 16, M151-M168)
M 151 to M158 Digital input byte 1 bit 1 (to bit 8) is the active probe input
M 159 PLC cannot define the bit mask for the probe inputs
M 160 PLC can define the bit mask for the probe inputs (up to 16)
M 161 to M168 Digital input byte 2 bit 1 (to bit 8) is the active probe input
M 170 Continue the block processing look ahead of the part program (cancel the M171)
M 171 Stop the block processing look ahead of the probe input part program segment (like a G10)

M 200 Activate the handwheel operation in the automatic mode (to introduce an offset in the program)
M 201 to M208 Select the axis (by number from 1 to 8) for the handwheel operation
M 209 Activate the handwheel operation in the automatic mode, with PLC control of the axis selection
M 210 Deactivate the handwheel input while in the automatic mode
M 211 Deactivate this handwheel feature and also remove the handwheel offset (if any)
M 213 Spindle 2 clockwise
M 214 Spindle 2 counterclockwise
M 215 Spindle 2 stop
M 280 Switchable spindle/rotary axis, rotary axis on, first combination
M 281 Switchable spindle/rotary axis, rotary axis on, second combination
M 290 Switchable spindle/rotary axis, spindle enabled, first combination
M 291 Switchable spindle/rotary axis, spindle enabled, second combination

Note: Other machine functions, like tool change (usually M06) or coolant control, have their M-code value specified by the PLC application not by the CNC software.

Other M-codes (up to M699) can be handled by the PLC application based on the particular machine requirements.

Check the List of Standard Codes

Back to Product Description

Back to Home

Hosted by www.Geocities.ws

1