Lists all the M-codes implemented by this firmware. To get a long description of each code use '?' after the code name, for instance, M92? will give a decription of M92. To get all g-codes with wiki formatting, add token 'F0'.
To search for a phrase add S
Power on and enable all steppers. Motors are active after this command.
Disable all steppers. No more current is applied to the stepper motors after this command. If only token D is supplied, set power down mode (0 or 1)
Reset the stepper controllers
For an already attached external memory location, list all the files available. The supported devices are:
id | device |
---|---|
/usb | usb memory attached to host |
/sd | microsd card |
/lcl | local storage (octoprint) |
Use M21 to attach a device.
> M20 /usb - /usb/myfile.gcode - /usb/mydirectory/myotherfile.gcode - /usb/yetanotherfile.gcode > M20 /lcl - /lcl/example.gcode
Attach external memory device, choose from:
id | device |
---|---|
/usb | usb memory attached to host |
/sd | microsd card |
/lcl | local storage (octoprint) |
> M20 /usb > M20 /sd
Use M22 to unattach a device before removing.
Note
local storage is always mounted; used with M21 will be a no-op
Disconnect external memory device, choose from:
id | device |
---|---|
/usb | usb memory attached to host |
/sd | microsd card |
/lcl | local storage (octoprint) |
> M21 /usb > M21 /sd
Note
local storage is always mounted; used with M22 will be a no-op
Choose a gcode file for printing from external location:
id | device |
---|---|
/usb | usb memory attached to host |
/sd | microsd card |
/lcl | local storage (octoprint) |
> M23 /usb/myfile.gcode > M23 /sd/myfolder/myotherfile.gcode > M23 /lcl/anotherfile.gcode
Start printing from an externally selected file using the M23 command.
If the current print (from any source) was paused by M25, this will resume the print.
Pause the current print.
If printing from an externally selected file (from M23), display of how many lines from the active file have been processed. Will also display total number of lines in the file.
> M27 SD printing byte 10/1231
Shutdown the whole Replicape controller board. If paramter P is present, only exit loop. If R is present, restart daemon
Makes the extruder interpret extrusion as absolute positions. This is the default in Redeem.
Makes the extruder interpret extrusion values as relative positions.
Set each of the steppers with a token to the lowest possible current mode. This is similar to disable, but does not actually disable the stepper.
Set number of steps per millimeters for each steppers
Deprecated
Deprecated
Set extruder temperature. Use either T
Gets the current extruder temperatures, power and cold end temperatures. Extruders have prefix T, cold endsa have prefix C, power has prefix @
Set the current fan power. Specify S parameter for the power (between 0 and 255) and the P parameter for the fan number. P=0 and S=255 by default. If no P, use fan from config. If no fan configured, use fan 0. If 'R' is present, ramp to the value
Set the current fan off. Specify P parameter for the fan number. If no P, use fan from config. If no fan configured, use fan 0
Break out of any running M116 loop
Set extruder temperature and wait for it to be reached
Set current gcode line number
set debug level, S sets the level. If no S is present, it is set to 20 = Info
Cancel all the planned moves in emergency.
Get current printer head position. This is the ideal positition, without bed compensation. The returned value is in millimeters.
M = Return the position seen with the bed matix enabled
Get Firmware Version and CapabilitiesWill return the version of Redeem running, the machine type and the extruder count.
Wait for a specific temperature/all temperatures to be reachedIf no parameter is added M116 will wait for all temperatures to be reachedIf P or T is set then M116 will wait for the specific Heater to reach temperature onlyPossible values are:
-1 - Heated Bed
0 - Extruder E
1 - Extruder H 2 - Extruder A
3 - Extruder B
4 - Extruder C
Use 'M117 message' to send a message to a connected display. Typically this will be a Manga Screen or similar.
Get endstops state or set invert state of an endstop. If two tokens are supplied, the first must be a single end stop and the second either S1 or S0, to invert or un-invert that endstop, respectively.Ex: 'M119 X1 S1', to invert end stop X1
Set PID P-value, Format (M130 P0 S8.0), S<-1, 0, 1>
Set PID I-value, Format (M131 P0 S8.0)
Set PID D-value, Format (M132 P0 S8.0)
Set heated bed temperature
Set fan P, to power S (1.0 = 100%) and PWM frequency I (in Hz).
ex. M141 P0 I1000 S0.5
Should be enabled after target temperatures have been reached, typically after an M116 G-code or similar. Once enabled, if the temperature drops below the set point, the print will stop and all heaters will be disabled. The min temp will be disabled once a new temperture is set. Example: M151
Set heated bed temperature and wait for it to be reached
Sets the acceleration that axes can do in units/minute^2 for print moves.
Example: M201 X1000 Y1000 Z100 E2000"
Values get rounded to nearest whole number, in current G20/21 units.
For CoreXY and HJ-belt mechines, Y value is forced to that supplied for X (Y is ignored).
For Delta machines, X and Y values are forced to that supplied for X (Y and Z are ignored).
In all cases, axes H, A, B and C remain independant.
Set default acceleration. Dummy MCode for now.
If no parameters are given, get the current end stop offsets.
To set the offset, provide the axes and their offset relative to
the current value. All values are in mm.
Example: M206 X0.1 Y-0.05 Z0.03
M220 S
M221 S
Set coordinate system. Parameter S set the type, which is 0 = Cartesian, 1 = H-belt, 2 = CoreXY, 3 = Delta
Set servo position. Use 'S' to specify angle, use 'P' to specify index, use F to specify speed.
Baby stepping. This command tells the printer to apply the specified additional offset to the Z coordinate for all future moves, and to apply the offset to moves that have already been queued if this case be done. Baby stepping is cumulative, for example after M290 S0.1 followed by M290 S-0.02, an offset of 0.08mm is used.
M290 with no parameters reports the accumulated baby stepping offset.
The baby stepping offset is reset to zero when the printer is homed or the bed is probed.
Set P, I and D values, Format (M301 E0 P0.1 I100.0 D5.0)P = Kp, default = 0.0I = Ti, default = 0.0D = Td, default = 0.0E = Extruder, -1=Bed, 0=E, 1=H, 2=A, 3=B, 4=C, default = 0
PID Tuning refers to a control algorithm used in some repraps to tune heating behavior for hot ends and heated beds. This command generates Proportional (Kp), Integral (Ki), and Derivative (Kd) values for the hotend or bed (E-1). Send the appropriate code and wait for the output to update the firmware.
Inputs:
H<0 or 1> overrides the extruder. Use H-1 for heated bed.
Default is the 'E' extruder with index 0.
S overrides the temperature to calibrate for. Default is 200.
N overrides the number of cycles to run, default is 4
P (0,1) Enable pre-calibration. Useful for systems with very high power
L Tuning algorithm. 0 = Tyreus-Luyben, 1 = Zieger-Nichols classic
Set or get direction and search length for end stops
If not tokens are given, return the end stop travel search length in mm.
If tokens are given, they must be a space separated list of
Example: 'M308 X250 Y220'. This will set the travel search length for the
X nd Y axis to 250 and 220 mm. Th values will appear in the config file in meters, thus 0.25 and 0.22
Get current config
Wait until all buffered paths are executed
Get a status report from each filament sensor connectedIf the token 'H' is present, get a human readable status. If no token is present, return a machine readable form, similar to the return from temperature sensors, M105.
If token 'S' is present without token value, enable sending filament data for all sensors. If a value is present, enable sending filament data for this extruder number.
Examples:
M409 S0 - enables sending filament data for Extruder 0 (E)
M409 S - Enable action command filament data for all filament sensors
M409 D - Disable sending filament data for all filament sensors
Save all changed parameters to file.
Set the points at which the bed will be probed to compensate for its plane being slightly out of horizontal. The P value is the index of the point (indices start at 0) and the X and Y values are the position to move extruder 0 to to probe the bed. An implementation should allow a minimum of three points (P0, P1 and P2). This just records the point coordinates; it does not actually do the probing.
P = Probe point number.
X = X-coordinate
Y = Y-coordinate
Z = Z-coordinate. If missing, set to 0.
Values for X/Y/Z are in mm, regadless of current G20/G21 status.
Example: M558 P0
where P can be
0 - Servo with Switch
1 - IR
2 - IR
3 - Proximity sensor
A Z probe may be a switch (the default) an IR proximity sensor, or some other
device. This selects which to use. P0 gives a switch. P1 gives an unmodulated
IR probe, or any other probe type that emulates an unmodulated IR probe (probe
output is an analog signal that rises with decreasing nozzle height above
the bed). If there is a control signal to the probe, it is driven high when
the probe type is P1. P2 specifies a modulated IR probe, where the modulation
is commanded directly by the main board firmware using the control signal to
the probe. P3 selects an alternative Z probe by driving the control signal to
the probe low. See also G31 and G32.
This cancels any bed-plane fitting as the result of probing (or anything else) and returns the machine to moving in the user's coordinate system.
Add 'S' to show the marix instead of resetting it.
Add 'U' to update the current matrix based on probe data
Reset a temperature fault on heater/sensor If the priner has switched off and locked a heater because it has detected a fault, this will reset the fault condition and allow you to use the heater again. Obviously to be used with caution. If the fault persists it will lock out again after you have issued this command. P0 is the bed; P1 the first extruder, and so on.
Set the direction for each axis. Use
If no tokens are given, return the current end stop config. To set the end stop config:
This G-code takes one end stop, and one configuration where the configuration is which stepper motors to stop and the direction in which to stop it.
Example:
M574 X1 x_ccw
(The single space separators are required.)
This will cause the X axis to stop moving in the counter clock wise direction.
Note that this recompiles and restarts the firmware.
Set stepper slave mode, making one stepper follow the other.
If no tokens are given, return the current setup
For each token, set the second argument as slave to the first
So M608 XY will set Y as a slave to X
If only the axis is given, no slave is set.
L sets the length of the arm. If the objects printed are too small, try increasing(?) the length of the arm
R sets the radius of the towers. If the measured points are too convex, try increasing the radius
Set or get axis offset values. If no tokens are given, reuturn the current offset values.If tokens are given, set the offset value to each of the tokens given in mm.
Format: M666
Example: 'M666 X200' sets the X-axis to have offset 200 mm.
This M-code is to set the offset, to adjust the offset, use M206
Adjust backlash compensation for each named axis
Set the stepper current. Unit is mA. Typical use is 'M906 X400'.This sets the current to 0.4A on the X stepper motor driver.Can be set for multiple stepper motor drivers at once.
Set stepper current in A
Example: M909 X3 Y5 Z2 E3
Set the microstepping value for each of the steppers. In Redeem this is implemented as 2^value, so M909 X2 sets microstepping to 2^2 = 4, M909 Y3 sets microstepping to 2^3 = 8 etc.
Example: M910 X3 Y5 Z2 E3Set the decay mode foreach of the steppers. In Redeem this is implementedfor Replicape rev B as a combination of CFG0, CFG4, CFG5.A value between 0 and 7 is allowed, setting the three registers to the binary value represented by CFG0, CFG4, CFG5.
CFG0 is chopper off time, the duration of slow decay phase.
CFG4 is chopper hysteresis, the tuning of zero crossing precision.
CFG5 is the chopper blank time, the dureation of banking of switching spike.
Please refer to the data sheet for further details on the configs.