G-code
G-code is a numerical control programming language consisting of sequential commands that specify machine movements, feed rates and tool functions.
Updated
G-code is a numerical control programming language consisting of sequential commands that specify machine movements, feed rates and tool functions. A line typically names a motion type, target coordinates and a speed, for example a linear move to a point at a given feed rate. The language originates in CNC machining and was adopted by additive manufacturing, where an extra axis value carries the extrusion amount.
In practice
On a construction printer, G-code is the output of either a slicer or a direct toolpath generator, and it is normal to read and edit it by hand when diagnosing a print. Useful things visible in the file include where the machine starts each layer, how the seam moves between layers, and where sharp corners force acceleration limits that a pumped material cannot follow. Material delivery is the main difference from desktop printing: pumps and long hoses respond with a delay, so start and stop commands are frequently offset in time relative to the motion. Dialects vary, and a file written for one machine should not be assumed to be safe on another.
Related terms
- Slicing — the process that commonly produces a G-code file.
- Toolpath — the geometric path that G-code encodes as motion commands.
- Print path continuity — keeping the path unbroken, which reduces start and stop artefacts in the code.
Frequently asked questions
- Do construction printers use standard G-code?
- Often, but not always in the same dialect. Many construction printers accept G-code, while others use a vendor-specific variant or a robot language such as RAPID or KRL on robotic arms. Commands controlling the pump, the mixer and any nozzle dosing are usually vendor extensions rather than standard codes.