You are on page 1of 45

CNC

Pro gram ming


Tech niques
An In sider's Guide to Ef fec tive Meth ods and Ap pli ca tions
First Edi tion
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com
CNC
Pro gram ming
Tech niques
An In sider's Guide to Ef fec tive Meth ods and Ap pli ca tions
Pe ter Smid
In dus trial Press, Inc.
200 Mad i son Av e nue
New York, New York 10016-4078, USA
http://www.industrialpress.com
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com
<<PAGE TO BE REPLACED>> Li brary of Con gress Cat a log ing-in-Pub li ca tion Data
Smid, Pe ter
CNC Pro gram ming Techniques: xxx/
Pe ter Smid.
p. cm.
ISBN 0-8311-3158-6
1. Ma chine-tools--Nu mer i cal Con trol--Pro gram ming--Hand books, man u als, etc.,..I.
Ti tle.
TJ1189 .S592 2000
621.9'023--dc21
00-023974
First Edi tion
CNC Pro gram ming Techniques
In dus trial Press Inc.
200 Mad i son Av e nue
New York, NY 10016-4078
Ed i tor: John Carleo
Cover De sign: Janet Romano
Copy right 2005. Printed in the United States of Amer ica.
All Rights Re served.
This book or parts thereof may not be re pro duced, stored in a re trieval
sys tem, or trans mit ted in any form with out the per mis sion of the pub lish ers.
1 2 3 4 5 6 7 8 9 10
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com
Acknowledgments
To
John Carleo
Janet Romano
and Pat rick Hansard
with out you, this book would not hap pen
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com
About the Au thor
Pe ter Smid is a pro fes sional con sul tant, ed u ca tor and speaker, with many years of prac ti cal,
hands-on ex pe ri ence, in the in dus trial and ed u ca tional fields. Dur ing his ca reer, he has gath ered an
ex ten sive ex pe ri ence with CNC and CAD/CAM ap pli ca tions on all lev els. He con sults to man u fac -
tur ing in dus try and ed u ca tional in sti tu tions on prac ti cal use of Com put er ized Nu mer i cal Con trol tech -
nol ogy, part pro gram ming, CAD/CAM, ad vanced ma chin ing, tool ing, setup, and many other re lated
fields. His com pre hen sive in dus trial back ground in CNC pro gram ming, ma chin ing and com pany ori -
ented train ing has as sisted sev eral hun dred com pa nies to ben e fit from his wide-rang ing knowl edge.
Mr. Smids long time as so ci a tion with ad vanced man u fac tur ing com pa nies and CNC ma chin ery
ven dors, as well as his af fil i a tion with a num ber of Com mu nity and Tech ni cal Col lege in dus trial tech -
nol ogy pro grams and ma chine shop skills train ing, have en abled him to broaden his pro fes sional and
con sult ing skills in the ar eas of CNC and CAD/CAM train ing, com puter ap pli ca tions and needs anal -
y sis, soft ware eval u a tion, sys tem bench mark ing, pro gram ming, hard ware se lec tion, soft ware cus -
tom iz ation, and op er a tions man a ge ment.
Over the years, Mr. Smid has de vel oped and de liv ered hun dreds of cus tom ized ed u ca tional pro -
grams to thou sands of in struc tors and stu dents at col leges and uni ver si ties across United States, Can -
ada and Eu rope, as well as to a large num ber of man u fac tur ing com pa nies and pri vate sec tor or ga ni -
za tions and in di vid u als.
He has ac tively par tic i pated in many in dus trial trade shows, con fer ences, work shops and var i ous
sem i nars, in clud ing sub mis sion of pa pers, de liv er ing pre sen ta tions and a num ber of speak ing en gage -
ments to pro fes sional or ga ni za tions. He is also the au thor of ar ti cles, monthly mag a zine col umns, and
many in-house pub li ca tions on the sub ject of CNC and CAD/CAM. Dur ing his many years as a pro -
fes sional in the CNC in dus trial and ed u ca tional field, he has de vel oped tens of thou sands of pages of
high qual ity train ing ma te ri als.
Pe ter Smid is also the au thor of
CNC Pro gram ming Hand book, A Com pre hen sive Guide to CNC Pro gram ming
Fanuc CNC Cus tom Mac ros: Prac ti cal Re sources for Fanuc Cus tom Macro B Us ers
Both hard cover books have been pub lished by In dus trial Press. Inc.
The au thor al ways wel comes com ments, sug ges tions and other in put from ed u ca tors, stu dents
and in dus trial us ers.
You can send e-mail to the au thor from the CNC Pro gram ming Tech niques page at
www.industrialpress.com
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com
Preface
I would like to ex press my most sin cere thanks to all programmers, ma chin ists, op er a tors, en gi -
neers, stu dents and many other read ers and us ers who made my two pre vi ous books - also CNC ori -
ented - such a great suc cess. Both were pub lished by In dus trial Press, Inc. (New York, NY, USA):

CNC Pro gram ming Hand book, Sec ond Edi tion with CD-ROM
A Com pre hen sive Guide to CNC Pro gram ming
ISBN: (0-8311-) 3158-6
and

Fanuc CNC Cus tom Mac ros, with CD-ROM


