First things first, the workflow of a typical CNC job:
Everything starts in a CAD (Computer-Aided Design) program: this is where you will create the 2D or 3D objects to be machined. CAD software packages are usually able to import 2D and 3D features from a variety of file formats, and the most common/useful ones for CNC are "vector" formats.
Once the object is designed, a CAM (Computer-Aided Manufacturing) module that is usually integrated in the CAD suite, is used to create toolpaths to cut the object out of a block of stock material (more on this later). Once all required toolpaths are created, the very last step in the CAM program is to generate one or several G-code files, containing instructions for the machine to move the cutter along these toolpaths.
Since CAM programs are usually not bound to any specific CNC machine, they make use of a specific post-processor to generate the correct G-code for a given machine.
If needed, a G-code viewer can be used to double-check the generated toolpaths, if the CAM tool does not have a toolpath preview feature. CAMotics is a popular (and free) option.
Finally the instructions from the generated G-code files must be sent to the machine to produce the required movements of the router to cut through the material. This requires a G-code sender, that goes through the G-code file line by line and sends the instructions to the machine, or more precisely to the machine's controller, via a communication link (USB on the Shapeoko).
The controller executes a piece of software that interprets incoming instructions, and translates them into specific movements of the X, Y, and Z motors. On the Shapeoko, this software is "GRBL", (pronounced "Gerbil"), an open source motion control software (see https://github.com/gnea/grbl)
It handles the detection of limit switches, and can manage a touch probe to help define and store the coordinates of the reference/starting point for the toolpaths.
The coordinate system is one of those things that can be a little confusing at first. The axis definitions themselves are straightforward:
X is the left–right axis, with values increasing from left to right.
Y is the front–back axis, with values increasing from front to back.
Z is what you would expect, vertical axis pointing up, so the "altitude" if you will.
The next question is, where is the origin? On a CNC like the Shapeoko, there is no mechanical feedback telling the machine where it is positioned in space at any given time, so the only thing it can do is control X/Y/Z movements relative to a given starting point.
The ZERO point (X0,Y0,Z0) is the point in space against which all movements described in a G-code file will be referenced.
This point is usually referenced somewhere on the stock material (e.g., a corner or the center of the top face), but it could be set anywhere in the 3D workspace. The G-code for a given job will use this reference, and perform movements relative to this local origin.
However, the machine also has a Home position, which is where it can go to reset its location: the Home position corresponds to somewhere where the machine will get a physical feedback that it has reached the position, and on the Shapeoko that's above the back right corner, where homing switches on the X,Y, and Z axis happen to be triggered.
Homing consists in telling the machine to move in the direction of positive X, positive Y and positive Z until it detects that each associated limit switch has triggered, and stop movement on the corresponding axis then. Once all three limits switches have been triggered, the machine is guaranteed to be in a known position (mechanically), i.e. Home.
If a G-code file is executed from an arbitrary Zero point, why does it matter where Home is? The trick is that the coordinates of the Zero point itself, are defined with respect to the Home position, and happen to be stored in the permanent memory in the controller. So when the machine is in an arbitrary position and is turned off, the next time it will be turned on, Homing allows to go back to this known absolute Zero point coordinates.
The next section gets into some details about how the different parts of a Shapeoko interact to get the job done.