[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-698253-105":3,"detail-sidebar-cat-0-en-105":80,"doc-detail-698253-en":130,"doc-similar-698253":161},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":73,"head_meta":75,"extra_data":77,"updated_unix":79},105,"en","g-codes-and-m-codes-for-3d-printing-marlin-reprap-firmware","G Codes and M Codes for 3D printing - Marlin RepRap firmware","","Reference list of commonly used G codes and M codes used with Marlin RepRap 3D-printer firmware, aligned with standard G-code practices such as NIST conventions. The material includes brief descriptions and, where applicable, parameter definitions and worked examples. Coverage spans motion commands (rapid, coordinated, arcs, and dwelling), axis homing, absolute vs relative positioning, coordinate resetting, and typical controller functions like stopping, disabling steppers, and managing extruder or bed temperatures and fan behavior. Additional examples show how parameters change movement and extrusion.",{"@graph":14,"@context":72},[15,34,55],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/technology/","Technology",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/g-codes-and-m-codes-for-3d-printing-marlin-reprap-firmware/698253/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/g-codes-and-m-codes-for-3d-printing-marlin-reprap-firmware/698253.png","ImageObject",300,407,{"name":42,"@type":43},"Marglet","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-21","2026-11-12",true,{"@type":52,"interactionType":53,"userInteractionCount":33},"InteractionCounter",{"@type":54},"ViewAction",{"@type":56,"mainEntity":57},"FAQPage",[58,64,68],{"name":59,"@type":60,"acceptedAnswer":61},"Which motion commands are covered for Marlin 3D printing control?","Question",{"text":62,"@type":63},"The document lists G0 (rapid movement), G1 (coordinated movement with axes and extrusion), G2 (clockwise arc), G3 (counter-clockwise arc), and G4 (dwell with seconds or milliseconds).","Answer",{"name":65,"@type":60,"acceptedAnswer":66},"How do G90 and G91 affect coordinate interpretation?",{"text":67,"@type":63},"G90 switches to absolute coordinates relative to the machine origin, while G91 switches to relative coordinates relative to the last position.",{"name":69,"@type":60,"acceptedAnswer":70},"What do key M codes do for stopping and motor behavior?",{"text":71,"@type":63},"M0 performs an unconditional stop and shuts down motors and heaters; M18 disables all stepper motors (allowing axes to move freely) and is noted as equivalent to M84 for disabling steppers. M112 triggers an emergency stop.","https://schema.org",{"og:url":32,"og:type":74,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":76,"canonical":32},"index,follow",{"doc_id":78,"site_id":7},698253,1794450289,{"code":4,"msg":81,"data":82},"success",[83,87,91,95,100,104,109,114,119,122,126],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":84,"show_sort_weight":85,"slug":86},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":88,"show_sort_weight":89,"slug":90},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":92,"show_sort_weight":93,"slug":94},"Exam",70,"exam",{"id":96,"doc_module":4,"doc_module_name":25,"category_name":97,"show_sort_weight":98,"slug":99},5,"Comic",60,"comic",{"id":101,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":102,"slug":103},6,50,"technology",{"id":105,"doc_module":4,"doc_module_name":25,"category_name":106,"show_sort_weight":107,"slug":108},7,"Healthcare",40,"healthcare",{"id":110,"doc_module":4,"doc_module_name":25,"category_name":111,"show_sort_weight":112,"slug":113},8,"Research & Report",30,"research-report",{"id":115,"doc_module":4,"doc_module_name":25,"category_name":116,"show_sort_weight":117,"slug":118},9,"Religion & Spirituality",20,"religion-spirituality",{"id":117,"doc_module":4,"doc_module_name":25,"category_name":120,"show_sort_weight":117,"slug":121},"World Cup","world-cup",{"id":123,"doc_module":4,"doc_module_name":25,"category_name":124,"show_sort_weight":123,"slug":125},10,"Lifestyle","lifestyle",{"id":127,"doc_module":4,"doc_module_name":25,"category_name":128,"show_sort_weight":96,"slug":129},19,"General","general",{"code":4,"msg":81,"data":131},{"doc_id":78,"user_id":132,"nickname":42,"user_avatar":133,"doc_module":4,"category_id":101,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":33,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":101,"language":139,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":140,"faqs":141,"seo_title":142,"seo_description":12,"update_tm":79,"read_time":143,"preview_page_count":33,"preview_urls":144},2336477982702,"https://ap-avatar.wpscdn.com/davatar_9964176cb1d06d4a9deccf72a44ae3dc","G Codes and M Codes for 3D printing  \nThese are codes for the Marlin RepRap firmware. These codes are fairly standard accross 3D printers, and are mostly consistent with NIST G Code standards. This information was collated directly from the Marlin firmware and [from reprap.org/wiki/G-code](from reprap.org/wiki/G-code).  \n\n| Common codes-without details |  |\n| --- | --- |\n| Code | Description |\n| G0 | Rapid Movement |\n| G1 | Coordinated Movement X Y Z E |\n| G2 | CW ARC |\n| G3 | CCW ARC |\n| G4 | Dwell S\u003Cseconds> or P\u003Cmilliseconds> |\n| G28 | Home all Axis |\n| G90 | Use Absolute Coordinates |\n| G91 | Use Relative Coordinates |\n| G92 | Set current position to coordinates given |\n| M0 | Unconditional stop |\n| M18 | Disable all stepper motors; same as M84 |\n| M84 | Disable steppers until next move or set an inactivity timeout |\n| M104 | Set extruder target temp |\n| M105 | Read current temp |\n| M106 | Fan on |\n| M109 | Set extruder target temp and wait for it to be reached |\n| M112 | Emergency stop |\n| M114 | Output current position to serial port |\n| M140 | Set bed target temp |\n| M190 | Set bed target temp and wait for it to be reached |\n| M220 | set speed factor override percentage |\n| M221 | set extrude factor override percentage |\n\nG Codes and M Codes for 3D printing  \nThese are codes for the Marlin RepRap firmware. These codes are fairly standard accross 3D printers, and are mostly consistent with NIST G Code standards. This information was collated directly from the Marlin [firmware and from reprap.org/wiki/G-code](firmware and from reprap.org/wiki/G-code).  \n\n| Common codes-with details |  |  |  |\n| --- | --- | --- | --- |\n| Code | Description | Parameters | Examples with Explanations |\n| G0 | Rapid Movement | G0 X\\#\\# Y\\#\\# Z\\#\\# E\\#\\# F\\#\\# S\\#\\#\u003Cbr>Most RepRap Firmwares treat G0 and G1 as the same command | G0 X12 (move to 12mm on the X axis)\u003Cbr>G0 F1500 (Set the feedrate to 1500mm/minute) |\n| G1 | Coordinated Movement X Y Z E | G1 X\\#\\# Y\\#\\# Z\\#\\# E\\#\\# F\\#\\# S\\#\\#\u003Cbr>Not all variables need to be used, but at least one has to be used\u003Cbr>X\\#\\# The position to move to on the X axis\u003Cbr>Y\\#\\# The position to move to on the Y axis\u003Cbr>Z\\#\\# The position to move to on the Z axis\u003Cbr>E\\#\\# The amount to extrude between the starting point and ending point\u003Cbr>F\\#\\# The feedrate per minute of the move between the starting point and ending point (if supplied)\u003Cbr>S\\#\\# Flag to check if an endstop was hit (S1 to check, S0 to ignore, S2 see note, default is S0)1 | G1 X90 .6 Y13 .8 E22 .4 (Move to 90.6mm on the X axis and 13.8mm on the Y axis while extruding 22.4mm of material)\u003Cbr>1. G1 F1500 (set the feedrate to 1500mm/minute)\u003Cbr>2. G1 X50 Y25 .3 E22 .4 ( move to 50mm on the X axis and\u003Cbr>25.3mm on the Y axis while extruding 22.4mm of filament between the two points. )\u003Cbr>1. G1 F1500 (set a feedrate of 1500 mm/minute)\u003Cbr>2. G1 X50 Y25 .3 E22 .4 F3000 (move accelerating to a feedrate of 3000 mm/minute as it does so) |\n| G2 | CW ARC | I\\#\\# The point in X space from the current X position to maintain a constant distance from J\\#\\# The point in Y space from the current Y position to maintain a constant distance from | G2 X90 .6 Y13 .8 I5 J10 E22 .4 (Move in a Clockwise arc from the current point to point (X=90 .6,Y=13 .8), with a center point at (X=current_X+5, Y=current_Y+10), extruding 22.4mm of material between starting and stopping) |\n| G3 | CCW ARC | X\\#\\# The position to move to on the X axis\u003Cbr>Y\\#\\# The position to move to on the Y axis\u003Cbr>I\\#\\# The point in X space from the current X position to maintain a constant distance from J\\#\\# The point in Y space from the current Y position to maintain a constant distance from E\\#\\# The amount to extrude between the starting point and ending point | G3 X90 .6 Y13 .8 I5 J10 E22 .4 (Move in a Counter-Clockwise arc from the current point to point (X=90 .6,Y=13 .8), with a center point at (X=current_X+5, Y=current_Y+10), extruding 22.4mm of material between starting and stopping) |\n| G4 | Dwel","cbCaie97F4677wQX","https://ap.wps.com/l/cbCaie97F4677wQX","pdf",106379,"English","# Common G Codes (Motion and Positioning)\n## Rapid, coordinated, arcs, and dwell\n## Homing and coordinate modes\n# Common M Codes (Stops, motors, temperatures, and peripherals)\n## Unconditional stop and motor control\n## Extruder, bed, fan, and overrides","[{\"question\":\"Which motion commands are covered for Marlin 3D printing control?\",\"answer\":\"The document lists G0 (rapid movement), G1 (coordinated movement with axes and extrusion), G2 (clockwise arc), G3 (counter-clockwise arc), and G4 (dwell with seconds or milliseconds).\"},{\"question\":\"How do G90 and G91 affect coordinate interpretation?\",\"answer\":\"G90 switches to absolute coordinates relative to the machine origin, while G91 switches to relative coordinates relative to the last position.\"},{\"question\":\"What do key M codes do for stopping and motor behavior?\",\"answer\":\"M0 performs an unconditional stop and shuts down motors and heaters; M18 disables all stepper motors (allowing axes to move freely) and is noted as equivalent to M84 for disabling steppers. M112 triggers an emergency stop.\"}]","G Codes and M Codes for 3D printing - Marlin RepRap firmware | PDF",15,[145,149,153,157],{"page_no":22,"url":146,"width":147,"height":148},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/549eadf9c76a14846539eade0723c28d.webp",983,1272,{"page_no":26,"url":150,"width":151,"height":152},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/9bf3d6a0dc7ccbf9a545bf82ed68084e.webp",982,1270,{"page_no":30,"url":154,"width":155,"height":156},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/23132b3d1199131e33cc08cd8cd41a43.webp",981,1269,{"page_no":33,"url":158,"width":159,"height":160},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/f0be11fda410971ab0208861f98e3977.webp",980,1268,{"list":162,"token":11},[163,169,175,181,187,193,199,205,212,218],{"doc_id":164,"doc_title":165,"file_type":137,"home_preview_img_url":166,"slug":167,"view_count":101,"category_name":29,"create_tm":168},720851,"BIGTREETECH TMC2226-V1.0 Instruction Manual","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230023681195/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110799&Signature=U80lG%2BmACnebUG8vg8wTPLm%2BnC8%3D","bigtreetech-tmc2226-v10-instruction-manual",1795040463,{"doc_id":170,"doc_title":171,"file_type":137,"home_preview_img_url":172,"slug":173,"view_count":30,"category_name":29,"create_tm":174},720854,"BTT SKR MINI E3 V1.2 User’s Manual","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230023681420/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110799&Signature=HOLknMeEvt6FARNMxEzvEptrkVM%3D","btt-skr-mini-e3-v12-users-manual",1795040518,{"doc_id":176,"doc_title":177,"file_type":137,"home_preview_img_url":178,"slug":179,"view_count":110,"category_name":29,"create_tm":180},399899,"Extruders - Issue 2 - Extrusion Hints","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229919913330/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110799&Signature=HEDmwLKbJZueqHtfqNFq9Bijw6A%3D","extruders-issue-2-extrusion-hints",1790504989,{"doc_id":182,"doc_title":183,"file_type":137,"home_preview_img_url":184,"slug":185,"view_count":33,"category_name":29,"create_tm":186},698252,"A2MC NC Code Definitions - Technical Reference","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230010258505/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110799&Signature=SliOlraJwmkSKNIRlpxqHZFNOfs%3D","a2mc-nc-code-definitions-technical-reference",1794450288,{"doc_id":188,"doc_title":189,"file_type":137,"home_preview_img_url":190,"slug":191,"view_count":107,"category_name":29,"create_tm":192},136511,"Twin Dragon 3D Printer Product Specifications","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229862871812/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110799&Signature=IHPTKGrOy%2BZ99rOOGiR%2Fo1qwmfA%3D","twin-dragon-3d-printer-product-specifications",1787388009,{"doc_id":194,"doc_title":195,"file_type":137,"home_preview_img_url":196,"slug":197,"view_count":26,"category_name":29,"create_tm":198},732727,"PWG Safe G-Code Subset for 3D Printing - v1.0 - Approved best practice","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230031410880/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110799&Signature=9w8eBAMBb3prw%2BUxjSV8p%2FTlsww%3D","pwg-safe-g-code-subset-for-3d-printing-v10-approved-best-practice",1795381937,{"doc_id":200,"doc_title":201,"file_type":137,"home_preview_img_url":202,"slug":203,"view_count":101,"category_name":29,"create_tm":204},654878,"CarProg ECU Tool Opel Hybrid ECU Programmer","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975067551/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110799&Signature=cropjPvH9Iy5PATdStFPMK4tA%2F8%3D","carprog-ecu-tool-opel-hybrid-ecu-programmer",1792957911,{"doc_id":206,"doc_title":207,"file_type":137,"home_preview_img_url":208,"slug":209,"view_count":210,"category_name":29,"create_tm":211},654211,"Tutorial6 - Sweeps, Blends and Helical Sweeps - create parts with Pro/E commands","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229974063352/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110799&Signature=pKhsCAF00nCH2OjWqSRZy83B34Q%3D","tutorial6-sweeps-blends-and-helical-sweeps-create-parts-with-proe-commands",17,1792911790,{"doc_id":213,"doc_title":214,"file_type":137,"home_preview_img_url":215,"slug":216,"view_count":30,"category_name":29,"create_tm":217},732694,"G and M Programming for CNC Milling Machines - G and M programming manual","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230031410410/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110799&Signature=gOMULSFWe1cB%2FOZi%2B56NMrGHhg8%3D","g-and-m-programming-for-cnc-milling-machines-g-and-m-programming-manual",1795381742,{"doc_id":219,"doc_title":220,"file_type":137,"home_preview_img_url":221,"slug":222,"view_count":30,"category_name":29,"create_tm":223},702758,"Original Prusa MK4 3D Printing Handbook - Version 1.02 - May 30th, 2023","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230012835361/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110799&Signature=GLH32xwekOjdrBRRWagRA3Rpajg%3D","original-prusa-mk4-3d-printing-handbook-version-102-may-30th-2023",1794547612]