G-code is a programming language used to control CNC machine tools such as milling machines, lathes, and 3D printers. It enables these machines to execute precise instructions to manufacture mechanical parts with high accuracy.
G-code is also known as ISO code because it is based on the ISO 6983 standard. It is widely used in the manufacturing industry for programming CNC machine tools, which can reduce errors and increase production efficiency compared with manual manufacturing.
It is a sequential programming language, meaning it reads instructions in the order in which they were written. Each instruction is preceded by an instruction letter (or G-code) that tells the machine what action to perform. For example, the g00 code tells the machine to move at maximum speed to a given point, while the g01 code tells the machine to move at a specified speed along a linear path.
G-code is generally written as a text file that can be read and edited with a text editor or computer-aided manufacturing (CAM) software. This file provides instructions to the machine tool to guide the movement of tools and workpieces.
Under the “ISO code” designation, there are also M, F, and S codes. These are used respectively to control machine functions (for example, automatic tool change), feed rate, and spindle speed. Combining these codes results in programs capable of operating a milling machine fully automatically throughout a manufacturing process.
ISO code is therefore a simple yet powerful programming language that enables precise and efficient control of machine tools. It is a standardized language, recognized worldwide and compatible with most CNC machines.