ABCDEFGHIJKLMNOPQRSTUVWXYZ
1
Please refer to https://snapmaker.github.io/Documentation/gcode/G000-G001 for more G-code reference. This document is not longer maintained.
2
https://snapmaker.github.io/Documentation/gcode/G000-G001
3
4
G-code FormatReply (example)FunctionParametersNote
5
G0, G1G0 [E<pos>] [F<rate>] [X<pos>] [Y<pos>] [Z<pos>]okLinear MoveE<pos>: The length of filament to feed into the extruder between the start and end point
F<rate>: The maximum movement rate of the move between the start and end point.
The feedrate set here applies to subsequent moves that omit this parameter.
X<pos>: A coordinate on the X axis
Y<pos>: A coordinate on the Y axis
Z<pos>: A coordinate on the Z axis
6
G2, G3G2 [E<pos>] [F<rate>] I<offset> J<offset> R<radius> [X<pos>] [Y<pos>] [Z<pos>]okControlled Arc MoveG2 adds a clockwise arc move to the planner; G3 adds a counter-clockwise arc. An arc move starts at the current position and ends at the given XYZ, pivoting around a center-point offset given by I and J or R.

I<offset>: X offset
J<offset>: Y offset
R<radius>: radius
Others the same as G0, G1
7
G4G4 [P<time in ms>] [S<time in sec>]okDwellDwell pauses the command queue and waits for a period of time.

[P<time in ms>], [S<time in sec>]: Amount of time to dwell
8
G28G28 [X] [Y] [Z]X:-4.50 Y:-3.50 Z:-10.00 E:0.00 Count X: -1800 Y:-1400 Z:-4000
ok
Auto Home[X]: Flag to go back to the X axis origin
[Y]: Flag to go back to the Y axis origin
[Z]: Flag to go back to the Z axis origin
9
G90G90okAbsolute Positioning
10
G91G91okRelative Positioning
11
G92G92 [E<pos>] [X<pos>] [Y<pos>] [Z<pos>]okSet PositionSet the current position to the values specified.

[E<pos>]: New extruder position
[X<pos>]: New X axis position
[Y<pos>]: New Y axis position
[Z<pos>]: New Z axis position
12
M3M3 [P<power in percentage>] [S<power in strength>]okLaser On / Spindle OnSet laser power, or spindle speed (clockwise).

[P<power in percentage>]: laser power or spindle speed (clockwise), range from 0 to 100
[S<power in strength>]: laser power or spindle speed (clockwise), range from 0 to 255
13
M5M5okLaser Off / Spindle OffTurn off the laser power / spindle and PWM.
14
M17M17okEnable SteppersEnable power on all stepper motors
15
M18M18okDisable steppersDisable power on all stepper motors
16
M104M104 [S<temp>]okSet Hotend TemperatureSet a new target hot end temperature without waiting
17
M105M105ok T:210.0 /0.0 B:50.0 /0.0Report TemperaturesRequest a temperature report
18
M109M109 [S<temp>]Wait for Hotend Temperature
Sets a new target hot end temperature and waits for the target temperature to be reached.

[S<temp>]: Target temperature.
19
M112M112KILLED.Emergency StopShuts down the machine, turns off all the steppers and heaters.
20
M114M114Get Current Position
21
M140M140 [S<temp>]okSet Bed TemperatureSet a new target heated bed temperature.

[S<temp>]: Target temperature.
22
M190M190 [S<temp>]okWait for Bed TemperatureSets a new target bed temperature and waits for the target temperature to be reached.

[S<temp>]: Target temperature.
23
M206M206 [X<offset>] [Y<offset>] [Z<offset>]okSet Home OffsetsApply a persistent offset to the native home position and coordinate space.

[X<offset>]: X home offset
[Y<offset>]: Y home offset
[Z<offset>]: Z home offset
24
M503M503echo:Steps per unit:
echo: M92 X400.00 Y400.00 Z400.00 E92.60
echo:Maximum feedrates (mm/s):
echo: M203 X300.00 Y300.00 Z5.00 E25.00
...
echo:Home offset (mm):
echo: M206 X-4.50 Y-3.50 Z-8.00
...
ok
Report SettingsPrint a concise report of all current settings (in SRAM) to the host console.
25
M1005M1005Firmware Version: Snapmaker-GD32Base-1.2
Release Date: Dec 18 2017
ok
Firmware InformationMultiple line string representing the firmware version.
26
M1006M1006Tool Head: 3DP
ok
Query Tool HeadQuery tool head type.
27
M1007M1007Homed: YES
Selected origin num: 1
Selected == Current: YES
Origin offset X: 0
Origin offset Y: 0
Origin offset Z: 0
Query Coordinate SystemSM 2.0 only
28
M1009M1009 [X<offset>] [Y<offset>] [Z<offset>]okModify Coordinate OffsetModify coordinate offset between machine coordinate and platform coordinate (for 3D Printing). Can be regarded as a relative postioning version of M206.

[X<offset>]: Offset on the X axis
[Y<offset>]: Offset on the Y axis
[Z<offset>]: Offset on the Z axis
SM Original only
29
M1010M1010 [S<value>]Enclosure: On
ok
Set Enclosure Door DetectionQuery / enable / disable enclosure door detection for laser.

[S<value>]: If value if 1, enable the enclosure door detection, otherwise disable the enclosure door detection. If S option is not specified, the report current status of door detection.
30
31
32
References
33
1Marlin G-code References
34
2LinuxCNC
35
3RepRap G-code Cheat Sheet
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