Skip to main content
WARNING! From February 2022, these pages are no longer maintained.
Please see the current Duet3D documentation at

Site Navigation

Your Account

Choose Language

Revision to M584

Steve Miller

+==== M584: Set drive mapping ====
+* ***Xnnn*** Driver number(s) for X motor(s)
+* ***Ynnn*** Driver number(s) for Y motor(s)
+* ***Znnn*** Driver number(s) for Z motor(s)
+* ***Rn*** (optional, supported in RRF 3.2beta1 and later) 0 = axes creates in this command are linear, 1 = axes created are rotational. If not present, then RRF 3.2beta3 and later assume UVW are linear and ABCD are rotational.
+* ***Sn*** (optional, supported in RRF 3.2beta3 and later) 0 = axes created in this command are treated as linear in feedrate calculations, 1 = axes created are treated as rotational in feedrate calculations. See section of the NIST GCode standard for how the feedrate is interpreted. Default is S0 for linear axes and S1 for rotational axes (see the R parameter).
+* ***U, V, W, A, B, Cnnn*** Driver number(s) for additional axes U, V, W, A, B and C (UVW available in RepRapFirmware 1.16 and later; UVWABC available in RepRapFirmware 1.19 and later; UVWABCD available in RepRapFirmware 3.0 and later).
+* ***Ennn*** Driver number(s) for E motor(s)
+* ***Pnnn*** Number of visible axes, defaults to the total number of axes configured.
+***Order dependence***
+* M584 must come earlier in config.g than any M350 and M906 commands. If it creates new axes, it must also be earlier than any M92, M201, M203, M208, M350, M566, M574, M667 and M669 commands.
+* M584 X0 Y1 Z2:3 E4:5:6 ; Driver 0 controls the X motor, 1 controls Y, 2 and 3 control Z motors, 4 5 and 6 control E motors
+* ***VERY IMPORTANT!*** Assigning a drive using M584 does not remove its old assignment. Therefore, ***if you assign a drive that defaults to being an extruder drive, you should also assign the extruder drives explicitly as in the above example***. Failure to do so may result in unexpected behaviour.
+* You can use M584 to create additional axes - for example, to represent additional carriages on a machine with multiple independent X carriages. In 1.20 and later firmware you can create new axes in any order. In earlier firmware versions, additional axes must be created in the order UVWABC. You can hide some of the last axes you create using the P parameter. Hidden axes have no homing buttons or jog controls in the user interface.
+* RepRapFirmware does not support individual motor settings where an axis has multiple motors connected to different stepper drivers. The first parameter specified will be used for all motors on the axis. You should use identical motors on any axis that has more than one motor to avoid unexpected behaviour. Example: If you have two motors on your Z axis, physically connected to Z and E0 stepper drivers, configured with M584 Z2:3, set M92 Z80, not M92 Z80:80
+* If you create more than one axis in a M584 command, the axes are created in the order UVWABCD regardless of the order of the parameters in the M584 command. This affects which axes will be hidden if you use the M584 P parameter to hide axes. For example, M584 C5 U6 creates axes U and C in that order, so M584 P4 would hide the C axis, not the U axis. If you want to create the axes in the order C then U (so that M584 P4 hides the U axis), use two M584 commands: M584 C5 followed by M584 U6.
+* Using M584 to map drivers to axes does not affect endstop inputs. In RRF2, endstop inputs XYZ are pre-allocated, after that they are allocated in the order in which axes are created. So if you create just one extra axes (e.g. U), it will use the E0 endstop input. If more than one axis is created in a single M584 command, endstop inputs are allocated to the new axes in axis creation order (see previous item). For example, M584 C5 U6 would allocate endstop input E0 to the U axis and E1 to the C axis.
+* On the Duet 2 WiFi and Duet 2 Ethernet, if you configure multiple drivers for an axis, either all of them must be TMC2660 drivers on the Duet or a Duet expansion board, or none of them must be. This is to facilitate dynamic microstepping and other features of the TMC2660.
+* In RRF3, M584 works the same way as in RRF2, with exception that on Duet 3 the driver on expansion boards are assigned with <board address>.<driver number>. Example:
+[code]M584 X0 Y1 Z2 E3:4:1.0:1.1[/code]
+The "0" index for the main board is implicit, this is equivalent to the previous example:
+[code]M584 X0.0 Y0.1 Z0.2 E0.3:0.4:1.0:1.1[/code]
+* If you assign an axis or extruder to one or more drivers, and later you want to reassign it to a different driver, then to ensure correct operation you must disable those axes/extruders using M18 before using M584 to reassign them. After using M584, you must set the motor current using M906 and the microstepping using M350. Example:
+; Here axis B and extruder E0 have already been assigned and possibly moved, but we now want to reassign them
+M18 B E0 ; disable the axes/extruder that we are going to reassign
+M584 B3 E4 ; reassign them
+M906 B1000 E1000 ; set the motor currents
+M350 B16 E16 I1 ; set the microstepping