CNC Programming Basics
Each program has a program number, that should be different from other program numbers
Each line of code in a CNC program is called a “Block”. It contains G and M codes in it.
The block cannot have two M-codes in it
The ending of a Block has a End-of-Block symbol and it is a semi-colon. (Example: G1X.5; )
The last programmed feed rate is the one that will be used on G1 lines of code
Any code inside ( ) does not get read by the CNC controller, thus they can be notes for the operator
The Order of a CNC Program
The Program Number
A Tool Change Call
Define a Tool Length Offset Number
Define a Work Coordinate System Number
Tool Path Code
Axis Zero Return
End of the Program