Paradigm | Procedural, imperative |
---|---|
Designed by | Massachusetts Institute of Technology |
Developer | Electronic Industries Association (RS-274), International Organization for Standardization (ISO-6983) |
First appeared | 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 lathe or mill, 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 forming or burnishing tools, photoplotting, additive methods such as 3D printing, and measuring instruments.
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").
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 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.
Computer-aided manufacturing (CAM) also known as computer-aided modeling or computer-aided machining is the use of software to control machine tools in the manufacturing of work pieces. This is not the only definition for CAM, but it is the most common. It may also refer to the use of a computer to assist in all operations of a manufacturing plant, including planning, management, transportation and storage. Its primary purpose is to create a faster production process and components and tooling with more precise dimensions and material consistency, which in some cases, uses only the required amount of raw material, while simultaneously reducing energy consumption. CAM is now a system used in schools and lower educational purposes. CAM is a subsequent computer-aided process after computer-aided design (CAD) and sometimes computer-aided engineering (CAE), as the model generated in CAD and verified in CAE can be input into CAM software, which then controls the machine tool. CAM is used in many schools alongside CAD to create objects.
A machine tool is a machine for handling or machining metal or other rigid materials, usually by cutting, boring, grinding, shearing, or other forms of deformations. Machine tools employ some sort of tool that does the cutting or shaping. All machine tools have some means of constraining the workpiece and provide a guided movement of the parts of the machine. Thus, the relative movement between the workpiece and the cutting tool is controlled or constrained by the machine to at least some extent, rather than being entirely "offhand" or "freehand". It is a power-driven metal cutting machine which assists in managing the needed relative motion between cutting tool and the job that changes the size and shape of the job material.
In machining, numerical control, also called computer numerical control (CNC), is the automated control of tools by means of a computer. It is used to operate tools such as drills, lathes, mills, grinders, routers and 3D printers. CNC transforms a piece of material into a specified shape by following coded programmed instructions and without a manual operator directly controlling the machining operation.
Diamond turning is turning using a cutting tool with a diamond tip. It is a process of mechanical machining of precision elements using lathes or derivative machine tools equipped with natural or synthetic diamond-tipped tool bits. The term single-point diamond turning (SPDT) is sometimes applied, although as with other lathe work, the "single-point" label is sometimes only nominal. The process of diamond turning is widely used to manufacture high-quality aspheric optical elements from crystals, metals, acrylic, and other materials. Plastic optics are frequently molded using diamond turned mold inserts. Optical elements produced by the means of diamond turning are used in optical assemblies in telescopes, video projectors, missile guidance systems, lasers, scientific research instruments, and numerous other systems and devices. Most SPDT today is done with computer numerical control (CNC) machine tools. Diamonds also serve in other machining processes, such as milling, grinding, and honing. Diamond turned surfaces have a high specular brightness and require no additional polishing or buffing, unlike other conventionally machined surfaces.
FANUC is a Japanese group of companies that provide automation products and services such as robotics and computer numerical control wireless systems. These companies are principally FANUC Corporation of Japan, Fanuc America Corporation of Rochester Hills, Michigan, USA, and FANUC Europe Corporation S.A. of Luxembourg.
Turning is a machining process in which a cutting tool, typically a non-rotary tool bit, describes a helix toolpath by moving more or less linearly while the workpiece rotates.
In machining, a metal lathe or metalworking lathe is a large class of lathes designed for precisely machining relatively hard materials. They were originally designed to machine metals; however, with the advent of plastics and other materials, and with their inherent versatility, they are used in a wide range of applications, and a broad range of materials. In machining jargon, where the larger context is already understood, they are usually simply called lathes, or else referred to by more-specific subtype names. These rigid machine tools remove material from a rotating workpiece via the movements of various cutting tools, such as tool bits and drill bits.
APT is a high-level computer programming language most commonly used to generate instructions for numerically controlled machine tools. Douglas T. Ross is considered by many to be the father of APT: as head of the newly created Computer Applications Group of the Servomechanisms Laboratory at MIT in 1956, he led its technical effort. APT is a language and system that alleviates the tedious mathematics of writing toolpaths for numerically controlled equipment. This early language was used widely through the 1970s and is still a standard internationally. Derivatives of APT were later developed.
A turret lathe is a form of metalworking lathe that is used for repetitive production of duplicate parts, which by the nature of their cutting process are usually interchangeable. It evolved from earlier lathes with the addition of the turret, which is an indexable toolholder that allows multiple cutting operations to be performed, each with a different cutting tool, in easy, rapid succession, with no need for the operator to perform set-up tasks in between or to control the toolpath. The latter is due to the toolpath's being controlled by the machine, either in jig-like fashion, via the mechanical limits placed on it by the turret's slide and stops, or via digitally-directed servomechanisms for computer numerical control lathes.
Indexing in reference to motion is moving into a new position or location quickly and easily but also precisely. When indexing a machine part, its new location is known to within a few hundredths of a millimeter, or often even to within a few thousandths of a millimeter, despite the fact that no elaborate measuring or layout was needed to establish that location. In reference to multi-edge cutting inserts, indexing is the process of exposing a new cutting edge for use. Indexing is a necessary kind of motion in many areas of mechanical engineering and machining. An object that indexes, or can be indexed, is said to be indexable.
STEP-NC is a machine tool control language that extends the ISO 10303 STEP standards with the machining model in ISO 14649, adding geometric dimension and tolerance data for inspection, and the STEP PDM model for integration into the wider enterprise. The combined result has been standardized as ISO 10303-238.
In manufacturing, threading is the process of creating a screw thread. More screw threads are produced each year than any other machine element. There are many methods of generating threads, including subtractive methods ; deformative or transformative methods ; additive methods ; or combinations thereof.
A computer numerical control (CNC) router is a computer-controlled cutting machine which typically mounts a hand-held router as a spindle which is used for cutting various materials, such as wood, composites, metals, plastics, glass, and foams. CNC routers can perform the tasks of many carpentry shop machines such as the panel saw, the spindle moulder, and the boring machine. They can also cut joinery such as mortises and tenons.
Multiaxis machining is a manufacturing process that involves tools that move in 4 or more directions and are used to manufacture parts out of metal or other materials by milling away excess material, by water jet cutting or by laser cutting. This type of machining was originally performed mechanically on large complex machines. These machines operated on 4, 5, 6, and even 12 axes which were controlled individually via levers that rested on cam plates. The cam plates offered the ability to control the tooling device, the table in which the part is secured, as well as rotating the tooling or part within the machine. Due to the machines size and complexity it took extensive amounts of time to set them up for production. Once computer numerically controlled machining was introduced it provided a faster, more efficient method for machining complex parts.
LinuxCNC is a free, open-source Linux software system that implements numerical control capability using general purpose computers to control CNC machines. It's mainly intended to run on PC AMD x86-64 systems. Designed by various volunteer developers at linuxcnc.org, it is typically bundled as an ISO file with a modified version of Debian Linux which provides the required real-time kernel.
Okuma Corporation is a machine tool builder based in Ōguchi, Aichi Prefecture, Japan. It has global market share in CNC machine tools such as CNC lathes, machining centers, and turn-mill machining centers. The company also offers FA products and servomotors.
Milling is the process of machining using rotary cutters to remove material by advancing a cutter into a workpiece. This may be done by varying directions on one or several axes, cutter head speed, and pressure. Milling covers a wide variety of different operations and machines, on scales from small individual parts to large, heavy-duty gang milling operations. It is one of the most commonly used processes for machining custom parts to precise tolerances.
The history of numerical control (NC) began when the automation of machine tools first incorporated concepts of abstractly programmable logic, and it continues today with the ongoing evolution of computer numerical control (CNC) technology.
A canned cycle is a way of conveniently performing repetitive CNC machine operations. Canned cycles automate certain machining functions such as drilling, boring, threading, pocketing, etc... Canned cycles are so called because they allow a concise way to program a machine to produce a feature of a part. A canned cycle is also known as a fixed cycle. A canned cycle is usually permanently stored as a pre-program in the machine's controller and cannot be altered by the user.
A Post Processor is a unique "driver" specific to a CNC machine, robot or mechanism; some machines start at different locations or require extra movement between each operation, the Post-Processor works with the CAM software or off-line programming software to make sure the G-Code output or program is correct for a specific Trademark machine Control Cabinet CAM software uses geometry from a CAD model and converts it to G-code. The CAM software analyzes the CAD model and determines what tooling and toolpaths will be used to mill the desired features. Doing so requires a CAM post processor that generates the exact G-code dialect used by the machine Control Module that is being targeted. An instance of such a translation is often referred to as a "post". There will be a different “post” for each G-code dialect the CAM software supports. Post Processors, rather the “post” uses an intermediate format that captures the G-code commands in a dialect-independent form. Most CAM software accomplishes this with an intermediate format called "CL.Data."