G-code Reference

G0

Control the printer head position as well as the currently selected tool.

Move each axis by the amount and direction depicted.

X = X-axis (mm)

Y = Y-axis (mm)

Z = Z-axis (mm)

E = E-axis (mm)

H = H-axis (mm)

A = A-axis (mm) - only if axis present

B = B-axis (mm) - only if axis present

C = C-axis (mm) - only if axis present

F = move speed (mm/min) - stored until daemon reset

Q = move acceleration (mm/min^2) - stored until daemon reset

G1

Control the printer head position as well as the currently selected tool.

Move each axis by the amount and direction depicted.

X = X-axis (mm)

Y = Y-axis (mm)

Z = Z-axis (mm)

E = E-axis (mm)

H = H-axis (mm)

A = A-axis (mm) - only if axis present

B = B-axis (mm) - only if axis present

C = C-axis (mm) - only if axis present

F = move speed (mm/min) - stored until daemon reset

Q = move acceleration (mm/min^2) - stored until daemon reset

G2

A circular or helical arc, clockwise

Movement in a constant-radius arc; the plane of the arc is selected with G17 (XY-plane), G18 (XZ-plane) or G19 (YZ-plane). The initial endpoint is defined as the current location at the beginning of the command. This command has two formats:

  • Center Format

    The arc is also defined by: (1) second endpoint with coordinates within the selected plane and (2) a center-point with an offset according to the selected plane.

  • Radius Format

    The arc is also defined by: (1) a second endpoint coordinates within the selected plane and (2) a radius Rnnn which is positive to indicate the arc turns less than 180 degrees or negative to indicate the arc turns 180 degrees or more (up to 359.999 degrees).

The axis that is perpendicular to the selected plane defines the helical movement for the arc command.

Plane Endpoint Coordinates Center Format Offsets Helical Axis
XY (G17) Xnnn Ynnn Innn Jnnn Znnn
XZ (G18) Xnnn Znnn Innn Knnn Ynnn
YZ (G19) Ynnn Znnn Jnnn Knnn Xnnn

G3

A circular or helical arc, counter-clockwise

Movement in a constant-radius arc; the plane of the arc is selected with G17 (XY-plane), G18 (XZ-plane) or G19 (YZ-plane). The initial endpoint is defined as the current location at the beginning of the command. This command has two formats:

  • Center Format

    The arc is also defined by: (1) second endpoint with coordinates within the selected plane and (2) a center-point with an offset according to the selected plane.

  • Radius Format

    The arc is also defined by: (1) a second endpoint coordinates within the selected plane and (2) a radius Rnnn which is positive to indicate the arc turns less than 180 degrees or negative to indicate the arc turns 180 degrees or more (up to 359.999 degrees).

The axis that is perpendicular to the selected plane defines the helical movement for the arc command.

Plane Endpoint Coordinates Center Format Offsets Helical Axis
XY (G17) Xnnn Ynnn Innn Jnnn Znnn
XZ (G18) Xnnn Znnn Innn Knnn Ynnn
YZ (G19) Ynnn Znnn Jnnn Knnn Xnnn

G4

Dwell for P (milliseconds) or S (seconds)

Dwell/sleep for a given time. Use either P = milliseconds or S = seconds.

G17

Set arc plane to X / Y

Set arc plane to X / Y

G18

Set arc plane to X / Z

Set arc plane to X / Z

G19

Set arc plane to Y / Z

Set arc plane to Y / Z

G20

Set units to inches

Set units to inches

G21

Set units to millimeters

Set units to millimeters

G28

Move the steppers to their homing position (and find it as well)

Move the steppers to their homing position. The printer will travel a maximum length and directiondefined by travel_*. Delta printers will home both X, Y and Z regardless of whicho of those axes were specified to home.For other printers, one or more axes can be specified. An axis will only be homed if homing of that axis is enabled.

M = Add the offset from the Z-axis provided by the bed matrix

G29

Probe the bed at specified points

Probe the bed at specified points and update the bed compensation matrix based on the found points. Add 'S' to only simulate and thus remove all lines containing the letters 'RFS' (Remove For Simulation).

G29.1

Generate a circular probe pattern

Generate a circular G29 Probing pattern

D = bed_diameter_mm, default: 140

C = Circles, default = 2

P = points_pr_circle, default: 8

S = probe_start_height, default: 6.0

Z = add_zero, default = 1

K = probe_speed, default: 3000.0

B = bed compensation matrix, default:0

G29.2

Generate a square probe pattern for G29

Generate a square G29 Probing pattern

W = bed depth mm, default: 200.0

D = bed depth mm, default: 200.0

P = points in total, default: 16

S = probe start height, default: 6.0

K = probe speed, default: 3000.0

X = probe offset X, default: 0

Y = probe offset y, default: 0

B = bed compensation matrix off, default:1

G30

Probe the bed at current point

Probe the bed at the current position, or if specified, a point previously set by M557. X, Y, and Z starting probe positions can be overridden. (G20 ignored. All units in mm.)

D = sets the probe length (mm), or taken from config if nothing is specified.

F = sets the probe speed. If not present, it's taken from the config.

Q = sets the probe acceleration. If not present, it's taken from the config.

P = the point at which to probe, previously set by M557.

S = save the probed point distance

P and S save the probed bed distance to a list that corresponds with point P

G30.1

Probes the bed at the current point, sets Z0.

Probe the bed at the current position. (G20 ignored. All units in mm.)X, Y, P and S inputs are ignored.

Z = sets the requested Z height at bed level, if not present, set to 0.

D = sets the probe length, or taken from config if nothing is specified.

F = sets the probe speed. If not present, it's taken from the config.

Q = sets the probe acceleration. If not present, it's taken from the config.

G31

Dock sled

Dock sled. This is a macro G-code, so it will read all gcodes that has been defined for it. It is intended to remove or disable the Z-probing mechanism, either by physically removing it as is the case of a servo controlled device, or by disabling power to a probe or simply disabling the switch as an end stop

G32

Undock sled

Undock sled

G33

Autocalibrate a delta printer

Do delta printer autocalibration by probing the points defined in

the G29 macro and then performing a linear least squares optimization to

minimize the regression residuals.

Parameters:

Nn Number of factors to optimize:

3 factors (endstop corrections only)

4 factors (endstop corrections and delta radius) (Default and recommended)

6 factors (endstop corrections, delta radius, and two tower

angular position corrections)

8 factors (endstop corrections, delta radius, two tower angular

position corrections, and two tower radial position

corrections)

9 factors (endstop corrections, delta radius, two tower angular

position corrections, two tower radial position

corrections, and diagonal arm length)

S Do NOT update the printer configuration.

P Print the calculated variables

G34

Measure probe tip Z offset (height distance from print head)

Measure the probe tip Z offset, i.e., the height difference of probe tip

and the print head. Once the print head is moved to touch the bed, this command

lifts the head for Z mm, runs the G32 macro to deploy the probe, and

then probes down until the endstop is triggered. The height difference

is then stored as the [Probe] offset_z configuration parameter.

NOTE: G20 ignored. All units in mm.

Parameters:

Df Probe move maximum length

Ff Probing speed

Af Probing acceleration

Zf Upward move distance before probing (default: 5 mm)

S Simulate only (do not store the results)

G90

Set movement mode to absolute

Set movement mode to absolute

G91

Set movement mode to relative

Set movement mode to relative

G92

Set the current position of steppers without moving them

Set the current position of steppers without moving them

G134

Use the current head poition as offsets

After a G28, jog the print head to where you want it to go after a G28.

Then run this command. This will not allow you to position the head manually.

You can not disable the steppers and move the ehad to where you want.