[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-732688-105":59,"doc-detail-732688-en":130,"doc-similar-732688":166},{"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":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","chapter-12-cnc-program-codes","CHAPTER 12 - CNC Program Codes","","Chapter 12 describes CNC program codes and parameters supported by the M-Series Control. It explains which G codes and parameters are modal versus “one shots,” how modal commands remain active until replaced, and how one-shot commands apply only to the current line. It then details common code identifiers and usages including D (tool diameter offsets), E (work coordinate systems), F (feedrate), H (tool length offsets), N (block numbers), O (program numbers with subprogram extraction), and P/Q/R/S/T plus comment syntax.",{"@graph":69,"@context":122},[70,84,105],{"@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/chapter-12-cnc-program-codes/732688/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/chapter-12-cnc-program-codes/732688.png","ImageObject",300,407,{"name":92,"@type":93},"Elsa","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-27","2026-11-22",true,{"@type":102,"interactionType":103,"userInteractionCount":19},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"What is the difference between modal G codes/parameters and “one shots” in M-Series Control?","Question",{"text":112,"@type":113},"Modal codes and parameters stay in effect until a new code or parameter is issued, while “one shots” apply only to the current line.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"How is the D code used for tool diameter offset?",{"text":117,"@type":113},"D selects the tool diameter offset from the offset library; the stored offset can be placed alone or with other G codes and changes only when another D code is entered.",{"name":119,"@type":110,"acceptedAnswer":120},"What do the comment identifiers “:” and “;” do in CNC programs?",{"text":121,"@type":113},"A colon starts a visible comment line and must be the first character on the line, while a semicolon starts an internal comment within a program line and causes the rest of the line to be ignored during execution.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},732688,1795381730,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":133,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":19,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":139,"language":140,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":67,"update_tm":129,"read_time":144,"preview_page_count":24,"preview_urls":145},137455077381,"https://ap-avatar.wpscdn.com/davatar_994ba38a5ba835b3df7d355c54d3ed8d","CHAPTER 12  \nCNC Program Codes  \nGeneral  \nThe next three chapters contain a description of the CNC program codes and parameters supported by the M-Series Control. The M-Series Control has some G codes and parameters that are modal, and some that are \"one shots.\" The G codes and parameters that are modal will stay in effect until a new G code or parameter is issued. One shots are effective for the current line only. For example, a movement command ofG1, which is modal, will remain in effect until a different movement command is issued, such as G0, G2, G3, etc.  \nMiscellaneous CNC Program Symbols  \nD-Tool Diameter Offset Number  \nD is used to select the Tool Diameter Offset from the offset library. The D code values are stored in the Offset Library. Tool Diameter Offsets can be specified anytime before Cutter Comp is turned on (G41 or G42) . Once specified, the offset amount is stored and will only be changed when another D code is entered. The Tool Diameter Offset (D) can be placed on a line by itself or on a line with other G-codes.  \nExample:  \nX0Y0F10 ;  \nG41 D2 ; Enables cutter comp left with diameter D2 .  \nG1X0Y0 ;  \nX1Y1.25 ; Cutter compensated moves  \nX2Y1 .4 ;  \nG40 ; Cutter compensation off  \nG42 ; Enables cutter comp. right (still using D2)  \nE-Select Work Coordinate System  \nE1 through E6 select among the six work coordinate systems. They are equivalent to G54 through G59 .  \nF-Feedrate  \nThe F command is used to set the cutting feedrate. The feedrate is expressed in units/minute. The programmed feedrate may be modified by the feedrate override knob (2% -200%) . The default feedrate is 3.0 units/minute. Units may be inches or millimeters.  \nM-Series Operator’s Manual 6/7/12 12-1  \nExample:  \nG90 G1 X1 .0 F50 ; linear mill to X1 at 50 units/minute  \nH-Tool Length Offset Number  \nH is used to select the Tool Length Offset Number. The H code offset amounts are stored in the file Offset Library. Tool Length Offsets can be specified anytime before a G43 or G44 is issued. Once specified the offset amount is stored and will only be changed when another H code is entered. The Tool Length Offset (H) can be placed on a line by itself or on a line with other G-codes. H00 is always a 0.0 length offset.  \nExample:  \nG43 H1 Z3 ; Selects offset corresponding to H1, moves to Z3  \nG1X0Y1 ;  \nH3 ; Selects offset corresponding to H3 .  \nX1Y1 .25 ;  \nG0H5 ; Selects offset corresponding to H5 .  \n* NOTE: See Tool/Offset Library Edit (Chapter 4) for editing instruction for the offset library. For information on length compensation functions see G43 and G44 in Chapter 13.  \nN-Block Number  \nBlock numbers are used to identify CNC program lines. Block numbers are optional, but can be used with the Search Function (See Main Screen Search option in Chapter 2) . Block numbers also can make reading the NC files easier.  \nExample:  \nN1 G90 G17 M25  \nN2 G0 X0 Y0 Z0  \nO-Program Number  \nThe O program number allows you to identify your program with a certain number.  \nIf the program number is 9100-9999, the G codes from the O number through the next M99 will be extracted and placed in a separate subprogram/macro file. The lines will not be executed until the resulting file is called with M98 or G65 .  \nExample:  \nO1521  \nN1 G90 G17 M25  \nN2 G0 X0 Y0 Z0  \nP-Parameter  \n12-2 M-Series Operator’s Manual 6/7/12  \nP can correspond to Dwell Time, subprogram number, or a general parameter in canned cycles. This is used as a variable for any of those values in the NC file.  \nExamples:  \nG4 P1 .32 ; Pause execution for 1.32 seconds  \nG10 P73 R.1 ; Set parameter \\#73 (G73 retract) to .1 inches  \nQ-Parameter  \nQ is used as a depth parameter in canned drilling cycles.  \nExample:  \nG73 X1.5 Y2.0 Z-.75 R.25 Q.25 F5 ; Q Sets the depth cut at .25  \nR-Radius, Return Point, Parameter  \nR can represent the radius, a return point, or a general parameter. This is used as a variable for any of those values in the NC file. R is similar to the P parameter.  \nExamples:  \nG","cbCaifJHFjassSTd","https://ap.wps.com/l/cbCaifJHFjassSTd","pdf",534517,45,"English","# General\n## Miscellaneous CNC Program Symbols\n### D-Tool Diameter Offset Number\n### E-Select Work Coordinate System\n### F-Feedrate\n### H-Tool Length Offset Number\n### N-Block Number\n### O-Program Number\n### P-Parameter\n### Q-Parameter\n### R-Radius, Return Point, Parameter\n### S-Spindle Speed Setting\n### T-Select Tool\n### Comment Identifiers (: and ;)","[{\"question\":\"What is the difference between modal G codes/parameters and “one shots” in M-Series Control?\",\"answer\":\"Modal codes and parameters stay in effect until a new code or parameter is issued, while “one shots” apply only to the current line.\"},{\"question\":\"How is the D code used for tool diameter offset?\",\"answer\":\"D selects the tool diameter offset from the offset library; the stored offset can be placed alone or with other G codes and changes only when another D code is entered.\"},{\"question\":\"What do the comment identifiers “:” and “;” do in CNC programs?\",\"answer\":\"A colon starts a visible comment line and must be the first character on the line, while a semicolon starts an internal comment within a program line and causes the rest of the line to be ignored during execution.\"}]","CHAPTER 12 - CNC Program Codes | PDF",113,[146,150,154,158,162],{"page_no":8,"url":147,"width":148,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-22/5b4fb44eb4e3e844a95f8cd3ac199d29.webp",983,1272,{"page_no":14,"url":151,"width":152,"height":153},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-22/d88f8c11fe962a4edb16fb1e668cf6f6.webp",982,1270,{"page_no":81,"url":155,"width":156,"height":157},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-22/2d76185b61b659bb383f660d9918a866.webp",981,1269,{"page_no":19,"url":159,"width":160,"height":161},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-22/e6992a53944f4f16102c03a9120da2a7.webp",980,1268,{"page_no":24,"url":163,"width":164,"height":165},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-22/6bdab150c2a6a4e80139cbc93044255b.webp",979,1267,{"list":167,"token":66},[168,174,180,186,192,198,205,211,217,223],{"doc_id":169,"doc_title":170,"file_type":137,"home_preview_img_url":171,"slug":172,"view_count":81,"category_name":30,"create_tm":173},732721,"Centroid Lathe G Codes - Chapter 11","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230031778487/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796108819&Signature=BLqek1dqWOnkT9nSGL3FCnN5GuI%3D","centroid-lathe-g-codes-chapter-11",1795381900,{"doc_id":175,"doc_title":176,"file_type":137,"home_preview_img_url":177,"slug":178,"view_count":19,"category_name":30,"create_tm":179},732696,"PART PROGRAMMING - INTRODUCTION","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230031778025/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796108819&Signature=GSHSUMg4CduMsVnqijrpxbpTssk%3D","part-programming-introduction",1795381745,{"doc_id":181,"doc_title":182,"file_type":137,"home_preview_img_url":183,"slug":184,"view_count":81,"category_name":30,"create_tm":185},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=1796108819&Signature=bgfZhk4Duieiu%2BiSHxAN6KI%2Bcpw%3D","mach4-mill-gcode-manual-version-10",1795381723,{"doc_id":187,"doc_title":188,"file_type":137,"home_preview_img_url":189,"slug":190,"view_count":24,"category_name":30,"create_tm":191},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=1796108819&Signature=FfRnLnLDgwhylBoC5sbzSHvWBWI%3D","basic-iso-programming-exercise-3-turning-iso-g-code-turning-and-boring-tutorial",1795381774,{"doc_id":193,"doc_title":194,"file_type":137,"home_preview_img_url":195,"slug":196,"view_count":19,"category_name":30,"create_tm":197},668980,"centroid_G_and_M_codes - Chapter 12 - CNC Program Codes: G-codes","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229987781956/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796108819&Signature=QwoxMQvu1wObdey85mAwuR0C1Lg%3D","centroid_g_and_m_codes-chapter-12-cnc-program-codes-g-codes",1793522071,{"doc_id":199,"doc_title":200,"file_type":137,"home_preview_img_url":201,"slug":202,"view_count":203,"category_name":30,"create_tm":204},654056,"FANUC Series 0+-MODEL F - Operation and Maintenance Handbook","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229974006120/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796108819&Signature=7N5yofk6EtaZ1gVvtIEKBmwZwG0%3D","fanuc-series-0-model-f-operation-and-maintenance-handbook",13,1792906229,{"doc_id":206,"doc_title":207,"file_type":137,"home_preview_img_url":208,"slug":209,"view_count":46,"category_name":30,"create_tm":210},654060,"FANUC - User’s Manual - B-63944EN/03","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229973640885/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796108819&Signature=mQPCJtzzMnAcFwF9VIGbCKG2Jc0%3D","fanuc-users-manual-b-63944en03",1792906240,{"doc_id":212,"doc_title":213,"file_type":137,"home_preview_img_url":214,"slug":215,"view_count":81,"category_name":30,"create_tm":216},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=1796108819&Signature=zbkTJXE5AeA9LAi0XZfgLdkfoBU%3D","g-and-m-programming-for-cnc-milling-machines-g-and-m-programming-manual",1795381742,{"doc_id":218,"doc_title":219,"file_type":137,"home_preview_img_url":220,"slug":221,"view_count":81,"category_name":30,"create_tm":222},732689,"M-and G-Code Sample Files - M and G Code Examples","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230031777973/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796108819&Signature=3Ws16v5%2FmgmbR0Ty9qSUPniheHY%3D","m-and-g-code-sample-files-m-and-g-code-examples",1795381731,{"doc_id":224,"doc_title":225,"file_type":137,"home_preview_img_url":226,"slug":227,"view_count":24,"category_name":30,"create_tm":228},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=1796108819&Signature=HXQiH6j9FdHJGur6oPc90Pp765Y%3D","study-of-g-codes-and-m-codes-used-in-cnc-lathe-hmt-cnc-t70-cnc-machining-centre-codes",1795381890]