cnc programming techniques

45
CNC Programming Techniques An Insider's Guide to Effective Methods and Applications First Edition CNC Programming Techniques Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com

Upload: duongtu

Post on 30-Dec-2016

406 views

Category:

Documents


20 download

TRANSCRIPT

Page 1: CNC Programming Techniques

CNCPro gram mingTech 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

Page 2: CNC Programming Techniques

CNC Programming Techniques

Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com

Page 3: CNC Programming Techniques

CNCPro gram mingTech niquesAn 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, USAhttp://www.industrialpress.com

CNC Programming Techniques

Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com

Page 4: CNC Programming Techniques

<<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 CarleoCover 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

Page 5: CNC Programming Techniques

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

Page 6: CNC Programming Techniques

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 anex 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. Smid’s long time as so ci a tion with ad vanced man u fac tur ing com pa nies and CNC ma chin eryven 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 andcon 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 oussem 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 ofhigh 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 dentsand 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

Page 7: CNC Programming Techniques

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-ROMA Com pre hen sive Guide to CNC Pro gram ming

ISBN: (0-8311-) 3158-6

and

ë Fanuc CNC Cus tom Mac ros, with CD-ROMPrac 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 whatdif 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 jectsare 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 canin dus tries, par tic u larly in the USA, I have fo cused on more ex am ples pre sented in met ric units thanthose in im pe rial units. Work ing on the prem ise that a pro fes sional CNC pro gram mer should have noprob lem work ing with ei ther units se lec tion (af ter all, num ber are num bers), many ex am ples in thishand 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 riccoun 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 thatdoes not re place my pre vi ous books, but com ple ments them in a spe cial way. In terms of sub jectscov ered, there are mi nor sim i lar i ties in some chapters, but the cov er age of each sub ject is fresh, andwith 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 theback 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 abetter 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 SmidNovember 2005

CNC Programming Techniques

Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com

Page 8: CNC Programming Techniques

CNC Programming Techniques

Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com

Page 9: CNC Programming Techniques

TABLE OF CONTENTS

1 - PART PROGRAM DEVELOPMENT 1

Pro gram De vel op ment Draw ing · · · · · · · · · · · · · · · · · · · · · · · · 1Draw ing Eval u a tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2Ma te rial and Stock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

Part Setup · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 3Part Reference Point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3Part Ori en ta tion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3Se lect ing Part Zero . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Tool ing Se lec tion · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 4Identifying Ma chin ing Op er a tions . . . . . . . . . . . . . . . . . . . . . . . . . . 4Face Milling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5Con tour Mill ing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6Cir cu lar Pocket Mill ing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6Slot Mill ing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7Spot Drill ing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8Drill ing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9Tap ping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9Sum mary of Tools Used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

Ma chin ing Data · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 10Spin dle Speed. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10Cut ting Feedrate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11Tool ing Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

De tails of Op er a tions · · · · · · · · · · · · · · · · · · · · · · · · · · · · 11Tool 1 - Face Mill ing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12Tool 2 - Out side Con tour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13Tool 2 - Cir cu lar Pocket . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Tool 3 - Slot Mill ing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16Tool 4 - Spot Drill ing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17Tool 5 - Drill ing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18Tool 6 - Tap ping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19Com plete Pro gram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

2 - CALCULATING CONTOUR POINTS 23

Tools and Knowl edge · · · · · · · · · · · · · · · · · · · · · · · · · · · · 23Math e mat i cal Knowledge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23Or ga nized Ap proach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

Pro cess of Cal cu lat ing XY Coordinates · · · · · · · · · · · · · · · · · · · · 25Step 1 - Es tab lish the Main Contour Points . . . . . . . . . . . . . . . . . . . . . . 26Step 2 - Fill-in the Co or di nate Sheet . . . . . . . . . . . . . . . . . . . . . . . . . 26Step 3 - Iden tify Calculation Zones. . . . . . . . . . . . . . . . . . . . . . . . . . 27Step 4 - Helpful Ideas for Calculations . . . . . . . . . . . . . . . . . . . . . . . . 27Step 5 - Cal cu la tions for Zone 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 29Step 6 - Cal cu la tions for Zone 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 31Up dat ing Co or di nate Sheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32Writ ing the CNC Pro gram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

ix

CNC Programming Techniques

Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com

Page 10: CNC Programming Techniques

3 - FORMULAS FOR CONTOURING 33

Con tour Point Between Two Lines (Lathe) · · · · · · · · · · · · · · · · · · · 33

Con tour Point Between Line and Arc · · · · · · · · · · · · · · · · · · · · · 34In ter sect ing Con tour Point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34Tan gent Con tour Point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

Cal cu lat ing the Sharp Point · · · · · · · · · · · · · · · · · · · · · · · · · 39

Con tour Point Between Two Arcs· · · · · · · · · · · · · · · · · · · · · · · 40In ter sect ing Arcs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40Tan gent Arcs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

4 - USING CUTTER RADIUS OFFSET 43

Gen eral Con cepts · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 43Ben e fits Of Cut ter Radius Off set. . . . . . . . . . . . . . . . . . . . . . . . . . . 44Con trol ling Cut ter Ra dius . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

Ra dius Off set Com mands · · · · · · · · · · · · · · · · · · · · · · · · · · 45Com mands G40-G41-G42 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45Us ing the D-off set Number. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

Ba sic Programming Tech niques · · · · · · · · · · · · · · · · · · · · · · · 46Cut ter Radius Ac ti va tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46Cut ter Radius Ap pli ca tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47Cut ter Radius Can cel la tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

D-off set Stored Amount · · · · · · · · · · · · · · · · · · · · · · · · · · · 47Equi dis tant Centerline - G40 Mode . . . . . . . . . . . . . . . . . . . . . . . . . 48Equi dis tant Cen ter line - G41/G42 Mode. . . . . . . . . . . . . . . . . . . . . . . . 48Draw ing Di men sions - G40 Mode . . . . . . . . . . . . . . . . . . . . . . . . . . 48Draw ing Di men sions - G41/G42 Mode . . . . . . . . . . . . . . . . . . . . . . . . 48Ra dius vs Di am e ter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

Con tour Lead-In and Lead-Out · · · · · · · · · · · · · · · · · · · · · · · · 49Methods For Lead-In - Linear Motion. . . . . . . . . . . . . . . . . . . . . . . . . 49Meth ods For Lead-In - Arc Motion . . . . . . . . . . . . . . . . . . . . . . . . . . 52Meth ods For Lead-Out - Lin ear Mo tion . . . . . . . . . . . . . . . . . . . . . . . . 53Meth ods For Lead-Out - Arc Mo tion . . . . . . . . . . . . . . . . . . . . . . . . . 53Program Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

In ter nal Con tours · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 54Linear Slot Machining . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54Cir cu lar Slot Ma chin ing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55Fin ish ing Internal Contour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

Main tain ing Di men sional Sizes · · · · · · · · · · · · · · · · · · · · · · · · 58Ba sic Rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58Han dling Di men sional Tol er ances . . . . . . . . . . . . . . . . . . . . . . . . . . 58

Handling Cutter Radius Offset Er rors · · · · · · · · · · · · · · · · · · · · · 60Com mon Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60Offset Programmed Too Late or Too Early . . . . . . . . . . . . . . . . . . . . . . 61Offset Start or End on an Arc . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

Tool Nose Ra dius Off set· · · · · · · · · · · · · · · · · · · · · · · · · · · 62Com mand Point and Ra dius Center . . . . . . . . . . . . . . . . . . . . . . . . . 62Tool Tip Orientation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63Com 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

Page 11: CNC Programming Techniques

5 - PART REVERSAL IN MILLING 67

Pro ject De scrip tion · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 67Ma te rial and Setup Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . 67Cutting Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

Ma te rial Re moval · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 68

Ma chin ing Pro cess · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 69Clamp ing 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69Clamp ing 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70

Pro gram Zero Se lec tion · · · · · · · · · · · · · · · · · · · · · · · · · · · 70First Clamp ing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70Sec ond Clamp ing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

Pro gram ming Methods · · · · · · · · · · · · · · · · · · · · · · · · · · · 72

Tool Length Settings · · · · · · · · · · · · · · · · · · · · · · · · · · · · 72First Clamp ing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73Sec 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 · · · · · · · · · · · · · · · · · · · · · · · · · 89Tool Ma te rial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90Range of Taper An gles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90Flat Tip Ta pered End Mills . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90Ball Tip Tapered End Mills . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91

Effective Diameter Cal cu la tion · · · · · · · · · · · · · · · · · · · · · · · · 91Flat Tip. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91Stock Re moval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93Ball Tip with Spec i fied Ra dius . . . . . . . . . . . . . . . . . . . . . . . . . . . 94Flat 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 · · · · · · · · · · · · · · · · · · · · · · · · · · · 98Ex act Stop Check G09 - G61 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99Au to matic Cor ner Over ride - G62 . . . . . . . . . . . . . . . . . . . . . . . . . 100Tap ping Mode - G63 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100Nor 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

Page 12: CNC Programming Techniques

