G-codes List

Code Parameters Description Example
G00 X, Y, Z, A, B, C, F Rapid positioning – moves the tool in a straight line to the specified coordinates at maximum speed.

X, Y, Z, A, B, C – target coordinates [mm]
F – feedrate [mm/min] (optional; if omitted, the machine moves at its maximum feedrate)
G00 X10 Y20.52
Executes a rapid move from the current position to X10 Y20.52 at maximum speed.

G00 X30 Y40 F500
Executes a rapid move from the current position to X30 Y40 using a feedrate of 500 mm/min instead of the maximum speed.
G01 X, Y, Z, A, B, C, F Linear interpolation – moves the tool in a straight line to the specified coordinates at the programmed feedrate.

X, Y, Z, A, B, C – target coordinates [mm]
F – feedrate [mm/min] (optional; if omitted, the machine uses the last feedrate specified for G01, G02, or G03)
G01 X10 Y20.52 F500
Executes a linear interpolation from the current position to X10 Y20.52 at a feedrate of 500 mm/min.

G01 X30 Y40
Executes a linear interpolation from the current position to X30 Y40 using the last specified feedrate.
G02 X, Y, I, J, R, F Circular interpolation, clockwise – moves the tool along a circular path to the specified end coordinates.

The arc can be defined in two ways (do not mix them in one line):
Center offset:
I, J specify offsets from the start point to the circle center. At least one offset is required. Omitting XY executes a full circle.

Radius:
R specifies the circle radius. The sign of R (positive or negative) selects which of the two possible arcs will be executed:
  • Use R+ (positive value) to select the arc with a sweep angle ≤ 180°
  • Use R- (negative value) to select the arc with a sweep angle > 180°
  • The direction of motion (clockwise for G02) is always maintained.

F – feedrate [mm/min]; optional. If omitted, the machine uses the last feedrate specified for G01, G02, or G03.
G02 X30 Y40 I10 J10 F100
Executes a CW arc from the current positon to X30 Y40. The center of the circle is calculated by offsetting from the start point by I10 (in X) and J10 (in Y). The feedrate is set to 100 mm/min

G02 X50 Y60 R15
Executes a clockwise (CW) arc from the current position to X50 Y60 with a radius of 15. Since R is positive, the shorter of the two possible arcs (≤ 180°) is machined, using the last specified feedrate.

G02 X50 Y60 R-15
Executes a clockwise (CW) arc from the current position to X50 Y60 with a radius of 15. Since R is negative, the longer of the two possible arcs (> 180°) is machined, using the last specified feedrate.
G03 X, Y, I, J, R, F Circular interpolation, counterclockwise – moves the tool along a circular path to the specified end coordinates.

The arc can be defined in two ways (do not mix them in one line):
Center offset:
I, J specify offsets from the start point to the circle center. At least one offset is required. Omitting XY executes a full circle.

Radius:
R specifies the circle radius. The sign of R (positive or negative) selects which of the two possible arcs will be executed:
  • Use R+ (positive value) to select the arc with a sweep angle ≤ 180°
  • Use R- (negative value) to select the arc with a sweep angle > 180°
  • The direction of motion (counterclockwisefor for G03) is always maintained.

F – feedrate [mm/min]; optional. If omitted, the machine uses the last feedrate specified for G01, G02, or G03.
G03 X50 Y60 I20 J20
Executes a counterclockwise (CCW) arc from the current position to X50 Y60. The center of the circle is calculated by offsetting from the start point by I20 (in X) and J20 (in Y), using the last specified feedrate.

G03 X50 Y60 R15
Executes a counterclockwise (CCW) arc from the current position to X50 Y60 with a radius of 15 mm. Since R is positive, the shorter of the two possible arcs (≤ 180°) is machined, using the last specified feedrate.

G03 X50 Y60 R-15
Executes a counterclockwise (CCW) arc from the current position to X50 Y60 with a radius of 15 mm. Since R is negative, the longer of the two possible arcs (> 180°) is machined, using the last specified feedrate.
G04 P, S Dwell / Delay Time
P – [ms], S – [s]
G04 P1000
G20 Inch Units G20
G21 Millimeter Units G21
G28 X, Y, Z, A, B, C, M, T, D Return to home position / Reference.
M – Manual, T – Trust, D – Distrust
G28 X0 Y0 Z0
G30 X, Y, Z, F Do a single Z probe at a specified XY position. By default probe in the current position. G30 X100 Y100 F1500 Z-10 F100
G31 X, Y, Z, F Probe. G31 Z-20 F500
G38.2 X, Y, Z, F Probe target. ( Material Detection ) G38.2 Z-15 F500
G53 Machine coordinate system G53 G0 X0 Y0 Z0
G54 Work coordinate system G54
G90 Absolute positioning G90
G91 Incremental positioning G91
G92 X, Y, Z, A, B, C Set the current position to the values specified. G92 X0 Y0 Z0

M-codes List

Code Parameters Description Example
M00 P, S Program stop / Waiting for input signal
P – timeout[ms], S – timeout[s]
M00 S3
M03 I Spindle on, clockwise, Plasma, Laser On
I – inline mode
M03
M04 I Spindle on, counterclockwise
I – inline mode
M04
M05 I Spindle stop, Plasma, Laser Off
I – inline mode
M05
M62 P1-P4, S, I DX Output ON
P1,P2,P3,P4 – Output Number
S – Power [%] ( P1 only )
I – inline mode
M62 P3
M62 P1 S75 I
M63 P1-P4, I DX Output Off
P1,P2,P3,P4 – Output Number
I – inline mode
M63 P2
M205 J Advanced custom code
J – Junction deviation value [mm]
M205 J1.2
M410 E-STOP (injected code) M410
M411 STOP (injected code) M411
M666 I THC OFF
I – inline mode
M666 I
M667 I THC ON
I – inline mode
M667