Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
# cf. http://linuxcnc.org/docs/2.7/html/gcode.html
F:
meaning: Set feed rate
# Motion (X Y Z A B C U V W apply to all motions)
G0:
meaning: Rapid Move
G1:
meaning: Linear Move
G23:
meaning: Arc Move
parameters: I J K or R, P
G3:
meaning: Arc Move
parameters: I J K or R, P
G4:
meaning: Dwell
parameters: P
G5:
meaning: Cubic Spline
parameters: I J P Q
G5.1:
meaning: Quadratic Spline
parameters: I J
G5.2:
meaning: NURBS
parameters: P L
G38.2:
meaning: Straight Probe
G38.3:
meaning: Straight Probe
G38.4:
meaning: Straight Probe
G38.5:
meaning: Straight Probe
G33:
meaning: Spindle Synchronized Motion
parameters: K
G33.1:
meaning: Rigid Tapping
parameters: K
G80:
meaning: Cancel Canned Cycle
# Canned cycles (X Y Z or U V W apply to canned cycles, depending on active plane)
G81:
meaning: Drilling Cycle
parameters: R L (P)
G82:
meaning: Drilling Cycle, Dwell
parameters: R L (P)
G83:
meaning: Drilling Cycle, Peck
parameters: R L Q
G73:
meaning: Drilling Cycle, Chip Breaking
parameters: R L Q
G85:
meaning: Boring Cycle, Feed Out
parameters: R L (P)
G89:
meaning: Boring Cycle, Dwell, Feed Out
parameters: R L (P)
G76:
meaning: Threading Cycle
parameters: P Z I J R K Q H L E
# Distance Mode
G90:
meaning: Distance Mode
G91:
meaning: Distance Mode
G90.1:
meaning: Arc Distance Mode
G91.1:
meaning: Arc Distance Mode
G7:
meaning: Lathe Diameter Mode
G8:
meaning: Lathe Radius Mode
# Feed Rate Mode
G93:
meaning: Feed Rate Mode
G94:
meaning: Feed Rate Mode
G95:
meaning: Feed Rate Mode
# Spindle Control
M3:
meaning: Spindle Control
parameters: S
M4:
meaning: Spindle Control
parameters: S
M5:
meaning: Spindle Control
parameters: S
M19:
meaning: Orient Spindle
G96:
meaning: Spindle Control Mode
parameters: S D
G97:
meaning: Spindle Control Mode
parameters: S D
# Coolant
M7:
meaning: Coolant Control
M8:
meaning: Coolant Control
M9:
meaning: Coolant Control
# Tool Length Offset
G43:
meaning: Tool Length Offset
parameters: H
G43.1:
meaning: Dynamic Tool Length Offset
G43.2:
meaning: Apply additional Tool Length Offset
parameters: H
G49:
meaning: Cancel Tool Length Compensation
# Stopping
M0:
meaning: Program Pause
M1:
meaning: Program Pause
M2:
meaning: Program End
M30:
meaning: Program End
M60:
meaning: Pallet Change Pause
# Units
G20:
meaning: Units (inch, mm)
G21:
meaning: Units (inch, mm)
# Plane Selection: (affects G2, G3, G81…G89, G40…G42)
G17:
meaning: Plane Select
G17.1:
meaning: Plane Select
G18:
meaning: Plane Select
G18.1:
meaning: Plane Select
G19:
meaning: Plane Select
G19.1:
meaning: Plane Select
# Cutter Radius Compensation
G40:
meaning: Compensation Off
G41:
meaning: Cutter Compensation
parameters: D
G42:
meaning: Cutter Compensation
parameters: D
G41.1:
meaning: Dynamic Cutter Compensation
parameters: D L
G42.1:
meaning: Dynamic Cutter Compensation
parameters: D L
# Path Control Mode
G61.1:
meaning: Exact Path Mode
G61.1:
meaning: Exact Path Mode
G64:
meaning: Path Blending
parameters: P Q
# Return Mode in Canned Cycles
G98:
meaning: Canned Cycle Return Level
G99:
meaning: Canned Cycle Return Level
# Other Modal Codes
F:
meaning: Set Feed Rate
S:
meaning: Set Spindle Speed
T:
meaning: Select Tool)
M48, M49:
meaning: Speed and Feed Override Control
M50:
meaning: Feed Override Control
parameters: P0 (off) or P1 (on)
M51:
meaning: Spindle Speed Override Control
parameters: P0 (off) or P1 (on)
M52:
meaning: Adaptive Feed Control
parameters: P0 (off) or P1 (on)
M53:
meaning: Feed Stop Control
parameters: P0 (off) or P1 (on)
G54-G59.3:
meaning: Select Coordinate System
# Flow-control Codes
## o sub:
## meaning: Subroutines, sub/endsub call
## o while:
## meaning: Looping, while/endwhile do/while
## o if:
## meaning: Conditional, if/else/endif
## o repeat:
## meaning: Repeat a loop of code
## '[]':
## meaning: Indirection
## o call:
## meaning: Call named file
M70:
meaning: Save modal state
M71:
meaning: Invalidate stored state
M72:
meaning: Restore modal state
M73:
meaning: Save and Auto-restore modal state
# Input/Output Codes
M62:
meaning: Digital Output Control
M63:
meaning: Digital Output Control
M64:
meaning: Digital Output Control
M65:
meaning: Digital Output Control
parameters: P
M66:
meaning: Wait on Input
parameters: P E L Q
M67:
meaning: Analog Output,Synchronized
parameters: T
M68:
meaning: Analog Output, Immediate
parameters: T
# Non-modal Codes
M6:
meaning: Tool Change
parameters: T
M61:
meaning: Set Current Too
l # Q
G10 L1:
meaning: Set Tool Table
parameters: P Q R
G10 L10:
meaning: Set Tool Table
parameters: P
G10 L11:
meaning: Set Tool Table
parameters: P
G10 L2:
meaning: Set Coordinate System
parameters: P R
G10 L20:
meaning: Set Coordinate System
parameters: P
G28:
meaning: Go/Set Predefined Position
G28.1:
meaning: Go/Set Predefined Position
G30:
meaning: Go/Set Predefined Position
G30.1:
meaning: Go/Set Predefined Position
G53:
meaning: Move in Machine Coordinates
G92:
meaning: Coordinate System Offset
G92.1:
meaning: Reset G92 Offsets
G92.2:
meaning: Reset G92 Offsets
G92.3:
meaning: Restore G92 Offsets
M101 - M199: # Don't expand !
meaning: User Defined Commands
parameters: P Q
S:
meaning: Set spindle speed
T:
meaning: Select tool