Prac ti cal Re sources for Fanuc Cus tom Macro B Us ers
ISBN: (0-8311-) 3157-8
This third hand book also re lates to the sub ject of CNC pro gram ming, this time from a some what
dif fer ent an gle. First, there sev eral pro gram ming sub jects that are vir tu ally im pos si ble to find any -
where else, for ex am ple, how to pro gram cams or ta pered end mills. Other, more com mon, sub jects
are cov ered in a great depth, such as the cov er age of cut ter ra dius off set or thread mill ing.
As in my pre vi ous pub li ca tions, I have in cluded many over all and de tailed draw ings, to help vi su al -
ize the sub ject or pro ce dures cov ered. Where ap pli ca ble, a com plete pro gram ming ex am ple is pro -
vided, or - at least the most sig nif i cant part is shown.
In view of the re cent, and rather sig nif i cant, emer gence of met ric sys tem in many North Amer i can
in dus tries, par tic u larly in the USA, I have fo cused on more ex am ples pre sented in met ric units than
those in im pe rial units. Work ing on the prem ise that a pro fes sional CNC pro gram mer should have no
prob lem work ing with ei ther units se lec tion (af ter all, num ber are num bers), many ex am ples in this
hand book em pha size the met ric sys tem. For bal ance, a sig nif i cant num ber of ex am ples us ing im pe rial
units are also in cluded. Speak ing of im pe rial units - in my pre vi ous books, I had used the term Eng -
lish units in stead. It may seems friv o lous, but the fact is that mod ern Great Brit ain is now a met ric
coun try and the so called Eng lish units are the thing of the past - of the im pe rial era in Brit ish his tory.
I also feel that I should men tion the re la tion ship of this book to the CNC Pro gram ming Hand book.
In terms of fo cus, these are very dif fer ent publications. CNC Pro gram ming Tech niques is a book that
does not re place my pre vi ous books, but com ple ments them in a spe cial way. In terms of sub jects
cov ered, there are mi nor sim i lar i ties in some chapters, but the cov er age of each sub ject is fresh, and
with much more de tail provided. At the end of the book, I had in cluded ref er ences to sub jects cov ered
in the CNC Pro gram ming Hand book. My feel ing was that those read ers who may need some ad di -
tional back ground will ben e fit from these ref er ences. On the other hand, those, who do not need the
back ground can safely ig nore those few pages and ex plore the sub jects cov ered in this book only.
I sin cerely hope that this book will help you be come even a better CNC pro gram mer (or even a
better CNC Operator) by un der stand ing not just the 'hows' but also the 'whys' of many pro gram ming
tech niques. Thanks you for your con tin u ing in ter est.
Pe ter Smid
November 2005
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com
TABLE OF CONTENTS
1 - PART PROGRAM DEVELOPMENT 1
Pro gram De vel op ment Draw ing 1
Draw ing Eval u a tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Ma te rial and Stock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Part Setup 3
Part Reference Point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Part Ori en ta tion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Se lect ing Part Zero . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Tool ing Se lec tion 4
Identifying Ma chin ing Op er a tions . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Face Milling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Con tour Mill ing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Cir cu lar Pocket Mill ing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Slot Mill ing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Spot Drill ing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Drill ing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Tap ping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Sum mary of Tools Used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Ma chin ing Data 10
Spin dle Speed. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Cut ting Feedrate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Tool ing Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
De tails of Op er a tions 11
Tool 1 - Face Mill ing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Tool 2 - Out side Con tour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Tool 2 - Cir cu lar Pocket . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Tool 3 - Slot Mill ing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Tool 4 - Spot Drill ing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Tool 5 - Drill ing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Tool 6 - Tap ping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Com plete Pro gram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2 - CALCULATING CONTOUR POINTS 23
Tools and Knowl edge 23
Math e mat i cal Knowledge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Or ga nized Ap proach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Pro cess of Cal cu lat ing XY Coordinates 25
Step 1 - Es tab lish the Main Contour Points . . . . . . . . . . . . . . . . . . . . . . 26
Step 2 - Fill-in the Co or di nate Sheet . . . . . . . . . . . . . . . . . . . . . . . . . 26
Step 3 - Iden tify Calculation Zones. . . . . . . . . . . . . . . . . . . . . . . . . . 27
Step 4 - Helpful Ideas for Calculations . . . . . . . . . . . . . . . . . . . . . . . . 27
Step 5 - Cal cu la tions for Zone 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Step 6 - Cal cu la tions for Zone 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Up dat ing Co or di nate Sheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Writ ing the CNC Pro gram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
ix
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com
3 - FORMULAS FOR CONTOURING 33
Con tour Point Between Two Lines (Lathe) 33
Con tour Point Between Line and Arc 34
In ter sect ing Con tour Point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Tan gent Con tour Point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Cal cu lat ing the Sharp Point 39
Con tour Point Between Two Arcs 40
In ter sect ing Arcs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Tan gent Arcs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
4 - USING CUTTER RADIUS OFFSET 43
Gen eral Con cepts 43
Ben e fits Of Cut ter Radius Off set. . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Con trol ling Cut ter Ra dius . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Ra dius Off set Com mands 45
Com mands G40-G41-G42 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Us ing the D-off set Number. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Ba sic Programming Tech niques 46
Cut ter Radius Ac ti va tion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Cut ter Radius Ap pli ca tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Cut ter Radius Can cel la tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
D-off set Stored Amount 47
Equi dis tant Centerline - G40 Mode . . . . . . . . . . . . . . . . . . . . . . . . . 48
Equi dis tant Cen ter line - G41/G42 Mode. . . . . . . . . . . . . . . . . . . . . . . . 48
Draw ing Di men sions - G40 Mode . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Draw ing Di men sions - G41/G42 Mode . . . . . . . . . . . . . . . . . . . . . . . . 48
Ra dius vs Di am e ter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Con tour Lead-In and Lead-Out 49
Methods For Lead-In - Linear Motion. . . . . . . . . . . . . . . . . . . . . . . . . 49
Meth ods For Lead-In - Arc Motion . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Meth ods For Lead-Out - Lin ear Mo tion . . . . . . . . . . . . . . . . . . . . . . . . 53
Meth ods For Lead-Out - Arc Mo tion . . . . . . . . . . . . . . . . . . . . . . . . . 53
Program Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
In ter nal Con tours 54
Linear Slot Machining. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Cir cu lar Slot Ma chin ing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Fin ish ing Internal Contour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Main tain ing Di men sional Sizes 58
Ba sic Rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Han dling Di men sional Tol er ances . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Handling Cutter Radius Offset Er rors 60
Com mon Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Offset Programmed Too Late or Too Early . . . . . . . . . . . . . . . . . . . . . . 61
Offset Start or End on an Arc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Tool Nose Ra dius Off set 62
Com mand Point and Ra dius Center . . . . . . . . . . . . . . . . . . . . . . . . . 62
Tool Tip Orientation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Com mon Tool Nose Radius Er rors. . . . . . . . . . . . . . . . . . . . . . . . . . 64
x Table of Contents
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com
5 - PART REVERSAL IN MILLING 67
Pro ject De scrip tion 67
Ma te rial and Setup Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Cutting Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Ma te rial Re moval 68
Ma chin ing Pro cess 69
Clamp ing 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Clamp ing 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Pro gram Zero Se lec tion 70
First Clamp ing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Sec ond Clamp ing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Pro gram ming Methods 72
Tool Length Settings 72
First Clamp ing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Sec ond Clamp ing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Using the WORK OFFSET Method - G54-G55 74
Com mon Toolpath 76
Pro gram List ing - WORK OFFSETS G54-G55 77
Pro gram List ing - WORK OFFSETS G54-G55 - with Subprograms 79
Us ing the LO CAL CO OR DI NATES Method - G52 81
Pro gram Listing - LOCAL COORDINATE SYSTEM G52 83
Us ing the DA TUM SHIFT Method - G10 85
Pro gram List ing - DATUM SHIFT G10 86
Summary 88
6 - USING TAPERED END MILLS 89
Types of Ta pered End Mills 89
Tool Ma te rial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Range of Taper An gles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Flat Tip Ta pered End Mills . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Ball Tip Tapered End Mills . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Effective Diameter Cal cu la tion 91
Flat Tip. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Stock Re moval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Ball Tip with Spec i fied Ra dius . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Flat Tip with Added Blend Ra dius . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Ta pered Holes 96
7 - SPECIAL PURPOSE G-CODES 97
Single Direction Positioning - G60 97
Spe cial Cut ting Modes 98
Ex act Stop Check G09 - G61 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Au to matic Cor ner Over ride - G62 . . . . . . . . . . . . . . . . . . . . . . . . . 100
Tap ping Mode - G63 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Nor mal Cut ting Mode - G64 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Stored Stroke Lim its Def i ni tions - G22 - G23 101
Spin dle Fluc tu a tion G25 - G26 103
Table of Contents
xi
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com
Ma chine Zero Com mands - G27- G28 - G29 - G30 104
Primary Ma chine Zero Re turn - G28. . . . . . . . . . . . . . . . . . . . . . . . . 104
Re turn from Ma chine Zero - G29 . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Ma chine Zero Re turn Po si tion Check - G27 . . . . . . . . . . . . . . . . . . . . . . 106
Sec ond ary Ma chine Zero Re turn - G30 . . . . . . . . . . . . . . . . . . . . . . . 108
Position Reg is ter - G92/G50 108
G92 Position Register for Mill ing . . . . . . . . . . . . . . . . . . . . . . . . . . 109
G50 Position Register for Turn ing . . . . . . . . . . . . . . . . . . . . . . . . . 111
Tool Change Po si tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Con ver sion of G50 to Ge om e try Off set . . . . . . . . . . . . . . . . . . . . . . . 117
Skip Com mand - G31 118
Other Seldom Used G-codes 119
Tool Length Off set Neg a tive - G44 . . . . . . . . . . . . . . . . . . . . . . . . . 119
Tool Length Off set Can cel - G49 . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Con clu sion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
8 - TOOL LENGTH OFFSET CHANGE 123
Tool Length Off set 123
Offset Ad just ment 124
Prac ti cal Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Pro gram ming Method 1 - No Offset Adjustment. . . . . . . . . . . . . . . . . . . . 125
Pro gram ming Method 2 - With Offset Adjustment . . . . . . . . . . . . . . . . . . . 125
Pro gram ming Method 3 - Advanced Macro Method . . . . . . . . . . . . . . . . . . 126
Offset Ad just ment - Setup for Two Parts 128
Method 1 - One Work Offset + One Length Off set . . . . . . . . . . . . . . . . . . . 128
Method 2 - Two Work Off sets + One Length Off set . . . . . . . . . . . . . . . . . . 129
Method 3 - Two Work Off sets + Two Length Off sets . . . . . . . . . . . . . . . . . . 130
9 - BLOCK SKIP APPLICATIONS 131
Gen eral Applications 131
Sim i lar Parts Applications 132
Pro gram ming a Trial Cut 134
Trial Cut for Mill ing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Trial Cut for Turn ing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
Ir reg u lar Stock Re moval 137
Vari able Stock in Mill ing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Vari able Stock in Turn ing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
Sum mary of Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
Block Skip Within A Block 140
Con flict ing Words . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
One Pro gram - Two Ma te ri als . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Num bered Block Skip Func tions 142
10 - STANDARD AND RIGID TAPPING 143
Stan dard Tap ping Method 143
Ba sic Principles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
Why Underfeed? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
Feed-In Slower - Feed-Out Faster. . . . . . . . . . . . . . . . . . . . . . . . . . 144
xii Table of Contents
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com
Rigid Tap ping Method 146
Ba sic Prin ci ples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
Ben e fits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
Pos si ble Prob lems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
Pro gram ming Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
11 - POLAR COORDINATES 149
Def i ni tion and G-codes 149
Po lar Co or di nates and Planes . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
G15 - G16 Po lar Co or di nates . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Pro gram ming For mat 151
Toolpath Direction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Ap pli ca tions in Planes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
12 - SUBPROGRAM DEVELOPMENT 155
Def i ni tion and Usage 155
Draw ing Evaluation 156
Subprogram Plan ning 156
Depth Con trol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Width of Cut Con trol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Cut ting Tool Se lec tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
De vel op ing the Subprogram 158
Method 1 - Full Width and Full Depth . . . . . . . . . . . . . . . . . . . . . . . . 158
Method 2 - Full Width and Divided Depth . . . . . . . . . . . . . . . . . . . . . . 159
Method 3 - Smaller Width and Full Depth . . . . . . . . . . . . . . . . . . . . . . 160
Round Pocket Subprogram 162
Sin gle Depth Pocket with Stepovers . . . . . . . . . . . . . . . . . . . . . . . . 162
Multidepth Pocket with Stepovers . . . . . . . . . . . . . . . . . . . . . . . . . 164
Rough and Fin ish Cuts with a Subprogram 165
One Toolpath for Two Cuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
Lead-In and Lead-Out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
Common Con tour Toolpath . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
Main Pro gram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
13 - TURNING AND BORING IN DEPTH 169
Pro gram Zero Se lec tion 169
Corner Ra dius and Back Angle Se lec tion 170
Cut ter Ra dius Off set 171
Imag i nary Tool Point. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
Stock Al low ance 172
Con tour Shape . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
Cut ting Tool Used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
Stock Al low ance in X and Z axes . . . . . . . . . . . . . . . . . . . . . . . . . . 173
Grind ing Al low ance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
Table of Contents
xiii
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com
Tool Ap proach Tech niques - Lead-In 176
Ap proach ing the Front Face. . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
Ap proach ing a Di am e ter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
Ap proach ing a Chamfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
Ap proach ing a Radius . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
Ap proaches to Avoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Tool Re tract Tech niques - Lead-Out 179
Re tract from a Face . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Re tract from a Diameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
Re tract from a Chamfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
Re tract from a Radius . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
Re tracts to Avoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
One Job - Two Op er a tions 182
About Jaws . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
Sin gle Setup - Two Chuckings . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
Two Set ups - Two Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
Multi Cut Fac ing 184
Width of Cut Dis tri bu tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
Breaking Corners 185
Di rec tion Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
Us ing Tailstock 186
Types of Tailstock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
Pro gram ming a Tailstock with a Bar Stopper . . . . . . . . . . . . . . . . . . . . . 187
Us ing 45-de gree Tool 189
Ma chin ing Thin Stock 192
Ad just ing Chuck Pres sure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
Us ing an In ner Plug / Outer Ring . . . . . . . . . . . . . . . . . . . . . . . . . . 192
Us ing Spe cial Split Jaws . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
G70/G71/G72 Cy cle Meth ods 193
Pro gram ming For mats - G71 . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
Pro gram ming For mats - G72 . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
G70 - Fin ish ing Cy cle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
G71 and G72 Com pared . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
Pro gram ming Un der cuts 198
Hard Turn ing 198
14 - PROGRAMMING TAPERS 199
What is a Taper? 199
Taper Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Taper per Foot 200
Taper Ratios 203
Taper Defined as Per centage 205
Taper Angle De fined in D-M-S 206
Taper Length and An gle 206
Cham fers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
45 Cham fer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
Start Cham fer with a Clearance . . . . . . . . . . . . . . . . . . . . . . . . . . 209
End Cham fer with a Clearance . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
Other Cham fers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
xiv Table of Contents
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com
Ta pers with Leads 211
Taper with a Lead Chamfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
Taper with a Lead Fil let. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
15 - TECHNIQUES FOR GROOVING 215
Tool ing for Grooves 215
Cutting Width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
Cut ting Depth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
Groove Lo ca tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
Set ting the Com mand Point . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
Plunge and Re tract Method 217
G75 Cy cle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
Grooving for Precision 218
Ma chin ing Pro ce dure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
Pro gram ming Pro ce dure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
Deep Groov ing 221
Grooves with Ta pers - O-Ring Grooves 222
Grooves with Tapers - V-Pul ley Grooves 225
In sert Se lec tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
Depth Cal cu la tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
Tool Setup and Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
16 - TECHNIQUES FOR THREADING 227
Types of Thread Forms 227
UN - Uni fied Na tional and Metric . . . . . . . . . . . . . . . . . . . . . . . . . . 227
Other Thread Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
Thread Depth Cal cu la tion 229
Infeed Meth ods 230
Tool Mo tions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
Cut ting Con di tions 231
Ac cel er a tion and De cel er a tion . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
Cut ting Depth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
Hand of Thread 232
Ex ter nal Thread ing - Right Hand Thread . . . . . . . . . . . . . . . . . . . . . . . 232
Ex ter nal Thread ing - Left Hand Thread . . . . . . . . . . . . . . . . . . . . . . . 233
In ter nal Thread ing - Right Hand Thread . . . . . . . . . . . . . . . . . . . . . . . 233
In ter nal Thread ing - Left Hand Thread . . . . . . . . . . . . . . . . . . . . . . . . 233
Sample Thread Evaluation 234
Ini tial Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
Cut ting Con di tions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
Num ber of Threading Passes . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
Dis tri bu tion of Depth Cuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
G32 Threading Method 236
Ra dial Infeed Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
Flank Infeed Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
Tap ping with G32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
G92 Threading Method 240
G76 Threading Method 241
Pro gram ming For mat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
Table of Contents
xv
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com
17 - RESTRICTIONS IN THREADING 243
Thread Pro gram ming Ba sics 243
Thread ing Feedrate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
Stan dard Example 244
Fi nal Threading Pro gram - Single Start . . . . . . . . . . . . . . . . . . . . . . . 245
Spe cial Example 245
Fi nal Threading Pro gram - Multi Start . . . . . . . . . . . . . . . . . . . . . . . . 246
Slow Spindle Speed 247
Met ric Ap pli ca tions 247
Long Thread Programming 248
De fin ing a Long Thread . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
Lead Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
Number of Dec i mal Places . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
18 - PRACTICAL THREAD MILLING 251
Thread Mill ing - Gen eral 251
He li cal In ter po la tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
Is He li cal In ter po la tion Avail able ? . . . . . . . . . . . . . . . . . . . . . . . . . 252
Ben e fits of Thread Mill ing 252
Selecting Tools 253
Ini tial Fac tors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
Types of Thread Mill ing Cutters . . . . . . . . . . . . . . . . . . . . . . . . . . 254
Ac cu racy Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
Thread Mill Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
Cut ting Di rec tion 255
Ex ter nal and In ter nal Thread Milling . . . . . . . . . . . . . . . . . . . . . . . . 255
Climb Mill ing and Con ven tional Thread Mill ing . . . . . . . . . . . . . . . . . . . . 255
Right Hand and Left Hand Thread Milling . . . . . . . . . . . . . . . . . . . . . . 255
Ex ter nal Thread Mill ing Il lus trated . . . . . . . . . . . . . . . . . . . . . . . . . 256
Internal Thread Mill ing Il lus trated. . . . . . . . . . . . . . . . . . . . . . . . . . 257
He lix - Helical Curve 258
Programming External Threads 260
Tool ing Se lec tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
Cut ting Con di tions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
Lead-In and Lead-Out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
Cut ter Ra dius Off set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
Pro gram De vel op ment - Ex ter nal Thread . . . . . . . . . . . . . . . . . . . . . . 262
Pro gram ming In ter nal Threads 266
Tool ing Se lec tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
Cut ting Con di tions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
Lead-In and Lead-Out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
Cut ter Ra dius Offset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
Pro gram De vel op ment - Internal Thread . . . . . . . . . . . . . . . . . . . . . . . 268
Pipe Thread Mill ing 271
Thread Mill ing Soft ware 272
xvi Table of Contents
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com
19 - KNURLING ON CNC LATHES 273
Knurl ing Op er a tions 273
Tool ing Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
Knurl ing Pitch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
Programming and Ma chin ing Tech niques 275
Tool Mo tions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
Depth and Feedrate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
Trou ble shoot ing 276
20 - FOUR-AXIS LATHES 277
Gen eral Setup 277
Tool Tip Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
Pro gram ming Method 278
Spin dle Speed and Feedrate . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
M-Func tions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
Synchronization Func tions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
Pro gram Struc ture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
21 - PALLET CHANGERS 283
Types of Automatic Pallets 283
Ro tary Pal lets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
Shut tle Pal lets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
Setup and Work Areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
Pro gram ming Methods 285
M60 Func tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
General Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
Pro gram ming Ex am ple 286
Ini tial Con di tions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
Part Pro gram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
22 - WORKING WITH PLANES 289
Math e mat i cal Planes 289
Ma chine Planes 290
G-codes for Plane Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
Ef fect of Planes in Programming 291
Planes and Circular Mo tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
Planes and Cut ter Ra dius Off set . . . . . . . . . . . . . . . . . . . . . . . . . . 293
Working With Planes In Detail 295
G17 with G41 and G02 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
G17 with G42 and G03 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
G18 with G42 and G03 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
G18 with G41 and G02 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298
G19 with G41 and G02 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
G19 with G42 and G03 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
Using Right-Angle Attachment 301
Ba sic Con cepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301
Side Face Drill ing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
Side Face Mill ing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304
Table of Contents
xvii
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com
23 - PROGRAMMING CAMS 307
Overview of Cams 307
Cam Draw ing Example 308
Cam RISE and FALL - Sections Eval u a tion . . . . . . . . . . . . . . . . . . . . . . 309
The RISE Sec tion 310
Cal cu lat ing Ra dius Length . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
Cal cu lat ing XY Coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
The FALL Sec tion 312
Cal cu lat ing Ra dius Length . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
Cal cu lat ing XY Coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
Sum mary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
Writ ing the Pro gram 315
24 - INTRODUCTION TO MACROS 317
Spe cial In tro duc tion 317
Skills Re quired 317
Macro is an Op tion 318
Com mon Fea tures and Applications 318
Macro Struc ture 319
Macro Def i ni tion and Call . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
Vari able Dec la ra tions and Expressions . . . . . . . . . . . . . . . . . . . . . . . 322
Macro Func tions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
Branch ing and Loop ing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
Macro De vel op ment - Bolt Cir cle 327
Eval u a tion of Draw ings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
Bolt Hole Macro Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329
Assignment of Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
In ter nal Calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
Other Cal cu la tions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
Fi nal Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331
Macro Call . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332
25 - DID YOU KNOW THAT ? 333
26 - REFERENCES AND RESOURCES 335
Index . . . . . . . . . . . . . . . . . . . . . . . 339
xviii Table of Contents
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com
PART PROGRAM DEVELOPMENT
This in tro duc tory chap ter to the CNC Pro gram ming Tech niques pres ents the most ba sic tech nique of
all - how to de velop a part pro gram in an or ga nized way. Its pur pose is to pres ent an en gi neer ing
draw ing, eval u ate it and de velop all pro ce dures re quired to write the fi nal pro gram.
In strict terms, pro gram de vel op ment us ing a step by step pro ce dure is not the most ap pro pri ate ap -
proach, be cause it sug gests 'fin ish step 1 be fore start ing step 2'. That is never the case in CNC pro -
gram ming, as many 'steps' in ter act with each other. For ex am ple, a change in setup may in flu ence
the tool ing se lec tion, width or depth of cut, etc. Keep this in mind when study ing this chap ter.
Pro gram De vel op ment Draw ing
The draw ing be low will be used through out the chap ter, in clud ing re quired de tails, cal cu la tions, all
com plete with ex pla na tions of in di vid ual steps re quired in the CNC pro gram de vel op ment. The draw -
ing in cludes some of the most com mon ma chin ing op er a tions - face cut ting, ma chin ing holes, con -
tour ing, cir cu lar pocket, and a slot mill ing. The de sign has been kept in ten tion ally sim ple.
1
1
90
6
5
4
33
73
86
4
3
2
.
5
6
1
1
5
3
5
R
5

