M-Codes Detailed References

For information on G-codes, refer to G-Codes Detailed References guide.

Software Requirements

The guide that follows shows the improvements added in software application v21.12.06.18.00.

Use the Graphical User Interface (GUI)/web browser to confirm the software version that is installed on your AON3D machine:

  1. Select Settings > Updates.

If your machine does not have the latest software version, refer to the Software Update procedure.

M-Code Commands

M0 - Pause

  • The M0 command pauses the machine after the last movement command have been completed.
  • The M0 command turns the machine heaters OFF.
  • Use the M108 command to resume.

Parameters

M0 [Snnn] [Pnnn]
Parameter Description Limit(s)
[Snnn] Where nnn is the pause time in seconds. 0 to 86400
[Pnnn] Where nnn is the pause time in milliseconds. 0 to 86400000

If the P and the S have values on the same command line, the two parameters are summed to one value. Limited from 0 to 1800000 seconds.

Examples

Command Description
M0 Makes the machine pause and waits until the M108 command is entered to resume.
M0 S5 Makes the machine pause for five seconds and then resumes automatically.

M82 - Set Extruder To Absolute Positioning

  • The M82 command overrides the G91 command to set the extruder(s) movements to absolute positioning.
  • The M82 command is used to make sure that the selected extruder(s) is disabled to prevent unwanted filament retraction(s).
  • The G91 command overrides the M82 command to set the extruders and XYZ-axes movements to relative positioning.
  • Used with the M83 command to control the coordinate mode for extrusion movements without an effect on the motion of the XYZ-axes.

The system default coordinate mode is absolute positioning. All movements from the GUI/web browser (extrusion, jogging the tools, and/or moving the bed) will reset the coordinate mode to absolute positioning when the G90 command is entered.

Examples

Command Description Note
M82 Sets extruder to absolute positioning. The XYZ-axes coordinate mode stays in relative positioning.
G91 Sets extruder and XYZ-axes to relative positioning. If the selected toolhead was already set at T1, the T1 command is ignored.

M83 - Set Extruder to Relative Positioning

  • The M83 command overrides the G90 command to set only the extruder(s) to relative positioning.
  • The G90 command overrides the M83 command to set the extruder(s) and the XYZ-axes to absolute positioning.

The system default coordinate mode is absolute positioning. All movements from the GUI/web browser (extrusion, jogging the tools, and/or moving the bed) will reset the coordinate mode to absolute positioning when the G90 command is entered.

Examples

Command Description
M83 Sets extruder to relative positioning. The XYZ-axes stay in absolute positioning.
G90 Sets extruder and XYZ-axes to absolute positioning.

M104 - Set Hot End/Build Chamber Temperature

The M104 command sets the hot end and the build chamber target temperatures and executes the next command.

Parameters

M104 [Tx] [Snnn]
Parameter Description Limit(s) Default Value(s)
[Tx] Where x is 0 (T0), 1 (T1), or 2 (build chamber heater). T0, T1, T2. Active toolhead.
[Snnn] Where nnn is the target temperature in degrees Celsius (°C). T0/T1: 500°C maximum. T2: 135°C maximum. None.

Examples

Command Description
M104 T1 S250 Set the right toolhead target temperature to 250°C.
M104 T2 S120 Set build chamber target temperature to 120°C.

M108 - Resume

  • The M108 command continues after a pause is made with the (M0) command.
  • The M108 command stops the wait period for the M109 and M190 commands.
  • The M108 command does not affect the target temperature for the M109 and M190.
  • The M108 command stops the wait when the G4 command is used.

Example

Command Description
M108 Resume print.

M109 - Set Hot End/Build Chamber Temperature and Wait

The M109 command sets the hot end and/or build chamber target temperature(s) and waits. The next command(s) is(are) read when the heater(s) is(are) at the set target temperature(s).

Parameters

