Content deleted Content added
delink and autoed |
m Reverted 1 edit by Natalielaurend (talk) to last revision by Alexander Davronov |
||
(11 intermediate revisions by 9 users not shown) | |||
Line 2:
{{other uses|G-code (disambiguation)|G programming language (disambiguation)}}
{{redirect|RS-274|the photoplotter format|Gerber format}}
{{More footnotes needed|date=January 2025}}
{{Ambox
| name = G-code
| subst = <includeonly>{{subst:substcheck}}</includeonly>
| issue = This article may require restoring an older revision.
| talk = RfC:_Partially_Reversing_Thumperward's_deletions
| date = May 13, 2025
}}
{{Infobox programming language
| name = G-code
Line 21 ⟶ 30:
}}
'''G-code''' (abbreviation for '''geometric code'''; also called<ref>{{cite tech report |editor1-last=Barkmeyer |editor1-first=Edward J. |editor2-last=Hopp |editor2-first=Theodore H. |editor3-last=Michael J. |editor3-first=Pratt |editor4-last=Gaylen R. |editor4-first=Rinaudot |title=Background Study: Requisite Elements, Rationale, and Technology Overview for the Systems Integration for Manufacturing Applications (SIMA) Program |date=1995 |publisher=NIST Technical Series Publications |___location=Gaithersburg, MD, USA |pages=45 |edition=NIST Interagency/Internal Report (NISTIR) 5662 |url=https://nvlpubs.nist.gov/nistpubs/Legacy/IR/nistir5662.pdf}}</ref> '''RS-274''',<ref>{{cite book |title=EIA Standard RS-274-D Interchangeable Variable Block Data Format for Positioning, Contouring, and Contouring/Positioning Numerically Controlled Machines |date=February 1979 |publisher=Electronic Industries Association |___location=2001 Eye Street, NW, Washington, D.C. 20006 |url=https://search.worldcat.org/de/title/11135300 |ref=RS-274-D}}</ref> standardized today in '''ISO 6983-1'''<ref>{{cite tech report |editor1-last=Technical Committee ISO/TC 184/SC 1 |title=ISO 6983-1:2009 Automation systems and integration — Numerical control of machines — Program format and definitions of address words; Part 1: Data format for positioning, line motion and contouring control systems |date=December 2009 |publisher=International Standards Organization |___location=Geneva, Switzerland |url=https://www.iso.org/standard/34608.html |ref=ISO 6983:2009}}</ref>) is the most widely used [[computer numerical control]] (CNC) and [[3D printing]] [[programming language]]. It is used mainly in [[computer-aided manufacturing]] to control automated [[machine tool]]s, as well as for [[Slicer (3D printing)|3D-printer slicer applications]]. G-code has many variants.
G-code instructions are provided to a [[Programmable logic controller|machine controller]] (industrial computer) that tells the motors where to move, how fast to move, and what path to follow. The two most common situations are that, within a machine tool such as a [[Metal lathe|lathe]] or [[Milling (machining)|mill]], a [[cutting tool (machining)|cutting tool]] is moved according to these instructions through a toolpath cutting away material to leave only the finished workpiece and/or an unfinished workpiece is precisely positioned in any of up to nine axes<ref>Karlo Apro (2008). ''[https://books.google.com/books?id=Ws228Aht0bcC Secrets of 5-Axis Machining]''. Industrial Press Inc. {{ISBN|0-8311-3375-9}}.</ref> around the three dimensions relative to a toolpath and, either or both can move relative to each other. The same concept also extends to noncutting tools such as [[Forming (metalworking)|forming]] or [[Burnishing (metal)|burnishing]] tools, [[Gerber format|photoplotting]], additive methods such as 3D printing, and measuring instruments.
Line 29 ⟶ 38:
The first implementation of a numerical control programming language was developed at the [[MIT Servomechanisms Laboratory]] in the 1950s. In the decades that followed, many implementations were developed by numerous organizations, both commercial and noncommercial. Elements of G-code had often been used in these implementations.<ref>{{cite book | last=Xu | first=Xun | date=2009 | url=https://books.google.com/books?id=habcATPQWJ4C | title=Integrating Advanced Computer-aided Design, Manufacturing, and Numerical Control: Principles and Implementations | publisher=Information Science Reference | page=166 | isbn=978-1-59904-716-4 | via=Google Books}}</ref><ref>{{cite book | last=Harik | first=Ramy | author2=Thorsten Wuest | date=2019 | url=https://books.google.com/books?id=O3h0EAAAQBAJ | title=Introduction to Advanced Manufacturing | publisher=SAE International | page=116 | isbn=978-0-7680-9096-3 | via=Google Books}}</ref> The first [[Technical standard|standardized]] version of G-code used in the United States, ''RS-274'', was published in 1963 by the [[Electronic Industries Alliance]] (EIA; then known as Electronic Industries Association).<ref>{{cite book | last=Evans | first=John M. Jr. | date=1976 | url=https://www.govinfo.gov/content/pkg/GOVPUB-C13-2ef4aaa5a150eedcb85a1e6985e90bfa/pdf/GOVPUB-C13-2ef4aaa5a150eedcb85a1e6985e90bfa.pdf | title=National Bureau of Standards Information Report (NBSIR) 76-1094 (R): Standards for Computer Aided Manufacturing | publisher=National Bureau of Standards | page=43}}</ref> In 1974, EIA approved ''RS-274-C'', which merged ''RS-273'' (variable block for positioning and straight cut) and ''RS-274-B'' (variable block for contouring and contouring/positioning). A final revision of ''RS-274'' was approved in 1979, as ''RS-274-D''.<ref>{{cite journal | last=Schenck | first=John P. | date=January 1, 1998 | url=https://link.gale.com/apps/doc/A20429590/GPS?sid=wikipedia | title=Understanding common CNC protocols | journal=Wood & Wood Products | publisher=Vance Publishing | volume=103 | issue=1 | page=43 | via=Gale}}</ref><ref>{{citation| title = EIA Standard RS-274-D Interchangeable Variable Block Data Format for Positioning, Contouring, and Contouring/Positioning Numerically Controlled Machines |publisher = Electronic Industries Association |___location= Washington D.C. |date=February 1979}}</ref> In other countries, the standard ''[[International Organization for Standardization|ISO]] 6983'' (finalized in 1982) is often used, but many European countries use other standards.<ref>{{cite book | last=Stark | first=J. | author2=V. K. Nguyen | date=2009 | url=https://books.google.com/books?id=RIgLRe12RD4C | chapter=STEP-compliant CNC Systems, Present and Future Directions | title=Advanced Design and Manufacturing Based on STEP | editor-last=Xu | editor-first=Xun | editor2=Andrew Yeh Ching Nee | publisher=Springer London | page=216 | isbn=978-1-84882-739-4 | via=Google Books}}</ref> For example, ''[[Deutsches Institut für Normung|DIN]] 66025'' is used in Germany, and PN-73M-55256 and PN-93/M-55251 were formerly used in Poland.
During the 1970s through 1990s, many CNC machine tool builders attempted to overcome compatibility difficulties by standardizing on machine tool controllers built by [[Fanuc]]. [[Siemens]] was another market dominator in CNC controls, especially in Europe. In the 2010s, controller differences and incompatibility
== Syntax ==
Line 47 ⟶ 56:
* [[Direct Numerical Control]]
* [[LinuxCNC]]
* [[List of computer-aided manufacturing software]]
== References ==
|