3
0

3
8
1
2
3
53
.
5
6x M4x0.75
ALUMINUM 6061
90 x 65 x 13 mm
3.2
Surface finish
R
4
Scale 1:1
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com
Draw ing Eval u a tion
The first thing a CNC pro gram mer should al ways do be fore writ ing the program, is to eval u ate the
draw ing in or der to get a gen eral idea about the part. Such an eval u a tion in cludes sev eral ob ser va tions
that can be summed up:
u Draw ing units and scale
u Dimensioning method
u Tol er ances
u Ma te rial type, size, shape and con di tion
u Sur face fin ish re quire ments
u Ti tle block in for ma tion
u Draw ing re vi sions
u Bill of Ma te ri als (BOM) - if avail able
u Omis sions and other er rors
In the en closed draw ing the draw ing units are not spec i fied di rectly, but it is ob vi ous from the draw -
ing that it uses met ric di men sions in mil li me ters. Scale is not al ways spec i fied in the draw ing, of ten
be cause of var i ous forms of copy ing may not match the orig i nal scale. The draw ing for this chap ter
shows a full size draw ing and is spec i fied as 1:1.
Drawing di men sions are al ways im por tant for the CNC pro gram mer, at least for two rea sons. One,
they es tab lish the im por tant fea tures of the part, two, they serve as the most im por tant re source in de -
ter mine the part zero (part or i gin). In the draw ing, all di men sions orig i nate from the lower left cor ner
of the part - in this case, that will also be the most suit able lo ca tion of the part zero. Keep in mind that
this is not al ways the case.
Tol er ances are closely re lated to di men sions. This par tic u lar draw ing does not con tain any tol er -
ances, so the aim of the pro gram mer (and op er a tor) will be to ad here to gen eral com pany stan dards.
Not all draw ings de scribe ev ery as pect of the ma te rial the part is made of, but for pro gram ming pur -
poses, the type, size, shape and con di tion of the blank ma te rial are the most im por tant. The sam ple
draw ing spec i fies the ma te rial type and its size. Alu mi num 6061 is easy to ma chine, and fairly high
speeds and feeds can be used for ef fi cient ma chin ing. The ma te rial size is spec i fied in the draw ing as
90 65 13 mm (L W D). Here co mes the first item that will have a di rect re la tion ship with the
tool ing se lec tion and ma chin ing op er a tions. Al though the length and width of the ma te rial are the
same as the fi nal length and width of the part, that is not the case with the ma te rial depth (thick ness).
There is 1 mm dif fer ence that has be ac counted for dur ing pro gram ming and even setup.
The draw ing also spec i fies the over all sur face fin ish of 3.2 for all marked sur faces. Not all draw -
ings spec ify in di vid ual sur faces. The amount of 3.2 is a sta tis ti cal de vi a tion from the ideal pro file and
is mea sured in mm (mil lionth of a me ter = 0.000 001 m = 10
-6
). In prac ti cal terms, the re quired fin -
ish of 3.2 mm is at tain able with stan dard mill ing cut ters at rel a tively fast spin dle speeds and mod er ate
feedrates, as sum ing proper setup and qual ity tooling.
Small and sim ple draw ings sel dom have an elab o rate ti tle block. Ti tle block is usu ally a rect an gu lar
area in a cor ner of the draw ing that con tains text data, such as draw ing name, part num ber,
draftsperson, dates, re vi sions, ma te rial, etc. Re vi sions are changes made to the draw ing from its
orig i nal version - they are very im por tant to the CNC pro gram mer. Al ways make sure you de velop
the pro gram us ing the lat est draw ing ver sion. Keep ing a copy of the draw ing is also a good idea.
2 Chapter 1
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com
Bill of Ma te ri als (ab bre vi ated as BOM) is a spe cial list that con tains in di vid ual items re quired to
man u fac ture the part. Typ i cal items in cluded in BOM are stock items, pur chased items and var i ous
other parts re quired for as sem bly. Large com plex draw ing are more likely to have BOM than small
sim ple draw ings.
Even the best en gi neers and draftspersons make a mis take. One im por tant part of draw ing eval u a -
tion is to look for er rors, omis sions and other dis crep an cies. It is most frus trat ing to go through many
cal cu la tions just to find out that a crit i cal di men sion was miss ing. The pro gram mer should also look
for dou ble dimensioning, where one di men sion is in con flict with an other di men sion. Fi nally, when
eval u at ing a draw ing, never try to find di men sions by scal ing the lines or arcs, never as sume a di men -
sion or a fea ture. If in doubt, al ways ask.
Ma te rial and Stock
Al though the en closed sam ple draw ing does in clude ma te rial the part is made of, there are many is -
sues re lated to the ma te rial be fore ma chin ing (and pro gram ming). Apart of size of the ma te rial, its
shape and con di tion are equally im por tant. Shape could be a sim ple block or cyl in der, it could be
cored or solid, it could be a com plex cast ing or forg ing, and so on. Shape of the ma te rial is most im -
por tant in pro gram de vel op ment dur ing setup and tool ing de ci sions as well as toolpath. The con di tion
of the ma te rial in cludes the over all qual ity - such as burrs, flakes, premachining, hard ness, etc. It
also in cludes the ac cu racy of the shape. For ex am ple, it is im por tant that the ma te rial sup plied for the
sam ple draw ing is ex actly 90 65 mm in length and width, square at cor ners, as these sizes are al -
ready fi nal and need no ma chin ing. There is a lit tle bit more flex i bil ity in the ma te rial thick ness, be -
cause the top will have to be faced off to suit draw ing di men sion of the part height.
Part Setup
A high qual ity vise, spe cially de signed for CNC work is the most com mon fix ture (part hold ing de -
vise) for small to me dium size parts on ver ti cal machining centers.
Part Reference Point
Part ref er ence point is an other com -
mon name for part zero or part or i gin.
Be fore any toolpath can be de vel oped in
the form of co or di nates, the CNC pro -
gram mer has to se lect part zero. As a
gen eral rule, the part zero for set ups in a
vise should al ways be lo cated on a non
mov ing jaw (fixed jaw), and a part stop -
per or sim i lar device is also rec om -
mended for re peat abil ity.
Part Ori en ta tion
How the part blank (stock) is ori ented
in the vise of ten in flu ences the method
of ma chin ing. Look ing at the sam ple
draw ing, the part blank can be ori ented
ei ther hor i zon tally or ver ti cally, look ing
PART PROGRAM DEVELOPMENT 3
FIXED
JAW
MOVING
JAW
STOPPER
PARALLEL PARALLEL
90
STOCK
STOCK
6
5
1
3
6
X0Y0
Z0
1
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com
from the CNC op er a tor's di rec tion. Hor i zon tal ori en ta tion has the ad van tage that the ma chined part
will match the draw ing. An other ben e fit is that the lower left cor ner of the part will be lo cated at the
in ter sec tion of the vise non mov ing jaw and a stop per. The only ben e fit of ver ti cal ori en ta tion would
be the width of grip be ing 65 mm rather than 90 mm in the hor i zon tal ori en ta tion, min i miz ing any
'bend ing' ef fect caused by pres sure of the jaws. For this job, we se lect the hor i zon tal ori en ta tion, as
the 25 mm dif fer ence be tween widths has no prac ti cal dis ad van tage.
Se lect ing Part Zero
Based on the previous con sid er ations in this sec tion, the se lec tion of part zero for the X and Y axes
pres ents no prob lem. The lower left cor ner of the part will be the part zero. This is also the co or di nate
lo ca tion that will be used to set the work off set G54.
Set ting the part zero for the Z-axis re quires some think ing as well as eval u a tion of sev eral pos si bil i -
ties. Un less the ma chine shop uses off-ma chine presetter to set the tool length, the most com mon
method of tool length set ting is the touch-off method. Se lect ing Z0 is im por tant part of the setup. The
most com mon method is the top of the fin ished part, but bot tom of the part or some other fix ture lo ca -
tion may also be con sid ered. In this ex am ple, the top of the fin ished part will be Z0, which brings up
a ques tion - what to do with the 1 mm ex tra height? The top face will be face milled, and the 1 mm ex -
tra thickness will be re moved by that op er a tion. All tool lengths will be set on the fin ished face. Later
sec tion of this chap ter will pro vide more de tails. Look at the il lus tra tion shown on the pre vi ous page.
Tool ing Se lec tion
Se lect ing tool hold ers and cut ting tools is another very crit i cal part of part pro gram de vel op ment
pro cess. Tool hold ers are gen er ally used with dif fer ent cut ting tools and re main un changed for ex -
tended pe ri ods of time. Tools, such as drills, ream ers, taps, end mills, car bide in serts, etc. are per ish -
able tools. Some toolholders are used for a spe cific tool group, such as a col let holder is a better
choice for end mills, Weldon type toolholders pre vent tool spin ning, Jacobs chucks are used for
drills, etc. Some tools, such as taps, re quire spe cial hold ers, de signed for a sin gle pur pose.
Tool ing se lec tion is al ways closely re lated to the setup and cut ting con di tions. When se lect ing tools,
al ways keep in mind these other two con sid er ations. When the part setup method has been es tab -
lished, the tools can be se lected on the ba sis of draw ing di men sions and ma chin ing op er a tions re -
quired. Tools are al ways se lected on the ba sis of ma chin ing op er a tions re quired.
Identifying Ma chin ing Op er a tions
From the sam ple draw ing, even a ca sual look will iden tify the types of op er a tions re quired to ma -
chine the part - all are very com mon and can be adapted to other jobs:
u Face mill ing
u Con tour mill ing
u Cir cu lar pocket mill ing
u Slot mill ing
u Spot drill ing
u Drill ing
u Tap ping
4 Chapter 1
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com
One of the most im por tant ma chin ing rules is that heavier op er a tions are al ways done be fore lighter
op er a tions. That does not just mean rough ing be fore fin ish ing, which is a com mon sense, it also
means mill ing be fore drill ing, for ex am ple. Mill ing has the ten dency to shift the ma te rial in the XY
axes, whereby drill ing pushes the ma te rial to wards the fix ture (Z-axis). The above op er a tions list is
suit able to be used as the or der of op er a tions.
Face Milling
As the part is 1 mm thicker than the fi nal thick ness, a face mill ing tool has to be used to ma chine the
top face to pro vide fi nal thick ness of 12 mm, as per draw ing. The amount of one mil li me ter rep re -
sents a small depth for fac ing, so only one depth cut will be nec es sary to face the part. In or der to se -
lect the best face mill di am e ter, the part length and/or width have to be con sid ered as well. In many
cases, the length or width of the part also de ter mines the di rec tion of the cut. The length of the part is
90 mm, its width is 65 mm. If ei ther di rec tion is ac cept able, a stan dard 100 mm face mill would be
the best choice. A 75 mm face mill will only be able to face along the X-axis. If both face mills are
avail able, which one is a better choice? Num ber of flutes (cut ting in serts) in the tool should also be
con sid ered, to em ploy as many edges at the same time. If the 100 mm face mill has more cut ting
edges, it will be a better choice. It will also be the choice for this job.
Cut ting di rec tion is very im por tant as well. Al though the 100 mm face mill can cut in four di rec -
tions along the two axes, choice of the X-di rec tion, from the X+ to the X- (right to left) is rec om -
mended. The rea son is that the cut ter will be 'push ing' against the vise fixed jaw, cre at ing fa vor able
cut ting con di tions. Cut ting along the Y-axis can cause the face cut ter to pull the part up. Last, and
equally im por tant con sid er ation is the lo ca tion of the face mill cen ter rel a tive to the part. It is not rec -
om mended to lo cate the cut ter cen ter at the mid dle of the part, but slightly off the mid dle. Such tool
po si tion will better con trol of chips dur ing the en try and exit, to and from the ma te rial. It also min i -
mizes chat ter.
The Y-axis lo ca tion of the face mill cen ter must still guar an tee that the full part width of 65 mm can
be ma chined. To cal cu late the max i mum shift possible, take one half of the dif fer ence be tween the
face mill di am e ter (100 mm) and the part width (65 mm):
Max i mum shift from part mid dle = (100 - 65) / 2 = 17.5 mm
Se lect the Y-lo ca tion a lit tle less, to make the tool over hang the part. For this ex am ple, 15 mm is a
rea son able shift, with 2.5 mm left for edge overlap - see il lus tra tion.
PART PROGRAM DEVELOPMENT 5
1
5
m
m
S
H
I
F
T
6
5