M109 [Tx] [Snnn] [Rnnn]
Parameter Description Limit(s) Default Value(s) Note
[Tx] Where x is 0 (T0), 1 (T1), or 2 (Build Chamber Heater). T0, T1, T2. Active toolhead. None.
[Snnn] Where nnn is the target temperature in degrees Celsius (°C). T0/T1: 500°C maximum, T2: 135°C maximum. None. Waits only when heating.
[Rnnn] Where nnn is the target temperature in degrees Celsius (°C). T0/T1: 500°C maximum, T2: 135°C maximum. None. Waits when heating and cooling.

Examples

Command Description
M109 T1 S250 Sets T1 to 250°C and continues to the next command only when the T1 target temperature is at 250°C.
M109 T2 S120 Sets T2 to 120°C and continues to the next command only when the T2 target temperature is at 120°C.

M114 - Get Current Position

The M114 command reports the current position of the selected toolhead.

Parameters

M114 [D]
Parameter Description
[D] Shows detailed position information.

Example

Command Description
M114 Reports axes coordinates of the current selected toolhead.

M115 - Firmware Information

The M115 command reports the current firmware information.


M119 - Endstop Status

The M119 command reports the current status of the components that follow:

  • The two filament sensors
  • The six XYZ-axes microswitches (open or triggered)
  • The T0 and T1 probe microswitches found on the AON-M2 and AON-M2 2020 machines.

Example

Command Description
M119 Returns set of strings that report on the X_min, X_max, Y1, Y2, Z1, Z2, and the two probes (AON-M2 and AON-M2 2020 machines).

M140 - Set Bed Temperature

The M140 command sets the bed temperature and continues the next command in the buffer.

Parameters

M140 [Snnn]
Parameter Description Limit(s) Note
[Snnn] Where nnn is the target temperature in degrees Celsius (°C). 220°C maximum. Waits only when heating.

Example

Command Description
M140 S150 Sets the bed target temperature to 150°C.

M190 - Set Bed Temperature and Wait

The M190 command sets the bed target temperature and waits. The next command(s) is(are) read when the bed heater is at the set target temperature.

Parameters

M190 [Snnn] [Rnnn]
Parameter Description Limit(s) Note
[Snnn] Where nnn is the target temperature in degrees Celsius (°C). 220°C maximum. Waits only when heating.
[Rnnn] Where nnn is the target temperature in degrees Celsius (°C). 220°C maximum. Waits when heating and cooling.

Examples

Command Description Note
M190 S150 Sets the bed target temperature to 150°C. Waits only when heating.
M190 R120 Sets the bed target temperature to 120°C. Waits when heating snd cooling.

M218 - Set Toolhead Offsets

Make sure that there are no prints on the build surface before the M218 command is entered. The XYZ-axes will be homed after the M218 command has been entered. Failure to do so can cause a collision and cause damage to the machine component(s).

The M218 command does the actions that follow:

  1. Adjusts the dual extruder offset calibration (only if T1 is provided echo current offset).
  2. Automatically homes the XYZ-axes when an offset is changed.
  3. Automatically saves the offset(s).

Parameters

M218 T1 [Xnnn] [Ynnn]
Parameter Description Limit(s) Default Value(s)
[Xnnn] Where nnn is the X-axis offset of T1 relative to T0 (mm). -10 mm to 10 mm 0
[Ynnn] Where nnn is the Y-axis offset of T1 relative to T0 (mm). -5 mm to 5 mm 0

Example

Command Description
M218 X-1.5 Y0.6 Adjusts T1 to print 1.5 mm to the left and 0.6 mm to the rear of the build platform

M220 - Set Feed Rate Percentage Override

The M220 command overrides the XYZ-axes feed rate by a percentage value when a print is in progress.

The M220 command stays active until the machine is fully restarted.

The user must enter the M500 command if the M220 parameters are to be saved to the Electrically Erasable Programmable Read-Only Memory (EEPROM).

Parameters

M220 [Snnn]
Parameter Description Limit(s) Default Value
[Snnn] Where nnn is the percentage value to decrease/increase print feed rate. 1% to 2500% 100%

Examples

