G-Code Mappings Table

Enum

Value

Code

Description

BedTemperature.CELSIUS

celsius

M140

Set bed temperature, celsius

BedTemperature.KELVIN

kelvin

M140

Set bed temperature, kelvin

ChamberTemperature.CELSIUS

celsius

M141

Set chamber temperature, celsius

ChamberTemperature.KELVIN

kelvin

M141

Set chamber temperature, kelvin

CoolantMode.MIST

mist

M07

Turn on coolant, mist

CoolantMode.FLOOD

flood

M08

Turn on coolant, flood

CoolantMode.OFF

off

M09

Turn off coolant

DistanceMode.ABSOLUTE

absolute

G90

Set distance mode, absolute

DistanceMode.RELATIVE

relative

G91

Set distance mode, relative

ExtrusionMode.ABSOLUTE

absolute

M82

Set extrusion mode, absolute

ExtrusionMode.RELATIVE

relative

M83

Set extrusion mode, relative

FanMode.COOLING

cooling

M106

Set fan speed

FanMode.OFF

off

M106

Turn off fan

FeedMode.INVERSE_TIME

1/time

G93

Set feed rate mode, inverse time

FeedMode.UNITS_PER_MINUTE

units/min

G94

Set feed rate mode, units per minute

FeedMode.UNITS_PER_REVOLUTION

units/rev

G95

Set feed rate mode, units per revolution

HaltMode.PAUSE

pause

M00

Pause program, forced

HaltMode.OPTIONAL_PAUSE

optional-pause

M01

Pause program, optional

HaltMode.END_WITHOUT_RESET

end-without-reset

M02

End of program, no reset

HaltMode.END_WITH_RESET

end-with-reset

M30

End of program, stop and reset

HaltMode.PALLET_EXCHANGE

pallet-exchange

M60

Exchange pallet and end program

HaltMode.WAIT_FOR_BED

wait-for-bed

M190

Wait for bed to reach temperature

HaltMode.WAIT_FOR_HOTEND

wait-for-hotend

M109

Wait for hotend to reach temperature

HaltMode.WAIT_FOR_CHAMBER

wait-for-chamber

M191

Wait for chamber to reach temperature

HaltMode.WAIT_FOR_MOTION

wait-for-motion

M400

Wait for all moves to finish

HotendTemperature.CELSIUS

celsius

M104

Set hotend temperature, celsius

HotendTemperature.KELVIN

kelvin

M104

Set hotend temperature, kelvin

LengthUnits.INCHES

inches

G20

Set length units, inches

LengthUnits.MILLIMETERS

millimeters

G21

Set length units, millimeters

Plane.XY

xy

G17

Select plane, XY

Plane.YZ

yz

G19

Select plane, YZ

Plane.ZX

zx

G18

Select plane, ZX

PositioningMode.RAPID

rapid

G00

Rapid positioning

PositioningMode.LINEAR

linear

G01

Linear interpolation

PositioningMode.OFFSET

offset

G92

Set axis position

PositioningMode.HOME

home

G28

Auto-home axes

PowerMode.CONSTANT

constant

M03

Start tool, constant power

PowerMode.DYNAMIC

dynamic

M04

Start tool, dynamic power

PowerMode.OFF

off

M05

Stop tool

ProbingMode.TOWARDS

towards

G38.2

Probe towards

ProbingMode.TOWARDS_NO_ERROR

towards-no-error

G38.3

Probe towards, no error

ProbingMode.AWAY

away

G38.4

Probe away

ProbingMode.AWAY_NO_ERROR

away-no-error

G38.5

Probe away, no error

QueryMode.TEMPERATURE

temperature

M105

Get current temperature

QueryMode.POSITION

position

M114

Get current position

SpinMode.CLOCKWISE

clockwise

M03

Start tool, clockwise

SpinMode.COUNTER

counter

M04

Start tool, counterclockwise

SpinMode.OFF

off

M05

Stop tool

TimeUnits.SECONDS

seconds

G04

Sleep for a while, seconds

TimeUnits.MILLISECONDS

milliseconds

G04

Sleep for a while, milliseconds

ToolSwapMode.AUTOMATIC

automatic

M06

Tool change, automatic

ToolSwapMode.MANUAL

manual

M06

Tool change, manual