1
0
0
2.5 mm overlap
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com
Con tour Mill ing
The filleted rect an gu lar shape is lo cated four
millimeters from all edges, ex cept at the cor -
ners, where the dis tance is much greater.
This cor ner dis tance is very im por tant when
se lect ing cut ter di am e ter. If only a sin gle con -
tour ing toolpath is required, the cut ter di am e -
ter should be larger than the cor ner dis tance C
- see il lus tra tion. If the cor ner dis tance is too
large for any cut ter size, two or more passes
may be re quired, or some other method of
ma chin ing needs to be se lected.
The step depth along the edges is 3.5 mm
and should also be con sid ered when the cut -
ting tools are se lected. For this job, the depth
does not pres ent any spe cial dif fi cul ties, and
can be ma chined in one pass.
In our case, the step width S is 4 mm, the cor ner ra dius R is also 4 mm. Us ing the above for mula,
the C di men sion (max i mum cor ner dis tance) is 7.31371 mm. In prac tice, any end mill 8 mm in di am -
e ter or larger can be used to clean the cor ners in a sin gle pass. This con clu sion is cor rect, but ac tual
cut ting con di tions have to be con sid ered as well. Se lect ing the 8 mm end mill will not be a good
choice in this case, be cause the ra dius of the end mill is the same as the step width (4 mm). The cen ter
of the cut ter will fol low the ex act edge of the part, which is not the best ma chin ing con di tion. In ad di -
tion, a larger tool di am e ter will pro vide more tool ri gid ity and pre vent de flec tion. A two-flute or a
three-flute end mill, es pe cially de signed for cut ting alu mi num will be the best choice. As for the di a -
m e ter, the se lec tion should not al ways be re lated to the cur rent op er a tion only, but other op er a tions as
well. Ei ther a 10 mm or 12 mm end mill will be a good choice - the fi nal de ci sion will de pend on
the tool re quire ments for the cir cu lar pocket. The slot width is 10 mm, so the tool di a m e ter must be
smaller than that for op ti mum cut ting conditions.
Cir cu lar Pocket Mill ing
The pocket in the draw ing is 30 mm in di a -
m e ter and 5 mm in depth. Un like the end mill
se lected for con tour ing, the end mill for the
pocket must be cen ter-cut ting, in or der to
plunge into solid material. Cen ter-cut ting end
mills are also called slot drills, be cause they
were orig i nally de signed for mill ing of stan -
dard slots. High he lix, three-flute pre ci sion
ground cen ter-cut ting end mills, are the best
over all so lu tion to cut ting alu mi num. Three
flute end mills are of ten frowned upon - un -
fairly, be cause they can not be mea sured with
stan dard ver ni ers or mi crom e ters. Yet, they
of fer the strength, the chip flow and the sur -
face fin ish that many alu mi num parts re quire.
Of course, the more com mon two-flute end
mills are also a suit able choice.
6 Chapter 1
C
S
S
S = Step width
R = Corner radius
C = Corner distance
C = ( S + R ) x 2 - R
2
R
R
9
0

X
3
3
.
0
Y32.5
30
12
1
2
2
3
MINIMUM CUTTER
Minimum cutter
Pocket diameter / 3
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com
Cir cu lar pock ets can be ma chined many dif fer ent ways, but the most eco nom i cal method is the sin -
gle pass method, par tic u larly for small pock ets. As shown in the il lus tra tion, the min i mum di am e ter
of the se lected cut ter must be one third of the pocket di am e ter. The rea son for the one third is that
such tool se lec tion guar an tees the com plete clean-up of the pocket bot tom. The cir cu lar pocket in the
draw ing is 30 mm, so the min i mum cut ter di am e ter re quired is 30/3 = 10 mm. Al though cor rect
math e mat i cally, in prac tice it is al ways better to use a slightly larger cut ter di am e ter, to over lap all
cuts at the pocket bot tom.
In the de scrip tion of con tour ing (see above), the choice of tools was nar rowed down to two end
mills - 10 mm end mill or 12 mm end mill. Ei ther tool will work well for the con tour ing, but only
the 12 mm end mill is also suit able for ma chin ing the cir cu lar pocket. The se lec tion of 12 mm end
mill for both op er a tions will also of fer ben e fits in a shorter setup time, tool main te nance, and even in -
ven tory. The fi nal se lec tion is the 12 mm end mill, used for both - the con tour and the pocket.
There is one final con di tion that has to be con sid ered. In or der to ma chine the pocket. a cen ter-cut -
ting end mill has to be used. That is not re quired to ma chine the con tour. If only one tool is used for
both op er a tions, it has to be a cen ter-cut ting end mill for this job. It is per fectly suit able for the con -
tour, and its cen ter-cut ting de sign is mandatory for cut ting the circular pocket.
Slot Mill ing
Un less there are some very tight tol er ances re quired, a stan dard slot can be ma chined with a sin gle
tool, usu ally a cen ter-cut ting end mill. There is an es tab lished - and very spe cific - pro ce dure to cut
stan dard slots (de scribed later). It in cludes a sin gle pass be tween cen ters, fol lowed by the in ter nal
con tour to make the slot ac cord ing to the en gi neer ing draw ing. The main con sid er ation in tool ing se -
lec tion is the slot width.
In the draw ing, the slot ra dius is 5 mm, so
its width is the dou ble the ra dius, 10 mm.
What ever your pro gram ming style may be,
re sist the temp ta tion to use a 10 mm cen ter
cut ting end mill be tween slot end cen ters only
- the qual ity of the slot will be very poor and
so will its di men sions. Much better choice is
to se lect a cen ter-cut ting end mill that is a bit
smaller than the slot width. Is the size of such
an end mill im por tant? If so, why? YES - the
size of the se lected end mill is very im por tant,
be cause it will con trol the amount of stock left
on the slot walls for fin ish ing. For ex am ple,
if we choose a 7 mm end mill, it will leave
1.5 mm per side for fin ish ing; 9 mm end
mill will leave 0.5 mm per side for fin ish ing,
and 8 mm end mill will leave 1 mm per side
for fin ish ing.
All of the three ba sic se lec tions are cor rect, but the choice has to be made for this par tic u lar part, as
rep re sented by the draw ing. Leav ing 1 mm per side for fin ish ing is rea son able, so the cut ting tool se -
lected for the slot will be an 8 mm cen ter-cut ting end mill (two or three flutes) - see il lus tra tion.
If the slot is dimensioned with tight tol er ances, it may be a better choice to se lect two suit able tools -
one that would make the rough ing cut, the other the fin ish ing along the slot walls. Whether one or
two tools are used, the fin ish ing cut should be made with cut ter ra dius off set in ef fect, so the fi nal slot
di men sions can be fine-tuned at the ma chine, via the con trol sys tem.
PART PROGRAM DEVELOPMENT 7
3
5
R
4
R
5
1 mm STOCK
Y15.0
X
7
3
.
0

8
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com
Spot Drill ing
When drill ing holes, a small cham fer - or even a small cor ner break - is very de sir able at the top of
the hole. A cham fer will elim i nate burrs or sharp edges that are the nat u ral re sult of drill ing, al low ing
a smoother en try of a tap, or just elim i nat ing the burrs for eas ier han dling. Spot drill is a tool that is
used for this pur pose; it re sem bles a reg u lar drill and has two main pur poses:
u To start-up a hole with a small dim ple at its ex act lo ca tion ... con trol of hole lo ca tion
u To ma chine a cham fer on a hole, by con trol ling the depth of cut ... con trol of cham fer size
In the ex am ple, no chamfering or cor ner break ing of the hole is specified. In CNC work, it is quite
cus tom ary to break sharp cor ners, un less the draw ing in struc tions specifically pro hibits it.
Un like any drill se lec tion, spot drills are of fered only in about three to six di am e ters, de pend ing on
the choice of in di vid ual tool man u fac tur ers. One of the most com mon spot drills used is a very ver sa -
tile di am e ter of 10 mm (or 12.7 mm = 0.5 inch in Im pe rial units). If you are not fa mil iar with
spot drills, bear in mind that only the an gu lar por tion of the drill is used, never its own full di am e ter.
Also keep in mind that the ma jor ity of spot drills have a 90 in cluded an gle at the tool tip. This is a
very prac ti cal an gle, as it al lows to make 45 cham fers on small and me dium size holes.
One pur pose of spot drill ing is to make a small dim ple at the XY hole lo ca tion - the ex act size of the
dim ple is not im por tant, so 2-3 mm depth will usu ally be suf fi cient, de pend ing on the hole di am e ter.
On the other hand, many holes are not just spot drilled for the pur pose of main tain ing their XY lo ca -
tion - they are also chamfered with same tool, to a par tic u lar cham fer spec i fi ca tion, typ i cally at 45.
The six holes in the draw ing have to be spot
drilled, drilled and tapped. The tap di am e ter
is 4 mm, which is the larg est size of the hole.
Any func tional cham fer for a given hole di a -
m e ter must be big ger than the larg est hole.
The draw ing spec i fi ca tions may in clude the
cham fer size - oth er wise the de ci sion is in the
hands of the pro gram mer. For the draw ing in
the given ex am ple, no cham fers are given, so
an ar bi trary de ci sion has to be made - by the
CNC part pro gram mer. Cham fers are usu ally
very small, typ i cally within the range of
0.125 to 0.5 mm (0.005 to 0.02 inches) at 45
de grees. For small holes, the cham fer can
also be quite small. As this is an ar bi trary de -
ci sion for the ex am ple pro vided, the six holes
in the draw ing will be 0.35 x 45.
When us ing spot drills, al ways con sider the fact that only a por tion to the an gu lar tool tip is used.
That means the pro grammed depth con trols the cham fer size - or - the cham fer size is con trolled by
the pro grammed depth. If we choose the cham fer size to be 0.35, that means the cham fer is ap plied
on both sides of the hole cen ter line. The 4 mm hole with 0.35 mm per side cham fer will have a
cham fer di am e ter of 0.35 + 4 + 0.35 = 4.7 mm. The depth is cal cu lated di rectly from the cham fer
di am e ter and the tool point an gle. Since the spot drill point an gle is 90, it means the pro grammed
depth must be one half of the cham fer di am e ter:
DEPTH OF SPOT DRILL = (2 cham fer size + hole di am e ter) / 2 = (2 0.35 + 4) / 2 = 2.35 mm
8 Chapter 1
10
4.7 CHAMFER DIAMETER
0.35x45 0.35x45
4 TAP
3.2 TAP DRILL
4 TAP
4.7 CHAMFER DIAMETER
2.35 DEPTH
Z0
Z-2.35
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com
Drill ing
To drill the six holes, the drill se lec tion must be re lated to the tap ping op er a tion that fol lows. There
is a cor re la tion be tween the tap size and the pre-drill hole size. The drilled hole must be smaller that
the nom i nal tap size, in or der to pro vide ma te rial to be cut by the tap ping op er a tion. The best source
of in for ma tion about the tap drill se lec tion can be found in var i ous charts from tool ing man u fac tur ers,
and also in the Ma chin ery's Hand book, pub lished by In dus trial Press, Inc. In ei ther source, the sug -
gested drill se lec tion - called the tap drill - can be found. For an M4x0.75 met ric tap, the com mon se -
lec tion of the tap drill size is 3.2 mm (or 3.25 mm).
The draw ing calls for a through hole, drilled
and tapped as per given draw ing di men sions.
The thick ness of the part T at this stage is 12
mm (al ready faced), which means the drill
has to pen e trate the part thick ness with its full
body di am e ter. It is never a good idea to line
the end of the full drill di am e ter D with the
bot tom of the part. In prac tice, the tap drill
should pen e trate not only the thick ness of the
part, but also pro vide ad di tional 1-2 mm of
break through clear ance. In ad di tion to the
part thick ness T and the break through clear -
ance C, we also have to con sider the drill
point length (shown as P in the il lus tra tion).
In the pro gram ming sec tion, the drill data
will be cal cu lated, re sult ing in the Z-depth of
the drill (its fi nal po si tion be low the part).
As a con clu sion to the tap drill se lec tion, stan dard 3.2 met ric drill will be used for the sam ple part.
Tap ping
Once the drill ing depth is es tab lished (through the part in this ex am ple), the tap ping depth pres ents
no prob lems, par tic u larly for through holes. In fact, the fi nal Z-depth for the drill may be used as the
fi nal tap ping depth, elim i nat ing ad di tional cal cu la tions.
Tap ping op er a tions have other is sues to con sider, par tic u larly the re la tion ship be tween the spin dle
speed and the tap pitch. These two items will also in flu ence the start ing po si tion be fore tap ping be -
gins, as well as the feedrate cal cu la tion. This sub ject will be dis cussed later in this chap ter. In this ex -
am ple, a stan dard tap ping head (ten sion/com pres sion type) will be as sumed. An other name for this
type of tap ping head is a float ing tap holder. Its pur pose is to pre vent tap break age, when the tap has
reached the fi nal depth, but the spin dle still de cel er ates to a full stop. It also work in the op po site di -
rec tion, when the re turn feedrate has al ready started, but the spin dle has not com pleted its ac cel er a -
tion to the pro grammed spin dle aped (r/min).
Sum mary of Tools Used
Tools used for this job have been care fully se lected, based on sev eral im por tant con sid er ations.
Check again the de tails as so ci ated with each op er a tion. There are other ways to ma chine this part -
con sider the pre sented method as only one of sev eral pos si bil i ties. One of the pro gram mers re spon si -
bil i ties is to as sign a tool num ber to each tool. Keep in mind, that as cend ing or der from tool num ber 1
is not al ways prac ti cal, as many frequently used tools loaded in the ma chine tool mag a zine may use
the same num ber from one job to an other.
PART PROGRAM DEVELOPMENT 9
D = 3.2 DRILL
P
C
=
2
T
=
1
2
118
Z0
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com
For this draw ing ex am ple and the pro gram development, the cut ting tools will be num bered in their
or der of use, as shown in the fol low ing ta ble, with par tic u lar descriptions:
Tool
Num ber
De scrip tion
Size
in mm
Type Com ments
T01 Face mill 100 5-6 cut ting edges Top of the face - one pass only
T02 Cen ter-cut ting end mill 12 3-flutes Con tour and cir cu lar pocket
T03 Cen ter-cut ting end mill 8 2 or 3 flutes Slot - com plete
T04 Spot drill 10 90 point an gle Cham fer 0.35 x 45
T05 Tap drill 3.2 118 point an gle Through the part thick ness
T06 Plug tap M40.75 High spi ral flutes Through the part thick ness
Need less to say, a change in the draw ing spec i fi ca tions may have a pro found ef fect on the tool ing
se lec tion. Changes in the setup will also have to be con sid ered for the newly se lected cut ting tool, or
ad justed as nec es sary. RANDOM MEMORY TOOL CHANGE METHOD WILL USED.
Ma chin ing Data
Ma chin ing data con sid er ations cover a large and im por tant area of pro gram de vel op ment. What is
com monly re ferred to as se lect ing 'speeds and feeds' is much more than that. When the pro gram mer
reaches this stage, the fol low ing de ci sions have to be made - for each tool - if applicable:
u Spin dle speed in r/min
u Cut ting feedrate per min ute
u Depth of cut
u Width of cut
There may be many other re lated de ci sions to be made, de pend ing on the com plex ity of the part.
Spin dle Speed
Most speeds are cal cu lated from a stan dard ma chin ing for mula, based on a pe riph eral sur face speed
per min ute. For met ric units, the sur face speed is in m/min, for Im pe rial units it is in ft/min:
Met ric Im pe rial
r min
m min 1000
D
=

