Anyone who owns or is thinking about purchasing a CNC Router needs to learn some some G-code basics .  G-code is the computer language used to control the movement of a CNC.  The precise movement of the spindle along its 3 axes is calculated and programmed using a system of coordinates (Cartesian).

There are two coordinate systems, the right-hand, and the left-hand coordinate systems.  Hold up your right hand with your index finger sticking straight out like the barrel of a gun.  As you point the barrel away from you hold your middle finger at 90 degrees (pointing left).  Let your thumb stick straight up.  You have just created an illustration of the right-hand coordinate system.  Your index finger is the Y axis, your middle finger is the X axis and your thumb is the Z axis (illustration from CNC Cookbook).

When looking at a line of G-code, the coordinates are written out with the letter of the axis first followed by a number expressing a position in mm or inches.  For example, the machine home is expressed as X0Z0Y0 (it can also look like X0 Y0 Z0 with spaces added to make it easier to read). 

Two additional concepts.  The coordinates are either absolute or relative.  Absolute coordinates are measured from a fixed point, usually the zero point of the work piece.  Relative coordinates are determined by their relative to the position of the spindle as it moves through the tool path. 

The last concept is Planes.  A plane is a flat two-dimensional space bounded by two axes.  The spoilboard and the work piece mounted on the E3 will always be in the XY plane (G17 in gcode).  The spindle travels up and down of either the XZ plane or the YZ plane.


April 20, 2021 — Keith Havens