This page gives RepRapFirmware’s codes that set how it moves and extrudes: limits,
overrides, extrusion corrections, input shaping and multiple motion systems, from
the Duet3D G-code dictionary as read on 3 December 2026. The moves themselves and
M92 steps per mm are on
RepRapFirmware motion. RRF
means RepRapFirmware, and version numbers are its versions. In
config.g, settings that name axes beyond X, Y and Z must come after
the M584 that creates those axes.
M201 to M205 and M566: acceleration, speed and jerk
| Command | Parameters | Meaning |
|---|---|---|
M201 | X Y Z U V W; Ea:b…; T | Greatest acceleration per axis and extruder in mm/s². T (3.7 and later, Duet 3 MB6HC only; default 0) is the time in seconds from zero to full acceleration and turns on third-order motion control |
M201.1 | X Y Z; Ea:b… | (3.4) Reduced accelerations in mm/s² (even after G20) for probing and stall detection moves; one E value serves all extruders; alone, reports |
M203 | X Y Z U V W; Ea:b…; S; I | Greatest speeds in mm/min, or mm/s with S1. I (2.03) is the lowest movement speed, default 30 mm/min |
M204 | P, T, S | (1.18) Acceleration in mm/s² for printing moves, travel moves, or both (S, deprecated), applied to the move as a whole on the current tool’s X and Y (including axes the tool maps to them) on top of the M201 limits |
M205 | X Y Z U V W…; Ea:b… | Greatest instantaneous speed change in mm/s, for Marlin compatibility |
M566 | X Y Z E; P | Greatest instantaneous speed change (jerk) in mm/min. P (2.03) is the policy: 0 (default) applies jerk only between two printing or two travel moves that both do, or both do not, move in XY; 1 between any moves. The minimum supported is 0.1 mm/s (2.02) |
Where one axis has several motors on separate drivers, only the first value is
used for all of them; extruders may each differ. When the M201 T
time is not zero, each jerk (rate of change of acceleration) is the greatest
acceleration divided by that time. Third-order motion needs phase stepping on
all local axis and extruder drivers, or second-order motion is used with a
warning; drivers on CAN expansion boards only approximate it.
From 3.6.0 M566 sets both the machine’s jerk limits and the
current job’s, while M205 sets only the job’s and cannot exceed
the machine’s; M205 values are saved in
resurrect.g. Earlier versions kept one set. The lowest speed of
0.5 mm/s by default rises slower commands to it; M203 I changes it,
down to an absolute floor of 0.001 mm/s (0.01 mm/s in 3.6.1 and earlier).
M201 X1000 Y1000 Z100 E2000
M203 X6000 Y6000 Z300 E10000
M204 P500 T2000
M566 X600 Y600 Z50 E600
M206 and M208: offsets and axis limits
M206 X Y Z U V W is deprecated in favour of G10 L2 P1.
The values are subtracted from the coordinates of G0,
G1 and related commands; with workplace coordinates it is
G10 L2 for the current workplace with the values negated.
M208 sets software travel limits, which are also the positions
assumed when an endstop triggers: X Y Z U V W… with
S0 (default) for maxima or S1 for minima, or, from
2.02 and 1.23, min:max pairs. The range is
±(2³¹ − 1) microsteps, with accuracy suffering beyond about ±2²⁴. On deltas only
the Z minimum applies. M500 saves limits found by probing,
endstops or delta calibration. From 3.7, in FFF mode an absolute
G0/G1 without H to a point outside the
limits is an error (earlier it was clipped silently); relative moves are still
clipped unless M564 R0 is set.
M208 X-5:200 Y0:200 Z0:90
M207: firmware retraction
| Parameter | Meaning (used by G10 and G11) |
|---|---|
P | Tool number (3.01 and later); without it all tools. M207 comes after that tool’s M563 |
S | Retraction length in mm, positive |
R | Extra length on un-retraction, may be negative, default 0 |
F | Retraction speed, mm/min |
T | Un-retraction speed if different (1.16) |
Z | Z lift (hop) |
M207 S4.0 F2400 Z0.075
M200, M220 and M221: volumetric extrusion and overrides
| Command | Parameters and effect |
|---|---|
M200 | (1.19) Dd or Da:b…: filament diameter for all or each extruder, making E amounts mm³; a zero disables it. S (3.5) enables or disables it for this input channel. Alone, reports |
M220 S | Speed factor in per cent |
M221 S D | Extrusion factor in per cent (default 100) for extruder D, or all of the current tool |
Each input channel has its own volumetric flag: the state at the end of
config.g is copied to all, and macros save and restore it. Slicer
retractions must then be in mm³ too, while M207 lengths stay mm.
M404 sets a diameter without enabling it.
From 3.7, an M221 from outside the job (web interface, PanelDue,
USB) also applies to queued moves not yet committed (segmentation with
M669 S10 or S20 makes it act sooner); one in the job
or its macros applies only to later moves.
M350, M400 and M425
M350 X Y Z Ea:b…
sets microstepping: 1, 2, 4, 8, 16, 32, 64, 128 or 256 steps per full step.
I1 or I0 turns interpolation on or off for the named
drivers: all Duet 3 boards with on-board drivers and the Duet 2 Maestro
interpolate at any setting, the Duet 2 WiFi and Ethernet only at 16. Steps per
mm are rescaled to match, so M92 may come before it (for x16, the
default) or after (for the new value). It comes after any M584,
does not control external drivers, and alone reports.
M400 waits for all queued moves to finish. S (3.5.0) is
accepted without effect. With multiple motion systems any such wait (also
G4) releases the axes and extruders owned by the motion system,
except X, Y and the current tool’s extruders, unless a homing, probing or tool
change macro is running. From 3.7 the position is re-read from the motors only
after a move that may have stopped short.
M425 (3.5) sets backlash compensation: an axis letter
(X Y Z A B…) with the backlash in mm, and S, 1 to 100
(default 10): the extra steps are spread over at least S times the
backlash of movement; too low risks lost steps. The letters mean motors, not
Cartesian axes (as on CoreXY), all drivers of an axis share the value, and bed
levelling moves after G32 are not compensated. Alone, reports.
M350 X16 Y16 Z16 E16:16 I1
M425 X0.15 Y0.23 S5
M572 and M592: pressure advance and nonlinear extrusion
| Command | Parameters |
|---|---|
M572 | D extruder or extruders (default those of the current tool); S pressure advance in seconds, or from 3.7.0 two values a:b with L, the advance distance above which the second replaces the first. Without S it reports |
M592 | D extruder; A and B coefficients (default 0); L upper limit (default 0.2); T reserved for a temperature. With D only, reports |
Pressure advance moves the extruder ahead or behind in proportion to the
extrusion rate, so slicer retraction may need reducing. Extruder acceleration
should not exceed extruder jerk in mm/s divided by the advance (50 mm/s over
0.02 s gives 2500 mm/s²). Tune input shaping, then pressure advance, then
retraction; from 3.6.0 with input shaping the value may need lowering. Object
model move.extruders[].pressAdv (3.7.0) holds k0,
k1 and d.
M592 is experimental: requested extrusion is multiplied by
1 + min(L, A·v + B·v²), v being the extrusion speed in mm/s. Extruder-only
moves are not adjusted.
M572 D0 S0.9:0.1 L5.0
M592 D0 A0.01 B0.0005
M593: input shaping
| Parameter (RRF 3.6 and later) | Meaning |
|---|---|
P"type" | none, zvd, zvdd, zvddd, mzv, ei2, ei3 or custom, in any case. From 3.7.0, F or S without P keeps the type (3.6 chose ZVD if shaping was off) |
F | Ringing frequency to cancel, 4 to 400 Hz |
S | Damping factor, default 0.05; at most 0.9, EI2 0.3, EI3 0.2 (3.7.0); 0.99 in 3.6 |
L | Ignored |
H | Custom, required, 1 to 4 values: the amplitude of each impulse but the last, summing below 1.0; the last gets the rest |
T | Custom: cumulative delay in seconds of each impulse but the first, positive and rising (3.7.0 rejects others), as many as H; default multiples of half the damped period |
| Versions | Differences |
|---|---|
| 3.4 and 3.5 | The same types; S default 0.1; custom H amplitudes are cumulative and T gives impulse durations. L in 3.5 is the least fraction (0.01 to 1.0, default 0.25) acceleration or speed may be cut to so as to shape; in 3.4 and earlier the least acceleration, default 10 mm/s² |
| 3.3 | P"none" or P"daa" (assumed when only F is given) |
| 2.02 to 3.2 | Only dynamic acceleration adjustment: F in Hz (zero or less disables) and L. It only ever lowers acceleration, to make each phase one or two ringing periods |
| Shaper | Duration | Band cut by at least 90% |
|---|---|---|
| ZV (no longer supported) | 0.5/F | ±6% |
| ZVD | 1/F | ±20% |
| ZVDD | 1.5/F | ±30% |
| ZVDDD | 2/F | ±38% |
| MZV | 0.75/F | ±10% (at least 80% over the wider band given as −18% to +108%) |
| EI2 | 1.5/F | ±39% |
| EI3 | 2/F | ±50% |
Shaping assumes little jerk, so keep X and Y jerk low (users report about 5 mm/s). In 3.5 and earlier, fine mesh compensation with low acceleration and short moves can defeat it; 3.6.0 shapes those too, at the price of artefacts at direction changes. Measure the frequency with an accelerometer (3.3 on), or as outer wall speed in mm/s over the spacing in mm of the ringing ripples.
M593 P"zvd" F40.5
M593 P"none"
M567 and M579: mix ratios and axis scaling
M567 Ptool Ea:b…
(default the current tool) sets mixing ratios: a single E in a move
is multiplied by each extruder’s ratio. There must be one value per extruder of
the tool, or nothing changes; they need not sum to 1, and nothing stops several
full-rate drives into one nozzle. The default is 1 for the first and 0 for the
rest. The old M568 P S that switched mixing on or off has not been
needed or supported since 1.19.
M579 X Y Z U V W A B C sets axis scale factors, useful where
steps per mm cross axes, as on deltas: a 100 mm dimension printed at 100.3 mm
wants 100/100.3 = 0.997. On a suitable IDEX machine U-1 mirrors a
ditto print.
M567 P2 E0.1:0.2:0.1:0.6
M579 X1.0127 Y0.998
M571: an output on while extruding
| Parameter | Meaning |
|---|---|
S (3.7.1: a:b) | PWM value while extruding (1.0 full; zero or less leaves the output alone); second value for the retraction port |
Pn (3.6.0; 3.7.1: n:m) | M950 general output port on the main board, and optionally one on while any extruder retracts; −1 none. The same port twice is on for both |
P"pin" | Pin name in 3.0 to 3.5; in RRF 1 and 2 a pin number as for M42 |
F | PWM frequency from 1.17, deprecated in 3.2, gone in 3.5.0 |
Q | PWM frequency from 3.2, unused from 3.6.0 |
The output follows forward extrusion by any extruder, up to about 2 ms after
the move starts, and only for the first motion system. With input shaping it is
off in the short gap before an unshaped move such as a retraction. From 3.7.1
it is also turned off when a move is stopped early, on reassignment and on
emergency stop. In RRF 1 and 2 the pin must be freed from heater or fan use,
and from 1.20 P must be given at least once.
M950 P3 C"io4.out"
M571 P3 S0.5
M595 to M599: queues, motion systems and safety
M596 to M598 need 3.5 or later on Duet 3 main boards
(not the Mini from 3.7).
| Command | Parameters and effect |
|---|---|
M595 | (3.2) P moves held in the queue; S preallocated per-motor objects (3.5 and earlier); R (3.3) grace period in ms before starting from an empty queue, for serial sources; Q (3.3) queue number, default 0. Alone, reports |
M596 P | Send this input channel’s following commands to motion queue P (from 0, typically 2 exist) and its tool; a file print starts on 0. Secondary queues may need lengthening with M595. Alone, reports |
M597 | Two different axis letters with different values, such as M597 V0 Y23.5: Y must stay at least 23.5 mm above V, checked over whole blocks between synchronisation points; the job aborts before a conflicting move |
M598 | No parameters: each motion system finishes its moves and waits for the others to reach this command |
M599 | (3.5.0) Keep-out zone: P number (default 0; only one is supported), axis min:max in machine coordinates, S1 on (default when axes are given) or S0 off. A G0 to G3 into it aborts the job. Alone or with no axes or S, reports |
M594: height following
3.7 and later on the Duet 3 MB6HC and MB6XD: a PID loop holds Z from a sensor,
configured with M951. P1 enters and P0
leaves; with P1, S is the sensor value to hold
(default 1.0) and Zmin:max
replaces the permitted Z range. A move naming Z waits for queued moves to stop,
ends the mode and then runs. Alone, reports.
Sources
- G-code dictionary – Duet3D’s documentation of RepRapFirmware’s commands, published under a Creative Commons attribution share-alike licence; this page is written in our own words