Académique Documents
Professionnel Documents
Culture Documents
NC words:
NC words used in programming along with sequence are:
Block no. (N)
Preparatory word (G codes)
Coordinates (x, y, z)
Feed rate (F)
Cutting speed (S)
Tool selection (T)
Miscellaneous function (M)
• These words are not necessarily written in the same order as indicated above.
CNC Part Programming
(Programming Steps)
Two important steps:
Process Planning
Process plan is a detailed plan of steps involved
in machining (manufacturing) a given part: The
following are contents of process plan:
• M/C tool used
• Fixtures required
• Sequence of operations
• For each of operation, cutting tools &
process parameters required
Selection of m/c tool depends on the operation
required, accuracy requirement, m/c tool
capability & availability, cutting tools availability.
Process planning plays role in determining the
cost of part.
Example shows a typical process plan.
CNC Part Programming
(Programming Steps)
Axes selection:
The coordinate system provides means for defining
position of tool with respect to w/p.
• Each m/c has a fixed datum, usually on the left of
m/c. And thus all the tool positions are considered
positive from this reference.
• Using fixed datum in part programming create
complexity and involves extensive dimensional
calculations. Therefore, a floating datum is defined
for part programming.
CNC Part Programming
(Programming Steps)
• The determination of floating datum owes to choice
of programmer. He should select it in such a way
that the tool path calculations/length is minimum.
• If possible, keep all the part in positive quadrant so
that all the values are in plus. It helps to avoid
programming errors (Ref. Figs).
• The axes of floating coordinate system is matched
with that of m/c.
• In case of axi-symmetric part, the datum is chosen at
center of part.
Manual Part Programming Methods
• In past, a number of NC format for NC part programs were used such as
1. Fixed Sequence (for no entry, we enter 0 )
2. Tab sequential (for no entry, we enter tab key)
3. Word Address Format is being used in which each of info or data to be input in the form of
numerical digits is preceded by a word address in form of an English alphabet.
3. The word (G, F, N, M) basically is the address of register.
4. Here we don’t need to repeat feed/speed info (or the info we want to carry on in next
blocks) in each block.
5. Also we don’t need to follow fixed format, as each register has its address as A, B, G. So
their order is not as important as in fixed sequence format.
6. For example, N105 means that N is address for numerical data 105. So numerical
data 105 will be read by register named N.
Manual Part Programming Methods
(ISO standards for coding)
Many things have been standardized for NC part programming. All 26 letters of English
alphabets have been standardized and given meaning:
Manual Part Programming Methods
(ISO standards for coding)
• The program begins with beginning code %, which signifies the start of tape.
• Each block can have one or more of word addresses in a sequence. A typical ISO format
for block is shown below:
N5 G2 X53 Y30 Z30.. U V W ..I J K ..F5.. S4.. T4.. M2
This is typical sequence in which the word address should occur in block. However, not
necessary.
• If a word is not required to be written in a block, it is omitted.
• If a value need not change, the function/word will not be repeated in next block. The info
is automatically carried. For example,
N110 G01 X50 Y40 Z12 F200 S1500 T1103 M03*
N115 Y25*
• This programming format is mostly followed by m/c manufacturers. However, some
differ from this format. So, programming manual of m/c should be consulted.
Sub-programs: In most of the components, there are a number of repetitive features (e.g
patterns of holes, profiles etc). Instead of writing blocks for each of them repeatedly in the
program as per process plan, the facility exists for writing sub-programs for each feature
and entering them with labels at the end of main program.
In main program where these are required, they are called by appropriate block.
For example, M98 P1001– M98 is call for sub-program (also called sub-routine) 1001. The
number after P refer to the sub-program being called.
The sub-programs are ended with the word M99.
Manual Part Programming Methods
(Example 1)
Manual Part Programming Methods
(Program Number- Example 2)
X2.0 Y18.757
R18
Cutter Radius Offset calculations in Example 2
Manual Part Programming Methods
(Cutter Radius Compensation (G40-G42)
• In contouring operations, it becomes necessary to calculate the tool path for preparing
the program by offsetting the contour by an amount equal to radius of cutter.
• Ref. Fig., the tool path is offset from the actual profile need to be machined.
• If the tool radius changes, the new program needs to made.
• The additional work of making each time new program with change in tool radius could
be avoided if tool radius compensation is enforced. In such case, the program is written
at component profile and thus no change in program would be required. It is as the
program is written with zero radius.
Manual Part Programming Methods
(Cutter Radius Compensation (G40-G42)
• The preparatory functions G40-G42 are used for radius compensation and form one
group. These are modal and can be cancelled by other function of same group.
G40: Compensation off
G41: Used when the cutter is on the left of programmed path when looking in the direction
of tool movement. (i.e. the radius compensation is considered to the left of programmed
profile)
G42: Used when the cutter is on the right of programmed path when looking in the
direction of tool movement.
• The compensation as tool diameter is also given in some systems
• The tool radius entry is always +
• If the programmed path is determined for a particular size of cutter, the compensation
value would be + or – depending on whether the cutter used for machining is oversized
or undersized.
Manual Part Programming Methods
(Cutter Radius Compensation-Example 1)
Manual Part Programming Methods
(Cutter Radius Compensation-Example 2)
60
100
60