{"id":676,"date":"2017-11-14T16:52:02","date_gmt":"2017-11-14T15:52:02","guid":{"rendered":"http:\/\/martinfiltenborg.dk\/blog\/?page_id=676"},"modified":"2017-11-14T16:52:02","modified_gmt":"2017-11-14T15:52:02","slug":"g-code-reference","status":"publish","type":"page","link":"https:\/\/www.martinfiltenborg.dk\/mechanicality\/mechatronics\/mechatronics-2\/geeetech-i3-pro-b-3d-printer\/software\/g-code-reference\/","title":{"rendered":"G-code reference"},"content":{"rendered":"<p>From the printer&#8217;s Marlin-sourcecode I&#8217;ve nicked the following information:<\/p>\n<pre>\/\/ look here for descriptions of G-codes: http:\/\/linuxcnc.org\/handbook\/gcode\/g-code.html\n\/\/ http:\/\/objects.reprap.org\/wiki\/Mendel_User_Manual:_RepRapGCodes\n\n\/\/Implemented Codes\n\/\/-------------------\n\/\/ G0 -&gt; G1\n\/\/ G1 - Coordinated Movement X Y Z E\n\/\/ G2 - CW ARC\n\/\/ G3 - CCW ARC\n\/\/ G4 - Dwell S&lt;seconds&gt; or P&lt;milliseconds&gt;\n\/\/ G10 - retract filament according to settings of M207\n\/\/ G11 - retract recover filament according to settings of M208\n\/\/ G28 - Home all Axis\n\/\/ G29 - Detailed Z-Probe, probes the bed at 3 or more points. Will fail if you haven't homed yet.\n\/\/ G30 - Single Z Probe, probes bed at current XY location.\n\/\/ G31 - Dock sled (Z_PROBE_SLED only)\n\/\/ G32 - Undock sled (Z_PROBE_SLED only)\n\/\/ G90 - Use Absolute Coordinates\n\/\/ G91 - Use Relative Coordinates\n\/\/ G92 - Set current position to coordinates given\n\n\/\/ M Codes\n\/\/ M0 - Unconditional stop - Wait for user to press a button on the LCD (Only if ULTRA_LCD is enabled)\n\/\/ M1 - Same as M0\n\/\/ M17 - Enable\/Power all stepper motors\n\/\/ M18 - Disable all stepper motors; same as M84\n\/\/ M20 - List SD card\n\/\/ M21 - Init SD card\n\/\/ M22 - Release SD card\n\/\/ M23 - Select SD file (M23 filename.g)\n\/\/ M24 - Start\/resume SD print\n\/\/ M25 - Pause SD print\n\/\/ M26 - Set SD position in bytes (M26 S12345)\n\/\/ M27 - Report SD print status\n\/\/ M28 - Start SD write (M28 filename.g)\n\/\/ M29 - Stop SD write\n\/\/ M30 - Delete file from SD (M30 filename.g)\n\/\/ M31 - Output time since last M109 or SD card start to serial\n\/\/ M32 - Select file and start SD print (Can be used _while_ printing from SD card files):\n\/\/ syntax \"M32 \/path\/filename#\", or \"M32 S&lt;startpos bytes&gt; !filename#\"\n\/\/ Call gcode file : \"M32 P !filename#\" and return to caller file after finishing (similar to #include).\n\/\/ The '#' is necessary when calling from within sd files, as it stops buffer prereading\n\/\/ M42 - Change pin status via gcode Use M42 Px Sy to set pin x to value y, when omitting Px the onboard led will be used.\n\/\/ M80 - Turn on Power Supply\n\/\/ M81 - Turn off Power Supply\n\/\/ M82 - Set E codes absolute (default)\n\/\/ M83 - Set E codes relative while in Absolute Coordinates (G90) mode\n\/\/ M84 - Disable steppers until next move,\n\/\/ or use S&lt;seconds&gt; to specify an inactivity timeout, after which the steppers will be disabled. S0 to disable the timeout.\n\/\/ M85 - Set inactivity shutdown timer with parameter S&lt;seconds&gt;. To disable set zero (default)\n\/\/ M92 - Set axis_steps_per_unit - same syntax as G92\n\/\/ M104 - Set extruder target temp\n\/\/ M105 - Read current temp\n\/\/ M106 - Fan on\n\/\/ M107 - Fan off\n\/\/ M109 - Sxxx Wait for extruder current temp to reach target temp. Waits only when heating\n\/\/ Rxxx Wait for extruder current temp to reach target temp. Waits when heating and cooling\n\/\/ IF AUTOTEMP is enabled, S&lt;mintemp&gt; B&lt;maxtemp&gt; F&lt;factor&gt;. Exit autotemp by any M109 without F\n\/\/ M112 - Emergency stop\n\/\/ M114 - Output current position to serial port\n\/\/ M115 - Capabilities string\n\/\/ M117 - display message\n\/\/ M119 - Output Endstop status to serial port\n\/\/ M126 - Solenoid Air Valve Open (BariCUDA support by jmil)\n\/\/ M127 - Solenoid Air Valve Closed (BariCUDA vent to atmospheric pressure by jmil)\n\/\/ M128 - EtoP Open (BariCUDA EtoP = electricity to air pressure transducer by jmil)\n\/\/ M129 - EtoP Closed (BariCUDA EtoP = electricity to air pressure transducer by jmil)\n\/\/ M140 - Set bed target temp\n\/\/ M150 - Set BlinkM Color Output R: Red&lt;0-255&gt; U(!): Green&lt;0-255&gt; B: Blue&lt;0-255&gt; over i2c, G for green does not work.\n\/\/ M190 - Sxxx Wait for bed current temp to reach target temp. Waits only when heating\n\/\/ Rxxx Wait for bed current temp to reach target temp. Waits when heating and cooling\n\/\/ M200 D&lt;millimeters&gt;- set filament diameter and set E axis units to cubic millimeters (use S0 to set back to millimeters).\n\/\/ M201 - Set max acceleration in units\/s^2 for print moves (M201 X1000 Y1000)\n\/\/ M202 - Set max acceleration in units\/s^2 for travel moves (M202 X1000 Y1000) Unused in Marlin!!\n\/\/ M203 - Set maximum feedrate that your machine can sustain (M203 X200 Y200 Z300 E10000) in mm\/sec\n\/\/ M204 - Set default acceleration: S normal moves T filament only moves (M204 S3000 T7000) in mm\/sec^2 also sets minimum segment time in ms (B20000) to prevent buffer under-runs and M20 minimum feedrate\n\/\/ M205 - advanced settings: 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\n\/\/ M206 - set additional homing offset\n\/\/ M207 - set retract length S[positive mm] F[feedrate mm\/min] Z[additional zlift\/hop], stays in mm regardless of M200 setting\n\/\/ M208 - set recover=unretract length S[positive mm surplus to the M207 S*] F[feedrate mm\/sec]\n\/\/ M209 - S&lt;1=true\/0=false&gt; enable 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.\n\/\/ M218 - set hotend offset (in mm): T&lt;extruder_number&gt; X&lt;offset_on_X&gt; Y&lt;offset_on_Y&gt;\n\/\/ M220 S&lt;factor in percent&gt;- set speed factor override percentage\n\/\/ M221 S&lt;factor in percent&gt;- set extrude factor override percentage\n\/\/ M226 P&lt;pin number&gt; S&lt;pin state&gt;- Wait until the specified pin reaches the state required\n\/\/ M240 - Trigger a camera to take a photograph\n\/\/ M250 - Set LCD contrast C&lt;contrast value&gt; (value 0..63)\n\/\/ M280 - set servo position absolute. P: servo index, S: angle or microseconds\n\/\/ M300 - Play beep sound S&lt;frequency Hz&gt; P&lt;duration ms&gt;\n\/\/ M301 - Set PID parameters P I and D\n\/\/ M302 - Allow cold extrudes, or set the minimum extrude S&lt;temperature&gt;.\n\/\/ M303 - PID relay autotune S&lt;temperature&gt; sets the target temperature. (default target temperature = 150C)\n\/\/ M304 - Set bed PID parameters P I and D\n\/\/ M400 - Finish all moves\n\/\/ M401 - Lower z-probe if present\n\/\/ M402 - Raise z-probe if present\n\/\/ M404 - N&lt;dia in mm&gt; Enter the nominal filament width (3mm, 1.75mm ) or will display nominal filament width without parameters\n\/\/ M405 - Turn on Filament Sensor extrusion control. Optional D&lt;delay in cm&gt; to set delay in centimeters between sensor and extruder \n\/\/ M406 - Turn off Filament Sensor extrusion control \n\/\/ M407 - Displays measured filament diameter \n\/\/ M500 - stores parameters in EEPROM\n\/\/ M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).\n\/\/ M502 - reverts to the default \"factory settings\". You still need to store them in EEPROM afterwards if you want to.\n\/\/ M503 - print the current settings (from memory not from EEPROM)\n\/\/ M540 - Use S[0|1] to enable or disable the stop SD card print on endstop hit (requires ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)\n\/\/ M600 - Pause for filament change X[pos] Y[pos] Z[relative lift] E[initial retract] L[later retract distance for removal]\n\/\/ M665 - set delta configurations\n\/\/ M666 - set delta endstop adjustment\n\/\/ M605 - Set dual x-carriage movement mode: S&lt;mode&gt; [ X&lt;duplication x-offset&gt; R&lt;duplication temp offset&gt; ]\n\/\/ M907 - Set digital trimpot motor current using axis codes.\n\/\/ M908 - Control digital trimpot directly.\n\/\/ M350 - Set microstepping mode.\n\/\/ M351 - Toggle MS1 MS2 pins directly.<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>From the printer&#8217;s Marlin-sourcecode I&#8217;ve nicked the following information: \/\/ look here for descriptions of G-codes: http:\/\/linuxcnc.org\/handbook\/gcode\/g-code.html \/\/ http:\/\/objects.reprap.org\/wiki\/Mendel_User_Manual:_RepRapGCodes \/\/Implemented Codes \/\/&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- \/\/ G0 -&gt; &hellip;<\/p>\n","protected":false},"author":2,"featured_media":677,"parent":651,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"ngg_post_thumbnail":0,"footnotes":""},"class_list":["post-676","page","type-page","status-publish","has-post-thumbnail","hentry"],"_links":{"self":[{"href":"https:\/\/www.martinfiltenborg.dk\/mechanicality\/wp-json\/wp\/v2\/pages\/676","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.martinfiltenborg.dk\/mechanicality\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.martinfiltenborg.dk\/mechanicality\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.martinfiltenborg.dk\/mechanicality\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.martinfiltenborg.dk\/mechanicality\/wp-json\/wp\/v2\/comments?post=676"}],"version-history":[{"count":0,"href":"https:\/\/www.martinfiltenborg.dk\/mechanicality\/wp-json\/wp\/v2\/pages\/676\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/www.martinfiltenborg.dk\/mechanicality\/wp-json\/wp\/v2\/pages\/651"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.martinfiltenborg.dk\/mechanicality\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/www.martinfiltenborg.dk\/mechanicality\/wp-json\/wp\/v2\/media?parent=676"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}