G-code/fr
English • العربية • български • català • čeština • Deutsch • Ελληνικά • español • فارسی • français • hrvatski • magyar • italiano • română • 日本語 • 한국어 • lietuvių • Nederlands • norsk • polski • português • русский • Türkçe • українська • 中文(中国大陆) • 中文(台灣) • עברית • azərbaycanca • |
Cette page tente de décrire le 'G-code' que les firmwares Reprap utilisent et comment ils fonctionnent. La cible principale est la fabrication additive en utilisant le processus FFF. Codes pour les mouvements de la tête d'impression suivent le NIST RS274NGC norme G-code, de sorte que les firmwares Reprap sont tout à fait utilisables pour le fraisage CNC et autres applications similaires. Voir aussi sur G-Code article de Wikipedia.
Il ya plusieurs façons de préparer un Gcode pour une imprimante. La première consiste à utiliser un trancheur comme Slic3r, Skeinforge ou Cura. Ces programmes prennent un modèle CAO et le découper en couches. Les trancheurs sont la meilleure façon de passer d'un modèle 3D en fichier gcode imprimable, mais l'utilisateur sacrifie une certaine flexibilité lors de leur utilisation. Une autre option pour la génération gcode est d'utiliser une bibliothèque de niveau inférieur comme mecode. Les bibliothèques comme mecode vous donnent un contrôle précis sur la trajectoire de l'outil, et ainsi sont utiles si vous avez une impression complexe qui ne convient pas pour le tranchage natïf. La dernière option est de simplement écrire le Gcode vous-même. Cela peut être le meilleur choix si vous avez juste besoin de courir quelques lignes de test lors de l'étalonnage de votre imprimante.
Contents
- 1 Introduction
- 2 Fields
- 3 G-commands
- 3.1 G0 & G1: Move
- 3.2 G2 & G3: Controle des mouvements des Cercles
- 3.3 G4: Attente
- 3.4 G20: Définir les unités en Pouces
- 3.5 G21: Définir les unités en Millimètres
- 3.6 G28: Déplacement aux origines (Homing)
- 3.7 G29: Autolevel
- 3.8 G90: Position Absolue
- 3.9 G91: Position Relative
- 3.10 G92: Définir la Position
- 4 M-commandes
- 4.1 M18: Arret de tous les moteurs
- 4.2 M80: ATX Power On
- 4.3 M81: ATX Power Off
- 4.4 M82: Définir le mode Absolue pour l'extrudeur
- 4.5 M83: Définir le mode relatif pour l'extrudeur
- 4.6 M92: Définir les steps/mm
- 4.7 M104: Définir la température de l'extudeur
- 4.8 M105: Retourner la température de l'extrudeur
- 4.9 M106: Allumer les ventilateurs
- 4.10 M107: Eteindre les ventilateurs
- 4.11 M108: Définir la vitesse d'extrusion
- 4.12 M109: Définir la température de l'extrudeur et attendre
- 4.13 M110: Set Current Line Number
- 4.14 M111: Set Debug Level
- 4.15 M112: Arrêt d'urgence
- 4.16 M113: Set Extruder PWM
- 4.17 M114: Get Current Position
- 4.18 M115: Get Firmware Version and Capabilities
- 4.19 M116: Wait
- 4.20 M117: Get Zero Position
- 4.21 M117: Display Message
- 4.22 M118: Negotiate Features
- 4.23 M119: Retourner le statut des fin de courses (endstop)
- 4.24 M120: Push
- 4.25 M121: Pop
- 4.26 M120: Enable endstop detection
- 4.27 M121: Disable endstop detection
- 4.28 M122: Diagnose
- 4.29 M123: Tachometer value
- 4.30 M124: Immediate motor stop
- 4.31 M126: Open Valve
- 4.32 M127: Close Valve
- 4.33 M140: Définir la température du plateau chauffant (Rapide)
- 4.34 M141: Set Chamber Temperature (Fast)
- 4.35 M142: Holding Pressure
- 4.36 M143: Maximum hot-end temperature
- 4.37 M146: Set Chamber Humidity
- 4.38 M149: Set temperature units
- 4.39 M150: Set display color
- 4.40 M160: Number of mixed materials
- 4.41 M163: Set weight of mixed material
- 4.42 M164: Store weights
- 4.43 M190: Wait for bed temperature to reach target temp
- 4.44 M191: Wait for chamber temperature to reach target temp
- 4.45 M200: Set filament diameter
- 4.46 M201: Set max printing acceleration
- 4.47 M202: Set max travel acceleration
- 4.48 M203: Set maximum feedrate
- 4.49 M204: Set default acceleration
- 4.50 M205: Advanced settings
- 4.51 M206:
- 4.52 M207: Calibrate z axis by detecting z max length
- 4.53 M207: Set retract length
- 4.54 M208: Set axis max travel
- 4.55 M208: Set unretract length
- 4.56 M209: Enable automatic retract
- 4.57 M210: Set homing feedrates
- 4.58 M211: Disable/Enable software endstops
- 4.59 M212: Set Bed Level Sensor Offset
- 4.60 M218: Set Hotend Offset
- 4.61 M220: Set speed factor override percentage
- 4.62 M221: Set extrude factor override percentage
- 4.63 M220: Turn off AUX V1.0.5
- 4.64 M221: Turn on AUX V1.0.5
- 4.65 M222: Set speed of fast XY moves
- 4.66 M223: Set speed of fast Z moves
- 4.67 M224: Enable extruder during fast moves
- 4.68 M225: Disable on extruder during fast moves
- 4.69 M226: Gcode Initiated Pause
- 4.70 M226: Wait for pin state
- 4.71 M227: Enable Automatic Reverse and Prime
- 4.72 M228: Disable Automatic Reverse and Prime
- 4.73 M229: Enable Automatic Reverse and Prime
- 4.74 M230: Disable / Enable Wait for Temperature Change
- 4.75 M231: Set OPS parameter
- 4.76 M232: Read and reset max. advance values
- 4.77 M240: Déclenché l'appareil photo
- 4.78 M241: Stop conveyor belt motor / echo on
- 4.79 M245: Start cooler
- 4.80 M246: Stop cooler
- 4.81 M250: Set LCD contrast
- 4.82 M251: Measure Z steps from homing stop (Delta printers)
- 4.83 M280: Définir la postion du servomoteur
- 4.84 M300: Jouer un son
- 4.85 M301: Set PID parameters
- 4.86 M302: Autoriser l'extrusion à froid
- 4.87 M303: Executé un paramétrage automatic du PID
- 4.88 M304: Définir les parametre PID du Bed (lit chauffant)
- 4.89 M305: Set thermistor and ADC parameters
- 4.90 M306: set home offset calculated from toolhead position
- 4.91 M320: Activate autolevel(Repetier)
- 4.92 M321: Deactivate autolevel(Repetier)
- 4.93 M322: Reset autolevel matrix
- 4.94 M340: Control the servos
- 4.95 M350: Set microstepping mode
- 4.96 M351: Toggle MS1 MS2 pins directly
- 4.97 M355: Turn case lights on/off
- 4.98 M360: Report firmware configuration
- 4.99 SCARA calibration codes (Morgan)
- 4.100 M360: Move to Theta 0 degree position
- 4.101 M361: Move to Theta 90 degree position
- 4.102 M362: Move to Psi 0 degree position
- 4.103 M363: Move to Psi 90 degree position
- 4.104 M364: Move to Psi + Theta 90 degree position
- 4.105 M365: SCARA scaling factor
- 4.106 M366: SCARA convert trim
- 4.107 M370: Morgan manual bed level - clear map
- 4.108 M371: Move to next calibration position
- 4.109 M372: Record calibration value, and move to next position
- 4.110 M373: End bed level calibration mode
- 4.111 M374: Save calibration grid
- 4.112 M375: Display matrix / Load Matrix
- 4.113 M380: Activate solenoid
- 4.114 M381: Disable all solenoids
- 4.115 M400: Wait for current moves to finish
- 4.116 M401: Lower z-probe
- 4.117 M402: Raise z-probe
- 4.118 M404: Filament width and nozzle diameter
- 4.119 M405: Filament Sensor on
- 4.120 M406: Filament Sensor off
- 4.121 M407: Display filament diameter
- 4.122 M408: Report JSON-style response
- 4.123 M420: Set RGB Colors as PWM and is also Enable/Disable Mesh Bed Leveling
- 4.124 M421: Set a Mesh Bed Leveling Z coordinate
- 4.125 M500: Store parameters in EEPROM
- 4.126 M501: Read parameters from EEPROM
- 4.127 M502: Revert to the default "factory settings."
- 4.128 M503: Print settings
- 4.129 M540: Enable/Disable "Stop SD Print on Endstop Hit"
- 4.130 M540: Set MAC address
- 4.131 M550: Set Name
- 4.132 M551: Set Password
- 4.133 M552: Set IP address
- 4.134 M553: Set Netmask
- 4.135 M554: Set Gateway
- 4.136 M555: Set compatibility
- 4.137 M556: Axis compensation
- 4.138 M557: Set Z probe point
- 4.139 M558: Set Z probe type
- 4.140 M559: Upload configuration file
- 4.141 M560: Upload web page file
- 4.142 M561: Set Identity Transform
- 4.143 M562: Reset temperature fault
- 4.144 M563: Define or remove a tool
- 4.145 M564: Limit axes
- 4.146 M565: Set Z probe offset
- 4.147 M566: Set allowable instantaneous speed change
- 4.148 M567: Set tool mix ratios
- 4.149 M568: Turn off/on tool mix ratios
- 4.150 M569: Set axis direction and enable values
- 4.151 M570: Set heater timeout
- 4.152 M571: Set output on extrude
- 4.153 M572: Set or report extruder elasticity compensation
- 4.154 M573: Report heater PWM
- 4.155 M574: Set endstop configuration
- 4.156 M575: Set serial comms parameters
- 4.157 M576: Set axis/extruder drive mapping
- 4.158 M577: Wait until endstop is triggered
- 4.159 M578: Fire inkjet bits
- 4.160 M579: Scale Cartesian axes
- 4.161 M580: Select Roland
- 4.162 M600: Set line cross section
- 4.163 M600: Filament change pause
- 4.164 M605: Set dual x-carriage movement mode
- 4.165 M665: Set delta configuration
- 4.166 M666: Définir l'ajustement des endstops des Delta
- 4.167 M667: Select CoreXY mode
- 4.168 M700: Level plate
- 4.169 M701: Load filament
- 4.170 M702: Unload filament
- 4.171 M851: Set Z-Probe Offset
- 4.172 M906: Set motor currents
- 4.173 M907: Set digital trimpot motor
- 4.174 M908: Control digital trimpot directly
- 4.175 M909: Set microstepping
- 4.176 M910: Set decay mode
- 4.177 M928: Start SD logging
- 4.178 M998: Request resend of line
- 4.179 M999: Redémarrez après avoir été arrêté par erreur
- 5 Other commands
- 6 Proposed EEPROM configuration codes
- 7 Replies from the RepRap machine to the host computer
- 8 Proposal for sending multiple lines of G-code
- 9 Alternatives to G-code
Introduction
Un morceau de fichier Gcode d'une imprimante 3D Reprap peut ressemblé à ça:
N3 T0*57 N4 G92 E0*67 N5 G28*22 N6 G1 F1500.0*82 N7 G1 X2.0 Y2.0 F3000.0*85 N8 G1 X3.0 Y3.0*33
Le Gcode peut être stocké dans un fichier sur une carte SD, votre disque dur ou tout autre support. L'extension du fichier Gcode peut être .g, .gco or .gcode. Pour les BFB/RapMan l'extention est .bfb. Le fichier Gcode stocker et/ou crée par un trancheur peut ressemblé également a ça:
G92 E0 G28 G1 F1500 G1 X2.0 Y2.0 F3000 G1 X3.0 Y3.0
La signification de tous ces symboles et chiffres (et plus) sont expliqués ci-dessous.
Les Trancheurs peuvent éventuellement ajouter des scripts de gcode au début et à la fin de leur fichier de sortie pour effectuer des actions spécifiques avant et / ou après l'impression tels que l'autolevelling, le chauffage / refroidissement du lit et hotend, effectuer un mouvement pour essuyer la buse grace à un servomoteur,mise en route de l'alimentation Ps_on (ATX). Plus d'info sur les Start GCode routines and End GCode routines pages.
Pour savoir quels GCode spécifique(s) sont mis en œuvre dans cette page, il ya de petites tables attachés à la description des commandes, comme celui-ci:
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Partial | ??? | ??? | ??? | ??? | Experimental | depreciated | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | ??? | Yes | ??? | ??? | automatic | ??? | ??? |
Légende:
- {{yes}}
- Le Gcode est complétement supporté par le firmware.
- {{partial}} or {{experimental}}
- Le Gcode peut fonctionné apres qque manipulation. Souvent, il est nécessaire de consulter la branche de code source pour le firmware (généralement stocké dans une branche différente) ou pour inverser les commutateurs de configuration sur la carte mère.
- automatic
- Le firmware gère cette GCode automatiquement, donc il n'y a pas besoin d'envoyer la commande. Un exemple est alimentation on / off GCode (M80 / M81) dans le firmware Teacup.
- ???
- On ne sait pas si le firmware prend en charge ce GCode. Vous devez le tester vous-même.
- {{no}}
- Le firmware ne support pas le Gcode.
- depreciated
- The firmware à retiré this Gcode. L'auteur du firmware a sans doute retiré ce Gcode en le remplaçant par un autre.
Fields
Un GCode RepRap est une liste de champs qui sont séparés par des espaces blancs ou des sauts de ligne. Un champ peut être interprété comme une commande, paramètre, ou pour tout autre but spécial. Il se compose d'une lettre directement suivi d'un nombre, ou peut être seulement une lettre autonome (Flag). La lettre donne des informations sur le sens du champ (voir la liste ci-dessous dans cette section). Les nombres peuvent être entiers (128) ou nombres fractionnaires (12.42), en fonction du contexte. Par exemple, une coordonnée X peut prendre entiers ( 'x175' ) ou fractionels ( 'X17.62' ), mais en sélectionnant un extrudeur par le numéro 2,76 aurait aucun sens. Dans cette description, les numéros dans les domaines sont représentés par 'nnn' comme un espace réservé.
Lettre | Signification |
---|---|
Gnnn | Commande GCode Standard, Déplacement d'un ou plusieurs axes |
Mnnn | Commande defini pour les RepRap, M106 Pour allumé le ventilateur |
Tnnn | Selectionné un outils nnn. En RepRap, outils et extrudeur |
Snnn | Commande de paramètre , Le Temps ; Les temperatures; La tension à envoyer aux moteurs |
Pnnn | Commande de paramètre, En milliseconeds; Comme le Proportionnel Intégral Dérivé proportional (Kp) |
Xnnn | Coordonnée X, Généralement pour le faire bouger . Il peut etre un nombre entier ou décimal. |
Ynnn | Coordonnée Y, Généralement pour le faire bouger. Il peut etre un nombre entier ou décimal. |
Znnn | Coordonnée Z, Généralement pour le faire bouger . Il peut etre un nombre entier ou décimal. |
Innn | Paramètre - X-offset in arc move; integral (Ki) in PID Tuning |
Jnnn | Paramètre - Y-offset in arc move |
Dnnn | Paramètre- Utilisé pour le diametre ; derivé (Kd) pour le réglage du PID |
Hnnn | Parameter - Utilisé pour la chauffe de la résistance pour le PID |
Fnnn | Paramètre en mm/secondes. (Vitesse de déplacement de la tête d'impression) |
Rnnn | Paramètre - Utilisé pour la température |
Qnnn | Paramètre - pas utilisé actuellement |
Ennn | Longueur du matière extrudé. Il est identique à X, Y et Z, mais il correspond à la longueur de filament à extruder. |
Nnnn | N° de ligne. Utilisé pour demander la transmission de répétition dans le cas d'erreurs de communication. |
*nnn | Checksum. Utilisé pour vérifier les erreurs de communication.. |
G-commands
G0 & G1: Move
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | Yes | ??? | ??? | ??? | Yes | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
Yes | Yes | Yes | Yes | Yes | Yes | Yes | ??? | Yes |
- G0 : Déplacement rapide
- G1 : Déplacement Linéaire
- Usage
- G0 Xnnn Ynnn Znnn Ennn Fnnn Snnn
- G1 Xnnn Ynnn Znnn Ennn Fnnn Snnn
- Paramètre
- ""Tous les paramètres ne nécessite pas d'être utilisé, mais au moins 'un' doit être utilisé
- Xnnn L'axe X bouge sur ça position
- Ynnn L'axe Y bouge sur ça position
- Znnn L'axe Z bouge sur ça position
- Ennn Le Moteur de l'extrudeur tourne de nnn pas
- Fnnn La vitesse par minute d'un ou des axes
- Snnn Test pour vérifier si un endstop a été délecnchés (S1 pour vérifier, S0 pour ignoré, S2 voir la note , par défaut si S0)1
- Exemple
- G0 X12 (Déplacer l'axe X de 12mm)
- G0 F1500 (Régler la vitesse à 1500mm/minute)
- G1 X90.6 Y13.8 E22.4 (Déplacer l'axes X de 90.6mm l'axeY de 13.8mm en extrudant 22.4mm de matière)
Les Firmware RepRap ont la même spécificités pour les commandes G0 and G1 , .2
1. G1 F1500 2. G1 X50 Y25.3 E22.4
Dans l'exemple ci-dessus, nous avons mis l'avance à 1500mm / minute sur la ligne 1, puis déplacé l'axe X de 50 mm, l'axe Y de 25.3mm et extrudé 22.4mm de filament.
1. G1 F1500 2. G1 X50 Y25.3 E22.4 F3000
Cependant, dans l'exemple ci-dessus, nous avons mis une avance de 1500 mm / minute sur la ligne 1, puis Déplaceé les axes comme demandé mais à 3000 mm / minute. L'extrusion va accélérer avec le X et le mouvement Y, donc tout reste synchronisé.
La spécification RepRap traite l'avance comme simplement une autre variable (comme X, Y, Z et E) pour être interpolées linéairement. Cela donne un contrôle complet sur l'accélération et la décélération de la tête d'impression de manière à ce que le firmware assure que tout se déplace ensemble.3
Pour inverser l'extrudeuse par une quantité donnée (par exemple pour réduire sa pression interne pendant qu'il fait un mouvement (en X,y ou Z) afin qu'il ne dribble pas) il suffit d'utiliser G0 ou G1 d'envoyer une valeur de E qui est inférieure à la longueur actuellement extrudé .
G2 & G3: Controle des mouvements des Cercles
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes1 | No | ??? | ??? | ??? | Yes | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
Yes | Yes | No | No | Yes | ??? | No | ??? | ??? |
- Usage
- G2 Xnnn Ynnn Innn Jnnn Ennn Fnnn (Cercle dans le sens des aiguilles d'une montre)
- G3 Xnnn Ynnn Innn Jnnn Ennn Fnnn (Cercle dans le sens inverse des aiguilles d'une montre)
- Parameters
- Xnnn L'axe X bouge sur ça position
- Ynnn L'axe Y bouge sur ça position
- Innn Le point X part de sa position actuelle X afin de maintenir une distance constante à partir de
- Jnnn Le point Y part de sa position actuelle X afin de maintenir une distance constante à partir de
- Ennn Le Moteur de l'extrudeur tourne de nnn pas
- Fnnn La vitesse par minute d'un ou des axes
- Examples
- G2 X90.6 Y13.8 I5 J10 E22.4 (Déplacement dans le sens des aiguilles d'une montre de ce point à ce point(X=90.6,Y=13.8), avec un point central à (X=current_X+5, Y=current_Y+10), en extrudent 22.4mm de matière entre le début et la fin du movement des axes)
- G3 X90.6 Y13.8 I5 J10 E22.4 ((Déplacement dans le sens inverse des aiguilles d'ue montre de ce point à ce point(X=90.6,Y=13.8), avec un point central à (X=current_X+5, Y=current_Y+10), en extrudent 22.4mm de matière entre le début et la fin du movement des axes)
Notes
Dans le Firmware Marlin cette commande n'est pas implanté pour les imprimantes DELTA et SCARA .
G4: Attente
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | Yes | ??? | ??? | ??? | Yes | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
Yes | Yes | Yes | Yes | Yes | Yes | Yes | ??? | Yes |
- Parameters
- Pnnn Temps à attendre, en millisecondes
- Snnn Temps à attendre, en secondes (Seulement pour Marlin et Smoothieware)
- Exemple
- G4 P200
Dans ce cas, Rien ne se passe pendant 200 millisecondes. Pendant les pauses l'état de la machine (par exemple, les températures de ses hotend) sera toujours préservée et contrôlée
Pour Marlin et Smoothie, le parametre d'attente "S" est en secondes, et le parametre "P" est en millisecondes.
G20: Définir les unités en Pouces
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | Yes | ??? | ??? | ??? | Yes | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
Yes | Yes | No | Yes | Yes | ??? | Yes | ??? | ??? |
Example: G20
Les unités à partir de maintenant sont en pouces.
G21: Définir les unités en Millimètres
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | Yes | ??? | ??? | ??? | Yes | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
Yes | Yes | Yes | Yes | Yes | Yes | Yes | ??? | ??? |
Example: G21
Les unités à partir de maintenant sont en Millimètres. (Le Millimètre est l'unité par défaut sur les RepRap.)
G28: Déplacement aux origines (Homing)
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | Yes | ??? | ??? | ??? | Yes | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
Yes | Yes | Yes | Yes | Yes | Yes | Yes | ??? | Yes |
- Paramètres
- Ces Commandes peuvet être utilisées sans paramètres additionels.
- X Déplacement de l'axe X vers son origine
- Y Déplacement de l'axe Y vers son origine
- Z Déplacement de l'axe Z vers son origine
- Examples
- G28 (Déplacement de tous les axes vers leurs origines)
- G28 X Z (Déplacement seulement des axes X et Y vers leurs origines)
Lorsque le firmware RepRap reçoit cette commande, il déplace le ou les axes vers leur(s) butées aussi rapidement que possible, puis il(s)recule(nt) d'un millimètre et se déplace lentement vers les points d'activation de butée zéro pour augmenter la précision de position. Ce processus est également connu sous le nom de " Homing ".
Si vous ajouter une coordonnée, elle sera ignorée. Par exemple, G28 Z0.00
le résultat sera le même que G28 Z
.
G29: Autolevel
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | No, see G32 | ??? | ??? | ??? | Yes | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | Yes | Yes | No | ??? | ??? |
Example: G29
Déplace l'axe Z sur 3 points ou plus pour calculer la planéité du plateau. La comande G28 est à éxécutée avant le G29.
G90: Position Absolue
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | Yes | ??? | ??? | ??? | Yes | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
Yes | Yes | Yes | Yes | Yes | Yes | Yes | ??? | ??? |
Example: G90
Toutes les coordonnées éxécutées à partir de maintenant sont en rapport à l'origine de la machine. (la position absolue est l'unité par défaut sur les RepRap.)
G91: Position Relative
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | Yes | ??? | ??? | ??? | Yes | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
Yes | Yes | No | Yes | Yes | Yes | Yes | ??? | ??? |
Example: G91
Toutes les coordonnées à partir de maintenant sont liés à la dernière position.
G92: Définir la Position
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | Yes | ??? | ??? | ??? | Yes | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
Yes | Yes | Yes | Yes | Yes | Yes | Yes | ??? | Yes |
- Parameters
- Ces Commandes peuvet être utilisées sans paramètres additionels.
- Xnnn Difini la nouvelle position de l'axe X
- Ynnn Difini la nouvelle position de l'axe Y
- Znnn Difini la nouvelle position de l'axe Z
- Ennn Difini la nouvelle position de l'extruder
- Exemple
- G92 X10 E90
Permet la programmation du point zéro absolu, en réinitialisant la position actuelle aux valeurs spécifiées. Ici le X de la machine passe en coordonnées à 10, et l'extrudeur à 90. Aucun mouvement physique se produira.
Un G92 sans coordonées paramétra tous les axes à 0.
M-commandes
M18: Arret de tous les moteurs
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
call M84 | Yes | ??? | ??? | ??? | No | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | use M2 | ??? | Yes |
Exemple: M18
Arretes tous les moteurs et permet de les bouger librement à la main'
le firmware Marlin permet de désactivés un des moteurs pas à pas. Par exemple, M18 X permet de désactiver les moteurs X.
M80: ATX Power On
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | dc42 | ??? | ??? | ??? | Yes | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | Yes | No | No | No | ??? | automatic | ??? | ??? |
Example: M80
Active l'alimentation de l'ATX partir du mode veille au mode opérationnel.
M81: ATX Power Off
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | dc42 | ??? | ??? | ??? | Yes | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | Yes | No | No | No | ??? | automatic | ??? | ??? |
Example: M81
Éteint l'alimentation ATX.
M82: Définir le mode Absolue pour l'extrudeur
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | Yes | ??? | ??? | ??? | Yes | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | Yes | No | No | No | ??? | Yes | ??? | ??? |
Exemple: M82
Défini la position de l'extrudeur comme position absolue
Ce mode est par défaut pour repetier.
M83: Définir le mode relatif pour l'extrudeur
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | Yes | ??? | ??? | ??? | Yes | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | Yes | No | No | No | ??? | Yes | ??? | ??? |
Example: M83
Défini la position de l'extrudeur comme position relatif du dernier point.
M92: Définir les steps/mm
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | Yes | ??? | ??? | ??? | Yes | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | Yes | No | No | No | ??? | No | ??? | ??? |
Exemple (Sprinter et Marlin): M92 X<newsteps>
Permet la programmation des pas par unité (généralement mm) de l'axe (ici X). Le firmware se remet par défaut lors de la réinitialisation, à moins de le sauvé dans l'EEPROM (M500 à Marlin) ou dans le fichier de configuration (config.g dans RepRapFirmware). Cette Commande est très utile pour l'étalonnage.
M104: Définir la température de l'extudeur
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | Yes | ??? | ??? | ??? | Yes | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | Yes | Yes | Yes | Yes | Yes | Yes | ??? | Yes |
- Paramètres
- Snnn Température cible
- Exemple
- M104 S190
Règle la température de l'extrudeuse actuelle à 190oC et le maintien à cette température.
M105: Retourner la température de l'extrudeur
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | Yes | ??? | ??? | ??? | Yes | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | Yes | No | Yes | No | Yes | Yes | ??? | ??? |
Example: M105
Renvoi la température actuelle de l'extrudeur et du plateau chauffant en degrès celcius. La temperature est retourné sur l'ordinateur connecté. Par exemple, le retour à l'ordinateur connecté ressemble à ça :
ok T:201 B:117
Extension/généralisation du M105 to be considered using S1 parameter as noted in Pronterface I/O Monitor
Dans Repetier, vous pouvez ajouter X0 pour récupérer la valeur brut si nécessaire :
M105 X0 ==> 11:05:48.910 : T:23.61 /0 @:0 T0:23.61 /0 @0:0 RAW0:3922 T1:23.89 /0 @1:0 RAW1:3920
Duet-dc42 extension
Duet-dc42 firmware returns a JSON-formatted response if parameter S2 or S3 is included. This is used by the touch-screen control panel. Additionally, parameter Rnn may be provided, where nn is the sequence number of the most recent G-code response that the client has already received.
The response comprises a single JSON object, with no nesting of objects or arrays, followed by newline. It is similar to the object returned by the web interface status request, but some fields are omitted. Here is a sample response when S2 is used:
{"status":"I","heaters":[25.0,29.0,28.3],"active":[-273.1,0.0,0.0],"standby":[-273.1,0.0,0.0],"hstat":[0,2,1],"pos":[-11.00,0.00,0.00],"extr":[0.0,0.0],"sfactor":100.00, "efactor":[100.00,100.00],"tool":1,"probe":"535","fanRPM":0,"homed":[0,0,0],"fraction_printed":0.572}
The meaning of these fields is:
status: I=idle, P=printing from SD card, S=stopped (i.e. needs a reset), C=running config file, A=paused, D=pausing, R=resuming, B=busy (running a macro) heaters: current heater temperatures, numbered as per the machine (typically, heater 0 is the bed) active: active temperatures of the heaters standby: standby temperatures of the heaters hstat: status of the heaters, 0=off, 1=standby, 2=active, 3=fault pos: the X, Y and Z positions of the print head extr: the positions of the extruders sfactor: the current speed factor (see M220 command) efactor: the current extrusion factors (see M221 command) tool: the selected tool number. Zero typically means no tool selected. probe: the Z-probe reading fanRPM: the cooling fan RPM homed: the homed status of the X, Y and Z axes (or towers on a delta). 0=axis has not been homed so position is not reliable, 1=axis has been homed so position is reliable. fraction_printed: the fraction of the file currently being printed that has been read and at least partially processed. message: the message to be displayed on the screen (only present if there is a message to display) timesLeft: an array of the estimated remaining print times (in seconds) calculated by different methods. These are currently based on the proportion of the file read, the proportion of the total filament consumed, and the proportion of the total layers already printed. Only present if a print from SD card is in progress. seq: the sequence number of the most recent G-code response or error message. Only present if the R parameter was provided and the current sequence number is greater. resp: the most recent G-code response or error message. Only present if the R parameter was provided and the current sequence number is greater.
The response when S3 is used comprises these fields plus some additional ones that do not generally change and therefore do not need to be fetched as often. The extra fields include:
myName: the name of the printer geometry: one of "cartesian", "delta", "corexy, "corexz" etc.
The fields may be in any order in the response. Other implementations may omit fields and/or add additional fields.
M106: Allumer les ventilateurs
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | Yes | ??? | ??? | ??? | Yes | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | Yes | Yes | Yes | Yes | ??? | Yes | ??? | ??? |
- Paramètres
- Snnn Vitesse
- Exemple
- M106 S127
Allume les ventilateurs à la moitié de leur vitesse maximale.
Le paramètre obligatoire 'S' indique la valeur PWM (0-255). M106 S0 Eteint les ventilateurs. Dans certaines implémentations le PWM est spécifié par une fraction réelle : M106 S0.7
M106 dans le firmware Duet
Duet-dc42 firmware support un paramètre optionnel I. Si ce paramètre est présent et plus grand que 0, la sortie du ventilateur de refroidissement est inversé. Cela rend la sortie du ventilateur de refroidissement adapté pour alimenter l'entrée d'un ventilateur PWM à 4 fils via une diode. Si le paramètre est présent et à 0 ou négatif, la sortie n'est pas inversé. Si le paramètre n'est pas présent, l'état d'inversion/non-inversion est inchangé. La valeur par défaut au démarrage est pas inversé.
Si le paramètre 'R' est indiqué lors de l'utilisation Duet - zpl firmware ( 0,96 g + ), la dernière valeur connue de ventilation sera réglée. Si le paramètre 'S' est indiqué avec 'R', le firmware n'effacera pas la dernière valeur connue de ventilation. Cela peut être utile pour les fichiers de macro de changement d'outil.
M107: Eteindre les ventilateurs
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | Yes | ??? | ??? | ??? | Yes | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | Yes | Yes | Yes | Yes | ??? | No | ??? | ??? |
Déprécié dans le Teacup firmware. Utilisez M106 S0 plutôt.
M108: Définir la vitesse d'extrusion
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | No | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | Yes | No | No | ??? | No | ??? | ??? |
Défini la vitesse du moteur d'extrusion (Déprécié dans le firmware FiveD, voir M113)
M109: Définir la température de l'extrudeur et attendre
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | Yes | ??? | ??? | ??? | Yes | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | Yes | No | Yes | Yes | Yes | not needed | ??? | Yes |
- Paramètres
- Snnn température cible minimale, attendre pendant la chauffe
- Rnnn température cible maximale, attendre jusqu'à refroidissement(Sprinter)
- Rnnn température cible précise, attendre tant qu'elle n'est pas précisément atteinte (Marlin)
- Tn (optionnel) indique quel extrudeur est concerné
- Exemple
- M109 T1 S215 Fixe la température de l'extrudeur 1 à 215°c
M109 dans Marlin, Sprinter (ATmega port) et Duet
Définir la température de l'extrudeur en degrès celcius et attendre qu'elle soit atteinte. Exemple: M109 S185
M110: Set Current Line Number
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | ??? | ??? | ??? | ??? | Yes | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | Yes | No | ??? | not needed | ??? | ??? |
Example: M110 N123
Set the current line number to 123. Thus the expected next line after this command will be 124.
M111: Set Debug Level
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | Yes | ??? | ??? | ??? | Yes | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | Yes | No | ??? | Debug | ??? | ??? |
Example: M111 S6
Set the level of debugging information transmitted back to the host to level 6. The level is the OR of three bits:
#define DEBUG_ECHO (1<<0) #define DEBUG_INFO (1<<1) #define DEBUG_ERRORS (1<<2) #define DEBUG_DRYRUN (1<<3) // repetier-firmware #define DEBUG_COMMUNICATION (1<<4) // repetier-firmware
Thus 6 means send information and errors, but don't echo commands. (This is the RepRap default.)
For firmware that supports ethernet and web interfaces M111 S9 will turn web debug information on without changing any other debug settings, and M111 S8 will turn it off. Web debugging usually means that HTTP requests will be echoed to the USB interface, as will the responses.
M112: Arrêt d'urgence
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | Yes | ??? | ??? | ??? | Yes | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | Yes | No | ??? | Yes | ??? | ??? |
Exemple: M112 N'importe quel mouvement en cours est arrêté, et la RepRap s'arrête. Tout les moteurs et chauffage sont arrêtés. Il peut être redémarrée en appuyant sur le bouton de réinitialisation sur le microcontrôleur maître. voir aussi M0 et M1.
M113: Set Extruder PWM
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | No | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | Yes | No | ??? | No | ??? | ??? |
Example: M113
Set the PWM for the currently-selected extruder. On its own this command sets RepRap to use the on-board potentiometer on the extruder controller board to set the PWM for the currently-selected extruder's stepper power. With an S field:
M113 S0.7
it causes the PWM to be set to the S value (70% in this instance). M113 S0 turns the extruder off, until an M113 command other than M113 S0 is sent.
M114: Get Current Position
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | Yes | ??? | ??? | ??? | Yes | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | Yes | No | Yes | No | ??? | Yes | ??? | ??? |
Example: M114
This causes the RepRap machine to report its current X, Y, Z and E coordinates to the host.
For example, the machine returns a string such as:
ok C: X:0.00 Y:0.00 Z:0.00 E:0.00
In Marlin first 3 numbers is the position for the planner. The other positions are the positions from the stepper function. This helps for debugging a previous stepper function bug.
X:0.00 Y:0.00 RZ:0.00 LZ:0.00 Count X:0.00 Y:0.00 RZ:41.02 LZ:41.02
M115: Get Firmware Version and Capabilities
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | Yes | ??? | ??? | ??? | Yes | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | Yes | No | Yes | No | ??? | Yes | ??? | ??? |
Example: M115
Request the Firmware Version and Capabilities of the current microcontroller The details are returned to the host computer as key:value pairs separated by spaces and terminated with a linefeed.
sample data from firmware:
ok PROTOCOL_VERSION:0.1 FIRMWARE_NAME:FiveD FIRMWARE_URL:http%3A//reprap.org MACHINE_TYPE:Mendel EXTRUDER_COUNT:1
This M115 code is inconsistently implemented, and should not be relied upon to exist, or output correctly in all cases. An initial implementation was committed to svn for the FiveD Reprap firmware on 11 Oct 2010. Work to more formally define protocol versions is currently (October 2010) being discussed. See M115_Keywords for one draft set of keywords and their meanings. See the M408 command for a more comprehensive report on machine capabilities supported by RepRapFirmware.
RepRapFirmware-dc42 also uses M115 to tell the firmware about the hardware on which it is running. If the P parameter is present then the integer argument specifies the hardware being used. The following are currently supported:
- M115 P0 Automatic board type selection if supported, or default if not
- M115 P1 Duet 0.6
- M115 P2 Duet 0.7
- M115 P3 Duet 0.85
M116: Wait
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | Yes | ??? | ??? | ??? | Yes | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | Yes | No | ??? | Yes | ??? | ??? |
Example: M116
Wait for all temperatures and other slowly-changing variables to arrive at their set values. See also M109.
Duet-dc42 firmware version 0.78c and later supports an optional P parameter, used to specify a tool number. If this parameter is present, then the system only waits for temperatures associated with that tool to arrive at their set values. This is useful during tool changes, to wait for the new tool to heat up without necessarily waiting for the old one to cool down fully.
Users of Duet-zpl may specify a list of the heaters to be waited for by specifying an 'H' parameter. Duet-zpl v1.08d+ further supports an additional 'C' parameter to wait for the chamber temperature to be reached.
M117: Get Zero Position
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | ??? | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | Yes | No | ??? | No | ??? | ??? |
Example: M117
This causes the RepRap machine to report the X, Y, Z and E coordinates in steps not mm to the host that it found when it last hit the zero stops for those axes. That is to say, when you zero X, the x coordinate of the machine when it hits the X endstop is recorded. This value should be 0, of course. But if the machine has drifted (for example by dropping steps) then it won't be. This command allows you to measure and to diagnose such problems. (E is included for completeness. It doesn't normally have an endstop.)
M117: Display Message
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | dc42 | ??? | ??? | ??? | Yes | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M117 Hello World
This causes the given message to be shown in the status line on an attached LCD. The above command will display Hello World.
M118: Negotiate Features
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | ??? | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M118 P42
This M-code is for future proofing. NO firmware or hostware supports this at the moment. It is used in conjunction with M115's FEATURES keyword.
See Protocol_Feature_Negotiation for more info.
M119: Retourner le statut des fin de courses (endstop)
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | Yes | ??? | ??? | ??? | Yes | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | Yes | No | No | No | ??? | Yes | ??? | ??? |
Exemple: M119
Retourne l'état actuel X, Y, Z des capteurs de fin de courses. Prends en compte les paramétrages d'inversion du sens de butée des capteurs fin de courses, on peut donc grace à cette commande savoir si le paramétrage des capteurs de fin de course a été correctement effectué dans le firmware.
Si le retour de cette commande indique 'trigered' pour le X-min alors que celui ci n'est pas censé être enclenché indique qu'il faut changer la logique du fin de course dans le firmware.
M120: Push
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | Yes | ??? | ??? | ??? | No | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Push the state of the RepRap machine onto a stack. Exactly what variables get pushed depends on the implementation (as does the depth of the stack - a typical depth might be 5). A sensible minimum, however, might be
- Current feedrate, and
- Whether moves (and separately extrusion) are relative or absolute
M121: Pop
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | Yes | ??? | ??? | ??? | No | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Recover the last state pushed onto the stack.
M120: Enable endstop detection
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | No | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
M121: Disable endstop detection
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | No | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
M122: Diagnose
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | dc42 | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Sending an M122 causes the RepRap to transmit diagnostic information, for eaxmple via a USB serial link.
M123: Tachometer value
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | ??? | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Sending an M123 causes the RepRap to transmit filament tachometer values from all extruders.
M124: Immediate motor stop
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | ??? | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Immediately stops all motors.
M126: Open Valve
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | ??? | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | Yes | No | ??? | No | ??? | Yes |
Example: M126 P500
Open the extruder's valve (if it has one) and wait 500 milliseconds for it to do so.
M126 in MakerBot
Example: M126 T0
Enables an extra output attached to a specific toolhead (e.g. fan)
M127: Close Valve
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | ??? | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | Yes | No | ??? | No | ??? | Yes |
Example: M127 P400
Close the extruder's valve (if it has one) and wait 400 milliseconds for it to do so.
M127 in MakerBot
Example: M127 T0
Disables an extra output attached to a specific toolhead (e.g. fan)
M140: Définir la température du plateau chauffant (Rapide)
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | Yes | ??? | ??? | ??? | Yes | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | Yes | No | Yes | Yes | ??? | Yes | ??? | ??? |
- Param-tres
- Snnn Température cible
- Exemple
- M140 S55
Définit la température du plateau chauffant à 55oC et rend le contrôle à l'hôte immédiatement (i.e. avant que la température soit atteinte par le plateau chauffant). Il y a un paramètre 'R' facultatif qui définit la température de veille du plateau chauffant : M140 S65 R40.
M141: Set Chamber Temperature (Fast)
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | zpl, dc42 | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | Yes | ??? | uses M104 | ??? | ??? |
Example: M141 S30
Set the temperature of the chamber to 30oC and return control to the host immediately (i.e. before that temperature has been reached by the chamber).
Duet-zpl 1.08d+ and Duet-dc42 1.09d+ implement M141 and accept an additional 'H' parameter to set the chamber heater number.
M142: Holding Pressure
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | No | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M142 S1
Set the holding pressure of the bed to 1 bar.
The holding pressure is in bar. For hardware which only has on/off holding, when the holding pressure is zero, turn off holding, when the holding pressure is greater than zero, turn on holding.
M143: Maximum hot-end temperature
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | No | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M143 S275
Set the maximum temperature of the hot-end to 275C
When temperature of the hot-end exceeds this value, take countermeasures, for instance an emergency stop. This is to prevent hot-end damage.
M146: Set Chamber Humidity
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | No | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
- Parameters
- Rnnn Relative humidity in percent
- Example
- M146 R60
Set the relative humidity of the chamber to 60% and return control to the host immediately (i.e. before that humidity has been reached by the chamber).
M149: Set temperature units
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | No | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
- Parameters
- C Flag to treat temperature as degrees Celsius
- K Flag to treat temperature as Kelvin
- Example
- M149 K
It affects the S or R values in the codes M104, M109, M140, M141, M143, M190 and G10. The default is M149 C.
M150: Set display color
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | No | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
- Parameters
- Rnnn red
- Unnn green
- Bnnn blue
- Example
- M150 R255 U128 B192
Set BlinkM Color via I2C. Range for values: 0-255
M160: Number of mixed materials
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | No | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M160 S4
This command has been superseded by the tool definition command M563 (see below).
Set the number of materials, N, that the current extruder can handle to the number specified. The default is 1.
When N >= 2, then the E field that controls extrusion requires N values separated by colons ":" after it like this:
M160 S4 G1 X90.6 Y13.8 E2.24:2.24:2.24:15.89 G1 X70.6 E0:0:0:42.4 G1 E42.4:0:0:0
The second line moves straight to the point (90.6, 13.8) extruding a total of 22.4mm of filament. The mix ratio for the move is 0.1:0.1:0.1:0.7.
The third line moves back 20mm in X extruding 42.4mm of filament.
The fourth line has no physical effect.
M163: Set weight of mixed material
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | No | ??? | ??? | ??? | Yes: 0.92 | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
- Parameters
- Snnn extruder number
- Pnnn weight
Set weight for this mixing extruder drive.
M164: Store weights
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | No | ??? | ??? | ??? | Yes: 0.92 | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
- Parameters
- Snnn virtual extruder number
- Pnnn store to eeprom (P0 = no, P1 = yes)
Store weights as virtual extruder S.
M190: Wait for bed temperature to reach target temp
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | Yes | ??? | ??? | ??? | Yes | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | Yes | No | No | Yes | ??? | No: See M116 | ??? | ??? |
- Parameters
- Snnn minimum target temperature, waits until heating
- Rnnn accurate target temperature, waits until heating and cooling (Marlin)
- Example
- M190 S60
This will wait until the bed temperature reaches 60 degrees, printing out the temperature of the hot end and the bed every second.
M191: Wait for chamber temperature to reach target temp
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | No | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | Yes | ??? | No | ??? | ??? |
Example: M191 P60
Set the temperature of the build chamber to 60 °C and wait for the temperature to be reached.
M200: Set filament diameter
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | No | ??? | ??? | ??? | Yes | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | Yes | ??? | No | ??? | ??? |
Without parameters loads default grid, and with specified extension attempts to load the specified grid. If not available will not modify the current grid. If Z was saved with the grid file, it will load the saved Z with the grid.
M200 Dm.mmm sets the filament diameter to m.mmm millimeters. It is used with 'volumetric calibration' and G-code generated for an ideal 1.128mm diameter filament, which has a volume of 1mm^3 per millimeter. The intention is to be able to generate filament-independent g-code. (See Triffid_Hunter's_Calibration_Guide#Optional:_Switch_to_volumetric_E_units and http://wooden-mendel.blogspot.com/2011/09/volumetric-stage-two.html for more information.)
M200 D0 or M200 D1.128 ; reset E multiplier to 1, since sqrt(1/pi)*2=1.128
See also Gcode#M119:_Get_Endstop_Status
Question: what does a firmware do with filament diameter? Has this an effect on how much an E command moves the extruder motor? --Traumflug 11:34, 14 October 2012 (UTC) Yes, Marlin uses this to set a 'volumetric_multiplier' by which the E-steps of a move are scaled in the planner. DaveX (talk) 16:44, 12 April 2014 (PDT) Smoothie implements the same thing as Marlin --Arthurwolf (talk) 05:23, 10 November 2014 (PST)
M201: Set max printing acceleration
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | Yes | ??? | ??? | ??? | Yes | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | Yes | No | No | No | ??? | No | ??? | ??? |
Example: M201 X1000 Y1000 Z100 E2000
Sets the acceleration that axes can do in units/second^2 for print moves. For consistency with the rest of G Code movement this should be in units/(minute^2), but that gives really silly numbers and one can get lost in all the zeros. So for this we use seconds.
M202: Set max travel acceleration
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | No | ??? | ??? | ??? | Yes | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | ??? | No | No | No | ??? | No | ??? | ??? |
in units/s^2 for travel moves (M202 X1000 Y1000) Unused in Marlin!!
M203: Set maximum feedrate
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | Yes | ??? | ??? | ??? | Yes | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | ??? | No | No | No | ??? | No | ??? | ??? |
Example: M203 X6000 Y6000 Z300 E10000
Sets the maximum feedrates that your machine can do in mm/min (Marlin uses mm/sec).
M203 Repetier
Set temperture monitor to Sx.
M204: Set default acceleration
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | No | ??? | ??? | ??? | Yes | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | Yes | No | No | No | ??? | No | ??? | ??? |
S normal moves T filament only moves (M204 S3000 T7000) im mm/sec^2 also sets minimum segment time in ms (B20000) to prevent buffer underruns and M20 minimum feedrate
Marlin notes: After Mar11-2015, the M204 options have changed in Marlin:
P = Printing moves
R = Retract only (no X, Y, Z) moves
T = Travel (non printing) moves
The command "M204 P800 T3000 R9000" set the acceleration for printing movements to 800mm/s^2, for travels to 3000mm/s^2 and for retracts to 9000mm/s^2.
M204 Repetier
M204 X[Kp] Y[Ki] Z[Kd] -
Set PID parameter. Values are 100*real value.
M205: Advanced settings
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | ??? | ??? | ??? | ??? | Yes | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | Yes | No | No | No | ??? | No | ??? | ??? |
minimum travel speed S=while printing T=travel only, B=minimum segment time X= maximum xy jerk, Z=maximum Z jerk, E=maximum E jerk
M205 Repetier
Output EEPROM settings.
M206:
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | ??? | ??? | ??? | ??? | Yes | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | Yes | No | No | No | ??? | No | ??? | ??? |
M206 Marlin, Sprinter, Smoothie - Set home offset
Example: M206 X10.0 Y10.0 Z-0.4
The values specified are added to the endstop position when the axes are referenced. The same can be achieved with a G92 right after homing (G28, G161).
With Marlin firmware, this value can be saved to EEPROM using the M500 command.
A similar command is G10, aligning these two is subject to discussion.
With Marlin 1.0.0 RC2 a negative value for z lifts(!) your printhead.
M206 Repetier - Set eeprom value
M206 T[type] P[pos] [Sint(long] [Xfloat] Set eeprom value
Example: M206 T3 P39 X19.9
Set Jerk to 19.9
M207: Calibrate z axis by detecting z max length
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | ??? | ??? | ??? | ??? | ??? | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M207
After placing the tip of the nozzle in the position you expect to be considered Z=0, issue this command to calibrate the Z axis. It will perform a z axis homing routine and calculate the distance traveled in this process. The result is stored in EEPROM as z_max_length. For using this calibration method the machine must be using a Z MAX endstop.
This procedure is usually more reliable than mechanical adjustments of a Z MIN endstop.
M207: Set retract length
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | No | ??? | ??? | ??? | No | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
- Parameters
- Snnn positive length to retract, in mm
- Fnnn feedrate, in mm/min
- Znnn additional zlift/hop
- Example
- M207 S4.0 F2400 Z0.075
Sets retract length, stays in mm regardless of M200 setting
M208: Set axis max travel
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | Yes | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M208 X250 Y210 Z180
The values specified set the software limits for axis travel in the positive direction.
RepRapPro's version of Marlin uses M208 this way. Send M503 to see the current values. The value can be saved to EEPROM using the M500 command.
With Duet-dc42 firmware, on a Cartesian printer you can also use this command to specify software limits for axis travel in the negative direction, by adding parameter S1. The axis limits you set are also the positions assumed when an endstop is triggered.
M208: Set unretract length
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | No | ??? | ??? | ??? | No | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
- Parameters
- Snnn positive length surplus to the M207 Snnn, in mm
- Fnnn feedrate, in mm/sec
Sets recover=unretract length.
M209: Enable automatic retract
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | No | ??? | ??? | ??? | Yes | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M209 S1
This boolean value S 1=true or 0=false enables automatic retract detect if the slicer did not support G10/11: every normal extrude-only move will be classified as retract depending on the direction.
M210: Set homing feedrates
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | ??? | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M210 X1000 Y1500
Set the feedrates used for homing to the values specified in mm per minute.
M211: Disable/Enable software endstops
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | ??? | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
The boolean value S 1=enable or 0=disable controls state of software endstop.
The boolean value X, Y or Z 1=max endstop or 0=min endstop selects which endstop is controlled.
Example: M211 X1 Y1 Z1 S0
Disables X,Y,Z max endstops
Example: M211 X0 S1
Enables X min endstop
Example: M211
Prints current state of software endstops.
M212: Set Bed Level Sensor Offset
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes* | ??? | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
This G-Code command is known to be available in the newer versions of PrintrBot's branch of Marlin. It may not be available in other firmware.
Example: M212 Z-0.2
Set the Z home to 0.2 mm lower than where the sensor says Z home is. This is extremely useful when working with printers with hard-to-move sensors, like the PrintrBot Metal Plus.
PrintrBot suggests that the user make minor (0.1-0.2) adjustments between attempts and immediately executes M500 & M501 after setting this.
M218: Set Hotend Offset
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | No | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Sets hotend offset (in mm): T<extruder_number> X<offset_on_X> Y<offset_on_Y>.
Example: M218 T1 X50 Y0.5
M220: Set speed factor override percentage
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | dc42 | ??? | ??? | ??? | Yes | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | Yes | No | No | No | ??? | No | ??? | ??? |
Example: M220 S80
S<factor in percent>- set speed factor override percentage
M221: Set extrude factor override percentage
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | dc42 | ??? | ??? | ??? | Yes | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | Yes | No | No | No | ??? | No | ??? | ??? |
Example: M221 S70
S<factor in percent>- set extrude factor override percentage
M220: Turn off AUX V1.0.5
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | ??? | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | Yes | No | No | ??? | No | ??? | ??? |
M221: Turn on AUX V1.0.5
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | ??? | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | Yes | No | No | ??? | No | ??? | ??? |
M222: Set speed of fast XY moves
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | ??? | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | Yes | No | No | ??? | No | ??? | ??? |
M223: Set speed of fast Z moves
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | ??? | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | Yes | No | No | ??? | No | ??? | ??? |
M224: Enable extruder during fast moves
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | ??? | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | Yes | No | No | ??? | No | ??? | ??? |
M225: Disable on extruder during fast moves
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | ??? | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | Yes | No | No | ??? | No | ??? | ??? |
M226: Gcode Initiated Pause
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | Yes | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | Yes | No | Yes | ??? | No | ??? | ??? |
Example: M226
Initiates a pause in the same way as if the pause button is pressed. That is, program execution is stopped and the printer waits for user interaction. This matches the behaviour of M1 in the NIST RS274NGC G-code standard and M0 in Marlin firmware.
M226: Wait for pin state
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | ??? | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
- Parameters
- Pnnn pin number
- Snnn pin state
- Example
- M226 P2 S1
Wait for a pin to be in some state.
M227: Enable Automatic Reverse and Prime
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | ??? | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M227 P1600 S1600
P and S are steps.
"Reverse and Prime" means, the extruder filament is retracted some distance when not in use and pushed forward the same amount before going into use again. This shall help to prevent drooling of the extruder nozzle. Teacup firmware implements this with M101/M103.
M228: Disable Automatic Reverse and Prime
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | ??? | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M228
See also M227.
M229: Enable Automatic Reverse and Prime
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | ??? | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M229 P1.0 S1.0
P and S are extruder screw rotations. See also M227.
M230: Disable / Enable Wait for Temperature Change
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | No | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M230 S1
S1 Disable wait for temperature change S0 Enable wait for temperature change
M231: Set OPS parameter
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | ??? | ??? | ??? | ??? | Yes | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
M231 S[OPS_MODE] X[Min_Distance] Y[Retract] Z[Backslash] F[ReatrctMove]
M232: Read and reset max. advance values
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | ??? | ??? | ??? | ??? | Yes | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
M240: Déclenché l'appareil photo
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | ??? | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M240
Déclenche un appareil photo connecter sur la carte.
M241: Stop conveyor belt motor / echo on
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | ??? | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | Debug: Echo on | ??? | ??? |
Example: M241
Echoing may be controlled in some firmwares with M111
M245: Start cooler
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | ??? | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M245
used to cool parts/heated-bed down after printing for easy remove of the parts after print
M246: Stop cooler
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | ??? | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M246
M250: Set LCD contrast
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | ??? | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M250 C20
Sets LCD contrast C<contrast value> (value 0..63), if available.
M251: Measure Z steps from homing stop (Delta printers)
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | ??? | ??? | ??? | ??? | Yes | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
M251 S0 - Reset, S1 - Print, S2 - Store to Z length (also EEPROM if enabled)
(This is a Repetier-Firmware only feature)
M280: Définir la postion du servomoteur
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | ??? | ??? | ??? | ??? | ??? | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | Yes | ??? | No | ??? | ??? |
(Marlin, Repetier M340)
Définir la postion absolue du servomoteur. P: determine le servomoteur , S: Angle ou Microsecondes (Marlin)
M300: Jouer un son
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | dc42 | ??? | ??? | ??? | Yes | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | Yes | ??? | No | ??? | ??? |
- Parametres
- Snnn frequence en Hz
- Pnnn durer en millisecondes
- Exemple
- M300 S300 P1000
Jouer un bip sonore de 300Hz pendant 1000 millisecondes, utiliser le pour notifier des événements importants comme la fin de l'impression.
M301: Set PID parameters
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | Yes | ??? | ??? | ??? | Yes | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | Yes | No | No | No | ??? | No: See M13[0-3]) | ??? | ??? |
- Parameters
- Hnnn heater number (Smoothie uses 'S')
- Pnnn proportional (Kp)
- Innn integral (Ki)
- Dnnn derivative (Kd)
- Examples
- M301 H1 P1 I2 D3 ; Marlin
- M301 H1 P1 I2 D3 T0.2 B20 W127 S0.8 ; RepRapFirmware (v1.09 onwards), Duet-dc42
- M301 S0 P30 I10 D10 ; Smoothie
Sets Proportional (P), Integral (I) and Derivative (D) values for hot end. See also PID Tuning.
Marlin
Hot end only; see M304 for bed PID. H is the heater number, default 1 (i.e. first extruder heater).
Duet-dc42 and RepRapFirmware (v1.09 onwards)
H: Is the heater number, and is compulsory. H0 is the bed, H1 is the first hot end, H2 the second etc.
P: Interprets a negative P term as indicating that bang-bag control should be used instead of PID (not recommended for the hot end, but OK for the bed heater).
I: Integral value
D: Derivative value
T: Is the approximate additional PWM (on a scale of 0 to 255) needed to maintain temperature, per degree C above room temperature. Used to preset the I-accumulator when switching from heater fully on/off to PID.
S: PWM scaling factor, to allow for variation in heater power and supply voltage. Is designed to allow a correction to be made for a change in heater power and/or power supply voltage without having to change all the other parameters. For example, an S factor of 0.8 means that the final output of the PID controller should be scaled to 0.8 times the standard value, which would compensate for a heater that is 25% more powerful than the standard one or a supply voltage that is 12.5% higher than standard.
W: Wind-up. Sets the maximum value of I-term, must be high enough to reach 245C for ABS printing.
B: PID Band. Errors larger than this cause heater to be on or off.
An example using all of these would be:
- M301 H1 P20 I0.5 D100 T0.4 S1 W180 B30
Smoothie
S0 is 0 for the hotend, and 1 for the bed, other numbers may apply to your configuration, depending on the order in which you declare temperature control modules.
Other implementations
W: Wind-up. Sets the maximum value of I-term, so it does not overwhelm other PID values, and the heater stays on. (Check firmware support - Sprinter, Marlin?) Example:
- M301 W125
Teacup
See M130, M131, M132, M133 for Teacup's codes for setting the PID parameters.
M302: Autoriser l'extrusion à froid
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | Yes | ??? | ??? | ??? | Yes: 0.92 | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Ceci indique à l'imprimante de permettre un mouvement du moteur de l'extrudeur meme si la hotend n'est pas à la température d'impression
Exemple: M302
M303: Executé un paramétrage automatic du PID
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | No | ??? | ??? | ??? | Yes | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | Yes | No | No | No | ??? | No | ??? | ??? |
PID Tuning se réfère à un algorithme de contrôle utilisé dans certains repraps pour les hotends et les lits chauffants. Cette commande génère le proportionnel (Kp), intégral (Ki), et (Kd) la valeur des produits dérivés pour la hotend ou lit (E-1). Envoyer le code M303 et attender la fin du programme.
Pid de la hotend:
M303 E0 S<température> C< nombre de cycles>
Exemple:
M303 E0 C8 S175
le firmware va éxécuté un test de la hotend 1 de 8 cycles avec une consigne de 175°.
M304: Définir les parametre PID du Bed (lit chauffant)
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | dc42 | ??? | ??? | ??? | ??? | No: See M301 | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
- Parameters
- Pnnn proportionnelle (Kp)
- Innn intégrale (Ki)
- Dnnn dérivé (Kd)
- Exemples
- M304 P1 I2 D3 ; set kP=3, kI=2, kD=3
- M301 P1 I2 D3 T0.7 H0 B20 W127 ; Duet-dc42 firmware
- M304 ; Retourner les parametres
Définit les valeurs proportionnelle, intégrale et dérivé pour le bed (lit chauffant).
Regarder aussi PID Tuning.
M305: Set thermistor and ADC parameters
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | Yes | ??? | ??? | ??? | ??? | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Sets the parameters for temperature measurement. Supported by RepRapFirmware from 0.78c, and Duet-dc42 firmware.
Example: M305 P1 T100000 R1000 B4200
This tells the firmware that for heater 1 (P parameter: 0 = heated bed, 1 = first extruder) the thermistor 25C resistance (T parameter) is 100Kohms, the thermistor series resistance (R parameter) is 1Kohms, the thermistor beta (B parameter) is 4200. All parameters other than P are optional. If only the P parameter is given, the existing values are displayed.
Additionally, Duet-dc42 firmware supports an ADC correction functionality and a thermistor selection facility.
Example: M305 P1 T100000 R1000 B4200 H14 L-11 X2
Here the ADC high end correction (H parameter) is 14, the ADC low end correction (L parameter) is -11, and thermistor input #2 is used to measure the temperature of heater #1.
M306: set home offset calculated from toolhead position
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | ??? | ??? | ??? | ??? | ??? | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M306 Z0
The values specified are added to the calculated end stop position when the axes are referenced. The calculated value is derived from the distance of the toolhead from the current axis zero point.
The user would typically place the toolhead at the zero point of the axis and issue the M306 command.
This value can be saved to EEPROM using the M500 command (as M206 value).
Implemented in Smoothieware
M320: Activate autolevel(Repetier)
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | ??? | ??? | ??? | ??? | Yes | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
(Repetier only)
M321: Deactivate autolevel(Repetier)
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | ??? | ??? | ??? | ??? | Yes | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
(Repetier only)
M322: Reset autolevel matrix
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | ??? | ??? | ??? | ??? | Yes | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M322 S1
Parameter S1 is mandatory
(Repetier only)
M340: Control the servos
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | ??? | ??? | ??? | ??? | Yes | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
(Repetier only ,Marlin see M280)
M340 P<servoId> S<pulseInUS> / ServoID = 0..3 pulseInUs = 500..2500
Servos are controlled by a pulse width normally between 500 and 2500 with 1500ms in center position. 0 turns servo off.
M350: Set microstepping mode
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | ??? | ??? | ??? | ??? | Yes | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Sets microstepping mode.
Warning: Steps per unit remains unchanged.
- Usage
- M350 Snn Xnn Ynn Znn Enn Bnn
- Parameters
- Not all parameters need to be used, but at least one should be used
- Snn Set stepping mode for all drivers
- Xnn Set stepping mode for the X axis
- Ynn Set stepping mode for the Y axis
- Znn Set stepping mode for the Z axis
- Enn Set stepping mode for Extruder 0
- Bnn Set stepping mode for Extruder 1
- Modes (nn)
- 1 = full step
- 2 = half step
- 4 = quarter step
- 8 = 1/8 step
- 16 = 1/16 step
- Examples
- M350 S16 (reset all drivers to the default 1/16 micro-stepping)
- M350 Z1 (set the Z-axis' driver to use full steps)
- M350 E4 B4 (set both extruders to use quarter steps)
M351: Toggle MS1 MS2 pins directly
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | ??? | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M351
M355: Turn case lights on/off
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | No | ??? | ??? | ??? | Yes: 0.92.2 | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | use M106 | ??? | ??? |
- Examples
- M355 S1 ; Enable lights
- M355 S0 ; Disable lights
- M355 ; Report status
Every call or change over LCD menu sends a state change for connected hosting software like
Case lights on Case lights off No case lights
M360: Report firmware configuration
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | No | ??? | ??? | ??? | Yes: 0.92.2 | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
- Target
This command helps hosting software to detect configuration details, which the user would need to enter otherwise. It should reduce configuration time considerably if supported.
- Example
- M360
- Response
Config:Baudrate:250000 Config:InputBuffer:127 Config:NumExtruder:2 Config:MixingExtruder:0 Config:HeatedBed:0 Config:SDCard:1 Config:Fan:1 Config:LCD:1 Config:SoftwarePowerSwitch:1 Config:XHomeDir:-1 Config:YHomeDir:-1 Config:ZHomeDir:-1 Config:SupportG10G11:1 Config:SupportLocalFilamentchange:1 Config:CaseLights:0 Config:ZProbe:1 Config:Autolevel:0 Config:EEPROM:1 Config:PrintlineCache:24 Config:JerkXY:30.00 Config:JerkZ:0.30 Config:RetractionLength:3.00 Config:RetractionLongLength:13.00 Config:RetractionSpeed:40.00 Config:RetractionZLift:0.00 Config:RetractionUndoExtraLength:0.00 Config:RetractionUndoExtraLongLength:0.00 Config:RetractionUndoSpeed:0.00 Config:XMin:0.00 Config:YMin:0.00 Config:ZMin:0.00 Config:XMax:250.00 Config:YMax:150.00 Config:ZMax:90.00 Config:XSize:250.00 Config:YSize:150.00 Config:ZSize:90.00 Config:XPrintAccel:250.00 Config:YPrintAccel:250.00 Config:ZPrintAccel:100.00 Config:XTravelAccel:250.00 Config:YTravelAccel:250.00 Config:ZTravelAccel:100.00 Config:PrinterType:Cartesian Config:MaxBedTemp:120 Config:Extr.1:Jerk:50.00 Config:Extr.1:MaxSpeed:100.00 Config:Extr.1:Acceleration:10000.00 Config:Extr.1:Diameter:0.00 Config:Extr.1:MaxTemp:220 Config:Extr.2:Jerk:50.00 Config:Extr.2:MaxSpeed:100.00 Config:Extr.2:Acceleration:10000.00 Config:Extr.2:Diameter:0.00 Config:Extr.2:MaxTemp:220
SCARA calibration codes (Morgan)
In order to ease calibration of Reprap Morgan, the following M-codes are used to set the machine up
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Partial | No | ??? | ??? | ??? | No | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
M360: Move to Theta 0 degree position
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Experimental | No | ??? | ??? | ??? | No | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
The arms move into a position where the Theta steering arm is parallel to the top platform edge. The user then calibrates the position by moving the arms with the jog buttons in software like pronterface until it is perfectly parallel. Using M114 will then display the calibration offset that can then be programmed into the unit using M206 (Home offset) X represents Theta.
Smoothieware: M360 P0 will take the current position as parallel to the platform edge, and store the offset in the homing trim offset (M666) No further user interaction is needed.
M361: Move to Theta 90 degree position
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Experimental | No | ??? | ??? | ??? | No | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Theta move to 90 degrees with platform edge. User calibrates by using jog arms to place exactly 90 degrees. Steps per degree can then be read out by using M114, and programmed using M92. X represents Theta. Program Y (Psi) to the same value initially. Remember to repeat M360 after adjusting steps per degree.
Smoothieware: M360 P0 will accept the current position as 90deg to platform edge. New steps per angle is calculated and entered into memory (M92) No further user interaction is required, except to redo M360.
M362: Move to Psi 0 degree position
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Experimental | No | ??? | ??? | ??? | No | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Arms move to Psi 0 degree. Check only after other Theta calibrations
M363: Move to Psi 90 degree position
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Experimental | No | ??? | ??? | ??? | No | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Arms move to Psi 90 degree. Check only after other Theta calibrations
M364: Move to Psi + Theta 90 degree position
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Experimental | No | ??? | ??? | ??? | No | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Move arms to form a 90 degree angle between the inner and outer Psi arms. Calibrate by moving until angle is exactly 90 degree. Read out with M114, and calibrate value into Home offset M206. Psi is represented by Y.
Smoothieware: M364 P0 will accept the current position as 90deg between arms. The offset is stored as a trim offset (M666) and no further user interaction is required except to save all changes via M500
M365: SCARA scaling factor
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Experimental | No | ??? | ??? | ??? | No | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Adjust X Y and Z scaling by entering the factor. 100% scaling (default) is represented by 1
M366: SCARA convert trim
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | No | ??? | ??? | ??? | No | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Executing this command translates the calculated trim values of the SCARA calibration to real home offsets. This prevents the home and trim movement after calibration.
M370: Morgan manual bed level - clear map
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | No | ??? | ??? | ??? | No | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Clear the map and prepare for calibration
- Usage
- M370
- M370 X<divisions> Y<divisions>
Without parameters is defaults to X5 Y5 (25 calibration points) When specifying parameters, uneven numbers are recommended.
M371: Move to next calibration position
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | No | ??? | ??? | ??? | No | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Move to the next position for calibration. User moves the bed towards the hotend until it just touches
M372: Record calibration value, and move to next position
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | No | ??? | ??? | ??? | No | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
The position of the bed is recorded and the machine moves to the next position. Repeat until all positions programmed
M373: End bed level calibration mode
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | No | ??? | ??? | ??? | No | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
End calibration mode and enable z correction matrix. Does not save current matrix
M374: Save calibration grid
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | No | ??? | ??? | ??? | No | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Saves the calibration grid. (Smoothieware)
- Usage
- M374
- M374 <file extension> Z
Without parameters safes the grid into the default grid file that gets loaded at boot Parameter specifies the extension of the grid file - useful for special grid files such as for a special print surface like a removable print plate. Addition of Z will additionally save the M206 Z homing offset into the grid file
M375: Display matrix / Load Matrix
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | No | ??? | ??? | ??? | No | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Display the bed level calibration matrix (Marlin) Load Grid matrix file (Smoothieware)
- Usage
- M375
- M375 <file extension>
Without parameters loads default grid, and with specified extension attempts to load the specified grid. If not available will not modify the current grid. If Z was saved with the grid file, it will load the saved Z with the grid.
M380: Activate solenoid
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | ??? | ??? | ??? | ??? | ??? | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M380
Activates solenoid on active extruder.
M381: Disable all solenoids
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | ??? | ??? | ??? | ??? | ??? | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M381
M400: Wait for current moves to finish
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | ??? | ??? | ??? | ??? | Yes | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | Yes | No | No | Yes | ??? | No | ??? | ??? |
Finishes all current moves and and thus clears the buffer. That's identical to G4 P0
.
Example: M400
M401: Lower z-probe
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | ??? | ??? | ??? | ??? | ??? | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M401
Lower z-probe if present.
M402: Raise z-probe
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | ??? | ??? | ??? | ??? | ??? | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M402
Raise z-probe if present.
M404: Filament width and nozzle diameter
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | Partial | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M404 N1.75
N<dia in mm> Enter the nominal filament width (3mm, 1.75mm) or will display nominal filament width without parameters.
While Marlin only accepts the N parameter, Duet-zpl further allows to specify the nozzle diameter (in mm) via the D-parameter. It is used to properly detect the first layer height when a new print is being started.
Example: M404 N3.0 D1.0
M405: Filament Sensor on
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | No | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M405
Turn on Filament Sensor extrusion control. Optional D<delay in cm> to set delay in centimeters between sensor and extruder.
M406: Filament Sensor off
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | ??? | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M406
Turn off Filament Sensor extrusion control.
M407: Display filament diameter
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | Partial | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M407
Displays measured filament diameter. In RepRapFirmware M407 does the same as M404.
M408: Report JSON-style response
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | Partial | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Report a JSON-style response by specifying the desired type using the 'S' parameter. For some purposes it is necessary to pass the sequence number, which is why Duet-zpl and Duet-dc42 accept an additional 'P' parameter to specify it.
Example: M408 S0
The following response types are supported:
- Type 0 is the M105 S2 response, which is like the new-style status response (for the old web interface) but some fields are omitted.
- Type 1 is the M105 S3 response, which is like the M105 S2 response except that static values are also included.
- Type 2 is the new-style standard JSON response, which is also reported to the new web interface (see Duet Web Control)
- Type 3 is an extended version of type 2 which includes some additional parameters that aren't expected to change very frequently
- Type 4 is an extended version of type 2 which may be used to poll for current printer stats
- Type 5 reports the current machine configuration
For a more detailed comparison of type 2 - 5, see Proposed_RepRap_Duet_Status_Responses
Currently M408 is only supported by Duet-dc42 and Duet-zpl.
M420: Set RGB Colors as PWM and is also Enable/Disable Mesh Bed Leveling
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | ??? | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | Yes | ??? | No | ??? | ??? |
Usage: M420 R<Red PWM (0-255)> E<Green PWM (0-255)> B<Blue PWM (0-255)>
Example: M420 R255 E255 B255
Set the color of your RGB LEDs that are connected to PWM-enabled pins. Note, the Green color is controlled by the E value instead of the G value due to the G code being a primary code that cannot be overridden.
In marlin, is also: M420 - Enable/Disable Mesh Leveling (with current values) S1=enable S0=disable
M421: Set a Mesh Bed Leveling Z coordinate
M421 - Set a single Z coordinate in the Mesh Leveling grid. X<index> Y<index> Z<offset in mm>
M500: Store parameters in EEPROM
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | dc42, zpl | ??? | ??? | ??? | Yes | ??? | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | Yes | No | No | No | ??? | No | ??? | ??? |
Example: M500
Save current parameters to EEPROM. dc42 and zpl forks of RepRapFirmware allow "S1" to be passed, which forces parameters to be automatically saved to EEPROM when they are changed.
In Redeem any parameters set through G/M-codes which is different than what is read from the config files, are stored back to the local config. For instance setting stepper current and microstepping through M906 and M907 followed by M500 will update /etc/redeem/local.cfg.
M501: Read parameters from EEPROM
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | dc42, zpl | ??? | ??? | ??? | Yes | ??? | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | Yes | No | No | No | ??? | No | ??? | ??? |
Example: M501
Set the active parameters to those stored in the EEPROM. This is useful to revert parameters after experimenting with them.
M502: Revert to the default "factory settings."
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | ??? | ??? | ??? | ??? | Yes | ??? | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | Yes | No | No | No | ??? | No | ??? | ??? |
Example: M502
This command resets all tunable parameters to their default values, as set in the firmware. This doesn't reset any parameters stored in the EEPROM, so it must be followed with M501 if you want to do that.
M503: Print settings
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | dc42, zpl | ??? | ??? | ??? | ??? | ??? | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | Yes | No | No | No | ??? | No | ??? | ??? |
Example: M503
This command asks the firmware to reply with the current print settings stored in EEPROM. The reply output includes the G-Code commands to produce each setting. For example, the Steps Per Unit values are displayed as an M92 command.
M540: Enable/Disable "Stop SD Print on Endstop Hit"
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | No | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
- Parameters
- Snnn state, S1=enable, S0=disable
- Example
- M540 S1
M540: Set MAC address
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | Yes | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M540 P0xBE:0xEF:0xDE:0xAD:0xFE:0xED
Sets the MAC address of the RepRap. This should be done before any other network commands. The MAC address is six one-byte hexadecimal numbers separated by colons. The 0x prefix is optional in later firmware revisions.
M550: Set Name
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | Yes | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M550 PGodzilla
Sets the name of the RepRap to (in this case) Godzilla. The name can be any string of printable characters except ';', which still means start comment.
M551: Set Password
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | Yes | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M551 Pmy-very-secret-word
On machines that need a password to activate them, set that password. The code 'P' is not part of the password. Note that as this is sent in clear it does not (nor is it intended to) offer a very high level of security. But on machines that are (say) on a network, it prevents idle messing about by the unauthorised. The password can contain any printable characters except ';', which still means start comment.
M552: Set IP address
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | Yes | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M552 P192.168.1.14
Sets the IP address of the RepRap machine to (in this case) 192.168.1.14. A restart may be required before the new IP address is used. If no P field is specified, this echoes the existing IP address configured. If S0 is added thus: M552 S0 P192.168.1.14 networking is disabled.
M553: Set Netmask
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | Yes | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M553 P255.255.255.0
Sets the network mask of the RepRap machine to (in this case) 255.255.255.0. A restart may be required before the new network mask is used. If no P field is specified, this echoes the existing network mask configured.
M554: Set Gateway
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | Yes | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M554 P192.168.1.1
Sets the Gateway IP address of the RepRap machine to (in this case) 192.168.1.1. A restart may be required before the new gateway IP address is used. If no P field is specified, this echoes the existing Gateway IP address configured.
M555: Set compatibility
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | Yes | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M555 P1
For firmware that can do it, sets the firmware to a mode where its input and (especially) output behaves exactly like other established firmware. The value of the P argument is:
P value | Firmware |
0 | Native (i.e. whatever the firmware actually is) |
1 | RepRap_Firmware |
2 | Marlin |
3 | Teacup |
4 | Sprinter |
5 | Repetier |
M556: Axis compensation
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | Yes | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M556 S100 X0.7 Y-0.2 Z0.6
Though with care and adjustment a RepRap can be set up with its axes at right-angles to each other within the accuracy of the machine, who wants to bother with care and adjustment when the problem can be solved by software? This tells software the tangents of the angles between the axes of the machine obtained by printing then measuring a test part. The S parameter (100 here) is the length of a triangle along each axis in mm. The X, Y and Z figures are the number of millimeters of the short side of the triangle that represents how out of true a pair of axes is. The X figure is the error between X and Y, the Y figure is the error between Y and Z, and the Z figure is the error between X and Z. Positive values indicate that the angle between the axis pair is obtuse, negative acute.
M557: Set Z probe point
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | Yes | ??? | ??? | ??? | No | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M557 P1 X30 Y40.5
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. See G32.
M558: Set Z probe type
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | Yes | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M558 P0 X1 Y0 Z1
A Z probe may be a switch, an IR proximity sensor, or some other device. This selects which to use. P0 indicates that no Z probe is present. 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. P4 selects a switch (on the Duet, this must be connected to the E0 endstop pins).
The X, Y and Z parameters specify whether each axis uses the Z probe for homing or not. If the parameter is nonzero, the Z probe is used for homing that axis. if the parameter is zero, the endstop switch for that axis is used for homing instead. See also G31 and G32.
Duet-dc42 and zpl-dc42 firmware support an additional R parameter, which specifies the modulation channel. Channel 0 (the default) uses the standard Z probe modulation pin on the Duet 0.6. Channel 1 selects the alternative Z probe modulation pin on the Duet 0.7. Note that on RADDS electronics, the R parameter is accepted but ignored: the selected channel is reported, but the same RADDS pin is always used.
Duet-dc42 firmware versions 1.00e onwards supports additional parameter H. This specifies the dive height (default 3mm) from which probing is done in response to a G30 command when the P parameter is present, or a G32 command.
M559: Upload configuration file
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | Yes | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M559
If the RepRap supports it, this uploads a file that is run on re-boot to configure the machine. This file usually is a special G Code file. After sending M559, the file should be sent, ending with an M29 (q.v.).
M560: Upload web page file
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | Yes | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M560
For RepRaps that have web support and that can be driven by a web browser, this uploads the file that is the control page for the RepRap. After sending M560 the file (usually an HTML file) should be sent, terminated by the string<!-- **EoF** -->. Clearly that string cannot exist in the body of the file, but can be put on the end to facilitate this process. This should not be too serious a restriction...
M561: Set Identity Transform
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | Yes | ??? | ??? | ??? | No | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M561
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.
M562: Reset temperature fault
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | Yes | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M562 P2
Reset a temperature fault on heater/sensor 2. If the RepRap 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.
M563: Define or remove a tool
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | Yes | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M563 P3 D0:5:6 H1:3
Tools are usually (though not necessarily) extruders. The P field specifies the tool number. Tool numbers can have any positive integer value and 0. The D field specifies the drive(s) used by the tool - in this case drives 0, 5 and 6. Drive 0 is the first drive in the machine after the movement drives (usually X, Y and Z). If there is no D field the tool has no drives. The H field specifies the tool's heaters - in this case heaters 1 and 3. Heater 0 is usually the hot bed (if any) so the first extruder heater is usually 1. If there is no H field the tool has no heaters.
Tools are driven using multiple values in the E field of G1 commands, each controlling the corresponding drive in the D field above, as follows:
G1 X90.6 Y13.8 E2.24:2.24:15.89 G1 X70.6 E0:0:42.4
The first line moves straight to the point (90.6, 13.8) extruding a total of 2.24mm of filament from both drives 0 and 5 and 15.98mm of filament from drive 6.
The second line moves back 20mm in X extruding 42.4mm of filament from drive 6.
Normally an M563 command is immediately followed by a G10 command to set the tool's offsets and temperatures.
It is permissible for different tools to share some (or all) of their drives and heaters. So, for example, you can define two tools with identical hardware, but that just operate at different temperatures.
If you use the M563 command with a P value for a tool that has already been defined, that tool is redefined using the new values you provide.
Duet-dc42 firmware supports an additional form of the M563 command. The command:
M563 S1
means add 1 (the value of the S parameter) to all tool numbers found in the remainder of the current input stream (e.g. the current file if the command is read from a file on the SD card), or until a new M563 command of this form is executed. The purpose of this is to provide compatibility between the Duet firmware, in which tool numbers typically start at 1, and programs such as slic3r that assume tools are numbered from zero.
Duet-zpl firmware allows the deletion of existing tools if M563 is called in this way:
M563 P1 D-1 H-1
M564: Limit axes
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | Yes | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M564 S0
Allow moves outside the print volume, or not. If the S parameter is 0, then you can send G codes to drive the RepRap outside its normal working volume, and it will attempt to do so. User beware... If you set the S parameter to 1 then the RepRap will not think outside the box. The default behaviour is S = 1.
M565: Set Z probe offset
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | No: See G31 | ??? | ??? | ??? | No | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M565 X3 Y4.5 Z-2.37
Set the offset from the extruder tip to the probe position. The X, Y and Z values are the delta between the extruder and the actual trigger position of the probe. If the probe trigger point is below the extruder (typical) the Z offset will be negative. This just records the point offset; it does not actually do the probing. See G32.
M566: Set allowable instantaneous speed change
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | Yes | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M566 X20 Y20 Z2 E10
Work around an algorithm limitation of some firmwares, which can't calculate step timings for a standing start. Teacup Firmware and Smoothieware don't have this limitation, so M566 is obsolete there.
M566 sets the speeds in mm/minute that axes can do from a standing start. If an accelerating algorithm starts a move with a zero velocity on other firmwares and then accelerates from that, it can give problems when the zero initial velocity is used to calculate a timestep between stepper pulses at the beginning: the timestep ends up being infinite... So these systems have initial small velocities to start at. This sets them.
The dc42 variant of RepRapFirmware doesn't have the limitation, but instead it uses this parameter to determine the maximum allowable speed change of each motor when cornering.
M567: Set tool mix ratios
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | Yes | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M567 P2 E0.1:0.2:0.1:0.6
The example sets the mix ratio for tool 2 (the P value). When mixing is then turned on (see M568), only single E values need to be sent on a G1 command (any extra E values will be ignored, but are not illegal):
G1 X20 E1.3
This will move to X=20 extruding a total length of filament of 1.3mm. The first drive of tool 2 will extrude 0.1*1.3mm, the second 0.2*1.3mm and so on. The ratios don't have to add up to 1.0 - the calculation done is as just described. But it is best if they do.
See also M568.
M568: Turn off/on tool mix ratios
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | Yes | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M568 P2 S0
Turn on/off automatic mix ratios for tool 2. If the S parameter is 0 mixing is turned off; if it is non-zero it is turned on.
After turning off command G1 instructions must send as many E values as the tool has drives:
G1 X20 E0.2:0.4:0.166:0.3
The off state is the default.
M569: Set axis direction and enable values
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | Yes | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M569 P0 S1
Set the control value for the drive specified by P that sends it forwards to the given value in the S field. After sending the example, sending a 1 to X (drive 0) will make it go forwards, sending a 0 will make it go backwards. Obviously to be used with extreme caution...
Example: M569 P0 X0
Assigns driver 0 to control the X0 motor. In place of X0 you can use Y0 Z0 E0 E1 E2 etc. to assign the driver to the corresponding motor. Supported in RepRapFirmware-dc42 versions 1.09i and later. Currently, only one driver can be allocated to each axis or extruder.
Example: M569 P2 R0
In the dcnewman fork of RepRapFirmware and versions 1.09i and later of the dc42 fork, sets the enable value -- logic level -- for the drive specified by P to the given value in the R field. Allowed R values are 0 or 1. With the above example, drive 2 is enabled by sending an enable value of 0. Sending an enable value of 1 will disable the drive.
You can use any combination of S XYZE and R parameters in a single M569 command. Values not provided are left unchanged.
M570: Set heater timeout
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | Yes | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M570 S120
After a heater has been switched on, wait 120 seconds for it to get close to the set temperature. If it takes longer than this, flag a heater fault.
M571: Set output on extrude
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | Yes | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M571 S0.5
This turns an output on whenever extrusion is being done, and turns it off when the extrusion is finished. The output could control a fan or a stirrer or anything else that needs to work just when extrusion is happening. The S parameter sets the value of the PWM to the output. 0.0 is off; 1.0 is fully on.
M572: Set or report extruder elasticity compensation
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | dc42 | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M572 P3 S0.06
This sets the pre-compensation time in seconds (S parameter) for Bowden extruder elasticity for the specified drive (P parameter). Supported by RepRapFirmware-dc42. Normally, compensation should be applied to extruder drives only (drives 3 and higher).
Pre-compensation causes the extruder drive position to be increased by an additional amount proportional to the rate of extrusion. At the end of a move when the extrusion rate is decreasing, this may result in the extruder drive moving backwards (i.e. retracting). Therefore, if you enable this feature, you may need to reduce the amount of retraction you use in your slicing program to avoid over-retraction.
M573: Report heater PWM
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | Yes | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M573 P1
This gives a running average (usually taken over about five seconds) of the PWM to the heater specified by the P field. If you know the voltage of the supply and the resistance of the heater this allows you to work out the power going to the heater.
M574: Set endstop configuration
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | dc42 | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M574 X1 Y2 Z0 S1
This defines the type of endstop switch or opto sensor that the printer has for each axis: 0 = none, 1 = low end, 2 = high end. The optional S parameter defines whether the endstop input is active high (S1, the default) or low (S0). Intended for use with boards that provide a single endstop input for each axis that may be used for either a high or a low end endstop, such as the Duet. Supported by Duet-dc42 firmware. On delta printers, the XYZ parameters refer to the towers and the endstops should normally all be high end.
M575: Set serial comms parameters
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | dc42 | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M575 P1 B57600 S1
This sets the communications parameters of the serial comms channel specified by the P parameter. P0 specifies the main serial interface (typically a USB port, or serial-over-USB), while P1 specifies an auxiliary serial port (for example, the port used to connect a PanelDue). The B parameter is the required baud rate (this parameter is typically ignored if the port is a true USB port). The S parameter is a bitmap of features. The lowest bit, if set, specifies that only commands that include a valid checksum should be accepted from this comms channel.
M576: Set axis/extruder drive mapping
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | not yet | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | No |
Example: M576 X0 Y1 Z2:3 A4 E5:6:7
This maps each letter to the specified drive number(s). In this example the Z axis configuration consists of two motors that need to be controlled simultaneously. An extra axis 'A' is also defined for custom purposes (rotary nozzle, cutter tool etc.) while the remaining axes are mapped to extruder drives.
See also M569, which also provides for setting the drive mapping.
M577: Wait until endstop is triggered
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | Duet-zpl | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | No |
Example: M577 E0 S1
Wait for an endstop switch to be pressed. The example above will wait until the first extruder endstop is triggered.
The following trigger types may be used using the 'S' parameter:
0: Endstop not hit 1: Low endstop hit 2: High endstop hit 3: Near endstop (only Z probe)
M578: Fire inkjet bits
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | Yes | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | No |
Example: M578 P3 S5
This fires inkjet head 3 (the P field) using the bit pattern specified by the S field. The example shown would fire bits 101. If the P parameter is ommitted inkjet 0 is assumed.
This is a version of the M700 command used by the Inkshield, but unfortunately M700 is already taken so cannot be used for that in the standard.
M579: Scale Cartesian axes
Example: M579 X1.0 Y0.997 Z1.001
On a Cartesian RepRap you can get prints exactly the right size by tweaking the axis steps/mm using the M92 G Code above. But this does not work so easily for Delta and other RepRaps for which there is cross-talk between the axes. This command allows you to adjust the X, Y, and Z axis scales directly. So, if you print a part for which the Y length should be 100mm and measure it and find that it is 100.3mm long then you set Y0.997 (= 100/100.3).
M580: Select Roland
Example: M580 R1 PVS4;!VZ2;!MC1;
This is not really anything to do with RepRap, but it is convenient. The little Roland mills are very widely available in hackerspaces and maker groups, but annoyingly they don't speak G Codes. As all RepRap firmware includes a G-Code interpreter, it is often easy to add functions to convert G Codes to Roland RML language. M580 selects a Roland device for output if the R field is 1, and returns to native mode if the R field is 0. The optional P string is sent to the Roland if R is 1. It is permissible to call this repeatedly with R set to 1 and different strings in the P field to communicate directly with a Roland.
M600: Set line cross section
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | ??? | ??? | ??? | ??? | ??? | ??? | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | Yes | ??? | No | ??? | ??? |
Example: M600 P0.061
Sets the cross section for a line to extrude in velocity extrusion mode. When the extruder is enabled and movement is executed the amount of extruded filament will be calculated to match the specified line cross section.
M600: Filament change pause
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | No | ??? | ??? | ??? | ??? | ??? | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M600
Pause for filament change X[pos] Y[pos] Z[relative lift] E[initial retract] L[later retract distance for removal].
M605: Set dual x-carriage movement mode
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | ??? | ??? | ??? | ??? | ??? | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M605 S1
Sets the dual x-carriage movement mode: S<mode> [ X<duplication x-offset> R<duplication temp offset> ].
M605 S0: Full control mode. The slicer has full control over x-carriage movement M605 S1: Auto-park mode. The inactive head will auto park/unpark without slicer involvement M605 S2 [Xnnn] [Rmmm]: Duplication mode. The second extruder will duplicate the first with nnn millimeters x-offset and an optional differential hotend temperature of mmm degrees. E.g., with "M605 S2 X100 R2" the second extruder will duplicate the first with a spacing of 100mm in the x direction and 2 degrees hotter.
M665: Set delta configuration
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | dc42 | ??? | ??? | ??? | No | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M665 L250 R160 S200 (Marlin), M665 L250 R160 B80 H240 X0 Y0 Z0 (RepRapFirmware-dc42)
Set the delta calibration variables. L = diagonal rod length, R = delta radius. For Marlin: S = segments per second. For RepRapFirmware-dc42: B = safe printing radius, H = nozzle height above bed when homed after allowing for the endstop corrections; X, Y, Z = X, Y and Z tower angular offsets from the ideal (i.e.equilateral triangle) positions, in degrees, measured anti-clockwise looking down on the printer.
- I don't think it's a good idea to have two different implementations for the same G-code, and I also question the practical value of specifying the print bed radius when defining a delta configuration, since many delta printers use a square or rectangular print bed. So perhaps we should stick to the Marlin-defined command as the definition for this command, and use a different command or set of commands to define print bed shape and size. --AndrewBCN (talk) 23:10, 31 January 2015 (PST)
- The implementations are not different, they have the same L and R parameters, but each has additional parameters that are not relevant to the other implementation. I'm not against defining a new Gcode to define bed size and shape; however, you can already define the limits of a rectangular print area using M208. Even when a delta printer has a square bed, the printable area is not square. It is usually taken to be circular, although it is in reality more complicated. My purpose in adding the B parameter was to make it easy to define a radius outside which movement will not normally be attempted. I have changed "bed radius" to "safe printing radius" in the text to help clarify this. --dc42
M666: Définir l'ajustement des endstops des Delta
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | dc42 | ??? | ??? | ??? | No | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Exemple M666 X-0.1 Y+0.2 Z0
Définir l'ajustement des endstops des Delta.
M667: Select CoreXY mode
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | dc42 | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
M667 S0 selects Cartesian mode (unless the printer is configured as a delta using the M665 command). Forward motion of the X motor moves the head in the +X direction. Similarly for the Y motor and Y axis, and the Z motor and Z axis. This is the default state of the firmware on power up.
M667 S1 selects CoreXY mode. Forward movement of the X motor moves the head in the +X and +Y directions. Forward movement of the Y motor moves the head in the -X and +Y directions.
M667 S2 selects CoreXZ mode. Forward movement of the X motor moves the head in the +X and +Z directions. Forward movement of the Z motor moves the head in the -X and +Z directions.
M667 S3 selects CoreYZ mode. Forward movement of the Y motor moves the head in the +Y and +Z directions. Forward movement of the Z motor moves the head in the -Y and +Z directions.
Additional parameters X, Y and Z may be given to specify factors to scale the motor movements by for the corresponding axes. For example, to specify a CoreXZ machine in which the Z axis moves 1/3 of the distance of the X axis for the same motor movement, use M667 S2 Z3. The default scaling factor after power up is 1.0 for all axes.
To change the motor directions, see the M569 command.
M700: Level plate
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
bq | ??? | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
1 only in bq-Marlin Firmware
Example: M700
Script to adjust the plate level.
M701: Load filament
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
bq | ??? | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
1 only in bq-Marlin Firmware
Example: M701
M702: Unload filament
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
bq | ??? | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
1 only in bq-Marlin Firmware
Example: M702
M851: Set Z-Probe Offset
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | ??? | ??? | ??? | ??? | ??? | ??? | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | ??? | ??? | ??? | ??? | ??? | ??? | ??? | ??? |
Sets the Z-Probe Offset saved in the EEPROM and this setting also works like M206 as well and this has priority over the z probe offset you set in marlin configuration.h setting
Example: M851 Z-4
The example above will set the z-probe offset EEPROM setting to -4mm below the nozzle and enables the nozzle travel 4mm lower than the probe triggered position. It is however, a good idea to keep the setting inside your configuration.h as well for your own future reference.
This command appears on pronterface after marlin dev 1.1.0, it is unknown that this command can be used on marlin 1.0.0
M906: Set motor currents
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | Yes | ??? | ??? | ??? | No | M907? | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | Yes | No | ??? | ??? |
Example: M906 X300 Y500 Z200 E350
Sets the currents to send to the stepper motors for each axis. The values are in milliamps.
The dc42 fork of RepRapFirmware supports an additional I parameter. This is the percentage of normal that the motor currents should be reduced to when the printer becomes idle but the motors have not been switched off.
M907: Set digital trimpot motor
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | ??? | ??? | ??? | ??? | No | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | Yes | No | ??? | ??? |
Set digital trimpot motor current using axis codes (X, Y, Z, E, B, S). In Redeem, it sets the current in A (where M906 does in mA).
M908: Control digital trimpot directly
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | ??? | ??? | ??? | ??? | Yes: 0.92 | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
M908 P<pin> S<current>
M909: Set microstepping
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | ??? | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | Yes | No | ??? | ??? |
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 on X-axis to 2^2 = 4,
M909 Y3 sets microstepping on Y-axis to 2^3 = 8 etc.
M910: Set decay mode
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | ??? | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | Yes | No | ??? | ??? |
Example: M910 X3 Y5 Z2 E3
Set the decay mode for each stepper controller The decay mode controls how the current is reduced and recycled by the H-bridge in the stepper motor controller. It varies how the implementations are done in silicone between controllers. Typically you have an on phase where the current flows in the target current, then an off phase where the current is reversed and then a slow decay phase where the current is recycled.
M928: Start SD logging
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | ??? | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M928 filename.g
Ended by M29.
M998: Request resend of line
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
No | Yes | ??? | ??? | ??? | No | No | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Example: M998 P34
Request a resend of line 34. In some implementations the input-handling code overwrites the incoming G Code with this when it detects, for example, a checksum error. Then it leaves it up to the GCode interpreter actually to request the resend.
M999: Redémarrez après avoir été arrêté par erreur
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | Yes | ??? | ??? | ??? | No | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | No | No | No | ??? | No | ??? | ??? |
Exemple: M999
Redémarre le firmware apres une erreur.
Other commands
G: List all G-codes
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
??? | No | ??? | ??? | ??? | ??? | ??? | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | ??? | ??? | ??? | ??? | ??? | ??? | ??? | ??? |
Example: G
This lists all implemeted G-codes in the firmware with description and sends it back to the host.
(Note: this has been implemented in Redeem, and so is only a proposition)
M: List all M-codes
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
??? | ??? | ??? | ??? | ??? | ??? | ??? | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | ??? | ??? | ??? | ??? | ??? | ??? | ??? | ??? |
Example: M
This lists all implemeted M-codes in the firmware with description and sends it back to the host.
(Note: this has been implemented in Redeem, and so is only a proposition)
T: Select Tool
Support | Marlin | RepRapFirmware | Klipper | Prusa | Buddy | Repetier | Smoothie | Druid | MK4duo |
---|---|---|---|---|---|---|---|---|---|
Yes | Yes | ??? | ??? | ??? | Yes | Yes | ??? | ??? | |
grbl | Sprinter | BFB | FiveD | Machinekit | Redeem | Teacup | Yaskawa | MakerBot | |
??? | No | ??? | Yes | ??? | ??? | Yes | ??? | ??? |
Example: T1
Select tool (or in older implementations extruder) number 1 to build with.
The sequence followed is:
- Set the current tool to its standby temperatures specified by G10 (see above),
- Set the new tool to its operating temperatures specified by G10 and wait for all temperatures to stabilise,
- Apply any X, Y, Z offset for the new tool specified by G10,
- Use the new tool.
Selecting a non-existent tool (100, say) just does Step 1. above. That is to say it leaves all tools in their standby state. You can, of course, use the G10 command beforehand to set that standby temperature to anything you like.
Note that you may wish to move to a parking position before executing a T command in order to allow the new extruder to reach temperature while not in contact with the print. It is acceptable for the firmware to apply a small offset [by convention (-1mm x tool-number) in Y] to the current position when the above sequence is entered to allow temperature changes to take effect just away from the parking position. Any such offset must, of course, be undone when the procedure finishes.
If the Z value changes in the offsets and the tool moves up, then the Z move is made before the X and Y moves. If Z moves down, X and Y are done first.
Some implementations (e.g. RepRapFirmware) allow you to specify tool-change G Code macros. There are normally three specified (any of which can contain no commands if desired) that execute in this order:
- Actions to do with the old tool before it is released - macro name: tfreeN.g where N is the tool number;
- (Old tool is released);
- Actions to do with the new tool before it is selected - macro name: tpreN.g where N is the tool number;
- (New tool is selected); and
- Actions to do with the new tool after it is selected - macro name: tpostN.g where N is the tool number.
With such implementations there is no wait for temperature stabilisation. That can be achieved by an M116 in any of the macros, of course.
After a reset tools will not start heating until they are selected. You can either put them all at their standby temperature by selecting them in turn, or leave them off so they only come on if/when you first use them. The M0, M1 and M112 commands turn them all off. You can, of course, turn them all off with the M1 command, then turn some back on again. Don't forget also to turn on the heated bed (if any) if you use that trick.
Tool numbering may start at 0 or 1, depending on the implementation. Some implementations (those that use the M563 command to define tools) allow the user to specify tool numbers, so with them you can have tools 17, 99 and 203 if you want. Negative numbers are not allowed.
Proposed EEPROM configuration codes
BRIEFLY: each RepRap has a number of physical parameters that should be persistent, but easily configurable, such as extrusion steps/mm, various max values, etc. Those parameters are currently hardcoded in the firmware, so that a user has to modify, recompile and re-flash the firmware for any adjustments. These configs can be stored in MCU's EEPROM and modified via some M-codes. Please see the detailed proposal at M-codes for EEPROM config. (This is proposed by --AlexRa on 11-March-2011. There is currently no working implementation of the proposed commands).
Marlin uses codes M500-M503 to manipulate EEPROM values.
Sprinter has implemented the following commands to manipulate EEPROM Commit message.
Teacup uses codes M130-M136 to set, read, and save some parameters.
Replies from the RepRap machine to the host computer
All communication is in printable ASCII characters. Messages sent back to the host computer are terminated by a newline and look like this:
xx [line number to resend] [T:93.2 B:22.9] [C: X:9.2 Y:125.4 Z:3.7 E:1902.5] [Some debugging or other information may be here]
xx can be one of:
ok
rs
!!
ok means that no error has been detected.
rs means resend, and is followed by the line number to resend.
!! means that a hardware fault has been detected. The RepRap machine will shut down immediately after it has sent this message.
The T: and B: values are the temperature of the currently-selected extruder and the bed respectively, and are only sent in response to M105. If such temperatures don't exist (for example for an extruder that works at room temperature and doesn't have a sensor) then a value below absolute zero (-273oC) is returned.
C: means that coordinates follow. Those are the X: Y: etc values. These are only sent in response to M114 and M117.
The RepRap machine may also send lines that look like this:
// This is some debugging or other information on a line on its own. It may be sent at any time.
Such lines will always be preceded by //.
On the latest version of Pronterface and soon Octoprint a special comment of the form:
// action:command
is allowed to be sent from the firmware, the command can currently be pause, resume or disconnect which will execute those commands on the host. As this is also a comment other hosts will just ignore these commands.
The most common response is simply:
ok
When the machine boots up it sends the string
start
once to the host before sending anything else. This should not be replaced or augmented by version numbers and the like. M115 (see above) requests those.
All this means that every line sent by RepRap to the host computer except the start line has a two-character prefix (one of ok, rs, !! or //). The machine should never send a line without such a prefix.
Exceptions:
1. Marlin 1.0.0 Gen6 Firmware does not follow the two character rule. 'rs' is actually 'Resend' and '!!' is 'Error'. Example Lines:
- Error: Line Number is not current line + 1. Last Line: 7
- Resend: 8
- Writing to File: print.gco
- Done saving file.
- File opened:print.gco Size:22992
- File selected
When in the code base did this change take place and what other firmwares are affected?
2. The dc42 fork of RepRapFirmware responds to some commands with a reply string in JSON format, terminated by a newline. This allows later firmware revisions to include additional information without confusing clients (e.g. PanelDue) that do not expect it, and to make responses self-describing so that the client will not be confused if responses are delayed or lost. The commands affected are:
- M105 S2
- M105 S3
- M20 S2
- M36
- M408
Proposal for sending multiple lines of G-code
So far, this is a proposal, open for discussion.
Problem to solve
When using Marlin firmware or emulating Marlin, each line of G-code sent from the host to the controller is answered with an ok before the next line can be sent without locking communications up. This slows down communication and limits the number of commands that can be sent per second to the printer controller, as the USB stack on the host and the serial interface driver on the Arduino add their own latencies (up to 10 milliseconds). This is not a problem for other controller electronics using native USB such as the Duet, because the standard serial-over-USB drivers provide flow control, so the host software can be configured so as not to wait for the ok.
For more details on this proposal, some suggested solutions and comments, please see GCODE_buffer_multiline_proposal
Alternatives to G-code
- Main article: Firmware/Alternative#alternatives to G-code
Several people have suggested using STEP-NC or some other control language; or perhaps designing a completely new control language.