p
r min
ft min 12
D
=

p
In both for mu las, the pa ram e ter D re fers to the di am e ter of the tool in mill ing, or the diameter of the
part in turn ing, in mil li me ters or in inches. The sur face speed for many ma te ri als can be found in var -
i ous tool ing cat a logues and tech ni cal pub li ca tions.
10 Chapter 1
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com
Cut ting Feedrate
Feedrate can be cal cu lated from the spin dle speed, chipload per tooth and the num ber of cut ting
edges (teeth or flutes):
Feedrate cal cu la tion - Met ric or Im pe rial
Feedrate = r/min C N
+
where C is chipload per tooth in ei ther inches or mil li me ters and N is the num ber of flutes
(teeth)
or the num ber of cut ting edges
Tool ing Data
For the pur pose of this ex am ple, the spindle speed and feedrate cal cu la tions will be made based on
the fol low ing sur face speeds and chipload for each ma chin ing group (higher rates are possible):
Tool
Num ber
De scrip tion
Size
in mm
Sur face
speed in
m/min
Chipload
per tooth
in mm
Spin dle
r/min
Feedrate
mm/min
T01 Face mill 100
150 0.35 477 501.0
T02 Cen ter-cut ting end mill 12
55 0.06 1459 175.0
T03 Cen ter-cut ting end mill 8
55 0.06 2188 263.0
T04
Spot drill 10 mm 4.7 25 0.08 1693 135.0
T05 Tap drill 3.2
25 0.07 2487 174.0
T06 Plug tap M40.75
10 N/A 796 597.0
The feedrate for the face mill was cal cu lated for three cut ting edges in the ma te rial, and the feedrate
for both end mills, for two flutes cutting. Tap ping speed was cal cu lated by mul ti ply ing the spin dle
speed by the thread pitch.
The cut ting data pre sented here are only examples - al ways eval u ate the ac tual work con di tions
De tails of Op er a tions
In this sec tion, each op er a tion as so ci ated with a par tic u lar tool will be de scribed in suf fi cient de tail.
Al though all in di vid ual pro ce dures are cor rect in prin ci ple, there are many other ways to pro duce the
de sired re sults. Hope fully, with the pre sen ta tion of one method, you can adapt the ac quired knowl -
edge and de velop an other method. Ac tual program code will be gen er ated for each tool.
The main goal of this chap ter is not only to de velop a work ing CNC pro gram, but also de scribe and
explain the steps re quired to com plete this im por tant task.
PART PROGRAM DEVELOPMENT 11
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com
Tool 1 - Face Mill ing
The first part of this op er a tion has been de cided ear lier, in the tool ing se lec tion. A 100 mm face
mill with 5-6 cut ting edges has been se lected. In or der to pro vide the best cut ting con di tions, the cen -
ter of the face mill has been shifted by 15 mm, still leav ing a 2.5 mm edge over lap.
In or der to de velop a part pro gram for this tool, the start and end points of the fac ing cut must also
be se lected - or cal cu lated. As a good ma chin ing prac tice, the top face sur face fin ish will be of better
qual ity, if the cut ter starts and ends 'in the air' - away from the part. Se lect ing a 5 mm clear ance from
the two op po site edges is ar bi trary, but rea son able. The X-co or di nate at the start point (P1) will be:
X-co or di nate of P1 = 90 + 5 + 50 = X145.0 (part length + clear ance + cut ter radius)
At the end point (P2), the cal cu la tion is sim i lar, but does not in clude the part length:
X-co or di nate of P2 = - 5 + 50 = X-45.0 (clear ance + cut ter ra dius)
The Y-co or di nate is the same for both points. Based on the 15 mm shift and 32.5 mm half width of
the part, the Y-co or di nate is:
Y-co or di nate (P1 and P2) = 65/2 -15 = Y17.5
The pro gram for this tool can now be writ ten. This is the first tool of the pro gram, and the for mat
struc ture will re flect that:
(T01 - 100 MM FACE MILL - 1 MM OFF THE TOP FACE)
N1 G21
N2 G17 G40 G80 T01
N3 M06
N4 G90 G54 G00 X145.0 Y17.5 S477 M03 T02
N5 G43 Z10.0 H01 M08
N6 Z0
N7 G01 X-55.0 F501.0
N8 G00 Z10.0 M09
N9 G28 Z10.0 M05
N10 M01
12 Chapter 1
1
5
m
m
S
H
I
F
T
6
5

