This document provides an introduction to macro programming for CNC machines. It defines macros as sub-programs that perform common, repetitive operations. Macros add flexibility to G-code programs through the use of additional macro statements like IF, WHILE, and variables. The document discusses enabling macro support through Parameter 57, useful G and M codes for macros, variables, limiting block lookahead using G103 P1, and provides an example parts counter macro.