cnc lathe g codes
CNC Turning Center G Codes


CNC Lathe G Codes


G00 RAPID POSITIONING MOTION (X,Z,U,W,B) (SETTING 10, 101)
G01 LINEAR INTERPOLATION MOTION (X,Z,U,W,B,F)
G01 CHAMFERING AND CORNER ROUNDING (X,Z,U,W,B,I,K,R,A,F)
G02 CW CIRCULAR INTERPOLATION MOTION (X,Z,U,W,I,K,R,F)
G03 CCW CIRCULAR INTERPOLATION MOTION (X,Z,U,W,I,K,R,F)
G04 DWELL (P) (P=seconds”.”milliseconds)
G05 FINE SPINDLE CONTROL MOTION (X,Z,U,W,R,F) (LIVE TOOLING)
G09 EXACT STOP, NON-MODAL
G10 PROGRAMMABLE OFFSET SETTING (X,Z,U,W,L,P,Q,R)
G14 MAIN-SPINDLE SHIFT TO SUB-SPINDLE
G15 MAIN-SPINDLE SHIFT TO SUB-SPINDLE CANCEL
G17 CIRCULAR MOTION XY PLANE SELECTION (G02,G03) (LIVE TOOLING)
G18 CIRCULAR MOTION ZX PLANE SELECTION (G02,G03) (SETTING 56)
G19 CIRCULAR MOTION YZ PLANE SELECTION (G02,G03) (LIVE TOOLING)
G20 VERIFY INCH COORDINATE POSITIONING (SETTING 9 needs to be INCH)
G21 VERIFY METRIC COORDINATE POSITIONING (SETTING 9 needs to be METRIC)
G28 MACHINE ZERO RETURN THRU REF. POINT (X,Z,U,W,B) (Fanuc)
G29 MOVE TO LOCATION THROUGH G29 REF. POINT (X,Z) (Fanuc)
G31 FEED UNTIL SKIP FUNCTION (X,Z,U,W,F)
G32 THREAD CUTTING PATH, MODAL (X,Z,U,W,F)
G40 TOOL NOSE COMPENSATION CANCEL G41/G42 (X,Z,U,W,I,K) (SETTING 56)
G41 TOOL NOSE COMPENSATION, LEFT (X,Z,U,W) (SETTING 43, 44, 58)
G42 TOOL NOSE COMPENSATION, RIGHT (X,Z,U,W) (SETTING 43, 44, 58)
G50 SPINDLE SPEED MAXIMUM RPM LIMIT (S)
G51 RETURN TO MACHINE ZERO, CANCEL OFFSET (Yasnac)
G52 WORK OFFSET COORDINATE POSITIONING (Yasnac)
G52 GLOBAL WORK COORDINATE SYSTEM SHIFT (Fanuc)
G53 MACHINE COORDINATE POSITIONING, NON-MODAL (X,Z,B)
G54 WORK OFFSET COORDINATE POSITIONING #1 (SETTING 56)
G55 WORK OFFSET COORDINATE POSITIONING #2
G56 WORK OFFSET COORDINATE POSITIONING #3
G57 WORK OFFSET COORDINATE POSITIONING #4
G58 WORK OFFSET COORDINATE POSITIONING #5
G59 WORK OFFSET COORDINATE POSITIONING #6
G61 EXACT STOP, MODAL (X,Z)
G64 EXACT STOP G61 CANCEL (SETTING 56)
G65 MACRO SUB-ROUTINE CALL
G70 FINISHING CYCLE (P,Q)
G71 O.D. / I.D. STOCK REMOVAL CYCLE (P,Q,U,W,I,K,D,S,T,R1,F) (SETTING 72, 73)
G72 END FACE STOCK REMOVAL CYCLE (P,Q,U,W,I,K,D,S,T,R1,F) (SETTING 72, 73)
G73 IRREGULAR PATH STOCK REMOVAL CYCLE (P,Q,U,W,I,K,D,S,T,F)
G74 FACE GROOVING, or HIGH SPEED PECK DRILL CYCLE (X,Z,U,W,I,K,D,F) (SETTING 22)
G75 O.D. / I.D. PECK GROOVING CYCLE, (X,Z,U,W,I,K,D,F) (SETTING 22)
G76 THREAD CUTTING CYCLE, MULTIPLE PASS (X,Z,U,W,I,K,A,D,F) (SETTING 86, 95, 96, 99)
G77  FLATTING CYCLE (I,J,L,R,S,K) (LIVE TOOLING)
G80  CANCEL CANNED CYCLE (SETTING 56)
G81 DRILL CANNED CYCLE (X,Z,W,R,F)
G82 SPOT DRILL / COUNTERBORE CANNED CYCLE (X,Z,W,P,R,F)
G83 PECK DRILLING CANNED CYCLE (X,Z,W,I,J,K,Q,P,R,F) (SETTING 22, 52)
G84 TAPPING CANNED CYCLE (X,Z,W,R,F)
G85 BORE IN, BORE OUT CANNED CYCLE (X,Z,U,W,R,L,F)
G86 BORE IN, STOP, RAPID OUT CANNED CYCLE (X,Z,U,W,R,L,F)
G87 BORE IN, STOP, MANUAL RETRACT CANNED CYCLE (X,Z,U,W,R,L,F)
G88 BORE IN, DWELL, MANUAL RETRACT CANNED CYCLE (X,Z,U,W,P,R,L,F)
G89 BORE IN, DWELL, BORE OUT CANNED CYCLE (X,Z,U,W,P,R,L,F)
G90 O.D. / I.D. TURNING CYCLE, MODAL (X,Z,U,W,I,F)
G92 THREADING CYCLE, MODAL (X,Z,U,W,I,F) (SETTING 95, 96)
G94 END FACING CYCLE, MODAL (X,Z,U,W,K,F)
G95  END FACE LIVE TOOLING RIGID TAP (X,Z,W,R,F)
G96 CONSTANT SURFACE SPEED, CSS ON (S)
G97  CONSTANT NON-VARYING SPINDLE SPEED, CSS OFF (S) (SETTING 56)
G98 FEED PER MINUTE (F)
G99  FEED PER REVOLUTION (F) (SETTING 56)
G10  MIRROR IMAGE CANCEL G101
G10  MIRROR IMAGE (X,Z) (SETTING 45, 47)
G10  PROGRAMMABLE OUTPUT TO RS-232 (X,Z)
G10  LIMIT BLOCK LOOKAHEAD (P0 - P15 max. for number control looks ahead)
G10  SERVO BAR COMMAND
G11 G111 WORK OFFSET COORDINATE POSITIONING #7- #8
G11  CARTESIAN TO POLAR TRANSFORMATION
G11  CARTESIAN TO POLAR TRANSFORMATION CANCEL
G11 G129 WORK OFFSET COORDINATE POSITIONING #9 - #24
G15  BACKGROUND PICKUP / PART RETURN
G16  APL AXIS COMMAND MODE ON
G16  APL AXIS COMMAND MODE OFF
G18  REVERSE TAPPING CANNED CYCLE (X,Z,W,R,F) (SETTING 130)
G18  ACCURACY CONTROL FOR HIGH SPEED MACHINING (E) (SETTING 85)
G19  SUB-SPINDLE / TAPPING CANNED CYCLE
G19  LIVE TOOLING VECTOR TAPPING (X,F)
G19  LIVE TOOLING VECTOR TAPPING REVERSE (X,F)
G20  INDEX ON THE FLY (X,Z,U,W,T)