Ma chine Zero Com mands - G27- G28 - G29 - G30 · · · · · · · · · · · · · · · · 104Primary Ma chine Zero Re turn - G28. . . . . . . . . . . . . . . . . . . . . . . . . 104Re turn from Ma chine Zero - G29 . . . . . . . . . . . . . . . . . . . . . . . . . . 106Ma chine Zero Re turn Po si tion Check - G27 . . . . . . . . . . . . . . . . . . . . . . 106Sec ond ary Ma chine Zero Re turn - G30 . . . . . . . . . . . . . . . . . . . . . . . 108

Position Reg is ter - G92/G50· · · · · · · · · · · · · · · · · · · · · · · · · 108G92 Position Register for Mill ing . . . . . . . . . . . . . . . . . . . . . . . . . . 109G50 Position Register for Turn ing . . . . . . . . . . . . . . . . . . . . . . . . . 111Tool Change Po si tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113Con ver sion of G50 to Ge om e try Off set . . . . . . . . . . . . . . . . . . . . . . . 117

Skip Com mand - G31 · · · · · · · · · · · · · · · · · · · · · · · · · · · 118

Other Seldom Used G-codes · · · · · · · · · · · · · · · · · · · · · · · · 119Tool Length Off set Neg a tive - G44 . . . . . . . . . . . . . . . . . . . . . . . . . 119Tool Length Off set Can cel - G49 . . . . . . . . . . . . . . . . . . . . . . . . . . 119Con clu sion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122

8 - TOOL LENGTH OFFSET CHANGE 123

Tool Length Off set · · · · · · · · · · · · · · · · · · · · · · · · · · · · 123

Offset Ad just ment· · · · · · · · · · · · · · · · · · · · · · · · · · · · · 124Prac ti cal Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124Pro gram ming Method 1 - No Offset Adjustment. . . . . . . . . . . . . . . . . . . . 125Pro gram ming Method 2 - With Offset Adjustment . . . . . . . . . . . . . . . . . . . 125Pro gram ming Method 3 - Advanced Macro Method . . . . . . . . . . . . . . . . . . 126

Offset Ad just ment - Setup for Two Parts · · · · · · · · · · · · · · · · · · · 128Method 1 - One Work Offset + One Length Off set . . . . . . . . . . . . . . . . . . . 128Method 2 - Two Work Off sets + One Length Off set . . . . . . . . . . . . . . . . . . 129Method 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 · · · · · · · · · · · · · · · · · · · · · · · · · · 134Trial Cut for Mill ing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134Trial Cut for Turn ing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136

Ir reg u lar Stock Re moval · · · · · · · · · · · · · · · · · · · · · · · · · · 137Vari able Stock in Mill ing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137Vari able Stock in Turn ing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139Sum mary of Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139

Block Skip Within A Block · · · · · · · · · · · · · · · · · · · · · · · · · 140Con flict ing Words . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140One 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 · · · · · · · · · · · · · · · · · · · · · · · · · 143Ba sic Principles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143Why Underfeed? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144Feed-In Slower - Feed-Out Faster. . . . . . . . . . . . . . . . . . . . . . . . . . 144

xii Table of Contents

CNC Programming Techniques

Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com

Page 13: CNC Programming Techniques

Rigid Tap ping Method · · · · · · · · · · · · · · · · · · · · · · · · · · · 146Ba sic Prin ci ples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146Ben e fits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147Pos si ble Prob lems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147Pro gram ming Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147

11 - POLAR COORDINATES 149

Def i ni tion and G-codes· · · · · · · · · · · · · · · · · · · · · · · · · · · 149Po lar Co or di nates and Planes . . . . . . . . . . . . . . . . . . . . . . . . . . . 150G15 - G16 Po lar Co or di nates . . . . . . . . . . . . . . . . . . . . . . . . . . . 151

Pro gram ming For mat · · · · · · · · · · · · · · · · · · · · · · · · · · · 151Toolpath Direction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153Ap pli ca tions in Planes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154

12 - SUBPROGRAM DEVELOPMENT 155

Def i ni tion and Usage · · · · · · · · · · · · · · · · · · · · · · · · · · · 155

Draw ing Evaluation · · · · · · · · · · · · · · · · · · · · · · · · · · · · 156

Subprogram Plan ning · · · · · · · · · · · · · · · · · · · · · · · · · · · 156Depth Con trol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157Width of Cut Con trol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157Cut ting Tool Se lec tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157

De vel op ing the Subprogram · · · · · · · · · · · · · · · · · · · · · · · · 158Method 1 - Full Width and Full Depth . . . . . . . . . . . . . . . . . . . . . . . . 158Method 2 - Full Width and Divided Depth . . . . . . . . . . . . . . . . . . . . . . 159Method 3 - Smaller Width and Full Depth . . . . . . . . . . . . . . . . . . . . . . 160

Round Pocket Subprogram · · · · · · · · · · · · · · · · · · · · · · · · · 162Sin gle Depth Pocket with Stepovers . . . . . . . . . . . . . . . . . . . . . . . . 162Multidepth Pocket with Stepovers . . . . . . . . . . . . . . . . . . . . . . . . . 164

Rough and Fin ish Cuts with a Subprogram · · · · · · · · · · · · · · · · · · 165One Toolpath for Two Cuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165Lead-In and Lead-Out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167Common Con tour Toolpath . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167Main 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 · · · · · · · · · · · · · · · · · · · · · · · · · · · · 171Imag i nary Tool Point. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172

Stock Al low ance · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 172Con tour Shape . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173Cut ting Tool Used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173Stock Al low ance in X and Z axes . . . . . . . . . . . . . . . . . . . . . . . . . . 173Grind ing Al low ance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174

Table of Contents xiii

CNC Programming Techniques

Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com

Page 14: CNC Programming Techniques

Tool Ap proach Tech niques - Lead-In · · · · · · · · · · · · · · · · · · · · · 176Ap proach ing the Front Face . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176Ap proach ing a Di am e ter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176Ap proach ing a Chamfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177Ap proach ing a Radius . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177Ap proaches to Avoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179

Tool Re tract Tech niques - Lead-Out · · · · · · · · · · · · · · · · · · · · · 179Re tract from a Face . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179Re tract from a Diameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180Re tract from a Chamfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180Re tract from a Radius . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181Re tracts to Avoid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181

One Job - Two Op er a tions · · · · · · · · · · · · · · · · · · · · · · · · · 182About Jaws . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182Sin gle Setup - Two Chuckings . . . . . . . . . . . . . . . . . . . . . . . . . . . 183Two Set ups - Two Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . 184

Multi Cut Fac ing · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 184Width of Cut Dis tri bu tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184

Breaking Corners · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 185Di rec tion Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186

Us ing Tailstock · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 186Types of Tailstock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187Pro gram ming a Tailstock with a Bar Stopper . . . . . . . . . . . . . . . . . . . . . 187

Us ing 45-de gree Tool · · · · · · · · · · · · · · · · · · · · · · · · · · · 189

Ma chin ing Thin Stock · · · · · · · · · · · · · · · · · · · · · · · · · · · 192Ad just ing Chuck Pres sure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192Us ing an In ner Plug / Outer Ring . . . . . . . . . . . . . . . . . . . . . . . . . . 192Us ing Spe cial Split Jaws . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192

G70/G71/G72 Cy cle Meth ods · · · · · · · · · · · · · · · · · · · · · · · · 193Pro gram ming For mats - G71 . . . . . . . . . . . . . . . . . . . . . . . . . . . 193Pro gram ming For mats - G72 . . . . . . . . . . . . . . . . . . . . . . . . . . . 194G70 - Fin ish ing Cy cle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196G71 and G72 Com pared . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196

Pro gram ming Un der cuts · · · · · · · · · · · · · · · · · · · · · · · · · · 198

Hard Turn ing · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 198

14 - PROGRAMMING TAPERS 199

What is a Taper? · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 199Taper 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 · · · · · · · · · · · · · · · · · · · · · · · · · · 206Cham fers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20645° Cham fer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207Start Cham fer with a Clearance . . . . . . . . . . . . . . . . . . . . . . . . . . 209End Cham fer with a Clearance . . . . . . . . . . . . . . . . . . . . . . . . . . . 209Other Cham fers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210

xiv Table of Contents

CNC Programming Techniques

Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com

Page 15: CNC Programming Techniques

Ta pers with Leads· · · · · · · · · · · · · · · · · · · · · · · · · · · · · 211Taper with a Lead Chamfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212Taper with a Lead Fil let. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213

15 - TECHNIQUES FOR GROOVING 215

Tool ing for Grooves · · · · · · · · · · · · · · · · · · · · · · · · · · · · 215Cutting Width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215Cut ting Depth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215Groove Lo ca tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216Set ting the Com mand Point . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216

Plunge and Re tract Method · · · · · · · · · · · · · · · · · · · · · · · · · 217G75 Cy cle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217

Grooving for Precision · · · · · · · · · · · · · · · · · · · · · · · · · · · 218Ma chin ing Pro ce dure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219Pro 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 · · · · · · · · · · · · · · · · · · · 225In sert Se lec tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225Depth Cal cu la tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226Tool Setup and Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226

