Controlling a 3D printer using G-code
Computer Numeric Control (CNC) is a method of controlling a machine from a computer or controller. Early CNC machines from the 1940s used punch tape and were used to crudely control machines of the time. Combining advanced computer systems with machines in the 1960s gave way to the CNC machine we know today.
3D printers are, in essence, a form of CNC machine. While CNC machines are subtractive as they chip away material to make parts, 3D printers are additive as they deposit material. G-code is the language that CNC machines and 3D printers use to communicate with their respective controllers.
In this section, we will explore G-code and use it to control our printer.
What is G-code?
So, what exactly is G-code? As mentioned, G-code is the language that 3D printers and CNC machines use for instructions. To get a more detailed understanding, let's look at how a computer communicates with a 3D printer.
Looking at Figure 2.1,...