G-code
Adapted from Wikipedia ยท Discoverer experience
G-code (short for geometric code) is a special set of instructions used to control machines that make things. It is the most common language for computer numerical control (CNC) and 3D printing. People use it in factories and workshops to tell machines exactly how to move and shape materials.
These instructions are sent to a machine controller, which is like a small computer inside the machine. The controller tells motors where to go, how fast to move, and what path to follow. For example, in a lathe or mill, a cutting tool moves along a planned path to shape a piece of material into the desired shape. The same idea works for other tasks like forming or smoothing surfaces, creating designs with a photoplotter, building objects with a 3D printer, or even measuring things.
G-code has many versions, but all serve the same basic purpose: to help machines perform tasks with great precision. This makes it very important in modern manufacturing and invention.
History
The first computer program to control machines was created at the MIT Servomechanisms Laboratory in the 1950s. Over the next few decades, many groups made their own versions of these programs. One of the first official rules for these programs, called RS-274, was made in the United States in 1963 by the Electronic Industries Alliance. Later updates were made in 1974 and 1979.
In other countries, different rules were used. For example, ISO 6983 became a common rule in 1982. From the 1970s to the 1990s, many machine builders used controllers from companies like Fanuc and Siemens. In the 2010s, special computer programs called CAD/CAM applications helped make G-code work better on different machines using a tool called a post-processor.
Syntax
G-code started as a simple language without advanced features like loops or variables. It was mainly used to guide machines by telling them where to go, one spot at a time. Over time, G-code has grown to include more advanced tools, making it easier to create automated tasks. Big companies that make these machines also let programmers use special data to control things like tool positions.
Extensions and variations
Different companies that make machines have added their own changes to G-code. People who use these machines need to know about these differences.
There is a special version of G-code called BCL, which was made at MIT. It is used on only a few machines and helps control them with straight lines and arcs.
Some machines use a simpler way to program called "conversational" programming. This works like a guide and may not use G-code at all. Popular examples include 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.
Related articles
This article is a child-friendly adaptation of the Wikipedia article on G-code, available under CC BY-SA 4.0.
Safekipedia