1
0
0
2.5 mm overlap
X
0
X
1
4
5
.
0
90 5 5
X
-
5
5
.
0
Y0
Y17.5 Y17.5
3
2
.
5
P1 P2
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com
Tool 2 - Out side Con tour
Tool 2 is a 12 mm cen ter-cut ting end mill. It will be used for two op er a tions - the con tour and the
pocket. The first ac tiv ity of Tool 2 is to ma chine the out side con tour.
The cal cu la tion of in di vid ual end points on the con tour it self should pres ent no prob lems - the 4 mm
ra dius is con stant around the con tour. Study the lower left cor ner area of the il lus tra tion, and you will
see that some heavy ac tiv ity takes place right there. This is the area where the cut ter is first po si -
tioned, where it ap proaches the part con tour (a mo tion called lead-in) and also where it leaves the
con tour (a mo tion called lead-out). Be cause the con tour is closed, the lead-in and lead-out mo tions
are close to gether. In an open con tour, they may be much fur ther apart from each other, al though the
ba sic prin ci ples will not change.
When a large num ber of points ex ists in a sin gle con tour, mak ing a chart or a ta ble of points and
their co or di nates will make the pro gram de vel op ment much eas ier and better organized. It is al ways a
good idea to de fine all points in the or der of ma chin ing, so the co or di nates can be eas ily transferred
from the ta ble to the pro gram:
Pt X Y Pt X Y Pt X Y
P1 X-8.0 Y-8.0
P2 X4.0 Y-8.0 P6 X86.0 Y57.0 P10 X4.0 Y8.0
P3 X4.0 Y57.0 P7 X86.0 Y8.0 P11 X-1.0 Y13.0
P4 X8.0 Y61.0 P8 X82.0 Y4.0 P12 X-8.0 Y13.0
P5 X82.0 Y61.0 P9 X8.0 Y4.0 P1 X-8.0 Y-8.0
PART PROGRAM DEVELOPMENT 13
X
-
8
.
0
Y-8.0
Y4.0
Y8.0
Y57.0
Y61.0
X
8
6
.
0
X
8
2
.
0
X
8
.
0
X
4
.
0
P1 P2
P3
P4 P5
P6
P7
P8 P9
P10
P11
P12
R
5
X
-
1
.
0
Y13.0
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com
Once the co or di nate points and their ma chin ing or der has been es tab lished, the pro gram for the con -
tour ing op er a tion can be writ ten (e/mill is the same as end mill):
(T02 - 12 MM CENTER-CUTTING E/MILL)
(OUTSIDE CONTOUR CUTTING - D52 = 6.000)
N11 T02
N12 M06
N13 G90 G54 G00 X-8.0 Y-8.0 S1459 M03 (P1)
N14 G43 Z10.0 H02 M08
N15 Z-3.5
N16 G41 G01 X4.0 D52 F175.0 (P2)
N17 Y57.0 (P3)
N18 G02 X8.0 Y61.0 I4.0 J0 (P4)
N19 G01 X82.0 (P5)
N20 G02 X86.0 Y57.0 I0 J-4.0 (P6)
N21 G01 Y8.0 (P7)
N22 G02 X82.0 Y4.0 I-4.0 J0 (P8)
N23 G01 X8.0 (P9)
N24 G02 X4.0 Y8.0 I0 J4.0 (P10)
N25 G03 X-1.0 Y13.0 I-5.0 J0 (P11)
N26 G00 X-8.0 (P12)
N27 G40 Y-8.0 (P1)
N28 Z2.0
<machining will continue for circular pocket>
The im por tant pro gram ming fea tures have been used in the above pro gram sec tion:
u Cut ter ra dius off set
u Num ber ing of off sets
The most im por tant pro gram ming fea ture for this toolpath was the use of draw ing di men sions for
the pro grammed con tour and com bin ing it with the cut ter ra dius off set (G41 D52). When a part
pro gram con tains cut ter ra dius off set, the CNC op er a tor en ters the tool ra dius amount into the con trol
reg is try and lets the com puter do all cal cu la tions. There are sev eral do's and don'ts, but over all it is
quite an easy way to de velop a part pro gram. The op er a tor must know how the toolpath was gen er -
ated - in typ i cal man ual pro gram ming, the draw ing di men sions are used. In this case, the nom i nal
amount for the off set is the cut ter ra dius (D52 = 6.000). Typ i cal to many CAD/CAM sys tems, the
pro gram out put may be to the cen ter of the cut ter. In this case, the nom i nal amount of the off set will
be zero (D52 = 0.000). It is al ways a good idea to in clude the sug gested off set amount in the pro gram
it self - see the above ex am ple.
This part of the pro gram uses tool 2 (T02). As each tool also re quires tool length off set, it makes
sense to as sign the tool length off set the same num ber the tool num ber (H02). On the other hand, not
all tools in the pro gram use the cut ter ra dius off set. If the tool does re quire cut ter ra dius off set, the
ad dress D must be pro grammed, also with the off set num ber. That pres ents a dif fi culty if the con trol
sys tem has only a sin gle mem ory bank for both types of off sets, so called shared mem ory. In this
case, the pro gram mer usu ally shifts the num ber by an ar bi trary amount (such as 50 for D52). The
shift amount can be dif fer ent, but is should al ways be higher than the num ber of tools that can be
stored in the mag a zine. The amount of 50 is also about half way be tween the range of off sets, usu ally
avail able in the range of 01-99.
The pro gram also in cludes a lead-in mo tion (block N16) and lead-out mo tions (N25-N27). G41
spec i fies that ra dius off set will be to the left of cutting di rec tion, pro vid ing a climb mill ing ac tion.
Cut ter ra dius off set can not be started or can celed while an arc mo tion is in effect
14 Chapter 1
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com
Tool 2 - Cir cu lar Pocket
The second ac tiv ity of Tool 2 is to ma chine the cir cu lar pocket. From its last po si tion in block N28,
the tool will move to wards the pocket cen ter. Cir cu lar and other sym met ri cal pock ets are much eas ier
to pro gram when the first cut starts at the pocket cen ter. The cut ter di am e ter of 12 mm has been se -
lected for one im por tant rea son - it can cut the pocket in just a sin gle cut around and still main tain a
clean bot tom. This cut will be pre ceded by a lead-in, and fol lowed by a lead-out. Cut ter radius off set
will be ap plied and canceled dur ing a lin ear mo tion.
When ma chin ing a cir cu lar pocket, the re la -
tion ship be tween the pocket size, tool size,
and lead-in/out arc is very im por tant. In the
il lus tra tion at right, the relationship is shown.
Also shown is the di rec tion of the cut, start -
ing from the pocket cen ter. The toolpath is
sim ple, start ing at the center:
+
1 - Lead-in line - G41 G01 in ef fect
2 - Lead-in arc - G03 with 90 sweep
3 - Full cir cle to cut the pocket - G03
4 - Lead-out arc - G03 with 90 sweep
5 - Lead-out line - G40 G01 in ef fect
This pro ce dure will be ap plied to the ac tual
pro gram (con tin ued):
(POCKET CUTTING - D62 = 6.000)
N29 X33.0 Y32.5 (A)
N30 G01 Z-5.0 Z100.0
N31 G41 X35.0 Y19.5 D62 F175.0 (B)
N32 G03 X48.0 Y32.5 I0 J13.0 )
N33 I-15.0 (D)
N34 X35.0 Y45.5 I-13.0 J0 (E)
N35 G40 G01 X33.0 Y32.5 (A)
N36 G00 Z10.0 M09
N37 G28 Z10.0 M05
N38 M01
Note that the cut ter ra dius off set has been
changed - for the same tool! In stead of D52
that con trols the out side con tour, D62 con -
trols the fi nal size of the pocket. The ra dius
amount stored in the con trol could be the
same for both ap pli ca tions, but the op er a tor
can fine tune one with out af fect ing the other.
When se lect ing the lead-in/out arc, first watch the rule of re la tion ship as shown in the il lus tra tions.
For the ex am ple in this chap ter, the Ra (lead arc ra dius) must be larger than Rt (tool ra dius). Based on
the pocket ra dius Rp, the range should be be tween 6 mm and 15 mm. In or der to achieve better ma -
chin ing re sults, se lect ing a larger ra dius pro vides better re sults, as the tan gen tial en try into the pocket
diameter is much smoother. If a tol er ance is given on the pocket di am e ter and/or depth, two cuts
would be nec es sary, per haps even two tools. How ever, the pro gram ming pro ce dure de scribed here
will re main ex actly the same.
PART PROGRAM DEVELOPMENT 15
R
p
R
t
R
a
Rp = Radius of pocket
Rt = Radius of tool
Ra = Radius of lead arc
Ra > Rt < Rp
X
3
3
.
0
Y32.5
30
12
R
1
3
X35.0Y45.5
A
B
E
C
D
X35.0Y19.5
Rp = 15 mm
Rt = 6 mm
Ra = 13 mm
Ra > Rt < Rp
X48.0Y32.5
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com
Tool 3 - Slot Mill ing
Tool 3 is an 8 mm cen ter-cut ting end mill. It will be used for rough ing and fin ish ing of the ver ti cal
slot. The ap proach to wards the fin ish pass is very much sim i lar to the ap proach de scribed for the cir -
cu lar pocket, also in climb mill ing mode. The major dif fer ence is that the ra dius of the tool and the
lead arc ra dius will be much closer to gether, de tails are de scribed for the fin ish ing cut.
First, the rough ing toolpath - this one can not
be any sim pler. The end mill will make a
rapid move to the cen ter of one slot ra dius in
XY axes, feeds to the full depth of 3 mm and
makes a straight cut to the cen ter of the op po -
site ra dius.
The ques tion 'which slot end should I start
from?' is un nec es sary - start from ei ther end,
it makes no dif fer ence in ma chin ing at all. In
the ex am ple, the tool will rough the slot from
its up per po si tion to its lower po si tion, as
shown at right:
(T03 - 8 MM CENTER-CUTTING E/MILL)
(D53 = 4.000)
N39 T03
N40 M06
N41 G90 G54 G00 X73.0 Y50.0 S2188 M03 T04
N42 G43 Z10.0 H03 M08
N43 Z2.0
N44 G01 Z-3.0 F100.0
N45 Y15.0 F263.0 will continue for slot finishing
Ra dius of the tool Rt is 4 mm, ra dius of the
slot Rs is 5 mm. As the lead arc Ra must be
some where be tween these two val ues, there is
not much flex i bil ity here. For the ex am ple in
this chapter, the lead arc ra dius Ra will be 4.5
mm. The pro grammed toolpath will fol low
the same pro cess al ready es tab lished for the
cir cu lar pocket toolpath, but in stead of the
pocket be ing ma chined, it will be the slot:
(SLOT FINISHING)
N46 G41 X73.5 Y10.5 D53
N47 G03 X78.0 Y15.0 I0 J4.5
N48 G01 Y50.0
N49 G03 X68.0 I-5.0 J0
N50 G01 Y15.0
N51 G03 X78.0 I5.0 J0
N52 X73.5 Y19.5 I-4.5 J0
N53 G40 G01 X73.0 Y15.0
N54 G00 Z10.0 M09
N55 G28 Z10.0 M05
N56 M01
As for the pocket cut ting, two tools may be used for con trol ling the pre ci sion of the slot, par tic u larly
if tight tol er ances are re quired. The pro gram ming tech nique will not change.
16 Chapter 1
3
5
R
5
Y15.0
X
7
3
.
0
Y50.0
3
5
Y15.0
X
7
3
.
0
Y50.0
X
6
8
.
0
X
7
8
.
0
R
a
R
s
R
5
R
t
X
7
8
.
0
Y15.0
Y19.5
Y10.5
X
7
3
.
5
X
7
3
.
0
Rs = 5 mm
Rt = 4 mm
Ra = 4.5 mm
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com
Tool 4 - Spot Drill ing
There are two major dif fer ences be tween a
stan dard drill and a spot drill. One is in the
tool de sign, the other in the way the tool is
used. The de sign be tween the two drill types
af fects the flutes, the web thick ness, the over -
all length, and the tool point an gle. The way
how the two types of drill are used is a ma jor
con sid er ation when pro gram ming. In the ear -
lier sec tion cov er ing the tool se lec tion, the
de tails for us ing the spot drill for this ex am ple
has al ready been cov ered, and the il lus tra tion
is pre sented as a ref er ence.
In a sum mary, the spot drill depth of each
hole spotted will be Z-2.35, at the cal cu lated
XY lo ca tion of each hole.
Apart from the depth of cut, an other crit i cal part of pro gram ming a spot drill is to cal cu late the XY
co or di nates of the six holes, which means a good cal cu la tor will be needed. Once these co or di nates
are es tab lished, they will also be used for the drill ing and tap ping of this bolt hole pat tern.
On the left of the above il lus tra tion is a gen eral con cept of cal cu lat ing bolt cir cle hole lo ca tions. On
the right, the con cept is ap plied for this par tic u lar ex am ple. Us ing the for mula shown, the XY co or di -
nates of all six holes can be de fined:
H1(X)=cos(060+0)19+33 = X52.0 H1(Y)=sin(060+0)19+32.5 = X32.5
H2(X)=cos(160+0)19+33 = X42.5 H2(Y)=sin(160+0)19+32.5 = X48.954
H3(X)=cos(260+0)19+33 = X23.5 H3(Y)=sin(260+0)19+32.5 = X48.954
H4(X)=cos(360+0)19+33 = X14.0 H4(Y)=sin(360+0)19+32.5 = X32.5
H5(X)=cos(460+0)19+33 = X23.5 H5(Y)=sin(460+0)19+32.5 = X16.046
H6(X)=cos(560+0)19+33 = X42.5 H6(Y)=sin(560+0)19+32.5 = X16.046
Once the co or di nates are known (depth is known al ready), the spot drill ing pro gram can be writ ten:
PART PROGRAM DEVELOPMENT 17
10
4.7 CHAMFER DIAMETER
0.35x45 0.35x45
4 TAP
3.2 TAP DRILL
4 TAP
4.7 CHAMFER DIAMETER
2.35 DEPTH
Z0
Z-2.35
B
A
n=H-1
n=n+1
n=1
0
Xc
Yc
33
32.5
R
1
9
R
B
=
6
0

X = cos (n x B + A) x R + Xc
A=0
n=0 n=3
n=5 n=4
n=1 n=2

