[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-794020-105":59,"doc-detail-794020-en":129,"doc-similar-794020":177},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":122,"head_meta":124,"extra_data":126,"updated_unix":128},105,"en","mach4-lathe-gcode-manual","Mach4 Lathe GCode Manual","","Mach4 CNC lathe programming guide explains G-code concepts and controller functions used to direct machine motion and related tasks. It introduces CNC programming, tool movement relative to the workpiece, axis conventions, terminology, code words, and recommended program structure, including a safe start block and its modal settings. Reference sections cover G-code and M-code lists, code descriptions and examples, canned cycles for drilling, tapping, and boring, and cutter compensation. The material helps readers interpret programming rules and prepare consistent Mach4 lathe programs.",{"@graph":69,"@context":121},[70,84,104],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":30,"@type":76,"position":81},"https://docshare.wps.com/document/technology/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/mach4-lathe-gcode-manual/794020/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":98,"encodingFormat":97,"isAccessibleForFree":99,"interactionStatistic":100},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/mach4-lathe-gcode-manual/794020.png","ImageObject",300,407,{"name":92,"@type":93},"the real mvp (my cat)","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-12-06",true,{"@type":101,"interactionType":102,"userInteractionCount":8},"InteractionCounter",{"@type":103},"ViewAction",{"@type":105,"mainEntity":106},"FAQPage",[107,113,117],{"name":108,"@type":109,"acceptedAnswer":110},"What does G-code do in a CNC machine?","Question",{"text":111,"@type":112},"G-code is a programming language interpreted by CNC machines to create motion and perform other tasks.","Answer",{"name":114,"@type":109,"acceptedAnswer":115},"What is a safe start block?",{"text":116,"@type":112},"It sets common machine modes and disables selected modes. The guide gives `G00 G18 G54 G40 G80` as an example and recommends using it at the start of a program and around tool changes.",{"name":118,"@type":109,"acceptedAnswer":119},"Which programming topics are covered in the reference sections?",{"text":120,"@type":112},"The guide includes G-code and M-code lists, code descriptions and examples, canned cycles for drilling, tapping, and boring, and cutter compensation.","https://schema.org",{"og:url":83,"og:type":123,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":125,"canonical":83},"index,follow",{"doc_id":127,"site_id":62},794020,1796561644,{"code":4,"msg":5,"data":130},{"doc_id":127,"user_id":131,"nickname":92,"user_avatar":132,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":133,"file_id":134,"file_url":135,"file_type":136,"file_size":137,"view_count":8,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":138,"language":139,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":140,"faqs":141,"seo_title":142,"seo_description":67,"update_tm":128,"read_time":143,"preview_page_count":39,"preview_urls":144},10582825569434,"https://ap-avatar.wpscdn.com/davatar_a8503ba1806abce46bf441b54a3ca4cd","Mach4 CNC Controller Lathe Programming Guide  \nVersion 1.0  \nCopyright © 2014 Newfangled Solutions, Artsoft USA, All Rights Reserved  \nThe following are registered trademarks of Microsoft Corporation: Microsoft, Windows. Any other trademarks used in this manual are the property of the respective trademark holder.  \nTable of Contents  \nChapter 1: Introduction ................................................................................................................................ 2  \nGlossary..................................................................................................................................................... 3  \nFormat....................................................................................................................................................... 4  \nChapter 2: G Code List................................................................................................................................... 5  \nG Code Descriptions and Examples........................................................................................................... 7  \nChapter 3: Canned Cycles ........................................................................................................................... 36  \nDrilling ..................................................................................................................................................... 40  \nTapping.................................................................................................................................................... 52  \nBoring ...................................................................................................................................................... 54  \nChapter 4: Cutter Compensation ................................................................................................................ 61  \nChapter 5: M Code List................................................................................................................................ 67  \nM Code Descriptions ............................................................................................................................... 67  \nChapter 1: Introduction  \nG Code is a special programming language that is interpreted by Computer Numerical Control (CNC) machines to create motion and other tasks. It is a language that can be quite complex at times and can vary from machine to machine. The basics, however, are much simpler than it first appears and for the most part follows an industry adopted standard. Mach4 has made a large leap closer to this standard.  \nAn important point to remember when reading this manual: In describing motion of a machine it will always be described as tool movement relative to the work piece. In many machines the work piece will move in more axes than the tool; however the program will always define tool movement around the work piece. Axes directions follow the right hand rule, see figure A.  \nFigure A: Right hand rule  \nGlossary  \n\n| Block | A single line of G Code |\n| --- | --- |\n| Canned Cycle | Complex cycle defined by a single block of code |\n| Dwell | Program pause with a duration defined by “P” in seconds |\n| EOB | End of block. Required at the end of every block of G Code. In Mach4 this is a carriage return |\n| Feedrate | Velocity, set by F, at which an axis will move |\n| Group | Collection of G codes that control the same function or mode, i.e. G90 and G91 positioning modes |\n| Modal | Active until a code from the same group is called |\n| Normal | A line perpendicular to a plane, pointing in the positive direction. |\n| Origin | Point in a coordinate system where X, Y and Z are zero |\n| RPM | Revolutions per minute |\n| UPM | Units per minute (inches, millimeters, degrees, etc) |\n| Word | A single word of G Code is a letter followed by a number. G01, X1 .0, etc. are words |\n\n\n| G | Preparatory function, G followed by a numerical code, specifies ma","cbCailDEm8FdS5y7","https://ap.wps.com/l/cbCailDEm8FdS5y7","pdf",1159309,71,"English","# Introduction\n## Glossary\n## Format\n# G Code List\n## G Code Descriptions and Examples\n# Canned Cycles\n## Drilling\n## Tapping\n## Boring\n# Cutter Compensation\n# M Code List\n## M Code Descriptions","[{\"question\":\"What does G-code do in a CNC machine?\",\"answer\":\"G-code is a programming language interpreted by CNC machines to create motion and perform other tasks.\"},{\"question\":\"What is a safe start block?\",\"answer\":\"It sets common machine modes and disables selected modes. The guide gives `G00 G18 G54 G40 G80` as an example and recommends using it at the start of a program and around tool changes.\"},{\"question\":\"Which programming topics are covered in the reference sections?\",\"answer\":\"The guide includes G-code and M-code lists, code descriptions and examples, canned cycles for drilling, tapping, and boring, and cutter compensation.\"}]","Mach4 Lathe GCode Manual | PDF",179,[145,149,153,157,161,165,169,173],{"page_no":8,"url":146,"width":147,"height":148},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-12-06/1430b4eec57a47f321789363b2c74034.webp",983,1272,{"page_no":14,"url":150,"width":151,"height":152},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-12-06/c5e138354a44136d784fd3fd01d3723f.webp",982,1270,{"page_no":81,"url":154,"width":155,"height":156},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-12-06/bb127e728c96a1d3246b0d1118eab174.webp",981,1269,{"page_no":19,"url":158,"width":159,"height":160},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-12-06/bf646e72dc4634ac65f769e57b42d50f.webp",980,1268,{"page_no":24,"url":162,"width":163,"height":164},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-12-06/521c9dd2f99fa3f4cf769ad00ea933fd.webp",979,1267,{"page_no":29,"url":166,"width":167,"height":168},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-12-06/ceb23e9337e9d7300f91b1621258906d.webp",978,1265,{"page_no":34,"url":170,"width":171,"height":172},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-12-06/4e80d1435923de416fff5647efa6b119.webp",977,1264,{"page_no":39,"url":174,"width":175,"height":176},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-12-06/a9c6c05c4d19ba525abe82e94472d7d0.webp",976,1263,{"list":178,"token":66},[179,185,191,197,203,209,215,221,227,233],{"doc_id":180,"doc_title":181,"file_type":136,"home_preview_img_url":182,"slug":183,"view_count":81,"category_name":30,"create_tm":184},732685,"Mach4 Mill GCode Manual - Version 1.0","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230031410381/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796590079&Signature=mnDN0gQabzfe2aK7T62%2FFAt%2FOrk%3D","mach4-mill-gcode-manual-version-10",1795381723,{"doc_id":186,"doc_title":187,"file_type":136,"home_preview_img_url":188,"slug":189,"view_count":29,"category_name":30,"create_tm":190},732716,"Study of G Codes and M Codes Used in CNC Lathe HMT CNC-T70 - CNC Machining Centre Codes","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230031778452/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796590079&Signature=0HFlYgYD1Iwk0f%2B%2BnFVCyrHvDYA%3D","study-of-g-codes-and-m-codes-used-in-cnc-lathe-hmt-cnc-t70-cnc-machining-centre-codes",1795381890,{"doc_id":192,"doc_title":193,"file_type":136,"home_preview_img_url":194,"slug":195,"view_count":29,"category_name":30,"create_tm":196},732766,"LNC-MILL Programming Manual - V4.00 - Version 4.00","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230031411638/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796590079&Signature=hrAVagcQJ4%2BlwjG%2Fbzkrh7SIZ7Q%3D","lnc-mill-programming-manual-v400-version-400",1795382199,{"doc_id":198,"doc_title":199,"file_type":136,"home_preview_img_url":200,"slug":201,"view_count":8,"category_name":30,"create_tm":202},788101,"LNC-MILL - Programming Manual - V 040 - CNC command reference","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230058284248/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796590079&Signature=55G3eiO2hWQtn5s2nCiP5Lcjf%2Fg%3D","lnc-mill-programming-manual-v-040-cnc-command-reference",1796476122,{"doc_id":204,"doc_title":205,"file_type":136,"home_preview_img_url":206,"slug":207,"view_count":19,"category_name":30,"create_tm":208},732725,"G-Codes list - myCNC G-code reference","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230031778602/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796590079&Signature=Nt0o5lfpb5YnTL2tbs4I6TreKUU%3D","g-codes-list-mycnc-g-code-reference",1795381934,{"doc_id":210,"doc_title":211,"file_type":136,"home_preview_img_url":212,"slug":213,"view_count":29,"category_name":30,"create_tm":214},732703,"Basic ISO Programming Exercise 3 - Turning - ISO G code turning and boring tutorial","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230031410491/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796590079&Signature=z7bJ1WgkHEr9djx4dK1xT4yW9MQ%3D","basic-iso-programming-exercise-3-turning-iso-g-code-turning-and-boring-tutorial",1795381774,{"doc_id":216,"doc_title":217,"file_type":136,"home_preview_img_url":218,"slug":219,"view_count":19,"category_name":30,"create_tm":220},732718,"Development of an Augmented Reality-Based G-Code Generator in a Virtual CNC Milling Simulation","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230031778458/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796590079&Signature=rhKxL8pMMrpPzC3gXCfczzla1QE%3D","development-of-an-augmented-reality-based-g-code-generator-in-a-virtual-cnc-milling-simulation",1795381893,{"doc_id":222,"doc_title":223,"file_type":136,"home_preview_img_url":224,"slug":225,"view_count":8,"category_name":30,"create_tm":226},788096,"Haas Mill Programming 2022","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230058284211/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796590079&Signature=IOuy1emR1MIWDWL%2BR07OdO0S5Pg%3D","haas-mill-programming-2022",1796476102,{"doc_id":228,"doc_title":229,"file_type":136,"home_preview_img_url":230,"slug":231,"view_count":19,"category_name":30,"create_tm":232},732768,"SINUMERIK 840D sl G code programming - Programming Manual - Safety, Qualified Personnel, and External Programming Cycles","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230031411651/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796590079&Signature=3EVe2MbbBIftWV9TNjmS3AP5o0E%3D","sinumerik-840d-sl-g-code-programming-programming-manual-safety-qualified-personnel-and-external-programming-cycles",1795382209,{"doc_id":234,"doc_title":235,"file_type":136,"home_preview_img_url":236,"slug":237,"view_count":81,"category_name":30,"create_tm":238},732681,"CNCCookbook’s G-Code Course - Volume 1 - G-Code Basics - Learn foundational concepts and machine-ready programming","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230031777910/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796590079&Signature=yAlqPu4WXD5vP2GxW7j7ZDuEsjs%3D","cnccookbooks-g-code-course-volume-1-g-code-basics-learn-foundational-concepts-and-machine-ready-programming",1795381714]