Introduction into reasons and structure of G-Code - a language for controlling machines.
– CNC overview –
G-Code - a common language for many types of machines from CNC, to laser, to robot-manipulator, etc. It is established to create standardization - while different devices might need to be configured differently same set of instructions will do same outcome; abstraction - raises base level so you don’t have to do everything from scratch every time; protection - provides structure for many of most common dangers to be controlled (like boundary, speed limitations etc.); ease of use - common between devices, though might be slightly different based on capabilities and configurations; complex geometry simplification - huge geometry will easily overwhelm device if put all together into RAM, which is usually is too small to even handle large SD cards (not enough memory for addresses).
M-Code - firmware override commands
Types:
– CNC controller –
Parts:
Native steps - stable positions of stepper-motor. Micro-stepping - software based subdivisions (combine positive and negative signals to create fractional position). With modern control is fairly reliable but nonetheless is not as accurate as stepper with more resolution.
– Disassembled stepper-motor –
Benefit of these both is that they are both opensource. Both have many flavors - versions and variable functionality. Can be further edited through configurations.
Normally G-Code is generated (foe example, by slicer), but many tools (robot-manipulator, CNC, etc.) can show it so it’s important to at least approximately understand it.
F - speed
S - spindle speed
T - tool
It is possible to switch between relative or absolute coordinates by other commands. NB! Always double check - this is most common error.
Common process - prepare g-code file, store on SD-card, read on machine and execute. However, can be done directly by interacting with machines over USB over serial:
Suggestion: Play around with it and G-Code instructions side by side.
// TODO: results of experimentation