FEATURE
Basic CNC Structure
Basic Programming Terms: CNC Structure in Four Steps
CNC programs are organized as a hierarchy: characters form words, words form blocks, and blocks form a program.
1. Character
A character is the smallest unit in CNC programming. Characters include letters, digits from 0 through 9, and control-dependent symbols such as decimal points, parentheses, minus signs, and percentage signs.
2. Word
A word combines characters, typically an uppercase address letter followed by a numeric value. Words communicate information such as tool position, spindle speed, feed rate, preparatory commands, and miscellaneous machine functions.
- X2.5 may specify an X-axis position.
- F10.0 may specify a feed rate.
- S1200 may specify spindle speed.
The precise meaning and number format depend on the machine control and its active modes.
3. Block
A block, sometimes called a sequence block, contains one or more words that together describe a machining instruction or part of an operation. Each block normally appears on a separate program line and ends with an end-of-block marker recognized by the controller.
4. Program
A CNC program is an ordered collection of blocks used to machine a part. It commonly begins with a program identifier, proceeds through setup and machining operations in sequence, and finishes with a stop, reset, or program-end command appropriate to the controller.
Character → Word → Block → Program
Because CNC syntax and supported symbols vary between controls, programmers should verify every command against the machine builder’s programming manual before running a program.