{"id":476,"date":"2026-09-25T11:06:33","date_gmt":"2026-09-25T03:06:33","guid":{"rendered":"https:\/\/www.ypmfg.com\/2026\/09\/25\/cnc-lathe-g-m-codes-explained\/"},"modified":"2026-09-25T11:06:33","modified_gmt":"2026-09-25T03:06:33","slug":"cnc-lathe-g-m-codes-explained","status":"publish","type":"post","link":"https:\/\/www.ypmfg.com\/ru\/2026\/09\/25\/cnc-lathe-g-m-codes-explained\/","title":{"rendered":"CNC Lathe G &amp; M Codes Explained"},"content":{"rendered":"<div style=\"margin: 0 auto;padding: 20px;font-family: -apple-system, BlinkMacSystemFont,\">\n<p style=\"margin: 1.25em 0;line-height: 1.9;font-size: 16px;color: #222222;text-align: justify;letter-spacing: 0.02em\"><strong style=\"font-weight: 600;color: #b32050\">\u041a\u0440\u0430\u0442\u043a\u0438\u0439 \u043e\u0442\u0432\u0435\u0442:<\/strong><\/p>\n<p style=\"margin: 1.25em 0;line-height: 1.9;font-size: 16px;color: #222222;text-align: justify;letter-spacing: 0.02em\">G codes direct the motion and geometric operations of a <strong style=\"font-weight: 600;color: #b32050\">\u0422\u043e\u043a\u0430\u0440\u043d\u044b\u0439 \u0441\u0442\u0430\u043d\u043e\u043a \u0441 \u0427\u041f\u0423<\/strong>, while M codes trigger auxiliary actions like spindle start, coolant on\/off, and program end. Together, they form the complete instruction language of every <strong style=\"font-weight: 600;color: #b32050\">lathe part program<\/strong>. G codes tell the tool where to move and how to cut. M codes tell the controller what supporting actions to run. You cannot execute a functional turning cycle without both. A working knowledge of these two code families is the minimum baseline for writing, debugging, or reviewing <strong style=\"font-weight: 600;color: #b32050\">CNC lathe G-code<\/strong> on any controller.<\/p>\n<p style=\"margin: 1.25em 0;line-height: 1.9;font-size: 16px;color: #222222;text-align: justify;letter-spacing: 0.02em\">Most operators know a CNC lathe runs on code. Where confusion starts is the boundary between G and M functions. A single misplaced code can mean a spindle crash, a missed cut, or a program that stalls mid-job and scraps the batch. This guide covers the essential codes, how they interact within a block, and the sequencing errors that cost the most on the floor.<\/p>\n<h2 style=\"font-size: 20px;font-weight: 600;margin: 1.4em 0 0.5em;color: #b32050;line-height: 1.4\">What G Codes and M Codes Actually Do<\/h2>\n<p style=\"margin: 1.25em 0;line-height: 1.9;font-size: 16px;color: #222222;text-align: justify;letter-spacing: 0.02em\">G codes govern geometry and motion: linear feed, rapid traverse, circular interpolation, and canned turning cycles. M codes govern peripheral machine actions: spindle control, coolant, tool change, and program termination. The two families never overlap in function, but they must be sequenced correctly in every block.<\/p>\n<h2 style=\"font-size: 20px;font-weight: 600;margin: 1.4em 0 0.5em;color: #b32050;line-height: 1.4\">Essential G Codes for Lathe Turning<\/h2>\n<table style=\"width: 100%;border-collapse: collapse;margin: 1.6em 0;border-radius: 10px 10px 0 0;overflow: hidden\">\n<tr>\n<th style=\"background: #9e1840;color: #fff;padding: 14px 16px;text-align: left;font-weight: 600;border: 1px solid #e0e0e0\">G-\u043a\u043e\u0434<\/th>\n<th style=\"background: #9e1840;color: #fff;padding: 14px 16px;text-align: left;font-weight: 600;border: 1px solid #e0e0e0\">\u0424\u0443\u043d\u043a\u0446\u0438\u044f<\/th>\n<th style=\"background: #9e1840;color: #fff;padding: 14px 16px;text-align: left;font-weight: 600;border: 1px solid #e0e0e0\">\u0422\u0438\u043f\u0438\u0447\u043d\u044b\u0435 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f<\/th>\n<\/tr>\n<tr>\n<td style=\"padding: 12px 16px;color: #222222;border: 1px solid #e0e0e0\">G00<\/td>\n<td style=\"padding: 12px 16px;color: #222222;border: 1px solid #e0e0e0\">Rapid traverse<\/td>\n<td style=\"padding: 12px 16px;color: #222222;border: 1px solid #e0e0e0\">Move tool to start point without cutting<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 12px 16px;color: #222222;border: 1px solid #e0e0e0\">G01<\/td>\n<td style=\"padding: 12px 16px;color: #222222;border: 1px solid #e0e0e0\">\u041b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u044f<\/td>\n<td style=\"padding: 12px 16px;color: #222222;border: 1px solid #e0e0e0\">Straight-line cutting at programmed feed rate<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 12px 16px;color: #222222;border: 1px solid #e0e0e0\">G02 \/ G03<\/td>\n<td style=\"padding: 12px 16px;color: #222222;border: 1px solid #e0e0e0\">Circular interpolation<\/td>\n<td style=\"padding: 12px 16px;color: #222222;border: 1px solid #e0e0e0\">Arcs on the external or internal surface<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 12px 16px;color: #222222;border: 1px solid #e0e0e0\">G96<\/td>\n<td style=\"padding: 12px 16px;color: #222222;border: 1px solid #e0e0e0\">Constant surface speed<\/td>\n<td style=\"padding: 12px 16px;color: #222222;border: 1px solid #e0e0e0\">Keep cutting speed uniform across varying diameters<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 12px 16px;color: #222222;border: 1px solid #e0e0e0\">G97<\/td>\n<td style=\"padding: 12px 16px;color: #222222;border: 1px solid #e0e0e0\">Constant spindle speed<\/td>\n<td style=\"padding: 12px 16px;color: #222222;border: 1px solid #e0e0e0\">Fixed RPM for drilling or boring operations<\/td>\n<\/tr>\n<tr>\n<td style=\"padding: 12px 16px;color: #222222;border: 1px solid #e0e0e0\">G71 \/ G72<\/td>\n<td style=\"padding: 12px 16px;color: #222222;border: 1px solid #e0e0e0\">Canned roughing cycles<\/td>\n<td style=\"padding: 12px 16px;color: #222222;border: 1px solid #e0e0e0\">Multi-pass profile roughing and facing<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin: 1.25em 0;line-height: 1.9;font-size: 16px;color: #222222;text-align: justify;letter-spacing: 0.02em\">G01 and G71 appear in nearly every turning program. Choosing between <strong style=\"font-weight: 600;color: #b32050\">G96 constant surface speed<\/strong> and G97 is a <strong style=\"font-weight: 600;color: #b32050\">spindle speed control<\/strong> decision that directly affects surface finish and tool life. Picking the wrong one leads to inconsistent cuts or premature wear on the tool edge.<\/p>\n<h2 style=\"font-size: 20px;font-weight: 600;margin: 1.4em 0 0.5em;color: #b32050;line-height: 1.4\">Essential M Codes for Lathe Operation<\/h2>\n<p style=\"margin: 1.25em 0;line-height: 1.9;font-size: 16px;color: #222222;text-align: justify;letter-spacing: 0.02em\">The M-code set is shorter but equally critical. The four you will see in almost every program:<\/p>\n<p style=\"margin: 1.25em 0;line-height: 1.9;font-size: 16px;color: #222222;text-align: justify;letter-spacing: 0.02em\"><strong style=\"font-weight: 600;color: #b32050\">M03 \/ M04<\/strong> \u2013 spindle forward \/ reverse<\/p>\n<p style=\"margin: 1.25em 0;line-height: 1.9;font-size: 16px;color: #222222;text-align: justify;letter-spacing: 0.02em\"><img decoding=\"async\" src=\"https:\/\/www.ypmfg.com\/wp-content\/themes\/mb\/images_nengli\/waterjet-cutting-supplier-rotv6ejkpk2vbuyuhar31oaemik47i6nwjuz3c3cv6-optimized.jpg\" alt=\"g code m code cnc lathe_g code m code cnc lathe_g code m code cnc lathe\" style=\"width: 100%;max-width: 960px;height: auto;display: block;margin: 1.8em auto;border-radius: 0px\"><\/p>\n<p style=\"margin: 1.25em 0;line-height: 1.9;font-size: 16px;color: #222222;text-align: justify;letter-spacing: 0.02em\"><strong style=\"font-weight: 600;color: #b32050\">M08 \/ M09<\/strong> \u2013 coolant on \/ off<\/p>\n<p style=\"margin: 1.25em 0;line-height: 1.9;font-size: 16px;color: #222222;text-align: justify;letter-spacing: 0.02em\"><strong style=\"font-weight: 600;color: #b32050\">M19<\/strong> \u2013 spindle orientation for tool change<\/p>\n<p style=\"margin: 1.25em 0;line-height: 1.9;font-size: 16px;color: #222222;text-align: justify;letter-spacing: 0.02em\"><strong style=\"font-weight: 600;color: #b32050\">M30<\/strong> \u2013 program end, return to start<\/p>\n<p style=\"margin: 1.25em 0;line-height: 1.9;font-size: 16px;color: #222222;text-align: justify;letter-spacing: 0.02em\">Omitting M08 before a first cut can cause thermal damage to the tool tip. Forgetting M30 at the end leaves the controller in an undefined state, which affects the next job loaded into the program queue.<\/p>\n<h2 style=\"font-size: 20px;font-weight: 600;margin: 1.4em 0 0.5em;color: #b32050;line-height: 1.4\">How G and M Codes Work in a Single Block<\/h2>\n<p style=\"margin: 1.25em 0;line-height: 1.9;font-size: 16px;color: #222222;text-align: justify;letter-spacing: 0.02em\">A line like &#8220;G01 X50 F0.1 M08&#8221; combines motion, feed, and coolant into one controller cycle. The G and M functions execute simultaneously within that block. If you split M08 onto a separate line after the G01, coolant starts a full cycle later. That gap can be enough to burn the first pass.<\/p>\n<p style=\"margin: 1.25em 0;line-height: 1.9;font-size: 16px;color: #222222;text-align: justify;letter-spacing: 0.02em\">On controllers that support block-level editing, you can add optional M codes for part inspection or sub-program calls such as M98 and M99. These advanced M codes are application-specific and vary by manufacturer, so verify them against your controller&#8217;s manual.<\/p>\n<p style=\"margin: 1.25em 0;line-height: 1.9;font-size: 16px;color: #222222;text-align: justify;letter-spacing: 0.02em\">When a program runs many operations, <strong style=\"font-weight: 600;color: #b32050\">CNC lathe programming errors<\/strong> usually come from sequencing, not from individual code values. <strong style=\"font-weight: 600;color: #b32050\">YPMFG<\/strong> reviews part programs for exactly this kind of timing and sequencing issue before jobs are released to the shop floor.<\/p>\n<h2 style=\"font-size: 20px;font-weight: 600;margin: 1.4em 0 0.5em;color: #b32050;line-height: 1.4\">Common Mistakes That Cause Scrap or Crash<\/h2>\n<p style=\"margin: 1.25em 0;line-height: 1.9;font-size: 16px;color: #222222;text-align: justify;letter-spacing: 0.02em\">Placing G96 before setting a safe S value,so the spindle overspeeds on the first pass.<\/p>\n<p style=\"margin: 1.25em 0;line-height: 1.9;font-size: 16px;color: #222222;text-align: justify;letter-spacing: 0.02em\">Omitting M19 before an automatic tool change on a turret-type lathe.<\/p>\n<p style=\"margin: 1.25em 0;line-height: 1.9;font-size: 16px;color: #222222;text-align: justify;letter-spacing: 0.02em\">Writing G02\/G03 without verifying the arc-center coordinates against the part drawing.<\/p>\n<p style=\"margin: 1.25em 0;line-height: 1.9;font-size: 16px;color: #222222;text-align: justify;letter-spacing: 0.02em\"><img decoding=\"async\" src=\"https:\/\/www.ypmfg.com\/wp-content\/themes\/mb\/images_nengli\/electropolish.webp\" alt=\"g code m code cnc lathe_g code m code cnc lathe_g code m code cnc lathe\" style=\"width: 100%;max-width: 960px;height: auto;display: block;margin: 1.8em auto;border-radius: 0px\"><\/p>\n<p style=\"margin: 1.25em 0;line-height: 1.9;font-size: 16px;color: #222222;text-align: justify;letter-spacing: 0.02em\"><strong>Each error produces a scrapped part or, in the worst case, a tool crash against the workpiece. Review your G-code file line by line against the part drawing before the first cut.<\/strong><\/p>\n<h2 style=\"font-size: 20px;font-weight: 600;margin: 1.4em 0 0.5em;color: #b32050;line-height: 1.4\">A Quick Self-Check Before You Run a Program<\/h2>\n<p style=\"margin: 1.25em 0;line-height: 1.9;font-size: 16px;color: #222222;text-align: justify;letter-spacing: 0.02em\">Before hitting start on any new lathe program, walk through this short list:<\/p>\n<p style=\"margin: 1.25em 0;line-height: 1.9;font-size: 16px;color: #222222;text-align: justify;letter-spacing: 0.02em\">Confirm G28 or G30 (return to reference) is the first G code.<\/p>\n<p style=\"margin: 1.25em 0;line-height: 1.9;font-size: 16px;color: #222222;text-align: justify;letter-spacing: 0.02em\">Verify S values stay within the spindle rated range when G96 is active.<\/p>\n<p style=\"margin: 1.25em 0;line-height: 1.9;font-size: 16px;color: #222222;text-align: justify;letter-spacing: 0.02em\">Check that M19 precedes every automatic tool change.<\/p>\n<p style=\"margin: 1.25em 0;line-height: 1.9;font-size: 16px;color: #222222;text-align: justify;letter-spacing: 0.02em\">Confirm M30 is the final M code in the program.<\/p>\n<p style=\"margin: 1.25em 0;line-height: 1.9;font-size: 16px;color: #222222;text-align: justify;letter-spacing: 0.02em\">Compare every X, Z, and R coordinate against the part drawing.<\/p>\n<p style=\"margin: 1.25em 0;line-height: 1.9;font-size: 16px;color: #222222;text-align: justify;letter-spacing: 0.02em\">Taking two minutes through this list catches the majority of <strong style=\"font-weight: 600;color: #b32050\">CNC lathe program errors<\/strong> before they become expensive mistakes on the machine.<\/p>\n<p style=\"margin: 1.25em 0;line-height: 1.9;font-size: 16px;color: #222222;text-align: justify;letter-spacing: 0.02em\">## Common Questions About G and M Codes on a CNC Lathe<\/p>\n<p style=\"margin: 1.25em 0;line-height: 1.9;font-size: 16px;color: #222222;text-align: justify;letter-spacing: 0.02em\"><strong style=\"font-weight: 600;color: #b32050\">Do G and M codes differ between FANUC, Siemens, and HAAS?<\/strong><\/p>\n<p style=\"margin: 1.25em 0;line-height: 1.9;font-size: 16px;color: #222222;text-align: justify;letter-spacing: 0.02em\">The core G-code set is similar across controllers, but cycle numbers and M-code assignments vary. G71 is a roughing cycle on FANUC but serves a different purpose on Siemens. Always check the controller-specific code sheet.<\/p>\n<p style=\"margin: 1.25em 0;line-height: 1.9;font-size: 16px;color: #222222;text-align: justify;letter-spacing: 0.02em\"><strong style=\"font-weight: 600;color: #b32050\">Can I group G and M codes on the same line?<\/strong><\/p>\n<p style=\"margin: 1.25em 0;line-height: 1.9;font-size: 16px;color: #222222;text-align: justify;letter-spacing: 0.02em\">Yes, and you should. Grouping them in one block ensures the controller reads them as a single cycle, eliminating timing gaps between motion and auxiliary actions.<\/p>\n<p style=\"margin: 1.25em 0;line-height: 1.9;font-size: 16px;color: #222222;text-align: justify;letter-spacing: 0.02em\"><strong style=\"font-weight: 600;color: #b32050\">What is the most common first-line error?<\/strong><\/p>\n<p style=\"margin: 1.25em 0;line-height: 1.9;font-size: 16px;color: #222222;text-align: justify;letter-spacing: 0.02em\"><strong>Forgetting G28 or G30 before the first cut. Without a known reference origin, every subsequent coordinate is relative to an undefined position on the machine.<\/strong><\/p>\n<p style=\"margin: 1.25em 0;line-height: 1.9;font-size: 16px;color: #222222;text-align: justify;letter-spacing: 0.02em\"><strong style=\"font-weight: 600;color: #b32050\">How many distinct G codes does a typical turning program use?<\/strong><\/p>\n<p style=\"margin: 1.25em 0;line-height: 1.9;font-size: 16px;color: #222222;text-align: justify;letter-spacing: 0.02em\">Most single-part turning programs use 8 to 15 distinct G codes. The count depends on whether you rely on canned cycles like the <strong style=\"font-weight: 600;color: #b32050\">G71 rough turning cycle<\/strong> or program each pass manually.<\/p>\n<p style=\"margin: 1.25em 0;line-height: 1.9;font-size: 16px;color: #222222;text-align: justify;letter-spacing: 0.02em\"><strong style=\"font-weight: 600;color: #b32050\">Do I need to know M codes if I only use canned cycles?<\/strong><\/p>\n<p style=\"margin: 1.25em 0;line-height: 1.9;font-size: 16px;color: #222222;text-align: justify;letter-spacing: 0.02em\">Canned cycles like G71 still call M codes internally for spindle and coolant control. You need at least basic M-code knowledge to override or customize the cycle&#8217;s auxiliary behavior.<\/p>\n<h2 style=\"font-size: 20px;font-weight: 600;margin: 1.4em 0 0.5em;color: #b32050;line-height: 1.4\">Choosing the Right Code Set for Your Job<\/h2>\n<p style=\"margin: 1.25em 0;line-height: 1.9;font-size: 16px;color: #222222;text-align: justify;letter-spacing: 0.02em\">You do not need to memorize every G and M code. Focus on the 10 to 15 that your parts actually require. <strong style=\"font-weight: 600;color: #b32050\">YPMFG<\/strong> supports projects that need code-level review, from flagging risky S\/T values to suggesting safer canned-cycle structures before a job reaches the machine.<\/p>\n<p style=\"margin: 1.25em 0;line-height: 1.9;font-size: 16px;color: #222222;text-align: justify;letter-spacing: 0.02em\">If your program keeps producing out-of-tolerance parts, sending the G-code file to YPMFG for an independent engineering review can save weeks of trial-and-error on the floor. You can share your part drawing and current program, and our team will identify the specific code lines that need correction.<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Quick answer:G codes direct the motion and geometric operations of a CNC lathe<\/p>","protected":false},"author":1,"featured_media":477,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[44],"tags":[374,406,419,421,420],"class_list":["post-476","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-cnc-lathe","tag-cnc-machining","tag-g-codes","tag-lathe-programming","tag-m-codes"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>CNC Lathe G &amp; M Codes Explained<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.ypmfg.com\/ru\/2026\/09\/25\/cnc-lathe-g-m-codes-explained\/\" \/>\n<meta property=\"og:locale\" content=\"ru_RU\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"CNC Lathe G &amp; M Codes Explained\" \/>\n<meta property=\"og:description\" content=\"Quick answer:G codes direct the motion and geometric operations of a CNC lathe\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.ypmfg.com\/ru\/2026\/09\/25\/cnc-lathe-g-m-codes-explained\/\" \/>\n<meta property=\"og:site_name\" content=\"YP-MFG| Custom CNC Parts Made Exactly to Spec\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-25T03:06:33+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.ypmfg.com\/wp-content\/themes\/mb\/images_nengli\/waterjet-cutting-supplier-rotv6ejkpk2vbuyuhar31oaemik47i6nwjuz3c3cv6-optimized.jpg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0430\u0432\u0442\u043e\u0440\u043e\u043c\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 \u043c\u0438\u043d\u0443\u0442\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.ypmfg.com\\\/ru\\\/2026\\\/09\\\/25\\\/cnc-lathe-g-m-codes-explained\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.ypmfg.com\\\/ru\\\/2026\\\/09\\\/25\\\/cnc-lathe-g-m-codes-explained\\\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/www.ypmfg.com\\\/ru\\\/#\\\/schema\\\/person\\\/1ad07d09a6f18573f3b764ab0b4a8484\"},\"headline\":\"CNC Lathe G &amp; M Codes Explained\",\"datePublished\":\"2026-09-25T03:06:33+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.ypmfg.com\\\/ru\\\/2026\\\/09\\\/25\\\/cnc-lathe-g-m-codes-explained\\\/\"},\"wordCount\":1049,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.ypmfg.com\\\/ru\\\/2026\\\/09\\\/25\\\/cnc-lathe-g-m-codes-explained\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.ypmfg.com\\\/wp-content\\\/themes\\\/mb\\\/images_nengli\\\/waterjet-cutting-supplier-rotv6ejkpk2vbuyuhar31oaemik47i6nwjuz3c3cv6-optimized.jpg\",\"keywords\":[\"CNC Lathe\",\"CNC Machining\",\"G Codes\",\"Lathe Programming\",\"M Codes\"],\"articleSection\":[\"Blog\"],\"inLanguage\":\"ru-RU\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.ypmfg.com\\\/ru\\\/2026\\\/09\\\/25\\\/cnc-lathe-g-m-codes-explained\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.ypmfg.com\\\/ru\\\/2026\\\/09\\\/25\\\/cnc-lathe-g-m-codes-explained\\\/\",\"url\":\"https:\\\/\\\/www.ypmfg.com\\\/ru\\\/2026\\\/09\\\/25\\\/cnc-lathe-g-m-codes-explained\\\/\",\"name\":\"CNC Lathe G &amp; M Codes Explained\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.ypmfg.com\\\/ru\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.ypmfg.com\\\/ru\\\/2026\\\/09\\\/25\\\/cnc-lathe-g-m-codes-explained\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.ypmfg.com\\\/ru\\\/2026\\\/09\\\/25\\\/cnc-lathe-g-m-codes-explained\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.ypmfg.com\\\/wp-content\\\/themes\\\/mb\\\/images_nengli\\\/waterjet-cutting-supplier-rotv6ejkpk2vbuyuhar31oaemik47i6nwjuz3c3cv6-optimized.jpg\",\"datePublished\":\"2026-09-25T03:06:33+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.ypmfg.com\\\/ru\\\/#\\\/schema\\\/person\\\/1ad07d09a6f18573f3b764ab0b4a8484\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.ypmfg.com\\\/ru\\\/2026\\\/09\\\/25\\\/cnc-lathe-g-m-codes-explained\\\/#breadcrumb\"},\"inLanguage\":\"ru-RU\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.ypmfg.com\\\/ru\\\/2026\\\/09\\\/25\\\/cnc-lathe-g-m-codes-explained\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ru-RU\",\"@id\":\"https:\\\/\\\/www.ypmfg.com\\\/ru\\\/2026\\\/09\\\/25\\\/cnc-lathe-g-m-codes-explained\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.ypmfg.com\\\/wp-content\\\/themes\\\/mb\\\/images_nengli\\\/waterjet-cutting-supplier-rotv6ejkpk2vbuyuhar31oaemik47i6nwjuz3c3cv6-optimized.jpg\",\"contentUrl\":\"https:\\\/\\\/www.ypmfg.com\\\/wp-content\\\/themes\\\/mb\\\/images_nengli\\\/waterjet-cutting-supplier-rotv6ejkpk2vbuyuhar31oaemik47i6nwjuz3c3cv6-optimized.jpg\",\"width\":427,\"height\":285},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.ypmfg.com\\\/ru\\\/2026\\\/09\\\/25\\\/cnc-lathe-g-m-codes-explained\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.ypmfg.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"CNC Lathe G &amp; M Codes Explained\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.ypmfg.com\\\/ru\\\/#website\",\"url\":\"https:\\\/\\\/www.ypmfg.com\\\/ru\\\/\",\"name\":\"YP-MFG| Custom CNC Parts Made Exactly to Spec\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.ypmfg.com\\\/ru\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ru-RU\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.ypmfg.com\\\/ru\\\/#\\\/schema\\\/person\\\/1ad07d09a6f18573f3b764ab0b4a8484\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ru-RU\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5edfa2692bdacc5e6ee805c626c50cb44cebb065f092d9a1067d89f74dacd326?s=96&d=mm&r=x\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5edfa2692bdacc5e6ee805c626c50cb44cebb065f092d9a1067d89f74dacd326?s=96&d=mm&r=x\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5edfa2692bdacc5e6ee805c626c50cb44cebb065f092d9a1067d89f74dacd326?s=96&d=mm&r=x\",\"caption\":\"admin\"},\"sameAs\":[\"http:\\\/\\\/127.0.0.57\"],\"url\":\"https:\\\/\\\/www.ypmfg.com\\\/ru\\\/author\\\/admin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"CNC Lathe G &amp; M Codes Explained","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.ypmfg.com\/ru\/2026\/09\/25\/cnc-lathe-g-m-codes-explained\/","og_locale":"ru_RU","og_type":"article","og_title":"CNC Lathe G &amp; M Codes Explained","og_description":"Quick answer:G codes direct the motion and geometric operations of a CNC lathe","og_url":"https:\/\/www.ypmfg.com\/ru\/2026\/09\/25\/cnc-lathe-g-m-codes-explained\/","og_site_name":"YP-MFG| Custom CNC Parts Made Exactly to Spec","article_published_time":"2026-09-25T03:06:33+00:00","og_image":[{"url":"https:\/\/www.ypmfg.com\/wp-content\/themes\/mb\/images_nengli\/waterjet-cutting-supplier-rotv6ejkpk2vbuyuhar31oaemik47i6nwjuz3c3cv6-optimized.jpg","type":"","width":"","height":""}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0430\u0432\u0442\u043e\u0440\u043e\u043c":"admin","\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f":"5 \u043c\u0438\u043d\u0443\u0442"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.ypmfg.com\/ru\/2026\/09\/25\/cnc-lathe-g-m-codes-explained\/#article","isPartOf":{"@id":"https:\/\/www.ypmfg.com\/ru\/2026\/09\/25\/cnc-lathe-g-m-codes-explained\/"},"author":{"name":"admin","@id":"https:\/\/www.ypmfg.com\/ru\/#\/schema\/person\/1ad07d09a6f18573f3b764ab0b4a8484"},"headline":"CNC Lathe G &amp; M Codes Explained","datePublished":"2026-09-25T03:06:33+00:00","mainEntityOfPage":{"@id":"https:\/\/www.ypmfg.com\/ru\/2026\/09\/25\/cnc-lathe-g-m-codes-explained\/"},"wordCount":1049,"commentCount":0,"image":{"@id":"https:\/\/www.ypmfg.com\/ru\/2026\/09\/25\/cnc-lathe-g-m-codes-explained\/#primaryimage"},"thumbnailUrl":"https:\/\/www.ypmfg.com\/wp-content\/themes\/mb\/images_nengli\/waterjet-cutting-supplier-rotv6ejkpk2vbuyuhar31oaemik47i6nwjuz3c3cv6-optimized.jpg","keywords":["CNC Lathe","CNC Machining","G Codes","Lathe Programming","M Codes"],"articleSection":["Blog"],"inLanguage":"ru-RU","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.ypmfg.com\/ru\/2026\/09\/25\/cnc-lathe-g-m-codes-explained\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.ypmfg.com\/ru\/2026\/09\/25\/cnc-lathe-g-m-codes-explained\/","url":"https:\/\/www.ypmfg.com\/ru\/2026\/09\/25\/cnc-lathe-g-m-codes-explained\/","name":"CNC Lathe G &amp; M Codes Explained","isPartOf":{"@id":"https:\/\/www.ypmfg.com\/ru\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.ypmfg.com\/ru\/2026\/09\/25\/cnc-lathe-g-m-codes-explained\/#primaryimage"},"image":{"@id":"https:\/\/www.ypmfg.com\/ru\/2026\/09\/25\/cnc-lathe-g-m-codes-explained\/#primaryimage"},"thumbnailUrl":"https:\/\/www.ypmfg.com\/wp-content\/themes\/mb\/images_nengli\/waterjet-cutting-supplier-rotv6ejkpk2vbuyuhar31oaemik47i6nwjuz3c3cv6-optimized.jpg","datePublished":"2026-09-25T03:06:33+00:00","author":{"@id":"https:\/\/www.ypmfg.com\/ru\/#\/schema\/person\/1ad07d09a6f18573f3b764ab0b4a8484"},"breadcrumb":{"@id":"https:\/\/www.ypmfg.com\/ru\/2026\/09\/25\/cnc-lathe-g-m-codes-explained\/#breadcrumb"},"inLanguage":"ru-RU","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.ypmfg.com\/ru\/2026\/09\/25\/cnc-lathe-g-m-codes-explained\/"]}]},{"@type":"ImageObject","inLanguage":"ru-RU","@id":"https:\/\/www.ypmfg.com\/ru\/2026\/09\/25\/cnc-lathe-g-m-codes-explained\/#primaryimage","url":"https:\/\/www.ypmfg.com\/wp-content\/themes\/mb\/images_nengli\/waterjet-cutting-supplier-rotv6ejkpk2vbuyuhar31oaemik47i6nwjuz3c3cv6-optimized.jpg","contentUrl":"https:\/\/www.ypmfg.com\/wp-content\/themes\/mb\/images_nengli\/waterjet-cutting-supplier-rotv6ejkpk2vbuyuhar31oaemik47i6nwjuz3c3cv6-optimized.jpg","width":427,"height":285},{"@type":"BreadcrumbList","@id":"https:\/\/www.ypmfg.com\/ru\/2026\/09\/25\/cnc-lathe-g-m-codes-explained\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.ypmfg.com\/"},{"@type":"ListItem","position":2,"name":"CNC Lathe G &amp; M Codes Explained"}]},{"@type":"WebSite","@id":"https:\/\/www.ypmfg.com\/ru\/#website","url":"https:\/\/www.ypmfg.com\/ru\/","name":"YP-MFG | \u0414\u0435\u0442\u0430\u043b\u0438 \u0441 \u0427\u041f\u0423 \u043d\u0430 \u0437\u0430\u043a\u0430\u0437, \u0438\u0437\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 \u0442\u043e\u0447\u043d\u043e\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c\u0438","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.ypmfg.com\/ru\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ru-RU"},{"@type":"Person","@id":"https:\/\/www.ypmfg.com\/ru\/#\/schema\/person\/1ad07d09a6f18573f3b764ab0b4a8484","name":"\u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440","image":{"@type":"ImageObject","inLanguage":"ru-RU","@id":"https:\/\/secure.gravatar.com\/avatar\/5edfa2692bdacc5e6ee805c626c50cb44cebb065f092d9a1067d89f74dacd326?s=96&d=mm&r=x","url":"https:\/\/secure.gravatar.com\/avatar\/5edfa2692bdacc5e6ee805c626c50cb44cebb065f092d9a1067d89f74dacd326?s=96&d=mm&r=x","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5edfa2692bdacc5e6ee805c626c50cb44cebb065f092d9a1067d89f74dacd326?s=96&d=mm&r=x","caption":"admin"},"sameAs":["http:\/\/127.0.0.57"],"url":"https:\/\/www.ypmfg.com\/ru\/author\/admin\/"}]}},"permalink_manager":null,"_links":{"self":[{"href":"https:\/\/www.ypmfg.com\/ru\/wp-json\/wp\/v2\/posts\/476","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ypmfg.com\/ru\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ypmfg.com\/ru\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ypmfg.com\/ru\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ypmfg.com\/ru\/wp-json\/wp\/v2\/comments?post=476"}],"version-history":[{"count":0,"href":"https:\/\/www.ypmfg.com\/ru\/wp-json\/wp\/v2\/posts\/476\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ypmfg.com\/ru\/wp-json\/wp\/v2\/media\/477"}],"wp:attachment":[{"href":"https:\/\/www.ypmfg.com\/ru\/wp-json\/wp\/v2\/media?parent=476"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ypmfg.com\/ru\/wp-json\/wp\/v2\/categories?post=476"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ypmfg.com\/ru\/wp-json\/wp\/v2\/tags?post=476"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}