Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 History  





2 Syntax  





3 Extensions and variations  





4 See also  





5 References  





6 Bibliography  





7 External links  














G-code






Беларуская
Català
Dansk
Eesti
Ελληνικά
Español
فارسی
Français

ि
Hrvatski
Italiano
Қазақша
Nederlands
Polski
Português
Română
Русский
Српски / srpski
Türkçe
Українська


 

Edit links
 









Article
Talk
 

















Read
Edit
View history
 








Tools
   


Actions  



Read
Edit
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Cite this page
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 






From Wikipedia, the free encyclopedia
 


G-code

Paradigm

Procedural, imperative

Designed by

Massachusetts Institute of Technology

Developer

Electronic Industries Association (RS-274), International Organization for Standardization (ISO-6983)

First appeared

1963 (1963) (RS-274)

Filename extensions

.gcode, .mpt, .mpf, .nc and several others

Major implementations

Numerous; mainly Siemens Sinumerik, FANUC, Haas, Heidenhain, Mazak, Okuma

G-code (also RS-274) 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 tools, as well as for 3D-printer slicer applications. The G stands for geometry. G-code has many variants.

G-code instructions are provided to a 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 latheormill, a 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[1] 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 formingorburnishing tools, photoplotting, additive methods such as 3D printing, and measuring instruments.

History[edit]

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.[2][3] The first 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).[4] 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.[5][6] In other countries, the standard ISO 6983 (finalized in 1982) is often used, but many European countries use other standards.[7] For example, 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 are not as troublesome because machining operations are usually developed with CAD/CAM applications that can output the appropriate G-code for a specific machine through a software tool called a post-processor (sometimes shortened to just a "post").

Syntax[edit]

G-code began as a limited language that lacked constructs such as loops, conditional operators, and programmer-declared variables with natural-word-including names (or the expressions in which to use them). It was unable to encode logic but was just a way to "connect the dots" where the programmer figured out many of the dots' locations longhand. The latest implementations of G-code include macro language capabilities somewhat closer to a high-level programming language. Additionally, all primary manufacturers (e.g., Fanuc, Siemens, Heidenhain) provide access to programmable logic controller (PLC) data, such as axis positioning data and tool data,[8] via variables used by NC programs. These constructs make it easier to develop automation applications.

Extensions and variations[edit]

Extensions and variations have been added independently by control manufacturers and machine tool manufacturers, and operators of a specific controller must be aware of the differences between each manufacturer's product.

One standardized version of G-code, known as BCL (Binary Cutter Language), is used only on very few machines. Developed at MIT, BCL was developed to control CNC machines in terms of straight lines and arcs.[9]

Some CNC machines use "conversational" programming, which is a wizard-like programming mode that either hides G-code or completely bypasses the use of G-code. Some popular examples are Okuma's Advanced One Touch (AOT), Southwestern Industries' ProtoTRAK, Mazak's Mazatrol, Hurco's Ultimax and Winmax, Haas' Intuitive Programming System (IPS), and Mori Seiki's CAPS conversational software.

See also[edit]

References[edit]

  1. ^ Karlo Apro (2008). Secrets of 5-Axis Machining. Industrial Press Inc. ISBN 0-8311-3375-9.
  • ^ Xu, Xun (2009). Integrating Advanced Computer-aided Design, Manufacturing, and Numerical Control: Principles and Implementations. Information Science Reference. p. 166. ISBN 978-1-59904-716-4 – via Google Books.
  • ^ Harik, Ramy; Thorsten Wuest (2019). Introduction to Advanced Manufacturing. SAE International. p. 116. ISBN 978-0-7680-9096-3 – via Google Books.
  • ^ Evans, John M. Jr. (1976). National Bureau of Standards Information Report (NBSIR) 76-1094 (R): Standards for Computer Aided Manufacturing (PDF). National Bureau of Standards. p. 43.
  • ^ Schenck, John P. (January 1, 1998). "Understanding common CNC protocols". Wood & Wood Products. 103 (1). Vance Publishing: 43 – via Gale.
  • ^ EIA Standard RS-274-D Interchangeable Variable Block Data Format for Positioning, Contouring, and Contouring/Positioning Numerically Controlled Machines, Washington D.C.: Electronic Industries Association, February 1979
  • ^ Stark, J.; V. K. Nguyen (2009). "STEP-compliant CNC Systems, Present and Future Directions". In Xu, Xun; Andrew Yeh Ching Nee (eds.). Advanced Design and Manufacturing Based on STEP. Springer London. p. 216. ISBN 978-1-84882-739-4 – via Google Books.
  • ^ "Fanuc macro system variables". Archived from the original on 2014-05-03. Retrieved 2014-06-30.
  • ^ Martin., Libicki (1995). Information Technology Standards: Quest for the Common Byte. Burlington: Elsevier Science. p. 321. ISBN 978-1-4832-9248-9. OCLC 895436474.
  • Bibliography[edit]

    External links[edit]

  • t
  • e
  • Machining and computing

    Computer-aided
    engineering

  • CAD
  • CAM
  • G-code
  • Numerical control (NC and CNC)
  • Stewart platform
  • Drilling and
    threading

  • Drill
  • Drill bit
  • Drill bit shank
  • Drill bit sizes
  • Drilling
  • List of drill and tap sizes
  • Tap and die
  • Tap wrench
  • Threading
  • Grinding and
    lapping

  • Abrasive machining
  • Angle grinder
  • Bench grinder
  • Coated abrasive
  • Cylindrical grinder
  • Diamond plate
  • Flick grinder
  • Grinding
  • Grinding dresser
  • Grinding machine
  • Grinding wheel
  • Jig grinder
  • Lapping
  • Sanding
  • Sharpening stone
  • Spark testing
  • Surface grinder
  • Tool and cutter grinder
  • Machining

  • Broaching
  • Electrical discharge machining
  • Electrochemical machining
  • Electron-beam machining
  • End mill
  • Engraving
  • Facing
  • Hobbing
  • Jig borer
  • Machine tool
  • Machining
  • Metal lathe
  • Milling
  • Milling cutter
  • Pantograph
  • Photochemical machining
  • Planer
  • Reamer
  • Rotary transfer machine
  • Shaper
  • Skiving
  • Turning
  • Ultrasonic machining
  • Machine tools

  • Chuck
  • Collet
  • Fixture
  • Indexing head
  • Jig
  • Lathe center
  • Machine taper
  • Magnetic switchable device
  • Mandrel
  • Rotary table
  • Wiggler
  • Terminology

  • Machining vibrations
  • Speeds and feeds
  • Swarf
  • Tolerance
  • Tool and die making
  • Tramp oil
  • Workpiece
  • Fabrication
  • Forming
  • Jewellery
  • Machining
  • Metallurgy
  • Smithing
  • Tools and terminology
  • Welding

  • Retrieved from "https://en.wikipedia.org/w/index.php?title=G-code&oldid=1192191622"

    Categories: 
    Computer-aided engineering
    Domain-specific programming languages
    Encodings
    Metalworking
    Hidden categories: 
    Articles with short description
    Short description is different from Wikidata
    Webarchive template wayback links
     



    This page was last edited on 28 December 2023, at 03:18 (UTC).

    Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



    Privacy policy

    About Wikipedia

    Disclaimers

    Contact Wikipedia

    Code of Conduct

    Developers

    Statistics

    Cookie statement

    Mobile view



    Wikimedia Foundation
    Powered by MediaWiki