https://en.wikipedia.org/wiki/G-codeThe first implementation of high level numerical control programming language was developed at the MIT Servomechanisms Laboratory in the late 1950s. The main standardized version used in the United States was settled by the Electronic Industries Alliance in the early 1960s. During the 1970s through 1990s, many CNC machine tool builders attempted to overcome compatibility difficulties by standardizing on machine tool controllers built by Fanuc. Siemens was another market dominator in CNC controls, especially in Europe.
Numerical control (NC) is the automation of machine tools that are operated by abstractly programmed commands encoded on a storage medium, as opposed to controlled manually via handwheels or levers, or mechanically automated via cams alone. Most NC today is computer numerical control (CNC), in which computers play an integral part of the control. G-code is the common name for the most widely used numerical control (NC) programming language. There are other codes (Letter addresses which span the entire alphabet); the type codes can be thought of like registers in a computer. Some letter addresses are used only in milling or only in turning; most are used in both. Bold below are the letters seen most frequently throughout a program.
A Absolute or incremental position of A axis (rotational axis around X axis)
B Absolute or incremental position of B axis (rotational axis around Y axis)
C Absolute or incremental position of C axis (rotational axis around Z axis)
D Defines diameter or radial offset used for cutter compensation. D is used for depth of cut on lathes.
E Precision feedrate for threading on lathes
F Defines feed rate
G Address for preparatory commands
H Defines tool length offset; Incremental axis corresponding to C axis (e.g., on a turn-mill)
I Defines arc center in X axis for G02 or G03 arc commands. Also used as a parameter within some fixed cycles.
J Defines arc center in Y axis for G02 or G03 arc commands. Also used as a parameter within some fixed cycles.
K Defines arc center in Z axis for G02 or G03 arc commands. Also used as a parameter within some fixed cycles, equal to L address.
L Fixed cycle loop count; Specification of what register to edit using G10
M Miscellaneous function
N Line (block) number in program; System parameter number to be changed using G10
O Program name
P Serves as parameter address for various G and M codes
Q Peck increment in canned cycles
R Defines size of arc radius, or defines retract height in milling canned cycles
S Defines speed, either spindle speed or surface speed depending on mode
T Tool selection
U Incremental axis corresponding to X axis (typically only lathe group A controls) Also defines dwell time on some machines (instead of "P" or "X").
V Incremental axis corresponding to Y axis
W Incremental axis corresponding to Z axis (typically only lathe group A controls)
X Absolute or incremental position of X axis. Also defines dwell time on some machines (instead of "P" or "U").
Y Absolute or incremental position of Y axis
Z Absolute or incremental position of Z axis