CNC Part Programming Introduction
CNC Part Programming Introduction
● In a CNC machine, there are basically two origins for the Cartesian
coordinate systems:
● Machine Home (Machine Zero) – a location set once by the machine
manufacturer.
● Part Origin (Part Zero) – a location determined by the NC part
programmer.
Tool Positioning Modes
● Incremental Positioning – delta dimensioning, the CNC machines locate
each new tool position by referencing the last tool position.
● Absolute Positioning – datum dimensioning, the CNC machines locate each
new tool position by referencing a fixed origin.
● Mixed (incremental & absolute).
Incremental Positioning
Absolute Positioning
Source: https://howtomechatronics.com/tutorials/g-code-explained-list-of-most-important-g-code-
commands/
CNC Machine Co-ordinate System
● In a CNC machine, there are basically two origins for the Cartesian
coordinate systems:
● Machine Home (Machine Zero) – a location set once by the machine
manufacturer.
● Part Origin (Part Zero) – a location determined by the NC part
programmer.
● Intermediate Origin
Word Address Programming
G code categories:
● Modal: the G code specification will remain in effect for all subsequent
blocks unless replaced by another associated modal G code.
● Nonmodal: the G code specification will only affect the block in which it
appears.
Ex: N0010 G91G01X1.0F10.0
N0020 X2.0 G91, G01, G90 and
N0030 Y2.0 G00 are modal
N0040 G90G00Y0
N0050 G28 G28 is non-modal
● X, Y, Z, … – dimension words, used to specify the movement of the
programming axes (Cartesian coordinate system).
Word Address Programming
● F – feed rate, the rate at which the spindle moves along a programming
axis.
● F is modal.
● English system: in/min
● Metric system: mm/min
Ex: F10. – a feedrate of 10 in/min,
F10 – a feedrate of 0.001 in/min (Fanuc controllers).
● S – spindle speed, the speed at which the spindle rotates (rpm).
● Spindle rotation should be specified prior to axis movement.
● M – miscellaneous machine function, used to specify machine functions
other than dimensional or axis movements.
Ex: M03 (spindle on, clockwise),
M05 (spindle off),
M08 (coolant on),
M09 (coolant off),
M30 (program end)
Word Address Programming