3
8
General concepts Y = sin (n x B + A) x R + Yc
Formula for XY hole coordinates:
H1
H2 H3
H6 H5
H4
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com
(T04 - 10 MM SPOT DRILL - CHAMFER DIAMETER = 4.7)
N57 T04
N58 M06
N59 G90 G54 G00 X52.0 Y32.5 S1693 M03 T05
N60 G43 Z10.0 H04 M08
N61 G99 G82 R2.0 Z-2.35 P200 F135.0 (H1)
N62 X42.5 Y48.954 (H2)
N63 X23.5 (H3)
N64 X14.0 Y32.5 (H4)
N65 X23.5 Y16.046 (H5)
N66 X42.4 (H6)
N67 G80 G00 Z10.0 M09
N68 G28 Z10.0 M05
N69 M01
G82 fixed cy cle has been used for the spot drill op er a tion. This cy cle is very sim i lar to the G81 drill -
ing cy cle (see next op er a tion), but it re quires a dwell. The pur pose of dwell is to pause at the bot tom
of the hole, be fore re tract ing to the clear po si tion - the rea son? In or der to make sure the sur face of
the spot drilled hole is smooth, the tool has to ro tate at least one spin dle rev o lu tion, to make it clean.
To achieve this goal, the fol low ing for mula cal cu lates the min i mum dwell for fixed cy cles - units are
in mil li sec onds and there are no dec i mal places when mil li sec onds are used (1 sec = 1000 ms):
Min i mum dwell (ms) = (60 1000) / r/min
In the pro gram, the spin dle speed is 1693 r/min, so the min i mum dwell in mil li sec onds is 35.44 ms.
Al though that is the min i mum dwell math e mat i cally, prac ti cally we have to look at an other pos si ble
sit u a tion, and that is the sta tus of the spin dle over ride switch, lo cated at the con trol panel. On the ma -
jor ity of CNC ma chines, this switch has the range of 50-120%. For the dwell cal cu la tion, the con cern
should be with the low est set ting. In or der to guar an tee at least one full rev o lu tion of the spot drill,
even at 50% set ting, the min i mum dwell has to be dou bled. In the ex am ple, it would be 35.44 ms 2,
which is 70.88 ms. Dou bling or even tri pling this time will re sult in more revolutions at the bot tom of
the cut. The 200 ms in the pro gram will guar an tee al most three rev o lu tions at 50% spin dle over ride.
Tool 5 - Drill ing
Most of the drill ing pa ram e ters have been
es tab lish ear lier, in the tool se lec tion sec tion
of this chap ter. Ad di tional pro gram ming de -
ci sions fo cus on the method of drill ing the
hole - whether a sin gle cut is suf fi cient for the
depth re quired, or sev eral in ter rupted cuts are
needed. In ter rupted drill ing - also called peck
drill ing - is not needed in this ex am ple. For
holes that pen e trate the ma te rial - so called
through holes - the pro gram must pro vide a
break through clear ance C (2 mm in the ex am -
ple). In ad di tion, the tool point length P (also
known as the drill pont length), has to be cal -
cu lated. Con stant of 0.3 is used for stan dard
twist drills, with 118 point an gle. Add ing the
break through clear ance C and the drill point
length P to the thick ness of the part T, the fi -
nal drill ing depth can be cal cu lated:
Z-depth = T + C + P = 12 + 2 + 0.96 = 14.96 = Z-14.96 in the program
18 Chapter 1
D = 3.2 DRILL
P
=
0
.
3
x
D
=
0
.
9
6
m
m
C
=
2
T
=
1
2
118
Z0
Z-14.96
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com
The drill ing pro gram can be writ ten, us ing the cal cu lated val ues and the pre vi ous XY co or di nates:
(T05 - 3.2 MM TAP DRILL - THROUGH)
N70 T05
N71 M06
N72 G90 G54 G00 X52.0 Y32.5 S2487 M03 T06
N73 G43 Z10.0 H05 M08
N74 G99 G81 R2.0 Z-14.96 F174.0 (H1)
N75 X42.5 Y48.954 (H2)
N76 X23.5 (H3)
N77 X14.0 Y32.5 (H4)
N78 X23.5 Y16.046 (H5)
N79 X42.4 (H6)
N80 G80 G00 Z10.0 M09
N81 G28 Z10.0 M05
N82 M01
At the ma chine, the CNC op er a tor can make some changes to the pro gram, as needed - for ex am ple,
the G81 cy cle can be changed to G83 or G73 peck drill ing cy cle, just by chang ing the cy cle num ber
and add ing the Q-amount of each peck. Here is a vari a tion on the above pro gram (cy cle call only):
N74 G99 G83 R2.0 Z-14.96 Q5.0 F174.0 (H1)
The depth of each peck will be 5 mm. Work ing with fixed cy cles for ma chin ing holes of fers a gen er -
ous amount of flex i bil ity - in pro gram ming as well as at the ma chine.
Tool 6 - Tap ping
Once the spot drill and drill cal cu la tions are out of the way, the tap ping is quite sim ple. There is no
need to cal cu late the XY hole lo ca tions (al ready done for the spot drill). There is also no need to cal -
cu late the fi nal tap ping depth - the depth al ready cal cu lated for the drill will be suit able for tap ping as
well. So - what con sid er ations are unique to tap ping? Feed level clear ance and the feedrate!
(T06 - M4x0.75 TAP DRILL - THROUGH)
N83 T06
N84 M06
N85 G90 G54 G00 X52.0 Y32.5 S796 M03 T01
N86 G43 Z10.0 H06 M08
N87 G99 G84 R5.0 Z-14.96 F597.0 (H1)
N88 X42.5 Y48.954 (H2)
N89 X23.5 (H3)
N90 X14.0 Y32.5 (H4)
N91 X23.5 Y16.046 (H5)
N92 X42.4 (H6)
N93 G80 G00 Z10.0 M09
N94 G28 Z10.0 M05
N95 G28 X42.4 Y16.046
N96 M30
%
Note the in creased feed level clear ance (R-level) - the in crease is an ad just ment needed to ab sorb
feed ac cel er a tion be fore the tool touches the part, due to heavy feedrate. The feedrate it self is al ways
a com bi na tion of two re lated items - spin dle speed and tap pitch. The tap ping feedrate is:
Tap ping feedrate = r/min tap pitch = 796 0.75 = 597.0 = F597.0 (underfeeding may be ap pli ca ble)
That con cludes the chap ter on part pro gram de vel op ment. Com plete pro gram is listed next.
PART PROGRAM DEVELOPMENT 19
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com
Com plete Pro gram
(T01 - 100 MM FACE MILL - 1 MM OFF THE TOP FACE)
N1 G21
N2 G17 G40 G80 T01
N3 M06
N4 G90 G54 G00 X145.0 Y17.5 S477 M03 T02
N5 G43 Z10.0 H01 M08
N6 Z0
N7 G01 X-55.0 F501.0
N8 G00 Z10.0 M09
N9 G28 Z10.0 M05
N10 M01
(T02 - 12 MM CENTER-CUTTING E/MILL)
(OUTSIDE CONTOUR CUTTING - D52 = 6.000)
N11 T02
N12 M06
N13 G90 G54 G00 X-8.0 Y-8.0 S1459 M03 (P1)
N14 G43 Z10.0 H02 M08
N15 Z-3.5
N16 G41 G01 X4.0 D52 F175.0 (P2)
N17 Y57.0 (P3)
N18 G02 X8.0 Y61.0 I4.0 J0 (P4)
N19 G01 X82.0 (P5)
N20 G02 X86.0 Y57.0 I0 J-4.0 (P6)
N21 G01 Y8.0 (P7)
N22 G02 X82.0 Y4.0 I-4.0 J0 (P8)
N23 G01 X8.0 (P9)
N24 G02 X4.0 Y8.0 I0 J4.0 (P10)
N25 G03 X-1.0 Y13.0 I-5.0 J0 (P11)
N26 G00 X-8.0 (P12)
N27 G40 Y-8.0 (P1)
N28 Z2.0
(POCKET CUTTING - D62 = 6.000)
N29 X33.0 Y32.5 ( A )
N30 G01 Z-5.0 Z100.0
N31 G41 X35.0 Y19.5 D62 F175.0 ( B )
N32 G03 X48.0 Y32.5 I0 J13.0 ( C )
N33 I-15.0 ( D )
N34 X35.0 Y45.5 I-13.0 J0 ( E )
N35 G40 G01 X33.0 Y32.5 ( A )
N36 G00 Z10.0 M09
N37 G28 Z10.0 M05
N38 M01
(T03 - 8 MM CENTER-CUTTING E/MILL)
(D53 = 4.000)
N39 T03
N40 M06
N41 G90 G54 G00 X73.0 Y50.0 S2188 M03 T04
N42 G43 Z10.0 H03 M08
N43 Z2.0
N44 G01 Z-3.0 F100.0
N45 Y15.0 F263.0
(SLOT FINISHING)
N46 G41 X73.5 Y10.5 D53
N47 G03 X78.0 Y15.0 I0 J4.5
N48 G01 Y50.0
N49 G03 X68.0 I-5.0 J0
N50 G01 Y15.0
N51 G03 X78.0 I5.0 J0
N52 X73.5 Y19.5 I-4.5 J0
N53 G40 G01 X73.0 Y15.0
20 Chapter 1
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com
N54 G00 Z10.0 M09
N55 G28 Z10.0 M05
N56 M01
(T04 - 10 MM SPOT DRILL - CHAMFER DIAMETER = 4.7)
N57 T04
N58 M06
N59 G90 G54 G00 X52.0 Y32.5 S1693 M03 T05
N60 G43 Z10.0 H04 M08
N61 G99 G82 R2.0 Z-2.35 P200 F135.0 (H1)
N62 X42.5 Y48.954 (H2)
N63 X23.5 (H3)
N64 X14.0 Y32.5 (H4)
N65 X23.5 Y16.046 (H5)
N66 X42.4 (H6)
N67 G80 G00 Z10.0 M09
N68 G28 Z10.0 M05
N69 M01
(T05 - 3.2 MM TAP DRILL - THROUGH)
N70 T05
N71 M06
N72 G90 G54 G00 X52.0 Y32.5 S2487 M03 T06
N73 G43 Z10.0 H05 M08
N74 G99 G81 R2.0 Z-14.96 F174.0 (H1)
N75 X42.5 Y48.954 (H2)
N76 X23.5 (H3)
N77 X14.0 Y32.5 (H4)
N78 X23.5 Y16.046 (H5)
N79 X42.4 (H6)
N80 G80 G00 Z10.0 M09
N81 G28 Z10.0 M05
N82 M01
(T06 - M4x0.75 TAP DRILL - THROUGH)
N83 T06
N84 M06
N85 G90 G54 G00 X52.0 Y32.5 S796 M03 T01
N86 G43 Z10.0 H06 M08
N87 G99 G84 R5.0 Z-14.96 F597.0 (H1)
N88 X42.5 Y48.954 (H2)
N89 X23.5 (H3)
N90 X14.0 Y32.5 (H4)
N91 X23.5 Y16.046 (H5)
N92 X42.4 (H6)
N93 G80 G00 Z10.0 M09
N94 G28 Z10.0 M05
N95 G28 X42.4 Y16.046
N96 M30
%
In this in tro duc tory chap ter, you have learned many CNC pro gram ming tech niques. They all can be
eas ily adapted to a large num ber of pro grams. It is al ways dif fi cult to put some thing in print, when so
many vari a tions ex ist. For ex am ple, the speeds and feeds used in this chap ter may prove to be too low
for a pro duc tion of a large vol ume of parts. You may also find that your way of ma chin ing may be
better than the one shown here. That is all to be ex pected. Af ter all, CNC pro gram ming is al most like
fol low ing a rec ipe - the in gre di ents are there, even the pro cess - but it still needs the skilled hand of
the cook - the CNC pro gram mer - to make all the el e ments work well to gether.
PART PROGRAM DEVELOPMENT 21
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com
This page is in ten tion ally blank
22 Chapter 1
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com
INDEX
!
# symbol 318
A
Acceleration 143,231
ACOS function 324
Angular head setting 303
APC 283
ASIN function 324
ATAN function 324
Automatic corner breaking 185
Direction specification. . . . . . . . . . . . . . . . . . . . . . . 186
Automatic corner override 100
Automatic Pallet Changer - APC 283
Axis substitution 292
B
Back angle clearance 170
Backlash 97
Backlash compensation 97
Ball nose end mills 297
B-axis 285
Bill of Materials 3
Billet stock 139
Block delete function 131
Block skip function 131-142
Block skip within a block. . . . . . . . . . . . . . . . . . . . . . 140
Irregular stock removal . . . . . . . . . . . . . . . . . . . . . . 137
Numbering block skips . . . . . . . . . . . . . . . . . . . . . . 142
ON and OFF modes. . . . . . . . . . . . . . . . . . . . . . . . 131
Similar parts application. . . . . . . . . . . . . . . . . . . . . . 132
Slash symbol . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Switch setting . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Trial cut application . . . . . . . . . . . . . . . . . . . . . . . . 134
Used within a block . . . . . . . . . . . . . . . . . . . . . . . . 140
Bolt hole pattern 152
Boring
Offset errors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Box threading cycle 240
Breaktrough clearance 18
Bull nose end mills 297
C
Calculation zones 27
Cams 307
Angle orientation. . . . . . . . . . . . . . . . . . . . . . . . . . 309
Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
Best curve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
Cam zero . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
Contour spline. . . . . . . . . . . . . . . . . . . . . . . . . . . 309
Events of a cam cycle. . . . . . . . . . . . . . . . . . . . . . . 307
Motion transfer. . . . . . . . . . . . . . . . . . . . . . . . . . . 307
Origin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
Spline approximation . . . . . . . . . . . . . . . . . . . . . . . 309
Center-cutting end mills 6
Chamfers 206
Chuck pressure 192
Circular pocket 15
CNC vise 3
Command point 172,216
Comment 183
Common variables 322
Conflicting words in a block 140
Conical thread 271
Constant spindle speed 278
Constant surface speed 278
Constants 319-320
Contour lead-in and lead-out 49,176-181
Contour Point Between Line and Arc 34
Contour Point Between Two Arcs 40
Contour Point Between Two Lines 33
Contour points 23-32
Formulas for calculations . . . . . . . . . . . . . . . . . . . . 33-42
Intersecting arcs . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Intersecting point . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Sharp point calculation . . . . . . . . . . . . . . . . . . . . . . . 39
Tangent arcs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Tangent point . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Control registry (offsets) 45
Corner breaking 185
Corner radius 170
Corner radius selection 170
COS function 324
CRC interference 60
Cut-Off 221
Cutter radius offset 14,43-66
Benefits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Commands G40-G41-G42 . . . . . . . . . . . . . . . . . . . . . 45
D-address . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45-47
Drawing dimensions . . . . . . . . . . . . . . . . . . . . . . . . 48
Equidistant toolpath. . . . . . . . . . . . . . . . . . . . . . . . . 48
Error handling. . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Excessive cutting. . . . . . . . . . . . . . . . . . . . . . . . 61,172
General concepts . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Insufficient cutting . . . . . . . . . . . . . . . . . . . . . . . 64,172
Lead-in and lead-out . . . . . . . . . . . . . . . . . . . . . . . . 49
Line-Arc lead-in and lead-out . . . . . . . . . . . . . . . . . . . . 52
Line-Line lead-in and lead-out . . . . . . . . . . . . . . . . . . . 49
Maintaining tolerances . . . . . . . . . . . . . . . . . . . . . . . 58
Missing axis motion. . . . . . . . . . . . . . . . . . . . . . . . . 52
Offset activation. . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Offset application . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Offset cancellation . . . . . . . . . . . . . . . . . . . . . . . . . 47
Programming techniques . . . . . . . . . . . . . . . . . . . . . . 46
Radius vs diameter . . . . . . . . . . . . . . . . . . . . . . . . . 48
Tool nose radius . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Cycle start 318
D
D-address 45-48
Datum shift 85
339
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com
Deceleration 143,231
Dimensions 2
Distance-to-go 60
Drawing units 2
Drill point length 18
Drilling 9,18
Peck drilling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Dwell 18
Minimumdwell . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
E
Effective cutting diameter 91
Effects of plane selection 291
Equidistant toolpath 44-45
Exact stop check 98-99
Exact stop check mode 98-99
External cutting 197
F
Face cut 134
Multicut facing . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
Offset errors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Face milling
Cutting direction . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
FALSE values 326
Fanuc Macro B 126
Fanuc User Macros B 146,251,317
Feedrate 11
Fixed cycles
R-level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Fixed cycles in planes 301
Depth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303
Initial level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303
R-level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303
Using G81 drilling cycle . . . . . . . . . . . . . . . . . . . . . . 303
Floating tap holder 143
Formulas in calculations 33
Four-axis lathe
General setup . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
Program structure . . . . . . . . . . . . . . . . . . . . . . . . . 279
Programming method . . . . . . . . . . . . . . . . . . . . . . . 278
Special M-functions . . . . . . . . . . . . . . . . . . . . . . . . 279
Spindle speed and feedrate. . . . . . . . . . . . . . . . . . . . 278
Tool tip orientation numbers. . . . . . . . . . . . . . . . . . . . 278
Waiting codes . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
Functions 319-320
G
G00 command 52
G01 command 52
G02 command 295-300
G03 command 295-296,298-300
G09 command 97-99
G10 command 85,126-127
G15 command 151
G16 command 151
G17 command 290-292,294-296,301-302
G18 command 290,292-293,295-298,301,304
G19 command 290,294-296,299-301,303,305-306
G22 command 97,101-102
G23 command 97,101-102
G25 command 97,103-104
G26 command 97,103-104
G27 command 97,104,106-108,114
G28 command 97,104
G29 command 97,104,106
G30 command 97,104,108
G31 command 97,118
G32 command 236-238
G40 command 45-48
G41 command 45-48,52,295-300
G42 command 45-48,52,295-300
G43 command 119,122,126
G44 command 119
G49 command 119-122
G50 command 97,108-109,111-118
G52 command 81,129
G60 command 97
G61 command 97-99,101
G62 command 97-99
G63 command 97-100,145
G64 command 97-101
G65 command 320
G70 command 169,193,196
G71 command 169,173,193
G72 command 169,173,193-194
G73 command 197
G75 command 217
G76 command 241
G81 command 302,304
G81command 303
G92 command 97,108-110,240
G96 command 278
G97 command 231,278
G98 command 133-134
G99 command 133-134
G-codes 97
Geometry offset 62-63,126
Grinding allowance 174
Grooving operations
Command point . . . . . . . . . . . . . . . . . . . . . . . . . . 216
Cutting depth . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
Cutting width. . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
Deep groove. . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
Face grooving . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
General topics . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
Groove location . . . . . . . . . . . . . . . . . . . . . . . . . . 216
Grooves with tapers . . . . . . . . . . . . . . . . . . . . . . . . 222
Grooving for precision. . . . . . . . . . . . . . . . . . . . . . . 218
Offset errors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Part-Off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
Plunge and retract . . . . . . . . . . . . . . . . . . . . . . . . . 217
Pulley grooves. . . . . . . . . . . . . . . . . . . . . . . . . . . 225
H
Hard turning 175,198
340 Index
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com
Headstock 186
Helical interpolation 251
Availability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
Helix 258
Hole chamfering 8
I
Imaginary tool point 171
Indexing axis 285
Inner plug for tubular stock 192
Inscribed circle 189-190
Insert back angle 198
Insert lead angle 198
Insufficient clearance 64
Internal cutting 197
Intersecting arc 178
K
Knurling 273-276
Depth and feedrate . . . . . . . . . . . . . . . . . . . . . . . . 275
Knurling pitch . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
Programming and machining . . . . . . . . . . . . . . . . . . . 275
Tool motions. . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . 276
Types of knurl . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
L
Lathe cycles
P and Q blocks . . . . . . . . . . . . . . . . . . . . . . . . 194-195
Lathe jaws 182
Hard jaws . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
Soft jaws. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
LE function 326
Lead 244
Lead error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
Lead-in motion 13,46,49,176-179,259
Lead-out motion 13,46,179-181,259
Left hand threads 232
Local coordinate offset 129
Local coordinate system 81
Local variables 322
Logical functions 319
AND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
EQ. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
GE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
GT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
LE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
LT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
NE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
OR. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
XOR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
M
M00 function 183
Machine zero 114
Machine zero commands 104
Machine zero position 116
Machining corners 185
Machining operations 4
Machining thin stock
Adjusting chuck pressure . . . . . . . . . . . . . . . . . . . . . 192
Using an inner plug . . . . . . . . . . . . . . . . . . . . . . . . 192
Using special split jaws . . . . . . . . . . . . . . . . . . . . . . 192
Macro in main program 319
Macro programming 317
Macros 251
Arguments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
Bolt hole circle pattern. . . . . . . . . . . . . . . . . . . . . . . 327
Bolt hole example . . . . . . . . . . . . . . . . . . . . . . . . . 329
Bolt hole pattern example . . . . . . . . . . . . . . . . . . . . . 327
Branching and looping . . . . . . . . . . . . . . . . . . . . 320,326
Evaluation of drawings . . . . . . . . . . . . . . . . . . . . . . 328
Features and applications. . . . . . . . . . . . . . . . . . . . . 318
Functions and constants. . . . . . . . . . . . . . . . . . . . . . 320
Introduction to macros . . . . . . . . . . . . . . . . . . . . 317-332
Local variables. . . . . . . . . . . . . . . . . . . . . . . . . . . 321
Logical functions . . . . . . . . . . . . . . . . . . . . . . . 320,326
Macro call . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
Macro functions . . . . . . . . . . . . . . . . . . . . . . . . . . 323
Rounding functions . . . . . . . . . . . . . . . . . . . . . . . . 324
Skills required . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
Variable declarations . . . . . . . . . . . . . . . . . . . . . . . 322
Variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
Macros for machining 329
Main program 319
Manual Data Input (MDI) 318
Maximum feedrate 244
Memory registers 45
Metric thread form 227
Metric threads 229
M-Functions 279
Milling threads 251
Modal commands 133
Multicut facing 184
Multiple repetitive cycles 193,227
External cutting . . . . . . . . . . . . . . . . . . . . . . . . . . 197
G70 cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
G71 and G72 compared. . . . . . . . . . . . . . . . . . . . . . 196
G72 cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
Internal cutting. . . . . . . . . . . . . . . . . . . . . . . . . . . 197
Pattern repeating cycle . . . . . . . . . . . . . . . . . . . . . . 197
Programming formats . . . . . . . . . . . . . . . . . . . . . . . 193
N
Nominal dimensions 58
Normal cutting mode 99
Null variables 322
O
Optional block skip 142
O-ring grooves 222
Overcutting error 60
Overheat alarm 103
Index
341
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com
P
Palletization 284
Pallets 283
Transfer methods . . . . . . . . . . . . . . . . . . . . . . . . . 283
Types of pallets . . . . . . . . . . . . . . . . . . . . . . . . . . 283
Parametric programming 317,327-330
Part orientation 3
Part reversal - lathe 182-183
Part reversal - mill 67-88
Machining process . . . . . . . . . . . . . . . . . . . . . . . . . 69
Program zero selection. . . . . . . . . . . . . . . . . . . . . . . 70
Programming methods . . . . . . . . . . . . . . . . . . . . . . . 72
Tool length settings . . . . . . . . . . . . . . . . . . . . . . . . . 72
Using work offset . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Part zero 3-4
Partial arc 35,178
Part-Off 221
Pitch 229,244
Plane selection 251
Planes
Angular head setting. . . . . . . . . . . . . . . . . . . . . . . . 303
Circular motion . . . . . . . . . . . . . . . . . . . . . . . . 291-292
Circular motions . . . . . . . . . . . . . . . . . . . . . . . . . . 296
Cutter radius offset . . . . . . . . . . . . . . . . . . . . . . . . 293
Effect of planes in programming. . . . . . . . . . . . . . . . . . 291
Machine planes . . . . . . . . . . . . . . . . . . . . . . . . . . 290
Mathematical definition . . . . . . . . . . . . . . . . . . . . . . 289
Preparatory commands . . . . . . . . . . . . . . . . . . . . . . 290
Side face drilling. . . . . . . . . . . . . . . . . . . . . . . . . . 302
Side face milling. . . . . . . . . . . . . . . . . . . . . . . . . . 304
Planes and fixed cycles 301
Pocketing
Finishing rectangular pocket . . . . . . . . . . . . . . . . . . . . 56
Polar coordinate system 149-154
G-codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
Planes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150,154
Programming format. . . . . . . . . . . . . . . . . . . . . . . . 151
Toolpath direction . . . . . . . . . . . . . . . . . . . . . . . . . 153
Program development 1
Drawing evaluation. . . . . . . . . . . . . . . . . . . . . . . . . . 2
Machining data . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Material and stock . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Part setup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Selecting part zero . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Tooling selection . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Program stop 183
Program zero selection 169
Pulley grooves
Depth calculation . . . . . . . . . . . . . . . . . . . . . . . . . 226
Insert selection. . . . . . . . . . . . . . . . . . . . . . . . . . . 225
Tool setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
Pythagorean Theorem 34,41-42,178
R
Rear type CNC lathes 62
Recess programming 198
Rectangular coordinate system 151
References and resources 335-338
Revisions 2
Right hand threads 232
Right-angle head 301
Rigid tapping 146
Benefits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
Possible problems. . . . . . . . . . . . . . . . . . . . . . . . . 147
Programming approach . . . . . . . . . . . . . . . . . . . . . . 147
Special functions. . . . . . . . . . . . . . . . . . . . . . . . . . 148
Spindle speed . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
R-level 134
ROUND function 324
S
SIN function 324
Single direction positioning 97
Skip command 118
Slot machining
Circular slot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Linear slot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Slot milling 7,16
Slot width 7
Solving triangles 35
Special cutting modes 98
Special purpose G-codes 97-122
Spherical radius 178
Spindle fluctuation 103
Spindle override switch 18
Spindle speed 10
Split soft jaws 192
Spot drilling 8,17
Stepover 162
Stock allowance 172
Allowance for grinding. . . . . . . . . . . . . . . . . . . . . . . 174
Compound stock. . . . . . . . . . . . . . . . . . . . . . . . . . 174
Depth of cut calculation . . . . . . . . . . . . . . . . . . . . . . 174
Lead angle. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
U and Wprogramming . . . . . . . . . . . . . . . . . . . . . . 173
Stored stroke limits 101
Subprogram
Cutting Tool Selection. . . . . . . . . . . . . . . . . . . . . . . 157
Definition and usage. . . . . . . . . . . . . . . . . . . . . . . . 155
Depth control . . . . . . . . . . . . . . . . . . . . . . . . . 157,164
Development. . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Drawing evaluation . . . . . . . . . . . . . . . . . . . . . . . . 156
Planning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
Roughing and finishing . . . . . . . . . . . . . . . . . . . . . . 165
Round pocket . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
Stepovers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
Width of cut control . . . . . . . . . . . . . . . . . . . . . . . . 157
Surface finish 2
Synchronized tapping 146
System variables 322
T
Table clamp and unclamp 285
Tailstock 186
Using tailstock . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
TAN function 324
Tap drill 9
Tapered end mills 89-95
Ball end . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91,94
Descriptions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Effective cutting diameter . . . . . . . . . . . . . . . . . . . . . . 91
342 Index
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com
Flat end . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90-91
Tapered holes. . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Tapered holes 96
Tapered thread 271
Tapered walls 89
Tapers 199-214
Lead-in - Lead-out . . . . . . . . . . . . . . . . . . . . . . . . . 211
Taper angle . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
Taper as a percentage . . . . . . . . . . . . . . . . . . . . . . 205
Taper per foot. . . . . . . . . . . . . . . . . . . . . . . . . 199-200
Taper ratio . . . . . . . . . . . . . . . . . . . . . . . . . . 199,203
Tapping 9,19
Feedrate reduction (underfeeding) . . . . . . . . . . . . . . . . 144
Rigid tapping method . . . . . . . . . . . . . . . . . . . . . . . 146
Standard tapping method . . . . . . . . . . . . . . . . . . . . . 143
Tap holders . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
Thread stripping . . . . . . . . . . . . . . . . . . . . . . . . . . 144
Tapping feedrate 19
Tapping mode (G63) 145
Tapping operation 143
Tapping with G32 238
Thread depth 229
Thread depth calculation 229
Thread hob 260
Thread milling 251
Benefits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
Cutter radius offset . . . . . . . . . . . . . . . . . . . . . . . . 262
Cutting direction . . . . . . . . . . . . . . . . . . . . . . . . . . 255
External and internal. . . . . . . . . . . . . . . . . . . . . . . . 255
External threads. . . . . . . . . . . . . . . . . . . . . . . . . . 260
Helical interpolation . . . . . . . . . . . . . . . . . . . . . . . . 251
Helix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
Internal threads . . . . . . . . . . . . . . . . . . . . . . . . . . 266
Lead-in and lead-out motions . . . . . . . . . . . . . . . . . . . 261
Selection of tools . . . . . . . . . . . . . . . . . . . . . . . . . 253
Simulated toolpath. . . . . . . . . . . . . . . . . . . . . . . . . 251
Thread milling in planes . . . . . . . . . . . . . . . . . . . . . . 251
Thread milling software . . . . . . . . . . . . . . . . . . . . . . 272
Z-depth calculations. . . . . . . . . . . . . . . . . . . . . . . . 263
Threading
Depth calculation . . . . . . . . . . . . . . . . . . . . . . . . . 229
Depth calculation constants. . . . . . . . . . . . . . . . . . . . 229
Depth of thread calculation . . . . . . . . . . . . . . . . . . . . 229
Distribution of depth cuts . . . . . . . . . . . . . . . . . . . . . 236
Hand of thread . . . . . . . . . . . . . . . . . . . . . . . . 231-232
Imperfect thread. . . . . . . . . . . . . . . . . . . . . . . . . . 231
Infeed angle. . . . . . . . . . . . . . . . . . . . . . . . . . 237-238
Infeed methods . . . . . . . . . . . . . . . . . . . . . . . . . . 230
Lead error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
Lead vs. pitch . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
Long thread programming. . . . . . . . . . . . . . . . . . . . . 248
Restrictions in threading. . . . . . . . . . . . . . . . . . . . . . 243
Special threads . . . . . . . . . . . . . . . . . . . . . . . . . . 228
Thread chamfering. . . . . . . . . . . . . . . . . . . . . . . . . 231
Thread forms . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
Threading feedrate . . . . . . . . . . . . . . . . . . . . . . . . 244
Threading passes 235
TIR 147
Title block 2
Tolerances 2
Tolerances in programming 58
Tool change position 111-114
Tool length offset 45,119
Tool length offset cancel 119
Tool length setting
Offset registry. . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Touch-off method. . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Tool life 58
Tool nose radius offset 62
Tool point length 18
Tool tip orientation 44,62-63
Tooling for grooves 215
Total indicator reading 147
Touch-off method of tool length 123
TPI - Threads Per Inch 229
Trial cut 134
Milling application . . . . . . . . . . . . . . . . . . . . . . . . . 134
Turning application . . . . . . . . . . . . . . . . . . . . . . . . 136
TRUE values 326
U
U and Wstock in G71/G72 cycle 173
UN thread form 227
UN threads 229
Undercuts 198
Using jaws 182
Using tailstock 186
V
Vacant variables 322
Variable stock
Milling applications. . . . . . . . . . . . . . . . . . . . . . . . . 137
Turning applications. . . . . . . . . . . . . . . . . . . . . . . . 139
Variables 319-320
Common. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
Local . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
Null variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
System. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
Variables in CNC program 318
Virtual tool point 171
V-thread 228
W
Wear offset 62-63,126
Width of cut 162
Working with planes 289
Working with tolerances 58
Index
343
CNC Programming Techniques
Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com

You might also like