16 - TECHNIQUES FOR THREADING 227

Types of Thread Forms· · · · · · · · · · · · · · · · · · · · · · · · · · · 227UN - Uni fied Na tional and Metric . . . . . . . . . . . . . . . . . . . . . . . . . . 227Other Thread Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228

Thread Depth Cal cu la tion · · · · · · · · · · · · · · · · · · · · · · · · · 229

Infeed Meth ods · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 230Tool Mo tions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231

Cut ting Con di tions · · · · · · · · · · · · · · · · · · · · · · · · · · · · 231Ac cel er a tion and De cel er a tion . . . . . . . . . . . . . . . . . . . . . . . . . . . 231Cut ting Depth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232

Hand of Thread · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 232Ex ter nal Thread ing - Right Hand Thread . . . . . . . . . . . . . . . . . . . . . . . 232Ex ter nal Thread ing - Left Hand Thread . . . . . . . . . . . . . . . . . . . . . . . 233In ter nal Thread ing - Right Hand Thread . . . . . . . . . . . . . . . . . . . . . . . 233In ter nal Thread ing - Left Hand Thread . . . . . . . . . . . . . . . . . . . . . . . . 233

Sample Thread Evaluation · · · · · · · · · · · · · · · · · · · · · · · · · 234Ini tial Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234Cut ting Con di tions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234Num ber of Threading Passes . . . . . . . . . . . . . . . . . . . . . . . . . . . 235Dis tri bu tion of Depth Cuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236

G32 Threading Method· · · · · · · · · · · · · · · · · · · · · · · · · · · 236Ra dial Infeed Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237Flank Infeed Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237Tap ping with G32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238

G92 Threading Method· · · · · · · · · · · · · · · · · · · · · · · · · · · 240

G76 Threading Method· · · · · · · · · · · · · · · · · · · · · · · · · · · 241Pro gram ming For mat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241

Table of Contents xv

CNC Programming Techniques

Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com

Page 16: CNC Programming Techniques

17 - RESTRICTIONS IN THREADING 243

Thread Pro gram ming Ba sics · · · · · · · · · · · · · · · · · · · · · · · · 243Thread ing Feedrate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244

Stan dard Example· · · · · · · · · · · · · · · · · · · · · · · · · · · · · 244Fi nal Threading Pro gram - Single Start . . . . . . . . . . . . . . . . . . . . . . . 245

Spe cial Example · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 245Fi nal Threading Pro gram - Multi Start . . . . . . . . . . . . . . . . . . . . . . . . 246

Slow Spindle Speed · · · · · · · · · · · · · · · · · · · · · · · · · · · · 247

Met ric Ap pli ca tions · · · · · · · · · · · · · · · · · · · · · · · · · · · · 247

Long Thread Programming · · · · · · · · · · · · · · · · · · · · · · · · · 248De fin ing a Long Thread . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248Lead Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249Number of Dec i mal Places . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250

18 - PRACTICAL THREAD MILLING 251

Thread Mill ing - Gen eral · · · · · · · · · · · · · · · · · · · · · · · · · · 251He li cal In ter po la tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251Is He li cal In ter po la tion Avail able ? . . . . . . . . . . . . . . . . . . . . . . . . . 252

Ben e fits of Thread Mill ing · · · · · · · · · · · · · · · · · · · · · · · · · 252

Selecting Tools · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 253Ini tial Fac tors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253Types of Thread Mill ing Cutters . . . . . . . . . . . . . . . . . . . . . . . . . . 254Ac cu racy Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254Thread Mill Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255

Cut ting Di rec tion · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 255Ex ter nal and In ter nal Thread Milling . . . . . . . . . . . . . . . . . . . . . . . . 255Climb Mill ing and Con ven tional Thread Mill ing . . . . . . . . . . . . . . . . . . . . 255Right Hand and Left Hand Thread Milling . . . . . . . . . . . . . . . . . . . . . . 255Ex ter nal Thread Mill ing Il lus trated . . . . . . . . . . . . . . . . . . . . . . . . . 256Internal Thread Mill ing Il lus trated. . . . . . . . . . . . . . . . . . . . . . . . . . 257

He lix - Helical Curve · · · · · · · · · · · · · · · · · · · · · · · · · · · · 258

Programming External Threads · · · · · · · · · · · · · · · · · · · · · · · 260Tool ing Se lec tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260Cut ting Con di tions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261Lead-In and Lead-Out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261Cut ter Ra dius Off set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262Pro gram De vel op ment - Ex ter nal Thread . . . . . . . . . . . . . . . . . . . . . . 262

Pro gram ming In ter nal Threads · · · · · · · · · · · · · · · · · · · · · · · 266Tool ing Se lec tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266Cut ting Con di tions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266Lead-In and Lead-Out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267Cut ter Ra dius Offset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267Pro 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

Page 17: CNC Programming Techniques

19 - KNURLING ON CNC LATHES 273

Knurl ing Op er a tions · · · · · · · · · · · · · · · · · · · · · · · · · · · · 273Tool ing Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273Knurl ing Pitch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274

Programming and Ma chin ing Tech niques · · · · · · · · · · · · · · · · · · · 275Tool Mo tions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275Depth and Feedrate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275

Trou ble shoot ing · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 276

20 - FOUR-AXIS LATHES 277

Gen eral Setup · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 277Tool Tip Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278

Pro gram ming Method · · · · · · · · · · · · · · · · · · · · · · · · · · · 278Spin dle Speed and Feedrate . . . . . . . . . . . . . . . . . . . . . . . . . . . 278M-Func tions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279Synchronization Func tions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279Pro gram Struc ture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279

21 - PALLET CHANGERS 283

Types of Automatic Pallets · · · · · · · · · · · · · · · · · · · · · · · · · 283Ro tary Pal lets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283Shut tle Pal lets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283Setup and Work Areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284

Pro gram ming Methods· · · · · · · · · · · · · · · · · · · · · · · · · · · 285M60 Func tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285General Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285

Pro gram ming Ex am ple · · · · · · · · · · · · · · · · · · · · · · · · · · · 286Ini tial Con di tions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286Part Pro gram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286

22 - WORKING WITH PLANES 289

Math e mat i cal Planes · · · · · · · · · · · · · · · · · · · · · · · · · · · 289

Ma chine Planes · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 290G-codes for Plane Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290

Ef fect of Planes in Programming · · · · · · · · · · · · · · · · · · · · · · · 291Planes and Circular Mo tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291Planes and Cut ter Ra dius Off set . . . . . . . . . . . . . . . . . . . . . . . . . . 293

Working With Planes In Detail · · · · · · · · · · · · · · · · · · · · · · · · 295G17 with G41 and G02 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295G17 with G42 and G03 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296G18 with G42 and G03 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297G18 with G41 and G02 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298G19 with G41 and G02 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299G19 with G42 and G03 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300

Using Right-Angle Attachment · · · · · · · · · · · · · · · · · · · · · · · 301Ba sic Con cepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301Side Face Drill ing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302Side Face Mill ing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304

Table of Contents xvii

CNC Programming Techniques

Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com

Page 18: CNC Programming Techniques

23 - PROGRAMMING CAMS 307

Overview of Cams· · · · · · · · · · · · · · · · · · · · · · · · · · · · · 307

Cam Draw ing Example · · · · · · · · · · · · · · · · · · · · · · · · · · · 308Cam RISE and FALL - Sections Eval u a tion . . . . . . . . . . . . . . . . . . . . . . 309

The RISE Sec tion · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 310Cal cu lat ing Ra dius Length . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311Cal cu lat ing XY Coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311

The FALL Sec tion · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 312Cal cu lat ing Ra dius Length . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313Cal cu lat ing XY Coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314Sum 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 · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 319Macro Def i ni tion and Call . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320Vari able Dec la ra tions and Expressions . . . . . . . . . . . . . . . . . . . . . . . 322Macro Func tions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323Branch ing and Loop ing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326

Macro De vel op ment - Bolt Cir cle· · · · · · · · · · · · · · · · · · · · · · · 327Eval u a tion of Draw ings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328Bolt Hole Macro Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329Assignment of Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330In ter nal Calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330Other Cal cu la tions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330Fi nal Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331Macro 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

Page 19: CNC Programming Techniques

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 ingdraw 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 encethe 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, allcom 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

65

433

7386

4

32.5

61

1535

R5

Ø30

Ø38

12

3

5 3.5

6x M4x0.75

ALUMINUM 606190 x 65 x 13 mm

3.2Surface finish

R4

Scale 1:1

CNC Programming Techniques

Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com

Page 20: CNC Programming Techniques

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 thedraw 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 tenbe cause of var i ous forms of copy ing may not match the orig i nal scale. The draw ing for this chap tershows 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 thatthis 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 pledraw ing spec i fies the ma te rial type and its size. Alu mi num 6061 is easy to ma chine, and fairly highspeeds 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 as90 ́ 65 ́ 13 mm (L ́ W ́ D). Here co mes the first item that will have a di rect re la tion ship with thetool ing se lec tion and ma chin ing op er a tions. Al though the length and width of the ma te rial are thesame 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 andis 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 atefeedrates, 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 lararea 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 itsorig i nal version - they are very im por tant to the CNC pro gram mer. Al ways make sure you de velopthe 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

