Professional Documents
Culture Documents
org/wiki/RepRap_Firmware_G-Codes
This page list G-codes interpreted by RepRap Firmware. This list cover DC42 (https://github.com/dc42/Rep
RapFirmware/tree/dev/Release) and Chrishamm (https://github.com/chrishamm/RepRapFirmware/tree/dev/
Release) fork, which are more complete than the original version. Some G-Codes are common between
RepRap Firmware and other firmwares, but with extended syntax or specific interpretation. They are listed
in a specific paragraph.
Contents
1 With RepRap firmware, everything is G-code
2 Typical parameters
3 Default values
4 Codes specific to RepRap Firmware
4.1 Macros and physical interfacing
4.2 Heaters
4.3 Ethernet communication
4.4 Miscellaneous Configuration
4.5 Web control (DWC)
4.6 Firmware configuration
4.7 Reporting - also used by DWC
4.8 Geometry
4.9 Miscellaneous commands
4.10 Specialised machines
5 G-codes with specific or extended syntax
5.1 Movement and geometry
5.2 Heating
5.3 Miscellaneous
6 Non specific G-codes
6.1 Movement
6.2 Operation
6.3 Probing
6.4 Printing
6.5 Physical interface
6.6 Heating
6.7 Useful G-codes
6.8 Configuration
6.9 Report
6.10 Miscellaneous
1 de 7 21/12/2020 18:52
RepRap Firmware G-Codes - RepRap https://reprap.org/wiki/RepRap_Firmware_G-Codes
All G-codes or macros could be send to the board while operating the printer, allowing instant feed-back for
any configuration modification. As interactive modifications are lost at next board start-up, the successfully
tested G-Codes shall be manually introduced in the configuration file.
This interactive configuration makes the printer tuning easier than with other firmware.
Typical parameters
Most commands (M or G) are associated with parameters, typically Pnnn, Paaa or Xnnn. It shall be noted
that the parameter qualifying letter is NOT part of the parameter, e.g. parameter PMyName is "MyName".
It shall be noted that Extruder number, Tool number, Heater number and Drive number are separated entities
which need to be associated one with the other. There are default associations between drives and
movement/extruder axis.
Note that internal firmware drive reference are : 0:X; 1:Y; 2:Z; 3:E0; 4:E1; 5:E2; 6:E3; 7:E4; 8:E5 as used in
M569 and when linking end stops pins to drives.
Printing files G-codes are analysed by web interface for layer count. Excluding specific g-code (typically at
start or end) from this analysis can be done while writing a comment starting with ";E" or "; E".
Default values
Most configuration G-codes have default values, and if the default are acceptable, you don't need to enter
the G-Code, so config.g could be for some printers very simple.
However, sometimes the default values got modified in firmware update, so it is wise to explicitly define all
your parameters, to avoid troubles while updating and also to document them. Some default values (DC42
fork rev 1.11):
PID parameters (M301) for hotend heater : P10 I0.1 D100 T0.4 W180 B30
Bed control default is bang-bang (P-1)(M304), other parameters: I5 D500 T2.7 W255 B5 -for PID
control, you may start with P85
PWM frequency 10Hz for Bed and Chamber heaters (SSR compatible) and ?? Hz for Hotend heaters -
not adjustable
Thermistors - all- (M305): T100000 B4138 R1000 L0 H0 X3
Steps/mm (M92): X200 Y200 Z200 E304.5:304.5:420:420:420:420
2 de 7 21/12/2020 18:52
RepRap Firmware G-Codes - RepRap https://reprap.org/wiki/RepRap_Firmware_G-Codes
Heaters
Ethernet communication
M540: Set MAC address - all printers on same network shall have different MAC addresses
M550: Set Name - Name for web page call and for FTP
M551: Set Password - For FTP and Web Control/firmware exchange
M552: Set IP address - Optional
M553: Set Netmask - if IP address defined
M554: Set Gateway - if IP address defined
Miscellaneous Configuration
3 de 7 21/12/2020 18:52
RepRap Firmware G-Codes - RepRap https://reprap.org/wiki/RepRap_Firmware_G-Codes
operation.
M912: Set electronics temperature monitor adjustment NEW (1.14) Offset added to reported
processor temperature to have accurate value.
M913: Set motor percentage of normal current NEW (1.14) Temporary stepper current modification
in % (for stalling against mechanical stops)
Firmware configuration
M36: Return file information Return information about a file on the SD card - JSON (https://en.wikip
edia.org/wiki/JSON) format
M122: Diagnose
M573: Report heater PWM
M408: Report JSON-style response - Return printer status data
M503: Print settings - Display config.g content
Geometry
Miscellaneous commands
M37: Simulation mode - Run a print simulation for time estimation : slow
Specialised machines
G0 & G1: Move - Flags are used to bypass endstops or move carriage on delta
G10: Tool Offset Define standby and operating tool temperature / Retract if no parameter, see M207
(NEW)
M207: Set retract length RRF add unretract length parameter - NEW -
4 de 7 21/12/2020 18:52
RepRap Firmware G-Codes - RepRap https://reprap.org/wiki/RepRap_Firmware_G-Codes
M208: Set axis max travel Used for unretract length in other firmware
M665: Set delta configuration Add height, maximum usable radius and column angular position
Heating
Miscellaneous
M106: Fan On - RRF add configuration. Fan1 configured in thermostatic mode by default. Deactivate
with "M106 P1 H-1".
M302: Allow cold extrudes add cancelling of the command
M561: Set Identity Transform - reset the transformation from calibration
G11: Unretract Used while Firmware retraction is configured in your slicer, along G10
G28: Move to Origin (Home) run macro home.g or homedelta.g
G90: Set to Absolute Positioning
G91: Set to Relative Positioning
G92: Set Position Define actual position to be defined coordinates (zero if no parameters)
M82: Set extruder to absolute mode
M83: Set extruder to relative mode To be preferred for reliability
M114: Get Current Position
Operation
Probing
5 de 7 21/12/2020 18:52
RepRap Firmware G-Codes - RepRap https://reprap.org/wiki/RepRap_Firmware_G-Codes
Printing
Physical interface
Heating
Useful G-codes
M206 Set home offset. Could be used to adjust head above bed during printing. M206 Z0.1 move up
by 0.1mm
Configuration
Report
6 de 7 21/12/2020 18:52
RepRap Firmware G-Codes - RepRap https://reprap.org/wiki/RepRap_Firmware_G-Codes
Miscellaneous
In addition to site licence GFDL1.2 (https://www.gnu.org/licenses/old-licenses/fdl-1.2.html), this page is also released under
license CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/)
7 de 7 21/12/2020 18:52