G-code is a programming language used to control computerised machines such as 3D printers, CNC mills, laser cutters, and plotters.
G-code (short for Geometric code) consists of simple instructions that tell a machine what actions to perform and where to move, often line-by-line.
Each line is a command with:
A letter (like G, M, X, Y, Z, F)
A number that modifies the command
Example:
This line tells the machine to move in a straight line (G1) to coordinates X=10, Y=5, Z=–1.0 at a feedrate of 1500 units/min.
| Command | Meaning |
|---|---|
G0 |
Rapid movement (no cutting) |
G1 |
Controlled movement (with tool) |
M3 |
Start spindle (CNC) |
M5 |
Stop spindle |
G28 |
Return to home position |
CNC milling: Carving materials like wood, metal, or foam
3D printing: Instructing extrusion, bed temp, layer height, etc.
Laser cutting: Controlling beam power, speed, and path
Pen/vinyl plotters: Drawing precise paths or patterns
G-code serves as a translational interface between abstract design (e.g., SVG) and material realisation, embodying your interest in the seams between computational instruction and material execution.
← Back