Page 21: CNC Programming Techniques

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 toman u fac ture the part. Typ i cal items in cluded in BOM are stock items, pur chased items and var i ousother parts re quired for as sem bly. Large com plex draw ing are more likely to have BOM than smallsim 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 lookfor dou ble dimensioning, where one di men sion is in con flict with an other di men sion. Fi nally, wheneval 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, itsshape and con di tion are equally im por tant. Shape could be a sim ple block or cyl in der, it could becored 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 tionof the ma te rial in cludes the over all qual ity - such as burrs, flakes, premachining, hard ness, etc. Italso 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 thesam 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 inthe form of co or di nates, the CNC pro -gram mer has to se lect part zero. As agen eral rule, the part zero for set ups in a vise should al ways be lo cated on a nonmov 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 entedin the vise of ten in flu ences the methodof ma chin ing. Look ing at the sam pledraw ing, the part blank can be ori entedei ther hor i zon tally or ver ti cally, look ing

PART PROGRAM DEVELOPMENT 3

FIXEDJAW

MOVINGJAW

STOPPER

PARALLEL PARALLEL

90

STOCK

STOCK

65

13

6

X0Y0

Z0

1

CNC Programming Techniques

Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com

Page 22: CNC Programming Techniques

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 partwill match the draw ing. An other ben e fit is that the lower left cor ner of the part will be lo cated at thein 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 wouldbe 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, asthe 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 axespres 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 monmethod of tool length set ting is the touch-off method. Se lect ing Z0 is im por tant part of the setup. Themost 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 upa 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. Latersec 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 mentpro 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 betterchoice for end mills, Weldonä type toolholders pre vent tool spin ning, Jacobsä chucks are used fordrills, 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

Page 23: CNC Programming Techniques

One of the most im por tant ma chin ing rules is that heavier op er a tions are al ways done be fore lighterop er a tions. That does not just mean rough ing be fore fin ish ing, which is a com mon sense, it alsomeans mill ing be fore drill ing, for ex am ple. Mill ing has the ten dency to shift the ma te rial in the XYaxes, whereby drill ing pushes the ma te rial to wards the fix ture (Z-axis). The above op er a tions list issuit 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 thetop 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 manycases, the length or width of the part also de ter mines the di rec tion of the cut. The length of the part is90 mm, its width is 65 mm. If ei ther di rec tion is ac cept able, a stan dard Æ100 mm face mill would bethe best choice. A Æ75 mm face mill will only be able to face along the X-axis. If both face mills areavail able, which one is a better choice? Num ber of flutes (cut ting in serts) in the tool should also becon sid ered, to em ploy as many edges at the same time. If the Æ100 mm face mill has more cut tingedges, 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 ablecut ting con di tions. Cut ting along the Y-axis can cause the face cut ter to pull the part up. Last, andequally 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 toolpo 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 canbe ma chined. To cal cu late the max i mum shift possible, take one half of the dif fer ence be tween theface 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 area son able shift, with 2.5 mm left for edge overlap - see il lus tra tion.

PART PROGRAM DEVELOPMENT 5

15mm

SHIFT

65

Ø100

2.5 mm overlap

CNC Programming Techniques

Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com

Page 24: CNC Programming Techniques

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 whense 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 toolarge for any cut ter size, two or more passesmay be re quired, or some other method ofma chin ing needs to be se lected.

The step depth along the edges is 3.5 mmand should also be con sid ered when the cut -ting tools are se lected. For this job, the depthdoes not pres ent any spe cial dif fi cul ties, andcan 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 tualcut ting con di tions have to be con sid ered as well. Se lect ing the Æ8 mm end mill will not be a goodchoice 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 athree-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 onthe 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 besmaller 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 millse lected for con tour ing, the end mill for thepocket must be cen ter-cut ting, in or der toplunge into solid material. Cen ter-cut ting end mills are also called slot drills, be cause theywere orig i nally de signed for mill ing of stan -dard slots. High he lix, three-flute pre ci sionground cen ter-cut ting end mills, are the bestover all so lu tion to cut ting alu mi num. Threeflute end mills are of ten frowned upon - un -fairly, be cause they can not be mea sured withstan dard ver ni ers or mi crom e ters. Yet, theyof 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 endmills are also a suit able choice.

6 Chapter 1

C

S

S

S = Step widthR = Corner radiusC = Corner distance

C = ( S + R ) x 2 - R2

R

R

90°

X33

.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

Page 25: CNC Programming Techniques

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 terof the se lected cut ter must be one third of the pocket di am e ter. The rea son for the one third is thatsuch tool se lec tion guar an tees the com plete clean-up of the pocket bot tom. The cir cu lar pocket in thedraw 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 rectmath 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 allcuts 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 endmills - Æ10 mm end mill or Æ12 mm end mill. Ei ther tool will work well for the con tour ing, but onlythe Æ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 forboth 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 gletool, usu ally a cen ter-cut ting end mill. There is an es tab lished - and very spe cific - pro ce dure to cutstan dard slots (de scribed later). It in cludes a sin gle pass be tween cen ters, fol lowed by the in ter nalcon 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, soits 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 tercut ting end mill be tween slot end cen ters only - the qual ity of the slot will be very poor andso will its di men sions. Much better choice isto se lect a cen ter-cut ting end mill that is a bitsmaller than the slot width. Is the size of suchan end mill im por tant? If so, why? YES - thesize 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 leave1.5 mm per side for fin ish ing; Æ9 mm endmill 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, asrep 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 ortwo 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

35

R4 R5

1 mm STOCK

Y15.0

X73

.0

Ø8

CNC Programming Techniques

Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com

Page 26: CNC Programming Techniques

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 ofthe 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 isused 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 quitecus 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 onthe 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 withspot 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 avery 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 thedim 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 teris 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 thecham 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 theCNC part pro gram mer. Cham fers are usu ally very small, typ i cally within the range of0.125 to 0.5 mm (0.005 to 0.02 inches) at 45de grees. For small holes, the cham fer canalso 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 bythe pro grammed depth. If we choose the cham fer size to be 0.35, that means the cham fer is ap pliedon both sides of the hole cen ter line. The Æ4 mm hole with 0.35 mm per side cham fer will have acham 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 ferdi am e ter and the tool point an gle. Since the spot drill point an gle is 90°, it means the pro grammeddepth 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 DEPTHZ0Z-2.35

CNC Programming Techniques

Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com

Page 27: CNC Programming Techniques

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. Thereis a cor re la tion be tween the tap size and the pre-drill hole size. The drilled hole must be smaller thatthe 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 sourceof 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 12mm (al ready faced), which means the drillhas to pen e trate the part thick ness with its full body di am e ter. It is never a good idea to linethe end of the full drill di am e ter D with thebot tom of the part. In prac tice, the tap drillshould pen e trate not only the thick ness of thepart, but also pro vide ad di tional 1-2 mm ofbreak through clear ance. In ad di tion to thepart thick ness T and the break through clear -ance C, we also have to con sider the drillpoint length (shown as P in the il lus tra tion).In the pro gram ming sec tion, the drill datawill be cal cu lated, re sult ing in the Z-depth ofthe 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 entsno prob lems, par tic u larly for through holes. In fact, the fi nal Z-depth for the drill may be used as thefi 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 dlespeed 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 thistype of tap ping head is a float ing tap holder. Its pur pose is to pre vent tap break age, when the tap hasreached 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 usethe same num ber from one job to an other.

PART PROGRAM DEVELOPMENT 9

D = Ø3.2 DRILL

P

C=

2

T=

12

118°

Z0

CNC Programming Techniques

Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com

Page 28: CNC Programming Techniques

For this draw ing ex am ple and the pro gram development, the cut ting tools will be num bered in theiror der of use, as shown in the fol low ing ta ble, with par tic u lar descriptions:

ToolNum ber

De scrip tionSize

in mmType 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 M4´0.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 ingse lec tion. Changes in the setup will also have to be con sid ered for the newly se lected cut ting tool, orad 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 iscom monly re ferred to as se lect ing 'speeds and feeds' is much more than that. When the pro gram merreaches 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 speedper 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 minm min 1000

D=

´´p

r minft 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

Page 29: CNC Programming Techniques

Cut ting Feedrate

