3D Printing with MatterControl by Joan Horvath & Rich Cameron

3D Printing with MatterControl by Joan Horvath & Rich Cameron

Author:Joan Horvath & Rich Cameron
Language: eng
Format: epub
Publisher: Apress, Berkeley, CA


Understanding G-code

G-code is a very old programming language originally designed to control machine tools with a computer. Originating in the 1950s and 1960s, it has survived this long because of its flexibility and ability to run with minimal computing power. G-code is very low-level and is typically written such that all the commands are interpreted one at a time sequentially. Typical G-code functions include commanding an extruder to heat up to a particular temperature, instructing the printer to pause until an extruder reaches a certain temperature, moving the extruder to some (x,y,z) position, and conducting similar activities.

G-code for machine tools evolved gradually, with different dialects for each tool manufacturer. A standard of sorts called RS274D stabilized in the mid-1980s. Because the computer numerically controlled (CNC) market was pretty stable when the first low-cost 3D printers came along, a lot of the early users borrowed firmware and concepts to program those machines, and so a G-code dialect for 3D printers developed.

Each line of G-code commands the printer to do some small task or to set some parameter to a value that will be used for a task later on. For example, the snippet of code in the example that follows first sets the units that the firmware will use for calculation to millimeters (G21). It then tells the firmware to use absolute, not relative, coordinates (G90) and then commands the printer to move to position (3.000, 8.111, 4.444) while extruding filament such that 0.1234 mm of filament will have extruded when the command is completed (G1 X3.000 Y8.111 Z4.444 E0.1234). The firmware interpolates the movements required to get from one absolute position to the next and similarly determines how to feed the filament to extrude the requested amount before the next step. Millimeters of filament moved is currently the most common unit for the E values; but this may change to a volume measurement by the time you read this book.

G21

G90

G1 X3.000 Y8.111 Z4.444 E0.1234



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.