NC Part Programming


NC part programming consists of planning and documenting the sequence of processing steps to be performed on an NC machine. The documentation portion of part programming involves the input medium used to transmit the program of instructions to the NC machine control unit.

Part programming can be accomplished using a variety of procedures ranging from highly manual to highly automated methods. The methods are:
(1) manual part programming
(2) computer-assisted part programming
(3) part programming using CAD/CAM
(4) manual data input

NC Coding System
The program of instruction is communicated to the machine tool using a coding system based on binary numbers. This NC coding system is the low-level machine language that can be understood by the MCU. When higher level languages are used, such as APT, the statements in the program are converted to this basic code.

EIA and ISO Coding Standards
In addition to number values, the NC coding system must also provide for alphabetical characters and other symbols. Eight binary digits are used to represent all of the characters required for NC part programming. There are two standard coding systems currently used in NC: (1) the Electronic Industry Association (EIA) and (2) the International Standards Organization (ISO). The Electronics Industry Association system is known as EIA RS-244-B. The ISO code was originally developed as the American Standard Code for Information Interchange (ASCII) and has been adopted by ISO as its NC standard.

How Instructions Are Formed?
A binary digit is called a bit. A character is a combination of bits representing a numerical digit (0-9), an alphabetical letter (A-Z), or symbol. Out of a sequence of characters, a word is formed. A word specifies a detail about the operation, such as x-position, y-position, feed rate, or spindle speed. Out of a collection of words, a block is formed. A block is one complete NC instruction. It specifies the destination for the move, the speed and feed for the cutting operation, and other commands that determine explicitly what the machine tool will do. For example, an instruction block for a two-axis NC milling machine would likely include the x- and y-coordinates to which the machine table should be moved, the type of motion to be performed (linear or circular interpolation), the rotational speed of the milling cutter, and the feed rate at which the milling operation should be performed. Instruction blocks are separated by an end-of-block (EOB) symbol.

The essential information in a part program is conveyed to the MCU by means of words that specify coordinates, feeds and speeds, tooling, and other commands necessary to operate the machine tool. Given the variety of machine tool types and the many different companies that build NC machine tools and MCUs, it is no surprise that several different formats have been developed over the years to specify words within an instruction block. These are often referred to as tape formats or block formats.

NC words
By convention, the words in a block are given in the order:
SEQUENCE NUMBER (N code): This is used to identify the block within an NC program and provides a means by which NC commands may be rapidly located.
PREPARATORY WORD (G code): This word is used to prepare the controller for instructions that are to follow. For example, the word g02 is used to prepare the NC controller unit for circular interpolation along an arc in the clockwise direction. The preparatory word is needed so that the controller can correctly interpret the data that follow it in the block.
COORDINATES (x-, y-, and z-words): These give the coordinate positions of the tool. In a two-axis system, only two of the words would be used. In a four- or five-axis machine, additional a-words and/or b-words would specify the angular positions.
FEED RATE (F code): This specifies the feed in machining operation. Units are inches per minute ipm by convention.

CUTTING SPEED (S code): This specifies the cutting speed of the process, the rate at which the spindle rotates.
TOOL SELECTION (T code): This code would be needed only for machines with a tool turret or automatic tool changer. The t-word specifies which tool is to be used in the operation.
MISCELLANEOUS FUNCTION (M code): The M code is used to specify certain miscellaneous or auxiliary functions, which may be available on the machine tool. Of course, the machine must possess the function that is being called. An example would be m03 to start the spindle rotation. The miscellaneous function is the last word in the block. To identify the end of the instruction, an end-of-block EOB symbol is punched on the tape.