Feedrate can be cal cu lated from the spin dle speed, chipload per tooth and the num ber of cut tingedges (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 onthe fol low ing sur face speeds and chipload for each ma chin ing group (higher rates are possible):

ToolNum ber

De scrip tionSize

in mm

Sur facespeed inm/min

Chiploadper tooth

in mm

Spin dler/min

Feedratemm/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 M4´0.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 feedratefor both end mills, for two flutes cutting. Tap ping speed was cal cu lated by mul ti ply ing the spin dlespeed 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 thede 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 andexplain 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

Page 30: CNC Programming Techniques

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 facemill 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 alsobe se lected - or cal cu lated. As a good ma chin ing prac tice, the top face sur face fin ish will be of betterqual ity, if the cut ter starts and ends 'in the air' - away from the part. Se lect ing a 5 mm clear ance fromthe 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 ofthe 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 matstruc ture will re flect that:

(T01 - 100 MM FACE MILL - 1 MM OFF THE TOP FACE)N1 G21N2 G17 G40 G80 T01N3 M06N4 G90 G54 G00 X145.0 Y17.5 S477 M03 T02N5 G43 Z10.0 H01 M08N6 Z0N7 G01 X-55.0 F501.0N8 G00 Z10.0 M09N9 G28 Z10.0 M05N10 M01

12 Chapter 1

15mm

SHIFT

65

Ø100

2.5 mm overlap

X0

X14

5.090 55

X-5

5.0

Y0

Y17.5 Y17.5

32.5

P1P2

CNC Programming Techniques

Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com

Page 31: CNC Programming Techniques

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 thepocket. 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 mmra 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 thecon tour (a mo tion called lead-out). Be cause the con tour is closed, the lead-in and lead-out mo tionsare close to gether. In an open con tour, they may be much fur ther apart from each other, al though theba 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 andtheir 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 transferredfrom 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

X86

.0

X82

.0

X8.0

X4.0

P1 P2

P3P4 P5

P6

P7

P8P9

P10

P11

P12

R5

X-1.0

Y13.0

CNC Programming Techniques

Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com

Page 32: CNC Programming Techniques

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 T02N12 M06N13 G90 G54 G00 X-8.0 Y-8.0 S1459 M03 (P1)N14 G43 Z10.0 H02 M08N15 Z-3.5N16 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 forthe pro grammed con tour and com bin ing it with the cut ter ra dius off set (G41 … D52). When a partpro 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 isquite 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 nalamount for the off set is the cut ter ra dius (D52 = 6.000). Typ i cal to many CAD/CAM sys tems, thepro 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 willbe 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 makessense to as sign the tool length off set the same num ber the tool num ber (H02). On the other hand, notall 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, thead dress D must be pro grammed, also with the off set num ber. That pres ents a dif fi culty if the con trolsys tem has only a sin gle mem ory bank for both types of off sets, so called shared mem ory. In thiscase, the pro gram mer usu ally shifts the num ber by an ar bi trary amount (such as 50 for D52). Theshift amount can be dif fer ent, but is should al ways be higher than the num ber of tools that can bestored in the mag a zine. The amount of 50 is also about half way be tween the range of off sets, usu allyavail 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). G41spec 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

Page 33: CNC Programming Techniques

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 aclean bot tom. This cut will be pre ceded by a lead-in, and fol lowed by a lead-out. Cut ter radius off setwill 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 theil 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 issim ple, start ing at the center:

+ 1 - Lead-in line - G41 G01 in ef fect2 - Lead-in arc - G03 with 90° sweep3 - Full cir cle to cut the pocket - G034 - Lead-out arc - G03 with 90° sweep5 - Lead-out line - G40 G01 in ef fect

This pro ce dure will be ap plied to the ac tualpro gram (con tin ued):

(POCKET CUTTING - D62 = 6.000)N29 X33.0 Y32.5 (A)N30 G01 Z-5.0 Z100.0N31 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 M09N37 G28 Z10.0 M05N38 M01

Note that the cut ter ra dius off set has beenchanged - for the same tool! In stead of D52that con trols the out side con tour, D62 con -trols the fi nal size of the pocket. The ra diusamount stored in the con trol could be thesame for both ap pli ca tions, but the op er a torcan 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 cutswould be nec es sary, per haps even two tools. How ever, the pro gram ming pro ce dure de scribed herewill re main ex actly the same.

PART PROGRAM DEVELOPMENT 15

Rp

Rt

Ra

Rp = Radius of pocketRt = Radius of toolRa = Radius of lead arc

Ra > Rt < Rp

X33

.0

Y32.5

Ø30

Ø12

R13

X35.0Y45.5

A

B

E

CD

X35.0Y19.5

Rp = 15 mmRt = 6 mmRa = 13 mm

Ra > Rt < Rp

X48.0Y32.5

CNC Programming Techniques

Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com

Page 34: CNC Programming Techniques

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 thelead 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 arapid move to the cen ter of one slot ra dius inXY axes, feeds to the full depth of 3 mm andmakes a straight cut to the cen ter of the op po -site ra dius.

The ques tion 'which slot end should I startfrom?' is un nec es sary - start from ei ther end,it makes no dif fer ence in ma chin ing at all. Inthe ex am ple, the tool will rough the slot fromits up per po si tion to its lower po si tion, asshown at right:

(T03 - 8 MM CENTER-CUTTING E/MILL)(D53 = 4.000)N39 T03N40 M06N41 G90 G54 G00 X73.0 Y50.0 S2188 M03 T04N42 G43 Z10.0 H03 M08N43 Z2.0N44 G01 Z-3.0 F100.0N45 Y15.0 F263.0 … will continue for slot finishing

Ra dius of the tool Rt is 4 mm, ra dius of theslot Rs is 5 mm. As the lead arc Ra must besome where be tween these two val ues, there is not much flex i bil ity here. For the ex am ple inthis chapter, the lead arc ra dius Ra will be 4.5 mm. The pro grammed toolpath will fol lowthe same pro cess al ready es tab lished for thecir cu lar pocket toolpath, but in stead of thepocket be ing ma chined, it will be the slot:

(SLOT FINISHING)N46 G41 X73.5 Y10.5 D53N47 G03 X78.0 Y15.0 I0 J4.5N48 G01 Y50.0N49 G03 X68.0 I-5.0 J0N50 G01 Y15.0N51 G03 X78.0 I5.0 J0N52 X73.5 Y19.5 I-4.5 J0N53 G40 G01 X73.0 Y15.0N54 G00 Z10.0 M09N55 G28 Z10.0 M05N56 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

35

R5

Y15.0

X73

.0

Y50.0

35

Y15.0

X73

.0

Y50.0

X68

.0

X78

.0

Ra

Rs

R5

Rt

X78

.0

Y15.0

Y19.5

Y10.5

X73

.5X73

.0Rs = 5 mmRt = 4 mmRa = 4.5 mm

CNC Programming Techniques

Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com

Page 35: CNC Programming Techniques

Tool 4 - Spot Drill ing

There are two major dif fer ences be tween astan dard drill and a spot drill. One is in thetool de sign, the other in the way the tool isused. The de sign be tween the two drill typesaf fects the flutes, the web thick ness, the over -all length, and the tool point an gle. The wayhow the two types of drill are used is a ma jorcon sid er ation when pro gram ming. In the ear -lier sec tion cov er ing the tool se lec tion, thede tails for us ing the spot drill for this ex am ple has al ready been cov ered, and the il lus tra tionis pre sented as a ref er ence.

