G-code is just like any other program language, you have program commands that are made up of addresses and values and rules (Syntax) by which you use them.
In the command G01 X1.0 Y0.0- The G, X and Y are addresses, the 01, 1.0 and 0.0 are the values.
In the G-code language the following are typically valid addresses:
A = Address of the rotational axis relative to X axis
B = Address of the rotational axis relative to Y axis
C = Address of the rotational axis relative to Z axis
D = Tool compensation address
E = Parameter value for canned cycles
F = Feedrate address
G = Preparatory function address
H = Tool compensation address
I = Circular interpolation center address for the X axis component
J = Circular interpolation center address for the Y axis component
K = Circular interpolation center address for the Z axis component
L = Parameter value for canned cycles
M = Auxiliary function address
N = Block Address
P = Parameter value for canned cycles
Q = Parameter value for canned cycles
R = Radius value address
S = Spindle speed address
T = Tool address
U = Secondary address for the X axis (typically incremental, but not always)
V = Secondary address for the Y axis (typically incremental, but not always)
W = Secondary address for the Z axis (typically incremental, but not always)
X = Axis address
Y = Axis address
Z = Axis address
CNC machine positioning is based upon the cartesian coordinate system.
Consider this as 3 flat planes 90° from each other that intersect at a common point. This common point is called the origin, (datum, zero point. or 0,0,0)
From this common point, consider a line that extends straight in both directions along each plane. Because this line goes in both directions, it goes both positive and negative.
For a handy, simplified reference, hold out your left hand in front of you....
Point your thumb up, your index finger straight out from you and your bird finger to your right. Curl your last two fingers to your palm.This is the left hand rule.
The thumb is representative of the Z+ axis direction
The index finger is representative of the Y+ axis direction
The bird finger is representative of the X+ Axis direction
The curled fingers are representative of the origin.
G-codes are called preparatory functions because they prepare (command) the control to actually do something relative to the coordinate system.
G-codes are divided into groups, more on that later
M-codes are auxiliary functions but they are always related to something external to movement about the coordinate system. (Turn spindle on, turn coolant on.. move about in the programs, changing control modes, etc, but nothing directly causal to machine movement about the coordinate system)
....time for work...