Command Description
M220 S125 Increases feed rate by 25%.
M220 S10 Decreases feed rate to 10% of the 100% (default).
M220 S100 Sets the print feed rate to 100% (default).

M221 - Set Flow Rate Percentage Override

The M221 command overrides the extruder flow rate by a percentage value when a print is in progress.

The M221 command stays active until the AON3D machine is fully restarted.

The user must enter the M500 command if the M221 parameters are to be saved to the EEPROM.

Parameters

M221 [Tx] [Snnn]
Parameter Description Limit(s) Default Value
[Tx] Where x is the selected extruder number. Current extruder if not entered T0/T1 Active toolhead
[Snnn] Where nnn is the percentage value entered to decrease/increase the selected extruder flow rate 1% to 2500% 100%

Examples

Command Description
M221 T1 S95 Decreases the right extruder flow rate by 5%
M221 T0 S110 Increases the left extruder flow rate to 10%
M221 T0 S100 Sets the left extruder flow rate to the default value (100%)

M290 - Z-Axis Offset Adjustment

  • The M290 command allows for small adjustments of Z-axis offset position in the selected toolhead.
  • The M290 command should be used to calibrate the toolhead position after the build platform has been probed.

This command is only available on Marlin-based firmware. For Klipper-based firmware, use the Motion tab to set the Z Offset value.

Parameters

M290 [Tx] [Znnn] [Snnn] 
Parameter Description Limit(s) Default Value Note
[Tx] Where x is the selected toolhead number (current extruder if not entered). T0/T1 Active toolhead None
[Znnn] Where nnn is the value (mm) to shift the selected toolhead in the Z-axis. -5 mm to 5 mm (final Z-axis offset is -30 mm to 100 mm ). 0 If a value of 0 or no Z-axis value is entered, the current Z-axis offset is used.
[Snnn] Where nnn is the value (mm) to shift the selected toolhead in the Z-axis. 3 mm -30 mm to 100 mm None

Example

Command Description
M290 Z-0.1 Decreases the distance between the nozzle and the build platform by 0.1 mm.

M411 - Stop Dwell

The M411 command stops a dwell that was made with the use of the G4 command.


M420 - Bed Leveling Configuration Management

The M420 command shows the user the automatic bed leveling information which includes the values from the last execution of G29 and M290 for the two toolheads.

This command is only available on Marlin-based firmware.

Parameters

M420 [V]
Parameter Description
[V] Verbose - Prints the stored probe mesh data.

Example

< M420
> Bed Leveling On
> Z Offset T0 0.80
> Grid Start X : 35.00 Y : 35.00
> Grid Stop X : 415.00 Y : 415.00
> Grid Spacing X : 45.00 Y : 45.00
> Z Offset T1 1.30
> Grid Start X : 35.00 Y : 35.00
> Grid Stop X : 415.00 Y : 415.00
> Grid Spacing X : 45.00 Y : 45.00
> Fade Height Off

M500 - Save to EEPROM

The M500 command saves the configuration to the EEPROM.

This command is only available on Marlin-based firmware. For Klipper-based firmware, enter SAVE_CONFIG into the terminal.


M501 - Restore from EEPROM

The M501 command restores the previous configuration stored in the EEPROM. Can be used after a temporary change has been made.

This command is only available on Marlin-based firmware.

M502 - Reset EEPROM

Make sure that there are no prints on the build surface for the M501 command is entered. The XYZ-axes must be homed after the M501 command has been entered. Failure to do so can cause a collision and cause damage to the machine component(s).

The M502 command erases and reverts to the AON3D firmware default settings found on the EEPROM.

The M500 command must be entered to store the changes in the EEPROM after the M502 command is entered.

This command is only available on Marlin-based firmware.


M503 - Report Current Configuration

The M503 command reports the active configuration which can be found on the EEPROM.

The M503 command does not necessarily report the active settings which may be, or may not be, the same as those stored in the EEPROM.

To report the configuration stored in the EEPROM, make sure to enter the M501 command before.

This command is only available on Marlin-based firmware.


Last modified: April 9, 2024