In a sum mary, the spot drill depth of eachhole spotted will be Z-2.35, at the cal cu latedXY 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 XYco or di nates of the six holes, which means a good cal cu la tor will be needed. Once these co or di natesare 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. Onthe 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(0´60+0)´19+33 = X52.0 H1(Y)=sin(0´60+0)´19+32.5 = X32.5H2(X)=cos(1´60+0)´19+33 = X42.5 H2(Y)=sin(1´60+0)´19+32.5 = X48.954H3(X)=cos(2´60+0)´19+33 = X23.5 H3(Y)=sin(2´60+0)´19+32.5 = X48.954H4(X)=cos(3´60+0)´19+33 = X14.0 H4(Y)=sin(3´60+0)´19+32.5 = X32.5H5(X)=cos(4´60+0)´19+33 = X23.5 H5(Y)=sin(4´60+0)´19+32.5 = X16.046H6(X)=cos(5´60+0)´19+33 = X42.5 H6(Y)=sin(5´60+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 DEPTHZ0Z-2.35

B

A

n=H-1

n=n+1

n=1

Xc

Yc

33

32.5

R19

RB=60°

X = cos (n x B + A) x R + Xc

A=0°

n=0n=3

n=5n=4

n=1n=2

Ø38

General concepts Y = sin (n x B + A) x R + Yc

Formula for XY hole coordinates:

H1

H2H3

H6H5

H4

CNC Programming Techniques

Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com

Page 36: CNC Programming Techniques

(T04 - 10 MM SPOT DRILL - CHAMFER DIAMETER = 4.7)N57 T04N58 M06N59 G90 G54 G00 X52.0 Y32.5 S1693 M03 T05N60 G43 Z10.0 H04 M08N61 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 M09N68 G28 Z10.0 M05N69 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 tomof 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 ofthe 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 arein 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 blesit 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 beenes tab lish ear lier, in the tool se lec tion sec tionof this chap ter. Ad di tional pro gram ming de -ci sions fo cus on the method of drill ing thehole - 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 peckdrill ing - is not needed in this ex am ple. Forholes that pen e trate the ma te rial - so calledthrough holes - the pro gram must pro vide abreak through clear ance C (2 mm in the ex am -ple). In ad di tion, the tool point length P (alsoknown as the drill pont length), has to be cal -cu lated. Con stant of 0.3 is used for stan dardtwist drills, with 118° point an gle. Add ing the break through clear ance C and the drill pointlength 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

xD

=0.96

mm

C=

2

T=

12

118°

Z0

Z-14.96

CNC Programming Techniques

Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com

Page 37: CNC Programming Techniques

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 T05N71 M06N72 G90 G54 G00 X52.0 Y32.5 S2487 M03 T06N73 G43 Z10.0 H05 M08N74 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 M09N81 G28 Z10.0 M05N82 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 berand 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 noneed 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 aswell. 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 T06N84 M06N85 G90 G54 G00 X52.0 Y32.5 S796 M03 T01N86 G43 Z10.0 H06 M08N87 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 M09N94 G28 Z10.0 M05N95 G28 X42.4 Y16.046N96 M30%

Note the in creased feed level clear ance (R-level) - the in crease is an ad just ment needed to ab sorbfeed ac cel er a tion be fore the tool touches the part, due to heavy feedrate. The feedrate it self is al waysa 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

Page 38: CNC Programming Techniques

Com plete Pro gram

(T01 - 100 MM FACE MILL - 1 MM OFF THE TOP FACE)N1 G21N2 G17 G40 G80 T01N3 M06N4 G90 G54 G00 X145.0 Y17.5 S477 M03 T02N5 G43 Z10.0 H01 M08N6 Z0N7 G01 X-55.0 F501.0N8 G00 Z10.0 M09N9 G28 Z10.0 M05N10 M01

(T02 - 12 MM CENTER-CUTTING E/MILL)(OUTSIDE CONTOUR CUTTING - D52 = 6.000)N11 T02N12 M06N13 G90 G54 G00 X-8.0 Y-8.0 S1459 M03 (P1)N14 G43 Z10.0 H02 M08N15 Z-3.5N16 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.0N31 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 M09N37 G28 Z10.0 M05N38 M01

(T03 - 8 MM CENTER-CUTTING E/MILL)(D53 = 4.000)N39 T03N40 M06N41 G90 G54 G00 X73.0 Y50.0 S2188 M03 T04N42 G43 Z10.0 H03 M08N43 Z2.0N44 G01 Z-3.0 F100.0N45 Y15.0 F263.0(SLOT FINISHING)N46 G41 X73.5 Y10.5 D53N47 G03 X78.0 Y15.0 I0 J4.5N48 G01 Y50.0N49 G03 X68.0 I-5.0 J0N50 G01 Y15.0N51 G03 X78.0 I5.0 J0N52 X73.5 Y19.5 I-4.5 J0N53 G40 G01 X73.0 Y15.0

20 Chapter 1

CNC Programming Techniques

Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com

Page 39: CNC Programming Techniques

N54 G00 Z10.0 M09N55 G28 Z10.0 M05N56 M01

(T04 - 10 MM SPOT DRILL - CHAMFER DIAMETER = 4.7)N57 T04N58 M06N59 G90 G54 G00 X52.0 Y32.5 S1693 M03 T05N60 G43 Z10.0 H04 M08N61 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 M09N68 G28 Z10.0 M05N69 M01

(T05 - 3.2 MM TAP DRILL - THROUGH)N70 T05N71 M06N72 G90 G54 G00 X52.0 Y32.5 S2487 M03 T06N73 G43 Z10.0 H05 M08N74 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 M09N81 G28 Z10.0 M05N82 M01

(T06 - M4x0.75 TAP DRILL - THROUGH)N83 T06N84 M06N85 G90 G54 G00 X52.0 Y32.5 S796 M03 T01N86 G43 Z10.0 H06 M08N87 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 M09N94 G28 Z10.0 M05N95 G28 X42.4 Y16.046N96 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 somany 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 bebetter than the one shown here. That is all to be ex pected. Af ter all, CNC pro gram ming is al most likefol low ing a rec ipe - the in gre di ents are there, even the pro cess - but it still needs the skilled hand ofthe 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

Page 40: CNC Programming Techniques

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

Page 41: CNC Programming Techniques

INDEX

!# symbol · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 318

AAcceleration · · · · · · · · · · · · · · · · · · · · · · · · · 143,231

ACOS function · · · · · · · · · · · · · · · · · · · · · · · · · · 324

Angular head setting · · · · · · · · · · · · · · · · · · · · · · · 303

APC · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 283

ASIN function · · · · · · · · · · · · · · · · · · · · · · · · · · · 324

ATAN function · · · · · · · · · · · · · · · · · · · · · · · · · · 324

Automatic corner breaking · · · · · · · · · · · · · · · · · · · · 185Direction specification . . . . . . . . . . . . . . . . . . . . . . . 186

Automatic corner override · · · · · · · · · · · · · · · · · · · · · 100

Automatic Pallet Changer - APC· · · · · · · · · · · · · · · · · · 283

Axis substitution· · · · · · · · · · · · · · · · · · · · · · · · · · 292

BBack 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-142Block skip within a block. . . . . . . . . . . . . . . . . . . . . . 140Irregular stock removal . . . . . . . . . . . . . . . . . . . . . . 137Numbering block skips . . . . . . . . . . . . . . . . . . . . . . 142ON and OFF modes . . . . . . . . . . . . . . . . . . . . . . . . 131Similar parts application . . . . . . . . . . . . . . . . . . . . . . 132Slash symbol . . . . . . . . . . . . . . . . . . . . . . . . . . . 131Switch setting . . . . . . . . . . . . . . . . . . . . . . . . . . . 133Trial cut application . . . . . . . . . . . . . . . . . . . . . . . . 134Used within a block . . . . . . . . . . . . . . . . . . . . . . . . 140

Bolt hole pattern · · · · · · · · · · · · · · · · · · · · · · · · · 152

BoringOffset errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

Box threading cycle · · · · · · · · · · · · · · · · · · · · · · · · 240

Breaktrough clearance · · · · · · · · · · · · · · · · · · · · · · · 18

Bull nose end mills · · · · · · · · · · · · · · · · · · · · · · · · 297

CCalculation zones · · · · · · · · · · · · · · · · · · · · · · · · · 27

Cams · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 307Angle orientation. . . . . . . . . . . . . . . . . . . . . . . . . . 309Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307Best curve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309Cam zero . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309Contour spline . . . . . . . . . . . . . . . . . . . . . . . . . . . 309

Events of a cam cycle . . . . . . . . . . . . . . . . . . . . . . . 307Motion transfer. . . . . . . . . . . . . . . . . . . . . . . . . . . 307Origin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307Spline 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-32Formulas for calculations . . . . . . . . . . . . . . . . . . . . 33-42Intersecting arcs . . . . . . . . . . . . . . . . . . . . . . . . . . 40Intersecting point . . . . . . . . . . . . . . . . . . . . . . . . . . 34Sharp point calculation . . . . . . . . . . . . . . . . . . . . . . . 39Tangent arcs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41Tangent 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-66Benefits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44Commands G40-G41-G42 . . . . . . . . . . . . . . . . . . . . . 45D-address . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45-47Drawing dimensions . . . . . . . . . . . . . . . . . . . . . . . . 48Equidistant toolpath . . . . . . . . . . . . . . . . . . . . . . . . . 48Error handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60Excessive cutting. . . . . . . . . . . . . . . . . . . . . . . . 61,172General concepts . . . . . . . . . . . . . . . . . . . . . . . . . . 43Insufficient cutting . . . . . . . . . . . . . . . . . . . . . . . 64,172Lead-in and lead-out . . . . . . . . . . . . . . . . . . . . . . . . 49Line-Arc lead-in and lead-out . . . . . . . . . . . . . . . . . . . . 52Line-Line lead-in and lead-out . . . . . . . . . . . . . . . . . . . 49Maintaining tolerances . . . . . . . . . . . . . . . . . . . . . . . 58Missing axis motion . . . . . . . . . . . . . . . . . . . . . . . . . 52Offset activation . . . . . . . . . . . . . . . . . . . . . . . . . . . 46Offset application . . . . . . . . . . . . . . . . . . . . . . . . . . 47Offset cancellation . . . . . . . . . . . . . . . . . . . . . . . . . 47Programming techniques . . . . . . . . . . . . . . . . . . . . . . 46Radius vs diameter . . . . . . . . . . . . . . . . . . . . . . . . . 48Tool nose radius . . . . . . . . . . . . . . . . . . . . . . . . . . 62

Cycle start · · · · · · · · · · · · · · · · · · · · · · · · · · · · 318

DD-address · · · · · · · · · · · · · · · · · · · · · · · · · · · 45-48

Datum shift · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 85

339

CNC Programming Techniques

Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com

Page 42: CNC Programming Techniques

Deceleration · · · · · · · · · · · · · · · · · · · · · · · · · 143,231

Dimensions · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 2

Distance-to-go · · · · · · · · · · · · · · · · · · · · · · · · · · · 60

Drawing units · · · · · · · · · · · · · · · · · · · · · · · · · · · · 2

Drill point length · · · · · · · · · · · · · · · · · · · · · · · · · · 18

Drilling · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 9,18Peck drilling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

Dwell· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 18Minimum dwell . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

EEffective 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

FFace cut · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 134

Multicut facing . . . . . . . . . . . . . . . . . . . . . . . . . . . 184Offset errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64

Face millingCutting direction . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

FALSE values· · · · · · · · · · · · · · · · · · · · · · · · · · · 326

Fanuc Macro B · · · · · · · · · · · · · · · · · · · · · · · · · · 126

Fanuc User Macros B · · · · · · · · · · · · · · · · · · 146,251,317

Feedrate · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 11

Fixed cyclesR-level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134

Fixed cycles in planes· · · · · · · · · · · · · · · · · · · · · · · 301Depth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303Initial level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303R-level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303Using G81 drilling cycle . . . . . . . . . . . . . . . . . . . . . . 303

Floating tap holder · · · · · · · · · · · · · · · · · · · · · · · · 143

Formulas in calculations · · · · · · · · · · · · · · · · · · · · · · 33

Four-axis latheGeneral setup . . . . . . . . . . . . . . . . . . . . . . . . . . . 277Program structure . . . . . . . . . . . . . . . . . . . . . . . . . 279Programming method . . . . . . . . . . . . . . . . . . . . . . . 278Special M-functions . . . . . . . . . . . . . . . . . . . . . . . . 279Spindle speed and feedrate . . . . . . . . . . . . . . . . . . . . 278Tool tip orientation numbers . . . . . . . . . . . . . . . . . . . . 278Waiting codes . . . . . . . . . . . . . . . . . . . . . . . . . . . 279

Functions· · · · · · · · · · · · · · · · · · · · · · · · · · · 319-320

GG00 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 operationsCommand point . . . . . . . . . . . . . . . . . . . . . . . . . . 216Cutting depth . . . . . . . . . . . . . . . . . . . . . . . . . . . 215Cutting width . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215Deep groove . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221Face grooving . . . . . . . . . . . . . . . . . . . . . . . . . . . 226General topics . . . . . . . . . . . . . . . . . . . . . . . . . . . 215Groove location . . . . . . . . . . . . . . . . . . . . . . . . . . 216Grooves with tapers . . . . . . . . . . . . . . . . . . . . . . . . 222Grooving for precision . . . . . . . . . . . . . . . . . . . . . . . 218Offset errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66Part-Off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221Plunge and retract . . . . . . . . . . . . . . . . . . . . . . . . . 217Pulley grooves . . . . . . . . . . . . . . . . . . . . . . . . . . . 225

HHard turning · · · · · · · · · · · · · · · · · · · · · · · · · 175,198

340 Index

CNC Programming Techniques

Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com

Page 43: CNC Programming Techniques

Headstock · · · · · · · · · · · · · · · · · · · · · · · · · · · · 186

Helical interpolation · · · · · · · · · · · · · · · · · · · · · · · · 251Availability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252

Helix · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 258

Hole chamfering · · · · · · · · · · · · · · · · · · · · · · · · · · · 8

IImaginary 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

KKnurling · · · · · · · · · · · · · · · · · · · · · · · · · · · 273-276

Depth and feedrate . . . . . . . . . . . . . . . . . . . . . . . . 275Knurling pitch . . . . . . . . . . . . . . . . . . . . . . . . . . . 274Programming and machining . . . . . . . . . . . . . . . . . . . 275Tool motions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . 276Types of knurl . . . . . . . . . . . . . . . . . . . . . . . . . . . 273

LLathe cycles

P and Q blocks . . . . . . . . . . . . . . . . . . . . . . . . 194-195Lathe jaws · · · · · · · · · · · · · · · · · · · · · · · · · · · · 182

Hard jaws . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182Soft jaws . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182

LE function · · · · · · · · · · · · · · · · · · · · · · · · · · · · 326

Lead · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 244Lead 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 · · · · · · · · · · · · · · · · · · · · · · · · · 319AND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326EQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326GE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326GT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326LE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326LT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326NE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326OR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326XOR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326

MM00 function · · · · · · · · · · · · · · · · · · · · · · · · · · · 183

Machine zero · · · · · · · · · · · · · · · · · · · · · · · · · · · 114

Machine zero commands · · · · · · · · · · · · · · · · · · · · · 104

Machine zero position · · · · · · · · · · · · · · · · · · · · · · · 116

Machining corners · · · · · · · · · · · · · · · · · · · · · · · · 185

Machining operations · · · · · · · · · · · · · · · · · · · · · · · · 4

Machining thin stockAdjusting chuck pressure . . . . . . . . . . . . . . . . . . . . . 192Using an inner plug . . . . . . . . . . . . . . . . . . . . . . . . 192Using special split jaws . . . . . . . . . . . . . . . . . . . . . . 192

Macro in main program · · · · · · · · · · · · · · · · · · · · · · 319

Macro programming· · · · · · · · · · · · · · · · · · · · · · · · 317

Macros · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 251Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320Bolt hole circle pattern . . . . . . . . . . . . . . . . . . . . . . . 327Bolt hole example . . . . . . . . . . . . . . . . . . . . . . . . . 329Bolt hole pattern example . . . . . . . . . . . . . . . . . . . . . 327Branching and looping . . . . . . . . . . . . . . . . . . . . 320,326Evaluation of drawings . . . . . . . . . . . . . . . . . . . . . . 328Features and applications . . . . . . . . . . . . . . . . . . . . . 318Functions and constants. . . . . . . . . . . . . . . . . . . . . . 320Introduction to macros . . . . . . . . . . . . . . . . . . . . 317-332Local variables. . . . . . . . . . . . . . . . . . . . . . . . . . . 321Logical functions . . . . . . . . . . . . . . . . . . . . . . . 320,326Macro call . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320Macro functions . . . . . . . . . . . . . . . . . . . . . . . . . . 323Rounding functions . . . . . . . . . . . . . . . . . . . . . . . . 324Skills required . . . . . . . . . . . . . . . . . . . . . . . . . . . 317Variable declarations . . . . . . . . . . . . . . . . . . . . . . . 322Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 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,227External cutting . . . . . . . . . . . . . . . . . . . . . . . . . . 197G70 cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196G71 and G72 compared . . . . . . . . . . . . . . . . . . . . . . 196G72 cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194Internal cutting . . . . . . . . . . . . . . . . . . . . . . . . . . . 197Pattern repeating cycle . . . . . . . . . . . . . . . . . . . . . . 197Programming formats . . . . . . . . . . . . . . . . . . . . . . . 193

NNominal dimensions · · · · · · · · · · · · · · · · · · · · · · · · 58

Normal cutting mode · · · · · · · · · · · · · · · · · · · · · · · · 99

Null variables · · · · · · · · · · · · · · · · · · · · · · · · · · · 322

OOptional 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

Page 44: CNC Programming Techniques

PPalletization· · · · · · · · · · · · · · · · · · · · · · · · · · · · 284

Pallets · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 283Transfer methods . . . . . . . . . . . . . . . . . . . . . . . . . 283Types of pallets . . . . . . . . . . . . . . . . . . . . . . . . . . 283

Parametric programming · · · · · · · · · · · · · · · · · 317,327-330

Part orientation · · · · · · · · · · · · · · · · · · · · · · · · · · · 3

Part reversal - lathe· · · · · · · · · · · · · · · · · · · · · · 182-183

Part reversal - mill · · · · · · · · · · · · · · · · · · · · · · · · 67-88Machining process . . . . . . . . . . . . . . . . . . . . . . . . . 69Program zero selection . . . . . . . . . . . . . . . . . . . . . . . 70Programming methods . . . . . . . . . . . . . . . . . . . . . . . 72Tool length settings . . . . . . . . . . . . . . . . . . . . . . . . . 72Using work offset . . . . . . . . . . . . . . . . . . . . . . . . . . 74

Part zero · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 3-4

Partial arc · · · · · · · · · · · · · · · · · · · · · · · · · · · 35,178

Part-Off · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 221

Pitch · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 229,244

Plane selection · · · · · · · · · · · · · · · · · · · · · · · · · · 251

PlanesAngular head setting. . . . . . . . . . . . . . . . . . . . . . . . 303Circular motion . . . . . . . . . . . . . . . . . . . . . . . . 291-292Circular motions . . . . . . . . . . . . . . . . . . . . . . . . . . 296Cutter radius offset . . . . . . . . . . . . . . . . . . . . . . . . 293Effect of planes in programming. . . . . . . . . . . . . . . . . . 291Machine planes . . . . . . . . . . . . . . . . . . . . . . . . . . 290Mathematical definition . . . . . . . . . . . . . . . . . . . . . . 289Preparatory commands . . . . . . . . . . . . . . . . . . . . . . 290Side face drilling . . . . . . . . . . . . . . . . . . . . . . . . . . 302Side face milling . . . . . . . . . . . . . . . . . . . . . . . . . . 304

Planes and fixed cycles · · · · · · · · · · · · · · · · · · · · · · 301

PocketingFinishing rectangular pocket . . . . . . . . . . . . . . . . . . . . 56

Polar coordinate system · · · · · · · · · · · · · · · · · · · 149-154G-codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149Planes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150,154Programming format . . . . . . . . . . . . . . . . . . . . . . . . 151Toolpath direction . . . . . . . . . . . . . . . . . . . . . . . . . 153

Program development · · · · · · · · · · · · · · · · · · · · · · · · 1Drawing evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . 2Machining data . . . . . . . . . . . . . . . . . . . . . . . . . . . 10Material and stock . . . . . . . . . . . . . . . . . . . . . . . . . . 3Part setup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3Selecting part zero . . . . . . . . . . . . . . . . . . . . . . . . . . 4Tooling selection . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Program stop · · · · · · · · · · · · · · · · · · · · · · · · · · · 183

Program zero selection · · · · · · · · · · · · · · · · · · · · · · 169

Pulley groovesDepth calculation . . . . . . . . . . . . . . . . . . . . . . . . . 226Insert selection. . . . . . . . . . . . . . . . . . . . . . . . . . . 225Tool setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226

Pythagorean Theorem· · · · · · · · · · · · · · · · · · 34,41-42,178

RRear 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 · · · · · · · · · · · · · · · · · · · · · · · · · · · 146Benefits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146Possible problems . . . . . . . . . . . . . . . . . . . . . . . . . 147Programming approach . . . . . . . . . . . . . . . . . . . . . . 147Special functions. . . . . . . . . . . . . . . . . . . . . . . . . . 148Spindle speed . . . . . . . . . . . . . . . . . . . . . . . . . . . 147

R-level · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 134

ROUND function · · · · · · · · · · · · · · · · · · · · · · · · · 324

SSIN function· · · · · · · · · · · · · · · · · · · · · · · · · · · · 324

Single direction positioning · · · · · · · · · · · · · · · · · · · · · 97

Skip command · · · · · · · · · · · · · · · · · · · · · · · · · · 118

Slot machiningCircular slot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55Linear 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· · · · · · · · · · · · · · · · · · · · · · · · · · 172Allowance for grinding . . . . . . . . . . . . . . . . . . . . . . . 174Compound stock. . . . . . . . . . . . . . . . . . . . . . . . . . 174Depth of cut calculation . . . . . . . . . . . . . . . . . . . . . . 174Lead angle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173U and W programming . . . . . . . . . . . . . . . . . . . . . . 173

Stored stroke limits · · · · · · · · · · · · · · · · · · · · · · · · 101

SubprogramCutting Tool Selection . . . . . . . . . . . . . . . . . . . . . . . 157Definition and usage. . . . . . . . . . . . . . . . . . . . . . . . 155Depth control . . . . . . . . . . . . . . . . . . . . . . . . . 157,164Development. . . . . . . . . . . . . . . . . . . . . . . . . . . . 158Drawing evaluation . . . . . . . . . . . . . . . . . . . . . . . . 156Planning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156Roughing and finishing . . . . . . . . . . . . . . . . . . . . . . 165Round pocket . . . . . . . . . . . . . . . . . . . . . . . . . . . 162Stepovers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162Width of cut control . . . . . . . . . . . . . . . . . . . . . . . . 157

Surface finish · · · · · · · · · · · · · · · · · · · · · · · · · · · · 2

Synchronized tapping · · · · · · · · · · · · · · · · · · · · · · · 146

System variables · · · · · · · · · · · · · · · · · · · · · · · · · 322

TTable clamp and unclamp · · · · · · · · · · · · · · · · · · · · · 285

Tailstock · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 186Using tailstock . . . . . . . . . . . . . . . . . . . . . . . . . . . 187

TAN function · · · · · · · · · · · · · · · · · · · · · · · · · · · 324

Tap drill · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 9

Tapered end mills · · · · · · · · · · · · · · · · · · · · · · · · 89-95Ball end . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91,94Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89Effective cutting diameter . . . . . . . . . . . . . . . . . . . . . . 91

342 Index

CNC Programming Techniques

Copyright 2006, Industrial Press Inc., New York, NY - www.industrialpress.com

Page 45: CNC Programming Techniques

Flat end . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90-91Tapered holes. . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

Tapered holes · · · · · · · · · · · · · · · · · · · · · · · · · · · 96

Tapered thread · · · · · · · · · · · · · · · · · · · · · · · · · · 271

Tapered walls · · · · · · · · · · · · · · · · · · · · · · · · · · · 89

Tapers · · · · · · · · · · · · · · · · · · · · · · · · · · · · 199-214Lead-in - Lead-out . . . . . . . . . . . . . . . . . . . . . . . . . 211Taper angle . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206Taper as a percentage . . . . . . . . . . . . . . . . . . . . . . 205Taper per foot . . . . . . . . . . . . . . . . . . . . . . . . . 199-200Taper ratio . . . . . . . . . . . . . . . . . . . . . . . . . . 199,203

Tapping · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 9,19Feedrate reduction (underfeeding) . . . . . . . . . . . . . . . . 144Rigid tapping method . . . . . . . . . . . . . . . . . . . . . . . 146Standard tapping method . . . . . . . . . . . . . . . . . . . . . 143Tap holders . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143Thread 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· · · · · · · · · · · · · · · · · · · · · · · · · · · 251Benefits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252Cutter radius offset . . . . . . . . . . . . . . . . . . . . . . . . 262Cutting direction . . . . . . . . . . . . . . . . . . . . . . . . . . 255External and internal. . . . . . . . . . . . . . . . . . . . . . . . 255External threads . . . . . . . . . . . . . . . . . . . . . . . . . . 260Helical interpolation . . . . . . . . . . . . . . . . . . . . . . . . 251Helix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258Internal threads . . . . . . . . . . . . . . . . . . . . . . . . . . 266Lead-in and lead-out motions . . . . . . . . . . . . . . . . . . . 261Selection of tools . . . . . . . . . . . . . . . . . . . . . . . . . 253Simulated toolpath . . . . . . . . . . . . . . . . . . . . . . . . . 251Thread milling in planes . . . . . . . . . . . . . . . . . . . . . . 251Thread milling software . . . . . . . . . . . . . . . . . . . . . . 272Z-depth calculations . . . . . . . . . . . . . . . . . . . . . . . . 263

ThreadingDepth calculation . . . . . . . . . . . . . . . . . . . . . . . . . 229Depth calculation constants . . . . . . . . . . . . . . . . . . . . 229Depth of thread calculation . . . . . . . . . . . . . . . . . . . . 229Distribution of depth cuts . . . . . . . . . . . . . . . . . . . . . 236Hand of thread . . . . . . . . . . . . . . . . . . . . . . . . 231-232Imperfect thread . . . . . . . . . . . . . . . . . . . . . . . . . . 231Infeed angle. . . . . . . . . . . . . . . . . . . . . . . . . . 237-238Infeed methods . . . . . . . . . . . . . . . . . . . . . . . . . . 230Lead error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249Lead vs. pitch . . . . . . . . . . . . . . . . . . . . . . . . . . . 244Long thread programming . . . . . . . . . . . . . . . . . . . . . 248Restrictions in threading . . . . . . . . . . . . . . . . . . . . . . 243Special threads . . . . . . . . . . . . . . . . . . . . . . . . . . 228Thread chamfering. . . . . . . . . . . . . . . . . . . . . . . . . 231Thread forms . . . . . . . . . . . . . . . . . . . . . . . . . . . 227Threading 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 settingOffset registry . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

Touch-off method. . . . . . . . . . . . . . . . . . . . . . . . . . . 4Tool 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 · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 134Milling application . . . . . . . . . . . . . . . . . . . . . . . . . 134Turning application . . . . . . . . . . . . . . . . . . . . . . . . 136

TRUE values · · · · · · · · · · · · · · · · · · · · · · · · · · · 326

UU and W stock in G71/G72 cycle · · · · · · · · · · · · · · · · · 173

UN thread form · · · · · · · · · · · · · · · · · · · · · · · · · · 227

UN threads · · · · · · · · · · · · · · · · · · · · · · · · · · · · 229

Undercuts· · · · · · · · · · · · · · · · · · · · · · · · · · · · · 198

Using jaws · · · · · · · · · · · · · · · · · · · · · · · · · · · · 182

Using tailstock · · · · · · · · · · · · · · · · · · · · · · · · · · 186

VVacant variables · · · · · · · · · · · · · · · · · · · · · · · · · 322

Variable stockMilling applications. . . . . . . . . . . . . . . . . . . . . . . . . 137Turning applications . . . . . . . . . . . . . . . . . . . . . . . . 139

Variables · · · · · · · · · · · · · · · · · · · · · · · · · · · 319-320Common . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322Local . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322Null variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322System. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322

Variables in CNC program · · · · · · · · · · · · · · · · · · · · 318

Virtual tool point· · · · · · · · · · · · · · · · · · · · · · · · · · 171

V-thread · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 228

WWear 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