CNC Programming G and M Codes Reference

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/113

flashcard set

Earn XP

Description and Tags

A comprehensive list of G-codes, M-codes, and programming keywords for CNC tool motion and machine function control.

Last updated 7:44 AM on 7/17/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

114 Terms

1
New cards

G00

Rapid move (not cutting)

2
New cards

G01

Linear move

3
New cards

G02

Clockwise circular motion

4
New cards

G03

Counterclockwise circular motion

5
New cards

G04

Dwell

6
New cards

G05

Pause (for operator intervention)

7
New cards

G08

Acceleration

8
New cards

G09

Deceleration

9
New cards

G12

Circular Pocket Milling Clockwise

10
New cards

G13

Circular Pocket Milling Counterclockwise

11
New cards

G17

x-y plane for circular interpolation

12
New cards

G18

z-x plane for circular interpolation

13
New cards

G19

y-z plane for circular interpolation

14
New cards

G20

turning cycle or inch data specification

15
New cards

G21

thread cutting cycle or metric data specification

16
New cards

G24

face turning cycle

17
New cards

G25

wait for input to go low

18
New cards

G26

wait for input to go high

19
New cards

G28

return to reference point

20
New cards

G29

return from reference point

21
New cards

G31

Stop on input

22
New cards

G33-35

thread cutting functions

23
New cards

G37

Tangential entrance

24
New cards

G38

Tangential exit

25
New cards

G40

cutter compensation cancel

26
New cards

G41

cutter compensation to the left

27
New cards

G42

cutter compensation to the right

28
New cards

G43

tool length compensation, positive

29
New cards

G44

tool length compensation, negative

30
New cards

G50

Preset position

31
New cards

G70

set inch based units or finishing cycle

32
New cards

G71

set metric units or stock removal

33
New cards

G72

indicate finishing cycle or 3D circular interpolation clockwise

34
New cards

G73

turning cycle contour or 3D circular interpolation counter clockwise

35
New cards

G74

facing cycle contour

36
New cards

G74.1

disable 360360 deg arcs

37
New cards

G75

pattern repeating

38
New cards

G75.1

enable 360360 degree arcs

39
New cards

G76

deep hole drilling, cut cycle in z-axis

40
New cards

G77

cut-in cycle in x-axis

41
New cards

G78

multiple threading cycle

42
New cards

G80

fixed cycle cancel

43
New cards

G81

drilling cycle

44
New cards

G82

straight drilling cycle with dwell

45
New cards

G83

drilling cycle or peck drilling cycle

46
New cards

G84

taping cycle

47
New cards

G85

reaming cycle or boring cycle

48
New cards

G86

boring with spindle off and dwell cycle

49
New cards

G89

boring cycle with dwell

50
New cards

G90

absolute dimension program

51
New cards

G91

incremental dimensions

52
New cards

G92

Spindle speed limit

53
New cards

G93

Coordinate system setting

54
New cards

G94

Feed rate in ipmipm

55
New cards

G95

Feed rate in ipripr

56
New cards

G96

Surface cutting speed

57
New cards

G97

Rotational speed rpmrpm

58
New cards

G98

withdraw the tool to the starting point or feed per minute

59
New cards

G99

withdraw the tool to a safe plane or feed per revolution

60
New cards

G101

Spline interpolation

61
New cards

M00

program stop

62
New cards

M01

optional stop using stop button

63
New cards

M02

end of program

64
New cards

M03

spindle on CW

65
New cards

M04

spindle on CCW

66
New cards

M05

spindle off

67
New cards

M06

tool change

68
New cards

M07

flood with coolant

69
New cards

M08

mist with coolant or turn on accessory

70
New cards

M09

coolant off or turn off accessory

71
New cards

M10

turn on accessory

72
New cards

M11

turn off accessory or tool change

73
New cards

M17

subroutine end

74
New cards

M20

tailstock back or Chain to next program

75
New cards

M21

tailstock forward

76
New cards

M22

Write current position to data file

77
New cards

M25

open chuck or set output #11 off

78
New cards

M26

close chuck or set output #11 on

79
New cards

M30

end of tape (rewind)

80
New cards

M35

set output #22 off

81
New cards

M36

set output #22 on

82
New cards

M38

put stepper motors on low power standby

83
New cards

M47

restart a program continuously, or a fixed number of times

84
New cards

M71

puff blowing on

85
New cards

M72

puff blowing off

86
New cards

M96

compensate for rounded external curves

87
New cards

M97

compensate for sharp external curves

88
New cards

M98

subprogram call

89
New cards

M99

return from subprogram, jump instruction

90
New cards

M101

move x-axis home

91
New cards

M102

move y-axis home

92
New cards

M103

move z-axis home

93
New cards

Annn

an orientation, or second x-axis spline control point

94
New cards

Bnnn

an orientation, or second y-axis spline control point

95
New cards

Cnnn

an orientation, or second z-axis spline control point, or chamfer

96
New cards

Fnnn

a feed value (in ipmipm or m/sm/s, not ipripr), or thread pitch

97
New cards

Innn

x-axis center for circular interpolation, or first x-axis spline control point

98
New cards

Jnnn

y-axis center for circular interpolation, or first y-axis spline control point

99
New cards

Knnn

z-axis center for circular interpolation, or first z-axis spline control point

100
New cards

Lnnn

arc angle, loop counter and program cycle counter