You are on page 1of 529

CNC

Programming
H ndbook
Second Edition
c C
Programming
Handbook
Second Edition
A Camp hensiv uid Practical CNC rogramming

t r mi

989 ue York, NY lOO 18


.com
Li of Congress Cataloging-in-Publication Data

Smid, Peter.
CNC programming handbook: comprehensive guide to practical CNC programming!
Smid.

11-3158-6
1. Machine-louls--Numerical control--Programming --Handbooks, manuals,etc ..I.
Title.

TJ1189 .S 2000
1.9'023--dc21
00-023974

Second on

CNC Programming Handbook

Industrial Press Inc.


989 ue of Americas, w York, NY 10018

Copyright 2003. in the United States America.

This book or parts thereof may not reproduced, stored in a retrieval


system. or transmitted in any form without tbe permission of publishers.

5678910
Dedication
To my my mother dmila,
who never to give
Acknowledgments
In this second edition of the CNC Programming Handbook, I would like to express my
thanks and appreciation to Peter Eigler for being the bottomless source of new ideas,
knowledge and inspiration - all that in more ways than one. My thanks also go to Eugene
Chishow, for his always quick thinking and his ability to point out the elusive detail or two
that I might have missed otherwise. To Ed Janzen, I thank for the many suggestions he of-
fered and for always being able to see the bigger picture. To Greg Prentice, the President of
GLP Technologies, Inc., - and my early mentor - you will always be my very good friend.

Even after three years of improving the CNC Programming Handbook and developing the
enclosed compact disc, my wife Joan will always deserve my thanks and my gratitude. To
my son Michael and my daughter Michelle - you guys have contributed to this handbook in
more ways than you can ever imagine.

I have also made a reference to several manufacturers and software developers in the
book. It is only fair to acknowledge their names:

• FANUC and CUSTOM MACRO or USER MACRO or MACRO B


are registered trademarks of Fujitsu-Fanuc, Japan

• GE FANUC is a registered trademark of GE Fanuc Automation, Inc.,


Charlottesville, VA, USA

• MASTERCAM is the registered trademark of eNC Software Inc.,


Tolland, CT, USA

• AUTOCAD is a registered trademark of Autodesk, Inc.,


San Rafael, CA, USA

• HP and HPGL are registered trademarks of Hewlett-Packard, Inc.,


Palo Alto, CA, USA

.. IBM is a registered trademark of International Business Machines, Inc.,


Armonk, NY, USA

.. WINDOWS is a registered trademarks of Microsoft, Inc.,


Redmond, WA, USA
About the Author
Smid is a professional consultant, educator and with many of practi-
experience, in the industrial and ed his career, he has
an extensive experience with CNC and CAD/CAM on all levels. He
to manufacturing industry and educational ns on practical use of Com-
Numerical Control technology, part programm
ro.-.'7iOl"'I CAD/CAM, advanced ma-
chining, tooling, setup, and many other related comprehensive industrial back-
ground in CNC programming, machining and company training has assisted
hundred companies to benefit from his wide-rang knowledge.
Mr. long time association with advanced companies and CNC ma-
chinery vendors, as well as his affiliation with anum of Community and Technical Col-
industrial technology programs and skills training, have enabled him to
broaden his professional and consulting areas of CNC and CAD/CAM training l

computer applications and evaluation, system benchmarking.


programming, hardware and operations management.
Over the years Mr. Smid has
l hundreds of customized
tional programs to thousands of at colleges and universities
.rliOTtTc.'

across United States, Canada and as well as to a large number of manufacturing


companies and private sector individuals.
He has actively participated in many shows, conferences, workshops
various seminars, including delivering presentations a
of speaking engagements to organizations. He is also the author
and many in-house publications on of CNC and CAD/CAM. During his
years as a professional in the CNC educational field, he has developed tens
of thousands of pages of high quality training materials.

The author suggestions and other input and industria! users.


You can e-mail him through the publisher of this handbook of the CD.

You can also e-mail him from the CNC Programming Handbook at www-industriaipress.com
TABLE OF CONTENTS
1 ~ NUMERICAL CONTROL 1 Axes and Planes 16
Point of Origirl 16
Ouadrarlts. 16
DEFINITION OF NUMERICAL CONTROL
Right Hand Coordinate System 17
NC and CNC Technology.
MACHINE GEOMETRY. 17
CONVENTIONAL AND CNC MACHINING 2 Axis Orientation - Milling . 17
NUMERICAL CONTROL ADVANTAGES 2 Axis Onenlation - Turning. 18
Setup Time Reduction 3 Additlona! Axes. 18
Lead Time Reduction. 3
Accuracy and RepealabiliJy 3
Contouring of Complex Shapes. 3 5 - CONTROL SYSTEM 19
Simplified Tooling and Work Holding. 3
Cutting Time and Productivity Increase. 4
GENERAL DESCRIPTION 20
TYPES OF CNC MACHINE TOOLS 4 Operation Panel 20
Mills and Machining Centers. 4 Screen Display and Keyboard 21
Lathes and Turning Centers 5 Handle. 22
PERSONNEL FOR CNC 5 SYSTEM FEATURES 22
CNC Programmer 5 Parameter Settings 22
CNC Machine Operator 6 System Defaults 23
SAFETY RELATED TO CNC WORK. 6 Memory Capacity. 24
MANUAL PROGRAM INTERRUPTION. 25
Single Block Operation. 25
2 ~ CNC MILLING 7 Feedhold 25
Emergency Stop 25
CNC MACHINES - MILLING. 7 MANUAL DATA INPUT - MDI 26
Types of Milling Machines . 7 PROGRAM DATA OVERRIDE 26
Machine Axes 8
Vertical Machining Centers. 8
Rapid Motion Override. 26
Spindle Speed Override 27
Horizontal Machi ning Centers 9
Feedrale Override. 27
HOrIZontal Boring Mill 10
Typical Specifications 10
Dry Run Operation 27
Z Axis Neglect . 28
Manual Absolute Setting 28
Sequence Return 28
3 - CNC TURNING 11 Auxiliary Functions Lock 28
Machine Lock 28
CNC MACHINES - TURNING 11 Practical Applications 29
Types of CNC Lathes. 11 SYSTEM OPTIONS. 29
Number of Axes 11 G raphlD Display. 29
AXES DESIGNATION 11 In-Process Gauging . 30
Stored Stroke Limits. 30
Two-aXIs Lathe . 12
Drawing Dimensions Input 30
Three-axis Lathe 12
13
Machining Cycles. 30
Four-axis Lathe.
Six-axis Lathe 13 Cutting Tool Animation. 30
Connection \0 External DeVices 30
FEATURES AND SPECIFICATIONS 13
Typical Machine Specifications. 13
Control Features 14 6 - PROGRAM PLANNING 31

STEPS IN PROGRAM PLANNING 31


4 - COORDINATE GEOMETRY 15
INITIAL INFORMATION 31
REAL NUMBER SYSTEM 15 MACHINE TOOLS FEATURES. 31
Machine Type and Size. 31
RECTANGULAR COORDINATE SYSTEM. 15

ix
X Table of Contents
---------~-.-. - --------_.-... --- - --

Control System. 31
PART COMPLEXITY 32 8 - PREPARATORY COMMANDS 47
MANUAL PROGRAMMING 32
DESCRIPTION AND PURPOSE. 47
Disadvantages . 32
Advantages 32 APPLICATIONS FOR MILLING. 47
CAD/CAM AND CNC 32 APPLICATIONS FOR TURNING 49
Integ ration 33 G CODES IN A PROGRAM BLOCK 50
Future of Manual Programming 33 Modality of G-commands. 50
TYPICAL PROGRAMMING PROCEDURE 33 Conflicting Commands in a Block 50
Word Order in a Block 51
PART DRAWING 34
GROUPING OF COMMANDS 51
Title Block. 34
Dimension ing 34 Group Numbers 51
Tolerances. 35 G CODE TYPES. 52
Surface Fintsh 35 G Codes and Decimal POln! _ 52
Drawing ReVisions 36
Special InSHucllons 36
METHODS SHEET. 36 9 - MISCELLANEOUS FUNCTIONS 53
MATERIAL SPECIFICATIONS 36
Malerial Unlformit)' 36 DESCRIPTION AND PURPOSE. 53
Machinability Rating. 37 Machine Related Functions . 53
MACHINING SEOUENCE 37 Program Related Functions 53
TOOLING SELECTION 38 TYPICAL APPLICATIONS 54
Applications for Milling 54
PART SETUP 38
Applications for Turning 54
Setup Sheet 38 Special MOl Functions. 54
TECHNOLOGICAL DECISIONS 38 Application Groups 54
Cutter Path 38 M FUNCTIONS IN A BLOCK 55
Machine Power Rating. 39 StarlU p of M Functions. 56
Coolants and Lubricants 39 Duration of M Functions .sf)
WORK SKETCH AND CALCULATIONS 40 PROGRAM FUNCTIONS 56
Identification Methods. 40 Program Stop 56
QUALITY IN CNC PROGRAMMING 40 Oplional Program Stop. 57
Program End. 58
Subprogram End !'iR
7 ~ PART PROGRAM STRUCTURE 41 MACHINE FUNCTIONS 58
Cooiant Functions 58
BASIC PROGRAMMING TERMS 41 Spindle Functions. 59
O-lsr3cter 41 Gear Range Selection 60
l/-Jcr0 41 Mil r. hi n e Ac:r.ess ori flS flO
41
42
PROGRAMMING FORMATS 42
10 - SEQUENCE BLOCK 61
WORD ADDRESS FORMAT 42 BLOCK STRUCTURE 61
FORMAT NOTATION 43 8u ildlng the Block Structure 61
43 Block Structure for Milling 61
System Formal 43 PROGRAM IDENTIFICATION 62
System Format·
44
Word Addresses'
45 Program Number 62
ProgrClm Nome. 62
SYMBOLS IN PROGRAMMING 45
SEQUENCE NUMBERS 63
and ivli nus Sign. 45
Sequence Number Command. 63
PROGRAM HEADER 45 Sequence Block Format 63
TYPICAL PROGRAM STRUCTURE. 46 Numbering Increment 64
Long Program:> Dnd Block Numbers. 64
END OF BLOCK CHARACTER. 64
STARTUP BLOCK OR SAfE BLOCK 65
xi

PROGRAM COMMENTS Exact Command 89


CON NG WORDS IN A BLOCK 66 Exact Mode Command 89
Automatic Corner Override 89
MING VALUES 67 Mode 89
ITY. 68 Mode 90
90
Circular Morion Feedrates 90
11 - INPUT OF DIMENSIONS 69
MAXIMUM 91
Maximum Feedrate Considerations, 91
AND METRIC UNITS 69
Unit Values 70 AND OVERRIDE
Feedhold SWitch 91
AND INCREMENTAL MODES 70 Feedrate Override Switch 91
Commands G90 and G9l . 71 Feedrate Override Functions 92
Absolute Oats G90 72
- G91 72 E IN THREADING 92
Combinations in a Block 72
PROGRAMMING 73 14 - TOOL FUNCTION 93
MINIMUM MOTION INCREMENT.
DIMENSIONAL INPUT 73 T FUNCTION FOR MACHINING 93
FuJI Address Forma! , 74 Tool Storage Magazine 93
Zero 74 Fixed Tool Selection, 94
Decimal Point Programming, 75 Random Memory Tool Selection 94
Input 76 Regist8T1flg Tool Numbers 94
Programming Format 95
CALCULATOR TYPE INPUT 76
Empw Tool or Dummy Tool 95
TOOL CHANGE FUNCTION - M06 . 95
12 • SPINDLE CONTROL Conditions for Tool 95
AUTOMATIC TOOL 96
SPINDLE FUNCTION 77 ATC System 96
Spindle Speed Input, 77 MaXimum Tool Diameter 97
DIRECTION OF SPINDLE ROTATION 77 Maximum Tool Length 97
MaXimum Tool Weight. 97
Direction for Milling 78 ATC Cycle, 98
Direction for Turning. 78 MDIOperatlon 98
Direction Specilication , 79
Spindle Startup 79 PROGRAMMING THE 98
Single Tool Work 98
SPINDLE STOP. 80
Programming Several Tools. 99
ORIENTATION 80 Keeping Track of Tools, 99
SPEED - R/MIN 81 Any Tool in Spindle - Not the First. 99
First Tool in the 100
81 No Tool in the 101
Material 81 First Tool In the Spindle with Manual 101
Spindle Speed - Units 82 No Tool In the Spindle With Manual 102
Spindle Speed - Metric Units 82 First Tool In the Spindle and an Oversize Tool 102
CONSTANT SURFACE 82 No Tool in the Ie and an Oversize Tool 102
Maximum Spindle SpAAri 84 T FUNCTION FOR 103
Part Diameter Calculation in 85 Lathe Too! Station 103
Tool 103
TOOL 104
13 - FEEDRATE CONTROL 87 Offset. 104
WAil( Off<:;At 105
FEEDRATE CONTROL < 87 Wear Offset 106
The Rand T 106
FEEDRATE FUNCTION. 87
Feedrate per Minute, 87
Feedrate per Revolution 88
15 - REFERENCE POINTS 107
FEEDRATE SELECTION 88
ACCELERATION 88 POINT G
xii

Relatlonshi p. 108 129


POINT Center Line Tools 129
Tools 130
Zero, . 109 Tools 130
POINT 109 Command Point and Tool Work Offset 130
109
Centers. 110
112 19 ~ TOOL LENGTH OFFSET 131
TOOL POINT 112
PRINCIPLES 131
131
16 - RE MMANDS 113 131
Face. 132
POSITION REG COMMAND 113 OFFSET COMMANDS 132
Position Definition 3 Distance-Ta-Go in Z AXIs. 132
Proqrammlnq Format 13 SETUP
Tool Position 114
On-Machine Tool Length Selting 133
MACHINING 114 Off·Machlne Tool Setting 134
Tool Set at Machine Zero 114 Tool Offset Value Register. 134
Tool Set Away from Machine Zero. 114
Z AXIS 1
Position in Z )\xis . 115
Pres~t Tool "135
115
Tool length Touch Off 135
LATHE APPLICATION. 115 a Master Tool 136
Tool Setup . 116 Drfference 136
Three-Tool Setup Groups 116
PROGRAMMING 137
Center line Tools Setup. 116
External Tools Setup 117 Tool Offset not Available. 137
Internal Tool Setup. 117
Tool Length Offse1 and G92 138
Tool Offset and G54·G59 138
Corner Tip Detail . 117
Programmtr'\g Example 117 Tool Length Offset and Tools 139
CHANGING TOOL OFFSET. 140
HORIZONTAL APPLICATION. 141
17 - POSITION COMPENSATION 119
TOOL LENGTH 141
DESCRIPTION. 119
Programming Commands 119 20 - RAPID POSITIONING 143
Programming Formar 119
Incremental Mode 120
Motion Length Calculation. 120 RAPID TRAVERSE MOTION 143
Position Compensation Along the Z axis 122 GOO Command 143
G47 and G4B. 122 RAPID MOTION TOOL 144
Face Milling. 122
Single Axis MOllon . 144
Multiaxis Motion. 144
Angular Motion. 146
18 WORK OFFSETS
d 1 Reverse Rapid Motion 146
TYPE OF MOTION & 146
WORK AREAS AVAILABLE 123
124
OF RAPID MOTION 147
Additional Work Offsets
WORK OFFSET DEFAULT AND 24
MOTION FORMULAS, 147
Work Offset Change 125 TOTHE PART 148
Z Axis Application 126
HORIZONTAL MACHINE APPLICATION. 127
21 - MACHINE ZERO RETURN 149
OFFSETS. 128
1 MACHINE REFERENCE POSITION
of Offsets. 128 Machining Centers. 149
Offset 128 lathes. 150
Offset 129 the Machine Axes 150
and Offset Numbers 129 Program Commands 151
Command Group 151
xiii

RETURN PRIMARY MACHINE 151 LONG 175


Intermediate Point . 151 Machine 175
Absolute and Incremental Mode 152 X AXIS is the Axis, 176
Return from the Z Depth Position 153 and Dwell, 176
Return Required for the ATe, 155
Zero Return for CNC Lathes 155
FIXED AND DWELL. 176
POSITION CHECK COMMAND. 156
FROM MACHINE RO POINT. 157 CYCLES 177
SECONDARY MACHI 158
POINT-TO-POINT MACHINING 177
Tool Motions VS, Fixed Cycles, 178
- LINEAR INTERPOLATION 159 FIXED SELECTION 178
FORMAT 179
LIN COMMAND 159
180
Starr and End of the Linear Motion 159
Single Axis Linear Interpolation . 159 AND 180
Two Axes Linear Interpolation 160 INITIAL LEVEL SELECTION 181
Three Axis Linear Interpolation 160
R LECTION . 181
PROGRAMMING FORMAT 160
Z CALCULATIONS 182
LINEAR FEEDRATE 161
Feedrate Range 161
PTION OF FIXED CYCLES 183
Individual Axis Feedrate , 161 G81 Drilling Cycle, 183
G82 Spot-Drilling Cycle, 183
PROGRAMMING EXAMPLE 162 G83 - Hole Drilling Cycle Standard 184
G73 Hole Drilling 184
G84 Cycle - Standard 186
~ BLOCK SKIP FUNCTION 163 G74 - Tapping Cycle - Reverse 186
G85 - Cycle, 187
G86 Cycle, 187
TYPICAL APPLICATIONS, 163
G87 Backboring Cycle , 187
BLOCK SKIP SYMBOL 1 G8S - Boring Cycle , 188
CONTROL UNIT SETTING 163 G89 Boring Cycle, 188
G76 P(€cision Bonng 189
SKIP AND MODAL COMMANDS 164
F CYCLE CANCELLATION 189
1
Variable Stock Removal 165
FIXED CYCLE REPETITION 189
Machining Pattern 166 The L or K Address. 190
Trial Cut for 68 LO or KO in a Cycle , 190
Program Proving, 69
Barfeeder Application, 170
Numbe(ed Block Skip, 170 26 - MACHI HOLES 191
SINGLE HOLE EVALUATION. 191
24 - DWELL COMMAND 171 Tooll ng Selection and Applications, 19i
Program Data , 194
PROGRAMMING APPLICATIONS 171 DRILLING 0 194
for 171
Types of Drilling 194
for Accessories 171
Types of Drills 194
DWELL COMMAND 171 Progiamming ConsIderatIons, 195
Dwell Command Structure, 172 Nominal Drill Diameter 195
Effective Drill D,ameter 195
DWELL 172 Drill Pomt 195
SETTING AND DWELL 173 Center 196
Through Hole 196
Time 173
Number of Revolutions Setting 173
Blind Hole 197
Flat BoHom 197
MINIMUM 173 198
REVOLUTIONS 174 PECK DRILLING 199
174 Typical Peck 199
174 Calculating the Number of Pecks 199
xiv Table of Contents

Selecting the Number of Pecks _ 200


Controlling Breakth rough Depth. 200 28 - FACE MILLING 227
REAMING 201
Reamer Design 201 CUTTER SELECTION . 227
Sprndle Speeds for Reaming 201 Basic Selection Criteria 227
Feeorates for Reamir\~ 201 Face Mill Diameter _ 227
Stock Allowance 202 Insert Geometry . 228
Other Reaming ConSiderations 202
CUTTING CONSIDERATIONS 228
SINGLE POINT BORING 202 Angle of Entry 229
Single Point Boring Tool 202 Milling Mode 229
Spindle Orientation_ 203 N uJrloer of Cuttiny IIlSl:;rls 230
Block Tools 203 PROGRAMMING TECHNIQUES 230
BORING WITH A TOOL SHIFT 203 Single Face Mill Cut 231
Precision Bormg Cycle G76 203 Multiple Face Mill CU1S 232
Backboring Cycle G87,
USING POSITION COMPENSATION. 233
Programming Example 204
Precau1ions in Prog ramming and Sew p_ 205
ENLARGING HOLES 205 29 ~ CIRCULAR INTERPOLATION 235
Counters inking 205
Counterborlng , 206
ELEMENTS OF A CIRCLE, 235
Spotfacing 207
Radius and Diameter , 235
MULTILEVEL DRILLING 207 Circle Area and Circumference 236
WEB DRILLING 208 QUADRANTS. 236
TAPPING 209 Quadrant Points 236
Tap Geometry 210 PROGRAMMING FORMAT 237
Tapping Speed and Feedra1e . 210
Arc Cutting Direction 237
Pipe Taps. 2 1
Ci reular Interpolation Block. 237
Tapping Check List. 2'12
Arc Start and End POlntS_ 238
HOLE OPERATIONS ON A LATHE 212 Arc Center and Hadius 238
Tool Approach Motion 213 Arc Center Vectors, 238
Tool Return Motion, 213 Arc Planes 239
alld Reaming on Lathes, 214 RADIUS PROGRAMMING 240
Cycle - G74, 214
Blend Radius 240
Tapp!ng on Lathes 215
Partial Radius 240
Other Operations 216
FULL CIRCLE PROGRAMMING 240
80ss Milling 242
27 - PATTERN OF HOLES 217 Internal Ci rcle Cutting - Linear Start 243
Internal Circle Cutting - Circular Start , 243
Circle Cutting Cycle 244
TYPICAL HOLE PATTERNS 217
ARC PROGRAMMING. 245
RANDOM HOLE PATTERN 217
FEEDRATE FOR CIRCULAR MOTION 245
STRAIGHT ROW HOLE PATTERN 218
Feedrate for Outside Arcs 246
ANGULAR ROW HOLE PATTERN 218 Feedrate for InSide Arcs. 246
Pattern Defined by Coordinates, 218
Patlern Defined by Angle L1~

CORNER PATTERN 220 30 - CUTTER RADIUS OFFSET 247


GRID PATTERN 220
Ang ular Grid Pattern 221 MANUAL CALCULATIONS 247
Tool Path Center Points 248
ARC HOLE PATTERN. 222 Cutter RadiUs 249
BOLT HOLE CIRCLE PATTERN 223 Center Points CAlculation 249
Bolt Circle Formula _ 224 COMPENSATED CUTTER PATH. 250
Pattern Orientation , 224 Types of Cutter Radius Offset. 250
POLAR COORDINATE SYSTEM 225 Definition and Applications. 250
Plane Seleclion 226 PROGRAMMING TECHNIQUES 250
Order of Machining, 226 Direction of Cutting Motion 251
Table of Co ntents xv

or Right - not CW or CCW 251 Steel End Mills 276


=,f(set Commands 251 Solid Carbide End Mills 276
of the Cutler 252 Indexable Insen End Mills 276
of Offset Types 252 Relief Ailgles 276
Format 253 End Mill Size 276
r\ddr8ss H or D 7, 253 Number of Flutes 277
and Wear Oifsets L5Ll
SPEEDS 277
APPLYING CUTIER OFFSET 254 Coolants and Lubricants, 278
Methods, 254 Tool Chatter 278
Cffset Cancellation, 256
::::utter Direction 256
STOCK 279
Infeed . 279
WORKS 256 In and OUI Ramping 279
~:lok-Ahead Offset 257 Direction of Cut 279
for Look-Ahead Cutter Radius Offset 257 Width and of CUI 280
258
259
LOO 33 - SLOTS AND PO KETS 281
:JVERVIEW OF RULES 261
PRACTICAL EXAM . MILLING 262 OPEN AND
Part Tolerances 262 281
\,leasu red Part Size, ?fi2 Closed Boundary, 28
Offsets 263 RAMMING SLOTS
Amount General Selting, 263
Slot Example. 281
264
264
Closed Slot Example 283
265 MILLING.
2GO General Principles 284
265 Pocket 285
Data Nominal or Middle) 266
RECTANGULAR 285
TOOL NOSE US OFFSET 266 Stock Amount, 286
Nose 266 ",,,,,'nm!,,,r Amount 286
Offset Command!:: 266 of Cut _ 287
266 Semifinishing Motions 287
Offset 267 Tool Path 287
267 ular Pocket Program Example 288
268
268 CIRCULAR POCKETS,
Minimum Cutter Diameter _ 289
Method of 289
31 - PLANE SELECTION 269 Linear 289
Linear and Circular Approach, 290
ng a Circular Pocket, 291
WHAT A 269 CIRCULAR POCKET 292
MACHINING IN PLANES 269
Mathematical Planes 269
Machine Planes, 270 - TURNING AN BORING 293
Program Commands for Planes Definition, 270
Default Control Status 271
FUNCTION - TURNING 293
STRAIG MOTION IN 271 T Address 293
CIRCULAR INTERPOLATION IN LATHE OFFSETS 294
G 17-G 18-G 19 as Modal Commands 272 Offset Entry 294
Absence of Axis Data in a Block, 272 Independent Tool Offset. 294
Cutter Radiu:J Otr~et in Planes 273 Tool Offset With Motion. 295
PRACTICAL EXAMPLE 273 Offset 295
FI D IN PLANES MULTIPLE 295
296
296
32 - PHERAL MILLIN 275 Shoulder Tolerances 297
Diameter and Shoulder Tolerances, 297
OFFSET SETTING, 298
XVI of

FUNCTIONS RANGES 298 G70 Cycle Format - All Controls, 320


AUTOMATIC BASIC RULES FOR G70-G73 1
299 G74 - PECK DRILLING CYCLE 1
301
301 G74 Cycle Format· lOT111T/15T 32
301 G74 Cycle Formal- OT/lOT/18T/20T/21 321

302 G75 • GROOVE CUTTING


302 G75 Cycle Formal 10T/l1T/15T 322
Fillish 303 G75 Cycle Format· aT /16T/18T/20T/21T 322
Stock and Stock Allowance 303 BASIC RULES FOR G74 AND 322
A 304
IN CSS MODE 305 36 - GROOVING ON LATH 323
FORMAT. 306
306 GROOVING OPERATIO 323
306 Main Grooving AP~)IICEmOflS 323
306
Grooving Crltena , 323
GROOVE 323
307 Nominal Insert S]ze. 324
Insert Mool fit;i1tion 324
REMOVAL ON LATHES 307 GROOVE LOCATION 324
307 GROOVE 324
307 Groove Position 325
307 Groove 325
- STRAIGHT CUTTING CYCLE 308 325
Format 308 326
Turning Example 309 Groove Width Selection 327
Cutting 309 Method 327
ht and Taper Cutting Example 311 328
. FACE CUTTING CYCLE. 312 Groove Tolerances 329
Format 312 Groove Surface Finish, 330

MULTIPLE REPETITIVE CYCLES. 313 330


313 330
313 Radial Clearance 33
and Part Contour. 313 331
Ch,pbreaking Cycles 313
/ NECK GROOVES
CONTOUR CUTTING CYCLES
GROOVING CYCLES. 332
Boundary Definition 314
Stan Point and tile Points P and 0 . 314
Applications , 332
Groove with G75 . 333
TYPE I AND TYPE II CYCLES. 315 Multiple Grooves with G75. 333
Programming Type I and Type II 315 GROOVES
315
GROOVES AND SUBPROGRAMS
G71 . STOCK REMOVAL IN TURNI 315
G7 Format- OT/llTI15T 316
G71 Format - OT/16T/18T/20T/21T 316 - PART-OFF
G71 for External Roughing. 316
G71 for Internal 317
Direction of G7 . 317 PART-OFF PROCEDURE 335
G72 - STOCK REMOVAL IN FACING. Parting Tool Description. 335
317
Tool Approach Motion 336
G72 Cycle Format - 10TI1 317 Stock Allowance. 337
G72 Cycle Format - OT/16TI18T/20T/21 318 Tool Return IVlotion . 337
G73 - PATTERN REPEATING 8 Part-off with a Chamfer 337
G73 Cycle Form<:lt - 10T/1 H/15T .il R Preventing Damage to the Part 338
G73 Cycle Format· OT/16T/18T/20T/21T 319
G73 Example ot Panern 9
G70· CONTOUR FINISHING
38 - SINGLE POINT THREADING 339
Table xvii

TH ON CNC LATHES 339


Form of a Thread. 339 39 - SUBPROGRAMS
Operations. 340
TERMINOLOGY OF THREADING 340 MAIN PROGRAM SUBPROGRAMS
PROCESS 341 Subprogram Benefits . 367
ItJtJll\iflci;ltiull (.)f n::; 368
in 341
Thread Starl Position 342 SUBPROGRAM FUNCTIONS.
Thread Diameter and 342 ram Call Function . 368
Thread Cutting Motion 343 Subprogram End FunClion. . 368
Retract from Thread 344 Block Number to Return to. . 369
i1eturn to Stzlrt Position 344 Number of ram Repetitions 369
THREADING FEED AND SPINDLE 344 LO Call. 370
Feedra1e Selection. 345 1
Ie Speed Selection. 345 372
Maximum Threading Feedrate 346 373
Lead Error 347
SU DEVELOPMENT.
REFERENCE POINT 348 Pattern Recognition 373
BLOCK-BY-BLOCK THREADING 348 Tool Motion and Subprograms . 374
349 Modal Values and Subprograms. 375
THREADING
MULTI NESTING
MULTIPLE REPETITIVE 350
G76 Format- lOT/11T/15T 350
One Level Nesting 376
G76 Format· OT/16T/18T . 351
Two Level 376
Three Level 377
Programming Example 351
Four Level Nesting . 377
First Thread Calculation 352
377
THREAD INFEED 353
378
Radial Infeed . 353
Compound Infeed 353 CHANGE SUBPROGRAM 379
Thread Insert Angle· Parameter A 354 100000 000 HOLE GRID. 379
Thread Cutting Type - Parameter P 354
ONE-BLOCK METHOD CALCULATIONS. 355
Initial Considerations 355 40 ~ DATUM SHIFT 381
Z Axis Start Position Calculation. 355
THREAD RETRACT 357 DATUM SHIFT WITH G92 OR 381
Thread Pullout Functions 357 Zero Shift. 381
Single AXlS Pullout 357 COORDINATE SYSTEM 383
Two-Axis Pullout 357 G52 Command 384
HAND OF THREAD COORDINATE 384
THREADING TO A S 358
386
Insert iv'lod Ification . 358 Dat<'l Command 386
Program Testing. 360 Coordinate Mode 386
OTHER THREAD RMS. WORK OFFSETS . 386
Thread Depth . 360
Slandard Work Offset 386
TAPERED 361 Additional Work Offset Input. 387
Depth and Clearances 361 External Work Offset Input. 387
Taper Calculation 361 LENGTH OFFSETS. 387
Block Block 362 Valid Input Range 388
Tapered Thread a 363
Tapered Thread and a MultI Cycle. 363 CUTTER RADIUS 388
MULTISTART 364 LATHE OFFSETS 388
Threading Feedrate Calculation, 364 MOl DATA SETTING 389
Shift Amount 365
366
PROGRAMMABLE ENTRY, 389
Modal G10 Command. 389
THREAD Parameters Notation 390
Program Portability, . 390
Bit Type Parameter. , 391
Effect of Block Numbers 392
xviii of ntenls

ATIACHMENT. 413
41 - MIRROR IMAGE 393 Bar 413
ADDITIONAL OPTIONS 414
RULES OF MIRROR IMAGE 393 4 '14
393 414
394 4'15
394 415
394
395
PROGRAMMING EXAMPLE 415
395
395
45 - HELICAL MILLING 417
MIRROR IMAGE BY 395
Control Setting 395
. Manual Mirror Setting 396
HELICAL MILLING OPERATION 417
417
E 396 Format, 417
Mirror Functions 396 Arc Modifiers for 4'18
Mirror Image Example 397 and 18
Mirror Image Example 398
THREAD MILLING, 418
MI IMAGE ON CNC 398 Thread 418
Conditions tor Thread 418
Thread 4'19
42 ~ COORDINATE ROTATION 399 419
Clearance Radius 419
Productivity of Thread 419
COMMANDS. 399
Center of Rotation , 399 THE HELIX, 419
Radius of Rotation 399 THREAD MILLING 421
Coordinate Rotation Cancel 401
Straight Thread 421
Common Applications 401
In itial Calculations 421
APPLICATION 401 Starting Position 422
Motion Rotation and Direction 422
Lead'in Motions , 423
43 - SCALING FUNCTION 405 Thread Rise Calculation 424
Milling the Thread 424
Lead-Out IV" 1,lIn." 425
PTION. 405 425
Function Usage . 405 425
PROGRAMMING FORMAT 405 425
426
406
406 THREAD MILLING SIMULATION METHOD 426
407 HELICAL RAMPING 427
407

46 - HORIZONTAL MACHINING 429


44 - CN LATHE ACCESSORIES 409
INDEXING AND ROTARY 429
CHUCK CONTROL INDEXING TABLE (8 AXIS) 429
Chuck Functions 409 Units 01 Increment _ 429
Chucking Pressure 410 ,130
Chuck Jaws, L110 and Unclamp Functions 430
TAILSTOCK AND 410 .nl'l,<'Vlrv't in Absolute and Incremental Mode, 430
TSllslock 410 B AND OFFSETS 431
Quill. 11 Work Offset and B Axis 431
Center, 41 I Tool Length Oflset and B Axis 432
Quill Functions 411
Programmable Tailstock 411 TO MACHINE ZERO 434
Safety Concerns, 411 INDEXING AND A SUBPROGRAM 434
81-DIRECTIONAL INDEXING 412 COMPLETE PROGRAM EXAMPLE 436
Programming 412
MATIC PALLET CHANGER· 437
Tab Ie of Contents XIX

438 RUNNING THE FIRST PART 459


438 PROGRAM CHANGES 460
439
Program Upgrading 460
Program StruclU re 439
Program Updating . 461
BORING MILL. 439 Documentation Change, 461
ALTERNATE MACHINE SELECTION. 461

47 . WRITING A CNC PROGRAM 441 MACHINE WARM UP PROGRAM 462


eNC MACHINING AND SAFETY. 462
WRITING. 441 SHUTTING DOWN A CNC MACHINE 463
442 Emergency Stop Switch, 463
442 Parking Machine Slides 464
442 Setting the Control System, 464
'JGRAM OUTPUT FORMATTING 443 Turning the Power Off, 464

445 EQUIPMENT MAINTENANCE 464


PROGRAMS
Length Reduction. 445
Mode and Tape Mode 4<16
51 - INTERFACING TO DEVICES 465
48 - PROGRAM DOCUMENTS 447 RS~32CINTERFACE . 465
PUNCHED TAPE 466
- '~,A FILES 447 Tape Reader and Puncher 466
- -- DOCUMENTATION 448 Leader and Trailer 468
Tape Iden11fication 468
Documentation, 448 Non-printable Characters 468
.- Documentation . 448 Storage and Handling, 468
DeSCription 449
DISTRIBUTED NUMERICAL CONTROL 468
AND TOOLING SHEETS. 449
Sheet 450 TERMINOLOGY OF COMMUNICATIONS 469
450 Baud Rate 469
451 Parity 469
Data Bits" 469
_.::UMENTATION FILE FOLDER 451 469
Start and Stop Bits ,
:, ',-:atlon Methods 451
'":'''llor'S Suggestions 452 DATA SEITING 469
and Storage 452 CON NECTING CABLES 470
Null Modem 470
Cabling for Fanuc and PC 470
w PROGRAM VERIFICATION 453
CTION OF ERRORS. 453 52 - MATH IN CNC PROGRAMMING 471
Measures 453
Measures 453 BASIC ELEMENTS 471
VERIFICATION, 454 Arithmetic and Algebra . 471
Order of Calculations, 471
ERRORS 454
455 GEOMETRY 472
Errors .
Errors. 455 Circle 47?
PI Constant" 473
',iMON PROGRAMMING ERRORS 456 473
Circumference of a Circle
Input Errors 456 Length of Arc , 473
"dation Ermrs 456 Quadrants 473
Errors . 456
456 POLYGONS 474
: 'i!ilncous Error:J ,
TAPERS 475
Taper Definition 475
- eNC MACHINING 457 Taper Per Foot 476
Taper Ratio. 476
:HJNING A NEW PART 457 Taper Calculations - English Un its 476
Taper Calculations - tv-letnc 476
458
Integrity 458 CALCULATIONS OF TRIANGLES. 477
XX

477 Hardware Specifications. 487


478 Hardware Requirements, 488
478 and Features, 488
S;ne ~ Cosine - Tangent 479
Inverse Trigonometric Functions 480
Degrees and Decimal 480 Post Processor L188
Pythagorean Theorem 480 IMPORTANT FEATURES. 489
Solvfng Rjght 481 489
ADVANCED CALCULATIONS 482 489
User Interlace, 489
CONCLUSION. 482 CAD Interface, 489
MANAGEMENT,
53 - CNC AND CAD/CAM 483 490
490
490
PROGRAMMING MANUALLY? 483
483 THE END AND INNING.
483
TOOL PATH GEOMETRY PMENT 484 A - RE NeE TABLES 491
TOOL PATH GENERATION 484
COMPLETE ENVIRONMENT 484 491
Multi Machine Support , 485 494
Associative Operations 485
Job Setup 485 494
Tooling List and Job CommenlS, 485 495
Connection Between Computers 485
Text Editor 486 Metric rse Threads 495
486 Metric Fine 495
486
486
for Solids 486 Index 497
Software Specifications , 487
NUMERICAL CONTROL

Numerical Co~trol technology as it is known today, • Ne and eNC Technology


emerged nud 20th It can be traced to the year
of1952, u.s. Air Force, names Parsons In ~trict to the terminology. there is a
and the Massachusetts of Technology in ence m the meaning abbreviations NC and CNC.
MA, It was not production manu- NC for the original Numerical Control
facturing until 1960's. real boom came technology, whereby abbreviation stands for the
of CNC, the of 1972, a decade newer Co~nputeriz~d Numerical Control technology, a
v.:ith introduction of micro computers. The mode~ spm-off of lts older However, practice,
hIstOry and development of this fascinating technology has eNC IS the abbreviation. To clarify the proper us-
been well documented publications. af each tenn, look at the major between
CNC ,.."~ ..~~,,
In the manufacturing field, and particularly in the area of
working, Control has . . "' . . ."''"' .... Both perform the same tasks,
SOlnethuJll"Z of a revolution. in the computw bon of the purpose machining a
ers became standard in every company and in cases, the internal design of the system the
the machine equipped with Numerical logical instructions that process the data. At this point
SVS1leIn fOWld their special place in the
ends.
shops. recent evolution of electronics the The system (as to the CNC system) uses a
never ceasing computer development, including its impact fLXed logical functions, that are built-in and
on Numerical Control, brought changes to nently wired the control These LI..llI',",U'JJJ"
the manufacturing sector in general metalworking in- not be changed by the programmer or machine
dustry in particular. tor. Because of t?e ftxed wiring logic,
control IS synonymous with the term 'hardwired',
DEFINITION OF NUMERICAL CONTROL The can interpret a part program, but it does not al-
VH...."AF>.~.., to the using the
In publications and articles, descriptions away from the
have been used during the to defme what Numerical typically in an environment. the NC
Control It would be to try to yet another quires the compulsory use of punched tapes for
defInition, just the purpose this handbook. Many of information.
defmitions the same same basic COl1lcer:)t. The CNC but not the NC system,
use different uses an internal micro (i.e., a computer). This
The of all the known definitions can be summed storing a variety of
simple statement: routines that are capable logical
That means programmer or the machine '"'''"'''....,.~,''..
can change the on the control itself (at ma-
chine), with instantaneous results. flexibility is
greatest advantage of CNC systems probably
key element that to such a use of the tech-
UI.-UUHl) are of the of alpha- nology in modern manufacturing. The CNC programs and
selected symbols, for a decimal the logical are stored on special computer chips,
sign or the parenthesis symbols. All in- as software rather by
"'''''HV''':> are urn·.......... in a logical a predetermined c.onnections, such as that control the logical
collection of all instructions necessary to ma- hOns. contrast to the system, the system is syn-
a part is called an NC Program, Program, or a onymous with the term 'softwired'.
""w,t:rY,I'1'" Such a can be for a future When describing a particular that to the
repeatedly to identical machining re- control technology, it is customary to use
or in mind NC can also mean
CNC 1n everyday talk, but can never to the

1
2 Chapter 1

technology, described in this handbook under the abbrevia- Ish quality are the most typical problems in conventional
tion ofNe. The 'C'stands for Computerized, and it is machining. Individual machinists may own
not applicable to hardwired All 'proven' methods, different from a f their feHow
manufactured today are of the design, Abbreviations leagues. Combination of and other factors create a
such as C&C or C 'n are not correct and reflect poorly on great amount of
anybody uses them
machining under numerical control does away with
the majority of inconsistencies. It does not require the same
CONVENTIONAL AND CNC MACHINING physical as machining. Numerically
contToned machining does not need any levers or dials or
What makes CNC machining superior to the conven- handles, at least not in the same sense as conventional ma-
tional methods? Is it superior at all? Where are chining does. the has it
benefits? If the CNC and the conventional machining pro- can used number of over,
cesses are a common general approach to ma- consistent That does not mean there are no limiting
chining a part will -....-.M- cutting tools do wear out, material blank in
one batch is not identical to the material another
1. Obtain and study drawing batch, the setups may vary, etc. factors should be
2. Select the most suitable machining method considered and compensated for, whenever lICI.'C~~ru
3. Decide on the setup method (work holding)
4. Select the cutting tools emergence of the numerical control technology does
5. Establish and not mean an instant, or even a long tenn, demise of all man-
6. Machine part ual There are times when a traditional machin-
ing method is preferable to a computerized method. For ex-
This same both types of macrun- ample, a simple one time job may be done more efficiently
mg. IS m way how data
on a machine a CNC machine. Certain
are input. A feedrate 10 inches per minute (10 mlmin) is
of machining jobs will beneHt from manual or semiauto-
the same in manual or CNC applications, but the method of machining, rather than controlled ma-
applying it is not. The same can be about a coolant it
chining. CNC machine are not meant to replace
can be activated a knob, pushing a switch or every manual machine, only to supplement
programming a special All will result in
a coolant rushing out of a HV"........... In many the whether
a certain amount of knowledge on part user is ing will be done on a CNC machine or not is based on
required. alL working, particularly meta! cut- number of required parts and nothing Although the
ting, is mainly a skill, but it is also, to a great an art volume of parts machined as a is always an important
and a profession of large number of people. So appli~ criteria, it should never be the only factor. Consideration
of Computerized Numerical Control. Like any skill should be to complexity, tolerances,
or art or profession, it to the detail is neces- the required of fmish, etc. Often, a
sary to be successful. It takes more than technical know 1- complex part will benefit from CNC machining, while
to be a CNC machinist or a CNC Work relatively parts will not.
I>v?,"'....."...... ,'... and what is called a
'gut-feel', is a much needed supplement to any skill. Keep in mind that numerical control has never machined
a single part by Numerical is only a process
In a conventional machining, the operator sets or a method that enables a machine tool to used in a pro-
up the machine and moves each cutting using one or ductive, accurate and consistent
both hands, to produce the required part. The design of a
machine tool offers many features that help the NUMERICAL CONTROL ADVANTAGES
process of machining a - levers, and
a15, to name just a few. same body are re-
peated by the every in the batch. However, What are the advantages of numerical control?
the word 'same this context really means 'similar
It is important to know which areas of machining will
than 'identical '. Humans are not capable to every
benefit from it which are done the conventional
the same at all times - that is the of ma-
It is absurd to think that a two power mill
People cannot work at the same per[orrnam;e leve!
'-'UU.H..." .
win over jobs that are currently done on a twenty times
all the without a rest. All of US have some good and
more powerful manual mill. Equally unreasonable are ex-
some bad moments. The results these moments, when
applied to a part, are to predict. There of improvements cutting speeds
over a conventional machine. the machining
will some differences and within each
and tooling conditions are the same, the cutting rime will be
batch of The parts will not always be exactly the
same. dimensional tolerances and <""""f",,,,,, close in cases.
NUMER CONTROL 3

of the areas the CNC user can and lead time, required to and manufacture sev-
expect improvement: eral fixtures for conventional machi.nes can
be by preparing a part program the ~se of
o Setup time reduction
plified fixluring.
Cl lead reduction
o Accuracy and repeatability
• Accuracy and Repeatability
o Contouring of shapes high degree and repeatability of
has the single major benefit to
o Simplified tooling and work holding users. Whether the part program is stored on a disk or in the
o cutting time ~omputer or even on a tape (the method),
Il ah~'ays the same. program can changed
o General productivity increase at wlll, but on.ce proven, nO are usually required
area offers only a potential improvement. Individ-
more. A gIven can be reused as many times as
ual users will different of actual improve- nec:de,:t without a single bit it conlains.
ment, depending on the oil-site, the
program to allow such changeable factors as tool
CNC used, setup methods, complexity of wear and operating temperatures. it has to stored safely,
fixturing, or cutting tools, management philosophy but generally very little' from CNC pro-
engineering level of grammer or will required. The high accuracy of
individual attitudes, etc. CNC machmes and repeatability allows high quality
to produced consistently lime.
• Setup Time Reduction
• Contouring of Complex Shapes
CNC and machining centers are capable of con-
a variety of shapes. Many CNC users acquired their
only to able to handle A
are CNC applications in and automo-
tive , , ,The use of some form of computerized pro-
gramming IS Virtually mandatory for any dimensional
tool path at''''''''''''
shapes, as can be
of the the serup time :virhou.t the additional expense of making a model trac-
should not Modular lixturing, SI<l,n{llU'{l mg. Mirrored parts can achieved literally at the switch of
tooling, locators, automatic tool pallets and a bulton, of programs is a lot simpler than storage
other advanced features, the setup time more efficient of patterns, models, olher pattern
a comparable of a conventional With a making tools.
good knowledge modern manufacturing, productivity
can be increased significantly. • Simplified Tooling and Work Holding

, The of parts machined under one setup is Nonstandard and 'homemade' looling that clutters the
Important. order 10 assess the cost a time. If a benches and drawers around a conventional machine can
beelimin~led by looling, designed
number of is machined in one setup, the setup
cost per part can very" A very re- . num~ncal applications. Multi-step such as
pilot dnlls, step combination tools, counter borers
d~ctio~ can b~ achieved by grouping several different oper-
and are with several individual ;:'l<lIIU<l1
Dtlons IOto a .smgle setup. Even if the lime is longer, it
may be Justified when compared to time required to tools. tools are cheaper and to
setup conventional machines. than special and nonstandard tools. measures
have many tool to keep a low or even a
nonexistent inventory, increasing delivery to the
• lead Time Reduction
customer. Standard, off-the-shelf looling can usually ob-
a part program is written and proven. it is ready 10 tained faster then nonstandard LVVi""J'.,

!n the even at a nOtice. Although


l~e lead tor the run is usually it is virtually
. and work holding for CNC machines have only
ml for any run. if an one. ~aJor purpose - to hold the part rigidly in the same
to be modified. it pOSitIOn for all within a batch. Fixtures for
part requires
CNC work do nOI normally jigs, pilot and
can be done usually quickly, the lead
hole locating
4 pter 1

• Cutting Time and Productivity Increase Cl mills and Profilers


machine is commonly Cl EDM machines
is consistent. Unlike a
o Punch presses and Shears
the operator's skill, experi-
to changes) the CNe Cl cutting machines
machining is under control a computer. The small Cl
amount of manual work is restricted to the setup and load-
ing and unloading batch runs, the high o Water and Laser profilers
cost of the unproductive time is spread among many parts, o Cylindrical grinders
making it less main benefit of a consistent
Q
cutting time is jobs, where the production
scheduling and work to individual machine tools Cl and Spinning machines, etc.
can be done very "'v"''''''''''''''
centers and lathes dominate
The main reason COlnp:anlces ma- industry. These two groups share
chines is strictly prr,nnrn invesilmellt. Also, market just about equally. Some industries may a
having a competitive on of every higher need one of machines, depending on their
plant manager. technology offers needs. One must that there are many different
excellent means to a improvement in kinds of lathes and equally many different kinds of ma-
productivity the overall chining centers. the programming process for a
of the manufactured Like any means, it has to vertical is to the one for a horizontal ma-
wisely and When more and more chine or a simple mill. Even between different ma-
companies use the CNC just having a CNC chine groups, there is a amount of general
machine does not offer the extra anymore. The com- hons and the is generally the same.
panies that get forward are who how to use the For example, a contour with an end mill has a lot
technology efficiently and it to competitive in common with a contour cut a
the global economy.
To reach the goal of a
• Mills and Machining Centers
essential that users understand the h""";",,,,,,,... nM Standard number axes on a milling machine is three -
on which CNC technology is the X, Y and Z axes. set on a milling system is al-
many forms, for example, un(jen.tarldulg ways stationary, on a machine table. The
cuitry, complex ladder diagrams, \.-UI.IILJIL,lll;;;1 cutting tool it can move up and down (or in and
ogy, machine design, machining onnC11Dles out), but it does not physically follow the tool path.
and many others. Each one has to
by the person in charge. In this Hil11UUIUU.I\.. CNC mills - sometimes CNC milling machines -
on the that relate directly to the are usually small, simple without a tool changer
understanding the most common or other automatic features. is often
Machining Centers and the lathes quite low. In industry, they are
the Turning Centers). The maintenance purposes, or small
should be very important to every ma- usually designed for contouring,
tool operator and this goal is also reflected in the
handbook approach as well as in numerous CNC machining centers are far more
drills and mills,
benefit the user gets out
TYPES OF CNC MACHINE TOOLS ability to several diverse operations
drilling, boring, counter
ni1ffef'ent kinds of CNC machines cover an ChllClllCH facing and contour milling can be
variety. Their numbers are rapidly CNC program. In addition,
developmentadvances. It is . automatic tool changing,
applications, they would minimize idle time, indexing to a different side
of some groups CNC a rotary movement of additional axes,
CNC machining centers can
with special software that controls the speeds and
Cl and Machining centers of the cutting tool, automatic in-process ",,,,,,oil'''''
Cl and Turning Centers adjustment and other production "XU'I'Ul'.... Ul'J;:,
devices.
Cl Drilling machines
NUMERICAL CONTROL 5

There are two basic machining PERSONN FOR eNC


center. They are the machining
centers. The major difference two types is the
nature of work that can be on them efficiently. For a machine tools have no
CNC machining center, most suitable type of cannot evaluate a
work are flat parts, either mounted to with skills and
ble, or held in a vise or a chuck. control, sk1lls are usually
cbining on two or more in a - one doing the
sirable to be done on a CNC horizontal U14'.llll.lll machining. Their
example is a pump and depend on the company
shapes. Some multi-face ULa...'U.llllli,!:; as product manufactured
done on a CNC vertical machining center ...'-I ..... I-'IJ ....... is quite distinct, although many
a table. companies the two functions into a one, often
called a CNC ProgrammerlOperat01:
prc)gr.:imrnulg process is the same both designs,
an (usually a B axis) is added to the hori- • CNC Programmer
design. Ths axis is either a
lHU';;;1\.U.1J;:. axis) for the table, or a fully rotary
The CNC programmer is the person who the
taneous contouring. most responsibility in shop. This person
is often responsible for numerical control
handbook concentrates on the CNC technology in the plant. is held respon-
centers applications, with a special ""... 'CIVIl sible for problems operations. Although
horizontal setup and machining. duties may vary, the ~ ..",rr..-.,_... ""~ is also responsible for a
melmO(lS are also applicable to the small variety of tasks usage of the CNC
tapping machines, but the "",.r'rr,..,'..,......... " ... machines, In fact, this accountable for the
restrictions. production and quality of operations.

• and Turning Centers


is usually a machine tool with two axes,
the horizontal Z axis.
distinguishes it from a mill is that
machine center line. In addition, cut-
is normally stationary, mounted in a sliding twTet.
follows the contour of programmed
tool path. the CNC lathes with a milling attachment, so analyze,
called live tooling. the milling tool has its own motor dam into a
\"Ullv\"lvU

rotates while spindle is stationary. the CNC pro-


01"1!1 ....... ",..I",. must be to decide upon the best manufactur-
lathe design can be horizontal or
I"nn,"I>',..,.., methodology in all respects.
more common than the
purpose in In addition to the machining skills, programmer
for either For has to have an understanding of mathematical principles,
horizontal group can be mainly application of equations. arcs and an-
as a bar type, chucker type or a Equally important is the of trigonometry.
to combinations are ac- with computerized progranuning) knowledge of
a CNC lathe an extremely flexible ma- manual programming methods is absolutely to the
accessories such as a tailstock, steady thorough understanding of the
rests or fol1ow#up part catchers, pullout-fingers control this output.
even a third milling attachment are popular compo-
nents of the CNC ~ lathe can be very versatile important quality of a truly
"'''''1'">'\''''''P1'" is his or her ability to listen to
so versatile in that it is often caUed a CNC Turning
Center. AU text examples in this handbook the CNC operators,
use the more tenn CNC lathe, yet still are the first prerequisite to h"""'(lI"'I"""
ing aU its rr'ln,('Ip.1m h"",,,,,,h ..u,,, programmer must be flexible
ClllLHll1t);!, quality,
6 Chapter 1

• CNC Machine Operator panies talk about safety, conduct safety meetings, display
The CNe machine tool operator is a complementary po- posters, make speeches, call experts. This mass of informa-
sition to the CNe programmer. The programmer and the tion and instructions is presented to all of us for some very
operator may exist in a single person., as is the case in many good reasons. Quite a few are based on past tragic occur-
small shops. Although the majority of duties performed by rences - many laws, rules and regulations have been written
a conventional machine operator has been transferred to as a result of inquests and inquiries into serious accidents.
the CNC programmer, the CNC operator has many unique At fIrst sight, it may seem that in CNC work, the safety is
responsibilities. In typical cases, the operator is responsible a secondary issue. 111ere is a lot of automation, a part pro-
for the tool and machine setup, for the changing of the gram that runs over and over again., tooling that has ben
parts, often even for some in-process inspection. Many used in the past, u simple setup, etc. All this can lead to
companies expect quality control at the machine - and the complacency and false assumption that safety is taken care
operator of any machine tool, manual or computerized, is of. This is a view that can have serious consequences.
also responsible for the quality of the work done on that
machine. One of the very important responsibilities of the Safety is a large subject but a few points that relate to the
CNe machine operator is to report fmdings about each pro- CNC work are important. Every machinist should know
gram to the programmer. Even with the best knowledge, the hazards of mechanical and electrical devices. The fIrst
skills, attitudes and intentions, the 'fmal' program can al- step towards a safe work place is with a clean work area,
ways be improved. The CNC operator, being the one who where no chips, oil spills and other debris are allowed to
is the closest to the actual machining, knows precisely what accumulate on the floor. Taking care of personal safety is
extent such improvements can be. equally important. Loose clothing,jewelry, ties, scarfs, un-
protected long hair, improper use of gloves and similar
SAFETY RELATED TO CNC WORK infractions, is dangerous in machining environment. Pro-
tection of eyes, ears, hands and feet is strongly recom-
mended.
On the wan of many companies is a safety poster with a
simple, yet powerful message: While a machine is operating, protective devices should
be in place and no moving parts should be exposed. Special
The first rule of safety is to follow all safety rules care should be taken around rotating spindles and auto-
matic tool changers. Other devices that could pose a hazard
The heading of this section does not indicate whether the are pallet changers, chip conveyors, high voltage areas,
safety is oriented at the programming or the machining hoists, etc. Discollllectillg allY interlocks or other safety
level. The reason is that the safety is totally independent. It features is dangerous - and also illegal, without appropriate
stands on its own and it governs behavior of everybody in a skills and authorization.
machine shop and outside of it. At fIrst sight, it may appear In programming, observation of safety rules is also im-
that safety is something related to the machining and the portant. A tool motion can be programmed in many ways.
machine operation, perhaps to the setup as well. That is Speeds and feeds have to be realistic, not just mathemati-
defInitely true but hardly presents a complete picture. cally 'correct'. Depth of cut, width of cut, the tool charac-
Safety is the most important element in programming, teristics, all have a profound effect on overall safety.
setup, machining, tooling, ftxturing, inspection, shipping. All these ideas are just a very short summary and a re-
and you-name-it operation within a typical machine shop minder that safety should always be taken seriously.
daily work. Safety can never be overemphasized. Com~
CNCMILLING

Many types machines are in indus- • Types of Milling Machines


try, the majority of them are machining centers
and CNC lathes. They are by wire EDM, fabricat- Milling machines can divided imo Ihree categories:
ing machines and machines special Although o By the number of axes - two, three or more
the this handbook is on the two that domi-
nate the market, many can be applied to o By the orientation of axes - vertical or horizontal
equipment. o By the presence or absence of a tool ...h ..... "',"r

CNC MACHINES - MILLING Milling machines where the spindle motion is up and
down, are categorized as vertical machines. Milling ma-
chines where the spindle motion is in out, are catego-
The description of CNC milling is so it as horizontal machines - see Figure 2-1 and
can fill a thick book all by itself. All machine tools from a
knee lype milling machine up to a five profiler
can included in (his They in features,
suitability for work, etc., but they do all one
common denominator - their primary axes are the X and Y
axes - this reason, they are called machines.
the category of the machines are also wire EDM
machine tools, laser and water jet cutting name
cutters. burners, routers, etc. Although do not qualify
as milling type machine tools, we mention them because
the majority of programming techniques applicable to the
mills is to machines types as well. The
example is a contouring operation, a common La
many CNC machines.
the purpose this handbook, a milling machine can
be defmed: Figure 2-/
Schematic representation of a CNC vertical machining center
Milling machine is a machine capable of a simultaneous
cutting motion, an end mill as the primary cutting
at least two axes at the same time
'I"
j'>
I
This definition eliminates all CNC presses, since
covers pOSItioning not profiling. The
nition also eliminates wire EDM machines a of
burners, they are capable of a profiling action but not
an end mill. Users these machine tools will still
from m:tny covered The
ciples are adaptable to the majority of machine tools.
For EDM uses a very small cutter
in the of a A cUlling machine uses
beam as its cutter, also having a known diameter bUL
term keifis used The will be concentrated
on metal cutting machine of end
mills as the primary tool contouring. mill
can be in many ways, first look will Figure 2·2
or available machines. Schematic representation of a CNC horizontal machining center

7
8 2

simplified not really reflect reality machining center is described by its specifications
current state of art in .a...... "'... tool manufacturing. as provided by the machine tool manufacturer. manu-
machine tool industry is changing. New and lists many as a quick method of
more powerful machines are V_'''"",'' __ and produced by comparison between one machine and another. It is not un-
manufacturers worldwide. more features. usual to find a slightly information in the
brochure - after all, it is a tool.
The majority of modern machines designed for milling
are capable of doing a multitude of machining tasks, not In the area of systems, three most common ma-
only the traditional milling. machines are also capa- chine tools are
of many other metal operations, mainly drill-
Q eNC Vertical Machining Center - VMC
ng, thread cutting
many others. They may with a multi-tool Q CNC Horizontal Machining Center· HMC
azine (also known as a a fully
Q CNC Horizontal Boring Mill
changer (abbreviated as ATC) a pallet
viated as APC). a powerful computerized conlrol unit
brevlated as CNC), and so on. Some machine may type, except
have additional features, as adaptive control. the major differences will the
terface, automatic loading unloading, probing ",,,,,,rpo..,... axes, additional for indexing or full rotary
high speed machining and other mod- the type of work suitable for individual
ern technology. The is - can machine tools of lion of the most common type of a machining center - the
capabilities be as simpleCNC milling Vertical Machining Center (VMC) - a fairly accu-
In two words - certainly not. Milling machines that have at rate sample other group.
some of built-in. have ,."u·"'''''""
new breed of tools - CNC An/l,r".,,·, • Vertical Machining Centers
This lenn is strictly related - a manual machining
cel1Jer is a description thal does nul exist. Vertical for flat type
of work, of machining is
• Machine Axes done on setup.
Milling machines and machining centers have at least A vertical machining center can be used with
axes - X, Y The machines become more flexi- an optional axis. usually a head mounted on
iflhey usually an the main table. The rotary head can mounted either ver-
lary axis (the A tically or horizontally, depending on the results and
horizontal models). higher the type. This fourth can either for in-
found on with five or more axes. A dexing or a full rotary molion. In combination with a
chine wilh five ;'lxes. he a hnring mill that supplied), the fourth in the vertical
jor axes, plus a axis (usually the B "nr""",,, can be long parts that
parallel to the Z (usually the W axis). true need support at both ends.
complex and flexible five-axis profiling [ling machine is
the type used in industry. where a multi-axis. simul- maJonty vertical centers most
taneous is necessary to complex tors work with are those with an empty table and three-axes
shapes and and various configuration.

two and a machine or a From the programming perspective, there are at least two
At times,
machine is used. terms refer to mentioning:
three and a
the type of where simultaneous o ONE· programming always takes from the viewpoint
of all axes limitations. For a spindle, not the means the view is
vertical Y and Z axis as primary axes. plus as if looking straight down, at ninety degrees towards
designated as an A The indexing ta- the machine table for development of the tool motion.
ble is used posllioning. but il cannot rotate simulta- Programmers always view the top of part!
neously with the motion of primary axes. That type of a Q TWO· various markers located somewhere on the machine
called a 'three and a half axIS ' machine. show the positive and the motion of the machine
a more complex but machine Ihal is axes. For programming, markers should be ignored!
a table, is as a four These indicate operating directions, not programming
can move simultaneously directions. As a matter of fact, typically the programming
with the motion of the axes, is a good directions are exactly the opposite of the markers on the
example of a true 'four ax.is· machine tool. tooL
CNC MILLING 9

Vertical and Horizontal Machining - Typical Specifications


.- ...... _- ... m __ ,

Description Vertical Machining Center Horizontal Machining Center


1= I~

Number of axes 3 axes IXYZ) 4 axes IXYZB}

780 x 400 mm 500 x 500 mm


Table dimensions
31 x 16 inches 20 )( 20 inches

Number of tools 20 36

575 mm 725mm
Maximum travel- X axis
22.5 inches 28.5 inches

380 mm 560mm
Maximum travel- Y axis
15 inches 22 inches

470 mm 560 mm
Maximum travel- Zaxis
18.5 inches 22 inches

Table indexing angle N/A 0.001 degree

Spindle speed 60-8000 rpm 40 - 4000 rpm

AC 7.5/5.5 kW AC 11/8 kW
Spindle output
AC 10/7 HP AC15/11HP

Spindle nu:>t:-tlJ-t~1.1 distan ... ", - Zaxis 150 - 625 mm 150 - 710 mm
6- inches 6 - 28 inches

430mm 30 560 mm
Spindle center-to-column distance· Y axis
17 inches 1.2· inches

Spindle taper No. 40 No. 50

Tool shank CAT50

2 - 10000 mm/min 1 - 10000 mmlmin


0.100 - 393 in/min 0.04 - 393 in/min

30000 mm/min (XY) - mm/min IZl 30000 mm/min (XYI - 24000 (2)
Rapid traverse rate
1181 in/min IXY) 945 in/min (Z) 1181 in/min (XV)- 945 iI\Imin

Tool selection memory Random memory


...
80 mm (150 w/empty pockets) 1 mm
Maximum tool diameter
3.15 inches (5.9 w/empty pockets) 4.1 inches

300mm 350 mm
Maximum length
11.8 13.75 inches

6 kg 20
Maximum tool weight
131bs 44

• Horizontal Machining Centers There arc many applica£ions in lhis area. Common exam-
are large as pump housings, cases,
Horizontal CNC Machining Centers are also
manifolds, blocks and so on. machining
as multi-tool and versatile machines. and are
centers always include a special ing table and arc
bieal paris, where majority of machining has to
on more than one in a single setup.
equipped with a pallet and other
10 Chapter 2

Because their flexibility and complexity, CNC parl of the way towards spindle. bOlh meet in the
zonlal machining centers are priced significantly area the part Ihal be machined using all the ma-
than vertical CNC machining centers. chine tool resources.
the programming point view, there are several Horizontal boring mill may be called a
eli mainly relating to the Automatic Tool machine, but certainly nol as-axis CNC
the indexing table, - in some cases - to the ad- the count of the axes is Programming
ditional for example, the changer. All CNC mills are similar to Ihe horizontal and
differences are relatively minor. Wriling a program for machining centers.
horizontal machining centers is no different than writing a
for venical machining center!'.. • Typical Specifications
• Horizontal Boring Mill On the preceding page is a comprehensive chart showi
the typical specifications a CNC Vertical Machining
Horizontal boring mill is another machine. It Cellterand a CNC Horizontal Machining Centel:
closely resembles a CNC horizontal machining center, but ifications are side by side in two
have its own Iy, a horizontal not for any comparison are two
mill is by the lack some common fea- different types and comparison is no\ possible
tures, such as Automatic Changer. As Ihe name of all features. In order to compare individual machine tools
the machine its primary purpose is boring opera- within a category, machine tool prov-
tions, mainly lengthy that reason, the reach of ided by the machine manufacturer serve as the basis
the is extended by a specially designed quill. An- for comparison. specifications are contained a of
other typical feature is an axis parallel to the Z axis, called verifiable data, mainly technical in nature, describes
Ihe W axis. Although is, in the fifth lhe individual machine by main features. Machine tool
nation (X, y, W), a horizontal boring mill cannot be buyers frequently compare many brochures of several
called a true axis machine. Z axis (quill) and the W fcrcnt machines as parr of the pre process.
axis (table) work in the (awards agers process planners compare individual machines in
other. so Ihey can be used large parts and hard-to-reach the machine shop and assign the available workload 10 the
areas. It means, that during drilling, the machine table most suitable machine.
moves an quill. quill is a physical part
of the spmdle. It is in the spindle where the culling 1001 ro- A fair and accurate comparison can be made between two
"'lies - but in-nnd-out motions are done by the table. vertical ining centers or between two horizontal ma-
Think of the method offered on horizontal chining centers, but cannOI be done to compare
mills - if the quill were to be very it would lose (ween two differenl types.
strength and rigidity. belter way was to split the tradI- In 11 typical sped chart, additional dala
tional single Z axis movement into two - the quill extension may be listed, not included in earlier chart In this hand-
the Z axis will move only of the way £Owards lhe book, the focus is on only those specifications Ihat are
and the table itself, the new axis, will move another interest \0 the CNC and the CNC operator.
CNC TURNING

CNC MACHIN • TURNING • of Axes


The most common distinction CNC lathes is
or it turret IS a common
by the number of programmable axes. Vertical CNC lathes
In machine shop. A lathe is used have two axes in almost all The much
machimng or conical work, as shafts. more common CNC horizontal commonly designed
wheels, bores, threads, etc. The most common lathe with two programmable axes, are available wilh three,
operation is removal material from a round four or axes, adding extra to manufactur-
Illrning tool for external culling. A lathe can ing of more complex parts.
ror internal operations such as boring, as well as for
threading, etc., if a cutting tool is A lathe can funhcr described by the
are usually in machining power type
lathes, hutlhey do have a carousel that holds
cutting tools. An lathe has often one o FRONT lathe ... an engine lathe type
or two CUlling tools at a lime, but has more ma- oREAR ... a unique slant bed
chining power.
SIan! bed type is very popular
Typical lathe work controlled by a CNC system uses ma- its design allows chips to
known in industry as the CNC Turning - or operator and, in case an accident,
more commonly - the CNC down a area, towards the chip
term 'turning is Between the of flat bed and type lathes,
curate overall descnption of a front and rear lathes, horizontal and venicallalhe designs,
can be used for a number of machining op- there is another variety of a lathe. This describes
during a example, in addition to CNC lathes by number of axis, which probably the
lathe as turning and a simplesl and most common method identification.
lathe can be used for drilling, grooving,
knurting and even burn It can also be used in AXES DESIGNATION
ent modes, such as chuck work,
centers. Many other combinations also exist
are designed to hold tools in special A typical CNC is designed with two standard axes -
can have a milling indexable chuck, a sub one axis is the X other axis is lhe Z axis. Both axes
a tailstock, a steadyrest many other features are perpendicular to other and represent the
associated with a lathe design. two-axis lathe motions. X axis also represents
more than four axes ore common. With I ravel of the cutting tool, Z represents
constant advances in machine technologies, more nal morion. All varieties of tools are
CNC appear on the market that are designed to do a turret (a special too) can be or
number of operations in a many of them Because of this lurret loaded with all CUI-
(tonally reserved for a mill or a center. Z axes, which means all

• Types of eNC lathes Following the established of the milling ma~


lathes can by the type of and machining the only machine
the number of a xes. two types are of making a hole by of drilling, boring.
lathe and the horizontal CNC lathe. Of or punching, is the Z
the two, horizontal type is by the most common in
CNC lathe work, the oriemation a
manufacturing and machine shops. A CNC lathe type of lathe is downwards motion
(incorrectly called a vertical boring mill) is somewhat less
axis, and left and motion for the Z axis, when
common but is irreplaceable for a work. For
looking from the machinist's position. This view is shown
a CNC there are no differences in
. following three illustrations Figure 3-1, Figure
the approach between two lathe types.
3-3.

11
12 Chapter 3

In addition to the X and Z primary axes, the


HEADSTOCK lathes have individual of each additional axis,
I CHUCK
/
example, the C axis is usually third axis,
milling operations, using so called live tooling. More
for

/ tails on the subject of coordinate system and machine ge-


JAWS
!". ---- TOOL ometry are available ill Ihe next
. X+

.....t
I ! TAILSTOCK
• Two-axis Lathe
This is the most common type of CNC The work
holding u!\ually a chuck, is on the left

Figure 3-1
"
x- QUILL
of
with
work.
machine (as viewed by the operator). The rear type,
slant bed, is
some special
most popular design for general
for in the petroleum
industry (where turning tube ends is a common work). a
bed is usually more suitable. The CUlling lools are held
Typical configuration of a two axis slant bed eNG lathe - rear type
in a specially designed indexing turret that can hold
x+ six, eight, len, more tools. Many such lathes
t
Z- . . . . . Z+
also have two turrets.
Advanced 1001 designs incorporate tool storage

"
X-

X-
away from the work area, similar to the design of machin-
ing centers.
stored and used
'even hundreds, of cutting tools may
a single CNC program. Many lathes
also incorporate a quick changing tooling system.

.....t • Three-axis Lathe


Three~axls lathe is essentially a two-axis lathe with an

Figure 3-2 "


X+

Typical configuration of a CNC lathe with two turrets


ditional
C
This has own
in absolute mode (H
usually as a
in incremental mode), and
is fully programmable. Normnlly, the third axis is used for
cross-milling
ing,
slot CUlling. bolt circle holes drill-
helical slots, etc. axis can re-
place some simple operations on a milling machine, reduc-
ing setup time for the job. Some limitations apply (0
many models, example, the milling or drilling opera-
tions can (ake place only at positions projecting from the
tool center La the spindle center line (within a machin-
plane), although adjustments.
The third has own power source but the power raL-
is relatively lower when compared with the majority of
machining centers. Another limitation may the smallest
increment of the third axis, particularly on the three
axis lathes. Smallest increment of one degree is certainly
more useful an increment of two or five (j"'l'rf"'~
better is an increment of 0.1'\ 0.01 0, and commonly 0.00 1°
on the models. Usually the lathes with three axes of-
a fine radial increment that allows a simultaneous
Figure 3-3 rotary motion, with low increment values are usually
Schematic representation of a vertical eNC lathe
designed with an oriented spindle stop only.

is true for both the front and rear lathes and for lathes From the perspective ofCNC part programming, the
with or more axes. The chuck is verti- ditional knowledge required is a subject not difficult to
cally to the horizontal spindle center line for all horizontal learn. General principles of milling apply and many pro-
lathes. Vertical lathes, due to their design, are rotated gramming features are also available, for fixed
90°, where the chuck face is oriented horizontally to the and other
vertical spindle center line.
CNC TURNING 13

• four-axis lathe There is more in promotional brochure than


a four-axis CNC lathe is a in fact, in a well
a three-axis lathe. As a matter of to pro- technical information,
(he machine tool. are the features and
lathe is nothing more than programming
lathes at the same time. That may sound the CNC machine tool manufacturer considers .m.,Art..:. ... !
the principle of a CNC lathe the customer.
In the majority of brochures, there are practical
are actually two controls can b e ' a particular CNC machine, a
one each pair (set) axes. lathe in the
used to do the external - or
(OD) and another program to do the
- roughing (ID). Since a
• Machine Specifications
A typical lathe, with two axes and a slant
pair of axes independently, and can be bed may
at the same time, doing two different operations from an actual
simultaneously. The main keys to a 4-axis lathe
programming is coordination of the (ools and their opera- Description Specification
tions, liming of the tool motions a sense of
compromise. Number of axes Two (X, Z) or three (X, Z and C)

reasons, both cannot work all the Maximum swing over bed
Kf':.c.ml<,e of this programming fea- diameter
lUres as synchronized (typically Miscel-
laneous Function), the ability to how much (ime length
each tool requires to complete etc., are re-
quired. There is a level of l"(wnnr'l"Im because only
one spindle speed can be both active cuuing tools,
although feedrate is both pairs of axes.
12
This means that some operations simply cannot
be done simultaneously.
Not every lathe job benelits from the 4-axis machining.
are cases when it IS more costly to run a job on a
lathe inefficiently it very efficient to run Indexing time 0.1 second

on a 2-axis Axis travel in Xaxis

• Six-axis lathe Axis travel in Z axis

Six-axis CNC lathes are Rapid traverse rate X axis


twin turret and a set of axes per turre!. This mm/min
in/min
corporales many tool of them power
0,01 • 500 mm/rev
as well as back-machin Programming these ,0001 • 19.68 in/rev
lalhes is similar to programming a three-axis lathe twice.
The control system automatically provides synchroniza-
tion, when IIvl.,'V~~<'l.1 Main spindle motor
A small \0 CNC lathe is popular Spindle speed 35·3500 rpm
and industries with simi Minimum input increment
applications.
Motorized
FEATURES AND SPECIFICATIONS Number of rotating tools 12

Rotating tool speed 30 . 3600 (Imin


A look at a promotional brochure a
CNC machine useful in many respects. In most Milling motor AC 3.7/2.2 kW
AC 5/2.95 HP
is impressive, the printing,
and the use of colors is
well done. IS the purpose of the brochure La make a • M16 metric
·5/8 inches
marketing tool and attract the potential buyer.
3

It is very important to understand the specifications and Q of various forms (including taper and
of the CNC machine lools in shop. Many fea- circular) can performed, depending on the control model
to the control system, many others to the ma- Q Dwell can use the p. U or X address (G04)
tool itself. In CNC programming, many imponanl
are based on one or of features, for Q Tool uses 4-digit identification
example number of tool stations available, maximum spin- Q 1=,,,,,£1.,,.,,, s~!lection (normal) in mm/rev or in/rev
others.
a Feedrate (special) in mlmin or inlmin
• Control Features a Rapid traverse rate different for X and Z axes
in understanding the description of a Q Multiple repetitive cycles for turning, boring, facing, contour
lathe is the look at some control unique 10 repeat, grooving, and threading are available
how they differ form a typical control. a Feedrate is common from 0 to 200% in 10%
of control features is described in more detail increments (on some lathes only from 0 to 150%)
5,
o X axis can
At some fealures and codes nOI make
Q Tailstock can be programmable
sense - they are included for ,,,r,"'''''1> only. Com-
mon typical features are listed: a Automatic 2m" .. "rv, and corner rounding
R and II Kin
Q X a diameter, nat a radius
a Thread available with six-decimal
Q Constant surface speed leSS) is standard control place accuracy (for inch units)
(G96 for CSS and G97 for r/min)
a Least input increment in X is 0.001 mm or .0001
Q Absolute programming mode is X or Z or C inches on diameter· one half of that value per side
Q nr:rl~m,.'ntlll nrn"'''"rnnllnn mode is U or War H
COORDINATE GEOMETRY

The length of division on the scale re[>re~,e


unit of measurement in a convenient and
a in ceptcd It may come as a surprise that
/lates. System of coordinates is on a used day. example, a simpJe ruler used in
mathematical principles dating over four on the number scale concept, regardless of mea-
most important of are those that Weight scales using lons, pounds,
can be applied to Ihe CNC technology today. In various of mass are other
publications on mathematics and these princi- uses the same
pies nrc lisled under the headings the rea/number sys- as
(ell! and the rec/angular coordinates.

RECTANGULAR COORDINATE M
REAL NUMBER SYSTEM
coordimlte system IS a to
key to understanding 2D point, using the XY coordinates, or a spa-
(he knowledge of arithmetic. point, using the XYZ coordinates. [t was first
key knowledge in this area is 17th century by a French and
/lumber system. Within ......... ,"'" Rene Descartes (I I
ten llvuiluble numerals , _ ' " , , " ' v l us an alternative to the rectangular
can be used in any of the called Coordinate System
o Zero integer.. . 0
r:J Positive integers ... L 2, 10,12943, +45
(with or without sign)
-381, ·25,-77
" ..T
o Negative integers ...
(minus sign required) T
o Fractions ... 1/8, 3/16. 9/32, 35/64
o Decimal fractions 0.1 .546875. 3.5
-, .
At! groups are used

the mainstream of just
modern life. In CNC programming, primary goal is to
usc the numbers to 'Iranslate' the drawing, based on its
-;
menslons, into t). cutter

Computerized Numerical Control means control by the Figure 4-2


numbers using a All information in a drawing Rectangular coordinate system
has to be translated into a program, using primarily
numbers. are used Lo describe commands, The concepts used in design, and in numerical
functions, comments, so on. The mathematical rn.,r,·'n. control are over 400 years old. A point can be mathe-
of a real number can he expressed graphically on a matically defined on a plane (two coordinate values) or in
straight line, scale, where all divisions space (three coordinate values). defin ition of one point
have the same 4-1. IS !O another poinl as a distance parallcl with one of
axes that are perpendicular to each olher. In a plane,
only two axes are required, in the space, all three axes must
specified. In programming, represents an exacllo-
If such a location is on a the point is defined
as a 20 point, along two axes. the location is in a space,
Figure 4·1 lhe poilH is defilled as a three axes,
Graphical representation of the Number Scale

15
16 4

When two number scales that intersect at right angles are • Point of Origin
used, mathematical for a recTangular coordinate sys-
Another term that emerged from the rectangular
tem is terms from
nate is called poil11 of origin, or just origin. 11 is
tion, and all have an important role in CNC programming.
the point where lhe two perpendicular axes intersect. is
understanding is very important for further point a zero coordinate value in each {lxis, fled a.<;
planar XOYO and XOYOZO - 4-4.
• Axes and Planes
of number an axis. AY
-I
This old principle, when applied to programming,
means that at least two axes nvo number scales - will be
mathematical definition of an

1'1 1--+ 1 1 1-1-1" 1- -1-1- .... X axis


T

I ORIGIN
definition can enhanced a statement thaI an
axis can also be a line of reference. In CNC programming,
an as a reference all the lime. The definition
contains word '. A plane is a term in 2D ap-
plications, while a solid object is used in 3D applications.
Figure 4-4
Mathematical definition of a plane is:
Point of origin - intersection of axes

This intersection has a special meaning in CNC program-


ming. acquires a new name, lypically the
gram reference point. Other terms are also program
the top viewpoint of the looking straight zero, poim, workpiece zero, part zero, with
down on the illustration Figure 4-3, a viewing direction is the same meaning and purpose.
established. This is often called viewing a plane.
A plane is a 2D entity - letter X identifies horizon- • Quadrants
Viewing the two intersecting axes and the new four
Yaxis distinct areas can be clearly identified. area is
bounded by two axes. areas are called quadrants.
Mathematically dcfincd,

I I- 1- '1--1-" I -I -I 1 +-1- X axis


The word quadrant (from the Latin word quadrans or
quadrall1is, the fourth parI), suggests four
uniquely defined areas or quadrants. Looking down in the
top at the two intersecting axes, the following defini-
apply to quadrants. are mathematically correct
and are used in CNC/CAD/CAM applications:
Figure 4-3 Quadrant I UPPER RIGHT
Axis designation· viewing plane
Mathematical is fully implemented in CNC Quadrant II UPPER LEFT
Quadrant III LOWER LEFT
lal the Jetter Y identifies its vertical axis. 111is plane IS
called XY plane. Defined mathematically, (he horizon- Quadrant IV LOWER RIGHT
tal axis is always listed as the first of the pair. In
and CNC programming. this plane is also known as the quadrants are defined in the
Top View or a Plan View. Other planes arc in lion from horizontal X axis and the naming convention
CNC, but not to the same extent as in CAD/CAM work. uses Romal! numbers, not Arabic numbers normally used.
GEOMETRY 17

counting starts at the positive of the horizontal Y+


4-5 illustrates the definitions. .,
P2+
... Yaxis
t
II _ Quadrant I x- -r--I-~1~~I-~-r-I--~.. I- x+
X+Y+ ..,.. P1

I 1--1'- -+ -I -u'+
" -1--1-+ --i--I-JiIo. X - ---- .....
P4
+
.. I

Quadrant III - Quadrant IV T


x-y- X+Y-

P1 ::: XQ.Q ::: X4.0 Y-3.0

Figure 4·5 - P2- ::: XQ.Q


---""""
::: X-S.O Y-4.S
Quadrants in the and their identification
P3 ::: X5.5 YS.O P6 ::: X-5.0 YO.Q
Figure 4-7
Any point value can be positive,
Coordinate definition of points within the rectangular coordinate
zero. Any is determined solely system (point PI = Origin XOYO)
cation of the point in a particular quadrant and its
distance relative to the origin - Figure If these directions were over a
hand, they would "",..r"''',... ''" from root
COORDI of thumb or finger would point
POINT ON
,
X AXIS
""""""""~,--"--
Y AXIS in the X direction, the Y direction and
QUADRANT I , ..
,-""""",
+
,,--"""""""""""""''''''
middle
majority of CNC are programmed using
QUADRANT II the so called absolute method, that is based on
QUADRANT III the point of origin XOYOZO. This absolute method of
gramming follows very of rectangular co-
+ ordinate geometry and aU covered in this chapter.

Figure 4·6
MACHINE GEOMETRY
Algebraic signs for a point location in plane quadrants

o IMPORTANT: Machine geometry is the


... If the defined point lies exactly on the Xaxis, tween the fixed point of the TTlU,' TlU,,",

it has the Yvalue to zero (YO). a/the part. TypicaJ machine uses
o If the point
• 0 on the Y axis, hand coordinate system. and negative
it has the X value to zero (XO). is determined by an
UH'"",,,,'VlI VIewing con-
... If the point lies on both X and Yaxes, vention. The basic rule for the Z it is always the
both X and Yvalues are zero IXO YO). along which a simple hole can machined Wilh a sin-
XOYOZO is the point In part programmmg, point tool, such as a drill, reamer, or a laser beam.
itive values are written W",UlIlI the plus sign - Figure Figure 4-8 illustrates the standard orientation of an
type machine tools.
• Right Hand Coordinate System
• Axis Orientation - Milling
In {he illustrations of the number scale, quadrallfs and
axes, the origin into two portions. The A typical 3-axis machine uses controlled axes of
zero point - the point of origin - separates the positive sec- motion. They are defined as and the Z
tion of the axis from the section. In the right-hand X to of the
coordinate system, the at the origin and is parallel to dimension
is directed towards rig III upwards for the the Z axis is the spindle movement. On a
Y axis and towards lhe viewpoint for Z machining center, the X axis is longitudi-
Opposite directions are the Y axis is the saddle cross direction and
Chapter 4

, X+
• REAR LATHE

, FRONT LATHE

VERTICAL

~--I"""- X+

Figure 4-10
Typical machine axes of a eNe lathe (turning

Figure 4-8 Another variety. a venical CNC lathe, is basicaHy a hori-


Standard orientation of planes and eNe machine tool axes zan tal lathe rotated 90 0 • Typical axes for the and
vertical machine axes, as applied to turning, are illustrated
the Z axis is the spindle direction. horizontal machining in Figure 4-10.
centers, the terminology is changed due to the design of
these machines. The X axis is table longitudinal direc- • Additional Axes
tion, the Y is the column direction the Z axis is the
spindle direction. Horizontal machine can be as a A CNC machine of any type can designed with one or
machine rotnted in space by ninety degrees. The more additional axes. normally designated as second-
additional feature of a horizontal machining center is the ary axes using the U, V and W letters. These axes are nor-
indexing B axis. Typical machine axes applied to CNC ver- mally parallel to primary X, Y and Z axes respectively.
tical machines are illustrated in 4-9. For a or an indexing applications, additional axes
are defined as A, B and C axes, as rotated about the
X, Y and Z axes, in their respective order. Positive di-
rection of a rotary an indexing) is direction re-
quired to advance a right handed screw in the positive X. Y
or Z axis. The relationship of the primary and the second-
ary (or supplementary) axes is shown 1.

Primary
r~~"'-"""" axes
__ Secondary
axes
TOP VIEW ISOMETRIC VIEW Arc center
1..\--+---+--+--+--+ - - vectors
Figure 4-9
Rotary
Typical machine axes of a vertical eNe machining center axes
,
• Axis Orientation· Turning I
X axis Yaxis Zaxis
Most CNC lathes have two axes, X and Z. More axes are related related related
available, but they are not important at this point. A special
third axis, the C axis. is designed for milling operations 4-11
(live tooling) and is an option on typical CNC lathe. Relationship of the primary and the sec:oncfarv axes
What is more common for CNC lathes in industry, is the center modifiers (sometimes the arc center
double orientation of axes. Lathes are distinguished vectors) are not true axes, yet they are also to the
as front and a rear lathes. An example of a lathe is primary axes This subject will described in the
similar to the conventional engine lathe. All the slant bed section on Circular Interpolation, in Chapter
types a lathe are the rear kind. Identification of the
axes have often not followed principles.
CONTROL SYSTEM

A unit equipped witn a In order to fully understand CNC programming pro-


control system is commonly known as a cess, it is important to understand not only the intricacies of
an analogy of the machine tool as the to machine a pan, what tools to select, what speeds
system, control unit is its to use, how to many other fea-
are no levers, no knobs and no tures. It is equally the computer, the
machine the way they function on COniVCr1lIIO£ CNC unit, actually to be an expert
and lathes. All the machine in electronics or a I shows an
and hundreds of other tasks are by a actual Fanuc control
programmer and controlled by a computer that is ma-
of the CNC unit To make a program for a CNC ma- The machine own
chine tool means to make a program for system. panel, with all the and button needed to operate
the machine tool is a major as well, but the CNC machine and all its features. A typical operation
it is the unit thai of the pro- panel is illustrated in Another item required
structure and its syntax. the system. the handle, will be described as well.

HELP KEY
\.
GE Fanuc Series 16-M

(OFF
I
I

1--1
\
OPERATION
MENU

ON I OFF BUTTONS,

Figure 5·1
A typical example of 8 Fanuc control panel. actual layout and features will vary on different models (Fanuc 16M)

19
20 5

GENERAL DESCRIPTION control unit - the


work in conjunction
anything useful on its own.
a brief look at any reveals that there are if the program itself
two basic components - one is operation paJlel, full tons and keys are by
rotary switches, toggle and push buttons. The
other component is the display screen with a keyboard or a control over the program "''''''''''''''.'''
keypad. The programmer who does not normally work on • Operation Panel
CNC machine will if ever, have a reason to use
the operation panel or the display screen. They are Depending on CNC machine,
at the machine to the machine operator. and ing table covers most typical and common
the as well as to control the activi- found on the modern operation panel. There are some
of the machine. differences for the of a machining center a
but both operation are similar. As with any
Should the CNC interested in ma- reference book, it always a good idea to double
chine operation? Is for the to with specifications and recommen-
know and understand all of the conlIol system? dations. It is common machines In
is only one answer to both questions - definizely have some special

CYCLE D ERRORS
x y z 4 MOO M01 M30 ALARM
o 0 o 0 o
OPTIONAL BLOCK M-S-T MACHINE DRY
STOP SKIP LOCK LOCK RUN
ON ON ON ON ON
@ @ @ @ @ OFF
OFF OFF OFF OFF OFF OFF AUTO

ID MDI 90
80
TAPE 175 70
150 60
125 50
1 40-
EDIT 80 400 30
60 20
MODE 40 600 10 0
30 - 800
20 1000
Y Z 15 1200
X 10 1500
5 2000
0 4000 ccw
D
EDIT ...! ,-_._-

80 90

110 0
120 CYCLE START FEEDHOLD
OVERRIDE %, N OVERRIDE % AUTO EMGSTOP

Figure 5·2
A typical operation panel of a CNC macnmlllO center actual features wiN vary on different models
CONTROL 21

Feature Description Feature Description


ONI Power and control switch for AUTO Mode automatic operations
switch the main power and the control unit
MEMORY Allows program execution from the
Starts program execution mode memory of the CNC unit
Start
Or MDT command
Allows program execution from an
Emergency all machine and external device, such as a desktop
mode
Stop turns off power to the control unit computer or a punched tape
Feedhold motion of all axes EDlT Allows to bt: made to a
program stored in the CNC memory
Single Block Allows program run one block at a time
MANUAL
Temporarily stops the program Allows manual
Optional Stop Mode
execution (MOl required in program)
JOG Mode Selects
Ignores blocks preceded with
Block Skip
a forward slash (I) in the program RAPID Mode mode for setup
Enables program testing at fast Memory
Dry Run (switch) to allow program editing
feedrales (without a mounted part) Access
Spindle Overrides the programmed spindle Error lights Red an error
Override usually within 50-120% range
Feedrate Overrides the programmed feedrate, is some may not be listed, vinual\y all of
Override usually within 0·200% range those in table are somewhat related to the CNC pro-
Many control systems unique of their
Chuck Shows current status of the chuck own. These features must known to
Clamp (Outside I Inside The program supplied to the machine should
not rigid - it should 'user friendly'.
Clamp Shows current status of table

Coolant • Screen Display and Keyboard


Coolant control ON I I AUTO
Switch The screen display is 'window' to the computer. Any
Gear Shows current status of working program can be viewed, including the status the
Selection gear range selection control, current tool position, various offsets, parameters,
even a graphic representation of the Tool Path. On all CNC
Spindle Indicates spindle rotation direction units, individual monochrome or color screens can be se-
Rotation or counterclockwise) lected to have the desired display at any time, using the in-
keys (keyboard pads and soft keys). Setting for interna-
Spindle tionallanguages is also possible.
Manual orientation of [he spindle
Orientation
The keyboard pads and soft keys are used to input in-
Tool Change Switch allowing a manual tool structions to control. can modi-
fied or deleted, new programs can Using key-
Switches and relating to setup of board input, not only the machine axes motion can be
Position the machine from reference position controlled, but the spindle speed and feed rate as well
Manual Generator (MPG). Changing internal evaluating various
Handle used for Axis Select and Handle diagnostics are more specific means of control, often re-
Increment switches stricted to service people. Keyboard and screen are used to
set program origin and to hook up to devices,
Tailstock Tailstock and/or switch to manually as a connection with another computer. There are
Switch IJUOUI'v"1 the tails!ock many other options. keyboard allows use of
fers, digits and symbols for data entry. Not every keyboard
Indexing Manually indexes machine table allows the use of all the alphabet letters or all available
Table Switch setup symbols. Some control panel keys have a description of an
operatiol1, rather than a letter, digit or symbol, example,
MOl Mode mode
Read Punch or the Offset
22 Chapter 5

• Handle SYSTEM fEATURES


machine has a rotary
handle that can move one by as little as the The CNC unit is more than a sophisticated spe-
least increment of the control system. The official Fanuc purpose computer. 'special purpose' in this case is
name for the handle is Manual Pulse Gen.erator. Associ- a computer capabll' of controlling the of a ma-
with the handle is the Axis Select switch dupli- tool, such as a lathe or a machining center. It means
cated on the operation as well as on the handle) and the computer to designed a company has ex-
the range of increment is the least increment X I, X 10 pertise in Ihis type of special purpose computers. Unlike
X I(0). The X in this case is the multiplier and many business types each CNC unit is made
stRnds for limes'. One handle division will move the se- a particular customer. customer is typically ma-
axis by X times the minimum increment of the active chine manufacturer, not the end user. The manufacturer
of measurement. In Figure and the following table certain requirements that the control system to
are the details a typical handle. requirements that reflect the uniqueness of the ma-
chines they build. The basic conlrol does not change, but
some customized features may added taken away)
y Z for a specific the system IS to
X ...... AXIS the manufacturer, more features are added to the
SELECT system. They mainly relate to the design capabilities of
the machine.

x1 x10 A example is a CNC unit for two machines that are


the same in all except one. One a
x100 manual lool changer, the other an automatic 1001
changer. order to support the automatic tool changer, the
CNC unit must have special features . that are not
for a machine without Ihe rool changer. The more
complex the CNC system is, the more expensive it Users
that do not require all sophisticated features, do not pay
a for they do not need.

• Parameter Settings
infonnalion that establishes the built-in connection
between the control and machine tool is stored as
special data in called the system parame-
ters. Some of the in this handbook is quite ~pe-
cialized listed for reference only. Programmers with
limited experience not to know parameters
in a great depth. The original factory are sufficient
for most machining jobs.
When (he parameter screen is displayed, it shows the
rameler number with some data in a row. Each row num-
5~3
one bYle, digit in the is called a
An example of a detached handle, called the Manual Pulse word bit is the Binary digiT
Generator (MPG), With a typical fayout and features. is smal unit of a parameter input. Numbering
Layout and features may vory on different machine models.
starts with O. from the to the left:
II
One handle division motion is ...
Handle
Multiplier Metric units for English units
" The Fanuc control system parameters belong to one of
Xl 0.001 mm .0001 inch three groups, specified within an allowed range:
"
Xl0 0.010 mm .0010 o codes

Xl00 : 0.100 mm .0100 inch o Units inputs


o Setting values
CONTROL SYSTEM 23

The groups use different input values. binary input Parameters related to High-Speed Skip Signal Input
can only have an input of a 0 or I for the bit data format, 0 Parameters to Automatic Tool Compensation
10 +127 for byte type. Units inpur has a broader scope - Parameters related to T001 life Management
the unit can in mm, mmimin, in/min, Parameters related to Turret Axis Control
milliseconds, etc. A value can also be specified within a Parameters related to High Precision Contour Control
given range, for example, a number within the of Parameters related to Service ... and other parameters
0-99, or 0-99999, or + 127 to -127, etc ..
Quite a parameters have nothing to do with daily pro-
A typical example of a binary input is a selection be- gramming and are listed only as an actual example, All sys-
tween two options, instance, a feature called dry run tem should be set or only by a quali-
can set only as effective or ineffective. To select a fied person, as an experienced technician. A
ence, an arbitrary bit number of a parameter has be set to 0 programmer or operator should not modify any parameter
to make the dry run effective and to I to make it ineffective, settings. These changes require not only qualifications but
authorization as well. Keep the list of
UniTs inpur, for example, is used to selthe increment sys- settings away from control, in a safe place, just in case.
tem - the dimensional units, Computers in general do no!
distinguish between inch and metric, just numbers, It is up
to the user and the setting, whether the control
will 0.00] mm or .0001 inches as the Many parameters are periodically updated pro-
menL Another example is a parameter selling that stores gram processing. The CNC operator is usually not aware
the maximum feedrate each axis, the maximum spindle that this activity is going on at aiL There is no real need to
speed, etc. Such values must never be set higher than the monitor this activity. The safest to observe is that once
machine can support. An indexing axis with a minimum have set by a qualified technician, any
crement of 1°, will not become a rotary with ,00 I 0 in- temporary changes required for a given work should be
crement, just because the parameter is selto a lower done through the CNC program. If permanent changes are
even if it is possible. Such a setting is wrong and can required, an authorized person should assigned to do
cause serious damage! them - nobody
To better understand what the CNC system parameters
can do, is an abbreviated Ilsting of parameter classifi- • System Defaults
for a typical comrol system (many them are Many parameter settings in the control at the time
meaningful to the technicians only); of purchase have been entered by the manufacturer as ei-
Parameters related to Setting ther the only the most suitable choices, or the most
Parameters related to Axis Control Data common selections. That not mean they will be the
Parameters related to Chopping settings - it means they were selected on the
Parameters related to the Coordinate System their common usage, Many settings are rather conserva-
Parameters related to Feedrate tive in values, for safety reas»ns.
l-':::Ir'Am;::tT",r<: related to Acceleration/Deceleration Control

Parameters related to Servo The set of parameter values established at the time of in-
Parameters related to DVDO stallation are called the default seHings. The English word
Parameters related to MOl, EOIT. and CRT 'default' is a derivative of a word 'defalu', that can
Parameters related to Programs be translated as 'assumed'. When main to the
Parameters related to Serial Spindle Output control is turned on, there are no set values passed to pa-
Parameters related to Graphic Display rameters from a program, since no program has yet been
Parameters related to I/O interface used. However, certain active automati-
Parameters related to Stroke Limit without an external program. a culler ra-
Parameters related to Pitch Error Compensation dius offset is automatically canceled at the startup of (he
Parameters related to Inclination Compensation control system, Also canceled are the fixed cycle mode and
Parameters related to Straightness Compensation tool length offset. The control 'that certain condi-
Parameters related to Spindle Control tions are preferable to others, Many operators will agree
Parameters related to Tool Offset with most of these initial settings, although not necessarily
Parameters related to Canned Cycle with of them. Some settings are customizable by a
Parameters related to Scaling and Coordinate Rotation of a parameter settings. Such settings will . . """"''''''A
Parameters related to Automatic Corner Override permanent and create a /lew 'default'.
Parameters related to Involute Interpolation
I-'::lr::!mpte:>r!:! related to Uni-directional Positioning

Parameters related to Custom Macro IUser Macro)


Parameters related to Program
24 5

A computer is fast and accurate but has no intelligence. Modem methods measuring memory capacity prefer
People are slow and make elTors, but have one unique to use bytes as the unit, rather that a length of an obsolete
ability - they think. A computer is just a machine that does tape. A byte is the smallest unit of storage capacity and is
not assume anything, does not consider, does not feel - very roughly equivalent to one character in the program.
computer does nOl think. A computer not do anything
that a human effort and ingeolli.ty has not during the The memory capacity of the control system should
design process, in form of hardware and software. enough to store the longest CNC program '"''',. . '''£''''''''
on a regular basis. That requires some planning
When the the soft- machine is purchased. example, in three dimen-
ware sets certain existing to their default condi- sional mold work or high speed machining, the cost of ad-
tion, by engineers. Not all system parameters, ditional memory capacity may very high. Although any
only parameters can have an assumed condition - a cost is a relative term, there are reliable and inexpensive al-
condition that is known as the default value (condition). well worth looking into.
example, a tool motion has three basic modes - a One alternative is running the CNC program from a per-
rapid motion, a linear motion and a circular motion. The sonal An communication software
default motion is controlled by a parameter. Only and cabling is required to connect the computer with the
one setling can be active at the startup. Which one? The an- CNC system. simplest version is to transfer the CNC
swer depends on the parameter setting. Many parameters program from ODe computer to the other. More sophisti-
can be to a desired state. Only the rapid or the linear cated possibility includes software and cables that can actu-
mode can be set as default in the example. Since the rapid ally run the machine from the personal computer, without
motion is the first motion in {he program, it seems to make luading it 10 the memory of CNC first This method is
sense La make it a default - wail' often called 'dripleeding' or 'bitwise input', When oper-
from the personal computer, the CNC program can be
Most controls are set (0 the linear motion as Ihe default as long as the capacity of the storage device, typically the
(GO I command), to be in at the start - strictly for hard drive.
safety reasons. When the machine axes are moved manu-
ally, the parameter selling has no effect. If a manual input of Most CNC programs will fit into the internal memory of
an axis command value takes place. either through the pro- control system. Many controls use the of avail-
gram or from the control panel, a tool motion results. If the able or the equivalent length of are
motion command is nm specified, the system will use the some formulas that can be used to get at least the approxi-
command mode that had been preset as the default in mate memory capacity calculations:
parameters. the default mode is a linear motion GO I,
the is an error condition, faulting the system for the C) Formula 1 :
lack of a Jeedrate! is no cutting feed rate in effect,
which the GO I requires. Had the default setting been the find the program length in meters,/When the capacity
rapid motion GOO, a rapid motion would be performed. as it
is known in use the following formula:
no! programmed
It is beneficial to know the default settings of all controls
in the shop_ Unless there is a good reason to do nrn.... n>Jl
~ where ...
defaults for similar controls should be the same.
Sm = Storage capacity in meters
• Memory Capacity No = Memory capacity (number of characters)
CNC programs can be stored in the control
C) Formula 2 .
size is only limited by the capacity of the control.
",rr\('l""'1"1"1

capacity is in a variety of ways, originally as To find the length program in/eel. when the capacity is
the equivalent length of tape in meters or feet, lalely as the known in charaCters, use the following fOlTnula:
number oj bytes or the number of screen pages. A common
minimum capacity of a CNC lathe control is 20 m
of tape (66 ft). is an old fashioned method thal some-
how persisted in staying with us. On CNC milling systems,
the memory requirements based on the same criteria are
generally and the typical minimum memory capacity
is 80 m or ft Optionally, larger memory capacity IG'i" where ...
can be added to the control system. The minimum memory
5, Storage capacity in feet
capacity the control varies from one machine to another- No :: Memory capacity (number of characters)
always control specifications carefully.
CONTROL SYSTEM 2S

~ Formula 3 . block are processed as a single inSlrllClion. The blocks are


received by control system in sequential order, from the
To find the number of characters in a given program, if top down and in the order they appear in the program.
the system memory capacity is known in meters: NormaDy, a CNC machine is run in a continuous mode,
while blocks are processed automatically, one after an-
other. This contim1ily I!; important for production, but not
practical when proving a new for example.
disable the continuous program execution, a Single
Block switch is provided on the operation panel. In sin-
lIE where ...
block only one block of the program will be
C Number of available characters time the C)'cle is On the op-
m == Memory capacity in meters eration panel, the single block mode can used separately
or in combination with other that make
Virtually the same results can be achieved by a slightly provmg and more accurate.
restructured formula:
• feedhold
Feedhold is a special push button located on operation
panel, usuatly dose to the Cycle Start bulton. When this
button is pressed during a linear or circular axes mo-
Q Formula 4: tion, it will immediately SLOp the motion. action ap-
plies to all axes active at the lime. is convenient
To find of characters, if the system memory for a machine setup or a first run. Some types of mo-
is known in feer, use the following formula: lion the function of feedhold or disable it alto-
gether. For example, threading or tapping modes make the
switch inoperative.
Activating feedhold at the machine will not change any
IGf' where ... other program values - it will only affect motion. The
feedhold will illuminated (in light), as long as
C = Number of available characters It IS The CNC programmer can override the feed-
f == Memory capacity in feet hold from within the program, for special purposes.
Latest controls show the available memory as the • Emergency Stop
number of free screen display pages. This type of data is
not easy to convert as the others. Every CNC machine has at least one special mushroom
push bUHon, red in color, that is located in an acces-
In cases the available memory capacity is too sible place on the machine. It is marked the Emergency
small to accept a program, several techniques are SLOP or E-Sl0p. When this buuon is pressed, all machine ac-
available to minimize the problem, for example, the pro- /ivities will cease The main power will
length reduction methods, in Chapter 50. interrupted and the will have to restarted.
emergency stop switch is a mandatory safety feature
MANUAL PROGRAM INTERRUPTION on all CNC machines.
Pressing the emergency stop button is not always the best
If a program needs Lo interrupted in the middle of pro- or even the only way LO stop a machine operation. In fact,
cessing, the control system offers several ways to do that, the latest controls offer other features. far less severe, de-
the operation panel. The most common fea- signed to prevent a collision between a cutting tool and the
tures of this type are toggle or push buttons for a part or fixture. Previously discussed feedhold button is only
single block operation,feedhold and the emerge/lcy SlOp. one option, along with other features. If the emergency stop
must be used at all, it should be as the resort, when
• Single Block Operation any other action would require unacceptably time.
normal purpose of a program is to control the ma- There is no need panic, if something does wrong.
chine tool automatically and sequentially in a continuous some machine the effect of Emergency Stop
mode. Every program is a of commands - is not always apparent. example, the spindle requires a
or instructions - written as individual of code, certain time deceleration to slap.
blocks. Blocks and their conct!pts will be described in the
following chaplers. All in a
26 5

MANUAL DATA INPUT - MOl Override can used individually or together.


They are availahle on control to make the work
for both the operator and the programmer. operator
A CNC is not always operated by the means of a
does not need 10 'experiment' with speeds and feeds by
program. During a pan setup, the CNC operator has to do a constantly editing the program and tne programmer has a
number of that require physical movements of
certain latitude in seuing reasonable values for the cuttino
the machine slides, rotation spindle, tool change) etc. fcedrales and the spindle speed. The presence of the over~
There are no mechanical devices on a CNC machine. The switches is not a licence to program unreasonable
handle (Manual Pulse GeneralOr) is an electronic, not a cutllng values. The overrides are fine tuning tools only -
unit. In to operate a CNC machine with- program must always renee! the machining conditions of
out conventional mechanical devices the control system the work. The usage of switches does nut make
fers a feature eaHed the Manual DaTa inpUl - or MOL any program changes, but the CNC operator the
The Manual Data Input the input of a program port,unily to edit the program later to the optimum
into the system one program inSTruction at a time. If cuttmg Used properly, the switches
(00 instructions were to be input repeatedly. such as a can save a amount of valuable programming time as
long program, the would be very inefficient. well as the setup time-at the CNC machine.
During a setup and similar purposes, one or a few
structions at a time will benefil from the MDL • Rapid Motion Override
access the MDI !.he MDI key on the operation Rapid motions are selected in (he CNC by a pre-
panel must be selected. That opens the screen display with paratory command without a specified If a ma-
the current status of the system. Not all, but the majority of ~hine is d~siglied to move at 500 in/min (12700 mm/min)
codes are allowed in the MDI mode. Their 10 the rapId mode, this rate will never appear in the pro-
is identical to the of a CNC program in writ- gram. Instead. you call the rapid motion mode by
ten form, This is one area where the CNC operator acts as a ming a special preparatory command GOO. During pro-
CNC programmer. It is important that the operator is gram execution, all motions in the GOO mode will be at the
trained at least in the CNC programming, cer- manufacturer's fixed rate. The same program will run faster
tainly to the point of being able to handle the setup instruc- on a with high motion rating then on a ma-
tions for Manual Data Input. chine with low rapid motion
During setup, the rapid motion rare may some
PROGRAM DATA OVERRIDE control for program proving. when high rapid rates are un-
comfortab~ 10 work with. After the program had been
All CNC units are designed with a number of special ro- proven, raptd rate can be applied at its maximum. CNC ma-
tary swttches that one common feature - they allow chines are equipped with a rapid override switch to allow
the CNC operator to override the programmed of the temporary rapid motion settings. Located on the control
spindle or the programmed speed of axis motion. For panel, this switch can be st![ 10 one of the four
example, a 15 in/min feedrate in the program produces a Three of them arc as the percentage of the max
slight A knowledgeable operator will know that by mum rate, typically as 100%, 50% and 25%. By switching
increasing the feedrate or decreasing the spindle speed, the ~o one of them. the rapid motion rate changes. For example,
chaner may be eliminated. It is possible to Ihe )fthe maximum rapid rate is 500 inJmin or 12700 mm/min,
or the spindle by editing the program, but the reduced rates are inJmin or 6350 mmlmin at
this method is not very A certain 'experimenta- the 50% selling and 125 in/min or 31 mm/min at the
tion' be necessary duri the actual cut to find the opti- 25% setting. oflhe reduced rates is more comfonable
mum value. The manual override switches come to to work with setup.
the rescue, they can be by trial during The fourth position of the switch offen has no percentage
operation. There are four override switches found on most and is identified as an F I or by n small symbol. In
control panels: this seLting, the rapid motion rale is even slower than that
o Rapid feedrare override (rapid traverse) Why is it not idenli fled as or 1 for ex-
(modifies the rapid motion of the machine toof) ample? The reason is simple - the control system allows a
selection as to what the value will Jt may he
o Spindle speed override a setting of between 0 and 100%. default seuin a is
(modifies the programmed spindle T/min)
the mOSI logical - usually 10% of the maximum r:pid tra-
o Feedrate override (cutting feedrate) verse rate. setting should never be higher than 25%
(modifies the programmed feedrate) can be done only through a setting of a system
o Dry run mode ler. Make sure that all persons who work on such a machine
(changes cutting motions to a variable speed) are aware of the
CONTROL SYSTEM

• Spindle Speed Override • Feedrate Override


same logic used for the application the rapid rate The most commonly used override switch is one that
override can be used the spindle speed override. The re- changes FOT milling controls,
quired can be established during the actual the feed rate programmed in in/min or mlmin. lathe
by using the spindle speed override switch, located on the controls, the feed rate is programmed in itt/rev or in mnt/rev.
control panel. For example, if the programmed spindle The [ceurate per minute on is used only in cases
speed of 1000 rlmin is loa high or LOa [ow, it may be when the spindle is not rotaling and the needs to be
changed temporarily by switch. the actual cut- controlled.
ting, the CNC operator may experiment with the spindle
speed switch to tind the optimum speed for the The new feedrate calculation, based on the
given cutting conditions. method is a much faster thall ""A/~r""'"
selling, i~ similar to that for spindle speed:
'experimenting' with the program values.
spindle speed switch can on
some controls or selectable in increments of 10%, typically
within the 50-120% of the programmed spindle ~ where ...
A programmed at 1000 r/min can be over-
ridden during machining to 500, 600, 700,800,900,.1000, Fn = Optimized - or new-
Fp Originally programmed tP'j>,fifl'llh"
1100 and! 200 r/min. This range allows the CNC op-
p == Percentage of feedrate
erator flexibility the spindle rotation to
suit the CUlling conditions. is a catch, however. The can overridden within a large range, Iypically
optimized spindle speed chnnge may apply \0 only one tool from 0% to 200% or at least 0% to 150%. When the
of Ihe many used in the No CNC operator can be '·"'"..n ...... ,.,. override is set to 0%, the CNC machine
to watch for that tool and switch the will stop the cutting motion. Some CNC machines do nOI
speed up or down when A simple human oversight have the 0% percent setting and start at 10%. maxi-
may ruin the part, the cutting 1001 or both. recom- mum of 150% or 200% CUlling feedrate will cut I or
mended method is to find out the optimum speed for than the value.
1001. write it down. then change the program
so all the tools can be at the 100% spindle override There are situations, where the use of a feed rate
for production. would the pari or the cutting tool - or both. Typical
examples are various tapping cycles and single point
Comparison of on the threading. These operations require spmdle rotation syn-
switch with the increments on switches for the rapid tra- chronized with the feed rate. In such cases.
verse override earlier) and the feedrate ",,,,,,.lt1,, override will ineffective. The override will
next), more limited The rea- effective. if standard motion commands 000 and GO I
son spindle speed range of 50% to I is safety. are used to program aoy lapping or tread cutting mOlions.
illustrate with a rather example. no operatOr poimilireading command G32, tapping fixed cycles
would want La mill, drill or cut any material at 0 and G84, as well as lathe threading cycles 092 and
spindle rotation), possibly combined a heavy feedrate. 076 havc the feedrate override cancellation built into the
software. All these and other related are de-
]n to into 100%
in the handbook, in more
speed in the program, D. new spindle has to be calcu-
lated. If a programmed spindle speed of 1200 rlmin a
• Dry Run Operation
tool is always set to 80%. it should be edited in the
\0960 r/min, then at 100%. The formula is quite Dry run IS a special kind of override. II is activated from
pie: /' the control by the Dry Run switch. It only has a direct
effect on and allows much higher feedrate
that used for actual machining. In praaice. it means the
program can be executed much faster than using a feedrate
at the maximum No actual
~ where ... place when the dry run is in effect.
So ::::: Optimized - or new r/min What is Ihe purpose of the dry run and what are its
Sp Originally programmed r/min tits? Its purpose is to test the integrity of program
p = Percentage of spindle override CNC operator cuts the first The benefits are
Overriding the programmed spindle speed on the CNC mainly in Ihe time saved during program proving when no
machine should have only one purpose to the machining takes place. a dry run. the part is nor-
spindle rotation for best cutting conditions. mally 1101 mounted in the lfthe part is mounted in
5

the device and dry run is used as well. it is very • Sequence Return
important to provide sufficient clearances. Usually, it
Sequence Return IS a function controlled by a switch or a
means moving the tool away from the parr. program is
key on the control panel. purpose is to enable the CNC
then executed 'dry', without actual cutling. without a
operator to start a program from the middle of an inter-
ant, just in the air. Because of the heavy feed rates in the dry rupted program. Certain programmed functions memo-
run, the part cannot he machined safely. a run,
(usually the last and feed), have to be In-
the program can be checked all possible errors except
put by the Manual Data Input key. The operation of this
those that to the actual contact of the tool with function is closely lied to the machine tool design. More
the material.
formation on the can be in the machine tool
The dry run is a very efficient setup aid to manual. This function is very handy when a tool breaks
all integrity of the CNC program. Once the is during processing of long programs. It can save valuable
proven during a dry run, the CNC operator can concentrate production time, if properly.
on sections of the program that contain actual machin-
ing, Dry run can used in combination with • Auxiliary Functions lock
features of the operation panel. ore three available to the operation of a
CNC machine that are part of the 'auxiliary junctions'
group. These functions are:
• Z Axis Neglect
Miscellaneous functions lock Locks M functions
Another very useful tool for testing programs
on CNC machining centers (not lathes) is a toggle switch Spindle functions lock locks S functions
located on the operation panel called the Z Axis Neglecr or
Tool functions lock Locks T functions
Ignore. As when this switch is
activated, any motion for the will not
be performed. Why the axis? Since the X and Y axes are described in this chapter, auxiliary functions
used to profile a of the part most common con- generally relate to the technological aspects of the CNC
touring operations), would make no sense to temporarily They control such machine functions as
cancel either one of axes. neglecting (disabling) spindle rotation, spindle orientation, coolant selection, tool
Z temporarily, CNC operator can concentrate changing, indexing table, pallets and many others. To a
on the of the part contour, without worry- lesser degree, they also control some program functions,
ing about the depth. Needless to say, this method of pro- such as compulsory or optional program SLOp. subprogram
gram testing must take place without a mounted part (and flow, program closing and others.
normally without a coolant as well), Be careful here! It is
important to or disable the switch at (he right time. When auxiliary functions are locked, machine re-
lf the Z axis motion is disabled before the Cycle Start key is lated miscellaneous functions M, all spindle functions S
all following Z commands will ignored. If all 1001 functions T will be suspended. Some machine
motion is enabled or disabled during program ",.I"\"I'C<'_ 1001 manufacturers the name MST Lock rather than
ing, the position the Z may inaccurate. Auxiliary Functions Lock. MST is an acronym the
first letters from the words Miscellaneous, Spindle and
Z switch may be in bolh manual Tool, LO the program functions that will be locked.
and automatic modes of operation, Just make sure that the
motion along the Z axis is returned Lo the enabled mode, The applications of these locking funclions are limited to
once the program proving is Some CNC ma- the job setup and program proving only and are not used for
chines require resetting of the Z axis position production machining.

+ Manual Absolute Setting • Machine lock


If this feature is on the control (some controls Machine Lock function is yet another control feature
use it automatically), it (he operator to re- program provi So far, we have looked at the Z axis Ne-
sume a program in the middle of Manual abso- glect function and the locking of the auxiliary functions.
lute can save particularly wIlen processing long Remember that the Z Neglect function will the
Manual Ahsolure setting switch is not a typical motion of the Z axis only and the Auxiliwy Functions Lock
some extent, it is functionally to the Se- (also known as Ihe MST lock) locks the miscellaneous
quence Return setting. Check machine tool documenta- functions, the spindle functions lool An-
tion using either of these two features. other function, also available through the control panel, is
called the Machine Lock. When this function IS enabled,
the motion of all axes is locked. It may seem to test
CONTROL SYSTEM 29

a locking all the tool motions, but there is a the machine operator finds what values must be
good reason to use this It CNC operator changed in the program itself, the program must edited
the chance to test the program with virtually no chance of a to reflect these changes. Not only for the job currently
collision. worked on, but also for repetition of the job in Ihe fu-
lUre. After all, it should be the goal of every programmer
When the machine lock is enabled, only the axis motion and CNC operator to run any job at one hundred ef-
is locked. All other program functions are ficiency. This efficiency is most likely as a com-
mally, including the tool and spindle bined effort of operator and the programmer. A good
This function can used alone or in combination with CNC programmer will always make the effort to
other functions in order to dlscover possible program er- 100% efficiency at desk and then improve the
rors. Probably the mostlypical errors are errors and even
the various toot offset functions.

• Practical Applications SYSTEM OPTIONS


Many of the control features described in Optional features on a system are like options on a
used in conjunction with each other. A is car. Whal is an option at one dealership, maybe a
Run used in conjunction with the Z Neglect or the feature at another. Marketing and corporate phi-
Auxiliary Functions Lock. By knowing what function are losophies have a lot to do with this
available, the CNC operator a to
needs of the moment There are many areas of equal impor- Here is a look al some conlrol features Ihal mayor may
lance on which the CNC operator has to concentrate when nol be as optional on a system. BUI
setting up a new or Many some important disclaimer first:
lures of the control unit are to the operator's
easier. They allow concentration on one or two items at This handbook covers the subject matter relating
than (he complexity of the whole program. to the majority of control features, regardless of whether they
These have in a reasonable are sold as a standard or an optional feature ofthe system.
now is the lime to look at some practical applications. It is up to the user to find out what exact options are installed
on a particular control system.
During the initialization of a new program run, a good
CNC operator will take certain precautions as a maHer of • Graphic Display
facL Forexample, the first part of the job will mosllike!y be
tested with a rapid motion set to 25% or 50% of the avail- Graphic representation of the tool path on the display
able rapid rate. This relatively slow setting allows the oper- screen is one of most important, as well as sought after,
ator to monitor the integrity of the program processing, as control options. Do not confuse (his oplion with any type of
well as specific details. The details may include items such conversational programming, which also uses a ,..,.,."'''.~
as a possibility of insufficient between tool tool path interface, In the absence a computer
and the material, checking if the Path looks reason- programming (CAM), a display on the conLrol
able, and so on. panel is a major benefit. Whether in monochrome or in
color, the convenience of seeing the 1001 motions before ac-
The CNC operator will have a number of tasks to perfonn maChining is much appreciated by CNC and
simultaneously. Some the Lasks include monitoring the alike.
spindle feed rate , tool motions, tool changes, cool-
ant, etc. A careful and conscious approach results build- A typIcal graphics option shows the axes and
ing the confidence in the integrity of the CNC program. It two cursors for zooming. When the tool path is tested, indi-
may be second or even the third pan of the job when the vidual tools are distinguished by different colors, if avail-
CNC operator starts thinking of the optimization cut- able or different intensity. Rapid motions are represented
ling values, such as spindle speed and the culting by a dashed line lype. cutting motions by a line
This optimization will truly reflect the ideal speeds lype. If the graphics function is applied during machining,
a particular workpiece under setup. the lool motions can watched on the display screen -
very helpful CNC machines oily
A production supervisor should not arbitrarily an and scratched safety shields.
override selling than 100%. Many consider
the CNC program as an unchangeable document They Upwards or downwards the display allows for
the attitude that what is wrilten is infallible - which is evaluation of a tool motion or detail areas. Many
not always true. Often, the operator may no controls include actuallOol path simulation, where the
other choice bur 10 override the programmed values. What shape of the part and cuLting 1001 can be set first, then
is mosl imporranl, is the modification the program that seen on the screen.
reflects the optimized cutting conditions.
Chapter 5

• In-Process Gauging • Machining Cvcles


During many unattended machining operations, such as Both the milling and the turning controls offer a variety
in manufacturing cells or Agile manufacturing, a periodic of machining cycles. Typical machining for milling
checking and adjusting dimensional tolerances of the part operations are calJedfixed cycles, also known as the canned
IS imperative. the cUlling 1001 wears out, or perhaps be- cycles. They simplify simple poinl-Io-point machining op-
cause causes, the dimensions may fa!! into the erations such as drilling, reaming, boring, backboring and
'out-of-tolerance' zone. Using a device a suitable CNC cycles for face
program, the In-Process Gauging option quite a sat- ing, pocket milling, patterns, etc.
isfactory solution. The CNC part program for the
In-Process Gauging option will 'Some quite unique CNC lathes have many machining cycles available
formal features - it will written and will to remove material by roughing, profile finish-
be using another option of the control system - the Custom ing, facing, taper cutting, grooving and threading. Fanuc
Macros (somt!iimes called the User Macros), which offer conlrols call cycles Multiple Repetitive Cycles.
variable lype Allihese are designed for programming and
I f a company or a CNC machine shop is a user of the In- faster dlanges at the machine. They are built in Ihe conlrol
Gauging option, there are good chances that other and cannot be changed. Programmer supplies the cutting
control options are installed and to the CNC during the program by using appro-
programmer. Some of Ihe most typical options are probing priate cycle call command. All the processi ng is done auto-
software, tool life management. macros, etc. This technol- matically, by the CNC system. Of course, there will always
ogy goes a lillie too far beyond standard CNC program- special programming that cannol use any cycles
ming, although it is closely related and frequently used. and have to be programmed manually or with the use of an
Companies that already use numerical control technol- external computer.
will be well advised to look into these options to re-
competitive in their lield, • Cutting Tool Animation
Many of the graphic tool path displays delined earl icr, are
• Stored Stroke limits represented by simple lines and arcs. The currenltool posi-
Definition an area on a CNC lathe or a on a tion is usually the location of line or arc endpoinl on
machining center that is \0 work within, can be stored
screen. Although this method of displaying the motion of
as a control system sTored stroke limit. the CUlling tool graphically is certainly useful, there are two
These stored stroke are designed to a colli- to il. The of lhe cutting tool and the
sion between the cutting tool and a fixture, machine tool material being removed cannot be seen on the screen and a
or the part. The area (2D) or the cube (3D) can be defined 1001 path simulation may help a bit. Many modern controls

as either enabled for cutler entry or disabled for the cut- incorporate a feature called CUllillg Tool Allima~
ler entry. It can set manually on the or, if lion. If on the il shows Ihe blank of the
able, by a program input. Some controls allow only one part, the mounting device and the tool shape. As the pro-
area or cube to be defined, others allow more. gram is executed, the operator has a very accurate vis-
ual aid in program proving. Each graphic element is
When this option is in effect and the unit a by a different color, for even a better
motion in (he program that takes place within the forbidden blank the mounting device and
zone, an error condition results and the machining is inter- preset for exact proportions and a variety tool shapes can
rupted. A typical applications may include zones occupied be stored for repetitive use. This option is a good example
by a tuilstock, a fixture, a chuck. a rotary table, even an of CAD/CAM-like features built into a stand-alone control
unusually shaped part. system.

• Drawing Dimensions Input • Connection to External Devices


An option that seems somewhat is the pro- The CNC computer Caft be connected to an external
gramming method by using input of dimensions from usually another computer, Every CNC unit has one or
an engineering drawing. The ability to input known coordi- more connectors, specifically designed for to
nates, radii, chamfers and given angles directly from the peripheral The most common is
drawing makes it an attractive option. This ability is some- RS-232 (EIA standard), designed for communications be-
what by poor program portability. Such an tween two computers. Setting up the connection with exter-
option must be installed on all in the shop, in or- nal is a specialized application. The CNC operator
der \0 use the programmed features efficiently. uses such a connection to transfer programs and other sel-
tings between two computers, usually for slorage and
backup purposes.
PROGRAM PLANNING

The development of any CNC program begins with a The initial part information is not limited to drawing
very carefully planned process. Such a process starts with and the material - it also conditions not cov-
ng drawing (technical print) of the required ered in the drawing, as pre- and machining,
part released for production. Before the part is machined. grinding allowances, features, requirements for
several have (0 be considered and carefully evaluated. hardening, next machine setup, and others. Collecting all
The more effort is put inlo stage of the this information provides enough (0 start planning
program, the results may be at the the program.

STEPS IN PROGRAM PLANNING MACHINE TOOLS fEATURES


The required in program planning are decided by No amount initial information is useful if CNC
the nature of the work. There is no useful fonnula for all is nOI suitable for job. program
jobs, but some basic should considered: nlng, programmer concentrates on a parlieu/ar machine
tool, a particular Each part has to be
o Initial information / Machine tools features (he machine has LO large
o Part complexity to handle the of the part, the pan should nOl be heavier
than the maximum weight allowed. control system
o Manual programming / .nfTmllr... programming
must be capable to provide the needed path, so on.
o Typical programming procedure
In most cases, the CNC equipment is already available in
CJ drawing / data the shop. Very companies go buy a new CNC ma-
o Methods sheet / Material specifications chine just to suit a particular job. Such cases are rather rare
and happen only if moke economic scnse.
o Machining sequence
o Tooling selection • Machine Type and Size
o Part The most important considerations in planning
o Technological decisions are the type and the size the machine, partIcularly
ils work or work area. Other equally'
o Work sketch and calculations machine power rating, spindle speed
o Quality considerations in CNC I'IT/'Inflllmrn"nn number of 1001 stations, 1001 changing sys-
tem, accessories. etc. Typically, small CNC ma-
steps in the list are suggestions only - a guideline. have higher spindle speeds lower power
are quite tlexible and should be adapted for large machines lower spindle speeds available,
job and to the specific conditions the work. their power

INITIAL INFORMATION • Control System


The control system is the of a CNC Being
Most drawings define only shape and of the com- familiar wilh all standard and oplional features avail-
pleted part and nonnally do not specify data about the ableren all controls is a must. This knowledge allows
Initial blank material. For progrnmmi a good knowledge use of a variety of programml
of the is an essential start - mainly in terms of its as machining subprograms, macros
size, type, shape, condition, han.lness, etc. The and timesaving features a modern CNC system.
material data are the primary information about the part. At
(his point, program can be planned. objective of A programmer not to physically run a CNC
such a plan is to use the inilial information and establish the machine. Yet, the programs will become better and more
most efficient method of machinmg. with all con- with good understanding of the machine and its
- mainly part accuracy, productivity, san~ty and control system. Program development program-
converHcnce. knowledge of the CNC machine operation.

31
32 Chapter 6

of the main concerns in program plannin o should be • Disadvantages


the operator's perception of the . To a la~ge degree,
There are some disadvantages associated with manual
such a perception is quite subjective, in (he sense that
program~ing. Perhaps the most common is the length of
operators will express their personal preferences. On reqUIred to actually develop a fully functioning CNC
the other hand, every operator appreciates an error-free, program. The manual calculations, verifications and other
well documented and professionally part related activities in manual programming are very time
p.rogram, consistently and one after A poorly de-
Other also very high on the list,
Signed program is disliked by any operator, of
~re a large percentage of errors, a lack of tool path verifica-
personal tion, (he difficulty in making to a and
many others.
PART COMPLEXITY
• Advantages
At the drawing, material and the available CNC On positive side, manual part programming does have
equipment are the complexity of the qUi,le a few un~atched qualities. Manual programming is
ming task become,s much How difficult to pro- so Intense that It requIres the total involvement the CNC
gram the part manually? What are the capabilities of programmer and yet offers virtually unlimited freedom in
machines? What are the costs? Many questions have to be the development of the program structure. Programming
before starting the manually does have some disadvantages, it teaches a
Simple progr(lmming jobs may be assigned to a tight discipline in program development.
experienced or the CNC operator. It makes It forces the programmer to understand programming tech-
sense from management perspective it is a niques to the lasl detail. In fact, many useful skills learned
good way to gain experience. in manual programming are directly applied to CAD/CAM
programmIng. Programmer to know what is happening
Difficult or will from a computer- at all times and why it is happening, Very important is the
ized programming 'technologies such as Computer tn-depth understanding of every detail during the program
Aided Design (CAD) and Computer Aided Manufacturing development.
(CAM) have been a part of the manufacturing
cess for many years. The cost of a CAD/CAM system is Contrary to many beliefs, a thorough knowledge of man-
only a fraction of what il used to be only a few years ago. ual programming methods is absolutely essential effi-
small shops now find that the benefits offered bv mo- cient management of CAD/CAM programming,
dern technology are too significant to ignored. J

programming systems are availahle various computers and CAD/CAM AND CNC
can virtually job. For a typical machine shop, a
Windows based programming soft ware can very benefi-
The nee~ for i efficiency and accuracy in CNC
A typical example of this kind of application is the
programming has been major reason for development
popular and powerful Masfercam™, from CNC Soft-
of a variety of methods that use a computer Lo prepare part
ware, Inc., Tolland, are others. Computer assisted CNC programming has been
around for.many years. in the form of language based
MANUAL PROGRAMMING programming, such as APyrM or Compact IITM. Since the
late 1970's, CAD/CAM has played a significant role by
Manual programming (without a computer) been the adding the visual aspect to the programming process. The
most common method preparing a program for acronym CAD/CAM means Computer Aided Design and
many years. The fatest CNC controls make manual Computer Aided Manufacturing. The first three letters
gramming much easier than ever before by using or (CAD) cover the area of engineering drafting.
repetitive machining variable type programming, "' ........ 'u .. '" three (CAM), cover the area
graphic tool motion simulation, standard mathematical in- crized manufacturing, where programming is only a
put and other time saving features. manual program- sman whole subject of CAD/CAM covers much
ming, all calculations are done by hand. with the aid of a more just design. drafting and programming. It is a
pocket no programming i~ used. Pro- part of modern also known as ClM - Computer
grammed data can transferred to the CNC machine via a Integrated Manufacturing.
cable, an inexpensive desktop or a laptop computer. In area of have
is and more rellable than other methods, major role for a long Machine controls have
Short programs can manually, by keyboard more sophisticated, incorporating latest techni,ques of
entry; directly at the machine. A punched tape to data tool path graphics, machining
the popular media of the past but has virtually disappeared can now be prepared with the usc
machine shops.
PROGRAM PLANNING 33

computers, using graphical interface. is the price, may handle to an absolute If the con-
no an even small machine can afford a trol system can handle il, manual programming is the way
programming system in house. systems are also to the ultimate control over such a project, when other
popular because of their flexibility. A typical computerized methods may not suitable.
programming system not have to be dedicated only to
programming - all related tasks. often done by the pro- with a well customized and computer-
""lnr'ln"l'''r can implemented on the same computer. For ized system, how can the program
example, cuning tool inventory managemenl, of output be exactly as intended? How can the CNC operator
part programs, material information sheets, setup sheets change any part of the program on the machine, without
and tooling sheets, etc. The same computer could also knowing its and
used for uploading and downloadIng CNC programs.

• Integration
The keyword in the acronym CIM is - integration. It TYPICAL PROGRAMMING PROCEDURE
means putting all the elements of manufacturing together
work with them as a single unit and more efficiently.
The main behind a successful integration is to avoid Planning a CNC program is no different than any other
duplication. One of the most important rules of using a planning - at home, at work, or - it must
CAD/CAM computer software is: in a logical methodical The first
sion~ relate to what tasks have to be done and what goals
have to be reached. The other decisions relate to how to
achieve the set goals in an efficient and safe manner. Such a
progressive method not only isolates individual problems
When a drawing is made in a CAD software (such as
as they develop, it also forces their solution before the next
AutoCAD), then done again in a CAM software (such as
step can be taken.
Mastercam), there is a duplication. Duplication breeds er-
rors. In order to avoid duplication, most of the CAD foHowing items form a fairly common and logical
tems incorporate a transfer method of the design to the se- sequence of tasks done in CNC programming. The items
CAM system to be for CNC programming. are only in a offered for further
Typical transfers are achieved through special DXF or This order may changed to reflect special conditions or
lOES files. The DXF stands for Data Exchange Files or working habits. Some items may be missing or redundant:
Drawing and the IGES abbreviation is a
short form of Initial Graphics Specification 1. Study of initial information (drawing and methods)
Once the geometry is transferred from the CAD system to 2. Material stock (blank) evaluation
the CAM system, only the tool path related process is 3. Machine tool specifications
needed. a kind of formatter), 4. Control system features
the computer will prepare a part program, ready to 5. Sequence of machining operations
be loaded directly to the CNC machine. 6. Tooling selection and arrangement of cutting tools
7. Setup of the part
• future of Manual Programming 8. Technological data (speeds, feedrates, etc.)
9. Determination of the tool path
It may seem that the manual is on the 10. Working sketches and mathematical calculations
cline. terms of actual use, this is probably true. 11. Program writing preparation for to CNC
il is necessary to keep in perspective that any computerized 12. Program testing and debugging
technology is on already well established melh- 13. Program documentation
of manual programming. Manual programming for
There is only one in CNC program planning and that
CNC machines serves as the source new technology
is the completion all instructions in the form of a pro-
- it is (he very concept on which computer-
that will result in an error-free, and efficient CNC
programming is opens the
machining. suggested procedures some
door for developmem of more powerful and soft~
changes for example, should the tooling selected be-
ware applications.
fore or after the pall setup is determined? Can the manual
The manual programming may somewhat part programming methods efficiently? the
frequently today and eventually will be used even less - but worki sketches necessary? Do not be afraid to modify
knowing it well - really understanding it - is and always any so called ideal procedure either temporarily, for a
will the key (0 control the power of CAM software. given job, QT permanently. to reflect a particular CNC pro-
computers cannot everything. are some special style. Remember, there are ItO ideal procedures.
programming projects that a CAM software, regardless of
34 Chapter 6

PART DRAWING visions. special instructions, etc. Data in title block sup-
ply crucial information for CNC programming can be
used for program documentation to make easier cross
The parl drawing is the single most important document Not all title block information is needed in pro-
used in CNC programming. It visually identifies the shape, gramming, but may used for program documentation.
dimensions, tolerances, tinish and many other re-
quirements for the completed item. Drawings of complex Revision dates in a drawing are associated with the title
parts often cover many sheets, with different views, details block. They are important to the programmer, as they indi-
and sections. The programmer first evaluates all the draw- cate how carrent is the version. Only the latesl ver"
data first, then isolates Ihose that are relevant for the de- sian of part design is important to manufacturing.
velopment of a particular Unfortunately, many
drafting methods do not the actual CNC manufac- • Dimensioning
turing They reflect the designer's thinking, rather
than the method manufacturing. Such drawings are Dimensions on the part drawing are either in
erally correct in technical sense, but they are harder to study metric units. Individual dimensions can be
by the and may need to 'interprered'to be a certain datum point or they can he
of any in CNC programming. Typical examples are from the previous dimension. Often, both types of dimen-
methods of applying dimensions, of a datum point sions are mixed in the same drawing. When writing the
that can be used as a program reference point and the view program. it more to all con-
orientation in which the part is drawn. In the CAD/CAM secutive - or incremental dimensions intO datum - or abso-
environment, traditional between design, draft- lute - dimensions. Most CNC programs benefit from draw-
ing and CNC programming mUSI be eliminated, Just as it ings using datum, or absolute Similarly,
helps the programmer to understand designer's intentions, when developing a subprogram for tool path translation, an
it helps the designer to understand the basics of CNC pro- incremental method of programming may ,be the right
gramming, Both, the designer and the programmer have to choice - and the choice depends on the application. The
understand other's methods and find common ground mosl common for CNC machines
that makes the whole process of design and manufacturing uses the absolute dimensioning method (Figure 6-2),
,...",,,"',."',.... and mainly because of the editing ease within the CNC system.

• Title Block
The title block - 6- / - is typical to all professional
---- 170

drawings. lts purpose is to collect all infor-


mation related to the particular drawing.

a
170
By , 110 .-
l-
I

bl
Dr.: Date: 6-2
Program using ABSOLUTE dimensions
Chk.: Drawing number: Only one change in the program is necessary
App ..
With the absolute system of dimensioning, many pro-
6·1 gram changes can be done by a single modification. Incre-
A title block 8xa'mDIB of an .mn,iflFlF!rinn drawing mental method requires alleast two modifications. dif-
ferences between the two dimensioning systcms cnn be
and contents of a title block com- compared in 6-2, using the absolute dimensioning
an the eype of manufacturing and inter- method, and in using the incremental dimen-
nal usually a recl.angular box, positioned in sioning word incremel1tal is more common in
the corner of the drawing, divided into several boxes, CNC. in drafting the equivalent word would be relative.
The contents of the title block include such items as the pari Both illustrations show the a) figure before revision, and
name and part number. drawing number, material data, rc- the b) figure after revision,
PROGRAM PLANNING 35

60 ---,60 ._",......:
e A drawing dimension specifies a hole as
I 075+0.00/-0.05 mm. What actual dimension
should appear in the program?

al There are some choices. The dimension on the high side


mlly be programmed as X75,0 and X74,95 on the low
." of the A middle value of X74,975 is also a
70! ----.--' 40 ---' 60 --- Each selection is mathematically correct A creative
programmer looks not only for the mathematical points,
but for the technical points as well. cutting of a
tool wears out wilh more parts machined. That means the
machine operator has to fine-tune the machined size by us-
Figure 6-3 ing the tool wear available on most CNC systems,
Program using INCREMENTAL dimensions Such a manual during machining is
Two (or more) in the program are necessary acceptable. but when done too often, it slows down the pro-
Fractions duction and adds to the overall costs.
Drawings in English units contain fractions, A A particular programming approach can control the fre-
tional dimension was sometimes used to identify a im- quency of such manual adjustments to a great Con-
portam dimensional tolerances (such as :1:,030 inches from sider the mm mentioned If il is an external dia-
the nominal number of digits following (he meter, the tool edge wear will cause the actual dimension
mal point often indicated a tolerance (the more digits speci- during machining to become larger. In the case of an inter-
fied, the the tolerance range). methods are nal diameter, the actual dimension will become smaller as
not an ISO standard are nO use in programming. the CUlling wears out By programming X74,95 for
Fractional dimensions have to be changed inlo their deci- the external (the bottom Iimil) or X75,O for the in-
mal equivalents, The number of decimal places in the lerna] diameter (the top limi!), the wear of the cutting
is determined by minimum increment of {he con- will move into the tolerance range, rather than away
IroL A dimension of 3-3/4 is as and a it The lool offset adjustment by machine oper-
dimension of 5-11/64 inches is programmed as 5,1719, its ator may still be required, but frequently. Another ap-
closest rounding. Many companies have upgraded their proach is to select the middle of the tolerance
to the ISO system and to prin- this method will also a positive effect but more man-
ciples of CNC dimensioning. In this respect, drawings us- ual adjustments may necessary during machining,
the metric units are much more practicaL
• Surface finish
Some dimensioning problems are related (0 an improper
use of a CAD software. such as AutoCAD. designers Precision parts require a certain degree of surface finish
do not change the default setting of the number of decimal quality, Technical drawing indicates the finish for
dimension ends up with four decimal various features (he part drawings indicate the
places (inches) or three decimal (metric), This is a in micro inches, where micro inch =, 00000)",
poor practice and should be avoided. The best approach is Metric drawings use specifications expressed in microns.
to for all dimensions where 1 micron:: 0,001 mm, Symbol for a micron is a
require them. and even use Geometric Diflumsioning and Greek letter )1. Some drawings use symbols - Figure 6-4,
Tolerancing standards (GDT) ,

• Tolerances
For quality machining work, most part
have a range of acceptable deviaLion fTom
the nominal size, within its system of reference, exam-
ple, an English of +,0011-,000 will be dif-
ferent from a mel ric tolerance +0.1/-0.0 mm. Dimen-
sions of this type are usually critical dimensions mu,<;1
be maintained during CNC machining. It may be true thai
CNC operator is ultimately responsible maintaining
the part within the tolerances (providing Ihe program
is correct) - but it is equally true, that the CNC programmer
can the operatoro's task Consider the Figure 6-4
following example for a CNC lathe: Surface finish marks in a drawing:
English (top) and metric (bottom)
36 6

The most important factors influencing the quality of sur- METHODS SHEET
face finish are spindle speed, cutting tool radius
and amount of material removed. Generally, a larger
cuLter radius and slower contribute towards finer Some companies have a staff qualified manufacturing
surface finishes. The time will be longer but can often technologists or process planners for determi-
be by elimination of any subsequent operations such of the manufacturing process. people dcvc\op
as grinding, honing or lapping. a of machining . detailing the route of
each part through the manufacturing steps. They allocate
• Drawing Revisions the work to individual machines, develop machining se-
and setup methods, tooling, etc. Their
Another important section the drawing, often over- structions arc written in a methods (routing that
looked by CNC programmers, shows the accompanies the part through all of manufacturing,
..... ,,<u,!",'''''' (known as revisions) made on the drawing up to a typically in a plastic folder. If a is available,
date. or the de- copy should become a part of the documentation. One of
signer identifies such changes, usually with both purposes of a methods sheet is to provide CNC pro-
the previous and the new value - exampl~: grammer with as much information as possible to shorten
the turnover between programs. greatest advantage of
REV' • 3 / DIMENSION 5.75 WAS 5. 65 a methods sheet in programming is its comprehensive cov-
of all required operations, both CNC
Only the latest are important to the program de- tional, thus offering a overview the
velopment. Make sure the program not only reflects the turing process. A good quality methods sheet will save a lot
current engineering design, but also is identified some of decisions - it is made by a manufacturing who
unique way to distinguish it from any previous specializes in work detailing. The ideal is
versions. Many programmers keep a copy of the part one recommended manufacturing process
ing corresponding to the program in the files, thus prevent- closely matches establlshed part programming methods.
ing a possible misunderstanding later.
For whatever reason, a large number of CNC machine
• Special Instructions shops does not use methods sheets, routing sheets or
lar documentation. CNC programmer acts as a . . . H ..' ' - ' ' - ' ' ' "

Many drawings also include special instructions and as well. Such an environment offers a certain de-
comments that cannot with the traditional gree of flexibility but demands a large degree of knowl-
drafting symbols and are spelled out mClleoeml- edge, skills responsibility at same time.
enlly, in words. Such instructions are very important for
CNC program planning, as they may significantly influ- MATERIAL SPECIFICATIONS
ence the example, an I"ll"mpn!
the part is identified as aground or diameter.
drawing dimension always shows thejinished In the Also important consideration in program planning is eva-
program, this dimension muSI be adjusted for any grinding luation of the malerial stock. Typical material is raw and
allowance necessary - an allowance by the pro- unmachined bar, billet, plate, forging. etc).
grammer and written as a special instruction in the pro- Some may already premachined, routed from
Another example of a special instruction required in another machine or operation. It may solid or hollow,
program to machining performed part with a small or a amount to removed by CNC ma-
assembly. example. a certain hole on the drawing chining. The shape of the material the
should be drilled and tapped and is dimensioned same setup mounting method. The of malerial (steel, cast
way as other hole, but a special instruction indicates the iron, brass, will influence not only the of cul-
drilling and tapping must done when part is tools, but cutting conditions for machining as well.
during assembly. Operations relating to such a hole are not
programmed and if any overlook of a small instruction
such as this, may in unusable pan.
Many drawing instructions use a special pointer called a
Usually it is a line, with an arrow on the point- • Material Uniformity
ing towards ar~ that it to. For a leader
may be pointing to a with the caption: Another important consideration, often neglected by
and alike, is the uniformity material
~12 - REAM 2 HOLES specifications Within a particular batch or from one batch to
another. For a ' ordered two suppli-
is a to ream 2 holes with a reamer that ers La slightly different
has 12 mm
PROGRAM PLANNING 37

even A similar example is a ma- MACHINING SEQUENCE


cut into sjngl~ pieces on a saw, where the length of
varies beyond an acceptable range. This incon-
sistency between blank parts makes programming more Machining sequence
difficult and lime consuming. It also creates potentially un- Technical skill
machining conuiLions. If problems are encoun- help in program some common sense
the best planning is to place emphasis on proach is equally sequence of
safety than on time. At worst, there must have a logical example. drilling must
will some air Ctming or needed cutting feed, programmed before roughing operations before
but no cuts will be too heavy to handle. finishing. first operation second, etc. Within this
order, further of the order of individual
approach is to non-uniform material motions is required for a particular tooL For example,
groups and make programs for each group, in turning, a face cut may be on the part first,
properly identified. The method is to cover all known then roughing all material on wili take place.
predictable inconsistencies program control, for method is to program a roughing for the
using the block skip function. meter, then face and with of the dia-
a center drill
• Machinability Rating for some but in another
a drill may be a
important aspect of IS on which method is CNC program-
machinability. Charts with SUj;(g<::ste:a feeds for ming assignment has to be considered individually, based
most common major tooling on Ihe criteria of safety and
in programming, par-
when an unknown is used, The suggested approach for machining se-
values are a starting point, and can be optimized later, is the evaluation of all In gen-
when the material properties are known. "'''~'''r''''''''' should be planned in a that the cut-
once selected, wi1l do as much as possible,
Machinability rating in the English is given in units a tool On most CNC less time is
per minute (ftimin). Often terms surface feet np.p,(1p('l for positioning the tool than for a tool change. An-

per minute; constant sUlface speed or CS), periph- other is in benefits by programming
eml or just surface speed are For metric all heavy first, then the semifinishing or
designation of the machinability meters per min- finishing operations. It may mean an extra tool change or
ute (m/min) are used. In both cases, spindle speed two, but this method minimizes any shift of the material in
(r/min) lOol diameter (for a or a given part the holding while machining. Another important
a lathe) is calculated, common formu- factor is the current position of a tool when a opera-
I-<n,,,,I1<", system, the spindle can be calcu- tion is completed. For example, when a pattern
per minute (r/min): holes in of 1 the next tool as a boring
bar, reamer or a tap) should be order of
4-3-2-1 to Figure 6-5.

T02::: Drill
Hole4
For a calculation, the

Hole 4
Figure 6-5
Il3r' where ...

r/min = Revolutions per minute (spindle


12 feet to inches ""''''"1''''!'1' may have to be
1000 = meters to millimeters tools and the setup method. re-
fVmin = Peripheral speed in feet per minute verse not be practical in subprograms.
mlmin = Peripheral speed in meters per minute
n: (pi) = value of 3.141593 .... Program planning is not an independent
D (milling) or dividual - it is a very interdependent and
(turning) - in inches or mm cally coherent approach to achieve a certain
6

TOOLING SELECTION are designed to


more productive. Mulfispmdle '''''~'''III'''~
can handle two or more parts at the same
tool holders and cutting is another impor-
tures, such as barfeeder for a lathe, an
tant in planning a CNC category of tool- or dual setup on the table,
ing covers n lot more than Ihe cutting lools and 1001 holders added as well.
- it includes an extensive line of including nu-
fixlures, chucks, indexing tables, clamps, • Setup Sheet
many other holding Cutting lools re-
attention, due to variety available At this of program planning, once the setup is de-
In making a setup sheet is a good A setup sheet
can a simple sketch, designed mostly the use at the
cutting tool itself is selec- machine, that shows the part orientation when mounted in a
tion. It should be selected by two tool offset numbers by the program,
o Efficiency of usage of course, all idenlifica-
Other information in setup sheet
Q Safety in operation to some establ ished
Many supervisors responsible CNC programming try planning stages of
to make the existing tooling work at all times. Often they of clamps, bored jaws 1"I ...n"' ... <"
the fact that a suitable new lool may do the job faster Setup sheet and tooling can
and more economically, A knowledge of tooling source of Information. Most ,"", ..,,,,.~h_
and its applications is a technical profession - the own various versions.
should know principles of cut-
tool applications. cases, a tooling .."' ......&>~'~M TECHNOLOGICAL DECISIONS
tive may provide additional assistance.
The arrangement of of usage is also a The next stage of CNC "',." ...... ,,'""
subject of serious in CNC program planning. lection of spindle speeds,
On CNC lathes, each tool is assigned to a application, etc. All
turret station, making sure disTribution of lools is tors will have their Influence.
anced between short and tools (such as short of spindle speeds is
tools versus long This is important for of the cutter and
of a possible during CUlling or tool speeds and feeds. the
Another concern should be the order in which help determine what amount can be removed
particularly for machines that ~afely, elc. Other factors (he program design
indexing. Mos:t mclude tool extensions, setup rigidity, culling tool material
where the and its condition. Not to be overlooked is the proper selec-
tion of cutting fluids and lubricants - they, too, are
1ant for the part quality.

All tool offset and other program • Cutter


be documented in a known as the looling sheel.
a document serves as a guide to the operator job
setup. It should include at least the basic re-
lating to the tool. For example, the documentation
may include its length and diameter,
the number and offset and
feed selected and other relevant information.

PART SETUP The key factor understanding this principle is to visu-


alize the tool ",,,,,,\.1,,, not (he machine mOllon. most
Another in program planning to noticeable programming a machining
setup - how to mount the raw or premachined material, to a lathe is the cutter rotation com-
what supponing tools and devices should how In both cases, the
many operations are required to complete as machin- in terms of the cutter .nn,lJ111'U
ing sequences as possible, where (0 select a
etc. is necessary and it should be done
PLANNING 39

require more than


roughing and
is to isolate the area that
tool do both operations? Can all
'-UlIklll'"

Is the lool wear a problem?


the surface finish achieved? When programming oon-
cutting rapid motions, take the same care as with
motions. A particular should be lO minimize
tool motions and ensure

Figure 6-6
• Machine Power Rating
Contouring too! path motion - as intended (lathe or miff) Machine tools are power. Heavy cuts re-
quire more power than cuts, A depth or width of a cut
The tool path all profiling tools has to into con- that is too large can tool and stall the machine.
Such cases are 1I1"1<~f"f"f'nl must be prevented, The
sideration the cutter radius. either by
equidistant path center of the radius or CNC machine specifications the power rating of the
ler radius offset. machines for milling and motor at the machine rating is in kW (kilo-
provided with linear interpolation and wans) or HP (horsepower). Formulas are available for
lar interpolation, all as features. To more power ratings, calculating removal rate, tool wear
complex paths, as a helical milling motion, a special faclors, etc. Useful is ofkWandHP
option has to in the control unit Two of on I HP = 550 foot-pounds second):
typical tool
1 kW= 1.341 HP
o Point-to-paint 81so called Positioning
o Continuous a/so called Contouring

a point location operations, such of in can be com-


as drilling, and similar operations; con- is not always in everyday programming.
rinuous path generates a profile (contour). case, experience is often a bener teacher than formulas.
the programmed data to the po~ition of the culter
when a certain is This position is called • Coolants and lubricants
the tool 6-7.
When the lool contacts the for an extended pe-
of Lime, a great amount of M.!,;;.l''vU''''vIJ. The cut-

overheated. becomes and may break. To


1 possibilities. a must be used.
Water soluble oil is the most common coolant. A prop-
(\End coolant dissipates the cUlting edge

T
r"
-i:-- ,6
it acts as a lubricant
lion is to reduce friction and make the
flood of the coolant should at
of lubrica-
removal easier.
cutting edge,
/. with a pipe or through a coolant in the tool.

6-7
Contouring too! path motion with tdefltifil~d contour change points

start and end positions profile are identified operator is responsible for a """""VI"
and so are (he positions fQr contour change. Each tar- the machine. coolant should
position is called the contour change point, which has r'f'r'f'lIT,m,f'n(lp.t1 proportions. Water
to be cnIcuiated. The order of locutions in the pro- to preserve the
gram is very important. That means the tool position] is CNC n"I"\Or~lmYrlpr
the target position commencing at the Start point, position not. Ceramic
2 is the target position beginning at point I, position 3 is the nn,r"'CfIl'-Jl'(f dry, without a cast
from point 2 and so on, until the End is flood coolant, but air blast or oil mist
.-.,.,,,,,,,., If the contour is be in X may be allowed. coolant functions vary between ma-
Y axes. In turning, Z axes. chines. so check the machine reference details.
40 Chapter 6

• Identification Methods
A sketch can be done directly in the drawing
or on paper, Every is associated with mathematical
The of cUlling fluids outweigh their incon- calculations. Using color or point numbering as
veniences. CUHing are often messy, the cutting edge identification methods offers and organizat-
cannot seen, may wet and old ion. Rather (han writing coordinates at contour change
coolant smells. proper all problems re- pain! in drawing, use point reference numbers and cre-
lated to coolants can tie controlled. ate a coordinate sheet fonn
numbers, as illustrated in Figure
A coolant related programming is when to turn the
coolant on in the As the coolant function MOS Position I X axis Yaxis Z axis
only turns on tbe pump motor, sure the coolant actu-
ally reaches the tool edge contact with work. Pro-
gramming the coolant on is better than late.

WORK SKETCH AND CALCULATIONS


Manually progTams require some mathematical
calculations. part of preparation intimidates
programmers but is a necessary Many
contours will require more calculations, but not more com-
plex calculations. Almost any math problem in CNC 6-8
gramming can be solved by the use of algebra Coordinate - blank form Ino data)
and trigonometry. Advanced of mathematics - ana-
geometry, spherical trigonometry, calculus, surface Such (\ sheet can be used for milling or turning, by filling
calculations, etc. - are required for programming complex only the icable The aim is to develop a con-
molds, similar In such cases, a CAD/CAM sistent programming style from one program to another.
system is necessary. Fill-in all values, even those that do not A com-
pleled coordinate sheet is a reference 6-9,
Those who can a right Lriangle can cal-
culations for almost any CNC program. At of the
handbook is an of some common math problems.
When working with more difficult contours, it is often not
the solution i{selfthat is it is the ability to arrive at
the solution, The must have the ability Lo see
exactly what triangle to be It is not to
do intermediate calculations before the required co-
point can be established.
Calculations any lype often benefit from a pictorial
representation. Such calculations usually need a working
sketch. sketch can done by should
in an approximate Larger sketch scales are to
work with. Scaling sketch has one great advantage - you Coordinate sheet example - filled form for milling tool path
can immediately see rhe dimensions
should be smaller or larger the others, the relationship QUALITY IN CNC PROGRAMMING
of individual elements, the ~hape of an extremely small
tail, etc. However, you should never An important consideration in is a per-
use the sketch for: approach and attitudes, attitudes a signifi-
cant influence on the program development. Ask yourself
er use a scaled sketch to some questions. Are you attentive to detail, well
Can a be improved, is it safe, it
Scaling a sketch is a and unprofessional cient? program quality is more than writing an error
that creates more problems than it program. complexity is only related to your
ness or incompetence. knowledge and wilr to solve problems. It
should be a goa! to a program is the
program Set your standards high!
PART PROGRAM STRUCTURE

A program is composed of a series of sequentiaJ in- Digits


structions related to machining of a parI. Each
tion is specified in a format the CNC system can accept, There are ten digits, 0 10 available for use in a program
terpret and Each· must also conform to to create numbers. The are used in two modes - one
the machine tool specifications. This input method of a pro- for integer values a point),
can be defined as an arrangement of machining for real (numbers with a decimal
related inSlrUCliolls. written in formal the CNC Numbers can positive or negative values.
and aimed at a particular tool. controls, numbers can with or without the deci-
mal pOint. Numbers applied in either mode can only be en-
have a different format. bUI most are tered within the range that is allowed by the control system.
differences among
manufacturers, even those Letters
same control This is common,
The 26lelters English alphahet are 1)11 available for
demands individual machine plac.e upon the
programming, at leasl in theory. Most control
control manufacturer 10 accommodate many original
accept only letters reject others. For example. a
machine features. Such variations are usu-
CNC la(he control will the letter as Y axis is
ally minor but programming.
unique to milling (milling machines and ma-
chining centers). Capital letters are normal designation in
BASIC PROGRAMMING TERMS programming, but some controls accept low case
ters with the same meaning as their case equivalent.
field of CNC its own terminology and
terms and its jargon. It has its own abbreviations ex- If in doubt, use CAPITAL letters only!
pressions Ihal only the people in the. field lmderstand. CNC
programming is only a of the 'zed Svmbols
machining and it has a The
majority of them the program. Several symbols are used for programming. in addition (0
the digits letters. The most common symbols are the
There are fOllr terms used in decimal point, minus percent sign, parenthesis and
They appear in professional books, others, depending on the options.
lUres and so on. These words are the key to
the CNC • Word
A program word is a combination of alpha-numerical
Word .... Program creating a single to the sys-
tem. Normally, each word begins with a letter that is
Each term is very common important in pro- followed by a number representing a code or the
gramming deserves own detailed explanation. value. Typical words indicate axes position, fee-
speed. preparatory misceLlaneous ftme-
• Character lions and many Olhcr definitions .

A character is the smallest unit of CNC program. It can • Block


have one of
Just like the word is as a single instruclion to
o Digit block is used as a multiple instruction. A
o Letter the control consists individ-
in a logical
o Symbol a sequence or simply a block - is com-
posed one or several words and each word is composed
Characters are combined into meaningful words. This
combination of digits, and symbols IS led the
or two or more
alpha-/wmerical program input.

41
42 Chapter 7

In the control system, must be


allOlhers. iOlhe MDI (Manual II/-
c
pur) mode al the control, block (0 end with a 6 IF
cial End-Of Block code (symbol), This is as
EOB on the control panel. When preparing the program on Words
a computer, (he EHler key on the keyboard will terminate
the block the same result (similar to the old Carriage F2 7 5'. 0' 011 N15,
on typewrirers). When writing a program on paper
each block should occupy only a single line Block
on paper. program block contains a series of sin-
gle instructions that are executed together. N 5 GO: 1~y - '6 ~~~_L-"!..~_~_ 2J.!' 5 . ~_O:
• Program Figure 7·'
The parI program structure varies different controls, Typical word address programming format
but logical approach not one control The !cHer in block
to A CNC program usually with a program of the word and mllst always written
number or similar identification, followed by the blocks is correct, is no\. No spaces characters.)
Instructions in a logical order. program ends with a are allowed wlthill a but are only allowed before
SlOp code or a program termination symbol, as the the word, meaning [he
percent sigll %. Internal clocumentation and
(he operator be placed in strategic places wi numerical assignment. This
The format has evolved varies greatly and on the preceding <1UlHC;~.:>.
cantly during the formats emerged. It may represent a sequence number N, a n ...""1"I" . ."'I," .... '
mand a function M, an
PROGRAMMING FORMATS number D or H. a coordinate word Y or the feed rate
function F, the spindle function S, the tool function etc.
the early days of control, three formalS one word is a series characters (at least two) that
had become significant in their time. They are listed in the define a single instruction to control and the ma-
order of their original introduction: chine. above typical have the fol-
lowing meaning in a
o Tab Format NC only no decimal
o Fixed NC only· no decimal point G01 PreparaJOI)! comml1J1ti
o Word Address Format NC or eNC - decimal point IDO Miscellalleous funCTion
D2S Offiel nwnber selecfion mills
Only the very' early control use the tab sequen-
tial or jixed formats. Both of them disappeared in the early XS.75 Coordinale word value
1970's and arc now They have been replaced by mos Sequence Illlmher(block Illunber)
the much more convenient Word Address Formal. HOI Tool length IIwnber
YO CoordiJlaJe word· zero l/aJue
WORD ADDRESS FORMAT 92500 SpiJuUe speedjuJlctioJl
z-s .14 CoordflllJJe word - Jleg(llive value
The word address formal is on a combination of F12.0 Feedmlejunction
one JeHer and one or more digits - Figure 7-1. TOSOS Tool funclioll . kl1hes
In some applications, such a combination can be TOS TooljilJlClioll- mills
mented by a symbol,' such as a minus or a /MO 1 ",:!block skip symbol
point. Each teller, or symbol represents one character B180.0
in the and Ihe control memory. This unique al-
creates l) word, where the letter Individual arc instructions grouped together to
the address, lowed numerical with or without form sequences of programming code. Each
symbols. The word address \0 a specitic register of will process a of instructions simullaneously,
the memory. Some arc: unit a sequence block or simply a block. The
blocks arranged in a logical that is required to ma-
GOI M30 D2S XS.75 NiOS HOI YO S2500 chine a complete part or a complete operation is the part
Z-S.14 F12.0 TOSOS T05 /MOl B180.0 program known as a program.
PART PROGRAM STRUCTURE 43

The next block a rapid tool motion to (he Address X accepts positive or negative data with the maximum
position X 13.0Y4.6, with a coolant turned on: of five digits in front of a decimal point and three digits
maximum behind the deCImal point - decimal point is allowed.
N25 G90 GOO Xl3.0 Y4.6 MOS
The of a decimal point in the notation means the
decimal point is not used; the absence of a plus sign in
t6f' where ...
the notalion means that the value cannot be nega-
Sequence or block number tive - a lack means a positive value implication.
N25
G90 Absolute mode These samples format notalion explain the shorthand:
GOO motion mode G2 Two digits maximum, no decimal point or sign
X13.Q Y4.S Coordinate location
MOB ON function N5 digits maximum, no decimal point or sign

The control will process anyone block as a complete unit Five digits maximum, no decimal point or
- never partially. Most controls a random word order F3.2 Five digits maximum, digits maximum in front of
in a block, as long as the block lS first the decimal point, two digits maximum behind the
decimal point, point is no sign is used
fORMAT NOTATION Be careful when evaluating the shorthand notations from
a manual. There are no industry standards and not all con-
Each word can only written in a specific The manufacLUrers use the same methods, so the
number of digits allowed In a word, depending on ad- the short forms may vary significantly. list
dress and maximum number of decimal places, is set by the dresses, format and description is listed in the
control manufacturer. No! all can be Only following tables. They notations based on a
ters with an assigned meaning can be programmed, except typical Fanuc control system.
in a comment. Symbols can be used in only some words,
and their position in word is Some are • Milling System Format
used in custom macros. Control limitations are impor-
tant. Symbols supplement the and letfers and provide The description for
with an additional Typical pending on the input units. The table below lists
formal descriptions (metric format is in parenthesis, ap-
symbols are sign, decimal point,
a few others. All symbols are listed in a plicable). Listed are format notations for milling units. The
first column is the address, the column is the format
• Short Forms notation and third column is a description:

Control manufacturers often specify the input format in Address Notation Description
an abbreviated - Figure 7-2.
Rotary or
A A+5.3 degrees·
X ± 5 3 Rotary or Indexing axis - unit is
4I·-iII-iII-4I-e B 8+5.3 - used about the Y axis
Number of digits
-- decimal pOint Cutter radius offset number
0 02 (sometimes uses address H)
-- Decimal paint allowed
F F5.3 Feedrate runction - may vary

-----.. _- Number of digits


decimal point G

---.- Positive or negative


value possible
Described address
H 1001
number (tool position
length
Arc center modifier for X axis
and/or

1+4.4 Shift amount in fixed (X)


Figure 7-2 (1+5.3) Corner vector selection for
Word address format notation - X axis format in metric mode shown
X axis (old type of controls)
Arc center modifier for Y axis
The full description each would J+4.4 Shift amount in fixed cycles
unnecessarily too long. Consider the following complete J (J+5.3) Corner vector selection for
nnd not abbreviated description of the address X· as a coor- Y axis type of controls)
dinate that is in (he metric system:
7

Notation Description
,,~,"~,~ ~"""~"~~'" "

K+4.4 04 Number of divisions in G73


K Arc center modifier for Z axis
(K+S.3) Depth of Cul in I and
D 044
Fixed cycle repetition count Relief amount in G74 and G75
(053)
L Subprogram repetition COUnt Depth of first thread in G76
E2.6 Precision feedrate for '''p,>",....~
M M2 Miscellaneous function
F F2.6 Feedrale function may vary
N Block number or sequence number
Program number (EIA)
G G2 Preparatory commands
or (:4 for ISO) Arc center modifier X axis
Taper height in X for
Subprogram number call 1+4.4
P4 X axis relief in G73
Custom macro number call (1+5.3) Direction of
p Work offset number - used with G 10 Motion amount in X in G74
Arc center modifier for Z axis
Dwell time in milliseconds Taper height in Z for cycles
Block number in main program when Z axis relief in G73
K Direction of chamfering
used with M99
Motion amount in Z in G75
Depth of peck in fixed cycles Thread depth in G76
G73 and G83
Q L L4 Subprogram repetition count

M M2 Miscellaneous function

in fixed cycles N N5 Block number or sequence number


R Arc radius designation Program number (ErA)
o 04 or (:4 for ISO)
s S5 Spindle in r/min
Subprogram number call
T 14 Tool function Custom macro number call
p Offset number with G I0
X axis coordinate value -----ooi
conds
designation
x

Y+4.4 value
y
(Y+5.3)
Z+4.4
z IZ+5.3}

• Turning System ............. ,'+ u axis

Similar chart as for Ihis one is for lalhe systems. US.3 Dwell function with G04
A number of definltions are same are included only
Incremental value in Z axis
W+4.4
for convenience. Notation is in the met~ w (W+S.3) Stock allowance in Z axis
ric notation is in parenthesis, if to the address.
X+4.4 Absolute value in X axis
Address Notation Description x (X+5.J)
X5.J Dwell function with G04
A A3 input

c C+4.4
(C I 5.3)
Chamfer for direct input z
PART PROG RAM 45

• Multiple Word Addresses table lists


One that is in both
symbols are only with
dance different meanings for some This is a custom macro option. These symbols cannot used in
necessary feature of a word address format. After all, there s(andard programming, as they would cause an error. Typi-
are only 26 in the English but more than cal standard symbols are found on the computer keyboard.
that number of commands and functions. As new contTol Crrl, and All character combinations are not allowed.
features are added, even more variations may be necessary.
Some the addresses an established meaning
• Plus and Minus Sign
(for example, X, Y and Z are coordinate that giving One of the most common
them an additional would be confusing. Many - plus or
ters, on the other are not used very often and a multi- can be either or negative. conven-
meaning for is quite (addresses I, J, K, ience, virtually all systems allow for an omission of
for example). In addition, the meaning of var- for all values. This IS
Ies the milling and turning systems. positive the control Positive
The system has to have sam!; means of accepting lerm i nrlicating an MS\lmed positive value, if no
a particular word with a precisely defined meaning in the grammed in a word:
In most cases, the preparatory command G will
the at other times it will be the X+125.0 is {he same as X125.0
or a setting of parameters.
must always be programmed. If the
the number becomes positive, with
""''','''ES, an
SYMBOLS IN PROGRAMMING (in this case the tool position):

In addition to the basic symbols, X-12S.0 Negative value


symbols for applic(ltions. Xl2S.0 Posimte value
scribes all symbols available on the
X+12S.0 Positive value (-+- sign is ignored)

Symbol Description Comment Symbols supplement the and digits and are an inte-
gral part the program structure.
Fractional of a number
Positive value or PROGRAM HEADER
addition sign in Fanuc macros
Negative value or Comments or messages
Minus sign providing are enclosed in of in-
subtraction in Fanuc macros
lernal documentation is to both the programmer and
Multiplication Multiplication in operator. A series of comments at the top is de-
* Fanllc macros fined as the program where
Block skip function symbol or lures are identified. next
/ divisioll sign in Fanuc macros sample of items that may be used in

(FILE m:ME ••.•••.••..••...••••••••• 01234. NC)


(LAST VERSION DATE ................ 07-DEC-Ol)
VERSION TIME •••••...•••••••••• ,. 19: 43)
(PROGRAMMER ...................... PETER
(MACHINE ••••••••.••..••••••••••••• OKK - VMC)
(CONTROL •••••••••••.•••••••••••••• F.ANOC 15M)
(UNITS ••••••.•••.•••.••..••••.••••...
!I (JOB NUMBER •••••••••••••••••••••••••••• 4321)
(OPERATION ••.•••••••••••.••.. DRILL-BORE-TAP)
;1 SelmiCI)lon (STOCK MATERIAL ...•............ H.R.S. PLATE)
SIZE •••••••••••••••••••• 8 X 6 X
Variable definition or call in Fan ".-,J"'"......... ZERO ••••••••••...••• XO - LEFT
I # I Sharp sign ( YO - BOTT EDGE)
macros ( ZO - TOP FACE )
Equality in Fanuc macros (STATUS • • • • . • • • • • • • • • • • . • • • • • •• NOT VERIFIED)
46 Chapter 7

Within the program, each tool identified as well. the X Y axes. If Ihe absolute position is unknown,
change block to the incremental verSlon:
(*** T03 - 1/4-20 PLUG TAP ***)
N88 G91 G28 XO YO
Other comments and to the operator can be
added La the program as required. If a 1001 has 10 repeated, make sure not 10 include the
1001 change block for the current tool. Many CNC systems
TYPICAL PROGRAM STRUCTURE will an alarm if the 1001 change command cannot
find tool in the the following program ex-
ample, the lOa! repeat blocks will be NS, N38 and N67.
Although iL may be a bit early to show a complete pro-
gram, it wiH do no harm to look at a typical program struc- The program structure is a machine with
ture. Developing a structure is absolutely es- random tool selection mode a typical control system,
sential it is going to be lime. Each block of the with some minor changes to be expected, Study flow of
program is identified with a comment the program, rather than its exact contents. Note the
tiveness of blocks for lool and note the addition of
Note - Program blocks use only sample block numbers. a blank line (empty block) between individual eas-
Blocks in parentheses are not required for fixed cycles. The ier orientation in the program.
XY value in the block N88 should be current position

00701 MAX 15 CHARS) (PROGRAM NUMBER AND IDl


(SAMPLE PROGRAM STRUCTURE) (BRIEF PROGRAM DESCRIPTION)
SMID - 07-DEC-01} (PROGRAMMER AND DATE OF LAST REVISION)
(BLANK LINE)
N1 G20 (UNITS SETTING IN A SEPARATE BLOCK)
N2 G17 G40 GSO G49 (INITIAL SETTINGS AND CANCELLATIONS)
N3 T01 (TOOL TOl INTO ~TING POSITION)
N4 MOG (TOl INTO SPINDLE)
N5 GSO G54 GOO X.• Y.• S .• MOl T02 (TOl RESTART BLOCK - T02 INTO WAITmG POSITION)
NG G43 Z2.0 H01 MOB (TOOL LG OFFSET - CL.E.AR ABOVE WORK - COOLANT ON)
(N? GOI Z-.. F •. ) (FEED TO Z DEPTH IF NOT A cYCLE)
(--- CUTTING MOTIONS WITH TOOL TOl ----)

N33 GOO GaO Z2.0 MOS (CLEAR ABOVE PART - COOLANT OFF)
N34 G2S Z2.0 MOS (HOME IN Z ONLY-SPINDLE OFF)
N3S MOl (OPTIONAL STOP)
(-- BLANK LINE --)
N36 T02 (TOOL T02 INTO WAITIN'G POSITION - CHECK ONLY)
N37 M06 (T02 INTO SPINDLE)
N38 G90 G54 GOO X.. Y.. S .. MO) T03 (T02 RESTART BLOCK - T03 INTO WAITmG POSITION)
N39 G43 Z2.0 H02 MOB (TOOL LG OFFSE.'T - CLEAR ABOVE WORK - COOLANT ON)
(N40 GOl Z- •• F •• ) TO Z DEPTH IF NOT A
(-- - CUTTING MOTIONS WITH TOOL TOA ---)

N62 GOO GSO Z2.0 M09 (CLEAR ABOVE PART - COOLANT OFF)
N63 G2B Z2.0 MOS (HOME IN Z ONLY - SPINDLE OFF)
N64 MOl {OPTIONAL STOP}
(-- BLANK LINE --)
N6S T03 (TOOL T03 INTO WAITIN'G POSITION - CHECK ONLY)
N66 M06 , (T03 INTO SPINDLE)
N67 G90 G54 GOO X •• Y •• S .• M03 TOl (T03 RESTART BLOCK - TOl INTO WAITING POSITION)
N6S G43 Z2.0 H03 MOS (TOOL LG OFFSET CLEAR ABOVE WORK - COOLANT ON)
(N69 G01 Z- .• F .. ) (FEED TO Z DEPTH IF NOT A CYCLE)
(- -- CUTTING MOTIONS WITH TOOL TO) ----}

Na6 GOO GSO Z2.0 M09 (CLEAR ABOVE PART ~ COOLANT OFF)
NB7 G28 Z2.0 MOS (HOME IN' Z ONLY - SPINDLE OFF)
NBS G2S X •. Y .. (HOME IN XY ONLY)
Na9 M30 (END OF PROGRAM)
% (STOP CODE - END OF FILE TR.1\NSFER)
PREPARATORY COMMANDS

The program address G identities a preparClfory com- C Example C:


mand, often called the G code. This address has one and
only objective - that is to or to prepare the control N3 G90 GOO
system to a certain desired condition, or (0 a certain mode N4
or a state of operation. example, the address GOO pre- NS •••
sets a rapid motion for machine tool, the address N6
N7 X13.0 YlO.O
G81 the drilling cycle. etc. term preparatory
command indicates meaning a G code will prepare the
control to accept the programming instructions fol/.owing C Example 0:
the G in a specific way.
N2 G90
DESCRIPTION AND PURPOSE N3 GOO
N4 , ••
NS .••
A one block example will illustrate the purpose of the N6 ••.
commands in the following program entry: N7 X13.0 YlO.O

N7 X13. 0 Y10.O All four examples have the same machining result, pro-
viding that there is no change of allY G code mode between
a look at this block shows that the coordi- blocks N4 and N6 in the examples B, C and D.
nates X J3.0Y 10.0 relate to the erul position of cutting
tool, when the block is executed (i.e., processed by Ihe
control). The block does no! indicate whether the coordi-
nates are in the Clbsohl{e or the mode. It
not whether the values are in English or the Modal and non-modal will described shortly.
metric units. Neither it indicates whether the motion to this Each conlrol has own list available G
specified target position is a rapid motion or a linear mo- Many G codes are very common and can be found on virtu-
tion. If a look at the block cannot the of ally all controls. others are unique to the particular control
the block contents, neither can Ihe control system. The sup- even the machine tooL Because of the nature of
plied information in such a block is incompleTe, therefore machining applications. the of lypical G codes Will
unusable by itself. Some additional for the different for the milling systems and Ihe turning systems.
block are required. The same applies for other types of machines. Each group
G codes must kept "pn,"'r~IP
For in order to make the block N7 a tool desti-
nation in a rapid mode using absolute dimensions, all these
Check machine documentation for available G codes!
instructions - or commands - must be specified before
block or within block:

APPLICATIONS FOR MILLING


C Example A :

N7 G90 GOO X13.0 Y10.O The G code table on the next page is a considerably
tailed list of the most common preparatory commands
C Example B. for programming CNC milling and CNC ma-
chining centers. The listed G codes may not be applicable
N3 G90 to a particular machine and control system, so consult the
N4 machine control manual to make sure. Some
NS G codes listed are a option that must available on
N6 the machine and in the control system.
N7 GOO X13.0 Y10.O

47
Chapter 8

G code G code
GOO Rapid positioning Local coordinate
GOl Li near interpolation
G02 Circular intcrpolallon clockwise Work coordinme
G03 Circular interpolation counterclockwise G55 Work coordinate
G56 Work coordinate offset 3
G57 Work coordinale offset 4
GlO G58 Work coordinate offset 5
Gll Data Seni ng mode cancel G59
G15 Polar Coordinate Command cancel GSO
G16 Polar Coordinate Command G61

G17 G62 Automatic comer override mode


G18 G63 Tappi ng mode
G19 G64 CUlling mode
G20 English units or input G65 Custom macro call
G21 G66
G22 check ON G67
G23 Stored stroke check OFF G68
G25 Spindle fluctuation detection ON G69
G26 Spindle fluctuation detection OFF G73
G27 Machine zero position check G74 Lert hand threading cycle
G76 Fine
GSO Fixed cycle cancel
2)
G31 Skip function
G40 Culler radius compensation cancel eep hole drilling cycle)

compensation - decrease
compensation - double increase

G48
G49 Tool length offset cancel
Scoling funclion cancel G98
runction G99 Return 10 R level in a fixed
PREPARATORY COMMANDS 49

G code Description

APPLICATIONS FOR TURNING


Fanuc lathe controls use three G code group Lypes - A, B G54 Work coordinate offset I
and Type A is most common; in this handbook, Work coordinate offset 2
all examples and explanations are A group, including
table below. Only one type can set at a Types A G56 Work coordinate offset 3
~nd B. can be sel by a control but lype C G57 Work coordinate offset 4
IS optIOnal. Generally, mOSl codes arc identical, only a
few are different In the A and B types. More details on the Work coordinate offset 5
G code is listed at the of this
G59 Work coordinate offset 6

G code Description G61 stop mode

GOO Rapid posilioning G62

GOl Linear illterpolation G64

Circular clockwise
Custom macro modal call
G03 Circular interpolation counterclockwise
G04 Dwell (as a separate block)
G09 Exact Stop check - one block only
Programmable data input for double turrets cancel
Gl0 Setting)

Gll Data Selling mode cancel


- Z axis direction
units of input

G23 Stored stroke check

G25 Spindle speed fluctuation detection ON


s
G26 Spindle nuctuation detection OFF
(Group type A)
Machine zero posilion check

G28 Machine zero return (reference poinl I) G90 Absolute command (G roup type B)

G29 Return from machine zero G91 Incremental command (Group IYpe B)

point 2) G92
Toul pUSilioli

- conSlant lead G94 CUlling cycle B (Group type A)

G35 Circular threading CW G94 fvpe D)

Circular CCW
895
G36
G40 Tool nose radius offset cancel G96 Constant surface speed mode

G41 Tool nOse radius offset lefl


Ie per minute
G42 osc radius compensation
50 8

Most of the preparatory commands are Ul~'i..U::'::'c;u Note rapid motion command GOO -
individual applications, for does it in the program? Just once - in
Inrerpolation, G02 and G03 under Interpolation, In fact, so is command for absolute
etc. In this section, G codes are described in general, re- reason neither GOO nor G90 has been is v ....... QI.I,)1.-
of the type of machine or unit. both remain active from the moment of their
first in the program. The cerm is to
G CO IN A PROGRAM BLOCK this characteristic.

Unlike the miscellaneous


and described in next cm~ptl:r
rator·y commands may be used in a block, providing to repeat a
they are not in a logical con with each other: example
interpre-
N25 G90 GOO G54 X6.75 Y10.S
tation
This method of program writing is severa! blocks shorter
~ Example C - modified (as processed I :
single block
N3 G90 GOO xso.o Y30.0
N25 G90 N4 G90 GOO XO
N26 GOO N5 G90 GOO Y2QO.O
N27 054 N6 G90 GOO XlSO.O Y:220.0
N28 X6. 75 Yl0.5
N7 G90 GOO X130.0 YlOO.O
Both methods will during a '-v........ .. program does not have any practical application by
processing. However, example, when from one location to another at a rapid rate, but it
in a single block mode, block will require pressing the the modality commands. The
Cycle Start key to activate the The shorter method is of modal values is to unnecessary duplica-
more practical, not only length, but for the of programming modes. G are used so often. thal
connection between individual commands within writing them in the program can tedious. Fortunately.
block. (he majority of G codes can only once, providing
rules of application general considerations they are modal. In the control specifications, prepa-
to G codes used with other data in a block. The most ratory commands are as modal and unmodal.
of is of modality.
• Conflicting Commands in a Block
• Modality of The purpose of preparatory commands is to select from
Earlier, the following C was used to two or more modes of If the rapid motion com-
the general placement of G codes into a program block: mand GOO is it command to a
tool mn'!,nn [0 have a rapid motion and

~ Example c· original: same time, it is to

N3 G90 GOO
N4
N5
N6 N74 GOl GOO X3.S Y6.125 F20.0
N7 X13.0 YlO.O
In the example. two commands GO 1 and GOO are m
If the structure is changed slightly and filled with conniCL As GOO is the latter one in the block. it will
data, these may be the result: come feedrale is ignored in this block.
~ Example C - modified (as programmed) : N74 GOO GOl X3.S Y6.12S F20.0
N3 G90 GOO XS.O Y3.O This is exact of the previous Here.
N4 xo
the GOO is in front, therefore the G01 will prece-
NS Y:2O.O
N6 XlS.O Y22.0 motion will take place as a motion at
N7 Xl3.0 YlO.O of 20.0 in/min.
PREPARATORY 51

• Word Order in a Block GROUPING OF COMMANDS


G codes are normally programmed at Ihe beginning of a
block, after the block number, other significant data: of conflicting G codes in one
forefront. Il makes sense,
N40 G91 GOl Z-O.62S Fa.S motion commands as GOO, , G02 and
same is not so
This is a traditional order, on that if the or€~oarat;orv commands. For example, can the lool
purpose of the G codes is to the control command G43 be programmed in the same
to a cenain condition, the ",,..c,,,,,..,,...,I,,,,,,,,,
as cutter offset command G41 or
always be placed The answer is but leI's look at the reasOn why.
that only non~conflicting
block. Strictly there is recognizes preparatory commands
to: into arbitrary groups. Each
has a Fanuc assigned
N40 G91 Z-O.62S Fa.S GOl two-digit governing the
codes in one simple. If two or more G codes
unusual, but quite correct. is nol the case from the same the same block, they are in con-
next method of positioning a G in a block: f1icl with
N40 Z·O.625 F8.S GOl G9l • Group Numbers
Watchfor situations like this! What case IS The G are typically numbered from 00 to
Ihat cutting motion G01, the depth Z different control models,
will combined and executed using the current tealtur(~s It can even be higher for the new-
If current mode is absolute, Z est controls or more G codes are required. One of
executed as an absolute value, not an mcrernell1- these groups - the most one and perhaps the mosl
reason for this exception is important as well - is the Croup 00.
values in the same block. can a
feature, jf used carefully. A typical correct All preparatory commands in the 00 group are not modal,
feature can be illustrated in this example: sometimes using [he unmodal or non-modal.
They are only active in in which they were pro-
(G20) grammed. If unmodal G are to be effective in
N45 G90 GOO G54 Xl.O Yl.0 51500 M03 (G90) consecutive they must programmed in
N46 G43 ZO.l H02 those blocks. In majority of unmodal this
N47 GOl Z~0.25 F5.0 titian will not
N48 X2. 5 G91 Yl. S (G90 MIXE:D WITH G91)
N49 pause measured in
duration within the
no longer. is no need to pro-
through N47 are all in the aU:'U1Ul\.,
dwell in two or more consecutive blocks. After all,
N48 is executed, the absolute
what is the benefit of the next three blocks?
the axes X Y is 1.0,1.0. the
target location is "V"'VIUl.... position of X2.5 combined
N56 G04 P2000
with of 1,5 inches along the Y axis. NS7 G04 P3000
will be X2.5Y2.5, making a NS8 G04 PlOOO
45" motion. this case, the G91 will remain in effect for
all subsequent blocks, unlil the G90 is programmed. Most All three blocks contain the same
likely, the block N48 WIll be written in absolute mode: another. The program can
by simply entering the total dwell
N48 X2. 5 Y2. S
N56 G04 P6000
Normally, is no reason to switch between the two following groups are typical for the control
modes. It can in some unpleasant surprises. Applications for milling and turning
There are some V""'''......HV. when this special distinguished by the M and T letters
brings benefits. for in subprograms. column of the table:
52 Chapter a

Type Group 01 is 1101 byO from Group 09. In a


summary ...
G04 G09 GIO MIT
GIl G27 G28 G29 MIT
G30 G31 G37 MIT
G45 G46 G47 G48 MIT
Unmodal
00 G52 G53 G65
G codes GSl G60 G92 M
G CODE TYPES
GSO T
G70 G71 G72 G73 T Fanuc control system a nexible selection of pre-
G74 G75 G76 T paratory commands. This fnct distinguishes Fanuc from
GOO GOI G02 G03 MIT many other controls. the fact that Fanuc con-
Motion Commands, trols are used it only sense to the
01 G32 G35 G36 T
Cutting Cycles G90 G92 G94 standard control configuration to follow established style
T
-----+---1 of each A typical example is the selection of di-
02 Selection Gl9 M mensional In Europe, Japan and other coun-
G90 G91 M metric system is the standard. In America,
03 Dimensioning Mode common system of dimensioning still uses {he English
(U and W for lathes) T
both are substantial in the world trade, a
04 Stored Strokes G22 G23 MIT clever control manufacturer tries to reach them both. Al-
05 Feedrate G93 G94 G95 T most all control manufacturers offer a selection the di-
mensional But and similar controls also
G20 G2l MIT selection programming codes that were in
Radius Fanuc reached the worldwide market.
G40 G41 G42
Offset
The Fanuc controls use is a simple method of pa-
Tool Length G43 G44 G49 rameter By the speci fie system parameter,
08 Offset
M
one of two or three 0 types can selected, one
G73 G74 G76 GSO M is typical a particular geographical user. Although
G81 G82 Ga3 GB4 M majority of the G codes are same for lype, the
09 Cycles most typical iIluslIation are G used English and
Ga5 Ga6 G87 GSS M
Ga9 M metric selection of units. Many earlier US controls used
070 for units and G71 for units.
10 M
tern has 020 and 1 codes for
M and metric
11 T
Setting up a parameter, the G type is the most
Coordinate 5 G56 G57 practical can be Such a practice, if done at all.
12 System GSa G59
should done only once and only when the conlIol is in-
G6l G62 G64 MIT stalled, any programs have been wriuen il.
13 Cutting Modes
G63 M Change of G code type at random is a guaranteed way
G66 G67
to create an organizational nightmare. in mind that a
MIT
of one code meaning will affect the meaoing of an-
G6a G69 M
other Using units for a lathe, if G70
means an English input of dimensions, you cannot use it to
17 G96 G97 T program a roughing Fanuc provides a code.
Always with the G code All G
18 Input GlS GI6 M this handbook use the default group of Type A, and
Speed the most common group.
24 Fluctuation
G25 G26 MIT
• G Codes and Decimal Point
group relationship makes a perfect sense in all cases. include a G code with a
One possible exception is Group aI for Motion Commands 1 (Rotation copy) or
and Group 09 for The relationship these (Parallel copy). Several preparatory commands in this
two groups is this - if a G code from Group 01 is specified group are related to a particular machine tool or are not typ-
in any ofthe fixed cycle 09, the is immediately ical to described in this handbook.
but opposite is not true. In words, an ac-
tive motion command is nO! by a cycle.
MISCELLANEOUS FUNCTIONS

..'"".... '"'.~., M a CNC a miscella- All for metal removal by


neous jUnction, sometimes a Not have certain common features and capabilities. For exam-
all functions are related to of a ple, can three - and only three -
CNC machine - quite a few are related to of ble
the itself. The more sui tab Ie term miscellaneous
Q normal rotation
lun'-UIJfI.\ is used throughout this UW1UL'VVr....
o Spindle reverse rotation
DESCRIPTION AND PURPOSE o Spindle

three possibilities, there is a


the structure ofa CNe prclgr(!Jlt.progl1lmmers of-
ten some means of certain aspects of the "'''''.,,"', .... orientation, also a machine
tion. example is a coolant. Coolant can only
machine operation or controlling flow. With-
controlled as being ON or being OFF.
out availability of such means, program would be
mcomplete and impossible to run. let's look at the operations are typical to most CNC All
18neOlIS functions to operation of the ma- with an M function, fonowed by no more
- the true machinefonctions. although some control allow the
M function, Fanuc 16/18, example .
• Machino Related Functions
spe-
Various physical machine must be two
controlled by the program, to ensure fully automated ma- other
chining. These functions use the M address and and
include the following
0 Spindle rotation CW Of CCW
0 Gear range change low 1 Medium 1High • Program Related Functions
0 Automatic tool change ATC In addition to the machine some M functions
0 Automatic are to control the execution program. An in-
terruption of a program execution an M function,
0 Caolant operation or OFF
during the change such as a part
0 Tailstock or quill motion IN or OUT Another example is a where one pro-
one or more subprograms. In such a case, each
These operations vary be1:'wef~11 machines, due to the dif- to have a program the number of
ferent designs by various manufacturers. A ma- etc, M functions
chine design, from the point of view, is
on a certain primary application. A CNC mill- previous "'''''''Ull-''.... ''', miscellane-
ing machine will functions related to ous falls lnto two on a partic-
machine than a center or a CNC lathe, A ular application:
numerically controlled wire cutting machine will
o Control of the machine functions
many unique typical to that kind of ma-
chining and on no other machine. o Control of the program execution

Even two ........"..&L.......... for the same type of work, TIlls handbook covers only the most common miscella-
for example, two vertical machining center, will neous functions, used by the majority controls, Unfortu~
have functions ditterjent each other, if they have a nately, there are many functions that vary between ma-
ferent CNC SlgOJ.tllCaIltly different I'InlMI'ITHI and the control system. functions are called
ferent the same manutactlmer machine specific junctions. reason, always consult
also have functions, even with the same the documentation for the machine model and its
model of the CNC <II'UC!,rpTn control system
54 9

TYPICAL APPLICATIONS M04 Spindle rotation reverse


MOS Spindle stop
learning the functions, note type of activity
these functions regardless of whether such activity re- Mo;-r Coolant mist ON
lates to machine or program. Also nOle Ihe ahun-
dance two way toggle modes, such as ON and OFF, IN MOS Coolant ON (coolant pump molar ON)
OUT, Forward and Backward, etc. Always check your M09 Coolam OFF (coolant pump motor OFF)
manual - for reasons of consistency, M func-
tions in this hoodbook are based on the following table: Ml0 open
Ml1 Chuck close
• Applications for Milling
M12 il<;lo{'k quill IN
M code :ription M13 TailSlock quill OUT
"""'=
MOO Compulsory program stop Turret indexing rurward
M17
MOl Optional program stop
MIS Turret indexing reverse
M02 End of program (usually with reset. no rewind)
M19 ;pi oriental ion (optional}
M03 ~ rotation normal M21 Tailstock forward
M04 Spindle rotation reverse
M22 Tailstock backward
MOS Spindle stop
M23 Thread gradual pull-out ON
6 Automatic lool change (ATC)
M24 Thrcad gradual pull-om OFF
M07 Coolant mist ON
M30 Program end (always with reset and rewind)
MOS Coolant ON (coolant pump motor ON)
M41 Low gear selection
M09 Coolant OFF (coolant pump molor OFF)
M42 Medium gear selection 1
M19 ;pindle orientation
M43 Medium gear selection 2
M30 Program end (always with reset and rewind)
M44 High gear selection
M48 Feedrate override cancel OFF (deactivated)
M48 FeedralC override cancel OFF ( deactivated)
M49 Feedrate override cancel ON (activated)
M49 Feedrate override cancel ON (activated)
M60 Automatic pallet change (A
M9a ;ubprugl"uB call
M78 B axis clamp (nonstandard) I
M99 Subprogr{lm end
M79 B axis unci amp (nonsfandard)

M98 Subprogram call • Special MDI functions


M99 end '''''IF''"'''' M functions cannot be used in CNC n,..r,or~m
at all. This group is in the Manual Data Input mode
• Applications for TurRing exclusively (MDl). An example of such a: function is a step
by tool for machining for service
'rnr\<'tH" only, never in the program. These functions are
M code Description outside of the scope of this handbook.
MOO Compulsory program stop
• Application Groups
MOl Optional program stop
The two major categories, described can further
End of program (usually with reset, no rewind) be into several groups, on the specific
of the miscellaneous functions within each group. A
M03 Spindle rotation normal
(ypical distribution is contained in the following table:
MISCELLANEOUS FUNCTIONS 55

Group Typical M-functions method of programming certain


is in a block that contains a tool
..... "·uv,, •.)
turning the coolant on and - at the same time -
Program
the cuuing tool to a certain part location
there is no conflict between
4 MOS
Spindle may look something like this:

Tool change M06 N56 GOO X12.98S4 Y9.474 MOB

Coolant M07 MOB M09

M10 M11
Ml.2 M13
or
Accessories Ml.7 MiS
at this combination - a Z mo-
M21 M22
M78 M79
with the program stop function

Threading M23 M24


NG19 GOl Z-12.S4S6 F20.0 MOO
Gear ranges M44
This is a more situation and two answers are
M48 M49
needed. One is what exactly will happen. the other is when
M98 M99 exactly it will when the MOO function is activated.
There are and three questions to
M60
1. place immediately, when
.""y,,,,U,,,,,, - at the start of the block?
The table does nOI cover aU M functions or even all possi-
ble groups. Neither it between machmes. 2. Will the place while the tool
On the other hand, il does indicate types of applications is on the way - during a motion?
the miscellaneous functions are for in everyday CNC
programmIng. 3. Will the program place when the motion
command is - at the end of the block?
The miscellaneous functions
used throughout the book. One of the - but which one?
than olhers, reflecting Even if a practical examples may nol be
functions that do not l"""",......".·~ ..-.r\nn apparent at this to know how the control
control system are not system interprets a tool motion and a
However, the concepts for their miscellaneous function.
most control systems Each M function is designed logically - it is also designed
In this chapter, only the more general functions are cov- to make a common sense.
in significant detail. Remaining The actual startup of a M function is into two
are described in the sections covering individual ap- groups - not three:
At this stage. the stress is on the and
of the most common miscellaneous Q M function activates at the start of a
(simultaneously with the tool
M FUNCTIONS IN A BLOCK Q M function activates at of a
(when the tool motion has been cOl1nDl~!ted

If a miscellaneous function is programmed in a block ""''''",n will be during execu-


with no other data supplementing it, only there is no logic to it. What is the logical startup
itself will be executed. For example, ON function M08 in the block N56
correct answer is that the coolant will be at
N45 MOl same time as the tool motion begins. The correct answer
the example block N319 is that the MOO
block is correct - an M function function will be activated after the tool ~,., .. ,.". .
entry. Unlike the preparatory com-
completed. Makes sense? Yes, but what about
only one M function is allowed in a block functions. how do they behave in a block?
allows multiple M functions in the same
them next.
error will occur (latest controls only).
Chapter 9

• Startup of M Functions
M functions completed in ONE BLOCK
""='"'=~==-==9
Take a look at the list of typical M functions.. Add a tool
motion to try to determine the way lhe function is
going to behave, based on the previous nOles. A bit of logi-
cal thinking provides a good chance to arrive at righ! t. no rewind)
Com pare) he two following groups to confirm:

Mfunctions activated at the START OF A BLOCK

UNTil CANCELED or ALTERED


Automatic too! change (ATC)

Coolant mist ON
Spindle rolation reverse
Coolant ON (coolant pump motor ON)

M functions activated at the OF A BLOCK


lVIUV Compulsory program stop

M01 Optional SLOp


The classification is quite logical and shows some com-
M02 End of program (usually with reset no rewind) mon sense. There is. no to individual M
functions and exact actlv!tles. best place to find
M05 Spindle stop
out for certain, is to study manuals supplied with the CNC
M09 Coolant OFF (cool an! pump motor OFF) and watch the run right on the machine.

M30 Program end (always with resel and rewind) PROGRAM fUNCTIONS
M60 Automalic pallet change (APC)
Miscellaneous functions that control program processing
can used either to interrupt temporarily
If there is an uncertainty about how the function will in- (in Ihe middle of a program) or permanently the end of a
teract with the lool motion, safest choice is to program program), Several functions are available for Ihis purpose.
the M as a separate That way the function
will always be processed before or after relevant pro- • Program Stop
gram block. In the majority of applications this will be a
SOltllion. The MOO function is defined as an unconditional or com-
pulsory program stop. Any time the control system en-
• Duration of M Functions counters lhis function during program processing, all auto-
matic operations of the machine tool will stop:
Knowledge of when the M function effect is logi-
cally followed by the question about how long the function o Motion of all axes
will be active. Some miscellaneous functions are active o Rotation of the spindle
only in the block they appear. Others will continue to in
until canceled by another miscellaneous function. o Coolant function
This is similar to the modality the preparatory G com- o Further program execution
however the word modal is not usually used with M
functions. an example of a function duration, take mis- Thc control will ItO! be reset when the MOO function is
cellaneous functions MOO or MOl. Either one will active prclce:5scQ, All program data currently active are
for one block only. The coolant ON function M08, will be (feedrate. spindle etc.).
until a canceling or an altering function is pro- program processing can only resumed by activating
grammed. anyone of the following functions the Cycle Starr key. The MOO function the spindle
will cancel the coolant ON mode - MOO, MO l, M02, M09 rotation coolant function they have to be
and M30. Compare these two tables: grammed in subsequent blocks.
FUNCTIONS 57

MOO function can be as an individual o In the program itself, issue a comment section with the
block or in a block commands, usually' necessary information. comment section must be
motion. If the MOO is programmed together enclosed in (three versions shown):
with a motion command, the motion will be completed
then (he program stop will effective: [Al 109 MOO (REMmr.E CHIPS)

c::> MOO programmed after a motion command " [8] N39 Xl3. 5682 MOO (REMOVE CHIPS)

N38 GOO X13.5682 [C] 108 Xl3.5682 MOO


(REJM'O'.i'E CHIPS)
N39 MOO

c::> MOO programmed with a motion command: Anyone of the methods will give Ihe operator
the necessary information. From the two options, the sec-
N39 GOO X13.5682 MOO ond one [B], the comment section in the program, is
The built-in can be read directly from the
In both cases, the motion will screen control paneL
first, before the program is executed. The
between the two examples is apparent only in a • Optional Program Stop
block processing mode (for example, during a trial
will be no practical difference in aula mode pro- The miscellaneous MO I is an optional or a COII-
(Single Block switch set to OFF). dirional program stop. It is similar to MOO function,
one diffe.rence. the MOO function, when MOl func-
Practical Usage lion is encountered in the program, the processing
will nOl SlOp, the operator the control
program stop panel. The Optional SlOP toggle switch or a button key lo-
CNC operator's job cated on the Clln be set to either ON or
common use is a When the in the program is
the part is still During the stop, the part setting of will determine
sions or the lool condition can be checked. Chips accumu- will or continues to
lated in a bored or drilled hole can be removed, for exam-
ple, before another operation can start, as
blind hole tapping. program stop function is also nec- Optional Stop switch setting Result of MOl
essary to the current setup in the middle of a ON
for to reverse a part. A tool
also requires the in the OFF

The control an optional program stop MO I,


described next. The main rule of using MOO is need of a When the MOl function behaves
manual every parl machined. Manual lool the MOO function. The motion of
change in a qualifies for MOO. part coolant and any further execution will be
needs it. A check may oOl if is infre- temporarily interrupted. Feedrate, coordinate settings,
quent. MOl will choice. Although spindle setting, etc., are . The further pro-
between the two is slight, the actual program can only be reactivated by (he Cycle
cycle time can significant for large All programming rules for the MOO function also
MOl function.
When usi'ng the MOO function, always inform the opera-
tor why the function been used and what purpose is. is to program MOl function at the end of
Make the known to avoid a This intent followed by a blank line with no If the pro-
can be to the operator in two ways: gram processing can continue witham Slopping, the Op-
tional Stop switch will be set to and no production
refer to the block that contains time is lost. If there is a need to program tempo-
MOO describe the manual rarily at the end of a tool, the switch will be set to ON and
stops at the end of 100i. The lime loss is
under the for example, to
BLOCK N3 9 •..••. REMOVE CHIPS
a dimension or the
58 Chapter 9

• Program End Percent Sign


program must include a percent sign (%) after M30 is a special stop code.
the of current program. are two This symbol terminates the loading of a from an
M functions available - M02 and are similar, external It is the
but a distinct The M02 function will ter-
minate the program, will cause no return to the first • Subprogram End
block at the program top. The function M30 wililerminate
the program as well but it will cause a return to the last M a is M99.
lOp. The word t return' is often replaced by word 're- mary usage is in the subprograms. Typically, the M99 func-
wind'. It is a leftover the limes when a reel-to-reel tion will a subprogram and return to process-
tape was common on NC tape had to ing of the previous program, If M99 is in a standard
be rewound when the program has completed for program, it creates a program with no end such a situation
M30 function provided this capability. is called an endless loop, M99 should be used only
not in standard
When the control reads the program end function M02 or
M30, it all axis motions, spindle rotation, coolant
function usually resets the system to default condi-
MACHINE FUNCTIONS
tions. On some controls the reset may not be automaTic
any programmer should be aware of it. Miscellaneous functions relating to operation of the
tool are of another group. This section
U the program with the M02 function, the control the most important of them in detail.
remains at the program end, ready for the next Cycle Stan.
On modem CNC equipment there is no need for M02 at all, • Coolant Functions
except for backward compatibility. This function was
in addition to M30 those machines (mainly NC Most metal removal operations that the cUlting
had tape without using a short tape. tool is flooded with a suitable coolant In order to control
(railer of tape was spliced 10 the tape creat- the flow of coolant in program, are three
ing a closed loop. When the program was finished, the start neous functions usually provided for (his purpose:
of the was next to the so no rewind was necessary.
Long could not use loops and and M30. M07 Mis! ON
So for the history or M02 - just
Is M02 the Same 8S M30 ?
Flood ON

On most controls, a system parameter can be set Mist or Flood OFF


to make M02 function the same meaning as that of
M30, setting can It rewind capabilities,
in situations where an old program can be used on a ma- Misl is combination of a small amount of cutting oil
with a new without mixed with compressed It depends on machine tool
manufacturer whether function is standard for a partic-
Tn a if the end of is terminated by the ular machine tool or not. Some
M30 function, the rewind performed; if the M02 mixture oil and air with air only. or with oil only,
function is used, the rewind will not be performed. etc. In these cases, it is typical that an additional equipment
is built into machine. If this option exists on the ma-
When writing program, make sure the last chine, the most common miscellaneous function to
program contains nothing else but M30 as the the oil or air is M07.
end (sequence block is allowed to start the block):
function similar to M07 is M08 - coolant flooding .
N65 . . . .This is by far the most common application in CNC
N66 G91 G2S xo YO programming. It is standard for virtually all machine.
N67 mo (E:tiID OF PRQGR.ll.M) The coolant, usually a mixture oil and
% water, is premixed and in the tank of the ma-
chine tool. Flooding cuning edge of tool is impor-
On some controls, the M30 function can be used together tant for three reasons:
with the axes motion - NOT recommended !:
o Heat dissipation
N65 . . .
N66 G91 G28 XO YO M30 OF PRQGR.ll.M) o Chip removal
% o Lubrication
FUNCTIONS

primary reason La use a coolant flood aimed at the Coolant should always be programmed with two
cutting is to dissipate lant considerations in mind:
cutting. reason is to remove
cutting area, using coolant pressure, Finally, a There will be no coolant splashing outside of
also acts as a lubricant to ease the friction work area (outside of the machine)
cutting tool and material. Lubrication helps to extend tool a will never be a situation when
life and the surface finish. the coolant reaches a hot edge of the tool

initial tool approach towards the part or during IS


nal return to the tool change position, the coolant is nor- function is programmed in the
mally not turn off (he cootant function, use an inconvenience. wet area
M09 function - coolant off. M09 wi lllurn off the oil mist or chine may present unsafe working
supply and nothing else. In reality, the M09 function quickly corrected. Even more "Pro"""
will shut off (he coolant pump motor. when the coolant suddenly starts
that has already entered the material.
the rhree coolant related functions may perature at the cutting edge may cause
in blocks or together with an damage the part. Carbide tools are
are subtle but important differences in by temperature changes than
of the program processing. The possibility can be prevented
explain the differences: the M08 function a few blocks the actual cutting
block. Long pipes or insufficient coolant pressure on the
C) A - oil mist is turned ON, if
machine may delay the start of flooding.
N110 M07
• Spindle functions
C) Example B - coolant is turned ON : Chapter 12 - Spindle all aspects of con-
trolling the machine program. Miscella-
N340 MOS
neous functions that are
= Example C - coolant is turned OFF:
rotation and
Most spindles can rotate in
the spindle control its

clockwise
NSOO M09 (CW) and of rota·
Lion is always relative to a point of view. The
0\.L1,llV<.U\J
C) Example 0 - axis motion and ON: viewpoint is spindle as the
lion along the spindle center towards itsface. CW rota-
N230 GOO Xll.5 Y10.O MOS

= E - axis motion and OFF.


lion in such a view is
as M04. assuming the
as M03, CCW direction
rotated either way.
The drilling and milling Lypes of machines use this estab-
N4QO GOO Zl.O M09 lished convention commonly. The same convention is
LO lathes. On a CNC milling machine or a
The examples show pro- machining center, it is more practical to look towards the
cessing. The gen;;ral rules part from the spindle side rather than from the
o Coolant ON or OFF in 8 :>e:IJ'I1TClIe:
horizontal type), the more
the block in which it is the tailstock towards the spindle, because that
(0 how the CNC machine operator stands in
o Coolant ON, when programmed with the axes motion, nu.H'l/p, M03 and M04 spindle
becomes active simultaneously with the axes motion the same way as for machining cen-
(Example 0) is the fact that left hand tools
o Coolant OFF, programmed with the axes motion, are In more than in
becomes effective only upon completion of milling applications. Make an to
the axes motion {Example E) manual for a machine carefully -
in 12.
The main purpose M08 funclion is to turn the coolant
pump motor on. It that the CUlling Spindle function (0 program a spindle is
receives any coolant On large machines with function will stop the spindle from rotating,
long coolant pipes, or with low coolant pump the rotation direction. On many machines.
is to expected before the coolant neous MOS must also be programmed
pump and cutting lOol. the spindle rotation:
60 9

M03 CW) For example, most rougbing " ....",..".i"'.~"


the spindle more than the
<: ••• Machining at the current location .•• :> low range is usually a better selection.
medium or high range is better, high
M05
<:. • • a tool change ... :> can be more beneficial to the metal removing
M04 (SPDmLE CCW)
distribution of (he miscellaneous functions
<. . . at the current location ... :> entirely on the number of gear ranges the CNC has
available. Number of ranges IS I, 2, 3 or 4. foJlowi
shows typical distribution of the M
may also be required the actual commands in a machine tool manual.
on CNC lathes. A spindle SLOP
. an axis motion, will take Ranges M function Gear
completed.
N/A None programmed
spindle control function is the function M 19,
spindle orienTation. Some control M41 Low range
call it the spindle key lock function. Regardless of the 2 available
M42 High range
the M 19 function will cause the spindle to SLOp in
position. This function is used mostly during M41 Low range
seldom in the program. The spindle must be 3 M42 Medium range
in two main situations: M43 High range
o Automatic tool change (ATC)
M41 law range
o Tool shift during a boring ",",or<>+i,," M42 Medium range 1
and boring cycles only) M43 Medium range 2
M44 High range

thumb is that the higber (he gear range, the


sequence and is possible and less spindle power is re-
cutting tool hold- is also true. Normally, the ."pindle ro-
the M 19 with the ta be stopped to change a gear, but con-
anyway. In doubt, stop the spindle
first, the then restart the spindle.
is necessary for certain boring • Machine Ar.r.fHrt~n
on mill To exit a bored hole with a
1001 away from the finished cylindrical wall, the The majority of " .. ,,,"'''',,<.1, functions is used for some
spindle must the tool cutting bit must be physical operation of the tool <.>"'\..""""Ul
aQd then the tool can be from the hole. A this group, the more common
similar approach is back boring operations. How- ready covered, specifically
ever, use fixed cycles in the changes. The remaining M
program, where is built in. For more scribed in delail elsewhere in
details, Chapter description is offered
chine related M are:
In conclusion. the M 19
gram. It IS aVailable as a ... r~''''''''''''''''
chine operator for M function Description

• Gear Range Selection M06 M

M60 Automatic M

M23 M24 Thread gradual pull-out ON I OFF T

M98 M99 Subprogram call J Subprogram


SE~UENCE BLOCK

Each line in a CNC program is called a block. In o Block number N


terminology established a block was as a o Preparatory commands G
single instruction processed by CNC system.
a Auxiliary functions M
A block, a n block -
is normally one written line in copy, or a o Axis motion commands XYZABCUVW ...
line typed in a text and terminated by the Enter key. o Words related to axes I J K R Q ...
This line can contain one or more program words - words
that result in definition a single i to the o Speed, or tool function S FT
machine. Such a program instruction may contain a contents of tile program block will between ma-
of commands, coordinate words, tools of di kinds. but the majority of
(001 functions coolant function, speeds and general rules will be followed, regardless of
commands, position registration, offsets of different CNC system or the tool
kinds, etc. In English, (he contents of one block will
be as a single unit before the control • BuHding the Block Structure
block. When the whole CNC program is pro-
the system will individual instructions program has to built with the
(blocks) as one complete machine step. Each same thoughts the same care as any other important
program consists of a series of necessary to com- structure, for a building. a car, or an It
plete a machining process. overall program starts with planning. Decisions to be as lO
length will always depend on number of blocks what and what will not of the program block,
and their to a building, car, or other structure. Also,
have to as to what order commands -
BLOCK STRUCTURE instructions - nrc to be established within thc block
many other
As many program words as are allowed in a The next few examples compare a typical structure
block. Some controls impose a limit on the number blocks milling operations and blocks for opera-
in one is only a maxi- tions. block is as a separate
mum Fanuc and controls, in practice.
The only restriction is that two or more duplicated words • Brock Structure for Milling
(functions or commands) cannot in the same block
(with the of G example, only one In milling operations. the structure of a typical
miscellaneous M function do exist) or only one block will renee! the realities of a machining center
coordinate word for the X in a 5i block are or a machine.
al The order of words within a block fol-
lows a fairly free required words C Milling block examples:
may be in providing that block (the
Nll G43 Z2.0 S780 M03 HOl {EXAMPLE
N address) is written as (he firs! Although or-
der of individual words in a block is allowed to be in or- N98 GOl X2.1S Y4.575 F13.0 (EXAMPLE 2)
der, it is a standard practice to place words in a or-
a block. ft the CNC to The first milling example in block NIl, is an illustration
and understand. of a 1001 length offset applied with the
block slructure is dependent on dIe speed and ndle rotation
and the type of the eNC machine. A example in block shows a typical pro-
may conlain the following inslructions, in the ng instruction for a simple linear CUlling motion.
Not all data are to be the linear interpolation method and a suitable CUlling
specified every lime.

61
62 Chapter 10

<:> Turning block examples: rectory more descriptive useful. The program descrip-
tion can be read on display screen provides an eas-
N67 GOO G42 5 ZO.l T0202 MOS 1) identification of program stored.

N23 G02 X7.5 Z-2.8 RO.5 FO.012 (E.XAMPLE 2) If program name is than the characters
recommended, no error is generated, hut only the firsl six-
In lathe examples. block N67 a rapid mo- teen will be displayed. Make sure 10 avoid
tion to an XZ position, as well as a few other ("''''''nm,<ln,'l<: names that can ambiguous when displayed.
the tool nose offset startup activation of the tool these two names, they appear 10 be
(T0202), the coolant ON function M08. The ex-
ample in block is a typical circular interpolation block OJ.005 (LOWER SUPPORT A.RM: - OP 1)
with a 01006 (LOWER SUPPORT A.RM: - OP 2)

the control screen display can show only the


PROGRAM IDENTIFICATION siXfeen characters the name, the "'''IV'''!H'''''
names will be ambiguous when
A CNC can identified by its and, on
some controls, also by its name. The identification by 01005 SUPPORT
number is in order to store more than 01006 (LOWER SUPPORT AR)
in the CNC memory. name, if
can be used to make a brief description of pro- eliminate this problem, use an
readable on the control screen display. that is within the characters
data:
• Program Number
01005 (LWR SOPP ARM OP1)
The is commonly a 01006 (LWR SUPP A.RM: OP2)
Ihecontrol system from the
are available for the If a more detailed description is the description
number - the letter a for formal, co- to split over one or more comment lines:
lon l : J for ASCII (ISO) formal. In memory operation,
01005 (LWR SOPP A.RM:
the control system always displays program number with (OPERATION 1 - ROUGHING)
the letter The block containing the number is
not always necessary to include in the The comments in the block or blocks following the
If the program uses program numbers. number will not appear on screen lisl-
specified within an allowed range. Programs typical but still will be a useful aid to CNC operator.
Fanuc controls must be within the range of I - 9999, pro- be displayed during the execution and,
gram zero (00 or 00000) is not allowed. Some course, in a hard copy printout.
controls allow a 5-digit program number. not allowed Keep the names short and descriptive - their pur-
are decimal poim or a negative sign in the program pose is to the CNC in of programs
of leading zeros is - for '-'h<"JJ~J'\;'. in the control memory. The data to
I, 0001. 00001 are all entries, in this in program name are the drawing number or
case for a program number one. number, parl name. operation, etc. Data not
are the name, control mo.del,
• Program Name name, date or company or customer's name and simi-
lar descriptions.
the latest control systems, the name of Ihc
can bc i in addition to program On many controls, program into the
not instead of the program number, The program name (or memory, the CNC the num-
a brief of the program) can to sixteen on the the in the
long (spaces and symbols are The pro- CNC program. It can be a that just bappens \0 be
gram name must be on same line (in same block) as available in (he system, or it can be a number that has a
the program number: unique meaning, perhaps indicating a group (for ex-
all programs that begin with belong to
01001 (DWG. A-124D IT. 2) the group associated with a single customer). Subprograms
must always stared under number specified by the
This has the advantage that when directory of
CNC Innovative use of program numbers
Ihe memory is displayed on the screen, the name of the pro- may also serve 10 keep track of programs developed for
appears next to the program making di- each or part.
SEQUENCE 63

SEQUENCE NUMBERS • Sequence Block format


program input format notation for a
Individual sequence blocks in the program can be using the address N. is N5 for (he more
referenced wilh a number for orientation within and N4 or even N3 older controls. number is
program. The program address a block number is the not allowed. neither is a minus a fractional number or
leuer followed by up to five digits - from I to a block number using a point. Minimum block in-
9999 or 99999, depending on the crement number must be an integer -
block number be N I to for the older allowed is one (N 1, N4, N5. etc.). A In-
controls and N I Lo for the newer controls. Some crement is allowed its seleclion on the
rather old accept block in the three personal programming style or established
only, NI - N999. within the company. The typical sequence block
ments then one are:
N address must be the firs! word in the block.
an easier orientation in programs that use SUbprograms,
there should be no duplication of the between the Program
lwo lypes of For example, a program start- 2 N2, N4, N6, NS,
ing with N I a subprogram also starting with Nl
cause a confusing situation. Technically, there is nothing 5 N5, N10, N15, N20, .••
with such a designalion. Refer to for 10 N10, N20, N30, N40, .•.
on In
100 N100, N20Q, N300, N400,
• Sequence Number Command
In the following table, the column represents se- like to start with of the
quence numbers the way are used normally. sec- NIOO, usually programmed in the incre-
ond column shows the numbers in a for- menLS of I 10, or less. There is nothing wrong with this
mal acceptable to ine control system, as applied to a large start and increment. but the CNC
a CNC program: too long, too soon,

Increment block number In all cases of block incremenLS than one, the pur·
- I~ - - <- " " " " - « - <

1 N1 pose of program is the same - to for additional


blocks to be filled-in between blocks, jf a
2 N2 comes, The need may while proving or optimiz-
ing the program on the machine, where an addition to
5 NS
the existing II be required. Although new
10 N10 blocks (the ones inserled) will not be in the oruer ur an
equal increment, at least they will numerically ascend-
50 N50 ing. For a face cut on a lathe one cut (Exam-
100 N100 ple A) was by the operator for two cuts
. (Example
99999 N99999

numbers (block numbers) in a CNC


= Example A - one face cut:

several advantages al least one likely N40 GOO G41 Xl.S zo T0303 Moe
NSO GOl X-0.07 FO.Ol
N60 GOO WO.l M09
On the positive the block mo G40 Xl. S
program search greatly simplified
repetition on (he machine. They
to read on
the program
CNC display screen
= Example B - two cuts:

or on the copy. That means both N40 GOO G4l Xl.5 ZO.05 T0303 MOS
N50 aOl X-O.07 FO.Ol
programmer the operator benefit N60 GOO WO.1
On the side, block will the N61 X3.5
N62 ZO
available computer memory of the That means a N63 GOl X-0.07
of programs can stored in the memory, N64 GOO WO.l M09
programs may not fit in their entirety. mo G40 Xl.S
64 10

"""'1"1"''' inN40 and N6l to block sequence number not affect the order of
this handbook is 10 I"Il"f,a!"lOlm program processing, regardless of the increment. if
if an addition is needed, the blocks are numbered in a or mixed
will have no numbers at all (check if the control the part will always be sequentially, on
system allows block numbers to be omitted, most do), the of the block nO!
mcnt of 5 or lOis the most
Q Example A - one face cut: to 4 to 9
That should more than sufficient for the
N40 GOO G4l X3.5 zo T0303 MOS program modifications.
N41 GOl X-O.07 FO.Ol
N42 GOO WO.l programmers who use a computer hased
N43 G40 X3.S programming system, just a few relating to (he
gramming of sequence numbers. Although the computer
Q Example B . two face cuts: programming allows start number of the block
and its to almost any adhere to the
N40 GOO G4l X3.5 zo.os T0303 MOS start and numbers of on.e (N I, N2, N3, ... ). The
N41 GOl X-D.07 FO.Ol
N4.2 GOO WO. 1
computer based is (0 keep an ac-
X3.S \"""""U<X.J,, of the part geometry the cutting tool
ZO program is modi manually, the part
GOl X-O.07 Ua.'·LlV''''''" is not accurate any more. Any CNC
GOO WO.l program should al ways be reflected in the source of
N43 G40 X3.5 the program, as well as its result - never in result alone.
Note that the program is a lillie smaller and the additional • long Programs and Block Numbers
arc quite visual and noticeable when or
displayed on the screen. are always to into a CNC
limited capacity. In such cases, the program
Leading zeros may (and should) be omitted in lenoth may be shortened by omitting the block numbers al-
- for example. NOOOO8 can tog~ther or - even - by programming them only in the
(he zeros reduce the significant blocks. The significant blocks are those that
zeros must always be written, to have to be numbered for the purpose of search, a
for sl1ch similnri 8S N08 and N80. (001 repetition, or procedure Lha[ on program
use of block numbers in a program is optional, as numbers, such as a machining cycle or tool In these
shown in the earlier example. A program containing cases, select of two or the operator's
is easier to CNC operator, convenience. limited use of numbers will
functions in program editing can be used Increase the length, but for reason.
depend on the num- rr all block numbers have been omitted in the
u"..... ..,.'" repetitive cycles
program, the search on the machine control will
the significant blocks ralher difficult. The CNC will have no
lion but to search for next occurrence of a particular
dress within (l bJock. Y, Z, etc., rather than a se-
• Numbering Increment quence block method
Block numbers in a prog(am can in any physical order unnecessarily prolong
- they can also be
programming Of BLOCK CHARACTER
UI..,",<l ..",,,, they are logical

numbers in of the control specifications,


serves no useful purpose neither do dupli- ual sequence blocks must separated by a special
numbers. If the program contains dupl icate known as Ihe characler or by its
and a block number is initiated at the EOB or E-O-B. most computer
control system will only for the first ""h~'''''''IP!" is generated by key on the
the particular block number, which mayor the program is input to control by MDI
block required. search will have the EOB on the control
'""1-"_"'"........ from the string found reason for the the block. The symbol on
in the sequence numbering-is to appears as a semicolon [ ; ].
to the CNC operator the program has
into the
SEQUENCE BLOCK 65

The semicolon symbol on the screen is only a graphic The name safe block - which is another name for the
representation of the end-or-block character and is never startup block - does not become
entered literally in the CNC program. nuuie safe. Regardless of name,
stances it should be included in the program tain control settings for the program or
older control systems have an asterisk [ * J as slart the program in a state.
symbol for the end-of-block, rather then the ... m,,..."'" tries that set the initial status are the
Many controls use other symbols. that (English/metric and absolute/incremental),
of block, for example, some use the any active cycle, cancellation of the cutter
any case, remember the symbol is only the offset mode, the plane selection for milling, the
!he end-of-block character, not its actual fault selection for lathes, etc. The presented
some blocks for both milling and turning 1'1"\">11"1'\1
STARTUP BLOCK OR SAFE BLOCK At the beginning of the program for milling, a startup
may be programmed with the following contents:
A startup block (sometimes called a or a slalUS
block) is a sequence block. It one Of more Nl GOO G17 G20 G40 G54 G64 GSO G90 G98
(usually preparatory commands of
thal the control system into a N I block is the first sequence number, GOO
state. This block is placed at the rapid mode, G 17 establishes the XY plane selection,
or even allhe beginning of each is selects the English units, G40 cancels any active cutter ra-
processed duriog a repetition of a program offset, G64 sets a continuous cutting mode, G80 can-
a tool within a program). In the CNC program. the cels any active fixed cycle, G90 selects the absolute mode,
startup block usually precedes any motion block or G98 will retract to the initial level in a
as well as the tool change or tool index block. conditions apply only when the startup
to be searched for, if the program or as the first major block in the CNC
n"""',o,f1 cutting 1001 is to be repeated during a machine op- "LlIJ""'I..ILII"'''' program changes will become
Such a block will be slightly different for the mill- block in which the change is
and systems, due to the unique requirements of command is effective by any subsequent
of GOO. G02, or cancel the GO I command.

in this handbook, in. the Chapter 5, one cov- a CNC lathe program, the startup
state of {he control system when the main G codes:
on, which sets the system default condi-
should never count on Nl G20 GOO G40 G99
they can be easily changed by
without the programmer's knowl- block number, G20 selects the English
the rapid mode, 040 cancels any
set-
the machine tool nose radius offset, and the G99 selects feed rate per rev-
who designed the con- olulion mode, to Ihe absolute or incremental
system is usually not the controls use
addresses X and Z absolute dimensioning and the
should always assume addresses U and W for incremental dimensioning. For
approach and will not lathe controls that do nol U and W addresses,
programmer will try to pre- (he standard G91 is values in X
conditions under the program control, and Z axes. As in the of the words
rather that ng on the defaults of the CNC system. programmed in by subse-
Such an approach is not only much safer, it will also result quent change of
in the that are 10 use during the setup, the
tool path provi ng and tool repetition due to the tool
Some controls """'AM"" o on
the same line. For or not be pro-
breakage, dimensional adjustments, etc. It is also very
grammed with other G are not sure, place the
beneficial to the CNC particularly to
(hose with limited applications listed, G codes in separate
the startup block will not machining cycle time Nl G20 017 G40 G49 Gao
at all. Another block is that the pro-
one machine tool to an- two or more blocks can
default setting of a par-
Nl G20
N2 G17 G40 G49 GSO
66 10

PROGRAM COMMENTS CONFLICTING WORDS IN A BLOCK


Various comments and messages in the program can be In a program
included within (he program body as blocks, or as not impossible. For' the first block of
parts of an existing block, mostly in cases when the mes- the following words:
is short. In either case, the must enclosed
in parenthesis (for ASCIIIISQ Nl G20 G21 G17

e Example A : What contains is simpJy not logically possible.


It instructs the control to:
NJ30 MOO (REVERSE
'Set the English system of dimensions, also set the
e 8: system of dimensions and set the XY plane'.

N330 MOO (REVERSE PART / CHECK


Definitely not
actually happen a
e Example C: statement? The
lection of
N330 MOO possible, the
PART / CHECK TOOL) mensional
Fanuc systems
of a message or comment IS unit will
the machine operator of a words within same
every time the program rpClrn,>" groups have been the section dealing with the
such message ~nr\P<~lrc ;omnlents preparatory commands - G codes, in Chapter 8.
understanding the at a
for documenting the program. If the computer system two or more words that be-
long to the same group, it will not return an error
11:.'.:>~.al::.\;;':>
and comments relate (0 it will automatically the last word of the group. In
changes, chip removal from a hole, dimen- the example of conflicting dimensional selection, it will
cutting tool condition check and others. the preparatory G21 - of metric
or a comment block should be only if sions - thal becomes That not the se-
1'P-1T11,,"'n task is not clear from the program lection required. than
to what happens in each block. 1Vle~ssages sive luck,
comments should be brief and focused, as a program
memory in the CNC memory.
the example illustrating and metric
perspective, a tion, the preparatory command G was used. What would
nrrn,u'PrI at the happen if, for example. the address X was used? Consider
drawing information following example:
This subject has
7 - here is just a reminder: N120 GOl X11.774 X10.994 Y7.0S0 F1S.O

01001 (SHAFT DWG B451) are two X addresses in the same control
(SHAFT TOOLING - OP 1 - 3 J1U'J CHUCK) will not accept the second X value. but it will
an alarm (error). Why? Because there is a difference
(TOl - ROUGH TOOL - 1/32R - 80 DEG) "''''.',,,''',>,.. the programming rules for a G as such and
(T02 - FINISH TOOL 1/32R - 55 DEG) the coordinate system words. allow to
(T03 - OD GROOVING TOOL - 0.125 WIDE)
as many G codes in the same block as provid-
(T04 - OD THREADING TOOL - 60 DEG)
are not in conflict with each other. But the same
"""",11"1'\1 system will not allow to program more one co-
Nl G20 G99
N2 ••• ward of the same address for block.
rules may also apply. For example, the words io
CNC unit is limited, a block may programmed in any providing the N
usi ng comment aa(lre~;S is the first one listed. For example, following
cal. It will block is (but very nontraditional in its
listed in proper
required details. Nj40 Z-O.75 Yll.56 Fl0.0 x6.S45 GOl
SEQUENCE 67

practices, be sure to answer may be surprising - in both cases, the f'("\",lfV'Il


block in a logical order. the 1and J values and will only the
word and is usually fol- R. order of address definition is irrelevant in
axes in their alphabetical or- case. The address R has a higher control
axes or modifiers (1.., L, K..), ity I and J addresses, if programmed in same
miscellaneous [unctions words. and the feedrate word block. All examples assume that the conlrol
as the last item. Select only those words needed for the indI- ports R radius input.
vidual block:

N340 GOl X6.84S Yl1.S6 Z-O.7S F10.O


MODAL PROGRAMMING VALUES
Two other possibilities that may require a special at- are modal. The word modal is
tention in programming how word 'mode' and means that the com-
the following block be in this mode after it has been used in the
once. It can be canceled by another modal com-
N150 GOl G90 X5.5 G9l Yi.7 F12.0 mand of the same group. Without this feature, a
using interpolation in absolute mode with a
There is an the absolute and in- of J 8.0 in/min, would contain the absolute command
modes. Most Fanuc controls wi I] process this the linear molion command GO I and the F 18.0 in
exactly the way it is written. X axis target posi- every block. With modal values, the programming out-
tion will be reached in absolute but the Y axis will put is much Virtually all controls accept modal
be an incremental distance, from (he current po- commands. two examples illustrate the
sition of the cutter. It may not approach, but it ferences:
offers advantages in some cases. - the sequence
block following the block N ]50 will in the incremental e Example A without modal values:
mode, since G91 is specified command!
Nl2 G90 GOl Xl 5 Y3.4 FIB.O
The other programming Nl3 G90 Gal XS.O Y3.4 F18.0
block programmed in the N14 G90 GOl XS.O YO.S F1B.O
dealing with this subject NlS G90 G01 Xl.S Y6.5 F18.0
that an arc or a circle can Nl6 G90 GOl Xl.S Y3.4 F18.0
modifiers I, J and K (depending or a turn- Nl7 G90 GOO Xl.S Y3.4 Zl.O
that a direct ra-
control system is used). It also
input, using the address R, can Both of the e Example B - with modal values:
following examples are correct, in a 90° arc with a
Nl2 G90 GOl Xl.S Y3.4 F18.0
1.5 radius: Nl3 XS.O
e With I and J arc modifiers: N14 YO.S
Nl5 X1.5
Nl6 Y3.4
N21 GOl XlS.3S Yll.348 Nl7 GOO Zl. 0
N22 G02 XlS.as Y12.848 11.5 JO
N23 GOl ... Both examples will identical result.. , Compare
each block of the corresponding block
e With the direct radius R address: of the B the modal commands are
not to ..... ,..,"'""'11"/1 in the CNC program. In fact,
N2l GOl X1S.35 Yll.348
N22 G02 Xl6.85 Y12.848 Rl.5
in everyday programming, program commands used
N23 GOl are modal. The exceptions are program Instructions,
whose functionality starts and in (he same block (for
example dwell, machine zero certain machining in-
structions, such as tool table. etc.). The M
functions behave in a example, if the
program contains a machine zero return two consecutive
N22 G02 Xlo.85 Y12.848 11.5 JO Rl.S blocks (usually for safety it look like this:

or N83 G2B Zl.O M09


N84 G28 XS.37S Y4.0 MOS
N22 G02 Xl6.85 Y12.848 Rl.5 11.5 JO
G28 cannot be removed from N84, because the
command is not repeated.
68 Chapter 10

EXECUTION PRIORITY Functions (hat will be executed simultaneously with the


cutting tool motion:
There are special cases, mentioned earlier, where the or- M03 M04 M07 MOS
der of commands in the block determines the priority in
which the commands are executed. To complete the subject Functions that will be executed after the cutting tool mo-
of a block, let's look at another situation. tion has been completed:
Here are two unrelated blocks used as examples: MOO MOl MOS M09 M98
N410 GOO X22.0 Y34.6 S8S0 M03 Be careful here - if in doubt, program it safe. Some mis-
cellaneous functions require an additional condition, such
and
as another command or function to be active For example,
M03 and M04 will only work if the spindle function S is in
NS60 GOO ZS.O MOS
effect (spindle is rotating). Other miscellaneous functions
In the block N4J 0, the rapid motion is programmed to- should be programmed in separate blocks, many of them
gether with two spindle commands. What will actually for logical or safety reasons:
happen during the program execution? It is very important
to know when Ihe spindle will be activated in relationship
to the cutting tool motion. On Fanuc and many other con-
Functions indicating the eod of a program or a sub-
trols, the spindle function will take effect simultaneously
program (M02, M30, M99) should stand on their own and
with the tool motion.
not combined with other commands in the same block, ex-
In the block N560, a Z axis tool motion is programmed cept in special cases. Functions relating to a mechanical ac-
(ZS.O), this lime together with the spindle stop function tivity of the machine tool (M06, M 10, Mil, MI9. M60)
(M05). Here. the result will be different. The spindle will should be programmed without any motion in effect., for
be stopped only when the motion is one hundred percent safety. 1n the case of M 19 (spindle orientation), the spindle
completed. Chapter 9 covering Miscellaneous Func/ions rotation must be stopped first, otherwise machine may get
explains this subject. damaged. Not all M functions are lisled in the examples,
but they should provide a good understanding of how they
Similar situations exist with a number of miscellaneeus may work, when programmed together with a motion. The
functions (M codes), and any programmer should find out chapter describing the miscellaneous functions also covers
exactly how a particular machine and control system han- lhe duration of typical functions within a program block.
dle a motion combined with an M function address in the
same block. Here is a refresher in the form of a list of the It never hurts to play it safe and always program these
most common results: possible troublemakers in a sequence block containing no
tool motion. For the mechanical functions, make sure the
program is structured in such a way that it provides safe
working conditions - these funClions are oriented mainly
towards the machine setup.
INPUT OF DIMENSIONS

Addresses in a CNC program that relate to the tool posi- During the program development, it is imperative to con-
tion at a given moment are called the coordinate words. Co- sider the impact of default conditions of the control system
ordinate words always take a dimensional value, using the on program execution. The default conditions come into ef-
currently selected units, English or metric. Typical coordi- fect the moment the CNC machine tool has been turned on.
nate words are X ,Y, Z, L J, K, R, etc. They are the basis of Once a command is issued in the MDI mode or in a pro-
all dimensions in CNC programs. Tens, hundreds, even gram, the default value may be overwritten and will remain
thousands of values may have to be calculated to make the changed from that point on. The dimensional unit selection
program do what it is intended to do - to accurately ma- in the CNC program will change the default value (that is
chine a complete part. the internal control setting). In other words, if the English
unit selection is made, the control system will remain in
The dimensions in a program assume two attributes: that mode until a metric selection command is entered.
o Dimensional units ... English Dr Metric That can be done either through the MOl mode, a program
block, or a system parameter. This applies even for situa-
D Dimensional references ... Absolute or Incremental tions when the power has been turned offand then on again!
The units of dimensions in a program can be of two kinds To select a specific dimensional input, regardless of the
- metric or English. The reference of dimensions can be ei- default conditions, a preparatory a command is required at
ther absolute or incremental. the beginning of the CNC program:
Fractional values, for example 1/8, are not allowed in a
CNC program. In the metric format, millimeters and mefers G20 Selects English units (inches and feet)
are used as units, in the English format it is incites andfeet
that are used as units. Regardless of the format selected, the G21 Selects metric units (millimeters and meters)
number of decimal places can be controlled, the suppres-
sion of leading and trailing zeros can be set and the decimal
point can be programed or omitted, as applicable 10 a par- Without specifying the preparatory command in the pro-
ticular CNC system. gram, control system will default to the status of current pa-
rameter setting. Both preparatory command selections are
modal. which means the selected a code remains active
ENGLISH AND METRIC UNITS until [he opposite G code is programmed - so the meuic
s~stem is active until the English system replaces it and
Drawing dimensions can be used in the program in either vIce versa.
English or metric units. This handbook uses the combined
examples of both the English system, common in the USA, This reality may suggest a certain freedom of switching
to some extent in Canada and one or two other clluntries. between the two units anywhere in the program, almost at
The metric system is common in Europe, Japan and the rest random and indiscriminately. This is not true. All controls,
of the world. With the economy reaching global markets, it including Fanuc, are based on the metric system, partially
is imponant to understand both systems. The use of metric because of the Japanese influence, but mainly because the
system is on the increase even in countries that still use the metric system is more accurate. Any 'switching' by the use
English units of measurement, mainly the United Slates. of the G20 or 021 command does not necessarily produce
any real conversion of one unit into the other, but merely
Machines that come equipped with Fanuc controls can be shifts the decimal point, not the actual digits. At best, only
programmed in either mode. The initial CNC system selec- some conversions take place, not all. For example, G20 or
tion (known as the default condition) is controlled by a pa- G21 selection will convert one measuring unit to another
rilmeter setting of the control system, but can be overridden on some - bul not all - offset screens.
by a preparatory command written in the part program. The
default condition is usually set by the machine tool The following two examples will illustrate the incorrect
manufacturers or disuibutors (sometimes even by the CNC result of changing G21 to G20 and 020 to 021 WIthin the
dealers) and is based on the engineering decisions of the same program. Read the comments for each block - you
manufacturer, as well as the demands of their customers. may find a few surprises:

69
70 Chapter 11

c::> Example 1 - from metric to units: • Comparable Unit Values


are many units available in the metric and
G21 IniTial wUt selection (metric) In CNC programming, only a very small
GOO X60. 0 X value ,,. arrPI,,)(p/J of them is used. The are based on a mil-
G20 Previous value will change into 6.0 incites application. The Eng-
(real translalion is 60 I'I1m 2.3622047 inches) depending on
for the different
c::> Example 2 - from English to units:
Millimeter mm
G20 1niJ.ial unit seleclion
GOO X6.0 X value Meter m
G21 Inch in
Foot ft
Both examples illustrate problem by
switching between the two dimensional units in the same Many programming terms use abbreviations.
program. For this reason, always use only one unit of next table shows the terms between the two
dimensioning in a If the program calls a mensional systems (older terms are in
subprogram, the rule to subprograms as well:
Metric English
mlmin (also MPM) ftlmin (also FPM or SFPM)

In it is unwise to even if the mm/min in/min (also IPM or fpm)


control system aTe n ..",';.",; selection of the
system will difference how some con- mm/rev in/rev {also IPR or ipr}
trol functions will work. following functions will mm/tooth (also IPT or ipt)
fecled by the change one system of units to the
kW HP
o Dimensional words (X, Y, Z axes, I, J, K modifiers, etc.)
o Constant Surface (eSS - for CNC lathes)
ABSOLUTE AND INCREMENTAL MODES
o Feedrate function F
o Offset values Hand 0 offsets for milling A dimension in either input units must have a rn",."h"-",
and tool preset a point of reference. example, if X3S.0 In

o Screen position number of rlol"i..,.,,,1 program and the units are millimeters, state-
ment does nol i where the dimension of mm has
o Manual pulse generator· the HANDLE (value of flllIll<;!II'lII1'l. needs more information to
a Some control system parameters correctly.

The initial selection dimensional units can There are two In

done by a system setting. The control status o Reference to a common point on the part
when the power turned on is the same as is was at ... known as the for ABSOLUTE input
the time of the power shut off If neither G20 nor I is
programmed, accepts the dimensional units se- o Reference to a point on the part
lecled by a .-.<;>'-""',1"1 ..:J"",,,H.,,,. If G20 or G21 is ""lI.lU\AJ ... known as the last tool position for INCREMENTAL input
the program, the command will always In the example, the dimension X35.0 (and any as
ority over system parameter "'.... LUIl;"'. well) can from a selected fixed point on the
mer makes - the control ""<:1"""'" part, called or program zero, or program
preting them, but it point - all terms have the same meaning.
Always the units setting in a ",,, ... ,,r,,t value can be measured from
fore any motion, offset selection, or the tool
nate system and G54 La G59). current position for the next
low this produce incorrect results. cannot distinguish one two
when frequently ng unils for different jobs. statement alone, so some
added to the program.
INPUT OF DIMENSIONS 71

All dimensions in a CNC program measured from the • Preparatory Commands 690 and G91
common poinl (origin) are absolute dimensions. as illus-
There are I wo preparatory commands available for the in-
trated in Figure JJ-J, and al I dimensions ina program mea-
put of dimensional values, G90 and G91. to distinguish be-
sured from the current position (last point) are incremental
tween two availabJe modes:
dimensions, as illustrated in Figure J /-2.
G90 Absolute mode of dimensioning
3
0 , I
G91 Incremental mode of dimensioning
2
0 - -
'4
---

0 Both commands are modal, lherefore they will cancel

cF~ 1r1_
each other. The control system uses an initial default setting
1
0 when powered on, which is usually the incremental mode.
This setling can be changed by a system parameter that pre-
sets the computer at the power startup or a reset. For indi-
,/I~ vidual CNC programs, the system setting can be controlled
/
/: • I
by including the proper preparatory command in the pro-
--- '
I gram, using either one of two available commands - the
ORIGIN,I
-
• G90 or G91.
Figure 71·1 It is a good programming practice to always inclurle the
Absolute dimensioning - measured from part origin required setting in lhe CNC program, not to count on any
G90 command will be used in the program default setting in the control system. It may come as a
surprise that the common default setting of the control sys-
tem is the incremental mode, rather than the absolute mode.
After all. absolute programming has a lot more advantages
than incremental programming and is far more popular. In
addition, even if the incremental programming is used
frequently, the program still starts up in the absolute mode.
The question is why the incremental default? The reason is
- as in many cases of defaults - the machining safety. Fol-
-- -01 low this reasoning:
,/L-______________________ __ _
~

Consider a typical start of a new program loaded into the


machine control unil. The control had just been turned on,
//~/ :J:. :_~:_:_ _ =I===:I==I==.! the part is safely mounted, the cutting tool is at the home
position, offsets are set and the program is ready to start.
:START AND END Such a program is mosllikely written in the more practical
absolute mode. Everything seems fine, except that the ab-
Figure 11-2
solute G90 command is missing in the program. WhaT will
Incremental dimensioning - measured from the current tool location happen at the machine? Think before an answer and think
G91 command will be used in the progrom
logically_
Absolute dimensions in the program represent When the first tool motion command is processed, the
the target locations of the cutting tool from origin chances are that the tool target values will be positive or
have small negative values. Because the dimensional input
Incremental dimensions in the program represent mode is missing in the program, the control system 'as-
the actual amount and direction of the cutting tool sumes'lhe mode as incremental, which is the default value
motion from the current location of the system parameter. The lool motion, generally in X
and Y axes only, will take place to either the overtravel
Since the dimensional address X in the example, written area, in the case of positive target values, or by a small
us X35.0, is programmed the same way for either point of amOlJnl, in the case of neg<1li ve target values. In either case,
reference, some additional means must be available \0 the the chances are that no damage will be done to the machine
programmer. Without them. the control system would use a or the part. Of course, there is no guarantee, so always pro-
default selling of a system parameter, not always reflecting gram with safety in mind.
the programmer's intentions. The selection of the dimen-
sioning mode is controlled by two modal G commands. G91 is the standard default mode for input of dimensions,
72 Chapter 11

• Absolute Data Input - G90 • Combinations in a Single Block


In the absolute programming mode, all are many Fanuc the absolute and incremental
measured from Ihe of origin. origin is the pro- modes can be combined in a single nrr'O'f':~rn
gram poinT also known as program zero. The ac- cial programming purposes. This
tual the is the di fference bet ween usual, but are significant benefits this advanced
current absolute position the tool and the previous abso- plication. Normally. the is in one mode only -
position. The [+] plus or H refer either in the absolute mode or incremental mode. On
to the quadrant of coordinates, nor direction controls, for to the opposite mode, the
motion. Positive does not have to written for any motion command must programmed in a block.
address. AI! z.ero values. such as XO. YO or ZO to Such controls, for do not to program an in-
the at program point, not to the cremental motion along one axis and an absolute motion
motion itself. The zero value of any axis must written along other axis in the same block.
Most do allow to program both
The preparatory command G90 absolute in the same All that needs to be done is to
mode remains modal until the command 091 specify the G90 or the G91 preparatory before
is programmed. the absolute there will no mo- the significant address.
tion for that is omitted in the program.
For lathe work, where G90 G91 are not
main advantage programming is tbe ease is between the X U axes and the Z and Waxes.
of modification by the programmer or CNC opera- The X and Z contain the absolute values. U Ware the
tor. A change of one dimension does not any other incremental values. Both types can be wriuen in the same
menslOns m program. block without a problem. Here are some typical examples
for both applications:
lathes with Fanuc controls, the common repre-
of the absolute is the axis as X C Milling example;
command. Some lathes
Fanuc controls. N68 GOl G90 X12.5031 G91 Y4.S111 Fle.S

• Incremental Data Input - G91 The milling shows a motion the cutter has
La reach the absolute position of 12.5037 inches and - at
programmmg, a the same rime - to move Y axis by
rPI,'7TH'P mode, all program dimensions are as de- 177 inches in the Note position
"'<:l,elln-", distances into a specified direction (equivalent to
commands G90 and G91 in the block - it is Im-
'on the control The actual mo- portant, but it may not work on all
tion of the is the speC! fied amount along
with the direction indicated as or negative. C Turning example:
signs + or - specify direction of the tool motion, not N60 GOl X13.S6 W-2.S FO.013
the quadrant of rectangular coordinates_ Plus for posi-
tive values does not have to be written, but sign must example a lathe shows a tool motion,
used. All zero input values, such as XO, YO or ZO mean where the cutting tool has to reach the diameter of 13.56
there will be no tool motion aiong that axis, and do not have inches and - at/he same time - to move 2.5 inches into
to written at all. If a zero axis value is programmed in in- the Z direction. by the neremer
mode, it will preparatory com- tal address W. or G91 is not nonnally
incremental is G91 and remains modal un- the Group A G codes is the most common
til the absolute is programmed. will be no one ~nd does not G code of dimen-
motion for any axis omitted in the block. sional mode selection.
The main advantage of programs is their is a switch the absolute
portability between individual of a An mode in a CNC program, me programmer
program can called at different locations of must be careful not to remain in the 'wrong' mode
the part, even in different programs. It is mostly when man The switch (he modes is Iy tem-
developing or repealing an equal distance. porary, for a specific It may one block or
several blocks. thatLhe original selling for (he pro-
For controlled CNC lathes, the common represen- Remember that both the absolute and
tation incremental is the axis designation as U .nf'rp,...,pnt,:; modes are modal- remaIn In un-
and W, without the G91 command. Some lathes use by the opposite
I, but not those with controls.
IN OF DIMENSIONS 73

DIAMETER PROGRAMMING MINIMUM MOTION INCREMENT


All dimensions along on a CNC lathe can be Minimum increment (also called the leas! increment) is
as This approach simplifies the smallest amount of an a.:ds movement the control sys-
programming and the program to read. lem is capable supporting. The minimum increment is
Normally, the defauh controls is the smallest amount thai can be programmed within the se-
ler programming. The system parameter can lected input. Depending on the dimensional
changed to interpret the X as a radius inpul: Ihe minimum increment is ex-
in millimeters system or in
GOO X4. 0 Dia.me/erdimellsioll , .. when sel 17)' {J {Ifl1'ffJl1l'lf'Y system.
GOO X2. 0 R(Jf/ilis ... when set by (j paroJlleler
Units system Minimum increment
value is rnrrpt·,
setting. The diameter is easier to Metric 0.001 mm
by both the programmer and operator,
use the diameter di for cylindrical .0001 inch
suring diameters at machine is common. cer-
lain caution - if the diameter programming is used, all tool
wear offsets for X must be treated as applicable to In the of minimum most com-
the diameter oJfhe not to il$ single (radius value). are O.OOl mm 0.0001 inches for met-
units respectively. a typical CNC
Another consideration, very impor- increment for the X axis is also 0.00 I mm or
Lant, is the the absolute or the incremental but is measured on the diameter - that means a
mode of dimensional input. The diameter programming, mm or .00005 inches minimum increment per
where the X represents the part IS machining is much more tlexjble
much more common in the absolute mode. In those cases. the metric than in the English
when an incremental is required. that all
incremental dimensions in the program must be speci-
fied per dial1letel; lIot radius. Minimum increment Converted equivalent
- .~

Inlhe mode, the intended X mOlion will 0.001 mm .00003947 inches


be programmed as U as a distance and ..
direction to on n .0001 inches 0.00254

For example, two sections of the following metric


programs are - note Ihal Ihey bOlh starr in the ab~
solute mode and only the diameters different:
the metric system J54% more accarale
Q Example 1 - Absolute diameters: system, which the English system
less accurale metric system,
GOO G42 X8S.0 Z2.0 T0404 MOS (ABSOLUTE START)
GOl Z-24.0 FO.3
X9S.0
FORMAT OF DIMENSIONAL INPUT
Z-40.0
X1l2.0 year of 1959 is considered to be the
Z-120.0 numerical Since that lime,
X116.0 that intluenced the nrr,ot":lm
......."'''''~'"' have taken
GOO .. format of dimensional
Q Example 2 - Incremental diameters: Even to this day, data can be in
one of the four possible ways:
GOO G42 X85.0 Z2.0 T0404 MOS (ABSOLUTE START)
GOl z-24.0 FO.3 Q Full address format
mo.o (X95.0)
o leading zeros suppression
Z-40.0
ill 7 . 0 (Xll.2 • 0) o zeros
Z-120.0
U4.0 (Xl16.0) o Decimal
GOO ..
74 Chapter 11

In to understand format Since leading zeros suppression and the trailing zeros
back some years may be beneficial. control suppression are mutually exclusive. which one be
(mainly the old NC systems as compared to the more mod- programmed for Without a decimal poim? As it
ern CNC were nOl able to accept the input depends on setting the control system or
of dimensions - the decimal point formal - but the (he designation of (he status by the control manufacturer,
accept all the earlier formats, the actual stnLuS must be known. status deter-
even decimal format is most common. The reason mines which zeros can suppressed. It may be the zeroes
iscompatjbility with lheexisting programs (old programs). allhe beginning or zeros allhe end of a dimension with-
decimal point programming method is latest of out a decimal poin!. In the extremely unlikely evenl the
available, systems thaI allow point system is with zero suppression feature
programming can also accept programs written many years as the only programming the decimal point will not
earlier (assumed that the control and machine tool are also be possible. illustrate results of zero suppression.
compatible). The reverse is nor true. earlier will be
is a very imponant issue, knowing how the Jr the English input .625 inches is to programmed in
interprets a number that 110 decimal poim is the leading zero suppression format applied to the X
for all motion commands and it will in the program as:

• fun Address format X6250

The full format of a dimensional The same dimension inches with the trailing ze-
notation of +44 in English met- rOssuppressed, will in Ihe as:
That means ali eight digits have to
len for the words X, y, Z, I. J, K, etc. For example, the X0000625
English of .625, applied to X axis, will
be written as: The metric units input of 0.42 mm, also applied 10 the
axis, is written with the lending zeros suppressed as:
X00006250
X420
dimension of 0.42 mm, when to
the X axis, written as: The same dimension of 0.42 mm with the zeros
suppressed will appear in the program a,,\:
X00000420
X0000042
full formal programming is applicable only to
early control un its, but is correct even today. pro- Although the examples above illustrate only one small
grammed was usually without the desig- ieation, the impression leading zero suppres-
nation, which is determined by position of the dimension is more practical than the trailing zero suppression is
within the block. For modern CNC programming. the full quite Many older control systems are indeed set
format is obsolete and is used here reference (rarily 10 the zero suppression as the default,
comparison. Yes, format will quite because its practicality. is the reason why - study it
modern programs, but don't used it as a standard. carefully, although today the subject is more trivial than
On other hand. if even one decimal point is
• Zero Suppression omitted (forgOlten) in the program, this knowledge beco-
mes very useful and subject is not trivial any more.
Zero suppression is a great improvement over
full programming It was <ldaptation of a new Preference for Leading Suppression
format that reduced the number of zeros in thedimensional
the dimensional input the
input Many controls still support the method of
7~ro suppression. but only for reasons of compatibility with
syslem can accept eight digits, withoUl a
decimal point, ranging from 00000001 to 99999999:
old and proven programs.
o Minimum: 0000.0001 inches or 00000.001 mm
Zero suppression means that either leading or
trailing zeros of maximum input do not o Maximum: 9999.9999 inches or 99999.999 mm
have [0 be written in the CNC The result is a great
reduction in program The default has is nol written. If the program uses zero
been done by the control manufacturer, although de- suppression either type, a comparison of input values
fault mode can be optionally set by a parameter. should be useful:
Don 'I allY WiThoul a reason!
INPUT OF DIMENSIONS 75

Input - inches the I can programmed with the X fo!lowed by


the of eight digits, always positive. If control
leading zeros Trailing zeros system the decimal point, there is no confusion. If
Decimal point the leading or the trailing zeros have to
suppression suppression
is very important
XO.OOOl Xl XOOOOOOOl
dwell
XO.OOl XIO XOOOOOOl

XO.Ol XIOO XODOOOl


a X0000050
XO.l X1000 00001
a No zeros X500
Xl. 0 XlODOO 0001 a No trailing zeros X000005
XOOl a Decimal point XO.5 or X.5
XOI Note thaI the format is the same
dwell as for the words. The programmed formal
XI0000000 Xl
will always adhere to the notation of the address.
dentally, in some dwell is expressed by the
leading zero suppression is much more common, be- P address, which a decimal point at all and
bencfits numbcrs with a small parI must be programmed the leading zero suppression
than a large integer part. mode in effect. will be equal to P500.
the metric input the resulls will
• Decimal Point Programming
Input value comparison - millimeters All modem will use the decimal point for
dimensional input the decimal point, par-
Leading zeros ticularly for program a fractional portion,
point
suppression makes the CNC program much to develop and to
read at a later date.
XOOOOOOOl
From all the available nT"""""'"",
XOOOOOOl
used. not all can be
XOOOOOl The ones that can arc those
millimeters or seconds
Xl-O XlOOO XOOOOl
The following two thedeci-
XIO.O XIOOOO XOOOl mal point is allowed in and tum-
controls:
XlOO.O XlOOOOO XOOl

XlOOO.O X1000000 XOl control programs:

XIOOOO.O XIOOOOOOO Xl X, Y, Z, I, J, K, A, R

time.
=> Turning control programs:
important for example, X, Z, U, W, I, K, R, C, F
programmer forgets to the
point or CNC operator forgets to punch it in? The control system that supports option of program-
- and common - errors that can be avoided ming the decimal point, can also dimensional values
good knowledge. without a decimal poin£, to allow with older
programs. In such cases, it is the
complete the section on zero suppression, let's look at principles of programming and
a program input that uses an axis letter but no/ as a the traiJing zeros. If they are used rrw'r",1'" ex-
nate word. A command will be to explain. planations). there will be no problem to the various
Chapter 24 covers the delails relating to the dwell dimensional formats to any other old or
gramming. use the basic format and one sec- new. If possible, program the as a standard
ond dwell The dwell formal is approach.
the dwelling This format tells us that
76 11

compatibility enables many users to load • Input Comparison


their old in format), into the new
Differences in the input format for both and
not the other way around usually with
metric dimensioning can be seen clearly. One more time,
or no modifications at all
the same examples will shown. as before:
Some units do not have the ability to
an paper tape they have no tape convert Q English input of .625 inches:
any tapes that contain good programs, there are two options Full format X00006250
- one, have someone to install a tape reader in if No leading zeros X6250
possible and (probably not). No trailing zeros X0000625
to store the contenls of a tape in the memory Decimal point XO.625 or X.625
computer.
much better Q Metric example input of 0.42 mm :
able software Full format X00000420
possible. No leading zeros X420
cializing in No trailing zeros X0000042
in the metric system assume 0.00 I Decimal point XO.42 or X.42
mm mInImUm while in the English the
increment is .000 I an inch (leading zero suppression CALCULATOR TYPE INPUT
mode is in effect as a default);
In some such as woodworking or
Y12 • 56 is Yl25 600 ..Jor English units (especially metric)
Y12.56 is Y12560 .. .jormefriculliis not require decimal only whole numbers. In these
cases, the decimal point would always be followed with a
without the decimal zero. Fanuc provides a solution to such situations by the
the same block: feature called calculator input. Using this feature can
shorten program size.
N230 X4.0 Y-10
calculator type input selling of a system
This may be beneficial extreme conservation of parameter. Once the parameter is the decimal point and
system memory. For X4.0 word WIll the trailing zeros do not to they will as-
H l r . . . ",,, -

fewer characters than the X40000 - on the other hand, example, will as X25.0, not
the Y-IO is shorter decimal poin! equivalent of the normally expected
y-o.OO I (both examples are in English units). If all
before or after the decimal are zeros, (hey do not In case the input value the decimal point, it
10 wriUen: can written as usually. means the values with a dec-
imal point will be interpreted correctly and numbers with-
xO.s ::: X.5 ou( decimal point will be treated as major units only
Y40.0 X40. or millimeters). Here are some
Z-O.l Z-.l
F12.0 ;:; F12. Standard Input Calculator Input

RO.125 ::: R.12S ... etc. X345.0 X345
Any zero value must be written - example, XO cannot XL 0 Xl
written as X only. In this all the program ex-
YO.67 YO.67
amples use the decimal point whenever possible.
Many programmers prefer to nrr"',"'!\rT\ zeros as in the left Z7.4B Z7.48
of the example. They
memory. but they are Normally, the control system is set to the
for learning. suppression mode and the non-decimal
preted as of the smallest units.
Z 1000 in I mode will be equivalent to .0
SPINDLE CONTROL

machines, machining centers On CNC lalhes, all three alternatives may


use spindle rotation when removing mate- on the control system. For the CNC mill'
I-'..... JJIUllII5
a rotation may be that of the cutting tool terns, peripheral spindle speed is not applicable,
or itself (lathes). In both cases, the. spindle speed code number and the direct spindle speed
spindle and the working feed rate of the are. spindle speed selection by special code number is
to be strictly controlled by the program. an obsolete concept, no! required on modern controls.
require instructions that relate to the
selection of a suitable speed of the machine spindle and a ndle speed designation S is not
a given job.
",,..,,,,.,,,,,,,,,,,,,,.rl by itself. In addition to the
additional
methods to control the spindle and cut- are attributes that control
ting they all depend mainly on the type of the if the spindle is
CNC the current machining application. In programming instruction is not
this chapter, we look at the spindle control ancl its program- spindle function stands by itself in
ming appl '('<lInn,,,,! not include all information {he control
for spindle data. A spindle speed
SPINDLE FUNCTION example, to 400 r/min or 400 mlmin or 400
on (he machining application), does not
information, namely,lhe spindle rota-
to spindle speed is con-
S. The program-
is usually within the range of Most can be rotated in two directions -
point is allowed: clockwise or counterclockwise, depending on the type and
setup of the cutting tool used. The spindle rolation has to be
51 10 59999 specified in in addition to the spindle speed
are two miscellaneous functions provided by
For many high machines is not unusuaJ to that controllhe direction of tile spindle-
have spindle available to five digits. in the range
of I to 99999, within S
DIRECTION OF SPINDLE ROTATION
51 to 599999
and left, up and down. clock-
and similar directional terms, is
/lIe relative to some known reference.
VLa'UUll as clockwise (CW), or as
some established and standard
this case a reference point of

The direction rotation is always relative to the


• Spindle Speed Input poim of view that IS ",;) ••:lUlI',. from the spindle side of the
machine. This part a that contains the spindle.
The address S relates to spindle function,
and is generally called headstock. Looking
and must always numeric value in
from the machine area the direction along
the CNC program. are alternatives as to what
spindle center line and towards establishes the cor-
the numeric value (input) of the function may be:
rect viewpoint for and CCW rotation of the
o Spindle speed code number .. old controls· obsolete spindle. For CNC CNC ma-
chining centers, is quite simple
o Direct spindle speed .. r/min to understand. are exactly the
o Peripheral spindle speed .. ftlmin or mlmin same, and will

77
78 Chapter 12

• Direction for Milling Although the descriptions CW and CCW in the iHustra-
It may be rather impractical to look down along the center tion appear to be opposite to the direction of arrows, they
line of the spindle, perpendicularly towards the part. The are correcL The reason is that there are two possible points
of View, and they are both using the spindle center line as
common standard view is from the operator's position, fac-
ing the front of a vertical machine. Based on this view, the {he viewing axis, Only one of the viewpoints matches the
terms clockwise and counterclockwise can be used accu- standard definition and is, therefore, correct. The definition
rately, as they relate to the spindle rotation - Figure 12-1. of spindle rotation for lathes is exactly the same as for ma-
chining centers.

To establish spindle rotation as CW and CCW,


look from the headstock towards the spindle face.
M03 M04
The first and proper method will establish the relative
viewpoint starting at the headstock area of the lathe. From
this position, looking towards the tailstock area, or into the
same general orea, the clockwise and counterclockwise di-
rections are established correctly.
The second method of viewing establishes the relative
viewpoint starting at the tailstock area, facing the chuck.
This is an incorrect view!
Compare the following two illustrations - Figure 12-3
shows the view from the headstock, Figure 12-4 shows the
R/H tool- CW R/H tool - CCW view from the tailstock and arrows must be reversed.

Figure 12-1
Direction of spindle rotation.
Front view of a vertical machining center is shown

• Direction for Turning


A comparable approach would seem logical for the CNC
lathes as welL After all, the operator also faces the front of a
machine, same as when facing a venical machining center.
Figure 12-2 shows a front view of a typical CNC lathe.
CW= M03 CCW= M04

Headstock Figure 12-3


Spindle rotation direction as viewp.d from the headstock

cw

ccw
y Tailstock

CW= M03 CCW= M04


Figure 12-2
Figure 12-4
Typical view of a slant bed two axis CNC larhe.
CWand CCW directions only appear to be reversed Spindle rotation direction as viewed from the taifstock
SPINDLE CONTROL 79

• Direction Specification second example B is technical1y correct, but logi-


If spindle rotation is clockwise, M03 function is used cally flawed. There is no benefit in splitting spindle
in the program - if the rotation is counterclockwise, M04 speed and spindle rotation into two blocks. This
function is used in the program. makes the program harder to interpret.

the spindle speed S in the program is dependent on e C - Milling application:


the spindle rotation function M03 or M04. their
ship in a CNC program is important N1 G20
N2 G17 G40 GBO
spindle speed S and spindle function N3 GOO G90 G54 X14.0 Y9.S M03 (ROTATiON SET)
M03 or M04 must always accepted by the control sys- N4 G43 Zl.O HOl (NO ROTATION)
N5 GOl ZO.l FSO.O S600 (ROTATION STARTS)
tem together. One without the other will not mean anything N6 ••.
to the control, particularly when the machine is switched
on. There are at leasllwo correct ways to program tbe spin- Again, the C example is not wrong, but it is not
dle and spindle rotation: tical either. There is no danger. if the machine pewer has
o If the spindle speed and rotation are programmed together been switched on just prior to running this program. On the
in the same block, the spindle speed and the spindle other hand, M03 will the spindle rotation, if an-
rotation will start simultaneously other program was processed earlier. This could create a
possibly dangerous situation, so foHow a simple rule:
o If the spindle speed and rotation are programmed in
separate blocks, the spindle will nat start rotating until both
the speed and rotation commands have been processed

• Spindle Startup
e Example 0 - Turning application with GSO :
The following examples demonstrate a number of correct
starts for the spindle speed and rotation 10 N1 G20
All examples assume that is no active setting of N2 GSO X13.625 Z4.0 T0100
spindle speed either through a previous program or N3 G96 S420 M03 (SPEED SET - ROTATION STARTS)
N4 •.•
through the Manual DaJa Input (MDI). On machines,
there is no or default speed when the ma- This is the preferred example for lathes, if the
chine power turned on.
G50 setting method is used. Because spindle is
se~ as CSS - Constant Surface Speed, the control system
<:> Example A - Milling application:
WIll calculate the actual revolutions per minute (r/min)

m G20 based on the CSS value of 420 (ftlmin) and current part
N'2 G17 G40 GSO at XI The next example E is correct but not
NJ G90 GOO G54 X14.0 Y9.S recommended caution box above).
N4 G43 Zl. 0 Hal S600 M03 (SPEE.'O WITH ....".·A·'·'
N5 ••• e Example E Turning application with G50 .

This example is one the preferred for milling N1 G20


applications. Both the spindle speed and spindle rotation N2 GSO X13.62S Z4.0 TOlOO M03 (ROTATION SET)
are set with the Z axis mOlion towards the Equally N3 GOO X6.0 ZO.l (NO ROTATION)
popular method is to start the spindle with the motion- N4 G96 GOl ZO FO.04 T010l S420 (ROTAT. STARTS)
NS ...
in the example:

Nl G90 GOO GS4 X14.0 Y9.S S600 M03


Q Example F - Turning application without G50 :
N1 G20 T0100
Selection is a matter of personal preference. 020 in a N2 G96 5420 M03 (SPEED SET - ROTATION
separate block in not necessary for Panuc controls. N3 GOO •••
e Example B - Milling application: In more contemporary example (GSO is not used as a
position command anymore), the machine spindle
N1 G20
speed will be calculated for a tool offset stored in the
N'2 Gl' G40 GSO
N3 G90 GOO G54 Xl4. 0 Y9. 5 S600 (SPEED ONLY) Work Geometry Offsel register of the control system.
N4 G43 Zl.O HO 1 MO) (ROTATION STARTS) system will perform the ca1culation of actual r/min when
N5 ... the block N2 is
80 Chapter 12

These examples are only correct methods for method may result in a slightly longer
a spindle start. All contain rotation at the begin- but it will easier to read and maintain it, mainly
ning of a program milling and turning ap- with limited experience.
plications. The beginning of a program has
been selected intentionally, IJ"'-''"'''''''-' for any first tool in the can be asa
program. there is no active or rotation in effect (nor-
mally carried on from a tool). However, the con-
Nl.20 MaS
trol unit may still store and rotation from the
last tool of the previous
block containing the tool motion, such as
Any toolfollowing
programmed speed "'-:I<::L"'"
Nl.20 Z1.0 M05
tool. If onJy the 31..1'11"":''-'
for the next tool,
The motion will always be completed first, then the spin-
assume the last rotation direction. If only the
direction code M03 or M04 is programmed, the dle will be This is a safety feature built inlo
speed S will the same as the previous tool. control remember to program M03 or
.,.n .... rlll", rotation,
Be careful if a program program stop func-
tions MOO Or MOl, or the function M05. Any SPINDLE ORIENTATION
one of them will automatically stop the spindle. It means to
be absolutely sure as to when rotation will take
place and what it will be. spindle The last M relates to a spindle activity,
speed selection and its rotation the same block and for is M 19, is most commonly used to set a ma-
tool. Both functions are connected and plac- chine spindle an position. Other M codes may
ing within a sing1e block w i l l ' and be valid, on the control system. for example
logical program structure. M20 on same spindle orientation function is
a very specialized seldom appearing in the pro-
gram itself. MI9 function is used, it is mainly during
SPINDLE STOP setup, in the Manual Data Input mode (MDI). This func-
tion is exclusive to milling systems, because only spe-
NormaHy, most work requires a cially eqllipped may require it. The function
speed. In some cases, a can only be used when spindle is stationary, usually
desirable. For example, before ter the spindle When the control system exe-
change or reverse a part in the middle a program, the cutes the M 19 function, the following action will
spindle must be stopped first. The spindle must also be
The spindle will tum in both
during a tapping operation and at of pro-
Some miscellaneous functions will stop the spindle clockwise and a short period.
rotation automaticaHy (for example, the functions MOO, the internal activated. In some
MOl, M02 and M30). Spindle rotation will cases, the is audible. The spindle
during certain fixed cycles. will be locked in a and rotating it by hand,
will not be exact locking position is deter-
the spindle stop should always
by the machine tool indicated by the
Counting on other functions to
programming practice. is a setting angle - Figure
in programming, to slop the
spindle rotation. use function MOS.
the clockwise or the counterclockwise
V\(l,lIV'1. Because M05 does not do anything

(unlike other functions that also stop the spindle, such as


MOO, MOl, M02, M30 and others), it is used for situations,
must be stopped without
other programmed activities. Some typical
in tapping. tool motion to the . ".".,AlI."
tion, turret position, or after machine zero
depending on the application. Using one of the
cellaneous functions that automatically stop Figure 12-5
the is not required. On tile Spindle orientation angle is defined bV the ma,~fll'I'"
......t,nT<;Ifn exactly what is required, in a particular manufacturer and cannot be changed
SPINDLE CONTROL 81

In CNC machine lool operation, the MI9 function en- SPINDLE SPEED - R/MIN
ables machine to place a tool into the
manually and guarantees a proper 1001 holder orientation.
Later chapters will provide more about Ofl- programming CNC machining centers, designate
and applications, example. in point the spindle directly in revolutions per minute (rlmin).
boring A basic that contains spindle speed 200 rlmin, for
require this enu-y:

N230 S200 M03

format is typical to milling controls, nO pe-


CNC centers (oat all) use tool holders ripheral speed is used. There is no need to use ~ sp~i~l pre-
that can be placed into magazine only one way. To paratory command to the rlmin setllng. It IS the
~chieve this goal, the 1001 holder has a special notch control default. The r/min value must a mInimUm
built-in, matches internal of the spindle - crement of one. or values are not al-
Figure In order to find the the holder that has lowed the r/min must always within the range of any
the there is a small dimple on notch side. de-
is intentional.
A few machining centers may be equipped with the op-
tion of a spindle selection - direct r/min a
peripheral speed. In this case, as as for all
gramming, a proper preparatory command is used to.
guish which is active. is used penpheral
speeds, G97 direct of r/min. The distinc-
tion between them is discussed next.

SPINDLE SPEED - SURFACE


Programmed spindle speed should be based on the ma-
chined material and the cutting tool diameter (machining
centers), or part diameter (lathes). rule is
that the larger the the slower the spindle r/min
must Spindle speed should never guessed - it
always be calculated. a calculation will
the spindle is directly proportional to the pro-
grammed An incorrect spindle speed will have a
Figure 12-6 negative on both the tool and the
Built-in notch in 8 tool holder used for correct tool
orientation in the spindle - not a/l machines this feature • Material Machinability

tools with flutes (cutting edges), as


spindle speed, each material a sug-
machinability rating for a tool material. This
drills, end mills, reamers, face mills, etc., the orientation of
is either a percentage of some common material,
cutting edge to the spindle is not
such as mild , or a direct rating in terms periph-
that important. However, . point . such a~ eral or sUiface speed. Surface speed is specified in
ing bars, orienlation of cuttmg edge dunng setup lS ex-
feet per minute (ftlmin) in units, in meters
tremely important, when fixed
minute (nt/min) in system.
are used. The two cycles that use the built-in
for jtlmin is FPM, meaning Feet Per Minute. The
orientation, G76 G87, the retracts from ma-
amounts of speeds indicate level of machining
hole without rotating. In to prevent damage to
difficulty with a given tool material. The (he surface
the finished the tool retraction must controlled.
speed, the more difficult it is LO machine the material.
Spindle orientation guarantees that the tool will shift away
from the finished bore into a clear direction. An accurate Note the on the words 'given fool material'. To
setup is ne1ces,sary comparisons meaningful fair, they must be
with the same type of cutting tool, for
Those machines tool holder the
speeds for high speed tools will much
spindle either way still proper setting tools that
lower then for cobalt tools and. course, for
shift when or G87 cycles are programmeu.
carbide tools_
Chapter 12

on the surface speed (he cutler diameter (or


part diameter for lathes), machine spindle speed can be cal-
culated in revolutions per one mathematical
for English units another when
are programmed.
Itir where ...

r/min = Spindle speed in revolutions per minute


1000 = Multiplying - meters to mm
m/min = Peripheral in mlmin
1t = Constant3.1415927
o = Dia.meter in mm (cutter diameter
or part diameter for

• Spindle Speed - English Units


speed is 30 mlmin the cutting tool
To calculate the spindle peripheral
meter is 15 mm:
the material type must
as well as the tool or the part:
= (1000 x 30) I .1415 x 15)
= 636.6
= 637 r/min

A version of the is an acceptable allema-


tive and almost as accurate as formula:
n",,'I"'(''''

Itir where ...

rim in Spindle speed in revolutions


12 Multiplying factor - feetto
ft/min Peripheral speed in
1t ::: Constant 3.1415927 Again, by replacing the constant 31 with constant 320
D Diameter in inches (cutter for milling, (or even 300), the r/min will somewhat inaccurate, but
or part diameter for turning) most within an acceptable

CONSTANT SURFACE
Peripheral for the selected is 150 fUmin,
and the cutting tool diameter is I
lathes, the machining is different
from process. The turning tool has no diameter
::: (12 x 150) / (3.1415 x L 75)
327.4 and the diameter of a boring bar has no to the
327 r/m.in spindle It is the part diameter that is
used for calculations. As the
Many applications can use a machined, changes constantly.
mula, without losing any significant accuracy: during a cut or during roughing operations
eterchanges in Figure 12-7.
3.82 x ft I min the spindle is not practical -
r I min = of the many should be selected to
D r/min? The is to use the sUrface
the lathe
ILl."" .. " . the 3.82 constant may
To select a is only a half of the
as an easier calculation a
The other half is to communicate this selection to
units must be applied "'Y'r,nG>rl
trol system. The has to be set to the surface
not be correct.
mode, not the rlmin Operations IlS drilling,
tapping, etc., are common on a lathe and
direct r/min in the distinguish between
the choice of
• Spindle Speed - Metric Units face speed or per minute must be
When metric is in the program, This is done with preparatory commands G96 and
previous formula is same, but units are prior 10 the spindJe function:
SPINDLE CONTROL 83

G96 S •• M03 Swface speed selected o Example 1 :


G97 S •• M03
""rl-""c> speed is set right after coordinate setting,
GSO (or command:
milling. this distinction normally does not and
spindle speed in rlmin is always assumed. N1 G20
~ GSO X16.0 ZS.O T0100
By the G96 for N3 G96 MOO MOl
turning boring, the control enters a special
known as the ConstaJlt Surface Speed or CSs. In this
the spindle revolutions will and In this quite common application, the actual spindle
automatically, depending on diameter cut (cur- speed will be on the current diameter of 16 inches,
rent diameter). automatic Constant Surface Speed is In r/min in block In some cases, this will
built in systems for most CNC lathes. be too low. Consider another example:
It is a feature that not only saves programming time, it
allows tool to remove constant amount of material at all o 2:
cutting too) excessive wear
"".-/''''"'''' finish. On large CNC lathes, GSO of the X diameter
is quite large, 024.0 the previous example,
a typical example, a facing cut target diameter the next tool motion was nat impor-
starts at (06.2), and faces the part to the centerline (or tant, but in case it is. example:
slightly below). G96 was used program.
6000 was the spindle of the N1 G20
N2 GSO X24.0 ZS.O T0100
N3 G96 S400 M03
ftlmin N4 GOO X20.0 TOIOl MOB
06.20 231 r/min
8375
-""'-- 06.00 :::; 239 r/min 6000 r/min In the 2, the 1001 position is at X24.0
:::: 260 r/min max. spindle the tool motion terminates at X20.0, both values are
05.00:: 286 r/min speed ters_ translates to an actual motion of only
,~,- 04.50:: 318 r/min
the X24.0, the spindle will rotate at 64 r/min, at X20.0 it
,,'~- 04.00 :::; rIm in will rolate at 76 r/min. The difference is very to war-
:::; 409 r/min rant any programming. [t is different, however, if
- 03.00:::; 477 r/min the starting position is at a diameter, a tool moves
- - - 02.50 :::; 573 r/min to a much smaller diameter.
02.00 :::: r/min
01.50 :::; r/min o Example
01.00:: 1432 r/min
- ' ' ' - 00.50 2865 ,!min From initial position of 024.0 . the tool will
00.25 := 5730 r/min move to a small of 2.0 .
~ 00.00 ::::; 6000 r/min :: spindle max.
N1 G20
Figure 12-7 N2 GSO X24.0 ZS.O TOIOO
i-IfR1Tlnlll at a cut using constant surface speed mode 696 N3 G96 S400 M03
N4 GOO X2.0 TOlOl MOB
Althougb only selected diameters are shown in the illus-
tration, along with their revolutions per
Spindle speed at the start of program (block N3) will
ute, the updating is constant. Note the sharp in-
the same as in previous example, at 64 r/min. In the next
crease in r/min as tool moves to machine center
block (N4), the calculated for inch will 764
When the reaches XO (00.0), the speed will be at
rfmin, automatically calculated by the control. This rather
its maximum, within the current gear As this speed
large in spindle speeds may have an effect
may be too high in some cases, the control system allows
on some What may happen is that cutting
setting of a maximum, described
tool will reach the 02,0 inch before the spindle speed fully
a speed a lathe, are to the 764 rfmin. tool may start re-
options. In following examples, most moving material at a speed much slower than intended. In
important ones will be examined. The gear func- order La correct the problem, the CNC program to be
tions are omitted for all examples. modified:
84 12

e Example 3b : Whenever the mode is active


reaches spindle center at XO) the result will LLY"''''...........
The modification in block N3.lnstead be the highest spindle possible, within the
gramminga speed mode, program gear range. It is but that is exactly what will
rect rlmin for the inches, based on 400 happen. Such when the part is weD
surface speed. The to calculated first, mounted, does not chuck or fIXture lOO
setting will be .... ,..("~'ml1nprl a subsequent out, the tool is strong and so on. When
is mounted in a special or an eccentric setup is
N1 G20 the part has a long or when some other ad-
N2 G50 X24.0 Z5.0 TOIOO verse conditions are present, maximum spindle at
N3 G97 S764 M03
N4 GOO X2. 0 TOIOl MOe
center line may be too high for operating safety.
N5 G96 S400 is a simple solution to this problem, using a
E>"_'~L~O feature available and other ""_"rA'~
mode can be highest limit,
the example, at the 024.0 (X24.0 in N2), the actual
would be only 64 r/:min. the 02.0 (Xl.O in N4),
mrevolutions per program function
.. _,,~.,~~ spindle setting is normally G50.
will be 764. The tool may reach X2.0 po- ma:u.mlUI11 setting is called maximum spin-
before the spindle speed accelerated to full 764 clamping. Do not this G50 with its other
if it is not calculated and programmed earlier. position register is an example:
CNe lathe does not
modern lathes have a 01201 (SPINDLE SPEED c::t.AWP)
to wait before ac-
Nt G20 TOIOO
N2 G50 X9.0 Z5.0 S1500 (1500 R/MIN MAX)
until the spindle fully accelerated. N3 M42 SPINDLE RANGE)
N4 G96 8400 M03 AND 400 Fl' /MIN)
Modern CNC lathes today do not use the G50 setting and NS GOO G41 X5. 5 ZO TOIOl MOB
use the Geometry Offset setting In this case, the ac- N6 GOl X-O. 07 Fa. 012 ,~._. CENTER L.I.NE)
tual diameter at machine zero position is normally N7 GOO ZO.1
not known. Some experience can this case, N8 G40 X9.0 Z5.0 TOIOO
program a short dwell the actual cutting. N9 M01

• Maximum Spindle Speed :t8t[lng What actually happens in program 0120 I? Block N 1 se-
.......0 ....' ... units of measurement. critical block N2
CNC lathe operates Constant Suiface
the spindle speed is to the cur-
diameter. The smaller diameter is, the o only the tool coordinate position, as in:
spindle speed will be. natural question is
GSa X9. 0 ZS. 0
- what happen if the tool diameter is It may seem
impossible to ever program a zero but there are at o Also sets the maximum to as
least two cases when that is the case.
GSa X9.0 ZS.O 81500
the first case, zero diameter i~ t'lT'l'1,~,ml'1nl"l1
ter line All drilling, center
similar are programmed at
(XO). are always n"'(,'C1T~ITT1Tnf"n
using 097 con:uru:ma. a
is controlled directly, not change. During motion, tool nose
ant function are activated. The spindle
case of a zero diameter is when facing off a
"'..."'."4.....
be a formula described
solid part all the; way to the center is a different ter~ N6 is the actual cut.
situation. all operations at XO, the diameter 0.012 inlrev, the tool tip
does not because a direct r/min is proi gramnle<1 reality, the end point is
During a cutting operation., the aIa1meter V'lX<U1.5"'" spindle center line. The
the material removal continues must be taken into consideration programming
center line. No, with the tool nose offset and to the machine center
eX~Ha.:ullea .......... ,,....... Any calculation
line. A later explains what will hap-
zero, will result in
~ at the center line tIl
pen during
. .'".....,. . . . ~ to Figure 12-7 for H'W'UU""~'"
SPINDLE CONTROL

Block N7 moves the tool tip .J 00 inches away from the N1S GSO XS.S Z2.5 Single meaning
face, at a rapid rate. ]n the remaining two blocks, the tool
will rapid to the indexing position with a cancellation of ra-
N40 GSO Z4.75 S700 Double meaning
dius offset in N8 and an optional program stop is provided
in block N9. From lhese examples. G50 command should be easy to
Now, think of what happens in blocks N5 and N6. The understand. There are two, completely independent, mean-
spindle will rotate at the speed of 278 rlmin at the 05.5. ~ngs?f the G50 command. Either one can be programmed
In a StOgIe block, or they can be separated into two individ-
Since the CSS mode is in effect, as the tool tip faces off the
part. the diameter is becoming smaller and smaller while ual blocks.
the r/min is constantly increasinJr ~f the CNC lathe supports G92 instead of G50, keep in
Wirhout the maximum spindle speed limit in block N2, mmd that they have exactly the same meaning and purpose.
the spindle speed at the center line will be equivalent \0 the On lathes, the G50 command is more common than the
maximum rlmin available within M42 gear range. A typical G92 command but programming method is the same.
speed may be 3500 rlmin or higher.
• Part Diameter Calculation in CSS
With the preset maximum spindle speed limit of 1500
rlmin (GSa S 15(0), the spindle will be constantly increas- Often, knowing at what diameter the spindle will actually
ing its speed, but only until it reaches the 1500 preset rlmin, be c1~mped can be a useful information. Such knowledge
then it will remain at that speed for the rest of cut. may mfluence the preset value of spindle speed clamp. To
find oul at what diameter the Constant Surface Speed will
At the control, CNC operator can easi Iy change the maxi- remain fixed, the formula that finds the r/min at a given dia-
mum limit value, to reflect true setup conditions or to opti- meter must be reversed:
mize the cutting values.
12 x ft I min
Spindle speed is preset (or clamped) to the maximum D =
Y/min setting, by programming the S [unclion together wilh 11 x r I min
the GSO preparatory command. If the S function is in a
block not containing GSa, the control will interpret it as a
new spindle speed (eSS or r/min), active from that block I@" where ...
on. This error nwy be very costly!
o = Diameter where CSS stops (in inches)
Use caution when presetting maximum r/min of the spindle!
12 = Multiplying factor - feet to inches
ftlmin = Active surface speed
1t = Constant 3.1415927
The maximum spindle speed can be clamped in a sepa- r/min = Preset maximum spindle speed
rate block or in a block that also includes the current tool
coordinate setting. In the example 0120 I, block N2 con- o Example - English units:
tains both settings. Typically. the combined setting is useful
at the beginning of a tool, the separate block selling is use-
If the preset value in the program is GSO S 1000 and the
surface speed is selected as G96 S350. the CSS will be
ful if the need arises to change the maximum spindle speed
clamped when it reaches the 01.3369 inches:
in the middle of a tool, for instance, between facing and
turning cuts using the same tool.
D :: (12 x 350) / (n x 1000).
To program the GSa command as a separate block, any- 1.3369015
where in the program, just issue the preparatory command 01. 3369
combined with the spindle speed preset value. Such a block
will have no effect whatsoever on any active coordinate set- The formula may be shortened:
ting, it represents just another meaning of GSa command.
The following examples are all correct applications of G50 3.82 x ft I min
command for both, the coordinate setting and/or the maxi- D ==
r I min
mum spindle speed preset:

N12 GSO X20. 0 Z3. 0 SlSOO Double mealling For completeness, the formulas based on the English sys-
tem, can be adapted to a metric environment:
N38 GSO S1250 SillglemeaniJlg
D ::= 1000 x m I min
1t x r I min
86 12

I1iilf' where ... If these requirements are met, the most important source
data is spindle speed actually used during machining.
D = Diameter stops (in optinrum spindle speed is known, the cutting
1000 = Muftiplying - meters to mm (eSS) can be calculated and used any other tool
mlmin = Ac:t:ive surface speed requirements are met
1t = 3.1415927
r/min :::: maximum spindle speed In a nutshe14 the whole subject can be quickly
up by categorizing it as a - that of Constant
Just the English version, you may shorten met- Suiface Speed, also as the Cuting Speed (CS), when
ric formula as well: tool or part diameter the spindle are known.
there on, it is a simple matter of IV1..111UllQ.

- Metric ft I min =
the preset value in the program is S1200 and the
surface speed is selected as G96 S165, the ess will be
damped when it reaches the mm
e EXAMPLE:
drill works very at 756 IS
D = (1000 x 165) / (1t x 1200) speed in ftlmin?
:::: 43.767609
:::: 043.768 nm : (3.14 x 0.625 x 756) / 12 : 123.64

• CSS Calculation
The Constant Suiface (CSS) is required most
tunung and boring on a CNe lathe. It is also the
cutlnng data, from spindle speed
is calculated for all machining center operations.
Now - consider a very common scenario - the CNe
tor has the current conditions, J.U....'! ..."'W.1J:l; C EXAMPLE:
the speed., so they are favorable. Can
COlllQl1nOIlS be applied to subsequent jobs? well at 1850 -what
is
they can - ........'VlF' .." that certain requirements
will be satisfied: m/min = (3.14 x 7 x 1850) / 1000 = 40.66
Q Machine part setup are equivalent
Q tools are equivalent DeD.em ofusing is a significant re-
spent at the CNC machine, usully required
Q Malerial conditions are equivalent to find and 'fine-tune' optirmnn spindle speed during
Q Other common conditions are satisfied or part opttI1lli!:aU()D
FEEDRATE CONTROL

Feedrate is the closest programming companion to the FEEDRATE FUNCTION


spindle function. While spindle function controls
spindle speed and the rotation direction. feedrate word in the program is
controls how fast the move, usually to remove ex- the address F, followed a of digits. The number
materiaJ (stock). In handbook, the rapid of digits following the F depends on the feedrate
tioning, sometimes called a rapid motion or rapid traverse mode and the machine tool application. Decimal place is
motion, is not considered a true feed rate and be de- allowed.
scribed in Chapter 20.
• feed rate per Minute
FEEDRATE CONTROL
For miHing applications, aJl cutting feedrale in linear
and interpolation mode is programmed in inches
Cutting feed rate is the at which the
ing tool removes the m"f"YI~1 bV cutting action.
(in/min) or in millimeters per minute (mmiminJ.
of the is the a cutting tool
travel in one minute. This value is modal and is
The cutting action be a rotary motion of the only by another F address word. main of the
(drilling and milling. for example), the molion of feedrale minute is thai it is not dependent on spindle
part (lathe operations), or other action (flame cutting. makes it useful in milling operations, us-
cutting, water electric etc.). The feedrale ing a large variety of tool diameters. Standard abbrevia-
function is in the CNC to select the feedrate minute are:
value. suitable for the
CJ Inches per minute in/min (or older
Two feed rate types are in CNC ......nil'Y"1:Ilm""
CJ Millimeters per minute mm/min
o Feedrate per
most typical format for feedrate minute is F3.1
o Feedrate per revolution for English system and F4.1 for metric system.
The most common of machines. CNC machining For example, of 1 inches per
centers and lathes, can programmed in either feed rate be programmed as 5.5. In metric system,
mode. In practice, it is much more common to use the amount of mm/min will in the
jeedrale per minute on machining centers and the jeedrate F250.0. A different programming
revolution on lathes. expected special machine designs.
There is a significant in G codes for ma- important item to remember feedrate is tbe
chining centers and lathes. range of the feedrate values. feedrate range
of the control always that of the machine
Turning Turning Turning servo system. example, the feedrate range a Fanuc
FEED RATE Milling CNC is between .000 I and 24000.0 jn/min or
Group A Group B Group C
0.0001 and 240000.0 mm/min. Note that difference
Per minute G94 G98 G94 G94 tween two umts IS a decimal point not an ac-
tual translation. In programming, only feedrates that
revolution G99 G95 belong within specified can be used. Such a
feed rate wHi smaller than the control
In milling, the programming command (0 code) for the
per minute is For most it is set au-
tomatically, by the default and not have to
type of a feedrate is the inverse written in the For lathe operations, feed rate per
time jeed rate. It is is not discussed in seldom. In A, the 0 for
handbook. is G98, Groups Band C it is G94.
use primarily jeedraJe per revolution mode.
88

• Feedrate per Revolution o speed - in rev/min


For CNC lathe work, the feedrate is not measured CI Tool diameter! M J or the tool nose radius [ T J
terms lime, as the distance the tool in o requirements of part
one spindle revolution (rotation). ThisJeedrate per revolu-
tion is common on lathes (099 for Group A). Its vaJue is o Cutting tool geometry
modal and another feed rate cancels it (usually the o Machining forces
G98). Lathes can be programmed injeedrate per min-
ute (098), to control the feedrate when the spindle is sta- o Setup of the part
tionary. standard abbreviations are used for JeedraJe o Tool overhang (extension)
per revolution:
o Length of the cunlng motion
a Inches per revolution in/rev ~or older ipr)
o Amount of material removal or width of cut)
o Millimeters per revolution mrn/rev
o Method of milling (climb or conventional)
feedrate per revolution is four o Number of flutes in the material (for milling cutters)
decimal places in thc system three decimal
places in the metric system. This format means the feed rate o considerations
of 0.083333 inJrev wili be applied jn the CNC program as
FO.0833 on most The metric example of The last item is safety, a programming responsi-
0.42937 mrnJrev will be programmed as F0,429 on most bility number one, to assure safety the people and
controls. Many modern control systems accept fecdratc of equipment. Safe speeds and are only two aspects of
up to decimal for English units five safety awareness in CNC programming.
for metric
ACCELERATION AND DECELERATION
careful when rounding feedrate values. For
boring operation, reasonably feedrates are
quite sufficient. Only in' point threading, the feed rate During a contouring operation, the direction of the cut-
is critical for a proper thread lead, particularly for ting motion is changed quite often. is nothing un-
long or very can pro- usuaJ about it, with all the intersections, points
grammed with up to decimal places feedrate precision and In contouring, it means that in to
for threading only. gram a sharp comer on a the tool motion aJong X
axis in one block will to into a motion along
The programming for the feedrate per revolu- the Y axis in next make the change one
tion is G99. For most lathes, this is the system default, so it cutting motion to another, the control must stop X mo-
does not have to written in the unless the opposite tion first, then start Y motion. Since it is impossible to
command G98 is also start at a full instantly, without an acceleration,
and equally impossible to stop a feedrate WIthout a deceler-
It is more common to program a feedrate per ation, a possible error may occur. error
minUle (098) for a lathe program, than it is to pro- cause corners on the profile to be cut with an un-
afeedrate per revolution (095) in a milling program. desirable overshoot, particularly during very high TO"'''''''',,"
reason is that on a CNC lathe, command controls or extremely narrow angles. It only occurs during a cutting
the feed rate while the spindle is not rotating. example, motion in 001, 003 modes. not the rapid motion
a barfeed operation, a part stopper is used to 'push' mode 000. During the rapid mOlion, the deceleration is au-
the to a position in chuck or a collet, or a tomatic - and from the part.
pull-put to 'pull' the bar OuL Rapid feed would be too
and feedrate revolution is not applicable. In a routine CNC machining, is a small chance of
per minute is instead. In cases G98 ever encountering such an error, if the error is
099 commands are used in the lathe program as required. it will likely within
Both commands are modal and one cancels the other.
controls provide
two commands problem:
FEEDRATE SELECTION
To the feed rate, one that is most suitable a
given job, some general knowledge of machining is useful.
is an important of process and
be done A depends on
many factors, most notably on: Exact stops increase For used
on older machines, they may be required in some cases.
FEE CONTROL 89

• Command 01304 CUTTING)

of two commands that control the feedrate N13 GOO X1S.0 Y12.0
machining comers is G09 command - Exact Nl4 G61 GOl X19.0 F90.0
This is an unmodal command and has to be repealed in ev- N15 Y16.0
ery block. it is required. N16 XlS.O
Nl7 Y12.0
0] 30 I, there is no provision Nl8 G64
That may cause uneven cor-
A'""''''.... ' ... A''' of F90.0 (in/min);
in re-
01301 (NORMAL CUTTING)

~3 GOO X1S.0 Y12.0


N14 G01 X19.0 F90.0
N15 Y16.0
N16 Xl5.0
N17 Y12.0

By adding the GOg exact


the motion in that will
motion in the will start.

01302 (G09 I'"'r'l"I""l'TU':!'

f\
~3 GOO X1S.0 Y12.0
N14 G09 G01 X19.0 F90.0
N15 G09 Y16.0
~6 G09 X1S.0 point Target point
N17 Yl2.0

Example 01302 11 comer Ilt all three po-


sitions of the part. only one corner is for sharp-
GOg I G61 USED
ness, program the G09 command in the block that termi-
nates at that corner (program 0 I Figure 13-1
01303 (G09 C'U'I'T1NG
Feedrate control around comer Exact Stop commands
The overshoot is for clarity
N13 GOO X1S.0 Y12.0
N14 G01 X19.0 F90.0 • Automatic Corner Override
N15 G09 Y16. 0
N16 X15.0 While a cutter radius is in for a milling cutter,
Nl7 Y12.0 the feed rate at the contour points is normally not
overridden. In a case like this, command
G62 can be used to automatically the cutting feed-
The G09 command is useful only if a rate at the corners of a part. This command is active until
require the deceleration for a sharp corner. the G61 command (exact stop the com-
all corners must be the constant mand (tapping mode), or G64 (cutting mode)
the G09 is not very efficient. is programmed.

• Exact Stop Mode Command • Tapping Mode


The second command that corrects an error at
ners is G61 - Exact SlOP Mode. It is
than G09 and functions identically. The
that G61 is a modal command that remains in
is canceled by the G64 cutting mode
ens the programming time. but not the cycle
when the G09 would be too
same program, making it too
90 Chapter 13

• Cutting Mode It is important to understand that the effeclive ra-


When the cutting mode G64 is programmed or is active will decrease in for all internal arcs
by system it represents the normal cutting mode. crease in size for arcs. Since the
rate does not change automatically during cutter radius
When command is active. exact stop check 061
will not be performed, neither will the automatic corner offset it must adjusted in program. Usually.
G62 or the mode G63. That means the ac- this adjustment is not necessary, in cases where the
celeration and will be done and the surface finish is of great importance or the culler radius is
feedrate will be effective. is the most com- This consideration applies only to mo-
tions. not to linear
mon default for the control
The CUlling mode can be • Circular Motion feedrates
(exact stop G62 command
feedrates for circular motions is generally
corner override mode) or G63 command (tapping mode).
same as linear feedrates. In fact, most programs do not
The G64 is not usualJy programmed, unless feed rate for circular tool motions. If the
one or more of the other feed rate are used in the part surface finish is important. the 'normal' must
same To compare the 064 modes, be adjusted or lower. with consideration of (he cutter
see il in Figure radius, the radius cutting or arc) and
the cutting conditions. The cutter radius,
more reason cutting feed rate programmed arcs will
some correction,

In case of arc (after ap-


plying cutter may be much larger or much
smaller than the arc programmed to drawing dimensions.
The for compensated arc motions is
on the linear motion Look for a more
explanation in 29, with an and
First, is (he standard calculating
a linear feedrate:
G62 USED G64
Figure 13·2
Corner override mode 662 and default 654 cutting mode lEi" where ...

CONSTANT fEEDRATE FI == feedrate (in/min or mm/min)


r/min : : : Spindle speed
F. Feedrate per tooth (cutting edge)
In Chapter 29, n :::; Number of cutting edges (flutes or inserts)
chapter are explanations
wining Q constant cutting feed rate inside and outside
arcs, [rom practical of view. At this point, the
eus is on the understanding the constant "''''''',n''''''''>
than its applicaJion.
In programming, normal process is to the coor- outside arcs, the up-
dinate values for all the contour paints, based on the wards. to a higher
part The cutter produces the center
line the tool path is typically disregarded. When
gramming arcs to the drawing dimensions, rather than to
the center line of the cutter, the feed rate applied to the pro-
grammed arc relates to the radius, no'
the actual cut at the tool center, lEi" where ...

the cutter radius is and the path F.


arc is offset the cutter radius, the actual arc radius F~ =
that is cut can be smaller or larger. depending on the R Outside radius of the part
offset value for tool motion. = Cutter radius
FEEDRATE CONTROL 91
\ ......
\

arcs, the is generally adjusted dOW~ fEEDHOlD AND OVERRIDE


wards, to a lower value:
While running a program, programmed
x (R r) be ~emporarily suspended or changed by using one of two
R avatlable features of system. One is
jeedhold switch. the is a jeedrate override
Both switches are standard allow the CNC operator to
Ilii" where ...
control the feedrate during program
F, Feedrate for arc
They are operation panel.
F, Linear feedrate
R Inside radius of the part • Feedhofd Switch
r = Cutter radius
FeedhoLd is a push button can be toggled between
ON and Feedhold
i"P,'I'II1.f'l11'l It can be
MAXIMUM fEEDRATE modes.
rate revolution. On many
maximum programmable jeedrate for the CNC ma- not only a cutting feed with 00l, 003 in effect-
is determined by the machine manufacturer, not stop the rapid motion GOO. program func-
manufacturer. For will remain active during a feedhold state,
machine may although machining operations, the feedhold function
several times is automatically disabled and ineffective. This is
to all but there are addi- tapping and threading, G84 and 074
considerations for CNC lathes, where cycles on machining centers threading opera-
revolution is the main method of program- the 032, 092 and
tool.
• feed rate Override Switch
• Maximum feed rate Considerations
is nonnally by means of a
The maximum cutting feedrate per switch. located on the control panel of the
rp.;:tr./"'tpl1 by the programmed spindle
13-3.
maximum rapid traverse rate of It is quite
to the feed rate per revolution too high with-
it. This problem is most common in sin- Q,iJ 100 110
'O~ I '<0
'\~",\ \ // ~
A cannot deliver heavier than the
maximum it was designed for, the results will not be accu-
rate. results could be unacceptable, When un-
usually heavy and fast spindle are used in
the same progF.dffi, it is advisable to the final
feedrate does not exceed the maximum
the given It can be
drare per revolution, according to

Figura 13-3
Typical feedrare override switch

Jri" where ... This rotary switch has marked settings or indi-
cating the oj programmed jeedrate, A typical
Max. allowed feedrate per revolution in/rev range of a override is 0 to 200%, 0 may be
of the maximum feedrate, no motion at all or the slowes( motion, depending on the
' '>I •• I''1'''1'l from the X and the Z machine. 200% doubles all programmed
r/min = in revolutions per minute
rates. A programmed of 12.0 in/min (FI is the
The Rmtlx is in in/min or mmlmin. depending on the 100% feedrate. If override switch is set to 80%, the ac-
input units In 38 nre details to tual cutting will 9.6 in/min, If the
feedrate limits for threading, 110%, the actual will be 13.2
92 Chapter 13

simple logic to metric "'\f<'I''''f'''n M48 function the CNC nn,"'"",,'nr to use the
programmed feed rate 300 mmlmin, it ....... rrlm/ a
", rate override switch freely; the function will cause
An 80% override results in 240 mm/min cutting to be of the
feed rate and a 110% setting is on the control panel. The
to 330 mm/min cutting tool. most common usage of two functions is tapping or
threading without a cycle, where the exact programmed
feed rate override switch works equally well forfeed- feed rate must be maintained. The following exam-
rates revolution. example, the programmed feed- shows the teChnique:
rate .014 in/rev will in actual feedrate of .0126
in/rev with 90% feed rate and .01 in/rev with mo 8500 M03 (usnro TAP 12 TPI)
130% override. If a feed rate
revolution is required, be the set- N14 GOO X5.0 Y4.0 Moe
For example, programmed is FO.0I2, in N15 ZO.25
revolution. A change by one division on the N16 M49 (DISABLE FEEDRATE OVERRIDE)
,,'"" ....... '1... dial will increase or the pro- N17 GOl Z-O.62S F41.0 MOS
N18 ZO.25 M04
grammed by a full 10 Therefore, feedrate N19 M48 (ENABLE FEEDRATE OVERRI:DE)
will be .0108 at 90%, .0120 at 100%, .0132 at I etc. In mo GOO X.• Y•• M05
feedrate is not required, bUl in N21 MOl
will not for exam-
a feedrate of .0 I in/rev, because of fIxed 10%
crements on the override switch. The tapping occurs between blocks N 16 and N]9 the
override is disabled for
threading
Feedrate ",,"'.......... ,,'"
UI.:lUL/I/::U.

tapping and G74 on E ADDRESS IN THREADING


single point threading G92 and
tapping mode is used milling Some older lathes use feed rate address E for
mand G63, both the feedrate the feedhold rather the more common address F.
functions are disabled - through the program .I
feed rate function E is similar to the F function. It also
offers two
<"""Ip.rn override functions thread lead per revolution, in in/rev
for cutting other than tapping or threading or in mmJrev, hut it ha.." a decimal place accuracy.
They are M48 and M49. These are programmable func- control system model 6T, for the
tions, may not be for all

• feed rate Override functions e English - Fanuc control:


Although the function uses the address F. two F 0.0001 /() 50.0000 in/rev
miscellaneous functions M can be used in the
gram to set the feed rate override ON or On the opera- E :::: O. 000001 10 50.000000
lion panel, a switch is provided for feed rate override. If the
CNC decides that programmed feedrate has to be
e Metric - Fanuc control:
or decreased, this switch is very
handy. On other hand, during machining F '" 0.001 to 500.000
the cutting feed rate must be as programmed, E ::0 0.0001 10 500.0000 rrm/rev
"uj.. ......,'np switch to set to I 00% only. not to any
On the newest models, FS-OII 011 J/1S/16T, the
are similar is no E address), the safest way
A good are special tapping operations without the available is to lookup specifications
cycles, using GOl and GOO preparatory commands. control system.
Lions M48 and are used precisely for such
The E address is redundant on the newer controls and is
Feed nil t! cancel function is OFF, retained only compatibility with older programs that
which means feed rate override is active be used on machines equipped with newer controls.
available feedrate ranges between
Feedrate override cancel function is ON.
M49 ferenl control systems, depend on type of feed
which means feedrate override is inaclive screw input units in the
TOOL FUNCTION

ly controlled machine using an automatic


must have a special tool functlon (f7ifnc£ion)
used in the program. This function controls the
of the cutting tool, depending on the Iype of ma-
chine tool. are noticeable differences between T
on CNC machining centers and those used
are also differences between si
Ihe same machine type. The normal program-
.,rlri ..",-.- for {he tool function uses the address T.

machining centers. the T function


the tool number only. For the
indexing to (he tool stalion
number.

T FUNCTION FOR MACHINING CENTERS


All vertical and horizontal CNC machining centers
a called the All/omalic Tool
In the program or MDI mode on
uses the function T, where the T
tool number selected by the programmer.
describe the tool number itself. On TOOL READY POSITION
with a manual tool change. the tool
required al all. F;gure 14-1
programming for a particular Typical side view of a 20-tool ma(,aZifle
center begins, the type of the (001 selection for that machine
as small as len or
must be known. Thert~ are twu major Iypes uf luul selCX:lion
on special
in automatic tool change
cenler may
o Fixed type machines will
or oval (larger
o Random memory type
It consists of a
To understand the where the tool holder
is to understand the general setup. Each pocket is
tool selection, available for many rnn,nJ>'"""
is important to know
centers. for each pocket The
during and aulo-
• Tool Storage Magazine or MOL The number
of tools that
A typical CNC machining center or horizontal)
is designed with a special 100/ called
""... rn"",nH'<"

a 1001 carousel), [hat contains all by the pro- Within the travel of is one special posi-
gram. This magazine is not a for the lion, used Cor position is
tools, but many (he commonly aligned with the tool the
used tools there at all limes, If typical 20-tool waiting position, tool-ready posi-
magazine is illustrated in tion, or just the lool (,1U11HJ'P

93
94 Chapter 14

• fixed Tool Selection position the too! This can


A machining center that uses a fixed tool selection re- simultaneously, the machine using another to
cut a part. Actual tool change can take place anytime later.
the CNC to place all into
The is concept of next tool waiting where the T
that match the tool numbers. example. (001
function to the next tool, not the current tool. In the
number I (called as TO I in the must be
into the magazine pocket number I, lool 7 (cal~ed the next tool can made by
simple blocks:
as T07 in the program) must be placea-~b.e magazme
pocket 7, and so 00. T04 (MroCE TOOL 4 READY)
magazine pocket is mounted on a side of the
)..."""uu~,
usually from the work area (work <... Mac:i111'unf! wiIh previous 1001 ... >
With the fixed selection, the control system no way
of determining which 1001 number is in which magazine M06 (ACTUAL TOOL CHANGE - T04 m SPDmLE)
pocket at any The CNC has to T15 (MAKE NEXT TOOL
match the numbers with the magazine numbers
during setup. This of a tool selection is commonly <... fVU7r""'I1'" with 10014 - 7D4 ... >
found on many older machining centers, or on some
inexpensive centers.
In first block, the 1'04 tool was called into the walting
the lool is easy - the T of the tool while previous was
function is used in program, that will the tool CUlling. When machining been completed, ac-
number selected during a tool change. example, tual tool will take place, where T04 will become the
active tool. Immediately, system will for
N67 T04 M06 the next tool (TIS in the example) and it into the
waiting position, while T04 is cutting.
or
example illustrates that the T function will not
N67 M06 T04 any physicallool change at a!1. For that, the ~utomatic ~ool
change junction - M06 - also later In secMn,
or is needed and must be programmed.
N67 T04 Do not confuse the meaning of T with the
N68 M06 tool selection the same T used with the
random tool The former means the actual num-
means to bring number 4 into the spindle (the ber of the pocket, the latter means the tool num-
las( is preferred). What will to the (001 that ber of next tool. The call is programmed earlier
is in the spindle at The M06 cha~ge . than it is needed. so the sysl~m can for that
will cause the tool to return to the magazme pocket It tool while another tool is productive work.
came from, the new tool will be loaded. the
tool takes the way to select new tool, • Registering 1001 Numbers
Today, this type of a tool selection is considered impracli- and CNC in "",,..,.rll
and in a long run. There is a significant time can process data quickly and with
during tool because the tool has to wait precision. the CNC work, the required
until the lool is found in magazine and placed input first, to make the computer work in our . In the
into the The programmer can somewhat improve random tool selection method. the CNC operator lS to
the by selecting and tool num- any tool into any magazil1e as long as ac-
not necessarily in the order Exam- tual setting is into the unit, in the form
in this handbook are based on a more modern type of control is no need to worry too
tool selection, the random memory. much about system parameters,just acceplthem as the col-
lection various system Registering tool num-
• Random Memory Tool Selection its own entry screen.
This is the most common on modern machining operator will
centers. It also stores alltool5 required to machine a part in the required tools into writes down the
the tool magazine away machining area. numbers (which tool number is in which pocket number),
CNC identifies by a T and the information into the system. Such an op-
usually in order of usage. Calling the required tool eration is a normal of machine tool and vari-
number by program will physically move the tool to the ous shortcuts can used.
TOOL FUNCTION 95

• Programming Format Q Example:


Programming format for the T function used on milli~g
systems depends on the maximum number of lools aVaIl- N81 TOl ... Innkes T01 ready =loaded in the wairi.ng posilion
able for the CNC machine. Most machining centers have N82 M06 ... brings TO) imD the spiJulJe
number of available tools under 100, although very large N83 TO 2 , .. rnakes 7D2 ready = Irxuled in the wailing position
machines will have more tool magazines available (even
several hundred~. In the ex~m~l~s, two-digit tool function The three blocks appear to be simple enough, but let's ex-
will used, covenng tools wlthm~ range of TO J to T99. plore them anyway. In block N81, the tool addressed as
TOl in the program will be placed to the waiting position.
In a typical program, the TOI tool command will call the The next block, N82, will activate the actual tool change -
1001 identified in the setup sheet or a tooling sheet as tool tool TO I will be placed into the spindle, ready to be used for
number 1; T02 will call tool number 2, T20 will call tool machining. Immediately following the actual tool change
number 20, elc. Leading zeros for tool number designation is T02 in block N83. This block will cause the control sys-
may be omitted, if desired - TOI can be written as Tl, T02 tem to search for the next (001, T02 in the example, to be
as 1'2, etc. Trailing zeros must always be .written, for exam- placed into the waiting position. The search will ~ake place
pJe, T20 must be written as T20, otherwIse the system WIll simultaneously with the program data followmg block
assume the leading zero and call the tool number 2 (T2 N83, usually a too! motion to the culling position at the
equals to T02, not T20). part. There will be no time lost, on the contrary, this method
assures that the tool changing times will be always the
• Empty Tool or Dummy Tool same (the so called chip-to-chip time).
Often, an empty spindle, free of any tool, is required. For Some programmers prefer to shorten the program some-
Ihis purpose, an empty tool station has to be assigned. Such what by programming the tool change command together
a tool will also have to be identified by a unique number, with the next tool search in the same block. This method
even if no physical tool is used. If the magazine pocket or saves one block of program for each tool:
the spindle contains no tool, an empty tool number is neces-
sary for maintaining the continuity of (001 changes from N81 TOl
one part to another. This nonexistent tool is often called the N82 M06 T02
dummy tool or the empty tool.
The results will be identical - the choice is personal.
The number of an empty tool should be selected as higher
than the maximum number of tools. For example, if a ma- Some machine tools wilJ not accept the shortened two-block
chining center has 24 tool pockets, the empty 1001 should be version and the three-block version must be programmed.
identified as TIS or higher. It is a good practice to identify If in doubt, always use the three-block version.
such a tool by the largest number within the T function for-
mal. For example, with a two digit format, the empty tool
should be identified as 1'99, with a three digit format as
T999. This number is easy to remember and is visible in the • Conditions for Tool Change
program. Before calling the M06 tool change function in the pro-
As a rule, do not identify the empty tool as TOO - alllools gram, always create safe conditions. Most machines have a
light located on the control panel for visual confirmation
not assign.ed may be registered as TOO. There ~re, howeve.r,
machine tools that do allow the use of TOO, WIthout POSSl- thai the tool is at the tool change position.
ble complications. The safe automatic tool change can take place only if
these conditions are established:
TOOL CHANGE FUNCTION - MOS o The machine axes had been zeroed

The tool function T, as applied to CNC machining cen- o The spindle must be fully retracted:
ters, will not cause the actual 1001 change - the miscella- ( a) In Z axis at machine zero for vertical machines
neous function M06 must be used in the program to do thaL ( b) In Y axis at machine zero for horizontal machines
The purpose of tool change function, i~ to exc.h.ange the tool
in the spindle with the tool in the wallmg pOSItIon. The pur- U The X and Y axis positions of the tool
pose of the T function for milling systems is La. r?tate th.e must be selected in a clear area
magazine and place the selected tool into the wall!n~ POSI- o The next tool must be previously
tion, where the actual tool change can lake place. ThIS next selected by a T function
tool search happens while the control processes blocks fol-
lowing the T function call.
Chapter 14
---- . - - - - - - -
A program sample illustrates the tool Q Example for illustrations:
(ween tools in (he middle of tile program
illustrated in Figures 10 N51 ( • •• T02 IN SPJlNDLE)
N52 T03 ( • •• TO 3 READY FOR TOOL c:.Hll1NGl~)
(MACHINING WITH
MAGAZINE SPIN E N75 GOO Zl. 0 (RETRACT FROM ",,,,,,,,,,,,,,,\
N76 G28 Zl.0 MOS (T02
N77 MOl (OPTIONAL
(BLANK LINE BETWEEN
N78 T03 (T03 CALL REl?E1!,TElDI
N79 M06 OUT - T03 IN THE SPJCNDLE)
NBO G90 G54 GOO X-lS.S6 Y14.43 9700 M03 T04
N81 . . (MACHINING WITH T03)

"4
t ..
zero
N76 represents the end of machin-
It will cause tool T02 to move
ATe
same optional program stop
lows in the block N77.
Front view of the machine
In the following block N78, the can for
14·2 this is not necessary, but may come very
ATC - Blocks N51 to N78 tool Block N79 is the actual tool
in the spindle will be replaced with T03 that
TOOL MAGAZI SPINDLE rently in the posluon.
in block N80. the rapid motion in X and Y axes
first motion of T03. with ON. Note
T02 at block end. To save lime. the next tool should
placed into the waiting position as soon as possible after
(he tool 1''''''''''''''
note that when T02 is """'''1.1'''''' N77. il is
still in the spindle! There are who not fol-
low If the tool change is right after
block (machine zero return) the MOl
it will be more difficult for " . . ..,'.. ot,...... to repeat the
tool that just finished working, if it n .. (·r\Tm~'"
Front view
Figure 14-3 AUTOMATIC TOOL CHANGER - ATC
ATC example - Block N79
references to Automatic Changer (ATe)
TOOL MAGAZI SPINDLE were made in some examples. designs of
on various machines and from one
to to say, the
method of programming
times quite a bit. The machine
\ / '
will automatically index 10
the proper order. Everything under program control.
Programmer and operator thoroughly familiar
with the type of ATC on all centers in the shop .

• Typical ATC System


A typical Automatic Tool system may have a
double swing arm, one the .... I""fYI. tool, another for
Front view of machine outgoing tool. IL will on Random Mem-
01)' selection (described which mean:-.; the next 1001
Figure 14-4
can be moved to a and be ready for a tool
ATC example - Block NBD (new tool waiting == next tool)
TOOL FUNCTION 97

change, while the current tool works. This machine feature • Maximum Tool length
always guarantees the same tool change time. The typical
The tool length in relation to the ATC, is the projection of
lime for the tool changing cycle can be very fast on modern
a cUlling tool from the spindle gauge line towards the part.
CNC machines, often measured in fractions of a second.
The longer the tool length, the more important it is to pay
The maximum number of tools thaI C(ln be 10(lded into attention to the Z axis clearance during the 1001 change.
the tool magazine varies greatly, from as few as IOta as Any physical contact of the tool with the machine, the fix-
many as 400 or more. A small CNC vertical machining ture or the part is extremely undesirable. Such a condition
center may have typically 10 to 30 tools. Larger machining could be very dangerous - there is not much that can be
centers will have a greater tool capacity. done to interrupt the ATC cycle, except pressing the Emer-

Of~toOI
gency Switch, which is usually too late. Figure 14-6 illus-
Apart changer features, programmer and ma- trates the concept of the tool length.
chine operator should be also aware of other technical con-
siderations that' may influence the \00\ change under pro-
gram control. They relate to the physical characteristics of
cutting tools when mounted in the tool holder:
o Maximum tool diameter GAUGE LINE

o Maximum tool length


o Maximum tool weight TOOL NGTH

• Maximum Tool Diameter


The maximum tool diameter that can be used without any
special considerations is specified by the machine manu-
facturer. It assumes that a maximum diameter of a certain Figure 14·6
size may be used in every pocket of the lool magazine. The concept of too/length
Many machine manufacturers allow for a slightly larger
tool diameter to be used, providing the two adjacent maga- • Maximum Tool Weight
zi ne pockets are empty (Figure 14-5).
Mosl programmers will usually consider the tool diame-
J (
I,
\ ter and the tool length, when developing a new program.
However, some programmers will easily forget to consider
the tool overall weight. Weight of the cutling tool does nol
generally makes a difference in programming, because the
majority of tools are lighter than the maximum recom-
mended weight. Keep in mind that the ATC is largely a me-
chanical device, and as such has certain load limitations.
The weight of the lool is always the combined weight of the
cutting tool and the tool holder, including collets, screws,
pull studs and similar parts.
i OVERSIZE TOOL; I
/ Do not exceed the recommended tool weight during setup!
/ Empty pocket

For example, a given CNC machining center may have


Figure 14-5
the maximum recommended tool weight specified as 22
The adjacent pockets must be empty for a large tool diameter.
pounds or about 10 kg. If even a slightly heavier tool is
For example, a machine description lists the maximum used, for example 24 lb. (l 0.8 Kg), the ATC should not be
tool diameter with adjacent lools as 4 inches (100 mm). If used at all- use a manual tool change for that tool only. The
both adjacent pockets are empty, the maximum tooJ diame- machine spindle may be able to withstand a slight weight
ter can be increased to 5.9 inches (150 mm), which may be increase but the tool changer may not. Since the word
quite a large increase. By using tools with a larger than rec- 'slight' is only relative, the best advice in this case is - do
ommended diameter, there is a decrease in the actual num- not overdo it! If in doubt, always consult the manufac-
ber of tools that can be placed in the tool magazine. turer's recommendations. Examples in this chapter illus-
trate how to program such a unusual Lool change, providing
Adjacent pockets must be empty for oversize tools! lhe tool weight is safe.
98 ..........
-.~~- .....
Chapter 14

• ATC Cycle • MDI Operation


A programmer not have to know every related Incidentally, step of the tool can usu-
to the automatic tool changer actual operation. It is not a vi- ally executed through the MDI (Manual Data Input), us-
tal knowledge, although it may quite a useful knowledge special M functions. functions are only for
in many applications. On the other hand, a CNC !>ervice via the MDl operation and cannot be
operator should know each and eVel) step of the used in a program. The benefit of this feature is that a
inside oul. \001 changing problem can be traced to its cause and cor-
rected there. Check instructions for each machine to
an example, the following is to a get details about functions.
typical CNC vertical machining center and may a little
different for some machines. Always study individual steps
of lh~1:C operalion - often, that knowledge will resolve a PROGRAMMING THE ATC
problem on lool jam during the tool changing. This is a
possible time loss that can be Some machines A number of possibilities exists in relation to the auto--
have a step-by-step cycle with a rotary marie tool Some of the important ones are
switch, usually localed near the 100\ magazine. number of tools used. what tool number is to the
spindle (if any) at the start of ajob, whether a manual tool
In the following example, a tool changer with a double change is required, whether an extra large tool is elc.
arm swing system is used. It will the cutting (001 from
the waiting position and exchange it with the tool currently In (he next several examples. some typical options will be
in the machine examples can be used directly. if the CNC
(001 uses exactly the same formal, or they can be
ATC is a process that will execute the following or- adapled to a particular working environment. For the fol-
of steps when the tool change function M06 is pro- lowing examples, some conditions must be established that
grammed. All steps are quite typical, bUI not nec- will help to understand the subject of programming a lOoi
essarily standard for CNC machining center. so change much better.
them only as a close example:
To program ATe successfully, that is needed is
1. Spindle orients programming format for three tools - theftrs! tool the
2. T00\ pot moves down tools used in the middle of the program and the last tool
3. Arm rotates 60 degrees CCW used in the program. make the whole concept even eas-
4. Tool is unclamped lin the magazine and spindle) to understand. examples will use only four tool num-
5. Arm moves down bers - tool number will represent one of the four avail-
6. Arms rotates 180 degrees CW
able programming formats:
7. Arm moves up
8. Tool is clamped o TOl tool designation represents the
9. Arm rotates 60 degrees CW first tool used in the CNC program
10. The rack returns
11. Tool pot moves up o T02 '" tool designation represents any tool in
the CNC program between the first and
example is only presented as general information - the last tool
its logic has 10 adapted to each The in- o T03 tool designation represents the
struction manual for the machine usually lists relevant dc- last tool used in the CNC program
about Ihe ATC.
o T99 ... tool designation an empty tool
Regardless of the machine 1001 used, two conditions are (dummy tool) as an empty tool pocket
always to perform the ATC correctly: identification

o The spindle must be stopped (with the M05 function) In all examples, the tools will always used,
the empty tool only if required. Hopefully, these examples
o The tool changing axis must be at the home position will illustrate the concept of many possible applica-
(machine position)
lions. Another situation is in situations only
For CNC vertical machining centers, the tool changing one tool is used in CNC program.
aXIs IS Z axis. for the horizontal machining centers it is
the Y axis. The M06 function will also stop the spindle. • Single Tool Work
never count on it. It is strongly recommended to stop the
Certain jobs or special operations may only one
spindle with the MOS function (spindle stop) before the tool
1001 to do the job. In this case, tool is generally mounted
cycle is
in the spindle during setup and no tool t:alls Uf 1001 changes
are required in the program:
TOOL FUNCTION

01401 (FIRST TOOL


N1 G20 . .,,,,,lo,,~c~k~N=u~m~b~er~'"==T=oO=I~W=.a,.,,i.,,t,i.n..•g..... LT 001 in Spindle
B
I .........
N2 G17 G40 G80
N3 G90 G54 GOO X •• Y •• S •• M03
N4 G43 Z •• HOl MOB

< ... TO) working ... :> fill the table, start from the program top and
occurrence of the T address and M06 function. All
N26 GOO Z •• M09 (TO 1 MACHINING DONE) are irrelevant. In the example 01402, the will
N27 G2B Z •• MOS (TOl TO Z-li0111E filled as a practical sample of usage.
N28 GOO X .• Y •• (SAFE Xi!'
N29 M30 (END OF PRC)GRAM) • Any Tool in Spindle - Not the first
%
is the most common method of nr/"\"'r'lln1,1"Y1,
lool is in the way of part changing, it remains The operator sets aU tools in the magazine,
In "I.u ............ permanently for the job. settings but leaves the last tool measured in the "1-"""" . . .
most machines, this tool should not the tool.
• Programming Several Tools matches this too! changing method within
following example is probably the one that
using several tools is the most typical the most useful for everyday work. All are
work. Each tool is loaded into the spindle comments.
various ATe processes. From the
viewpoint. the various lool changing meth- 01402 (ANY TOOL IN SPINDLE AT START)
the cutting section of the program, only (**** NOT THE FIRST TOOL ****)
the start tool (before machining) or the end of the N1 G20 (INCH MODE)
tool (after machining). N2 G17 G40 GSO Tal (GE.'T TO 1 READY)
N3 M06 (TO 1 TO SPINDLE)
As the required tool can be changed N4 G90 GS4 GOO X •• Y •• S.. M03 '1'02 ('1'02 READY)
automatically, only if the Z axis is at machine zero (for ver- NS G43 Z•• Hal MaS (APPROACH WORK)
tical or the Y axis is at machine zero
(for horizontal machining tool position in < ... TO} .. >
axes is only important to the safety the
is no tool contact with the the N26 GOO Z •• M09 (TOl MAClUNING OONE)
are formatted N27 G28 Z.. MOS (TOl TO Z HOME)
programs use machine N28 GOO X .• Y •• (SAFE XY POSITION)
zero return of last tool, for example: N29 MOl (OPTIONAL STOP)

N30 T02 (T02 CALL REPEATED)


N3l M06 (T02 TO SPINDLE)
N393 GOO Z •• M09 TOOL WORK DONE)
N32 G90 GOO GS4 X.. Y •• S.. M03 T03 (T03 READY)
N394 G28 Z •• MOS TOOL TO Z HOME)
N33 G43 Z •• H02 MOS ' .......·rfiJu....'..n WORK)
N39S G28 x.. Y •• TOOL TO XY HOME)
N396 M30 (END OF PROGRAM)
% < ... T02 working .. . :>

with this practice, but N46 GOO Z •• M09 MACHINING DONE)


a large volume of NS7 G28 Z .• M05 TO Z HOME)
N48 GOO X •• Y •• (SAFE XY
N49 MOl

N50 '1'03
N51 M06
N52 G90 GOO GS4 X •• Y ••
N53 G43 Z .. H03 MOS
• Keeping Track of Tools
< ... 7rJ3 working .. . :>
If the lool is easy
to keep a track of where tool is at moment.
N66 GOO Z.. M09 (T03~
In later examples, more complex (00\ will (ake N67 G28 Z •• MaS ('1'03 TO Z
place. Keeping a track which tool waiting and N68 GOO X •. Y •• XY POSITION)
which tool is in the spindle can with a 3 column ta- N69 mo (END OF PRCiGRAM)
ble with block number, 1001 waiting and tool in the spindle. %
100 Chapter 14

The filled-in table below shows the status of tools for the A few comments to the 01402 example. Always pro-
first part only. '?' represents any 1001 number. gram MO I optional S!OP before a tool change - it will be
easier to repeat the tool, if necessary. Also note beginning
Block Number Tool Waiting in Spindle of each tool, containing the next tool search. The tool in the
-
block containing (he first motion has already been called -
Nl ? ? compare block N4 with N30 and bluck N32 with N50, The
N2 Tal ? repetition of the (001 search at the start of each tool has lwo
reasons. It makes the program easier to read (tool is coming
N3 ? TOl imo the spindle will be known) and it allows a repetition of
N4 T02 TOl the tool, regardless of which tool is currently in the spindle.

T01 WORKING • First Tool in the Spindle


N30 T02 TOI Program may also start with the first tool in the spindle.
N31 TOl T02 This is a common practice for the ATC programming. The
fIrst tool in the program must be loaded into the spindle
N32 T03 T02 during setup. In the program, the first tool is called to the
T02 WORKING waiting station (ready position) during the last tool - not the
first tool. Then, a tool change will be required in one of the
N50 T03 T02 last blocks in the program. The first tool in the program
N51 T02 T03 must be firs! for all parts within the job batch.

N52 TOl T03 01403 (FIRST TOOL IN SPINDLE AT START)


N1 G20 (INCH MODE)
T03 WORKING N2 G17 G40 GSa TO::! (GET T02 READY)
N3 G90 G54 GOO X .• Y •. S •• M03
When the second part is machined and any other part af- N4 G43 Z.. HOI MOB (APPROACH WORK)
ter that, the tools tracking is simplified and consistent.
Compare the next table with the previous one - there are no < ... Wl working ... >
question marks. The table shows where each tool is.
N26 GOO Z •• M09 (Tal MACHINING OONE)
Block Number Tool Waiting Tool in Spindle N27 G28 Z.. MOS (Tal TO Z HOME)
~
N2S GOO X •. 'l .. (SAFE XY POSITION)
Nl TOl T03 N29 MOl (OPTIONAL STOP)

N2 Tal T03 mo T02 (T02 CALL REPEATED)


N31 M06 (T02 TO SPINDLE)
N3 T03 TOl N32 G90 G54 GOO X .. Y .• S •• M03 T03(T03 READY)
N4 T02 T01 N33 G43 Z.. H02 MaS (APPROACH WORK)

TOl WORKING < ... m2 working .. _>


N30 T02 TOl
N46 GOO Z.. M09 (T02 MACHINING OONE)
N31 TOl T02 N47 G28 Z •• MaS (T02 TO Z HOME)
N4S GOO X •. Y •• (SAFE XY POSITION)
N32 T03 T02 N49 MOl (OPTIONAL STOP)
T02 WORKING
NSO T03 (TO 3 CALL REJr"EATED )
N50 T03 T02 N51 M06 (T03 TO SPINDLE)
NS2 G90 G54 GOO X •• Y.. S •• M03 TOl (TOl READY)
N51 T02 T03 N53 G43 Z.. H03 MO] (APPROACH WORK)

N52 TOI T03


< .. " m3 working . .. >
T03 WORKING
N66 GOO Z •. Ma9 (T03 MACHINING OONE)
Examples shown here use this method as is or slightly N67 G28 Z .. MOS (T03 TO Z HOME)
modified. For most jobs, there is no need to make a tool N68 GOO x .. Y •• (SAFE XY POSITION)
change at XY safe position, if the work area is clear of ob- N69 Ma6 (TOl TO SPINDLE)
stacles. Study this method before the others. It wiJl help to mo IDO (END OF PROGRAM)
%
see the logic of some more advanced methods a lot easier.
FUNCTION 101

method is not without a ",,,u.,,,,,,. Since there is • first Tool in the Spindle with Manual Change
a tool in the spindle, it "",,.'nIT'" an obstacle dur':
In the next example,
or part changing. is program the
lO
dIe tool in the program
in such a way that is no IDol in the spindle
may 100 heavy or too
part setup (spindle condition).
through the ATe must
tool change can be done by
• No Tool in the Spindle gram supports manual tool cl1tmf!e.
spindle at the start and end of each machined to use MOO program
productive than with the first tool in the scribing the reason
eXlr;1 Ihe cycle time. An good selection - MOO is a
empty spindle at start used if the program- the machine without
mer has a valid reason, to recover space above Follow the next carefully, to understand how a
the part that would otherwise occupied by tool change can perfonned when the firsllOoJ is
recovered space may be for removing the in the 1'02 in example will be changed manu-
with a crane or a programming ally by the CNC
situation is not much from the previous ex-
ample - except that there is an extra tool change at the 01405 TOOL IN SPINDLE AT START)
program. This tool brings the first tool N1 G20 (INCH MODE)
into the spindle, for of each program run. N2 G17 G40 GBO T99 (GET T99 READY)
NJ G90 G54 GOO X .• Y •• S .• M03
01404 {NO TOOL IN SPINDLE AT N4 G43 Z •• HOI MOS (APPROACH WORK)
N1 G20 {INCH
N2 Gl7 G40 GSO TOl {GET TOl < ... 1D J working . .. >
N3 M06 (TOl TO SPJlNDLE)
N4 G90 GS4 GOO X •• Y.... Sit.. M03 T02 (T02 DVJ\"",,r\
(APPROACH N26 GOO Z •• Ma9 (TOl MAanNING OONE)
N5 843 Z.. HOI MOS
N27 Gl8 Z.. MOS (TOI TO Z HOME)
N2e GOO X •• Y •• (SAFE XY
< ... 10) working, .. > N29 MOl (OPTIONAL STOP)

N26 GOO Z •• M09 (TOl MAcmNING DONE) NJO T99 (T99 CALL REI)Rl\,TTi:l))
N27 G2B Z •• M05 (Tal TO Z HOME) N31 M06 (T99 TO SPINDLE)
N28 GOO X •• Y •• (SAFE XY POSITION) N32 TO) READY)
N29 MOl STOP) NJ3 MOO (STOP AND LOAD T02 MANUALLY)

NJO T02 (T02 CALL REPEATED) N34 G90 G54 GOO X .• Y.. S .• M03 (NO NEXT TOOL)
NJl M06 (T02 TO N3S G43 Z.. HO:;! MOS WORK)
N32 G90 G54 GOO X •• Y •. S •• M03 T03(T03 READY)
NJ3 G43 Z •• NO.2 M08 (APPROACH WORK) <, T02 >

<. ""7D2 working > N46 GOO Z.. M09 (T02 MAan:NING DONE)
N47 G28 Z •• MOS TO Z
N46 GOO Z •• Mag (T02 MACHINING OONE) N48 GOO X •• Y •• (SAFE XY POSITION)
N47 G28 Z •• MOS (T02 TO Z HOME) N49 MI9 (SPINDLE ORIENTATION)
N48 GOO X •• Y •• (SAFE XY POSITION) N50 MOO (STOP AND UNLOAD TOl MANOALLY)
N49 MOl (OP"l'I(JN.!!,L STOP)
N51 TO) (TO) CALL REPEATED)
NSO T03 (TOl CALL REPEATED) N52 M06 (T03 TO SPINDLE)
N5l M06 (T03 TO SPJlNDLE) N53 G90 GS4 GOO X .• Y •• S.. M03 TOl (TOI READY)
N52 G90 G54 GOO X.. Y •• S .. M03 T99 (T99 READY) N54 G43 Z.. H03 MOB (APPROACH WORK)
N53 G43 Z .. HO) MOS \.n.t:",t"J:\,.JJ:'i.....n WORK)

< . 103 working, . , >


< ... 103 working .. " >
N66 GOO Z •• M09 MACHINING DONE)
N66 GOO Z •• M09 (T03 MACHINING OONE) N67 G2S Z.. MOS (T03 TO Z HOME)
N67 G28 Z •• M05 TO Z-HOME) N68 GOO X •• Y •• (SAFE XY POSITION)
N6S GOO X •• Y •• (SAFE XY' POSITION) N69 MOl (OPTIONAL STOP)
N69 M06 (T99 TO SPJlNDLE) mo M06 (TOl TO SPINDLE)
mo ICO OF PROGRAM) NIl M30 (END OF PR.OGRAM)

%
%
1 Chapter 14

Note the M19 function in block N49. miscella- • First Tool in the Spindle and an Oversize Tool
neous function will orient the spindle to exactly the same
Sometimes it is necessary to use a little larger
position as if the automatic tool changing were used.
tool than the machine specifications allow. In that case, the
The CNC operator can then replace the current tool with
oversize 1001 must return to same pocket in the tool
next tool and still maintain the tool position orientation.
it came from and two adjacent magazine
This consideration is mostly important for certain boring
must empty. Do not use a tool that is too heavy!
cycles, where the tool bit cutting has to be positioned In [he example 01407, the large tool is
away from the machined surface. a boring bar is used. it
is to Its cutting tip. 01407 (FIRST TOOL IN SPINDLE AT START)
N1. G20 (INar MODE)
• No Tool in the Spindle with Manual Change N2 G17 040 GBO T99 (GET '1'99 RE1IDY)
N3 G90 G54 GOO X .• Y •• S •• MU3
The following program is a variation on the previous ex- N4 G43 Z •. HOl MOB (APPROACH WORK)
ample, except that there is no tool in the spindle when the
program starts. < ... 7rJJ working . .. >
01406 (NO TOOL IN SPINDLE AT START)
N26 GOO Z •• M09 (TOl MACHINING DONE)
N1. G20 (INCH MODE)
N27 G28 Z .. MaS (TOl TO Z HOME)
N2 G17 G40 G80 TOl (GET TOl READY)
N28 GOO X •• Y •• (SAFE XY POSITION)
N3 M06 (TOl TO SPINDLE)
N29 MOl (OPTIONAL STOP)
N4 G90 G54 GOO X. _ Y.. S •• M03 T99 (T99 READY)
N5 G43 Z.o HOl Moa (APPROACH WORK)
N30 T99 (T99 CALL REPEATED)
001 MOG TO SPINDLE)
< ... 7rJl ... > N32 T02 ('1'02 READY)
N33 M06 (T02 TO SPINDLE)
N26 GOO Z •• M09 (TOl MACHINING DONE) N34 G90 G54 GOO X •• Y.. S •• M03 (NO NEXT TOOL)
N27 G28 Z •• M05 (Tal TO Z N3S 043 Z.. H02 M08 (APPROACH WORK)
N28 GOO X •• Y •• (SAFE XY POSITION)
N29 Mal (OPTIO:N1\L STOP) < ... 7rJ2 working .. . >
N30 T99 (T99 CALL REPEATED)
N46 GOO Z •• MU9 ('1'02 MACHINING OONE)
N3l MU6 (T99 TO SPINDLE)
N47 G28 Z •• M05 (T02 TO Z HOME)
N32 T03 (T03 READY)
N48 GOO X •• Y •. (SAFE XY POSITION)
N33 MOO (STOP AND LOAD T02 MANUALLY)
N49 Mal (OPTIO:N1\L STOP)
N34 G90 G54 GOO X •• Y •• S •• M03 (NO NEXT TOOL)
N35 G43 Z .• H02 MOB (APPROACH WORK)
N50 MOG (T02 OUT OF SPINDLE TO THE SAME POT)
N5l T03 (T03 READY)
< ... 7rJ2 worJdng ... > NS2 M06 (T03 TO SPIND1..E)
N53 G90 G54 GOO X •• Y •• S .. M03 Tal ('1'01 READY)
N46 GOO Z .• M09 (T02 MACHINING DONE) N54 G43 Z •• H03 MOB (APPROAOi WORK)
N47 G28 Z •• MOS (T02 TO Z HOME)
N48 GOO X •• Y •• (SAFE XY < .. . workiJlg .. . >
N49 MJ.9 (SPINDLE ORIENTATION)
NSO MOO (STOP AND UNLOAD '1'02 MANUALLY)
(T03 MACHINING DONE)
N66 GOO Z •• M09
N67 G2B Z •• MOS (T03 TO Z HOME)
NSl '1'03 ('1'03 CALL REPEATED)
N68 GOO X.. Y .• (SAFE XY POSITION)
NS2 M06 (T03 TO SPINDLE)
N69 MOl (OPTIONAL STOP)
N53 G90 GS4 GOO X .. Y •. S •• M03 T99(T99 READY)
N54 G43 Z •• HOJ MOS (APPROACH WORK)
mo M06 (TOl TO SPINDLE)
N7l lOa (END OF PROGRAM)
%
< ... 7rJ3 working . .. >
• No Tool in the Spindle and an Oversize Tool
N66 GOO Z •• M09 ('1'03 MACHINING DONE)
N67 G28 Z •. MaS (T03 TO Z HOME) This is another tool change version. It assumes no tool in
N68 GOO X •. Y •• (SAFE XY POSITION) the spindle at the program start. It also assumes the next
N69 M01 (OPTIONAL STOP) 1001 is target" than the maximum recommended diameter,
N70 M06 ('1'99 TO SPINDLE)
within reason. In this case, the oversize tool must return to
N71 M30 (END OF PROGRAM)
%
exactly the same pocket it came from. It is important that
the adjacent pocket.,;; are both empty.
TOOL FUNCTION 103

• lathe Tool Station


A slant bed uses a polygonal turret holding
all external and internal cutting tools in special holders.
In (he 01408 example, the tool. These tool stations are similar to a tool on a ma-
chining center. design 8, 10, 12 or more cut-
01408 (NO TOOL m SPINDLE AT START) ting tools - Figure 14-7.
N1 G20 (INCH MODE)
N2 G17 G40 GSO TOl (GET Tal READY)
N3 M06 (1'01 TO SPINDLE)
N4 G90 G54 GOO X •• Y •• S •. M03 1'99 (1'99 READY)
NS G43 Z.. Hal MOB (APPROACH WORK)

< ... TOI wor/dng .. . >

N26 GOO Z •• M09 (TOI MACIaNING DONE)


N27 G28 z..MaS (Tal TO Z HOME)
N2e GOO X •. Y •. (SAFE XY POSITION)
N29 Mal (OPTIONAL STOP)

N30 1'99 (T99 CALL REPEATED)


N3l M06 (T99 TO SPINDLE)
N32 1'02 READY)
N33 M06 (T02 TO SPINDLE)
N34 G90 GS4 GOO X.. Y.. S.. MO) (NO NEXT TOOL)
N3S G43 Z.. H02 MO 8 (APPROACH WORK) Figure 14-7
Typical view of an octagonal lathe turret
< ... T02 working.. >
Many CNC lathe models start adopting the tool
type to with many more
N46 GOO MACHINING
N47 G28 (T02 TO Z HOME)
tools available away from work area.
N48 GOO X .• Y •. (SAFE XY POSITION)
Since all tools are held in a single turret, the one
N49 MOl (OPTIONAL STOP)
selected cutting will always carry along all other tools
NSO M06 (1'02 OUT OF SPINDLE TO THE SAME into the work area. This may be a design whose has
N51 T03 (T03 READY) but il is still commonly used in industry.
N52 MOo (1'03 TO SPINDLE) cause a possible between a tool and the ma-
N53 G90 G54 GOO X •• Y.. S •• M03 1'99 READY) or part, care must be taken not only of the active cut-
NS4 G43 Z •• HOJ MOS (APPROACH WORK) ting tool. but all orher tools mounted in turret,
for ail collision
< ... T03 working .. . >
• Tool rndexing
N66 GOO Z .• M09 (TO 3 MACHINING DONE)
N67 G2B Z •• MOS (1'03 TO Z HOME) To program a tool change, or rather to index the cutting
N68 GOO X .. Y •• XY POSITION) tool into the position, the T function must be pro-
N69 MOl (OPTIONAL STOP) grammed according to its proper formal. For the CNC
NiO M06 (1'99 TO SPINDLE) lathe. this format calls for the address followed four
Nil M30 {END OF PROGRAM} digits - Figure 14-8.
%

illustrate some of ATe programming


methods. The is not difficult once the tool changing
mechanics of the machining center are known. Tool number
is tool WEAR number
T fUNCTION fOR LATH
r•••• _ _ __ Tool station number
So rhe tool function was as it applied to the is GEOMETRY offset number
CNC machining centers. CNC lathes use the tool func-
tion T, but with a completely different structure.
Figure 14·8
Structure of a 4-digit tool number for eNC lathes
104 Chapter 14

It is important to understand this function well. Think display of a typical Fanuc control, there
about the four digits as two pairs of ralher than four is a two screens, both very in appearance.
single digits. Leading zeros within omit- One is called the Geometry Offset screen, the other is called
ted. Each pair has its own meaning: lhe Wear Offset screen. Figure 14-9 and Figure 14-10 show
examples of both screens, with typical (Le., reasonable)
The first pair (the first and the second digits). control the sample entries.
index station and the geometry offset.
1001

~ Example:

TOl xx - selects the tool mounted in position one


and activates geometry oHset number one
The second pair (the third and the fourth digits), control
the tool wear offset used with the selected tool.

~ Example.

Txx01 - "''''P'''.'' wear offset register number one Figure 74·9


It is customary, not arbitrary. La the pairs, if Example af rhe GEOMETRY offset screen display
ble. For example, tool function TO 10 I will select 1001 sta-
tion number one, geometry number one and the asso- OFFSET - WEAR
tool wear offset number one. This format is
easy 10 remember and be used every time, if only
one number is assigned to the tool number.
If two or more different wear ~l!sets~e used for the same
Lool, it is not possible to malch Ihe pairs:In such a case, two
or more different wear offset numbers must be
grammed the same 1001

Q Example: figure 14-10

T0101 for turret station , Example of the WEAR offset screen dispfay
geometry offset 01 and wear offset 01
• Geometry Offset
Q Example:
Geometry the same as the turret
T0111 for turret station 01, station number. operator measures and fills-in the ge-
geometry offset 01 and wear offset 11 ometry for all tools used in the program.

The first pair is always tool station number and the


geometry offset number. The examples assumed that tool
wear offset 11 is not by another tool. If tool ! 1 is
~with the offset II, another suitable wear offset number The from the zero position will
must be selected, for example 2J, and program it as TOI2l. the distance from the tool reference point to the part refer-
Most controls have 32 or more offset for 14- J 1 shows a typical measurement
and another wear olfsets registers. applied to a common tool.
offset can be applied to the CNC All X values will normally have diameter values and are
by registering value into the stored as a typical rear lathe of the slant bed
type. The axis values will normally be
TOOL OffSET REGISTERS (positive are but impractical). How to actu-
ally measure the geometry offset is a subject of CNC ma-
word offset has been mentioned already several times chine lOol operation training, not
with two adjectives - with the expression geometry offset Figure} 4- 12 shows a lypical measurement of the geome-
and the expression wear offset. What exactly is an offset? try offset applied to a common internal tool.
What is the difference between one offset and the Olher?
TOOL FUNCTION 105

tty relating to the geometry off-


13. It shows geometry offset
on the spindle center line (at XO
center drills, drills, taps,
will always be the same.
Tool tip
• Wear Offset
if-r---' TO 101
program, the same are used
as in the finished drawing. For exam-
of 3.0000 is programmed as
,, not reflect any implied dimensional
X3.0, X3.00, X3.000 and X3.0000
same result. What is needed to maintain
Geometry particularly when they are
offset X (0)
to be done with a worn out tool that is still good
to cut a few more parts? The answer is that the pro-
path must be adjusted,fine-tuned, to match
tr(:JnmJ'>f,rvofiset for external (turning) tools the machining conditions. The program itself will not be
but a wear offset for the selected tool is

difference between the


measured size of the part.

J4- 14 ill ustrales the principle of the tool wear


tip detail the is exaggerated for prnnn<l,""

!
Geometry
offset X (0)
I
II
14·12 1/
I

geometry offset for internal (boring) tools I J

1/ ;- PATH
I PROGRAM

Figure 14-14
/
Programmed tool path and tool path with wear offset
Tool tip
The wear offset only one purpose - il compen-
sates between the programmed value, for example of the
3.0 the as measured
The differential
register. This is
of the (001

Geometry
X (0)

figure 14-13
Typical geometry offset for center line (drilling) tools
1

• Wear Offset Adjustment The principle of the wear offset adjustment is logical. If
illustrate the concept offset adjustment on a rear the machined diameter IS larger then the drawing dimen-
lathe, T0404 in the program will be used as an exam- (he wear is changed the minus direc-
The is to achieve an outside diameter of 3.0 inches tion, towards the spindle center line, and versa. This
and tolerance ±.OOOS. starting value the wear off- principle applies equally to external and internal
set in the Txx04 will be zero. The relevant section The only practical difference is an external
{he program look something like this: diameter and internal diameter can be recut (see
the lable above). Chapter 34 presents several practical ex-
N31 MOl amples using the wear offset creatively,

N32 T0400 M42 • The Rand T Settings


N33 G96 S450 M03
N34 GOO G42 X3.0 ZO.! T0404 Moa The last items are R T columns (Geometry and
N35 GOl Z-l.S FO.Ol2 Wear). The offset screen columns are only useful during
N36 ••• The R column is (he radius column. the T column is
the (001tip orientation column (Figure 14-
When the machined part is inspected (measured), it can
have only one of possible inspection results:
i

m
o
o dimension
Q Undersize dimension
If the part is measured on is no need to inler-
fere. The tool setup and program are working correctly.
If the is oversize. it can usually be recut for machining
an outside diameter. an inside diameTer. the exact oppo-
will apply. recut may damage the finish,
which could a concern. If (he part is undersize, it be-
comes a The aim is to prevent all subsequenl parts
from being as well. The following table shows RADIUS
Inspection results all existing possibilities:

Measurement External diameter Internal diameter


ON size Size OK Size OK

OVER size SCRAP


Figure 14-15
UNDER size Recut possible Arbitrary tool tip orientation numbers used with tool nose radius
compensation (G41 or G42 mode)

Let's go a little further. Whether the pan will be The rule of R T columns is (hat they are
or...JJJldersized, something has to be done to prevent this only effective in a tool nose radius offset mode. If no G4]
from happening again. The action to take is adjusting the or G42 is programmed, values in these columns are irrele-
wear offset value. Again, the emphasis is (hal this is an vant. If G411G42 command is used, non-zero values for
example of an outside diameter. that tool must be set in both columns, R column re-
quires the tool nose radius the cutting loot the T column
The diameter X3,0 in the example may result in the tool tip orientation number of the tool.
3,004 diameter That means il is 0.004 over- Both are described in Chapter 30, in more detail. most
size - on diameter. The operator, who is in charge of the off- common tool nose radii for turning and boring are:
set adjustments, will change the current 0.0000 value in the
X register of the wear 04 to -0,0040. The subsequent 1/64 of an inch =: .01 or 0,4 mm
cut should result in the part that will be measured within 1/32 of an inch == .0313 or 0,8 mm
3/64 of an inch == .0469 or 1,2 mm
specified tolerances.
If the part in the example is undersize, say at 2.9990 tool lip numbers are arbitrary and indicate the tool
inches. the wear offset must adjusted by +,0010 in the X orientation number used to calculate the nose
positive direction. The part is a of tool setting in the turret.
REFERENCE POINTS

The common point here is that all environments


cannot useful without some 'leam . They have to
environment, work they have to interact.
importance.
purposes, these relationships and inter-
are three major "'.\\Ilrrm n1o""",",,n that actions are based on one common denominator of each en-
an established mathematical - a reference point.
A is a fixed or "''''"",,",,,,,.,, arbitrary location
Relationship
machine, on the rool A fixed refer-
is a precise location two or more axes, de-
Machine tool + Control system (CNC unit)
during manufacturing reference
are established by the during the pro-
Workpiece + Drawing + Material
gralmrmnlg process. In these three ref-
+ Cutting tool erence points are needed - one point for each of
Tool
available groups:

environment maiep!~nOent of the other a Machine reference point .. Machine zero or Home
two. If the relationship right away, consider a Part reference point .. Program zero or Part zero
(he sources of each ,..n'Jlrrm
a Tool reference point .. Tool or Command point
a MACHINE TOOL is made by a company specializing in
machine tools, usually not or cutting tools In a typical language of a shop. these reference
have somewhat more meamng. Home posi-
... this ellvironment is combined with . .. or a machine zero are terms for machine
a CONTROL SYSTEM is made by a company specializing reference point. A program zero,
in the application of electronics to machine tools. are terms commonly used
do not normally manufacture machine tools reference point. And name tool tip or a tool com-
or cutting mand point are commonly used {he tool reference point.
o PART {workpu~cells a engineering design
developed in a company that does not manufacture REFERENCE POINT GROUPS
machine tools, control systems, or cutting and
holders. The
a CUTTING TOOLS are a specialty of tooling companies, for short.
which mayor may not make cutting tool holders. the control
These companies do not manufacture machine tools CNC machine tool H ......... ""'"

or CNC C:\J<::rl>nH: ratings, etc. a


table or mounted into a
\hese sources meet when a customer buys a or other work holding
CNC machine. A engineering design (part). must of numbers to consider. The parr
machined on a 1001 from one manufacturer, using
size, its height, diameter, shape,
a control manufacturer. tools Finally, the third group of num-
from yet another and 1001 tools. Each CUlling tool its indi-
fourth source. sources are similar to a as features that are with the
tet of first who never played .~"'_ ... _,
both cases is a need to create a harmony.
All have a - they are
By itself, environment is not very useful. A machine they are actual values program-
withoultools will not yield any profit; a 1001 that cannot be to work with individually as well
used on any is not going to benefit manufac- as
turing cannot be machined without tools.

107
108 Chapter 15

• Reference Point Groups Relationship


The key 10any successful CNC program is (0 make all
to work in a coordinated way. This goal can
achieved by understanding principles of
ence points and how Ihey work. reference point can
have two
o Fixed reference
o Flexible. or floating reference point
A point is set by the machine
Lurer as part of hardware design cannot be physi-
cally by the user. A CNC machine has at
fixed point. When it comes to
ence points for the part or the cutting tool, programmer Figure 15-1
of freedom. A reference point (pro-
Machine and axes orientation for a vertical machine
gram is a flexible point, actual
silion is in programmer's hands. The point for the The cubical shape shown is useful only for under-
cutting tool can either or flexible, de- standing the work area. programming and
pending on machine design. the majority of work is done with one or two axes at a
time. To understand the work area and machine zero point
MACHINE REFERENCE POINT in a at the machine the top (XZ machine
plane) and from Ihe (YZ plane). Figures
The machine zero point, often called the machine zero, J5-2 J5·3 illustrate both views.
home or a machine position, is the
of machine coordinale location this
may between the manufacturers, but
most obvious is individual machine
types, namely the vertical and horizontal models.
MACHINE
In general terms, a CNC machine two, or more
axes, depending on the type and model. has a
maximum range of travel that is fixed by manufacturer.
range is usually for If the CNC
erator exceeds the range on an error condition
known as over/ravel will occur. Not a serious problem, but view
one that could be During setup, particu-
larly after the power has been turned on, the position of all 15·2
axes has to preset to be the same, from day to Top view of a vertical machine as viewed towards the table
day, from one part to another. On older this pro-
is done by setting a grid, on machines, by
performing a machine zero return command. Fanuc and Spindle /'0 ...." 0 .. 1

m~flY control systems prevent automatic operation of


a machine tool, unless the machine zero return command
Gauge line
been performed at least once - when the power to the
has been on. A safety feature.
On all CNC machines that use typical coordinate system,
the machine zero is located at the end of each
For a lypical vertical machining
center, at the pan in the plane, is straight down
from the tool position (tool tip). Also look into the XZ FRONT view
plane (operator's front of the machine), or into YZ Figure 15-3
plane (operator's right-side view of the
front view of a vertical machine as viewed from the front
three planes are perpendicular to other and together
creale su t:alled work cube or work space - Figure 15-1. the two views. In top view, the right cor-
the spindle center line shown in front view.
REFERENCE POINTS 109

Also note that in front there is a dashed idenli- This vital reference point will be used in a ....,."IT,.".."
as the gauge line. This is an imaginary for the the relationship with reference
proper fit of the holder tapered body and is set by the ence point of {he and the drawing dimensions.
machine The inside spindle is a
taper that tool holder with The part is commonly known as a pro-
Any (001 holder in the spindle will gram zero or a part zero. Because the coordinate point that
In the same position. Z motion illustrated will represents program zero can selected by the
shortened by the tool projection. subject of anywhere, it is not a fixed point, but ajloQling
tool referencing is later in this this point is more details can cov-
- after all, it is programmer who part zero.
• Return'to Machine Zero
• Program Selection
In manual mode, the operator physically moves the
axes to the machine zero position. The operator IS ng the program zero, often in the comfort of
to register inlo the control if office, a is that will
necessary. turn power to the while the the efficiency setup and its machining in
machine are at or very close to the machine zero po- the shop. Always allenlive (0 all are for
Silion. too close will make manual machine zero and against a zero selection in a
return more difficult later, power had re- zero point may be selected
A clearance 1.0 inch (25.0 mm) or more each not much of an advice, although true
IS
machine zero is usually sufficient. A typical pro- in terms. Within practical restrictions
to physically the machine zero position will the mach.ine operations, only the most advantageous possi-
follow these bilities should be considered. Three such considerations
1. Turn power on and control} should govern of program zero:
2. Select machine zero return mode
3, the first to move (usually Z axis) [) Accuracy of machining
4. Repeat for the all axes o Convenience of setup and operation
5. Check the in-position indicators
6. Check the position screen display o Safety of working conditions
7, display to zero, if necessary
Machitli"q Accuracy
safety reasons, the selected axis should
machining centers and the X Machining accuracy is paramount all parts must be ma-
In bolh cases, either axis will be moving away work, exactly to the same specifications.
into the clear area. When the axis has reached machine zero is also important repeatability. All the
position, a small indicator light on control panel turns in the balch must the same and all subsequent jobs
on to confirm that axis actually machine zero. must be the same as well.
The machine is now at its reference position, at the machine
Convenience of Setup Bnd Dperation
zero, or at the machine point, or at home-
ever term is used in the The indicator light is con- Operating setup can only be considered
firmation for each the machine is ready for once (he machining accuracy is assured. Working
use, a good will go one step further. On the posi- desire. An experienced CNC nrl".O'r~imrnl"r
lion display screen, Ule actual position should be think of the has in
set to roreach axis, as a standard practice, ifil Defining program zero that difficult to set on the
is not to zero automatically by control. The but- machine or difficult to check is not convenient. It
control panel the position screen slows down the setup process even

PART REfERENCE POINT Working

Safety is always important to whatever we do machine


A part for machining is within the machine and part setup are no different. Program zero has a
motion \lmils. Every must mounted in a that lot to do with the
IS suitable for required operation and not
change position other part of the job run. The fixed We look allhe lypical considerations of program zero se-
location of the very important for consistent re- vertical centers and lathes
sults and It is also very important to guarantee ally. Differences in part influence the zero
thaI of the job lS set the same way as the first selections as well.
is established, part reference can
110 Chapter 15

• Program Zero - Machining Centers part are both parallello machine axes and perpendicular
CNC machining centers allow a variety of meth- zero (part
IJvr\<Tr"' ...... is at (he intersection
ods. Depending on the type of work, some most common two edges.
setup methods usc vises, chucks, subplates hundreds of The concepl is common for virtually all setups,
special fixtures. In addition. CNC milling systems allow a actual If a part is mounted in a
setup, increasing available options. In vise jaws must be parallel to or
to select a program zero, all machine axes must perpendicular with machine axes the fi;ced location
considered. Machining centers with additional axes re- must be established with a stopper or other fixed
quire zero point each of these axes as well, for
the or rotary axes. Since a machine most common work holding
device parts, use it as a practical example of
What are the most common setup methods? Most ma- how to program zero. Figure 15-5 illustrates a lypical
chining is done clamped on table, in a simple engineering drawing, with all the expected dimen-
or a fixture mounted on Ihe table. These basic methods can descriptions material
be adapted to more complex applications.

programmer the setup method for any 1210 75


given perhaps in cooperation with machine 3 . \
THRU
tor. programmer selects the program zero
tion for each program. The process of selecting pro-
zero starts with drawing evaluation, but two steps
to be first:
Step 1. Study how drawing is dimensioned,
which dimensions are critical and which are not 1.0 r-~
Step 2. Decide on the method of part setup and holding

Program zero almost presents ilselfin the any


--....
!

4.0
make sure all critical dimensions and tolerances are 1020 x 0.5
from one part to another. dimensions
are usually not critical. Figure 15·5
Sample used lor selecting program zero """::,,.... nltJ
simplest on a machine table involves
the part, some clamps and surfaces. When selecting a zero, study the
ing surfaces must be fixed during run and The designer's dimensioning style
measured from. The most typical setup of this kind is flaws, but it still is the engineering drawing. In the example,
on pin Two pins form a single row dimensioning alJ holes is the lower left corner of
the third pin is offset away at a right creating a the work. the program zero of the part itself?
setup corner as two locating surfaces - Figure 15-4.
For this example, should be no question about pro-
gramming the point except at
lower left corner the part. the drawing origin and
it will become the part origin as well. It also satisfies Step 1
MACHI PART of the program zero selection The 2, dealing
with work holding device is next. A typical setup
CNC machine vise could be the one iIlust.rated
15-6.

In the setup identified as Version 1, the part has posi-


tioned the vise a left pan stopper. The
part orientation is the same as drawing. so all drawing
N LOCATORS will appear in the program using these drawing
dimensions. It seems that this is a winning setup - yet, this
Figure 15·4
is actually poor.
Three-pin concept 01 a parr setup (all pins have the same diameter)
What is in the IS any of
Since part touches only one point on each pin, the the actual size of The drawing specifies a
setup is very accurate. Clamping is usually done with top rectangular stock of 5.00 x 3.50. The~e are open dimen-
clamps and The left and bottom of the sions they can vary 10 or more and be acceptable.
REFERENCE POINTS 111

If the choice is between Version J and 2, select Version 2


and make sure all negative signs are programmed correctly.
FIXED JAW
Is there another method? In most cases there is. The final
o Version 3 will offer the best of both worlds. Part program
will have all dimensions in the first quadrant, as per draw-

o 0
ing. Also, the part reference edge wiU be against the fix.ed
jaw! What is the solution? Rotate the vise 900 and position
the part as shown - Figure 15-8) if possible.

MOVING JAW
y
l ~
I ~ <:
<: -:I
--x -:I
0
(!)
Z
Figure 15-6
LU
X
0 >
A sample part mounted in a machine vise· Version 1 u.. 0
0 0 ::E
Combine any acceptable tolerance with the vise design, ,'"
y
where one jaw is a fixed jaw and the other one is a moving i
jaw, and the problem can be seen easily. The critical Yaxis !
reference is against a moving jawl --x
The program zero edge should be the fixed jaw - a jaw Figure 15-8
that does not move. Many programmers incorrectly use a A sample part mounted in a machine vise - Version 3
moving jaw as the reference edge. The benefit of program-
ming in the first quadrant (al! absolute values are positive) To select a program zero for the Z axis. the common prac-
is attractive, but can produce inaccurate machining results, tice is to select the top face of the finished part. That will
unless the blank material is 100% percent identical for all make the Z axis positive above the face and negative below
parts (usually not a normal case). VersiOIl 1 setup can be the face. Another method is to select the bottom face of the
improved significantly by rotating the part 1800 and align- part, where it IS located in the fixture.
ing the part stopper to the opposite side - Figure J5-7.
Special fixtures can also be used for a part setup. In order
to hold a complex part. a fixture can be custom made. In
many applications of special fixtures, the program zero po-
FIXED JAW sition may be built into the fixture, away from the part.

o 0 Selecting a program zero for round parts or paHerns (bolt


circles, circular pockets). the most useful program zero is at
the center of (he circle - Figure J5-9.
o
)

MOVING JAW nr--9--~


x:..; I '

(2) ~ ,----- PROGRAM ZERO


y f I ~
1 -Q- -.-- ·¢-----~--cB· -
--x h\! 0
figure 15-7 ~_¢_0
A sample part mounted in a machine vise - Version 2

In Version 2, results are consistent with the drawing. Part


orientation by 1800 has introduced another problem - the Figure 15-9
part is located in the third quadranti All X and Y values Common program zero for round objects is the center point
will be negative. Drawing dimensions can be used in the Chapter 40 describes the G52 command that may solve
program, but as negative. Just don', forget the minus signs. many problems associated with program zero at the center.
112 Chapter 15

• Program -lathes is setting program zero on the


On zero selection is simple, This is not a perfect selection
are only two axes to consider - the vertical X axis and the other advantages. The only disadvan-
there is no finished face. Many op-
horizontal Z axis. Because of the lathe design, the X axis
program zero is always the spindle center line. face to the setup or cut a

On eNC lathes, the program zero for the X axis What are the zero at the front
MUST be on the center rine of the spindle One is that many dimensions along Z axis
can be directly into program, normally with
z three popular methods are used: value. A depends on the
of cases, the CNC programmer
o Chuck .. , main face of the chuck
probably the most important, is a
o , ., locating face of the jaws a tool motion indicates the work area, a
o is in the clear area. During program devel·
, ., front of the finished part
opment It IS to forget a minus sign for the Z cut-
an error, ifnotcaught in time, will posi-
tool away from part, with the tails tack as a possible
Stock X
,_[tp
__l / J obstacle. It is a wrong position, but a better one than hilling
pari. Examples in this handbook use program zero at
'. _. - - - -...1 ---
thefrontfinishedface, unless otherwise specified.
, .
-- -- ---
CHUCK
TOOL REFERENCE POINT
Stock x referenc~ point is related to the lOol. In milling
• operations, the reference point of tool is
the intersection of the tool centerline the
culting lip (edge).

JAW turning and boring, the most common (001


point is an imaginary tool point of the cutting
Stock X cause most tools have a cutting with a built-in

~
---

!
- - • - < _.' )",,~ ~ -
For tools such as drills and other point-to-point tools
in milling or lurning. the reference point is
- - - -~ -
Ireme tip the tool, as measured along Z
P,ART 15-1 J shows some common tool tip points.

Common program lero options for 8 eNC lathe· center line is XD

a chuck
with the
On a nega-
additional
drawing

Jawor fixture face presents more


face can also be touched with tool
all parts. This location may
shapes, such as castings,

Many lathe pariS During tool reference toofs


the first operation, material operation
must always be added to Z value. is the main
All are connected. An error
on another. The
reason why CNC programmers away from program
to understand
zero located on jaw or fixture in special cases.
REGISTER COMMANDS

reference points CNC program- • Position Register Definition


harmonized to correctly. Hav-
rPt,"'rPlnrppoints for program zero) and A little more verbose defi of the position rell~ISli:::r
tool (i.e.• tool tip) there has to be some could be way:
means to associate them to fit them together.
must be some means LO 'teU'the control syslem ex- Position register location
actly where each tool is physically within the ma- as
FROM the program zero,
work area, before it can oldest method TO ..• the tool current position,
to do all lhis is to register the current of the measured along the axes
control system
.", .. 'nr.n r,'{"wlt ..p'n a
Note that the definition does not mention the machine
zero at all - instead, it mentions current tool position.
POSITION REGISTER COMMAND is a very important distinction. The current tool posi-
tion may be at machine zero, it may
The command for the tool position register is within travel limits of axes.
092 for machining centers and lathes:
note the emphasis on from-to By defini-
distance is unidirectional. between the program
ition register command (used in milling) the current tool location. direction is always
zero, 10 lool never reversed. In a
ilion regisler command in turning)
correct sign of each value (positive, nega-
or zero) is always required.
lalhe5: also lise G92 but lathes
!-'v" .. " " , register is only applicable in the absolute
supplied with and similar controls normally use G50 mode programming, while G90 command is jn effect. It
command instead. In practical applications, both 092 and has no use in the incremental G91. In
G50 have identical meaning and the following programmmg,
discussion to both commands In the first do begin in
part of this the focus will applica- toullocation.
tions using command, lathe using G50
command will explained later. • Programming Format
As the name (he command suggests,
by a much more data associated with the G92 command will
and called the Work Offsets to U59), (i. e., stored) into control system memory.
described in Chapter 18, and the Tool Length OffseT (G43),
described in Chapter 19. However, there are still quite a The format command is as
few older machine tools in shops that do not the
ury of the of commands. There are many
compames developed years but still
running on equipment. In cases, In all cases, the of each axis specifies
standing the registration command is an from the zero to the tool reference point (tool tip).
skill. This been one some Programmer provides all coordinates based on the
grammers and found a little difficult to reference point (program discussed earlier.
stand. In reality, is a very simple command. ditional axis will also have to be registered with
First, a look at some more detailed definition this com- example the B axis the indexing table on
mand. A typical description only specifIes Position Regis- chining centers.
ter Command, which by itself is not very

113
114 Chapter 16

• Tool Position Setting


MACHINE
only purpose of command is to register the cur- ZERO
rent 1001 posilion imo the control memory - nothing

effect of can be seen on the absolute position


screen display. AI all the position display
some values for each They could zero or any
other values. When G92 command is current
values of the display will with the values
fied with G92. H an axis was not specified with there
will no change of display for that At the machine.
the has a major responsibility - to match the actual
tool seHing with the specified in the command. 18-1
Current tool position machine zero
(only XY axes shown)
MACHINING CENTERS APPLICATION
Fig ure 16-/ a G92 setup on tool sel at
In programming for CNC machining centers without the machine zero position. method of starting program at
Work Coordinate SysTem feature (also known as Work Off- machine zero is useful. There could be an advantage, for
sets), the Register must be for each example, if a special fixture is permanently attached to the
axis and each lOol. There are two methods: machine A subplate with a grid is a common
example. Permanently set one or more vises may also ben-
o The tool position is set at machine zero
efit. There are numerous variations on this lype of setup.
o The tool position is set away from machine zero
• Tool Set Away from Machine Zero
Which method is better? We look at both them.
second method eliminates the difficulty of the
• Tool Set at Machine Zero ous It allows the programmer to sel XY 1001
anywhere within the machine travel limits (considering
The first method requires that the machine zero position safety first) and use that position as the lool position
will be tool change position for all axes. This is not for XY axes. there is no for machine zero itself.
necessary and definitely very impractical. Consider il for a the CNC operator can setup the part anywhere on the table.
moment and think why it is impractical. in any reasonable position, within limits of the machine
A program is usually done away from the machine. but axes. Figure 16-2 shows an a set at a
the part position on the tabJe must be speci live X axis and a positive Y axis.

G92 X12.0 Y7.5 ZS.375


IN1TIAL MACHINE
Numbers in the example look innocent enough. But con- TOOL ZERO
CNC al the machine, trying 10 setup POSITION
part (without a fixture), to 12.0 inches
away from machine zero in the X axis. the same lime,
the operator must the same exactly inches
away from machine zero Y axis. The same effort has
to be done for the Z axis as well.
It is an almosl impossible task, at without some spe-
cial fixtures. It is definitely an extremely unproductive
There is no need those numbers. they are strictly
X 12.0 could have easily been 12.5. with no
benefit All this difficulty is encountered
only has chosen the machine zero
reference poi nt tool change position (mainly in the X Figure 18·2
andY Current tool position set away (rom machine zero
(only XY axes shown)
REGISTER 115

In order to place tool into the change posi- • Programming Example


tion, the operator physically moves the 1001 from the pro·
To illustrate how to use the position
gram zero by amounts in statement. This
a part program for vertical
is a lot easier job and also much more that
have to be followed:
jng setup to the machine zero.
o The cutting tool should be changed first
Once the lool change posilion is
the program will return to this position a o G92 must be established before any tool motions
The Z axis automatic tool change position on o Tool must return to the G92 position when
chining centers musl be programmed at all the cutting is completed
the only automatic tool change
really applies 10 XY axes only. All three rules are followed in a
tion, the 092 selling will be the same for all
[here is a good reason to change it. 01601 (PROGRAM NUbmElR)
N1 G20 (SET ENGLISH )
The only major disadvantage of this method is N.2 G17 G40 GBO G90 TOl (GE.'T TOOL 1 READY)
new tool change position is only N3 M06 (TOOL 1 TO SPJCNDLE)
system while the power is on. When the power to N4 G92 X9.7S Y6.S Z11.0 (SE.'T CURRENT XY)
N5 GO 0 XL 0 YO. S S800 M03 (MOVE TO
chine is turned off. the tool change position is lost.
No ZO.l NOS (MOVE TO CLEAR ABOVE)
nprlpn,~p.n CNC operators solve this problem by
N'7 GOl Z-0.55 F5.0 (FEED TO DEPTH)
finding the actual distance from the machine zero to N8 X).O Y4.0 F7.0 (CUT A SLOT)
tool position. register it once for particular ~ GOO Z11.0 N09 (RAPID TO Z MACHINE ZERO)
then move the tool by that distance NlO X9. 7 5 Y6. 5 MaS (RAPID TO XY SET POSITION)
for example, at the start of a new day. Nll NOl (OPTIONAL STOP FOR TOOL 1)

• Position Register in Z Axis


example to write but more difficult to set-
a typical vertical machine, the Z axis must be fully re- Don't worry about unknown program
[0 the machine zero, in order to make (he automatic explanations should be
tool change. The position register value is measured from
the zero of the Z axis (usually the top of finished setting position must always
to the tool reference lip, while the Z axis is at ma- at It not maHer the tool
zero position. There is no other option. In is made, at machine zero or away from it - the pro-
will same, of the values
Normally, each tool will have a different Z value of the Only one but normally, each
command, assuming the tool length is different for Z value as the position register,
tool. a rule. the XY settings will not change. length.
shows a typical for 092 command along
o 1601 ill ustrates the concept. LATHE APPLICATION
the with Fanuc and similar controls. 050
092 command:

MACHI

If 092 is a the command is similar:

same definition and


program

Figure 76-3
machine zero fDr the Z axis
8 different setting)
116

Commands G50 and are identical, except that they • Three-Tool Setup Groups
belong to two different G groups. Fanuc actually of-
On a typical slant bed CNC lathe, equipped with a
fers three G code for lathe controls. Based on his-
Iygonal turret (6 to 14 stations), all cutting
tory,typical Japanese made controls use GSO, whereby typ-
individual stations of the turret. During tool
ical US made controls G92. A cooperative US and
the tool is in the active station.
Japanese venture known as Fonuc (General Electric
the used for CNC lathe
and Fonuc) produces controls that are the most common in three groups
North American' the G50 command. normally do:
for lathe applications is o Tools lAtn'''''tn on the part center line
very similar to that for the mills. However, due to
design of CNC lathes, where all tools are mounted in Q Tools working externally on the part
turret, the projection from the Q Tools working internally on the part
turret holder must possible in-
terference must be mounted inaclive for each group is understood well,
tools move one that is used for it to any tool within a group,
cutting. In all are safely out of tools used.
placed in a tool magazine. Several new designs of
lathes are available, where tool on the lathe • Center line Tools Setup
resembles the milling type.
as center line tools are typically
• Tool Setup standard twist drills, car-
reamers, and so on. Even an end mill can
The most important lathe center line. All tools in this group
work relates to the op- have a common denominator, whereby the tool tip is
tions to select from, some are .....,..,C"" .. " always on spindle cenler line, while they cut
These must be setup exactly at 900 to the work
Probably the most face (parallel to
to have the tool change
to the machine zero position. POSI- The position value in the X axis is from the spin-
to move the turret 10, just control panel dle center line to the center line of the tool. For the Z
The position registcr to machine zcro axis, the position value is measured from program
have one major disadvantage it /00 far for zero Lo the tool Iy, the center line tools will have
most jobs, particularly on larger lathes the Z axis. a fairly large that means their GSO value
imagine a tool motion ono inches or more the Z the Z axis wm small, when compared to
only to index the turret and than (he same 30 inch mo- external tools, which generally do not project too much.
buck to continue the cutting cycle. It is not efficient at
is a solution, however. Figure 16-4 a for center line tools.
using an indexable drill as an
Much more efficient method is to select tool indexing
position as close lO the part as possible. position
should always be based on the longest tool mounted in the TOOL
turret (usually internal tools), whether the tool is in the
or not. If there is enough clearance the IV"!:;'-""
will also be enough clearance

of two
position at the X
not too distant) and JUS!

On a lathe, do not forget to keep in mind


layout of all tools in the turret, to prevent a collision with
the chuck, or the machine.
are other, but less common, methods to a tool 16-4
the GSO command.
Typical 550 setting for center line lathe tools
REG COMMANDS 117

• External Tools Setup


external machining operations such as TOOL
diameters, taper cutting,
threading, part-off and
and approaches

register value is
zero to tool tip of the
this chapter). In case of tools
tool, G50 amuunl is usually
the insert, for safety reasons,
16-5 illustrates a typical position for
tool (turning tool shown in example).
Figure 16·6
AT
TOOL CHANGE POSITION Typical G50 for internal lathe tools

For reasons, no 1001 should extend from a turret


into the Z minus zone that is to the left of part front
Many lathes a fairly long travel beyond Z
zero (about I inches or 25-50 mm).
times, this zone can entered to make a safe tool
for very tools. (his is a more advanced
strict safety COI1Sllaer'an,ons
no extended zone for the X axis above
(only about .02 inches or
concern relating to long tools is {"lp~r~lnt'p
in the area, mcluding chuck
sure to those tools where the

• Corner Tip Detail


G5D setting for external farhe tools
Typical turning tool contains an indexable with a
• Internal Tool strength and surface finish When
command is used for a Lool that a
Internal tools are built-in, the programmer has to know (and also tell
inside of a part, in a premachined core or other operator), which edge corresponds to, In
Typically, we may first a boring bar, but cases, the choice is simple. value is mea-
can be used as well for various internal operations. For ex- program zero to the intersection of
ample, an internal and i nlemal threading are com- X and Z tool shape and
mon operations on a setup rules Ihe in the will vary. Figure
Z axis apply in the same way for internal tools as for exter- next page shows settings for the
nal lools of the same most common orientations of a a corner radius,
including two grooving tools.
Along the X axis, the position register setting must
be made to the tip the insert. Figure J6-6 • Programming Example
shows a typical setup for an internal 1001
(boring bar shown in example). The example showing how to use a position register com-
mand G50 on a lathe will be very similar to that of a ma-
All three iIIuslrations 16-4, 16-5 and /6-6) chining center. First, the tool change is made, followed
a possible order operations (drill - tum - with G50 setting for the tool. When the machining
for a typical Note that the turret position is is with (ha( tool, it to return to the same absolute
identified as a tool position. not necessarily as position as specified in the The following sim-
machine zero That means G50 may be set plified example is two the fir.sl 1001 is pro-
where within of the machine, even at the ma- or",mnC'lPt1 to cut a the tool is programmed to
chine zero. cut a 2.5 inch diameter:
118 Chapter 16

Figure 16-7
Position setting G50 for common tool tip orientations - the heavy dot indicates XZ coordinates set by GSO X. Z. for the tool above

01602 Note blocks N2 and N7 first tool, and N 10 and


N1 TOlOO N 15 the second tool. For tool. pairs of
N2 GSO X?4S ZS.5 are exactly same. What program is
N3 G96 S400 M03
the system here is that block N2 only registers the
N4 GOO X2.? ZO TOlOl MOB
N5 GOl X-O.01 FO.OO? current tool position, but block N7 actuaJly returns that tool
N6 GOO ZO.l M09 to the same posilion it came from. For second tool.
N7 X7.4S ZS.5 TOlOO block NIO registers the current tool position, block N15
NB MOl forces the tool to return there.

N9 T0200 important blocks to together are the


NlO GSO XB.3 Z4.B blocks N7 and N 10. Block N7 is the tool change position
Nll G96 S425 M03 for the tool. block NIO is the tool register for
Nl2 GOO X2.S ZO.l T0202 MOB the toot - both tool are at the same physical position
Nl3 Z-1.75 FO.OOS of file turret! The difference in the XZ values reflects the
N14 GOO X2. 7 H09 difference in the projection of each tool from the
N15 X8.3 Z4.B T0200
N16 !rOO
turret station. All that is done G50 command is telling
% the control where currenr is from program zero -
always that in mjnd~
POSITION COMPENSATION

In this handbook, term is used in the same meaning


programming are expressed as as the majority of users interpret it. Ppsition compensation
than not, these numbers, can also be used for a limited replacement of the culler
well before the actual is not covered at all for its obsoles-
part programming, many are will be on positioning of the
exactly, others are known approximately and there t~"."r,"~ the part.

are also many that are not known at all known di-
mensions are subject to variations Without Like IJV~"LJ\.)" compensation is
facility available to (he it will that requires mput the CNC ma-
almost impossible to setup precisely and ef- specifies the
D .. An ..."' ..... ,.,,.," ..

ficiently. Fortunately, modem controls offer many features number, the operator enters
to both programming and machine an easier, machine, using appropriate
and more precise activity. A coordinate screens, setup.
offsets and compensations are typical support
in programming for • Programming Commands

One of the oldest programming l""".IJlIl ..... U~~;) available in and similar controls. there are four preparatory
is called a position As the available to program position com-
name suggests, using position functions, the
actual tool position is compensated to its Iheoreli-
or assumed position, increase in the programmed direction
compensation amount
It is only one of several methods available to
the programmer and machine On modern CNC decrease in the 1pro,gn,lmrne(
systems, this method is still compatibility with pensation amount
older programs. Today, this technique is not really needed. Double increase in the Iprogr~lmrne(
It been replaced by the much more flexible Work Off- G47 by double the compensation amount
sets (Work Coordin.ate Syslem), in the next chap-
ter handbook. The current chapter'describes some Double decrease in the programmed direclio1n I
G48 by double the compensation amount
typical programming can benefit from us-
ing the old-fashioned method.
definilions are based on
'- DESCRIPTION stored in the control
meaning of all
The maIn purpose compensation is to correct are inverted. None of
any difference between machine zero and program zero is and are
1001 positions. In it is in those cases, where which they appear. If required in
the distance between the two reference points is subject to \;;~";Lll\;;,U in any subsequent block, if
vanations or is not known at all. For example, when work-
ing with castings, the zero taken from the cast sur- • Programming Format
face will be subject to change. Using position
Each G code (G45 to G48) is with a unique
compensation will the need to make constant
position compensation number, programmed with the ad-
program of the fixture setup.
H. The H address points to the memory area storage
mally, the part in a fixture on the table
of the control system. On most Fanuc control sys-
whole setup is this reason, the position
tems. the programmed leuercan be D, with exactly the
compensation is called fixture offset or
same meaning. Whether the H or D is used in the
offset. The an offset and a cornlJ(!ns:a-
program, depends on the of a control system
lion is often and for any practical purposes,
parameter.
(Wo terms are sami!.
120

A typical programming format for position compensa- • Incremental Mode


tion function is:
The question may arise why the compensated motion [s
in the incremental mode, Remember that the main purpose
G91 GOO G45 X •• H ..
of position compensation is to allow a correction of the dis-
or tance between machine zero and program zero. The normal
use is when starting the tooJ motion from machine zero po-
G9l GOO G45 X •• D .. sition. By default, and without any offsets, coordinate set-
tings or active compensations. the machine zero [s the ab-
where the appropriate G code (G45 through G48). is fol- solute zero, it is the only zero the machine control system
lowed by the target position and number of the memory 'knows' allhe time,
storage area (using H or D address).
Take the following example of severa! blocks, typically
Note that the example uses incremental and rapid mOlion programmed at the beginning of a program with position
modes and only one axis. Normally, the compensation has compensation:
to be applied to bolh X and Y axes. However, only a single
measured amount can be stored under either H or D num- N1 G20
ber. Since it is most probable that the compensation value N2 G17 GSa Tal
will be different for each axis, it must be specified on sepa- N3 M06
N4 G90 GOO G45 XO H31 (NO x MOTION)
rate blocks, with two different offset numbers H (or offset N5 G45 YO H32 (NO Y MOTION)
numbers D), for example: N6

G91 GOO G45 x .. H31 (illl STORES THE X VALUE) This example illustrates a motion from machine zero (the
G45 Y •. H32 (H32 STORES THE Y VALUE) current tool position), to program zero, which is the target
position, along XY axes, Note the absolute mode setting
or 090 in block N4. Assume that the control system is set (0
H31 =-12.0000 inches. The control will evaluate the block
G91 GOO·G45 X .• D31 (D31 STORES THE X VALUE) and interpret it as programmer's intention to go to the abso-
G45 Y •• D32 (D32 STORES THE Y VALOE) lute zero, specified by G90. It checks the current position,
finds it is at the absolute zero already and does nothing.
For the record, the H address is also used with another There will be no motion, regardless of the compensation
type of compensation, known as the tool length offser (or value setting, if the absolute motion is programmed to eI-
tool length compensation), described in Chapter 19. The D ther XO or YO target position. If the G90 is changed to 091,
address is also used with another type of compensation, from absolute to incremental mode, there will be a motion
known as the cutter radius offset (or cutter radius compen- along the negative direction of X axis, by the distance of
sation). described in Chapter 30. exactly 12 inches and there will be a similar motion along
The applicable preparatory G code will determine how Y axis, in block N5. The conclusion? Use position compen-
the address H or address D will be interpreted. In the exam- sation commands in the incremental mode G9 J only.
ples. more common address H will be used - Figure 17-J.
• Motion length Calculation
MACHINE Let's look a little closer at how the control system inter-
TABLE 1
'-....
11111--_ _ H31--- ZERO prets a position compensation block. Interpreting the way
how the control unit manipulates numbers is important for

T
understanding how a particular offset or compensation
works. Earlier definition has stated that a single increase is
programmed with G45 command and a single decrease
H32 with 046 command. Both G47 and G48 commands are of
no consequence at the moment. Since both commands are

J"'"
.\ _. _ _ ~ _ J
\ PART
tied up with a particular axis and with a unique H address,
all possible combinations available must be evaluated:
o Either an increase or a decrease is programmed
(G45 or G46)
PROGRAM ZERO o Axis target can have a lero value, or a positive value,
or a negative value
figure 17- 7 o Compensation amount may have a lero value,
Position compensation - general concept or a positive value, or a negative value
POSITION COMPENSATION 121

In programming. it is important to set cenain standards


and consistently abide by them. example, on vertical
machiningcenlers, the compensation is measured/rom ma- 9
ne zero to program zero. means a negative
lion from the operator's viewpoint.
decision 10 set
result is a
as
r
'-1 H99
It is cruc1al to understand how the control interprets 17
information in a block. In compensation, it evalu- "j,--
l .'
ales Ihe value in memory called by
D). If the value is zero. no compensation
address H (or
place. If the
13 ,
value of H is stored as a negative it adds this 10
the the axis position and the is the
motion length and direction. example, assume the
memory I stores value of -15.0 inches. and --15 ;-'"
machine current location is at zero position and
setting on Ihecontrol is also set to zero. Then the 17-2
Position compensation applied to different target locations:
G91 GOO G45 xo H31 zero, positive and negative - see 01701 program Pll::l'mn/I'!

will be interpreted as
Figure 1 shows for the following
-15.0 + 0 = -15.0000 example 701, The applies to the X and Y axes ex-
actly (he same way. In written in metric units and has
resulting the Iota I motion of negative \5.0 inches along tested on [ I M, the H address would
the X axis. the same way). The compensation values
and H99 were set to:
value of axis target is a non-zero and
the same formula H98
H99 = -150.000
G91 GOO G45 Xl.S H31
the X and Y axes respectively. The modal
will interpreted as were not repealed

-15.0 + 1.5 = -13.5000 01701 AND G46 TEST}


Nl G21 G17
However, next example is 1/01 correct: N2 G92 XO YO ZO
N3 G90 GOO G45 XO H98 (ABS xo TARGET)
G91 GOO G4S X-l.5 H31 N4 G46 YO H99 (ABS YO TARGET)
NS G28 XO YO
the motion will try 10 the X axis di-
N6 G91 GOO G45 XO H98 (INC' XO TARGET)
rection and result will be overtravel. Since [he N7 G46 YO H99 (INC' YO TARGET)
value of X is G45 command cannol be used and N8 G28 XO YO
G46 command must instead:
N9 G90 GOO G45 X9.0 H98 (ABS X+ TARGET)
G91 GOO G46 X-l.S H31 NlO G46 Y17.0 H99 (ABS Y+ TARGET)
Nl1 G28 XO YO
will be r",'or,,'/] as
N12 G91 GOO G4S X9.0 H98 X+
-15.0 + (-1.5) '" -15.0000 - 1.S 16.5000 N13 G46 Y17.0 H99 (INC' Y+ TARGET)
Nl4 G28 XO YO
G45 in the ....."" .. ":1',.....
value could been value. NlS G90 GOO G45 X-1S.O 898 (AES X- TARGET)
Nl6 G46 Y-13.0 H99 Y- TARGET)
could be quite confusing and N17 G28 XO YO
but it would work quite well. To see the possibili-
program 0 J70! is not dOl ng very much, exCCrl mov- Nle G91 GOO G4S X-1S.0 H98 (INC' X- TARGET)
ing from machine zero 10 different positions and back to Nl9 G46 Y-13.0 H99 (INCY-TARGET)
machine zero (G28 command refers 10 a machine zero re- N20 G28 XO YO
turn and is explained separately in Chapter 2/ ). N21 M30
%
122 17

control syslem will each motion block method is described in Chapter 19 of the handbook. If the
the way it was or the wrong way Z axis is programmed with G45 or G46 commands, i( will
(symbol orr means an condition, preceded WiLh also be affected.
the and direction of
• Using G41 and G48
N3 G90 -> G45 -> 0 no motion
N4 G90 -> G46 -> 0 no motion In the examples, compensation feature was used
N6 Gn -> G45 -> 0 X-2S0.0 only between the zero and program zero, as a
N7 G9l -> G46 -> 0 Y+ OIT method exactly is the part on
the table. The single mClrea~;e using G45 and the
N9 G90 -> G45 -> + X-241.0 crease using G46 were used, because
NlO G90 -> G46 -> + Y+ OjT
the only commands npPflP{"I
N12 G91 -> G4S -> + X-241. 0
Nl3 G9l -> G46 -> + Y+ Commands G47 (double increase) and G48 (double de~
crease) are only for a very simplified cutter ra-
Nl5 G90 -> G4.5 -> X+
Nl6 G90 Y-163.0 dius olfsel and are not covered in this handbook of
-> G46 ->
N1e G9l -> G45 -> X+ OjT their obsOlescence. However, they can still used.
Nl9 G91 -> G46 -> Y-163.0
• Face
• Position Compensation Along the Z axis In a later (Chapter 28), mill-
i ng wi II be explained in more detail. In thai chapter is a very
Position compensalion usually appl to the
X Y axes and will nol normally be used with the good example of how to apply position to
In most cases, the Z to be controlled by another offset the face mill in a regard-
of compensation known as the too/length This less of its This is probably the only use of
G45 and 046 commands in contemporary programming.
WORK OFFSETS

In position compensation, to switch machining


part to another within the same setup. the n1"I'''',,-';'rn
contain a different compensation number
zero of the previous part. Using the work
program zeros are measured from the machine zero
lion, normally up to six. but more are
The six work coordinate systems
are available on
Fanuc control
lowing preparatory commands:

When the control unit is


is normally
Basically, the work to independ-
the most modem methods to coor-
"'lU~I.n''-'' rl,r;.c{'nhlf'c
ent work areas as a values input into
relationship between machine zero reference the unit are measured from the ma-
the program zero reference point. We will use are up to six work
Work Coordinate System feature of any modern control zero positions can be
whether it is called the Work Coordinate System or relationships, using
the Work Offsets. lalter term seems to be more popular
because it is a little shorter. Think of the work offsets as an
alignment bctwcen two or more coordinate systems.
[X] MACHINE
WORK AREAS AVAILABLE ZERO

some more detailed descriptions can be covered,


just what is a work coordinate system - or a work offset?
Work offset is a method that allows the CNC programmer
to a part away from the CNC machine, without
knowing its exact position on the machine table. is a
very SImIlar approach as in the position compensation
method, but much more advanced and flexible. In work
system, up to six parts may be set up on the machine
each having a different work offset number.
can move the tool from one part to with
aV"Vluc,-, ease. To achieve this goal, a preparatory AXES MOTION LIMITS
for the active work offset is needed in Figure 18·1
control system will do rest. Basic relationships of the work offset method
will automatically make any adjustment for
between the two part locations.
The same relationships illustrated for the def~ult
Un1ike the position cmnOlens:aU'OI apply exactly the same way for the other
more axes may be able work offsets 055 to G59. The values siored in the con-
offsets. although the Z trol system are always physically measured from the rna-
controlled independently, zero position 10 the program zero of the as
offset commands. Commands determined hy lhe CNC programmer.
are fully described in the next

12
124 Chapter 18

The distance from machine zero to program zero of each Part position on the machine table is usually unknown
work area is measured separately along the X and Y axes during the programming process. The main purpose of
and input into the appropriate work offset register of the work offset is to synchronize the actual position of the part
control unit. Note that the measurement direction is from as it relates to the machine zero position.
machine zero to program zero, never the other way around.
If the direction is negative, the minus sign must be entered • Additional Work Offsets
in the offset screen.
The standard number of six work coordinate offsets is
For comparison with the position register command G92, usually enough for most types of work. However. there are
Figure J 8-2 shows the same part set with t.he older method jobs that may require machining with more program refer-
of G92 {lnd m{lchine zem a<; a ~tart point. Note the opposite ence points, for example, a multi-~irlerl part on a horizonttll
arrows designation. indicating (he direction of measure- machining table. What options do exist, if the job requires
ment - from program zero to machine zero. ten work coordinate systems, for example?
Fanuc offers - as an option - up to 48 additional work off-
;---- G92 [ X ) ~ MACHINE sets, for the total of 54 (6+48). If this option is available on
ZERO
the CNC system, anyone of the 48 work offsets can be ac-
cessed by programming a special G code:
t GS4.1 P..
Selection of additional work offset,
>- where P = I 1048
N
0)
o (!) Q G54.1 P.. example:
PART l G54.1 Pl
G54.1 P2
Selection of additional work offset 1
Selection of additional work offset 2
PROGRAM\ GS4.1 P3 Selection of additional work cffset 3
ZERO \. G54 1 Px.. Selection of additional work offset x..
G54.1 P48 Selection of additional work offset 48
AXES MOTION UMITS
Figure 18-2
The utilization of additional work offsets in the program
is exactly the same as that of the standard commands:
Basic relationships of the Position Register cDmmand G92
N2 G90 GOO GS4.i Pi XS.S Y3.1 SlOOO M03
For work offsets G54 to G59, a typical entry into the co-
ordinate offset position register will be the X axis as a nega- Most Fanuc controls will allow omission of the decimal
tive value. the Y axis as a negative value and the Z axis as a ponion of the G54.1 command. There should be no prob-
zero value, for the majority of vertical machining centers. lem programming:
This is done by the CNC operator at the machine. Figure
18-3 shows an example of a typical control system entry. N2 G90 GOO G54 Pl X5.S Y3.1 S1000 M03

The presence of PI to P48 function within a block will


01 (GS4) select an w.1Ji/ional work offset. If tbe PI to P48 parameter
is missing, the default work offset command G54 will be
X -12.5543 selected by the control system.
Y - 7.4462
WORK OffSET DEfAULT AND STARTUP
Z 0.0000
If no work offset is specified in the program and the con-
Figure 18·3 trol system supports work offsets. the control will automat-
Typical data entry for the G54 work coordinate system
ically select G54 - that is the normal default selection. In
programming, it is always a good practice to program the
work offset command and other default functions. even if
By using the G54 to G59 settings in the program, the con- the default G54 is used constantly from one program to
trol system selects the stored measured distances and the another. The machine operator will have a better feel for the
CUlling tool may be moved to any position within the se- CNC program. Keep in mind that the control still has to
lected work offset simultaneously in both the X and Y axes, have accurate work coordinates stored in the G54 register.
whenever desired.
WORK OFFSETS 125

In the program, the work offset may be established in two x= -12.5543 + 5.5 = -7.0543
ways - either as a separate block, with no additional infor- Y = -7.4462 + 3.1 = -4.3462
mation, as in this example:
These calculations are absolutely unnecessary in every-
N1 G54 day programming - they are only useful to the thorough un-
derstanding of how the control unit interprets given data.
The work offset can also be programmed as part of a
startup block, usually at the head of program or at the be- The whole calculation is so consistent, il can be assigned
into a simple fonnula. For simplicity, the seuings of the
ginning of each tool:
EXT (external or common) offset are not included in the
N1 G17 G40 GBO G54 formula. but are explained separately. later in the chapter:

The most common application is to program the appro-


priate work offset G code in the same block as the first cut-
ting tool motion:
II3f' where ...
N40 GOO G90 G54 X5.5 Y3.1 SlSOO M03
A == Actual motion length (distance-to-go displayed)
M = Measured distance from machine zero
Figure J8-4 illustrates this concept. In (he above block
P == Programmed absolute target position (axis value)
N40, the absolute position of the tool has been established
as XS.5Y3.1, within the GS4 work offset. What will actu- Be very careful when adding a negative value - mathe-
ally happen when this block is processed? matically, the double signs are handled according to the
standard rules:
.all G54 [X]--'
PLUS and PLUS becomes
a + (+ b) == a + b
PLUS

PLUS and MINUS becomes


a + (- b) = a - b
0--r MINUS
I 3. 1
WoJ+------'-----I _t MINUS and PLUS becomes
a - (-I- b) == a - b
1-- -5.5 --1 MINUS

MINUS and MINUS becomes


Figure 18-4 a - (- b) ::: a -I- b
Direct too/ motion to a given location using G54 work Dffset PLUS
Note thaI there are no X or Y values associated with the
G54 command in the illustration. There is no need for In the example, plus and minus combination creates a
them. The CNC operator places the part in any suitable 10- negative calculation:
calion on the machine table, squares it up, finds how far is
the program zero away from machine zero and enters these -10 + (-12) = -10 - 12 = -22
values into the control register, under the G54 heading. The
entry could be either manual or automatic. If any other work offset is programmed, it will be auto-
matically replaced by the new one, before the actual tool
Assume for a moment, that after setup, the measured dis- motion takes place.
tances from machine zero to program zero were X-12.5543
and Y-7 .4462. The computer will determine (he actual mo- • Work Offset Change
tion by a simple calculation - it will always add the pro-
grammed target value X to the measured value X, and the A single CNC program may use one, two, or all work
programmed target value Y to the measured value Y. offsets available. In all mulli-offset cases, the work offset
setting stores the distance/rom the machine zero to the pro-
The actual tool motion in'the block N40 will be: gram zero 0/ the each part in the setup.
126 Chapter 18

For example, if there are three parts mounted on the table, Nt G56 XS.5 Y3.1 (SWITCH TO GS6)
each individual part will have its own program zero posi- NB GBO ZI.0 M09
lion associated with one work offset G code. N9 G9I G54 G2a ZO MOS (SWITCH TO GS4)
NlO MOl

r--- G56 X
,... G55X Blocks N3 through N5 relate to the tirst part, within the
G54X - G54 work offset. The block N6 will spot drill the hole of
the second part of the same setup, within the G55 work off-
set and the block N7 will spot drill the hole of the third part
of the same setup, within the G56 work offset. Note the re-
turn to the G54 work offset in block N9. Return to the de-
fault coordinate system is not required - it is only a sug-
gested good practice when the tool operation is completed,
The work offset selection is modal - take care of the transi-
I
tions between tools from one work offset to another.
i Bringing back the default offset G54 may always be helpful
at the end of each tool.
If all these blocks are in the same program, the control
unit will automatically determine the difference between
Figure 18-5
the current too! position and the same tool position within
Using multiple work offsets in one setup and one program. the next work offset. This is the greatest advantage of using
Three parts shown in the example,
work offsets - an advantage over the position compensation
and the position register alternatives. All mounted parts
Compare all possibJe motions in Figure 18-5:
may be identical or different from each other, as long as
(hey are in the same positions for the whole setup.
G90 GOO G54 xO YO

... will rapid from the current tool position, to the pro- • Z Axis Application
gram zero position of theftrst part. So far, there was a conspicuous absence of the Z axis
from aU discussions relating to the work offset. That was no
G90 GOO GSS XO YO
accident - it was intentional. Although any selected work
... will rapid from the current tool position. to the pro- offset can apply to the Z axis as well, and with exactly the
gram zero position of the second part. same logic as for X and Y axes, there is a better way of con-
trolling the Z axis, The method used for Z axis is in the
G90 GOO GS6 XO YO form of G43 and GM commands that relate speci fically to
the too/length compensation, more commonly known as
... will rapid from the current tool position, to the pro- the tool length offset. This important subject is discussed
gram zero position of the third part. separately in the next chapler. In the majority of program-
ming applications, the work offset is used only within the
Of course, the target position does not have to be part zero Xy plane. This is a typicaJ control system selling and may
(program zero) as shown in the exampJe - nOr1liaJly, the tool be represented by the following setup example of the stored
will be moved to the first cutting position right away, to values within the control register:
save the cycle time. The following program exampJe will
illustrate that concept. (G54) X-S.76l Y-7.819 ZO
(GSS) X-1S.387 Y-14.122 zo
In the example, a single hole will be spot drilled on each (GS6) X-22.733 Y-8.3S2 zo
of the three parts to the calculated depth of Z-0.14 (pro- (GS7)
gram 01801). Study the simplicity of transition from one
work offset to another - there are no cancellations - just a The ZO offset entry is very important in the examples and
new G code, new work offset. The control will do the rest in the machine control. The specified ZO means that the co-
ordinate setting for the Z amount (representing the height
OlSOl of the part) does not change from one part to another, even
Nl G20 if the XY setting does.
N2 G17 G40 GSO
N3 G90 GS4 GOO XS.5 Y3.1 S1000 M03 (G54 USED) The only time there is a need to consider Z axis within the
N4 G43 ZO.l HOl ~8 work offset setting is in those cases, where the height of
NS G99 GB2 RO.l Z-O.14 P100 FB.O each part in the setup is different. So far, only the X Y posi~
N6 G55 X5. 5 Y3. 1 (SWITCH TO GSS) tions were considered, as they had been the ones changing.
WORK OFFSETS 127

If the 2 amouot changes as well, that change must be con~_ HORIZONTAL MACHINE APPLICATION
sidered by modifying the coordinate register selling of the
control. This is the responsibility of the CNC operator, but
the programmer can learn an important lesson as well. Machining several parts in a single setup is done quite
frequently on CNC vertical machining centers. The multi-
ple work offset concept is especially useful for CNC hori-
zontal machi ning centers or boring mills, where many part
faces may have to be machined during a single setup.
Machining two, three, four, or more faces of the part on a
CNC horizontal machining center is a typical everyday
work in many companies. For this purpose, the work offset
selection is a welcome tool. For example, the program zero
at the pivot point of the indexing table can be set for the X
and Y axes. Program selling of the Z axis may be in the

~:!'~-:-Dr;c
,...----, - r
-- same position (the pivot point of the indexing table) or it
can be on the face of each indexed position - either choice is
acceptable. The work offset handles this application very
nicely, up to six faces with a standard range of the G codes.
G56 , G54
" _ _ M. ........ .. ................. "" . . . . .,

TABLE There is no significant difference in the programming ap-


proach - the switch from one work offset to another is
Figure 18-6 programmed exactly the same way as for the vertical ma-
Setting of work offsets {Dr a variable part height chining applications. The only change is that the 2 axis will
be retracted (0 a clear position and the table indexing will
Figure 18-6 shows some typicaJ and common possibili- usually be programmed between the work offset change.
ties used for special parts that have a variable height within
the same tool setup. The difference between part heights
Figure 18-71l1ustrates a typical setting for four faces of a
has to be always known, either from the part drawing speci- part, where 20 is at the top of each part face. There could be
as many faces as there are table indexing positions. In ei-
fications or from actual measurements at the machine.
ther case, Ihe programming approach would be similar if
If the previous multi-offset example for XY setting are 20 were at the center of indexing table, which is also quite a
also adapted for the Z axis, the work offset can be set up for common setup application. See Chapter 46 for more de-
parts within the same setup, but with variable heights. This tails relating to horizontal machining.
variable height is controlled by the Z axis. The result of the
setting will reflect the difference in height between the
measured Z axis surfacc for one part and thc mcasured 2
axis surface for the other parts. Based on the data in the pre-
vious example, combined with the 2 values shown in Fig-
ure 18-6, the control system settings may look like this:

(054) X-S.761 Y-7.819 ZO 8180


(GSS) X-lS.387 Y-14.122 Z-O.40S

~~8~,g
(056) X-22.733 Y-S.3S2 ZO.356

The important thing to know about the control of the Z -...j i I t:O
axis within the selected work offset is that It works in very 0,
- A
close conjunction with the tool length offset, discussed in 1""._ _-""-,""""--,-""-,""""""
the next chapler (Chapter 19). Stored amount of the Z axis 80
setting within a work offset will be applied to the actual tool
motion and used to adjust this malian, according (0 the set-
ting of the tool length offset. An example may help.
For instance, if the tool length offset of a particular cut-
ting tool is measured as 2-10.0, the actual motion of such a
tool to the program zero along Z axis will be -10.0 Inches
within the 054 work offset, -10.408 within the G55 work Figure 18-7
offset. and -9.644 within the 056 offset - all using the ex-
Example of work offsets applied fo a horizontal machining center
amples in the previous illustration, shown in Figure J8-6.
128 Chapter 18

EXTERNAL WORK OFFSETS work offsets, as well as any additional


will be by the values set in the exter-
nal offset, based on the setting .
A careful look at a typical work screen display all programmable coordinate systems will
reveals one offset that is identified by one of the fol- name for special offset is Work or more
lowing often, the External Work Offset.
o 00 (EXT)
o 00 (COM) LATHE APPLICATIONS
The two zeros - 00 - that this work offset is not Originally, work coordinate ~ystem was designed f~r
one of the standard six G54-G59. offsets are CNC machining centers only. It did not take to apply It
identified by numbers 0 I 06. The designation to CNC lathes as well. The operation, logically and physi-
also implies that this is nol a programmable at least is identical to that for machining centers. work
not by using the CNC program~ing . offsets CNC lathes eliminates awkward use
Fanuc Macro B option allow programming thIS or (;92 and makes the lathe setup operation much
The abbreviation EXT means External, the abbrevia- and
tion COM means Common. machine will have
one or the other but not both. a maHer of • Types of Offsets
curiosity, the COM designation is found on older main difference in applying work offsets on a is
UJ!'!'''I"I-'r\v the EXT designation is more recent. The
that seldom will there a need for more than one
With computer market, COM offset. work offsets are a possibility, three or more are
abbreviation become facto standard abbreviation used for some special and complex G54 to
for the word communications. Fanuc also sup- commands are available on all modern lathes
several communication methods, including the con- customary to ignore the work
with a personal computer, some time ago, COM in program, more !han one offset is
designation has replaced with the designation means the CNC lathe programmer on the
EXT, to prevent possible confusion between the two G54 setting as a rule.
viations in computing.
Two special offset features found on the control
Either ahhreviation to the same and has the systems nre (he Geometry Wear offsets, on the
same purpose. On screen this special is same screen dispJay, or on screens, depending on
usually located before or above for G54. ex- the control model.
ample, as illustrated in Figure 18-8:
• Geometry Offset
00 (EXT) 01 (G54) Geomerry is the equivalent of a
known from milling controls. It rpl"lf"PCf'ntc
X 0.0000 X -12.5543 tool reference poinllo program zero, measured from
the zero along a selected Typically, on a
Y 0.0000 Y 7.4462 bed CNC lathes, with the tool turret above the spindle cen-
0.0000 Z 0.0000 terline, the geometry offset both X and Z axes will be
negative. Figure /8-9 illustrates reasonable geometry val-
ues for a drill, turning tool and bar (TO I , T03).
of an feXl'emi~IJ work offset display (EXT ::::: COM)
t:){tlll/ul/::
GEOMETRY OFFSET
difference between an or common No.. X _. _TIP'
_ ...1
work is that it is not programmable with any particu-
G code. ly set to zero for all axes. 01 . 0.0000 0
Any nOll-zero work offset in a very 02' -8.6470 0.0469 3
important way: -9,0720 0.0313 2
04 0.0000 0,0000 0
05 0.0000 0.0000 a
18·9
Typical data emries for a lathe tool GEOMETRY offset
WORK OFFSETS 129

• Wear Offset TOOL SETUP


The wear offset is also known and used on milling con-
trols, but only for the tool length offset and the cutter radius In the next three illustrations is a very similar layout as
offset, not for the work coordinate system (work offset). that shown in Chapter 16, describing the use of GSO regis-
ter method (position register command used in the pro-
On the CNC lathes, the purpose of the wear ofrsel is iden-
gram). Compare the TWO illustrations!
tical to that for machining centers. This offset compensates
for the tool wear and is also used to make fine adjustments The setup of the CNC lathe is identical in both cases, ex-
to the geometry offsets. As a rule, once the geometry offset cept for the method and purpose of the posicion measuring.
for a given tool is set, lhat setting should be Jeft unchanged. All illustrations in the applications also match the reason-
Any adjuslments and fine lunillg of actual pan dimensions able data entered In the too! geometry and the tool wear off-
should be done by the wear offset only. set screens of the control.
Typical values along the X axis are always negative (as
WEAR OFFSET shown in illustrations), lypical values along the Z axis are
No.j X OFFSET. Z OFFSET RADIUS TIP usually negative. A positive value is also possible, but thaI
_M··t
means the tool is above work and tool changing can be very
01 0.0000 0.0000 0.0000 0 dangerous. Watch OUf for such situations'!
02 -0.0060 0.0000 0.0469 3
0.0000 0.0040 0.0313 2 The actual selling procedures are subject of a CNC ma-
03
chine operation training and not practical to cover in a
04 0.0000 0.0000 0.0000 0 programming handbook. There are additional methods,
05 0.0000 0.0000 0.0000 0 also part of machine training, that allow faster tool setting,
using one tool as a master and setting all the remaining
Figure 18- 70 tools relative to the mas/er tool.
Typical data entries for a lathe tool WEAR offset
• Center line Tools
Figure J8-10 shows some reasonable sample entries in Tools that work on the spindle center line are tools that
the wear offset registers. The tool radius and tip number have their tool tip located on the center line during machin-
seHings appear in both displays and the display in both
ing. This area covers all center drills, spot drills, various
screens is automalic after the oifset value input. The tool
drills, reamers, laps, even end mills used for flat bottom
nose radius and the tool tip orientation number are unique holes. At the same time, it disqualifies all boring bars, since
to CNC lathe controls.
their tool tip does not normally lie on the spindle center line
during machining. Center line tools are always measured
• Tool and Offset Numbers
from the center tine of the tool to the center I ine of the spin-
Just like tools on CNC machining centers have numbers, dle along the X axis and from the tool tip to the program
they have numbers on CNC lathes as well. Usually, only zero along the Z axis. Figure 18-11 illustrates a typical set-
one coordinate offset is used, but different tool numbers. ting for center line tools.
Remember, the tool number for a lathe has four digits, for
example, 1'0404: TURRET AT
TOOL CHANGE POSITION
o The first two digits select the tool indexing station (turret
station) and the geometry offset number. There is no T01
choice here. Tool in station 4, for example, will also use GEOM (Z)
geometry offset number 4.
o The second two digits are for the wear offset register
number only. They do not have to be the same as the tool
number, but it makes sense to match the numbers, if ~
possible. o
~
Depending on the control model and the display screen ~
size. the tool offset register may have a separate screen dis- o
LU
play (page) for (he geometry and wear offsets, or both off- (!) ,,
set types may be shown on the same screen display. The - --- - --<;
work offset values (work coordinates) are always placed in
the Geometry offset column. Figure 18-1 7
Typical geometry offset setting for CENTER liNE tools
130 Chapter 18

• Turning Tools • Boring Tools


Turning tools - or Boring tools - or tools - are measured
imaginary tool tip to program zero, the imaginary tip to program zero, along the X
a negative diameter) and along the Z axis (typically as a diameter) along the Z axis,
ative as well. Keep in if the culling tool typically as a value as well. In majority of cases.
sen (for turning or boring) is changed from one radius to the X value of a boring tool will
another radius in the same Lool holder, the setup that for a turning or other
change marginal,
change is enough to cause a scrap, so a boring operations, same as for turning operations,
good care is For turning, be extra careful for a tool also be extra for a lool nose that changes
nose thaLchanges from a larger to a smaller from a larger to a smaller It is (he same as a
for example, from 3/64 (RO.0469) to lJ32 (RO.03l turning 1001. The scrap can be made very easily.

• Command Point and Tool Work Offset


TURRET AT
CHANGE POSITION various reasons, it is quite common to
ting insert in the of work. primarily to fa-
vorable CULLing conditions and to keep dimensional toler-
ances within drawing specifications. Cutting inserts are
(0 very high but a certain
anee devialion should be expected between inserts ob-
tained from different sources. If changing an it is
to adjust the wear for precision work. in order
to prevem the part.
Tool inserlS of same shape and but
with a different nose radius. Always cautious when re-
an insert with an that has a
tool nose radius. to be
by the proper amount.
Figure 18·12
geometry offset setting for EXTERNAL tools
··0.0016 -1~- 0.0016
Figure 18-12 a typical geometry for a
turning (external) tool and Figure 18-13 illustrates a typical
geometry setting

TOOL
a boring (internal) tool.
RO.0156 RO.0313

b J
I

GEOM (2) 0.0136 0.01

Figure 18·14
Setting error caused by a different insert radius in the same holder

example in Figure for a


1/32 ( .0313) nose radius (middle). and the error for
a radius that is (left) and one that is larger (right).
The dimensions the amount for the partic-
ular in the example.

Figure 18·13
Typica/g8ometry offset setting for INTERNAL tools
TOOL LENGTH OFFSET

far. we have looked at two methods of compensation out, the rest is hidden in the holder. tool holder is
for the actual position of the cutting tool in relation to the mounted in by means of a standardized tooling
machine reference point. One method was the type, Tool designations. such as the common sizes
position compensation, the other was the contempo- HSK63, HSKlOO, BT40 and are examples of es-
rary work coordinate system method (work offset). In both tablished European Any tool
cases, the emphasis was only on the X and Y axes, not on within its category will fit any machine tool de-
the Z axis. Although the Z axis could have been included signed for that category. This isjust one more precision fea-
with method, would not have been very ture built inlo the CNC machine.
practical. main reason is the nature of CNC work.
length of a tool for the purposes CNC program-
decides on setup of a part in ming must always be associated wilh the tool holder and in
the fixture appropriate location of XYZ relation to machine design. For that purpose, manufac-
program z.ero (part reference point or part zero). When turers build a precision reference position into the spindle,
usIng work offsets, XY axes are always measured from the called the gauge line.
machine reference point to the zero position. By a
strict definition, the same rule applies (0 the Z The • Gauge Une
major is that the measured values will re-
main unchanged for all tools, whether there is one tool used When the 1001 holder with the cutting lool is mounted in
or one hundred tools. That is not the case with the Z the spindle of a CNC machine, own taper is mounted
against an opposite taper in the spindle and held in tightly
The reason? tool has a different length. by a pullbar. The precision manufacturing allows for a
constant location of the tool holder (any tool holder) in
GENERAL PRINCIPLES spindle. position is used for reference and is com-
called the gauge line. the name it is an
line for
The length of cutting tool has to be accounted for in Figure 19-1.
every program for a CNC machinIng center. Since (he
earliest applications of numerical control, various tech~
niques of programming tool length have They
GAUGE LINE
belong into one of two basic groups:
AT MACHINE w
()
o Actual tool length is known «
I.L
a Actual tool length is unknown
Needless to say, each group requires its own unique pro-
gramming technique. To understand concept of tool
t W
.J

.
SPINDLE co
length in CNC programming, it is important to understand MOTION «
I-;-
meaning of the phrase actual length. This length is I

known as the physical tool length or just tool


length and has a very specific meaning in CNC program-
ming and setup.
Fjgure 19-1
• Actual T001 length Typical front view CNC vertical machining center
tool By holding a typical
drill, we can physical length with a measuring We use the gauge line for accurate measuring of lOa!
device. In human terms, a six inch long drill has a length of length and tool mali on along the Z axis. Gauge is
inches, measured from one to the other. In CNC by machine manufacturer is closely re-
programming that is still true, but not quite as relevant. A lated to another precision face, called the machine rabIe,
drill - or of her cutting 1001 - is normally mounted in a
actually, the table top face. The gauge Ii ne is one of a
tool holder and only a portion of the actual tool projects that is with another plane - table

131.
132 Chapter 19

• labia lop Face is also a convenient block to add coolant function


Every machining center a built-in machine ta- MOS for the current tool:
on which the fixture and part are mounted. Top of the
N66 043 Zl.O H04 MUS
table is precision to flatness and
for located The resulting motion in the example will be to 1.0 inch
In addition, the table is located a certain fixed distance above part zero. The control system will calculate the
from the gauge line. like the position of tool holder distance to go, based on the value of H offset stored by the
in the spindle cannot be changed, the position of table operator during setup.
for a removable table using a palette system) cannot /9-2 shows a Lypical screen for the tool length
be of the table creates another
reference plane that is related to the line and parallel
to il as well. This arrangement allows to accurately pro- TOOL OFFSET (LENGTH)
gram a tool motion along the Z
No. GEOMETRY WEAR
The tool length offset (compensation) can be defined: 001 -6.7430 0.0000
002 8970 0.0000
003 -7.4700 0.0000
004 0.0000 0.0000
005 0.0000 0.0000
The most significant benefit of tool length in CNC 006 0.0000 0.0000
programming is that it enables programmer to design a
complete program. using as many tools as necessary. with-
out actually knowing the actual length of any Figure 79·2
Typical too/length offset entry screen
TOOL lENGTH OFFSET COMMANDS set entry. Note that the actual display will vary from one
control to and the wear offset may not be
Fanuc systems and several other machine controls offer on some controls. The wear offset (if available) is only used
three commands relating to the tool length offset - all are adjustments to tMllength as a separate screen entry.
G commands:
044 command is hardly ever used in a program - in
fact. it has the dubious distinction of being the least used
commands of all Fanuc G codes. Its comparison with G43
All three commands are only applicable to the Z is described later in this chapter.
Unlike the work offset commands G54-G59, G43 or G44
cannot without a further specification. They can Many CNC programmers and operators may not reaJize
only be used wilh an offset number designated by the that the Z axis setting in a work offset (054-G59) is
dress The address H mUSI be followed by up 10 three vel)' important for the tool offset. The reason why
digits, on the number of offsets available within will be clear in the coming descriptions of different meth-
the ods of 1001 length setting.
programming manuals suggest the or
G43 G46 commands can also used for tool length offset. Al-
G44 offset though this is still (rue Loday and may have had some
in the early days, il is best to avoid them. First, the
G49 position commands are not used very much anymore and,
HOD offset cancel second. they can be used with the X and Y axes and do
not truly represent the Z axis
H.. Tool length offset number selection
• Distance-lo-Go in Z Axis
Tool length offset should always programmed in the In order to interpret how the CNC system uses tool
absolute mode G90. A typical program entry will be the length command, the programmer or operator should
043 or 044 command, followed by the Z axis able 10 calculate distance-fo-go the cutting tool. The
tion and the H number: logic behind the tool length is simple:
N66 G43 Zl.O H04
TOOL LENGTH 1

a The value of the H offset will be added \0 the target Z position G43 z-O. 625 H07 .....
if G43 is used, because G43 is defined as the positive tool
length offset 054 along Z is set to 0.0500, Z axis target is -0.625
o The value of the Hoffset will subtracted from the target the H07 is -8.28. The distance-to-go calculation uses the
Z position if G44 is used, G44 is defined as the same fonnula. but with values:
negative tool length offset
Za == (+0.05) + (-0. + (-8.28)
target position in cases is the absolute Z = 0 . 05 - O. 625 - 8 ~ 28
COOirQulate in the prognun. Z setting of the == -8.855
(G54-G59), the H value, the Z axis target are all
,_ ....- distance-to-go. can accurately calculated. Again., the fonnula works and can be used
control system will use any distance-to-go calculation along the Z axis. '"'yr.....n_

mentmlg with other settings may be useful.

Zd :::: Wz + +H TOOL lENGTH SETUP


S' where ...
of a tool used for (consisting of the
= Distance-to-go along Z axis and the tool holder), can be set directly on the
Work coordinate value U"\.,~1.J.J.L'" or away from it. These setup options are of-
~ position in Z (Z coordinate) on-machine or off-machine tool length setups.
H of the applied H offset number an advantage and it corresponding
disadvantage. They both share a relationship to the
e Example - Wz = 0: as it applies to the tool or its pro-
two setup options are to
G43 ZO.l H01 ..... where: and often cause (or at
some friendly disagreements) progrnm-
G54 Z is set to lO, Z axis '"''"'"..........'... is 0.1 and HO 1 each setup option its advan-
is set to then the distance-to-go will disadvantages. Which one appears to be
will depend on many factors as well.
~ == 0 + (+0.1) + (-6.743)
o + 0.1 - 6.743 options require involvement of two people, or at
::::: -6.643 least two professional skills - the CNe programmer and the
CNe operator. The question narrows down to who is going
The distance-lo-go will be to do what when. To be fair, both have to do
In sure the fomru1a is always correct, try to something. programmer has to •__ ~~, T

tools their number (the T address)


offset for G43 or the H ad-
e Example Wr = 0.0200: dress operator to physically set the
register the measured values of H
In this ,,"'..... i}, ....., the program contains CNC system memory,
G43 Zl. 0 H03 ..... where: • On-Machine Tool length Setting
Z is set to 0.0200, Z axis is .0 and the the bulk: of on-machine re-
value of H03 is CNe operator. Typically,
places a tool spindle and measures the d1S~t.an(~e
~ = (+0.02) + (+1.0) + (-7.41) tool travels from machine zero to part 'Zero (nf',nor~m
= 0 . 02 + 1.0 - 7.47 This work can only done between jobs definItely
"'" -6.45 nonproductive. It can justified under
stances, jobbing shops and jobs
The result is ",.., ...."""l"1t the tool will travel or for with very few people. Although the
towards the distance-to-go will setting of a number of tools will take longer
In the last a negative target IJU"......'-,.u is than setting a tools, there are setup methods avail-
able to the CNe that allow reasonably speedy
e Example - Wz 0.0500: on-mach ine tool setup, namely using the master tool

The program contalns a negative Z coordinate: -' method, descnbed


efit of this
in this section. The one major ben-
it does not require
additional a skilled person to op.:!ralte
\
1 Chapter 19

• Off-Machine Tool length Setting The figure a common setup a CNC vertical
In technical terms~ the off-machine requires the machining center, looking from the front of the machine, a
work of a skilled tool setter or a CNC operator. Since the typical operator's viewpoint. column is located
seltln o is done away from the machine, a special equipment a1 machine zero position. This limit switch
is req~ired, adding to overall cost of manufacturing. tion positive Z axis travel and is necessary for the auto-
This equipment can a simple fixture with a height gage tool change on vil1ually all machining centers. All
(even made or a more expensive, commercially four illustrated dimensions are either known, can found
available digital display device. in various instruction or service manuals, or can be physi-
cally They are always considered as known
• Tool Length Offset Value Register or dimensions and used as critical
for uceurate machine
Whichever method the tool length setting is used, it Q Distance between the tool gauge line and
U\JI., ....... '" a value that represents the length the the tool cutting point
selected lOol. This value is by and must be
somehow supplied to the program, before the job is ma- ... dimension A in the illustration
chined. The must register meusured value into
the system, the heading on the control panel. Q Distance between the tool cutting point and the ZO
(program zero of the part)
The control syslem contains a special registry for the tool
usually under of tool set- '" dimension B in the illustration
length o.{fset, toollenglh compensation off Q of the part (distance between
of the exact heading, the sellmg procedure the table and ZO of part)
measured length is entered into Ihe con-
trol, so it can by the program. The ... dimension C in fhe iJlustration
is always well within Z aXIs travel limits of the ma-
Q Total of all three previous dimensions
chine. yet still allows for clearances for the part (distance between the tool gauge line and the table top}
and the tool Chan2,f:S.
To the tool length offset, try to fully ... dimension Din the illustration
stand theZ motion geometry orthe machine It is rather rare that the programmer or the operator would
first. On vertical and horizontal machining centers, look at always know all four dimensions. Even If that were possi-
1he XZ plane, which is the top part for both. The ble, some calculations would not be worthwhile The
pies are identical, but will be on the reality is that only some dimensions are known or can be
chining center layout. found out relatively easily.

Z AXIS RELATIONSHIPS In the illustration, the dimension D is known,


cause it is distance determined by the machme manu-
facturer. It not possible to know the C
To understand the general principles of tool length (height of part with clearances), but with planning
let's look at the schematic illustration of a typical for common setup, this dimension can be known as well.
a vertical machining center - Figure
That leaves A - the between the (001
gauge line and the tool cutting point. There is no ~ther
LINE method to find this dimension, but to actually measure It. In
'i 1- - earller of numerical control, this A had to
r
MACHINE ZERO
A always known embedded in the program. D<;;;""a'J"""
of the inconvenIences involved in finding this dimension,
Olher methods have later.
0 Today, three methods are considered in programming
B length setup, including the original method:
I
Q Preset tool method is the original method
... it is based on an external tool setting device
Q Touch-off method is the most common method
"-..Y' it is on the measurement at the ma,r.mfle
Figure 19-3 o Master tool method is the most efficient method
Z axis relationships of the machine, cutting tool, table top ... it is based to the length of the longest tool
and the height
TOOL OFFSET 1

benefits. The CNC programmer con- the tool length measurement "" ..",,..,,,,,0"
and chooses one method over cutting tip of the Lool to the gauge line is accu-
these methods and operations do not determined - Figure 19-4. Preset tools will the
process directly - they are meth- already mounted in a tool holder, by
setup on the machine only. For proper un- number of the tool and with the list of measured
subject CNC programmers, they DIe tool lengths. All the CNC operator to do, is to set re-
of which setting method tools into the magazine and register each tool length
t",...,,,,v,,,, to the selected setting in the offset register, using the proper offset number.
a comment or message .

• Preset Tool length


to preset the length of cutting tools
rather than during the machine
setup. This the method of setting tool
lengths. There are some in this approach - the most
notable is the elimination of nonproductive time spenl dur-
ing setup. Another applies to horizontal machining
centers, where zero is to the center of
the rotary or table. are disadvantages as 04
well. tool length 05 8.5000
external 06

.. T001 length by Touch Off


cutting are set at the ex-
machine runs a production The tool length that uses the touch-off method is very
IS no machine when jobs do common, jn spite some loss during setup. As the il-
change. All the operator is to enter the measured lustration in Figure each tool is assigned an H
values into the offset that portion of the number (similar to example), called the tool
setup can be done by using the op- length offset number:
tional G I 0 command
This melhod also a person responsible GAUGE
for presetting the cutting tools, A number of small and UNE-
medium users with vertical laClnmln~ centers cannot af-
ford the additional of the cul-
ting tools during the part Ihe louch-off
method. This method may when
small job runs are machined. IS
scribed in the next secnon.

GAUGE
UNE- -
Figure 19·5
Touch-off method of the too/length offset

T___- - -, PART
is to
machine zero po-
This distance
corresponding H
menu of the
19-4 system, The important notion is that the Z axis
Tool len pleset away from the machine
settings for any work offset and the common off-
WOlk at (G54-G59) must be used set are normally set to ZO.oooo.
• Using a Master Tool length
Using the touch-off method to measure tool length can be
significantly speeded up by using a special method a
I1Ulster tool, usually the longest tool. This tool can a real
or just a long bar with a tip, permanently
mounted in a tool holder. Within the Z travel, this new
'(001' usually extend out more anticipated
too) that be used.
and the work nor-
contain theZ set to 0.0, when the part touch-off
is used. This setting will change for master tool
length The master tool length measurement is very
efficient requires the following setup It
vides suggested steps may need some modification: Figure 19-8
the master tool
the master tool and place it in the spindle. with setting of
2. lero the l axis and make sure the read-out on the
relative screen is lO.OOO or lO.OOOO. The greatest benefit of this seuing method is shortened
setup If certain tools are for of jobs, only
3. Measure the tool length the master tool, using the the length of the master tool needs to be redefined for any
touch-off method described previously. After touching new pan height while all other tools unchanged.
the measured the tool in that position!
They are related to the master tool
4. Instead of registering the measured value to the tool
length offset number, register it into the common work • 643-G44 Difference
offset or one of the G54-G59 work offsets under the
1 setting! It will be 8 negative value, Initial a.t the beginning of chapter indi-
5. While the master is touching the measured face, cates that Fanuc and similar CNC systems offer two
set the relative l read-out to zero! commands that activate the tool offset.
two are and G44. Most programmers use
'6, Measure every other tool, using the touch-off method. G43 command exclusively in the program and may
The will be from master tool tip, not from have some I.Hlliculty to interpret the meaning of G44 com-
machine zero.
mand, they have never used it. is a good rea-
7. Enter the measured under the H number, son why G44 IS a dormant command - not quite dead but
in the tool length offset screen. It will always be barely breathing. would to know how -
a negative value for any tool shorter than the master tool. and when - or even to use one over the other. is an
e Note: attempt at explanation.
First, a look at the definitions found in various CNC
reference books and manufacturers' specifications
In different versions of these publications, the following
typical are - all are quoted literally and all
are correct:
Choosing tool as master tool, the procedure is
logically same, except (he H offset entries will be positive G43 Plus offset
for any tool that is than the master and they will G44 Minus offset
neRative any tool is shorter master. In
rare case where the measured tool will have exactly the G43 Tool length offset
same length as master too), offset entry for that tool G44 Tool offset ~:I""_"""
will be zero. Illustration in 19-6 shows the concept
of master tool setting. G43 Plus direction
G44 Minus direction
Arter master tool into
axis of work offset, enter distance the tool These definitions are correct only if within the con-
new tool to the tool tip of the master tool, and text their meaning into consideration, That context is not
in appropriate H offset If the tool is an clear from of these Plus to where?
actual tool, rather a plain used for H off- of what? (he context, think about use of
set value must be always set to 0.0. the toollenglh on a CNC machine. What is the pur-
pose of the tool length
LENGTH 1

main and most important purpose of any tool length exactly the same
is to allow a CNC program to be away not the
from the machine, away from tooling and fix\uring, and ming method). Program will tool length
without knowing the cutting tool length pro- command (043 or 044), followed by the target position
development. along the Z axis and the H number:
process has two - one is in the
043 Z1.0 H06 or 044 Zl.O H06
at the machine. program, either
or 044 command is together with The system cannot any benefits, until
number - that lS done the programmer. Al measured value for H06 is the offset registers.
tool length offset can be set on or off the if the H06 has been as 7.6385, it will
ther way. the tool is measured and as a negative value, is used, and as a positive
is entered into control - that is the job the opera- value, ifG44 is used (1001 motions will be identical):
lor. It is the machine that has a number of
variations - of only two G
G43 Zl.O H06 .....• H06 = 7.6385
G44 Zl.O H06 ...... H06 +7.6385

LINE It is {hat the

actual Z axis is
culated. USing G43, the H value will be added (+) in
the calculation. Using 044, the H offset value will
"'/U"bn (-).The a~avel motion will be:

043: Z + H06 (1.0) + (-7.6385) :::: -6.6385


044: Z - H06 : (1.0) - (+7.6385) = -6.6385

(oollenglh machine
(touch-off) will result in with negative The
selup process can automatically input all
Figure 19-7
the offset as negative. That is reason why
Less common method of the tool length offset
Work offset (typically must be set as well. 043 is the standard command to program tool length off-
set. G44 is just flOt practical for everyday work.
Figure 19-7 illustrates one of two ITlF'.r"v" to sel a
length command - 054 or other work must be used. PROGRAMMING fORMATS

GAUGE Programming format for 1001 length is very


LINE and has been illustrated many times. the following ex-
amples are some general applications of various methods.
The fLfst one will show programming method if no tool
length offset is available. Understanding the development
of tool length over the years it easier to apply
f it in the Other example a comparison of
for the programming
mru1p1m G54 to 059 The last example
shows the to method appl1ed (Q a simple program
using three tools, a typical way of programming today .

• Tool length Offset not Available


Figure 19-8 In the early days of programming, tool length offset and
More common method of using the tool length offset. work were not available. G92 position register com-
No work offset setting is required and 643 is the preferred choice. mand was G the current tool
illustrates the other, and much more com- position. programmer had to every
In this case, all work offset com.!lli!nds mension specifled by the machine manufacturer
will normally have a Z value set to 0.0. and dimension of (he job specifically
distance ZfJ to the tool
138 Chapter 19
---
i""iII---- G45X.. H31 _ _ _--'.!., ......I - -_ _ G45X .. H31 _ _ _~..;.,
Block N3 Block N3
G92X3.4Y2.8 G92X3.4Y2.8

Y2.8 Y2.8

GAUGE GAUGE
LINE LINE

G92Z9.0 (Block N6)

Figure 19·9
Setting too/length without too/length offset· program 01901 Setting tool length with G43 tZl and G92 (XYj • mnr''''ITn

This early program reqUIred the position compensation In an improved program. the tool IS
command G45 or in XY axes and the position register plied 10 Ihe firs! mOl ion command of
command G92 in XYZ axes. Each must start at ma-
chine zero - Figure 19-9: 01902
Nl G20 (INCH MODE SE:'.LECTED)
01901 N2 G92 XO YO ZO (MACHINE ZERO POSITION)
m G20 (meR MODE SEL.ECI'ED) N3 G90 GOO G45 JO.4 101 (x POSITION COMP)
N2 G92 XO YO ZO (MAonNE ZERO POSITION) N4 G45 Y2.8 832 (Y POSITION COMP)
N3 a90 GOO G4S Xl.4 H31 (X POSITION COMP) N5 G92 X3. 4 Y2. 8 (TOOL POSITION R.:IOOIIS~rER
N4 G45 Y2. B H32 (Y POSITION COMP) N6 G43 Zl.0 HOI LENGTH COMP Z)
N5 a92 X3. 4 Y2. 8 (TOOL pas REGISTER N7 S850 MO) CClMMANDS)
No G92 Z9. 0 (TOOL POS REGISTER Z) N8 GOI ZO.l F1S.0 MOS (Z APPROACH MOTION)
N7 S850 MOl (SPINDLE COMMANDS) N9 Z-O.89 F7.0 (Z CUTTING MOTION)
N8 GOl ZO.l F1S.0 M08 (Z APPROACH MOTION) NlO GOO ZO.l M09 RAPID RETRACT)
N9 Z-O.89 F7.0 (Z CUTTING MOTION) Nll G28 X3. 4 Y2. 8 Zl.O (MAC.HJliIB ZERO R.E'I'lJlm)
mo GOO ZO.l M09 RAPID "-"' .• ......,.'" N12 G49 DOO HOO (OFFSETS CANCELLATI~
Nll Z9. 0 (Ml\.CHDl'E ZIi:RO RBTORN z) Nl3 M3 0 (END OF PROGRAM)
Nl2 X-.2 • 0 Yl0. 0 POSITION %
N13 M30 (END OF PROGRAM)
% When a program is developed using blocks N6 and
N7 can be joined together for convenience. if
• T001 length Offset and G92
N6 G43 Zl.0 S850 MOl HOI
When the tool length became available, program- NI
ming became The position compensation G45JG46
was SliH in use at the and had (0 be set for both X method has no effect on the tool length offset, only
Y axes. However, G92 setting for the Z axis was re- on the moment at which the spindle starts rotating. Position
placed by or 044 command, with an assi~led H offset and the 1001 length cannot pro-
number - Figure 10. grammed in the same block.

Today, this method position Note that position compensation is still in effect in
tian G45/G46 tool offset G43JG44 is due to the lack work coordinate of
obsolete, or alleast quile old-fa<;hionecL Only (he
in programming, with the position.
139

• Tool length Offset and G54-G59 • Tool length Offset and Multiple Tools
most programming has many of CNC programs include more than one
and functions available and G54-G59 series is one most jobs will require many different tools.
The has been replaced with work offset sys- (independent of the previous drawings)
and, optionally, more. Normally, 092 is not a common method how the enters
same program that contains any work offset se- three tools.
through 059 or the extended series.
holes need to spot-drilled, drilled and tapped.
example of using the tool length
.... rr..."."fTI or explanation of the is not
work environment: . just concentrate on
It is the program structure that is now -
01903 note is no change in the program structure
N1 G20 (meR MODE "''''''"....'''' .......... tool, only in the programmed
N2 G90 GOO G54 Xl.4 Y2.S (XY TARGET LOCATION)
N3 G43 Zl.0 H01 (TOOL LENGTH COMP Z)
01904
N4 saso M03 (SPINDLE caaM1iNDS) Nl G20
N5 G01 ZO.l F15.0 Moa (Z APPROACH MO'lr:r:Ol~l
N2 G17 G40 GBO TOl
N6 Z-0.89 F7.0 (Z ClJI'TmG MOTION)
N3 M06
N7 GOO ZO.l M09 (z RAPID N4 G90 GOO G54 Xl.O Yl.5 S1800 MOl T02
N8 G28 Xl.4 Y2.S Zl.0 (MACHINE ZERO
NS G43 ZO.S HOl MOB (TOOL LG OFFSET FOR
N9 G49 DOD HOO (OFFSETS crua:LLl~TION)
N6 G99 G82 RO.l Z-O.145 P200 FS.O
NlO M30 (END OF Iff.N..NIU!<.to.W}
N7 X2.0 Y2.S
% N8 Xl.O Yl.5
N9 GSO zo.s M09
G54X .. NlO G2B ZO.S MOS
Block N2 Nl1 MOl
X3.4 N12 T02
Nl3 M06
Nl4 G90 GOO G54 Xl.O Yl.5 S1600 Mal TOl
Nl5 G43 ZO.S H02 MOB LG OFFSET FOR T02)
Nl6 G99 G81 RO.l Z-O.89 F7.0
Nl? JU.O Y2. 5
Nl8 Xl-O Yl. S
Nl9 GSO ZO.S M09
GAUGE N20 G28 ZO.S M05
LlNE N2l MOl

N22 T03
N23 M06
N24 G90 GOO GS4 Xl.a Yl.5 S740 MOl TOl
N2S G43 Zl.O H03 MOB (TOOL LG OFFSET FOR T03)
N26 G99 GB4 RQ.S Z-l.O F37.0
N27 X2. 0 Y2. S
N28 Xl.O Yl.S
N29 GBO Zl.O M09
mo G2B Zl.O 14'05
N31 M30
%
Figure 19-11
Setting too/length with 643 (Zl and 1.:1'!)~f-U~" (XY) • program 01903

In this example. Figure 19- work offsets G54


through 059, (he blocks N2, N3 can be joined to-
gether without a problem, up processing:

N2 G90 GOO G54 G43 Xl.4 Y2.B Zl.0 S850 M3 HOl


N3 ...

The command axes, 043 with HO I Also note that is no tool offset cancellation.
will affect only the Z must move in the clear. Cancellation will also explained later in this chapter.
140 Chapter 19

CHANGING TOOL lENGTH OFFSET


vast majority of programming only a
tool offset command tool. Based
we have identified 1) with tool . 0.1
I , Tool 2 (T02) with tool offset H02, L
C
some special the tool !
may to be the same tooL In
applications, there two or more tool length 007 H07 H27
for one tool. I

An example of a single tool length


that uses two or more
axis. Figure /9-/2 '11"Nr~.!"'("
groove dimensioned by its depth location
bottom (groove width of .220 is implied).

- 4.0 Figure 19· 13


of two length offsets for a single tool. The dIftS"8ni~8
r between H07 and H27 offsets is the widih of slot (.125

Note words - the boltom edge versus fOP edge of


the slot milL Which edge is programmed as a reference for
the tool length? The one at the bottom or the top?
4.0 /3 ~hows that two ...",f.o.,..".,,,,..,, position~ are used
two
LOa I •"",,, . .
,H.,,VH. 007 is
cutter radius offset, and .125 is the un.., .....' ... mill width.
/ ~- 1213.5
methods of programming can for exam-
calculating the difference manually, method us-
multiple tool length offsets is during ma-
Lo allow fine groove width It is shown
example - program
,.
I

01905
(TWO TOOL LENGTH OFFSETS FOR ONE TOOL)
Nl G20
Figure 19·12 N2 G17 G40 G80
Example of programming more than one tool length offset for a N3 G90 GOO G54 XO YO S600 M03
single tool· program 01905 N4 G43 Zl.0 HO? MOS JOB CY...EARANCE)
NS G01 Z-0.65 F20.0 ~~~ EDGE - BOTTOM)

Based on the illustration, we to decide on the l..UlIllIl)t:. N6 M98 P7000 """""""""'"IY"I GROOVE AT Z- 0.65)
method flISl (premachiril~g the 03.000 hole is as- N7 G43 Z-O.43 827 EDGE - TOP)
sumed). A .125 wide slot mill will be a good choice to NS M98 P7000 GROOVE AT Z-O.43)
file the circle, milling method for a fuJI N9 GOO Zl. 0 Ma9
NlO G28 Zl.O MOS
(see Chapter 29). program can be shortened by Nll M30
subprogram method Chapter 39). Because the %
groove width is caner, more than one cut is
needed - two in the first cut, the tool is 07000
lioned at the per drawing) and (SUBPROORAM FOR GROOVE IN 0190
first cut at the bottom groove. The bottom Nl G01 041 XO.875 Y-O.B75 D07 F1S.0
tool will depth. N2 G03 Xl.75 YO RO.S75 FlO.O
N3 I-1. 7S
For the <>"'....'v.. u cut, the top edge of the slotting mill is N4 XO.875 YO.a7S RO.875 F1S.O
and the tool profile for the second groove N5 G01 G40 XO YO
ally, it will first groove) at the depth of N6 M99
%
(again. as
TOOL LENGTH 1

R1.750 f4- G54Z(NEGATIVE)-

G43H ..
..
N3
N2

Figure 19·14 Figure 19-16


Full circle milling - subprogram 07000. Typical tool length offset setting fOf a tool.
Start and finish of cutting is at the center of the groove. Program zero is at the face 0/ the

example, tool H07 is used bot- The two illustrations show typIcal setup of the
tom reference edge of the mill and H27 is tool length offset for preseltools on a horizontal machining
the ~,~ ..'''' ... mill. D07 is for cen (er. Fig lire ) 9- J5 shows the zero at the cen ter
cutter radius only. Figure 14 shows the tool motions of the table. 19-16 shows program zero at the
in subprogram 07000. face of the

HORIZONTAL MACHINE APPLICATION TOOL lENGTH OFFSET CANCEL


were aimed towards a In programming. a well organized approach is always
cenler. Although the logic of important. That means, a program that is turned
applies equally to any machining center, re- on when should also be turned not needed
of the Z axis orientation, there are some noticeable anymore. Tool length offset commands are no exception.
in (he practical applications on horizontal ma-
centers (Chapter 46). The tool cancellation
program. There is a special preparatory available
A machining cenler allows programming of a lha( cancels method of the 1001 length offset,
lool on several faces of each has a either G43 or command to Ihe 1001 length
different distance from the tool (along the Z axis), the offset in the program (or via MDl) is G49:
tool for each It is common to
work different tool
face.

G54Z(N One method of ison


a single block - returning to the zerom
Z
..
10 Nl76 G49
Nl77 G91 G28 ZO
',:

A method the offset

N53 G9l G28 ZO HOD

In this case, the is coupled with an H off-


set number zero - Hoo. Note, Ihere is no G49 in the block
Figure 19-15
and HOG does the job of cancellation. There is no for
Hoo on the control. It means cancellation tool
offset setting lor a tool.
length offset. .
(he center of the
142 Chapter 19

A program also be started with the length offset The rule is quite explicit - any 028 or 030 com-
command (under program contra!), usually In the {both execute the tool return to the
safety line block or initial will cancel the tool length automatically.

N1 G20 G17 040 GSO 049 The is simple programmer take advantage
of this rule and does not need to specifically the tool
.. , or a variaf;on of the same block: length if the machi ne returns to the tool change posi-
is all with an automatic
N1 G20 This approach is illustrated in examples
N2 G17 040 Gao 049 eluded in this handbook.

is one more way to the tool offset -do Anyone of the methods will that active tool
tlot program it at all. length will canceled. may be some differ-
ences between manufacturers and consulting
A strange suggestion, perhaps, but founded. ma:crlme manual will be the approach.
examples in this handbook do not use command at
Why What happens at the end of each tool?
RAPID POSITIONING

A CNC machine tool does not • GOO Command


chips. From the moment the
in a program. it goes through a Preparatory command is required in CNC program
(lons - some are productive (cutting), ""I"'I,p...,/
to initiate the Peed rate function P is not
(positioning). required if programmed, will be ignored
during the GOO Such a feed rate
Positioning motions are necessary but nonproductive. will be effective beginning
Unfortunately, these motions cannol be eliminated with the first occurrence of any motion (G01. G02,
to be managed as efficiently as For this G03, etc.), unless 11 new P function is
the CNC system provides a called the cutting motion:
traverse motion. Its main objective is to shorten the
time between operations. where o Example A:
tool is not in contact with Rapid motion
operations usually involve four motion: N21 GOO X24.5 F30.0
N22 Y12.0
Q From the tool change position towards part N23 GOl X30.0
Q From the part towards the tool
o Motions to bypass obstacles
Q Motions between different positions on the part

RAPID TRAVERSE MOTION


Rapid traverse mOlion, called a positioning
is a method of the cutting tool from one
position to another position at a rQle of the machine.
The maximum rapid rate is by the CNC ma- o B:
within the travel limits
N21 GOO X24.5 FlO.O
N22 Y12.0
N23 G01 X30.0 F20.0
common rapid rate CNC machines IS
about 450 in/min (I 1430 modem N21, the GOO command modal and re-
offer a rapid motion up to ! (38100
mains in until it is canceled another command of
even more, particularly machines. The same group. In the example the GOl command in
manufacturer determines rale rapid molion N23 changes the
of the machine axes. motion rate can be the same for feed rate is repro-
each axis or it can be A different rapid rate is usu- at block N23.
ally assigned to the Z axis, while the X and Y axes have the used. It is
same rapid motion rate.
Rapid molion can as a single axis motion. or The rapid traverse motion is in
as a compound motion of (wo or more axes simultaneously. current units traveled ill one minute in in/min or
It can be programmed in the absolute or incremental mode mmlmin). The maximum rate is set by the machine
of dimensioning 11 can used whether the IS
manufacturer, never by the control or the program.
rotating or stationary. During program execution, A typical limit set by the machine is a rate between
operator interrupt the rapid motion 300 and 1500 in/min (7620 and [00 mm/min), and even
pressing the on the control panel, or even set~ Since motion per is independent of the spindJe
ting the feedrate switch to zero or a rate. rotation, it can be applied at regardless of the last
Another kind rate control can be achieved by spindle rotation function M04. M05).
dry nm function, during setup.

143
144

Depending on the machine design, motion


rale can be the same for a[l axes, or each axis can have its lions in
maximum rapId rates for a typical towards a on a lathe),
1181 inlmin (30000 mrnlmin) for during rapid motions GOO,
in/min (24000 mm/min) cycles G81 to 089,073, G74 During a rapid mo-
lathe, the rates are somewhat tion, the tool path is much less predictable than during cut-
for example I in/min (5000 mm/min) the X ting motions. Keep in mind that only purpose of rapid
and 394 in/min (10000 mm/min) the Z The motion is to from one part to another location
rapid rates can be for modern fast - but not necessarily straight.
In to bypass obstacles still assure a safe
RAPID MOTION TOOL PATH motion in the program at all limes. let's (ake a closer look at
(he options while a rapid
Every motion in the GOO mode is a, rapid non-circular
motion cannot normally be • Single Axis Motion
made at the actual linear mOlion of the tool
between two points is not ne(:es~;an the path Any motion programmed specifically for only one
in the form of a Programmed tool and the at a time is always a straight line along the selected
resulting actual will be different, on In words, motion that is parallel to
several factors: one available axes, must progTammed In a
rale block, The resulting is equivalent 10
o The number of axes programmed simultaneously distance between start and end
o The actual of motion for each axis - Figure 20-1.

o The rapid traverse rate of each axis

Since the
unproductive
the targellool
the shape of
of the rapid is saving the
(motion from the current tool position to
the tool path is irrelevant to
parl. Always aware of the ac-
tual rapid motion (001 path for reasons
lnrly when lWO or more axes are
safelY, particu-
at the same
x POSITIVE
1
e
No must in the way of the tool e
If there is an
path, the obslacle
control for one
of detecting an obstacle. It is programmer's
responsibility to assure that any lool mali on (rapid motion
X axis NEGATIVE
!
POSITION
y
N

included) occurs without any obstacles in its way.


Some
"--
examples of physical obstacles that can in-
Single axis motion for a ma,r:mllina center application (XY shown)

terfere tool motion are: Several consecutive program blocks. each containing
o FOR MACHINING CENTERS: only a single axis motion, can be included in the to
obstacles to machining. This method program-
Clamps, fixtures, rotary or table. is preferable in cases where only the exact or approxi-
machine part itself, etc. mate position of (such as or fix-
tures) is known during program preparation.
o FOR LA THES :

Tailstock quill and body, chuck, steadyrest,


• Multiaxis Motion
face plate, fix1ure, other tool, part itself, etc. We have already that the cuning tool is moved at
a rapid rale using the GOO command. If this molion is a mo-
tion of two or more axes simultaneously, the programmed
path the rapid palh of the tool are not al-
ways the same. resulting compound motion can be -
and often is from theoretical pro-
grammed motion
RAPID POSITIONING 145

In theory, two axes is equivalent to a both axes,


straight diagonal motion. real mOlion, however, may quired to
diagonal tool path at all. Consider the ._ .. ,"' __ _
in Figure 20-2. position. After
target position
! .02 seconds left to
'8- The target must be rcacm~a
continues along
to reach the final
Another example, coordinates in
-------..,....: Figure 20-2, with the rapid rate
9.452 different for
o 11.812
1...-_ _ _ _ _ _ _ _ _ _ _ _.:.../
_ _ _ _--1 0.91

sketch for rapid motion examples

current tool position (the start point) is at X2.36


coordinate location. The tool motion terminates at
1.812 location. In the terms of i IIcremental IIlO-
tool has to travel 9.452 inches along (he X
along the Y axis. PROGRAMMED
MOTION
If rate for both axes is the same (XY rapid mo-
rates usually such as 394 in/min, il will take ACTUAL x ::: 394 in/m in
MOTION Y::: 315 in/min
(9.452 x 60) / 394 = 1.44 seconds
to complete the X axis motion - but only deviation· different rapid rate for each axis

not so common example, the X axis rate is set to


(2.753 x 60) / 394 = 0.42 seconds (10000 mm/min) and tbe Y axis rate is set to
(8000 mm/min). It will than take
is required to complete (he Y axis motion. Since mo-
tion is not completed until both axes reach (he end point, it
. that the actual tool path will be different from (9.452 x 60) / 394 = 1.44 seconds
tool path. to complete the X axis motion - but only

1-0.425 1.025 .753 x 60) / 315 = 0.525 seconds

to complete the Y axis motion. In this case, the resulting


.-, . .- motion will also include an angular departure, but not at
.-,- • because of the different rating of rapid traverse rate
axis. During the 0.525 seconds (which is the common
time to both axes), the X axis motion will travel

0.525 / 60 x 394 = 3.448 inches


MOTION but the Y axis motion will be only
ACTUAL x
MOTION y .525 / 60 x 315 = 2.753 inches
Figure 20-3
resulting motion is at 38.605" and a slight rounding
Rapid motion deviation - same rapid rate for each axes applied. The actual departure angle is not always
Figure 20-3 shows a combination of an a to be known, but it helps to calculate it for rapid
straight motion as the actual tool path. at some very tight areas of the part. It only
the rate of 394 in/min (10000 mm/min) simultaneously in trigonometric to make sure of
path, the rate is known.
Chapter 20
""""<~""""<----~~~««««««<

Both of above examples illustrate an angular motion This consideration is more important In turning appJ
along two axes, followed by a straight single axis motion in lions than in . due to the nature of programming for
the remaining graphical expression of mo- (wo In turning, approach motion
tions is a bent resembling a hockey stick or a dog leg may be first, to avoid a collision with the
which are also very common terms applied to a tailstock, and then along the X The reverse motion
should along axis first, then along Z axis mo-
tion, in order to the same safety when return-
Calculation of the actua! motion shape, as we done to the tool
is only seldom Taking some pre-
cautions, the rapid motion can be with- A typical application of this programming technique may
out any calculations. If no is within the work area be useful after using a machining (such as turning.
imaginary rectangle by the diagonally posi- facing, elc.), the starting
tioned slar! and end point), is no danger of collision also its point.
to the diverted rapid tool path. On CNC milling sys-
tems, the third axis can also used. rectangly"of
above example will enhanced by the third difnension
and a three dimensional space must be considered. In this
case, no should be chis
same rules apply a rapid motion along three axes as
a two-axis simultaneous motion. Note that the rapid
rale for Z axis on machining centers is usually
lower than the rapid rate for the X and Y axes.

• Straight Angular Motion


In some uncommon circumstances, the theoretical rapid
tool path correspond to the actual tool path (with no
bent line as a result). This will If the simultaneous
tool motion has the same length in each axis and the rapid Figure 20-5
rales all axes are identical Such an occurrence is Typical of a reversed rapid motion on a eNC lathe,
rare, although not impossible. Some manufactur~ used to bypass for example, a tai/stock
ers provide this feature as a standard and
should know machining center does As Figure than programming a
feature or not. situation the resulting motion fTOm the turret to the cutting position
is a straight angle, is when the rapid rating for each (which be fTOm point A to point the tool motion
axis, but the required length of motion just 'falls' into the was spliL approach towards the will be in the order
that results in a straight angular ml'llflf'ln of A to B Lo C, at a rate. point C to poillt D, the
cutting takes When cutting is completed,
Both of these occurrences are rare or less a case of will rapid the reverse order, back to the
good luck) in actual programming will seldom happen. Rapid motion will from D to C (0 B to A.
To be on safe side, never take any chances - it is always a necessary precaution to bypass a potential obstacle, for
more practical to program the rapid motion without the ac- example, the tllilstock.
calculation the tool path but with safety as a primary
consideration.
TYPE OF MOTION & TIME COMPARISON
• Reverse Rapid Motion
lechnique of programming each separately in
Any rapid motion must be considered in terms of ap- individual blocks of the program, is recommended only for
proach towards a and the return to the tool chang- the possible during {he (001
ing position. is the way a cutting is normally path - strictly This method of programming
programmed - we start at a certain position and then return requires a Slightly longer cycle than the simultaneous
there, when cUlling activity for the tool is completed. It multiaxis rapid motion. To the con-
is not a mandatory method, but it is an organized method, it a three motion, as a typical tool
is consislent, and it makes programming much proach in milling.
So we have a rapid molion an actual As an example, the rapid rate is at 394 in/min (10000
cut, starting from the tool position. the 1001 mmJmin) for each The motion takes place between
cutting . a rapid is required to the coordinate of X2.36 YO.787 ZO.2 (slart poinL)
return position, XI1.812 ZI.O(endpoint).
RAPID POSITIONING

The required lime for along each can


easily calculated:
I:l X time:

«11.812 - 2.36) x 60) / 394 1.440 sec.

I:l Y axis time:

«3.54 - .7B7) x 60) / 394 ~ 0.420 sec.

I:l Z axis time: Figure 20·6


Rapid motion override switch set to 100% of rapid rate
«1.0 - .2) x 60) / 394 - 0.121 sec.
The configuration of rapid override switch varies
If all three axes are simultaneously, the total tween machines from On some
for positioning is 1.44 "...'-,...1,,1..1<>. which is the longest time machines, rapid motion may stopped altogether, on
required any to reach end point. The program others, the tool will move at the slowest percentage and
U be: cannot stopped the override switch alone.
GOO X11.812 Y3.S4 Zl.0 actual production, after the program been
and optimized the tool performance
this motion were to be into productivity, the override switch should be set to the ! 00%
program blocks, the total time would be pointer, to shorten the cycle
vidual added together:

1.44 + 0.42 + 0.121 = 1.991 seconds RAPID MOTION FORMULAS


which is about 37.5% longer. percentage will vary, calculations relating to the rapid tool motion can be
depending on the rapid motion rale and rapid travel expressed as used quickJy at any time by
length, measured each machine The program stituting the known parameters. Relationships between the
blocks will be written separately: rapid traverse ra1e, length the motion and the elapsed
time can be in the following three formulas:
GOO Xl1.812
Y3.54
Zl.O \
Note that the modality of GOO rapid motion command
does nol require repetition in the subsequent

REDUCTION OF RAPID MOTION RATE


a part setup or while proving a new program on
the CNC operator has an option to a
slower rapid traverse rate than the established
by the machine manufacturer. ~is adjustment is done by
means of a special override switch, located on
control panel. switch has typically four se- T == Required time in seconds
lectable positions, depending on the machine brand and the R == Rapid traverse rate per minute
type of control - Figure for the selected axis - in/min or mm/min
L = Length of motion - inches or mm
The second, third and fourth positions on the rapid mo-
tion override are as oj the ac- applied to the formulas must always be
rapid rate - 25%, 50%,100% respectively. are set within the selected system of measurement in the program.
by the machine manufacturer. first setting, typically Inches and inches per minute (in/min) must used with
identified by FO (or FI) is a motion rate set through a (he English Millimeters millimeters per minute
control system parameter. FO (FI) setting should al- (mmlmin) must be in the system. any calcu-
ways be Slower than any other setting, typically than lation relatmg to rapid traverse time, the measuring
lowest setting of25%. units cannot be
1 Chapter 20

APPROACH TO THE PART it might be a reasonable compromise to split Zaxis


motion into two separate motions:
20-5 had an illustration NJ14 G90 GS4 GOO XlO.O YS.O 51200 M03
to a CNC lathe. For CNC NJ15 G43 ZO.S HOI
of part approach should be NGl6 GOl ZO.05 FIOO.O
with equal care. in mind that the general N317 Z-l.S F12.0
motion have (0 be considered for any machine.
at a rapid rate, the cycle time can In this method, the rapid motion has first
by keeping the part clearances to to a much more comfortable position
minimum. Let's have a look at some po- above the part (N315). Then, the motion continued
LO cutting start point. using the linear I
in block N316. Since this is still a .-n""""
In the following example, an approach to the part is made not productive, a relatively heavy
along the Z with a clearance of .05 inches (1.27 mm) As may be expected in
in block N315: is a
N314 G90 G54 GO 0 X10. 0 Y8. 0 S1200 M03 was slightly increased, at the
N31S G43 ZO.OS Hal has been given an opportu-
NG16 GOl Z-l.S F12.0 override switch for testing the first
in a block mode). Once the pro-
a melhoel of "'r"r,<1-Y,n"'L
debugged, the heavy feedrale in the
set and part will speed up the operation and at the
as it should he. an extra safety clearance. The program
allows very little motion can always be optimized
On the other hand, an in- not be the besl approach for repetitive
may not quite comfortable is always 'new' for any repctition at a
particularly during the early it be very useful when
operator's convenience is considered thousands, for example).
to the overall productiv-

\ ,
MACHINE ZERO RETURN

a control system to return a cutting tool


LlV~"""''-'H to machine position is a
all modern CNC systems. Programmers Z:::: UP (TOP)
term mLlchine reference posi-
with home posi(ion or machine
is the position all machine slides at
extreme limits of each axis. The exact posi-
by the machine manufacturer and is not
h'.lrH'rt'>rI during the machine working life. Return
I XV:;;; RIGHT
is automatic, on request from the control
or via the program. WORK
i y-
,,~
MACHINE REfERENCE POSITION
rpt,3r?lnrp position is for refer- 21·1
In order the CNC machine is accu- Machine zero n located at the upper right XY comer
we need more than just the high quality components, of a CNC vert} ma,cnlflma center
some unique location (hat can be considered the
point of machine - a zero position - a home to the Z axis in the description was
t",r,""'/""'"

tion. Machine position is exactly such a The Z machine zero position for a
center is always where the Automatic
Machine zero is a fixed position on a CNC machine that place. This is a built-in location,
can reached repeatedly, on request, through the control distance from the machine table and
panel, MOL or program code execution, most machines, the standard machine
centers is at the extreme travel
• Machining Centers in the positive direction, There are excep-
expected,
Although the design of CNC machining centers
models, there are only four possible locations for i

~j
<'
zero, within the XY view:
Z:::: UP (TOP)
o Lower left corner of the machine
o Upper left corner of the machine MACHINE ZERO
POSITION Z-
o lower right corner of the machine - X + .........
o comer ot the machine XV '" UPPER LEFT I~
It is y- '
a new from ~ ! WORKAREA
also necessary to make a ,
lion and return there
pleted. So. several of the
convenient for setup of the part on Figure 21-2
removal when the machining is Machine lero position located at the upper left XY comer
CNC vertical machining center
The most common and standard machine r",t''',,''''nr.,.
tion for vertical machining centers is at 21-2 illustrates. someCNC vertical machining
ner of the machine, looking the machine zero position at the upper left cor-
XY plane - Figure 21-1. XY plane.

1
150 Chapter 21

In both illustrations, the arrows indicate the tool motion o Tool motion from machine zero of a typicalrear lathe:
direction towards the work area. Moving the tool from ma-
chine zero into the opposite direction will result in a condi- x+ Z+ ... tool motion. will overtravel
tion known as overtravel - compare the two possibilities:
• Setting the Machine Axes
o Tool motion from machine zero, if machine zero is located
at the upper right corner: From the previous sections, remember that there is a di-
reet relationship between the CNC machine, the cutting
x + Y+ Z+ ... tool motion will overtravel tool and the part itself. The work reference point (program
o Tool motion from machine zero, if machine zero is located zero or part zero) is always determined by the CNC pro-
at the upper left corner: grammer, the tool reference point is determined by the tool
length at the cutting edge. also by the programmer.
x- y+ Z+ ... tool motion will overtravel
Only the machine reference point (home position) is de-
The other two comers (lower left and lower right of the termined by the manufacturer of the machine and is located
XY view) are not used as machine zero. at afixed position. This is a very important consideration.

• lathes Fixed machine zero means that all other


references are dependent on this location.
The machine reference position for two axis CNC lathes
is logically no different from the reference position of the In order to physically reach the machine reference posi-
machining centers. An easy access by the CNC operator 10 tion (home) and set the machine axes, for example, during
the mounted part is the main detennining factor. Both, the the parlor fixture setup, there are three methods available
X and the Z axes have their machine reference position at to the CNC operator:
the furthest distance from the rotating part, which means
away from the headstock area, consisting of the chuck, col- o Manually - using the control panel of the system
let, face plate, etc.
The machine operator will use the XYZ (machining centers)
For the X axis. the machine zero reference position is al- or the XZ (lathes) switches or buttons available for that
ways at the extreme limit of the travel away from the spin- purpose. One or more machine axes can be activated
dle center line. For the Z axis. the machine reference posi- Simultaneously, depending on the control unit.
tion is always at the extreme travel away from the machine
headstock. In both cases, it normally means a positive di- o Using the MDt- Manual Data Input mode
rection towards the machine zero, the same as for the ma-
chining centers. The illustration in Figure 21-3 shows a This method also uses the control panel. tn this case, the
machine zero for a typical CNC lathe. machine operator sets the MOl mode and actually
programs the tool motion, using the suitable program
commands (G28, G30).

o In the CNC program - during a cycle operation


MACHINE ZERO POSITION
Using the same program commands as for the
MOl operation, the CNC programmer, n.ot the machine
operator, includes machine zero return command (or
commands) in the program, at desired places.
I
X-
When the operator has performed the actual machine
l zero return, it is always a good idea to set the relative and
absolute positions to zero on the display screen. Keep in
mind that the relative display can only be set to zero from
the control panel and the absolute display can only be
figure 21-3
changed through a work offset, MDI mode, or the part pro-
Machine zero position for a typical eNC lathe (rear type)
gram. This topic normally a parI of CNC machine opera-
tion training, directly at the machine.
In the illustration. the arrows indicate the lool motion di-
rection towards the work area. Moving the tool from the For the last two methods of a machine zero return, the
machine zero into the opposite direction will result in over- CNC system offers specific preparatory commands.
travel in the particular axis:
MACHINE ZERO RETURN 151

• Program Commands For


are four preparatory commands relating to ma-
N67 1328
chine zero position:
shows G28 programmed by itself in block - this is an
G27 Machine zero reference position return check incomplete instruction. At least one axis must be specified
with the G28 command, for example,
Return 10 the primary machine zero
G28 reference position No7 1328 Y ••

G29 Return/rom the machine zero reference position which only send the Y axis to the machine zero refer-
ence position, or ...
Return to secondary machine zero
G30 reference pOSii (more than one is possible)
N67 G28 Z •.

the listed G28 is used almost will only send the Z axis to the machine zerO reference
sively in two and three axis CNC programming. Its only position, and ...
purpose is to return the current tool to the machine zero po-
N67 G28 x .. Y •• Z ..
sition and do it along the one or more axes in
G28 program block. will send alJ three specified axes to the machtne zero
erence position. multiaxis requires caution -
• Command Group watch for the infamous 'hockey stick' motion.
All four preparatory commands to G30 belong to the
group 00 of the standard Fanuc designation that describes • Intermediate Point
the non modal or one-shot G codes. In designation, One of the elementary requirements of programming is
each G code of the 00 group must be repeated in every the alpha numerical composition of a word. In the program,
block it is used in. example, when G28 command is every letter must followed by one or more digits. The
used in one block the Z axis and then it is in the question is what values will the axes in G28 have? They
next block for the and Y axes, it has to be repeated in will be the intermediate point for machine zero return mo-
each block as "pp,rjpr!
tion. concepl the intermediate motion in G28 or G30
is one of the most misunderstood programming features.
N230 1328 Z.. (MACH:INE ZERO R.E'I'ORN Z AXIS)
N231 1328 X •• Y.-. ZERO REI'URN XY AXES) Commands G28 and G30 must always contain the inter-
",prHII'" point (tool position). By Fanuc design and
The G28 in block N23! must be If tion, the G28/G30 commands have a built-in motion to an
the command is omitted, last motion command pro- intermediate point, on the way to machine zero. An
grammed will be effective, for example, GOO or GO]! ogy can made to an airplane flight from Los Angeles,
USA to Paris, France, thallemporarily stops over in New
RETURN TO PRIMARY MACHINE ZERO York City. It may not be the most direct route, but it serves a
certain specific purpose, example, to refuel
Any CNC machine may have more one machine
zero reference point (home position), depending on its de- The coordinate values of the axes associated with G28 and
sign. For example, many centers with a pallet G30 commands always indicate an intermediate point.
changer have a secondary machine reference position. that
is often used to align both the left and right pallets during of the intermediate or pOSitIon, is to
pallet most common machine tool design is shorten the program, normally by one block. reduc-
the one that uses ~ly a position. reach this tion is so marginal that the philosophy behind the
primary home p6s[lion, the preparatory command G28 is may debated. is how concept the
used in the program and can also be used during the MDI ate point (position) works.
control
When the or G30 IS used in the program,
The command moves the specified axis or axes LO at least one axis must be specified in the block. The value of
the home position, always at a rapid traverse rale. That that axis is the intermediate point, as interpreted by the eon-
means GOO command is assumed and not have to system. Absolute and incremental modes G90 and I
programmed. The or axes of the desired motion (with a make a great difference in interpretation the G28 or G10
value) must be programmed. Only the behavior, and will be described shortly.
axes will affected.
1 Chapter 21

MACHINE make the equal to zero and move


cutting 1001 to the zero directly. This is done by
/ specifying (he errne<jlaile point as identical to the current
/ (001 position in absolute mode - or - by specifying a
I
! zero lool motion in incremental mode.
/
I • Absolute and Incremental Mode
/
There is a in programming the
........ - , Y4.0
zero return command or G30 in the absolute in-
cremental Remember the b<lsic di fference between
two statements:
POINT
G90 GOO XO YO ZO G9l GOO XO YO ZO
27-4
Intermediate puifll lor machine zero return· XY axes shown Each statement XOYOZO is
control differently. To review, an 'v;>.> L ..... ' ..

The tool motion in Figure 2J-4 is from the central hole of a zero, for example XC, means position at the
During sueh a motion, the tool can collide with the point, if the mode is absolute,
upper right clamp on its way to zero, if the motion command. If the mode is incremental,
to the home position were directly. Only the the XO word means no motion for the
X and Y axes are An interme-
diate point can be location, without lathes use (he U and Waxes incremental
making the program any program without an on absolute X and Z axes respectively), with
intermediate point can be same applications. Absolute axes coordinates
interpreted as the programmed
G90 indicate the nrt:HIT,rlmFIlP'n

GOO xs.o Y4.0 (MACHINED HOLE) Comp,are the two program - they are the
G2B X5.0 Y4.0 1t"la1...rL\.N,c, ZERO MOTION) are identical in terms tool motion:

( -,. G28 USED IN THE ABSOLUTE


The same program with an intermediate point at a safe 10- G90
will change slightly:
Nl2 GOl Z-O.7S F4.0 MOS
G90
N25 GOl X9.5 Y4.874
GOO X5.0 Y4.0 (MACHINED HOLE)
N26 G28 Z-O.7S Ma9 IN ABSOLUTE MODE)
G28 Xl2.0 Y4.0 (MACHINE ZERO MOTION)

(- ~> G28 USED IN THE INCR:EMENTAL MODE)


Earlier examples shown reason behind this G90
ble motion. It is - only to save a single program Nl2 GOl Z-O.75 F4.0 M08
block - that is all. purpose is to use onc block
program to achieve two motions. that would otherwise re- N25 GOl X9.S Y4.874
quire two blocks. A could also be: N26 G9l G2B ZO M09 (G2a IN INC:REMENTAL MODE)

G90
Which method is better? both methods produce
GOO XS.O Y4.0 (MACHINED identical results, the choice is on a given situation or
X12.0 (SAFE LOCATION) personal preference. To switch to the incremental mode has
G28 Xl2.0 Y4.0 (MACHmE ZERO RE'lL'URlN'1
its benefit, because the current tool location may not always
known. The disadvantage this method is that G91 is
La produce same result, but with an extra most likely a temporary setting only and must be reset back
(0 G90 mode, used by the majority of the program.
For example, the intermediate position, the tool can
be programmed to an obstacle on the to A failure to reinstate the "mS;(]IU'IB mode may result
chine zero. rnn,,.,.,.·t1 whh care, the in an expensive and serious error.
tion may be useful. Normally, it is more
MACHINE RETURN 1

Absolute mode of programming speci ties the currenltool above example can be so the intermediate
position from program zero - always at all times. motion is eliminated or - as the current tool posi-
Many examples use the absolute tioll. intermediate motion can never eliminated, but
ming mode - after all, this is - or it should - the it can programmed as a physical zero distance.
programming mode, for the majority of
090
There is one incremental mode of ma-
zero return some very It Nl2 GOO XS.O Yl.O
happens in those cases when the current tool position is not Nl3 G28 XS.O Yl.O
known to the programmer. Such a situation typically hap-
pens when using subprograms. where mode is
used repeatedly to move the incrementally (0 different By this the imermediate poinl
locations. For instance - where exactly is the cutting current tool position, which in direct motion to the
tool when drilling cycle is completed in the N35 machine zero. reason is that intermediate tool posi-
block the following example? with the current tool position. This r'\r("\, ..... r~....,.'-
has to do with values axes.
G90 In the part program, 1.0 in the block N 13 must
repeated, while the absolute 090 is in effect
N32 G99 GSl Xl.S Y2.25 RO.l Z-O.163 F12.0
N33 G9l XO.3874 YO.6482 L7 (REPEAT 7 TIMES) In cases when current tool position is not known, the
N34 G90 GSO Zl.O M09 (CANCEL zero return to be in incremental mode. in
N35 G2S (X???? Y????) Zl.0 (UNKNOWN ~n~T'~Tf~T\
this case, change temporarily to mode
gram a zero length motion for each axis:
Is it worth the extra effort to find the absolute location at G90
Probably no!. Let's look at some other examples.
While in the absolute mode 090, coordinate Nl2 GOO XS.O Yl.O
the intermediate point locatioll. When incremental Nl3 G91 G2B xo YO
mode 091 is programmed, the coordinate values the Nl4 G90
actual and direction the intermediate motion. In
both cases, intermediate tool motion be performed Again, an important is in place here - always
first. Then - and only final return to the machine remember to back to absolute as soon as
zero reference position will take in order to avoid misinterpreting the consecutive
the current lOol position as Y 1.0 program data.
position). the program, XY values of G28 com- [n a brief the imermediate point cannot be
mand that follows the position block are important: minated from the G28/G30 block. If situation demands a
return to zero without going a separate
G90
termediale point, use a zero tool motion towards the
N12 GOO X5.0 Yl.O n"I"'';'''''' point. method on the 090 or
Nl3 G28 XO YO G91 mode at the
o In G90 absolute mode motion to machine zero, the current
In example, the G28 command that the CUl- tool coordinate location must be repeated for each axis
specified with G28 command.
ting tool should the machine zero position· identified
as XOYO in the N 13. Since G28 command relates o In G9l motion to machine zero, the current tool
to the zero only, it ~ould to assume motion must be equal to zero for each axis ·specified with
that the XOYO relates to lhe~machine zero, rather than the the G28 command.
part zero. That is 110t con·eel.
• Return from the Z Depth Position
XOYO to the point through which tool will
the machine zero positioll. That is the detined point One common example of the intermediate tool
already known to be the intermediate position for the ma- in a program hlock, is the return from a
chine zero return command. This intermediate point is as- cavity to the machine zero. In the following
signed coordinates relating to pan (in absolute solely the purpose of better explanation,
In the example, the cuuing tool will move \0 motions are used rather than a drilling to retract
program zero to the mach i ne zero, resu It- tool from the hole depth. In the example, the current XY
C in a single definition of two 1001 motions. This, of position is X9.5Y 4.874. and a drilling operation will
course, is not likely to the intended motion. simulated in
1 21

N24 GOO Z-0.43


N2l G90 GOO GS4 X9.S Y4.B74 S900 MOl N25 GOl Z-O.75
N22 G43 ZO.l HOl MOB N26 GOO ZO.l M09
N23 GOl Z-O.4S F10.O N27 a28 ZO.l MOS
N24 GOO Z-0.43 N2Q G29 X9.5 Y4.B?4
N2S GOl Z-O.75 N29 Mal

Q 2
In block N25, the tool is at
current tool position of X9.5 absolute COOf- To retract the Z axis all (he way \0
the cutting is done and the tool has to be re- then return the XY axes in the next
turned home in axes. reasons, the Z axis Option 1. return the Z axis to zero:
must retract first Several but three
of them are the most common: N26 G28 Z-O.7S M09

o Retract the Z axis above work in one block, return the XY axes to zero as weJl:
then return XYZ axes to machine zero
N27 G28 X9.S Y4.9?4
o Retract the Z axis all the way to machine zero,
then return the XV axes in the next block complete program for Option 2
o Return XYZ axes to machine zero directly
from the current tool position the depth)
N2l G90 GOO G54 X9.S Y4.B?4 S900 MOl
The Figure 21-5 shows the options. N22 G43 ZO.l Hal MOS
N23 GOl Z-O.4S F10.D
xv MACHINE N24 GOO Z-O.43
r-------+ ZERO N25 GOl Z-O.7S
~I POSITION N26 G2B Z-O.7S M09
zi N27 G2B X9.5 Y4.874 MOS
0, N28 MOl
Hole location
~t in XY axes is
~I /'
/'
/' X9.5 Y4.874 e Option 3
NI /'
J /'
/' To return all three axes
/'
INTERMEDIATE POINT from the current tool position the tool is still aL the
hole full depth), only one zero return block will be needed:
CURRENT POSITION N26 G28 X9.5 Y4.874 ZO.l M09
Hole location jn XY axes is X9.5 Y4.B74
This is the intended method of programming, as Faouc
Figure 21-5 controls are Some programmers may
Machine zero return from a hole depth - milling with Fanuc on but that is how it works.

Q Option 1 Here is for Option 3:

To retract the Z work in one block


return the XYZ axes to the machine zero position, N2l G90 GOO GS4 X9.S Y4.874 S900 M03
the 'normal' commonly used: N22 G43 ZO. 1 HOl MOS
N23 GOl Z-O.45 F10.O
N26 GOO ZO.l MOS N24 GOO Z-O.43
N25 GOl Z-O.75 M09
N26 G28 X9.5 Y4.874 ZO.l MOS
This block must followed by a return LO the posi- N27 MOl
lion, along the Z
The molion La 1<1'-"11:'<;; zero will take LWO
N27 G28 ZO.l MaS
Step 1: Z axis will rapid to ZO.l position
The complete program for Option J will
Step 2: All axes will return to machine zero

Also note rearrangements ofM09 miscella-


N2l G90 GOO GS4 X9.S Y4.874 S900 MOl neous Turning the coolant
N22 G43 ZO.l HOl MOS
N23 Gal Z 0.45 F10.O tical than stopping the spindle.
MACHINE ZERO RETURN 5

Although this is a matter of opinion, the choice of many • Return for CNC lathes
is to move the tool out of a cavity or hole first,
work,
caB the machine zero return command. If there is any
setup.
,',-,'A",-'" for this preference, it is the perceived safety the
zero return is also
programmer puts into the program design. To be ends at the machine zero
there is nbsolutely nothing wrong with the alternate true the X axis but not of the
memoo, if it is with care. Comparing' op- away on some lathe
with other does some valuable
Typically, a CNC lathe program will
o OPTION 1 ... a way, thaI machining of the will start
... is only reasonably safe, machine zero, but any subsequent pan will
of cycle time. may from a safe tool change position. This
within the ,nrla",_,."", tical if the program uses geometry offset,
older 050 setting. The most common method of
o OPTION 2 ... zero return on the lathes is the direct method, without an
termcdiate point, because no G91 i s ' an
cffil'i"!nt than the previa us option, but
one of all
error is more difficult LO make:

N78 G28 UO
N79 G28 wo
is the most in terms of program cycle time,
any error in could result in a collision. These two blocks win return the cutting tool to
chine zero in incremental mode. there is no
• Axes Return Required for the ATC motion applied. It is safer La move the
incremental mode U, then the Z using the incremental
zero return is to make an mode W. If the work area is clear (watch for [he tailslock),
axes must be moved for both X and Z axes can be returned to the machine zero at
that purpose. a only the Z the same time:
axis is required to
N78 G28 UO wo
G91 G28 ZO M06
Figure 21-6 illustrates a typical withdrawal a
Horizontal machining centers from a hole, when the machining is completed.
reach its reference position
For safety extra MACHINE
grarruned as well, along Wilh ZERO
sian with an adjo.cent tool in the POSITION

G91 G28 YO ZO MOo

In both examples, the tool cn.an~:e


he effective, until the
been physically reached.
grammed in a separate
· (\
I ndexmg onrotary axes
point and are used with
ear axes. For example, a B will return to the
zero reference position in the following
21·6
G91 G28 BO Machine zero return (rom a hole depth. turning application

If it is safe, the B axis may be programmed When using position register command G50, the XZ
ously with another axis: must always be known for this command. In this
rules for machine zero return are
G91 G28 xo BO Assuming that the machine zero position is at
the coordinate position XlO.O Z3.0, the program for the
Absolute mode designation follows the same rules for a tool can be wriuen in two ways - one without using
rotary or indexing axis, as for the linear axes. command, the other one with the 028 command.
156 Chapter 21

Q Example 1 : The format for G27 command is:


The first example does not use 028 machine zero return G27 x .. Y .. Z ..
command at all:
where al least one axis must be specified.
N1 G20 (EXAMPLE 1) -
When used in the program. the cutling tool will automati-
N58 G50 X10. 0 Z3. 0 S1000 (OLDER METHOD ONLY) cally rapid (no GOO necessary) to the position as specified
N59 GOO T0300 M42 by the axes in the 027 block. The motion can be either in
N60 G96 5400 M03 the absolute or incremental mode. Note that no G28 com-
N61 GOO G41 X4.0 ZO.lS T0303 MOS mand is used.
N62 GOl Z-2.45 FO.012
N63 X3.8 M09
Nl G20
N64 GOO G40 X3.5 ZO.lS MOS
N2 GSO r7. 85 Z2. 0 (OLDER METHOD ONLY)
N65 X10.0 Z3.0 T0300
N3 GOO T0400 M42
N66 MOl
N4 G96 S350 M03
N5 GOO G42 X4.l25 ZO.! T0404 MOa
Q Example 2: N6 GOl Z-1.75 FO.012
N7 UO. 2 FO. 04
The second example will use 028 machine zero refer-
NS G27 G40 X7.85 Z2.0 T0400 M09
ence command. to achieve the same target position: N9 MOl
N1 G20 (EXAMPLE 2)
In the example. block N8 contains G27, but no GOO or
G28. This block instructs the CNC machine to return to the
N58 GSO XIO.O Z3.0 SlOOO (OLDER METHOD ONLY)
N59 GOO T0300 M42 position X7.85 Z2,0 and check, upon arrival to the target
N60 G96 S400 M03 position, if that position is the machine zero in all specified
N61 GOO G4l X4.0 ZO.l5 T0303 MOS axes (two axes in the example). A confirmation light will
N62 GOl Z-2.45 FO.012 turn on, if the machine zero position is confirmed. If the po-
N63 G40 X3.S M09 sition is not confirmed, the program will not proceed any
N64 G28 X3.S ZO.15 MOS T0300 further until the cause (misposition) is eliminated.
N65 MOl
Compare the starting position in block N2 and the return
Most CNC programmers will likely feel more comfort- position in block N8. Assuming that this position is at ma-
able with the ftrst example and saving one program block chine zero reference point in both the X and Z axes, the
program will not likely be compelling enough to change above example will confirm OK position in the N8 block.
their programming style. The second example (Example 2) Now, suppose that a small error has been made while writ-
can be programmed in the incremental mode as well, using ing block N8, and the X value was entered as X7.58 rather
the U and W addresses. but it would not be too practical. than the expected X7.85:

RETURN POSITION CHECK COMMAND N8 G27 G40 X7.58 Z2.0 T0400 M09

In this case, the control system will return an error condi-


The less common preparalory command G27 performs a tion. The error is displayed automatically on the control
checking function - and nothing else. Its only purpose is to screen (as an alarm). The system will no! process the re-
check (which means to ~lIfirm)\ if the programmed posi- mainder of the program, until the error is corrected. The
tion in the block cO'1taining G27 is at the machine zero ref- light indicating Cycle Scarr condition will turn off and the
erence point or noL H it is. the control panel indicator light source of the problem has to be found, When looking for
for each axis that has reached the position will go on. If the the source of the problem, always check both positions, the
reached position is not at the machme zero, the program start position block, as well as the end position block. The
processing is interrupted by an error condition displayed on error is quite easy to make in either block. Also note that
the screen as an alarm. any axis not specified in the block will not be checked for
its actual position.
If the tool starling position is programmed at the machine
zcro reference (home), it is il good practice to return there Another important poim is the cancellation of the cutter
as well, when Ihe machining with that CUlling tool is com- radius offset and the tool offset The G27 preparatory com·
pleted. This is quite commonly done for CNC lathes, where mand should always be programmed with the G40 com-
the tool change (indexing) normally takes place in the same mand and the TuOO in effect (G49 or HOO). If the tool off-
position, although this position does not always have [0 be set or the culler radius offset is still in effect. the checking
the machine zero. Usually, it is a safe position near the ma- CarlllOI be dOlle properly, because the 1001 reference point is
chined pan. displaced by the offset value.
MACHINE ZERO RETURN 157

Here is how the FLTst (Example J) listed (LATHE EXAMPLE)


can be modified to accept G27 command. Note that the
will only move to the coordinates specified, 1101 La any T0303
i or point. Block will become the ac-
G2S U5.0 W3.0
tual check block. The control system will move the ma- G29 U-4.0 ~.l75
chine axes to X 10.0 Y3.0 and checks
this position is in fact machine zero reference point The command should always be In
This is the reason Example J could modified, but not the celed of both cutter radius (G40)
seciond Example 2. cycles (080), jf either is employed in the program.
(he standard cancellation 0 codes - G40 to cancel CUl-
N1 G20 ter radius offset GSO to a fixed before the
G29 command is issued in the program.
N58 GSO XlO. 0 Z3. 0 91000 (OLDER METHOD ONLY)
N59 GOO TOlOO M42 A schematic sketch the tool rnc,,,rm is illustrated in
N60 G96 9400 M03
N61 GOO G4l X4.0 ZO.15 T0303 MaS
N62 GOI Z-2.4S FO.012
N63 X3.0 Ma9
N64 GOO G40 X3.5 ZO.lS MaS
N65 G27 X10.0 Zl.O TOlOO
N66 MOl

,
/
machine point return check can be in I
/
either the absolute or incremental mode. The absolute sta· I
tement in block N65 (in the example) can replaced
with the version:

N65 G27 U6.5 ~.85 TOlOO

IS a Lo this command. A small price Lo 6.80--'-- 7.62 G28


pay when this checking command is a slight cycle G29
time loss. the deceleration of tool motion is built Figure 21-7
into the command by the control system, about one to
AutDmatic return from machine lero position
seconds be lost G27 command is
This be a significant loss if a number of tools use The illustration shows a tool motion from point A to
check in every program. point B first, then to point C, back to point B, to
The G27 command tp seldom used with geometry offset point D. point A is the starting point of the motion,
setting of the tools, wl1ich is the current modern method. point B is the intermediate point, point C is the machine
The G50 command i:0llder and not anymore on zero point, and point D is the final point to
newest lathes, but many lathes are slill used in the target position.
try that do need the setting. equivalent program commands, starting at cur-
rent [001 pOSition, which is point and resulting in the A
RETURN FROM MACHINE ZERO POINT to B to C (0 B to D lool path are quite simple:

G28 018.6 W6.8


The preparatory command G29 is exact opposite
G28 or command. While G28 will automatically re- G29 U-14.86 W7.62
turn the cuning to machine zero position, com-
mand will return the tool to its original position - again, via Of course, there would be some appropriate action pro-
an intermediate point. grammed the two blocks. for a tool
change or some other activity.
In normal programming usage, the command 029 usu-
alJy follows G28 or 030 cOIllmanu. The rules relating to Similar to G27 command, there is only a weak support
the absolute and are for among CNC programmers. It is one of com-
in exactly same respect as to the G28 All mands that can be very useful in some rare cases, virtu-
programmed axes are moved at the rapid traverse rate to the ally unnecessary for everyday work. However, it is always
intermediate position firsl, by the preceding G28 or to know 'tools of trade' are available in
030 command block. An example for a application 1'\"",<n""~.M"Irnlno- They come
lustrates the concept:
158 21

RETURN TO SECONDARY MACHINE ZERO i& where ...

G30 :::: indicates the selection of a


In addition to G28 machine zero command, specific secondary reference position
machines also have the G30 command. In P :::: can be P2, P3 and P4 to identify
ler, and handbook generally. many examples apply the (2-4)
equally to G28 and G30 commands and were sometimes XVZ :::: is the point definition
identified as G28/G30 to cover both. So what is tn (one axis minimum must be specified)
G30 and why is this command needed it in the first
The most common use of a secondary machine zero
By definition, preparatory command is a machine erence point in CNe programming is for pallet
zero return cummand tu the machine zero posi- In the control unit parameter distance of sec-
lion. That position must available on the machine at the ondary reference point is set from primary reference
lime of purchase. Note the descriptive word is secondary, point and is not normally changed during the working life
not second. In virtually all G30 is identical to the of the machine and the pallet
G28, except thaI it refers to a secondary program zero.
To distinguish between multiple secondary machine zero
zero can be the physical positions, address P is added in the G30 block (there is no P
third, or even point, as specified by the ma- "t1rl .... '~'" used If the machine has only a sin-
manufacturer. Not every CNC machine a second- secondary machine position, the Pis
machine zero position, and not every not required in the program, PI is assumed in
machine even one. Thi~ mflchine
ence point serves only some very special purposes, mainly
for horiwntal machining centers. G30 x.. Y ..

programming format for G30 command is similar to IS same as


the G28 command, with an addition of the P address:
G30 Pl x .. Y ••

In this case, the selling of the second point is


within the of the control system. In to
other programming considerations, the G30 command is
in exactly the same way as the much more common
machine zero return command.

)
LINEAR INTERPOLATION

Linear interpolation is closely related to the rapid posi- • Start and End of the linear Motion
tioning motion. Wbile the rapid tool motion is meant to be
used from one position of the work area to Linear motion, other motion in CNC
withour curling, linear interpolation is u ....... "" ......... ming, is a motion two end points of the conLour. It
for actual material removal. such as contouring, pOj:Ke~ung, has a start position position. Any start position
face milling cutLing motions. is often called position, rhe end position is
often called the target The start of a linear motion
is used in part programming to is defined by the current position, the end is defined by
from the start position 0 f the cut LO the target coordinates current block. It is easy to see
uses the shortest cut- !.hat the end position one motion will become the start
motion programmed in position of the next motion, as the tool moves along
is a straight line, the part, through all contour points.
contour start points. this mode, the cutter moves
from one position to another by the shortest distance be- • Single Axis linear Interpolation
tween the is a very important nrr\OT~~m_
ming feature, in contouring and The programmed tool motion along single axis is al-
angular motion (such as chamfers, bevels, angles, a motion parallel ta that of the motion
etc.) must be in this mode to be accurate. Programming in or mode will result
Three types can be generated in the linear in the same nrF~H'T"", but at different feed-
polation mode: Figure 22-1 for
Cl Horizontal motion ... single axis only
o Vertical motion y Motian from
o Angular axes XOYO
to
means that the control 5 X7.0 Y4.0
thousands of intermediate coor-
dinate points between start point and end point of the 4 -+--'--+--+-
cut. The result of this calculation is rhe shortest path 3
tween the two p~nts. All calculations are automatic - the 2 ~~~~~~~-i~ -~~--,.f-

control system constantly and adjusts the feed-


rate for all cutt~axes, normally two or three. 1
a x
LINEAR COMMAND 1 2 3 4 5 6 7 8

:nml1;!f1<:l'lfl of the rapid mode and the linear irrt8rpo/ation mode

In GOl mode, the function F must be in effect. machmmg centers and the
first program block that starts linear interpolation tool motions (hat are parallel to table
mode must have a feed rate in otherwise an alarm motions. On the CNC lathes.
will occur during the first run, power on. Command as facing,
Gal and feedrate F are modal, which means they may be drilling, tapping are
omiued in all subsequent I blocks, once In all cases, a single
they have been designated and the feedrate re- or the ho.rizonral within the
unchanged. Only a location is current (working) plane. A singJe axis motion can never be
required for the axis designation in a motion, which requires two, three, or more axes.
dition to a single axis motion, a along two or name for a motion rhat is parallel to a axis
three axes be also simultaneously. horizontaf or vertical only.

159
1 22

y Motion from gramming method is not enough. Such n .. F' ......" .......

X2.0 Y1.0
ming projects more an investment into a
to computer based system, such as
5 X2.0 Y3.0
powerful and Mastercam TM, that IS based
and to
on modern computer combined with machin-
4 know-how. This programming is using desktop
X6.0 Y3.0
3 and is by virtually all machine shops.
Computer based programming is not a subject of this hand-
2 book, btl[ its genera! concepts are discussed briefly in
1 chapter of the handbook 53).
O~·~--·--~···~·····~·····~-·~·········~-·X
three-axis (XYZ) '''" ..... " .... linear motion is
o 1 234 567 8 in Figure 22·4,

22-2 (
Single lJxis linear interpolation motion
j nterpolation
4
the Y axis.

• Axes linear Interpolation


A motion can also be along two axes
simultaoeously. This is a very common situation when lhe
start pOint of the linear motion and point have at
least (WO coordinates [hal are each other,
while in linear interpolation mode GO I. result of
two-axis motion is a straighltool at an angle.
The will always be the shortest between
the end point and in a slraightline
at an by the control

y Motion from
j. X2.0 Y1.0
to
Figure 22·4
5 X6.0 Y3.0
Three axes linear interpolation motion
4
3
2 PROGRAMMING FORMAT
1
In order to a lool motion in the interpola-
a x command GOI along with one,
o 1 234 5 6 7 8 two, or axes Lool maLian, as well as a feed-
rate (F address) suitable for the job at hand:
Figure 22-3
GOI x .. Y.. Z.. F •.
Two axes simultaneous linear interpolation motion
All enLncs in the linear motion block are
• Three Interpolation to be only if they are new or
the block instruction (word) that is affected by
A linear that takes place along needs to be included in the program block,
same time, IS axis linear
simultaneous linear motion along three axes is possible on Depending on which programming melhod is """ . . "'I.vU.
virtually all CNC machining centers. Programming a linear the linear· motion may be
motion of this is not always easy, particularly when absolute or n".·"''''''''
working with complex parts. Due to many difficult lory commands for milling
lions involved in this type of tool motion, the manual pro- and W for
LINEAR 161

LINEAR fEEDRATE • Individual Axis feed rate


subject of actual cutting feed rate per is not eru-
The actual a defined tool motion can in programming al all, It is included here for
be programmed In two matically oriented and interested individuals only. There is
no to know the following calculations at all
o ... per time mm/min or in/min system will do them every time. all the
o ... per spindle revolution mm/rev or in/rev automatically. On the other hand. here it is

The selection depends on machine type and dimen- as motion


£lanaI units used. Typically, ,,,,,,,,,,,,,,,~centers, drills, unit must always calculate
mms, routers, flame protilers, wire EDM, etc., individually. Depending on the
use feed rate per time. lathes and turning centers lypi- motion (its angular value), the corn-
cally use feed rate per up' one and 'hold back' the other ax is
and it will do it constantly during the cut
• Feedrate Range The result is a between !.he start and end points
of (he linear contour. Strictly speaking, it is not a straight
only within
tf>P,rlr<ltp hne but a I with edges so diminutive in that
a certain in milling applica- they are Iy Impossible to see, even under magnifica-
typical is 0.0001 \ as in/min, tion. For all practical the result is a straight line.
" ..""un,,,, or deglmin. The lowest for linear interpo-
in turning is dependent on the minimum increment The calculations are the CNC system, according
of the coordinate axes XZ. The following two tables point to the following in Figure 22-5.
out typical ranges a normal CNC system can support. The
first table is for milling, the second is for All
units used in pan programming are rpXlrp.<:PfI END
POINT

Minimum motion increment

0.001 mm
MILLING

0.0001 ·240000.00 mm/min


/"--r ,

0.001 degree deg/min

.0001 inch END


POINT ,-.

'-
Minimum motion increment TURNING Figure 22-5
.==.
Oal8 fDr the calculation of individual axis linear feedrate
0.001 mm 0.00001 - 500.00000 mm/min

0.001 degree 0.00001 - 500.00000 deg/min

.0001 inch .000001 - 50.000000 in/min GOO XlO.O Y6.0


GOl X14.S Yi.25 F12.0

lhall!!t: maximum feeurate thaI can linear motion takes place between two end points,
high. For actual cutting, that is true. point at X 10.0 Y 6.0 to the end at
that ranges are to the control Y7.25 - the feed rate is programmed at 12 in/min as
The will That means the actual travel motion
feed rate, according to the ma- is either known or it can be calculated:
capabilities. Control system only pro-
range, that is more for the benefit or Xc 14.5 10.0 = 4.5
= 7.25 - 6~O = 1.25
than the actual user. Zt 0
in case is to allow the machine manufacturers flexibil-
Ity within current technological advances. As technology tool total mali on (as illustrated) is
control system manufacturers will have to re- motion, and can be calculated by
changes as well, by increasing the ranges. Theorem:
162 22

above formula is common, based on the square 5 ~~+.~...~~...+-.-.~~~~~~~.+ +


root of the total sum sides, that win
4
value of 4.6703854 as travel length in the
3
2
1
control system will internally apply the and 0 -.... X
calculate the actual motion along we X axis (4.25), as well o 1 2 3 4 5 6 7 8
the Y (1 plus the length of motion il-
(4.6703854). values, the system Figure 22-6
will calculate the X feed rate - there no motion
Example illustration for a simple linear interpolation
that takes place

I-V<l, ...... "Jo 1.

(CLOOK.WJ:SE DIRECTION FROM

Fx = 4.5 I 4.6703854 x l2 = 11.562215 G90 ••• (ABSOL'!J'TE MODE)


G01 Xl.O Y3.0 F ••• (Pl TO
X3.0 Y4.0 (P2 TO (3)
X4.5 (P3 TO P4)
X6.S Y'3.0 (P4 TO !;IS)
X7.5 (PS TO (6)
Yl.S (P6 TO P7)
Fx = 1.25 I 4.6703854 x 12 3.2117263 X4.5 YO.S (P7 TO (8)
Xl.O n.o (pa TO

e 2:
(COUNTERCLOCKWISE DIRECTION FROM PI)
Fx = 0 I 4.6703854 x 12 = 0.0
G90 ••• (ABSOLUTE MODE)
In this example, there is no Z axis motion. If Z axis GOl X4.S YO.S F ... (P1 TO
were part of the lool motion, for a simulta- X7.S Yl.S TO P7)
neous three dimensional linear motion, procedure will Y3.0 TO PO)
be logically identical, with the inclusion of Z axis in the X6.5 TO P5)
X4.5 Y4.Q TO
calculations.
X3.0 \, TO
X1.0 Y3. 0 TO (2)
PROGRAMMING EXAMPLE Y1.0 TO (1)

In order to illustrate the .... ~._ .. _~, use of interpola- Linear interpolation means of programming all
tion mode a CNC program, is a simple example, orthogonal (i.e., horizontal) molions, as well as
shown in 22-6. angular tool motions as the shortest Hnear distance between
For even more comprehensive understanding, we exam- two points. CUlling must be in this
ple will presented twice. One tool motion will start and mode, for proper m~lal Note coordinate
end at the P I location and will programmed in the c1ock- location that has not changed from one point to the next -
the other will start at one block to the next is not repeated in subsequent
will in the counterclockwise block or blocks.
direction.
BLO-CK SKIP FUNCTION

In many control manuals, the block skip function is also BLOCK SKIP SYMBOL
called the block delete function. The expression 'block de-
lete' offers rather a misleading description, since no pro- To identify the block skip function in a program, a special
gTam blocks will actually be deleted but only skipped dur- programming symbol is required. This block skip function
ing progTam processing. For this good reason, the more symbol is represented by a forward slash [ / ]. The system
accurate description of the function is the block skip func- will recognize the slash as a code for the block skip. For
tion, a term used in the handbook. This function is a stan- most of CNC programming applications, the slash symbol
dard feature of virtually all CNC controls. Its main purpose is placed as the first character in a block:
is to offer the programmer some additionaJ flexibility in de-
signing a program for no more than nvo conflicting possi- ~ Example 1 :
bilities. In the absence of a block skip function, the only al-
ternative is to develop two individual part progTams, each Nl (ALWAYS PROCESSED)
covering one unique possibility. N2 (ALWAYS PROCESSED)
N3 (ALWAYS PROCESSED)
/ N4 (PROCESSED IF BLOCK SKIP IS OFF)
TYPICAL APPLICATIONS I N5 ••• (PROCESSED IF BLOCK SKIP IS OFF)
I N6 ••• (PROCESSED IF BLOCK SKIP IS OFF)
To understand the idea of two connicting possibilities, N7 .•. (ALWAYS PROCESSED)
N8 ••• (ALWAYS PROCESSED)
consider this programming application. The assignment is
to write a program for a facing cut. The problem is that the
On some control systems, the block skip code can also be
blank material for parts delivered to the CNC machine is
used selectively for certain addresses within a block, rather
not consistent in size. Some blanks are slightly smaller in
Ihan at its beginning. Check the manual if such a technique
size and can be faced with a single cut. Others are larger
can be used - it can be very powerful:
and will require two facing cuts. This is not nn uncommon
occurrence in CNC shops and is not always handled effi- Q Example 2:
ciently. Making two inefficient programs is always an op-
tion, but a single program that covers both options is a N6
better choice - but only if the block skip function is used in N7 GOO XSO.O I MOB
such a program. N8 GOl ••.
-"
This challenge illustrates a situation, where two connict-
ing options are required in a program at the same time. The In those cases, when the control system does allow the
most obvious solution would be to prepare two separate block skip within a programmed block, aJl instructions be-
programs, each properly identified as to its purpose. Such a fore the slash code will be executed, regardless of the block
task can be done quite easily, but it will be a tedious, time skip toggle setting. If the block skip function is turned ON
consuming and definitely an inefficient process. The only (block skip function is active), only the instructionsfollow-
other solution is to write a single program, with tool mo- / ' ing the slash code, will be skipped. In the Example 2, the
tions covering facing cuts for both possibilities. To avoid coolant function M08 (block N7) will be skipped. If the
air cutting for those parts that require only one cut, a block block skip function is turned OFF (block skip function is
skip function will be provided in the program and applied not active), the whole block will be executed in Example 2,
to all blocks relating to the first facing cut. The 'second' cut including the coolant function.
will always be needed!
Other common applications of the block skip function in- CONTROL UNIT SETTING
dude a selt!Clive ON/OFF sLalus LOggle, sUl:h illi the coolant
function, optional program stop, pfOgTam reset, etc. Also Regardless of the slash code position within a block, the
useful are applications for bypassing a certain program op- program will be processed in two ways. Either in its en-
eration, applying or not applying a selected tool 10 a part tirety, or the instruction foHowing the slash will be skipped
contour and others. Any programming deciSion that re- (ignored). The final decision whether or not to use the
quires a choice from two predetermined options is a good block skip function is made during actuaJ machining, by
candidate for the block skip function.
164 Chapter 23

the operator, depending on the of this A simple programming solution to this potential
purpose, a push button key, a switch, or a menu item . problem is available. Just repeat all modal commands in
selection is provided on control panel the CNC unit. the program thal will not affected by block
Selection of the mode can be either as skip function.
(ON) - or inactive (OFF).
two
programs will not require any skip codes. In
such cases, the setting mode for the block skip function on
the control panel is irrelevant, but OFF mode is strongly
= Example A - Modal commands are not repeated:

recommended. switch setting important, NS GOO XlO.O YS.O Z2.0


if the program contains even a single block containing the / N6 GOl ZO.l F30.0 MaS
slash symboL active ON will cause instruc- N7 Z-l.O Fl2.0 (GOl AND Moa
N8 •••
tions in a block following the code to be ignored dur-
ing The setting will C Example B - Modal commands are repeated:
cause contralto ignore the code and process all in-
structions written in the program. NS GOO X10.0 YS.O Z2.0
/ N6 Gal ZO.l F30.0 M08
N7 Gal Z-l.O Fl2.0 M08
N8 •••

In examples A B. the program block containing


slash code indicates an intermediate Z position as
I. This position may only certain cases
""u",; llisled earlier, the contents of
....o\, ... N4, during machining will decide whether to
be if block function is ON. use it or not, and also when to use it.
They will be processed, if the swilch IS The The block, identified in the as N6, con-
2, also listed
LJ",,""fHUlI" a slash in block tai ns several modal functions. The commands GO 1, ZO.1.
slqsh symbol is preceding miscellaneous func- F30.0 and MOS will all remain in effect, unless they are
tion M08 (coolant ON). If skip funcrion switch is ON, canceled or changed in following block. From block
the coolant wi!! be if it is OFF, the coolant funclion N7 it is apparent that Z coordinate position and the cut-
will application may be useful in <I dry ling [eedrale value changed. However. the I
run mode, to bypass the coolant flood during veri- M08 commands are not repeated in the example A will
fication, if no manual override is available. not in effect, if the block skip switch is set ON.
Both examples A and B will identical results, but
only if block skip function i~ in the (OFF)
mode. The control will then execute the instructions
BLOCK SKIP AND MODAL COMMANDS in all blocks, in the of ....,.n"',.""n'\
The processing result be different each program-
To understand the way how modal values work with example shown. If the block skip function is active
skipped blocks, that modal commands can be (ON) - block instructions following the will
tied only once in the program, in the block they oc- not be next example A yields an unaccept-
cur first. Modal commands are nol repeated in able result, with a fairly possible collision. The example B
quent as long as they unchanged. uses careful thoughtful approach with very extra
work. are the when block N6 is skipped:
In programs where the block skip function is not at
all. there is nothing to do. When the block function is C Example A - Modal commands are nat repeated:
used, watch carefully all modal commands. Remember that
a command established in a block using the slash code will NS GOO X10.O YS.O Z2.0 , ............."" MOTION)
not always be in effect. It on the setting block N7 Z-l. 0 F12. 0 (RAPID MOTION)
skip switch. Any modal that to be carried N8 •••
over from a section with slash codes to the section without
codes may lost if the block skip funclion is C Example B Modal commands are ron,""'Tl'"

Overlooking modal when programming block


skip function can in a program with serious errors. NS GOO X10.0 YS.O Z2.0 (RAPID MOTION)
N7 GOl Z-l.O F12.0 MOS (FEEDRATE MOTION)
N8 ...
BLOCK SKIP FUNCTION

Note that the motion I, the F30.0 and If the program is designed in a way that there is only
the M08 are all skipped in the example The X cut, problems may oceur during
and Y axes have not updated in either example and Programming TWO cuts all
will remain unchanged. conclusion is that the example parts a program, but will be inefficient
A will result a Z axis motion in two consecutive parts with a minimum stock. There will too many tool
blocks, causing a potemially dangerous In the motions as 'cutting , when the is minimal.
correct version, listed as B, the programmed repe-
tilion all commands - GO 1, F 12.0 and M08 - assures the c:> Example - Variable stock face:
nrr' .... "'''""' will be run as intended. In next section this
chapter we will look at principles of program design for A cutting a that in sIze is a common
problem in CNC work. A suitable solution is for
different practical applications.
turning milling - the should include tool mo-
In the summary, there is one basic developing tions for two cuts and the skip function will be
programs with blocks using the block skip function: on all blocks relating to theftrs1 cut
is a lathe face cut, the
Always program a/l the instructions. even if it means repeating
some program values and commands that have to be preserved. facing siock varies mill) and .275 (7 mm).
After considering several machining options, the program-
dY~'" that the
'-' ....... maximum stock that can
slash symbol can be into the nT"e,r"n. CUI will (3.5 mm) Figure 23-J.
nrr,""'"rn has been designed for bOfh options.
in those blocks that define the optional skip
lected blocks. Always check program! CHANGE

Any eNC program containing block skip


function should be checked at least twice.
X3.35
I N9 I
result of this double check must be always satisfac-
I I
tory, whether the block skip in or
without it. an error is even a very minor error.
0 ~. co
h~
correct it After the correction. check the program at I z I
twice again, covering both types of processing. The I I
reason for the check is that a correction made for
one type of processing may cause a different error for the N111 N7 I
X-O.OS
other type of processing.

PROGRAMMING EXAMPLES
block skip function is simple, often neglected,
yet, it is a powerful programming tool. Many programs can
Figure 23-1
benefit a creative use of this The type of
and some thinking ingenuity are the only criteria for suc- Variable stock for fBcing in 8 turning I!JOfJ'ilCOtion - program 02301
cessful implementation. In the following examples, some
02301 (TURNING)
of the skip function are shown. (v:ARIABLE FACE STOCK)
the examples as start points for a general program de- N1. G20 G40 G99
sign or when covering similar machining applications. N2 GSQ S2000
N1 GOO TQ200 M42
• Variable Stock R'moval N4 G96 S400 M03
NS G41 X3.35 ZO.135 T0202 MOS
Removal of excessive material is during I N6 GOl X-O.OS FO.Ol
a rough cutting. When machining irregular (cast- I N7 GOO ZO • .25
forgings, etc.) or rough facing on lathes, it be dif- I NS X3.35
ficult to determine number of cuts. example, some N9 GOl ZO FO.OS
castings a given job may have only the minimum exces- N1.0 X-O.OS FO.Ol
N1.1 GOO ZO.l
material, so one roughing or facing cut will suffi- N12 X3.S
Other for same job may larger and N13 G40 Xl2.0 Z2.0 T0200
two roughing or cuts arc nceded. N1.4 MJO
%
166 ...........••• ~----------~
Chapter 23
........------.-------~~.........~~~----...:...

NS contains initiallool approach motion. Block does not need a for a reason - it will
next three blocks are preceded by a slash. In N6, tool be either FIS.O or FIS.O, depending on whether blocks N6
cuts off front at ZD.l N7 moves the tool away to N8 were skipped or not. The is very important
face, block N8 is a rapid to initial block 10. Such a repetition guarantees the required
diameter. There are no other blocks to skipped after rate in the block, when actual cutting takes
block N8. N9 contains a to the fronl
N lOis the front cutting motion, Nil is the Both lathe and mill examples should offer at least some
motion, followed by standard final blocks. basic understanding of logic used in program develop-
menl, using the block function. Exactly the same logi-
Evaluate the example not once least twice - it shows cal approach can be for more than two cuts and can
what exactly happens. During the first evaluation, read all also be applied to operations other Ihan face cutting.
blocks and the block skip function. the sec-
ond time, ignore all blocks containing slash • Machining Pattern Change
will be identical results when compared with the first
uation. The only difference will the number of actual Another application. where the block function may
cuts - one, not two. In miiling,lhe is very be efficiently. is a simple programming. The
term family programming means a programming situation
An for a milling application uses a inch face where there a slight difference in be-
mill. The material to faced varies be- tween two or more parts. Such a variation between
(ween .120 and .3! 5. largest reasonable depth cut similar is often a prospect for block skip func-
selected will be .177 (4.5 mm) - Figure 23-2. tion. A minor deviation in a machining pattern one
drawing to another can adapted in a single program us-
ing the block skip function. Following two examples show
FIRST CUT
typical possibilities of programming a change of the
path. In one the emphasis is on a skipped machin-
X-3.0 X11.0
Y4.0 Y4.0 i ng location. In the other example, the emphasis is on the
pattern change itself. Both are In illus-
trate a simple operation. the lathe example,
Figure 23-3 is related to program 02303.

23-2
Variable stock for facing in 8 ml1ling application· program 02302

02302 (MILLING)
(VARIABLE FACE STOCK)
N1 G20
N2 GI? G40 G49 Geo
N3 GSO GOO GS4 XlI.0 Y4.0 X43.0
N4 G43 Zl.O S550 MO) Hal
N5 GOl ZO.1?7 F15.0 Mn8 -"L-;.I---X35.0
/ N6 X-3.0 FIB.O
/ N7 ZO.375
/ N'8 GOO Xl!. 0
N9 GOl ZO Figure 23-3
NlO x-J.a F1B.O Variable maj:/If~lina pattern - turning application
Nll GOO Zl.O M09
Nl2 G2S X-l.O Y4.0 Zl.O upper picture shows result with block skip
M13 M30 lion set ON. the lower picture shows the result with block
% skip function set OFF, the -"arne
Block N5 in the example contains the Z axis approach to
02303
the first cut, at 177 level. The next blocks can be Nl G21
if necessary. In the N6 block, the mill actually
cuts at ZOo I position, N7 is the tool motion af- Nl2 GSO SleOO
ter cut, and N8 returns the tool to initial X position. Nl3 GOO T0600 M42
There are no other blocks to be skipped block N8. Nl4 G96 S100 MD3
BLOCK SKIP FUNCTION 167

N15 X43.0 Z-20.0 T0606 MOS Both variations of program 02304 machine a hole pat-
N16 G01 XJS.O FO.13 tern with 6 or 4 holes. Block skip function has been used to
N17 GOO X43.0 make a single program covering both patterns. The top of
/ Nle Z-50.0 Figure 23-4 shows the hole pattern when block skip func-
/ Nl9 GOl X3S.0
/ mo GOO X43.0 tion is set OFF, the bottom shows the hole pattern when
ml X400.0 Z4S.0 T0600 MOl block skip mode is set ON.

Program 02303 demonstrates a single program for two 02304 (MI.LL.ING EXAMPLE)
parts with similar characteristics. One part requires a single N1 G21
groove, the other requires two grooves on the same diame-
N16 G90 GOO G54 X30.0 Y2S.0 MOS
ler. In the example, both grooves are identical - they have N17 G43 Z2S.0 S1200 M03 H04
the same width and depth and are machined with the same N18 G99 GS1 R2.5 Z-4.0 F100.0 (HOLE 1)
tool. The only difference between the two examples is the N19 XI05.0 (HOLE 2)
number of grooves and the second groove position. Ma- mo Y75.0 (HOLE 3)
chining the part will require the block skip function set ON I N21 XSO.O Y50.0 (HOLE 4)
or OFF, depending on the grove to be machined. / m2 X55.0 (HOLE 5)
m3 G98 X30.0 Y7S.0 (HOLE 6)
Evaluate the more important blocks in the program ex- N24 GSO G28 X30.0 Y7S.0 Z2S.0
ample. The N15 block is the initial tool motion to the start N25 MOl
of the first groove at Z-20.0. In the next two blocks. Nl6
and N 17, the groove will be cut and the tool returns to the Blocks NI8 to N20 will drill holes 1,2 and 3. Hole 4 in
clearance diameter. The foHowing three blocks will cut the N2! and hole 5 in N22 will be drilled only if the block skip
second groove, if it is required. That is the reason for the function is set to inactive mode (OFF), but neither one will
block skip code. In the block N 18, the tool moves to the ini- not be drilled when the block skip setting is active (ON).
tial position of groove 2 at Z-50.0, in N19 the groove is cut Block N23 will always drill hole number 6.
In the block N20, the tool retracts from the groove to a A variation of this application is in the program 02305.
clearance position. There arefive hole positions. but the block skip function is
The milling example shown in Figure 23-4, also in met- used within a block, to control only the Y position of the
ric, is represented in program 02304. The program handles hole. Top of Figure 23-5 shows the pattern when block skip
two similar patterns that have four identical holes for both function is OFF, the bottom shows the pattern when skip
parts and two missjng holes in the second pari only. This is function has been set ON. The middle hole will have a dif-
a good example of similar parts program, using block skip. ferent Y axis position, depending on the setting of the block
skip function at the machine.
a 0
a a a Lri 0 0 uj
ci uj 0 a a r....: a
......
M LO co ...... (") <0
X X X >< >< X X
I I J I I

$ I I $-+- Y75.0 <it


5-
I $- I- Y75.0
6 3 3
I"'i"'\
w -$ - + - .
Y50.0 -$- Y54.0
5 4 4
<B- '-- -$ - I -
1 2
Y25.0

--"""""~~~""""
f!1 t - Y25.0

a a
a I.() 0 0 ..0
0C"') 0
...... 0 r....: 0
.....
M <0
X X X X ><
$ $- I- Y75.0
47 447 -$ - Y75.0
6 3 5' 3

-$- $- - -$.
1 2
Y25.0
1 t - Y25.0

Figure 23-4 Figure 23-5


Program 02304 - variable machining pattem for a milling Program ()2305 - variable machining pattern for a milling
application - result with block skip OFF (top) and ON (bottom) application . result with block skip OFF (top) and ON (borlom)
168 Chapter 23

02305 (MILLING EXAMPLE)


Nl G21

N16 G90 GOO G54 X30.0 Y25.0 MOS


N17 G43 Z25.0 S1200 M03 H04
N1e G99 Gal R2.5 Z-4.0 F100.O (HOLE l) j--X3.0
N19 n05. a (HOLE 2) /'

mo Y7S.0
N2l X67.0 / YS4.0
(HOLE 3)
(HOLE
,/
,/

I X2.0563
m2 G98 X30.0 Y7S.0 (HOLE 5) ~~~=t~- X2.0
N23 GSO G28 X30.0 Y75.0 Z25.0
N24 MOl X1.67S

hole 4 In block N21 will drilled at the location of


X67.0 Y7S.0, if the block skip mode is The address
Y54.0 in N21, will not processed. If the block
mode is the hole 4 will drilted at coordinate
tion of X67.0 Y54.0. that case, the .0 position from
the block N20 will overridden. to the
proper drilling at position 5, the block Figure 23-6
N22 must written. If it is omitted. the Y54.0 from block Application of 8 trial cut for ml!l;~~lJ,rm{'J on a lathe - program 02305
N22 will precedence in block skip mode.
02306
Using the block skip feature is the simplest way of de- (TRIAL COT -
a family of parts. applications arc N1 G20
the function but they the
NlO GSO SHOO
fundamentals of a powerful programming technique and an Nll GOO T0600 M43
example of logical thinking. Many detailed explanations Nl2 G96 SoOO M03
and examples of programming complex families of parts / Nl3 Gt2 X2.0563 ZO.l T0606 MOS
can be found in a special Custom Macro option Fanuc / Nl4 GOl Z-O.4 FO.OOS
fers on most control / Nl5 X2.3 FO.03
/ N16 GOO G40 X).O Z2.0 T0600 MOO
• Trial Cut for Measuring / (TRIAL Dn IS :2.0563 DlCHES)

Another application of the block is to / N17 G96 S600 M03


the machine operator with means of measuring the part be- NlB GOO G42 Xl.67S ZO.l T0606 MOS
fore any final machining on the part been done. Due to N19 GOl Xl.O Z-O.062S FO.007
dimensional the cutting tool com- mo Z-l. 75
ml X3.5 FO.Ol
with other factors, the part may slightly N22 GOO Gto XlO.O Z2.0 TOSOO
outside of the required tolerance range. m3 MOL

following method of programming is very useful for When program 02306 is processed the block
parts very tolerances. It is set all blocks will executed, including the trial cut
a method lhose parts, part is and finish profile. With the block set ON, the only op-
difficult to measure after allinachining is for .....""lIn" executed will be the to size, the
ex.ample shapes, such as The same me.tho? cut. In this case, significant instructions are retained
is also quite for parts cycle Indl- by repetition the key commands (NI8 and NI9). Such a
viduallool is relatively long and all the offsets have to repetition is very crucial successful in both
be fine be/ore machining. modes of block skip function. MOO in N16
approach to part programming is more efficient. as it stops the machine and enables a dimensional
a recut. increases finish, and can even Selecting trial of in the example may be
prevent a scrap. In either case, a trial cut programming questioned. What is the logic it? The trial diameter can
method that employs the skip is used Set- be other size, That would leave a .025
ting the skip mode the machine operator checks stock per for the cut. It is true a different
the trial dimension, the individual offset, if neces- diameter could have selected. four decimal num-
sary, with block set ON. was only selected for one reason - to psychologically
general described in example are ",n'Y"",.."e,.. the to maintain accurate offset settings.
equally applicable to and milling - Figure 23-6. - programmers may a three or
aeC:lmal number - the
BLOCK SKIP FUNCTION 169

In the next trial cut will also 02308


the actual machining, but for a di (TRIAL CUT FOR TAPER. '!WO TOOLS)
reason - Figure 7. N1 G20 G99 G40
N2 GSa 51750 T0200 M42
N3 G96 S500 Mal
..- / N4 GOO G42 X4.46 ZO.l T0202 MOB
ci / N5 GOl Z-0.4 FO.OOa
N / N6 UO.2 FO.03
/ N7 GOO GtO XIO.O Z5.0 T0200 MnO
/ (T02 TR.IAI.. COT DIA IS 4.46 INCHES)

X4.37S· / NS GSO S1750 T0400 M43


/ N9 G96 S550 M03
- X3.87S / NlO GOO G42 X4.428 ZO.I T0404 MOa
/ N1l GOl Z-O.4 FO.OOa
/ Nl2 UO.2 FO.03
/ N13 GOO G40 X10.0 Z5.0 T0400 MOO
/ TRIAL COT DIA IS 4..428
23-7
/ N14 GSO 51750 T0200 M42
Trial cut for 8 taper cutting on a lathe program 02307 / Nl5 G96 S500 M03
N16 GOO G42 X4.6 ZO.l T0202 MOB
In program 02307. the N17 G71 PIS Q20 UO.06 WO.OOS D1500 FO.Ol
a feature difficult to measure N18 GOO XJ.B75
the tool offset in a error is not the right N19 GOl X4.375 Z-0.73 FO.OOS
a an area of the solid N20 X4.6 FO.012
a straight enables the operator to N21 GOO G40 XlO.O Z5.0 T0200 Mal
trial dimension comfortably and to adjust the off-
set before cutting the finished N22 GSa 51750 T0400 M43
N23 G96 5550 M03
N24 GOO G42 Xl22.0 Z3.0 T0404 MOB
02307 N25 G70 P18 Q20
(TRIAL CUT FOR TAPER. - ONE
N26 GOO G40 XlO.O Z5.0 T0400 M09
Nl G20 G99 G40
N27 M30
N2 G50 S1750 T0200 M42
%
N3 G96 S500 M03
/ N4 GOO G42 X4.428 ZO.l T0202 MOB
/ NS G01 Z-0.4 FO.OOB 02308 can be improved further by includ-
/ N6 UO.2 FO.03 control of taper on the width, for example. Pro-
/ N7 GOO G40 X10.0 Z5.0 T0200 MOO gramming a trial cut is useful but often a neglected tech-
/ (TRIAL CUT DIA IS 4. 428 m:::H:E~S nique, although it does present many applications.

/ NS G96 5500 M03 • Program Proving


N9 GOO G42 X4.6 ZO.l T0202 MOS,--
NlO G7l Pl1 Q13 UO.06 WO.OOS D1500 FO.Ol can
Nll GOO X-J.875 to check it
N12 GOl X4.375 Z-0.73 FO.008 limited experience
Nl3 X4.6 FO.012 easy to run a for the first time.
Nl4 S550 M43
Nl5 G70 PH common concerns of operators is the
Nl6 GOO G40 XlO.O Z5.0 T0200 MOl towards a particularly when the
The rapid motion rate of many modern
a common where a be very high. over 1500 in/min. At
cutting tool is used for both roughing and finishing the rapid approach to the cutting position on
operations. It a logical way of the block skip not add to the operator's confidence,
function, a form. In most applications, <'''' ....,''y"t''' approach is \0 the close
tools for roughing and finishing may be depending lenal. most controls, the operator can set
on the of required accuracy. When two cutting ride rate to 100%, and slower. On
tools, the trial cut dimension is usually more for the rate cannot be done.
the finishing than for the roughing
02308, the block skip function is illustrated The next two 02309 and 02310, show a typi-
ting (ools - is for roughing, T04 is cal method to eliminate the problem during
ous is used. setup and program proving, yet maintain the full mo-
tion rate during operations for productivity.
170 Chapter 23

Block function in examples a less usual • Numbered Block Skip


- it is used for a section of a block, rather than the
For machining, the block function is set to the
block itself, if the control supports such a method.
ON or position and in this mode the whole
02309 (TURNING EXAMPLE)
program. If the ON seuing is required for one section of the
Nl G20 G40 G9S but not for another, the operator to be
N2 GSO S2000 usually in
r" ................ program comments. This
N3 GOO T0200 M42 changing block mode in of a program can
N4 G96 S400 MOl unsafe and create problems.
NS G41 X2.75 ZO T0202 M08 FO.l
N6 GOl X .. FO.004 An optional feature on some controls is a selective or a
N7 ••• numbered block skip function. This option allows the oper-
ator to select which portions of the required the
02310 ON setting and wbich portions OFF setting.
Nl G20 G17 G40 GSo seuings can be done before the Cycle SIart key to
N2 G90 GOO G54 X219.0 Y7S.0 MOS initialize the program. This also uses slash
Nl G4l Z-1.0 8600 M03 H01 FlO.O symbol, but followed by an within the range of I to
N4 GOl X.. F12.0
NS ... 9. The selection mode is on the control
screen (Setrings), LInder matching switch number,
[n both examples, the block skip is used within a single
example. a program may tmee groups, each
block. design of both programs lakes of two expecting a different setting of skip function.
conflicting commands within the same block. If two con- the switch the symbol, are
flicting commands in a single block, the falter com- clearly and all operator must do is to match the
mand used in block will become effective. control seuings with the activity.
In both examples. the first command is GOO, second
L Normally, the GOI motion will a pnonty. Nl •.•
N2 ..
the slash the control will accept GOO. if Nl SKIP GROUP 1)
block skip is set ON, but it will GOI, if the block n N4 (BLOCK. SKIP GROUP 1)
skip is set OFF. When the block mode is both
motion commands will be read second in
that block effective (GOI overrides GOO). Watch N16 •••
for one possibility, already emphasized: N1? (BLOCK SKIP GROUP 2)
/2 Nl8 \"""-"'-"-'" SKIP GROUP 2)
12 N19 (BI,ocK SKIP GROUP .:2)

During the firs! machine run l the operator should set the N29 •••
block skip making GO I command The NlO (BLOCK SKIP GROUP 3)
tool will be slower in the rapid but much /3 Nll (BLOCK SKIP GROUP 3)
Also, the feedrate switch control sys-
tem will become effective, offering additional flexibility.
N4S ...
When the program proving is and the tool
approach is confirmed, the block skip can be set ON, to pre- rules apply skip function as
vent the GO I motion from processed. Both 02309 for normal version. Incidentally, the II selection is
and 10 are typical of breaking with tradition same as a plam slash only, so blocks N3 and N4 above,
to a specific result. could have also writte~ (his

• Barfeeder Application INl


I N4
On a lathe, the block skip function can in
barfeeding, for a continuously running machining. If the Numbered block skip function is not i:lVCllll:lDle on all controls.
n'>rr.,,"nPT allows it, tbe techniques is quite The typi-
program will actually have n.vo ends one will use Programs the selective skip function can be
M99 function. the end will use M30 function. very clever and even efficient, but they may place quite a
block will preceded by block skip symbol and on the machine For the majority of jobs,
will be placed before the M30 code in the part program. be a plenty of programming available by
This technique is in 44. the standard block skip function.
DWELL COMMAND

Dwell is another name a pause in program - It IS an • Applications for Accessories


intentional delay applied during program ....l"rl('''''~c
In this period of specified in a CNC - any second common application the dwell command
motion is while all program commands is certain miscellaneous functions - M functions. Sev-
functions unaffected. When eral such functions are to control a of CNC
time expires, the control resumes processing the machine accessories, as a barfeeder,·tailstock, quill,
program with the block immediately following the block part catcher, custom features, and others. programmed
that contains the dwell. dwell time will allow full completion of a certain
as the operation of a tailstock. The machine
spindle may be stationary or rotating in cases.
PROGRAMMING APPLICATIONS Since there will no contact of the tool with part
material in category, It IS not important the ma-
Programming a dwell is and can quite useful chine spindle rotates or not.
in two applications:
On some CNC the command may also
o During actual be required when spindle speed, usually after a
when the tool is in contact with material range This is used mainly on CNC lathes. In
o For operation of machine accl~sso
cases, guidance as to how and to pro-
when no cutting takes gram a dwell time is to follow the recommendation of the
CNC machine manufacturer. Typical examples of a dwell
Each application is equally important to programmers, lathe are described in Chaprer44, cov-
although the two are not used simultaneously. subject.

• Applications for Cutting DWEll COMMAND


When cutting tool is removing material, it is contact
with the machined part. A dwell can be applied during ma-
chining a number reasons. If spindle is
the spindle rotation is very important
common preparatory command for dwell is G04.
practice. the application of a dwell a cut is other G commands, G04 used by itself only will do
mainly used breaking chips while drilling, counterbor- nothing, It must always another address, in
ing. grooving or parting-off. Dwell may al.so be used while this case specifying the amount of time to dwell (pause).
turning or boring, in order to eliminate physical The correct addresses dwell are X, P or U (address U
left on the by end of the 1001. This, can only used for a lathe). The time
IS attributed to the tool during cutting. specified by the address is either in milliseconds,
many other applications, the dwell function is useful to or in seconds, depending on address. Some
control deceleration of the cutting feed on a corner during control systems use a different address for
feedrales. example. This use of dwell could be par- dwell but the purpose as
ticularly for older systems. both cases, gramming methods remain identical.
dwell command 'forces' machining operation to
fu.lly completed in one block, before the next block,can be fixed eycles machining centers also use dwell.
I'>"<,!""t,,,r/ The still to supply the exact pe- dwell is programmed together with the cycle not
of time for the This time to be suf- in a separate block. Only fixed that a dwell
ficient - neither too short nor too long. time can use it in the same all applications,
the dwell command must programmed as an independ-
elll block. It will remain for that block only and does
over to the next block. is a only one block
uO(~tlOin and is not modal. dwell execution, cur-
rent status of is unchanged. but the
cycle

171
172 Chapter

• Dwell Command Structure The control unit interprets such a command as a dwell,
The structure - or format - for the function is: not as a axis mOlion. This is because of the of the
preparatory command 004, which establishes meaning of
the address that follows it. If using the X or U address for
X5 • 3 AU machines, excludingJlXed cycles dwell not feel comfortable, use the third alternative -
us . 3 l£JJhes the address P. Keep in mind, the address P dues nat ac-
P53 ... Allmtlchines. illcludingjix.edcyc/es cept lhe decimal point, so the dwel1 is programmed directly
as the number of milliseconds to control the pause duration.
In any case, typical representation is five digits before One millisecond is l/lOOOlh of a second, therefore one sec-
and three digits after decimal point, although that ond is equivalent to 1000 milliseconds.
vary on different control systems.
aU,"IlC~'i:>"',) X and U can also
Since milliseconds or seconds can be used as units of seconds, without a decimal point -
dwell, the relationship can be established:
1304 X2.0 is equal to 1304 DODO
1s = 1000ms
Leading zero suppression is assumed in the format with-
out the poinl (trailing zeros are
lms = O.OOls
Pl POOOl ... I m.iJ.Jisecond
II:~ where .. pl0 POOIO .. 10 milliseconds
s = second Ploa P01DO .•. TOO milliseconds
ms millisecond
Depending on the programming for dwell. the
Examples of practical application of the dwell fonnat are: range of programmable time varies. For format using
digits in front of a decimal point and three oigils fol-
G04 X2. 0 p' pYt[ferredfor long dwells lOWing it, the is 0.001 of a and up to
99999.999 presents a range from mInI-
1304 P2 000 n. pnd"erred for short or memwn dwells
mum of l/lOOOth of a second, up to hours, 46 minutes
1304 U2. 0 ... l(jJhe in seconds and 39.999 '''TI''lIH-

In example, the dwell is 2 seconds or 2000 millisec- Dwell programming applications are identical to both
onds. All are shown. The nexi example is machining centers and lathes, but U address can only
similar: used in lathe programs. The of either or
English dimensional units has no effect on the dwell func-
1304 XO.S tion whatsoever, as is not dimensional.
G04 P500
1304 UO.5
DWELL TIME SELECTION
example illustrates a dwell of 500 milliseconds, or
one half of a Again, all three formats are shown. Seldom ever the dwell lime will exceed more than just a
seconds, most often much less than only one second.
a CNC program, the dwell function may appear in the
Dwell is a nonproductive lime it should se-
following way - note dwell as a separate block:
lected as the shortest time needed to accomplish the re-
N21 1301 Z-l. 5 F12.0 quired action. The time delay for completion of a particular
N22 1304 XO.3 (DWELL COMMAND O. 3 SEC) machine operation or a special machine accessory is usu-
N23 Z-2.7 F8.0 ally by machine manufacturer. Selecting
dwell time for CUlling purposes is al ways re-
Programs using X or U addresses may cause a possible sponsibility. Unfortunately, some programmers often over-
confusion, particularly to new The X and U the dwell duration. After all. one second seems
may incorrectly be interpreted as an motion. short but think about this example:
This will never be the case. By definition, the X axis and its
lathe application, the U is the dwelling axis. X axis is In one block of program. a dwell function is assigned
the only common to all CNC machines. for the duration of one The speed is set to
480 rlmin and the dwell is applied at locatjons on the
part. perhaps during a operation. That means the
cycle lime for each part 50 seconds longer with dwell,
then it would without dwell. Fifty seconds may not
DWELL COMMAND 173

~ee~ too unreasonable, but are they really necessary? Give MINIMUM DWEll
Jl a Itnle thought or - even better calculate it If the dweU·
must used at all, sure to calculate mlllllnum
dwell that can do the job. It is easy to the dwell arbi- During a cut, is for operations where cuttino tool is
by and without much thinking. In ex- contact with the machined part, minimum d:ell defini-
ample, the minimum dwell required is only 0.125 seconds: tion is important, but selting is unimportant (time
or number of revolutions).
60 I 480 = 0.125
Minimum dwell is the time
This minimum dwell is eight less than pro- to complete one revolution of the spindle,
grammed dwell of one second. If minimum dwell is
used rather estimated dwelL the wlll Minimum dwell, programmed seconds, can calcu-
crease by only 6.25 seconds, than 50 sec- lated, a simple
- a significant improvement in programming effi-
and productivity on the machine. 60
Minimum dwell (sec) =
Minimum dwell calculation and other issues related to it r /min
are shortly.
C Example:
SETTING MODE AND DWEll
To calculate minimum dwell in seconds for spindle rota-
Most programs machining centers will use feedrate tion of 420 r/min, divide rlmin into sixty (there are 60
per lime (programmed in inches per minute - in/min - or in one minute):
millimeters minute - mrn/min). applications are
normally programmed in per revolution, as 60 I 420 = 0.143 seconds dwell
revolution - in/rev - or millimeters per revolution -
mmlrev. On many Fanuc controls. a parameter setting al- The format selection of dwell block in the program will
lows programming a in the elapsed in sec- depending on the machine type used and a
onds or milliseconds - or the number ofspindle revolutions. programming All following examples represent
Each has practical uses and benefits. same dwell time of 0.143 of a ;)",,",'uuu
pending on parameter setting, the dwell com-
G04 XO.143
will assume a different meaning with setting: G04 P143
G04 UO.143
• Time Setting
Regardless which formal is used, all dwell values in
specify dwell time of 143 which is
a second. It is allowed to m
one program, but such a practice not represent consis-
tent slyle.
practical dwell applications in a program,
calculated minimum dwell is only mathematically correct
G04 PlOOO and not be most practical value to use. It is always
\ better to round off the calculated value of the minimum
... represents dwell of one second, to 1000 dwell slightly upwards. example. the G04 XO.I may
mi lliseconds. become 004 XO.2, or - if a double value is used - then G04
XO.143 wlll G04 XO.286, or even G04 XO.3 LO
• Number of Revolutions Setting round off the
For the of spindle revolutions the dwell is reasoning for this takes inlO consider-
expressed as the number of the spindle rotates, within ation some machining It is quite normal that the
the of()'OOI to 99999.999 revolutions, for example: CNC may be running 11 certain job with the
speed in an override perhaps even set at its
G04 P1000 at 50%. Since 50% spindle speed override is
minimum on most CNC controls, the double mini·
... represents the dwell the duration one revolution mum will at least one complete
of the spindle. revolution, without of production lime.
174 24

NUMBER Of REVOLUTIONS
In the other dwell mode (selected
the format only to the same,
but be much different. In some appJica- ~ where ...
desirable to program a for a certain
revolutions, rather than for a 60 : : : Number of minutes (translation factor)
n :::: Required number of spindle revolutions
r/min:::: Current spindle speed (revolutions per minute)
In a lathe
tion programmed to
C) Example:
groov i ng tool to To calculate in seconds for full three
to clean up die revolutions, at of 420 rfmin, the formula
time in secomlS can be applied:

Dwell~ = 60 x 3 / 420 = 0.429

The program block the required three spin-


die revolutions in terms of time will take one of
following forms:

• System Setting G04 XO.429


G04 P429
If the control is set to accept the dwell as the num- G04 UO.429
ber of spindle revolutions, rather than as time in or
milliseconds, the is very straightforward. All It a good to backwards and ca1cu-
that is needed is to the dwell command 004, followed the equivalent ofdwell time, represented as the number
by the number of "-u"'''
I "U of spindle revolutions. Usually, result will not be an in-
number and will rounding to the nearest value
G04 >3.0 upwards. The above formula can easily reversed:
G04 P3000
G04 m.o

Each format same result - adwell in the du-


ration of three revolutions. How can we tell from
the program whether the means time or revolutions?
We cannol. We have to know the control settings. The only Example:
clue may be the rather input values of the dwell input. confirm that the formula is t'f\MrPI"I use the value of
3.0 revolutions are shorter than 3.0 secon(]s of the previous example the number of
of dwell. Note that the point is still written, to al- revolutions for a d well of 0.429 "".rny",." at 420 rfmin:
low fractions of a such as one half or one quar-
ter of a revolution, for
""""=....",,,,,, = 420 x 0.429 / 60 3 . 003 revoluJions
• Time Equivalent confirms the formula is correct. It is more than
The two modes cannot in one program deliber- that the calculation will start with a dwell that js al-
ately and even between the mix is difficult. rounded, for example, to one half of a
system parameter can set to only one dwell mode
at a time. Since control are normally set for the ""W''''''''"rev '" 420 x 0.5 / 60 .. 3.5 re\l()f.UIj'IJ11S
dwell in seconds or mil rather than the dwell ex-
pressed by the number spindle revolutions, the equiva- based on a revolu-
lenllime must be calculated. spindle speed (in rlmin) CNC especially
must always be known in a case. slow spindle A slow spindle
nOl have the latitude and does
to be equal to not allow a error in the dwell Keep in
"<>''''''"'''1'1 number the follow- mind that the goal is to get ar least one complete part rota-
formula: tion in order to achieve desired Other-
why program dwell at all? Consider
DWELL COMMAND 175

Dwell is programmed for one half of a second duration, e:> Example - Machining Centers Spindle test:
with spindle rotation set to 80 r/min. The
for one half a second S100 'M03 (100 R/MIN mITIAL SPEED)
G04 X600.0 (600 SECONDS IS 10 MINUTES)
ao x 0.5 I 60 = 0.6666667 SSOO (SPEED INCREASED TO 500 R/MIN)
G04 X1200.0 (1200 SECONDS IS 20 MINUTES)
which is less than one complete spindle revolution. The S1S00 (SPEED INCREASED TO 1500 R/MIN)
G04 X1800.0 (1800 SECONDS IS 30
reason for programming the dwell function in MOS (SPINDI..:E:
place is not honored and the lime has to
creased. of 0.5 seconds is therefore not sufficient. The example for machining centers starts with the initial
The dwell has La calculated, the for- spindle rotation of 100 rim in. That selection is followed by
mula presented earlier: the dwell of 600 seconds, guarantees a 10 minute
constant run. spindle speed is then increased to 500
60 x 1 I 80 = 0.75 seconds r/min the dwell lime to 1200 for
minutes. last selection is 1500 spindle speed run-
Generally, there is not much use type of calcula- ning far 1800 seconds. or 30 minutes, before the
tions - most programming assignments can be handled very spindle stops.
well with the standard dwell per time calculations.
e:> Example - lathes - Spindle test:
LONG DWELL TIME
M43 (GEAR RANGE SELECTION)
G97 S100 M03 (100 R/MIN mITIAL
For machining purposes on CNC machines, an unusually G04 X600.0 (600 SECONDS IS ~o MINUTES)
long dwell is neither Does that SSOO (SPEED DlCREASED TO 500 R/MIN)
mean long dwell times are not G04 X1200.0 (1200 SECONDS IS 20 MINUTES)
S1S00 (SPEED DlCREASED TO 1500 R/MIN)
A long dwell is the programmed time that is well 004 X1800.0 (1800 SECONDS IS 30 MINUTES)
above the established average for most normal MOS (SPlNDLE
Lions. Seldom ever there is a need to dwell time
during a part machining in excess of one, two, three, or four is very similar to one for a ma-
seconds. The range available on the system first The initial spindle speed
(over 27 hours) more important to the nl(lintl'nat1a pn- range for example. M43.
than to programmer. A~ an example of a spindle been set to 100 r/min. The of
typical application when a long dwel1 may,be beneficial, is follows,leaving the spindle rotating for full Ja
a program developed by maintenance technicians minutes. Then the speed is increased to 500 r/min and re-
testing the spindle functionality. mains that for another minutes (1200 seconds).
fore the is stopped, one more is done - the
carefully the following actual situation com- spindle speed increases to 1500 r/min and remains at that
mon to machine - a spindle of the CNC machine for another 30 minutes (1800 seconds).
has repaired must be before the machine
can baqk to production. The will
consist of running the at various for a cer-
tain period time of selection.
In a typical the maintenance department re- • Machine WarmaUp
a small program, In the machine "'1.1' II,,","..
A similar program (typically a subprogram) that uses a
will rotate 10 minutes aL 100 r/min, then for
minutes at r/min. followed by the spindle rotalion at long dwell time is favored by many CNC programmers and
CNC operators, to 'warm-up' the machine before
highest rate of 1500 r/min additional 30 minutes.
program development is not an absolute since the running a critical job. This warming activity takes
maintenance technician may do the test by manual meth- place typically at the start of a morning shift during winter
manual approach will not be very but it months or in a cold shop. This aI-
machine to a ambient t",n'lT\Pr",tl
serve the purpose of the maintenance test.
before any precisian components are machined. same
A better choice in cases is to Slore testing proce- approach can also be used to gradually the maximum
dure as a program, directly into CNC memory. spindle speed for high-speed machining (5000 r/min and
maintenance (service) program wi)) be a little different up). As usually, all safety considerations must have a high
for machining centers than for but the objec- priority in all cases.
tives will remain the same.
1 24

• X Axis is the Dwelling Axis fiXED CYCLES AND DWELL


control display screen shows how much time is still
the dwell time expires. can by Chapter of handbook covers the subject of fixed
lV'-'!·'.H,,o:. at the X display of the cycles for CNC mach in i ng centers and dri lis in a
(position) screen of a typical detail. In-deplh descriptions of all cycles can
will be as X. this For purpose of the current topic, are
regardless of just some comments relative to the subject of dwell, this
P or are programmed. Why the time, as the dwell to fixed cycles.
,,"',,_ ......._u as the dwelling axis and not any

is a reason - because the X axis is the only com- Several fixed can be programmed with a
mon to all machine tools - i.e., machines, o Normally, GSB,GS9
mills, machining centers. flame cutters,
and so on. They all use XYZ axes. o Also cycles and G84, only by parameter setting
(there is no Y axis) and wire EDM uses
no Z machines are similar. The dwell cycles is always P, to avoid du-
in the same block. The address U
• Safety and Dwell and the command are never programmed in a cy-
cle - the dwell function is 'built' into all fixed cycles thal al-
reminders have low the dwell (technically all cycles do).
a great degree of caution
,,"YPTr'''''''' rules for dwell time remain the same
dwell limes. particularly or fixed cycles, as for any machining application.
'1"1""""''''''' The CNC machine should never be
unattended. In case of long Q Example.
for warning signs should be prominently
posted to prevent a potentially unsafe situation. If N9 GB2 Xl.2 YO.o RO.2 Z-O.7 P300 F12.0
are not someone else should
- 0.3
chine serviced,
dwell will become
live upon motion along the Z axis (actual
motion), but rapid return motion.
If a 004 P.. is programmed as a separate block in a fixed
tool or cycle mode, for example between the G82 block and the
sel1 inspection, lubrication, etc., block, no cycle will be in that block and the
must if absolutely necessary
value of P in the fixed definition is not updated. On
gram execution ~ as a manual operation, never the/latest controls, a system setting enables or
program control! disables this usage. If this is used, the command
G04 P.. will be active tool rapid motion from
location just completed. function will always
executed while the cutting is out of a hole, in the clear
This feature is seldom Y~""'lIr~'fl
FIXED CYCLES

Machining holes is probably the most common method of point-to-point machining for holes is a
tion, mainly done on CNC milling machines and method of controlling the of a cutting tool in X
iog centers. Even in the traditionaJly known for Y axes at a rapid rate, and in the Z at a
their complex parts, and aerospace compo- cutting feed rate. Some motions along Z axis may also in-
nents manufacturing, instrumentation, optical clude rapid motions. All this means is that there is no cut-
or mold making industries, holes is a vital part ting along XY axes for operations. When the
of the manufacturing nr-r,rp.,~<.: tool completes al [ motions the Z axis and returns
from the hole to the position, motions
When we think of what machining holes means, we X Y axes resume and to a new
probably think first of such operations as center drilling, the Z are repeated. Usually, this
spot drilling and standard drilling, using common tools. of motions occurs at locations. The hole
However, this category is wider. Other related and is by cutting tool
tions also belong to the category of machining holes. Ihe cutting depth is controlled by the part program.
standard center drilling, spot drilling and drilling are method of machining is Iypical to fixed cycles for
together with related as tapping. reaming, tapping, boring and related operations.
point boring. tools, countersinking
even backboring. elementary structure for point-to-
point machining can four general
Machimng one simple hole may only one tool but (typical drilling sequence shown in example):
and complex hole several tools to be
Number of holes a given job is im- a Step 1: Rapid motion to the hole location
portant for selection of proper ,..,,.,..,. . . rJ:l'mnnl approach. ... along the Xand/or Yaxis
holes machined with a 2: Rapid motion to point of the cut
having the same ... along the Z axis
they may even be at o 3: Feedrate motion to the spe:ClTIl90 depth
combinations are ... along the Zaxis
Illd'lUlIl~ one hole may be a ::.111111111;;'
o 4: Return to a clear position
many different hole ... along the Zaxis
a well planned anu
four also I'pn,r.,<:"nr
In of programming applications. hole opera- required to program a
a great number of similarities from one job to programming method, without
another. Hole machining is a reasonably predictable opera- is only one or two holes a
tion and operation that is is an ideal subject is more a
to be very efficiently by a For this rea- program length is of no impor-
son, virtually aU CNC control manufacturers have incorpo- is not the common case - normally, there are
ingenious for in a part and several tools to be used to
in their control use so the hole to engineering specifications. Such a
or - morecnmmnnly - Ihefixed cycles. program could be extremely loug and difficult Lo inLer-
pret and In fact, it may even too long to fit into
POINT-TO-POINT MACHINING the memory.

Machining holes is generally not a very sophisticated


procedure. There is no contouring required and there is no
multi axis motion. The only when actual
cutting is along a single - virtually always
the Z axis. lype of machining is commonly known as
point-to-point machining.

177
178 25

• Single Tool Motions VS. Fixed Cycles NS G99 GS2 RO.I Z-O.6813 P200 F4.5
N6 X3. S7 Y3. 4
following two compare N7 X2. 047
programming a hole pattern in individual N8 GSa G28 X2.047 Y3.4 ZI.O M09
where each of the tool must be as a N9 M30
~ingle motion and same pattern using a %
cycle (02502). No explanations lO the programs are
at this stage comparison is only a visual 02501 required the total of 18 blocks, even
Lration between two distinct programming methods, It three only. In program 02502, cycles,
shows an application of a 03116 standard drill Ihat is used only nine blocks were needed. shorter program 02502
to cut a full blind depth of inches. Only holes are is also easier to there are no repetitious blocks. The
programmed in the example, lf1 moditications, updates and olher changes can be
much whenever required. use cy-
machining holes, even if a single is machined.

FIXED CYCLE SELECTION


fixed cycles by control
turers to eliminate in manual programming
Y3.40 and allow an easy program data changes at machine.

->-1--+----' Y1.89 For a number of identical holes


same starling point, the same depth, the same
same dwell. etc. X and Y axes locations are
ent each hole of pattern. The the
des is to for programming
once - for (he first hole of the pattern. The
25·1 become modal for the duration of the cycle
Simple hale - programs 02501 and 02502 Lo repeated, and until one or more
change. This is usually for location new
02501 (EXAMPLE 1) but other may be for any hole at
(PROGRAM USES INDIVIDUAL BLOCKS) lime, for more complex holes.
Nl G20
N2 Gl'7 G40 GSa A fixed is called in program a
N3 G90 G54 GOO X5.9 Yi.89 S900 M03 ratory G command. Fanuc and similar control
N4 G43 Zl.0 HOl MOB the following fixed cycles:
N5 ZO.l MOB
N6 GOl Z-O.6S13 F4.5
N7 G04 P200 ,_ High speed peck drilling cycle
NS GOO ZO.l
N9 X3. 8'7 Y3.4 G74 Left-hand tapping cycle
NlO GOl Z-O.6B13
Nll G04 P200 G76
Nl2 GOO ZO.l cycle)
Nl3 X2.047 GSO
Nl4 GOl Z-O.6813 Gal
Nl5 G04 P200
Nl6 GOO ZO.l MOg G82 Drilling cycle with dwell
Nl7 G28 X2.04'7 Y3.4 Zl.0
NlS IDO G83 Peck drilling cycle
%

The second , , L. " J Luses same


hole pattern, but efficiency.

02502 (EXAMPLE 2)
(PROGRAM USES FIXED CYCLE) G87 Back boring cycle
Nl G20
N2 Gl1 G40 GSO GSB Boring cycle
N3 G90 Gs4 GOO XS.9 Yl.89 S900 M03
Ga9 Boring
N4 G43 Zl.O HOl MOB
FIXED CYCLES 179

The list is only generaJ and indicates the most common


use of each cycle, not always the only use. For example, - Z = Z axis end position = Z depth
certain boring cycles may be quite suitable for reaming, al-
though there is no reaming cycle directly specified. The o Position at which the reedrate ends
next section describes programming format and details of
The Z depth position can have an absolute value ot an in-
each cyde and uffers suggesliuns fur their proper applica- crementaJ value.
tions. Think of fixed cycles in terms of their built-in capabi-
lities, not their general description.
P = Dwell time
PROGRAMMING fORMAT
o Programmed in milliseconds (1 second = 1000 ms)
General format for a fixed cycle is a series of parameter The dwell time is practically applicable only to G76,
values specified by a unique address (not all parameters are G82, G88 and G89 fixed cycles. It may also apply to G74,
available for every available cycle): G84 and other fixed cycles, depending on the control pa-
rameter setting.
IN .. G.. G.. X.. Y.. R.o Z.. P.. Q.. 1.. J.. F.. L.. (or K.. ) o Dwell time can be in the range of 0.001 to 99999.999
Explanation of the addresses used in fixed cycles (in the seconds, programmed as Pl to P99999999
order of the usual block appearance):
Q= Address Q has two meanings
__=__
___________N __b_e_r__________~
BI_o_ck__n_um
I'----------------------------------~
'- . I 0 When used with cycles G73 or G83,
Within the range of Nl to N9999 or Nl to N99999, de- it means a depth of each peck
pending on the control system o When used with cycles G76 or G87,
it means the amou nt of shift for bo ring
G (first G command) = G98 or G99 The addresses I and J may be used instead of address Q.
depending on the control parameter setting.
o G9a returns tool to the initial Z position
o G99 returns tool to the point specified by the address R I = Shift amount
G (second G command) = Cycle number o Must include the X axis shift direction for
boring cycles G76 or G87
o 0.9IY one of the following G commands can be selected: The I shift may be used instead of Q ~ see above.
G73 G74 G76 Gel Ge2 Ge3
Ge4 Gas G86~. GS7 GSS Gag J = Shift amount
x = Hole position in X axis o Must include the Y axis shift direction for
boring cycles G76 or G87
X value can be an absolute or incremental value The J shift may be used instead of the Q - see above.

'--________
Y_=__H_O_le__
p_OS_j_tio_n__in__
Y_a_X_is________ ~1 1~
o
________ s_pe_c_if_i~__t_io_n________~
F_=__F_ee_d_r_a_te__
Applies to the cutting motion only
Y value can be an absolute or incremental value
ThiS value is expressed in in/min or mmlmin, depending
R = Z axis start position = R level on the dimensional input selection.

o Position at which the cuning feedrate is activated


L (or K) = Number of cycle repetitions
The R level position can have an absolute value or an in-
cremental value. Q Must be within the range of LO - L9999 (KO - K9999)
II (Kl) is the default condition
180 Chapter 25

GENERAL Caution: In case of command


.and a motion command of Group in same block, the
order of programming those commands is important
discipline - it means
there are jimita- GOO Gal x .. Y.. R .. Z .. P .. Q.. L •• F ..
tions, are programming is not a
language programming but a lot with it. We talk fixed cycle is processed, while in
about a Fanuc or
gramming, a Milsubishi or Gal GOO X.. Y.. R.. Z.. P .. Q.. L .• F ••
example. Fixed cycles are
fixed cycle is JIot processed, but
Consider fixed cycles as a set be performed; other values will
ules - modules that contain a tion of the F feedrate value, which is
grammed machining instructions. uations at all costs!
'fixed" because their internal format cannot
These program instructions relate LO In this chapter, lhe individua1 fixed cycles are
predictable tool motion that rpn,""'lc in detail and each cycle has an illustration of structure.
sic rules and restrictions to illustrations use shorthand graphic symbols. each with
summed up in the following items: meaning. In Figure 25-2, the meaning of all sym-
used in the illustrations is described.
a Absolute or incremental mode of can
established before a fixed cycle is or ---"l> Rapid motion and direction
anytime within the fixed cycle
Cutting motion and direction
a G90 must be programmed to select the absolute
G91 command is required to select the incremental Manual motion and direction
a Both G9D and G91 modes are modal! Boring bar shift and direction
a If one of the X and Yaxes is omitted in the
mode, the cycle will be executed at the .",,,,,,,tu.1'I 1/'lI~l'Il'I/'n
of one axis and the current location of the
o If both X and Y axes are omitted in the fixed cycle
the cycle will be executed at the current tool position.
a If neither G98 nor G99 command is programmed for a fixed
cycle, the control system will select the default command
as set by a system parameter (usually the G98 command).
o Address P for Ule dwell time designation cannot use a
decimal point (G04 is not used) - dwell is always
programmed in millisecon~s. SymbOts and abbreviations used in fixed cvcles illustrations
\

o If LO is programmed in a fix'ed cycle block, the control


system will store the data of the block for a later use, but
will not execute them at the current coordinate location.
ABSOLUTE AND VALUES
a The command GaO will always cancel any active fixed
cycle and will cause a rapid motion tor any subsequent
tool motion command. No fixed cycle will be processed
in a block containing GSO.

~ Example:
method
GSO Z1.125 is the SOJ11eGS lated to the point of origin - program zero,
menIal method, the XY position of one hole is
Gao GOO Zl.125 or from the XY position of the previous
the distance from {he last Z value, one established
GOO Zl.12S calling the cycle, to the position where
vated. The Z depth value is the
01, namely GOO, G01, and the termination of feed rate motion. At
are the main motion com- fixed cycle, [001 motion 10 the R will
any fix.ed cycle. rapid mode,
FIXED CYCLES 181

INITIAL INITIAL From the practical point of view. always select this posi-
LEVEL LEVEL lion as the safe level - not just anywhere and not without
/--- some prior thoughts. It is important that the level to which
/ the tool retracts when G98 command is in effect is physi-
--->t cally above all obstacles. Use the initial level with other
R
- R LEVEL precautions. to prevent n collision of the cutting tool during
rapid motions. A collision occurs when the cutting tool is in
lO--+-
an undesirable contact with the part, the holding fixture, or
the machine itself.

~ Example of the initial level programming:

The following program segment is a typical example of


programming the initiaJ level position:
Figure 25-3
Absolute and incremental input values for fixed cycles
NQl G90 G54 GOO XlO.O Y4.S Sl200 M03
NQ2 G43 Z2. 0 HO 1 MO B (INITIAL LEVEL AT Z2. 0)
INITIAL LEVEL SELECTION Nl3 G98 GBl XlO.O Y4.S RO.1 Z-O.82 F5.0
Nl4
There are two preparatory commands controlling the Z
axis tool return (retract) when a fixed cycle is completed.
N20 GBO

.. , will cause the cUlling 1001 10 retract to


G98 the inilial position = Z address designation The fixed cycle (G8! in the example) is called in block
... will cause the cUlling tool to retract to N 13. The last Z axis value preceding this block is pro-
G99 =
the R level position R address designatioll grammed in block NI2 as Z2.0. This is setting of the initial
position - lwO inches above ZO level of the part. The Z level
can be selected at a standard general height, if the programs
G98 and G99 codes are used for fixed cycles only. Their are consistent, or it may be different from one program to
main function is to bypass obstacles between holes within a another. Safety is the determining issue here.
machined pattern. Obstacles may include clamps. holding
fixtures. protruding sections of the part, unmachined areas, Once a fixed cycle is applied, the initial Z level cannot be
accessories, etc. Without these commands, the cycle would changed, unless the cycle is canceled first with G80. Then,
have to be canceled and the tool moved to a safe positIon. the initial Z level can be changed and the required cycle be
The cycle could then be resumed. With the G98 and G99 called. The initial Z level is programmed as an absolute
comm\1nds, such obstacles can be bypassed without cancel- value, in the G90 mode.
ing the1ixed cycle, for more efficient programming.
R LEVEL SELECTION
InitiaJ level is, by definition~e absolute value of the last
Z axis coordinate in the program - before a fixed cycle is
called· Figure 25-4. The cutting Lool position from which the feed rate begins
is also specified along the Z axis. That means a fixed cycle
block requires two positions relating to lhe Z axis - one for
the start point at which the cutting begins, and another for
the end point indicating the hole depth. Basic programming
rules do not allow the same axis to be programmed more
INITIAL LEVEL than once in a single block. Therefore, some adjustment in
the control design must be made to accommodate both Z
R LEVEL values required for a fixed cycle. The obvious solution is
---++--'-- lO that one of them must be replaced with a different address.

Since the Z axis is closely associated with depth, it retains


this meaning in all cycles. The replacement address is used
for the 1001 Z position from which the cutting feed rate is
(Z DEPTH)
applied. This address uses the letter R. A simplified term of
reference to this position is the R level. Think of the R level
Figure 25-4 in terms of 'Rapid to star! point', where the emphasis is Of!
Initial level selection for fixed cycles the phrase 'Rapid to' and the letter 'R' - see Figure 25-5.
182 Chapter 25

Z DEPTH CALCULATIONS
fixed cycle must include a depth of cut. is the
at which the cutting tool stops feeding into the male-
Depth is programmed by the Z address in the
block. The point for the depth cut is programmed as a Z
value, normally lower the R level the initial level.
Again, 087 cycle is an exception.
To achieve a of a high quality, always make a
(Z DEPTH) cffort to program the calculated Zdepth accurately-
.:>vv........
exactly, without guessing its value or even rounding it
off. It may tempting to round-off the depth
Figure 25-5 .6979 to .6980 or even to - avoid it! It is not a question
R level selection for fixed of triviality or whether one can away with it. It is a mal-
ter of principle programming consislem.:y. With this ap-
of cutting .£>"",... .. ".'" and it will be so easier to retrace the
it is also the Z to which cutting tool will retract cause of a problem, should one develop later.
upon cycle completion, if preparatory command G99 was
programmed. If G98 was programmed, retract will Z depth calculation is on the following criteria:
to the level. Later, the G87 back boring cycle will
Q Dimension of hole in the drawing (diameter and depth)
described as an exception, due to its purpose, This cycle
not use G99 retract mode, only G98! However, all o Absolute or incremental programming method
the R level
L.VL..u."I. must be selected carefully. The o Type of cutting tool used + Added tool point length
most common values are .04-.20 of an inch (I mm) above
the part ZOo Part setnp has 10 considered as well, and Q Material thickness or full depth of the hole
justments to the setting if necessary. o Selected clearances above and below material
R level usually increases about or four for (below material clearance for through holes)
tapping operations cycles G74 G84, to the On machining the ZfJ is pro-
feedrate acceleration 10 reach maximum. grammed as top of finished part face. In case, the
absolute of Z address will always be programmed as
c::> Example of Alevel programming: a negative value, Recall the absence of a sign in an axis
address means a positive value of that This
N29 G90 GOO GS4 X6. 7 YB. a S850 M03 has one strong advantage. In case programmer
N30 G43 Z1.0 H04 MOB (INITIAL LEVEL IS 1. a) to write the !l.lgn, the depth value will automatically
N31 G99 G8S RO.l Z-1.6 F9.0 ® LEVEL IS 0.1) .--'·".....'A a positive value. In that case, the tool will
N32 move away the part, area. The
part program win not be easily cor-
rected, with only a loss
N45 Gao
c::> of Z depth calculation:
initial level in the example is in N30, set to
.0. The R is set in block N3) (cycle block) as illustrate a practical example Z depth
,100 inches. same block, the G99 command is pro- consider the hole detail in Figure We will use a 0.75
grammed during the That means inch drill to a hole, with a full depth
the tool will above pan zero at the stall and a standard drill is the tuullip
end of When the tool moves from one hole to the consideration. Its design has a typical 1 to 1200 point
next, it moves along the XY axes only at this Z height level and we have (0 add an additional .225 inches 10 the
.100 above work. depth:
The R pO.'\ilion is normally lnwPr Ihe initial .3 x .75 .225
level position. If these two levels coincide, the start and end 2.25 + .225 = 2.475
points are equivalent to initial position. The R is
commonly programmed as an value, in total Z depth of 2.475 can
but into an incremental mode I. if the
application from such a change.
G99 G83 X9.0 Y-4.0 RO.1 Z-2.47S Q1.125 F12.0
FIXED

81

RO.1
"""""'7"777"7i--t7:'177""'7'7'7 - Z0

_.."J~<,~~~-,;'-- Z-2.25 --++--i-- 20


~</7"/,fnL/C:/c","- z- 2.4 75

INCREMENTAL ABSOLUTE

Figure 25-6
25-7
Z depth calculation for a drilling fixed cycle
G81 fixed lVVII~I:IIIV used for drilling
A peck drilling cycle is used in the example for best
machining, although Z would be the same • Ga2· Spot-Drilling Cycle
for G81, G82 or G73 tool point length calcula-
tion is described in in Chapter 26.

DESCRIPTION- OF FIXED CYCLES Description of Ga2 cycle


motion to XY position
In order to understand how each fixed cycle works, it is
important to understand the structure of each cycle
and details of its programming format. In the following
descriptions. each fixed will be evaluated in detail.
The cycle heading' programming format
of the cycle, followed by the explanation the exact opera-
tional sequences. Common of each cycle will 5
also be described.
All these details are important a help in un- WHEN TO
derstanding the nature of each as well as cycle Drilling with a dwell tool pauses at the hole bottom. Used for
to select for the best machining As a bonus, the center drilling, spot drilling, spotfacing, countersinking, etc. -
knowledge of the internal structure wiB help in de- anytime a smooth is at bottom of hole. Often
signing any unique cycles, In area of cus- used when slow spindle needs to be programmed.
tom macro programming.
If used for boring, the G82 cycle will produce a scratch mark
on the hole cylinder during retract.
• G81 - Drilling Cycle -<~

G98 (G99) G81 X.. Y.. R.. . , G82

Step! Description of GBl Cycle


"C"",,'"''''

1 I Rapid motion LO XV position


2 I Rapid motion to R Level
3 I reedrate motion to Z depth
I Rapid retract to initial level (with G98)
4 or Rapjd retract to R level (with G99)

WHEN TO USE 681 CYCLE - Figure 25-7 . DWELL

Mainly for drilling and center a dwell at Figure 25-8


Z depth is not If used for the G81 cycle will
G82 fixed cycle - typically used for spot drilling
produce a on the hole during retract.
184 Chapter 25

• GSJ - Deep Hole Drilling Cycle - Standard retract by a clearance value


4 (clearance value is set by a system parameter)
Feedrate motion in Z axis by
5 the Q amount plus clearance
Step
1 Items 4, and 5 repeal until the
6
programmed Z depth is reached
2 Rapid motion to R level
Rapid retract to iniliallevel (with 098)
Feedrale motion \0 Z deplh 7 or Rapid retract to R level (with 099)
3 by the amount of Q value
WHEN TO USE G73 CYCLE· Figure 10:
Rapid motion to the depth less a clearance For deep hole drilling, also known as peck drilling, where the
(clearance is set by a system parameter) chip breaking is more important than the retract of the drill
from the hole. The G73 cycle is often used for a long series
Items 3, 4, and 5 repeat until the drills, when a retract is not very important.
6 Z depth is reached
Rapid retract to initial level (with 098) The G73 fixed cycle is slightly faster than the cycle,
7 or Rapid retract 10 R level (with G99) the name 'high speed', because at the time saved by not
retracting to the R level after peck. Compare this cycle
WHEN TO G83 CYCLE - Figure 25-9 : with the standard deep hole drilling cycle G83,

For deep hole drilling, also known as peck drilling, where the
drill has to be retracted above the part (to a clearance position)
after drilling to a certain depth. Compare this cycle with the
high speed deep hole drilling cycle G73.

G99
G83
Q
G98
Q

Q
- - - - - - - - - " -.. . .- .....~ Z DEPTH

Figure 25-10
·:::=d
G73 fixed cycle - typically used far deep hole driJling
(this cycle does not retract to R level after each peck)
-,0--- Z'DEPTH
Number of pecks calculation
Figure 25-9
G83 fixed cycle - typically used for deep hole drilling When using G83 and G73 in the always
(this cycle retracts to R level after each have at least a reasonable idea about how many pecks will
the tool in each hole. Unnecessary drilling of
hundreds or thousands of will accumulate total
lost time. which can can very significant. Try 10 avoid
• 613 - Deep Hole Drilling Cycle· High-Speed too many pecks hole. For predictable results,
the number of
number of pecks calculation applies equally to both
G83 and fixed cycles. Calculation the number of
Description of G73
in G83 and G73 is on the of the Q
motion to XY position <>/""I,.lrp"", and the distance between the R level and Z
depth not from the top of part! Dividing this distance
2 Rapid motion to R level the Q value will a number of
Feedrate mOlion to Z depth tool will make at hole location. The number of
3 by the amount of Q value in a cycle must an integer and fractional calcula-
must always rounded upwards:
FIXED 185

Q Example 1 - English data: The result of the must be rounded to


18.667 or 18.666. Although it looks that only on.e
G90 G98 GS3 x .. Y •. RO.1 Z-L4567 QO.45 F .• (0.00] mm) is at it will make a big difference
way the rounding is If only three pecks are
In the example, between the R and Z round off upwards, (0 Q I
depth is 1.5567 the Q value is .450, so the
of pecks can be CUt 1 l8.667
CUt :2 18.667
1.5567 I .45 = 3.4593333 CUt 3 lS.666

The result has too Total 56 mm


used as is, because most
places for English units If the result is rounded to Q I 8.666, the num-
units. The result must of pecks will be four and practically no cutting will take
during the last peck:
The nearest higher is four, so each hole will re-
quire four pecks. The cannot be changed, so CUt 1 18.666
only other available to change the number of CUt 2 18.666
is to change the R level the depth of each peck. The CUt 3 18.666
R level is usually as to top face of part as is practi- CUt 4 0.002
cal, so there is not much can be done there. That leaves
Total 56 mm
the Q value, the depth of peck. By increasmg this
the total number of will be fewer, by 4 • English
ing the Q value, the total number of pecks will be higher.
In this example, the distance R level and Z
Q Example 2 - Metric is inches and four are required:
G90 G99 G73 x.. Y.. R2,S Z-42.S Q15.0 F .. Q : 2.5 I 4 = .625

example, the between the R level and Z case, no rounding is uO;;;.... O;;;:>:><11 QO.625 will re-
depth is exactly 45 mm and the Q value is ]5 mm. The suit jn exactly four pecks. each of depth.
number of pecks will be 45 by 15, which equals to
exact value of 3. No and the num- drilling value of Q cannot be changed
of pecks executed per hole - all pecks in a will have an equal
the possible exception peck. If the
In order to increase amount is greater than the remaining distance to
change the current Q Zdepth. only that will be drilled.

In order to decrease the number of pecks.


change the current Q value to a number.
Q value can be manipUlated in
if it is actually cal- (he Q value skillfully,
a precise num- as an exact position of
the R level penetration, This method is
The result
:><;;,l\:; .... L~~U number of

necessary,
IS
depth of peck~ consider the over-
the number of pecks may nc','",,,,,P for the job. The setup rigidity, the
any cycle time benefits. part fixturing, of cutting tool, the machinability
of material and other contribute to what the
Q Example 3 - tool can withstand.

the distance between R level and Z The goal in


IS mm. and exactly three pecks are required. The gram under That means n .. (\l'f"'~1"n
calculation of each peck depth is simple: deepest Q amoum thal is reasonable and practical
particular job and its Always jeep in mind that
56 / 3 = 18.666667 are two fixed the standard G84 and the
ten neglected
186

• 684 - Tapping Cycle - Standard


Description of G74 cycle
G98 (G99) motion to XV position

The sequence of G84 fixed is based on the normal motion to R level


initial spindle rotation <>1-", ........."'.... by M03.
The tap design must be hand design for the
G84 cycle with M03 "'1-'''-'->\......" in effect.

Step Description of G84 cycle


1 Rapid motion to XV !JV~'l"\.'ll 6
2 Rapid motion to R Spindle rotation reverse (M04)
7 and retract to initial level (with 098)
eedrate motion to Z or remain at the R level (with G99)
pindle rotation stop
WHEN TO Figure 25-12 :
Spindle reverse (M04) and
5 feedrate back to R level hand thread. At the start of
die Irotation M04 must be in effect.
6 Spindle rotation stop
various techniques of hole macnrn-
Spindle rotation (M03) and
7 retract to initial level (with
or remain at the R level (with 099) H""lUn'u"" notes cover only the most important tap-
and apply equally to both
WHEN TO USE 684 CYCI£ - 11 :
Only for tapping a right hand thread. At the start of cycle, Q Rlevel should in the tapping cycle than in the
the normal spindle rotation M03 must be in other cycles to allow for the stabilization of the feedrate,
due to acceleration.
G84 Q Feedrate selection for the tap is very important.
In tappinIL there is a relationship between the
spindle speed and the lead of the tap - this relationship
G98 must be maintained at all timas.

? Q The override switches on the control panel used for


spindle speed and feedrate, are ineffective
SPIN cw G84 or G74 cycle prol:ess.mg.
---i-f---t-- ZO
o Tapping motion
even if the feSll:lMla is ", ..",s,.. ,
processing, for safety reasons.

G74
25-11
G84fixed eXC./USII'IBIV used for right hand tapping G98

ccw
• - Tapping Cycle - Reverse

The of G7 4 fixed cycle is based on


initial rotation - M04. cw
The must be of the left hand design for the Figure 25-12
cycle rotation in effect
.:>1-'111 .....""
G74 fixed cycle - exclusiveJy used for left hand tapping
CYCLES

• - Boring Cycle WHEN TO USE 686 CYCLE 14 :


boring rough holes or that require additional
machining operations. This cycle is very similar to the
Step cycle GB 1. The difference is spindle stop at the hole bottom.
NOTE - Although this cycle is somewhat similar to the G81
Rapid motion to XV cycle, it has characteristics of own. In the standard drilling
cycle Gal, the tool retracts while the spindle ofthe machine
tool is rotating, but the is stationary in the G86 cycle.
Never use the GaS fixed cycle for drilling - for example, to save
. since any deposits of material on the drill flutes may
damage the drilled surface of the or the drill itself.

WHEN USE G85 CYCLE· Figure 13:


boring cycle is typically used for boring and rPRmlfifi INDLE CW
operations. This cycle is used in cases the tool motion
into and out of holes should finish, its
dimensional tolerances and/or concentricity, roundness, etc. 20
If for boring, keep in that on some parts
amount of stock may be removed while the cutting tool
This physical is due to the
tool pressure during retract If the finish gets
worse rather than improves, try another boring cycle.

G8S
- typically used for rough and semifinish

• G81- Backboring Cycle


There are two programming r",..,m!;!t<:: available for the
backboIing fixed cycle G87 - the one (using Q) is
more common than the I and J):

Figure 25-13
G85 - typically used and lBi1rlllllU
Step

• G8G· Boring Cycle


2 Spindle rOlation SLOp

Rapid molion to R level


Shift in by the Q value
6 or shift back in the opposite direction of! and J
4 Spindle rmarion stop 7 Spindle rotation on (M03)
Rapid retract to initial level (with 098)
5 8 Feedrate motion to Z
or Rapid retract to R level (with G99)
188 Chapter 25

9 Spindle rotation stop Spindle rotation stop (feedhold condition is


and the CNC operator switches 10
10 Spindle orientation 5 manual operation mode and a manual
then 10 memory mode).
Shift out by Q value
11 or shift by the amount and direction of I and J CYCLE START will return to normal cycle

12 Rapid retract to iniliallevel


Shift ill by the Q value
13 e rotation on
or shift in the opposite direction of I and J

14 Spindle rotation on WHEN TO CYCLE - 25-16 :


T~e GSS cycle is rare. Its u~e is limited to boring operations
WHEN TO G87 CYCLE Figure 25-15 :
With speCial tools that require manual interference at the
bott~m of a hole. When such a operation is completed, the
is a special cycle. It can only be used for some (not all)
backboring operations Its practical usage is limited, due to the tool IS moved out of the hole for reasons. This
~pecial tooling and Use the G87 cycle only may be used by some tool manufactures for certain operations.
If the costs can be economically. In most cases,
reversal of the part in a secondary operation is an option. .I I G88
NOTE - The boring bar must be set very carefully. It must
preset to match the diameter required for backboring. Its
ON
bit must set in the spindle oriented mode, facing
the opposite direction than the shift direction.
G99
--~-:~zo

-~ Q ~-- _----.1.-4-_,(_ Z DEPTH


G98 ONLY
25-16
---~-zo
G88 fixed . used when manual ""'Il>"""'~" is 'HHlI""'"
. Z DEPTH

, • Ga9· Boring Cycle


•...- -- R
SPINDLE START

figure 25-15
G87 cycle - t:}(GIUSI'VBIV used for backboring

• GSS - Boring Cycle

Step Description of GSB cycle


5
Rapid motion (Q XY position
etract to initial level (with G98)
Rapid mOlion to R level 6 in at R level (with
3 Feedrate motion to Z depth
WHEN TO USE G89 CYCLE Figure 25-17 :
4 Dwell at the depth - in milliseconds (P .. )
boring operations, when feedrate is required for the in
and the out directions of the machined hole, with a specified
dwell at the hole bottom. The dwell is the only value that
distinguishes the cycle from G85 cycle.
FIXED CYCLES 189

I G89
---l Q r--
.. ~ G98
[ G99

----+-~--+---zo

DWELL
z ~--->--- Z DEPTH

25-17 figure 25-18


689 fixed cycle - 'typically used for boring or reaming 676 fixed cycle typically used (Dr high quality boring

• G16 ~ Precision Boring Cycle fiXED CYCLE CANCELLATION


is a very useful cycle for high quality holes. There Any fixed cycle is active can be canceled with the
are two programming formats available for the precision GSO command. is automatically trans-
fixed cycle G76 the first one Q) is much ferred to a rapid mOltlon GOO:
more common than the second one I and 1):
N34 GSO
N3S XS.O Y-S.75

Block N35 does not the rapid motion, it only im-


plies it. This is a programming practice, but speci-
fied GOO as well may be a personal choice, although not
necessary:

N34 GSO
N3S GOO XS.O Y-S.75

Both of the examples will prOiaU(~e identical results.


milliseconds (P~) (ifused) second version of the even be a choice.
A combination of the two is a choice:

6 N34 GBO GOO XS.O Y-S.7S

7
cases, rather small, but
I and J are very important to cycles. Al-
retract to initial level (with though GOO without G80 would the cycle, it is a
8 poor programming practice that should be avoided.
or remain at R level (with G99)
------------------~

FIXED CYCLE REPETITION


10 When a selected frxed cycle is pro,granmrled
cycle is processed once at
WHEN 676 CYCLE - Figure 25-18 : tion within a part. This is the vvJ.J,......... u:v.......
LLVLJLLL<U

Boring operations, usually those for hole finishing, where the the assumption that most holes
quality of the completed hole is very important The quality In the CNC program, there
may be determined by the hole dimensional accuracy, its f'r.rnn"\'''nr1 that would indicate

high surface finish, or both. cycle. That is true, the cornmana


The G16 is also to holes cylindrical and it In fact. the """"'11".,..,,,1"11"'' '
parallel to axes. is to be done just once -
190

Normally, the control system will execute a cycle at hole location! is no need this type ma-
only once at a given location - it this case, there is no need .chining. By changing the formal only a Htlie, the fixed cy-
to program the number of executions, since the system de- cle repetition can be used as a benefit - to make the
faults to one automatically. To repeat the fixed cycle more powerful
limes (more than once), program a special command that
'tells' CNC system how many times you want the fixed N33 G90 G99 ...
cycle to be executed. N34 Gal X17.0 Y20.0 RO.l Z-2.4 F12.0
N35 G91 XS.O L3 (K3)
• The L or K Address N36 G90 GSO GOO •..

The command that specifies the number of repetitions With that change, the advantage of a feature 'hidden' in
(sometimes called loops) is programmed with the address the first example is emphasized - equal increment
Lor K some controls. The L or K the fixed (ween holes being exactJy inches. By using incre-
cycle repetition is to have a value which is mental mode, on a temporary basis in block N35 and em-
equivalent to a program statement LI or LI or Kl ploying the power of the repetitive count L or K, the CNC
address does not have to be specified in the program can be shortened dramatically. This method
programming is very efficient a large number of hole
For example. the call of the following drilling patterns in a single program. A fwther enhancement is (0
sequence, combine the L or K count with or macros.

N33 G90 G99 • LO or KO in a Cycle


NJ4 G81 X17.0 Y20.0 RO.1S z-2.4 F12.0
IDS X22.0 In previous discussions, default for a fixed cycle repe-
N36 X27.0 tition was specified as Ll or Kl, that does not have to be
N37 X32.0 specified in the program. Any L or K value other than L 1 or
N38 GBO •••
K] must always be specified, within the allowable of
the Lor K address. Thllt is between LO and or
is equivalent to:
KO and K9999. lowest word is LO or KO - not
N33 G90 G99 ••.
or KI! Why would we ever program a fixed cycle and then
N34 G81 X17.0 Y20.0 RO.15 Z-2.4 F12.0 Ll (Kl) say 'do not do iT>. The address LO or KO means exactly thaL
N3S X22.0 Ll (Kl) - 'do not execute this cycle '. full benefit of the LOIKO
N36 X27. 0 Ll (Kl) word will apparent in the examples listed under the sec-
N37 X32.0 Ll ) tion for subprograms, in Chapter 39.
N38 G80 ..•
By programming the LO or in a fixed what we
examples will provide the control system with in- are really saying is not 'do not execute this cycle', but 'do
structions for drilling four holes in a straight row - one at not execute the cycle yet, just remember the cycle
the location of X 17.0 Y20.0, the other holes at locations las for future use '.
X22.0 Y20.0 and X27.0 Y20.0, and X32.0 Y20.0 respec-
tively - all to the depth of 2.4 Inches. most machining, fixed cycles are quite simple to
They do, however, have some complex
If the L or K in is increased to be in an efficient manner -
rather added to the first example), for instance. from L I to a single hole.
(or KILO K5). the fixed cycle will be repeated times
,.MACHINING HOLES

good chance that the majority of pro- All the relevant information is in the but some
grams machining centers machining of at details and is needed.
1"", . ., . . . . . . . ."

least one hole, probably more. From a spot drill to hole location X3.SYS.0 was in the drawing, as
reamIng, and a complex backboring, the field of -mild program will
hole very large. In we at La top face of part. and tapping opera-
many available machin- are obvious, but is that all there ta know?
ing, and learn a drilling
and . and sin- How many tools will be needed? What about center drill-
ing to maintain exact location Is the spot drill a
What about drilled hole for
The most common type of hole lapping? What about the hole trdtl'r"'"I'J>(O
chining centers is in the area of drilling, What about ... ?
and single point A typical
may bc to centcr drill or spot drill a • Tooling Selection and Applications
drill them, then or bore them. Machining even a single
hole will the fixed I to 089, on the drawing information alone, it may seem
G73, G74 and all described in Ltll.U"'"
only two tools will be needed to program this hole. In real-
ity, the implied information must interpreted - it is not
the the drawing to how to machine the
SINGLE HOLE EVALUATION hole - only the hole requirements related to functionality
and A CNC machinist will most likely
even a hole on a aJ I re- four tools machining are
to be programmed. Before that, cut- selected, tool could be a 90° spot drill, followed up
selected, speeds and applied, the by the tap drill. the through-the-hole drill and finally,
best setup and many other must tap. A center drill may instead of the
be resolved. Regardless of exact start spot drill, but an additional tool will be to chamfer
with a thorough evaluation the hole at the top. All choices to be sorted.
relates to the drawing data. will usu- For this example, the following four are used:
define the material to machined, the hole location
its dimensional Holes are often described, o Tool 1 • TO 1 • 90 0 spot drill (+ chamfer)
rather than dimensioned the programmer has to o Toal2· T02 - Utap drill ,VJ .•>UUI

lhe missing details. 26-} shows a medium cornDlex-


ity hole that can be using a CNC machine.
o Tool 3 - T03 5/16 drill (through the 1'TI,n.,,,',,,,,
LJ Tool 4 - T04 - 7/16·14 UNC tap
,/ Tool f - 90 0 Spot Drill
The fust tool will be a 90° spot drill. Its is duaJ - it
will act as a drill and starts up at a highly
accurate XY A center drill or a drill are
more rigid tools than a twist drill and either one
the hole, so the drill lhat follows not
path (basic
are purpose of the spot drill is its
chamfering capabilities. The design of this allows a
Xy chamfer to at the top of the hole, the
1020 L spot drill diameter is larger than the chamfer
qulred. In this case, a 05/8 spot drill will be
26·1
to chamfer the 07/16 hole.
Evaluation of a single hole - IJU"~l1""1II1U example 02801

191
192 26

what purpose is the tap Not all


done the same way. Some jobs
a loose fit, others a fit. The fit for the tap is
by Ihe of the tap drill. Mosl tapping applications
into the 72-77% full thread depth category. In this case,
is selected, its cutling T02 (letter U drill) will yield approximately full
calculated, not to thread depth. of the thread
chamfer for a tap size 07/16 (0.4375), found in catalogues all tap manufacturers.
to be enlarged by .015 (.03 on these are the for the 7/16-14 tap:
diameter), to the .4675 chamfer diameter. 26-2
shows the relationships of the hole to the tool
ters and

......~ -.....,,....... 00.625 SPOT


0.015x45" u .3680 75%
3/8 .3750 67%
0.2338
v .3770 65%

00.4375 TAP
ii-"--<-'l······
In genera] terms, for thin stock, 75 to 80%
thread depth is recommended, for
:--....,. .~ 00.4675 CHAMFER
100%. A thread (hat
Figure 26-2 the bolt
by only
Spot drill operation detail TD 1 in program 02601
for
Note, that for a 90° the depth of cut will programmed Z depth the tap drill has to be deep
one half of the diameter (0 x to guarantee the full thread depth of .875.
means the full diameter of drill has to reach a little
.4675 I 2 deeper, for example, to That allows the end
or .4675 x .5 .23375 c.hamfer length of the tap (0 the full lap depth of
or Z-O. 2338 specified in the shows the lap
drill values graphically.
Drill point length is later in this chapter.
Tool 2 • Tap Drill (U)
will have to be a drill. In the ex-
used the job - one the f
the other one for lap
is - which one first? I
0.975
II certainly does matter drill is programmed first. 1.5
The key here is the the two drill dia-
meters. It is a very small only .0555 measured
on diameter, in fact. a machining point of view, it
makes sense to use the larger drill first, than the smaller
drill. The tap drill is larger than the through hole drill, so the
will be the lap drill If drill is programmed
firs!, the larger drill that produce an inaccurate
hole, due to a very small amount material to remove. 26·3
drill detail- T02 in program 02601
Now comes the question of In
question is called a tap It is will create a actual programmed depth for the tap drill will have to
hole of proper size depth) that can be into consideration one more factor ~ drill poim
the lap that of operations. lenRth. drill or - 1001- point length is abbre-
machining operation tapping, it makes a viated as or just by the letter P. This Cmlp[(~r
MACHINING

table showing "" ... r"'1:" mathematical constants to calculate most through-hole applications, this value will not be
drill point most common constant uses the drill - some extra clearance has to be added, applied to
diameter by .300, a 1180 drill point angle: the tool penetration (breakthrough), say fifty UJVIUi)<1'

(.050). The programmed value for the Lotal drill


(absolute Z value in the program) is the sum of
nominal hole length, plus the tool point angle length,
the clearance. In the program amount
Adding the two (.975+.111), will provide the the through drill depth will be:
pro.grammed Z 1.086.
TODIJ - DrjJJ 1.5 + .094 + .05
L 644 or Z-l. 644 iJ!fiJeprognJm
The next tool is a tool that drills the hole through the mao
teriaJ. In the example, it is 1'03 (tool 3), a 05116 stan- to be made. Re~
dard drill. been used to predrill an
means a smaller tool of 0.3125 is
As for the cutting depth of through drill. some simple hole. The drilling can start from
calculations are needed. do the calculations, Ine re- than from a clearance above the part.
quired hole depth known, which is 1.5 inches in R value is used and selected at R-0.986,
example. Then, the calculated drill can be 100 above the bottom of the
added to the drill ing hole.
clearance.
10014·
The '-.;<lII.,.UIC.ll drilling operation are il-
There is one more tool left to complete this example. It
will be for 7/16-14 thread. The thread
as specified in is 7116 nominal diameter with
6 THRU 14 threads =
(1114::::: .0714 pitch). Anytime a tap-
ping tool is in the program, watch the programmed
depth along the Z particularly in a blind or semi-blind
hole. The a semi-blind hole, because the
through-hole is the tapped hole. If there were
1.086
no through-hole, we would have a blind hole (solid bot-
tom). and if were the same size as the tap
1 drill, we would through hole.
A through-hole is for the Z depth cal-
culation, closely hy semi-through hole. A
blind hole has very little latitude, if any, and has to be pro-
grammed with a maximum care.
The example drawing for the hole for the tap depth
of .875 inches. This is the full depth the thread. Full
~. P = 0.094
depth of a thread is the actual distance a screw or a nut must
travel before stopping (before programmed
Figure 26-4
depth is, if fact, an exteruled depth, which must be greater
drill operation detail- T03 in program 02601 than the theoretical depth, in to
calculate the length of the
First, evaluflte the drill point length P It is
chamfer design (its type
relationship of two given values - the drill
in the tapping
drill pOint angie. For a standard 05116
that has 118 0 drill point angle, the 0.300 constant is used Zdepth is
length of the drill point Pis: and can be optimized
not a calculation but an 'intelligent
P .3125 x .300 = .09375 = .0938 .094 nOI much that can be done and
This completes the section on tooling
the through hole in the example, a typical hole and provides enough data to
1.5 inches calculated depth Some of the procedures used in the
to the now be explained in more detail.
• Program Data ma
In the example, only one hole is machined. If more holes drilling is a removal
are needed, they can be added by the following of same
program. For one hole llsed in the the program in- material removal is
cludes all considerations for (on milling systems) or by
spindle should be empty at the turning sysu~rns). In either case, a
application is possible. a
02601 <SlNGLE HOLE EXAMPLE) loose sense word. drilling operations also cover the
DIA - 90 DEGREE SPOT extended areas of reaming, tapping and single point
Nl G20 Many programming principles that apply to drilling
N:2 G17 G40 GSO '1'01 lions, can be equally applied to all the related operations.
N3 1406
N4 G90 G54 GOO X3.5 Y5.0 S900 M03 '1'02 • Types of DriUing Operations
N5 G43 ZO.l HOl MOB
N6 G99 GS2 RO.l Z-0.2338 P300 F4.0 The drilling {",\"'~'r':lrl{"'\n is determined by either the of
N7 GSa ZLO M09 hole or the rype
N8 G28 ZL 0 MOS
N9 MOl
By the type of By the type of hole:
.....=
- LE'TTER U DRILL - 0.368 DIA - .... ~~J
NlO '1'02 Center drill Through hole
Nll M06 Spot drill Chamfered hole
Nl2 G90 G54 GOO X3.5 YS.O S1100 M03 T03
Nl3 G43 ZO.l H02 MOS Twist drill (HSS, cobalt, etc,) Semi-blind hole
Nl4 G99 G83 RO.l Z-1.086 00.5 F8.0
Nl5 G80 Zl.O M09 Spade drill i Blind hole
Nl6 G28 Zl.O M05
Nl7 MOl Carbide indexable drill Premachined hole
"
Special drill II ...
(Tal - DRILL THROUGH - 0.3125
Nl8 '1'03
N19 M06 • Types of Drills
N:20 G90 GS4 GOO X3.S YS.O 81150 MO]
N:21 G43 ZO.l H03 MOS Drills are and by their
N:22 G98 G81 R-O.9B6 Z-1.644 FB.O oldest most common is aJwist drill,
N:23 GBO Zl.O MOg usually made of high Twist drill can also be
N:24 G28 Zl.O MOS of cobalt, carbide materials. Other drill de-
N:2S MOl include spade drills, center drills, spot drills and in-
('1'04 - TAP)
dexable insert drills. distinction in size is not only be-
N:26 '1'04 tween metric and English drills. but also a finer distinction
N:27 M06 within the category using English All drills
N:28 a90 G54 GOO X3.S Y5.0 S750 MOl '1'01 are designated in millimeters. Since the (imperial)
N:29 G43 ZO.4 H04 M08 dimensioning is based on inches (which is di-
NlO G99 G84 RO.4 Z-0.9 F53.57 (F = S x LEAD) mensional unit), finer distinctions are
Nll GSO GOO Zl.O M09 dimensions of standard drills in English units are divided
Nl2 G28 Zl.O M05 groups:
N33 GOO X-l.O Y10.O (PART CHANGE POSITION)
Nl4 mo o FRACTIONAL SIZES:
%
1/64 minimum, in diameter increments of
This rather "'.... '''.un,''"' shows that even a simple
single hole and a great deal of o NUMBER SIZES:
gramming
Drill number 80 to drill size number 1

DRILLING OPERATIONS o SIZES:

Drill letter A to drill size letter Z


The example 02601 a good lIlustration of what
kind of programming machining conditions are neces- Metric do not need any special U''''Ll' ",LJ'U" ,,,,.
sary for a Iypical hole. look at the details of drill- English a listing of the standard drills and
ing operations in t:Tpnpr"" as they relate 10 various lools. mal equivalents is available from many sources.
MACHINING HOLES 195

• Programming Considerations During the cut, the drill angular end will be gradually
-.
A standard drill has, regardless of size, two important
entered into the part, creating an increasingly larger hole
features - the diameter and the point angle. The diameter is diameter, yet still smaller than the drill diameter. At the
end, (he largest machined diameter will be equivalent to the
selected according to the requirements of the drawing, the
tool point angle relates to the material hardness. They are effective diameter of the drill used. The effective drill diam-
both closely connected; since the diameter determines the eter defines the actual bole diameter created within the zone
size of the drilled hole, the tool point angle detennines its of the drill end point. Typical use of this kind of machining
depth. A smaller consideration is the number of flutes, is a spot drilling operation for chamfering. The spindle
which is normally two. speed and feed must be calculated according to the effective
drill diameter. not the full diameter. The rlmin for the effec-
tive diameter will be higher and the feedrate lower than the
• Nominal Drill Diameter
corresponding values for the nominal drill size. For this
The major consideration for a drill is always its diameter. kind of jobs, selection of a short drill for rigidity is advised.
Normally, the drill diameter is selected based on the infor-
mation in the drawing. If the drawing calls for a hole that • Drill Point length
needs only drilling and does not need any additional ma-
chining, the drill is a standard drill. Its diameter is equiva- The second important consideration is the length of the
lent to the size specified in the drawing. A drill size of this drill point. This length is very important to establish the
kind is called a nominaL or 'off-the-shelf' size. cutter depth for the full diameter. With the exception of a
flat bottom drill, all twist drills have an angular point whose
Most applications involve holes that require other specifi- angle and length must be known in programming. The an-
cations in addition to their diameter - they include toler- gles are considerably standard and the length must be cal-
ances, surface finish, chamfer, concentricity, etc. In those culated rather than estimated. because of its importance to
cases, a single regular drill cannot be used alone and still the accurate hole depth - Figure 26-6.
satisfy all requirements. A nominal drill alone, even if the
size is available. will not guarantee a high quality bole, due
to machining conditions. Choosing a multitool technique to --j 00 r- QJO ::: Drill
diameter
machine such a hole is a better choice. The normal practice
in those cases is to use a drill size a bit smaller than the final
hole diameter. then use one or more additional tools, which
are capable of finishing the hole to the drawing specifica-
tions. These tools cover boring bars, reamers, chamfering
<ttj> Y
1
~I
j
p
A

p
:;;:

:::
Tool point
angle
Tool point
tools, end mills and others. Using these tools does mean length
more work is involved, but the quality of the finished part
should never be traded for personal conveniences. Figure 26·6
Tool point length data for a standard twist drill
• Effective Drill Diameter
On indexable insert drills this length is different, due to
In many cases, a drill is used to penetrate its/ull diameter the drill construction. The indexable drill is not flat and its
through the part. In many other cases, only a small portion drill point length must also be considered in programming.
of the drill end point is used - a portion of the angular drill A tooling catalogue shows the dimensions.
tip - Figure 26-5.
The drill poinllength can be found quite easily. providing
the diameter of the drill (nominal or effective) and the drill
NOMINAL point angle are known. From the following fonnula and the
DRILL DIAMETER table of constants, the required drill point length for stan-
dard drills can be calculated. Basic fonnula is:
I
J A
tan ( 90 - - )
PROGRAMMED J p ==
2
2
x D
DEPTH (P)

EFFECTIVE
~ where ...
DRILL DIAMETER
p = Length of the drill point
Figure 26·5
Nominal and effective drill diameters (tvvist drill shown)
A = Included angle of the drill point
0 = Diameter of the drill
1

same formula can be and used with a The most common tool center drilling is a
mathematical constant (fixed drill point angle): center drill (often called a combined drill and countersink),
producing a 60° angle. North American
trial standards use a numbering system from #00 to
(plain type) or #11 to # 18 (bell type) for center drills. In
metric system, center are defined by the pilot
for example, a 4 mm center will have the pilot
meter of 4 mm. In cases, the higher the number, the
P ::::: Drill point length the center drill For some
o = Drill diameter at ions. such as a tool with a
K = Constant (see the following table)
called a spot drill, is a choice.
most common constants are listed in this table:
Many programmers estimate the depth of a center
drill, rather than calculate it. Perhaps a calculation is not
Tool Point Angle necessary for a operation. What is a ......"VJJ,.v .....
(degrees~ Constant compromise guessing and calculating is a
60 ,866025404 similar to in Figure 26-7.

82 ,575184204 .575
90 ,500000000 .500
D D1
118 30310 .300

120 75135 .289


125 83525 .260

130 53829

135 ,207106781 .207


140 .181985117 .180
145 .157649394 .158
150 133974596 .134

The constant in is Figure 26-7


value is sufficient all programming Standard cemer drill cutting depth table· #1 to #8 plain type
value of the constant K L is the of cut for an arbitrary effective diameter D
value is .300430310. constant value advantage
of being easy to memorize and there is no formula to solve. are all dimensions for
For most johs, only three constants are For 90° size center drills. most important of
(spot drilling materials), 118 0 (standard materials), them is cutting depth L. Its calculation been
and 135 0 (hard They are easy to memorize: on an arbitrary selection of the D.
o 0.500 for a 90 0 drill angle #5 center drill has the depth value L that is
o 0.300... a 118 0
• 120 drill angle
0 based on an arbitrarily chamfer dia·
meter D inches. These values can be modified as
o 0.200 for a 135° drill angle or a different table can be A similar table can
for metric center
• Center Drilling
Center drilling is a machining that provides a
• Through Hole Drilling
small, concentric opening for a tailstock or a pilot a hole through the common op-
hole for a drill. Chamfering is not recommended requires the Zdepth to materia] thick-
a center 11. because of the 60° of the tool. ness, drill poiot length and an extra clearance beyond
the drill penetration point, also known as the breakthrough
amount.
MACHINING HOLES 197

1.25 + (.750 x .300) = 1.4750

part program, the block will


F
N93 GOl Z-1.475 Fo.O
C
P or - in case of a fixed

N93 G99 GS5 XS.75 Y8.125 RO.1 Z-1.47S F6.0

Metric holes are treated exactly the same way. exam-


1 ple, a 16 mm drill is to full diameter
I F depth of 40 nun. The calculation uses the same constant as
I
T the In units:
p
40 + (16 x .300) = 44.8

The depth in the drawing will have to ex-


Figure 26-8 tended by the calculated drill point length. pro-
Drill depth calculation data grammed block will have the Z axis value equal to the total
Through hole (top) and Blind hate (bottom) of the 40 mm specified depth, plus 4.8 mm calculated
point length:
In Figure is shown {hat the programmed for a N56 GOl Z-44.8 F150.0
through hole is the stun of the material thickness that is
equivalent to full diameter depth F, plus the break- If the depth appears in a fixed the same depth value
through clearance C, plu~ tool point length P will be used, although in a different format:
example, if material thickness is one inch and NS6 G99 GSl X21S.0 Y175.0 R2.5 Z-44.8 FlS0.0
standard dril1 diameter D is of an inch,
programmed including a .050 clearance, will be: When machining blind holes, the cutting chips may clog
the holes. This may cause a problem, especially if is a
1 + .050 + x • 1. 2375 operation on the hole, for example, reaming or
tapping. Make sure you include a slop code MOO
Pay attention to table, vise, or MO I before this operation. if
leis, fixture, machine table, when programming the hole will have to be cleaned every the program is
tool breakthrough clearance. There is usually a very ·-executed. Otherwise, more efficient optionaJ program
space below bottom face of parI. Slop MOl is sufficient.
• Blind Hole Drilling • flat Bottom Drilling
major difference between drilling a blind hole and a bottom hole is a blind hole a bottom at 90° to
through hole is that drill does not penetrate the material. drill centerline. are two common methods of pro-
Blind hole drilling not present any more problems gramming a hole. A good practice is to use a standard
than a through hoJe drilling, but use a peck drilling method drill to start the hole, use a flat bottom drill of same
for holes. Also a choice of a different drill geometry diameter and the hole to full depth. Also a good
may the and the hole cleanup may of- choice is to use a slot drill (also known as the center cutting
ten be necessary as well. mill), without predrilling. This is best method, but
In a shop depth of a blind hole is some tool may not be
given as thefull diameter depth. The drill point length is not To program a flat bottom hole using a slot drill is quite
normally considered to be part of the depth - it is in addi· simple. For example - a 10 mm hole should be mm
rion to specified depth. In Figure 26-8, the programmed deep (with a flat bottom). Using a 010 mm slot drill, the
depth a blind hole will the sum of full diameter program is quite short (tool in spindle is assumed):
depth P, plus the point length P.
02602 (FLAT ~ - 1)
an example, if a drill (0.750) is used to N1 G21
drill a full diameter hole depth of ] .25 of an inch, the pro- N2 G17 G40 GBO
depth be: N3 G90 G54 GOO X.• Y.. 5850 M03
N4 G43 Z2.5 HOl ~e
198 Chapter 26

N5 GOI Z-25.0 F200.0 From the machining viewpoint, programming a center


N6 G04 XO.S drill or a spot drill first to open up the hole may be a better
N7 GOO Z2.5 M09 choice. This extra operation will guarantee concentricily
NB G28 Z3.0 MOS
N9 M30 for both the standard drill and the flat bottom drill. Another
% possible improvement would to use a suitable end mill
instead of a flat bottom drill. An end mill is usually more
A fixed cycle could be used instead and other improve- rigid and can do the job much better.
ments added as well. the is correct as is.
• Indexabla Insert Drilling
next example shows a program for two tools a 112
standard drillllnd a 112 inch flat bottom drill. The re- of great productivity improvement tools in muLl-
quired finished depth is Z-0.95 at the flat bottom: em machining is an indexable insert drill. drill uses
carbide inserts, like many tools for milling or
02603 (FLAT BOTTOM - 2) It is to drill holes in a solid material. It
('1'01 - ~ INCH STANDARD DRILL) does not center drilling or spot drilling, it is
Nl. 020 with high spindle speeds and relatively slow feedrales and
N2 017 G40 G80 '1'01 is available in a variety of sizes (English and metric). In
N3 M06 most cases, it is used for through holes, blind
N4 G90 G54 GOO X .. Y•• S700 M03 T02
N5 043 ZO.1 HOI M08
holes can be drilled as well. This type of a drill can even be
N6 G01 Z-O.94 F9.0 used some light to medium boring or facing.
N7 GOO ZO.l M09
N8 G28 ZO.l The of the indexable driB is very precise,
N9 MOl assuring constant rool length, as well as elimination of
regrinding dull tools. Figure 26-9 sbows the cutting portion
('1'02 - ~ INCH FLAT BOTTC'IM DRILL I END MILL) of a typical indexable drill.
Nl.0 '1'02
NIl M06
Nll G90 G54 GOO X.. Y.. S700 M03 '1'01 r,
Nl.3 G43 ZO.l HO.2 MOS
Nl4 GOl Z-0.74 F15.0
Nl.5 Z-0.95 '1!7.0
NI6 004 XO.S
Nl.7 GOO ZO.l Ma9
Nl.B G2B ZO.1 MOS
Nl9 mo
% D = DRILL DIAMETER
H = DRILL POINT LENGTH
are three blocks special in program
02603. first block is N6, indicating the depth of Figure 26-9
standard The drill stops short the full depth by .010 CUffing end of a typical indexable insert drifJ
an inch. Z-0.94 is programmed of the
A little experiment as to how short may be worth it. In the illustration, D of drill is the hole
A reason for not drilling to full depth with the standard produced by the drill. The point length H is defined
is to prevent possible mark at the hole center. by the drill manufacturer and amount is listed in the tool-
catalogue. example. an indexable drill with the D
The other two blocks appear in the second tool of the of 1.25, may have the H tip length .055. The
gram - blocks N] 4 and N 15. In block N 14, the flat bottom indexable drill can be used for rotary and stationary appli-
drill at a heavier to depth of only .740 cations, vertically or horizonlally, on machining centers or
inches. That makes sense, as is nothing to cut for the lathes. For penormance, coolant should be
flat bottom drill for almost of an inch. Follow the calcu- sure through the drill, particularly for tough materials,
lation of the 0.740 intermediate depth from this procedure: long and horizontal The coolant not only
disperses the generated heat, it also helps flush out the
From the total depth of .94 cut by the standard drill (TO 1), chips. When using an indexable insen drill, make sure
su blracl the length of the tool point P. That is for a 118 0 is power at the machine The power re-
drill point angle 0.5 drill. The is .79. the quirements at the spindle increase proportionally with in-
result. subtract .05 for clearance, and the is the Z drill diameters.
value of Z-0.74. In the block N15, the flat bottom drill re-
moves the material left by TO I, at a suitable CUI- On a machining center, the indexable drill is mounted in
ting feedraLe, usually programmed at a slower rate. the machine spindJe, therefore it becomes a rotating tool. In
this the drill should used in a spindle
MACHINING HOLES 199

runs true - no more than .0 J0 inch (0.25 mm) (To- PECK DRilLING
tal Indicator Reading). On spindles that have a quill, try t6
work with the quill spindle, or extend it as little as
possible. Coolant provisions may an internal Peck drilling is aJso interrupted cut drilling. It is a
ant, and special adapters are available for through the hole drilling operation, using the fixed cycles G83 (standard
cooling, when drill is on machining centers. peck drilling cycle) or G73 speed peck drilling cy-
cle). The difference between two cycles is tool re-
On a CNC lathe, the indexable drilling tool is always sta- tract method. In the retract each peck will be to
tionary. correct requires (he drill is the R (usually the hole), in there will only
tioned on the center and concentric with the spindle cen- be a relract (between .02 and .04 inches).
terline. concentricity should nol exceecl JlO') inch
(0.127 rom) T.l.R. Peck drilling IS often used for holes that are too deep to
drilled with a single tool Peck methods
exercise care when operation starts several opportunities to improve standard
on a ""rl'",..,. that is not flat. For use 1IIU't;)I.<l.UU::; techniques as well. Here are some possible uses of
drills on surfaces that are 90" to the drill axis (flat drilling methods for machining holes:
Within the drill can be used to enter or exit an
o Oeep drilling
inclined, uneven, concave, or convex quite success-
fully. The may to be reduced the duration o Chip - also used short holes in materials
of interrupted cut. The 26-/0 shows the areas
o Cleanup of chips accumulated on the flutes of the drill
the feed rate should be slower.
o Frequent cooling and lubricating of the drill cutting
o Controlling the drill penetration through the material

In all cases, the drilling motions of the


an cut can be nrf'l,n .. ",rrlT1nt>t1
by specifying the Q address value In the
value specifies the actual depth peck.
the Q the more pecks will generated vice
versa. most deep hole dril1ingjobs, the exact number
pecks is not important, are cases when the peck-
ing cycle needs to be

• Typical Peck Drilling Application


For majority of drilling applications, the peck
drilling depth Q needs to be only a reasonable depth. For
a hole (with depth at 1 inches at
the tool tip) is drilled with a .250 diameter drill and
Uneven entry or exit surface for indexable drills feedrate: depth. cycle may programmed like this:
F :::: normal feedrate, F/2 reduced feedrate (Dne half Df F)
Nl37 G99 GS3 x .. Y.. RO.l Z·2.125 QO.6 F8.0
In the illustration, the F identifies area that is cut
with the feedrate (normal entry/exit), and the These programming values are reasonable for the
indicates the area that requires a reduced For the hand - and that is that matters. For most jobs, the
feed rate , programming one haJf normal is not too
is sufficient
• Calculating the Number of Pecks
In illustration, the a shows a lilted surface
(inclined the b shows an uneven surface, If the number of pecks the G83/G73 cycle will is
the c and d show convex and concave important, it has to be calculated. knowledge of how
respectively. many pecks will result with a Q a given to-
depth is usually not important. If the program is running
efficiently. there is no need for a modification. find out
how pecks the G83/G73 will generate, it is
important to know total distance the drill travels
tween the R level and the Zdepth (as an incrementa! value).
It is equally imponant to know the peck depth Q value.
Q divided into the travel is the number of pecks:
200 26

result 1.339/3 is -a that to


be rounded to the maximum of four decimal places (Eng-
lish units). Mathematically correct rounding to four deci-
mal places will be Follow individual peck depths to
see what will happen:
Ilir' where ...
Peck 1 .4463 accumulated depth .4463
Pq Number of pecks Peck 2 .4463 accumulated depth .8926
Td ::::: Total tool travel distance Peck 3 .4463 accumulated depth .. . 1.3389
a = Programmed peck depth Peck 4 .0001 accumulated depth .. . 1.3390

For example. in following GR1 will be four pecks and the last one only cut
.0001 - or practically nothing at alL those cases, where
N73 G99 Ga3 x .. Y•. RO.12S Z-1.225 00.5 F12.0 the last cut is very small and inefficient, always round the
calculated Q upwards, in this case to the minimum of
distance is 1 divided by .$00, .4464 or even to .447:
which yields Since the pecks can onty
positive, the nearest higher integer will be the actual N14 G99 Gsa x.. Y.. RO.l Z-1.239 00.441 F12.0
number of pecks, in this case 3.
Always remember, cutting tool will never go past
• Selecting the Number of Pecks programmed Z depth, but it could reach depth in a very
inefficient way that should be corrected.
Much more common is the programming of a
number of If only a certain number of pecks will do • Controlfing Breakthrough Depth
the job in the most efficient way. Q value has to be cal-
culated Since the Q value specifies·the depth Less frequent programming method, also very powerful,
each peck not number pecks, some simple is to use the peck drilling cycle to the breakthrough
math will be nccd~d to select the depth Q. so it corresponds of tbe drilllhrough the material, regardless of the drill size
to the number of or material thickness. Here is some background. In many
tough materials, when the drill starts the
For example - we require 3 pecks in the following cycle- tom of the part (for a through hole), creates potentially
what will the Q depth difficult machining conditions. The drill the tendency
to push the materia! out rather than cut it This is most com-
N14 G99 G83 x •• Y.• RO.l Z-1.238 0 •• F12.0 mon when the drill is a little dull, the material is tough. or
the feed rate is fairly adverse conditions are also
The total drill travel from the R to the Z depth is
the result of heat generated at the drill the lack lu-
1.338. To calculate the depth Q value, the new
brication reaching the drill cutting edge, worn-off flutes
mula is similar to the one:
and several other factors.
The solution to problem is to relieve the
pressure when it is about halfway through the hole, but not
completely through - 26- J I,

IGi' where

a =: Programmed peck depth


r-
Td ::::: Total tool travel distance RO.1
p. Number ofrequ ired pecks

Using the above formula, the result I is .446.


Therefore, G83 block Q depth will QO.446:
00.925 0.75
N14 G99 G83 x .. Y•. RO.l Z-1.238 QO.446 F12.0

No rounding is necessary in this case. Now,


look at another situation, where
have a
distance
I I
. ::::::~¥~~. ;::~
J .~
0.05

Z-0.825

has very slightly: P =0.15


N14 G99 Gal x .. Y•. RO.l Z-1.239 Q.. F12.0 Figure 26-11
Controlled breakthrough of 8 hole using 683 peck drilling cycle
MACHINING 201

Peck drilling cycle G83 is great for it, but the Q depth A reaming operation will require a coolant to help make a
eulalion is extremely important. The total number of peeks better quality finish and to remove during cut-
is not important, only the last two are for this ling. Standard coolants are quite suitable, since there is not
pose. To control the problem with the drill very much heat generated during reaming. The coolant also
tration, only two peck motions are needed. illustration serves in an additional role, to flush away chips from
sllOws tile two positions a 0112 dril1 drill through 113/4 the part and to maintain surface finish quality.
thick plate.
• Reamer DeSign
most jobs, a hole requires no special treatment.
Just one ctrt through (using G81 cycle) and no drill- In terms of design, there are two of a reamer that
Let'S/evaluate Ihe solution to situation. The have a direct relationship to the CNC machining and pro-
has point length of .300 x .500 = .1 Take one gramming. The consideration is the flute design.
half (.075) of the drill point length as the first
amount, which will bring the drjl\ .075 below the 3/4 Most reamers are designed with a left-hand nute
thickness, to (he Z depth of Z-0.825. This depth has to be tion. This design is suitable to ream rhrough holes. During
reached with value of{he Q depth. in mind that the the the left-hand flute the to the
Q depth is an incremental value, from the R bottom of the an empty space. holes
level, in this case RO. J. That specifies the Q depth as that have to be reamed, the len-hand type of a reamer may
QO.925 (.100 above .825 below ZO). The not suitable.
Z depth is the final drill depth. If .05 added other factor of the reamer design is the end chamfer.
below the plate, the Z depth will be the sum of the plate In to enter an existing hole that i5> ~till without a
thickness (.75), the (.05) and tbe drill point chamfer, a allowance is required. reamer end
(.150), the program value of provides that allowance. Some reamers also have a short
taper at their the same purpose. The chamfered
G99 Ga3 x .. Y.. RO.1 Z-O.9S QO.925 F •.
is sometimes a 'beveUead'and its chamfer an 'attack
does not only solve a particular job re- angle'. Both have to he considered in programming.
lated problem, it also shows how creativity and program-
ming are complementary terms. • Spindle Speeds for Reaming
Just like for standard drilling and other operations, the
REAMING spindle speed for must closely
to the of material being Olher factors, such
The ream operations are very to the drilling op- as the part setup, its rigidity, its and surface finish of the
erations, at least as far as the programming method is con- completed hole, etc., each contributes to spindle
cerned. While a drill is used to make a hole (to open up the
hole), D reamer is used to enLarge an existing hole, rule, thc spindJe speed for
Reamers are either cylindrical or tapered, usually de- will reasonable use a modifying factor
with more than two of different configura- .660 (213), based on the speed used for drilllng of the same
tions. of cobalt, carbide material. example, if a speed of 500 r/min produced
with brazed carbide lips. reamer design has its ad- drilling conditions, the two thirds (.660) of that
reasonable for r",,,,rn,,..,,,·
vantages and Carbide reamer, for example,
has a resistance to wear, may be not economi-
500 x .660 = 330 r/min
cally justified every hole. A high speed steel reamer is
economical, but wears out much that a carbide
Do not program a reaming motion in the reversed spindle
reamer. Many jobs do nol accept any compromise in the
rotation - the cutting may or dull.
tooling selection and cuning 100\ has to selected cor-
reedy for a given job. Sizing and finishing such as a
reamer, have to be even more carefully. • Feedrates for Reaming
The reaming are programmed higher than those
Reamer is a sizing tool and is not designed for removal of
used for drilling. Double or triple are not unusual.
heavy stock. During a reaming operation, an existing hole
The purpose of the high feedrales is to force the reamer to
will be - reamer will an existing hole to close
cut, rather than to rub the material. If the is too
erances add a high quality finish. Reaming will
slow, the reamer wears out rapidly. slow feedrates
not guarantee concentricity of a hole. holes requiring
cause heavy pressures as reamer actually tries to en-
both high concentricity and tight center drill or
the hole, rather than remove stock.
spot drill the hole firsl, then drill it the normal then
rough bore it and only then finish it with a reamer.
202 Chapter 26

• Stock Allowance SINGLE POINT BORING


material left for
A hole to be must be smaller (undersize) than Another sizing operation on holes is called boring.
pre~drillcd or pre-bored hole - a logical requirement. jng, in the sense of machining is a point-to-point op-
Programmer decides how smaJler. A stock too small eration along the Z only, typical to CNC milling ma-
reaming causes the premature reamer wear. Too much and machining centers. It is also known as a 'single
stock for reaming the and the " the most common lool is a boring
reamer may break. bar that only one CUlling edge. Boring on lathes is
considered a contouring operation and is nol covered in
A good is to about 3% of reamer
""""'V<~' (see Chapters 34-35).
diameter as the stock allowance. This applies to the
diameter· not per side. For example, a 3/8 reamer (0.375), Many jobs requiring precision holes that have previously
will well in most conditions if the hole to be done on a special jig boring cannow done
has a diameter close to .364 inches: on a machining center, using a point boring
(001. modern CNC machine tools are manufactured to
.375 - (.375 )( 3 / 100) .36375 '" .364 very high accuracy, particularly for the positionmg re-
peatability - a proper tool and its application can
Most often, a drill that can machine the required hole di- produce very high quality holes.
ameter exactly will not be available. That means using a
boring to the hole reaming. It also mean • Single Point Boring Tool
an extra cutting tool, more setup program and
other disadvantages, but the hole quality will be worth the As for practical purpose, a point
In cases, for materials some of the ishing, or at a semijinisi1il1g, operation. is
the allowance left in the hole to enlarge - or to size - a hole that been drilled, punched
is usuaJly decreased. or otherwise cored. boring 1001 works on the diameter
the hole is to produce the desired hole di-
• Other Reaming Considerations ameter, within often with a quality
surface finish as well.
general approach for is no different than for
other operations. When drilling a blind hole, reaming Although is a variety of of boring tools on
it, it is inevitable that some chips from drilling remain in the market, the single point boring lool is usually designed
the hole and a smooth reaming operation. the cartridge type inserts. These inserts are mounted at
Using the program stop function MOO before the reaming end of the holder (i. e., a bar) and have a
operation allows the operator to remove all the chips first, built-in micro adjustment fine of
for a dear entry of reamer. boring diameter Figure 12.

The reamer size is always important. Reamers are often


made to produce either a press fit or a slip fit. These terms
are nothing more than machine expressions cer-
tain tolerance ranges to the reamed hole.
Programming a reamer a fixed Which cy-
will be the most suitable? is no reaming cycle de- D ::: EFFECTIVE
fined Thinking about the traditional machining
plications, the most accepted reaming method is the feed-in
andfeed-out method. This method requires a mo- Figure 26-12
lion to remove the material from the hole, but it re-
Effective diameter of a single polflt boring too/
a motion back to the starting position, [0
maintain the hole quality - its and surface finish. It may same programming techniques are applied to the
be tempting to program a rapid motion out of a reamed hole boring bars of other designs, for example, a block tool. A
to save cycle lime, but often at the cost of quality. For the block (001 is a boring bar with two cutting J 80°
best the feed-out of reamed hole is neces- If adjusting mechanism for the diameter is not
Suitable cycle available for the is available on the tool holder, the effective boring diameter
which permitsJeed-in and feed-out mOlions. cut- must preset, using a special equipment, or
ti ng feedrate of the cycle will the same for both motions. slow but true tried trial-and-error method. trial
Any feedrate will both motions - in. and out. and error selup is not that unusual, considering the setup
methods that are available for a single boring bar.
MACHINING HOLES

Just any other cutting tool, a single point boring When machine is oriented, it must be in a
achieves the best cutting results if it is short, and run'S slopped The cannot rotate during any ma-
concentric with spindle centerline. One of the main causes chining operation that requires a spindle shift. Review de-
of bored holes is the boring bar deflection, applying scriptions of the fine boring fixed cycle G76 the
equally to milling and turning. TIle 1001 tip (usually a car- boring cycle G87 Chapter 25. Machine operator must
bide bil), should be properly ground, with suitable cutting alwnys know which way the spindle and into
CfPr'rnF'I ...... ' and position of the direction lool shift actually moves.
in the spindle or its orientation - is very important
many boring operations on machining centers. Programming a bored hole that will later
r~"'""';"ethe boring bar only to assure the and
• Spindle Orientation straightness of finished hole. surface finish the
bored is not too important If the boring is the last ma-
Any round tool, such as a drill or an end mill, can enter or chinmg operation in the hole, the are that the sur-
exit a hole along the Z with IiUle programming con- finish be very important It is difficult to retract the
siderations for the hole quality. Neither of the tools is boring lool without leaving drag marks on the hole cylin-
holes that high quality finish close drical that case, select a suitable fixed
tolerances. \Vith boring, the hole surface integrity is very probably the precision boring cycle G76 is the
important. Many boring operations that the cutting
tool not the hole during retract. • Block Tools
retracting from a almost always leaves some marks in
the hole, special methods retract must be There is When using a single point boring bar for roughing or
one such method - it uses cycle G76 or G87 with the semi finishing operations, there is an oplion lhat is more ef-
dIe orientation feature of the a shift bor- ficient. This option also uses a boring tool, one that has
ing tool away from the finished surface. feature was two cutting (180 0 opposite) instead of one - it is
already described in Chapter 12, so just a reminder now. called a block tool. Block tools cannot be used fine fin-
ishing operations, they cannot shifted. The only
The sale purpose of spindJe orientation is (0 replace way of programming a block lool is within the 'in-and-out'
tool holder in exactly the same position after each tool tool motion. Several fixed cycles support this kind mo-
change. Without orientation, the tool tip will stop at tion. All 'in at a specified On way
a random position of circumference. Orienting spin- 'out', some motions are feed rates, are rapid, depend-
dle boring purposes is only one half of the solution. The ing on cycle selection. cycles that can used with
other is setting position of the boring is block tools are G81 G82 (feed-in~rapid-out), as well as
a responsibility of the operator, since it has to be done and that in and feeds oul while the machine
setup at the machine. The boring bar cutting must spindle is rotating and another one, G86, when the tool re-
set in such a way that when shift place in fixed cy- tracts while is not
cle or it will into direction away from the
finished hole ideally by the vector relative to the The greatest advantage of a block lool is
angle of the orientation - 26-13. that can programmed for this tool.
jf the feed rate for a single point tool is .007 per flute, a
block tool it will be at least double .. 014 inches per flute or
more. Block tools are generally available in from
about 0.750 inch and
CUTIING
BIT
A
BORING WITH A TOOL SHifT
There are two fixed cycles that require the tool shift away
from the centerline of current bole. These cycles are boring
G76 and G87. G76 is by far most useful both
are illustrated in 02604.

• Precision Boring Cycle G76


The G76 cycle is used for requiring a high quality
Figure 26-13 of the size and surface finish. The boring itself is normal,
Single point boring bar and the spindle orientation angle nn'"JP'lIpr the retract from the hole is special. The bar
stops at the bottom of the hole an oriented position,
Spindle orientation is factory designed fixed. away by the Q value in cycle and retracts back to the
grammer considers its length and, usually, its direction. starting position, it shifts back to normal position.
204 26

G76 cycle has been described in detail in the previ- - - - - + - - CUTTING DIAMETER
ous chapter. In (his chapter is an actual programming ex-
BODY DIAMETER
shown as a single hole in Figure 26-/4 - mm.
BACK CLEARANCE

12'27 '\ .- 025 - ««<-- Initial level

r
I ~:"""':"~::-==r=:=~~~~«<~. . . .~ R level
30

Figure 26·15
Setup considerations lor a backboring roo/
Figure 26·14
Drawing for 676 and 687 programming example - program 02604
• Programming Example
From the drawing. only the mm hole is considered,
In order to show a complete program. four tools will be
and the program input will quile simple:
used - spot drill (TO I). drill (T02) , standard boring bar
N .. G99 G76 xo YO R2.0 Z-31.0 QO.3 F12S.0 (T03) and a back boring (T04). Program is 02604.

A hole bored with G76 cycle will have a high quality. 02604 (G76 AND GS7 BORING)
(TOl 15 MM DIA SPOT DRILL - 90 DEG)
Nl G2l
• Backboring Cycle G81 N2 Gl? G40 GSO TOl
N3 MaG
Although backboring cycle some applications, it
N4 G90 G54 GOO XO YO 51200 M03 T02
is not a common fixed cycle. the name suggests, it is a NS G43 ZlO.O H01 MOS
boring cycle that works in the reverse direction than other No G99 G82 R2.0 Z-S.O PlOO FI00.0
cycles· from the back oflhe part. Typically, the backboring N7 GBO Z10.0 M09
operation starts at the bottom the hole, which is the 'back N8 G28 Z10.0 MOS
of the part', and the boring proceeds from the bottom up- N9 MOl.
wards, in the Z positive direction.
(T02 - 24 MM DIA DRILL)
The cycle has described in the previous chap- mo TOJ
ter. The Figure also shows a diameter of 27 mm, Nll. M06
which will be during the same setup as the mm NlJ G90 G54 GOO XO YO 5650 M03 T03
N13 G43 ZlO.O H02 MOS
hole. This larger diameter is at the 'back side of the part' ) Nl4 G99 GBl R2.0 Z-39.2 F200.0
and it will be backbored, using the G87 Nl5 GSO ZlO.O M09
N16 G28 Zl.O.O MOS
Figure shows the setup of tool that will bore
Nl7 MOl
the 27 mm hole, from (he bottom of the hole, upwards.
a attention to the descriptions. (T03 - 2S MM DIA STANDARD BORING BAR)
NlB T03
In the illustration, the 01 the diameter of Nl9 M06
smaller hole. and 02 the diameter of (he hole to N20 G90 G54 GOO XO YO S900 M03 T04
be backbored. is always than 01. Always make N21 G43 ZlO.O H03 MaS
sure there is enough clearance the body of the boring N22 G99 G76 R2.0 Z-31.0 QO.3 F125.0 (25 DIA)
bar within hole at the hole bottom. N23 GSO ZlO.O M09
N24 G28 ZlO.O MOS
N25 MOl
MACHINING HOLES 205

(T04 - 27 MM DIA BACK BORING BAR) part to accurately seated in hole by


N26 T04 For
,'"p'T""''''' a bolt that has to on a
N27 M06 nat surrace will require countersinking or spotfacing
N28 G90 G54 GOO XO YO 5900 MOl Tal
~9 G43 ZlO.O H04 MOS emtlon. All three operations require a perfect alignment
N30 G98 G87 R-32.0 Z-14.0 Ql.3 F12S.0 {27 DIA} with the hole (concentricity). Programming tech-
N31 Gao Z10.0 M09 nique is the same for all three operations, except
N32 G28 ZlO.O MaS for the lOa I used. and feeds for these tools are usu-
N33 G28 XO YO ally than for drills of equivalent Any hole to
N34 M30 enlarged must prior to these operations,
%
• Countersinking
Make sure to follow all rules and
gramming or setting ajob with or 087 Countersinking is an operation that enlarges an existing
in the 'Many of them are safely nru'nrF'f1 hole in a conical to a depth. Countersinking
for holes have to accommodate a conical bolt
• Precautions in Programming and Setup From all three similar operations, countersinking re,
quires the most calculations for precision depth. Typical
The precautions for boring with a tool shift relate La a few three
special considerations thaI are re-
alization the two cycles G76 and The following list
sums up the mas! importam precautions: o degrees· the most common angle
o The through boring must done the backboring o 90 degrees
o The first boring cycle must be programmed
all the way through the hole, never partially
Other angles are also possible, but frequent.

o For the G76 cycle, only a minimum Q value is required To the programming (lnd the required
0.3 mm or .012 inches} calculations, the cutting tool used must known first Fig.
ure 26~J6 shows a typical countersinking
o For the cycle, the Q value must be greater than one
half of the difference the two diameters:
(D2·D1)12 == == 1, A '-
plus the standard minimum Q (0.3 mm)
I
o Always watch for the body of boring bar, so it does
not hit the surface during the shift. This can happen
with boring bars, small holes, or a large shift amount.
o Always watch the body of the boring bar, so it does not
hit an obstacle the part. Remember that the tool L
length o11set is measured to the cutting edge, not to the
actual bottom of the boring tool.
o G87 is always programmed in G98
never in G99 mode I!!
o Always know the shift rllTI',r:ttrln and set the tool properly

26-16
ENLARGING HOLES
Typical nomenclature of a countersinking tool

An existing can also the top. In the illustration, d is the countersink body A is
enlarge an existing hole at the top, we can use one of three countersink angle, F is the diameter of the lool nat
methods thal will an existing hole. These methods (equal to z.ero for a sharp end), I is the body length.
are common in every machine shop. They are:
Programming of a requires certain data in the
o Countersinking C'SINK or CSINK on drawings drawing. This information is provided through a de-
o Counterboring C'BORE or CaORE on drawings (leader/text) in the drawing, for
o Spotfacing S.F., or on drawings .78 DIA CSINK - 82 OEG
13/32 DRILL THRU
Ai! three machining methods will enlarge an existing
hole, with one common purpose they will allow the fitting
Chapter 26

is one challenge a countersink. process of calculation is enough. First, deter-


countersink accurate. That lhe heighl e, for a given flat F. Use the stan-
0.78 in the description. countersink angle is constants as applied to a length:
diameter can by carefully cal-
culating lhe Z depth. That should not too difficult, be- = .866
cause we can use the constant K for the tool poml .575
length (described earlier in then calculate the == .500
culli depth, similar to drills. The problem here is thallhe In [he illustration, D is countersink diameter,
constant K for a drill point always assumes a sharp poim at A is the countersink flat diameter, e is
tool tip. Counters! tools do not always have a of the sharp Z-DEPTH is the pro-
(except for some sizes). Instead, they grammed tool depth. In this case, the angle A is 82", the flat
a diameter of the F, specified in toor diameter F as per is 3116 (.1875). The
catalogues. the sharp end e can be
Figure 26-17 illustrates an a re- e .1875 x .575 (K for 82" = .575)
quirement, shown in II Iypical e= 1
Zdepth a a end will be:

0,625 Z depth = .78 x .575 .4485

Since that depth the height of


has to be done to find out the Z depth, is to subtract
o from (he theoretical Z depth:
o
o
o Z depth "" . 4485 .1078 '" .3407

0.000 This is the programmed Z depth and the


for the countersink in drawing may look
Ihis:
0.750
N35 G99 Ga2 XO.75 YO.625 RD.l Z-O.3407 P200 FS.O
Figure 28-17
Programming <JY"'TJ"'J> of a countersinking operation could be lowered,
machined in the previous VIJ''''aUVlll_
Figure known and unknown counter- Be careful level will most likely
sinking depth of a ways program the G98 command and a small
countersinking for example, I:
o -.....; N34 G43 ZO.1 HO) M08 (0.1 IS INITI.JU, LEVEL)
N3S G98 Ge2 XD.7S YO.625 R-O.2 Z-O.3407 P200 FB.O
A

• Counterboring
Counlerborlng is an operation enlarges an existing
hole in a cylindrical shape to the depth. Counter-
for holes that have to accommodate a round
It is often used on uneven or rough surfaces. or
are not at 90° to boll assembly. As for the
selection, use a tool specially de-
for this type of machining, or a suitable end mill
e In either case, the uses G82 fixed cycle.
depth of the is always given) there
Figure 26- 78 are no extra calculations 26-19 a
for calculating the Z depth of a countersink, counterboring
D and F and the A
MACHINING

Handling this programming problem is not difficult, once


available options are evaluated. The options are two
,... ..""1"'\" .."1"'.... ' commands - 099. used with fixed
exclusively. Recall that command will cause
the culling tool to return to initialleve!, the 099 com-
DEEP will cause the cuuing tool to return to the R level. In
practical programming. the command is used only in
cases an obstacle between to be

Figure 26-19
Programming example of a counterboring operation

N41 G99 G82 X.. y" RO.l Z-O.2S P300 FS.O

In counlerboring, if a relatively slow spindle speed and


fairly heavy are make sure the dwell P
in G82 cycle is sufficient. The rule of thumb is to program REQUIRED
the double value or higher of the minimum
dwell. Minimum dwell Dm 26·20
Tool motion direction between holes at rl.ffll"",.t heights

Figure illustrates two programming possibilities,


in a symbolic representation. The front of a stepped
part shows direction of tool motion holes. On
For example. if spindle speed is programmed as 600 the left. the from one hole to the next cause a
rfmin, the minimum dwell will be 60/600=:0. J. and doubled collision with the wall and 098 is safety. On
to 0.2 in the as P200. Doubling the minimum the right, with no 098 is not and 099
dwell value guarantees that even at 50% the initial is usually done
override, there will at least one full where the Z value must a clear
spindle that cleans the tool location above all obstacles.
Many programmers to use a slightly
A practical example of this technique is illustrated in Fig-
for more than one or two revolutions at the
ure 26·2 J nnd 02605.
• Spotiacing
Spotfacing is virtually identical to
(hat the depth of cut is minimal. Often,
I
shallow Its purpose is to I

enough material to provide a nat surface for a


bolt, a washer. or a nul. technique is --0-
I
same as that for 03/16
DRilL THR~
MULTILEVEL DRILLING
On many occasions, the same cutting tool will have to
to move down between di ......,....,+.,-.,.Y-,.-,--:..~ --~---------- ....... 0.00
(steps on a part). a drill will cut 0.15
0.50 0.40
the same depth. bul start at different
two major 1.00
efficiently (no time
Figure 20-21
must be (no collision).
Multilevel drilling· nmi'lr;:lflr"lmii1fl example 02605
208 Chapter 26

tools are - TO I is a 90° spot drill, cutting to the WEB DRILLING


depth of .108 below each step T02 is a 03/16 drill
Ihrough, programmed to the absolute depth of 1.106:
Web drilling is a term for a drilling operation laking place
02605 EXAMPLE) two or more parts, separated by an empty space.
(TOl - 0.375 SPOT DRILL - 90 DEG) The programming challenge is to make slich holes effi-
Nl. G20 ciently. It would be La program one motion through all
N2 GI7 G40 G80 TOI the parts as well as the empty spaces. many
NJ M06 holes, this approach would prove to be inefficjent.
N4 G90 GS4 GOO XO.25 YO.375 5900 M03 T02 Evaluate the front view of a web drilling example shown in
NS G43 Zl.O HOI M08 2r5-22,
N6 G99 G82 R-O.4 Z-0.60B P200 F8.0
N7 YO.75
NB Y1.12S
N9 Gge Yl. 625
NlO G99 XO.87S R-O.OS Z-O.2Sa
Nll Yl.125
Nl.2 Gge YO.375
Nl.3 G99 Xl.687S RO.I Z-0.10a
Nl.4 YO.7S
Nl.5 Yl. 625
Nl.6 X2.437S Yl.12S R-O.3 Z-O.508
Nl.7 YO.375 Z-1
N1B GSO Zl.0 M09
N19 G28 Zl.0 MOS R-1.575
N20 MOl
- . - - - - - Z-2.0
DRILL THRU)
N21 T02 Tool point length == 0.075 Clearance :: 0.05
N22 M06
N23 G90 G54 GOO X2.4375 YO.375 S1000 M03 TOl Figure 25-22
N24 G43 Zl.O H02 MOS Web drifling eX8lnPIe (front view) program 02606
N25 G99 Ga3 R-O.3 Z-1.106 QO.35 F10.0
N26 G9S Yl.125 In program, X I.OY 1.5 is as the hole position.
N27 G99 Xl. 687S Yl.625 RO.l Drawing will not show R levels or Z depths, they have
N2e YO.7S
N29 YO.375 to be calculated. In the example, above and be-
NJO XO.a7S R-O.OS low each are .05, the first R level (RO.I). The
NJI Y1.12S length of the 1/4 drill point is .3 x .25 ::::::
N32 Y1.625
N33 XO.25 R-O.4 02606 (WEB DRILLING)
N34 Y1.125 (T01 - 90-DEG SPOT DRILL - 0.5 DIA)
N3S YO.7S Nl. G20
N36 YO.375 N2 G17 G40 GBO TOI
N37 GSO ZI,Q M09 N3 M06
N3S G2B ZI.O MOS N4 G90 G54 GOO Xl.O Yl.S 8900 M03 T02
NJ9 GOO X-2.0 YlO.O NS G43 Zl.0 HOl MOS
N40 :teO N6 G99 Ga2 RO.l Z-O.14 P250 F7.0
% N7 GBO Zl. 0 M09
N8 G2a Zl.O MaS
Study the program in detail. Walch the direction of tools- N9 MOl
TO I slarts at the left hole and at the right
hole, in a zigzag motion. T02 starts at the lower hole (T02 - 1/4 OIA DRILL)
Nl.0 T02
and ends at the lower left hole, also in a zigzag motion. N1l M06
Note there are more G98 or G99 changes the first tool N12 G90 G54 GOO Xl.O YI.S S1100 M03 Tal
than the second tool. In hole machining under- N13 G43 ZI.O H02 MOB
sland three areas of program control, used in 02605: N14 G99 GSl RO.l Z~O.375 F6 . 0 (TOP PLATE)
NlS R-0.7 Z-1.25 (MIDDLE PLATE)
o G98 and G99 control Nl6 Gge R-1.S75 Z-2.0 (BOTTOM PLATE)
o R level control Nl7 GSO Zl,O M09
Nl8 G28 Zl.O MOS
o Zdepth control ID9 :teO
%
MACHINING 209

Note that a Sjng~e required three blocks of the The higher clearance for the R level allows acceleration
program, rather than usual one. . of the feed rate 0 to 30 Inches minute to place
only one plate in the Also note in block N 16. in the air. the tap contacts the part, cutting feed rate
Only one hole is in the example, so the 098 is not re- should at programmed value, 1101 less. A good rule of
needed. cancellation command G80 with a thumb is to program the tapping clearance about two to
return motion in block N17 take care of the tool re- four the normal clearance. This will guar-
tract from hole. However. if more holes are machined, antee the feedrate [0 be fully effective when the actual
move LoollO the new 080 is pro- ping begins. Try to a slightly smaller num-
In this case, 098 is when the drilts ber, to the program more efficient. Another good
penetrates the last plate of the parr. example is nOI a method is to double, triple, or quadruple the ojrlIe tap
solution to drilting cuts, as there is still some and use that value as the above the Which-
wasted motion. only efficient programming is ever method is used, purpose is to eliminate the feedrate
to use the optional custom macro technique and develop a associated with motion acceleration.
unique efficient web drilling cycle.
Another was the amount. The
high value 30 in/min (F30.0) has also been carefully cal-
TAPPING culated. Any cutting fecdratc tapping must synchro-
nized with the spindle - the rlmin programmed as the
Tapping is only to drilling as the most common S Keep in mind that the tap is basically aform tool
hole operation on machining centers. it is the thread size shape are buill it Later in
very common to tap on a CNC mill or a center, chapter, the between the spindle speed and the
two tapping fixed cycles are avai lable for programming feed rate is explained in more detail. The cutting F
plications on most control systems. are the G84 in the program example was calculated by mUltiplying the
for normal (R/H), and cycle for reverse thread leod the spindle given as rlmin:
tapping (UH):
F 1 / 20 TPI x 600 r/min "" 30. a in/min
for righl hand threads
to calculale feedrate is to divide the spindle
the number threads per (TPI):
Reverse tapping - for hand threads
G74 with M04 spindle rotation F = 600 r/min / 20 TPI = 30.0
quality of the tapped hole is important, but it is
following shows that programming a not influenced solely by the correct of
one hole is to other fixed All feeds, but by other as welL The
motions, including spindle stop and the tap. its coating, its the flute
boltom are in the helix configuration, (he the start-up
being cut - tap holder itself all have a
profound effect on final quality of tapped hole.
N64 G90 G54 GOO Xl.S Y7.125 S600 M03 T06 best results in tapping, a floating is mandatory,
NoS G43 Zl.O HOS MOS
N66 G99 GB4 RO.4 Z-O.B4 F30.0
unless the CNC machine supports tapping.
N67 GSO ing tap holder design gives the tap a 'feel', similar to the
feel that is needed for manual tapping. A floating tap holder
Is it possible to tell the tap used? It should In the has is called the tension-compression holder and its
example, the tap 20 TPI (twenty threads applications are the same for both milling and turning
per inch). plug tap. coordinates are missing from erations. This type of holder allows tap to be pulled out
the cycle, current tool position has of it or pushed it, within The only
established in block N64. The usual R level is the able difference is the mounting of the tool (tool ori-
starting pOSltlon the Z depth is the absolute depth entation) in the machine (either vertical or horizontal).
thread. The address in the block is feedrate in inches High end floating tap holders also have an adjustable
per minute (in/min), programmed with the F which can the feel of the and even
of the tension
the R ofRO.4 has a value that is somewhat
higher than might used for reaming, single Tapping applications on CNC are similar to those
point boring and similar operations. the programmed on machining centers. A tapping a lathe
feed rate to be unreasonably high. is a control is not needed, as one tap size can used per
reason for values - (hey are bOlh correct selected part tapping programmed the 032
intentionally. command and block-by-block method.
210 Chapter 26

I
lathe tapping is different but not mo~difficult than
tapping for CNC machimng centers. Because it does nol
use fixed cycles, make some common errors. _a TAPERED
This chapter llses examples for tapping on CNC lathes in a
sufficient depth .

• Tap Geometry
a PLUG
are literally of lap used in
CNC programming applications. A book would eas-
ily be filledjusr on the topic of tapping tools and their appli-
calions. For CNC only the core of tap a BOTTOMING
geometry are important.
are two considerations in
Figure 26·23
the programming and the
Typical tap end - chamfer geometry configuI8lion
o Tap geometry
o Tap chamfer geometry The major
tap chamfer. 26·23 shows how the of
Flute Geometry the drilled hole wi 11 influence programmed depth of the se-
lected
The flute geometry of a tap is described in tooling cata-
logues in terms such as 'low helix', 'high helix', 'spiral The tap length c is measured as the number of
flute', and These terms basically how the threads. A typical number of threads for a
cutting are ground into body of When is 8 to ! 0, a tap 3 to 5, for a
programming a tapping operation, the effectiveness of (he I The angle chamfer a varies for
flute geometry is tied to the spindle Experimenting typically 4-5 0 for the tap, 8-1 the plug tap and
with the tapping is limited by tap lead (pitch), 25-35° for the bottoming tap.
but (here is a greater latitude with the spindle speed selec-
tion. The material and flute geometry of the lap A blind will almost always require a bottoming tap,
both influence machine spindle speed. almost all a through hole will require a in most cases and a ta-
designs (not limited to only) are the of per in some rarer cases. in different words,
corporate policies, engineering decisions and philosophies, the the lap the greater depth allowance must
various trade names and marketing there is not a be to each drilled hole.
one way use tool' or 'use for a CNC
program. tooling catalogue of a tool is the best • Tapping Speed and feedrate
source of technical data, but a catalogue from another sup- The relationship of the spindle (r/min)
plier provide a solution to a particular and programmed cutting feedrate is extremely impor-
Information gathered from a catalogue is a very good start- tant when programming the cutting motion in feedrate per
ing the data in (he CNC program. Keep in mind time mode. Per time mode is programmed as in/min (inches
that the share some common characteristics. minute) in programs English and mmlmin
Tap Chamfer Geometry (millimeters minute) for metric units programming.
This per minute mode is typical to CNC milling machines
chamfer geometry relates to the end configuration of and machining where virtually all work is done
the For CNC programming, the most important of ther in in/min or For tapping operations,
the tap end point geometry is the tap chamfer. less of the machine tool. Iltways program the cutting
rate as distance muSI during one
In order to program a hole tap must spindle revolution. This always equivalent to the
selected according to the specifications hole being lead of the which is the same as the tap pitch (for tap-
If tapping a blind hole, a different tap is required only), taps are normally used to cut a
tapping a hote. are three of only.
taps, divided by their geometry configuration:
the feedrate revolution mode, mode tbat
o Bottoming tap 1alhes, the is always equivalent to
o Plug tap the feed rate. example, of .050 results in .050
feedrate. or FO.OS in the
a Taper tap
MACHINING 211

""""I ......'" the typical mode is actual feed rate value would be F26.1 or even
always per in per minute and the- to change the spindle speed of the tool in pro-
feedrate is cruculated by one of the following formulas: on the CNC machine, forget to
modify the feedrate the tapping tool This mistake
can happen during program preparation the office or dur-
ing optimization at the machine. if the is
small, may be no more due to luck than in-
tent. If the change of spindle speed is major, the tap will
~ where ... most likely break in

Feedrate per time minute) • Pipe Taps


= Spindle speed
TPI = Number of threads per Pipe are similar in design to taps. They
long to two groups:
A similar formula will produce an identical result:
o Taper taps NPT and API
o Straight (parallel) NPS
Ft :::: r I min x F,
(nominal size), is not the size of
Ike where ... but of the pipe American National
'lfH1UllJ7L pipe taper (NPT) a taper ratio of I to 16. or
F, == Feedrate per time (per minute) inch per foot (1.7899 I per side) and the tap cham-
(I

r/min = Spindle speed is 2 to 3-112


F, = Feedrate per revolution
Programming pipe taps follows the considera-
a 20TPI lead for a mill will tions for standard threads. The only common difficulty is
how to calculate the Z depth position at least as a reason-
1 / 20 ~ .0500 inches able one, if not exactly. The finaJ depth may be a of
feedrate has to
some experimentation a particular tap typi-
nrr,al"",.rnrnprl into considera- cal materials.
tion spindle speed, 450 r/min:
A proper II size is very important. It will be differ-
F = 450 x .os = 22.5 = F22.5 (in/min) ent for tap that are only drilled and for lap holes that
are drilled and reamed (using a per foot taper
A metric tap on a lathe uses the same
a tap of 1.5 mm (pitch) using 500 The following is a table taper pipe thread for NPT
with the 750 mm/min: group and recommended tap drills, data that is for
CNC programming:
F : 500 x 1.5 = 750.00 F750.0 (mmVmin)
NPl Group Drilled Only
is to maintain relation-
ship of the spindle speed. If the spindle
Pipe
speed is changed, the feedrate time (in/min or mm/min) TPI
must be as well. For tension-compression Size
holders, adjustment of downwards 1/16
underfeed) by about percent may
This is tension of the tapping holder is
more l1exible than compression of same holder.
in the above example is changed from
(tap size is at 20 TPI), the 11/16
must be a new tapping
.9062 57/64

F : 550 x .05 = 27.50 = F27.S 1.1406 H/8

In the program, the new tapping tpop.,(1 ... ",tp will be:

F = 27.5 - 5% : 26.125
212

straight pipe the following With modern CNC machines, the method of rigid lap-
drills are recommended: ping has become quite popular. is no need for "U'~'-l''''1
holders. such as the compression type -
Decimal Size ular end mill holders or collet chucks can be
the cost of tool the CNC
.2500 control sys(em must suppan the rigid tapping
1/8 27 .3438 ture. To program there is a special M
1/4 18 7/16 .4375
available - check the
3/8 18 37/64 .5781 The rigid tapping mode must be supported by
% 14 23/32 .7188 the eNC machine before it can be used in a progr
3/4 14 59/64 .9219
1.0 11- 1.1563 HOLE OPERATIONS ON A LATHE
1-1/4 1.5000
1.7500
point hole on a CNC lathe are much
1·1/2
more than on a CNC machining center.
2.0 2.2188 the number of drilled or tapped in a
operation on a lathe is one part (two are
The tapping feed rate maintains the same relationships rare). while the holes (or a
pipe taps as for standard may be in lens, hundreds and even thousands.
boring (internal on a lathe is a LUlU..,.'"
• Tapping Check lion, unlike boring on a milling machine, which is a point-
to-point operation.
When programming a operation, sure
program data reflect the true machining conditions. All the point-to-point machining operations on a CNC
may vary between majority of them are lathe are limited to those that can be machined with the cul-
cal to any tapping on any type of CNC ting tool spindle centerline. Typically,
Here is a short list that relate directly to (he tapping these operations center drilling, drilling,
operations in CNC I"\r{"\ar!'\m,ml reaming and A variety of other cutting tools may
u Tap cutting (have to be sharp and properly
also be a center cutting mill (slot
dri II) to open up a or to make a flat bottom An in-
u Tap design the hole being tapped) ternaJ burnishing may also be used for such
u Tap ;;,h.ronmi"nt to be aligned with tapped hole)
as precise a hote, etc. To a lesser op-
erations, such as counterboring and may
programmed at lathe spindle centerline, with a special
the point-to-point - not a contouring tool. operations in
o Tap feed rate (has to be related to the lead and this will have one common denominator - they are all
the machine speed) centerline and with the X
program
o Part setup
(rigidity of the machine setup and the tool is important) for all onaCNC
o Drilled hole must be premachined correctly
lathe must programmed in
(tap drill is important) (r/min), not in the constant
that reason, is used - for
o Clearance for the tap start position
(allow clearance for acceleration) G91 SS15 1403
o Cutting fluid ;::'CIC;I"UU
will assure the required r/min at the normal spindle
U Clearance at the hole bottom 100% spindle
(the of thread must be
happen if is used with G96 com-
o Tap holder torque adjustment of cutting)
than the proper command? The CNC
o Program integrity (no errors) will use the given information, the spindle
in the program (given peripheraJ - or
of tap holders have their own special re- per minute, asft/min). will then calculate
which mayor may not any effect on the required spindle speed in for (he use by (he ma-
If in doubt, always with the
for operation.
MACHINING 213

The first method may


when the tool motion area is
stacles in the way (do not count on a The
second method, and probably the most common in pro-
gramming, will move the Z not 100
close) to the part, say .50 inch in
tion that follows is the X
centerline (XO). At this
drill) is far from Z
if (surface) speed for a given will be to the Z
ftlmin. the r/min at a 03 inch (X3.0) for the where thc actual
approximately: nates (or at
with obstacles along way. The obstacles are - or alleast
S I 3 = 573 rpm could be - the lailstock, the catcher, the steadyrest, the
the etc. example of this program-
ftlmin is applied to the diameter
path is the previous example, modified:
formula does not change. but
N36 T0200 M42
N37 G97 S700 M03
S x 3.82) I 0 = 0 (ERROR) N38 GOO xo ZO.5 T0202 Moa
N39 ZO.1
mIght be expected to stop (because
''HHllU''''-- N40
laws), it will do the exact opposite (be-
the control design). Spindle speed will reach method the tool approach along
rlmin that the current gear range will allow. Be two tool positions - one is the safe clearance
- make sure that the centerline operations the other one is the safe clearance position for
on a lathe are always done in the G97 (r/min) mode start. is a minor alternative to this motion -
not in the G96 mode (CSS) mode. Z will be at a cutting feedrale, rather
motion rate:
• Tool Approach Motion
N36 T0200 M42
A typical geometry offset configuration setup (or N37 G97 S700 M03
values) on a CNC lathe often have a relatively large X N3S GOO XO ZO.S T0202 MOS
small Z value. For example. the geometry N39 GOl ZO.l FO.OS
offset for a tool may be X-lI.8Z-1.0 (or G50XJ 1.8Z1.0). N40
location indicates a suitable tool change position
to a drilL What does it mean to the lOa] motion approach motion, the Z axis motion has
to a linear motion, with a relatively high ","'" .. ",'"
a drilling operation?
in/rev (1.25 mm/rev). Feedrate override can be used
It means that the rapid motion will complele the Z setup, to conlrolthe rate of the feed. During actual pro-
motion long before completing the X axis motion (with duction, there will be no significant loss in the cycle time.
hockey-slick motion of the rapid command).
motion very close to the part • Tool Return Motion
N36 T0200 M42 The same logical rules of motion in space thal apply to
N37 G97 S700 M03 the 1001 approach, apply also to the tool return motion. Re-
N3S GOO XO ZO.1 T0202 MOS member that the firsl motion from a hole must always be
N39 the Z axis:

To avoid a potential collision


wards the part, use one of the N40 GOl z-o. a563 FO. 007
N41 GOO ZO.1
o Move the X axis first to the spindle ""..'t"'.·I1 ......
then the Z axis, directly to the start location
for the drilling N40. the actual drill cutting motion
o Move the Z axis first to a clear rlO~!ltlon cut is completed. block N41 is
then the X axis to the spindle out of the hole to the same position it
then complete the Zaxis motion It is not necessary to return to the same
the drilling start position the style more
214

the cutting tool is safely out of the hole, it has to re- • Peck Drilling Cycle· G14
turn to tool changing position. are two methods:
On Fanuc and compatible there is a multiple re-
Q Simultaneous motion of both axes pelitive cycle G74 available, can be used for two differ-
ent machining operations:
o Single axis at a time
o Simple roughing with chip breaking
Simultaneous motion of the Z axes does not pres-
same problem as it on - on the con- o Peck drilling (deep hole drilling)
Z axis will complete motion first, moving this section, the peck drilling usage of the G74 cycle is
the part face. Also, is no reason to fear a The roughing of the G74 is a
during a return motion if approach motion was . operation
,-,,-,,-.,,.ll .... and the programming was consistent:
ordinary drilling.
first, then
mo GOl Z-O. 8563 FO. 007 starting position finally. its depth posi-
ml GOO ZO.l
N'72 XU. 0 Z2. 0 T0200 M09
tion. In addition, establish (or even calculate) the depth of
each peck. The lathe cycle 074 is limited in what it
can do, but it has its uses. Its format for peck-drilling is:
If in or if an obstacle is to in the way of
a tool for example a program a single G74 xo Z •• K ••
axis at a time. In most cases, that will move the positive X
IGi" where ...
axis first. as most obstacles would be to the right of the part:
G74 drilling cycle
XO Indicates cutting on ....m'?"'.·lj""
N70 GOl Z-O.SS63 FO.007
N'71 GOO ZO.l Z == Specifies the end point for drilling
N72 X12.0 K Depth of each peck (always positive)
N73 Z2. a T0200 M09
following program uses illustration in Figure 26-24,
and shows an exampk~ of a 6 hole (0.1875)
The example illustrates the return motion with a drill depth of .300
with the programmed first Tht! that Lhe tuol is
.] 00 off the front face is irrelevant - after all, Ihe tool started
Culling that distance without a .....1"1,1'\1,...,., NBS T0400 M42
N86 G97 S1200 M03
Other, traditional, methods for the tool motion ta- N87 GOO XO ZO.2 T0404 MOS
N88 G74 XO Z-O.BS63 KO.3 FO.007
wards and the part are N89 GOO X12.0 Z2.0 T0400 M09
N90 MOl
• Drilling and Reaming on lathes
on a is also quite common operation,
as means a hole opening to be used with other
tools, such as There are three
drilling, typical to a lathe machining:
o Center drilling and spotfacing 6
o Drilling with a drill
o Indexable insert drilling

Each method same programming


as those section earlier. Z-O.8563
there are no of the mil1ing lype
lathe work. Keep in that on a CNC lathe, the Figure 26-24
rOlaling. whereby the tool remains stationary. Sample hole for the lathe example
keep in mind that most lathe operations take place in a
zontal orientation, concerns about coolant The peck motion will start the position
tion and chip removal. in block N87 to the Z-0.8563 posmon in
block N88. in a 1.0563 long cut Calculation
the number of pecks is the same as in milling.
MACHINING 215

each peck, there will be total


and one partial length peck, at

Z-O.l
Z-O.4
Z-O.7
Z-O.SS63

first three pecks are .300 deep


one starts at ZO.2 and ends at 2-0. 1. That will result in two
thirds of cut being in the air. Programmer has to
this approach is an advantage and when
method would be more suitable. At the end
the G74 cycle, the drill will make a
Step 01 Set coordinate position
tract by distance. This distance is set by a
Step 02 Select tool and
control system and is typically about .020 inches (0.5
Step 03 Select spindle speed rotation
A full retraction after each peck out of the hole (simi-
Step 04 Rapid to the center line and clearance with offset
to the cycle for milling controls) is not supported
Step 05 Feed-in to the depth
G74 cycle.
Step 06 Stop the spi ndle
thal is no programmed out the hole Step 07 Reverse the spindle rotation
when the peck drilling cycle is completed. Step 08 Feed-out to clear of the part depth
lion is built-in within the G74 cycle. If a Step 09 Stop the spindle
GOOZO.2M05 follows block N8S, no Step 10 Rapid to the starting position
operator extra confidence when Step 11 Resume normal spindle rotation or end program
Translated into a careful1y. this step by
• Tapping on lathes step can everyday programming as a
general guide to '",",,",,,,,,., lathes.
Tapping on CNC lathes is a common that fol-
lows the same machining principles as layout of the part and (he 1001
ing centers. The major difference for example 02607. The exam-
of a tapping cycle. There is no the eleven steps
on a lathe, since most of lathe on a very solid foundation.
only one hole of the same type. 02607 is correct - but only
may preselH some difficulties. Unfortu- Are there possible problem
are more common among programmers with
these difficulties

TOOL
HOLDER

012.0 FLOATING TAP

9/16-12 TAP

Figure 26-25
Typical setup of a fool on a lathe - program examples 02607 and 02608
216

02607 ON LATHES) controls). The G32 is normally used for single


(ONLY THEORETICALLY CORRECT point threading. Two major will be achieved with
(T02 - TAP DRILL 31/64)
the command - the spindle will be synchronized,
the feedrate override will be ineffective by default
matically). The second will be solved If (he
N42 MOl die M functions are the same block as
tool motion. That means the N46
(T03 - -12 PLUG TAP) with
N43 T0300 M42 is in the new program 02608.
N44 G97 S450 M03
N45 GOO XO ZO. 5 M08 T0303 02608 ON
N46 GOI Z-O. 875 FO. 0833 (PRAC'I'ICALLY CORRECT VERSION)
N47 MOS
N48 M04 TAP DRILL 31/64)
N49 ZO. 5
NSO MOS
NSl GOO X1.2. 0 Z2. 0 T0300 Ma9 N42 MOl
N52 IDa
% (T03 PLUG TAP)
N43 T0300 M42
A brief look at 02607 not show that N44 G97 S4S0 M03
anything is wrong. N4S GOO XO ZO. 5 MOB T0303
essary motions therefore. correct. N46 G32 Z-O.S75 FO.OB33 MOS
contains major flaws! N47 ZO.S M04
N48 Ma5
All earlier have been carefully followed. N49 GOO Xl2.0 Z2.0 T0300 M09
Conducting a more study of the will re- N50 M30
veal two areas of difficulty or even The %
first problem may if the feed rate override setting
switch is not set to 100%. Remember, the The block (N48 in example) the spindle
is always equal Lo lead (FO.0833 stop is not required if the is the last tool
for 12. TPI). If the switch is set to any in the although it does no harm in any other pro-
but 100%, the will be at gram. Compare program 02608 with 02607.
at worst damage. Program 02608 is a deal more stable possibil-
ity of any problem is virtually
other problem will become evident only in a
block mode run, during or machining. Look at • Other Operations
N46 and N47. In the N46 hlock, tap reache~ the Z axis
- while the spindle is still rotating! True, There are many other programming reJating to
will be slopped in block N47, but in the machining on CNC machining centers lathes.
mode it will be lao late. A situation will """"",,,.,, This chaprer some of the most important and
(he feed-oul motion. reverses in the most common possibilities.
but does not move until N49 block is processed. Some less common applications, such as op-
the program is a very poor example of lapp! ng erations using tools for backboring, or block boring tools.
lathes. tools with multiple edges and other for
are some details usually not considered for a
machining may quite infrequent in
application (such as G84 tapping cycle), However, programming unusual
more difficult the A"f'fF"~"'''
used for milling programs. milling, all tool mOlions are
built-in, so they are contained within the fixed tool motions, everyday tools.
eli the first potential problem of the The real ability a CNC programmer is
programming the M481M49 will 'd_'_~ terms of applying the knowledge and
disable the fecdrate Even better new problem. It requires a thinking process
mOlion command a degree of ingenuity work.
mode (G33 on some
PATTERN OF HOLES

In point-la-point operations, consisting of o Grid pattern


drilling, reaming, tapping, etc., we are often re- o Arc
quire9 to machine either a single or a series holes
with Ihe same tool, usually followed by tools. In o Bolt pattern
several holes are much more commOn than a
Machining holes with the same loa I means Some groups be divided into smaller
machining a pattern of holes or a hole pattern. An English groups. A thorough understanding each pattern group
dictionary defines the word as a 'characterislic or should you to any similar pattern.
consistent arrangement or '. Translated to hole are several control available that have a
machinioao two or more holes machined with . built-in hole for example a boll
same lool establish a The hole IS circle nlIll'prn nrr\a ...'~m'm ng routines simplify the
laid out in the pari either randomly (characteristic hole pattern quite substantially, but the pro-
or design) or a certain (consisTent ar- structure is unique to that panicular brand of
rangement or design). Dimensioning of a hole fol- control and cannot applied to conlrols.
lows standard dimensioning
some laid out RANDOM HOLE PATTERN
part and the various methods their program-
make malLers all programming e.xamples The most common pattern used in programming
related (0 Lhe hole panerns wi II assume a center drill ing op- a pattern. pattern holes is a
eration, using a #2 center drill, chamfer .150, where all holes share same machining characteristics,
to the depth of .163 (programmed as 2-0.163). but the X and Y distances between them are inconsistent. In
nrr\ar:"m reference point 20) is the top
other words, holes within a pattem the same
10 be in ~pindle.
LaO!. the same nominal usually the same depth,
the of clarity, no hole diamelers or material but a variable distance from each other - Figure 27-/.
and are specified in the examples.
From the dictionary definition above, we have to estab-
lish what makes a hole paHern characteristic or consistent.
Simply, any that are machined with the same - 4.4 -.,..J

tool, one hole after another, usually in of COlwen-


ience. means all within a single pattern have the
same diameter. II also means that all machining - 1.4
must start at same R level and at the same 2 depth.

,,
Overall, i( means that all holes wllhm a pauern are ma-
chined the same any tool. 0-
2
TYPICAL HOLE PATTERNS o •
l 1B 20
. .4
~_ _ _ _ _ _ _ _ _ _..... O!~_J_._L_1.
Hole paHerns can be categorized
each group having the same character.
encountered in CNC programming figure 27·'
the following pattern groups: Random pattern of hotes· program example 02701
o pattern
are no special lime saving used in pro-
o Straight row pattern gramming a random - only a fixed
used at individual hole locations. All XY coordinates
o Angular row pattern
within the hole pattern have to programmed manually;
o Corner pattern control features will no help here at all:

217
218 Cha 27

02701 (RANDOM HOLE PATTERN) Two program 02702 should be


N1 G20 , In block N6, the di mode was
N2 G17 G40 GSO absolute G90 (0 the incremental G91, to take
N3 G90 G54 GOO Xl.4 YO.S S900 MOl
the equal pilch When all ten holes have
N4 G43 Zl.O HOI MOB
NS G99 Gal RO.l Z-O.163 F3.0 chined, the program to include return to
N6 X3.0 YJ.O zero position motion, in the example, along all axes.
N7 X4.4 Y1. 6 However. without a calculation, we do not know the
N8 X5.2 Y2.4 lute position atlhe tenth for the X axis (the Y re-
N9 GBO M09 mains unchanged al of .60 inches = YO.6).
NlO G28 ZO.l MOS solve this 'problem', the cycle with G80,
Nll G28 XS.2 Y2.4 G91 mode in move (0 the machine zero position
N12 IDO
in the Z axis first Then - still in the in-
%
cremental mode I - return both X and Y axes to ma-
chine zero simullaneously.
STRAIGHT ROW HOLE PATTERN
Normally, this first tool of the example would be fol-
lowed by other LOols to the hole machining. To
Hole to the X or Y axis with an equal
protect the program and from possible prob-
pitch ~s a Figure 27-2 shows a 10 hole
with a pitch of .950 inch. lems, make sure that the G90 ute command is
pattern
for every tool (hal

- 'I TYP ANGULAR ROW HOLE PATTERN


in a row al an is a variation of a
pattern. The between the two is that
0.6 pitch applies 10 bulh X Y axes. A hole
pattern of this type will be on the part drawing
as one the two possible dimensioning methods:
o X and Y coordinates are given for the first and the last hole
row hole • program example 02702
In this method, the pattern is not speci-
The programmi takes advantage of a fixed and no pitch belween holes
cycle repetition Lor K address. It would
be inefficient to program hole individually. As always, o X and Y coordinates are given for the hole only
(he tool wiJl be positioned at the first hole in G90 mode,
then the cycle will machine hole in block N5. In this method, paUern angular is specified and
the holes is
the remaining holes, mode must be changed to
incremental mode G91, the controllo ma- In either case, all the necessary Y dimensions are
chine the olher nine incrementally, along the X axis to write the program. However, the programming
only. The same logic would for a vertical pallern will be different for each method of drawin bo
along the Y axis. In that case, would be
programmed along the Y Note lhallhe repetition
count is always equal to the ofspaces, not the num- • Pattern Defined by Coordinates
of holes. The reason? hole h!ls already been method of programming is
machined in the cycle call block. row pitch between
increment between holes along
02702 (STRAIGHT ROW HOLE PATTERN) be This axial distance is as
Nl G20
N2 G17 040 G80
X is measured X axis.
N3 G90 G54 GOO Xl.lS YO.6 5900 MOl along the Y axis). Such a calculation
N4 043 Zl.O Hal Moe in two equally accurate ways.
NS G99 Gal RO.l Z-0.16l Fl.O
N6 G9l XO.95 L9 The lirs( calculation method can use a
N7 G80 1409 method, but it is much casier (0 usc the ratio
N8 G28 ZO MOS stead. In the Figure 27-3, the pattern length
N9 G28 XO YO Ilxis is I and along the Y axis it is 2.0:
NlO MJO (2.625 - =2.0)
%
HOLES 219

N7 GBO M09
N8 G28 ZO MOS
N9 G28 XO YO
o
o o
NlO M30
%

Note that the program structure is idt:nlicallu- Lhe exam-


ple of the straight row except the incremental move
with L5 (KS) two axes instead of one.
+----10.82-----.... -
.. Pattern Defined by Angle
27·3 be defined in the drawing
Angular hole pattern with two sets of coordinates· program 02703 hole, the number of
equally holes, between holes and
of this kind has all the holes by equal dis- angle of pattern inclination - Figure 27-4.
tances along X and Y axes. As all holes are equally spaced,
ratio of the sides for individual holes is identical to the
of the whole pattern. When mathematically,
f\('r'p'rn,pnl between holes along to the
'l>la" ..", of I 0.82 divided by of X axis
"IJ""''''''. the increment along the Y to the over-
Istance of 2.0 divided by Y axis spaces.
number of spaces for a six so the X
(the delta X) 2.0
10.82 / 5 = 2.1640
and the Y axis increment (the

2.0 / 5 = .4 27-4
Angular with coordinates, pitch - 02704
The other calculation method uses lTigonometric fllnc-
which may also be as a confirmation of the first In to calculate the X and Y coordinate use
vice versa. Both must be identical, or trigonometric functions in this case:
is a mistake somewhere in the calculation. First, es-
x = 4.0 x coa15 = 3.863703305
Y = 4.0 x sin15 1.03527618
10.47251349"
can be written after you round off the calculated
C = 2.0 / sinA = 11.00329063 . program 02704:

C1 = C / 5 = 2.20065813 02704 Raq 2)


m G20
Now, the actual increment along the two axes can N2 G17 G40 G80
culated, using C I dimension as the distance between holes: N3 G90 G54 GOO X2.0 Y2.0 8900 M03
N4 G43 Zl.0 HOl MOB
x increment = Cl x cosA = 2.1640 N5 G99 GSl RO.l Z-0.163 Fl.O
N6 G91 X3.8637 Y1.0353 L6 (K6)
Y increment = Cl x sinA = .4000
N7 GBO M09
N8 G28 ZO MOS
The calculated mcreOlents match in both methods, N9 G2B XO YO
lalion is correct, can now be used to write the program mo M30
(02703) - block the vaJues: %

02703 (AN'GOLAR Raq Since the calculated increments are rounded values, a certain
m G20 accumulative error is inevitable. In most cases, any error will
N2 G17 G40 GBO be well contained within the drawing tolerances.
N3 G90 G54 GOO X1.0 YO.62S S900 M03 However, for the projects highest precision, this
N4 G43 Zl.O HOl M08 error may be important and must taken into consideration.
NS G99 Gal RO.l Z-O.163 F3.0
N6 G91 X2.164 YO.4 L5 (K5)
220 Chapter 27

To make sure all calculations are correct, a simple check- comer hole will be machined twice. Visualize the whole
ing method can be used (0 compare the calculated values: process - the last hole of one row pattern is also the first
hole of the next pattern, duplicated. Creating a special cus-
~ Step 1 tom macro is worth the time for many comer patterns. The
nonnal solution is to move the lool to the first position, call
Find the absolute coordinates XY of the last hole:
(he required cycle and remain within that cycle:
x 2.0 + (4.0 x 6 x coalS) 02705 (CORNER PA'I'TERN)
= 25.1B221983 = X25.1822 Nl G20
N2 G17 G40 GaO
Y = 2.0 + (4.0 x 6 x sinl5) N3 G90 G54 GOO X2.2 Yl.9 S900 M03
N4 G43 Zl.O H01 MOS
= 8.211657082 = YB.2117
N5 G99 G8l RO.1 Z-0.163 F3.0
N6 G91 Xl.5 Yl.B L2 (K2)
~ Step 2 N7 Xl. 8 L6 (K6)
NB Y-l. B L2 (K2)
Compare these new XY coordinates with (he previously N9 GSO M09
calculated increments as they relate to the lasl hole of the mo G28 ZO MOS
pattern (using rounded values): Nll G2B XO YO
Nl2 1000
x = 2.0 + 3.8637 x 6 25.1822 % .
Y = 2.0 + 1.0353 x 6 = 8.2118
l1le program offers 00 special challenges. In block N6,
Note that both X and Y values are accurate. When round- the angular row of holes is machined, starting from the
ing. particularly when a large number of holes is involved, lower lefl hole, in N7 it is the horizontal row of holes, and
the accumulative error may cause the hole pattern out of in N8 the vertical row of holes is machined. The order is
tolerance. In that case, the only correct way to handle the continuous. Just like in the earlier examples, keep in mind
programming is to calculate the coordinates of each hole as that the repetition count Lor K is for the number of moves
absolute dimensions (that means from a common point (spaces), not the number of holes.
rather than a previous point). The programming process
will take a little longer, but it will be much more accurate. GRID PATTERN
CORNER PATTERN Basic straIght grid pattern can also be defined as a set of
equally spaced vertical and horizontal holes, each row hav-
Pattern of holes can be arranged as a corner - which is ing equally spaced holes. If the spacing of all vertical holes
nothing more than a pattern combining the straight and/or is the same as the spacing of all horizontal rows, the final
angular hole patterns - Figure 27-5, grid pattern will be a square. ff the spacing of all vertical
holes is not the same as the spacing of all horizontal rows,
the resulting grid pattem is a rectangle. A grid pattern is
1,5---' --- 1.8 l i-- someti mes called a rectangular hole pattern - Figure 27-6.
I I

, GOO 0 0 (j)-e-~8 --"'1 1 1.8


I
CD. ,
(B---r
.
I I
-wED 0 0 0 I
1--8- 0
1.9 I 0000$--'-
..l 2.1
I ,

OOOOUJ--,
- 2.2 00000
00000
figure 27-5 00000 I
Corner pattern of holes· program example 02705
0·0 0 0 (]j---.-L
2.4
All rules mentioned for the straight and angular hole pat-
terns apply for a corner pattern as well. The most important '---1.7
-r I
difference is the corner hole. which is common to two rows.
A comer pattern can be programmed by calling a fixed cy- Figure 27-6
cle for each row. Soon, it will become apparent that each Rectangular grid hole pattern - program example 02706
PATTERN HOLES 1

A grid pattern is very similar to a series of corner patterns,


similar programming methods. The
tion a grid pattern programming is in its Each
row can be programmed as a single row pattern, starling.
for example, the left side of IroW. Technically,
that is correct, although not very efficient duc to the loss of
the tool has to travel from last hole of one
row, to the hole the next row.
More
a zIgzag motion, program
motion. To
row or colwnn
000 o
at any corner bole. Complete that row (column),
then jump to the nearest hole the next row (column) and
a 3.5
repeat the process until aU rows and columns are The
lime of the motion is kept to the minimum.

02706 (STIlAIGm' GRID PAT'I'ERN)


-14.0
Nl G20
N2 G17 G40 GaO 27-7
NO G90 G54 GOO Xl.7 Y2.4 S900 M03 Angular grid hole pattem - program example 02707
N4 G43 Zl.O H01 MOS
N5 G99 GSl RO.1 Z-O.163 F3.0
N6 G91 Y2.1 L6 (K6) The unknown increment in the drawing is the distance
N7 Xl.S measured along the X axis, a hole in one
N9 Y-2.l L6 (K6) row to the next hole in following horizontal row:
NlO X1.8
Nl1 Y2.1 L6 (K6) x ~ 4.6 x tan16 = 1.319028774 (Xl.3l9)
N12 X1. 8
N13 Y-2.l L6 (K6) The program can be written in a similar as for the
N14 Xl.8 straight row grid, the extra 'jump' between rows will
Nl5 Y2.1 L6 (K6) take place along both axes:
N16 GSO M09
Nl7 G2B ZO M05
02707 (ANGULAR GRID)
NlB G28 XO YO
Nl G20
N19 IDO
%
m G17 G40 GBO
NJ G90 G54 GOO X4.0 YJ.5 S900 M03
N4 G43 Zl.0 HOl MUS
Two features the are worth noting - one is the NS G99 GS1 RO.1 Z-O.163 Fl.O
jump from one row of pattern to another - it has no repe- N6 G91 X3.2 L5 (KS)
tition address L or because only one hole is being ma- N7 Xl. 319 Y4. 6
chined at location. The feature may not be so NS X-3.2 LS
obvious right away. make the program shorter, stan N9 Xl. 319 Y4, 6
the that the larger of (the mo X3.2 L5 )
in the program 02706). example is a N1l X1.319 Y4.6
variation on previous examples and also adheres to all N12 X-3.2 LS
Nl3 GBO M09
the established so A special subprogram made for N14 G28 ZO MUS
a pattern is also a common programming and NlS G2S xo YO
can be used as well. N16 M30
%
• Angular Grid Pattern
Many will consider even more
the straight grid pattern is the most common efficient way approaching programs for grid patterns
pattern square and rectangular hole a grid by using subprograms or even User Macros. Subprograms
pattern may also be in the shape of a parallelogram, called are especially useful patterns con~isling of a large
an angular grid pattem - Figure 27-7. number of rows or a large number of columns. The
the programming approach the same as subprograms, including a practical example a really
for rectangular grid pattern, the ollly extra work re- grid is covered in Chapter subject of
quired is the calculation of the increments, similar user macros is not in this handbook.
to previous methods:
Chapter 27

ARC HOLE PATTERN e STEP 1


that is nearest to 0° io-
Another quite common pattern is a set of equally direction), then continue
arranged an arc (not a circle). Such an direction of the arc.
equally spaced set of holes portion of a circle
cumference creates an arc hole pattern. e STEP 2
approach to programming an ~rc hole pauern should Use trigonometric to calculate the X and co-
same as if programming any other hole pattern. ordinates of the first
as the one that is most convenient. Is it the
or the last arc that is easier to tind the Hole #1
coordinates for? at 0" 0' clock or
position) would be beBer? In 27-8 x = 1.5 + 2.5 x cos20 == 3.849231552
shows a typical layout of an arc Y = 1.0 + 2.5 x siDlO 1.855050358

e 3
Use the same
culate XY coordinates
hole in the pattern, included
the second hole angle will be 40°, the third
Hole #2

1.0 x = 1.5+ 2.5 x <::os40 = 3.415111108 .4151)


1
Y = 1.0+ 2.5 x sin40 = 2.606969024 .607)
I Hole #3
4 EQSP
1.5 x == 1.5 + 2.5 x 00s60 2.750000000
Y c: 1.0 + 2.5 x sin60 3.165063509
Figure 27-8
Arc hole program 02708 Hole #4

arc center locations are known, so is the x = 1.5 + 2.5 x cosSO = 1.934120444 .9341)
and Y == 1.0 + 2.5 x sinelO '" 3.462019383 .462)

A number of is needed to find X Y


e 4
coordinates hole center location within the bolt
hole pattern. procedure is similar to that an angular
line in a grid but with several more calculations.
The calculation uses trigonometric functions applied to
each hole - all necessary data and other informa- Hole #1: X3.8492 Y1.B5S1
tion are drawing. Hole #2: Xl.41S1 'l2.6070
Hole #3: X2.7S00 Y3.16S1
holes, exactly the .... V~.Ul ... Hole #4: X1.934l Y3.4620
required to get the 1"'-'1""1'1,.1"1
""-'...,"1"".... there are four holes, eight Now, program for the hole arc pattern can be written,
calculations will necessary. Initially, it may seem as a lot XY coordinates for hole location from the
of work. fn terms of calculations, it is a lot work. but calculations - 02708:
keep in mind that only two trigonometric formulas are in-
volved for any number of holes, so Ihecalculations will be- 02708 (ARC PATTERN)
Nl G20
come a lot more manageable. Incidentally, observation N2 Gl'7 G40 GSO
can be to just about any other simi lar programming N3 G90 GS4 GOO X3.B492 Yl.85S1 S900 M03
N4 G43 Zl.0 HOl M08
NS G99 G8l RO.l Z-O.163 F3.0
programming, is N6 Xl.4151 Y2.60'7
lo use programming task m X2. '75 Y'3.1651
will be N8 Xl.9341 Y3.462
PATTERN OF HOLES 223

N9 G80 M09 First, select the machining location to start from, usually
N10 G28 ZO.l MOS at program zero. Then find the absolute XY coordinates for
N11 G2B Xl.9341 Y3.462 the center of the given circle. In the illustration, the bolt pat-
N12 MJO
tern center coordinates are X7.5Y6,0 ..There will be no ma-
%
Chining at this location, but the center of the circle will be
There are two other methods (perhaps more efiicient) to the starting point for calculations of all holes on the bolt cir-
program an arc hole pattern. The first method will take an cle, When the circle center coordinates are known, write
advantage of the local coordinate system G52. described in them down. Each hole coordinate on the circumference
Chapter 40. The second method will use the polar coordi- must be adjusted by one of these values. When all calcula-
nate system (optional on most controls), described later in tions for the first hole are done (based on the circle center),
this chapter - In program 027 JO. continue to calculate the X and Y coordinates for the other
holes on the circle circumference, in an orderly manner.
BOLT HOLE CIRCLE PATTERN In example 02709 are 6 equally spaced holes on the bolt
circle diameter of 10.0 inches. That means there is a 60° in-
A pattcrn of equally spaced holes along the circumfer- crement between holes (360/6=60). The most common
ence of a circle is called a bolt circle pattern or a bolt hole starting position for machining is at the boundary between
pattern. Since the circle diameter is actually pitch diameter quadrants. That means the most likely start will be at a po-
of the pattern, another name for the bolt circle pattern of sition that corresponds to the 3, 12,9 or 6 o'clock on the
holes is a pitch circle pattern. The programming approach face of an analog watch. In this example, the start will be at
is very similar to any other pattern, particularly to the arc the 3 o'clock position. There is no hole at the selected loca-
hole pattern and mainly depends on the way the bolt circle tion, the nearest one will be at 30° in the counterclockwise
pattern is oriented and how the drawing is dimensioned. direction. A good idea is to identify this hole as a hole num-
ber I. C?ther holes may be identified in a similar way, pref-
A typical bolt circle in a drawing is defined by XY coor- erably In the order of machining, relative to the first hole.
dinates of the circle center, its radius or diameter, the num-
ber of equally spaced holes along the circumference, and Note that each calculation uses exactly the same format.
the angular orientation of holes, usually in relation to the X Any other mathematical approach can be used as well, but
axis (that is to the zero degrees). watch the consistency of all calculations:

A bolt circle can be made up of any number of equally Hole #1


spaced holes, although some numbers are much more com-

C
mon than others, for example, x '" 7.5 + 5.0 x cos30 '" 11. 830127 (Xl1.8301)
y == 6.0 + 5.0 x sin30 '" 8.500000 8 s1
4,5,6,8,10,12,16,18,20,24 .
Hole #2
In later examples, the 6-hoJe and the 8-hole patterns (and
their multiples) have two standard angular relationship to x 7.5 + 5.0 x cos90 7.5000000 (X7 .5)
==
the X axis at zero degrees. Y 6.0 + 5.0 x sin90 ::;; 11.0000000 (Yl1. 0)
Figure 27- 9 is a typical bolt circle drawing. The program- Hole #3
ming approach for a bolt circle is similar to arc paHern.
x '" 7.5+ 5.0 x cos150 3.1698729B (X3 .1699)
Y = 6.0 + 5.0 x sin150 '" 8.50000000 (Y8.S)

Hole #4

x :;: :
7.5 + 5.0 x cos210 3.16987298 (X3.1699)
010.0 y '" 6.0 -I- 5.0 x sin210 3.50000000 (Y3.5)

Hole #5
I
x == 7.5 -I- 5.0 x cos270 == 7.50000000 (X7 • 5)
Y == 6.0 + 5.0 x sin270 == 1.00000000 (Yl.O)

L
I - 7. 5 - -t Hole #6

Figure 27-9
x == 7.5 + 5.0 x cos330 == 11.930127 (XU.8301)
Y '" 6.0 + 5.0 x sin330 :;::: 3.500000 (Y3.5)
Bolt circle hole pattern· program 02709
224 Chapter 27

Once all are calculated, the program is writ- the following explanation and [he
ten in the same way as patterns: any hole in any bolt circle pattern can
The formula is similar for both axes:
02709 (BOLT CIRCLE
Nl G20
N2 017 040 080 X cos«(n-l)x B+A)x R+X,
N3 G90 G54 GOO Xll.8301 Y8.S S900 M03
N4 G43 Zl.O HOI MOe
N5 G99 G8l RO.l Z-O.163 F3.0 Y «(n-l)x B+A)x R+Yc
N6 X7. 5 Yll. 0
N7 D.1699 YB.S ~ where ...
N8 Y3.S
N9 X7.S Yl.O
NlO X11.830l Y3.S
x X coordinate
Y ::::: Hole Y coordinate
Nll GBO M09 n :::: Hole number counter - CCW from 0"
Nl2 G2S ZO.l MOS H Number of equally spaced holes
Nl3 G91 G2B XO YO B:::::: between holes = 360 I H
Nl4 ICO A ::::: First hole angle· from 0°
% R ::::: Bolt radius or bolt circle diameter12
Xc ::: Bolt center from the X origin
It would be more logical to bolt circle center as Yc :=; Bo It circle center from the Y orig in
program zero, rather than the lower comer of the part.
ThIS method would el" of the boll cir- • Pattern Orientation
center position for each value and perhaps
reduce a possibility of an error. At same time, it would The bolt orientation is specified by the an-
it more djfficult to set the on the ma- gle of the the 0° of the bolt circle.
chine. The best solution is to use coordinate
offset method. This method is especially useful for those In daily bolt circle patterns will have not
jobs that require translation of boll (or any only different llUIIlVl"1 holes, but different orientations as
paUern) to other locations same part setup. For well. bolt most commonly affected are those
details on the G52 command, see 40. spaced holes is based on the mul-
...) and multiples of eight (4, 8,
• Bolt Circle formula 16,24,32, ... ). relationship is important, since the ori-
entation of the first hole wlllinfluence the position of all the
In calculations,
The methods are the same, only
are repetitious
changes.
other holes in the bolt pattern. I
of calculation offers an opportunity for Figure 27-1 J shows relationship of the first holt\position
a common formula that can used, for av"n-> ... ' to the 0° location 0" location is equivalent
of a computer program, calculator data input. to the 3 o'clock or the direction.
etc. 27-10 shows the basis for such a formula.

'j
B

I
\ R
~

._-,.....i

Figure 27·10 Figure 27-11


Basis for a formula to calculate bolt hale pattern coordinates Typical orientations af a six and hole boh circles
PATTERN HOLES 2

POLAR COORDINATE SYSTEM


So all mathematical calculations relating to the arc or
bolt circle pattern of holes have been using lengthytrigono-
metric formulas to calculate each coordinate. This seems to
a slow for a CNC system with a very
advanced computer. Indeed, there is a special program-
method (usually as a control option) that
takes all the calculations an arc or bolt
circle pattern It IS the polar coordinate system.
There are two polar coordinate functions available, always
recommended to be written as a separate block:

Polar coordinate cancel OFF 27·12


Three basic characteristics of polar coordinates
Polar coordinate system ON
In addition to the X and Y data, polar coordinates also re-
quire tbe center of rotation. This is point
for bolt hole or arc may grarnmed G 16 Earlier, in program
programmed polar system commands. 02708 and 27-8 were calculated using trigonomet-
Check the options of the before using this polar control the
method. programming format is similar to that of pro- can be much simplified - 10:
gramming flxed cycles. The format is, identical- for
02710 (ARC PATTERN POLAR)
N1 G20
N" G9.. G8.. x.. Y.. R.. Z.. F •• N2 G17 G40 G80
N3 G90 G54 GOO Xl.S Yl.O S900 M03 IO.INl')
distinguish a standard
U;"".",VJ..:> cycle N4 G43 Zl.O HOl MOS
same used in the polar coordinate mode. N5 G16 (POLAR COORDlNA"l."BS ON)
N6 G99 Gal X2.S Y20.0 RO.l Z-O.163 F3.0
N7 X2.S Y40.0
cycle. StaIlaaJro N8 X2.5 Y60.0
system N9 X2.S Y80.0
6 must be issued to ac- NlO GIS COORDlNA'l'ES OFF)
polar mode (ON mode). the polar coordi- Nll GSO M09
N12 G9l G28 ZO M5
nate mode is completed no longer required in the N13 G28 XO YO
the command G 15 must be used to it Nl4 mo
mode). Both commands must in a separate block: %

N.. G16 (POLAR COORDINATES ON) next program 02711, are equally spaced on
N •• G9 •• GS .. x .. Y .. R •• Z •• F •• the bolt circle circumference. Dimensions in Figure 27- J3
N •. are to the coordinate prCignurururlg lTlemlOa.
N •• (MACHlN.ING HOLES)
N •.
N •• G15 u .....1•..........,. CDORDlNA'l'ES OFF)

second factor is meaning X and words. 120:O~-' 60°


R6.8
standard fIXed cycle, the XY words defIne'the
of a hole rectangular coordinates, as an ;' I
,I
solute location. In the polar mode and effect (XY 180°-8-
both words take on a totally different meaning -
a radius and an angle:
a The X word becomes radius of the bolt circle
a The V word becomes of the hole, measured from 0°

Figure illustrates requrre- Figure 27-13


ments for a polar coordinate system. Polar coordinate system applied to bolt hole circle - program 02711
226 Chapter 27

02711 (GI5-GI6 EXAMPLE) G 17 plane is known as the XY plane. Ifworking in another


N1 G20 plane, make double sure to adhere to the following rules:
N2 GI7 G40 GBO
N3 G90 GS4 GOO XO YO S900 N03 (PIVOT POINT)
N4 G43 Zl.0 HOl MOB The first axis of the selected plane
N5 GIG (POLAR ccx)RDmATES ON)
is programmed with the arc radius value.
N6 G99 GSl X6.B YO RO.I Z-O.163 F3.0
m X6.B Y60.0 The second axis of the selected plane
NB Xo.8 Y1.20.0 is programmed as the angular position of the hole.
N9 X6.8 nao.o
NlO X6.8 Y240.0 In a table fannat, all three possibilities are illustrated
Nl1 X6.8 Y300.0
Nl2 GIS (POLAR COORDINATES OFF)
Note, that if no plane is selected in the program, the control
ID3 GBO M09 system defaults to G 17 - the XY plane.
Nl4 G9l G28 ZO MOS
N1.5 G28 XO YO
ID6 M30
G-eode Selected plane First axis Second axis
%
I G17 'I:( X = radius Y = angle
Note that the center of polar coordinates (also called pivot Z = radius
G18 IX X = angle
point) is defmed in block N3 - it is the last X and Ylocation
programmed be/ore the polar command G 16 is cal.led ill G19 YZ Y = radius Z = angle
the program example 02711, the center is at XOYO loca-
tion (block N3) - compare it with program 02710.
Most polar coordinate applications take place in the de-
Both, the radius and angle values, may be programmed in fault XY plane, programmed with the G 17 command.
either absolute mode 090 or incremental mode 091.
If a particular job requires many arc or bolt hole patterns, • Order of Machining
polar coordinate system option will be worthy of purchase, The order in which the holes are machined can be con-
even at the cost of adding it later. If the Fanuc User Macro troned by changing the sign of the angular value, while the
option is installed, macro programs can be created withnut polar coordinate command is in effect. If the angular value
having polar coordinates on the control and offer even is programmed as a positive number, the order of machin-
more programming flexibility. ing will be counterclockwise, based on. the 0° position. By
changing the val.ue to a negative number, the order of ma-
• Plane Selection chining will be clockwise.
Chapter 29, and particularly Chapter 3 J, describe the This feature is quite significant for efficient program-
subject of planes. There are three mathematical planes, ming approach, particularly for a large number of various
used for variety of applications, such as polar coordinates. bolt hole patterns. For example, a center drilling or spot
drilling operation can be programmed very efficiently with
G11 XY plane selection positive angular values (counterclockwise order). The start
will be at the fust hole and, after the tool change, the drill-
GtB ZX plane selection ing can continue in the reverse order, starting with the last
hole. All angular values will now be negative, for the
619 YZ plane selection clockwise order of a subsequent tooL This approach
requires a lot more work in standard programming, ~hen
the polar coordinates are not used. The polar coordinate
Selection of a correct plane is extremely critical to the
application using the G 16 corrunand eliminates al.1 wmec-
proper use of polar coordinates. Always make it a habit to
essary rapid motions, therefore shortening the cycle time.
program the necessary plane, even the default G17 plane.
FACE MILLING

height
milling is a machining operation that controls
machined part. For most applications,
• Selection Criteria
milling is a relatively simple operation, at least in the sense Based on the job to be mill
it usually does not include any difficult "V'lLU'.'" GUller has to Lake into account
cuWng tool used for face milling is typically a Q Condition of the eNC machine
tooth cutter, called a face mill, although end
for certain face milling operations, usu- Q Material oftha part
aUy within smaJl areas. The top surfaces machined with a o Setup method and work holding integrity
mill are generally perpendicular to the of the
cutter. In CNC programming, the face Q Method of mounting
are fairly simple, although two important .... v,'''' .....'''. Q Overall construction of the cutter
are
o Face mill diameter
Q Selection of the cutter diameter
Q Insert geometry
Q Initial starting position of the tool in to
The last two items, cutter geometry,
It to have some experience will influence the actual the most,
milling principles, such as the right cutter although other items are
tion, distribution of cuts, machine power
other technical considerations. • face Min Diameter
ones are covered in this chapter, but
catalogues and various technical ...""F,,,,...,, ... ,,.,,,.
in-depth source.

CUTTER SELECTION a single 2.5 inches


mill as a suitable
all milling operations, employs a cut~ a good formation of
tool that rotates while the stationary. For multiple cuts,
that a material be re- that can be used for

a cut or rigidity, depth and width


milling is so effortless related factors.
not pay sufficient
milling cutter, proper The of face milling is to machine
chine requirements and top of a part to specified height. For this type of
. a mill diameter size, which
A typical face mill is a multi cutter with inter- means to use relatively large diameter face mills. in
changeable carbide inserts. face mills are 2 12 inches (50 to 300 mm) are not unusual,
not recommended for although an HSS end the job.
mill can be a suitable to mill small areas or ar-
eas hard to get to in any other Typical to a face milling m
operation is the fact that not of the milling cutter width
are actually working at same time. Each insert works mill. All tooling ..........u.J.v'F.u•.".,
only within a part of one complete revolution. This obser- mill (5 inches in the ..."' ...... ,,1-"'"''
vation may be an consideration when trying to though body can be found in
establish an optimum a face milling cutter. Face well. The nominal diameter always refers to
milling does power resources from the of the cut. There is no way to tell the actual
machine tool. in the cutter body. it is tool body from the nominal size alone, it
properly mounted. looked up in the tooling catalogue. Normally,
of the cutter body is not needed, except in cases

227
Chapter 28

where the face milling place close to walls or Negative bej'ml~rrv


obstacles. The size of the cutter body may prevent access to
some areas of the part and interfere elsewhere as well. Negative face mills
28- J shows some typical configurations. the insert usually require a machine
and a robust side effects are poor fonuation of
the but not for some kinds of cast irons,
where is hardly any curling during chip for-
mation. Their main benefit is the economy, since
are generally sided, offering up to
for a single inserted in
mill.
Double Negative Geometry

Double negative geometry can only if the ma-


chine sufficient power rating both the cutting tool
and part are finnly within a
iron or certain hard will usually
double negative The chips do have
the to concentrate the machined and
Fjgure 28-1 do not flyaway from ease, possibJy
Nominal diameter of various face mill cutters chip jamming against the or wedging
confined areas. PositiVe/negative
• Insert Geometry this clogging problem.
and ,",pr'",..,.,,,,, tenuino\ogy of ~FI!.:mL'R I Negative Geometry ,
milling cutters to understand tenus m pro-
gramming. Most the tooling companies available Positive / Negative geometry is most beneficial to
catalogues and booklets for the cutters inserts operations where chip clogging could ...."'r·A...''''
they manufacture explain the cutter as well as all This dual offers strength
related terms. in mind that tool technology insert with the 'curling' into
does change rapidly and constant are a spiral shape, This design usually most suitable full
being made. programming chapter, widtb milling.
we look very basic items insert geometry for
face cutters. Always consult specifications the
cutting tool manufacturers compare several products
Insert geometry and insert deciding on the most suitable choice for a particular
is determined by a design I.hal Facc mills and their inserts come literally in hun-
insert in the during a cut. strongly in- and manufacturer claims superiority
fluence quality of the cutting. There are typically three gen-
eral categories. on the cutting rake of the
mill (known as rake angle): CUTTING CONSIDERATIONS
o ;::rtive geometry ... single or double
To program a cutting motion for a face mill, it is impor-
o Negative or double
(ant to understand how a mill works best differ-
o Combination of both ... positive I npn'l'ITI'l.11> ent conditions. example, unless a specially designed
milling cutter insert geometry, shape and
Any variations are too numerous to list, but a are used, try to milling a width that is
short overview offers at least some for further studies, to, or only a larger than, the cutter diameter.
Positive Geometry width face cut may cause the edge to
wear out prematurely chip to 'weld' to the in-
cutters require machining power sert Not only the suffers in form of a wear out, the
cutters, so they may more suitable on CNC surface finish as well. In some more severe
machines usually small ma- cases, the insert may to be discarded In-
chines. They a good creasing the machining cost.
are a choice for machining
cutting load is not too heavy. and undesirable relationship
single therefore less part width during milling.
FACE MILLING 229

Desirable Undesirable A angle of entry (not shown) culter center


coincident with the part Needless to
enters material, a certain force is
angle, cutting
absorb most of the Since insert it is the
of the insert, a positive entry may cause a
un........ ' ..!"."" or at least some insert chipping. Normally,

entry method is not recommended.


Negative of an force
I at the middle, at the strongest point of the insert. is the
~ CI preferred method, as it increases the It is always
a good to keep the mill center within [hepar! area,
28-2
rather away from it. way, the will always
Schematic relationship of the cutter diameter and. the pa.t! width. enter at the preferred negative
Only the cutter size (a) is although not Its posItIOn.
assume a solid part
The illustration shows only relationship of culler dia- mill has to travel over some
meter to the width - it does not suggest the actual cut will intenupted. into and
of culter into the The most exit from part during imenupted cut will cause the cutter
tant consideration programming of a face entry angle to be variable, not constant As many other fac-
the angle the milling cutter enters inlO the tors have to considered in milling, take these rec-
ommendations and suggested only as guide-
• Angle of Entry Always consult a tooling representative on the
mill is by position the method of handling a particular face job,
cutler cenler line to the part [f a part can \ar\y materials that are difficult to
with a single cut, avoid situations where the cutter
center position the part center This neu- • Milling Mode
tral position causes a chatter and poor finish. [he cut- In milling, the prograllUTIed cutting direction, to
ter away from center line, either for a negative cutter table motion direction is always important. In face,
angle, or a cutter entry angle. Figure this so important it is discussed in several sec-
both types angles and their effects. tions of this handbook covers a subject called the
ing mode.
Traditionally, there are three milling mode possibilities
in milling operations;
o milling mode
o Conventional milling mode
NEGATIVE / o Climb milling mode
ENTRY ANGLE .~
A neulral mode is a situation where the cutter
a " lows center line of a or a face, climb milling on one
side and conventionally milling on the side of center
line. conventional mode is also called 'up'
mode and the climb milling is also called 'down'
mode, These are aU correct although the terminol-
may be a little confusing. The terms climb milling and
conventional milling are more often with peripheral
milling than with face milling, although exactly the same
principles do apply for an milling. For most face milling
--bl cuts, the climb milling mode is the best overall vHI... lv'....
In Figure (a) the neutral
Figure 28-3
example (b) shows the so called down cutting
Insert entry angle into the part. W:: width of cut (or climb milling mode) and example shows the so
(a) at the strongest/nsert po.int - ne!!~tive entry angle
(b) at the weakest Insert pomt . positive entry angle called up cutting conventional mode).
o Chapter 28

As an overall general a coarse density cutter is usu-


......-- Programmed ally a suitable choice. more cutting inserts are
direction in material simultaneously, the more power will
required. of the density, it important
to have sufficient cutting - the chips must not
clog the but fly out freely.
At all at least one cutting must be in contact
with the which will prevent heavy cut.
Table the possible damage to the cutter and to [he machine.
direction ....... situation occur jf a face mill diameter is
a
for a narrow part width .
.......... Programmed
direction PROGRAMMING TECHNIQUES
Although defined earlier as a simple operation,
milling can programmed better if some com-
mon sense points are Since milling often
cutting area, it is important to consider care-
Table fully tool path from the start position to
direction ....... position. Here is a list of some points that should evalu-
b ated any face milling operation:
o Always plunge-in to the required depth
away from the part (in the air)
......-- Programmed
direction o If surface finish is important, change the cutter
direction away from the part (in the air)
o the cutter center within part area
for better conditions
Q Typically, select a cutter diameter that is about
1.5 larger than the intended width of cut
Table
direction ....... 28-5 shows a simple plate for
28-4
Face milJing modes:
(a) Neutral milling mode
(b) Climb or 'down'milling mode
(c) Conventional Dr 'up' milling mode
Width of cut

• Number of Cutting Inserts


Depending on the face mill size, the common tool is a {InSUffiCient overlap
multi tooth cutter. A traditional tool called fly-cutter has
usually only a single cutting insert and is not a norrnallool
of choice in CNC. The relationship of number of inserts
in the cutter to cutter diameter is often called
cutter density or cutler pitch.
Width of cut
mills will belong into one of these three cate-
gories, on the cutter density:
o Coarse density · .. coarse pitch of
o Medium density · .. medium pitch of Inserts diameter
b
o Fine density · .. fine pitch of inserts
Figure 28-5
Width of cut in face milling - is the recommended method
FACE MILLING 1

Figure 28-5a illustrates incorrect and Figure XOYO is at lower left comer. To establish
the correct width a face mill cut. In the example (a), lhe position, consider the part length of
cutter is in the part with full causing the cutter (512=2.5) and the (.25). start
friction at cutting and tool The ex- X axis position will be the sum of these values, X7.75. For
ample (b) keeps only 2/3 of the cutter diameter in the Y axis start position the n,vp'f'hi'lnO'<.:
work, which causes a suitable chip as well as fa- on edges and select climb milling (It the same
vorable angle insert entry into the material Actually, the climb milling be combined with a
little of conventional which is quite normal face
• Single face Mill Cut milling operations. Figure shows the cutter start posi-
tion at X7.75Y 1.0, and end position at X-2.75Y 1.0, as
For first face programming example, we will well as the of calculations.
use a 5x3 (1 inch thick) that has to be face milled
along the top to the final thickness of .800.
28-6 shows this simple drawing.

---5.0--~

3.0

5)(3
28·7
5)(3)(1 PLATE Face mill positions for a single face mill cut example
Figure 28-6 The position YLO was based on the desire to have about
Example af a single (ace miff cllt - program 02801 one quarter to one third of the cutter overhang at
part edge, best insert entry angle. 1.5 inch over-
From the drawing is apparent that the face milling will is 30% of cutter diameter, the programmed
place along part, so the X axis horizontal direction position was established at a convenient YI.O.
will be selected. Before the can be started,
are two major decisions to Now, part program for the single milling cut can be
written, with the top as program zero (ZO). Only one
a mill diameter
face cut is used - program example 02801.
a Start and position of the cut
02801
There are important decisions to make, but these (SINGLE FACE MILLING COT)
two are the most N1 G20
N2 Gi? G40 G80
The part i~ only 3 inches wide. so a face mill that is wider NJ G90 G54 GOO X7.75 Yl.O 5344 M03
than 3 inches should be selected. Allhough a inch N'4 G43 Zl.O HOi
mill seems like a natural choice, let's see if it conforms N5 GOl Z-O.2 F50.0 MOS
to the conditions that been established earlier. N6 X-2.?S F21. 0
diameter should be 1.3 to 1.6 larger than the width m GOO Zl. 0 M09
N8 G28 X-2.?S Yl.O Zl.0
cut. In this case, 3 x 1.3 = 3.90 and 3 x !.6 4.80. With a N9 MJO
04.0 mill, that means only I times larger. Coo- %
need for cutter to overlap both of the
;)""I'<A-lIUU of afive face mill diameter is Spindle speed and are based on 450 ftlmin sur-
face speed, .006" per tooth and 8 cutting used only
Once the mill has as Note the Z axis approach in block N4.
trate on the sfart and end positions. reasons,
Although the tool is well above an empty area, rapid
plunging to the depth has to start away from the part, in
motion is split between blocks N4 and N5, for safety rea-
air. The decision to cut along the X axis (horizontally) has sons. With increased confidence, rapid to the directly
been so the is whether from the left to the be an option, if This shows the pro-
or from the right to left. It does not
ZO at the top of the unmachined not the more
except for the direction of chip flow, so selection from [he
customary finished face.
to the left is arbitrary.
232 Chapter 28

• Multiple face Min Cuts


general principles applying to a single cut do ap-
ply equally to multiple face cuts. Since the face mil! dia-
meter is often too small (0 remove aU material in a single
pass on a large material area, several passes must be pro-
grammed at the same
are several cutting for a area to be
milled and may produce good machining
under certain circumstances. The most typical
ods are multiple unidireclion£ll cutting and nwltiple bi-
directional cutting (caJled at the same Z depth. ROUGHING FINISHING
Multiple unidirectional cuts start from the same position
in one bUI the position in the other axis, Bidirectional approach to a face cut
the part. This is a common method mining, it for rough and finish face milling
lacks efficiency, because of frequent rapid return motions.
There is fairly method that cuts only in
Multiple bidirectional cuts, often called cutting, one normally in climb milling This method
are used frequently; they are more efficient then the may of a circular or a spiral motion (along the XY
unidirectional method, but cause the face axes) and is the most recommended method. It combines
milling to the conventional and the two previous methods and is illustrated in Figure 28- 10.
versa. This may work for some jobs, but is not
erally recommended.
In the next two i1Iuslrations, Figure 28-8 scnemati-
cally a unidirectional face milling. Figure show~ a
bidirectional milling.

Figure 28·10
Schematic tool path representation for the climb face milling made,
applied tD a unidirectional cutting
ROUGHING FINISHING
illustration the order and direction of
FigUre28~ viduallooi motions. is to make each cut approxi-
Unidirecti naf approach to a multiple face cut mately same width, only about 213 of diameter
for rough d finish face milling cutting at any time, and always in climb milling mode.
Compare the motions of two methods, In
a tool path difference (cutter position) between
irlg and finiShing is also showli. The directi?n .may
13
10'S
be either the X or the Y pnnclpIes i

~
of the cutting motion will remain the same.
Note the start position (S) nod the end position (E) in the 6
two illustrations. They are indicated by the heavy dot at
center of cutter. Regardless of the cutting method, face
milling cutter is always in a clear position at start and 13 x 6
of cutting, mainly for safety reasons.
Figure 28-11
Example of a multiple face mill cut - program 028D2
FACE MILLING 233

The programming example multiple face milling cuts of the examples could been done in a shorter
is based on the drawing shown in Figure 28-11. The previ- the X resulting in a smaller program. How-
ously discussed are applied should present no purpose of exampJe illustrations, using the Y
difficulty in understanding the program. was more convenient.

02902 USING POSITION COMPENSATION


(MULTIPLE FACE MILLmG CUTS)
Nl, G20
N2 G17 G40 GBO In both previous examples, the starting XY position of
N3 G90 G54 GOO XO.7S Y-2.75 8344 M03 1) the face has calculated, its
N4 G43 Zl.O HOl a suitable To use 0280 I program as an ex-
N5 GOl z-O.2 F50.0 MOa ample, the starting position was X7 .75 Y 1.0. part was
N6 Y'8. 75 F21. 0 (POS 2)
N7 GOO X1.2. 25 (POS 3) 5.0 inches. plus a clearance of plus the inches cutter
N8 GOl Y-2.7S 4) total X7.75 absolute value of cutter center.
N9 GOO X4.0 (POS 5) disadvantage of this is apparent when
NlO GOl YB.7S (POS using a mill that has a different diameter than the one
Nll GOO XS.9 (POS 7 - 0.1 OVERLAP) expected by the A last change of the
Nl2 GOl Y-2.7S (POS 8 - END) mill at the may cause problems. Either there will
Nl3 GOO Zl.O M09 be too much clearance (if the new tool is smaller) or worse
Nl4 G28 XB.7S Y-2.75 Zl.O will be not enough clearance (if tool is larger).
Nl,S M30
%
is another way to solve this problem.
As the title of section the solution is to use
In p'fOgram 02802. aH relevanr blocks are identified with <obsolete' Posirion Compensation feature of the control
too] positions corresponding to the numbers in an earlier system, already described in Chapter It is probably
Figure 28-10,
only application of the position on
width was separated into four equal cut- modern CNC machining centers.
each, which is a little than 2/3 of a
to Figures
cutter. its width of cut. of show that we have to face (with
the part are the same as for the single cut example. cut) a 5>::3 using a 05 inch face mill. In
major deviation from the norm was the motion to position
to the safety rules in machining, the mill has
number 7 in and block Nl] in the program.
in an open area, away from the part. In or-
The last cutting motion is from position 7 to position 8. In mill cutting from part
order to make the surface finish better, the expected cut was
by one quarter inch, the clearance of inches has to
overlapped at X9.0 by .100 to the value of be incorporated with the ofthe face mill, which is
In Figure the schematics 02802 program
inches, to achieve the actual tool starting position for
are shown, including block number references.
milling cutter.
In a milling program, this situation will on one
of the following forms:
o The mill radius is programmed using the actual values
o Position compensation method is used
In the first case, the program 0280 I may be result,
with following content:

02801
(SmGLE FACE MILLING CUT - NO COMPENSATION)
Nl G20
N2 Gl? G40 GBO
N3 G90 G54 GOO X7.75 Yl.O 8344 MO)
N4 G43 Zl. 0 H01
N5 GOl Z-O.2 F50.0 MOe
N6 X-2. 75 F21. 0
05.0 CUTTER N7 GOO Zl. 0 M09
NB G28 X-2.7S Yl.O Zl.O
Figure 28-12 N9 M30
%
Multiple face milling details for program example 02802
234 Chapter 28

Block N3 moves the face mill to the actual, calculated When comparing, note the major differences in N3
start posllion the cut. In block N6, the cut is completed - . (new X value), in block N5 (compensation G46), and
again. at actual previously position. pro- in block N7 (compensation G47). The situation will benefit
gram 02803 using position compensation is similar. but it from some more detailed evaluation.
does some notable
The N3 block contains X position with value of X8.0.
Compare the original 02801 with the new pro- That is the initial position. Since the plan is to apply the
02803, program that uses the position compensation compensation G46 (single contraction), the tool has to be at
a position of a larger value than one expected when
compensation is completed. Therefore, XS.O is an
value. Note that if the G45 compensation command were
the initial position would have to be a smaller
than the one when compensation is
completed. This is because the position compensation is al-
ways relative to the programmed direction.
The N5 block is added to program 02803. It contains the
position compensation G46, which is a single contraction
in programmed direction by the compensation amount
contained in the register of DOl offset. Note that the pro-
grammed coordinate value is which is the total of
the part length (5.0) and the selected (.250).
5 x 3 PLATE
mill radius is totally disregarded in the program. The
28-13 main benefit this method is that, within reason, the
Example of the position con10eJr}sal[lOn as applied to face milling - grammed coordinates will not change, even if the face mill
program 02803 diameter is changed. example, if a 03.5 inch mill
is used. the job can done very nicely, but the starting po-
02803 sition may have to changed. In this case, the stored value
(SINGLE FACE MILI..ING CUT) the DO I offset will 1.75, but N5 will still con-
(USING POSITION C'OlMPllmlAT tain CNC system will do its work.
Nl G20
N2 G17 G40 GSO last block worth a further look is N7. It contai os G47
N3 G90 G54 GOO XS.O Yl.O 8344 MOl position compensation command. The X value is equiva-
N4 G43 Z1.0 HOl lent to the selected clearance of X-0.25. G47 command
N5 G46 XS. 25 DOl means a double elongation-of the offset value along the
N6 GOl Z-O.2 F50.0 MOS programmed direction. is of the
N7 G47 X-O.2S F21.0
need LO compensate at the start of cut, as well as at the end
Ni GOO ZLO M09
N9 G91 a2B XO YO ZO of cut. Also note the initial position the
NlO teO start position cannot the same, no compensa-
% tion will take place. With some ingenuity, the milling
can be programmed very creative]y, using a rather obsolete
programming feature.
CIRCULAR INTERPOLATION

applications. there
related 10 contouring. / - CENTER
the other
chapler. QUADRANT
along POINT
a tool path
contouring is called
in proftling on
/
and centers, as well as
and many olher such as simple
machines, routers, and laser pro-
filers, wire EDM, and others.
Circular inlel polalion is used
complete circles ill such applications as RADIUS
radii (blend and parlia}), circular IJV'~"'''''~ CI"\n"r1r'~ Or conI-
cal shapes, radial recesses, corner helical figure 29·1
even large counterbores, etc. The Basic elements DI a circle
terpolale a defined arc wilh a very
information is given in
• Radius
MENTS OF A CIRCLE In the simplest .~u,~"'_~, terms, a circle is defined by
ils c:enfer point and its os. Two of the most important
understand the principles of programming various cir- elements of a circle in part programming are Ihe
motions, it helps to know something about basic radius and the
entity known as the As an that is
common in everyday life, a circle various proper-
that are slrletly mathematical. only considered in
disciplines, such as Computerized
mol ion control and aUlomation.
following definition ora circle and
that are related (0 a circle arc based on some com-
mon dictionary definitions - Figure 29· 1. center point location circle is also important
CNC programming. of the word radius
is radii, although the word 'has been accepled as
a colloquial term. In programming, radii and dia-
meters are used all the on a daily basis for aJmost all
contouring machines. in machine shops use
similar definitions of a circle that can radius and diameter dimensions a lot, with an almost un-
and mathematical books. The limited number of possible
a circle and its various properties as
handbook, provides a sufficienl knowledge Radii and diameters are also
programming. Additional will tool insert designation, they are
for some specialized or complex gauging (inspections), as well as in
appl At this time, become at leasl tions and various auxiliary programming. the
miliar with the geometrical and trigonometric actual application of an arc or is not important, only
for arcs and circles. its mathematical ,..1'"I'::IT<:I,..tp·rl

235
236 Chapter 29

• Circle Area and Circumference Also worth mentioning is a mirrored tool path and its re-
The area of a circle is defined by this formula: lationship to the quadrants. Although it is not a subject of
Ihe current chapter, mirroring and quadrants must be con-
sidered together. What happens to the tool path when it is
mirrored is determined by the quadranl where the mirrored
tool palh is posilioned. rn the Chapter 41 are more details
~ where ... abom mirror image as a programming subject. For now, it
should be adequate to cover a very brief overview only_
A := Area of the circle
R = The circle radius For example, if a programmed tool path in Quadrant I is
1t = ((lnstant (31415927) mirrored [0 Quadrants II or IV, the cutting method will be
reversed. That meanS a climb milling will become conven-
The circumference of a circle is the length of a circle if it tional milling and vice versa. The same rule applies to a
were a sU"aight line: programmed tool path ill Quadram II as it relates to Quad-
mnts 1 and III. ThIS IS a very important consideration ror
many materials used in CNC machining, because climb
milling in Quadrant! will turn into conventional milling in
Quadmnts II and IV - a situation that is not always desir-
1.& where ... able. Similar changes will occur for other quadrants.
C Circumference of the circle • Quadrant Points
o The circle diameter
7L Constant (3.1415927) From [he earlier definition should be clear (hat quadrants
It is important 10 note that both the area and circumfer-
consist of two perpendicular lines that converge at the arc
center poi nt and an arc that is exactly one quarter of a circle
ence of a circle (its actual length) are seldom used in CNC
circumference. In order to understand the subject deeper,
programming, although understanding their concepts pres-
draw a line from the center of an arc thai is paraHelto one of
ents a rather useful knowledge.
the axes and is longer than the arc radius. The line created
an intersection point between the line and the arc. This
QUADRANTS point has a special significance in programming. It is often
known as the QuadraJlt Point - or the CQldinal Point - al-
A quadrant is a major properly or a circle and can be de- though the lauer term is not used too oftcn, except in math-
fined mathematically: ematical terminology. There are four quadrant points on a
given circle, or four intersections of the circle with its axes.
A quadrant is anyone of the four parts of the plane The quadrant points locations can be remembered easier by
formed by the system of rectangular coordinates. associating them with the dial of a compass or a standard
watch with an analog dial:
It is 10 every programmer's benefit to understand the con-
cept of quadrants and their applications for circular mo- Compass Watch located
tions In milling and turning programs. Degrees
direction direction between quadrants
A circle is programmed in all four quadrants, due to its
0 EAST 3 o'clock IV and I
nature, while most arcs are programmed within one or two
quadrants. When programming the arc vectors I, J and K
90 NORTH 12 o'clock I and II
(described later), the angular difference between the arc
start and end points is irrelevant. The only purpose of arc 180 WEST 9 o'clock II and III
vectors is to den ne a unique arc radius between two poi nts.
For many arc programming projects, the direct radius can 270 SOUTH 6 o'clock III and IV
be used wi lh the R address, avai lable for majority of control
systems. In this case, the angular difference between the At this point of learning, it may be a good idea to refresh
start and end pOints is vcry important, because the com- some fermI) of rhe ~ngle direction c1efinition The eSf("lb-
puter will do its own calculations to find the arc center. The lished industry standard (mathematics, as well as CAD,
arc with the angular di ffcrenee of 1800 or less, measured CAM and CNC) defines an absolute angular value as being
between the start ;:md end points, uses an R positive value. positive in the counterclockwise direction and always starl-
The arc in which the angular difference is more than 180°, ing from zero degrees. From the above table, zero degrees
uses an R negative value. There ru-e two possible choices correspond to the East direction or three n 'e/()rk position of
and the radius value alone cannot define a unique arc. an analog clock - Figure 29-2.
CIRCULAR INTERPOLATION 237

POSITIVE DIRECTION

/
I

1 • Circular Interpolation Block

ANGLE There afC two preparatory commands


programming an arc direction:

G02 Circul<Jr motion clockwise


DIRECTION
G03 Circulm mOlion counterclockwise

MatheJ7Iatlcal rU>1Jmlll1n 01 the arc direction Both the G02 and G03 commands are modal.
they remain In effect unLilthe end of program or until can-
quadrant poinls arc im· celed by another command from the same G
In some cases, the quadrant usually by another mOlion command.
,even If the cIrcular
is is particularly lrue The preparatory commands G02 and are
where crossing the quad- words used in programming 10 establish circular
modern controls tion mode. The coordinate words following
block, wilh command are always designated within a
The plane is normally based on the available axes
lions ofXY, ZX and YZ for milling or applications.
Normally, (here is no plane selection on a lathe, ahhough
PROGRAMMING FORMAT some conLfol indicate it as G 18. (he ZX

The progrnmming format The plane selection and the combination of circular mo-
1001
(he tion and the arc cutting direclion determine the
path must i ncl ude
lask of cUlling an arc arc end point, and the R value specil'ies !hearc radius. Spe-
parameters are defined as: cial arc center modifiers (known as vectors) are also avail-
if programmer requires (hem.
o Arc cutting direction (CW or CCW)
Wilen Iht! or G03 command is aclivaled by a CNC
o Arc start and end points any active 1001 motion command is au-
o Arc center and radius value tomalically canceled. 111is canceling mOlion is Lypically
GOO, Gal or a cycle command, All circular 1001 path mo-
The cutting must must programmed with a cUlling feedrate in dlecl,
more detaillaler in this applying the same basic rules as for linear interpolation.
used for circular molion . . . rr"'rr'........ "Y'I That means the fcedrale F must be programmed before or
ramelers related to the the cUlling mOlion block, Jf (he feedrate is not speci-
in the circular motion block, the control system will
• Arc Cutting Direction aUlomatically look for the last programmed feed rate. If
in effecl al all. many controls usually rc-
A cutting 1001 may move turn an en'or (an alarm) to lhat effect. The feed rate
clockwise (CW) or tIed in one of two ways. Either directly, wilhin
lenns are assigned by convemion. block only or indirectly, by assuming Ihc lasl
mol ion direction is determined hy motion in a rapid mode is not pos-
at the plane in which the circular mOlion not possible is Ii simultaneous three axes circu-
The motion from [he plane venical lar molion. more details on this subject, look up Chap-
horizontal axis is clockwise, reverse is counter- ler helical mil
clockwise. This convention has rnalltematical
docs not always malch the machine axes On majority of older conlrols, direct radius address R
IeI' 31 describes machining in planes, this specified and the arc center vectors I, J and K
take a brief look mllSI
238 Chapter
_ 29
... _....................................................................... ...

G02 x .. Y .. I.. J .. Milling program - cw In Ihe example, block N66 represents the end of a con-
G02 X .. Z .. 1.. K .. Turning program - cw tour, such as a linear motion. It also represents (he start of
G03 X •. Y .. I.. J .. Milling program - CCW the arc that follows next. III the following block N67, the
G03 X .. z .. I.. K .. Turning program - CCW arc IS machined, so Ihe coordinales represent the end of arc
and slart point of the next elemen!. The last block of the ex-
Control systems supporling the arc radius designation by
address R will also accepllhe UK modifiers, bUi the reverse nmple is N68 and represents the end point of (he elemcnt
is not (rue. If bOlh the arc modi fiers UK and the fad ius Rare Ihat starred from the arc. The end point of the arc is the co-
programmed in the same block, the radius value takes pri- ordinate point of any two axes, where the circular mOlion
ority, regardless of the order: ends. This point is sometimes called the target position.

G02 (GO)) x.. J ..


Y .• R.o r .. • Arc Center and Radius
G02 (G03) x" Y .. I .. J .. R ..
The. radius of an arc can be designated with the address R
The controls [hat accept only the modifiers UK will re- or with arc center vectors r, J and K. The R address allows
Lurn an error message in case Ihe circular interpolation programming the arc radius directly, the lJK arc center
block contains the R address (an unknown address). vectors are used to actually define the physical (actual) arc
center position. Most modem control systems support the
• Arc Start and End Points R address input, older conlrols require {he arc center vec-
to.rs only. The basic programming format will vary only
The Slar! poim of an arc is the point where circular inter- slightly between the milling and turning systems, particu-
polalion begins, as determined by the cUlling direction. larly for the R address version:
This poinl must be located on the arc and it can be a tan-
gency point or an Intersection, resulting in a blend radius or G02 x .. Y .. R •• Milling program - CW
a partial radius respectIvely. The instruclion contained in G02 x.. Z .. R .• Turning program - cw
the start roint block is sometimes called the departure G03 X .. Y .. R •• Milling program - CCW
command - Figure 29-3.
G03 X.. Z .. R •. Turning program - CCW
Why is [he arc center location or the arc radius needed at
CENTER START ,CENTER START all? It would seem that (he end pain! of an arc programmed

j,
POINT POINT I POINT POINT in combination with a circular interpolation mode should
CCW=+ be sufficient. This is never true. Always keep in mind lha!
numerical cOlltrol means control of the LOol path by nUn/-
ben', In this case, there is an infinite number of mathemati-
cal possibilities and all are corresponding to this incom-
plete definition. There is virtually an unlimited number of
~ ~
' .\.,
.-.::'-,- ---.-.-,
- R -, ' -
--1- arc radii thal will fit between the programmed stan and end
poinl~ ;mil ~till milinlrlin the cutting direction.

-.- 1- ~ K- - Another important concept to understand is that the CUl-


ling direction CW or CCW has nothing to do with the arc
USED IN TURNING center or the radius. The control system needs more infor-
USED IN MILLING
mation than direction and target point in order to cut the de-
Figure 29·3 sired arc. This additional information must contain a defi-
Center point and start point of an arc nition thaI defines a programmed arc with a unique radius.

The arc start poilU is always relative to the cU!ling motion This unique radius is achieved by programming the R ad-
direction and is represented in the program by coordinates dress for the direct radius input, or using (he UK arc center
in the block preceding the circular molion. In terms of a vectors. Address R is the actual mdius of the tool path, usu-
definition, ally the radius taken from the part drawing.

The start point of an arc is the last position of the cutting • Arc Center Vectors
tool before the circular interpolation command,
Figure 29-4 shows the signs of arc vectors I and J in all
possible orientations. In different planes, different pairs of
Here is an example: vectors are used, but the logic of their usage remains ex·
actly the same.
N66 GOI XS.75 Y7.S
N67 G03 XII.. 625 Y8. 625 R1.l25 Arc vectors 1. J and K are used according to the folloWlll l1
N68 GOl X .. Y .. definitions (only I and J are shown in the illustration): e
CIRCULAR INTERPOLATION 239

G02 G03

Quadrant

Quadrant
II
1+ JO 1+ J- 1+
T
/
/
Quadrant
III
J+ 1+ J+

Quadrant
IV D 1- J+ 10 1- J+
29·4
Arc vectors I and J (also known as arc modifiers) and designation in different quadrants (XY plane!

error. io those
cases where both in the shop.
There is JlO using absolute
and arc center.
specified direction applies only to the incremental
of arc center. It is the of relative posi·
tion oflhe arc center from the starl point, programmed with
Arc center vector K is the with "n" ... ili"rl a directional sign - absence of the assumes a
measured the start point or the arc, positive direction, minus direction
to the center of the arc, parallel to the Z axis. and must always be written. Arcs center de·
finition follow standard
(he start point of lhe arc and the
arc (as specified by the DK vectors) is • Arc in Planes
most as an incremenlal distance machining centers,
the two points. control systems. for example many the three geometrical planes
Cincinllati use the absolute designation to correct arc vectors must be
an arc center. cases, the arc center is programmed
as an absolute value from the program zero, no! from G17 G02 (G03) x .. Y •• R •. I .. J .. )
arc center. sure how each of the cOnlrol G18 G02 (G03) X •• z .. R •• (or 1.. K •• )
terns in the shop handles these situations. G19 G02 (G03) Y •• Z •• R •. J .. K .. )

in this respect creates a major


format, so be careful 10 avoid a
o Chapter 29

E G18 - ZX PLANE G19 - YZ PLANE


y x z

~------------~X z y

29-5
Arc direction in three planes - the orientation of the axes is based on mathematical, not machinc, plancs

plane is no! aligned with the The simplest form of a blend radius is
axes used mlhe program a(e pendicular lines that are parallelw (he
[he circular molion will orthe start and end points only a
rn,-n'T\f' to the axis selection ill the program. I ions or subtraclions More complex cl'llcul/'llion is
modal motion is omiued. The when even one line is al an angle. In this case,
Ihis potentially harmful problem is to follow a functions are used to calculate the staft or point,
or both. Similar calculations are required for blends be-
tween other entities as well. A blend arc is known as a
In nonstandard planes. (he circular program arc or afillet radius.
always contain specifications for both a..'(es, as
arc vectors or the R value. Such a block is • Partial Radius
will always be executed on the of axes
priority_ This mediod is preferable to the The opposite of a blend arc is a
vious!y defined plane. Even if the plane smooth blend between two conlour
correct, the resulting tool motion will

RADIUS PROGRAMMING
an arc,
11 '" I', n ".,-1 as a ra-
Progrrunming arc is very common. point is not tan-
is only a porlioll. of a circle and are il in two
gram an arc. If the arc is 360°, it must for the arc start
the start position bei the same as end position. a blend are, de-
In case, a full circle is Ihe resu 1t.1f only a portion of the had used in
only 11 Two
III

o Blend radius FUll CIRCLE PROGRAMMING


o Partial radius
All Fanue and many controls support a full
Each radius may be nrr\OrMTIrrlJ'·rI circle programming. Full circle is an arc machined along
rection and each may 360°. Full circle is on the Jathes in theory
any orientation that the culti only, since the not allow it. For the mill-
full is fairly rouli ne and is re-
• Blend Radius as:
A point of tangency between an arc and adjacent ele- o Circular
ment creates a blend radius. Blend radius is defined as a ra-
o Spotface milling
dius tangent between a line em arc, an arc and a line, or
between two arcs. A blend arc creates a smooth transition o Helical milling (with linear
between one conlour element and another. point of tan-
o Milling a cylinder, or cone
gency is the only contact point between the two elements.
CIRCULAR INTERPOLATION 1

A full circle cutling is defined as a tool motion GOl Z 0.25 FlO.O


completes 3600 between the start end points. re- G02 X2.0 YO 7S 1-1.25 JO F12 0 (BLOCK 1 OF 4)
sulting in identlcal coordinates for the start and end tool po- G02 XO.7S Y2.0 IO Jl.25 (BLOCK 2 OF 4)
G02 X2.0 YJ.25 11.25 JO 3 OF 4)
s)([ons. This a typical application one program-
G02 X3.25 Y2.0 IO J-l.2S (BLOCK 4. OF 4.)
Inl of a full circle - Figure 29-6, GOO ZO.l

a four block programmi thaI COV-


cutli The arc start and end pOints are
/
"\ located al a quadrant poinl of the axis line, which is an
\ \ \
pol1anl programming consideration. The quadrant
the example is to 3 o'clock position (0°),
thaI (he G02 is block only for the
to be repealed in a
program. to the occurrences of 10
Ihey do not they change.
more difficult by establishing the
starting position cut from any of the four
--2.00 - rant points, are at , 1800 and 270". For exam-
ple, if the , there will be five circular
29-8 blocks, notfour, coordinates of the start poml of
entry
the arc (shown asxs ys willhavetobecalcu-
Full circle programming using one block I1rl1f1rrnm
lated using trigonometric functions - Figure 29-8:

G90 GS4 GOO X3.25 Y2.0 S800 MQ3 xs


GOl Z-O 25 F10.0 START
G02 X3.2S Y2.0 1-1.25 JO F12.0 (FULL CIRCLE) POINT
GOO ZO.1

controls do nut allow a circular I 1"1 fj>rl"l," I


more than one quadrant per block. In this case,
to be divided among four or even
on the srarting tool position. Using the
the resulting program wlll be a "- -- R1.25
same resuiL') - Figu.re

I,--2.00-~•

'. 29-8
Full circle programming using five blocks code

I G90 GS4 GOO X3.04B3 Y2.6808 SBOO MO)


I G01 Z-O.25 FlO.O
2.00 G02 X3_25 Y2.0 I-1.0483 J-O.6808 1 OF 5)
I R1 G02 X2.0 YO.7S I-1.25 JO 2 OF
J_ G02 XO.75 Y2.0 IO Jl.25 3 OF 5)
G02 X2.0 YJ.2S I1.25 JO 4 OF 5)
G02 X3.04S3 Y2.680B IO J-l.25 (BLOCK 5 OF 5)
GOO ZO.l

Figure 29·7 Values x~ and y, were calcu lated by the


Full circle nJ'f'lI,,::.n'fflUII'I four blocks of program entry functions:

G90 G54 GOO X3.25 Y2.0 seoo M03 ~ 1.25 x cos33 1.0483382
Ys = 1.25 x sin33 = .6807988
242 29

From the resuits, [he start poinl of the cut can be found: • Boss Milling

X3.0483
As an example of a full circle a
X=2+Xs '" 3.0483382
Y = 2 + Ys 2.6807988 Y2.6808 be used, as illustrated in Figure

If the control o
in one block,
quire the I 01.812
CilflnOI

G90 G54 GOO X3.0483 Y2.6808 S800 M03


GOl Z-O.2S F9.0 TOP
G02 X3.0483 Y2.6808 1-1.0483 J-0.680a
GOO ZO.l

J cannot be arbitrarily replaced with


"ri,-I""'M R. next example is tlot correci'
L ~",

'lIIj
····1
G90 G54 GOO X3.0483 Y2.680B 5800 M03 ,- I
GOl Z-O.2S F9.0
G02 X3.0483 Y2.6808 Rl. 25 F12. 0 (* WRONG *)
GOO ZO.l . FRONT
I

. Mathematically, lhere are many options for a 29-10


full programming. If an R value is programmed for a
Boss milling eXiJ~mf)"e lor program 02901
360 0 arc, no circular motion will take place and slich a
block will be ignored by (he conlrol. This is a precaution are terms used for external milling
built into {he control software, to prevent from cutting an is an milling of a full
incorrect arc because of the many existing possibilities. In The cutler used will be
j/VI.-Fl. •• l.
29-9, only a handful of the possible ares is shown. at deplh:
The circles );hare the same cutting direction, start point. end
poinl, and radius. They do nOT share center points. 02901
(0.75 DIA END MILL)
N1 G20
N2 G17 G40 GSO
Common N3 G90 G54 GOO X-l.O Yl.S S750 M03
radius and N4 G43 ZO.l HOI
motion direction
NS GOl Z-O.37S F40.0 MOS
N6 G4l YO.906 DOl F20.0
N7 XO F14.0
N8 G02 J-O.906
Common N9 GOl Xl.O F20.0 M09
-- start and NlO G40 Yl.5 F40.0 MOS
end point N11 G91 G28 XO YO Z2.0
Nl2 M30
%

In program 0290 I, the tool moves first to the


./
lion and depth, then the CUller radius
When reaching the cutting depth, the tool a
climb milling motion to the top of boss. Then it
around the circle to the same point moved away
Figure 29-g by revcrsing the initial motions, it returned to its Y
Manv mathematical possibilities exist lor a lull circle withR start poi nt - Figure 29- JJ shows Ihe block numbers.
CIRCULAR INTERPOLATION 243

N8 GOl G40 XO F20.0 M09


N2 N9 N9 G9l G28 XO YO Z2.0 MaS
mo M30
%
N5 N8
Program 02902 shows both arc start
point at 90'" programmed at ] 2 0' clock position.
radius offset started during the motion from arc center.

A cutter radius offset cannot start or end in a circular mode.

This is true for almost any circular application,


N7 very few that use a special cycle.

Figure 29-11 • Internal Circle Cutting ~ Circular Start


Boss miJling example - tool motions for program 02901
simple linear approach programming me:thcfd
Alternate applications may include multiple last example will not be practical when smooth blend
1."""""''', a semifmishing pass, wo cutting l.vJeen the approach and the circular cut is required.
related to machining. prove the surface finish, the start position of ,-",-".I..u,:u
tion can be reached on an arc. The usual startup is
• Internal Circle Cutting - linear Start ftrst at a 45° linear motion, to apply cutter
then on an arc that blends with the full
.LU""'Ll'Q' full circle cutting is common and has many 29-13 illustrates the principle and
such as circular pockets or counterbores. In an the complete program.
~"'''''U1J'~, a 01.25 circular cavity is to be machined to
.250 inch, 3n program 02902. A simple mo-
tion will used for the startup. where the entry point blend
The cutting tool is a center """'.,"'"
as a slot drill) - Figure 29-12:

Figure 29·13
Internal circle cutting linear and approach
02903
(0 . 5 DIA CEN"l'ER END
29·12 Nl G20
Internal circle cutting - linear approach only N2 G17 G40 GSO
N3 G90 G54 GOO XO YO 9900 M03
02902 N4 G43 ZO.l HOI
(0 . 5 DIA CENTER END MILL) NS GOI Z-O.2S FlO.O MOS
m G20 N6 G41 XO.3125 YO.3125 001 F12.0
N2 G17 G40 GBO N7 GO) XO YO.62S RO.3l2S
N3 G90 G54 GOO XO YO 8900 M03 NB J-O.625
N4 G43 ZO.l HOl N9 X-O.3l2S YO.3l2S RO.3125
N5 GOl Z-O.25 F10.O MOB NlO GOI G40 XO YO F20.0 M09
N6 G4l YO.625 DOl F12.0 Nll G9l G28 XO YO Z2.0 MOS
N7 GO) J-O .625 Nl2 M30
%
244 Chapter

method is slightly What is not true in circular application, is true


quality with a circular approach in this situation. In normal programming of arcs
than with the linear approach. cles, a cutter radius cannot start in an arc tool mr,nr,n
In Gl 13 mode, the start molion from
If a control systems has the User Macro option and many center position is circular to
circular are required, the 02903 could compensated start on the arc circumference.
uu."JJ"'V to a macro. Some
all built into the control and [here no choice is offered.
cycle built-in. sider this situation as a special case, definitely nol as a

• Circle Cutting Cycle On some CNC models, there is an additional


rarne!er In the, G I 13 format - the rad illS
controls, for example some This indicates special
but not Fanuc, have a built-in routine to reduce air cutting lime.
circle using special preparatory
G 12 and G 13. These cycles are very rnn,\lpn 13 progranuning.
ming aid and to the surprise of many 29-14, will
dropped this feature many years
IS a logical relationship between G02 and G ]2, as
as between G03 and G 13:

Full circle cuning cw


Full circle cutting ccw 12

A typical programming lhese two spe-


I
cial commands is quite simple: r:r-----t---t"'J - - L
0.25
G12 I .. D .. F .. Full circle CW
G13 I .. D .. F .• Full circle CCW
13
is the radius of
as an incremental value
(plus sign is assumed), the Full circle cutting using 612/613 • program 02904
start , wh icn is equivalentto the
3 or If the sign is negative, 02904
the start pomt of the cuI at 1800 position. which is (0 . 5 DTh CENTER CTJT'I'ING END
equivalent 10 the 9 direction N1 G20
N2 G17 G40 GSO
command cannot be Y direction.
N3 G90 G54 GOO XO YO 8900 M03
PrograrHJIlt;U D is ule co 11 trol register number N4 043 ZO.l HOl
NS GOl Z-O.25 Fl0.0 MOB
the cutter radius offset F is address. N6 G13 IO.62S DOl F12.0 M09 AVAILABLE)
are alternate versions of this on some controls, but N7 G91 G28 XO YO Z2.0 MOS
very similar in nature. N8 M30
%
be (lcceptecl for successful us-
The cutting tool must The program is only two but it is
a circular pocket, the simpler to develop. The cutter offset IS automatic
plane and (he arc starting (built-in) and the editing at is much easier.
al 0 0 or J80" (Y axis start is also an additional since the start point on
is nol possible). a cutter radius circle is not a result of a line, but a lead-in arc,
(G 12 to Uie right, G 13 to the left). Never program the com- finish quality will than using olher
mands G41 and using G 12 or G 13 command. If types of tool approach. This is a method when
the culler IS In it will be overridden the se- the machined surface quality is impol1ant. There is also a
leclion orGI2 orGl3. approach is to built-in lead-out arc in the [0 (he lead-in arc,
these two mode (CUller radius Ihal is effective when the is completed.
cded) al all
CIRCULAR INTERPOLATION 245

ARC PROGRAMMING ./
/

With a full arc cutting, which means the complete 360°


Start point / - R+
motion, the R address cannot be used at all. The arc center I "
j
vectors I and J have to be applied, even on latest controls. ./

End point
What if the circle is 359.999°? Well, at first, circle must \ I

have 360°, therefore the word 'circle' is Incorrect. Even i.l - - CONTOUR
small difference of 0.00 I ° does make a difference between
a circle and an arc. Although this difference IS much more
important mathematically than for practical programming,
the distinction is very important. In circular interpolation Start point
terms, an incomplete circle is nothing more than an arc. ./
Look at this arc a little differently. If a 90° arc is made, Ihe j

R address can be programmed. for example:

GOl X2.0 YS.25 F12.0 .// _ .._- CONTOUR


G02 X3.75 Y7.0 Rl.7S

If an arc that covers exactly 1800 is programmed, {he pro- Figure 29-15
gram will no! he much different: Sign of R address for circular cutting - onlv the center is different

GOl X2.0 YS.25 F12.0


G02 XS.5 YS.25 Rl.75
The following example is identical [Q the previous onc,
except for the R address sign.
Note that the Y coordinate is the same for the arc start and
end position. The Y value In the circular motion block does G01 X10.5 Y8.625 F17.0
G02 X13.125 Y6.0 R-2.625 (270 DEGREES)
not have to be repeated, it is used here only for illustration.
Another example shows programming an arc of 270", If frequently programming arcs that cover more than
still using the R address. Are the following blocks correct? 180°, establish a particular programming style. If the style
is well thought out, it will avoid the costly mistakes associ-
GOl X10.5 Y8_625 F17.0 ated with the R address sign error.
G02 X13.12S Y6.0 R2.625
FEEDRATE fOR CIRCULAR MOTION
The blocks appear to be correct The calculations, Ihe for-
mat, individual words. they all appear to be right. Yel, Ihe
program is wrong.! Its result Will be a 90° arc, not 270 0 . In most programs, the feedrate for circular interpolation
is determined the same way as feedrale for linear inlerpola-
Study the illustration in Figure 29-} 5. It shows that there lion. The cutting feed rate for arcs is based on established
is not just one, but fHiO mathemaUcal possibilities when the machining conventions. 'TIley include the work setup, ma-
R address is used for arcs. The solid contour is the tool path, terial machinabi1!ty, (001 diameter and its rigidity, program-
the dashes identify the two possible radii. mer's expenence and other factor·s.
Programmers do not normally think of these mathemati- Many programmers do not consider the machined radius
cal alternatives, unlil they program arcs larger than ISO" when seiecring the cutting feedrate for the tool. Yet, If the
(or scrap a part). This is a similar situation to U1at of a full machined surface finish quality is really important, always
circle, described earlier. Although (he I and J vectors can be consider the size of every radius specified in the parr draw-
used to relnedy the problem, a different remedy may be a ing. Perhaps the same feedrate for linear and circular mo-
preferred choice. The R address can still be used in Ihe pro- tions programmed so far may have to be adjusted - either
gram, but with a negative sign for any arc thal is greater upward or downward.
than 180°. For arcs smaller than ]80 0 , the usual posili ve R
radius remains in effect. Recall from some earlier explana- In lathe programming, there is no reason \0 distinguish
lions lhal if there is no sign with the R word (or any other between linear and circular lool motions, regardless of the
word), lhe word assumes a positive value. Compare the two radius size. The tool nose radius is usually small, only aver-
programming examples: aging .0313 inches (or 0.8 mm) and the equidistant tool
path IS close to the programmed tool path, taken from a
GOI XlO.5 Y8.625 F17.Q drawing. This is not the case for milling contour program-
G02 X13.12S Y6.0 R2.625 (90 DEGREES) ming, where large tool radii are normal and common.
Chapter 29

The arc feedrale is nol required in Two formulas provide to find the adjusted arc
gram. If cutler center tool path is close LO feedrate, to the linear
1 contour, no adjustment is needed. On the band, Both formulas are recommended for external or
when a diameter cutter is used to contour a small out- contouring only, nOT rough machining of solid material.
radius, a problem that affects the finish may
occur. this case, the tool center path a much • Feedrate Outside Arcs
arc one in the drawing. In a
is used For outside arcs, ,ildjusled feed rate will be higher than
shorter the linear calculated from Ihis formula:

In normal programming, the


arcs as well. as determined by
material. The formula for

~ where ...

F0 Feedrate for outside arc


iii? where ... FI == Lineadeedrate
A radius on the part
FI linear feedrate ormm/min) radius
r/min Spindle speed
F! = Feedrate per tooth on linear feed rate of J 4 in/ml n, an
n Number of cutting requires an upward adjustment a
A linear feedrate for 1000 .0045 initooth load and Fe = 14 X (.375 + .25) / .375 = 23.333333
(WO culling edges, the r"""',.., ....,'" is 9 Using a rela-
tively large cutrer diameter, (\5.875 mm) or is a major incre<ls!!, to in lhe program,
larger, the linear feedrate or down for circu- r\n',Hl~'r the same example with ,75 cutter (01.5):
motion may be 11:........."""': good finish.
The elementary rule of adjustmenl for arcs is that 14 x (0.375 + 0.75) / 0.315 42.0
the normally programmed is increased for TPPflrnlt" changed from 14 inimin - D 3
outside arcs and decreased for inside arcs· Figure 29- 16. If1crease. use prevIOus to determine
adjustment is justified or not.
CUTTER
• Feedrate for inside Arcs
arcs, the adjusted will lower than
feed rate, calculated from formula:

/
/

F; "" Feedrate for arc

DECREASED - - . -
FEEDRATE
Figure 29·16
''''
NORMAL~
FEEDRATE
"
F,
R 0::
linear feed rate
Inside radius on the
Cutter radius

Based on lhe Jinear feed rate 14 in/min, the feed rate for
inch inside radius with I must be ad-
Feedrate adlil/stlTlel1lts for circular tool motion downward:

Fi '" 14 x (.8243 - / .8243 = 3.384932

The result is a feedrate inimin, In the program,


will be Ihe applied fPpnrllfP F address.
CUTTER RADIUS OFFSET

known as a profile IS nOf- MANUAL CALCULATIONS


milling applications by establishing
then movmg the cutting tool in- Some realities should ,",/Or'nIT''''
X Y or both axes simulta- 30- J, The most noticeable nm"~r'J"
applications, either (he X axis or the Z contour must always take
axes can be used 10 turn or bore a con- sated by its radius, which means
of contour elemenl cated in positions shown in the ma-
one block of culling molion. These mo- chining requirement is not by the ity of the
pomts can be programmed drawing. a all dimensions to
in or they can use an absolute value the part contour, no! the contour tool cenler. In fact,
position or an incremental distance. In either case, keep in the drawing is to tool positions illustrated
uses the cemer line of in the upper The question is -
or X tool movements. AI- how do the tool center uv;,,,,,,,. from a drawing 10 the
programming is a very convenient part contour'?
development, it is also a method \.Jnac-
comact with rhe material, Actually, lhey
the cutting tool must touch the programmed is equipped with an
not its cen.ter line. cutler radius compen-
turning systems,
path for all contounng operations is always compensalion or
to the tool molion. Whether used on a
and common
machintn center or on a CNC lathe, the cutfing rool
lY
to apply the offsel
'" .
must always be tangent TO The conlOw; which means
drawing dimen-
the tool motion has to create a path where the cemer poinl (he necessary calculations
of the cutter is always at the same distance from the con-
tour of lhe part. This is called the equidistant tool path.
The illustration in Figure 30-1 shows two types of a tool
palh, Que is Iwi compensaled, the other is compensated.
Both are applied [0 a particular conlour, wiLh the culler dia~
meter shown as well, including its positions.

,I - CUTTER 0 (TYP) to aULOmate something, we have to


\'~ how it works, If something is aulomated already. the
knowledge of how it works makes the job so much
I ..... Tool path with particularly when encountering a difficulty that has to
.,... NO OFFSET resolved very quickly. To really understand cuuer
J.,.:..------~_) offset - many programmers and machine operators
it is important to understand the principles built in the
nol

PART PROFI tern, principles thal are very much based on basic mathe-
matical calculations, including the often unpopular
nomclry calculations. A very simple drawing is shown in
30-2 for that purpose.
program zero will he selected at the lower left corner
of Ihe parl. Since lhe culling will be external, in a climb
milling mode, the tool will start along the Y direction
At moment, the start and end 1001 position is not impor-
Figure 30·1 tanL only calculations of [he individual contour points at
Tool path not compensated (above) and CDfnp8'nSI!Jil(;:a and tangency points.
by the cutter radius

7
248 Chapter 30

All five points can be summed up in a small table:

Point No. X coordinate Ycoordinate


I
i''''''''· """"

-, t Pl XO YO
P2 XO Yl.125
1.125
I P3 X2.25 Y1.8561
J '''-...-RO.625 P4 X2.25 YO.625
2.25
P5 X1.625 YO

Figure 30-2 Once all the coordinates are completed, [here is enough
Semple drawing for manual calculations {examples) dala to start the tool path, but only if the cutter radius offset
feature is used. However, lilal is not the intention at the mo-
Note that there arc. five points on the drawing, one LIt each ment. To illustrate, a whole /lew set of points has 10 be
contour change. These points are either intersections or found - coordinates for the center of the clIlter.'
points of tangency. As eaeh point has two coordinates, lolal
of ten values will be required, • Tool Path Center Points
The drawing always offers some points thaI need no cal- The cutting lool for milling is always round. An end mill,
culations. fl is a good idea 10 gel well organized and mark for example, has a diameter of a certain size. Even tools
the points from the drawing first Then, make a chart in the used for turning and boring have a round end (called the
order of tool path. Study Figure 30-3 carefully - it shows all 1001 nose radius), even if it is relatively small. Of course.
five points and all the values thaI need no calculation, per- we all know that any round object has a center. Milling cul-
haps some addilion or sublraClion only. ter or a lathe tool lip are round objects, so they have a cen-
ter. This evaluation may sound a bit too elementary and it
-._--- is, but it is also the basis, lhe key element, the whole con-
X-AXIS I V-AXIS cept, of cutter radius offset. Every control system takes il
P1-XO.OOOO. YO.OOOO into consideration.
P2 pi x(fQ500. Y1 :1250
"- , ,

P3 X2.2500. ? Take, for example, an electric router \001 to cut a shape


P1 P4~2.2500 i YO.6250 out of wood - how is it used? Using a pencil oUlline of the
-X1.6250 YO.oooo I desired shape, the router bit is placed into the tool and starts
XOYO CUlling, Where? It starts clilling outside of the outlined
shape, otherwise the piece cui will be either too 1Q/~r<e or too
Figure 30·3 small! TIle same procedure is used when cUlting a board
wilh a saw - the saw width has to be compensated.
ContDur change points required by the cutter path
This activity is so simple, It might have been even done
Out of the len values required. nine of them are given. automatically, without serious thinking. The radius of the
The missing Y value for P3 is not expected on the drawing,
router bil (or the width of the saw) was compensated for be-
Reaardless of whether the cutter radius offset is used or nOI,
fore and during the cut. Just like Ihe outline of the shape in
so~e calculations will always be necessary and this IS one wood is followed, [he outline of the machined part, outlille
of Ihem. Afler ali, /nallual programming is done by hand. that is offset by the culler radius is followed as ,.,vell.
Figure 30-4 shows the trigonometry method used.
The tool path generated by the cuttIng 1001 center always
:- - 2.25 keeps the same distance from the part contour (outline).
There is even a special name for [his type of tool path - 1\ IS
~-~ called the equidislom tool path, which means 'distant by
_" 18 0
_"W,_ the same amount'. Figure 30-5 shows the sample drawing
with the applied equidistant lool path.
l a:::: 2.25 x tan18
a=07311 The question now is - what 10 do aboulthe point coordi-
nmes that have just been calculated and stored in lhe above
P3(Y) =1.125 + a table, Are lhey useful? Can they be used in a program? Yes
P3(Y) =1.8561 to the firsl question, but not yet to the second. A few addi-
iional conditions have 10 be taken into consideration.
Figure 30-4
Trigonometric calculatiDns to find unknown YcODrdinate
RADIUS OffSET

--em,
PI X axis Y
P1' X-i5:3750 y-o.
P2
- -- --- " __ v

P3' X2.6250 ?
P4

RO,375

30-5 Figure 30-6


taUI(JJsram tool path· cutter center coordinates rpm,rlCHU Contour change for the cutter center path

"''''r.", ..'. . ,...... the old sel of points wi II ra calcu- Figure 30-7 of point P2calculalion. The
points, Again, try to see which are trigonometry melhod is a subject programmers have
establish them first. 10 know how \0 work wilh - il is part of mathematics, ~x­
lended to CNC program A similar calculation is re-
point PI? It qUIred for P3, shown in
the new PI has (he value radius
also (he value of culler radius in Y .y= 1.-_
sin18
-- x
from the old P L The actual value an)' . cos18
cak:ulaleri flI nil, wilhaUi kllowillg the cuf-

=1.125 +N
• Cutter Radius P2(Y) = 1.3975
the culler is always
been phYSically
of the cutler must Y1.125
I" (0,0025 mm =
reground tools, 10015 previ-
or are undersize or oversize some Figure 30-7
this means that programming the cenlerl
Calculation of P2 for the cutrer
the exacllool radius to be known althe
in all cases,
N = 1 + sin~8 x 0.375
• Center Points Calculation
lY=
Coordinate poinls illustrated in Figure 30-5 above, ,III
sent the center or
point. Now, another
cuuer radius al each con ram change
can be brought inlo lhe
P3{Y) =1
picture, Ihe cutter A new coordinate set of five P3(Y) =
poinls can be example, (1 brund new CUl-
ler of 0.750 will
Y1
Which points can the illustralion directly,
withoul any trigonometric Look at and evalu-
ate Figure 30-6. OUI of len values requirt:d. only eight have 30-8
been idenlified, but also that Ihe previous lcn calcu- Calculation of P3 lor the cutter center point
lalions had to be done as well, adding 10 the overall
programming effort. are known, center
contour. points are in the
I n order to lin ish the d on programming of the . appear in that same ordcr II) Ihe
cutter center, the two Y values ror and P3 have to be cal- the pOlnt loc3tions hut various G
culaled. Let's start wilh point and other dam.
250 Chapter 30

momenl, it is slill 100 soon to write the The Type C cutter radius offset lhe ahead lype (also
closed with the table of new called the illlersecrionollype) is one is used on all
0.750 cutter but none modern CNC systems today. is no need to call it Type
C anymore, as there are no olher available.
Point No. X y
• Defini1ion and Applications
Pl X-O,375 Y-O,375
X-O, offset is a of the control system [hal
a contour without knowing the exact
P3 diameter of the cutter. sophisticated fea-
ture performs all of contour change
P4 X2,625 YO.625
points, based on
P5 X1.625
o Points of the drawing contour
digit I used in the calculations. It may o Specified direction of the cutter motion
where it came In(o {he It repre-
o Radius of the cutter stored in control system
sents lhe value of sin 90°, which is I Jitllclriangle
in fronl of (he Y - il is a symbol for word 'delta', - and machining - this feature
in mathematics 10 a vec- [a develop a program without
o .. 5ln;nnpt'

101', or a distance. knowing the exact CUller diameter at the (ime of program-
ming. It also CNC operator to adjust, to fine
COMPENSATED CUTTER PATH iunc, the WHer in the control system (nominal. over-
size or undersize), during actual machining, In practical
terms, cutter (and tool nose radius offset
The previolls examples are Iypical to (he
on lathes) for a number of reasons:
methods useu 011 the early con-
trols (normally of the NC lype, not had no culler ra- o Unknown exact of the cutter radius
dlUS offsel feature at aIL The lOol was developed in
o Adjusting for the cutter wear
such a way (hal the contour had to be calcu-
lat(~d WiTh the cwfer radius in This method of pro- o Adjusting the cutter I1pt'lpl:tlon
gramming added a great amount of time to the part devel-
o Roughing and finishing operations
opment process, greatly rhe possibility of
programming errors and disallowed any Oexibility during o Maintaining mJ'l,(,nlTlinn
mach1l1ing. Even a small di between the pra-
cutter radius and the culler radius required Every
or and the creation
memory in those may not be LOa clear at moment,
control tcchnol- but wilh knowledge of this topic, it wjlJ
control syslem 10 understand the subject. The suggestions are only some
melh- the possibil the automatic cutler radius offset
Now lei's look at aClual use ill prognunmi

• Tvpes of Cutter Rad Offset PROGRAMMING TECHNIQUES


As the CNC technology developed, so dId the cutler ra-
dius on'set methods. This development has laken three
slages, Today, they arc known as the types of a cuner
radius onsct - the Type A, thl.! Type B. and the Type C: o Points of the drawing contour

D Type A offset - oldest uses special vectors in the program o Specified direction at the cutter motion
to establish the cutting direction (039, G40, G41, G421. o of the cutter stored in the control
o Type 8 old uses only G40, G41 and G42
items are the actual data sources.
in the program, but it does not look ahead.
work wllh dnta and the data hilS to be
Overcutting is for Type 8 offset.
the purposes of this charier, we assume that
o Type C - current uses only G40, G41 and G42 conlOur chnnge points are based on the
in the program, but with the look ahead feature. coordinates.
Overcutting is for Type C offset.
RADIUS OFFSET 1

• Direction of Cutting Motion


an external or an tool palh
there will always a choice
now only, the directions can
the coantrm:/ockwise direction the pffit contour.
by Ihe faci
u. ...., ... U'l, IS
(in milling), or the
motion oflhe
(in turning). These are two very separate
to be clarified - which one 10
motion of (he [ahle or motion of Ihe lool?
that of the CNC machine type, ir is ,"",,,,,,,,..,1
follow one rule of CNC programming:

tool motion
statement is true for CNC lathes, where it is
but it is CNC machining centers, il is Figure 30-9
true for other lypes ma- Cutter path direction as ir relates to a stationary pM contour:
l"Iser Clllling machines, fa b) No motion direction shown - left and right is unknown
fe - d) Cutter positioned to the LEFT of the contour
etc. When it comes to the so (e - f) Cutter positioned to the RIGHT of the contour
versus counlerciockwise, a closer look
IS
• Offset Commands
• left or Right - not CW or CCW
In order to program one or
care of is to eliminate the direction), there are two nrt>',","',r'l

ing terms r l r l r F \ , l I l and counterclockwise. These terms are to the culter


reserved '-1"_11..1'::" circular interpolation and have no
place in the cutter radius offset.
and Right are used
when faced with the
we determine the correct po-
to a certain previously es-
A moving objcct is said to be La I or G42 mode is canceled by G40 command:
the left or to the right a stationary object, depending on
the direccion oj mowmem.
Cutter radius offset mode CANCEL
is no difference. The com-
to the left or to the
all three radius ofrser
looking inLO the cutler
30-9.

The illustration
a direction, a cutler with
to the left of the conlow;
fied and pOSItioned to the
G41
Out of the two
ler? Compensation to
centers, because it
cutting, assuming that a
with M03 rotation. There G40
sation to the right. causing so E
mode of cutting. This mode
cases, after consultallon with a
applies to milling systems, not to
of G41, G42 and G40, to the cutter path
252 30

terms of the milling method. command is applied answer to last question is -


10the climb milling mode, is applied to the area seltings. We are
conventional milling mode, is true only if the spindle areas (offset screens on the control
rotates with M03 funclion CW) and the cul- the Position
ler is right hand. If the cutter is the spindle must Tool Length earlier
rotate with MQ4 function aC!Ive (spindle CCW) and all 17 to 19 respectively). to look at
rules applying to cutter radius are the exact opposite offsets in more depth and their rela-
discussed here. is no cutler radius offset ap- tionship to the compensation cutter Although
G40 command is in this lopic appear to be aimed at of the CNC
the programmer has fa the same prin-
30- J J shows as a climb mi 11 ing equally well, if nol in even more deprh.
and the 042 as a conventional mill'
Climb milling mode is most common in • Historv of Offset Types
millmg, particularly in contour milling.
have developed over (he and be-
cause their and many of me older
t models are in use
and their application, it is
understand the
to know what
of offset the Fanuc control IS -
as expected the lower level or control is, the
lower [he nexibility, ano vit:e vt:rSl1. the word
bility - il IS not the quality that is or higher - just the
flexibility. DIfferences arc cal:eg,on:reo as Offset Memory
There are three on Fanuc systems:
Climb Milling Conventional Milling
G41 G42 o Type A - lowest level of flexibility
o Type B - medium level of
...... Tool motion direction
o Type C - highest level of 1'1"".1""1.1" ... ,
Figure 30-11
Climb milling and conventional milling mode for not confuse these memory types with the
a rigllr hllnd currer and The spindle rotarion mode M03 Culler radius offset determine how
1001 length offset and the cutter offset will be en-
• Radius of the Cutter tered into the contTol nothing else. Work offsets
054 to 059 are not
of offset that allows to pro-
gram Ihe Lool contour were the required Tool Offset Memory Type A
culler path, nOl mean cutrer should be either
forgotten or ignored The Type A tool offset IS the lowest level available. Its
question al this Ilexibility is very lim because Ih is offset the
speci fled in the nrr,or'lrn tool length wlth cutter radius in a single
column. Because sharing for two different off-
First, look at 30- 12 - it illustrates the offset- In it means
ferem CUHer radi IS
registry area as value.
SMALL clIn he used, with covered later,
MEDIUM wilh this Iype of memory are the most economi-
LARGE cal type in their

Tool Offset Memorv Type B

has only a single screen column.


Now - do not assume! The twO
columns for tool values
at all. They are for the
in one column and the Wear
this distinction. the
for both, tool length
Figure 30·12 values. program uses addresses
Effect of cutter radius on the actual tool path
CUTTER 3

Tool Offset Memory Type C • Address H or D ?

The Type C offset group offers the most Wilh Ihe Ihree lypes of Tool MemDlY it is reason-
the only offset type available that able to expect somewhat different methods
values from those of {he lool radius, It still for each type. Up to a point, this IS true.
tinction of the Geometry Offset and the Wear
BOlh the Type A and rhe Type Bare
Type B docs. That means Ihe control display
columns - yes,jour columns in lOlal. In this with only a single register, where the lool
ues are stored along with the cUller amounts.
addresses Hand D will be used for their
Normally, the Type A and Type B are associated wirh the
It is relatively easy to [ell which offset type is H only. That means me H is with
j list look at the conlrol display. Figure 30- /3 command, as well as wilh the G41 or
ieal appearance of each Offsef MeinDl)) cUfling tools do not require the cutler radius
with zero vaIues). The aClual appearance but all CUlling lools require the tool
different, depending on the control model. program. If a particular cutler requires both 1001
offset number and cutler radius offset number, two
offset numbers from the same offset range must be
Offset Offset in the program and stored in the control register,
No.
is the reason these offsets are called shared offsets.
01 0.0000
02 0.0000 example, programmed tool T05 requires both
03 0.0000 which obviously cannol have the same offset number.
_w is to use Ihe tool number as the tool length offset
.................... ........ww _
number increase that number by 20, 30,40, or so, for
Offset Geometry Wear cutter radius offsel. The entry for the Type A in the off-
No. set screen be similar to the one in Figure 30-/4:
01 0,0000 0.0000
02 0,0000 0.0000
03 0,0000 0,0000 Offset
... .. , ...

H-offset D-offset 05
Geometry Wear Geometry Wear
0,0000 0.0000 0.0000 0.0000
0,0000 0,0000 0.0000 0.0000 3()·14
0.0000 0,0000 0.0000 0.0000 Shared offset Mh;:~/M' PM'~~~ for tool offset memory Type A

[here are two columns avai table, but


30-13 entry in the offset screen will
Fanuc (00/ offset memorv types A B, C from the top down shown in Figure 30- ] 5:

• Programming Format I Geometry .


No.

35 10.0000

Figure 30-15
G41 x. .. D •• 01' .. Shared offset offset memory Tvpe B
G42 X .. D .. 01' ..
The Type C will columns. Since
G41 Y .. D .. or ..
the 10(.)1 length and the tool their own col-
G4.2 Y .. D .. umns, the same offsel both - there is
no need for the 20, 30, In
of the tool motion and how H address is r"'C'L"r,'''''''
many axes can at a time will be discussed in this the D address is cutler
chapler as well, the question of which her Figure 3()~ J6 show~ an input
address to usc and H address or the 0 address? to the Type A and the
254 Chapter 30

The cardinal rule number two is also simple and is based


on the adherence to the first rule:

Always apply the cutter radius offset


-8,6640 0.0000 0.3750 0.0000 I together with a tool motion

These two rules are not arbitrary - rules can be broken.


Figure 30-76 The suggestion here IS to follow the rules until a better way
Unique offset register screen for tool offset memory Type C is found. When selecting a startup (001 position, a few ques-
tions are worth asking:
• Geometry and Wear Offsets o What is the intended cutter diameter?
Similar to the application of geometry and wear offsets o What clearances are required?
for toollenglh offset, described in Chapter J9, the identical
general rules can be used for the cutter radius offset. o Which direction will the toof take?
o Is there no danger of collision?
Offsets entered in the Geometry offset column should
only contain the nominal culler radius. In the examples, we o Can other diameter cutter be used if needed?
have used a 0.750 cutler, with the radius of 0.375, That is o How much stock is to be removed?
the nominal value and that would also be the typical value
entered into thc Geomerry offset column. The Wear offset The same drawing used already will be used for this ex-
column should only be used for adjustments, or fine tuning, ample as well and (he cutter radius offset will be appl ied to
relative to the nomina! size, as required during setup andior Ihe contour. To turn the offset on, to make it effective, the
machining. There is no separate column for adjustment or cutter will be away from the actual cutling area, in the clear.
fine tuning for the Type A offset. Adjustments can still be The intended cutler is 0.750, the climb milling mode is de-
made, the only difference is that the value in the single col- sired, nnd .250 clearance is away fTom the contour. Wilh
umn will always change with each adjustment even if it these numbers, the start position is calculated at X-0.625
represen ls the cutter rad ius. Y-O.625. Figure 30-17 shows the start position that satisfies
all rules and answers the questions established earlier.
APPLYING CUTTER RADIUS OFFSET
All programming aids required to apply the cutler radius

I
offset in an actual CNC program are now known. The ac- :~
tual application, the way 10 use the offset in a CNC pro-
gram, as well as the methods of proper usage, will be dis- ~I
i . 0.25
cussed next. There are jour nwjor keys to a successfu I use
of lhe culler radius offset feature: L-yO

1. To know how to start the offset


-iY-O.625!
2. To know how to change the offset ./
3. To know how to end the offset
4. To know what to watch between the start and end
RO.375 - J XO
, ~-O,25 100.75 CUTTER
0.25 CLEARANCE

Each item is important and will be discussed in order. Figure 30· 17


Slarr position of the cutter before radius affset is applied
• Startup Methods
Of course, the suggested location is not the only one suit-
Slarting up the cutler radius offset is much more than us- able, but it is just as good as other possibilities. Note that
ing the G4IX ..D .. in the program (or something similar). the cutter located at the position X-0.625Y-0.625 is lwr
Starting up the onset me(l.ns :1dherence to two cardinal rules compensated, the coordinates are to the cenTer of the cutter.
and several important considerations and decisions. The Once the start location is established, tJle first few blocks of
cardinal rule number one is simple - it relates 10 the start po- the program can be written:
sition of the cutter:
03001 (DRAWING FIGURE 30-2)
Always select the start position of the cutter N1 G20
away from the contour, in the clear area N2 G17 G40 GSO
NO G90 G54 GOO X-0.625 Y-0.625 S920 M03
CUTTER RADIUS OFFSET 5

N4 G43 Zl. 0 HOl (c) IS and re-


N5 G01 Z-O.55 F2S.0 MOB (FOR 0.5 PLATE THICK)
N6
N.. GOl G4l XO YO 001 Fl5.0
extra safety, the approach to the depth of Z-0.55 N .. Yl 125 (l?2)
on a V2 inch plate thickness) was split into two mo- N ..
although cutter is safely above the clear area.
the heen the first motion can be In alllhree versions. the cutter radius
direction IS to the left the gether with the first motion, while still away
I command is Moving the part contour. (he option actually
means first target part, selecting the option (a) is the
location. How- method of the lead-in. A combination of (a)
because the good choice, wilh the Y axis target in
as well. That means
Next decision is Once the offset has been lUrned on, the conlour
point. Normally, poims can be programmed along the part lhe
Lead-in motion, or computer will do ilS work by conswlltly I.he c;uUer
properly offset at all limes. The program I can now
be extended up [0 poim P5 in the original illustration:
all of them cor-
location eventually. 03001 (DRAWING FIGURE 30-2)
are some possible options; Nl G20
N2 G17 G40 GSO
N3 G90 G54 GOO X-0.625 Y-0.625 5920 M03
N4 G4.3 21-0 HOl
N5 G01 2-0.55 F2S.0 MOS (FOR 0.5 PLATE THICK)
N6 G41 XO 001 F1S.0 (START OFFSET)
N7 Yl.125
N8 X2.25 Yl.8561
N9 YO.625
NlO G02 Xl.625 YO RO.625
Nll GOl X •.

At block N 10, the tool has reached Ihe end of the


radius. The contouring IS not yet finished, the bottom side
c, has to cut, along the X axis. The question is - how far to
cut and when to cancel the cutler radius offset?
Figure 30-18
Possible lead·in molions ro apply rhe cutter radius offset This is the last cut on the part, so it has (0 be machined
the offset is slill in effeCT! The cutter can end al XO,
The (a) option is butti1at is not a practical position - the tool should move a
first and the cutter bit farther, still along the X axis only. How far is further?
lion, Then, the tool continues Why nm to the same X-O.625, the original start position?
(Y 1.1 25), already in the is nOlthe only clearance posilion available, but is the
most reliable and consistent. The block N II will
These two motions will appear in as:
Nll GOI X-O.625
N .. GOl G41 XO DOl F15.0
N.. Yl.12S (P2)
cutter has len the pari contour area and the cutter
N .•
is not required anymore. It will be canceled
The option (b) is but a lillie review of the startup may help.
motions, whereas two culter radius was known for th is job, which is not al-
version will not be for the case. The programmer needs a suitable 100/. be-
the progmm would stillue correct: cause the Culling values depend on it. WIthin reason, a
or 0.875 cutter are not far apart - except for clear-
N .. GOl G41 YO 001 F1S.0
p.:lrlH\{~(-, of .250 was selected for .375 cutler
N .• XO
N .. Y1.12S (P2) means the program is still good for cutters up
N .. to and including 01 . CNC operator has this freedom,
l)v".<\U;,,, the only change is [0 the DOl offset amount in the
256 Chapter 30

control offset registry. The may Finally, the program 03001 is completed. There was no
have to be adjusted, if necessary. We will look at what need for any tool - such an change is
when the culle.r radius offsel is applied, rarher a rare occurrence, at contouring operations
using milling controls. Ihe directional change may
rule to establish the start needed in the some comments may be useful.
selected with a
the largesT culler that • Cutter Direction Change
i ncreased for a
or for a that is During a normal mil cui, Ihere will seldom be a
complete the program, leI's to change Ihe cutler offset direction from left to right or
the cutter radius offsct, when it is no from 10 . If it become necessary. the normnl
one mode 10 the other withow
• Offset Cancellation command. This practice is seldom
G41 [0 G42 would
A lead-in mOllon has been used at the or
the culler 10 the
radius offset. To cancellhe offset a motion will be
length of Ihe lead-out (just as the length of the
has (0 be somewhat greater Ihan or at least equal [Q

cutter radius. The lead-in and the lead-out motions are


called ramp-in and ramp-out HOW THE RADIUS OFFSET WORKS
'fhe safest place to cancel cutter for any ma- from given examples is
away from the contour
IS This should good way to by a recipe or a
be a clear area position. help in cases, but it will not help much in cases where
end position, Figure 9 there is no no and no example. In those
Lion In (he example. now be written. cases, il is to really undersland all principles behind
thc such as principles of the cutter
The is a good beginning. Next
during the tool motion in

N6 G41 XO DOl F1S.O

I 0.25 It is not as simple as illooks. We cannot


, YO block, as N6, and know exactly what
to understand what the
j
do not think. they only execute
inslruclions and follow these instructions
B N6 IS an Instruclion: Move 10 XO, the radius
RO.375
- .... Sf 0 red in DO! 10 lhe left, during a linear motion aT 15
ill/mill. This is Ihe program ion to the control
. Where does the too! SlOp? ill Figure 30-20:
Figure 30-19
Cutter radius offset cancellation· program 03001 program tool-.......--.- ......
- - --llIJli'-

03001 (DRAWING FIGURE 30-2)


----"
tool
Nl G20
N2 G17 G40 G80
N3 090 GS4 GOO X-O.62S Y-O.62S S920 M03
N4 G43 ZL 0 HOl
NS GOl Z-0.S5 F2S.0 MOS (FOR 0.5 PLATE
N6 G4l XO DOl F1S 0 (START 1"'1 C''C'<:!,""'"\ 1
N7 Yl.125
N8 X2.25 Yl.856l
N9 YO.62S
NlO
Nll
N12
G02 Xl.625 YO RO.62S
GOl x-o 625
GOO 040 Y-O 625 (CANCEL OFFSET)
001 001
- I

-
NlJ Zl. 0 M09
Nl4 G28 X-0.62S Y-O.625 Zl,O Figure 30-20
Nl5 M30 Ambiguous slartup for a curter motion in radius affsef mode
%
RADIUS OFFSET 7

there are fWO possibilities and they are both does the control handle
compensate the culler to the left culler radius offset Type C a buill-in
conditions specified in block the 'Iook-ahead'type of cutler radius
the cUlling tool moves to as eXT)eClea
is on to the left of (he pari contour, look· ahead feature is based on the principle known
the motion, using the radius value stored in the as buffering or reading-ahead. Normally, the control pro-
tef what is the problem? cessor executes one block at a time. There will never be a
,-aU.)",U by any huffered block (next block).

is ambiguous. There are IWO possible out-


comes, while only one is required. Which one? For In a shari overview, lhis is the sequence of events:
lef! part of the illuslration, one where the 1001 C) The control will first read the block i":l"In,t;:urlinn
Y + direction next, when Ihe radius offset startup of the cutter radius offset (that is the N6)
This is the key.' The mOL ion direction thaI
block must be known to the control. o control detects an ambiguous situation,
and does not process the block as yet
ways Ihe program can be written:
o control advances the processing to the next block
Q Example 1 - Figure 1 left : (that is NJ), to find out into which direction
tool be next
next position after N6 is Y positive direction:
o
N3 G90 GS4 GOO X-0.o2S Y-O.62S S920 M03

N6 G41 XO DOl Fl5. 0 (START ,.....,."",."......


N7 Y1.l2S ''''',('-,-.,... ..... ".,. Y-MOTION FOLLOWS)

2- type of the cutler radius offset is


Iy in the software, but makes the contour
next lS Y negativedireClion: mi so much easier on a daily basis. As maybe
expected, are some siluations Lo be aware of.
N3 G90 G54 GOO X-0.62S Y-0.625 5920 M03
• Rules for look-Ahead Cutter Radius Offset
N6 G41 XO 001 F1S.0 (START OFFSET)
N7 Y-1.125 Y-MOTION FOLLOWS) Look at following sample program selection, not re-
hued to any examples;
In both cases, content of block N6 is the same, but the
motion Ihat follows the N6 is nOI - Figure 30-21. NO MOTION block

N17 G90 GS4 GOO X-0.75 Y-0.7S S800 MO)

N20 GOl xo DOl F17.0 (START OFFSET)


N21 MOS (NO MOTION BLOCK)
N22 Y2.S (MOTION BLOCK)

What is in program structure? Ignore


coolant ON function in block N21. H it
-- can
m.Olion
wrong with it. The fact re-
block N21 , wh ich is Ihe
same block Ihe. control wi II look ahead 10 ror I he di-
rection of the next too! mOlion, Look at one more program
Figure 30-21 selection - again, as a new
Importance af the next tool motion for curter radius offset.
Y+ next direction on the y. next direction on the right Q Example - two NO MOTION blocks:
N17 G90 G54 GOO X-0.75 Y-0,75 S800 M03
• look-Ahead Offset Type
N20 GOl XO 001 F17.0 OFFSET)
The block N6 alone does not contaln suflicient amount of N21 MOS MOTION BLOCK)
data 10 successfully apply the nextlllolion N22 G04 PlOOO (NO MOTION BLOCK)
- in fact, thf' dirf't:/irm of the next motion - must known \0 N23 n.s (MOTION BLOCK)
the control system at all times!
258 Chapter

"",,·h.,,",c - but not wrong - this lime there 03002 (PROGRAM WITH RADIUS OFFSE.'T """"''''VJ~J
following the CUller radius off- N1 G20
blocks do HOI include any molion. N2 G17 G40 GBO
N3 G90 G54 GOO X-O.S Y-O.S Sl100 M03
a program Ihalll1ighl be line if the N4 G43 Zl.O HOi
radius were nOl applied. With an offset In effect, such NS GOI z-O.SS F20.0 (FOR O. 5 PLATE TKICK)
a program structure can create problems. Controls with the N6 G41 XO 001 F12.0
Nt MOS (NO MOTION BLOCK)
'look-ahead' can look ahead only so many blocks. N8 G04 PlOOO {NO MOTION '-'''-''-''-','',
If the the one block look-ahead is at- N9 Y2.5 (MOTION """""""-''-,
are two or more look-ahead blocks avail- NlO X3.S {MOTION ....'-"-,"-'"
on the control features. and not all con- Nll YO (MOTION BLOCK)
suggestions: Nl2 G01 X-O.S (MOTION '-''-''-,''-'"
Nl3 GOO G40 y-o.s CAl)1CE:L OFFSE.'T)
o If the control has a type cutter radius Nl4 Zl. 0 M09
It:CltUI't:;. but the number of blocks that can be NlS G28 X-O.S Y-O.5 Zl.O
UI"c:;;,;:,t;U ahead is not known, assume it is only one block Nl6 M30
%
o Make a test program to find out how many blocks
the control can read ahead A conlrolthaL can read only one or I1vo blacks ahead \'v'iII
o the cutter offset is started in the program, nrr\nr,,,",, 03002 -Ihe next marion is in
hard not to include any non· motion blocks - restructure In to avoid
jf necessary (In program structure lhat
eonUIlns more black,
in mind that the control subjects the program input
to lhe rules embedded m the software. The correct input • Radius
must In the foml of an accurale program,
one hal f of lhal
kind of a response can b~ expected If the culter ra-
is programmed wrong? Prohably a scrap of the
If the conlrol syslem cannol calculate the offset culler
position, it will act as if the offset were not programmed at
all. means, Ihe initial tool motion will be towards the
XO wllh the cUfter center. When Ihe necessary information
is passed on [0 the control, the offset will be applied, usu-
ally lao lale, after Ihe CLllIer has entered the parl. Scrap is
the most likely result in Ihis case. Such an incorreCT
gram is shown in Figure 30-22:

very - rule should help to make


cutter radius offset will nOl fail:
iQVERCUT,
AREAl

--+-- example. in Ihe program 0300 I, the lool


~iLion is at X-O.625, (he targel position is XO.
the programmed Ienglh of the tool travel is
;.. / selected was .375, which is smaller and adheres 10 the rule.
There are lwo other possibilities - one, where the CUller
is the same as the programmed length of the 1001
error due tD w(()ng program structure· program 03002 travel, and lWO, where the cutter radius is larger than
programmed length of the lool travel.
Figure 30-23 shows a stan position of a cuLLer thal
same programmed length of lravel as the culler
is ceJ1 a In Iy a! lowed, bu I def] ni tel y nOL n'\'~nrl"'r1
l'\Y't1.

reason is it limits the range of adjustmenls that can


10 the actual cutter radius during machini
RADIUS OFFSET 9

N3 G90 G54 GOO X-O.25 Y-O.62S S920 M03

No G41 xO DOl F15.0 (START OFFSET)


N7 Y1.125 (P2)

What will happen here? Ihecontrol calculates


RO.375
the between the travel length
and the culter radius .375. the direction of
next travel as Y thai because the
Y-O.625 cutter is positioned to the the intended motion, it
o
to move. 125 in the X direction! That does not seem
X to a problem. is a plenty of free
there is a problem - (he control does not recognize the
30·23 that there is a free Programmer knows it, but
Cutter start position is equal to the cutter radius control does not. The who designed the
have taken a actions; yet, they wisely
Tlte followillg example in a .375 travel as to play it safe. decided to let the control
programmed along the X If the 001 amount to rejeci and issue an alarm.
(han .375, there will be a motion toward XO. If the 001 pending on the alarm 'Overcutting will
amount is equal to the difference between the occur in cutter radius or
grammed length and length is zero and there will ence' or a similar will appear - the common alarm
not be any molion along X axis. In that case, the number for this error is 04J on Fanuc systems.
of the radius takes without a movement and the mo- Many programmers, even with a long
tion (0 the Y I I will continue. perienced this alarm. If nOI, they were either
or have never used cutter radius offset in the
N3 G90 GOO G54 X-O.37S Y-O.62S S920 M03
Anytime the cutler interference alarm occurs, al-
N6 G41 XO 001 F1S.0 (START
ways look al surrounding blocks as well, not just at the
N7 Yl.12S
onc the processing.
Try to avoid like this one - although In (he next we look at the cutter
coo-eet, they do not provide any flexibili!y and can cause ence that occurs a lool mot jon, not just at
serious difficulties at some lime in the future. or tennination of the cutter radius
Figure 30-24 shows a start position where
partially on of(he target position. • Radius Offset interference
nirely not system will The last illuslrated only one of pOSSI-
an alarm bllines, when the cutter radius offset occur. An-
other cause for this alarm is when a cutter radius is trying to
enter an area is smaller than the cutter radius, stored as
the D amount. To . the next pro-
gram in Figure 30-25.

t.--1.00 1: 1
RO.20

RO.25

o 1.1

0.50
figure 30-24
' - - -_ _ _ _ _- - - - 1 _ ,
Cutter start position is smaller then the cutter radius
program sample is similar to the pre-
except the X axis start tion is (00 close
if the cutter is in the DO 1 regis- 30·25
.3750: Simple drawing lor program 03003
260 r 30

03003 (DRAWING FIGURE drawing dimension can no! be changed,


Nl G20 of the cutter diameter must be changed, to a culler
N2 G17 G40 GSO that is .500 inches. The
N3 G90 G54 GOO X-O.625 Y-0.62S S920 M03
N4 G43 Zl.0 HOi
.200 is no problem, as external
NS GOl Z-O.SS F2S.0 Moe 0.5 PLATE THICK) not allow gouging in cutter ra-
N6 G41 XO DOl FlS.O (START OFFSET)
feature is built-in and is no
N7 YO.925
N8 G02 XO.2 Yl.125 RO.2 to see what would actually happen, if
N9 GOl X1.0 were not Nobody wanls to see the gouging on
NlO YO.75 the pan, but the 30-26 shows the same effect
Nll G03 Xl.25 YO.S RO.25 cally. rn was a real error in the earlier forms
Nl2 GOl XL 75 ter radius Type A and Type B.
N13 YO
Nl4 X-O.625
Nl5 GOO G40 Y-O.625
Nl6 Zl.O M09
Nl7 G28 X-O.625 Y-O.625 Zl.O
OFFSET)
I~
NlB M30
R0.25

program is quite simple, it is correct it follows all


discussed so rae The key to succes<:; i <:; the selecl ion of
cutter diameter and the entry amount the address
into control system. Let's see what will - the
same culler is used as before, a inch mill. The
amount DOl stored in the control will !GOUGE

control unit will process the information from the 001 =0.375 =1:1
with the offset amounts to Figure 30·26
Then, it executes the blocks as il moves Effect 01 overcutting (gouging) in cutter offset mode.
the par!. Suddenly, at block N7 alarm No. 041 Tvpe Cradius offset (look ahead type) does not allow overcutting
occurs cutter radius inleJference problem.
What happened? There [s nothing wrong with t'he • Single vs. Multiaxis Startup
Most CNC operators would look at
There is another cutter radius
gram it. After careful study, if they fi nd it correct,
the cause or the problem must be somewhere stanup, particularly if startup mo-
tion along twO axes, ,.,,.,.~. __ single axis.
of Try not [0 blame the computer and don't
more ti me once you are that the look at cutting, with
Check the offset input in 001. The amount no problems. Now we look at cutting.
there. That is also OK the tool in Evaluate the two approach in Figure 30-27, us-
drawing next. That [$ ing a cutter radius offset startup towards an internal profile,
erything seems and is a for example, a wall of a pockel or in[ernal contour.
the screen, step.
the relationships between:
o dimensions ." alld '" Program input
o input .. , and... Offset amounts
o Offset amounts ... and... Drawing dimensions

may a while to. It


amount of experience a-; well, In pro-
the problem is in the relationship
amount and [he drawing dimension.
Study - there is an
radius of is set to the cutter
375. This is expected \0 tit into the Possible problem in cutter radius offset mode during a startup
it cannot - hence ihe alarm. with two axes simultaneously (intemal curting shown)
CUTTER RADIUS OFFSET 261

o Correct approach - single axis motion: Here are the first few correct blocks of each method:
The correct programming approach shown on the left o Correct approach - single axis motion:
side of the illustration contains the following blocks - only
the starting program blocks are listed: G20 (CORRECT APPROACH WITH ONE AXIS)
ill.
N2 G17 040 GSO
N1 G20 (CORRECT APPROACH WITH A SINGLE AXIS) N3 G90 G54 GOO X-O.625 Y-O.62S 8920 M03
N2 G17 G40 GSO
N3 G90 G54 GOO XO YO S1200 M03 N6 G41 XO DOL F1S.O (START OFFSET)
N4 G43 ZO.l HOI Nne N7 Y1.125 (P2)
NS G01 Z-O.25 F6.0 (FOR 0.25 POCKET DEPTH)
N6 G41 Y-0.7S DOl FIO.O (START OFFSET)
N7 XO. 75 o Correct approach - multiaxis motion:
N8 YO. 75
N1 G20 (CORRECT APPROACH WITH TWO AXES)
N2 017 G40 Gao
There is no internal radius in the program 10 worry about, N3 G90 G54 GOO X-O.625 Y-0.62S 5920 M03
so the amount smred in the offset register DOl does not
have [0 consider i[ and wi!J represents (he cuucr radius as is. N6 G41 XO YO DOl FlS.0 (START OFFSET)
N7 Yl.125 (P2)
o Incorrect approach - multiaxis motion:
The incorrect mol ion approach shown on the right side of Note that in cascs of the cutter radius offset for an exter-
the illustration contains the following initial blocks: nal contour, both programs listed are correct, because there
appears LO be 110 interference with any section of the part. In
N1 G2 a (INCORRECT APPROACH WITH TWO AXES) fact, there is the same interference as in the internal milling
N2 G17 G40 GSO example - the only difference is that Ihis type of 'interfer-
N3 G90 G54 GOO XO YO S1200 M03 ence' is of no consequence - it tokes place while in the air.
N4 G43 ZO.l HOI MOS
N5 GOI Z-0.25 F6.0 (FOR 0.25 POCKET DEPTH) There will always be a problem that cannot be solved in
N6 G41 XO.7S Y-O.75 DOl F10.O (START OFFSET) any handbook, regardless of how comprehensive that book
N7 YO.75 may be. The subjects and examples included in this hand-
book present common basis for a better understanding of
There is no way the control system can detect the bottom the subjecl. With growing experience, the understanding
wall of the pocket at Y-O.7S. The startup for the offset is ex- becomes much deeper. Before going any further, let's re-
actly (he same as for external cutting, but more damaging. view some general rules of the cutter radius offset feature.

Compare the two possible startups for the drawing shown OVERVIEW Of GENERAL RULES
in Figure 30-2, earlier in the chapter. If [he radius offset is
started with a single axis motion, (he result is shown at the
left side illustration in Figure 30-28.1f the offset is started Reminders and rules are only important until a particular
with a (wo-aJ(is motion, the result is shown at the right side subject is fully understood. Until then, a general overview
illustration in FiJ;ure 30-28. and some additional poinls of interest do come handy. Pro-
gramming the cuuer radius offset is no differenl. The fol-
lowing items are marked [M] for milling, [T] for turning,
1./"):
N'

oj
wi
xi
~

t '-- D01 ~
'W
'0
xl
-j -- - D01
and [M-TJ for both types of control systems:
o [M-T J Never start or cancel the radius offset in an
arc cutting mode (with G02 or G03 in effect\. Between
YO-'- ) YO the startup block and the cancel block, arc commands
are allowed and normal, if the job requires them.
o [M·T J Make sure the cutter radius is always smaller
'V:'O.62S· Y-O,625 than the smallest inside radiUS of the part contour.
o o I M-T lin the canceled mode G40, move the cutter to a
X
-~~~- clear area. Always consider the cutter radius, as well as
Correct approach in X Correct approach in XY all reasonable clearances.
Figure 30·28 o I M-T I Apply the cutter radius offset with the G41 or
Startup of the cutter radius offset for external cutting: G42 command, along with a rapid or a linear motion
Single axis approach, shown on the left to the first contour element (GOO or GOl in effect).
Two axis approach - shown on the right
262 Chapter 30
-"""--"""-""""--"""'"

o [M) Reach the Z axis milling in the G40 mode


offset cancel mode).
the preference to a single axis approach
-
position.
o I M I Do not th e offset num ber 0,. for in the
program it is a sma!! error that can cost you a lot.
o I M·T J Make sure to know exactly where tbe tool
command point will be when the radius offset is applied
two axis.
o {M-T In the compensated mode (G41 or G42 in effect),
watch blocks that do not contain an axis motion.
non-motion blocks it possible Imissing X, Y and Z).
o I M-T } Cancel cutter radius offset with the G4Q command, 0.375 --- -
with a or a linear motion (GOO/G01) only,
axis motion only.
o 1M) from the depth (along the Z axis only)
after radius offset has been canceled.
I..IIC1VVHlfJ to illustrate practical application of a cutter radius offset
o [ M I Make sure the cutter radius offset corresponds
to the work plane selected (see Chapter 31). will be on the specified lOlerance in the
as +.002/- .000, for the dimensions of the I wo
o [ M·T ) G28 or G30 machine zero return commands will meters - the external and 02.0 internal. Note that
not cancel the radius offset (but either one will
of all dimensional tolerances is the same for both
the tool length offset).
meters. This statement will be very important later.
o I M-T I G40 comlTland can be input through the MOl to
cancel the cutter radius offset (usually as a ""lIf 'II II,.,' • Measured Part Size
or an emergency measure).
machinist knows thal
the part depends on many factors,
PRACTICAL EXAMPLE - MilLING setup, cutting depth, material
the selection of 1001, its exact
The following in-depth example
practical appltcalion of the cutler radjus (0 When a part is inspected, the measured can only
CNC programmer and the CNC operator. It covers one of tile three possible oulcomes:
ally all situations that can happen during o night on size ... within specified ' ....I"'r"'''... '''''
process and presents solutions to maintaining the
dimensions of the part. The tirSI subject that (0 o Oversize ... will be scrap for
understood is the difference between the programmed and o Undersize ... will scrap external cutting
the measured part size.
The first outcome is always
• Part Tolerances the extemal or internal

In both cases, the IS outside of the


specified roleral1ce requires a look at
additional (wo items thai also have to be considered:
o External cutting method ... known as Outside or 00
o ... known as Inside or 10
The next example
radius offset on the part the machined can-
that reason, only a simple the tenns oversize and WI-
simplest tool path. btlt not """t'I>~'~"'r' to the type of cUlling. The fol-
method. Figure 30-29 shows most results:
CUTTER RADI 263

No Action Required , Y2.S


Scrap Likely Recut Possible

it is clear (hat no action is necessary ->~"'---«««««::«-.-««<- ........................ Y 1<25


is within tolerances. regardless of
or the internal cutting took place. For \
Tool path
or results, a recut may be possible or \ motion
\
the likely result.

(02.500 inch OD in the ex-


thaL is measured as larger than the allowed toler-
ance can likely be recul, but a size that is smaller Ihan the
range will result in a scrap.
internally (02.000 inch ID in the exam-
as smaller than the allowed
recut, but a size that is larger then the allowed 3D-3D
range will in a scrap. Detail lor external tool path shown in example 03004

• Programmed Offsets
most a1tractive feature of the cutter Offset
position
it allows to change the actual tool sire right on Toolpath
by means of the offset registerfunction D. In motion .0
example, only one lool is used - .750
mill - and one single cut for each contour
internal). The program XOYOZO is at the center
and the top of the part:

03004 (Tal - 0.75 DIA END FINISHING MILL)

(**** PART 1 - 2.S DIA EXTERNAL CUTTING **** ) position


Nl G2D
N2 G17 G40 GSO
N3 G90 G54 GOO XO Y2.5 S600 M03 POS.) Figure 30-31
N4 G43 ZO.l HOi MUS (CLE.AR+TOOL LG.)
NS Gal Z-0.375 F20.0 FOR 2.5 DIA) Detail for internal tool path shown in 03004
N6 G41 Yl.2S 001 FlO.O MOTION)
N7 G02 J-L2S (EXT. CIRc:LE CUTTING)
As is customary in
NB GOl G40 Y2.S MOTION) program 03004, the tool path uses
N9 GOO ZO.l ABOVE) and the other positions defined by programmer. This is
not only the standard but also most convenient method
(**-- PART 2 - 2.0 DIA INTERNAL COTrING **** ) Lo develop a CNC is easy to un-
NlO YO (START POS. AT XOYO) derstand by the machine dimensions are
Nil G01 Z-O.8 F20.0 FOR 2.0 DIA) easy to trace (if can be made, if
Nl2 G41 Yl.O Dll FS.O (APPROACH
required. In plain ignores (he
Nl3 G03 J-LO CIRCLE ,.....,..........'L'""",
CUlfer radius and as if the culter were a
NJ.4 GOl G40 YO MOTION)
N15 GOO ZO.l M09 (CLEAR point - in a cutting a zero diameter.
NJ.6 G28 ZO.l MOS AXIS MACHINE ZERO)
N17 MOl (OPTION.1\L • D Setting
The cutter is
Figure 30-30 shows half of the work. The ma-
program - the external diameters and the
30-3/ shows the lool path - ifnot in the
gram - the internal d
264 Chapter 30

One critical fact to he established first is that the CNC dius offset commands G41 or G42 as well as the D address
system always calculates a specified offset by its euUer ra- offset number - with the appropriate cancellation by G40.
dius, lIot by its diameter.l[ means the programmer provides
[he cutter radius offsel in the form of a D address. On the Evaluating what emc/I)' happens during the tool motion
machine, the programmed offset DO I will apply to the cut- for each cutting method (external or iJUernal) offers certain
ter radius registered in offset 1,002 \0 (he radius registered options. In both cases, the cutling tool moves from the
in offsel 2, ecc. What actual amounts are in these registers? starting position, within (he clear area, to the large! posi-
tion of the machining contour. This is the motion where the
Since no radius oflhc cutter is included anywhere in the culler radius offset is applied, so Ihis motion is critical. In
program, the offset register D mllst normally contain the fact, this is the motion that determines the final measured
culler radius actual value. Be careful - some machine pa- size of the parl. Each method can be considered separately.
rameters may actually be set to accept the cutter diamefel;
although all internal calculations are sti II set by the radius. • Offset Adjustment
Evaluate program 03004; what will be the stored amount Before any speciai details can be even considered. think
of DOl? A 0.750 inch end mill is used, so the DOl should about how the offset amount can be changed. rn those cases
be set to .375. This is correct in theory, bUI factors such as where the size of the part is to be adjusted, the incremental
tool pressures, material resistance, tool defiecLion, actual change of the offset value is a good choice. Incremental
1001 size, tooltoJerances and other faclors do inlluence the offset change means adding to or sublracTing/rom the cur-
finished part size. TIle conclusion is that the DOl registered rent offset amount (using the +INPUf key on a Fanuc
amount can be .:'75, but only under idea! conditions. screen) or sloring the adjustment in the Wear offset screen
column. Changes to the program data is never the option.
Ideal conditions are rare. The same factors Ihat influence
machining will also have a significant effect on part dimen- • Offset for External Cutting
sions. It is easy to see thal any measured size that is not
within tolerances can be only oversize or undersize and ex- Evaluate the tolerance range for the outside circle 02.5.
renwl and internal cutting method does make a difference The tolerance for this diameter is +.002/-0.0, so all sizes
as to how the offset can be adjusted. between 2.500 and 2.502 are correct. Any sIze smaller than
2.5 is undersize and a size greater than 2.502 is oversize.
Regardless of the cUlling method, there is one major rule
applied to the cutter radius offset adjustment in any control There are three possible results of the measured size for
system - Ihe rule has two equal pans: external cutting. All examples are hased on the expected
middle size of 2.50 I and on DO 1 holding the amount of
POSITIVE increment to the cutter radius offset will cause 375, which is the radius of a 0.750 milling culler.
the cutting tool to move AWAY from the machined contour.
o External measured dimension - Example 1
NEGATIVE increment to the cutter radius offset will cause
the cutting tool to move CLOSER to the machined contour. 2. SOlO Ivilh DOl", 0.3750

Note the word 'incremenr' - it means that the current ra- This is the ideal result - no offset adjustment is necessary.
dius offset amount will be changed or updated - but not re- The tool culling edge touches the intended maChining sur-
placed - with a new amount. The concept of 'moving away' face exactly. All is working well and the offset setling is ac-
and 'moving closer lO' the part refers 10 the tool motion as curare. Only standard monitoring is required. This is not
the CNC operator will see. TI1e measured size of the part such a rare situation as it seems - in fact, il is quite common
can be controlled by adjusting the culler radius offset value with a new CUller, rigid setup and common tolerances.
in lhe control, programmed as the D address, according to
these two rules. The most useful rule that applies equally to
o External measured dimension - Example 2 :
the external and internal adjustments has two alternatives:
2.5060 'Nilh DOl::: 0.3750
To ADD more material TO the measured size,
The measured diameter is .005 oversize. TIle tool edge
use LARGER setting amount of the 0 offset
has nOI reached the contour and has to move closer to it.
The radius offset amount has to decrease by one hal f of the
To REMOVE material FROM the measured size. oversize amounl, which is on the diameter or width bUlthe
use SMALLER setting amount of the 0 offset offset amount is entered as a radius, per one side. Offsel
DOl is adjusted incremenlally by .0025, to 001==0.3725.
Experienced CNC operators can change offset settings at
the machine, providing the program contains the culler ra- o Externalrneasured dimension - Example 3:
CUTIER RADIUS 5

2.4930 wiill DOl 0.3750 • One Offset or Multiple Offsets?


The program 03004 used 001 for the
The is .008 undersize. cUlling
and Dll for the internal diameter. Only one
has reached beyond the programmed machil1ing
and the goal was the middle tolerance of 2.50 I
and (() move away it. The radius orf:::.et
ternZll diameter and 2.00 I for the internal
amount has 10 by One half of the undersize
offsets in the program needed or a will a
amounl. The on the diameter (or
width) Keep in mind that (he last few
dius, possibilities that were independent
mentally by no common connection. Program 03004
mon connection bel ween the two
• Offset for Internal Cutting end mill, used for Culling both

Assume for a moment, thal only one


ample 001. with the stored amount of
~ured, the external diameter is 2.00 I After nu cut-
ting (he internal diameter of 2.000 inches, when measured
again, its is nol2.00 I as but only 1.999. 111is
measurement is .002 the expected diruncter.
results of the measured size for
The reason is bOlh have a +.002/·0.000 toler-
are based on the expected ance, The
and on D II holding the amount or +.002 means
culler. meter, +.002 means
set alone cannot
Internal measured dimension - Example 4 :
on bOfh
(hat if
2.2010 will! Dll = 0.3750 011
is the ideal result - no offset adjustment is ne.:essary.
The lool cutting !Ouches the intended machining sur-
All is working well and the offset selling is ac-
curate. Only normal monitoring is required.

o Internal measured dimension - Example 5 : programmer should al-


program and suggest (he
as a professional courtesy.
2.0060 ""'1111 D11 = 0.3750

The measured diameter is .005 oversize. The tool a Scrap


has reached beyond the intended machining When iI comes 10 initial ol'fset amounts, some
has 10 move away from it. The radius offset value can be used here. The goal is to use
by onc halfoflhe oversize amount. a way that the pari will not likely be a
is 011 the diarllcter (or width), but (he offset amount is en- even with an unproven tool. A good operator can
tered as a radius, pef side only. Tne Dll offset must SCfilpS by wrong offsets, at least to some
incremented by .0025, to D 11=0.3775. key is to create some temporal)! orfset
o Internal measured dimension Example 6 .
goal IS 10 force a cut Ihat is oversize externally or
in.ternaily, measure II, adjust it. then recut to the right
1.9930 witll Dll = 0.3750 Whether machining an external or internal tool path, even
the best setup will not guarantee that the part dimensions
measured diameter is .008 undersize. will be within tolerances. When machining ,.In
[he intended maehini contour, the diameter can be cut il1femionally (han
move required - in a controlled way. In this casc, the
creased diame[cr will be roo small is present
is on the
tered as a radius, In- In internal contour machining, the diameter can cut
crcmcnred by .004, to 0 II leI/tiona")' smaller than required, in a cootrolled
this case, the risk chalthe diameter will be 100 is
ent. Either ease offers benefits but some drawbacks, 100.
266 r 30

solution is 1O move the tool


away machined surface by a to pOint
pos;/ive increment amount must be
greater than the '-I'IJ'-'-'l'-U error of the tool radius, as well as
being suitable a recul.
R
In both cases, when test cut is made, measure the o
meter and adjusllhe by one half of the di fference be- point X to
tween measured and diameters. If only one side is .9
CUl, the di is not hal a
• Program Data ~ Nominal or Middle? 30-32
Tool reference point for turning and bon"ng - (a) turning, {bJ boring
Many coordinale locations in the
dimensions that are • Radius Offset Commands
is - what happens if the
erance range? are two commands used in milling
grammers. One tions are contouring on CNC lathes - Figure
of tolerance LO use the nominal size
ignore the nions have some credi-
bility and should not

the tolerances be handled by


machine. Two reasons prevail.
. In lhis handbook, the
preference is to use the nominal dimensional sizes and let
llse of offsets - at the
is that a program using
+ G42 - RIGHT
nominal dimensions is easier [0 in case of draw-
ing changes, they will affect
nominal sizes.

TOOL NOSE RADIUS OffSET


more often than
+ G41 - LEFT

All the principles and Figure 30-33


radius offset for a lathe Lathe application of the fool nose radius offset
mainly caused by the
Offset of the tool nose radi us
In milling, the cutting tool is G41 to the of the contouring direction
is the cutting edge and its radius
Offset of the tool nose radius
tools have a di fferent most common is G42 to the R!GHT of the
a carbide insert. An Insen may one or
more CUlling edges. For strength and longer insert Ii the G40
has a relalively small comer ra-
turmng and boring tools are:
lathes, G codes do not use
1/64 ::: .0156 (English) or OAO mm (metric) in (he
1/32 .0313 (English) or 0.80 mm ,metric) edges,
3/64 .0469 (English) or 1.20 mm (metric)

JJ"'''''"J,)'' the too! cutting edge is often a


n.ose radius offset became common.
/lose, • Orientation
center of a circle symbolizing an
to the conlour by its radius. In
• Tool Nose are part of the 1001 radius. on lathes,
tools do have a radius but ""',... ",.,,,
corner of the lOa],
into allose 1ad ius. nose center is also equidistant from the contour,
the edges change their orientation, even for the same
corners of a lurning tool and a boring tool.
Additional definitions are needed in a form a vector
tool nose reference point in turning is often called pointing towards the radius center. vector is
point, the imaginoly point and, lately, even tip orientation, numbered arbitrarily.
It is the poinl tn;i! is moverl along Ihe contour, MH''''n,''' to eSLablish the nose radius center
it is directly related to XOZO of the part. shows two tools and their tip
CUTIER RADIUS OFFSET 267

single axis motions are part of a contour thal also includes


radii, chamfers and tapers. In this case, the tool nose radius
offset is needed, otherwise all radii, chamfers and tapers
will not be correct. The illustration in Figure 30-37 shows
-.-~
what areas of the part would be undercut or overcut, if the
tool nose radius offset were 110t used during machining.
/' o
Reference point X to ZO.JI a
.......
a
...... I

Lbl
Figure 30·34
Relationship of the /00/ reference point and the nose radius center

The tip orientation is entered during the setup, according


to arbitrary rules. Fanuc controls require a fixed number for
each possible tool tip. This number hus [0 be entered into
the offset screen at the control, under the T heading. The a
value of the [001 radius R must also be entered. If the tool
tip is 0 or 9, the control will compensate to the center. Fig- - PROGRAMMED CONTOUR
ures 30-35 and 30-36 show the standard tool tip numbering
for CNC lathes with X+ up and Z+ [0 the right of origin.

T2

b.
Figure 30-37
T7 EHect 01 tool nose radius oHset . (a) oHset not used (b) oHset used

• Sample Program
The following program example 03005 shows a simple
T3 application of the lDOI nose radius offset all an external and
internal contour, based on the drawing in Figure 30-38.
Figure 30-35 Only the finishing cuts are shown - roughing is also neces-
Arbitrary tOO/lip numbers for nose radius offset· rear lathe shown sary, but would most likely use the special G71 multiple
repetitive cycle, described in Chapter 35.
6
2
.- 1 00
I'l.O
I.t) I.t)
NN
0
N
C'">N
C\lN
,
NN
• .
..- co
..- 0 ,
NN
..-
90
NN
X4.750
7 5 X4.510

X3.250
TLR X2.650

3
.--
I

4
X2.410
- - X1.990
8 TLR :;: Tool radius X1.750
XO.950
Figure 3D-36 -- XO.750
-XO
Schematic illustration of the too/ tip numbering (Fanuc controls)
l.O 00 0
I' 00 C\J
• Effect of Tool Nose Radius Offset ...-
.
00 ...-0
N, ,
NC\J 0 ,
Some programmers do not bother using the tool nose ra- N NN N
t!ius offset. ThaI is wrong.! TheorelicaJly, there is 110 need Figure 30-38
for the offset if only a single axis is programmed. However.
Simplified sample drawing for program exampfe 03005
2 30

03005 nose radius offset, programming the minimum


or at least.! 00 Inches per side (2.5
NGl T0300 {EXTERNAL Fnrr5EIDrG a clearance for all three standard tool nose radii -
NG2 G96 5450 M03
N33 GOO G42 X2.21 ZO.l T0303 MOB
1164, 1/32 and 3/64 (0.40, 0.80 and 1.20 mm
N34 GOl X2.6S Z-O-12 FO_007
NG5 z-0.825 FO.Ol • Change of Motion Direction
N36 X3.2S Z-1.l2S
N37 Z-l. 85 CNC lathes, a change in
N38 G02 X4.0S Z-2.2S RO.4 much more often than on machining centers.
N39 GOl X4.S1 shows a facing cut On a solid
N40 x4.8 Z-2.395 10 a turning cut(-s) with G42 in
N41 £10.2 problem is u,,,'''-U,,.,'.Al
N42 GOO G40 X8.0 ZS.O T0300
N43 MOl

N44 T0400 (INTERNAL FDrrSHING)


N45 G96 S400 M03
N46 GOO G4l X2.19 ZO.l T0404 MOS
N47 GOl Xl.75 Z-0.l2 FO.006 X 1.70 I Correct
N48 Z-l.6 FO.OOS X 1AO approach
N49 G03 XO.95 Z-2.0 RO.4
NSO GOl XO.75 Z-2.l ····X1 ,00
N5l Z-2.925
NS2 U-O.2
N53 GOO G40 xa.o Z2.0 T0400
NS4 MOl XO
CLEARANCE -, X-0,07 Incorrect
approach

Note that the contour start positions are in the Figure 30-40
clear area - away from the pan. Make sure there is enough Tool nose radius offset change for the same tool
clearance. Cutter radius inteJference alarm
(alarm #41) is always clearance. N2l T0100 (CORRECT APPROACH)
N22 G96 S400 M03
• Minimum Clearance Required N23 GOO G4l Xl.7 ZO T010l MOa (START)
N24 Gal X-O 07 FO.D07 (FACE OFF)
N25 GOO ZO.l (ONE AXIS ONLY)
N26 G42 Xl 0 (THEN COMPENSATION)
N27 Gal Xl.4 Z-O.l FO.012 ( CONTOURING)
N28 Z-O.65
>TLR x 2 - x2 N29 X ••.

Face CUlling is a single


for consistency. For sol id
>TLR x 4 i the center line, X-0.07 in
on 0 ally larger than double tool
the tool leaves a small un
the face will not be flat.
correct tool motions on the
>TLR x 4 If the above program is
on 0
>TLR x 2 -- --.-
N21 T0100 (INCORRECT VERSION)
Figure 30-39 N22 G96 S400 M03
N23 GOO G4l Xl.! ZO T010l MOS (START)
Millimum C/l;laI8I1CB lor loo/nose radius offset N24 GOl X-O.07 FO.007 (FACE OFF)
Figure 30-39 shows minimum clearances N25 GOO G42 Xl_O ZO.l (*** WRONG ***)
start and end of cut. Make sure the nose radius jnlo N26 GOl Xl.4 Z-O.l FO.012 ( CONTOURING)
N27 Z-O.65
x 2 and x 4 N28 X ..
twice or four
becomes a ... the face will never be completed!
PLANE SELECTION

From all available machining operations, contol/ring or Planes in the mathematical sense have their own proper-
profiling is the single most common CNC application, per- ties. There is no need Lo know them all, bUllherc are impor-
haps along wilh hole making. During conlouring, Ihe 1001 lant properties relaling 10 planes lhat are useful in CNC
mOlion IS programmed in at least three differenl way~: programming and in various phases or CAD/CAM work:
o Tool motion along a single axis only o Any three points that do not lie on a single line define
a plane (these points are called non-collinear points)
o Tool motion along two axes simultaneously
o A plane is defined by two lines that intersect each other
o Tool motion along three axes simultaneously
o A plane is defined by two lines that are
There are additional aXIS mOlions thaL can also be applied parallel to each other
(thefourllI andfifth axis, for example), but on a CNC ma-
chining cenler, we always work with at least three axes, al- o A plane is defined by a single line
and a point that does not lie on that line
though nol aiwa)'s simullaneously. This reflects the lhree
dimensional reality of our world. o A plane can be defined by an arc or a circle
This chaptcr applies only 10 CNC milling systems, since o Two intersecting planes define a straight line
turning systems normally usc only two axes, and planes are o A straight line that intersect a plane
therefore no! required or used. Live tooling on CNC lathes on which it does not lie, defines a point
does no! cnler lhls subject.
These malhematical deflnitions are ol1ly Included for ref-
Any absolute point in the program is defined by lhree co- erence and as a source of addilional information. They are
ordinates, specified along the X, Y and Z axes. A pro- !lot required Cor everyday CNC programming.
grammed rapid motion GOO or a linear mOlion GO I can use
allY number of axes simullaneously, as long as lhe resulling
(001 motion is safe wilhin the work area. No special consid-
MACHINING IN PLANES
erations are required, no special programming is needed.
The path of a CUlling lool is a combination of straighl
That is notlhe case for the following lhree programming lines and arcs. A too! mOllon in one or two axes always
procedures, where Ihe various consideralions change quite lakes place in a plane designated by two axes. This type of
signilicanlly: mOl ion is n·vo-dimellSional. In contrast, any tool mol ion

o Circular motion using the G02 or G03 command lhal takes place in lhree axes al the same time is a Ihree-
dimensional motion.
o Cutter radius offset using the G41 or G42 command
o Fixed cycles using the G81 to G89 commands, • Mathematical Planes
or G73, G74 and G76 commands
In CNC machining, the only planes [hal can be defined
In all three cases - and only ill these three cases - pro- and used are planes consisting of a combination of any fwa
grammer has LO conSider a special selli ng of the control sys- primary axes XYZ. Therefore, the circular CUlling morion,
tem - il is called a seleCTion of lhe rnachining plane. curter radius offset and fixed cycles can Lake place only in
anyone of the three available planes:
WHAT IS A PLANE? [ ';('( plane ZX plane YZ plane

To look up a definition of a plane, research a slandard The actual order of ax is designarioJl for a plane delinition
textbook of malhematics or even a dictionary. From varioLiS is very imponant. For example, lhe XY plane awl the YX
definitions, plane can be described in one sentence: plane are ph.vsically the same plane. However, for the pur-
poses of defining a relative (001 motIon direction (clock-
A plane is a surface in which a straight line joining any wise vs. counrerclockwise or lefr vs. right), a clear standard
two of its points will completely lie on that surface. - must be established. .

269
270

international standard is based on the mathematical y X


ru Ie that spec i fies Ihe ji rsr letter of the plane designation
ways refers to the /lO/'izonral and the second
La the verlical axis when the plane is viewed. Both axes
re-
~O3 ~O3 ~O3
are always orthogonal and vertical) and G;;;\ X G;;;\
z G;;;\ y
pendicular (aL 90°) La each In CAD/CAM, this stan-
dard deiines (he Ihe lap and baHam, TOP - XY RIGHT - YZ
front and back, elc. STANDARD OF PLANES
A simple way to malhemalical designation of
Dxes for alllhree is to write the alphabetical order of z
all axes twice and pair with a space:
t ~G03 t ~G03
~X ~y
In mathcmaticalterms. the arc defined as: TOP-XY -YZ
----~-~------.--,.. .. --.. ,- ----
PLANES ON A VERTICAL MACHINING CENTER
Plane
Xy x y of standard mathematical planes (above),
on a eNC machining center (below)
z x
I vz y z In programming, the selection is extTemely Im-
yet often neglected and even misunderstood by
and operators alike. main reason is that
NOle the emphasis on Ihe word ·mathematical'. The em- of 1001 motions for contounng)
is intenlional, and for a reason. As will are and machined in XY plane.
soon apparent, there is a between the all machining centers, is always per-
mathematical planes and the machine as defined by pendicular to the XY plane. horizolHal appli-
the direction of the m:e the same in this
• Machine Tool Planes • Program Commands for Planes Definition
machining center axes. Any two The sekction of a plane for related controls
a plane. A machine be detlned by adheres to the mathematical designation of planes, nOE the
machine from standard operating position. actual machine tool planes. In a each
machming center, (here are three standard the mathematical planes can
perpendicularly (straighl preparatory command - a G
o view XV plane
selection
:J front view
o The right view .. , YZ G18 ZX plane selection

III 3J-l di be- G19 YZ plane selection


two definitions, caused by a viewpoints that are

motions (programmed with GOO) and all lin-


II is that the XY plane and lap view are Ihe same in ear (programmed with G01), selection
both so is the YZ plane side command is irrelevant and even ThaI is
mathematical plane is front other motion modes, where
planeon machine. which is XZ. as in the middle (ion in a is extremely important
ill us(ratioll. sidercd
The where For machining applications using the circular interpola-
plane tion mode, with G02 or G03 commands, cutter offset
plane be- ' mode with 1 or G42 commands and fixed mode
horizontal axis with G81l0 commands, as well as G76. the
plane selection is ieal.
PLANE 271

• Default Control Status .cIRCULAR INTERPOLATION IN PLANES


If the plane is nol
faults automatically to G 17 In order to complele a circular the COIl-
LX plane in turning. If the plane Irol system has 10 receive surficient from the
grammcd, it should be induded at the parl program. Unli.ke rapid with GOO'in
Since the three plnne commands only or linear interpolation with in
La/" motions, cutter radius offsets and fixed polation requires a programmed
selection command G 17, G 18 or G 19 can is the command for CW
before any of these machining for CCW direction.
rules, the r/ockwi.\1' clirecfion is
Always program the aplprOI)riate p,lanle se~lec·tionl cOlmmland vertical axis towards the horizontal in any SeH~C(c:O
Never rely on the control .. "'.... ,,,. . ,..'" plane. Counterclockwise direction is always "'P'''''''rI
the horizontal axis towards the aXIS,
Any plane selection change is
prior Lo actual tool path change. can When we compare Ihe mathematical axes
onen as necessary in a program, but only one Ihe actual orientation of the machine axes
active at any time. Selection o[ one plane machining cenLer). the XY plane (G J cmd the
plane, so the G 17/G 18/G 19 commands plane (G 19) correspond to each olher. These two planes
Allhough true in an informative sense, it is most normally present no problems to CNC programmers. The
the opportunities to mix all three plane plane (G 18) may cause a serious problem if not prop-
program arc remole. From all three available understood. Mathematically, the horizontal axis in
only the circular motion is affected by plane "'-"~'-'''VI G I plane is the Z axis and the X axis is the vertical axis.
look at the programming of a a vertical machining center, the order of machine axes
as well, at least for comparison is reversed. It is important to understan.d that the
and counterclockwise directions ollly appear La
but In reality, they are the same. If the mathe-
STRAIGHT MOTION IN PLANES malical axes orientation is aligned with the machine axes,
they will indeed match. Figure 31-2 shows the
rapid motions GOO and linear motions GOI arc con- the mathematical planes with the machine planes:
straight motions when compared with circular mo-
lions. Siraight molions Can be programmed for a SIngle x
or as a simultaneous motion along two or three axes. The STAN
following examples only show typical unrelated blocks: ,G03
MATHEMA TICAL
~ Example - Rapid positioning - GOO ; G~\ ZX plane

GOO XS.O Y3.0 XY plane - 2D x


GOO X7. 5 Z-l. 5 XZ plane - 2D mpid mOlion STANDARD
GOO YIO.O Z-O.2S l'Zplane-2D ZX PLANE
GOO X2.0 Y4.0 Z-0.75 XY7-3D MIRRORED
~ interpolation - GOl : c

GOI X-l. 5 Y4. 46 F15. 0 - 2D hileantlO/Jon


GOl X8. 875 Z-O. 84 FlO. 0 7X pla}'!e - 2D IilleDnJlolion PLANE ROTATED
GOI Y12. 34 ZO.l F12. 5 . 2D linear/Jlotioil '-----I"'" X AFTER MIRRORING
G01 X6. 0 Y13. 0 Z -1 24 F12. 0 X1Z - 3D IineannoriOll Z E 18 PLANE
~03
~
10 lool motion along the programmed ON THE MACHINE
not need to be used for
any straight motion a single axis), unless the cutter G02'
offset or a fixed cycle is in effect. AI! tool mOlions X
.... "',..,..,r·Pu·" f"""""~f'III\J by the control. regardless of
Figure 31·2
any in that apply to linear motions
Progressive
are nol the same ror circular mOlions. with the macnllJp.
272 Cha 31

arcs does nor change The following format pro-


within plane (a), or the malhemali- . grmnming applications for circular
cal plane mirrored (b), or even the milTored plane rotated
by (c), even if plane itself is changed. G17 G02 Xl4.4 Y6.8 Rl.4
What is not a creallon of any new plane
The view still represents a GIB G03 Xll.S7S Z-1.22 R1.0
viewed from a dilfcrenl direc-
G19 G02 Y4.5 ZO RO.85

the situation is similar. Some older control systems do not


The plane (G 18) match be- dius designation specified by the R
and the actual axes orien- vectors 1, J and K must used.
lalion. II is G 19 plane Ihal appears to be reversed motion within a selected
cause some problems Ihe logical structure must be selected:
is well
G17 G02 (G03) x .. Y.. I .. J ..
of a machinmg plane WIll enable
operations using circular Gla G02 (G03) X_. Z I. K..
interpolation, culler radius offset and fixed cy-
G19 G02 (G03) Y.. Z J R ..
most common applications of Ihis type of ma-
(blend) Intersecling radii, circular From the that:
counlerbores, cylinders, simple spheres
cones, and other Similar shapes. o XV axes - 7 I and J arc center modifiers

(0 undersland the CNC applications of G02 and o XZ axes . G18 plane • I and K arc center modifiers
in planes, illustration in Figure 3 J o axes . G19 J K arc center modifiers
helpful.
• Absence in a Block

program example shows a


application in a program where modal axes values
are Hot in subsequent blocks:

N .. G20 Englishunils

N40 G17 XY plane selected


N41 GOO X20.0 Y7.5 Z-3.0 Sl£ll1po.riJiDHDjli1elool
31-3 N42 GOl X13. 0 FlO. 0 PI[llle selection "..,.pfPIJnnl
Actual circular rooJ path direction in a/l three machine planes. N43 G18 G02 X7.0 R3.0 Z axis is asswned as absent
Note the inconsistency fOI the G18 plane
N44 G17 GOl XO PlnJle selection irrelevGlIf

• 611-618-619 as Modal Commands Block N43 represents a contour of a 180" arc in


plane. Because of the G 18 command in N43, (he control
The preparatory will correclly interpret the 'missing' axis as the Z
G 18 and G 19 are all modal its value will be equal to the las! Z axis value
one of them will activate Also examine the G 17 command in
selection in the program he in
is always a good practice to transfer the control status to
another plane selection. The original plane selection as soon as the plane
belong to the G codc group !hough Ihis is no! absolutely necessary in lhe
PLANE SELECTION 273

Omitting the G 18 command in block N43 wi II cause a se- There will no! be a 3-axis cutter radius orfset takIng place!
rious program error. If G 18 is omitted, the originally se- Tn the next example, compare the absolute tool positions
lected command G 17 wi II sti II be in effecl and circular in- for each plane when the rapid molion lS complered and the
terpolation will take place in the XY plane, instead of {he cutter radius ollset is activated in the program, Tool abso-
intended ZX plane. Iute position when the culti ng motion is completed depends
on the mOlion following block N 121.
In [his case, the axis assumed as 'missing' in the G 17
plane will be the Y axis and its programmed value of Y7.5. The radius offset val ue of D25= 100.000 mm, stored in
The control system will process such a block as if i[ were the conlrol offset registry, is used for the next example:
specified in a complete block:
o Example:
N43 G17 G02 X7.0 YI.S R3.0
Nl20 G90 GOO G41 xso.o YIOO.O Z20.0 D2S
An interesting situation will develop if the plane selecrion N121 GOl X90.0 Y140.0 ZO F180.0
command G J 8 in block N43 is absent, but [he circular in-
terpolation block contains two axes coordinales ror the end The compensated tool posit ion when block N 120 is com-
point of the circular motion: pleted, wi I! depend on the plane G l7, 018 or G 19 currently
in effect:
N43 G02 X7.0 Z-3.0 R3.0 G17 is stilll;1 effect o If G17 command is programmed with three axes:

Although G 17 is still the active plane, [he arc will be ma- G17X .. Y.. Z.. XV motion will be compensated
chined correctly in the G 18 plane, even if G 18 had not been
programmed. This is because of the special control feature
o If G18 command is programmed with three axes:
called complete instruction or complete data priority, pro-
vided in block N43 of the last example. The inclusion of G18X .. Y.. Z.. LX motion will be compensated
cwo axes for the end point of circular motion has a higher
priority rating than a plane selection command itself. A
complete block is one that includes all necessary addresses o If G19 command is programmed with three axes:
without taking on modal values.
G19 X.. Y.. Z.. YZ motion will be compensated
Two axes programmed in a single block The following practical programming example illustrates
override the active plane selection command.
both circular interpolation and cutter radius offset as they
are applied in different planes.

• Cutter Radius Offset in Planes PRACTICAL EXAMPLE


The plane selec\Jon for rapid or Imear motion lS lrrele-
vant, providing that no cutter radius offset G41 or 042 is in The example illustrated in Figure 3 1-4 is a si mple job that
effect. In theory, it means that regardless of the plane selec- requires cUHing the RO.75 arc in [he XZ plane. Typically, a
tion, all GOO and GO I motions will be correct That is true, ball nose end mill (also known as a spherical end mill) will
but seldom practical, since most CNC programs do use a be used for a job like this.
contour] ng motJOn and they also use the cutler radius offset
feature. As an example, evaluate the following blocks: In the simplified example, only two main tool passes are
programmed. One pass is the left-to-right motion - across
N1 G2l the left plane, over the cylinder, and over the right plane.
The other pass is from right to left - across the right plane,
N120 G90 GOO X50.0 YIOO.O Z20.0 over Ihe cylinder. and across the left plane. A slepover for
Nl21 Gal X90.0 Y140.0 ZO F180.0 the tool is also programmed, between the passes. The pro-
gram of this type for the whole part could be done in the in-
When the rapid molion programmed in block N 120 is cremental mode and would greatly benefit from fhe use of
completed, the cutter will be positioned at the absolute lo- subprograms.
cation of X50.0 Y 100.0 Z20.0. The absolute location of the
cutting motion will be X90.0 Y 140.0 ZO, after the block Figure 3J-5 demonstrates tool motion for the two passes
N 12l IS completed. Included in the program example. To interpret lhe program
data correctly, note that program zero is at the bOllom left
Adding a cutter radius offset command 041 or G42to the corner of the part. Both clearances off the part arc .l 00 and
rapid mOlion block, the plane selection will become ex- the stepover is .050:
tremely important. The radius offset will be effective only
for those two axes selected by a plane selection command.
274 Chapter 31

3.5

2.5

-,

Figure 31-5
Too! path fDr programming example 03101

Figure 31-4 FIXED CYCLES IN PLANES


Drawing for the programming example 03101

03101 The last programming item relating to plane selection is


Nl G20 the application of planes in fixed cycles. For cycles in the
N2 Gla (zx PLANE SELECTED) G 17 plane (XY hole locations), G 17 is only important if a
N3 G90 GS4 GOO X-D.I YO £600 M03 switch from one plane to another is contained in the same
N4 G43 Z2.0 HOI MOB program. With special machine attachments, such as righr
N5 GOI G42 ZO.S 001 FB.O
N6 Xl. 0
an.gle heads, [he drill or other tool is positioned perpendic-
N7 GO) X2.S 10.75 (= GO) X2.S ZO.S IO.7S KO) ular to the normal spindle axis, being in G 18 or G 19 plane.
NB GOl X3.6
N9 G91 G41 YO.OS
Although the right angle heads are not very common. in
NlO G90 X2. 5 many industries they are gaining in popularity. When pro-
Nll G02 Xl.0 1-0.75(: G02 Xl.O ZO.5 1-0.75 KO) gramming these allachments. always consider the tool di-
Nl2 GOl X-O.l reclion into the work (the depth direction). In the common
N13 091 G42 YO.OS applications of fixed cycles, G 17 plane uses XY axes for
Nl4 G90 ... the hole center location and the Z axis for the deplh direc-
lion. Iflhe angle head is set to use the Y axis a<; Lhcdepth di-
When working with lhis type or CNC program lhe first rection, use G 18 plane and the XZ axes wi II be the hole
lime, it may be a good idea to test the tool path in the air. a cenler positions. If the angle head is sella use the X axis as
lillIe above the job. Errors can harren quite easily. the depth direction, use G} 9 plane and the YZ axes will be
Three axes cutting motion is programmed manually only the hole center positions. In all cases, the R level always ap-
for parts where ca1culJ.tions are not too lime consuming. plies 10 the axis that moves along the depth direction.
For parts requiring complex motions calculations, a com- The difference between the tool tip and tile center line of
puter programming software is a beuer choice. spindle is the actual overhang. This extra overhang length
must be known and incorporated into all motions of the
affected axis not only for correct depths, but also for safety.
PERIPHERAL MILLING

Even with the ever increasing use of carbide cutters for END MillS
metal removal, [he rraditional HSS (high-speed steel) end
mills still enjoy a great popularity for a variety of milling End mills are the most common tools used for penpheral
operations and even on lalhes. These venerable cutters of- milling. TI1ere is a wide selection of end mills available for
fer several benefits - they are relatively inexpensive, easy 10 just about any conceivable machining application. Tradi-
find, and do many jobs quite well. The term high speed tional end mills come in metric and English sizes, variety of
sleel does nOI suggesl much produclivity improvement in diameters, styles, number of CUlling flules, numerous flute
modern machining, particularly when compared \0 carblde designs, special corner designs, shanks, and tool material
cutters. It was used long time ago to emphasize the benefit compositions.
of this tool maLeriallo carbon tool sleel. The new material
of the day was a 1001 steel enhanced wi th tungsten and mo- Here are some of the most common machining opera-
lybdenum (i.e., hardening elements), and could use spindle tions that can be performed with an end mill - HSS, cobalt,
speeds two La three times faster than carbon sleelloois. The solid carbide or an indexable insert type:
term high-speed-sleel was coined and Ihe HSS abbrevia-
tion has become common to this day. o Peripheral end milling and contouring
o Milling of slots and keyways
The relalively low cost of high speed steel tools and their
capability to machine a part to very close tolerances make [) Channel groves, face grooves and recesses
Lhem a primary dluice for many millillg applications. End o Open and closed pockets
mills arc probably the single most versatile rotary tool used
on a CNC machine. o Facing operations for small areas

The solid carbide end mills and end mills wilh replace- o Facing operations for thin walls
able carbide spiral tlutes or inserts are frequently llsed for o Counterboring
many different jobs. Most typical are jobs requiring a high
metal removal rates and when machining hard materials. o Spotfacing
The HSS end mill is still a common cutting tool choice for o Chamfering
everyday machining.
o Oeburring
Many machining applications call for a harder LOoling
End mills can be formed by grinding them into required
material chan a high speed steel, but not as hard as carbIde.
shapes. The most common shapes are the flat bottom end
As the tooling cost becomes an issue, the frequent solution
mill (tJ1e most common lype in machine shops), an end mill
is to employ an end mill with additional hardeners, for ex-
with a full radius (often called a spherical or a hall nose end
ample a cabal I end mill. Such a 1001 ~s a lillie more expen-
mill), and an end mill with a corner radius (often called the
sive than a high speed steel tool, but far less expenSlve t~an
bull nose end mill).
a carbide 1001. Cobalt based end mills have longer cullll1g
tool life and can be used the same way as a standard end Each type of an end mill is used for a specific type of ma-
mill, wilh a noticeably higher productivity rate. chining. Slandardflat end mill is used for all operations that
require a nat bottom and a sharp corner between the part
Solid carbide end mills arc also available in machine
wall and bottom. A ball nose el1d mill is used for simultane-
shops and commonly used as regular small to?]s. Larger
ous three dimensional (3D) machining on various surfaces.
lools made of solid carbide would be too expenslve, so spe-
An end mill similar ro a ball nose type is the hull Hose end
cial end mi lis with i ndexable j nserts are the lools of choicc.
mill used for either some 3D work, or for tlm surraces that
They can be used for bOlh roughing operations and preci-
sion finishing work.
req~ire a corner radius between the part wall and bottom.
Olher shapes are also required for some special machining,
This chapter takes a look at some technological consid- for example, a center CUlling end mill (called a slot drill), or
erations when the CNC program calls for an end mill of any a taper ball nose end mill.
type or for a similar tool that is used as a profiling tool for
Figure 32-/ shows the Ihree most common types of end
peripheral cutting and cOnlouring. This is an operation
!llills usecJ ill inuuslry and the relationship of culler radius
when the side of (he cuttcr does most of work.
10 the culler diameter.

275
276 Chapter 32

NOSE
MILL
BULL NOSE
END MILL

infor-
malion

• End Mill S
R R-···' / rdating to the size of an end
D --, D 0--
for CNC machining:

R 0 R = DJ2 R < DJ2 o End mill


o mill length
32·1 o length
Basic NlrltmJl""t ..~n of the three most typical end mills
work, the diameter of the end mil I must
nominal diameters are those that are .
• High Speed Steel End Mills various looling companies. Nonstandard
high speed sleel end mills are Ihe 'old-limers' in ma- as reground cullers, must be treated differently
They arc manufactured either as a work. Even with the benefits of cuUer off-
or a douhle end . wilh various set, it is nm advisable to use reground end mills for
shank configurations. Depending on Ihe cUlling tip , . although they may do a good job far emer-
try, they can be used for peripheral motion (XY axes situations and [or some raughing_ That nm
plunge motion (Z axis only), or all axes mean a reground culler cannol be used for work
(XYZ axes). Either a single end or a double end can in the shop or for less demanding
for CNC machining. When using a double end mill. length of an end mill projected from the tool holder is
sure the unused end is not damaged in the (001 very Important. A long projection cause
mQunted. On a CNC machine, all end mills are that contributes to the wear of cuLting edges. Another
held in a collet Iype \001 holder, providing the effect for a long tool is deflection. Deflectjon will
and concentricity. Chuck lype holders are not recom- negali~ely influence the size and quality
mended for end mills of any kind. the finished parI. nute length is important for 11"""''-'''''''''>-
lion of the depth of cut.
• Solid Carbide End Mills
Regardless of the overall 1001
length from Ihespindle), the
eulting depth. Figure
depth of a rough side cut in

IS a
larly at sharp corners, or
stored. When handled ~~r'~~rt
great efficiency and t
I
• Indexable Insert End Mills 1,5D

The indexablc insert mills


solid carbide end mills, but with the
replaceable carbide insertS. Many in
this category as well. The match
their internal diameler La the The tool has a
screw prevents Figure 32·2
ground l1al area where the
the 1001 from spinning. HeJ,atlolnst,~J(J of the end mill diameter to the of cut
for cuts in
PERI PH MILLING 7

• Number of Flutes
.SPEEDS AND FEEDS
an end mill, particularly a
hardness, the number of flutes should In many other sections of Ihe handbook, "'..,"'''''''''''
mary For profiling, many programmers se- are mentioned. Tooling catalogues have charts
(virtually automatically) a four-flute end mill recommendations 0/1 speeds and feeds for parlitular
tool than 0.625 or 0.750. with different materials. However, one
- thai is - it has to cuI into a solid mate- (English version) is used for calculating the
- has normally only two flutes, in rlmin (revolutions per minute):
This 'plunging-lype' of end mill is
a more technical name as a cemer-culling
old-fashioned name, a SIOl drill. The
no relation to the tool called a drill, but La
- just like a drill, a slot drill penelrates
parallel to the Z axis.
n::ii' where ...
II is the area of small medium end mill diameters thal
the most attention, In this size range, the end mil!s : :;: Spindle speed {revolutions per
come in two-, four-flute configurations. So what 12 Constant to convert feet to inches
are the benefits of a two-flute versus a three-flute versus a ft/min Surface speed in feet per minute
11: Constant for flat to diameter conversion
flute for example? The type of material is o of in inches
guiding
formula is similar:
compositions. there is (he expected
",,,,u... ,v," or a trade On a positive side.
mill better conditions (0
cuts.

When cutting Ie? where ...


as aluminum. magnesium,
a chip buildup is important, so a r/min (revolutions per minute)
practically the only choice, even 1000 == to convert mm to meters
m/min speed in meters per minute
somewhat compromised. 1t Constant for flat to diameter conversion
A different for harder materials, be- o Ill'!>ln ..f· .. , of the tool in millimeters

have to considered - LOol chatter a benefit from the reverse


and fool deflection. is no doubt, that in ferrous mate- cuning at a certain spindle speed
rials, the muhi flute end mills will deflect less and chaUer perfect for the particular
less than their two-flute diameter of (he tool for that
What about cnd mills? They seem to be - fi nd out the ftlmin rali ng for the
and in fact they are a compromise between the to any cutter size. The next
two-flute and four-flute Three-flute end mills have diameter is in inches):
never become a standard ">J'V''-'-, even if their machining
capabilities are oflen to excellent. Machinists 1{ x 0 x r J-min
have a difficulty to measure accurately, par- ft / min
12
ticularly wHh common tools as a ver-
nier or a micrometer. very well in
most materials. Metric IS lool diameter is in milli-
meters (mm):
Regardless of (he an mill with a
laroer
o diameter will deflect than a similar end mill with
a small diameter. In addition, the length of the end
mill (measured as its overhang . ,
portant. The longer is the lool, the
and thal applies to all tools. All entries in the formu
away from its axis (center line). tions and should be
common physical laws.
278 Chapter 32

To calculate a culling feedrate for any milling operation, The English units version of the formula is:
the spindle speed in rlmin must be known first. Also known
has to be the number of Ilutes and the chip load on each in/min
flute (suggested chip load is usually found in tool cata-
logues). For the English units, the chip load is measured In r I min x N
inches per IOOTh (3 tooth is Ule same as 3 flute or an insert),
with the abbreviation of in/rooth. The result is the cutting Metric units formula is very similar, it calculates the feed
fcedrate that will be in inches pcr.minute - in/min. per [oolhfi in 111m/tooth:
For a lathe feedralc using standard turning and boring
lOols, the number of {lutes is flut applicable, the result is di- mm/min
rectly specified in inches per revolution (in/rev) or millime- r / min x N
ters per revolution /11m/rev.

When using carbide insert end mills for cUlling steels. the
in / min ;;: r / min x f t x N faster spindle speeds are generally better. At slow speeds,
the carbide culler is in contact with a steel being cold. As
~ where ... the spi ndJe speed increases, so does the steel temperature at
the tool cuui ng edge, produci ng lower strength of the mate-
in/min = Feedrate in inches per minute rial. That results in favorable cutting conditions. Carbide
r/min =: Spindle speed in revolutions per minute inscrt cutting lools can often be used three limes and up to
I, =:; Chi p load in inches per tooth (per flute)
five limes faster than standard HSS cutters. The two basic
N = Number of teeth ~flutes)
rules relali ng to the rei ationsh ip of tool material and spindle
For metric system of measurement, the chipload is meas- speed can be summed up:
ured in millimeTers per looth (per flute), with the abbrevia-
lioll of !'Iull/looth. The meuic formula is similar to lhe one High speed steel (HSS) tools will wear out very quickly,
listed for English units: if used at high spindle speeds = high r/min

Carbide insert cutters will chip or even break,


if the spindle speed is too low = low r/min

~ where ...
• Coolants and Lubricants
mm/min = Feedrate in millimeters per minute
r/min Spindle speed in revolutions per minute Using a coolant with a high speed steel (HSS) cutter is al-
f, ::: Chip load in millimeters per tooth most mandatory for culling all metals. Coolant extends the
N Number of teeth (flutes)
tool life and its lubricating attributes contributes to the im-
As an example of the above formulas, a 0.750 four flute proved surface finish. On the other hand, for carbide insert
end mill may require 100 fUmin in cast iron. For the same cullers, coolant may not he always necessary, particularly
cUlling tool and pari material, .004 per flute is (he recom- for roughing steel stock.
mended chip load. Therefore, the two calculations will be:
Never apply coolant on a cutting edge
that is already engaged in the material!
Spindle speed:

r/min ~ (12 x 100) / (3.14 x .750)


r/min '" 509 • Tool Chatter
There are many reasons why a chatter occurs during pe-
CUllingfeedrale:
ripheral milling. Frequent causes are weak tooi setup, ex-
in/min", 509 x .004 x 4 cessive LOollength (overhang from tool holder), machining
in/min '" 8. 1 thin walls of material with laO much depth or lOO heavy
fccdrate, etc. Cutler deflection may also contribute [0 Ihe
For safety reasons. always consider the part and machine chalter. Tooling experts agree that well planned experi-
setup, their rigidity, depth andJor width of cut and other rel- ments with the combination of spindle speeds and CUlling
evant conditions very carefully. feed rates should be the first step. If chatter sti 11 perSists,
look at the machining method used and the setup integrity.
Feed per toothfi (in inches per tooth), can be calculated as
reversed values from the formula listed above.
PERIPHERAL MILLING 279

STOCK REMOVAL A = RAMPING ANGLE


Although peripheral milling is mainly a semifinishing
and fmishing machining operation, end mills are also suc-
cessfully used for roughing. TIle flute configuration (flute
geometry) and its cutting edge are different for roughing
and ftnishing. A typical roughing end mill will bave corru-
gated edges - a typical example is a Sfrasmann end mill.
o
Strasmann is said to be the original designer and developer
of roughing clItters and the trademarked name is now used
as a generic description of this type of roughing end mill.

Good machining practice for any stock removal is to use


large diameter end mill cutters with a short overhang, ill or-
Figure 32-3
der to eliminate, or at least minimize, the tool chatter and
tool deflection during heavy cuts. Typical entry angle for 8 ramping infeed into a sofid materia!

For deep internal cavities, such as deep pockets, it is a • Direction of Cut


good practice to pre-drill to the full depth (or at least to the
almost full depth), then use this new hole for an end mill The direction of a cut for contouring operations is con-
that is smaller than the drilled hole. Since the end mill trolled by the programmer. Cutting direction of the end mill
penetrates to the depth in an open space, the succeeding for peripheral milling will make a difference for most part
cuts will be mainly side milling operations, enlarging the materials, mainly in the area of material removal and the
cavity into the required size, shape and depth. quality of surface fInish. From the basic concepts of ma-
chining, the cutting direction can be in two modes:
• Plunge Infeed
o Climb milling - also known as the DOWN milling
Entering an end mill into the part material along the Z o Conventional milling - also known as the UP milling
axis alone is called center-cutting, plunging or plunge in-
feed. It is a typical machining operation and programming Anytime the G41 command is programmed, cutter radius
procedure to enter into an otherwise inaccessible area, such is offset to the left of part and the tool is climb milling. That
as a deep pocket, a closed slot, or any other solid material assumes, of course, that the spindle rotation is nonnal, pro-
entry. Not every end mill is designed for plunge cutting and grammed with the M03 function., and the cutting tool is
the CNC machine operator should always make sure the right hand. The opposite, G42 offset, to the right of the part,
right end mill is always selected (HSS or carbide or in- will result in conventional milling. In most cases, climb
dexable insert type of end mill). Programmer can make it milling mode is the preferred mode for peripheral milling,
easier by placing appropriate comments in the program. particularly in fUlishing operations.

• In and Out Ramping Figure 32-4 illustrates the two cutting directions,

Ramping is another process where the Z axis is used for


penetrating (entering) into a solid part materiaL This time,
however, the X axis or the Y axis are progranuned simulta-
neously with the Z aXIS. Depending on the end mill diame-
ter, the typical ramping angle is about 25° for a 1.000 inch
cutter, 8° for a 2.000 inch cutter, and 3° for a 4.000 inch cut-
ter. Ramping approach toward the part can be used for flat
type, ball nose type, and bl1l1 nose type of end mills.
Smaller end mills will use smaller angles (3°_10°). See Fig-
ure 32-3 for an il1ustrotion of a typical ramping motion. ."..,.

Always be very careful from which XYZ tool position


M03
the cutting tool will start cutting at the top of part. Con-
sidering only the start point and the end point may not pro- CLIMB MILUNG CONVENTIONAL MILLING
duce the best results. It is easy to have a good start and good G41 G42
end tool positions, but somewhere during the cut, an un-
wanted section of Ole part may be removed accidentally. A Figure 32-4
few simple calculations or a CAD system may help here. Direction of the cut relative to material, with M03 in effect
280 Chapter 32

Climb Milling the cut and upon exit, the chip is very thick. The practical
result is possible hardening of the part. rubbi ng the tool into
Climb milling - sometimes called the down 111 i II ing - uses (he material, and a poor surface finish.
rotation of the cutter in the reeding direction and has the
lendency to push the part against the table (or the fixture). • Width and Depth of Cut
Maximum (h of the chip occurs at the heginning of
the cut and upon exit, the chip is very th in. The practical re- For good machining, the width and depth of cut should
sult is that most of the generated heat is absorbed by [he correspond to the machining conditions, namely the setup,
chip, and hardening of the part is largely prevented. the type of malerial being machined and the cutting tool
used. Width of cut depends also on the number of flutes of
Do not misunderstand the words climb and down describing the cutter that are actually engaged in the cut.
the same machining direction.
Approximately one third of the diameter for the depth of
Both terms are correct, if taken in the proper context. CUl is a good ru Ie of thumb for small end milis, a IiHle more
for larger end mills.
Conventional Milling
Pcripheralillilllllg requires a solid Illachliling knowledge
Conventional milling - sometimes called the up milling - and certain amount of common sense. If a successful ma-
uses rotation of the culler againslthc feedi ng direction. and chining operation in one job is documented, it can be
has the tendency to pull the part from the table (or !he (ix- adapted to another Job with easc.
ture). Maximum thickness of the chip occurs at the end of
SLOTS AND POCKETS

for a CNC machining cenler, PROGRAMMING SLOTS


to removed from the inside of a area,
a coni our and a f]at boHom. This Slots are ofeen considered as special of
as pocketing. To have a true ,JV'''''-'''. 'grooves' usually have one or two radiJI
{he pocket boundary must be are [WO ends, they are joined by a straight groove. A
are many orher applicalions, whe((~ Ihe ma- 5101 can either open or l:josed, with the same size
from an open area, with only a par- on both ends, twO different radii, or one A
An open sIal is a good example of this cal sial that has only one end radius is a keyway.
looks at applicalions of closed pockets,
various programming techniques open Of dosed, straight,
for internal material removal. walls or shaped walls
~r'I"\rrt"lm!,Y\ slots with accuracy in
OPEN AND CLOSED BOUNDARY a
the same Lool or wilh two or
on the part material, required di-
A continuous conlour on which (he slart point and the surface finish, and olher condil
point is in a di localion, is called an open COntOI,It:
Continuous contour defined Ifl the program that starts for example keyways, can be done with
ends at (he same ' location, is a called slolli ng cullers, rather than an
From the machimng of view, the major a sJolLing cutter is usually a sllnple pro-
{ween an conI our is the CUlling IDOl w in and oul. More complex
reaches morc accurate are machined with end mills,
walls of lhe slot arc contoured under program control.
• Open
Figure a drawing of a typical open sial.
An open boundary not a true pocket. but belongs !O a
IS drawing will 10 illustrate Ihe programming tech-
Machini of this kind of a contour is niques of an
quite as the lool can reach the required depth in an
open space. Any ity end mill in different varieties
can be used Lo boundary. - - 0.21

• Closed Boundary
The excessive material within a closed boundary can be 1.77
removed in two on the cutling operation.
One way is La use an move II cowards the
outside of the boundary, another way is to use an internal
1001 and move it towards of the boundary. In both 1,8 --
cases, the actual follows, along the Olll-
side of a pari is nol pocketing but peripheral Figure '33 1
A

milling (Chapter inside or


a closed An open slot programming example 03301
boundary IS typical vanous regu-
lar and irregular Some lypical examples of regular
shape pockets are
• Open Slot Example
circular
pockets, and !>o on. can have any Before programmi any 1001 mOlion, :'Iudy [hi.: drawing.
machinable shape, bur they still use the same machining That way, the machirll ilions can be established, a~
and programming pockets. well as ~e!up and other program zero
can be determined quickly- are from the lower
One of the most commonly machined boundary shapes
left corner (XY) and lOP That
in manufacturing IS milling of a ty, u~ually quitl.!
will become lhe !"\yr' .....·""' zero.
small, called (J sIaL

281
Chapter 33
..........................................

will relate to Maximum Depth

o Number of tools The Ihe sial depth as .210.


o Tool size the depth it may 100 a single CUI,
small cuners or tough Although a
and feeds be used for full depth. some stock at the
o Maximum cooing depth should be left for finishing.

of Method of Cutting

Number of Tools Once alllhe other maChining conditions are


the melhod of CUlling almost presents itself.
or two lools can be If be positioned above a clear position and at the center
siona! lolerances are very critical or line. 1001 will fed inlo the slot depth,
CUI, use Iwo tools - one 1001 for bottom, for finishing. ln a
finishing. The tools could have the same or di ffer- out the material all
enl For [his example, only one (001 wilt be used center
for both roughing and finishing. Then It will moved back to the
and al Ihe full depth for conlouring
Tool Size
i In 33-2, the XY 1001
of the CUlling 1001 is mainly determined by the program locations are shown.
width of (he sial. In Ihe drawing, .300 radius, so
[he width is .600. l1H~re is no cutler of 0.600 - but
- even if there were - would it What about a IJ") 1.0
N r-....
inch cutter for .500 slot? 1L is possible, but o:J IJ") o:J
.,,- c0 CI'"i
the resulting cut would not quality. Toler-
ances and surFace finish would 10 conrrol. That
means choosing a 1001,
is a litlle smaller then lhe
available off-shelf, Ihar
width. the slot in the ex-
.- 1.185
ample, a 0.500 inch end choice. When se-
lecting the 1001 size, always how much stock the
LOol will leave un lilt! slul walls fur lillisllillg. Tau lIIuch
may require some semi ing cuts. Wilh the 0.500
cutler and the slOl width the amount of slock left
will be easy [0 calculate: 33-2
Contouring details for the open sial ~xnmn.'F!

create the program is nol difficult at all. The tool is in


the spindle and all typical methods throughout
are used.
t& where ...
03301 (OPEN SLUT)
S :=: Stock left on Nl G20 (INCR MODE)
W Width of slot ( slot radius times two) N2 G17 G40 GSa UP SETTINGS)
o Cutter diameter N3 G90 G54 GOO X3.87S YO.SSS 8950 Mal (START)
N4 G43 ZO.1 HOI MOS (START POSITION ABOVE)
Slock left on the in the example will be: NS GOI Z-O.2 FSO.O .01 LEFT ON n~~I'M\
N6 Xl.S F8.0 (CUT TO SLOT RADIUS CNTR)
S ::: (.600 - I 2 :::: .050 N7 GOO ZO. 1 (RETRAeI' ABOVE WORK)
N8 X3.875 (RETURN TO START)
111is is a finishing with one CUL N9 GOl Z-O.21 F50.0 TO FULL DEPTH)
NlO G4I Yl.IBS DOl FB. 0 (APPROACR CONTOUR)
Speeds and FBeds Nll Xl.8 (CUT TOP WALL)
NI2 GO) YO.SB5 RO.3 SLOT RADIUS)
Spindle speeds feed rates will depend on the Nll GOI X3. 875 BOTTOM WALL)
exact situation at machine, so the Nl4 GOO G40 YO.8SS TO START POINT)
uses a reas.onable 01'950 rlmin and culling NlS Zl. 0 M09 ABOVE WORK)
8 in/min. N16 G28 X3.87S YO.a8S ZI.O M05 (M/C ZERO)
N17 M30 PROGRAM)
%
AND POCKETS 3

example is quite self evident included block


comments will offer better of the program-
order and procedure. In this '-"'''"I.'''-, only one tool
used. For high precision two
will be better, even if it means a

• Closed Slot Example 0.885

an much.
is in eotry into the matcnal.
(001
locmion - too! has La into the
the Z axis, unless there is a hole. Figure 33-4
to use a cel1ter cUlling mill (known as Roughing operation detail for a closed slot example 03302
If this type of end mill is no! or ma-
conditions are not suitable, tool will have to ramp Internal Contour Approach
into the material, as a second method. is a linear
usually in the XZ, the YZ, or axes. In the tool is now at the center of the
of slot, ready to start cut. Climb milling mode
has been selected (he contour approached In such a
way that the tool to its left One way is the
make a straight linear cut current tool location at
the center, LO the 'south' of the left arc (while ap-
0.21 plying the cutter radius
This method works, but when approaching an inner con-
lour it is better to use a tangential approach. An internal
1 contour approached at a requires an auxiliary ap-
proach arc (so called lead-ill since the linear approach
towards the contour is not i.l
0.885 A-A
Although the tangential an arc Improves
surface finish of creates another
problem. cutter cannor be sraned
Figure 33·3 interpo/alion a non-circular
A closed slot nrfllVlln1mUlr, example 03302 to be added " two motions from the
center to the start
shown in pom[ the contour:
slot
already established will ap- o First, a linear motion with cutter radius
A 0.500 inch end mill will be o the tangential approach arc motion
a center cutting geomClTy thai allows
technique is illustrated in

Apart from the di 1001 geometry required for Ihe


plunging cut, only the method of cutting will change. a
closed slot (or a pocket), the tool has to move above work,
to a certain XY starl In example, if wJlI be the
cenler of one of the Portion of sial on the right is 1.1
selected arbitrarily. at a reduced
will be [0 the .010 on the bOftom)
and, in a linear be roughed out be-
tween the two centers -
is not nec:ess;arv it can be fed into the
final depth at same 1001 'v,",,,,,,,'V' slack is .050 all RO.28
around the slot contour. final depth, and from the
center iocalion of the of the sial, Ihe finish contour
will start Contouring more complex this lime, be- 33·5
cause the tool is in a rather spot. Detail of t",,,,,o"t,,,,1 £lllDrllach towards an inner contDur
2 33

N12 GOl Xl. 5 (CUT WALL TOP)


Nl3 G03 YO.S85 RO.3 (CUT RADIUS LEFT)
N14 Xl.78 YO.86S RO.28
N15 GOl G40 Xl.S YO.aas (LINEAR DEPARTURE)
N16 GOO Zl.0 M09 AJ30VE WORK}
Nl7 G2B XI.S YO. BaS 21.0 MOS (M!C
Nl8 IDO (END OF PR()GRlIM)
%

This program example is also a


10 approach any inside conlour
kinds (angular. circular. eic,), use
(rated in the last two examples.

POCKET MILLING
~ where ...
Pocket milling 15 also a Iyplcal and common on
RI Radius ofthe tool CNC machining centers, Milling a means to remove
R, :::: of the approach arc arc) material from an enclosed area, by
Rc Radius of the contour (slot radius) This bounded area is further by
tom, although walls and bottom could tapered, convex,
Supply some numeric data radius can
concave, rounded, and have other shapes. Walls
be calculatcd. of all
create the boundary contour. Pockets can have rec-
three radii- The slOI conlOur by Ihe
tangular, circular or undefined can be empty
dnlwing, Once the cUlling tool Ihal radius
side or they may have islands.
becomes fixed as well CRt). ap-
proach radius (Ru). Programming pockets manually is usually only
lalcd accurately_ for simple pockets, pockets of regular shapes, such as rec-
tangular or circular pockets. For pockets wilh more com-
From the formula, it is. thai
plex shapes and pockets with islands, the of a
must be greater than the culler
computer is usually required.
must be smaller Ihat the contour
the range (within
• General Principles
only increments of.O I0 are
- .260 or .290? Well, the There are two main considerations when programlTii a
rather a larger approach pockel for milling:
gential approach takes place at a
a smaller radius. The result is an o Method of cutter entry
For program 03302, .280 is as approach ra- o Method of roughing
dius. This selection meets all the three relationships:
a 10 slart mllling a pocket (into solid mate-
culler mollon has to be programmed to enter along
of spindle (2 axis), which means the cutter
center cutting to be able to plunge cut. In cases
Thai is alilhe information needed beforc wriring the pro- cut IS eHher not praetical or not possible,
gram. Note the programming similarities with the open slot ramping can be used very successfully.
listed in program 0330 I. melhod is oflen used when the center cutting 1001 is
the Z axis to be used to-
03302 (CLOSED SLOT) or This motion will,
N1 G20 (INCH MODE)
or a 3 axis linear motion.
N2 G17 G40 GaO (STARTUP SETTINGS)
N3 G90 G54 GOO X3.0 YO.SSS 5950 M03 (START)
it
N4 G43 ZO.l HOl MOS (START POSITION ABOVE)
N5 GOl z-O.2 F4.0 (0.01 LEFT ON EOTTOM)
N6 Xl.5 F8.0 (CUT TO SLOT RADIUS CENTER)
N7 Z-O.21 F2.0 (FEED TO FULL DEPTH) V'-,111\.1II where to
NS 041 Xl.22 YO.86S DOL F8.0 (LINEAR APPROACH) so is the widTh
N9 G03 Xl.S YO.585 RO.28 (CIRCULAR di to in climb
NlO GOI X3. 0 (CUT BOTTOM WALL) milling mode. It may he difficult 10 I~flve eX:'lctly the same
Nll G03 Yl. 185 RO. 3 (CUT RIGHT SLOT RADIUS) amount in the pockeL
AND POCKETS 5

Many cuts will be irregular and s[Ock amount will not illustrate the complete
even. thaI reason, it is quile common 10 tooling selection is Important. Material is
nishing cut of the pocket contour, before lant and so are other machining rect-
cut place. One or more tools may be pockets are often drawn with sharp corners, they
situation, depending on exact requirements. always have COrners of the tool when
The corners in the drawing are ), and
typical methods for roughing a are: 6 center CUlling end mill (0.3125).
o may a good choice, but for finishing, the
a lillie smaller so the tool can actually cur in comer,
o - from the inside of the pocket out not rub there. Selection of a 0.250 end mill is reason-
o One direction - from the outside of the pocket in and will be used it in the example.

other pocketing options are all the material in lhe enclosed area has to re-
as a true spiral, morph, one way, and moved (including the bottom), think about aU
cases, there is a choice of speci fying Ihe an- where the cutting tool can enter into the
cut, even a user selected point of entry and ti or ramping. Ramping must always be done in a
overs. Manually, these more complex methods may area, bUl plunging can be done almost anywhere.
as well, but it may be a very tedious work. are only two practical locations:
o center
• Pocket Types
o Pocket corner
The most common are also the easiest to
gram. They all have a regular shape, without any islands: to both selections and the inevi-
at the pocket center, the tool
o Square pocket path and, after the initial cut,
o Rectangular milling orconventional milling mode.
more math calculations involved in Ibis
o Circular method, starling at the pocket corner, is
are ar as well, but uses a zigzag motion, so one Cllt
Square
tally the same their side lengths, n a climb milling mode, the other cut will be in a
there IS no in programming. machining. It is a little easier for cal-
In the eX<.Impk, the corner will be used
RECTANGULAR POCKETS
Any corner pocket is equally suitable for the start.
Rectangular and are quite easy to pro-
IJV''''''-''''
In the 03303. the lower lefr corner of
p<!rticularly jf are parallel 10 the X or Y axes. As pocket will
an example of a pocket, the one illustrated in """""rw,Cl"" factors the programmer has Lo
Figure 33-6 will be start location for the CUlling tool in
an ...... "J"..,u area:
0.15 -a- --- o Cutter diameter (or radius)

I
o Amount of left for finishing
t o Amount of stock for semifinishing

dimensions of the pan, as


2,5 are length, the width, and
the corner pocket - they must always
"._,,-.- - - - - ' - - - - ' \
be known, as well as position and its orientation
to other elements

In the Figure 33-7, the point is identified as X I


0.5 I
0.5 r- and Y 1 distance from corner (lower left), and all
'"'l

-- R5/32 additional data are


The letters identify
as well

Figure 33-6 the programmerl'hrV\-C''''C


Sample drawing of a rectangular program 03303
L
D - -
I
L

s
c w w
t
I
I
Q
'- r Y1
Y1 T
f c t- I .
Xi;--

33-7 Figure 33·8


Pocket roughing start the comer· method Result of a zigzag pocketing, without a semifinish cut

I.l$' The of the description letters is :


• Stepover Amount
XI X location of tool at start
V\ Vlocation of tool at start
TLR Tool radius diameter / 2)
L::;:: length as per drawing
W Pocket width as per drawing
Q = Calculated stepover between cuts
o Calculated length of actual cut
S Stock left for finishing
C = Stock left for semifinishing (clearance)

• Stock Amount
are two stock amounts (values) - one relates to (he
finishing operation. usually done with a separate finishing than slepover will
tool, the other one relates to the semifinishing operation. cuts (zigzag lype). There is
usually done with the roughing tool. The cuner moves back number of culS is se-
forth in a zigzag direction, leaving behind so number:
scallops. In 20 work, [he word 'scallops' is to
uneven wall surface caused by lhe tool shape, and is o number of cuts will terminate the roughing
on the opposite side of the pocket relative
in 3D cUlling as well. The result of such a zigzag to the start location
is generaHy unacceptable ror the finish machining. JeA ..m,",c
of the difficulty of maintaining tolerances and surface o number of cuts will terminate the roughing
wh de culting uneven stock. on the same side of the pocket relative
to the start location
avoid possible cUHing problems later, a secondary
operation is often necessary. It is to Practically, it does not matter which corner is 10
elimmate the scallops. Choose semifinishing cut start at or in which direction the rUS( cut begins. What mat-
machining tough materials or when ters is that the stepover is reasonable and, preferably,
Semifinishing allowance. for all cuts. There is a simple way of calculating the
as the C val ue in the ill ustralion, can to zero. 1f over, based on a given number of cuts. [f the
thai IS case, it means no additional is amount is loa small or 100 large, just repeat the calculation
Typically al 11 a small value. wilh u different number of cuts N.

Figure 33-8 illustrates The calculation can be expressed in a formula:


of a rectangular pockel,
(he uneven stock (scallops)
high spots create the
tool, so semifinishing tool
SLOTS AND POCKETS

In the formula, N is stepovers and L


all other U"'~ULJ'b as before. L1
END
Q Example:
Il"'n,',,,,..,<.; are on
tool 0.250 (TLR START
S as 0.025 and semifrnishing stock -1-'-"- C
will

Q: .5 - 2 x 0.125
Q = 0.2360
2 x 0.025 - 2 x 0.01) / 5
,
Y1
..

-....., X11--

figure 33·9
Semifinishing tool path at the last roughing location,
to use the pocket
lJl'-J'LLLLL\.. U
and leaves equal stock for 11I.....hlf.,., operation
width. This be a better
is narrower along the X axis, than it is

-2x5
• length of Cut
il'''LU>.~,the length, the incremental dis- W 2x - 2x 5
to be calculated.

fonnula to calculate the length of Q


similar to Ole stepover calculation:
Ll ;;;;; 2.0 2 x 0.125 2 x 0.025
L1 == 1.7000

W1 ::::; 1.5 - 2 x 0 125 2 x 0.025


In example, the D value will be: W1 1 2000
Q Example: • finishing Tool Path
D 2.0 - 2 x 0.125 - 2 x 0.025 - 2 x 0.01 is roughed out and semifirtished, another
D 1. 6800 tool (or even same tool in some cases) can be to
pocket to its fmal size. TIlis programmed tool
is the incremental length of cut between the will typically provide offsets to maintain maCninl!Jlg
overs cutter radius offset has been used). Tolerances and speeds and feeds to maintain required sur-
finish. Typical staJiing tool position for a small to me-
• Semifinishing Motions dium pocket is at its center, for a large pocket the
purpose of semifmisbing motions is to position should be at the middle of the pocket, away
nate uneven stock. Since the semifmishing will be nor .. one of the walls, but not too far.
the same tool as the roughing For the fmish.ing cut, the cutter radius offset should
to start cuts is the mainly to gain flexibility in maintaining tolerances
roughing sequence. In case, it was during machining. Since the cutter radius offset cannot
corner of the pocket. Figure 33-9 started during an arc or a circular motion, linear .
the Start to (of lead-out motions have to be added. Tn Figure 33-10 is
The length LI and WI are illustration of a typical fmishing tool path for a
between the Star! position pocket (with the start at the pocket center).
value, along both axes. conditions do apply in these cases. One is that
The fonnula for the leading arc radius must be calculated, using the
cut, its actual cutting distance, is same method as for slots:
288 pter 33

03303 (REcrANGUI.J\R POClCET)


Nl G20
N2 G17 G40 G8Q TOl (.250 ROUGHING SLOT DRILL)
!Iii' where N3 M06
N4 G90 G54 GOO XO.66 YO.66 S1250 M03 T02
NS G43 ZO.l HOl MOB
Ra ;:::: Radius of the approach arc
N6 G01 Z-O.15 F7.0
Rt Radius of the cutting tool
( - - ROUGHING START ------)
Rc Radius of the corner
N7 G91 X1.68 FlO.D
N8 YO.236 (STEPOVER
.------.~ ... ~. - L ................. .......
~ ~--
N9 X~l. 68 F12 _0 (CUT
NIO YO.236 CJ:'vv""",," 2)

N11 X1.68 3)
N12 YO.236 3)
N13 X-l. 68 4)
N14 YO.236 (STEPOVER 4)
NlS Xl. 68 S)
N16 YO.236 5)
N17 X-1. 68 6)
w (- - SEMIFINISH START -------- ---------- )
NIB X-0.01 (SEMIFINISH STARTUP X)
N19 Y-O,OI (SEMIFINISH STARTUP Y)
N20 Y-1.l9 (LEFr Y-
\ N2l Xl. 7 (RIGHT X+ MOTION)
N22 Y1.2 (up Y+ MOTION)
Ra N23 X-l. 7 (LEFI' X- MOTION)
Rc TYP.
N24 G90 GOO ZO.l M09
N25 G28 ZO.l M05
33·10 N26 MOL
Typical tool path (or a rectangular pocket
N27 T02 (.250 FINISHING END MILL)
of Iii CUI is N28 M06
mode and the radius offset N29 a90 G54 GOO Xl.S Yl.2S 51500 M03 TOl
N30 G43 ZO.l H02 MOB
of the contour. N31 GOI Z-0.15 F12.0
o Example: (--
N32
FINISHING POCKET ----------------- - ----)
G9l a41 X-0.37S Y-0.37S D02 FlS.O
N33 G03 XO.37S Y-0.37S RO.37S F12.0
To calculate the approach N34 GOI XO.8437
drawing, start with the corner N3S G03 XO.1S63 YO.1563 RO.1563
5/32 (.1563) and the lOol N36 GOl n.1874
so the condition R, < N37 G03 X-0.1563 YO.1563 RO.1563
the condition R" > Rr. N38 GOl X-l.6874
larger than (he 1001 as N39 G03 X-0.l563 Y-O.lS63
pocket length and width are N40 GOl Y-l.lB74
possible, choose the approach N4I GO) xO 1563 Y-O.lS63 RO.1563
N42 XO.8437
pockel widlh W, for a lillie N43 a03 XO.375 YO.375 RO.375
In (he example, N44 GOl G40 X-0.37S YO.37S FlS.O
N45 G90 GOO ZO.l M09
Ra. = W / 4 .. 1.5 / 4 N46 G28 ZO.l MOS
Ra. c: .375 N47 X-2.0 YlO.O
N48 M30
Condition is satisfied, the %
the tool radius, and can be
the progrrun carefully. It follows all the decisions
• Rectangular Pocket Program and offers many details.
Once all selections and decisions have been done, In the program, blocks N 17 and N 18 can be joined to-
program can be wrillen for Ihe pockel in into a SI block. The same applies to blocks N 19
Two lOols will be used, bmh 125.250 end mills, N20. They are only separated for the convenience of
cuuer must be able or center cUlting. Ihe tool mouons to match the llluslrations. There is
lower left corner of the parI. All In using the incremental mode of program-
tlnishlng steps art! documented in the program. mode would have beenjust as easy.
SLOTS AND POCKETS 289

CIRCULAR POCKETS
'1I
The olher common types of pockets are so called circular
or round pockets. Although the word pDcket somehow im-
plies a closed area with a solid boHom. the programming
method relating to circular pockets can also be used forcir- o
cular openings that may have a hole in the middle. for ex-
ample, some counterboring operations. I
J
To illustrate a practical programming application for a
circular pockel, Figure 33-11 shows the typical dimensions
Condition:
of such a pocket. -, d -
d<O
f--------- 2.0 -.--------,

I d > o
3
Figure 33-12
Relationship of the cutter diameter to the pocket diameter
2.0

For example, the pockel diameter in the sample drawing


01.500 is 1.5 inches. Using lhe formula, select a plunging cutter
(center cutting end mill), that has the diameter larger than
1.5/3, therefore larger than .500. The nearest nominal size
suitable for cutting will be 0.625 (5/8 slol drill).

• Method of Entry
The next step is to determine the method of the tool entry.
Figure 33·11 In a circular pocket, the best place to enter along the Z axis,
is al the center of lhe pocket. ff the pocket center is also the
Sample drawing of a circular pocket (program examples 03304-06)
program zero XOYO, and the pocket depeh is .250, the be-
ginning of lhe program may be similar to the following
In terms of plann ing. the first thing to be done is the selec- example (culting tool placed in the spindle is assumed):
tion of the culler diameter. Keep in mind, that in order to
make the pocket bottom clean, without any residual mate- 03304 (CIRCULAR POCKET - VERSION 1)
rial (uncut portions). it is imporlan[ to keep the stepover N1 G20
from one cut to another by a limited distance that should be N2 Gl7 G40 G80
calculated, For circular pockets, this requirement influ- N3 G90 G54 GOO XO YO S1200 M03
ences the minimum cutler diameter thal can be used [0 cut N4 G43 ZO.l HOl MOS
the circular pocket in a single 3600 cut. N5 GOl Z-0.25 F8.0
N6
• Minimum Cutter Diameter In the next block (N6), the cutting tool will move from
In the following illustration - Figure 33-12, the relation- [he pocket center towards the pocket diameter, and apply
ship of the cutter diameter to the pocket diameter is shown. culler radius offset "long the way, ThiS motion call be done
There is also a formula that will determine the minimum in two ways:
culler diameter as one third of the pocket diameter. The o As a simple straight linear motion
mi lIing wi 11 start at the circular pockel center, with a si ngle
360" tool motion. In practical terms, selecting a cutter o As a combined linear motion with a circular approach
slightly larger thall the minimum diameter is a much better
choice. The major benefit of this calculation is when the • linear Approach
pocket has to be done with only one tool motion around.
The linear departure from the pocket center can be di-
The formula is still valid, even if cutting will be repeated
recled inlo any direction, but a direction lowards a quadranl
several times around the pocket, by increasing the diameter
point is far more practical. In the example. a motion along
being cut. In that case, the formula determines the maxi
the Y positive direction is selected, into the 90° position.
mum width of the cut.
290 Chapter 33

Along the way, cutter radius offset for the climb milling N8 GOl G40 YO FlS.0
mode G4! is programmed, followed by the full 3600 arc' N9 G28 Z-0.2S M09
and another straight motion, back towards the center. Dur- mo G91 G28 XO YO MOS
N1l M30
ing this motion, the cuttcr radius offset will be cancelcd.
%
Figure 33-J3 shows the tool path.
Another programming technique for a circular pocket is
-.
, 2.0- much morc practical - one Ibal makes better surface fin-
ishes and also maintains tight tolerances required by many
drawings. Instead of a single linear approacb directly to-
wards lhe pocket diameter, the CUlling tool can be appJied
in a combi ned Itnear-circular approach.

2,0 • linear and Circular Approach


For this method, the cutting motion will be changed.
Ideally, a small one half-arc motion could be made between
01.500
the cenler and the pocket start point. That is possible only if
i. J the culler radius offset is /lor used. As a matter of fact, some
controls use a circular pockel milling cycle G 12 or G 13,
doing exactly that (see an example laler in this seclion). If
Figure 33-13 the,o Fanuc control has the optional User Macros, custom
Linear approach for a circular pocket milling - program 03304 rnide G 12 or G 13 circular pocket milling cycle can be de-
veloped. Otherwise. a step-by-step method is the only way.
The graphic representation can be followed by a corre- one block at a time.
sponding program segment - approach a quadrant point.
profile the full arc, then return back to the cenler: Since the radius offset is needed to maintain tolerances,
and the offset cannot start on an arc, a linear approach will
N6 G41 YO.7S 001 FlO.O be programmed first with the culter radius offset applied.
N7 G03 J-O. 75 Then, lhe circular lead-in approach is programmed. When
N8 GOI G40 YO F1S.0 the pocket is completed, the procedure will be reversed and
Ihe rilriillS offset c:mcelerl rluring rI linear motion back to the
Now, the tool is back al lhe pocket center and the pocket
pockel center, The approach radius calculation in this ap-
is completed. The tool must also retracl first. then move to
plication is exactly the same as described earlier in Ihis
machine zero (G28 motion is always in the rapid mode):
chapler, for the slot fLnishing tool path. Figure 33-14 shows
the suggested tool path.
N9 G28 Z-0.2S M09
NI0 G91 G28 XO YO M05
N11 M30 ~- - 2.0 ""_m -~I
%
RO.625
Tbis method is very simple, but may not always be the
best, particularly for very close tolerances or high surface
finish requirements. Drawing tolerances may be achieved 0.125
by roughing operations with one 1001 and finishing opera- L_
tions with one or more addilional tools. A 2.0

A possible surface (oo! mark, lefl al the contact point with


the pocket diameter, is a distinct possibility in a straight ap-
proach to the pocket diameter. The simple linear approach
01.500 1
is quite efficient when the pocket or a counterbore is not too
critical. Here is the complete listing for program 03304:
Figure 33-14
03304 (CIRCULAR POCKET - VERSION 1) Combined linear and circular approach for a circular pocket milling·
N1 G20 - program example 03305
N2 G17 G40 G80
N3 G90 G54 GOO XO YO S1200 M03 This example uses an approach radius of .625. Any radius
N4 G43 ZO.l HOI M08
that is greater than the culler radius (.3125) and smaller
N5 GOl Z-0.2S FS.O
N6 G41 YO.7S DOL FIO.O thall lite pocket radius (.750) is correct. Tbe final program
N7 G03 J-O. 75 O:S305 complements the above illustration in Figure 33 -14
SLOTS AND POCKETS 291

03305 (CIRCULAR POCKET - VERSION 2) The calculation is logically similar to the one for the rec-
N1 G20 tangular pocket and the desired amount of the stepover can
N2 G1. 7 G40 Gao be achieved by ch.anging the number of steps.
N3 G90 G54 GOO XO YO S1200 M03
N4 G43 ZO.1 HOI MUS The example for program 03306 uses three stepovers,
NS GOl Z-O.25 FB.O calculated from the following formula:
N6 G4l XO.625 YO.125 DOl FlO.D
N7 G03 XO YO.7S RO.625
N8 J-O.75 R - TLR - S
N9 X-0.625 YO.125 RO.625 Q ==
NlO GOI G40 XO YO F1.5.0 N
N11 G28 Z-O.25 M09
Nl2 G91 G28 XO YO MOS l@f where ...
m3 IDO
% Q Calculated stepover between cuts
R = Pocket radius (pocket diameter 0/2)
This programming technique is by far superior to the TlR = Tool radius (cutter diameter /21
straight linear approach. It does not present any additional S Stock left for finishing
programming difficulty at all, partly because of the sym- N = Number of cutting steps
metry of tool motions. In fact, this method can be - and
should be - used for just about any approach towards an in- In aUf application. {he example values are:
ternaJ contour finishing.
o Example:
• Roughing a Circular Pocket
R = 1.S / 2 = .75 Diameter D =. 1.5
Often a circular pocket is too large for a given tool to TLR = .375 / 2 = .1875
guarantee the bottom cleanup in a single cut around. In this S .025
case, the pocket has to be enlarged by roughtg it first, in N = 3
order to remove all excessive material, then the finishing
tool path can be applied. Some controls have special cycles, Using Ihe above formula, the stepover amount Q can be
for example, a spiral pocketing. On Fanue conlrols, custom found by calculation:
cycles can be created with the User Macros option.
Q = (.75 - .1875 - .025) / 3
As an example, the same pocket drawing will be used as Q = .1792
illustrated earlier in Figure 33-11, but machining will be
done with a 0.375 cutter - Figure 33-15. Final roughing program is quite simple and there is no
cutter radius offset programmed or even needed. Note the
r- D benefit of incremental mode G91. It allows the stepover Q
to be easily seen in the program, in the GOl linear mode.
Every following block contains the arc vector J, cutting the
TI next full circle. Each circle radius (1) is increased by the
--Q amount of stepover Q:
R
I
L 03306 (CIRCULAR POCKET ROUGHING)
N1 G20
N2 G17 G40 GSO
N3 G90 G54 GOO XO YO 51.500 M03
-S N4 G43 ZO.l HOI M08
TLR ./ N5 GOI Z-O.2S F7.0
N6 G9l YO.1792 F10.O (STEPOVER 1)
N7 G03 J-O.1792 (ROUGH CIRCLE l)
N8 GOl YO.1792 (STEPOVER 2)
Figure 33-15 N9 GO) J-O.3584 (ROUGH CIRCLE 2)
Roughing our a circular pocket - program 03306 mo G01 YO.1792 (STEPOVER 3)
Nll G03 J-O.S376 (ROUGH CIRCLE 3)
The 0.375 end mill is a small loolthal will not cleanup Nl2 G90 G01 XO Fl5.0
the pocket bottom using the earlier method. The method of Nl3 G28 Z-O.2S M09
roughing is shown in Figure 33-15, and the value ofQ is the Nl4 G9l XO YO MOS
m5 M30
equal stepover amount, calculated from the number of %
steps N, the cutter radius TLR and the stock amount S, left
for (he fmishing tool path.
292 Chapter 33
----------~--~ .............. .

CIRCULAR POCKET CYCLES

In Chapter 29, circular pocketing cycles were described


briefly. In this chapter, two more examples will provide ad-
ditional details. Fanuc does not have the useful G 12 and
G13 circular pocketing cycle as a standard feature. Con-
lIols thaI do have it, for example Yasnac, have a built-in
macro (cycle), ready to be used. Fanuc users can create
their own macro (as a special G code cycle), with the op-
tional User Macro feature, which can be developed to offer
more flexibility than a built-in cycle.
G12 G13
The two G codes are identical in all respects, exceptlhe a, bl
cutting direction. The meaning of [he G codes in a circular
Figure 33-16
pocket cycle is:
Circular pocket cycles G72 and G13

G12 Circular pocket cUlling CW


N2 G17 G40 GBO
G13 Circular pocket cutling CCW N3 G90 GS4 GOO XO YO S1200 M03
N4 G43 ZO.l HOl M08
NS GOl Z-O.25 FB.O
Either cycle is always programmed with the G40 cutler N6 G4l XO.625 YO.125 001 FlO.O
N7 G03 XO YO.7S RO.62S
radius offset cancel mode in effect, and has the following
N8 J-O.75
formal in the program: N9 X-0.625 YO.125 RO.625
NlO GOl G40 XO YO F1S.0
G1/. l.. D.. F.. (CONVENTIONAL MILLING) Nl1 G28 Z-0.2S M09
Nl2 G91 G28 XO YO MOS
or Nl3 M30
%
G13 1.. D.. F.. (CLIMB MILLING)
If the G 12 or G 13 cycle or a similar macro is available,
!& where ... the following program 03306 can be written, using the
same tool and climb milling mode:
I Pocket radius
o ;: ; Cutter radius offset number 03306 (CIRCULAR POCKET - Gl3 EXAMPLE)
F ::::: Cutting feed rate N1 G20
N2 G17 G40 G80
Typically, the cycle is called at the center and the bottom N3 G90 G54 GOO XO YO S1200 M03
of a pocket. All cutting motions arc arc motions, and there N4 G43 ZO.l HOI MOB
are three of [hem. There are no linear motions. The arbi- NS GOI Z-0.25 F8.0
tfary start point (and end point) on the pocket diameter is at N6 G13 IO.75 D1 FIO.O (CIRCULAR POCKET)
0° (3 o'clock) - Figure 33-16. N7 G28 Z-0.25 M09
Na G91 G2B XO YO MOS
Previous example in Figure 33-11 can be used to illus- N9 M30
trate the G 12 or G 13 cycle. For comparison, here is (he pro- %
gram 03305, using a 0.625 end mill:
Macros are very powerful programming tools, but their
03305 (CIRCULAR POCKET - VERSION 2) subject is beyond Ihe limits of this handbook.
Nl G20
TURNING AND BORING

There is so much information that can be covered in Ihis Txxyy format represents tool station xx and wear offset
section. that a whole book could be written just on the sub- number yy. For example, T0202 will cause the turret to in-
ject of turning and boring. Selected subjects are presented dex to the 1001 station #2 (first two digits) which will be-
in this chapter, others are covered in chapters dealing with come the working station (active toot). At the same lime,
lathe cycles, groovi ng, part-off, single poinllhread ing, etc. {he associated tool wear offset number (the second pair of
digits) will become effective as well.
TOOL FUNCTION - TURNING Selection of the 1001 number (the first pair of digits), also
selects the geometry offset on most modern CNC lathes. In
In terms of distinction, turning are boring are practically that case, the second pair of digits will select the tool wear
identical operations, except for (he area of metal removal offsel number. Any tool station selected by the turret station
where the actual machining takes place. Often, terms ex/er- number identification can be associated with any offset
nal fUming and internal turning are also used, meaning the number within the available offset range. In mosl applica-
same as turning and boring respectively. From program- tions, only one tool offset number is aclive for any selected
ming perspective, the rules are vinually the same, and any 1001. In such a case, it is wise to program the offset number
signi ficant differences wi]] be covered as necessary. the same as the 1001 number. Such an approach makes the
opera lor's j ob much east er. Consider the f oj low j n g ch oices:
CNC lathes require programming (he selected tool by its
tool number, using the T address. In comparison with a
GOO T0214 Tool slation 02, Ivearoff;el 14
CNC machining center, the tool function for lathes is more
extensive and calls for additional details. One major differ- 10 TllOS Tool slation JI, wear offset 05
ence between milling and turning controls is the facl that GOO T0404. Tool SUI/ion 04, wear offset 04
the T address for CNC lathes will make the actuaL tool
change. This is not a case in milling. No M06 function ex- Although all examples are technically correct, only thc
ists on a standard CNC lathe. last example format is recommended. When many tools are
used in a program, the offset numbers for individual tools
• T Address may be confusing, If they do nOl correspond to the tool Sfa-
tion numbers. There is only one ttme when the offset num-
One difference from machining centers is that a tool de- ber cannot be the same as the lool station number. That
fined as TOl in the program must be mounted in the lurret happens in the cases when /1-tlO or more offsets are assigned
station # I, tool defined as T 12 must be mounted in turret to the same tool, for example T0202 for [he first wear off-
station #12, etc. Another difference between milling and set, T0222 for the second wear offset.
turning tools is in the forma/ of the T address. The format
for turning system is T4, or more accurately, T2+2. The Leading zeros in the tool function can be omitted for the
first two digilS identify the turret station number and geom- tool number selection, but not for selection of the wear off-
etry offset, the last two digits identify the wear too! offset set number. T0202 has the same meaning when written as
number for the selected tool stat ion - Figure 34-1. T202. Eliminating the leading zero for tool wear offset will
result in an incorrect statement:
n2 means T0022, which is an illegal formal.
In summary, the active side of the turret (tool station) is
TiX,XYIY
"T-
...~[ Tool WEAR offset.. programmed by the first pai r of dlgtts, the wear offset num-
ber is programmed by the last pair of digits in the tool func-
tion command:

~ Turret station number GOO TQ404


& Tool GEOMETRY offset The most useful preference is to disregard the leading
zero suppression and use the tool function in its full formm,
Figure 34-1 as shown above and in an
examples in this handbook.
Typical tool function address for eNC lathes

293
294 34

lATHE • Offset Entry


The tool offset can be entered into the ....rr\lYr,,", two
to some extent covered ferent ways:
the tool function, II is a
o As a command Independent of the tool
"y<;tem<; and <;ome re-
o As a command applied simultaneously
with a tool motion statement
each tool as the ac-
point 10 ill~program • Independent Tool Offset
value and
For an independent offset entry in the the tool
offsetis applied together with the rooiutV,c...<.,"'x

N34 GOO T0.202

This command is usually programmed as the


for each tool (in a clearance position). If po-
sition register is used, the offset is together
importance of 1001 wear off- with. or immediately following, coordinate register
that does not use it All pro-
r"\rr,or":\rTI
block. At this point, the tool is still at indexing position.
are ideal values, based on the draw- When the tool il will cause a physical
are not considered, neither is as in the offset reg-
deviation from programmed dimensions before the tool
tool will produce an incorrect di- command. since it will
part is a very important con- to actually take place.
with lighllolerances. The tool wear offset is but should be pro-
tune' the actual machined dimensions against S, ' control
dimensions. control when the power is turned
of the 1001 wear offset is to adjust the differ- usually assumes
ence the programmed dImensions and the actual at the start up, a
LOul positioll OI! the pan. If (he wear offset is not available it looks rather absurd
on the control, (he adjustments are made to the only it is correct Rapid mo-
- thaI is to the geometry offset. that depending on the
the GOO command

TURRET AT
MACHINE

X GEOMETRY OFFSET
( Diameter is negative]

Figure 34-2
Geometry offset is the distance from tool reference to program zero, measured along an axis from machine zero
TURNING AND BORING 295

• Tool Offset with Motion Also note that no GOO is required for a block containing
The second method is to program the wear offset simulta- tool indexing with zero wear offset entry. The advantage of
neously with a cuuing tool motion, usually during the tool programming the tool offset simultaneously with a motion
approach towards the part. This IS the preferred method. is the el imination of the jumpy motion; at the same lime, no
The following two examples illustrate this recommended overtravel condition will result, even if the wear offset is
programming of the T function for turning systems - the unusually large. The wear offset value will only extend or
shorten the progranuned rapid approach, depending on the
offset is activated when the second pair of digits in a tool
actual offset amount stored.
number call are equal to or larger than 01:
Generally, the tool wear offset register number is entered
N1 G20 T0100 before or during the rapid approach motion.
N2 G96 S300 M03
N3 GOO X .. Z .. T010l MOS
• Offset Change
Most lathe programs require one offset for each tool. In
Note the tool change in the first block N 1 - it uses no off-
some cases, however, the program can benefit if two or
sel number - just lhe tool number that is also the geometry
even more offsets are assigned to the same tool. Needless [0
offset number. The offset is applied two blocks later in N3.
say. only one offset can be active at one time. The current
In most cases. it makes no difference, whether the offset offset can be changed La another offset for the same tool to
is activated with or without a motion command. But some achieve the extra fleXibility. This is useful mainly in cases
limitations (Ire possible when programming the 1001 offset when individual diameters or shoulder lengths must be ma-
entry without a molion command. For example, If the wear chined to ex.act tolerances. Any new offset must be pro-
offset value stored is unusually Jarge and the tool starts grammed without a cancellation of the previous one. Tn
from the machine zero posicion, this type of programming fact, this is [he preferable method for changing from one
may cause an overtravel condition. offsel (0 another. The reason is simple - remember that any
offset change serves a purpose only during actual cutting.
Even in cases of a small offset value, there wi Il always be Offset cancellation could be unsafe if programmed during
a 'jump' motion of the turret when the offset is activated. cutting mOlion. This is a very important - and largely unex-
Some programmers do not like this jumpy motion, al- plored programming technique - that some detailed exam-
though it will do no harm to the machine. In these cases, the ples are justified.
besl approach is to activate the tool wear offsct during the
tirst motion, usuaJJy as a rapid approach motion towards
the part. One consideration is very important when the tool
MULTIPLE OffSETS
wear offset is activated together with a motion. Earlier In
this chapter was a comment that the lathe 1001 function is Most jobs machined on CNC lathes require very high
also a function causing the tool indeXing. Without a doubt, precision. High precision requires tolerance ranges as
the one situation La avoid IS the Simultaneous toolllldexino specified in the engineering drawing and these ranges may
and 1001 motion - it may ~ave dangerous consequences. '" have quite a variety. Since a single offset per toot is of Len
not enough to maintain these tolerances, two or more wear
The best approach is to start each lOa! with the too! index- offsets are required for one tool.
ing only, \vilhoU! any wear offsel:
The follOWing three examples are designed to present a
N34 T0200 M42 complete understanding of the advanced subject covering
mulliple offsets. The same basic drawing will be used for
The above example will register the coordinate selling for all examples.
tool 2, it will also index tool 2 into the working position, but
it will/wI activate any offset (T0200 means index for {ool 2 The project IS very simple - program and machine three
without tool wear offset). Gear range function may be diamelers as per drawing, and maintain colerances at the
added as well, if required, Such a block will normally be same time. One rule at the beginning - the program will no/
followed by (he selection of spindle speed, and rapid ap- lise the middle tolerance of the X or Z value. This is an un-
proach to the first position, close to the part. That is the fortunate praclice that makes changes to [he program much
block where the tool wear offset will be activated - on [he more dirficul[ at a later time, if lhe tolerances are changed
way towards the first posilion: by engineers or designers.
In the drawings, the following tolerances can be found:
N34 T0200 M42
N35 G96 5190 M03 o Tolerances only on the diameter
N36 GOO G41 X12.0 ZO T0202 MOB
N37 GOI Xl.6 FO.OOa o Tolerances only on the shoulders (faces)
o Tolerances on the diameters and shoulders
2 Chapter 34

• General Here is the complete - 03401.


are training pur-
03401
in reality. All chamfer (1. S ALUMINUM BAR - EXTEND 1. 5 FROM
tolerances are
on the project. Mate- (TOl - FACE AND ROUGH TIJRN)
tools are used: NJ.G20
N2 G50 S3000 TOIOO
N3 G96 5500 M03
TOl For the face and rough contour N4 GOO G41 Xl.7 ZO TOIOI MOB
N5 G01 X-O.07 FO.OOS
T03 For the of the contour to size N6 ZO.l
N7 GOO G42 XI.55
0.125 wide part-off too! N8 G71 P9 Q16 UO.04 WO.004 DIOOO FO.01
T05
N9 GOO XO.365
NlO Gal XO.62S Z-O.03 FO.003
Nll Z-O.4
Nl2 Xl.O C-0.03 (K-O.03)
Nl3 Z-O.75
Nl4 Xl.375 C-O.03 (K-O.03)
Nl5 Z-l. 255
Nl6 UO.2
Nl7 GOO G40 XS.O ZS.O TOIOO
Nl8 MOL
• Diameter Tolerances
(TOl - FmISH TIJRN)
The drawing in Figure 34-3 N19 GSO 53500 T0300
variable tolerances only on the (-- OFFSET 00 AT THE START OF THE TOOL ------)
mo G96 8750 M03
N21 GOO G42 Xl.7 ZO.1 T0313 MOB
( OFFSET 13 FOR THE 0.625 DIAMETER --------)
N22 XO.365
o o N23 G01 XO.625 Z-O.03 FO.002
1.0 o N'24 Z-O.4
I"- '<:t
ci c:i N2S Xl.a C-O.03 (K-O.03) T0314
(- OFFSET 14 FOR THE 1.0 DIAMETER ----------)
m6 Z-O.75
N27 Xl.37S C-O.03 (X-O.03) T03l3
(-- OFFSET 13 FOR THE 1.375 DIAMETER -------
N28 Z-1.255
N29 UO.2
NJO GOO G40 XS.O ZS.Q T0300
(-- OFFSET 00 AT THE END OF TOOL ------------)
NJl MOL

- 0.125 WIDE
I
L~ __ ~~ __-+________________ ~ NJ2 TOSOO
""' 0.03 x 45° (3) NJ3 G97 S2000 MO)
N34 GOO X1.7 Z-1.255 T0505 MOB
N3S Gal Xl.2 FO.002
Figure 34-3 N36 GOO Xl.4S
Multiple offsets· I::AOIIII)II:: for diBmeters • 03401 lO7 Z-1.1825
lOB GOl Xl.31S Z-1.25 FO.OOI
programming solution is to include ltvo offsets for N39 X-O.02 FO.0015
for example, T0313 and T0314. In the I'Ann-t'l\
"""H"UF" N40 GOO XS.O
correct amounts have to be set before machining- N4l Z5.0 TOSOO M09
amounts for middle toler.ance are shown: N42 MlO
%
13 X-O.003 ZO.OOO
14 X+O.003 ZO.OOO TItis is the complete
quired. Since TOI and not
shoulders) must be ing examples, only T03 will be shown now on.
TURNING AND 7

o
o
o I.l) o
N I.l)
..- 1"-
IS! ci

1
,
t
·-,--0.03 X 45" (3)

34~4 34·5
Multiple offsets ~ f!){RfDDIP. for shoulders - 03402 Multiple offsets F!ltJ'J,mnlll for diameters and shoulders - 03403

• Shoulder Tolerances • Shoulder Tolerances


drawing shown in Figure 34-4 illustrates shown in Figure 34-5 illustrates
part with variable tolerances specified only on tolerances specified on both
shoulders.
programming solution is to include (WO is to include four offsets for
finishing. for example T0313 and T0314. In the control, 13, T0314, T0315 and T0316. In
their amounts have to be set before machining - the amounts have to be set before machining -
amounts for middle tolerance are shown: amounts middle tolerance are shown:

13 XO.OOOO Z+O.0030 13 X-O.0030 Z+0.0030


14 XO.OOOO Z-O.0030 14 X+O.OO30 Z+O.0030
15 X+O.0030 Z-O.0030
Note that in this case, the X offset (which controls 16 X-O.0030 Z-O.0030
the diameters) mUSl be the same for both offsets.
T03 for progra~03402: is the most intensive version. Not only Lt IS ex-
important where exactly [he offsets appear in
03402 but their input amount is also critical.

(T03 - FINISH TURN) Note thalthe four X offsets (which control size
N19 GSO S3500 T0300 meters) lie up wilh the four Z offsets (which control
( - - OFFSET 00 AT THE START OF TOOL icngth of shoulders). Here is the T03 for program
N20 G96 5750 M03
N21 GOO G42 Xl.7 ZO.l TOl13 MOS 03403
( - OFFSET 13 FOR THE O. 4 SHOULDER
N22 XO.365 (TO) - FINISH TURN)
N23 G01 XO.625 Z-O.03 FO.002 NQ9 Gsa S3500 T0300
N24 Z-0.4 (-- OFFSET 00 AT THE START OF TOOL ----------)
N25 Xl.0 C-O.03 (K-0.03) N20 G96 S750 M03
N26 Z-O.7S T0314 N21 GOO G42 Xl.7 ZO.l T0313 M08
{- - OFFSET 14 FOR THE 0.75 SHOULDER (- - OFFSET 13 FRCM Z OVER TO Z UNDER ONLY - - -)
N27 Xl.375 C-O.03 (K-0.03) N22 XO. 365
N28 Z-l. 255 N23 Gal XO.62S Z-0.03 FO.002
N29 UO.2 N24 Z-0.4
N30 GOO G40 XS.O ZS.O T0300 N25 X1.0 C-O.03 (K-O.03) T0314
( - - OFFSET 00 AT THE END OF TOOL ------) (- - OFFSET 14 FROM X UNDER TO X OVER ONLY - - - )
N3l MOl N26 Z-0.75 TOll5
(-- OFFSET 15 FROM Z UNDER TO Z OVER ONLY
34

N27 Xl.37S C-O.03 (K-O.03) T0316 FUNCTIONS FOR GEAR RAN


(- - OFFSET 16 FROM X OVER TO X UNDER ONLY - - -) .
N28 Z-l. 255
N29 00.2 are designed to work in
N30 GOO G40 XS.O ZS.O T0300 feature enables pro-
(-- OFFSET 00 AT THE END OF TOOL ------------) rCCluired spindle with spe-
N31 MOl of the machine. As a
for spindle speed,
raling will be, and vice versa.
program- and power ralings
nre cril by the machine manufacturer,
can be seen in
J and 03402, one Depending on one, two, three, or
offsets must always remain same (X or Z off- gear ranges may Small lathes, or those de-
instance, in the program 03401, 03 and signed with ultra speeds, may have no
J3 control diameters. That means the Z value must be grammable which means only a de-
same always.! Thai also means, if is a need to faull gear is large lathes may have all
shift the shoulders .002 to the len, all must be four gear ranges - available spindle
by the same amount: speed is usually The most common av-
erage is two
~3 X-O.0030 Z-O.0020
14 X+O.0030 Z-O.0020 Miscellaneous functions ranges, are typically
M41. M42. M43 and assume the definition rela-
to do that will result in inaccurate live (0 the number of available:

NG Number of available ranges


Range
screen selected by pressing a on 2 3 4
will initially display the 1001 geometry and
They are identical. except the tille at low M41
screen. A rypical display will
(no offsets set): Medium low

OFFSET (GEoMETRY)

NO. ZAXIS RADIUS M43

0.0000 M42 M43 M44

0.0000 0
a certain gear range is ':>'-'''~'-l~.U speed
0.0000 0.0000 o is limited. If the exact of IS Im-
porlanl, always make an effort to alit the available
spindle in each range. Don't be 10 find out
that on most CNC machines, one rpm (I
lowest spindle speed may be
X Radius
don'l be surprised to find that
is shown as
len quite for spindle speeds in lWO
either lhe firsl paIr of the T if the J hasarange20to 1400
offset, or the second pair ~ a range of 750 LO 2500 r/min. When
and Z axis are (he columns where available in either range, such as 1000
are for each number, lhe of is not critical, but low
are only used if a tool nose radius
case, Ihe Radius will be the lool
is an actual, although unrelated,
will an arbitrary number, as de-
tool tip orientation. This Low gear range: 20 . 1075 r/min (M41)
C'"rlhp·r! in Chapter 30. High range: 70 - 3600 r/min (M42)
TURNING AND BORING 299

AUTOMATIC CORNER BREAK 03404 (MANUALLY CALCOLATED CORNER BREAK USED)

NSl TOlOO
turning and boring) NS2 G96 5450 M03
cut a shoulder to a diameter N53 GOO 042 XO.3 ZO.l T010l MOS
shoulde;r) requires (\ comer break. NS4 Gal XO.62S Z-O.0625 FO.OOl
is a cornman practice when N55 Z-O.4
N56 G02 XO.825 Z-O.5 RO.l
Many
NS7 Gal .:u.125
comers are to be NS8 Xl.2S Z-O.S62S
It is up to the .... ,.",,......,.....,,...., NS9 Z-O.9
the range of 0.005 to N60 G02 Xl.45 Z-l.O RO.l
required corner N6l Gal .:u.675
angle, or a blend radius N62 GO) .:u.S7S Z-l.l RO.l
of the comer break is "'1J",,",a,,-,'" N63 GOl Z-1.437S
N64 X2.C Z-1.S
must apply it. Comer
N65 X2.37S
o Functionality N65 Xl.55 Z-l.5875
... for strength, ease of assembly, and clearances N67 ua.2
N68 GOO G40 XlO.O Z5.0 TOlOO
o Safety N69 Mal
... sharp corners are dangerous
Only the fmished contour is (no facing cut),
o Appearance
at a selected clearance 1, with the calculated
... the finished part looks
diame:ter at XO.3. Each contour point has to be
In lathe work. many comer apply to cuts ",pr""" ••" calculated. At the contour the last chamfer
a shoulder and the (the cut takes a 90° been completed at a clearance of 0.025 above the larg-
tum in one axis at a time). start and end points calcula- est at X2.55, Z at Z-1.5875.
tion is not difficult but can consuming for some in manual work, of errors can
jobs, such as shaft with many different diameters. For
of programming is
02.5 it is easy to forget to
for bOling). The

N56 G02 XO.725 Z~0.5 RO.1 (ERROR Dr X)

of the correct block

NS6 G02 XO.82S Z-O.5 RO.1 (X IS CORRECT)

the program in to
corner break?
o
N

ALLC RO.1 o Chamfering method ... for a 45° chamfer


Figure 34·6 o Blend radius ... for a 90°
Example lor an corner break (chamfers and
in a very similar manner
34-6 shows a simple in both cases.
"''''''0..,'' ..'''
comers that will benefit
matic comer programming feature • Chamfering 45 Degrees
the drawing qualify).
Y"'"''''<''''''HV comer chamfering will
Compare two methods, to better two special vectors I
ferences applied in programming. If the ...., ..""",,"" or a C vector on some ,I."""YV.,,,.
not use the automatic comer break feature,
change poi.nt must he calculated manually
For the .t",,,,,,,t1t' chamfer generation,
will be 03404: specify the and the amount
chamfer:
300 Chapter 34

The I vector
is used to create a chamfer starting from the X axis, c- c+
into the X+Z-, X-Z-. X+Z+, or X-Z+ direction
C+ C+
The K vector
is used to create a chamfer starting from the Z axis,
into the Z-X +, Z-X-. Z+ X+, or Z+ X- direction ...,

The I and K vector defin ilion is illustrated in Figure 34-7.

c- c-
......._ . . L ___ ~ __ ~---I....
K- K+
c- c+
i+ 1+
Figure 34·8
X+ Vectors C for automatic corner chamfering
Z+
In either case, the sign of I or K vector defines the direc-
tion of the chamfer cUlling within the coordinate system:
X- o Positive value of I or K vector indicates the
chamfering direction into the plus direction
1- i- of the axis not specified in the chamfering block
&- - -

o Negative value of! or K vector indicates the


K- K+ chamfering direction into the minus direction
of the axis not specified in the chamfering block
Figure 34-7
Vectors J and K lor automatic corner chamfering The va 1ues of I and K com rna nds are aJ ways sin gle va! ues
(i.e., radius values, not diameter values).
When the control system encounters a block containing
Many lalest controls use vectors C+ and C- that replace
the chamfering veclor J or K, it will automatically shortell
{he active programmed tool path length by the value of the I [he 1+. 1-, K+ and K- vectors - Figure 34-8. This is a much
simpJer programming method and its applications are the
or K vector, as specifIed iryfhe program. If not sure whether
same as for the blend radius R. described shortly. There is
the I or the K veclor shoJld be programmed for aulomatic
chamfering, consult the above illustration, or apply the fol- no distinction bel ween axes vector selection, just the speci-
fied direction:
lowing rules:
o The C vector is used
The vector I indicates the chamfering amount alld motion
direction when the 1001 motion is in the order of Diame- ... to create a chamfer starting from the X axis,
ter-Cham{"er-Shoulder,
'.1' '-' alonCJ the Z
which means cUllin!! (;> into the X+Z-, X-Z-, X+Z+, or X-Z+ direction
axis before the chamfer. The chamfer deviation can only be - or-
from lhe Z axis lowards [he X axis, with the I veclor pro- ... to create a chamfer starting from the Z axis,
grammed: lnto the Z-X +. Z-X-, Z+ X+, or Z+ X- direction

GOI Z-1.7S IO.125 (CUTTING ALONG Z AXIS) If the unit control allows the C+ or C- veclors, the pro-
X4.0 (CONTINUING IN X AXIS AFTER 0iAMFER) gramming is much easier, as long as the motion direction is
watched. The two previous examples will be:
The vector K indicates the chamfering amounl WId mo-
lion direction when the lool molion is in the order of Shoul- GOI Z-1.7S CO.125 (CUTTING ALONG Z AXIS)
dPr-Clum1jN-f)imnf'It'l; which means cutting along the X X4.0 (CONTINUING IN X AXIS AFTER CHAMFER)
axis before the chamfer. The chamfer deviation can only be
from the X axis towards the Z axis, when the K vector is GOI X2.0 C-O.125 (CUTTING ALONG X AXIS)
programmed:
Z-3.0 (CONTINUING rn z AXIS AFl'ER CHAMFER)

As was the case with the I and K vectors, the C vector is


GO 1 X2. 0 K- 0 . 125 (CUITING ALONG X AXIS)
Z-3.0 (CON'I'INUING IN Z AXIS AFTER CHAMFER) also spccified as a single value per side, not per diameter.
TURNING AND NG 301

• Blend 90 Degrees The radius deviation can also be from the Z axis
A a shoulder and (or
the X axis, when the R vector is programmed:
10 a similar way as the automalic 45°
GOl Z-1.75 RO.125 (CUTTING ALONG Z AXIS)
cham exclusively ill the GOl Inode.' X4.0 (CONTINUING IN X AXIS AFTER RADIUS)
Only one special vector R is used. For automatic blend ra-
dius, the vector the direction and rhe amount In either ease, the R vector defines lhe diree-
CUI for the radius: lion of the radius the coordinate
o The R vector is used o Positive value of R vector indicates the radius direction
into the plus direction of the axis not specified in the
starting ffom the X radius block
or X-Z + direction
o Negative value of R vector indicates the radius direction
- or- into the minus direction of the axis not specified in the
radius block
... to create a blend radius starting from the Z axis,
into the ,orZ+X-direction • Programming Conditions
The R vector definition is illustrated in Figure 34-9. corners for
modern CNC lathes a

R- R+ contains vectors lor


" .... '" .
for blend radius corner.
R+
X+ o Chamfer or radius must be fully contained in
a single quadrant - 90° only
z-
. - o Chamfers must have a 45 e and radii
must have a 90" angle between a shoulder and
a diameter or a diameter and a
x-
o The values of chamfering vectors I and K or e,
R- R- as well as the radius vector R, are single values -
",",,::onlrll'lper side values, not values

R- o Direction of cut before the corner rounding must be


\ to the direction of the cut after rounding.
34-9 one axis only
Vector R lor automatic comer rounding o The direction of the cut following the chamfer or radius
must along a single axis only, and must have
control system encounters block containing the equivalent to at least the chamfer length or the
a blend radius vector R, it will automatically shorten the ac- radius amount the cutting direction cannot reverse
tool path length by value of the R vec- o Both
tor, as speci tied in Ihe program. If noc sure whether the R takes
vector should be programmed for blend radius,
consult the above illustration or apply the following rule: o eNe program, only the known
the drawing . the sharp point - is
The vector R indicates the radius amount That is the point between the shoulder and the
when the CUlling is in without the or radius being considered
which means X axis
same vector is when the /'Q- These rules appJy equally \0 turning and
motion direction is in the opposite order lathe Study them carefully Lo avoid
which means cutting along
• Programming Example
The deviation can be from the X lheZ
axis, when the R vector is programmed: The 03405 combines the use
radius vector, mio a complete p.xam-
GOI X2.0 R-O.12S pIe. The same is used for this version, as
Z-3.0 (CONTINUING IN Z AXIS AFTER """'''''''',);;>J traditional method, illustrated earlier in Figure 34-6.
302 Chapter 34

In order to fully appreciate the differences between (he ing does nol produce a high precision parl, that is not the
two programming melhods (both are technically correct), purpose or roughing. Its main purpose is to remove un-
compare Ihe followIng program O}405 wiUl the earlier wanted slOck efficiently, which means fast and wilh maxi-
program 03404. The I and K vecrors are used for chamfer- mum tool life, and leave suitable all-around stock for fin-
ing, as they are more dinicu!lthen the C vectors: ishing. CUlling tools used for roughing are strong, usually
with a relatively large nose radius. 'I'hese tools have to be
03405 (AUTOMATIC CORNER BREAKS USED) able to sustain heavy depths of cut and high cutting feeds.
Common diamond shaped tools suitable for roughing are
NSI TOIOO 80° inserts (up \0 2+2 CUlling corners), and trigon inserts
N52 G96 5450 M03 (up 10 3+3 cutting corners). 2+2 or 3+3 means on 2 or 3
N53 GOO G42 XO.3 ZO.l TOlOl MaS
CUtllllg edges 011 each Side of the Insert. Not all inserts can
NS4 Gal XO.625 Z-0.0625 FO.OO3
N55 Z-O.5 RO.l be used from both sides. Figure 34-10 shows some typical
NS6 X1.25 K-O.062S lools and orientation for rough turning and boring.
N57 Z-l.O RO.l
Light cut only I

N58 X1.875 R-O.l .Li9ht cut only I
N59 Z-1.5 IO.0625

,
N6D X2.375 I

N6l X2.55 Z-l.5875


n·h
N62
N63
N64
UO.2
GOO G40 XIO.O Z5.0 TOlOO
MOl

Although the program is a little shorter, the five blocks


0
•+
'-
• U---.U----
+
saved in Ihe program offer the least benefit. Where are the
G02s and Gms. where are the calculations of each contour
• •
change point? Where arc the center point calculations?
Except for the contour beginning and end, this type of
programming greally enhances program development and
•0-·-· •v··----· ··8 -
r-
',/
,
.
n
'---/ I
I
~
l)

allows ror very fast and easy changes during machining. if i


necessary. If a chamrer or u blend radius is changed in the
draWing, only a single value has 10 be changed in the pro-
+light cut only +light cut only
I

gram. withoul any rcci.llculations. Of course, the rules and


Figure 34-10
condilions mentioned earlier must be always observed. The
main benefit of the auromalic contouring are the ease of Tool orientalion and cutting direction for roughing.
Upper row shows external tools, lower row shows internal tools.
changes and the absence of manual calculations.
Allhough a number of tools can be programmed in sev-
ROUGH AND FINISHED SHAPE eral directions, some directions are not recommended at
al!, or only for light or medium light cuts.
The vast miljorily of material removal on CNC lathe is
In practice, always follow one basic rule of machining -
done by using various cycles, described in detail in the next
this rule IS valid for all types of machines:
chapler. These cycles require inpul of data that is based on
machining knowledge, such as a depth of cuI. stock allow-
Always do heavy operations before light operations
ance, speeds and feeds. etc.
Rough and finished shapes often require manual calcula- This basic rule means that all roughing should be done
tiOllS, using algebra and trigunuHlelry. Tllese calculalions before the first finishing CUt is programmed. The reason
should be done on separale sheels of paper, rather than in here is to prevent a possible shift of the material during
lhe drawing iLSd!'. ThaI wuy, the work is better organized. roughing, after some finishing had already been done,
Also, if there is a change later, for example, an engineering
design change, it is easier to keep lrack of what is where. For example, the requirement is to rough and finish both
external and internal diameters. If the above rule is applied
• Rough Operations to these operalions, the roughing out the outside of the part
will be first, {hen roughing out the inside of the parl, and
A great part of Imlle machining amounts LO removal of only then applying the finishing cuts. It really does nOI mal-
excessive slock \0 create a part, almost completed. This ter whelher the roughing is done first externally or inter-
kind of machining is generally known as roughing, rough nally. as long flS il gets done b~fore any finish cuts, which
turning, or rough boring. As a machining operation, rough- also cLln be in either order.
TURNING AND 303

of cut IS suftl- specifics the amount of material left for these opera-
skin' of the mR- . lions. If 100 much material or too I ittle is len to be
is usually a must cut during finishing, the part finish
before tool ac- quality will suffer. Also, carefully
allowance overall on the part. but individual
ances for (he X and Z axes.
• Operations
As before, there is a general rule of
Finish operations take cutting mOlions, axis, thai is forculting
after mosl of the stock removed (roughed OUL). to or slightly larger than radius of the
leaving only a small amount of stock for finishing. jog 1001. For example. if a .O~ I inch (001 nose
The cutting 1001 can nose radius and. for even mm) is used for finishing, leave to
a better surface finish, spindle and lower cut- (about I mm). That is the physical
ling feeds are lypical. amount assigned per side, not on diameter!
Many different tools can be The amount of stock left on the Z axis (typically
as well, bUI the most tYPIcal IIlgshoulders at 90°) IS much more cnhea!. If
mond shaped inserts, wilh a the positive X axis only turning}, or the
Their shape, common orientation and (for boring), with a lool that has a lead angle of to
shown in Figure JJ. not more (han .003 (0.006 inch (0.080 to 0.150
mm) on any straight shoulder. Figure 34-/2 shows the
. , Light cut only I . . Light cut only of too much stock allowance for certain cutting direc-
and a method to eliminale it

.~ -- W
l+- = Direction of cut.
-_.,

• •
. •

/ Medium cut
Light I Medium cut a

.~~ R

.' Light cut only


Figure 34-11

\

Light cui only

Tool orientation and cutting direction for finishing with


common lathe tools. Upper row shows external tools,
34·12
f - - - Z POS

Effect of stock allowance Won depth of cut D


x POS

lower row shows internal tools. In Z


calculate
Note that some cutting directions are only recommended
for light or medium cuts. Why? TIle answer has a lot to do
with (he amount of material (stock) the tool removes in the
direction .

• Stock and Stock Allowance


material machined is often called stock. When ~ where
tool removes the stock to cut a desired shape, it can
a certain amount of it at a time. The insert D ::::; Actual depth of cut at
A == lead angle of the insert
the and In-
R Radius of the insert
on the al- W == Stock left on for finishing
important X POS TBrget position for the X axis
In allowance ZPOS Target position for the Z
304 Chapter 34

The illustration applies equally Lo (he boring, when the X In CNC lathe programming, a recess can be machined
axis direclion is opposite the one shown. To understand very successfully wilh any 1001 (hal is used wilh Ihe proper
better the consequences of a heavy sLock left on the face, depth of cut, and a suitable back angle clearance. It is lhe
evaluate ibis example: second requirement [hat will be looked at next.

o Example: Figure 34-13 shows a simple drawi ng of a roller 1n the


middle of the obiect, there is an undercut (recess) between
The amount of slack left on face is .030, the too! radius is the 01.029 and the 0.939. The objective is to calculate, not
.03 t and the tool lead angle is 3°: to guess, what is the maximum back angle tool that can be
used for CUlling the recess in a single operation.
W = .030, R = .031, A = 3

There is enough data available Lo calculate the unknown


.,
R9/16 (2)
depth D, using llle above formula: 'j
-./
D = tan3/2 x .031 + .030 / tan3 + .031
-
------:---=-- - --r
D = .60425

For an insert wilh a 0.500 inch inscribed circle (such as


01.029 00.939
DNMG-432, for example), the actual depth of CUI at the
I
face will be .60425 - more rhan any reasonable amounti
I
-.1_
Since the earlier suggestion was no more (han .006, recal- ___--i---=.<~!«<

culate lhe example for the largest depth, if the W=.006:

D
D
tan3/2 x .031 + .006/tanJ + .031
.14630
- 1.25 -
ROLLER
Figure 34·13
ThaL is a more reasonable depth of cut at the face, so the Z
Back angle clearance calculation example
axis slock allowance of .006 can be used. For facing in Ihe
opposite X direction or for not unidirectional faces, leave TIle first step is to consider the drawing - that is always
stock much bigger, usually close to the tool radius. the given and unchangeable source of data. The difference
between the diamelers and the recess radius will be re-
PROGRAMMING A RECESS quired. Figure 34-14 illustrates the generic details of the
provided data (except the angle b) from the drawing.
Another very important aspect of programming for CNC
Drawing detail a = Tool back angle
lathes is tnc change of cult i ng di rection. Normally, program <

~
a tool motion in such a way Ihal Ihe mOlion direction from R = Spedified radius
the starling point will be: \ R b = Clearance angle req'd
=
D Depth of recess
o Positive X direction for external machining
... and / or ...
\ \
\
Negative Z direction for external machining
o Negative X direction for internal machining
... and / or ...
Negative Z direction for internal machining r
I
D-' Tool detail
There arc also back ruming or hack boring operations
used in CNC programming, but these are just related and Figure 34-14
Jess common variations of the common machining. In the Data required to calculate angle 'b'
most common machining on CNC lathes, any change of di-
rection in a single axis imo the material constitutes an un- The formula required to calculate the angle b uses simple
dercut, a cavity. or more commonly known - a recess. lrigonomclric formula. First, calculate the depth of thc re-
cess D, which is nothing more that one half of the differ-
A recess is commonly designed by the engineers to re- ence between the two given diameters:
lieve . or undercut - a certain portion of the part, for exam-
ple, to allow a matching parlto tit against a shoulder, face, LARGE DIA - SMALL DIA
or surface of the machined part. D =
2
TURNING AND BORING 305

Once the recess depth D is known, the formula to calcu- The queslion is this: What is the actual spindle speed (In
late the angle b is: r/min), when the block N2 is executed? Of course, (he spin-
dle speed is unknown at the moment. It cannot be known,
unless the current diameter, the diameter where the tool IS
located at thai moment, is also known. The control system
keeps track of the current tool position al all limes. So,
when block N2 is executed. the actual r/min of the spindle
For the example, the calculation will be: will be calculated for the current diameter, as stored in the
control, specified in the geometry offset enlry. For the ex-
ample, consider (hat the current diameter is 23.5 or X23.5.
b == cos -I ( .5625 - .045 ) =: 23.07392
.5625 From the standard r/min formula, the spindle speed cal-
culated for 450 fUmm and 023.5 as 73 rIm in is rather slow,
but correc\. At the nex.t block, block N3. the tool position is
For actual machining, select a tool with the back angle a
rather close La the part, at diameter of .700 (XO.7). From the
greater than the calculated angle b. For the illustrated draw-
same stand<lrd formula, the spindle speed can be calculated
ing (23.07° required c!carance), the selected tool could be
for that diameter as 2455 r/lnin - considerably fast but also
either a 55° diamond shape (back angle clearance Q is 30°
correct. The problem? There may not be one for every
to 32"), or a 35" diamond shape (back angle clearance a IS
machine, but if ever there is a problem, the following solu-
50" (0 52") - both are greater than the calculated minimum
tion will eliminate it
clearance. The actual angles depend on the Lool manufac-
turer, so a tooling catalogue is a good source of data. The possible problem will be linked to the rapid motion
from the 023.5 to the 0.700. The actual travel distance
This type of calculation is important for any recesses, un-
(per side of part) is (23.5-.700)/2, which is 11.400. During
dercuts and special clearances, whether programmed with
the rapid {ravel rate, the CUlling tool has [0 move I J .400
the aid of cycles or developed block by block. The example
inches and - at [he same time - change the spindle speed
only illustrates one possibility, but can be used for any cal-
from a slow 73 r/min, to a fast 2455 rlmin. Depending on
culations where the back angle clearance is required.
the control system and its handling of such a situation, the
tool may actually start cutting at a slower spindle speed
SPINDLE SPEED IN CSS MODE thall was originally intended.
If such a situation docs happcn and presents a problem,
From several earlier topics, remember thatlhe abbrevia-
Ihe only step that can be done is to preprogram the expected
tion CSS stands for Constanl SllIjace Speed. This CNC
spindle speed in r/min, before the cutting tool approach
lathe feature will constantly keep recalculating the actual
motion, then switch to the constant surface speed (CSS)
spindle speed in revolutions per minute (r/min), based on
mode and continue.
the programmed input of surface speed: The su:face speed
is programmed infeer per minute - ftiman (English system) 03407
or in meters per minute - mfmin (metric system). Nl G20 TOlOO
N2 G97 52455 M03 (R/MIN PRESET)
In the program, the 'per minure' input uses Ihe prepara- N3 GOO G41 XO.7 ZO TOlD1 MOS
tory command G96, as opposed [0 the direct rlmin input N4 G96 5450 M03
using tlie cOlllrnand G97. N5
The Constant Surface Speed is a powerful feature of the What had been done requires more evaluation. What had
conlrol system and without it, we would lo?k back many been done is thai the spindle was started at the final ex-
years. There is a rather small problem assocIated wlth tJus pected r/mil1, before the tool reaches [he part, in blo~k N2.
feature, orten neglected altogether, or at least not consid- In block NJ, the tool moves to the start of CUl, while the
ered important enough. This rather 'small problem' wIll be spindle is already at the peak of Ihe ~rogrammed speed.
illustrated in a simple program example. Once the target position along the X aXIs has been reached
The program example covers only a few blocks at (he b~­ (block N3), the corresponding CSS mode can be In effect
ginning. when the cutting tool approaches the part. 1l1at 15 for all subsequent cuts.
cnough data to consider the question that follows. This is an example that does not necessarily reflect every-
day programming of CNC lathes. In this situation, some
03406
additional calculations have LO be done, but if they solve the
N1 G20 T0100
N2 G96 8450 M03
problem - they are worth the extra effort! Some CADICAM
N3 GOO G41 XO.7 ZO T0101 MOB system can be set to do exactly that automatically. If [he
N4 ... current X position of the tool is unknown, estimate it.
306 Chapter 34

LATHE PROGRAM FORMAT • Approach to the Part


An important part of any lathe program structure is the
In a review of the already presented examples, a certain method of approaching a revolving part. If the part is con-
consistency can be seen in the program output. This may be cenlric, the approach can be similar lo the A option in Fig-
called a style, a format, a form, a template, as well as sev- ure 34-15. Although a facing cut is illustrated, the approach
eral other terms. Each programmer develops his or her own would be logically the same for a turning or a boring cuL
style over a period of timc. A consistent style is important Keep the slarting point SP well above the diameter, at least
for efficient program development, program changes and .100 per side and more, if the actual diameter is not known
program interpretation. exactly. The B option of the tool approach is two single axis
at a lime. It is a variation of the first example, and the X axis
• Program format - Templates motion can be further split into a rapid and cutting motion,
if required. Finally, the C option uses the clearance in the Z
Most examples have followed a cenain program formal. axis, far from the front face. Again, the tinal motion toward
Note that each CNC lathe program begins with the 020 or the face can be split into a rapid and linear motion.
G21 command and perhaps some cancellation codes. The
block that follows IS a lool selection, next is spindle speed
data, etc. This format will not basicaJly change from one Q
job to another - il follows a certain consistent pattern which
forms the basic femplate for writing the program. SP - - - - -
~- -- ~­

r.~ ~-__________w
• General Program format
A
To view the format often enough will forge a mental im-
age in the programmer's mind. The detajls thaI are not un-
derstood yet will become much clearer after acquiring the
general underst.anding of Ihe relationships and details used I

lJt;-]
in various programming methods. Here is a suggested tem-
plate for a CNC lathe program.

Q General Program Pattern - Lathe: B

0.. (PROGRAM NAME)


_------w
ill G20 G40 G99
N2 T .. 00 M4 ..
N3 G97 S .. M03
N4 GOO [G41/G42)
NS G96 S ..
x ..
N6 GOl [X .. /Z .. ] F ..
(PROGRAM START up)
(TOOL AND GEAR RANGE)
(STABILIZE R/MIN)
Z .. T.. M08 (APPROACH)
(ClJ'I'"£ING SPEED)
(FIRST CUTTING MOTION)
c
QEd--- SP :: Start point
N7 for cutting

(MACHINING) Figure 34-15


Safe approach to a parr - example for a facing cut shown
N.. GOO (G40] X .. z .. T .. OO(TOOL CHG POSITION)
N .• MOL (OPTIONAL STOP) There are many variations on these methods, lOO numer-
ous to list. The main objective of considering the approach
N .. M30 (PROGRAM END) to the part in the first place is safety. A collision of a tool
% with a revolving part can have serious consequences.
This generic structure is good for most lathe programs. Turning and boring is a large subject. Many other exam-
Feel free to adjust it as necessary. For example, not every ples could have been included in this chapter. Other chap-
job requires spindle speed stabilization, so block N3 will ters in this book also cover turning and boring, but in a
not be necessary. It also means that M03 rotation has to be marc specialized way, for example, turning and boring cy-
moved to block N5. Take the general program pattern as an cles. The examples that were presented in this chapter
example only, not as a fixed forma\. should be useful (0 any CNC lathe programming.
LATHE CYCLES

• Complex Cycles

STOCK REMOVAL ON LATHES


Don'l gel misled by the
One of tbe most time cles are only complex in the
gramming for a CNC lathe is then, only internally. TIley are
siock, lypicaJJy from a as system only. In fact, these very
rough turning or rough are much easier to program than
In addition, they can also be
1b manually program a control, to optimize them
ries of coordinated rough u""",~"'''. on the job.
gram for each tool motion.
tour, such a method is PRINCIPLES OF LATHE CYCLES
inefficient, as well as prone to errors.
try Lo sacrifice programming
an uneven sLock for finishing, Similar to drilling operations for CNC machining cen-
wear out prematurely. all cycles for lathes are based on the same technologI-
ished profile often suffers as cal principles. The programmer only enters the data
(typically variable CUlling parameters), and the CNC sys-
It is in the area of rough tem will calculate the details of individual cuts. These
lathe controls are very useful are based on the combinalion of the fixed and
CNC lathe systems have a lhar variable data. Return LOol motions in aillhese cycles are au-
tool path to be processed automatically, tomatic, and only (he values to be changed are specified
des. Roughing is not the application for within call
there are also special cycles available
simple grooving. The grooving and are designed exclusively to cui a straight
outside of this chapter, but will be covered in tapers or radii and also wlth no un-
next three chapters. simple cycles can only be used to cut verli-
horizontally, or at an angle, for taper cutting, These
• Simple Cycles original cannot do the same cutting operations as the
and multiple repetitive cycles - for
Fanuc and similar controls suppOrt a number of special they cannot out a radius or change direc-
lathe cycles. There are three rather simple cycles that have they cannot contour,
been part of Fanuc controls for quite a while. They first ap-
peared with the early CNC units and were limited by the
technological progress of the time. Various manuals and
lextbooks refe!: to them as the Fixed Cycles or Simple
or even Canned Cycles, similar in nature to cheir
cousins for drilling operations on CNC mills and machin-
ing centers. Two of these early cycles are used for turni
and boring, the third cycle is a very simple threading cycle,
This ch'lpter covers the fi~t two cycles.

307
308 Chapter 35

G90 - STRAIGHT CUTTING CYCLE The second format adds the parameter I or R to the block
and is designed for taper cutting motions, with the domi-
nance of the Z axis - Figure 35-2.
Before going further. a reminder. Do not confuse G90 for
lathes with G90 for machining centers. In turning, G90 is a
lathe cycle, G90 is the absolute mode in milling;
:- -w
G90 is absolute mode for milling,
X and Z axes are absolute mode for turning

G91 is incremental mode fOT milling, 'I-


U and Waxes are incremental mode for turning
I
A cycle identified by G90 preparatory command (Type A
group of G codes) is called the Straight CUlling Cycle (Box
cycle). Its purpose is to remove excessive stock between the
start position of the culling Lool and (he coordinates speci-
fied by the X and the Z axes. The resulting cut is a straight ,. . ,
I
--z-
turning or boring cut. nornUllly parallel to the spindle cen-
terline and the Z axis is the main cUlling axis. As the name
of the cycle suggests, the G90 cycle is used primarily for re- Figure 35-2
moving a stock in a rectangular fashion (box shape). The G90 cvcle structure -taper cutring application
G90 cycle can also be used for a taper cutting. In Figure
35-1, the cycle structure and motions are illustrated. o Format 2 (two versions):

G90 X(U) .. Z(W) .. 1.. F..


G90 X(U) .. Z(W) .. R.. F..
,.. ------w --------..-; ~ where ...
(4) L x == Diameterto be cut
UJ2 Z End of cut in Z position
r I (R) "" Distance and the direction oftaper
I (1=0 or R=O for straight cutting}
- -v X F :::: Cutting feed rate (usually in/rev or mmJrev)

In both examples, the designation of axes as X and Z is


used for the absolute. programming, indicating the tool po-
sicion from program zero. The designation of axes as U and
W is used for the incremental programming. indicating ac-
Figure 35-1 tual travel distance of the tool from the current position.
690 simple cycle structure - straight cutting application The F address is (he cutting feedrate, normally in incites per
revolution or millimeters per revolution. The I address is
• Cycle format llsed for taper cutting along the horiwmal direction. It has
an amount equivalent to one half of the distance from the
The G90 cutting cycle has two predetermined pro- diameter at the taper end, to the diameter at the taper begin-
gramming formats. The ~irst one is for straight cUlling only, ning. The R address replaces the I address, and is available
along the Z axis, as ill ustrated in Figure 35- J. on newer comrols only.
o Format 1 : To cancel the G90 cycle, all that is necessary to do is to
usc any motion command - GOO, GO l. G02 or G03. Com-
monly, it will be the GOO rapid motion command:
~ where ... G90 X(U) .• Z(W) .. I .. F ..

x = Diameter to be cut
Z End of cut in Z position GOO
F =:: Cutting feed rate (usually inJrev or mm/rev)
LATHE CYCLES 309

• Straight Turning Example NlO X2. 28 (PASS 6)


Nll GOO X10.O Z2.0 T0100 M09
To a application of G90 Nl2 MOl (END OF ROUGHING)
35-3. It rather a simple diameter
from a 04. J down to a 'final 02.22 inch, over If prefen'ed, use incremental programming rnp,nr,n
the length of i There arc no chamfers, no However, it is Lo trace the program progress with the
and no radii. This the practical absolute coordinates
the G90 cycle 10 a simple roughing only, but still ever, here is the
the manual al[ernalive.
03502

-1 (G90 STRAIGHT TtJRNING CYCLE - INCREMENTAL)


Nl G20
N2 T0100 M41
N3 G96 S450 M03
N4 GOO X4.32S ZO.l T010l MaS (START POINT)
r N5 G90 U-0.507S W-2.655 FO.Ol
N6 U-0.307S (PASS 2)
N'7 U-0.3075 (PASS 3)
04.125 NB U-O.307S (PASS
N9 U-0.3075 (PASS 5)
NlO U-0.3075 (pASS 6)
Nll GOO XlO.O Z2,Q T0100 M09
Nl.2 MOl (END OF ROUGHING)

cycle is quite simple in both versions - all that is


is La calculate the new for each roughing
cut. If the same roughing tool path had been programmed
the block-by-block method (withollt G90), the finaJ
rXrl'III1JIt' of G90 cVcle in • programs 03501 &03502 would be more than longer.

Since G90 is a roughing the depth of each cui has • Taper Cutting Example
to first, then the amount left for finishing,
decide on the depth of find out how much 35-4 is a to that used for the
slock is aclua[ly there to ,'p'nnr".!pn from the diameter. example. In this Will be cui, also
amount of Siock is "' .... ,..." ........ per side, as a ra- the G90 simple
value, along the X

(4.125 - 2.22) / 2 = .9525


a Slack per side finishing cuI, the .030 r
will subtracted from the total X so the total depth
amount to remove will be .9225. is the selection of cut
for the toral depth. five even cuts, each
cut will be .1845, for six cuts, .1538. Six cms will 02.25
;'''''l\,A.\~,U and .030 left per or on the diilmeter
the first diameter will be X3.8175. .005 stock allow-
ance will left on the face, so the Z end cut will be
actual and in
I
part will be the t
03501
(G90 STRAIGHT TUlmDJ'G CYCLE - ABSOLUTE)
Nl G20
N2 T0100 M4l
Figure 35-4
N3 G96 S450 M03
N4 GOO X4.32S ZO.l T010l MOB (START POINT) l::xa·mO,le of cycle in taper cutting - program 03503
N5 G90 X3 B175 Z-2.555 FO.Ol (PASS 1)
N6 X3.51 (PASS 2) In to between the cuning and
N'7 X3. 2025 (PASS 3) the cUlting methods, using the same cycle, there
N8 X2.895 (PASS 4) musl a to distinguish these two of CUL, and
N9 X2.5875 (PASS 5) there is one
310 Chapter 35

The difference is the addition of an I parameter to the cycle


calL indicating the taper amount and its direction per side.
This value is called a signed radius value. It is an I value be-
cause of its association with the X axis. For straight cutting,
the I value will always be zero and does not have to be writ-
ten in the program Irs only significance is for raper cutting,
in which case it has a non-zero value - Figure 35-5.

FIRST
TAPER LENGTH . MOTION
rmAL TOOL TRA\.7Eli DIRECTION

Figure 35-6
Known and unknown values for taper culling -program 03503
Amount 'i' is known, amount 'J' has to be calculated

I . ····-2.5 'I

~
aoRK£t\jAL -~-·····~··r

+
0.875
RST
MOTION
DIRECTION
1
Figure 35-5
I 2.7- -I

~l
The I amount used for G90 turning cycle - extemal and internat

The illustration shows that the r amount is calculated as a


single distance, i. e., as per single side (a radius value), with
specified directiol'1; based on the total traveled distance and
the direction of the first motion from the start position.
There are two simple rules for G90 taper cutting:
T
o If the direction of the first tool motion in X is negative, i
the I value is negative 0.875
a If the direction of the first tool motion in X is positive, I
1 . . . . . . . . . .;. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .:~
the I value is positive
On a CNC lathe with the X axis positive direction abpve
the spindle center line, the typical I value win be negative Figure 35-7
for external taper cutting (turning) and positive for internal The I distance calculation using the similar triangles method
taper cutting (boring).
The example shown above almost suggests the simplest
To program the part in Figure 35-4. keep in mind that the method of calculation, a method that is known in mathe-
illustration represents the fmished item and does not con- matics as the law ofsimilar triangles. This law has several
tain any clearances. Always add all necessary clearances possible deflnitions, and the one that applies here is that ...
flIst, then calculate the I amOlillt.
In the example, a clearance of 0.100 will be added at each Two triangles are similar, if the corresponding sides
of the two triangles are proportional.
end of the taper, increasing its length along the axis from
2.5 to 2.7. The I amount calculation requires the actual
length of tool travel, while maintaining the taper angle at In programming, quite often there is a situation that can
the same time. Either the method of similar triangles or the be solved by more than one method. Choose the one that
trigonometric method can be used for such calculation (see suits better a certain programming styJe, then try the other
Chapter 52 for details on shop mathematics). Figure 35-6 method, expecting the same result. Both methods will be
and Figure 35-7 illustrate the details of the known and un- used here, to conflrm the accuracy of the calculation.
known values for the I amount calculation.
LATHE CYCLES 311

= Using Similar Method I-


,

First, calculate <1ltlcerence i between the two known


diameters, as per drawing:

i = (4 - 2.25) I 2 0.875

therefore, the ratio of v~, ... , .., will be 101.75

I I 2.7 = i / 2.5

We know i to be 0.875, so the relations can


by filling in the known ammmt:

I / 2.7 = 0.875 / 2.5 ""m~~_ 3.50 ------.-;


I :::: (0.875 x 2.7) / 2.5
I :::: 0.945 ... is Jhe required alYlQunl!or programming Figure 35-8

= Using Trigonometric Method


Example of G90 cycle used on 8 taper to a shoufder - 03504

Using the the machining a ta-


The second method of I amount requires pered cut a shoulder. A single G90
trigonometry. At this point, it is known can be used in this case as but could result in some ex-
(too much or too little stock).
I :::: 2.7 x tan a aOltlroach is to use two modes of the cycle - one
","",,,IT''''' tapered roughing.
and the tangent value has to
Similar to the "'''''''''''' ~n'.... u."x"'.the I taper amount has to
tan a ::::: i / 2.5 be calculated, of similar triangles as
tan a :::: 0.875 / 2.5
tan a ::::: 0.350 fore. TIle height i triangle over the length of
2.5 is calculated as one difference between the
amount of I can be calculated 02.750 and the 01

I 2.7 x 0.35 i = 2.75 - 1.75 / 2


I 0 . 945 ... is the required amowllfor programming i = 0.500
both cases) the calculations have the same For the extended 0.005 stock amount is
.LlllJ.Jll"'E accw:acy ofthe process. I amount \"'d.LI~Ul<:IUUI at the shoulder for DnlS.O:lDg and is extended by
Figure 35-6 and detailed in Figure 0.100 at the front of 2.595:
is the fmal result - five cuts with 0.03 ",-:"l'{."
2.5 - 0.005 + 0.100 = 2.595
03503 I amount can now be calculated, based on the origi-
TAPER 'I't.JRNrnG EXAMPLE 1 - w/0. 03 X-STOCK)
Nl G20 nal the extended values:
N2 T0100 M41
N3 G96 S450 M03 I / 2.595 = 0.500 / 2.5
N4 GOO X4.2 ZO.l T010l M08 I := (0.500 x 2.595) / 2.5
N5 G90 X3 752 Z-2.6 I-0.945 FO.Ol (1) I := 0.519 ... negaiive direclion
N6 X3.374
N"J X2 996 (3) For roughing, a 0.030 side along the
N8 X2.618 (4) X which is 0.060 on dlalIDt:~ter
N9 X2.24 (5)
NlO GOO XlO.0 Z2.0 T0100 MD9 (CLEAR PeS ) In roughing operations, it is to select a
Nll MOl (END OF ROUGHING) suitable depth of cut, with safety as the cut-
conditions. In this example, selection
will benefit from one simple ·ogJ:amm.ulg teclmique. If
• Straight and Taper Cutting Example of cut is selected last depth will be
"'''''A''''V is left to cut. A a calculated
v",,'''~t'''\M of a taper is also common in
n1.lI'!lnl~r of equal cuts - Figure
35-8 shows another
and a shoulder.
312 Chapter 35
---- --~--~---------------~

I.()
0')
0
("")
I.()
(!)
G94 - FACE CUTTING CYCLE
~ (!) i'- ..-
N ..-, 0, 00
N N N NN A cycle that is very similar to 090 is another simple turn-
ing cycle, programmed with the G94 command, This cycle
is called the face cutting cycle. The purpose of C,g4 cycle is
0.865---- 0.865 --!--
, 0.865
/START [0 remove excessive stock between the start position of the

.•I ~ X4 . 100 cutting tool and the coordinates specified by the X and Z
. ; -X3.778 axes. The resulting cut is a slTaight turning cut, normally
X3.456 pelpendicular to the spindle center line. In this cycle, it is
I X3.134 the X axis that is the main CUlling direction. The 094 cycle
L. .- X2.812 is used primarily for facing cuts and can be used for simple
0.173 X2.466
0.1-73 vertical taper cutting as well. similar to the 090 cycle.
X2.120
0.173 X1.774
C- The G94 cycle is logically identical to the G9a cycle,
except the emphasis is on the X axis cutting,
Figure 35-9 rather than the Z axis cutting.
Depth of cut calculation for program example 03504
As the cycle description suggests, the 094 is normally
For the ca1cul ation, aillha! is required is to divide the dis- used to perform a rough face-off of the part, towards the
lance per each side by the number of required cuts. The re- spindle center line or to face-off a shoulder.
sult wlll be an equal depth of cut for the whole roughing op-
eration. If Ihe cutting depth is LOa smal! or too large, JUSl • Cycle Format
recalculate it wilh a different number of CUIS. Knowing
what is a suitable depth of cut is a machining knowledge, Similar to all cycle, lhe face culting cycle 094 also has a
expected from CNC programmers. predetermined programming format. For straight facing.
the cycle fonnat is:
In Figure 35·9, there are four cuts of .161 for the slraight
roughing and three cuts of .173 for Lhe tapered cutting. All G94 X(U) .. Z(W) .. F..
slack allowances are in effect.
For tapered turning, the cycle format is:
The program 03504 will usc the calculations:
G94 X(U)" Z(W) .. K.. F..
03504
(G90 TAPER TURNING EXAMPLE - 2) The axes X and Z are used for absolute programming, the
N1 G20 axes U and Ware used for incremental programming, and
N2 TOlOO M41 lhe F address is the cutting feed rate. The K parameter. if
N3 G96 S450 M03
N4 GOO X4.1 ZO.l TOI01 MOS (START)
greater than zero, is used for taper culling along the vertical
N5 G90 X).778 Z-2.495 FO.Ol (STRAIGHT 1) direction. Figure 35-10 shows all programming parameters
N6 X3.456 (STRAIGHT 2) and cutting steps, Apply lhe same process as for 090 cycle.
N7 X3.134 (STRAIGHT 3)
N8 X2. 812 (STRAIGHT 4)
N9 GOO X3. 0 (CHANGE STRAIGHT TO TAPERED)
mo G90 X2.B12 Z-O.765 I-O.173 (TAPERED 1)
Nll Z-1.63 I-0.346 (TAPERED 2)
Nl2 Z-2.495 1-0.519 (TAPERED 3 - FINAL)
N13 GOO XIO.O Z2.0 TOIOO M09 (CLEAR PeS.)
Nl4 MOL (END OF ROUGlITNG)

In a review, to calculate the amount of I or R parameter


used in 090 for the taper cUlling - ex/ernal or intemal. use
[he following formula:
........................ _ ............

[ I (R) =
SMALLER DIA - LARGER DIA
2 G94 - STRAIGHT
Figure 35·10
G94 - TAPERED

The rcsult will also include thc sign of fhe J amount. G94 turning cycle structure· straight and tapered application
LATHE 313

MULTIPLE REPETITIVE CYCLES • Cycle format Types


Each cycle is governed by very rules and has its
do's and don'rs. The f ollowi of
them In detail, except the which will
be covered separately in Chapter
An important fael (0 Lake a n01e of, is Ihal
programming for these cycles, method
different for the lower level
very popular OT or {he 16/18120/21T
etc, sj
higher level, such as the 1011 IT Or the I
cycles. if they are available for the re-
are used for contouring. Tool nose
quire their programming formal in twO blocks. not the nor-
applied, if applicable to
malone block. Check the parameter con-
Mulliple as lrol, (0 find about compatibility both
quire a computer memory in order to formals is also Included in this chapler.
NC machines controlled by a punched
from them. Tn tape operation, • Cutting Cycles and Part Contour
codes sequentially, in a forward
Probably the mOSI common multiple in
control. on the other hand, is more
turning and bor~ng are those thai are used for profile cutting
evaluate and process information
or coJJtou/, cultmg. There are three available within
both directions, forwards
the roughing category:
can process mathematical
of a second, simplifying the o G71, and G73

• General Description and olle cycle is available for rllli~liing:

In total. there are seven multiple r"r",l>nih,,'" o G70


able, identified by a nY-F'n",'"''
finishing cycle is designed to finish profile
Profile cutting cycles - Roughing: by allY one of the three roughing cycles.

In some respects, Ihere is an interesting situation in pro-


G71 multiple repetitive cycles. So far, the emphasis
,vas 10 program roughing cuts before finishing cuts. 111is
G72 approach perfect sense - it is also the only logical
G73 Pauern repealing from the lechnological point of view. Don't be sur-
prised if Ihis 'rule' is suddenly broken when com pUler
lake over. implication here is (hal when
Profile cutting cycles· Finishing:
the multiple repetilive roughing cycles,
contOllr musl always be defil1edfirst, then its
Finishing cycle for 071. 072 nnd 07J elm appllcd to the roughingcy-
perhaps, Wh~n working with
easy to see that it is actually
Chipbreaking cycles:
although hardly a re-

G74 Peck drilling cycle in Z axis - horizontal

G75 Peck grooving cycle in X axis - verticill • Chipbreaking Cycles

Threading cycle:

The G76 threading cycle is described separately and In


sufficient detail in Chapter 38.
314 Chapter 35

CONTOUR CYCLES • Start Point and the Points P and 0.


The poinL A in the illustration is
(contouring cycles), are fi Ie cuui ng cycle. It can be
lalhe programming. They
anrl internal (horing) male-
any machinable contour.

• Boundary Definition Typically, SlarL point will


where the rough cuuing begins. It is
The roughing cycles are on the detinition of two start point very carefully. it is more
boundaries, typically material boundary, which point', In fact. this special
is (he outline of blank, the boundary, which is ances and the actual depth of
(he outline of the pan conlour, is not a new concepl at
all, several programming were using this The generic points Band C in the last will
method, such as the Compact JI, a come points P and Q in the
based system of the I
Point P represents the block number of
The two defined boundaries create a the first Xl coordinate of the finished contour.
!h,:\l defines the
the material is removed in an Point Q represents the block number of
tied machining paramcters in thc last Xl coordinate of the finished contour.
Mathematically, the minimum
define an area is Lhree. These lhree
Olher in-depth considerations relating to (he P and Q
(meaning not on the same line), boundary poinrs are equally important, and there are quite a
pie boundary wiLh only few of (hem:
sisLing or many points,
D A number of points may be defined between the P and a
representing the XZ coordinates of the f.n,e,h<:>1i
c
- - ~---------- contour. The contour is programmed using GOL G02,
and G03 tool motions, including teed rates.

>~!
Part bou~dary ~
Roughing area
by
rlQ4tu'I':'1"I
[J material removal defined by the starting point and
the p.Q contour must include all necessary clearances.
B three points only
D nose radius offset should not be included between
the P and a points, but programmed before the cycle is
_ .- Material called, usually during the motion to the start point.
c --------:..--.,A/'
1/ D For roughing, the material to be machined will be divided
f into a of cuts. Each roughing cycle
,
I
Roughing area ""'I"'nte a number of user ""r'I-'"<''''

Part boundary
I defined by more
B than three points

Figure 35-1 7 o The tool motion 1)!'![Wflfm


Material and part boundaries as applied to turning must be
steadily ",.,""., ....."""
In the profile cutting cycles. each poinl represents a
nlr.orT,,'m "''''.\A, ....." P and Q points is allowed
position and the POllltS A, B, and C represent the extreme
is available and programmed, and then
corners of the selected (defined) machining area, Inane . see the next section for
material boundal), is nOt actually defined, it is only D Blocks coordinate of the
impl It is between points A and S, and point~ A and C. contour and the of the contour a,
Material boundary can not contaill any other points; it must must have a sequence number N, not duplicated
a straight line, but not always a line parallel [Q an :>n\,f\hln,<>r<> else in the program.

is defined between B C,
between. For CNC
used rather
< «---_._-- 315

I AND TYPE II CYCLES • Programming Type I and Type If


system supports II
In the initial versions of the contour cutting cycles, a boring cycles, it also
of the contouring direclion into the Opposile direc- for some special
tion one axis was not allowed. That limited these cy- not replaced one type
to some extent, because common undercuts or recesses JI. Of course. the question is
were nol possible [0 use in the yellhey were com- the two lypes in the
mon m shops. is in the contents
follows the cycle call:
Presently, {his older is
modern controls use o .,. only one axis is
ware features and the o II '" two axes are
lowed. This newer method
more programming flexibi I:
cavities (undercuts). Figure
and shows a disallowed contour a7l U .. R ..
a cycle. The example to I external cutting an P10 Q •. U •. W•. F •. S ••
cycle, but can be modified for any internal cutting. mo GOO X.. (ONE AXIS FOR TYPE I)

TYPE I CYCLE Q Example· Type II :


... is roughed out G71 U •. R •.
in a single depth Gn P10 Q •• U .• W•• F •• S ••
NlO GOO X.. Z.. ('!WO AXES FOR TYPE II)
TYPE II CYC
... is roughed out Iflhere is no motion Z axis in the first
in several depths fer the cycle call and 11 is still required.
program WO as the "",""'11
BI-DIRECTIONAL • Cycle Formatting
... contour On the next few is a description of the six
is not allowed cycles. covered in It is important to understand
format of each cycle as it applies 10 a particular
Figure 35·12 Several Fanuc conlrol are available and for
Comparison of Type land of programming multiple repelitive
. bi·directional change can be into two groups:
Type 1 allows a increasing profile (for o Fanuc 21T ". tower/eve!
cutting) or steadily decreasing profile (for'
o Fanuc system 1ST level
from U1e point P to point Q (typical cutting directions).
On older conlrcls, X or Z direction is not allowed. Practically, il only means a change in the
Modern controls an undercut to be machi with programmed, but the is also important
Type I, but the will be done with a single That some incompatibility Note that the tool function
metal removal in T is not specified in oflhe examples, although it IS also
which lype Ihe allowed as a in all multiple repetitive Its
supports. may be 'O..i";';:"U only need maybe a tool offset change.
Type l! allows a continually increasing profile or
ally decreasing from the point P to G71 - STOCK REMOVAL IN TURNING
change into the direction is allowed
axis only, on active cycle. The most common roughing cycle is 071. Its
of an undercut will a multiple 1001 path. to remove horizontal cutting, primarily
Type lor Type 11 is applicable to the cycle, by Z axis, the right to the left. It is
both axes in the block represented by Ihe P This roughing oUi OUl of a solid cylinder. all cy-
lypically block immediately following. the cycle call in cles, it romes in two formats - {\ one-block
the I, G72, elc.). block formal. on the conlrol
316 Chapter 35

• G71 Cycle Format - 10T/11 T/15T


The one-block format for the G7 J cycle is: RO.125
03.0
G71 P.. Q.. 1.. K.. U.. W.. D.. F.. 5 ..
02.500
~ where ... < -02.250
..".....".....,....-.. ,--.. . . . . . 02.000
p = The first block nu mber of the fin ishi ng profile
0 The last block number ofthe finishing profile
I =: Distance and direction of rough 01.250
semifinishing in the X axis - per side i-- 00.625
00.875
K = Distance and direction of Tough ................ "c········

semifinishing in the Z axis RO.


U =:: Stock amount for finishing on the Xaxis diameter
W = Stock left for finishing on the Z axis
o 0 0 0
0 The depth of roughing cut o
1.0
1.0
N
1.0
,.......
I.()
1.0
F = Cutting feed rate (in/rev or mm/rev) overrides ~..... 0 0
feed rates between the P block and the Q block
S Spindle speed ~ft!min or m/min) overrides spindle CHAMFERS 0.05 x 45° - CORE 09/16
speeds between the P block and the Q block
Figure 35-13
The I and K parameters. are not available on alJ machines. Drawing example to illustrate G7l rQughing cycle - program 03505
They conlrol lhe amount of cuI for semifinishing, the last
continuous cut before final roughing motions.
• G71 for External Roughing
• G71 Cycle format - OT/16T/18T/20T/21 T The slack material in the example has an existing hole of
09/16 (.5625). For external CUlling of this part, a standard
If thc control requires a double block entry for the G71
80 0 tool will be used for a single cut on the face, as well as
cycle, the programming format is:
for roughing the ouler shape.
G71 U.. R.. Program 03505 covers these operations.
G71 P.. Q.. U.. W.. F.. 5 ..
03505 (G71 ROUGHING CYCLE - ROUGHING ONLY)
IB.T' where ... Nl G20
N2 TOIOO M41 (OD ROUGHING TOOL + GEAR)
First block: N3 G96 S450 Me3 (SPEED FOR ROUGH TURNING)
N4 GOO G4l X3.2 ZO TOlOl MOe (START FOR FACE)
U = The depth of roughing cut N5 GOI XO.36 (END OF FACE DIA)
R = Amount of retract from each cut N6 GO 0 ZO. 1 (CLEAR OFF FACE)
N7 G42 X3.l (START POSITION FOR CYCLE)
Second block: NS G7l P9 017 UO.06 WO.004 D1250 FO.Ol4
N9 GOO Xl.7 (P POINT = START OF CONTOUR)
P The first block number of the finishing profile mo GOI X2.0 Z-O.OS FO.OOS
Q The last block number of the finishing profile
:;;;;; Nll Z-O. 4 FO. 01
U Stock amount for finishing on the X axis diameter Nl2 X2.25
W = Stock leftforfinishing on the Z axis N13 X2.5 Z-O.6
f ::: Cutting feedrate (in/rev or mm/rev) overrides Nl4 Z-O.87S RO.12S
feedrates between the P block and the Q block NJ.SX2. 9
S == Spindle speed (ftJmin or m/min) overrides spindle NJ.6GOI X3.05 Z-O.95
speeds between the P block and the Q block Nl7 UO.2 FO.02 (0 POINT = END OF mN'TOUR)
Nl8 GOO G40 XS.O Z6.0 TOlOO
Do not confuse the U in the iirst block, depth of cut per Nl9 MOl
side, and the U in the second block, stock lefl on diameter.
The rand K parameters may be used only on some controls The external roughing bas been completed at thiS point in
and the retract amount R is sel by a system parameter. the program and the internal roughing can be programmed
for the next tool. In all examples that include a 1001 change
The external and inlernal usc of the G71 cycle will use the between a short tool (such as a turning tool) and a long tool
drawing data in Figure 35-/3. (such as a boring bar), it is important to move the short tool
Curther from the front face. The motion should be far
enough to accommodate the incoming long tool. The clear-
ance is 6.0 in the above example (block N18 with Z6.0).
LATHE CYCLES 317

• G71 for Internal Roughing Cutting direction


The face has been done with the previous 1001 and the
roughing horing bar can conlinue the machining:
----, :::i"P
I
1
- SP to P direction
is negative for
mo
N21
T0300
G96 8400 M03
(In ROUGHING TOOL)
(SPEED FOR ROUGH BORING)
1
I
J external cutting

N22
N23
GOO G41 XO.S ZO.1 T0303 MOS (START pas.)
G71 P24 Q31 U-O.06 WO.004 01000 FO.012
-P
p
SP to P direction
N24
N25
N26
N27
GOO Xl.5S (p POINT '" START OF CONTOUR)
GOl Xl.2S Z-O.05 FO.004
Z-O.55 R-O.l FO.OOB
XO.875 K-O.OS
'" _...
-----------~.§E
/
t is positive for
external cutting

N2B Z-O.75 Q , - Cutting direction


N29 XO.625 Z-1.2S
N30 Z-l. 55
N31 U-O. 2 FO. 02 (Q POINT END OF CONTOUR) Figure 35-14
N32 GOO 040 X5.0 Z2.0 T0300 External and internal CUl1ing in G71 cycle
N33 MOl

The part has been completely roughed out. leaving only G12 - STOCK REMOVAL IN fACING
the req uired stock on diameters and faces or shoulders. Fi 11-
ishing with the G70 cycle, described laler, is possible wilh
111C Gn cycle is identical in every respect to the G71 cy-
(he same 1001, if lolerances and/or surface finlsh arc nOlloo
crilicaL Otherwise, another 1001 or 1001s will be required in cle, excep[ the stock is removed mainly by vertical culting
(facing), lypically from (he large diameter towards the
the same program, after a Lool change.
spindle center line XO. II is used for roughing of a solid cyl-
At 11m stage, evaluate what has been done and why. inder, using a series of vertical cuts (face culS). Like all
Many principles Ihat applied to the example are very com- olher cycles In Ihis group. It COllies in two formats - a one
mon 10 other operalions that also use the mUltiple repetitive block and a double block formal, depending on Ihe control
cycles. It is important 10 learn them weI! allhis point. system. Compare G72 with the G71 structure on examples
in this chapter.
• Direction of Cutti ng in G71
• G72 Cycle Format ~ 101/111/151
The last programming example 03505, shows Ihal G71
can be used for roughing externally or infernally. There are The one-block programming formal for the G72 cycle is:
two important differences:
G72 P.. Q.. I.. K.. U.. W.. D.. F.. S..
o Start point relative to the P point (SP to P versus P to SP)
~ where ...
o Sign oi the U address for stock allowance on diameter

The control system will process the cycle for external P = The first block number of the finishing profile
cUlling, if the X direclion from Ihe starl pain! SP 10 lhe Q The last block number of the finishing profile
point P is !legal il'e. In the example, the X slart poi nt is X3. I, I Distance and direction of rough semifinishing
in the X axis - per side
the P point is X 1.7. The X direction is negalive or decreas-
K Distance and direction of rough
ing and an eXlernal cUlling will take place.
semifinishing in the Z axis
The control syslem wi II process the cycle for internal cut- U Stock amount for finishing on the X axis diameter
ling, if (he X direction from stan point SP to Ihe point Pis
W Stock left for finishing on the Z axis
posiTive. In the example, the X start puinl is XO.5, the P
o The depth of roughing cllt
F Cutting ieedrate (in/rev or mm/rev) overrides
point is XJ.55. The X direction is positive or increasing, feedrates between the P block and the Q block
and an internal culling will take place. S Spindle speed ~ft/min or m/min) overrides spindle
speeds between the P block and the Q block
Figure 35-14 illustrates the concept of G71 cycle, as ap-
plied to both, ::Inc! intern::!l cU!ling The meaning of each address is (he same as rar the G71
cycle. The I and K parameters are nOI available on ail
By (he way, although the sign of the stock U value is very
machines. These parameters conlrol (he amount of cut for
important ror the final size of the part, it does lIot determine
semifinishing, which is the last continuous cut before final
the mode of cUlling. This concludes the section relating to
roughing motions are completed.
the G71 multiple repetitive cycle. The face roughing cycle
Gn is similar, and is described next.
318 Chapter 35

+ G72 Cycle Format - OTj16T/1 BT/20T/21T 03506 (G72 ROUGHING CYCLE - ROUGHING ONLY)
m G20
If the control system requires a double block enlry for lbe N2 T0100 M41 (OD FACING TOOL + GEAR)
G72 cycle, the programming formal is: NO G96 8450 M03 (SPEED FOR ROUGH FACING)
N4 GOO G4l X6.2S ZO.3 T010l MOB (START POS.)
G72 W.. R.. N5 G72 P6 Q12 UO.06 WO.03 D1250 FO.014
G72 P.. Q .. U.. W.. F.. 5 .. N6 GOO z-O.87S (p-POINT :::: START OF CONTOUR)
N7 GOl X6.05 FO.02
Ia" where ... N8 XS.9 z-o.a FO.ooa
N9 X2. 5
First block: mo n.s ZO
Nll XO.55
W = The depth of roughing cut Nl2 WO.1 FO. 02 (Q-POINT :::: END OF aJNTOUR)
R = Amount of retract from each cut Nl3 GOO G40 XS.O Z3.0 TOlOO
Nl4 MOl
Second block:
The concept of G72 cycle is illustrated in Figure 35-16.
p =The first block number of the finishing profile Note the posicion or (he poinl P as it relales lo Ihe start puinc
Q == The last block number of the finishing profile SP and compare it with Ihe G7) cycle.
U Stock amount for finishing on the X axis diameter
W = Stock left for finishing on the Z axis
F

S
Cutting feedrate (in/rev or mm/rev) overrides
feedrates between the P block and the Q block
Spindle speed (ftlmin or m/min) overrides spindle
,
,

I
speeds between the P block and the Q block I
I . Cutting direction
1n the G7 J cycle for the doubJe block definition, rhere I
were two addresses U. In the 072 double block definition f
cycle, !.here are two addresses W. Make sure you do not I
I
confuse the W in the first block - depth of cut (actually il is l
a 'width of cut), and the W in the second block - stock left on I
faces. The I and K paramelers may be available, depending I
on the control. I
Q
An example program 0350() for the G72 cycle uses the
drawi ng data in Figure 35- J5.
a CHAMFER 0.05 x 45° Figure 35-16
a
co Basic concept of G72 mUltiple repetitive cycle
a

-06.0 G13 - PATTERN REPEATING CYCLE

- - 0.25 FACE STOCK The pattern repeating cycle is also called the Closed Loop
or a Profile Copying cycle. lIS purpose is to minimize the
CUlling lime for roughing material of irregular shapes and
forms, for example, forgings and ca..c;tings.
- 02.500
·01500 + 673 Cycle Format -10Tj11Tj15T
03/4 CORE The one-block programming format for Gn cycle IS

,~.Q.i similar to (he G71 and G72 cycles:

Figure 35-15 G73 P.. Q.. 1.. K.. U.. W.. D.. F.. S..
Drawing example to illustrate G72 roughing cycfe - program 03506
IQj" where ...
10 lhis facing application, all the main data will be re-
versed by 90". because the cut will be segmented along the P =::: The first block number of the finishing profile
Q The last block number of the finishing profile
X axis. Roughing program using the Gn cycle is logically
1 =: Xaxis distance and direction of relief - per side
similar to the G71 cycle: K =: Z axis distance and direction of relief
U Stock amount tor finishing on the X axis diameter
319

w left for on the Z axis important input parameters in the G73


o The number of divisions One pClJameter seems to be missing - there
F Cutting feedrate !in/rev or mm/rev) overrides cut specification.! Tn the G73 cycle, it is not
feed rates between the P block and the Q block actual depth of cut is calculated au[omatically,
s Spindle speed (ft/min or m/minl overrides spindle parameters:
between the P block and the Q block
o I ... amount of material to remove in the X
• Cycle Format OT/16T/18T/20Tj21T
w

oK ... amount of material to remove in the Z axis


control requires a double block entry o D ... of cutting 111\11<:1(\1'" or number of
cycle, the programming format is:
this with care - its
amount rough stock to be rprnr\'''IU!
Z axes. That is not the typical
castings, where the stock varies all over
~ where ... the illustration in Figure 37·17. can
with a reasonable efficiency, but some 'air'
First block:
an unwanted side effect for odd shaped
u = X axis distance and direction of relief· per In the example, the largest expected material amount per
W Z axis distance and direction of relief
will be chosen as .200 (10.2) and the
R The number of cutting divisions
material amount on the face as .300 (KO.3).
Second block: divisions could be either two or three, so the r-\rr,,,r·,\rn
use D3. Some modification on the control
P The first block number of the finishing during actual setup or machining, .... ~I"/v".~,
Q = The last block number of the finishing profile exact condition and sizes of the or
U -=- Stock amount for finishing on the X axis
W Stock left for finishing on the Z This cycle IS suitable for roughing contours where the
F Cutting feedrate (in/rev or mm/rev) CHI<>"""'" finish contour closely matches the contour the
feed rates between the P block and the Q forging. Even if there is some this
S Spindle speed {ftlmin or m/min} overrides spindle be more efficient than the selection of J or cy-
speeds between the P block and the Q block The program 03507 and finishing
with Ihe same tool (as an example):
In the two-block cycle entries, do nOI up
the firs! block thal repeat in the second block (U 03507 (G73 PATTERN REPEATING CYCLE)
the example). They have a different Nl G20 M42
N2 T0100
• G7J Example of Pattern Repeating N3 G96 S350 M03
N4 GOO G42 X3.0 ZO.l TOlOl MUS
repeating cycle G73 uses the NS G73 P6 Q13 IO.2 KO.3 UO.06 WO.004 D3 FO.Ol
In 35-17. N6 GOO XO.35
N7 GOl Xl.OS Z-O.25
N8 Z-O.62S
N9 Xl. 55 Z-l. 0
N10 Z-1.625 RQ.2S
Nll X2.4S
N12 X2.75 Z-1.95
N13 UO.2 FO.02
Nl4 G70 P6 Q13 FO.006
N15 GOO G40 XS.O Z2.0 T0100
Nl6 MJO
%

01.050
00.550

Figure 35-17
Pattern repeating cycle 673 program 03507
320 Chapter 35
- - - -. --------

A . . . . . . .,
,
B'--
A
, For safety, use the same start point for G70
as for the roughing cycles.

'1 The earlier roughing progTam 03505, using the G71 re-
petitive cycle for rough turning and rough boring, can be
compleled by using another IWO tools, one for external. one
for internal finishing lool path:

(03505 CONTINUED ... )

N34 TOSOO M42 (00 FINISHING TOOL + GEAR)


N35 G96 5530 M03 (SPEED FOR FINISH TURNING)
A =1+ U/2 N36 G42 X3.1 ZO.l TOSOS MOS (START POS.)
B= K+W N37 G70 P9 Q17 (FINISHING CYCLE - OD)
N18 GOO G40 XS.O Z6.0 TOSOO
N39 MOl
Figure 35·18
N40 T0700 (In FINISHING TOOL)
Schematic representation of 673 cvcle N41 G96 S47S M03 (SPEED FOR ROUGH BORING)
N42 GOO G41 XO.S ZO.l T0707 MOS (START POS.)
Note that (he pallern repealing cycle does exactly thaI - it N43 G70 P24 Q31 (FINISHING CYCLE - ID)
repeals (he machining contour (pattern) specified between N44 GOO G40 XS.O Z2.0 T0700
the P and Q points. Each Indlvidual 1001 path IS offset by a N45 M30 (END OF PROGRAM)
calculated amount along the X and Z axes. On the machine. %
watch the progress with care - particularly for the firsllool
path. Feedrate override may come useful here. Even for the ex ternal Ii nishing. the cutting tool is still pro-
grammed 10 start above the original stock diameter and off
the from face, although all roughing morions have already
G10 - CONTO ING CYCLE been completed. A similar approach applies to the internal
cut. For safely reasons, this is a recommend praclice.
The last of the contouring cycles is G70. Although il has a
smaller G number than any of the three roughing cydes There are no feed rates program med for the G70 cycle, al-
G71, G72 and Gn, the !imshing cycle G70 is normally though the cycle formal accepts a feedratc. The defined
used after anyone of these three rough ing cycles. As ils de- block segments Pta Q for Ihe roughing 1001 already include
scription suggesls, it is siriclly usedJor the finishing CUf oja feedratcs. These progmmmed feedrates will be ignored in
previously defined conrow: the roughing mode and will become aClive only for the G70
cycle, duri ng fi nishi ng. If Ihe fi n ish conlour did not include
• G70 Cycle Format· All Controls ;:lny feerir:1tes, lhr:n progrllm rI comm(!fljeedmle for l~nish­
ing all contours during the G70 cycle processing. For ex-
For this cycle, there is no difference in the programming ample, program block
rormal for various controls - il is all the same, and the cycle
call is a one-block command. N17 G70 P9 Q17 FO.007

The programming format for G70 cycle is: will be a waste of time, since the .007 in/rev feedra\e will
never be used. It will be overridden by the feedrate defined
between blocks N9 and N 17 of program 03505). On the
Olher hand. if [here is no feedratc programmed for the fin-
trIir where .. "
ishing contour al all, then
P The first block number of the finishing profile
Q The last block number of the finishing profile N .. G70 P .. Q .. FO.007
F ;;= Cutting feedrate (in/rev or mm/rev)
S Spindle speed (ft/min or m/min) will use .007 in/rev exclusively for the finishing tool path.

The cycle G70 acceplS a previously defined finishing The same logic described ror G7 t cycle, appl ies eq ually
contour from either or the three roughing cycles. already La Ihe G72 cycle. The roughing program 03506, using the
described. This finishing contour is defined by the P and G72 cycle for rough turning of Ihe pan face, can be com-
Ihe Q points of Ihe respective cycles. and is normally re- pleted by using another external lool for finishing euls
pealed in the G70 cycle. allhough It can change. uSing Ihe G70 cycle:
LATHE CYCLES 321

(03506 CONTINUED ... )


G14 - PECK DRILLING CYCLE
N15 TOSOO M42 (00 FACING TOOL + GEAR)
N16 G96 5500 M03 (SPEED FOR FINISH FACING) The G74 cycle is one of two cycles usually used for non
Nl7 GOO G41 X6.2S ZO.3 TOSOS M08 (START POS.) finishing work. Along with G75 cycle. it is used for ma-
N1e G70 P6 Q12 (FINISHING CYCLE) chining an interrupted cm, such as chips breaking during a
Nl9 GOO G40 X8.0 Z3.0 TOSOO long CUlling moLion. C74 cycle is used along rhe Z axis.
mo M30
% This is [he cycle commonly used for an interrupted CUl
along the Zaxis. The name of the cycle is Peck Drilling Cy-
The rules mentioned earlier also apply for the contour cle, similar 10 the G73 peck drilling cycle, used for machin-
finishing defined by the G72 cycle. Program 03507, using
ing centers. FOr Ihe lathe work, G74 cycle application is a
the G73 cycle, can be aJso be programmed by using another lillie more versatile than for its G73 equivalent on machin-
external Lool for finishing, applying the same rules.
ing centers. Although its main purpose may be applied to-
wards peck drilling, Ihe cycle can be used with equal
BASIC RULES FOR G10-G13 CYCLES eftlciency for interrupted eUls in turning and boring (for ex-
ample, in some very hard materials), deep face grooving,
In order 10 make the multiple repetitive stock removal cy- difficull part-off machining. and many other applications.
cles (contouring cycles) work properly and efficiently, ob-
serving the rules of their use is very important. Often a • G74 Cycle Format - 10Tj11Tj15T
small oversight may cause a lengthy delay. The one-block programming format for G74 cycle is:
Here are Ihe most important rules and observations:
G74 X.. (U .. ) Z.. (W .. ) 1.. K.. D.. F.. S..
o Always apply tool nose radius oHset
before the stock removal cycle is called !Gf where ...
o Always cancel tool nose radius offset X(U) = Final groove diameter to be cut
after the stock removal cycle is completed Z(W) Z position of the last peck - depth of hole
o Return motion to the start point is automatic, I = Depth of each cut (no sign)
and must not be programmed K Distance of each peck (no sign)
D ;::: Relief amount at the end of cut
o Th e P bloc k in G71 should not include (must be zero for face grooving)
the Z axis value (Z or W) for cycle Type I F Groove cutting feedrate (in/rev or mm/rev)
o Change of direction is allowed only for Type II S =: Spindle speed (ft/min or m/min)
G71 cycle, and along one axis only (WO)
• G74 Cycle Format - OTj16Tj18Tj20Tj21T
o Stock allowance U is programmed on a diameter,
and its sign shows to which side of the stock it is to The two-block programming format for G74 cycle is:
be applied (sign is the direction in X, to or from the
spindle centerline) G74 R..
G74 X.. (U .. } Z.. (W .. ) P.. Q .. R.. F.. S..
o Feedrate programmed for the finishing contour
(specified between the P and Q points) will be Il..-:W where .,.
ignored during roughing
o D address does not use decimal point, and must be First block:
programmed for leading zero suppression format:
R =: Return amount (clearance for each cut)
D0750 or D750 is equivalent to .0750 depth
Second block:

Only some control systems do allow a decimal point X(U) =::: Final groove diameter to be cut
to be used for the D address (depth of cut) Z(W) Z position of the last peck (depth of hole)
p Depth of each cut (no sign)
in G71 and G72 cycles.
Q == Distance of each peck (no sign)
R = Relief amount at the end of cut
(must be zero for face grooving)
F Groove cutting feed rate (in/rev or mm/rev)
S = Spindle speed (ft/min or m/min)
322 Chapter

If both the X(U) and I (or P) are omitted in the I = Depth of each cut (no sign)
machining is along the Z axis only (peck K II"T~,n ..... oerwelm grooves (no sign)

cal drilling operation, only the Z, K arc (for multiple only)


programmed - see Figure 35·19. D Relief amount at the end of cut
zero or not used forface groove)
F Groove cutting feedrate lin/rev or mm/rev)
K - - K --, S Spindle 1ft/min or m/minl

• G75 Cycle format - OTj16Tj18Tj20Tj21T


The two-block ng fomlal for G75

z
35-19 ~ where ...
Schematic format for 674 cvcle example
First block:
The followmg program example il cycle:
R Return amount (clearance for each
03507 (G74 PECK DRILLING)
N1 G20 block:
N2 T0200
N3 G91 51200 MO) IN RPM) X{U) = Final groove diameter to be cut
N4 GOO XO ZO.2 T0202 MOB POSITION) Z(WJ Zposition of the last groove
NS G74 Z-3.0 KO.S FO.012 (PECK DRILLING) P Depth of each cut (no sign)
N6 GOO X6.0 Z2.0 T0200 POSITION) Q Distance between grooves (no sign)
N1 M30 (END OF PROGRAM) R Relief amount at the end of cut
% (must be zero for face grooving)
F Groove cutting feedrate
Drilling willtuke place to a (usually In/rev or mm/rev)
cremenls of one half of an S =:: Spindle speed (usually ftlmin or m/minJ
peck is calculated from
an interrupted groove is the Z(W) and K (or Q) are the
is along the X axis only
G15 * GROOVE CUTTING CYCLE A example of G75 will in {he

075 of two lathe cycles available


simple, non ''''''rr\J.'r with the G74 cy- BASIC RULES fOR G14 AND G75 CYCLES
cle, il is used for an inten'upted cuI, for
example for break or
nOles are common to both
motion. C75 cycle is
o In both the X and Z values can be programmed
This is also a very 5i designed 10 break absolute or mode.
during a rough cut the axis - used mainly a
grooving operation. The cycle is identical to G74, ex- o Both cycles allow an
cept the X axis is replaced with the Z axis. o The relief amount at the end of cut can be
in that case It will be assumed as zero.
• G75 Cycle format - 10Tj11TjlST
D Return amount (clearance for is only
programmable for the two-block method. Otherwise.
it is set by an internal parameter of the control system.
o If the return amount is programmed (tINo-block method),
and the relief amount is also programmed, the
Il? where ...
presence of X determines the If the X value
is programmed, the Rvalue means relief amount.
XIU) diameter to be cut
Z(W) = Z of the last groove
(for multiple grooves only)
II GROOVING ON LATHES

Groove cutting on CNC lalhes is a multi step machining • Grooving Criteria


operation. The term grooving usually applies to a process
of forming a narrow cavity of a certain depth. on a cy]i nder, For a CNC programmer, grooving usually presents no
cone, or a face of the part. 1l1e groove shape. or at least a special difficulties. Some grooves may be easier to pro-
significant part of it, will be in the shape of the cUlling tool. gram than others, yet there could be several fairly complex
Grooving tools are also used for a variety of special ma- grooves found in various industries thaI may present a pro-
chining operations. gramming or machining challenge. In any case, before a
groove can be programmed, have a good look at lhe draw-
The grooving tool is usually a carbide insert mounted in a ing specifications and do some overall evaluations. Many
special tool holder, similar to any other tool. Designs of grooves may appear on the same parI at different locations
grooving inserts vary, 1T0m a single tip, 10 an lnsert with and could benefit from a subprogram development. When
multiple lips. Inserts are manufactured !O nominal sizes. planning a program for grooving, evaluate the groove
Multi tip insert grooving tools are used (0 decrease costs carefully. In good planning, evaluate the selected groove by
and increase prmJuclivity. al leasl lhree criteria:
o Groove shape
GROOVING OPERATIONS
o Groove location on a part

The cutting tools for grooving are either external or inter- o Groove dimensions and tolerances
nal and use a variety of inserls in different configuraeions.
Unfortunately, many grooves are not of the highest qual-
The most important difference between grooving and turn-
ilY. Perhaps it is because many grooves do no! require high
ing is the direClion of cut. Turnmg lool can be applied for
precision and when a high precision groove has to be done,
culs in multiple directions, grooving tool is normally used
the programmer does not know how to handle it properly.
to cut in a single direction only. A notable exception is (1n
Watch particularly for surface finish and tolerances.
operation known as necking (relief grooving), which lakes
place at 45", where the angle of the cUlling insert and the
angJe of infeed must be identical (usually aI45°). There is GROOVE SHAPE
another applicalion of a two axis simultaneous motion in
grooving, a corner hreaking on the groove. Strictly speak- The first evalulltion before programming grooves is the
ing. this is a turmng operation. Ahhough a grooving tool is groove shape. The shape is determined by the part drawing
not designed for turning, it can be used for some light ma- and corresponds to (he purpose of the groove. The groove
chining, like cutting a small chamfer. During the corner shape is the single most important factor when selecting the
breaking cut 011 a groove, the amount of material removal is grooving insert. A groove with sharp corners parallel to the
always very small and the applied feed rate is normally low. machine axes requires a square insert, a groove with radius
requires an insert having the same or smaller radius. Spe-
• Main GroDving Applications cial purpose grooves, for example an angular groove shape,
will need an insert with the angles corresponding to the
Groove is an essential pan of components machined on
groove angJes as given in the drawing. Formed grooves re-
CNC lathes. There are many kinds of grooves used in
quire inserlS shaped into the same form, etc. Some typical
industry. Most likeJy, programming will include many un-
shapes of grooving inserts are illustrated in Figure 36- J.
dercuts, clearance and recess grooves, oil grooves. etc.
Some of the main purposes of grooving are to allow two
components to fit face-Io-face (or shoulder-la-shoulder)
and. in case of lubrication grooves, to let oil or some other
lubricant to flow smoothly between two or more connect-
ing parts. There arc also pulley or V-belt grooves thai are
used for belts to drive a motor. O-ring grooves are specially
UUV~U[)u
designed for insertion of melt,1 or rubber rings, that serve as
stoppers or sealers. There are many other kinds of grooves.
Figure 36-1
Many industnes use grooves unique [0 [heir needs, mOst
others use the more general groove lypes. Typical shapes of common grooving tools

323
324 Chapter 36

• Nominal Insert Size Allhough some variations are possible, for practical pur-
In many groove ctllting operations, the groove width wIll poses, only these three categories are considered. Each of
be greater than the largest available grooving insert of a the three locations may be either e:rtemal or internal.
nominal size (i.e., off the shelf size). Nominal sizes are nor- The two most common groove locations are on a cylin-
mally found in various tooling catalogues and typically der, i,e.. on a straight outside - or exlemal- diameter, or on a
have widths 1ike I mm,2 mm, 3 mm or 1/32,3/64, 1/16, 1/8 straight inside - or internal- diameter. Many other grooves
in inches, and so on, depending on the units selected. may be located on a face, on a taper (cone), even in a cor-
For example, a groove width of .276 inches can be cuI ner. The illustration in Figure 36-3 shows some lypical lo-
cations of various grooves.
with a nearest lower nominal insert width of .250 inch. In
such cases, the groove program has to include at least two
eulS - one or more roughing cUls, in addition to alleast one
finishing CUL Another grooving 1001 may be used for fin-
ishing, if the tolerances or excessive 100] wear make it more
practical - Figure 36-2.

....'
2 1 3

. LJ ,' - --

Figure 36-3
Typical groove locations on a parr

Figure 36-2
CUI distribution for grooves wider than the insert GROOVE DIMENSIONS
• Insert Modification The dimensions of a groove are always important when
Once in a while, programmers encounter a groove that re- selecting the proper grooving insert. Grooving dimensions
quires a special insert in terms of its size or shape. There are include the width and the depth of a groove, as well as the
two options to consider. One js \0 have a custom made in- corners specifications. It is not possible to cut a groove with
sert, if il is possible and practical. For a large number of an insert thut is larger than the groove width, Also, it is not
grooves, it may be a justi tied solution. The other alternative possible to feed into a groove depth that is greater than the
is 10 modify an existing insert in-house. depth clearance of the insert or tool holder. However, there
is usually no problem in using a narrow grooving insert to
Generally, in CNC programming, off-the-shelf tools and make a wide groove with multiple ClltS. The same appbes
inserts should be used as much as possible. In special cases. for a deep culling insert used 10 make a shallow groove. The
however, a standard rool or insert can be modified 10 suil a dimensions of a groove determine the method of machin-
particular job. For grooving, it may be a small extension of ing. A groove whose widlh equals the insert width selected
the insert cUlling deplh, or a radius modification. Try 10 for the groove shape, requires only one cut. Simplefeed-in
modify lhe groove shape itself only as the last resort. Modi- and rapid-out tool motion is all that is required. To program
fication of srandard tools slows down the production and ;j groove correctly, Ihe width and depth of the groove must
can be quite costly. be known as well as its position relative to a known refer-
ence position on the parI. ThiS position is the distance to
GROOVE LOCATION one side - or one wall - of the groove.
Some extra large grooves require a special approach. For
Groove location on a part is determined by the part draw- example, a groove thai is 10m m wide and 8 mm deep can-
ing. The locations can be one of three groups: nO[ be Cul in a single pass. In this case, the rough cuts for
lhe groove will control not only its widlh, but also ils depth .
o Groove cut on a cylinder ... diameter cutting
It is not unusual to even use more than one tool for such an
o Groove cut on a cone .« taper cutting operation. Program may also need to be designed in sec-
lions. In case of an insert breakage, only (he affected pro-
o Groove cut on a face ... shoulder cutting
gram section has to be repeated.
ON 325

• Groove Position and boltom diameter of the


I::; method has a major benefit that
are shown two most common methods of
a The groove width is aiven of the groove will actually appear as
in both cases as dimension W, bUl tile distance L fro;;; lhe A disadvam3e:c
'-'
is that the
front is d in the example a and the example D. and a proper grooving
36-5b docs show !he
bottom diameter WIll
have to dlmensionin <='o exam-
fire about equally common in CNC
are usually grooves that have a
but have a much deeper
top diameter and its bartom

L L
SIMPLE GROOVE PROGRAMMING
,b l
simplest of aU grooves is the One that
and shape as the tool cutting edge -

dimensioning two common methods

the dimension L is
the groove. For programming purposes,
is more convenient', because it will
as specified in the drawing.
1001 reference poim of a grooving 1001 is sellO
of the grooving insert.

The example in Figure 36-4b, [he


right side of the £roove. The left side
found easily, by adding the groove width
ming considerations will be slightly different,
if the dimensionallolerances are specified.
that the specified dimension
imporrant dimension. If a tokrance
any dimension, the tolerance must always Figure 36-6
finished groove. and it will affect the 1 program-
Simple groove example· program 03601
method. A groove may also dimensioned from an- Insert width is equa/l0 the groove width
olher localion, depending on
The program a is Jn
• Depth rapid mode, move the gTooving lool to position
~eed-in ,to the groove depth, then rapid out back to the start~
Tn Figure 36-5, there are two dimen-
mg posltlOn, and - the groove is finished. arc no cor-
siomng the groove depth.
ner breaks, no surface tinish conlrol, and no special tech-
niques used. Some will say, and no quality A dwell
at the bottom of the the only improvement.
TalC, the quality of such 11 will not be the ""'oreatesl ,
a it will is slrictly a utility Iype
,'W'V"'" and is 111 . manufactur-
~I r
d ing. At the same
stal1 to learn more
such grooves is a good

The following
square
The groove
bl diameters
Figure 36-5
Groove depth dimens.ioning . two common methods
(2.952 - 2.63'7) 12 .15'75
326 Chapter 36

The uses the 1001 as Ihe PRECISION GROOVING TECHNIQUES


03601 (SIMPLE GROOVE)
(G20) A simple in-ouf will nOl be good. I[s
have a rough surface, comers will be sharp
N33 TOSOO M42 (TOOL 8 its width is dependent on insert width and its wear.
N34 G97 5650 M03 (650 RPM SPEED) most of maChining a groove is not
N3S GOO Xl.1 Z 0.625 Toaos MaS (START POINT)
N3S GOl X2.637 FO.003 (FEED-IN TO To p:-ogram and precision groove
N37 G04 XO. 4 (DWELL AT THE BOTTOM) eXira effort, but be a high quality
IDB X3.1. FO. 05 (RErRAC"r FROM This effort is nol justified, as high quality comes
N39 GOO X6.0 Z3.0 TOSOO M09 (CLEAR POSITION) with a price. The next two illustrations show the groove di
N40 IDO (END OF PROGRJl,M)
mensions and program details. Drawing in Figure
%
36-7 shows a high groove, although its width is
the following. First, the Intentionally impact of the example.
from the beginning of
N34 are startup 0.1584
selected. Constant Swface
Speed (eSS) in can be selected instead. N35 is a
block where the 1001 moves [0 the position from which the
groove will be poi nt). Clearance at this 10-
calion is the clearance the part diameter, which is
.074 inches in the

(3.1 - 2.952) I 2 = .074


same block, during the tool ,
.......
actual groove plunging
cut, at a Block N37 is a dwell
of 0.4 seconds, the tool return to the slan-
diameter and complellon the rrogram. BREAK CORNERS 0.012 X

Although Ihis parlicular example was very slm-


pie, tel's evaluate the program a more. Il contains sev- for a precision groove eX<3lm/Jle
importanl principles thal can applied to rhe method
of programming any its precision and sur- What is best cutting plunge rough cut
face finish are very critical. two finish cuts, one for each are reasonable; so is
.006 added to the Also, sharp
the clearance before the cutting begins. The corners will broken with a .012 chamfer at the 04.0.
1001is positioned .074 inches the pari diameter. at shows the distribution of the cuts.
100. Always keep this ',,"'ll"',- to a safe mini-
mum. Grooves are usually cut at a and it may
lOO much rime just (Q cut in the note Ihe actual
has increased .003 in/rev in block
to a rather high feed rate of in/rev in block N38.
motion command GOO could used instead.
OUI al a heavier feedrate than using a rapid
motion). may improve [he groove tinish by elimi-
the lool drag on the
The tool width of .125 never in the di-
or indirectly. That means width of the
will groove. It
means a di groove width, if
the program structure
structure will remain unaffected even if grooving
[001 shape is changed. Combination of the shape and the
size will offer endless opponunilies, of them be Figure 36-8
mg without a single change to Precision groove· distribution of cuts for the example 03802
GROOVING ON LATHES 327

Before the first block can be programmed, se!eclion of chined with a, 1250 wide grooving insert, will need oJ least
the cutting tool and machining method is a sign of a good two grooving cuts. But what about a groove that is much
planning. These are important decisions because they di- wider than the groove in the example?
rectly influence the final groove size and its condition.
There is an easy way to calcu late the minimum nWl1her of
+ Groove Width Selection grooving ClllS (or plunges), using the following formula:

The grooving Lool selected for the example in program


03602 will be an exlernaltool, assigned to the tool station Cmln =
number Ihree - T03. Tool reference point is selected at {he
left edge of the insert. wh icll is a standard selection. The in-
sert width has to be selected as well. Grooving inserts are rrw where ...
available in a variety of standard widths, usually with an in-
crement of I mm for metric tools, and 1132 or 1116 inch for em," Minimum number of cuts
(ools in the English system. In (his case, [he non-standard Gw Groove width for machining
groove width is .! 584 inch. The nearest standard insert Tw = Grooving insert width
width is 5/32 inch (0.15625 inch). The question is - should
we select the 5/32 inch insert width? rn a short answer, no. Applying the formula to the example, the starting data are
In theory, this insert could cut the groove, but because the the groove width of .1584 of an inch and tbe groovi ng insert
actual difference between the Insert width and the groove width of .1250 of an inch. That translates into the minimum
width is so small (.00215 inch over two walls), there is very of fWO grooving cuts. Always round upwards, to the nearest
little material to cut. integer: . J584/1250= /.2672=2 cuts.

The dimensional difference would allow only slightly A possible decision could be to plunge once to finish the
more than .00 I per each side of (he groove. which may left side of Ihe groove and, with one more plunge, to finish
cause the insert to rub on the wall rather than cut It. A better the groove right side. The necessary overlap between the
choice is to step down LO Ihe next lower standard insert two cuts is guaranteed and the only remaining operation is
width, !.hat is 1/8th of an inch (.1250). There is much more the chamfering. A groove programmed Ihis way may be ac-
flexibility with 1/8 width than with 5/32 width. Once the ceptable, but will not be of a very good quality.
grooving tool is selected, the initial values can be assigned-
Even if only an acceptable quality groove is produced
the offset number (03), the spindle speed (400 rUmin), the
during machining, such a result does nOL give the program-
gear range (M42) - and a note ror the selup sheet:
mer much credit. What can be actually done lo assure the
o T0303 = .1250 SQUARE GROOVING TOOL highest groove quality possible?
The first few program blocks can now be written: In order to write first class programs, make the best efforts
to deliver an exceptional quality at the programming level,
03602 (PRECISION GROOVE) in order to prevent problems at the machining level.
(G20)

N41 T0300 M42


How call this suggestion be applied to the example? The
N42 G96 8400 M03 key is the knowledge of machining processes. Machining
experience confirms that removing an equal stock from
each wall (side) of the groove will result in better CUlling
+ Machining Method conditions, better surface fi nish control and better toollifc.

Once the grooving tool has been selected and assigned a If this observation is used in the current example, an im-
(001 station number (toollurrel rosition), the actual method portant conclusion can be made, If two plunge euls of un-
of machining the groove has to be decided. Earlier, the ma- even width will yield at least acceptable results, three cuts
chining method has been descrlbed generally, now a more Ihat are equally distributed should yield even better results.
detailed description is necessary.
If at least Ihree grooving cuts are used to form the groove
One simple programming method is not an option - the rather (han the minimum two cuts, the CNC programmer
basic in-ollt lcchmque used earlier. llUll means Q better will gain control of two always Important factors:
method must be selected, a method that will guarantee a
o Control of the groove POSITION
high quality groove. The first step towards that goal is the
realization of the faclthat a grooving insert with the width o Control of the groove WIDTH
narrower than the groove width, will have to be plunged
into the groove more than once. How many times? It is not Tn precision grooving, these two factors are equally im-
difficult to calculate that a groove .1584 wide and ma- portant and should be considered logether.
328 Chapter 36

Look carefully at how these factors are implemented in Nex[ look is at the X axis positions. The first position is
the example, The first factor applied under (he program where the plunge will start from. the second position is the
control is the groove position, The groove position is given end diameter for the plunging cuL A good position for the
in the drawing as .625 inches from the front face of the pan, start is about .050 per side above the finished diameter,
to the left side of the groove. There is no plus or minus di- which in Ih is case would be a clearance diameter calculated
mensionaltolerance specified, so the drawing dimension is from the 04.0;
used as arbilJary and is programmed directly. The second
factor under the program control is the groove width, That 4.0 + .05 x 2 = 4.1 (X4.1)
is .1584 of an inch on the drawi ng and the selected !ool in-
sel1 width is .1250. The goal is to program the culting mo- Do nol start the cuI with a clearance of more than .050
[ions in three steps, using the technique already selected: inch (),27 mm) - with slow feed rates that are typical to
grooves, there will be too much air to cut, which is not very
Q STEP 1 efficient. The end diameter is the groove bottom, given on
the drawing as 3.82. Dimension of X3.82 could be pro-
Rough plunge in the middle of the groove, leaving an
equal material stock on both groove faces for finishing grammed as the targel diameter, but it does help to leave a
. also leave small stock on the bottom of the groove very small Slack, such as .003 per side (.006 on diameter),
to make a sweep finish of the groove bottom, That wi II add
Q STEP 2 two times .003 to the 3.82 groove diameter, for the pro-
grammed X target as X3.826. Once the plunge is done, the
Program the grooving tool operation on the left side
(001 reI urns 10 the start diameter:
of the groove, including the chamfer (corner break)

Q STEP 3 N43 GOO X4.1 Z-O.6083 T0303 MOB


N44 GOI X3.826 FO.004
Program the grooving tool operation on the right side N45 GOO X4.1
of the groove, including the chamfer (corner break) and
sweep the groove bottom towards the left wall. The rapid motion back above the groove (N4S) is a good
choice in this case, because the sides will be machined later
The last two steps require chamfer cutting or a comer with the finishing culS, so the surface finish of Ihe walls is
break. The width of [he chamfer plus the width of the sub- not critical at this moment. After roughing the groove, it is
sequent cut should never be larger than about one half to lime to Slarllhe finishing operations.
three quarters of the insert width. In the third step, sweep-
ing of the bottom is dcsircd.ll11ll suggests the need to con- All the calculated amounts can be added to the previous
sider stock allowances for fmishing. Figure 36-8, and creale dala for a new Figure 36-9:

• finishing Allowances
During the first step, the first plunge has [0 take pJace at
the exact center of the groove. To calculate the Z axis posi-
tion for the starl, fi nd fi rsl the amou nt of slack on each waJ I ;0.0167'
that is left for finishing. The slock amount will be one half
of (he groove width minllS the insert width - see details in
the previous Figure 36-8: / 04.1
04.0
(.1584 - .1250) I 2 = .0167 - 03.976

The tool Z position wi II be .0167 on the positive side of 03"826


the len wall. If this wall is at Z-0.625, the grooving tool 03.82
Slm1 position will be at Z-O.60{l3. When the tool completes 0.1250
the nrsl plunge, there will be an equal amount of materia! ·0.1584·
left for finiShing on bOlh walls of Ihe groove.

Do your best to avoid rounding off the figure .0167, for Z-0.6083
example, 10 .0170 inch. It would make no difference for the
machining, but it is a sound programming practice to usc Z-0.6250
only the calculated values. The benefit of such approach is
in eventual program checking, and also with general con- . Z-0.6870
sistency in programming. Equal stock amounts offer this
consistency; .0167 ond "0167 is a better choice than .0170 Figure 36-9
and .0164, although the practical results will be the same,
Precision groove - groove data used in program 03602
GROOVING ON LATHES 329

• Groove Tolerances the grooving (001 will nOI contact the right side wall stock.
As in any machining, program for grooves must be struc- That means do not retract [he tool further then the position
tured in such a way, that maintaining tolerances at the ma- of Z-0.6083. It also means do nol rapid OuL because of a
chine will be possible. There is no specified tolerance in the possi ble contact during the 'dogleg' or 'hockey Sl ick' mo-
example, but it is implied as very close by the four-decimal tion, described in Chapter 20 - Rapid Posiliolling. The best
place dimension. A tolerance range, such as 0.0 Lo +.00 I \ is approach is (0 return 10 the initial stan position at a rela-
probably a more common way of specifying a tolerance. tively high bur l1on-cuuing feedratc:
Only' the dimensional value thai falls within the specified
N49 X4.1 Z-O.6083 FO.04
range can be used in a program. In Ihis example, the aim is
the drawing dimension of .1584 (selected intentionally). At this point. the left side wall is finished. To program the
A possible problem often encountered during machining motions for the right side wall, the tool has to cut with the
and a problem that influences the groove width'the most, is righl side (right edge) of the grooving insert. Onc method is
a tool weQJ: As the insert works harder and harder, it wears to chnnge the GSO coordinates in the program, if this older
off at ils edges and actually becomes narrower. Its cutting setting is still used, or use a different work coordinale off-
capabilities are not necessarily impaired, but the resulting sel. The method used here is probably the simplest and also
groove width may not fall within close tolerances. Another the safest. All molions relating to the right chamfer and the
cause for an unacceptable groove width is {he insert wid!h. right side groove wall will be programmed in the incremen-
Inserts are manufactured within high level of accuracy, bUI ta/ mode. applied 10 Ihe Z axis only, using the W address:
also within certain tolerances. If an insert is changed, the
NSO WO.0787 T0313
groove width may change slightly, because the new illseli
N51 X3.976 W-O.062 FO.002
may not have exactly [hc same width as the previous onc.
To eliminate, or al least minimize, the possible our oftoler- In block N50, the tool tTavels the total distance equivalent
ance problem, use quite a simple technique - program an to the sum of the right wall stock of .0167, the chamfer of
additional offset for finishing operations only. .012 and the clearance of .050. In (he same block, the sec-
Earlier, when the precision groove was pJanned, offset 03 ond offset is programmed. This is the only block where off-
had been assigned to the grooving tool. Why would an ad· set 13 should be applied - one block before, it's too early,
dilional offscr he needed at all? Assume for a moment, that and one block, afler it's too lale.
all machine settings usc just a single offset in the program. Block N51 contains the target chamfer position and Ihe
Suddenly, during machining, the groove gets narrower due absolutc mode for Ihe X axis and is combined with {he in-
to 1001 wear. What can be done? Change the insert? Modify cremenlal mode for the Z axis.
the program? Change (he offset? If the Z ax is offset set! ing
is adjusted, either to the negative or positive direction, that To complete the groove righl side wall, finish the cur at
will change Ihe groove position relative [0 the program zero the full bottom diameter, block N52, then continue (0 re-
but it will nor change Ihe groove widthi What is needed is a move the stock of .003 from the bollom diameter (block
second offset, an offscr (hal cont[ols the groove wiJth only. N53) - this is called sweeping the groove bottom:
In the program 03602, the left chamfer and side wlll be
finished with one offset (03), the right chamfer and side NS2 X3.82 FO.003
will use a second offset. To make Ihe second offset easier 10 N53 Z-O.6247 T0303
remember. number 13 wi II be used.
Also look at the Z axis end amount - It IS a small value
One other step has to be Ilnished firSI - calculalion of [he that is .0003 short of the .625 drawing dimension! The pur-
left chamfer start position. Currently, the tool is at Z-0.6083 pose here is to compensate for a possible 1001 pressure.
but has to move by the wall stock oLO 167 and the chamfer There \(Jill nor be a srep ill the groove comeri Because the
width .012 as as clearance of .050 - for a total travel of sweep will end at the left side of the groove, the original
.0787,10 Z-0.6S7 position. AI a slow feedrale, the chamfer o('[<;ct (03) must be reinstated. Again, lhe block N53 is the
is done first and [he cut continues to finish the left side, 10 only block where the offset change is correct. Make sure
Ihe same diameter as for roughing, which is X3.826: not to change the tool numbers - {he {urrer ,vill index .'

N46 Z-O.687 The intcnded program 03602 can now be completed. All
N47 GOl XJ.976 Z-O.62S FO.002 thal remains to be done is lhe return to the groove starting
N48 X3.826 FO.003 position, followed by the program termination blocks:

The next slep is [0 return the tool above parl diameler. N54 X4.1 Z-O.6083 FO.04
This mOlion is more important than it seems. In the pro- N55 GOO X10.O Z2.0 T0300 M09
gram, make sure Ihe finished lefl side is not damaged when NS6 IDO
the tool rctracts from the groove bottom. Al~o make sure %
330 --_. __.------- Chapter 36

Al (his point, (he complete program 03602 can be de- • Groove Surface Finish
veloped. Note program blocks where the offset has been
Programming just about any preCision groove should be
changed, they are idemified in the comment section:
fairly easy fTOm now on. Only a few last notes on (he sub-
ject of groove cutting as they relate to the surface finish.
03602 (PRECISION GROOVE)
(G20) Just by following the suggested methods of equal cut distri-
bution, proper spindle speeds and feed rates. good condition
N41 T0300 M42 (NO OFFSET) of the cutting 1001 and insert, suitable coolant, and other
N42 G96 5400 M03 techniques used in the example, the surface finish will al-
N43 GOO X4.l Z-0.6083 T0303 MOa (OFFSET 03) most lake care of itself.
N44 GOl X3.826 FO.004
N45 GOO X4.1 Keep in mind, thaI the term 'precision groove' does not
N46 Z-O.687 only describe the precise groove position and its precise di-
N47 GOl X3.976 Z-O.62S FO.002 mensions, it also means a high quality look. a look thal of-
N48 x).826 FO.003 ten means much more than just a cosmetic feature.
N49 X4.1 Z-O.6083 FO.04
N50 WO.0787 T0313 (OFFSET 13)
N5l X3.976 W-O.062 FO.002 MULTIPLE GROOVES
N52 X3.B2 FO.003
N53 Z-O.6247 T0303 (OFFSET 03)
N54 X4.1 Z-O.6083 FO.04 Multiple grooving is a common term used for CUlling the
N55 GOO X6.0 Z3.0 T0300 M09 (NO OFFSET) same groove al di fferen! positions of the same parL In these
N56 M30 cases, the program will mas( likely benefit from developing
% a subprogram (Subrouline) for multiple grooves, that will
be called at various groove locations. Subprograms save
WARNING! valuable programming time. they are easily designed and
It is very important to use caution when a double easily edited. Although subprograms will bc discussed in
tool offset for a single tool is used during machining Chapfer 39, an example of a mUltiple groove programming
( this warning applies generally· not only for grooving) using a subprogram is shown at the end of this chapter, at
least for reference and basic introduction.
Remember that the purpose of the offset in the example is
to control the groove widzh, not ils diameter. When culring multiple grooves, more material will be re-
moved. On external diameler grooves, there are no special
Always follow these precautions, based on the example considerations necessary, gravity will take care of the extra
program 03602: chips. This is not the same situation for internal grooves.
The moment several grooves arc machined internally, there
o Start machining with identical initial amounts assigned to
is a small pile of cutting chips accumulated in the bored
both offsets (the same XZ values for offsets 03 and 13).
hole. These chips can be in the way of a smooth cutting op-
o The X offset amounts of 03 and 13 must always be the eration and could damage (he bored diameter and even the
same. If the X setting of one offset is changed, the setting grooving 1001 itself. To solve this problem, consider ma-
of the other offset must be changed to the same value. chining of only a few grooves. move Ihe tool out and blow
Adjust both X offsets to control the groove depth tolerance. out the chips from the internal area. Using the optional stop
o It the groove width becomes too narrow and has to be MOl can be useful in this case, When all chips have been
adjusted, only the Z offset amount is changed. removed. continue with the same tool to cut more grooves.
o To adjust the groove left side wall position,
change the Z Dffset 03. FACE GROOVES
o To adjust the groove right wall position,
change the Z offset 13. Face grooving (sometimes incorrectly called trepanning)
is a horizontal groove cutting process, with (he tool moving
o 00 not cancel the current offset - along the Z axis. The tool is programmed along the same
- change from one to the other offset directly. principles as vertical grooving along the X axis. Because of
o Make sure the tool number (the first two digits the nature of such a grooving cut, the tool orientatioll pres-
ofthe T address) does not change, otherwise, ents the most important single consideration in face groov-
THERE WILL BE A TOOL CHANGE! 109. The issue is the radial clearance of the cutting insert,
during a cut. There is no need \0 worry too much about ra-
Other precautions can be added, depending on the exact dial clearance for vertical grooving, because the CUlling
condilions. Use common sense, and always check the pro- edge of the insert is on the same plane as the machine cen-
gram carefully, before il is released to production. ter line. However, in horizontal grooving, the insert clear-
ance along (he cut radius is of utmost importance.
GROOVING ON 331

a
groove, o.

Figure 36-11
02.075 - / Interference of a standard grooving insert on a face groove
0.125 ""1--
'-- 0.25
BREAK ALL

Figure 36-10
Face grooving example - program 03603

internal groove diameters


drawing, the actual
as well.
...... , au,..... - find one of
diameters - llial CLEARANCE
RADIUS
(2.625 - 2.075) / 2 .275
Figure 36-12
is the actual groove width amount, .275 in the given Standard grooving insert modified (or face '-"/>,"'111''''
example. Always keep in Ihallhe pl'Ogram will use a
smaller .250 wide Following the pro- • Grooving Program
groove, listed
IJrr\nr'<lrn 03603 uses modi tied and a .012 corner
plunge in the middle
one offset is used in
the groove, and two with a smail comer
The tool set point is edge of insert,
break. But first, lei's look at clearance of the to the 02.075. All calculations should be
tool. This is a programming con-
they use exactl y the same as
one thaI is unique to mosl grooving opera-
vertical gTOoving:
lions, it is also one that is to overlooked.
03603 GROOVE)
• Radial Clearance (G20)
grooving inserts are , in order to give them N21 T0400 M42
The grooving insert for operations N22 G96 S450 M03
is mounted at 90" towards the part to the spin- N23 GOO X2.1 ZO.05 T0404 MOB
dIe center Ii ne). A standard groovi has virtually no N24 GOl Z-O.123 FO.003
",<or,>",,!> and most likely the N25 ZO.OS FO.04
at its. lower end - Figure 36- J1. N26 Xl. 951
N27 X2.075 Z-O.012 FO.OOI
illustration is N28 Z-O.123 FO.003
cannol be aSlS haslo modi N29 X2.1 ZO.05 FO.04
IS done by grinding a N30 UO .149
ance, as In Figure 36-/2.
N31 U-0.124 Z-0.012 FO.OOI
N32 Z-O.125 FO.003
is a simple operation, providing the grinding N33 X2.0755
N34 X2.1 ZO.05 FO.04 M09
are Make sure that the not af-
N3S GOO X8.0 Z3.0 T0400
insert width and only minimum N36 M30
IS otherwise the tool loses %
332 36

CORN GROOVES / NECK GROOVES Block N219 positions the tool in such a way that rhe ceo-
(as well as the setup pomt) is in on center of
groove (,050 clearance in X and Z Blocks
is also a grooving operation, one and N222 are the two cutling motions· one into the
insert designed to cui along a in N220, the other Oul of the groove in
,!!roove can be square or with a
amount oflrnvel is exactly the Silme in either di
1001 and insert used and design
dwell of 0.1 second is added for convenience at
may also be a standard lype of the The block N220 can also be as an
1001 holder, The purpose of this type
incrememal motion:
is 10 of recesses and
culs, in a corner of the parI. II assures a shoulder N220 GOl U-O.162 W-O.OBl FO.004
match of two components. N221 G04 XO.1
N222 UO.162 WO.081 FO.04
To a corner groove (neck groove), the radius
lhegrooving insert mmt be known, .031 (1/32)ofan inch
in the example. cUlling deplh is established from the GROOVlNG CYCLES
Normally, the corner groove is specified a:; a
'minimum undercut' In this case, the cenler or lhe two mUltiple repetitive cy-
cut will be at the of the shou Ider and the diame- that can be used for an interrupted cut-
ter. The in and out of (he groove must be at programming formats for both cy-
45°, meaning the identical amount of in both X Z in the previous chapler. G74 cycle is
axes, Figure 36- a comer with a I the Z axis and is used mostly for
radius minimum used for CUlling in the X axis, and
simple grooving.

• Cycle Applications
Although ror grooving, G75 cycle can also
b~ used for an cut in facing, This cycle is quile
simplistic LO any use for quality surface fimsh,
but it does main purpose is to break
132 chips while This is useful for some
01.7 grooving and as well as face culling,
U/CUT 132 Anmher use is the core aU( of deep grooves, so
they can be methods.
In by alternating between
I rpr,,,',,\and a rapid relroct motion
/
means that one CUlling mo-
~'JI"~,,,,_rapid motion, on the
1,00 and a built-in clearance.
rigure 36-13
Corner grODve - undercuf program examo,/e 03804 G75
The program itself no
diflicultlo complete or interpret
and is not
START POINT G()~tl
03604 (CORNER GROOVE) j DIAMETER
(G20) I
d
N217 GSO S1000 TOsOa M42 I
N218 G96 S375 M03 I
N219 Xl.OS Z-O.95 T0505 MOB 1- d
N220 GOl XO.91B Z-1.031 Fo.a04
N221 G04 XO.l
N222 Xl.OS Z-O.95 FO.04
DIAMETER
N223 GOO X6.0 Z3.0 Tosoa M09
N224 M30 36-14
% Schematic representation of the G75
GROOVING ON LATHES 333

motion retract amount is built within Ihe and is


set by an . parameter of the comrol system In
J4 il is by the value d, (usually sel to
10(0 inches in the COl1lrol). The next two ex-
usc of 075

• Single .Groove with G15


groove requires the X and Z
point, the final groove diameter
cut L For a single groove, the Z
canna! be programmed. The Z
ng point and does nOl change.

Figure 36·16
Muflipfe gffJove eX<51mO'Je the 675 CVcle· program 03606

r The program 03606 for mUltiple grooves,


G75 cycle, is 36-/6.
on Figllre

00.85 03606
(G75 MULTIPLE GROOVES)
(G20)

N82 GSO 51.2S0 T0300 M42


1 Na3 G96 S37S M03
N84 GOO Xl.OS Z-O.175 T0303 MOS
N8S G7S XO.S Z-O.67S IO.055 KO.12S FO 004
Figure 36·15 Na6 GOO X6 0 Z2.0 T0300 M09
N87 M30
Single groove example using the 675 • program 03605 %

following program 03605 cuts a single conditions for multiple


and is bDsed on a groove. TIle only
In the G75 cycle call.
03605
SmGLE r:<U'OO" .... nique may be used no! only for muhiple ",.",1"\\1,,,,,
solid material, bUl also for up n
that is much wider than the grooving msert.
N43 GSO S1.250 T0300 M42
N44 G96 S375 M03 on ly di in program ming wi 11 be the value of K . lhe
N45 GOO Xl.OS Z-O.l1S TOlO) MOS between grooves. H the K is than the inserl
N46 G75 XO.S IO.055 FO.OO4 individual grooves CU\. If the K is
N47 GOO X6.0 Z2.0 T0300 M09 lhan (he width, a wide
N48 M30 the amounts.
%

Note that (he r IS This is not a value wilhoul a SPECIAL GROOVES


meaning. fn fact. il is a calculated depth of
groove peck. The LOol will be from 01.050 to 0.500, There are many more types than can be dc·
or .275 per (I . There will exactly in this handbook. They are of spe·
five grooving (.275/5·.055). cial shapes, used by specific ind (hat senc
a certain purpose. The mosllypical of lhis lype are
• Multiple with G15 round grooves, pulley grooves, 0 ri und several
Certain grooves, usually those lhat conrorm 10
11 is possible to multiple grooves very easily. us- common industrial standards, can machined with rcad·
ing lhc075 case, the groove the ily available inserts. A of Ihis kind or
between be equal, is a pulley programming principles
cycle cannot clearance specification d in 'nons/alldard' arc no differenl than those dc-
lire 36- 14 is nOI programmed. in this chapter.
3 36

GROOVES AND SUBPROGRAMS 03607 (GRV W/SUB-PROG)


- 55 DEGREE DIAMOND INSERT)
N1 G20 T0100
Ogl:a:tIJJnllllg mUltiple grooves with the N2 G96 5500 M03
method for precision
nr".I't'r"'''1''I N3 GOO Xl.2 ZO TOIOl MOS
are the groove quality and the N4 GOl X-0.07 FO.OOG
':>1J,''-'l.L'F. between the grooves.
N5 GOO ZO.l
N6 G42 XO. 7 (START OF CHAMFER)
to program multiple grooves, a more Nt GOl Xa.95 Z-O.02S FO.a03
"""'I"t"".1i _ one that uses subprograms. N8 Z-2.285
Multiple N9 00.2 FO.03
,,,,,"<,
n r r..... programmed very efficiently NlO GOO G40 X4.0 Z4.0 T0100 MDS
and with much precision by using the technique Nll Mal
of suboro,graJns Chapter 39. The guiding
principle to common groove motions in the - 0.125 PART-OFF TOOL)
subprogram motions that vary from groove to Nl2 GSO S2500 TOSOO
groove, in the way, the same groove Nl3 G96 S500 M03
can be repeated at or vruiable intervals, as Nl4 GOO Z-0.S675 T0505 MOB (POS-GRVl)

needed. Nl5 XLO


Nl6 M98 P3657 (COT GRV
N17 GOO W-O.375 M98 P3657 (CUT GRV 2)
-- 1 Nle
Nl9
GOO W-O.375 M98 P3657
GOO W-O.375 M98 P36S7
(COT GRV 3)
(CUT GRV 4)
N20 GOO Z-2.285 (OPEN UP FOR PART-OFF)
N21 GOl XO.s FO 006
N22 Xl.l
N23 GOO Xl.O Z-2.2 (CHAMFE:R BACK START)
N24 GOl XO.S Z 2.25 FO.003 (rnAMFER)
N2S X-O.02 FO.OOS (PART-OFF)
N26 GOO Xl.2 (CLEAR)
N27 G40 X4.0 Z4.0 TOSOO MaS
N28 M30
%
TYP. 03657 (SOB~PROG FOR 03607)
0.375 TYP.---- Nl GOl XO.66 FO.004 (FEED TO ROOGFl OD)
ALUMINUM BAR N2 GOO XLO (CLEAR OUT)
N3 W-0.087S TO LEFT CHFR)
Figure 36-17 N4 GOl XO.9 WO.OS FO.002 (LEFT CHFR)
Multiple grooves programming N5 XO.66 FO.004 TO ROUGH OD)
03607 is the main program and N6 Xl.O WO.0375 FO.03 (BACK TO START)
Nt WO.OS7S TO RIGHT CHFR)
N8 xo.S W-O.05 FO.002 (RIGHT CHFR)
In the Figure 36-17 is a "'lil.IIJI" of a multiple
N9 XO. 65 FO. 004 (FEED TO FDITSH OD)
groove progranuning, h.·"·r.~~,, two cut- NlO W-O.07S (SWEEP BOTTOM)
ting tools are used - a tom- Nll Xl.O WO.0375 FO.03 ('BACK TO START)
ing and a 0.125 wide Nl2 M99 (RETURN TO MAIN)
cuts the %
part. Part-off operations are
and subprograms are cliscussed in vfJ,!JUtI::.J This example completes the related to grooving,
the tool motions related to the Although grooving is a mach.iniog opera-
progranuned in the mam rioll, programming a significant chal-
bans related to the actual groove lenge in certain cases,
in the subprogram 03657. An eqllal
grooves is used for the example.
PART-OFF

Pm1-of!, sometimes called a ClitOff, is a machining opera- At the end of the metal blade is usually a carbide insert,
lion typical 10 lathe work, usually using a barfeeder attach- with clearance angles on both sides. The cUlling end of the
ment. During a part-off, the cutting tool (or parI-off tool) tool is available in several different configurations. always
separates the completed part from the bar slock. The com- at the end lip of the carbide ponion. The most typical 1001
pleted part will fall off the bar, usually into a special bin to end configurations are shown in the following illustration -
protect it from damage. Figure 37-2:

PART-OFF PROCEDURE

Programming procedure for a part-off 1001 path is very


similar to the grooving procedure. ]n fact, pari-off is an ex-
tension of grooving. The purpose of part-off is somewhat
different, because the objective is to separate the completed a
H b. lei
~
--- ---
part from the stock maleriaL rather than crealC a groove of
certain width, depth and quality. The material bar stock is
usually a long round rod thal is 8, 10, 12 Of more feet long.
Two most important considerations in part-off are the
same as those for standard grooving. One is the chip con-
trol, the other is coolant application. a~
0 0
Figure 37-2
e If
[]
• Parting Tool Description Part-off tool· cutting tip configurations
Part-off uses a special cutling looL Such a tool used for
pan-off is called a parting tool or a part-off (001. Somet imes Note the two kinds or each grooving insert design shown
the term cutoflis used for Ihis kind of a tool, as well as the - the series without a dimple (items a, b and c), and the se-
machining method; it has the same meaning as the term ries with a dimple ([terns d, e andj). The dimple is an inten-
part-off. -nle part-off tool is similar in design to a grooving tional dent pressed in the middle of (he cutting edge that de-
lool, with one major difference. The length of the cutting forms (he chip and helps in coiling it. The result is a chip
blade is much longer than that of a grooving tool, making it Ihal is narrower than the width of the cut. Such a ell ip does
suitahle for deep grooves. A Iypical example of a pan-off not clog the generated groove and extends the tool life, al-
tool is illustrated in Figure 37-1. though it may cost a little more.
Also nOle a slight angle on b, c, e and f styles. The angle
PART-OFF TOOL helps in control Ii ng the si ze and shape of the slUh left on the
part when it is separated from lhe solid bar. It also controls
(he rim size that is left over on the part when parting-off a
tubular bar. Although all designs have their special applica-
tions, prohably the most versatile choice would be the ~tyle
T f, particularly for large cutting diameters. Unlike in the
I other types of machining. the cutting chips for part-off
EFFECTIVE should coil, not break. The cutting insert with a dimple or a
- CUTTING RADIUS similar design is the best suited for that purpose.
I
'- l It is a common practice amongst programmers to usc
----I --- TOOL WIDTH
only one paning tool for all the work. They select tbe pan-
log tool long enough to accommodate the maximum bar
diameter and leave it permanently mounted in the tool
Figure 37·7 holder, even for small diameters. The reasoning for this ap-
Part-off tool - cutting end configuration proach is that it saves a setup time. That is true to some
extent but has a downside as well. 'n1e long part-off tool

335
336 Chapter 37

Iy has a wider insert than a short lool, in


for strength and rigidity. When the
a long part-off tool is necessary, wilh
serL If such a lool is used for shorl parts,
other tubular stock with thin walls. it is the 0.1
lecling [hal also wastes material. A short 02.65
mllTowcr insert will justify the setup 02.50
··············································02.40
A generous supply of coolant should
available at the cUlling edge. just like
coolant is {\ good
and lubricating qualities. A lypical
he one part of soluble oil for 15-20 parts water or as rec- 0,1 1.875 ZO- 2,125
l
by the coolant mar.ufaclUrcL Make sure
coolant is supplied al particularly ror Figure 37·4
pressure coolanllo CUI-
Part-off tool approach· right side tool reference - program 03702
flush olTihe chips that may accumulate in the
In examples, the 1001 change position and final rc-
su lls are identical. Comparison of both programs shows
• Tool Approach Motion values of X unchanged, but the values for Z axis are
di (blocks N 122 and N 125). ThiS the
iirSI to program a part-off tool path IS to select a of the lip.
(001that has enough capacIty 10 completely
nue the from a solid bar. The next decision is to 03701 (PART-OFF I LEFT SIDE TOOL EDGE)
the width and the location of the tool reference poi nL
A part-off [001 that is too short will not reach the spindle N120 Gsa 81250 TOSOO M42
me A 1001 too long may nol be N121 G96 S350 M03
may cause vibrations, even hreak during the CUI. Nl22 GOO Xl 65 Z-2.0 Toaos MOS
of IS important for good cutting conditions, Nl23 GOl X-O.03 FO.004
the tool is proportiono(c to
Nl24 GOO Xl.55 M09
Nl2S XS.S Z2.0 TOBOO
depth caracity. Nl26 MJO
%

is consistent with the previous suggestions


grooving and Selling up the 1001 reference point
The following pro-
the 1001 is for the CNC operator. If
between the [001 reference
reason, set the tool reference point on (he
of the tool tip - Figure
right side and to the Figure 37-4.
37-4 for program
cases, the program zero is the front face of 03702 (PART-OFF I RIGHT SIDE TOOL EDGE)
the nnj~hed
Nl20 GSO 31250 T0800 M42
Nl21 G96 3350 M03
TOOLS NG P01NT N122 GOO Xl.6S Z-1.B75 TOBOB MOB
N123 GOl X-D.OJ FO.004

D.
--, 0125
1 N124 GOO Xl.6S MOS
Nl25 XS.5 Z2.12S T0800
Nl26 MJO
%

The weakness of the


width has to be always added to the Z
gram. In Ihe second example,
used directly, but a rossible
0.125 1.875 2.0
I leI does exist. Take care
position and program the 1001
even if the previous lUrning operations
Figure 37-3
stock. Figure 37·5 shows correct
<lr'ln.I"f'<l,r-fI - len side 1001 reference - program 03701 of a part-off tool.
PART-OFF 337

• Part-off with a Chamfer


H--~YES Not always the machined pal1 will be done during a sec-
ondary operation. When the machining has [0 be com-
pleted with a part-ofr looL il will require the best qualilY
overall finish possible. One requirement of a good surface
finish is broken sharp comers. In the example, Ihe sharp
corner is al the intersection of X2,4 nnd Z-1.875. If the
turnmg lool cannot cut the chamfer during turning opera-
Figure 37·5 lion, pan-off tool can be a better choice. Most part-off tools
are no! designed for cutli ng sirleways (<lIang 1he 7. ax is), hut
Correct and incorrect approach to stock diameter
cham fering removes on Iy a small amount of maleriallhal is
within the tool capabilities. Avoid chamfers thal are wider
than aboul 75% of the insert width or take severa! cuts if
• Stock Allowance needed. The chamfer has 10 be cut before the pan-off and il
Pan-off operation does not always mean all the machin- should be cut from outside in, /lot from inside OUL The cor-
ing has been completed. Often, part-off may complete on Iy rect programming technique for machining a chamfer dur-
the first operation and additional machining will be neces- ing pan-off is summed up in the following steps:
sary on the machined part In such an event, some extra ma- o Position the tool further in the Z axis
terial (stock) has to be left on the back face, for subsequent than would be normal/or regular part· off
finishing. Leave a stock amount of about .010 to .020
inches (0.3 to 0.5 mm). In that case, the block N122 would o Start the part· off operation and tellllinate it just
be changed in both programs - for example, from Z-2.0 10 below the diameter where the chamfer will end
Z-2.01 in the first program example 0370] and from o Return to the starting diameter and
Z-I.875 to Z-I.895 in the second program example 03702. move to the chamfer start position

Another program entry Ihat is important to look at is Ihe o Cut the chamfer in one block and
X value in block NI22 - it is X2.65 in the example. That part-off in the subsequent block
will leave .125 inches aclual clearance above the 02.400. If
To illus!rLlte the programming technique, study the fol-
that seems a lillIe 100 much, think again. Always consider
lowing program example 03703 and illustration shown in
the actual slock diameter, for safety reasons. In the exam-
Figure 37·6 - the loo! n.:Ct:n.:nce poinlls on the lefl side, and
ple, the bar stock diameter is 2.500 inches and the aclual
(he required chamfer is .020 inches at 45°:
clearance will be a more reasonable .075 of an inch per side
of the stock.
CHAMFER 0.02 x 45°
• Tool Return Motion
Another safety aspeci of programming a part-off 1001 is
the method of returning 10 the lool change position. when
the parting operation is completed. It may be very tempting 02.65
to replace the two program blocks N 124 and N 125 with a 02A6
single block, then return to [lie luul change pusilion IrllllH.!-
diately after Ihe parI-off:
02.20
N124 GOO X5.5 Z2.0 (or Z2.12S) T0800 M09

Arter all, the part has just been separated, fallen into the
bin and one block in the program can be saved. Don '/ do 0.015 --; r-
rhis, it could be a very hazardous procedure. The part
should have been removed by the [001 and it should have
Figure 37-6
fallen into [he bin - but has all this actually happened? A va-
riety of reasons may cause an incomplete part-off. The re- Comer breaking with a pan· off tool· example 03703
sult is a broken lool, scrapped part, possibly a damage Lo
the machine itself 03703 (PART-OFF CHFR)
(G20)
Always return in the X axis first N120 GSO S1250 T08DO M42
and always above the bar stock diameter. N121 G96 5350 M03
N122 GOO X2.65 Z-2.015 TOBDS MOS
338

N123 GOl X2_2 FO.004 rigid grooving 1001 can do the startup
N124 X2.46 FO.OJ then the part-off tool can do the res£. At com-
N125 Z-1.95 (LEFI' SIDE OF of the part-off, the bar stock projecting from
N126 U-O.l W-O.OS FO.002
will have a small step. Make sure to a
N127 X-0.03 FO.004
N128 GOO X2. 65 cut for each subsequent part LO lake this slep into con-
N129 XS.5 Z2.0 TOBOO M09
N130 M30
% • Preventing Damage to the Part
122, (he tool is positioned .015 past the When the part is separated from the bar, it falls down. On
NI makes only a temporary groove (to , it mily suffer (l seve,re enough to make a
N 124 is a mOlion out of the a scrap. To prevent the possibility a damage.
oflhechamfer(02.460). rn operator may want to place a
the 1001 shiflS in the Z axis. to with coolant in the path of the falling part.
chamfer. The value of 1.950 was method IS to offset the pan-off 1001 away from the center-
and subtractions: line, jusl lhat it does not the
Ihe
1.875 - .020 .030 T .125 = 1.950

is the back of the part per safety rules of the com-


value is (he chamfer size; .030 is the
insen width. Note the .125
Never touch the part while the program
Clll- is in or the spindle is rotating.
is the Culling.
usmg the incremental mode part damage prevention is a CNC
saves a absolute mode, block lathe equipped with a parts catcher, which is often a speCIal
NI will be: ine option, at the time of machine purchase.

N126 X2.36 Z-2.0 FO.002 For part-off, just for grooving operations, always
make sure is an supply of inserts on hand.
Also note the for the chamfer only, to Tools with or with very small radii, are gener-
decrease can be quile ally weak some very demanding work. No-
remainder of the body wants 10 run out of tools in the middle of a very
important rush

In some cases, two lools can justified for part-off


operations. The of two tools has [0 be accurate. A
SINGLE POINT THREADING

Threading is a machining 10 Single point thread CUlling lypically known as a


cal groove of a particular shape, usually on a point lhreadlng - uses a lool holder similar to other 1001
major purpose of threads is to connect fWO holders. but contains one special
without damage during joining and which may have one, Iwo or three tips.
and disassembly). The most common shape and size of (he threading insert must to
"r",,,n,,~,.., fall inlo four major caleg1om:$ the shape and size of the fll1ished thread -
o I-,,,,t,,,n,lnn devices ... screws nuts
o Measuring tools ... micrometer barrel v
o Motion transmission ... lead screw, camera lenses
o increase .. , lifting or supporting

A thread cuUing is a very versatile manufacturing pro- I


/
cess. are two main groups of thread production
metal cutting and plastic molding. It should nol a sur-
thaI it is (he plastic molding method that dominates
industry. Given the number offlPlpn'~'n
bottles, pop bonIes and other plaSlic products we consume,
the number of threaded products employing this method is

the metalworking area of thread production. the


of interest, there are flm,'1::1f1<;:nfl 01 the thread form and the threading tool shape

a single point threading is a machinll1g


o rolling or thread (orming a hel ical groove of a speci fie shape with a
o and die work per spindle revolution. The shape or
is mainly determined by the shape and
o milling mounli ofehe cutting lOOl. The uniformity of ad-
o vancement is controlled by [he programmed feedrate.

o • Form of a Thread
in CNC program-
of the leuer V)
variety of the
metric and
shapes

THREADING ON CNC LATHES


CNC lathes can a very high quality thread in ad-
di tion to the boring operations, in a
single of This is a very attractive
feature for many machine shops have
threads), even on
a reason alone. second-
ary operation the cost multiple starts, right or
variable lead, cit:.
of production.

339
340

• Threading Operations o INTERNAL THREAD


list of the threading op- .. , is a thread that is cut on the inside of the
erations thaI can be a lypical CNC lalhe. for example as a nut
Several operations require a speciallype of threading insert CJ H ANGLE
and some operations can only be if the control
system is equipped with special (optional) features: ·.. is the angle made by the helix of the thread at the pitch
with a
rI,::',nMI>( to the axis
o Constant lead threads
o
o Variable lead threads
the threading tool will advance along an axis
o External and internal threading revolution. The lead always determines the
and can have constant or variable form.
[} Cylindrical threads
[} MAJOR DIAMETER
[} Tapered threads
... is the largest diameter of the thread
[} hand (A/H) and left hand (l/H) threads
o Face threads (scroll threads) [} MINOR DIAMETER
... is the smallest of the thread
o Single start threads
Cl Multi- sta rt thread s [} MUlTiSTART

Cl Circular threads ·.. is a thread with more than one shifted by the pitch
amount
Cl Multi-block threads
o PITCH
... is the distance from a .,,,,,,,...,t,,.rI
corresponding of
parallel to the machine axis
o PITCH DIAMETER
... on a straight thread, the pitch diameter is an imaginary
TERMINOLOGY OF THREADING diameter, "the surface of which would pass through the threads
at such points as to make equal the Width of the threads and
the width of the spaces cut by the of the cylinder"
is a relatively large subject, In il is
[} ROOT
(l whole book dedicated to it. subjects of
are, threading has its own technical terms. · .. is the bottom of a the of tlNo
terms appear in hooks, articles, adjacent threads
n-mnuals olher sources. To understand them is
[} SCROll THREAD
lOry programmer and operator.
is also known as a thread it is a thread machined
the X axis, rather than the more common thread
cutting: along the Z axis

o OF THREAD :J SHIFT
betvveen the sides of the thread, , .. in multistart threading, it is the by which the
plane cutting tool is displaced to cut another this distance is
always equal to the pitch of the number of shifts
[) is always one less than the number of starts
... IS the top surface of a thread that joins the two sides o TAPERED THREAO
[} DEPTH OF THREAD .. , is a thread on which the pitch diameter is increased
or by a constant ratio as a
.,. generaJly, the distance between the crest and the root
of the thread, normal to the axis (in programming, o TPI
depth is considered as a measurable value per thread side)
... in English units of measuring, the number of
[} EXTERNAL counted over the length of one inch (I / pitch) metric
thread is defined by its pitch - TPI equivalent is not applicable
CJ ". is a thread is cut on the outside of the machined
part, for example as a bolt
SINGLE POINT THREADING 341

THREADING PROCESS A beller approach IS to cut the thread in several passes,


each pass increasing the thread depth.
Threading is one of the most aulomated programming For this purpose of mUlti-pass cutting, the machine spin-
tasks in modern machine shop, yet it could be one of the dle rotations must be synchronized for the start of each
more difficult operations done on a CNC lathe. Initially, it puss, so each thread depth is at the samc position on the
may seem an easy procedure 10 make a program for a tool threaded cylinder. A quality Ihread will be completed when
path that has the cutting parameters very clearly defined, Ihe last clltting pass produces the proper thread size, shape,
such as threading. Practical applications, however, could surface finish and tolerances. Since the single pointlhread-
present a big departure from theory. This comment may he ing consists of several passes to cut a single thread, pro-
arguable, at least unwl il is lime to start searChing for solu- grammers must understand these passes well.
tions to unusual threadi ng problems or even regular threads
that just don't seem to be coming out right. An experienced In programming, the structure of each pass remains [he
programmer should have the ability 10 think of yet anolher sa me, on Iy I he thread data ch an ge fro m one pass to anot h cr.
solution, when all the OIher solutions seem to have been In a most elementary setup, there are at least four motions
used up. This is trlle for any problem solving process and for each Ihreading pass (as applied to a straight thread):
applies equally to threading problems. Motion 1 From the starting position, move the tool
to the thread diameter in rapid motion mode
What often makes threading a difficul[ operation is the
cutting tool application. The single point threadll1g tool is Motion 2 Cut the thread - one axis thread cut
unlike any cUlling 1001. Although the. holder is moumed in (at the feed rate equal to the lead)
the lurrel just like olher lools, the cutting insert is unique.
Threading lool not only elliS, il also forms Ihe thread shape. Motion 3 Rapid retract from the thread
Frequently, the threading insert has the shape of finished
Motion 4 Rapid return to the starting position
thread. The mounling of a threading toolm the IUrret can be
at 90 0 10, or parallel with, the machine spindle centerline, Expending on these brief descriptions. the four step (001
regardless of thread being cuI. The decision which way to mOlion process will typically include the following consid-
mount the lool is delCffilined by the angle of [he thread, rel- erations that are critical 10 the CNC program.
ative to the spindle cenler line. II is important that the lool is
mounled square in (he (uneL Even a small angular devia- Threading Motion 1
tion will have an adverse effect on the finished thread.
Before the first step, the threading tool must move from
• Steps in Threading its indexing position 10 the position close to the machined
parL This is a rapid molion, in the air. Make sure to calcu-
Compare a threading insert wilh a common 80 diamond 0
late (he XZ coordinates for this position correctly. The co-
tool used for rough turn ing, and a few oddities wi II emerge: ordinates are called the thread starling position, because
they define where the thread CUI will start from ilnd eventu-
Toof radius:
ally return to. The start position must be defined away from
Threading =:; almost sharp edge the part, but close to the thread. as (he intersection of the X
Turning = typical average is .0313 radius (0.8 mm) axis clearance and the Z axis clearance.
Tool angle: The first 1001 motion is directly related to the thread. It is a
motionfi-oJ1l the starting position fo the cutting diameter of
Threading typically 60° and a weak support the thread. Since the tbread cannOI be cut at full depth in a
Turning 80° and a strong support
single pass, the total depth must be split into a series of
Typical feedrates: more manageable depths. Each depth will depend on type
of tool, the malenal and the overall rigid!!y of the setup.
Threading up to .25 m/rev (6,5 mm/rev) or more This approach motion is programmed in rapid mode .
Turning .015 in/rev to .03 in/rev typical
(0.4 mm/rev to 0.6 mm/rev) Threading Motion 2
Typical depth of cut:
When the 1001 reaches the CUlling diameter for a given
Threading ::;;; small depth, the second mOlion becomes effective. The actual
Turning = medium to large threading pass will be cut during this slep, al the specified
feedratc and only when the machine spind!e is synchro-
The comparison shows that even a tine pitch thread can- nized with the threading feed rate. There is no need to take
not be cut with a single threading pass. A single pass would any special steps to maintain the synchronization - in
produce a thread of poor qualily at best and a unusable threading mode, the synchronization is automatic. Thc
thread at worst. The tool life would also be much shorter thread will be cui to the programmed thread end position.
than expected.
342 Chapter 38

Threading Motion 3 When programming coarse threads, the front clearance


amount required will generally be much greater than the
In the Third mOlion, when the thread cUlling diameter is
amount for fine Or medium threads. For example, a com-
completed, the tool must retract away from Ihe thread, at
mon thread with 8 TPI requires feedrate of .1250 in/rev! If
the machine rapid rate, 10 the X axis clearance position. the Z axis clearance is too small, the machine acceleration
This tool position is normally a diameter programmed Ollt- process will be incomplete when the tool contacts the ma-
side of the threaded area. lerial. The result win be an imperfect and unusable thread.
Threading Motion 4 To avoid this serious problem, this rule may help:

The threading process is completed with the fourth mo- Z axis clearance for the starting point should be
lion, when lhe 1001 returns to tile starling posi lioll ill a rapid three to four times the length of the thread lead
mode. All remaining passes are programmed in the same
way, just by changing the thread cutting diameter (thread This is only a rule of thumb and works well in every day
depth control). practice. Control manuals may offer a scientific way of cal-
culating the minimum clearance.
Note that only Threading MOlion 2 will be programmed
in the threading mode, using a proper G code. Threading In some cases, the Z axis clearance must be reduced be-
motions I, 3 and 4 will be in GOO (rapid) mode. cause of space shortage. such as when Ihe threading starts
very close 10 a tailstock or machine limits. Since the accel-
eration time depends directly on the spindle speed, [he only
""D
c

/
, - TOOL INDEX
POSITION
remedy for imperfect threads in thiS case is to IOlVer the
spindle speed (r/min) - the feedrate must not be reduced.!
"D N I
ro J
For complex methods of inked, the starting position is
(» t /
.....ro
t
L-
..c changing for each cut by a calculated amount.
I- U)
/
/
• Thread Cutting Diameter and Depth
- Start X
For cylindrical and conicallhread CUlling using the block
. Thread 0 method of programming (no cycles), select thc cutting dia-
meter for each pass of the threading tool in Ule program.
From the thread starting position, tile culling tool will move
towards spindle centerline for external threads and away
from spindle centerline for internal thJeads. The actual cul-
Figure 38-2
ting diameter for each pass must be selected not only with
Basic steps in single point thread cutting respect to the thread diameter, but also With respect to ma-
chinirlg conditions.
This typical description illustrated in Figure 38-2, is only
In ihreading, the chip load on the insert becomes heavier
general in nature and usually not sufficient by itself for high
as the cutting depth increases. A damage to the thread, [0
quality thread cutting.
(he insert, or both, can be averted by maintaining a consis-
1C'11/ chip load on lhe insert. One way to achieve the consis-
• Thread Start Position
tency IS to decrease each subsequent depth of the thread,
The mol starting position is a clearance posilion. For a another way is to apply a suitable infeed methocl Both
sU'aight cylindrical thread, the minimum suitable clearance threading techniques are often used simultaneously.
along the X axis is about .100 (1.5 mm) per side, more for
To calculate the depth of each pass, complex formulas are
coarse threads. For a tapered thread. (he clearance is the
not required, just common sense and a bit of experience.
same, but applied over the larger diameter.
All threading cycles have an algorithm (special process)
As for Ihe clearance along Z axis, some special consider- buill in the control system that calculates each depth auto-
ations are necessary. When the threading 1001 comes into matically. For manual calculations, {he procedure follows a
contact with material, it must be advancing exactly 100% logical approach. The lotal depth of the thread (measured
of the programmed feedrate. Since the cutting feedrate for per side) must be known - programmer decides how many
threads is equivalent [0 the thread lead. it will take some threading passes will be suitable for the particular thread.
lime [a arrive at the programmed feedrate. Just like a car Another value to be decided is the last cut depth, the cut
needs some time to accelerate before reaching its cruising [hat actually finishes the thread. These values usually come
speed, the threading tool has to reach a full feed rate before [rom experience. The rest is limited to mathematical calcu-
it conlaC\S the material. The effect of accelerarion must be lations or available charts.
considered when deciding the from clearance amount.
POINT THREADING 3

Pass #1 depth - 0.0140 Accumulated depth = 0.0140


Pass depth - 0.0100 Accumulated = 0.0240
Pass depth - 0.0080 depth = 0.0320
Pass #4 depth 0.0065 Accumulated depth = 0.0385
Pass #5 depth - 0.0050 Accumulated depth = 0.0435
Pass #6 depth - 0.0045 Accumulated 0.0480
Pass #7 depth - 0.0031 Accumulated 0.0511

,03.0 NOMINAL

02.9720

"""----- 0 2.9520
02.9360
02.9230
02.9130 Threading diameter #1 3.0 - 2 x 0.0140
02.9040 Threading diameter #2 3.0 - 2 x 0.0240 =
o Threading diameter #3 3.0 - 2 x 0.0320
Threading diameter #4 3.0 - 2 x 0.0385 = 2.9230
Threading diameter #5 3.0 - 2 x 0.0435 =
Figure 38-3 Threading diameter #6 3.0 - 2 x 0.0480
Threading diameters distributed for load
Threading diameter #7 3.0 - 2 x 0.0511 = 2.8978
Figure shows a There is nothing wrong with
only an example). It lS a the threading diameters. Wllat this method
has to find single depth of the in check for accuracy. is
cal way to do it, using a "t<>Y1rl<>,cJ'i from the nominal diameter, any error in calculation is not
profile external thread accumulative and might be hard to flnd A much
on lhe fulluwing thread method is to calculate each threading diameter based on the
metric extemal threads only: calculation, using single depth of cut, not the ac-
cumulative depth - compare it with the last method:

D",,---:::::: xP Threading diameter #1 3.0000 - 2 x 0.0140 = 2.9720


TPI Threading diameter #2 2.9720 - 2 x 0.0100 = 2.9520
Threading diameter #3 2.9520 - 2 x 0.0080 = 2.9360
~where ...
diameter #4 2.9360 - 2 x 0.0065 = 2.9230
diameter #5 2.9230 - 2 x 0.0050 = 2.9130
o ::= Single depth of external thread diameter #6 2.9130 - 2 x 0.0045 = 2.9040
TPI = Number ofthreads per inch Threading diameter #7 2.9040 - 2 x 0.0031 = 2.8978
P Pitch of the thread (l;TPIj
advantage of this method is that once the last diame-
According to another thread specification standard (UN (2.8978 in the example), add the double depth
thread fonns), the constant in the fonnula is 0.64952. the must be equal to the nominal
which would make the depth 0.0541. or 3.0000 in the example:

For a full profile internal thread, tbe formula to calculate + 2 >< 0.0511 3.0000
the depth will be used for metric and American National
threads only - D value is the internal depth:

054127
D::: TPI :::: 0.54127 x P
• Thread Cutting Motion

If seven threading passes are selected, \Vith the last pass


of 00031 (for programming convenience), the individual
depths can distributed the following way:
344 Chapter 38

malian, do not use preparatory command GOI for thread- N64 UO.2 W-O.l (GRADUAL PULLOtIT)
ing. If GO I is used, the start for each pass will nOl be syn- N65 GOO X3.3 (RAPID OtIT)
chronized Wllh Ihe previous Ihread slart. Inslead of GOI
command, use a G code specifically designated for thread- For eJ.;rernal threads, the clearance diameter must always
ing. G32 is the most common code used by Fanuc controls beJurther away from spindle center line l.han the diameter
for threading. During a thread cUlling motion G32, control of gradual pullout. For inremal Ihreads, the clenr(lnce di-
system aUlomatically disables the feedrate override. The ameter must be closer [0 spindle center line than the diame-
CNC operator has 10 be extra careful to sel Ihe Ihreading ter of gradual pullout. Figure 38-5 illustrates the concept.
tool exactly, particularly when thread ends close to shoul-
ders oftlle parI. To illustrate the programming process up to CLEARANCE 0
this point, here is a lypic!)1 program section:
THREAD 0
N61 GOO X3.3 ZO.3 (START POINT XZ) CLEARANCE 0
N62 X2.972 (THREAD DIA START)
N63 G32 Z-1.7S FO.OS33 (THREAD TO END) PULLOUT 0
THREAD (21

• Retract from Thread Figure 38-5


Thread pullout and cfearance diameter (external example)
The moment the thread has rcached the end position
along Z axis, the tool muslleave the material immediately,
to avoid making a damage 10 the thread. This is the third • Return to Start Position
mOlion in Ihe basic threading process. The relr<:lct motion
can have two forms - straight away in one axis (normally Regardless of how the tool retraction from the thread is
along the X axis), or a gradual pullout in two axes (simulta- programmed, straight or gradual, the last step in the thread-
neously along XZ axes) - Figure 38-4. ing process is always a return Lo the starting position. This
1001 motion is entirely in the open space, therefore pro-
grammed Il1 the rapid mollon mode GOO. Normally, tile re-
turn motion lo the starling position is along one axis only,
. . . STRAIGHT usually the Z axis. This is because in most programs, the
PULLOUT 1001 retraction from the thread has already reached the X
axis diameter. Here is a complete program excerpt - gradual
pullout is shown:
. . . GRADUAL
PULLOUT
N61 GOO X3.3 ZO.3 (START POINT XZ)
Figure 38-4 N62 X2. 972 (THREAD DIA START)
N63 G32 Z-1.7S FO.OS33 (THREAD TO END)
Straighl and gradual pullout from a thread N64 UO.2 W-O.l (GRADUAL PULLOtIT)
N65 GOO X3.3 (RAPID our)
Generally, Ihe siraigh! pullollt should be programmed N66 ZO.3 (RE'IURN TO Z-START)
whenever the tool ends CUlling: in an open space, for exam-
ple in a relieve or a recess groovc. For threads that do not
end in an open area, the gradual pullout is a bcHer choice. THREADING FEED AND SPINDLE SPEED
Gradual pulloUl motion produces better quality threads and
prolongs lIfe of the lhreading insert. To program a straight
pullout, the (hreading mode G32 must be canceled and re- In threading, the choice of the cutting insert, the spindle
placed by a rapid motion mode, using the GOO command: speed and feed rate selection are rather restricted. Both, [he
clllling tool and the feedrate arc determined by the finished
N64 GOO X3.3 (RAPID our) thread, as specified in the engineering drawing. Threading
illsert is one of the weakest tools used on CNC lathes - yet
For the gradual pullout, the threading G code and the its appl icauons demand some of [he heaviest feed rates used
I'eedrate must remain ill effect. When the normal length of ll1 CNC lathe programmtng for any tool. Other factors that
thread is completed - but before the tool is retracted - the can influence the final thread have to be dealt with as well,
threading tool moves in IWO axes simultaneously, ending such as spindle speed, the depth of each threading pass, the
outside of the thread. The normal length of the pullout is too! edge preparation, setup of the cutting tool and insert,
usually I to 1-1/2 times the lead (no( the pitch), the sug- plus similar considerations. Often, a change of only one
gested angle IS 45°. It is also importnnl 10 pay alten(ion to factor will correct a threading problem. Figure 38-6 com-
[he clearance diameter. pares feedrates for turning and threading.
POINT THREADING 5

From the last two formulas is easy (0 deduct


number of starts is one, both the lead and pilCh will
have the same value.

TURNING TH NG should be applied for

nm"_""",, of turning and threading feedrates

• Threading Feedrate Selection


~ where ...
of feedrale for general turning or boring is
factors as material 1001 nose radius, re- F == Required (in/rev or mm/rev)
finish, etc. In this sense, the L Lead of the thread (inch Of mm)
and boring cover a large In Ihread- P ==: Pitch of the {inch or mm)
is limited. The threading IS n Number of starts (positive integer)
by Ihe lead of Ihe thread - never Ihe
drawings, lhe thread description is For example, a thread with a start and the pilch
of threads over one inch length, or three millimeters (3 mm) 11 rccdralc of
inch), and a nominal diameler. As an ex-
thal is described in the drawing as 3 x 1 = F3.0
means thread has 8 fhrecu/s per inch, and
uni(s, the above
nal diameter (for example, the major diameter) is
All single slarl Inetric threads have lhe pilch
depending on the thread diameter. For instance, a thread
described as M24x3 is a single start metric
pitch of 3 mm on a mm diameter. A deSCription
means a Slart the millllncter.
unil, the most important ~ where."
correct feed rate are the oj {he
oj threading starts. P Thread pitch
TPI = Number of threads per inch
It may help to some of the basic relationships of
the Thread lead and thread pilCh (see the terminology or an example. the thread with one srarl 8 will
threading in Ihis chapler). In a common machine of
shop conversation (shop talk), the words lead and pitch are
often used incorrectly. The reason is thai for a single start x 1 ~ .125 x 1 = FO.125
thread, the amount of is identical to (he amount
the pilCh. Since mosl shops work wilh a threads are special ill lllally
IS also the lead - nOl rhe
Slarlthread on a Ihe mislise of Ihe terms is sel-
dom noticed. In all laps have a
sta.l1. What may in a shop talk language has • Spindle Speed Selection
10 be interpreted CNC programming. Each The speecl of Ihe $pinrlle for thre!"lrl is nlwnys pro-
lenn has a in threading, so use them in direct ilmin. never as a constant
in the correct means the preparatory command must be
S, specifying the number of revolution~
example, G97S500M03, will
; ;:; F II j-: Ime rhm single
over di amelers ,",01"",,,,,"
346 Chapter 38

and the root of thread, so G96 sclection would seem logi- e English example:
cal. This is not the casco First, even for fairly deep coarse
threads, the difference between the first and last diameter is Jr the thread lead Lis .125 and the maximum feedrate for
insionificanL Second - and this reason is even more IJnpor- Ihe X axis Frm(J\ is 250 in/mill, then the maximum threading
tant- the thread cUlling rouline requires a perfect spindle speed RJ""\" will be:
llnd feedralc svnchroniWlioJ! at (he slart of each pass. Such
synchronization can be more accUfmcly achieved only with ~ = 250 / .125 = 2000 r/min
constanl r/n/in rather [han constant surface speed (CSS).
Q Metric example:
For the majority of threads, the selection of dmin requires
If the thread lead L is 2.5 mm and the maximum fcedrate
only consideration of general machining conditions, simi-
for the X axis F[mu\" is 6350 mm/min, then the maximum
lar to other turning operalions. At the same time. selectlhe
Rmil< threading speed will be:
spmdle speed with some consideration of the feedrale. Be-
cause of the heavy feed rates used for (hreading. [here is a
~ : 6350 / 2.5 ~ 2540 rpm
distinct possibility lhat certain threads cannot be cut at any
available spindle speed. If this is confusing. keep in mind The max i mum allowable rlmin only reflects Ihe Cilpnbili-
thallhe feedrate is determined not only by rhe lead, but also tics of [he CNC machine. The feed rate actually used in a
by the overall capability of the machine. Every CNC lathe program must also take inlo account the various machining
has a programmable feedrate value, specified In either and setup conditions,just like any other tool path operation.
in/mill or min/mill. up 10 a cerlai n max i mu m for each ax is. In practice, the majority of actual programmed spindle
Take a tYPlcal maXlmum programmable feed rate for the speed (r/min) will be well below the maximum capacity of
the CNC machine tool.
X axis may as 250 in/min (6350 mm/min); the maximum
for the Z axis may be 450 in/min (ll430 mmlmin). Recall
that there is a direct relationship between Ihe spindle speed
• Maximum Threading Feedrate
and the fcedrate per revolulion. The result of this relation- The select ion of culli ng feed rate in general was discussed
ship is actually Jeedrale expressed in fums of lime. notycr earl icr, in Chapler J]. Afler studyi ng the section on the
revolution. The fc:edrale per lime is always Ihc result 01 the maximum r/min selection (spindle speed), it should not be
spindle speed in direct IImill mulriplled by the i"eedrate per surprising that Sllnilar limilations apply to the determina-
revolution in in/rev or mIT//re\!. tion of a maximum threading Jeedrate for a given spindle

e English example:
speed (programmed as r/min). Again, the limits oflile CNC
machine tool arc very imponant, so be aware of them when
writing {he thread CUlling program.
700 r/min x .125 in/rev = 87.500 in/min
Maximum programmable threading feedrate for a given
e Metric example: spindle speed (in dmil1) can be calculated from Ihe follow-
ing formula:
700 rpm x 3 rom/rev = 2100 mm/min
1n CNC lathe programming generally, not only in thread- Ftma"l<
ing, always make sure lhalthe feedrLlle per revolution com- S
bined willl Ihe· "peed will he l(,H Ihon nr ('qual In
the maximum available feedralc per lime Cor the axis with
IEf where ...
the lower raling, which is usually the X axis.

Based on this simple rule, [he maximum spindle speed Fr "la, Maximum feed rate tor a given spindle speed
for a given kad can he selected according to the following Ft ,,>ox := Maximum feedrate per time IX\ axis)
S Programmed spindle speed (r/min)
formula:
Q English example:
lr(he maximum machine feed rate along X axis is 250
in/min and the spindle speed S is selected as 2000 rlmin,
(hen the maximum programmable feedrale will be:
where ...
250 J 2000 = .125 in/rev
Rm" Maximum allowable r/min
Ft == Maximum feedrate per time (X axis) Therefore. the maximum thread lead that can he cut at
L "'''=:; lead of the thread 2000 r/rnin is .125 inches, which [lllow~ R lhreads per inch
or liner.
POINT THREADING 347

Changing the spindle speed {feedrate remains the same)


allow programming coarser threads on the same CNC
example, if only 1500 r/min is Instead of
2000, the maxImum lead will to .1670 inches ~ where ...
or 6 threads per inch.
Maximum lead error per inch
Metric example: ::::: actual feed rate
rounded feedrate
=: Number of threads per inch

Over one inch, en'or in the example will be


an inch, over fifty it will be rull .0200 of an inch. An-
other somewhat more critical, is
rounding a with 11.5
6350 I 1600 = 3,969 mm/rev should be with Ihe feed rate of
[0 FO,0870, the accumulated error is
means the maximum lead that can at the error over 50 inches will
1600 rlmin must be less than 4 mm. machine does not allow
feedrate, the proper round-
values only indicate the aClual
and the machine and do not
or even suitable machining Compare the the errors
they cause (11.5 TPI over
• Error
.0869 error of ,0325
threading feed rate requires .0870 error of .0250
decimal place accuracy for Ihread.:; in .0871 error of .0825
format), and three decimal place accuracy
(F3.3 format). ll1e majority of What a difrerence one tcn-thousandths of an inch
accuracy is quite sufficJent. There is never rounding.
threads, regardless of Lhe th(cad po-
thread is defined by its lead already in
threading
drawing. threads programmed in the
benefi t of using
thread lead musl calculated from the given
it allows programming
inch (TPI) in drawing. For many English threads,
the standard four for
lead is within [he four threads allowed for metric
able A 10 TPI threads using the E audress is seldom used). With proper
feedrate of of roundlOg, the accumulative en-or is virtually negligible.
divide the TPI into one
accurately, such as 8, 10, 16, ng the same illustration of 14 TPI over
most common number of threads. error l'or the whole length will only he ,0003
FO.0714 j" replaced by E0071
Not a.ll I mto IhlS rather convenient group. For a thread with 11.5 threads
many other rhreads, the calculated value must be properly with the feedrate
rounded off. error over fifty inches will be only a
Take a 14 TPT thread, example. The exact threading
feedrate should be JII J I inches per revolution.
The rounded used in program should be FO_0714_
Over a short thread is no noticeable error at all
and the thread is well ll1al is not true
if the thread is unusually or the rounded value has crror is always a potential problem when pro-
been improperly accumulative errOl; known thread leads, Depending on the kind
as the thread lead err01~ will in a possible scrap due to in the machine shop, the
an incorrect thread_ rounded value of ,0714, the thread lead may be critical or it never
ilie loss is .000028571 thread revolulion. 10 with.
Lead error over one i neh can be casi Iy calclliated;
38

TOOL NCE POINT of four basic steps one block


resulting in the minimum of four blocks
ing pass. If the gradual pullout from the is
A 1001 selup is !O a good
thread cutting, (here will be five blocks of program
mcnL Wh a setup is important to
threading pass. When coarse threads,
mnre Imroftilnl 10 mainlam a good setup of the
in hard or exotic materials, even some mulli star1
tools, external and internal. The tool cutting edge has!O
often means quite 11
""{"""F'\! oriented, securely moullted in the program,
to be the right type. Its reference point,
errors, and even
setup, is also very en tical.
are the negative

On the plus side. (he


gmmming control over rhe fhread. control

v
I
lj capable hands can often be applied La some
i lechniques, ror a
threadi ng tool much smaller than lhe thread it<;el or rnak-
large knuckle threads with a round tool.

-d-- -d- --d~ Thread programming the block technique

..... ..... ..... I'or a constant lead thread is avai


support threading.
on all CNC lathes that

a' b c
Figure 38-7
Typical reference points for sewp of threading tools
The preparatory this of threading is
The rererence point of a Gj2. Command on some controls, but G32
considerations than for turning is the standard G and compatibles.
there are three possibilities, in the programming
frequency. The third version (c) is the rarest and vir-
In an example, a 12 extemalthread will be used.
tually no hendillo the programmer in some cases of
All cuts are disLribUled in seven for the total depth
hand threading, For mOSl lefl hand one of the
or .0511:
two versions i~ also quite su Pass # 1 depth = .0140 Total depth .0140
The Ihreading insert sclli
Diameter 2.9720
for general use and
Pass #2 depth .0100 Total depth .0240
dcr. Configuration in Figure
2.9520
lilat
Pass #3 depth = .0080 Total depth ,0320
Selection of the tool (G50 or geometry Diameter 2.9360
offset selling) as is the mas I
desirable one. when the tooling
#4 depth .0065 Total depth .0385
sel-
Diameter 2.9230
setup for any lype of
ling, regardless of the al
the same lime. In some cases. an must be made = .0050 Total depth .0435
Diameter 1
for Ihe difference between the ... u"n"~ edge and the
actual edge. The lOol! list this value precisely, or
Total depth .0480
one half of the threadi width (if applicahle) can be 2.9040
ll~ed instead.

#7 depth = .0031 Total depth


BlOCK.. BY.. BlOCK THREADING Diameter
make sure all diameters are calculated
point thread programming IS
without errors. Small error can cause
\0 mOLion associated with the
Ihrcading and il as an individual block of lhe pro- threading operation in program 03801 will use the
gralR 111is is called block-by-block Ihreading {ool and offset number 5 (T0505), at 450 r/min
method, or method. (G97S450):
SINGLE POINT 9

03801 BASIC THREADING CYCLE - G92


(N4S GSO Xl2.0 Z4.
N46 TOSOO M42 can perform
N47 G97 S450 M03 results in
N4a GOO X3.2 ZO.25 T0505 MOa is especially for
block-by-block \001
Now, the thread start The next
program shortened significantly.
stage is to implement hlock,
the first pass: same program example thaI illustrated
the and apply it to a simple threading
N49 X2.972 (PASS 1) This cycle is usually called the 092 threading on
N50 G32 Z-1.6 FO_Oa33 .083333) Fanuc controls. Incidentally, 092 in the tlueading context
N51 GOO X3.2 has nothing to do with [he command of the same name, the
N52 ZO 25
traditional and now old-fashioned 092, the position
remntntng six passes can programmed next, just If the lathe conlrol uses G92
by changing the . Note that Ihe threading feedrate use G50 for the position
110/ repeat - it is modal from block N50 on.
controls only,
offsets.
NS3 X2.952 (PASS 2)
The (hread IS
NS4 G32 Z-l. 6
N55 GOO X3.2
NS6 ZO.25
N57 X2.9360 {PASS 3}
NSf! G32 Z-l. 6 L
N59 GOO X3.2
N60 ZO.25
N61 X2.9230 (PASS 4) START 0
N62 G32 Z-L6
N63 GOO X3.2
THREAD (21
N64 ZO.25
N65
N66
X2.9130
G32 Z-1. 6
5) xo
N67 GOO X3.2
N68 ZO.25
N69 X2.9040 6)
N70 G32 Z-1. 6 L=
N71 GOO X3.2
N72 ZO.25
c=
Z=
N73 X2.8978 (PASS 7)
N74 G32 Z-1.6 38-8
N75 GOO X3.2
N76 ZO .25 G92 - simple thread cutting

For a comparison with the G programming method,


Block N76 terminates the
the same thread will 12 threads per inch
c an as if there are no more too! s
on a 3.000 inch external program will do ex-
N77 X12 0 Z4.5 TOSOO M09 actly the same job, except it will have a noticeably different
N78 IDO structure.
%
Using the 092 cycle, the list shows (he calcu-
as odd in the example, is the laled diameters for each will appear in
Observe the three blocks lhe program (no change at
diameter - they are always the same. #1 depth =
passes these repetitions wiJI #2 depth ::::
hlock-by-block method has one main depth :::::
full control. Adjustments #4 depth :::::.
~."..... h",.. of rhreads and depth of
depth =
method and a gradual pullout #6 depth :::::
Actual program editing after it ha<; #7 depth ::::
is much more inconvenient
350 Chapter 38

the threading 1001 has been rrogram, the conlrol system will lilal there are more
and spi ndle speed - 1001 5 (T0505) and threads to cuL while they aClUally completed in
the previous block.
03802
The simple threading is just that - it is simple.
(N45 G50 X12.0 Z4.5) without any frills. II any special infeed meth-
N46 TOSOO M42 ods, ill fac\. Ihe only method is a straight plunge
N47 G97 S450 M03 type. Later in this chapter, the plunge method of infecd will
N4S GOO X3.2 ZO.25 T0505 MOS (START be described as notsuitable most threading operations.
first four blocks are identical to An lout can be programmed with
In the next step, the threading tool will G92 to ling [he G92 cycle.
at the first pass diameter, chase the thread, retract If Ihe control system
from the thread and return to the last always use the
blocks are repetitive for each benefit - G76,
the lhreading cycle is that it eliminates
data and makes the program eaSIer to
fOmlal for the G92 straighl cycle is: MULTIPLE REPETITIVE CYCLE - G16
various lathe cycles were the
normally for turning and boring. In this
I:@i' where ... will aim at one more of the multiple
cycles, this time used for various threading appl
X Current diameter of pass
Z "" End position of the thread of CNC development, the simple
F Threading feed rate in in/rev cycle was a direct re~mll of the
The first threading pass will its The computer technology
- N49. Note the X axis and lheZ as well as and many great new
the cutting feedrale: programmers. These new
development. One of the
N49 G92 X2.972 Z~1.6 FO.0833 (PASS 1) another ror threading - a
live Ihreading cycle G76. This cycle is
The control system will Ihe X value and the last plex nO[ because it IS difficult to use
before {he cycle call as the starting position for the trary) it has some powerful
point for the cycle. In
7.0 25 (block fully Ihe impact of G76
can be pro~
It wlIh the origmal G32 and
grammed jusl by IS no
even the cycle jusl described. While a program using
to repeal the Z value or method requires four or even blocks of pro-
each threading pass, cycle requires
NSO X2.9520 (PASS 2) one hlock for each threading cycle will do
N51 X2.9360 (PASS 3) thread in olle block code (two blocks
NS2 X2.9230 (PASS 4) some the G76 cycle, any
NS3 X2.9130 (PASS 5) threading occupy only a very
N54 X2.9040 (PASS 6) small pomon or the editing on the ma-
N55 X2.8978 (PASS 7) (if necessary)
completed by an automatic return There are two programming
of the thread. From that Ing on (he conirol model This is
the same way as for G32. the other lathe cycles .

NS6 GOO Xl2.0 Z4 5 TOSOO M09 • G16 Cycle Format 10T/11T/15T


NS7 M30
% A threading cycle requires initial data input - information
provided to the control that the thread in machining
One frequent terms. Figure 38·9 illustrates Ihe for Fanuc JO/11/15T
with this is to controls.
cycle can only by another motion
Ihis case by a motion GOO. If GOO IS
POINT 351

;.-....

~ where ...

K First block:

x p = ,.. is a six-digit data entry in three


Digits 1 and 2 - number of finishing cuts (Ol·99)
Digits 3 and 4 - number of leads for gradual pull-out
(0.0-9.9 times lead), no decimal point used 100-991
Digits 5 and 6 - angle
Z-END
(00. 29, 30, 55, 60, 80 only)
L:: TOTAL
a::::: Minimum cutting depth
(positive radial value· no decimal point)
0:: FI
R;;;:; Fixed amount for finish allowance
K:: TOTAL (decimal point allowed)
X:: ROOT
Second block:
Figure 38-9
G76 - Multiple repetitive thread cutting cycle (10m X.;:;:;; (a) last diameter of the thread (absolute diameter)
... or ...
These parameters form the structure (b) The distance from the start point to
de (for external or internal mrea(lS the lastthread diameter {incremental}
2 =: End of thread along the Z axis
(can be an incremental distance W)
R difference between start and end
~where ... positions of the thread at the final pass
(RO for straight thread can be omitted)
x= Diameter of the last threading pass p:::::;; Height of the thread
Z == Position indicating the thread end (positive radial value· no decimal point)
I Amount of taper over the total length a Depth of the first threading pass
K == Single depth of the thread - positive (positive radial value - no decimal point)
D = Depth of the first threading pass - positive F Feedrate of the thread (same as the thread lead)
A = Included angle of the insert - positive
P Infeed method (one offour)- positive follows the logic of several lathe cycles
in Chapter 35. Do not confuse the P/QIR ad-
Observe differences in the fonnat structure for the flrst block with the P/Q/R addresses of the
pie cycle G76 with the basic G92 cycle. They have their own meaning - within each
cycle to be simple, but internally, it is very complex block only!
- the system must do a large number of calculations
This is one reason why we use computers - to o English
them do the hard work. These calculations need data (External 1-11/16 with
(repetitive information), in the form of input parameters
that establish the specifications. Yet, in spite of the NlO G76 POl1060 RO.003
more input values, the G76 is a very easy cycle to use in Nll G76 Xl.6261 Z-l 5 P0307 FO.05

o
• G76 Cycle Format - OT/16T/18T
On the popular Fanuc controls OT, 16T and 18T, the G76 N20 G76 POll0GO RO,05
cycle is somewhat changed from the lOll1l15T models. N21 G76 X76 0 z-30 0 P812 Fl 5
and remam same, the difference is only
how data input is stmctured. • Programming Example
line input, described earlier.
The earlier example oftne thread, with 12
a two
temal diameler 00.000
block entry for a 076 programming method.
fomlal is; controls are shown, using only the minimum
program blocks (last tool sho\VIJ in
352 Chapter 38

03803 (G76 METHOD - ONE BLOCK METHOD) In the two block version, the same program will be very
simi lar, applying the samc logical thinking.
(N45 GSO X12. 0 Z4. 5)
N46 T0500 M42 03S04 (G76 METHOD - '!WO BLOCK METHOD)
N47 G97 S450 M03
N48 GOO X3.2 ZO.25 TOSOS MOS (N4S GSO X12. 0 24. S)
N49 G76 X2.8978 Z-1.6 IO KO.OS11 D0140 A60 N46 T0500 M42
P4 FO.OS33 (or F/EO.OS3333) N47 G97 S4S0 M03
NSO GOO X12.0 Z4.S TOSOO M09 N48 GOO X3.2 ZO.2S TOSOS MOS
NSI MJO N49 G76 P011060 QOOS RO.OO)
% NSO G76 X2.8978 Z-1.6 POS1l Q0140 FO.083333
NS1 GOO X12.0 Z4.5 TOSOO M09
Several points relating [0 the program may need clarifica- N52 M30
lion. The fact thal the whole program requires only six or %
seven blocks is, in itself, significant. Any programming
change can be done by a simple modification of a proper There are few other parameters to explai n, but first look at
parameter in block N49, which is lhe threading cycle call. how the cycle calculates the tirstlhread depth. The higher
For instance, to change the depth of the firsllhreading pass le\)el controls using the one-block inpur will be used/or the
to .0160 from the currenl .0140, all [hat has 10 be modified expLanmioHS} unless mentioned olhenvise.
is the entry of DO 140 (0 DO 160.
.. First Thread Calculation
The comparison of the G76 cycle with G92 cycle is un-
fair, as each cycle is the product of a different technological For the G32 block threading, as well as for the Gn sim-
era. They coexist in [he same control unit even at the pres- ple threading cycle, the thread starting position was always
ent lime, mainly to be downward compatible with older determined as only reasonable, applied to both axes for the
programs. The two cycles are 3 good iIlustra[ion of some purposes of supplying a suitable tool clearance. The Z axis
signincant differences between programming lechniques. clearance in the start position block only lakes into consid-
eration the lead of the thread and the spindle speed. Its pur-
For example. in the G92 threading cycle application, in- pose is 10 prevent cutting imperfect threads, due to the ma-
pUIof each thread pass diameter is important, in G76 cycle, chine acceleration for lhe feedrale. The clearance for the X
only (he lasl pass diamcler input is importan!. axis is an arbitrary clearance for the tool to move away
Internally, the CNC syslem does all necessary calcula- from the thread. The same principles apply to G76 thread-
lions. The supplied inrormalion is contained in the pro- Ing cycle as well and can be used the same way as In the
gram. First, the control registers the thread sta11ing posi- previous thrcading methods.
tion, the same way as for G92 cycle. In (his example (block There is one major difference from programming the
N48), the position is X3.2Z0.2S. The next slep the control G32 and the G92 methods. In the previous threading exam-
goes through is the evaluation of all G76 parameters (the ples, the starting position for the X axis was X3.2. In the
programmed data in block N49). The X value is the diame- G32 block CUlling, as well as in (he G92 simple threading
ter of the last threading pass, the K value is the thread cycle, [heftl'St threading diameter was all-vays programmed
deplh. That provides enough information for the control [0 (in the examples, [he value was X2.972). This is nOl the
'know' what is the theoretical premachined pan diameter case in the G76 threading cycle. In this cycle, it is the last
(the actual premachined diameter cannot be known). This diamete.r (hat is programmed - not the first - and lhat means
relationship is important for selection of the tool rapid ap- the first cut diameter must be calculated by the control sys-
proach direction. If the Ihread star! diamelc( X is la/ger tem internally.
than the last pass diameter, the threading is eXlemal. If lhe
thread start diameter X is smaller than the last pass diame- The calculation of the firs/ thread diameter i~ done com-
ter, the thread is imemaf. pletely by the control system, providing the following In-
[ormation is supplied:
The Z value. in [he G76 cycle has the same meaning as the
Z value in the G32 Ihread clilting or the G92 threading cy- o The root diameter I X value I
cle. It represents the end position of the thread and controls o The total thread depth ! K value I
the thread length.
o The first thread depth [ Dvalue I
Two parameters unique 10 G76 cyclc are the I and [he K
values. The 1 value is always a zero if a straight diameter Based on the supplied values, the first diameter TJ of (he
(hread is cut. A non-zero value is used for laper threads, thread will be cJ.1cu lated as:
where it represents the smgle difference between the start
diameter of the cut and its end diameter (described later in Tf = X + (K x 2) - (D x 2)
lhe section dealing with a tapered thread).
POINT THREADING
353

X is 2.8978, K is II P0511), the melhod has Its own procedures. the


first Ing depth D is .0 J40, entered in program as
DO J 40 or QO 140, depending on Ihe Therefore, the
o amount
d of the thread '0' will
o Constant cutting depth
= 2.8978 + (.OSl1 x 2) - (.014)( 2)
r:J One cutting
Tf = .2.9720
o Both cutting
resull is same
bUllhls lime it was p of the G76 cycle the feature.

THREAD INFEED METHODS • Radiallnfeed


is one of
the material can be the common
mOSI methods, It can
in several ways. of the mOSI important to a unidirectional, the cutting
is the method that controls threading tool approach tool. the diameter 1001 is
the thread, also known as the lhreading infeed. straighl for each new pass.
is a method detailing of [he threading 1001, as the X dala in the program.
one of fwo basic as illustrated in parameter IS used for a radial i
grammi and G92 simple threadi IS no pa-
rameter to program, The Z axis start position is the same for
thread diameters and is easier to The radial In-
is suitable for soft materials
but il could damage
of a radial infeed is thaI both insert
of the threading tool are material at Ihe
same lime. Since Ihe edges are ODIDmme [0 other, the
RADIAL I curling of the chips will also to each other. In
applications, lhis will cause temperature and
wear problems related to decreasing depth
I In
each infecd may not
does not produce a high
problem. If the radial
thread, a compound
infeed approach will generally a much heller job.

• Compound Infeed
COMPOUND also called a flallk in
of !he [001 tha! moves 10-
Figure 38·10 wards the The
Radial and Compound infeed for thread cutting duced by
shape of a chip produced
One common method in thread programming is threading 1001 the
the plunge method, called the radial method, away from Ihe tool
also known as or perpendicular' the 10011 ife. The of rhe chip CJn be hea vier
other method is an angular method, beuef known as passes will be required for mosllhreads. In
a compound infeed or aflank infeed. :-.hown Ihe compound where one is in
constanf contact thread wall. There is no cUlli
The need 10 infeed direction in only undesirable which may cause a poor surface
offer the best conditions for the insen linish on the avoid Ihis problem, (he
for threads with very leads and some soft the mfeed than the Oank hal f of
majority of cut~ will bene/it from a compound the thread A Iypieal V-thread, with 60u In-
infeed (al an Ihreaded shapes are ror angle 30° and the
the reason of geometry - for example, a thread should be a lillie than thal, say 29". Keep in - the
will always a plunge lofeed (straight infeed). shape or geometry of the thread is nm that is built
The angle of ill is programmed wi Ih the A or into the insert What is is way
lhe G76 how the insert cut - figure 38-11.
3 38

controls (higher level),


cycle, Lhat with
and defines Ihe cutting

• Cutting Type - Parameter P


can be
MODIFIED COM UNO INFEED

Modified compound infeed angle for berter thread

rn
the G76 threading cycle, are very powerful tools
in forms of cutting parameters, twO of which nrc related to controls
the in feed method of a threading tool is the address A, relating
and other is the address P. Only the Jngle description is
available for Ihe two-block method, as last pair of the P
address in (he first G76 N49 076 P.... 60 Q .. R.. In addItion to the radial infecd
flr"rrlnn/~r1
with the AO
• Thread Insert Angle - Parameter A ,,".7"r·" parameter A), there are two main CULling
Ihal can be used in programming a thread infeed - a
controls), a non-zero value cut and a zig-zag CUI. terms refer to
[he tool angle, a of cutting edges employed at one lime. The one
value that is equal 10 of the threading in- cut refers to CUlling with one the zig-zag cut reo
sert. The tool approach towards the part will be a lillie to CUlling with IWO clilfing of them can be
than one half of the For example, if in conjunction with A thread angle pa-
standard A60 is programmed in cycle, the in feed rameter and Ihe cUHing depth
will be slightly less 30°, for the extra clearance. or a conslant depth.

Only the following A angle settings arc allowed in a Fanuc CNC lathe controls methods of control-
076 threading cycle: ling thread CUlling 38-/2):

,
\

AD ISO
A29 ACME ANSI
A30 Metric DIN 103
A55 BSW,
A60 Standard 60° V-thread English or Metric
ABO German thread

information and funher


thread forms, an
is very commonly used for
a lire changing P3 P4
programming notes are Figure 38· 12
A Merrie Trapezoid
elJNing fDr G78 threading cycle (parameter P)
thread, with 30" Used on 10/11/15T models
an induded angle of ,
its usage had declined even Pl One cutting ... with constant amount
munc standard worldwide. As P2 Two Gutting ... with constant cutting amount
A80 PG il is (\ special German pipe (Pollser- P3 One cutting ... with constant depth
rohrgewillde) , with the included angle of 80°, nOI common P4 Two cutting ... with constant cutting depth
in Nonh
SINGLE THREADING 355

On Fanuc lathe controls manufactured before the


lOT, the P in the cycle was not available. DIAM
The is oow the P I parameter was the --
03.0000
fault. lhal do suppon the P parameter. if the
call, PI cUHing method is 0.0140
is the most common threading
application for many jobs. It will apply 02.9720
one cutting 1001 and the cons/am CUl- 0.0100
ting amount. That will result in equal chip volume removaL
Feel to with the Olher three options as well. 0.0080

ONE-BLOCK M OD CALCULATIONS .9230


02.9130
02.9040
02.8978
- S1
S2
a program needs S3
[0 control other
{he G76
Figure 38-13
Compound in/eed calculations for 632 block-by-block threading
Unfortunately, there is only one - take a pocket cal-
culator and calculate toot position and 1001 Pass #1 depth at ( single depth .0140 J
motion individually. ]s it a lot of work? Yes. Is it worth do- Pass #2 depth at ( single depth .0100 I
ing? Absolutely. It has to be a because even Pass #3 depth at I single depth .OOBO )
a sJlght modification althe very difficult. Pass #4 depth at ( single depth .0065 I
A top class programmlOgjob is worth (he extra lime Pass #5 depth at ( single depth .0050 }
and effort when qualily and of the final pan de- Pass #6 depth at ( single depth .0045 )
pends on ie Quality is not programmers (and ma- Pass depth at ( single depth .0031 }
chine operators) have LO Invest some time into it.
and threading pass diame-
The principles of "",n,",,!>] lers, Figure as an Sand S I-S7 dis-
block-by-block programming are tances. When the Z is shifted, [he shift dis-
work may be tedious and tance must be basis of compound angle
impractical. Each threading and the threading Any new calculation must be
a difrerenl Z aXIs start position. is based on Ihe last calculation.
lhat must be calculated exactly,
will fail. It also had bener be nght the • l Axis Start Position Calculation
the changes could be long and COSily.
example, the same thread will be as in The Illustrated distance S the IOtal
(3.0-12 TPI). Program will use the the nominal Z axis position, in Ihe
with a modified compound i grammed as ZO.25. The is to the Z
Theorelically, it
• Initial Considerations shift IS programmed - 'A"I''''',,,,,,
The thread used for the examples in this thread.
12 TPI external thread. All individual
ng pass had been calculated
depths for each pass had been
same time. These values will be used In Although another approach may
In there are seven distance will be calculated firs\. total
the Z value (total II and lheselectcd compound infeed ,so us-
in Figure 38-/3. ing a standard trigonomelric formula will S
shows the distribution of each ranee value:
for the seven threading passes and
the illustration: S : .0511 x tan29 = .028325l93
356 38

a threading The seven shi positions the start Z axis position


be its relative can be calculated, based 011 the position
as an in the of ZO.2783 at the 03.000:

#1 S - 51 .2783 - .0078 .2705


#2 = .2705 - S2 .2705 - .0055 .2650
D x #3 .2650 - 53 .2650 - .0044 .2606
'"
#4 ::: .2606 - 54 .2606 .0036 .2570
#5 .2570 - S5 .2570 - .0028 = .2542
#6 ::: .2542 - 86 .2542 - .0025 .2517
Sx = Shift for the current thread pass· incremental #7 .2517 - S7 .2517 - .0017 .2500
D :::: Single depth of the current thread pass
This example shows the initial
Calculation for each uses same formula, chang- the thread, then moved one step at a
ing the D depth input. in mind that the of this nal 20.25 position. Using Ihis method
process is to find a new Z start that the originally set .250
pass· i.e., Lhe Z value for a never be smaller. Only the Z value will
38-14 illustrates the process. programmed values are not affected
at all.
The complete program is not short (which is typical with
programming), but it docs illustrate the compound
r, method of threading when no cycle is available or is pracli-
LO use. Only the threading Lool is shown in the example.

03805
(COMPOUND INFEED EXAMPLE)
o
(N45 GSO Xl2.0 Z4.5)
N46 T0500 M42
N47 G97 5450 M03
N48 GOO X3.2 ZO.2705 T050S M08 (START 1)
=Dx N49 X2.972 (PASS 1)
NSO G32 Z-1.6 FO.OS33 (or F/EO.083333)
N51 GOO X3.2
NS2 ZO 265 (START 2)
Figure 38-14 N53 X2. 952 (PASS 2)
N54 G32 Z-L 6
Calculation of rhread stan position· Z axis NSS GOO X3.2
N56 ZO.2606 (START 3)
Once the modified Z axis stan position is known for the NS7 X2.9360 (PASS 3)
first pass depth, it is easy to find start positions for N58 G32 Z-L 6
subsequent pass depth. We know that the modified Z axis N59 GOO X3.2
position for rhe threading (001 will be the already N60 ZO.2S7 (START 4)
established ZO.25, plus the .0283 shift S, rounded from the N61 X2.9230 (PASS 4)
calculated value of .028325193. The theoretical starti N62 G32 Z-l. 6
position will be ZO.2783, calculated at the 03.000, but N63 GOO X3.2
N64 ZO. 2542 (START 5)
never used in the program. itself This mitial value is needed N6S 0.9130 5)
for all the For each subsequent calculation, the N66 G32 Z-L 6
value has to subTracted from the current Z starting N67 GOO X3.2
lion, The following IiSL shows the individual shift values (as N6B ZO.2517 (START 6)
rounded In ish units)' N69 0.9040 (PASS 6)
N70 G32 Z-l. 6
Sl :: .0140 x tan29 .0078 N7l GOO X3.2
82 ::: .0lOO x tan29 ::: .0055 N72 ZO.25 (START 7)
N73 Xl.8978 7)
53 .0080 x tan29 ::: .0044
N74 G32 Z-l. 6
54 ::: .0065 x tan29 .0036 N75 GOO X3.2
55 :: .0050 x tan29 = .0028 N76 ZO.25 M09
56 ::: .0045 x tan29 = .0025 N77 X12.0 Z4.5 TOSOO
57 .0031 x tan29 .0017 N7B M30
Total -0283 %
SINGLE POINT THREADING 357

In program 03805, lhe thread infeed method is equJva- • Single Axis Pullout
lenlto the PI parameter in G76 cycle. This culting type em-
A single axis pullout (thread !inishing OFF) is a simplc
ploys only a single edge of the threading Insert, with a con-
rapid motion programmcd at the end of threading pass as
stant amount per each threading pass. I[ represents [he mOSl
the fhird l11olion of the four basic threading sequences. The
common programming melhod for threads and can be used
pullout direction is always at 90° to the thread. For cilher
as n sample for many olher thread cUlling applications.
lhreadil1g cycle G92 or G76), this is the default condition,
Block-by-block threads will be longer and will need 10 be
so M24 is not needed, unless M23 function is used as well,
checked for accuracy very carefully.
usually for another thread in the same program. two
functions cancel each other. IfM24 function is used. it must
THREAD RETRACT MOTION be programmed before the threading cycle for which il has
been applied. For examrle, the threading program 03gm
Earlier, a statement had been made thaI [here are only two using lhe G76 cycle will be Slightly modified in 03806:
methods of relracting the 1001 from the thread - a slr,lIght
motion along a single axis, and a gradual si multancous mo- 03806
lion along two axes. Both are used in thread programming. N4S (GSO Xl2.0 Z4.5) M24 (THREAD PULLOtIT OFF)
] n facl, their frequenl appJ ications even jusli fy special mis- N46 TOSOO M42
cellaneous functions buill into the control system as a stan- N47 G97 5450 M03
dard feature. These thread retracl functions are called lhe N48 GOO X3.2 ZO.2S TOS05 MOS
thread chamfering fllnctions or thread finishing functions. N49 G76 X2.S978 Z-1.6 IO KO.OSll D0140 A60
P4 FO.0833 (or F/EO.OS3333)
.. Thread Pullout Functions N50 GOO X12.0 Z4.5 TOSOa M09
NS1 M30
When using the Ihreading cycles G92 and G76 ror lhe %
CNC l;:lIhe work, the end of the thread (the Z axis value)
will either be in a maleria! [hat has been previously re- The M24 funceion appears in block N45, the only block
cessed, or in a solid material. The actual pullout can be pro- thal was available without another 1\1 function.
grammed "long a single axis, or along both axes simultane-
ously. Typical Fanuc functions designed for Ihis purpose • Two-Axis Pullout
are M23 and M24. They conlrolthe pullout of the threading Two-aXlS pullout is a gradual angular tool motion along
\001 at the thread end:
lwo axes, away fTom the thread (thread finishing ON). The
example 03807 is similar to [he previous example:
M23 Thread finishing ON (two axes)
03807
M24 Thread finishing OFF (one axis)
N45 (GSO X12.0 Z4.5) M23 (THREAD PULLOUT ON)
Other machine controls may have similar functions. The
N46 TOSOO M42
N47 G97 S4S0 M03
purpose of these funclions IS to enable or disable the aUlO- N48 GOO X3.2 ZO.25 T050S MOB
maric insertion of a pulloul mOlion between threading mo- N49 G76 X2.8978 2-1.6 IO KO.OSll D0140 A60
tion sequences 2 and 3, as described earlier in this chapter. P4 FO.0833 (or F/EO.OB3333)
Figure 38-15 i! luSlrales the comparison of the threadi ng NSO GOO Xl2.0 Z4.5 TOSOO M09
mOlion wilh and without the pullout. N51 M24 (CANCEL M23)
NS2 IDO
%
1- - - - -- .... - - - .- M23
d1 i In this case, M23 was applied in block N45 and an addi-
eional block NSI was used to cancel the pullout. The can-
J ~______~~~______ cellation was not necessary in this program. but il is a good
-.-- d '-- practice 10 cancel runctions used only for specific purposes.
There arc some conditions thaI apply to the M23 func-
I
d1 , , M24 tion. In Figure 38-15, the finishing distance d is set by the
control parameter, within the range of.1 OOx to 12.700x the
thread lead. Normal control setting is equivalent to one
times the thread lcad. The pullout {lngle from the thread is
usually 45°, or a little less because of a delay In the servo
Figure 38·15 system. If the finiShing distance dis greatcrlhan the pUllout
Tvpical miscellaneous functions for gradual thread pullout dislance dl, the pullout will no! be done.
358 Chapter 38

HAND OF THREAD THREADING TO A SHOULDER

Any thread can be cut in either the right hand or the left Programming a thread that terminates at a shoulder pres-
hand orienlalion, Neither selection has any effect on the ents a unique difficulty. The difficulty is the wall - heLler
profile andlor depth of the thread, but other factors are im- known as shoulder of the part. It is not enough lO program
portant. The majority of threading applications use the the end point for the thread reasonably - il must be pro-
righl hand thread. RighI hand and left hand terms relate to grammed exaCTly. Even then, a collision is possible if the
(he helix of the thread - Figure 38- f 6. tool setup is not accurate. The three typical problems in this
area of thread programming are:
o Recess groove is too narrow or non-existent

/ z- o Threading insert is too wide


o Thread is too deep
RfH THREAD::: M03
, t
I

I
.
I The first problem of threading towards a shoulder, a nar-
row width of the recess groove, is easy to correct - just in-
I I
crease Ihe recess width In the program. The majority ofre-
cess grooves can be adjusted for the threading tool, without
damaging engineering intent behind the deSign. 111is may
be ajustified case of 'overruling' the drawing - but check
first anyway!
The second and third problems may not be related, but
- ....... z+ the solution is usually the same for both. If the threading in-
sert IS too wide or the thread is too deep, try to increase the
LlH THREAD:: M03
recess wictlh first, if possible. If the recess width cant'lOt be
increZlsed. for whatever reason, then there is another choice
- to decrease the width of the threading insert. The obvious
solution is to change the threading tool for a smaller one
that can still cut the required thread deplh. This may be an
insert une size smaller, which usually requires a different
1001 holder as well.
Figure 38·16
Right Hand (top) and Left Hand (bottom) thread CUI using If a smaller tool cannOl be used. program for a modified
a right hand threading holder (reverse mounting) exis1ing threading insert. Modification in [his case means
The hand of thread is determined by two conditions: grinding off the portion of the insert that is in the way of
CUlling, without disturbing the portion Ihat actually re-
o Cutting direction of the tool ~z + or Z-) moves the material. Before deciding on the modification by
o Direction ofthe spindle rotatioll (M03 or M04) grinding, consider other options carefully - altering the
standard lools designed for CNC work should always be
These conditions are used in combinations to program a I he Insf r(".$orl, not \h(". :lIltomMic first choice A cO(lied in-
particular thread. The factors that it1fluence Ihe program- sert will loose its cutting advantages, if the coating IS re-
ming method for a R/H and L/H thread arc: moved by grinding. Be careful not lo grind off coaling
within the cuLling section of [he insert. In case the program
o Threading tool design - right hand or left hand does use a modified Ihreading inserl, a few suggestions
o Spindle rotation direction - M03 or M04 may help \0 do it with more insight.
o The cutting direction· Z+ or Z- Always use care with modified tools
o Tool tip orientation in the turret
• Insert Modification
Theoretically, either hand of thread can be cut with any
threading tool, but this approach is nOI right. A poor choice There is a number of standard threading inserts in every
affects the thread quality, life of the threading insert, addi· tooling catalogue and chances of finding one suitable for
lional costs Involved. etc. When a thread starts close to a the job at hand are good, In case a standard threading insert
shoulder (in a recess). Ihe clearance for acceleration is lim- needs modification, the follOWing example illuslrates a few
ited. The only method to prevent imperfcctlhreads due to programming considerations - Incidentally, it is irrelevant if
acceleration in a small area is [0 decrease the spindle speed. there is or there is not a recess groove on Ihe part.
SINGLE POINT THREADING 359

To modify a standard threading lnsert, look at its normal .750 - .100 .650
configuration firs\. Figure 38-17 shows a typical threading
insert with the known width Wand the amwlar 1enb Q
th A' ~
The minimum thread length in the illustration is only
lip radius or flat R, and an unknown angular height H. .620. There are no clearances and the length orthe thread is
too short. To solve Ihis problem, select a smaller sIze
threading
. .
insert if possible. If not, modification of a laroer
b
W -: Insert IS the only way.
The modification requires grinding of the insert in the
W = WIDTH OF INSERT non-critical areas, to allow the [001 to complete the mini-
=
A ANGLE LENGTH mum .650 thread length. rn theory, the minimum amounl to
R = TIP RADIUS OR FLAT be ground off the insert is .030, the difference between the
=
H MAXIMUM DEPTH required and the actual thread lengths. This modil~cation
does nol provide for any clearance at the thread shoulder or
at (he insert tip. Both of these clearances are essential for
-; A -<--
the best threading resulLs. Even a minor setup error on the
0
60 V-THREAD machine can cause a serious difficulty.
Figure 38-17 Always calculate the modification amounts, never guess them
Essential dimensions of a threading insert

In the example, insert dimension W is .250 and A dimen- In the example, there are three dimensions thai influence
sion is .130. The included angle of the threading insert is the amount of insert modi fication. The sum of all three will
60° and the insert flat or tip radius R is .012. not relevanl in be the amount to be ground off the insert. One, the thread
this casco The dimension H indicates the maximum thread length has to be extended by ,030 to achieve the .650 mini-
depth and is normally measured to the sharp poim of tile In- mum length. Two, the clearance from the shoulder will also
sen lip. It is calculated using a trigonometric function: be ,030, and three, the clearance past the (hread end will be
.020. The two last clearances are the arbitrary decisions by
H = A / tan30 the programmer. The solution is the total amount of the in-
H =
.130 / .577350269 sert modification being .080. In other words, Ihe amount of
H = .225166605 .080 must be ground off the original large threading insert.
H = .2252 That will shorten the original anglllnr length of 130 to the
length of .050. Always make sure the depth of thread can be
The problem is illustrated in Figure 38-18. achieved with the modified insert. The part program will
reflecI the modification in (he thread end position of the Z
0.25 axis, which will be wrillen as Z-O.S (setup position of the
insert does nol change), and IS illu.-;trated In Figul"p 38-19.

1
0.2252
I.()
!'-
r'- ..... co 0.25
o --- 0.67-
ci ...... -0.62 -- N I
N ---0.13
t 0.35
1 03.5 0.3011 '1
0.301 03.0
! 02.8978 - --0.05
,-- 0.75 .J
~-- - 0.75--
Figure 38-19
Figure 38-18 Modified threading insert provides enough clearance in the recess
Threading insert before modificalion does nul Iii ill the I!:IC!:ISS CJfl:!CJ
In threading, the rhread length is lhe aCllIa! lengrh of {he
The job is 10 program a thread WiUl a .100 recess groove full depth rhread. The part design often allows a little lon-
width, using an insert thaI has an angular length A of .130. ger thread, hut nOL shorter. The height of the shoulder IS
Tllis insert is not suitable for the job, as it cannot finish the also important. In (he example, the shoulder is .30 I I high
minimum full depth thread length - the difference between and the insert modification was possible. A large threading
the shoulder length and the recess width: insert may not always be modified and the only solution
will be to use a smaller insert size.
360 Chapter 38

• Program Testing OTHER THREAD fORMS


Whether a tlu·eading insert used is based on catalogue di-
mensions or a modified insert, threading \0 a shoulder pres- Allhough lhe standard V-shape thread with the 60° in-
en[s a time of anxiety for the CNC operator. when the first cluded lip angle is the most common thread form, it is by
part is produced. Since the reed rate ovenide and the feed- no means the only form. There are many threading forms
hold switches are disabled during (hreading, the program and shapes programmers encounter in machine shops, (00
verification on the lalhc will become more difficult. Even numerous to lis!.
computer based graphic testing methods may not show the
potential collision. As an example of a different threading form, look at an
ACME thread as a subject for discussion. In metric, there is
A simple, yet very elTective, thread program checkmg an equivalent thread. called the Metric Trapezoidal thread.
method is always available, right al the CNC lathe. 1l1is From the programming perspective, both threads are al-
method requires a skilled CNC lathe operator, who does most identical. ACME thread has a 29° included thread an-
understand both the program and the threading principles gie. Ihe metric trapezoidal thread has a 30° angle and some-
well. Knowledge of the operation panels is also important what different geometry definition.
This method employs several features found on the con- The main application of the trapezoidal type ulread is to
temporary CNC controls. The purpose of the program tes! transmit a motion. usually with a disengaging half-nut.
is [0 find out if the threading tool will collide with the part Certain types oflead screws for conventional lathes use this
shoulder before actual threading cut takes place. type of thread. The programming of a trapezoid threads
oflen requires a steadyrest, since these threads may be quite
The following sters are general in nature - adaptlhem to
long. An important consideration is the lead error accumu-
suit local conditions when testing the threading program:
lated over a long distance, discussed earlier.
o Use the SINGLE BLOCK mode and step through
the program until the thread start position is reached • Thread Depth
o Switch from the AUTO to the MANUAL mode - spindle Every thread has its formulas and mathematical relation-
stops and the threading tool is in the clearance area ships. There are two basic formuJas relating to an ACME
o Select the Xl screen display (absolute mode) thread depth. One is For threads of 10 TPI and coarsel; the
other for threads of 12 TIl and finer. For ACME threads 10
o Switch to the HANDLE mode ior the l axis TPI and coarser, the thread depth formula is:
o While watching the XZ position display, move the handle
in the same direction as the thread, until the tool reaches
Td :::: .500 x P + .010
the programmed Z value, or it cannot move any further,
whichever comes first
For the ACME threads J 2 TPl and finer, the thread depth
o If the tool reached the programmed l position first. formula is modified only slightly:
the tool setu p is safe for the thread ing
o If the tool just about touched the part, but has not yet
Td ::: .500 x P + .005
reached the programmed Z end position of the thread,
the tool setup needs adjusting by the difference between
the programmed pOSition and the actual position, plus
some additional clearance
Td = Thread depth
There are other testing melhods available, for example, to P = Thread pitch
use temporari ly the GO I linear modol! command, instead
of (he G32 threading command, without a part mounted in Olher threads in the trapezoidal group are Swb ACME or
the spindJe. a 60° Stub ACME. Programming trapezoidal threads is no
more dirlicult than programming any V-shape thread, pro-
In the non-threading mode, the feed overrides are effective, vlding the thread formulas and the geometric details of the
whereas in the threading mode, they are not! thread design are known 10 the programmer.
There OIlier threads that call be: encountered outside of the
By readi ng the CUTTen! tool posit ion on [he screen display 60° category - the Squ{lre threads, API threads (used in the
and comparing it with the programmed position, il will be petroleum mdustry), Buttress threads, Aero lhreads, Darde-
possible to know whether Ihe collision will happen or no\. let self locking threads, Round threads, Lebus threads (re-
Duri ng the test, the feed rate can be slowed down or stopped quire special control fcalures), and several olhers. Thread
anytime. The purpose of the program lest is to establish and threading data can be found in various tooling cata-
safe working conditions before the threading lakes place. logues and technical publicalions.
SINGLE THREADING 1

• Depth and Clearances


the previously established formula. the
for a tapered depth D of the thread used in the program will
nificandy di than that for a straight
motion i~ along two axes simultaneou~ly, nuher D .61343 / 8 = .0766788 = .0767
four basic motion steps are,
identical to those for a straight thread:
Motion 1 Rapid from the start position
to the thread diameter

Motion 2 Cut the thread (cutting along two axes)

Motion 3 from the thread

Motion 4 Return to the start position

to a slTaight thread, the only


for a tapered (hread are in
rhttprp1'I1'p<::

- Motion 3 and Motion 4 remain


Motion I, the starting tool position is rI,Q',;>,·F'r\ For a tapered tttl'ead, the towllength of the tool
orientation of the threading U'ave] along each axis, nOl Ihe thread length as per
an external or an internal drawing - this is no dil'Jeren{ than for a single axis thread.
The tool I ravel in the will be the combina-
external thread forms, the lion of the two plus the given thread
threading tool must always be length (along the Z axis):
of the Lhread. For internal thread
tion must always be below The .400 + 2.500 + .200 3.100
(mead. This is the same requirement as
but for a tapered thread it takes on an The next slep may not
lance. examples of a tapered the method of
p!ified drawing: in Figure 38·20. is used, both the start
thread will be
G92 or G76 is
~OTPF-8 and end diameter of
lance will
cycle and is lhe pan
amples were straight
01
• per Calculation
10 be calculated to establish stan
calculation method depends on the
and dimensioned In the
ng will show the dimensions
have to be calculated as pan
TPF = Taper per fool process, using one of two common methods.
TPI == Threads per inch
uses the
Figure 38-20 calculated by applying
Tapered thread example program 03808 other method defines as
is oflen confusing to an
The thread is defined Qverfllliengih (2')00), hy lhe Typic:!1 rallo;; are rlefinerl in the
fronl diameter of (1.375), by its angle (3.000 for example as I: 12, I: 16, etc., or
mches taper per pilCh (8 TPI). It is a single as amount of taper perfoot or,
start thread and Lhe rlrf\O'r<lm zero will be at the from face of raper per inch. Keep one rule in mind:
finished part. operations have been done
for the programming consideration for
this type of will the depth of [he thread.
362 38

A standard North American pipe thread is a good exam-


tapered thread. It is defined a taper raLio of I: 16. 12.0 - -
which is equivalent to a oj an inch per JOO! laper, mca- - 2.5-
on the diameter and to an axis. A pipe
may also be defined with a per side- 1,5
(Jlle degree, jorty seven minUleS, (weill)' seconds (plus
some leftover), or J. 7899 J0608 CNC
programming, the decimal
grees-minutes-seconds
reflect [his preference. To AN LE: A = tan (1.5/12)
a laper defined as the A 7.125016349
lowed by an

RATIO: 1.5 =:

in the ratio must be in the same ---'- = .3125


should be used in their lowest form of application
(1/4 of 2/8 or 4/16). For example, of 3 IlnilS
to 4 units may have these forms: Figure 38·21
Taper thread calculations clearances excluded
3 : 4 3 / 4

a taper definition, it means 01.8966


one axis, there will be 4 01.3750
01.2216
01.1216

0.2 ---.- 0.4


3.10
of a :5 inch taper per root is equivalent to a
because
Figure 38·22
3 / 12 1 / 4 .. 1 : 4 example 03808
Calculated values for the nrti,n,-"m

[n ng, weare only interested in


at the beginning and at the end • Block by Thread
can be done ei ther block threading, the taper thread programming is just
means of as' as programming a straight thread, simplify the
example, a straight infeed and nine threadi will be
for the IOlal depth or
.0767.
depths must be applied at both of
column lisls the depth of Ihread
umn lists the front thread diameter,
diameter. l1ie front
coordinate of ZO.4, the end
tions.
Front0 End 0
end diameters have
(he ratio of sides method. .0165 1.2420 2.0170
will actually be in .0145 1.2130 1. 9280
.0120 1.1890 1. 9640
type of selected program-
.0100 1.1690 1.9440
a block-by-block approach .0080 1.1530 1. 9280
depend on the thread .0060 1.1410 1. 9160
control features. .0040 1.1330 1. 9080
.0030 1.1270 1. 9020
.0027 1.1216 1. 8966
POINT THREADING 3

are to program 03808: X represents the current thread diameter allhe end
cut, Z is the end position of thread, I is the
03808 side between the diameter at the end and the
diameter at thesrart. I value must include an al-
- TAPERED THREAD) (only
G50 X12.0 Z4.5) direcrion of the tapcr in this case a"''''''''>''''''''
N46 TOSOO M42
N47 G97 S450 M03 value. Program 03809 will cut a tapered thread
N48 GOO X2.S ZO.4 TOS05 MOB threading cycle.
N49 XL242 1)
NSO G32 X2.017 Z-2.7 FO.125 03809
NSl GOO X2.S
NS2 ZO.4 (Gn - TAPERED
NS3 XI.213 2) (N4S GSO X12.0 Z4.S)
NS4 G32 Xl. 988 Z-2.7 N46 T0500 M42
N55 GOO X2.S N47 G97 S450 M03
N56 ZO.4 N48 GOO X2.S ZO 4 TOSOS MOB
NS7 xl.la9 (PASS 3) N49 G92 Xl.01? I~O.387S Z-2.7 FO.12S
N58 G32 Xl. 964 Z-2.7 NSO Xl.9SS
N59 GOO X2.S N51 Xl.964
N60 ZO.4 NS2 Xl.944
N61 Xl.169 4) NS3 Xl.928
N62 G32 Xl. 944 Z-2.7 NS4 Xl. 916
N63 GOO X2.5 NS5 Xl.908
N64 ZO.4 NS6 Xl.902
N65 Xl.1S3 NS7 Xl.8966
N66 G32 XL 928 Z-2.7 NS8 GOO Xl2.0 Z4.S Tosoa M09
N67 GOO X2.S N59 lo00
N68 za.4 %
N69 XL 141 (PASS 6)
N70 G32 X1.9I6 Z 2.7 taper inclination is
N71 GOO X2.S ence between of 1.8966 start dia-
N72 zo. 4- meter of 1.l216, by 2. The result
N73 X1.133 (PASS 7)
N74 G32 Xl.90S Z-2.7 (1.8966 - 1. I 2 :::; .3875
N75 GOO X2. 5
N76 ZO.4 This] value must have a directional LO mdi-
N77 X1.127 8)
N78 G32 X1.902 Z-2.7
cate the laper orientation (its direction from point).
ID9 GOO X2.5 Inthe IheI value will be negative lhcslart
NBO ZO.4 is below the end diameter of the taper
N81 Xl. 1216 (PASS 9) rear lathe. In the the entry
N82 G32 X1.8966 Z-2.7
NB3 GOO X2.5
N84 ZO.4 • Tapered Thread and a Multi Cycle
NBS GOO X12.0 Z4.S Tosoa M09
Na6 M30 tiple repetitive threading cycle G76 cycle re-
% I no! ro be a zero. if a tapered thread is cut.
in the cycle specifles the difference per side. so
a straighl infeed and is used for dislance, as well as the direction between the
will not change very if a com- start diamecer of the
pound is used and/or the pullout from the
thread. Of course, more calculations will that the X diameter is programmed at
thread and the I supplies the taper
• Tapered Thread Using a Simple Cycle inclination (taper ratio side). CNC
axis direction
cycle, the thread taper is programmed an IIlcreaswg
1 value. wilh specified direction from the end I value, and a will reqUire a
starl diameter: I value. The I value is always a single value, measured
not a diameter 38-23 illustrates
for rear lathes.
364 Chapter 38
- - - - - - - ._- - ..-----..----.-..•-----

j X+ These tools are the thread stan position and the thread
""0 t
C ro
....... feedrale calculations. Figure 38-24 shows symbolically the
(])
--- ..... Z+ (j)
views of the thread cross sections and tbe end views.
N N

1
0X External
1-

0X Internal

-<t-
Figure 38-23
Tapered thread inclination direction I used in G76 threading cycles
/ . --.~
The basic G76 cycle will be maintained but the I value
will be added - a non-zero value must be programmed: • r-.
l I \

03810
,~.---/' 90°
(G76 - TAPERED THREAD) Figure 38-24
(N45 GSO X12.0 Z4.5) Representation of mullistart threads (dots indicate thread starts)
N46 Tosoa M42
N47 G97 S450 M03 In the illustration are four examples of the cross sections
N48 GOO X2.S ZO.4 T050S MOB (left) and the end views (right) of a single start thread (LOp),
N49 G76 Xl.8966 Z-2.7 I-O.3B7S KO.0767 D0140 double start (one below), triple start (two below) and a
FO.125 quadruple start (Ihree below).
NSO GOO X12.0 Z4.5 TOSOO M09
NSl mo Although the examples are represented only symboli-
% cally, the thread pilch lS maintained in all examples. Also
note (he equal distribution of each thread start, represented
If this method can be used for threading. 076 cycle is the
by the. heavy dots. Each angle value is the angular spaclng
best choice. It offers the fastest program generation as well
of individual starts, when the threaded part is viewed along
as the best opportunities for on-machine editing.
Its center line. The spacing is automatic and only the cor-
reel shift value from one thread start to the next has to be
MUlTiSTART THREAD programmed, in threading mode .

Mostlhreads have only one start, suitable for most appli- • Threading Feedrate Calculation
calions. The most common purpose of a multistarlthread is The threading feedrate is always the lead of the thread,
to transfer a precision moLion very rapidly over a relatively never the pilch. For a single start thread, the lead and the
long distance. Note (he word precision - a coarse thread can pitch have the same value - for a multistart thread, they do
also be used to transfer a motion rapidly, bUI with very little
not. Take a single start thread of 16 TPI. Here, the lead and
preciSIOn. An example of precision multistart threads are
(he pi(ch are both .0625, so the feedrate is FO.0625. If the
some internal designs of some camera zoom lenses. drawing spec! fies lhe thread as 16 TPI, but indicates a dou·
For programmers, there are some unique considerations ble start, (for example 3.0-16 TPI 2 START), that means
for a mulristart thread. II IS important that the start PO&ilion the pitch of the thread will remain unchanged (.0625). but
for each thread is in such a location, [hal when viewed from the lead of {he thread will double to .1250. Therefore, the
the thread end of the screw or the nut, each start on the cir- programmed feed rate for the double start Ihread with the
cumference will be divided in equal angular increments. pilch of .0625 will be FO.I25. The multiplication of the
Also imponanl is to maintain the equallhread profile when pitch will always depend on the number of thread starts.
viewed from the thread cross section. To achieve these con- That means a triple start thread will have the feedrate Lhree
ditions, two programming lools are available. tj mes the pi tch, quadruple start thread four limes, and so on.
SINGLE POINT THREADING 365

• Shift Amount
Fecdmte is nOllhe only consideration for programming a
thread with two or more srarts. The olher, equally important
factor, is Ihe programmed amount of [he tool point shift.
if! will guanmlee that each start will be in (he rroper
relationship 10 all other starts. When one thread i~ linished,
the sLarLing position of the (oot has to be shifted (in Z axis
only), always by Ihe pitch amount. The formula for the lool
shin amount will be:

PITCH
LEAD
-- The shirt has 10 be programmedjor each slart above the
first one. That means the number of shifts in the program is
Figure 38-25
the one less Than fhe number of slarfs:
Relationship of the pilch and the lead of a double start thread
Number of shifts = Number of starts - 1
In Figure 38-25, the relationship of pitch and lead of a
double start thread is shown, The same logic Iha! applies to
Note Ula! the formula is valid even for a single star!
a double start thread, (llso applies to triple, quadruple, etc
lhread, but there is no shi ft required (1 - I == 0).
threads. The feedrate calculation is identical for all threads:
A few methods can determine when the tool shift is to be
Number of starts programmed. 'He first method, for a double start thread, is
Feedrate to program one thread Lo ils full deplh, then shift out ancl CUi
TPI Ihe second thread to its full depth. The second method, for
lhe same thread, is to cut one pass of the ti.rsLlhread, shift
Figure 38-26 shows Ihe relationships of the pitch and Ihe oul. cut the same pass for lhe second lhread, shift in, cut the
lead for some common lTIuhistart threads - Ihe samc second pass for the first Ihread, shift OUI again and repeat
pitch-lead relationship is mainlained proponionalely. the process unlil bOlh threads are completed [0 the full
depth. This approach applies to any number of starts.
O.5P -
I The obvious advantage to the first method is the ease of
programming. On the negalive side, if the 1001 cutting edge
wears out on the firSI thread, the second Ihread will not be
as accurate. The advantage of the second method is thal the
(001 wear will be equally distributed over bOlh threads, al-
Ihough the programming will require Ii 101 more effort,
which presents the negalive side. Additional problem is
lilat in many hard materials, the thread edge life may suffer
p
from extensive malerial removal.
a
P 1.5P To illustrate a sample rnultislart thread applicarion. thc
following general thread specifications will be used
o The number of threads per inch is twelve (12 TPI)
(J The number of starts is two (double start thread)
o The thread is cut as external at 3.000 nominal diameter
o The calculated thread depth is .0511 (.61343 / 12)
-.-- 2P 3P
o The number of passes will be seven (for G92 cycle)
c
Figure 38-26 Although the block-by-block programming method G32
can be used ror special applications, acceptable results can
Mullistart threads - pitch and lead relationships:
he achieved in many threading applicalions by using (be
I a) Single start thread Lead "" Pitch = 1P
G92 or G76 cycles, with less programming, as well as the
I b) Double start thread Lead = 2P
( c) Triple start thread Lead = 3P gain or easier editing at the machine.
3 Cha 38

• Application Example N60 G92 Xl. 944 Z-2.7


N61 GOO ZO.525
The iou~ lhread with 12 TPI on a N62 G92 Xl.944 Z-2.7 (T2
bUl as a double sian thread. The number N63 GOO ZO.4
seven, with the same depths a.s r51 program N64 G92 Xl. 928 Z-2.7
1 I shows the completion or one thread before the other N6S GOO ZO.525 1)
i~ FO.2S, no! FO.1 In comments. P is N66 G92 Xl. 928 Z-2.7 (T2 PS)
T is the thread or second: N67 GOO ZO.4 (START 2)
N6B G92 Xl 916 Z-2.7 (T1 - P6)
N69 GOO ZO.525 1)
03811 N70 G92 Xl. 916 Z-2.7 - Po)
N71 GOO ZO.4 2)
2 - DOUBLE START THREAD 1)
N72 G92 Xl.908 Z-2.7 - P7)
GSO X12.0 Z4.5) N73 GOO ZO.525 (START 1)
N46 TOSOO M42
N74 G92 Xl.90B Z-2.7 - P7)
N47 G97 S450 M03 N7S GOO ZO.4 (START 2)
N4B GOO X2.5 ZO.4 TOS05 Moa ( - - - THR.EAD 1)
(Tl - PI) N76 G92 Xl.902 Z-2.7 (Tl - P8)
N49 G92 X2.017 Z-2.7 FO.25
N77 GOO ZO.525 (START 1)
NSO Xl. 988 (Tl - P2)
N7e G92 Xl. 902 Z-2.7 - pe)
N5l XL964 (Tl - P3)
N79 GOO ZO.4 (START 2)
NS2 Xl.944 (Tl - P4)
(Tl - PS) N80 G92 Xl. 8966 z-2.7 - P9)
NS3 XL928 NSl GOO ZO.525 (START 1)
N54 XL 916 (Tl - P6)
(TI - P7) N82 G92 Xl.8966 Z-2.7 (T2 - P9)
NSS XL 908 Ne3 GOO X12.0 Z4.5 TOSOO MO.9
N56 Xl.902 (T1 - P8)
N84 M30
N57 Xl. 8966 (Tl - P9)
%
N58 GOO X2.S ZO.52S (--- THREAD 2)
N59 G92 X2.017 Z-2.7 (T2 - PI)
N60 Xl. 988 (T2 P2) cycle and GOO molion
N61 Xl.964 (T2 - P3) reason ror the G code repel
N62 Xl.944 (T2 - P4) remams In is the FO.2S is program-
N63 Xl. 928 (T2 PS) med only once for each example.
N64 Xl..916 (T2 - p6)
N6S Xl. 908 (T2 - P7)
N66 Xl.902 (T2 - P8l
THREAD RECUTTING
N67 Xl. 8966 (T2 - P9)
N68 GOO X12.0 Z4 5 TOSOO M09 checked for quality
N69 IDO the pan is removed Once the pan
%
is removed, any subsequent reclamping will need a great
This version can efTon in order 10 recut the thread. The lirsl Ihreading pass
will start al a random the cylinder circumference.
mg cuts of the first
In ~program 03812.
subsequent aUlomatically synchronized
10 start at As long as [he threaded re-
will be evenly
maillS is assured.
03812 There are I wo
(G92 - DOUBLE START THREAD - 2)
(N45 GSO X12.0 Z4 5)
N46 TOSOO M42 chining, even rOf (he
N47 G97 S450 M03 after removal,
N48 GOO X2.S ZO.4 TOS05 MOS (--- THREAD 1)
N49 G92 X2.0l7 z-2.7 FO.2S (Tl - PI) 1. Reclamp the threaded part to run concentric w/spindie
N50 GOO ZO.525 1) 2. Set the X axis large enough, so the
NS1 Gn X2.0l7 Z-2.7 (T2 - PI) tool moves above the thread (external threading) or
N52 GOO ZO.4 (START 2) below the (internal threading)
N53 Gn Xl. 988 Z-2.7 (Tl - P2)
NS3 GOO ZO.525 (START 1) 3. Visually the threading tool tip with the thread
N54 G92 Xl. .988 Z-:L 7 (Tl P2) already <:1'"....1>"",,, (only as accurate as one's eye)
N55 GOO ZO.4 2)
in the air while carefully
NS6 G92 Xl. 964 Z-2 7 (T1 - P3) tool will eventually recut the
N57 GOO ZO.S2S 1)
N58 C92 Xl. 964- Z-2.7 - P3) Thread should be prevented. difficulty 10
N59 GOO ZO.4 2)
is the major quality concern.
SUBPROGRAMS

Each program must have its own rl.rr,nr""""


stored in the control memory. The
M code function to call one program
program thal calls another
g ram, all other programs arc called
program is never called by a subprogram - It
lOp level of all programs. can also
from other subprograms, up \0 a cerlnin of
levels. When a program containing
always selec! Lhe main program, never the
The onl y lime a subprogram is selected on the
editing purposes. In some reference materials, subpro-
grams are also called subrouflnes or macros, but the term
subprogram is used most often and the word macro could
and less prone to elTors. a different meaning altogether.
programming are
and custom macros. This • Subprogram Benefits
development and applications of
cienl program preparation use frequently programmed order of instructions or un-
block sequences, can benefit from becoming a
subprogram. Typical applications for subprogr3m applica-
MAIN PROGRAM AND SUBPROGRAMS in CNe programming are:
0 Repetitive machining motions
A CNC program is a
different tools and 0 Functions relating to tool change
two or more repetitive
0
changed from a single
rale programs. Each 0 and threads
once and called when
0 Machine warm-up routines
subprograms. Figure shows a
pealed at differenl locations. 0 Pallet changing
0 Special functions ... and others

Structurally, subprograms ure similar to standard pro-


000 use the same syntax rules and look and the

°0
o
000
0
0
, it may not be easy to see the difference be-
program and a subprogram at a casual
''''''.rr''''·''....., can usc the absolute or incrementa!
Subprograms are loaded illto Ihe
IYlt>'rrlrw\ljust I programs. When
several benefits:
000

°0°
° 000
0
o
o
o
.. ",,,,;;!,rn
length reduction
I!ffur rl!uuctioll
and
o Quick and easy n\"rhW-",t,,,n,,
Figure 39-1 No( the benefits, but
Example 01 a part requirement suitable to be used as a subprogram a reason to use subprograms.

367
368 Chapter

• Identification of Subprograms For example, a includes


application of subpro- the M98 function
isolation of repetitive pro-
N167 M98 P3951
next six program
Ul""'illL" zero return for a typical hon-
In block N167, the
at the start of program: CNC memory, to
defaul~ depending on
N1 G20
stored in the control
N.2 G17 G40 G80 (STATUS BLOCK)
N3 G91 G28 ZO (Z AXIS RETURN)
N4 G28 XO YO (x AND Y AXES REroRN)
N5 G2B BO (8 AXIS RETURN)
N6 G90 (ABSOLOTE MODE)
N7 •••

a typical sequence of commands


repeatf:d evely time a new program for that ma-
a program may be written many
each time repeating the same sequence of in- N460 GOO X28.373 Y13.4193 M98 P3951
possibility of an error, the
blocks can be stored as a separate executes rapid motion fIrst, then it calls the
by a unique program number. Then, order of words in a block makes no dif-
at the top of any main program. This block
"' ...r'rr .. '>'""'........,,., will become a subprogram -
or an extension of the main program. N460 M98 P3951 GOO X28.373 Y13.4193

'="'''LUI,",U~ order as if the tool motion


SUBPROGRAM FUNCTIONS looks illogicaL

A subprogram must be recognized by the control system • Subprogram End Function


a~ a. un~quetype ofprograrn, not as a main program. This
main program and the subprogram coexist in
distmctton IS accomplished with two miscellaneous
must differ by their program numbers.
nonnally applicable to subprograms only:
V,""..o;)lUi=.. they will be treated as one continuous

StlIllctH)D must be made for the program end


M98 Subprogram call function HU,'''W\JU as well. end of program function is M30 aI,
M02. The subprogram must be terminated
M99 Subprogram end function
Faouc uses M99 for that purpose:

The subprogram call junction M98 must always be 03951 Subprogram start
by the subprogram number P--. TIle subprogram
M99 telmmates the subprogram ann the
, back to program it originated from (a Subprogram end
or a subprogram). Although M99 is
it may also be rarely in
.... ;J.''''"Ll..l'. the M30 function. In this case, When a subprogram tenninates, the returns the
will run 'forever', or the Reset processing to the program of origin it will not terminate
the program - that is the exclusive function M30 .
• Subprogram Call function Additional parameters may also be added to the
subprogram end, for example a block skip code, a block
The function M98 calls a
number to return to upon exit, etc. Note that the stop
program from another program.
(the % sign) is used in the same manner for a
block, it will result in an error. M98 is an
~rog~ as for a main program. The subprogram termina-
tion - it requires two additional T".<>,•., .....''''~t>T"<
tlOn 1S unportant and must always done right. It
pJete, therefore effective:
two important instructions to the control
o The address P identifies the number
o To terminate the subprogram
o The address L or K identifies the number of subprogram
repetitions ( L1 or Kl is the default) o To return to the block following the subprogram call
3

use the program end function M30 (M02) to In represents block


nate a subprogram - it will immediately all program completed subprogram.
and reset the control. The in the program of
program execution program contains these
that contains it.
(MAIN - PROOR1I.M)
subprogram end returns
immediately following the subprogram call N67 M98 P395:2
is illustrated in 39-2 (without N68
described next N69 .. .
IDO .. .

and the , ,y..., ,/ is terminated by

03952 (SUB)

M99 P70
%

the calling program processing will continue


N70 block (the main the example), bypassing
blocks N68 and N69. kind of application is not
suitable type of work, in addition 10
'"'ULlLl .... "

lln(1~,,:t~r\(hrI0' ofsubprogramrning

M30
%

Figure 39-2 programming method


Flow of a program with a single subprogram is an item to be explored
associated applications
• Block Number to to tools, such as a combina-
the s lash code t.
function is
as the last instruction in • Number of Subprogram Repetitions
are no other commands
M99 function causes the subpro- A very important subprogram
its execution to next or K, depending on the control
from. For example, number of subprogram ..."....""h'hr.M
h",."n.rr...,...,.,. has to be _,..""f,,1i processmg re-
N67 M98 P39S2 sumes in the original nrCII!nm1. most programs, the
N68 subprogram will be the original pro-
N69 __ _ will continue.
N70 ...
that require a subprogram repetition
executes block 03952. proceeding with the rest original program are
the subprogram common. To compare, a single use of the subprogram
the original program CDrltmues processing instructions could be called up from the of origin as:
from the block N68, block to return to.
N16? M98 P3952 Ll (Kl)
Special Applications
ll1is is a correct program. but
For some special applications, it may be necessary to not to be programmed at
specify a different block number to return to, rather than us- control unit defaults to
. the next block default. If programmer frods this
tion useful for certain jobs uses this technique, the P
dress must be included in block:

M99 P •. N167 M98 P3952 Ll (Kl) is idelllicaJ 10 N167 M98 P3952


370 39

Note -In the fol/owing examples, substitute K every There are some good reasons.
llisted, if required by the control system. five hole pattern has to be spot drilled,
Number of repetitions for some control
tween LO and L9999 and the L address other
always be programmed. Some programmers
block:, even for a single repetition, rather than "Aunt,..,.,.
3.0 TYP --1---1 1.0
the default conditions of the control The
personal preference.
Repetition Count Variation --0/--
controls do not accept the UK as
H'-"ULI',,' of repetitions and use a different format. On
a single subprogram call is the same: I

N342 M98 P3952


2.0 <D-"?
I
block calls the subprogram only once, as no special 5/8-12 TAP (5)
has In order to repeat the subprogram
of programming

N342 M98 P3952 L4 (K4)


dra wing used for a subprogram development
nwnber of repeats directly after programs 03901, 03902 and 03953
in a single sta tement:
cycle is used 0.2
For the tap drilI, GS1
N342 M98 1.'43952 islhesameas N342 P00043952
i 2 tap. G84 cycle is
is identical to the other version - the subpro- hole for drilling and makes a
\;.j..!~~<l.l\A.1 four times. The first four drill will be 35/64 drill (00.5469),
the last four for 5/8-12 tap:
For example,
03901
1 - 90-DEG SPOT DRILL - 3/4 DIA)
M98 P3950 is M98 00013950 Nl G20
N2 G17 G40 G80 TOl
subprogram 03950. In N3 M06
times, program N4 G90 GOO G54 X2.0 Y2.0 S900 M03 T02
NS G43 HOl Zl.O M08
M98 P390050 or M98 P00390050 N6 G99 GS2 RO.l Z-0.327S P200 F3.0 (LL HOLE)
N7 X8. 0 (LR HOLE)
N8 YB.O (OR HOLE)
does not change for
N9 X2.0 (UL HOLE)
the 0/16/18120121 controls - it is represented by the first mo XS.O Y5.0 (MIDDIJ!: HOLE)
four to the of 9999. N1l GSO Zl.O M09
Nl2 G28 Zl.O MOS
M98 P99993952 Nl.3 MOl

repeats the 03952, nine thou- (TOOL 2 - 35/64 J..Jfi..,I..JI..L.I..I}

sand, nine hundred the maximwn Nl.4 T02


number of repetitions (some old models may Nl5 M06
have the maximum Nl6 G90 GOO G54 X2.0 Y2.0 S840 M03 T03
Nl7 G43 R02 Zl.O MOS
Nl8 G99 GSl RO.l Z-1.214 Fll.O
• LO/KO in a Nl9 X8.0
counter than mo Y8.0
N21 X2.0
is a common application. N22 xS.o Y5.0
the form N23 GBO Zl.O M09
Dro'f!TlllnmeO'! Would N24 G28 Zl.O MOS
N25 MOl
SUBPROGRAMS 37

(TOOL 3 - TAP) (TOOL 2 - 35/64 DRILL)


N26 T03 mo MOe;
N27 M06 ml T02
N2S G90 GOO G54 X2.0 Y2.0 S500 M03 TOI Nl2 G90 GOO G54 X2.0 Y2.0 5840 M03 T03
N29 G43 H03 ZI.O MOB N13 G43 H02 Zl.O MOS
N30 G99 G84 RO.4 Z-1.4 F41.0 m4 G9S G8l RO.l Z-1.214 Fll.O LO
N3I xa.o N1S M98 P3953
N32 YS.O N16 G28 Zl.O MOS
N33 X2.0 N17 MOl
N34 x5.0 YS.O
N3S Gao Zl.O M09 (TOOL 3 12 TAP)
N36 G28 ZI.0 MOS NIS M06
N37 G28 XS.O YS.O N19 T03
N38 IDO N20 G90 GOO G54 X2.0 Y2.0 S500 M03 TOl
% N2l G43 H03 Zl.O MOS
N22 G99 G84 RO 4 Z-1.4 F4l.0 LO
type of program uses XY coordinates for N23 M98 P3953
tool (spot drilling, drilling, In order to make N24 G28 Zl.O MOS
the program more all blocks of Ihe pro- N2S G28 XS.O YS.O
will be collected into a subprogram and much N26 M30
%
more efficiently. Here IS (he pattern of holes from
the long program thal also' I.OM09, as In the program, 1001 molion for each cut-
Ihe sr3ndard end of any acrive fixed ting 1001 will cutler ailhefirsl hole of the ma-
chining pattern. All in the program start at
X2.0 Y2.0
the first hole of the firsl hole definition is
X8.0
YS.O included in the as well as in the main pro-
X2 0 gram, program LO in call is mandatory, else
X5.0 Y5.0 Ihe firs! hole of the pattern wi II machined Iwicc. This is a
Gao Zl.O M09 classic application of the relating to fixed cycles, but not
subprograms. Also in subprogram 03953 can be
Ihe siandard machine zero return block G28Z1.0M05. as it
it imo a main program repeats after each M98 ! in the main program 03902.
repeating machll1mg pallern. This practice correct but not recommended. as illacks in a
of all five holes in the pattern are included: clearly structured program.

03953 (SUBPROGRAM)
HOLE PATTERN) SUBPROGRAM NU
m X2. 0 Y2. 0
N2 X8. 0 track
N3 Y8. 0 keeping track of
N4 X2. 0
NS xs.o YS.O
to know exactly what
No G80 Zl. 0 M09 they are used, what is purpose. A subprogram
N'7M99 may be used In many other proper subpro-
% identification technique is important.

can be called from the main program, in Conlrol unit directory of not distinguish
a new program 03902. The LO program numbers and numbers. The
Lhe first hole: control system recogni7es a only by it,
programmed format, the M98, fol-
03902 PROGRAM) lowed by {he P. subprogram
(TOOL 1 - SO-DEG SPOT DRILL - 3/4
NJ.G20 Alllhis means thatlhe
N2 G17 G40 GSO TOI programming level, not at
N3 M06 It is the programmer's responsibility, not
N4 GSO GOO G54 X2.0 Y2.0 5900 M03 T02 to subprogram numbers.
NS G43 HOI Zl.O M08 great flexibility in organizing (he
N6 G99 G82 RO 1 Z-O.3275 P200 F3.0 LO identification - in fact, any programmer can (lnd set
N7 M98 P3953
basiC rules and related Many of the
N8 G28 ZLO MOS
N9 MOl
rules governing the format of main also apply to
subprograms. Remember these four main
372 39

o If used in a the program number is called from any program, main or


commonly by the letter O. followed by four without a fear of duplication or iii
or five digits. on the control system mismatch.
o If used in a the program number can be specified
by the colon commonly: for the ISO format.
should always be documented in some
followed by up to four or five digits, depending book. complete with detailed descriptions,
on the control setting rrom all of origins. This way, the
needed, often at a short
o The main program - a or: - cannot be which they have been
negative or to zero allows to organize all the
o The subprogram number cannot be negative (i.e., 1000, 2000, 3000. etc., or I J
or equal to zero the type of CNC machme, the
of machining
WIthin the allowed
programmers have to have assigned program
1$ U'AA.U"- TI1e program number assigned to
does not IS together with the M98 function and
program Such a combination of the two words, M98
On the , is !he minimum requirement for a subprogram call
another
firsl is [0 gel or-
is even more Important if the subprograms
(early in [his chapier) of the
a lour axis vertical machining cen-
are designed 10 up by otlIe r programs at dlr
ferem rimes. There IS no one method, but some proven can (with an assigned
suggestions offer an how to npproach the subject of representing all needed commands -
program numbering and a personal approach. or 021 is not included:

For example, in this handbook, all main are 03954 ZERO o~'~nJM\

numbered consecutively, with two digits corre- mOl G17 G40 G49 GSO
Nl02 G91 028 ZO
sponding lo the chapler the merhod
N103 G28 XO YO
also applies to subprograms, are arbi- Nl04 028 BO
trarily increased by fifty. for will be the N105 G90
third subprogram example in the Cmlp{(~r N1.06 M99
this method 10 any reasonable %

• Organized Approach The units selection should used in the main program,
for nexihilily. One(', (he zero return subprogram
The suggested programming approach is has heen designed into the memory, every main
understanding that Ihe CNC memory is lIot program can start by calling the 03954:
media for all part programs made.
memory capacity is always limited. Alone point, this Imil 03903 (MAIN PROGRAM)
will be reached and there will no more lefllo ac- (PART ABC-123)
commodate more programs. A good program ization Nl G20 Units
is one Ihal uses tbe CNC system memory only the cur- N2 M98 P3954 :Jut'orc'lZmm 03954 call
rent program, perhaps a few more that are to soon.
N3 GSQ GS4 GOO X" ,;{,.
If the unique program number is assigned the machine N4 .. _
rool operaro)' during selup, the Situation some COIl-
trol as welL On some controls, the main number <., IVlnn7117JJ"" ••. >
on {he written copy will not always load automatically, so It
is nol Iy needed. That means, If an '
N45 IDO Main end
with shop supervisor lhal the CNC
usi!!g ouly three %
numbers 1-999; then there will num-
the execution of the lwo
I subprograms, This available
for mosl manu system, follow all operational
an presents a good control over program execulion. DUring the program
whose numbers selected. All four-digit the control system will follow rhe following
lions (instructions):
can be documented, and
SUBPROGRAMS 3

1. Set program number 03903 as the 06200 (SUB 2)


current program number
N6201
N6202
2. Oisplay comment on the display screen
N6203 ... t:/./Idsool1
3. the units of measurement (inches in the example)
method works only with the maximum of one hun-
4. Branch out to the top of subprogram 03954 blocks, suitable for many subprograms.
il (0 monilor a program with
5. ... A<, ...... ,O:; all blocks in the subprogram 03954
This not a foolproof method for all but
6. When M99 is processed, the subprogram ends idea will work for most jobs.
and returns to the main program
• Protected Subprograms
7. main program is processed, beginning
with the block N3

S. When M30 is processed, the main program ends


and returns to the beginning

9. When the CYCLE START switch is activated,


1 to 8 are reOleatl~d it may halt
On the use of
As the main program uses
men is of I, the subprogram uses increments of I, but
startl ng with N to 1 block number. There are lwo reasons this potential problem by allow-
for it. The reason is that a properly designed of a certain specified series of program
gram will not to any major can be locked up by a system parameter set-
there should extra blocks a typical example, a program number series 9000
reason thin the of 09000 to 09999), will nOl display on
duplicated sequence con!rol screen, locked by the syslem
display screen. The in lhis series cannot be edited or rrinted
will quickly inform the locking parameter is not set, the programs
the main program or a subprogram normally, like any other program. In
controls are very forgiving about of this feature to protect some Im-
and allow idcntificmion of block se- from umlUthorized editing or even
within a range. documentation for further
To illustrate the concept, here is an example. Tn
a simple application, a main program calls a single SUBPROGRAM DEVELOPMENT
subprogram, there should no rroblcm in block number-
lng. Even if the are duplicaled in both developed, it must be well
lhe main program and it is not likely there most common applica-
will be any confusion. hand, when several paUern of machining,
subprograms are same main program, the ability to recognize the ma-
duplicated block numbers during the main program in a subprogram.
processing, as well as are processed.
Such a situation may operator to the ex- • Repeating Recognition
tent of losing track of what is really in the con-
trol system at any This pattern is n mancr of
when writing a con-
To avoid this problem, unique block ventional program by block Visually scan the writ-
numbers to each a duplica- ten copy firs!. If there are repealing clusters of consecutive
tion. One method is to numbers in blocks containi same it is a very good reason 10
the hIgh thousands series, 100, 06200, evaluate Ihe program more and possibly develop a
06300, etc. the block in a subprogram subprogram.
can be based on the subprogram example:

06100 (SUB 1)
N6101 experience
N6102 su bprogrums at
N6103 ... and so Oil However, for a
374 Chapter 39

is no damage done by developing the long program firs!. It Subprogram 03955 contains this paltern and uses the L
lakes more time and it is not efficient. However. this is how address (0 establish [he number of fixed cycle repeats. In
a professional experience is gainC{j. With limited experi- the first main program 03904, the tool motion precedes the
ence, be willing [0 re-write a program from a single long subprogram block. To sran the program development, con-
form to a main program and one or more subprograms. centrale on the hole pattern. First, selectlhe G91 incremen-
Programmer should be able to identify those sections of a tal mode for the pattern. Then program the X and Y incre-
long program thal can qualify as subprograms. Once such a mental values, starting from any hole, such as the lower left
series of repetitive data is identified ill the conventional hand corner and continue in one direction - Figure 39-6.
program, it is only a maner of small adjustmcl1ls La separate
these repetitive clusters and define them as subprograms .

• Tool Motion and Subprograms


One of the most C0l110100 subprogramming applications
is a lool path machi ned at di fferen! locations of the part. For
example. a tell hole rectangular pattern needs to he pro-
grammed - Figure 39-4.

MAIN PROGRAM
-' 0.75 (3)

"-...'" :: SUBPROGRAM REPETITION


8000
t
0.60 (2)
o 0 Figure 39-6
Subprogram 03955 processing flow
r OpOO 03955 (SUBPROGRAM)
(FOUR-CORNER LOCATIONS)
100.407 N551 G91 XO.75 L3
10 PLACES N552 YO.6 L2
0.50 DEEP NS53 X-0.75 L3
N554 Y-O.6
N555 M99
Figure 39-4
%
Detail of the hole pattern used in program 03904
llle subprogram is designed Lo machine nine holes in a
This hole pattern is repeated at four specified locations of rectang\llar pnHern. The rcnlh hole - ac(ually It is the firsl
the part, as illustrated in Figure 39-5. hole - is mach ined in a block with the cycle call or the rapid
motion. The four pattern locations are not included in the
subprogram - they must be included in the main program.
Since the main program is using absolute mode G90, the
individual local ions can be established:

03904 (MAIN PROGRAM)


(FOUR-CORNER PATTERN)
m G20
N2 G17 G40 GSO
N3 G90 GOO G54 XI.8S YI.25
N4 G43 Zl.0 S350 M03 HOI
N5 G99 GSl RO.l Z-O.269 F3.5 (LL HOLE 1)
N6 M98 P3955 (LL PATTERN)
ill G90 X6.2S Yl.88 (LR HOLE 1)
N8 M9S P3955 (LR PATTERN)
N9 G90 X6.25 Y5.0 (UR HOLE 1)
mo M98 P3955 (UR PATTERN)
Nll G90 Xl.S8 YS.O (UL HOLE 1)
Nl2 M9B P3955 (UL PATTERN)
Nl3 G80 G90 G28 Zl.O MOS
Figure 39·5 N14 G91 G28 XO YO
Hole pattern layout for program examples 03904 and 03905
(both using subprogram 03955)
SUBPROGRAMS 375

Only one cutting 1001 was used for this other M98 P . 0 ..
tools will follow the same ml This
method of the last example is more common - in the abso· D can changed anytime
lute mode from Ihe maln program, tool is positioned at is wifhout Change to the subpro-
(he lower len hand corner of Ihe pattern hole of mel hod is useful jf the con-
tht:: is driHt!U allilal locutiun. lour {)Vo or more different offset values, but i I
is called and (he remaining nme not work on all controls. Here is the contenl a simple
positioning contouring , with embedded D offsel. 1 set-
ting value is to the cutter radius:

03956 (CONTOUR SUBPROGRAM - A)


way, particularly useful for a number of NS61 G41 GOl XO 051 F10.O (D .. INCLUDED)
is to combine [he rapid motion to the N562 Yl.75
location with the call. This is N563 G02 XO.25 Y2.0 RO.25
N564 GOl Xl.a7S
most control systems:
N565 YO
N566 X-O.75
03905 (MAIN PROGRAM) N567 GOO 040 Y-O 7S
(FOUR-CORNER PATTERN) N558 M99
Nl G20 %
N2 G17 G40 GSO
N3 G90 GOO G54 X1.S8 Yl.2S For conlOur subprogram will be called by
N4 G43 Zl.O 5350 M03 HOI
normal means, from
N5 G99 Gel RO.1 Z-0.269 F3.5 M98 P3955
N6 G90 X6 25 Yl.88 M98 P3955
N7 G90 X6.2S YS.O M98 P3955 M98 P3956
N8 G90 Xl.BS YS.O M98 P3955
N9 G80 GSO G28 Zl.O MOS The same subprogram can used for finishing as well as
NlO G91 G28 XO YO for semi finishing, leavi some stock, but two D
offsets have to be such as D5! and In case,
offset DS 1 stores the amount con-
advantage of 03905 is shortening the tain the slOck allowance I cu(ler + Slack), 052
03904 - either melhod produces the same re- stores Ihe :: cutter radius). For a
is a malleI' of persollal end could be:
unnecessary repetitions
axes. Modal values have to D51 .250 radius + .007 stock = .257
for subprograms. D52 = .250 radius + .000 stock .250

• Modal Subprograms Next, the D .. has [0 be removed the subprogram:

03957 (CONTOUR SUBPROGRAM - B)


N551 G41 GOl XO F10.O (D .. NOT INCLUDED)
N562 Yl. 7S
N563 G02 XO.25 Y2.0 RO.25
03904 and 03905, note repetitions of NS64 Gal Xl. 875
.0. They are very imporwllt. The sub- N565 YO
the control srarus to the N566 X-O.7S
hole of I he ten hole pattern is N567 GOO G40 Y-0.7S
not the same as IIrSI hole of the pattern IS N568 M99
%
madlineu wlu.;n lIlt: to Illal hole is
in the absolute in the main program,
require the 0 offset but not
not within the same block as G41/G42. As long as 0 is
A finish contour sub- I/G42, it can be passed on to the
) or 042 with the D main program, depending on t
,"' ......""'y,..,~ is to he used for
finishing and for example, it will not M98 P3957 DSl ... for seJwfinishing
work. The reason is is fixed and is sLored M98 P3957 052 . .jorJUlishing
in the control as the full culter The solution? Use
two f) offselS PInel t~ke the f) out nflhe. ~lIhrroBr;:!m,
(hen call it together wilh M98, for example:
376 Chapter 39

Return from a Subprogram main program. When a subprogram is called from [he main
program by M98 P.. block, the control forces a branch to
The current modal values should be clear in the main pro- (he beginning of (he called subprogram, processes its con-
gram when a subprogram is completed. Values that may tents, then it returns to the main program to process the re-
have changed 1n the subprogram are absolute or incremen- maining blocks of the main program - Figure 39-7.
tal mode, molion command, coolant and olhers. Subpro-
gram is always a branch of another program - il is a COll- • Two level Nesting
tinuous extension of the program of origin and its integral
pan. All modal values set anywhere in the program are TIle processing of a subprogram that is nested (wo levels
valid until changed or canceled by a command of the same deep also starts at top of the main program. When the con-
group. The M99 subprogram end function will not cancel lrol encounters ;J sllbrrogmln c~lI for the firs\" level, it will
any modal values that are currently active. branch from the main program and starts processing the
blocks in (he first subprogram, starling from its top. During
As the 03904 and 03905 examples show, a fixed cycle is processing of the first level subprogram, CNC system en-
called ITom the main program only once. Alllhe modal cy- counters a call for a second level subprogram.
cle data are carried forward [0 the subprograms. TIle main
program clearly shows current modal values. At this point, processing of the first level is temporarily
suspended and CNC system branches to the second leveL
MUL11 LEVEL NESTING Since there is no subprogram call from the second level, all
blocks in the subprogram will be processed. Anytime the
block containing M99 function is encountered, (he CNC
The last example has shown the main program ChUl calls system will aUlomatically return to the program if branched
only one subprogram and the subprogram does not call an- OUI of [I will resume processing of Ihat program, tempo-
other subprogram. This is called one level nesting, or nest- rarily suspended before.
ing at one level deep. Modern controls allow nesting up to
four levels deep. 111£11 means, if the main program calls a The return [Q the program of origin wi!! norrnally be to
subprogrnm number one, this subprogram can call a sub- thc block immcdiately following the subprogram call block
program number two, that can call a subprogram number in that program. All remaining blocks in the first subpro·
three, and [hal can call a subprogram number [our. This is gram will be executed until anOlher M99 function is en-
called afour level nesting. All four levels arc rarely needed countered. When that happens, the control system will re-
for any practical application, but these are [he program- turn [0 the program it branched out of (program of origin),
ming tools available, Just in casco The following examples in this case to the main program.
show program processing flow of each nesting level.
Since there are still some blocks left in the main program,
• One level Nesting lhey will be processed until the M30 funclion is encoun-
tered. M30 terminates the execution of the main program.
One level nesting means thaI a main program calls only Figure 39-8 illuslrates schematically the concept of a two
one subprogram and nothing morc. Suhprogram that is level subprogram nesting.
nested one level deep is the moSI common in CNC pro-
gramming. The program processing starts at the top of [he
<START>
010
<START> I I
(MAIN) 021 022
010
I (SUB) (SUB)
(MAIN) 021
(SUS)

' -
-
M98 P21
-
M98 P22
M98 P21

M30
%
n
<ENO>
'-----0/0
M99
M30
%
<END>
~ %
n
M~9 L%
M99

Figure 39·7 Figure 39-8


One level subprogram nesting Two level subprogram nesting
SUBPROGRAMS 377

• Three level Nesting <START>


The nesling up to three levels deep is the neXI logical ex- 010
tension of the two level nesting. As before, starling al lOp (MAIN) 021 022 023 024
of Ihe main program (program 0 lOin the example illus- (SUS) (SUB) (SUB) (SUB)
traled in Figure 39-9), the firs! branch will be LO the first
level (021). another branch follows (022) and there is an
additional branch to 023. Each subprogram is processed
up [0 the next subprogram call, or the end of subprogram. M9S P23
The program processing will always return to the block fol- M98 P21
lowing the subprogram call. ending in [he main program. M98 P22 M98 P24

<START>
010
(MAIN)
0~:~,~2
(Su (SiS)
I
023
(SUB)
~30rr
<END>
M[l
%:i~ L~99
~[l
'" L M99
%

Figure 39-10

'---
M98 P22 L Four level subprogram nesting
.--- M9a P23
M98 P21

n n
I L%
M99
nested subprograms. Such a programming approach may
result in a short program, but al the cost of a long develop-
ment time. The program preparation lime, its development

M;O L
M99 and debugging often lake more lime lhan writing conven-
% M99 lional programs. Not only the logical development IS com-
'-- % plex and more lime consuming, I:l significant portion or
%
programming lime must be spent on careful and thorough
<END>
doCumenlaiion of the process flow of all programs, setling
up the initial conditions, checking the validity of data, etc.
Figure 39-9
Three level subprogram nesting There are many fairly experienced CNC programmers in
the maChining trades field, who try to use a multi level nest-
• four level Nesting ing at all costs, and the more levels, the better programmers
they fcel they are. These programmers, more often Ihen
The logic of multi level subprogram nesting should be not, use such complex programming technique as the
pretty clear by now. Four level nesting is just a multiple ex- means of expressing their so called 'professional skill',
tension of a single nesting and is logically idenlical LO all usually measured against other programmers. Often, thiS
the previous examples. is nothing more [han a unnecessary contest, a frustration
perhaps, and definilely an expression of a little ego trip.
Unnecessary addition of more branches a multi depth
subprogram nesting makes any programming application When a programmer hecomcs obsessed with making tilt.:
Ihal much more complex and JlIure lIi ITiculllO masler. program as short as possible, at any and a/I costs, he or she
is taking the wrong trek. Such programs, even if
Programming the subprogram nesting into (he four level
technically (lawless and logically correct, are not
depth (or even the three level depth) will require a full un-
very easy to use by a CNC operator. A CNC machine op-
derstand in g 0 f t he pro gram processing order - and hav i ng a
erator with limited or no programming knowledge find
suitable application for it. In lypical machine shop pro-
!hest: programs extremely inrimidating - even skilled and
gramming, there is seldom the need [0 use level [hree and
experienced operators will nnd them hard [0 read. hard 10
level four nesting. If a good example of a rour level nesling
interpret and most likely. they will be unable to make
application is found. the typical program flow will conform
substantial changes La them, in order [0 modify or oplilnizc
LO the formaL illustrated in Figure 39- JO.
the programs for a bellcr performance.

• Nesting Applications A simple general rule for multi level nesting technique -
use It only in those cases, when the frequency or their future
Considering the realilY that each suhprogram can be rc- deployment justifies the extra time spent for their develop-
peated up (0 9999 limes in any program thai calls it, shows
ment. Like anything else, many nesting levels offer advan-
the enormous programming power available to use and ex-
tages and (he inevitable disadvantages.
plore. Always be aware of potential difficulties. even dan-
gers, when developing subprograms wilh several multi
378 Chapter 39

CONTOURING WITH A SUBPROGRAM profile 25 times, for 25 x .010 = .250 lolal required deplh.
Preference for a subprogram in such a case IS wilhout a
question. Symbolic detail of Ihe depth cui for a single in-
So far, a number of rrogramlmng examples have been us- cremenl is i Iluslratcd in Figure 39-/2.
ing a subprogram. They all related to machining holes and,
hopefully. offered enough material to underSland the con- The subprogram 019.'iR will contain only the 100/ mo·
cep! of subprogramming (there will be one marc - a ralher tions common to all the groove cws. Thal means the .010
speCIal one - allhe end of this chapler, so look for it). There incremenlal plunge cui and the 360 0 circular cut. All other
aft: other examples found throughoul Ihe handbook [hat motions will be in (he main program 03906. Note the word
make generous use 01" subrrograms. lilcremenral for the plunge depth. The .010 musl be pro-
grammed incrementally, otherwise it will cut at (he abso-
Here is one more example relating to this chapler. Ihis lute deplh of Z-O.OI - all twenty five times! Here is [he
lime applying a simple XY contouring work \0 a mulliple Z complele main program 03906, followed by a single re-
depth - evaluate Figure 39-11. lated subprogram 03958 (tool TOI is assumed LO be in the
spindle):

01.75 03906 (MAIN FOR SIMPLE DEEP GROOVE)


(TOI - 0.250 DIA CENTER CUTTING END MILL)
N1 G20
N2 G17 G40 G80
N3 G90 GS4 GOO X2.87S Yl.5 5630 M03
N4 G43 ZO.1 HOI MOS
NS GOl ZO FIO.O (START Z POSITION AT ZO !)
1.5 N6 M98 P39sa L25 (CALL SUBPROGRAM 25 TrnES)
N7 G90 GOO Zl.O M09
0.25 N8 G28 Zl. 0 MOS
N9 M30
%
--<00- - 2.0
0.25
03958 (SUB FOR 03906)
N581 G91 GOl Z-O.Ol FO.S (INCREMENT BY -O.Oll
0.5 N582 G03 I-0.875 F2.0 (FULL CIRCLE CONTOUR)
N583 M99
%

Intentionally, the presented program is simple. Ii does


Figure 39-11
show, however. two important consideralions [hal have LO
Main program 03906 using subprogram 03958
be maintained in any subprogram developmenl. These con-
The job requires a groove with a 01.750 pilch 10 be ma- slderatlOi1S rclalc 10 mainlenance of a continuous relatiolJ-
chined 10 Ihe deplh of .250. II is a uti lily or rough groove, so ship be/lVeen the main prograrn and Ihe subprogram. They
there is no need for precision tolerances. or even the high can be described as special requirements:
quality of Ihe surface finish. All needed is a 0.250 center o ... to maintain a transfer from the main program to
end mill (slo! drill). plunge 10 Ihe deplh, program a a subprogram Ibefore subprogram is called)
36001 circular tOol ralh, and .lob is done. Well, almos\.
o ... to maintain a transfer from the subprogram, back
Even in a material (hat cuts well, forexamrle brass, split- to the main program (after a subprogram is completed)
ting a single depth cut of .250 inlo two depth cuts of .125
The firs! requiremenlls mel in block N5. The Z axis posi-
may prove beneficial. The material is D2 lOOt sleel. ralher a
lion mUST be al 20, nowhere else! Being at ZO, it will enable
tOUQh material. The 100] will rlln at only 630 r/min and only
the 1001 to increment 25 limes the distance of .010, resull-
plu~ge inco the material .0 I0 at a lime, repealing Ihe groove
ing in 250 groove derlh. Described differently, the tool
Slarl position before a subprogram is called must be at a po-
sition [hal results in a correct tool path.

... G91 Z-0.01 The second requirement is mel in block N7. It is Ihe G90
comJnnnd [hat makes Ihis block special. Why? Because lhe
subprogram uses G91 incremenlal mode. When the sub-
Groove width program processing returns back to the main program. it no
longer beneJits from lhe incremenlal mode, and the G90
Figure 39· 72 changes Ihc Incremental mode back to absolute mode.
Del8il of the subprogram 03958 . fronl view shown
SUBPROGRAMS 3

TOOL CHANGE SUBPROGRAM Also note the various cancellation


quite a few oflhem in
a subprogram, lhe programmer
programming sequence for a typical
whether the coolant will be ON or no
change (ATC) is usually shorl and simple. a or the cuuer radius offset IS or nol.
system, the M06 funclion will normally do
for the lathes, it IS the T function thai same
has no idea as 10 what current stams or
or G91 modes is.
tool change cannot be programmed without es-
conditions. Program functions to actual status is really nollhal important. can-
machine zero return, coolant cancellation, are included in the subprogram, taking van-
are all an integral part of the tool of fact that a cancellation of a function Ihat is
four, five or more program blocks to canceled will be ignored by the control
conditions - every time the automatic example shows, even a 'simple' 1001 change
which can be quile some serious thinking,
is the fact that the blocks always
regardless of the program being used. 100 000 000 HOLE GRID
of this consider the following se-
operations, they are quite typical, required to In the last of (his chapler, perhaps a little deviation
a 1001 for several (Ools ina single prognlm. from handbook seriousness will be tolerated.
~"rtlrm will look at subprograms from a
is on a lypical venicnl CNC
following exercise lakes the
and uses automatic 1001 change function (ATC):
extreme. Although it is
1. off the coolant note, it does serve a very
2. a fixed cycle mode of subrrograms and.
3. a cutter radius offset made their usc.
4, Turn spindle
5. Return to Z axis machine reference position how one hundred million holes,
6. values million holes), can be spot drilled and
7. Make the actual tool change
of only 29 blocks ror the two cut-
seven individual even Include the program num-
gram (hal (his (% signs). Figure 39-13 shows a SImple
occur for 10000 rows (X) and 10000 columns (Y).

a subprogram thaI includes ROW 10000


in the main program when- COLUMN 10000

03959 (TOOL CHANGE VERTICAL MACHINING CENTER)


Nl M09
N2 GBO G40 MOS
N3 G9l G28 ZO
N4 G49 DOO HOO
NS G90 M06
N6 M99
%

This example cnn


chine design or a II may even o
include special requirements, manufac- C'J
tmer's options. The 1001 programmed 0-
o
at a certam machine modification 00000!
would be Ihe addition of a the LOol '0
change block. Anolher is a for 1001 ./ ,,_. SUBPROGRAM
change and Ihe ON function. manu-
ROW1
facturers create a special M combining the two
COLUMN 1 0.12
standard functions, for is Lhe combi-
nation or M06 and M08 Figure 39-13
100 DOD DOD holes - rectangular grid pattern
380 Chapter 39

To make (he example reasonable, simple, and interesting What makes the program even more interesting is thees-
al Ihe same lime, (he holes arc very small, only 05/64 (imate of machining lime. This may go a little too far, but
(.0781), with a pitch of. 120 along each axi s, rcsu lIing in a let's finish the fun. Before reading the whole page, make a
square grid pallern of holes very close (0 each other. guess - how long will it take to machine all holes with the
two fools? The speeds and feeds are reasonable for most
Only IWO tools are used, a spot drill with a 90° 1001 point materials, so are {he clearances and the dwell time for spot
angle \0 startup the hole for drilling and a 05/64 drill. Bo[h drilling. A rapid traverse of 475 in/min is assumed in all
cutting 10015 start machining from RO.06 cycle position axes. a reasonable speed. It is worth the few calculations?
above the plate to Iheir respective depths: Z-O.04 for the Malians between Ihe machine zero and Ihe first location
spot drill and Z-0.215 for the drill. are disregarded in both directions for convenience.
From the programmi ng pain! of view, the. program design The tirst calculation finds the lime it takes to make a rapid
is not difficult at all - it will usc a main program and one motion bel ween all holes. One hundred million spaces (less
subprogram. The programming procedure is the same for one space) multiplied by .120 divided by 475 in/min is
100 000 000 holes, as if lhe grid were only 100 holes. The 25,263,1576 minutes. These motions will be multiplied by
main program contains the standard settings and also calls Iwo, for two lools, therefore 50,526.3153 minutes.
the subprogram, The subprogram will repeat the active
fixed cycle 9999 times, for two rows, one in each direction. The spot drill will move .060 from the clearance to the
lop of part and .040 depth of cut, for the totalleng!h of. 100,
The slart position for the first tool motion is at an arbi- mulliplied by one hundred million holes at the rate of 5.0
trary local ion X 1.0Y I .0 (shi fled hy .120 along the minus Y in/min. therefore cuning time for spot drilling will be
axis). A fixed cycle drills the firSI hole. repeats ilself9999 2,000,000 minutes. TIle SpOt drill will rapid oul oflhe hole
times, shifts in the posltive Y axis once, drills a hole and re- one hu ndred million Ii mes the dlslance of .100 al the rale of
pealS along the negative X axis 9999 limes again. This 475 in/min, 10laling 21 ,052.63l6 minutes; Ihe dwell time at
subprogram pattern repeals 5000 times in the body of (he each location is 0.030 seconds. translated ioto minutes will
malll program: take another 50.000 minutes.
03960 (SUBPROGRAM) The actual drilling will take place to the depth of .215
N60l G91 YO.12 from .060 clearance leveL for (he tOlal travel of .275 at the
N602 XO.12 L9999 rate of 4.0 in/min - which is another 6,875,000 minutes.
N603 YO.l2
The drill will rapid out of one hundred million limes by the
N604 X-0.12 L9999
N60S M99
distance of .275, at the rate of 475 in/min, adding another
% lime of 57,894.7168 minutes.

03907 (MAIN PROGRAM) The grand lolal of aH results is 9,054,473.6837 minutes.


Nl G20 which is 150,907.8947 hours, which is 6,287.829 days,
N2 G17 G40 G80 TOI (SPOT DRILL) which is 17.2269 veary. Believe it or not, il will take more
N3 M06 than seventeen ye-ars of uninterrupted machining, to spot
N4 G90GOO G54 Xl.0 Yl.O 53000 M03 T02 drill and drill one hundred million holes - and all thai can be
N5 G43ZI.O H01 MOB done with the main program and a subprogram tOlalingjust
N6 G99G82 RO.06 Z-O.04 P30 F5.0 LO over two dozcn blocks of input.
Nt M98P3960 L5000
N8 G90 G80 Zl. 0 Going into related details, size of the plate without mar-
N9 G28 Zl. 0 gins would have to be 100 x 100 feet, so the actual machine
NIO MOl
travel would have to be greater than 100 feet along the X
Nll T02 (5/64 DRILL) axis as \\)el/ as the Y axis. Hardly any CNC machine on the
Nl2 M06 markel can handle this monstrous task. How would Ihe
Nl3 G90 GOO G54 X1.0 Yl.O 53000 M03 TOl plate be mounted, for example? That is another question.
Nl4 G43 ZL 0 H02 MOB
N15 G99 GSI RO.06 Z-0.21S N.O LO To make the example even more fun for the last time,
N16 M98 P3960 L5000 consider the lime spent on programming. doing It witholll a
N17 G90 G80 Zl. 0 subprogram and wi/holll the repetition count (address L).
m8 G28 Zl.O Assuming that each block will take 6 seconds to write and
Nl9 G9l G28 XO YO 55 blocks will fit on a standard paper (hard copy), it would
N20 M30 lake about 19 years (yes, ninereen years .') just 10 write the
%
program for the two tools (no interruptions, of course). As
far as [he paper is concerned. it would end up with 'only'
The program deSign takes an advantage of the subpro-
1.818. J 82 sheets, or a stack of approximately 705 feel (215
oram Ilcsrin Co and Ihe lnaximulll number of r(1)critions.
o
.0 ... t
meters) thick. Enough or thai - SlIbprograms do work .
DATUM SHIFT

The majority of CNC programs will be programs for a mand G92 and G50 registers (he absolute coordinates of
single job - ajob thaI is relative to a specific machine avail- the currenl tool position and have no influence whatsoever
able in the shop. Such a particular job will have ils unique on the incremental dimensions, when using the G91 com-
characteristics, ils special requirements as well as its own mand for milling or the um axes for turning. Its normal
tool path. The 1001 path is the most impol1ant of all the fea- purpose is LO 'tell' the control system the curren! 1001 posi-
tures of a CNC program. lion. TIlis step is necessary alleast once at the beginning of
each tool to establish the relationship between the fixed
It is the CNC programmer's main responsibility to de- program zero (pan origin) and the actual position of the
velop a functional tool path for any givcn job, withoUl er- cutting tool. For example,
rors and in [he most efilcient way. The \001 path develop-
ment IS very Important, because it represents a machining G92 XIO. 0 Y6. 5
pattern unique to the job at hand. In most programming
jobs. [his machining pattern is executed for the given job is "elling' lhe control system thatlhe CUlling (001 is set at
only and is irrelevnnl (0 any other CNC program. Often, positive 10.0 units away from lhe program 2Cro in the X
programmers encounter opportunities, where an exisling axis and posilive 6.5 units away in the Y axis.
machining pauem can be used for many new jobs. This dis-
covery will encourage development of the programs more What happens if a wrong position is rcgistc(ed? What if
efficiently and produce CNC progfi.lms for many additional the values in the G92 or G50 statement do not accurately
applications and without errors. reflecl the !rue, the physical position of <1 cutting tool') A<;
may be expected, the tool path will occur at the wrong
The programming technique that addresses this issue is place and the result is qUIte likely a scrap of the machined
known as the Translation of a Machining Pattern or, more part. tool breakage, even a damage to the machine itself.
commonly, a DafUn! Shift. The mosltypical example oflhis Certainly not a desirable situation.
technique is a temporary change of Lhe program reference
point (program zero) from (he original position to a new A imaginative CNC programmer always trtcs to find
position, so called work shift. Other programming tech- ways and special methods that Lake advanlage of rhe avail-
niques include Mirror Image, described in (he next chapter, able programming tools. G92 and GSO commands are only
Coordinate Rotation and Scaling FlInc/ion, described in Iwo of many 10015 Ihat offer a tremendous power to a
the chapters that follow. creative CNC programmer.

This chapter describes in detail the advanced subjecl of For simple jobs, there is no need for special or creative
DQ/um Shift. also known as the Machining Pal/ern Transla- manipUlations. It is not very economicallo invest precious
tion. This is a basic feature of all CNC systems Ihat can be lime on adding features to Ihe program (hal will never
applied in a variety of ways. provide real advantages. If such a need is well justi rled, the
rrogram can be optimized later.
DATUM SHIFT WITH G92 OR G50 • Program Zero Shift
In essence, a datum shift is a temporary or permanent re- If the G92 command is used on machining centers or the
location of the part zero (program n:.'ferencc point) inside of G50 command for lathes at all, rather than the morc current
Ihe program. When Ihis programming technique is used, it and very efficienc G54 to G59 work offsets. only one G92
relocate.." an existing machining pallern (tool path) 10 the (GSO) posjllon register command is neededjoJ Q single 1001
program a( different locations within the CNC machine - assuming thal work offsets are not used.
work area.
Any occurrence of more than il single position register
In an earEer section (Chapter /6), explanation of G92 command per each tool in one program is called tl program
(milling) and GSO (turning) commands was covered. Re- zero shift.
view Ihese commands now, before continuing further. [n
To illustrate Ihe concept of the program zero shift. a sim-
particular, recailihat these commands do not cause any di-
ple bUl relevant draWing wi 11 be used. The drawing is illus-
reclloo} motion, but they do innuence any tool motion (hal
trated 10 Figure 40- J.
jollows it. Also keep in mind thallhe position register com-

381
2 40

04001
USED FOR TWO TABLE
I.l)
o N , 01 m G20 G90
N2 G92 X22.7 Y19.5 Z12.5 (TOOL AT
N3 S1200 M03
N4 MOS
N5 G99 G82 X2.S Yl.S RO.l Z-0.2 P200 FS.O
No X6.75
N7 YS.O
N8 X2. 5 (TOOL AT LAST HOLE OF PART A)
N9 GBO Zl.O
1
mo G92 x-a.7 Y-4_7 (SET AT LAST HOLE OF A)
o Nl1 G99 GSl X2.S Yl.S RD.l Z-0.2 P200
Nl2 XC;.75
Nl3 Y5.0
Nl4 X2. 5 (TOOL AT LAST HOLE OF PART B)
40-1 Nl5 GSO Zl.O
A drawing for zero shift illustration - program 04001 Nl6 G92 X-9.0 Y-4.8 (TOOL FROM M/C ZERO)
Nl7 GOO Z12.S M09
the four holes will be machined at Nl8 XO YO (TOOL AT M/C ZE:RO)
loca!ions oflhe machine table setup, as Nl9 M30
%

N2,
. - - - G92 X(A) - - -....
11 Machine 1
Zero them relates to the
in some way. Be velY careful here. Not
behind G92 calculations have
troubles.

(001 starts from the machine zero position for


It is mounted in the spindle
In block N2. the part zero (reference
cutting tool at this point
is I zero along the X axis. Gnd I
9.7 inches coordinale setting in block N2
rellects th is In N7 N8, the tool has com-
pleted the last hole of A (at X2.SYS.0 of the currenL
G92 selting).

11.2 ~
The next is NIO, At this poinl in the pro-
gram. the Part A is completed. bul ParI B not yet
Figure 40-2 been started. Think a little now and see the
Program zero shiff using 692 command for fWo pans - 04001 Lool is after executing block It is at
X2.5Y5.0 of ParI A. Uthe tool
The G92 X(A) X or ParI B. which is the
of Par! A to (he machine zero, gram has La 'tell' the
distance from the pan zero or moment - but in relation to
Note !.hat the arithmetic calculation:
zero. They coule!
G92 (X) ; 11.5 + 2.5 - 22.7 -8.7
must start from pan zero. In LO use
between both must be known..
G92 (Y) = 9.8 + 5.0 - 19.5 = -4 7

used La simplify the example: Evaluate Figure 40-3 to


ParI A: G92 X22.7 Y19.5 Z12.S ree(ion of arrows in the illustration is
mining Ihc axis sign in the G92 block.
ParlE: X-l1.2 Y-9.7 zo A Blocks NI3 and Nl4 contain the
Also note thallhe Z value is the same 1001 location or Parr B. From the illustration, it
Part 8, because (he same lool is both easy to understand the meaning of !.he coordinate
drill the four holes at two locations, lht: block N 16. In order to complete the
written this way - program 0400 I: LOol has to return to the home position (machine
DATUM SHIFT
383

~--.... 22.7 ----+I.i However, if the bolt pattern is within a rectangular area, the
part zero maybe at the edge comer of the work.
i?1l

~l
Normally. absolute locations of the bolt holes will have to
be calculated from program zero, unless either a shift of the
program zero is used (using 092 described earlier), or a
special coordinate system is selected.
When working with work offsets, three programming
methods are available to make the job a lot more conve-
9.7 YS.O nient and perhaps even less prone to miscalculations:
o Use the center of the bolt circle as program zero.
l
I
CD 0 This will be convenient for the eNC programmer only,
A as it causes more work during setup

X2.5 Y5.0 is the last o Use two different work offsets in the program,
11.2 hole of the pattern for example, G54 for the reference to the part edge
and G55 for the reference to the center
Figure 40·3 of the bolt circle pattern
Calculations of G92 coordinates (XY) for program example 04001 o Use a local coordinate system, within the current work
coordinate system (work offset) selected at the
return will take place from X2.SYS.O of the Part IJ, which beginning of program
is 9.000 inches from the machine zero along the X axis and
4.800 inches along the Yaxis: In all cases, one significant advantage has been gained -
the programmer uses calculations relating to the bolt circle
G92 (Xl = 11.2 + 2.5 - 22.7 -9.0 center coordinates, directly in the CNC program, without
G92 (y) ~ 9.7 + 5.0 - 19.5 = -4.8 the need of extra additions and subtractions. This method
may even simplify setup on the machine. Which method is
Both programmed coordinates X and Y win be negative. better to select and when is addressed next.
Once the current tool position is set at the last hole of Part TI1e first method, programming to the bolt circle center,
B, a return to the machine zero can be made. This retum is is (I common method and no comments are necessary.
necessary, because it is the location of the first tool. The tar-
get position for machine zero is XOYO not because it is a TIle second method, using the changes from one work
machine zero, but because the 092 coordinates were mea- offset to another, is also quite common. Its usage is not dif-
sured from there! The actual X and Y motion to machine ficult. TIle limitation of this method is the reality that only
zero is programmed in block N18. six work offsets are available as a standard feature on typi-
cal Fanuc control- 054 to G59. Ifa11 six offsets are needed
LOCAL COORDINATE SYSTEM for some work, none is left as a 'spare', to use for situations
such as a bolt circle pattem (There are additional work off-
sets available as an optional feature of the control system).
The 092 command for position register is as old as abso-
lute programming ilself.ln lime, it hao,; been supplemented The third method, using the local coordinate system
by additional commands that control the system of coordi- method, has the main advantage that it allows the use of a
nates. The work coordinate system (G54 to G59 work off- dependent - also called a child - coordinate system within
sets) has been discussed and a suggestion made that 092 the current work offset - also caned the parent work offset.
should not be used when any work offset is in effect. Such a Any number of local coordinate systems can be defmed
siruation prevents changing the program zero on the fly, within any parent work offset. Needless to say, work is al-
when needed only temporarily. Fortunately, there is a solu- ways done in one coordinate system at a time. Note:
tion in the form of a progranunable subset of the work co-
ordinate system (work offsets) called the local coordil1ate The local coordinate system is not a replacement for,
system or the child coordinate system. but an addition to, the work coordinate system.

There are many cases, when a drawing is dimensioned in Local coordinate system is a supplement, or a subset, or a
such a way that the work offsets 054 to 059 become some- 'child' of the current work offset. It must be programmed
what impractical. A good example is a bolt hole pattern. If only when a standard or additional work offset has been se-
the overall machined component is round, chances are that lected. There are many applications that can take advantage
the program zero will be selected at the center of the bolt of this powerfill control feature.
hole pattern, which offers a certain benefit in calculations.
3 40

• Command modal 052 command IS active until it is in


What exactly is the local coordinate sySlem, and how
program. To cancel a local coordinate and to re-
il work? Formally, it can be defined as a co~
turn 10 the previously aClive work thai
(0 is to program zero values with
orCillHues associaled with the aCLive work
by the preparatory command G52.
G52 xo YO . , , last example

tool motions (hal follow lhe cancellation wit!


original work offset, which was speci
r.m,m~ln(l IS always complemented by the ae- earlier in the example.
The
Ihal set a new ~ thai is fempo- The boll circle program uses the teChniques
rary zero as illustrated In Figure 40~4. about the benefit of th is type of as
10 letting the lower left comer be the only part zero.
• GS4(X) - - - .
a CtTor by the CNC operator
minimized. True. the operator shl!
at the lower left corner of the
any adJustments for center.
is also the coordinate values
center of the bolt

04002 (G54 AND G52 EXAMPLE)


N1 G20
N2 Gl? G40 G80 TOl
N3 M06
N4 G90 G54 GOO X8.0 Y3.0 S1200 M03 T02 (CNTR)
N5 G43 Zl.0 HOl M08
N6 G52 X8 0 Y3. 0 (l'EMI-- PRG ZERO AT Be CNTR)
PROGRAM ORIGIN N7 G99 G82 RO 1 Z-O.2 PlOD F10.O LO (NO HOLE)
Ne X2.2S YO {HOLE
40·4
N9 Xl.125 Y1.9486 (HOLE 2)
NlO X-l.12S (HOLE 3)
Local coordinate system definition using the G52 command Nll X-2.25 YO (HOLE 4)
N12 X-l.125 Y-l.9486 (HOLE 5)
The llluwalion a of six holes )ocaled in Nl3 Xl.125 (HOLE 6)
a rec[angular plate. The lypical program zero is al the lower N14 GBO Zl.O M09
edge of plate and the bolt cenler is located XS.O and N15 G52 XO YO (RETURN TO G54 SYSTEM)
Y3.0 inches from [hal which will become the G52 Nl6 G28 ZI.O MOS
shift amount. The bolt is 04.500 inches and the I'irst N17 1'(01
hole is atlhe 0° position of Subsequent holes
are machined In the as holes 2,3,4,5 and 6.
Nl8 T02
Nl9 M06
What the program will transfer the H2O
pan zero from [he lower to Ihe bolt circle cen-
ter, in the program. illustration as a follow MACHINE COORDINATE SYSTEM
the programming as they to the bolt circle and
in (he logical order they would in a program:
So far, work (G54 to 059 work off-
G90 G54 GOO X8.0 Y3.0 (BOLT CIRCLE CENTER) sets) have been as well as the local coordinare
(-- WORK COORDINATE SYSTEM POSITION ---------) syslem GS2. They are both very powerful and extremely
useful programming lools. control system offers yet
GS2 xa. 0 Y3. 0 anolha coordinate system, not commonly used. It may he
(-- NEW PROGRAM ZERO ESTABLISHED ----------) called the third coordinale
(G8l) X2. 2S YO (HOLE 1 LOCATION FROM NE.W ZERO) Selection or thiS ,'('\(\1'",1,,,,,,r.,
( - - COORDINATES FROM NEW ZERO - - ----------)

Gsa XO YO
( - - CANCEL LOCAL OFFSET AND RETURN TO G54 - - - )
DATUM SHIFT

Machine coordinate system uses mea- 04003 COMMAND USAGE)


from (he machine zero as an input - Nl G20
N2 G17 040 G80 TOl
benefits in using this unique N3 G91 G28 ZO
nOI apparent. N4 G90 GS3 GOO X-170.0 Y-SO.O (TOOL CHG
evaluate the rules for machine coordinates N5 MO 6 (AC'TUAL TOOL CHANGE)
N6 GS4 GOO X25 0 Y25.0 SlOOO M03 T02
some become clear:
N7 043 Zl.O HOl MOS
o is effective only in the block N8 G99 G82 RO.l Z-O.2 PlOO FS.O
where it is specified N9 xS3. 0 Y13. 0
NlO G80 G28 Zl.O M05
o coordinates are always relative NIl G53 GOO X-l70 0 Y-50.0 (TOOL CHANGE POS)
to machine zero position Nl2 MOl
o It is only used in the absolute mode N13 T02
o Current work coordinate system (work N14 M06 (ACTUAL TOOL CHANGE)
is not by G53 command MIS G90 GS4 GOO X53.0 Y13.0 S780 MO) T03
N16 G43 Zl.O H02 MOa
o Cutter radius offset should always be N17 G99 G8l RO.l Z-O.836 Fl2.0
prior to GS3 command Nl8 X26.0 Y2S.0
Nl9 G80 G28 Zl,Q MOS
IJV.:l,;)lU,"" usage emerges N20 G53 GOO X-l70.0 Y-SO.O (TOOL CHANGE POS)
system can be used 10 N2l MOl
same machine rable
regardless of which work is on N22 T03
N23 M06 (ACT1J1U., TOOL CHANGE)
work offset is active. 111is can
program, or as a standard for all
%
machine tool. Remember, the
will always be determined by the actual tool stales that
lance from machine zero position, nOl the by the machine co-
and not from any olher position. On many the programming exam-
during i\ is ildvisable to establish a situalion, the foJlowing
tool of the part A \0 program 04003)
example with a rotary from

Nl G21 (METRIC)

illustrates the use of the N250 G90 G54 GOO X17.7 Y35 3
lool change at a fixed position N251 GOI Z-S.O F200.0
tbe machine thai is not directly related to N252 GOO ZSOO.O
program or the job 40·5. N253 G53 X-400.0 Y-lOO.O (FIXED POSITION)
N2S4 MOO TOOL CH.i!\.NGiE
,. ..t-----170
, ----- N255 S1200 M03
N256 XSO.O Y3S.0 (IN ORIGINAL WORX
N257 (... Machining continues ,..)

sequence in the program is quite


1001 moves to the XY position of (he rart In
""'.·TA.·'.... " the required machining opC!mlion, such as
/ to derth in N251, rapids to a clear Z .
N252, then moves to the fixed tool change
. In the next block, the CNC operator changes
manually, in N254 , then the spindle
in N255, [n the
/TOOLCHANGE
POSITION sel com-
has the same mean as:
Figure 40-5
Machine coordinate system G53 . program example 04003 N256 G90 G54 GOO XSO.O Y35.0
386 40

always program G 10 command has a simple format that is di for


all setting information, and do centers and lathes. Be prepared 10 encounter mi-
it new are olher practical uses for nor in format for various Fanuc controls, al-
the machine coordinaLe sys[em, wailing Lo be discovered. though the programming methods arc logical the same.
also vary for the different types of
DATA SETTING work offsets as opposed to tool length
in this arc for typical Fanuc
In a small or medium machine shop, job shop, or any lested on Fanue 16 Model a common
other environment stand alone CNC machines are conlrol.
used, (he machine
that have (0 be input into
setup. This common
typically sets all offset values
CNC system during the job
when CNC pro-
..
grammer does not ng values - the actual or incremental programming
ues - of various offsets at the (ime of development. impact on the offset values input through-
Regardless of which type of offset is
ag- the G 10 command, the programmed offset
this the current offset amount siored in the
An ngile or large vol- is in absolute mode (G90 for milling
technology, such as turni controls).
and tool path development,
automatic 1001 chang- mode for milling cumruls and UW
and 1001 life programmable auxil- offset amounl does nor
iary equipment, machme automation, and so on. In such an amouni stored in the conlrol:
environment, there cannOI any unknown elements - rela-
tionships of nil reference positions ru:e known and
(he need for offsets to be found sel al each individual
machine is eliminated. All values must be always
known !O the programmer. machine and in the program, as long
tool setup takes place. command is assigned
There is an advanlage in such command is called.
the offset data can be included in the All types can be set through the pro-
oeled into appropriate
gram, using G 10 command:
There is no operator's
automated, including the o Work offsets to G59 and G54.1 P..
All offsets are under constant
o Toollength G43 and G44
eluding their updates required for
changes in tool length or radius. o Cutter radius offsets G41 and

All this high tech aULOmation IS possible with an optional This group includes all if available.
feature called Data Selling. Many control s this
feature available, a feature thaI should never be WORK OfFSETS
underestimated. Even a small shop with
CNC machine can benefit from Data
provided il is supported by the control Before studying this that de-
the concept of
.. Data Setting Command
select the data setting option and to set
.. Work Offset Input
through the program, Fanuc offers a G The standard six work offsets
both the milling and turning
chining Irements, they are typically with
DatI.:! se.lling milling cOn!rols. The programming format is (he same:

preparatory com G lOIs a 11011 G10 L2 P .. x .. Y .. Z .. Machining cenlers mills


valid only for the block in which it is G10 L2 P .. x .. z ..
[f it is needed in any subsequent blocks, it to
in thaI block.
DATUM SHIFT 387

L2 is aflXed offset group number !bat the TOOL lENGTH OFFSETS


input as the work offset setting. The P in this case
can have a value from I to 6, to the to se-
!eclion respectivel y: Tool length offset value
grammed with the G Ja ~~.~~,~~.N
Pl=G54 set group. Depending on type
P4=G57 offset group will have different

for example, There are three types of memory on


tool length and tool radius
G90 G10 L2 Pl X-4S0.0 Y-37S.0 ZO

inputs X-450,0Y-375.0Z0 coordinates into


register (all examples for this sec:tlo,n Input: Combined Geometry + Wear offset

G90 G10 L2 P3 X-630_0 Y-408.0 Values: Value set by Gl0 L11 P.. R.. block

inputs X-630.0Y-408.0 coordinates into


coordinate offset register. Since the Z amount
the current amount of the Z Input 1; Separate Geometry offset value

Values 1: Values set by Gl 0 L10 P.. R.. block

Input 2: Separate Wear offset value


• Additional Work Offset Input Values 2: Values set by G10 111 P.. R.. block
to the standard six work offsets for milli
offers an oplional set of addirional Memory C• two columns for tool offset and
] P48. G 10 command can also be used to two columns for radius offset
values to anyone of the 48 additional work
sets and (he command is very similar (0 the one: Input 1: Separate Geometry offset value

for: H offset code


G10 L20 P.. x.. Y.. Z - .
l' ValuessetbyGl0110P..R .. block
offset group number has changed to
c",lc'l'l~ (he additional work offsets. Geometry offset value

ooffset code
Values 2: Values set by G1 0 l12 P.. R.. block
• External Work Input 3: Wear offset value
to lhe work coordinate sys-
or Common. This offset cannot Used for: Hoffset code
any G code and is used to Values 3: Values set by G10 111 P.. R.. block
globally, affecting all work offsets.
Input 4: Wear value
into the offset, G lOuses
and PO as the offset selection: Used tor: D offset code

G90 G10 L2 PO X-10.O Values 4: Values sat by G10 l13 p.. block

will 10.0 into work offset, while re- In all cases, Ihe L
taining all other (the Y axis. the Z axis and any ad- group number
ditional axis as well) n prac[ice. when using the shown isler number in
sen! ng, each work in il particular program will of Ihe offset to set
be shifted by 10 mm the X negative direction. lute and incremental
length pr:ogrammed input as
388 ........................................
Chapter 40

As an example for a CNC machining center, the follow- If the existing offset amount needs to be only adjusted,
ing block will input the amount of negative 468 mm into use the incremental programming mode. The last example
the tool length offset register number 5 (five): of a wear offset will be updated by adding 0.010 mm:

G90 GIO LIO P5 R-468.0 G91 GIO L13 P7 RO.OI (NEW SETTING IS 0.02 MM)

rf the offset has to be adjusted in order to make the cut 0.5 Be careful with the G90 and G91 mode - remember to re-
mm less deep for the lool length offset 5, change to the in- store the mode for subsequent sections of the program.
cremental mode G91 and program:
LATHE OFFSETS
G91 GIO LIO P5 RO.5

Note the G91 incremental mode. If the last two examples Toollenglh offset does not apply to the lathe controls, be-
are used in the order listed, the lInal amount of offset cause of a different offset structure. G I 0 command can be
number 5 will be -467.5 mm. used to set offset data for a lathe control, using this format:

Older Fanuc controls were using the address L1 instead of G10 P .. X(U) .. Z(W) .. R(el .. Q._
the newer L11. These controls did not have a wear offset
as a separate entry. For a compatibility with the older The P address is either the geomefl)' offset number or the
controls, L1 is accepted on all modern controls in lieu of L11. wear offset number to be scI. The addresses X, Z and Rare
absolute values, the addresses U, Wand Care theirrespec-
tive incremental eqUivalents. No G90 or G91 mode is avail-
• Valid Input Range able. using the standard G codes of the A Group .
To tell apart (he geometry offset and the wear offset, the
On most CNC machining centers, the range of tool length
geometry offset number must be increased by an arbitrary
offset values is limited:
value of 10000:

± 999.999 mm Metric Geometry offset input Pl 0001 will be geometry offset number 1
Pl 0012 will be geometry offset 12 ... and so on
± 99.9999 inches English Geometry offset input
If the value of 10000 is not added. the P number will then
± 99.999 mm Metric Wear offset input become the number of the wear offset.

± 9.9999 inches English Wenr offset input


Here are some typical examples of offset dala selling for
a CNC lathe, along with expected results. All examples are
consecutive, based on the order of input:
The number of available offsets is also limited, depend-
ing on the control model. There is a minimum 32 offset GIO PIOOOl XO zo RO QO
numbers available. Optionally, the CNC system can have
64, 99, 200 or 400 offsets available (even more), mosl of · .. clears all geometry offset for G 01 settings
them as a special option. (Geometry offset register I)

G10 Pl XO ZO RO QO
CUTIER RADIUS OFFSETS
· .. clears all wear offset for W OJ settings
For the offset memory lype C. (he amount of the culler ra- (Wear offset register I)
dius offsct (D) may he input through the program, using Note - QO also cancels value of tool tip number in G 0 J
G 10 command with L 12 and L 13 offset groups:
GIO PlOOOl X-200.0 Z-lSO.O RO.8 Q3
G90 GIO L12 P7 RS.O
· .. sets the contents of G OJ geometry offset to:
will input 5.000 radius value inlO the culter radius ge- X-200.0 Z-lS0.0 RO.8 T3
ometry offset register nUlllber 7.
· .. also sets T3 in the wear offset - automatically .Ii.'
G90 GIO LI3 P7 R-O.03

will input -0.030 radius amount into the culter radius GIO PI RO.8 Currelll T selling assumed
wear offset register number 7.
. sets RO.R value in W OJ wear offset
DATUM SHIFT 389

Note, that it may be safer to program: PROGRAMMABLE PARAMETER ENTRY


GIO PI RO. 8 Q3 OIlTeli1 selting 1101 assllmed
This sectlon covers yet another aspect of programming
the G10 command - Ihis time as a modal command. It is
GIO PI X-O.12
used (0 change a system parameter, through the program.
, ,. wear offset W OJ is set to X-O.l2, This command is sometimes called the 'Write 10 parameter
regard less of ilS previous selli ng fUllctioll', and is definitely not very common in daily pro-
gramming. Timid programmers should skip this section
GlO PI UO.05 allogether. 11 is very imponan! to understand the concept of
control system paramelers, otherwise this section will not
... updates X-O.! 2 by +0.05, help much. Authorization to change parameters ror lhe ma-
to the new value of X-O.07 chine [001, regardless of other professional qualificatIon!>,
is equally important LO apply this section.
Note lhat (he tool tip number (programmed in the G 10
application as tbe Q entry) will always change [he geome- WARNINGI
try offset and the wear offset simultaneously, whalever the Incorrect setting of CNC system parameters
amount or the offset lype is, The reason is a control buill-in may cause irreparable damage to the CNC machine!
safety thai attempts to eliminate data entry error,
Typical uses of [his command are common [0 changes of
MDI DATA SETTING machining condition, for example, spindle and feedrate
time constanlS, pitch crror compensation data, and olhers.
This command usually appears in the so called User Mac-
Programming various offset values through [be program
ros (applied by the G65 command) and ils purpose is to
selling requ ires f ul I understanding of the inpul format for a
control cenain mach i ne operations. The concept and expla-
particular conlrol system. It is too late when an incorrect
nation of User Macros is not covered by this handbook.
scuing causes a damage to the machine or the part.
One method [hat can be used 10 make sure Ihe offset data • Modal G1 0 Command
selli ng is con"eel, is a simple test. Test the G I0 cntnes in the
When the G 10 command was used for [he offset data Sei-
MOL mode on the CNC unit fir!>t, and check Ihe results:
ling earlier, it had to he repealed in each block. G J 0 for the
o Set the Program mude offsel entry can only be used as a nOll-modal command.
Modern Fanuc controls also allow to do anolher type of
o Set the MDI mode
chonge through the program - Ihe change of CNC system
o Insert the test data parameters through a modal G 10 command.
For example. enter: Many enlries used 111 programs are automatically con-
verted LO a system parameter by the control. For example,
G90 GiO LiO P12 R-I06.475 programming G54, the set value is seen on the work offset
screen. Yet, the actual storage of G54 value takes place in a
o Press INSERT system parameter, identified hy a certain paramerer num-
o Press CYCLE START ber. The G54 selling can be changed either through the off-
set data or through a parameter change, and the parameter
To veri fy, check the too! length offset H 12 - It should have number must be known. Some system parameters cannOI
the stored value of -J 06.475. be changed as easily (and some cannot be changed at all),
so Ihe modal G 10 command can be very usefuL In fae!, two
While s(ill 10 Ihe MDI mode, inSeri another test dalJ, for related commands are required - G 10 to start the seui ng and
example: GIl to cancel the setting:
G91 GiO LiD PI2 R-l.O Gi0 LSO
o Press INSERT (. .. data selling .. .)
o Press CYCLE STAH1 Gll

Again, to verify, check the selling of lOo] length offset The data selling block has three entries:
H 12 - it should have [he new value of -107.475.
GiO LSD
Develop other similar tests (0 follow the same routine. It .. P .. R."
is always better LO slart a program with confidence. Gl1
390 40

In case of d modal G 10 and G II combination, com- If more Ihan one aXIs IS required to be sel at same
this meaning: use mulliple .. P. R.. between G 10 GI J -
funher in (his section.
G10 Data setting mode
Programmable parameter entry mode fixed R Address
Data entry specification
setting mode cancel address R is the new value to be inlo
parameter number and musl always entered. The
Ihat are 10 be sel, one listed above must be observed. Note or
parameter number uses the N points in the entries.
dala use P and R There are several types of
rameler input:
• Program Portability
containing even a single programmable
Of~o,alll~'~1 input Allowed input range eter entry should be used only with the machine and
for which were designed.
Bit type 0 or 1

Bit type 0 or 1

Byte type a to 127


on dl con-
axis o to 255 same. The exact control
numbers must be known duri
Word type 0 to :t32767 example. on Fanuc control Model 15.
ting the meaning of an address with-
Word axis type 0 to :t32767 out n nl is number 2400 (Bit #0). The parameter
connolling tile Sal!le n15 un Fanuc control Model ]6
Two word a to :t99999999 will use 3401 (Bit #0).
Two word .," 0 to :t99999999 examples illustrate various programmable
and have been tested on a Fanuc 16
- a si ngle Jaw HUlIl iJer is con!rol- mill version. The selected
a differenl meaning, so illustration only, not necessarily as
exercise care when cilanging one bit but not another. parameters on The Ina-

Word Iype is an integer Type and the two-word


type is also called EI inle.ge r type. baud rate selling of an In-
interface, if (he I/O Chan-
• Parameters Notation
Numbering of bit type parameters is G10 L50
standard from 0 Lo 7 Slarf cOllnting from zero N0103 IUO
ilotfrom one), from . G11

baud rate setting for the se-


From a table supplied by

where Number is the number and the


#7 10 #0 are individual Setting R-value Description
2

bering and Ihe


elers are input as a hyte, 1 50 baud
are axis and non 2 100 baud
PAddress
3 110 baud
The P address IS used only for 4 150 baud
(bit axis, byte axis, word axis
ramelcr does nol relate to an ax 5 200 baud
dan! and does not have to be
DATUM SHIFT 391

G90
Setting R-value Description GlO LSD
=
N1221 PI R-250.0 (DECDfAL POINT NOT A.L.I..OWED)
6 300 baud Gll
7 600 baud
. Proper input is without the decimal point. An error condi-
B 1200 baud lion (alarm or fault) will also be generaled i(ihe P address
is not specified at all. For example,
9 2400 baud
G90
10 4800 baud GIO LSO
Nl22I R-2S0000
11 9600 baud Gll

12 19200 baud will generate an error condition. The next example IS


changed for two axes input:
In the previous example,
G90
GIO LSO
GIO LSO
N122I PI R-2S0000
NOl03 RIO
Nl221 P2 R-175000
Gll
Gll
4800 characters per second baud rate has been selected.
If this example is used on a lathe control. PI is the X axis.
In another example, the parameter #5130 controls the P2 is the Z axis. On a machining center, [he PI is the X ax is,
chamfering distance for thread CUlling cycles G92 and G76 P2 is the Y axis and P3 will be the Z ax is, ifrequired. In ei-
(gradual pullout distance applicable to lathe controls only). th~r case, the first two axes of the G54 work offset setting
The dala lype is a non axis byte, unit of the data is 0.1 of a will be -250.000 and -175.000 respectively_
pitch and the range is from 0 to 127:
Sometimes it is necessary to set all axes to zero. This may
be done with a standard offset setting:
GIO LSO
NSI30 Rl
Gll G90 GI0 L2 PI XO YO ZO (MILLrnG CONTROL)

This program segment will change parameter #5130 to or write 10 a parameter, also for a milling conlro\:
the value of I. The chamfering amount will be equivalent to
?ne pilCh of lhe thread. Do nolconfuse byte with a bil- byte G90
GI0 LSD
lS a value 0 to 127 or 0 to 255 for the byte axis type, bil is a
N1221 Pl RO (SET G54 X COORDINATE TO 0)
s[ate~nly (Oor I, OFF orON, DISABLED or ENABLED), N1221 P2 RO (SET G54 Y COORDINATE TO 0)
offenng selection of only one of two options available. The N1221 P3 RO (SET G54 Z COORDINATE TO 0)
word BIT is actually an abbrevialion of two words: Gll

Bil :::: Binary digit ('binary' means based on two) • Bit Type Parameter
Another example is for the entry of a two word parameter The next example is quite harmless and may be used as a
type. It will change the work offset G54 to X-250.000: lest, but be careful wilh any other parameters. Its only pur-
pose is to set automatic block sequencing ON while enter-
G90 ing a CNC program at the control. It also serves as an illus-
GIO LSO
N1221 PI R-2S0000 tration of a bit type parameter and IS a good example of
Gll some general thoughts and considerations that go into pro-
gram preparation using programmable parameter mode.
Parameter # 122 I controls G54, # 1222 controls G55, and
so on. P I refers to the X ax is, P2 refers to the Y axis and so On Fanuc 16 Model B (and most of the other models as
on, up LO 8 axes. Because the valid range of a l~ng'integer well) is a feature that allows automatic entry of sequence
(two word type) is required, a decimal point cannot be numbers. if the program is entered from the keyboard. This
used. Since the selling is in metric syslem and one micron feature is intended as a time saving device for manual entry
(O'(JO I mm) is the least increment, the value of -250.000 of program data. In order to enable Ihis feature, select the
will be entered as -250000. The following exumple is NOT parameter that controls the ON and OFF status of the fea-
correct and will result in an error: ture. On Fllnuc 16 it is 11 parameter number 0000 (same as
0). This is a bit-type parameter, which means it contains
392 40

eight bits. Ench bit has the End-Of-Block


lrols the state of sequence will appear automatically on
OFF is the same 8S I or 0, but only a number can screen. In the saving keyboardi
An individual bit the during manual program input.
means all the other
oue. IlltiJis eX<lJllpk, lilt:
The idea behind the G 10 modal in the programma-
ois as f(111ows: hIe parameter enlry is that more than one parameter
can be sel as a group. (WO paramelers are
INI ISO TVC cally connected, a can be
with the same Iinal two smaller segments ear-
0000 #7 #2 #1 #0 The modal G 10 {"n'"TlIflO"'," comes handy here:
o o o o
G10 LSD
NOOOO R001010l0
meaning of the is irrelevant N3216 R5
example. TIle bit is sel to means the auto- Gll
malic block numbering is U • .:>,ClUH_'-'

neither parameter is. lype, the address P was


The following program will turn on the bit omitted. The NOOOO is. the same as. and was used only
without changing Ihe other
legibility.
G10 L50 to Fanuc 15 users (Fanuc 15
NO R00101010 16) - the parameter number the
Gll automatic will IS 0, #1 (SQN).
There is marc on 15 - the slarting se-
The resulting entry in lhe screen WIll reflect
can be controlled with parameter #0031,
111M stores the increment amount
TVC IS as shown.
Also. on 15, the allowab!e sequence num-
#0 bers is lip to 99999. 111is IS a typical exampJeofadifference
o I wo control models, even were produced by
the same manufacturer.
!hal all bilS had \0 be written. The job is not done
yet. however, Fanuc offers an additional reature - the incre-
ment the numbering can be as well. for exam-
• of Block Numbers
f"\"'~"nH include block "H"Tl"''''''''
selection of 10 will use NIO,
I will usc N I, N2, N3,
increments ofi"ive, for NIO. NI5, etc. llle incre-
10 be sel - yes - by another N121 Gl0 L50
16. parameter number N122 NOODO R00101010
value is #3216. is a N123 N3216 RS
the val id range is 0 10 9999. N124 G'll
by selling the bit in na'"""·....
"An'."..."' .... ' will look like this:
There are now fH!O di
and N123. How
G10 LSD
N3216 R5
will be no
Gll block wirhin lhe G
is the block number, the
are completed, same block will be interpreted as pa-
In any program con-
MIRROR IMAGE

of a program development is to BASIC RULES Of MIRROR IMAGE


create a cuuer tool path in a specific location of the part or
the tool path requires both the right and left rule of a mirror image is based on thl: Ihal
programming lime can be shortened machining a given 1001 path in one quadrant is not
called the Mirror Image. di than machining the same tool path In
of machining operations can be repemed The main difference is (he reversal of
using the mirror image feaLUre of the That means a given
contml is no need for new calculatiol1s, so one quadrant can be repeated in another
this technique of programmi reduces the programming same mirror
time as well as the possibility of errors. Mirror image is Hand vs. Left Hand orientation
sometimes [he Axis Inversion function. This descrip- part orientation -
tion is accurate up to <:\ point. Although it is true that in mir-
ror image mode the axes will be inverted, but sev-
eral other will take TIllS makes
Mirror Image more accurate. who are
miliar with a thai the mirror
function In
IS on principle of symmetrical
known as the RighI Hand (RJH) and the
(Figure 4/-/).

UH
Part

Figure 41-2
The nrlflf':JnIf! applied a machined part

lhal each quadrant requires


function allows the re~
versa] changes automatically.

• Tool Path Direction


Figure 41-7
Right hand VS. Left hand as the orm!c/D,fe of mirror image Depending on the quadrant "'''''c; . . ,.<:.u for the mirror image,
the tOOl path directiOnal may affecl some or all of
Programming mirror image these activities:
basic rectangular
o Arithmetic sign of axis (plus or minus)
plies (0 quadrants. It also requires
lerpolation and applications of cutter o Milling direction (climb or conventional)

Earlier discussions established that are four quad- o Arc motion direction (CWor CCW)
raniS on a plane. The upper right area creates Quadran! I,
One or more
the upper len area is Quadrant II, left area IS
these axes are only
Quadrant IIf, and the lower right area is IV. Iflhe
used for mirroring
program zero is at the lower left corner
programming in the tirst quadrant.

393
394 Chapter 41

Ir IS
Y+
is no arc di- QUADRANT II (Q2) QUADRANT I (Q1)
i
of the mir- MI

<_ QUADRANT
~I
It 1 '\

...........
x- ,
,02
........... QUADRANT III (03) y_ OUADRANT IV (04)
G41

,
Figure 41-4
IJ Mirror axis and its effect on pan orientation
QUADRANT-
y-
III IV Programmable mirror image must be
supported by the control system
Figure 41·3
Effect of mirror image on tool path in different [J1l~llJr~/[Jrs
machining follows the program as IS. For exam-
• Original Tool Path if (he programmed path takes place In the second quad-
ram (using absolute mode G90), the normal X values will
The originallOol path program may the normal Y values will be positive.
quadrant. If there is no poims is always normal within the origi-
condition), the tool path is in quadrant programmed, when no mirror image is used,
ranl only. This is how the m~iorilY of all the machining takes place in a mirrored quadrant, one
programmed. Once mirroring is or both signs will change.
Ihe original machining pauern - the
gardless in which quadrant it has been • Sign of Coordinates
Mirroring will always transfer the 'normal' sign depends on the quadran t of the coordi-
lool path) to another quadrant or quadrants. nate system used in programming. If programming in rhe
pose of the mirror image function. Quadrant /, both the X and Y axes have positive absolute
image requires Ihal cerlain conditions are mel. is the complete lis( for absolute values in all
conditions is definirion of the mirror axis .

• Mirror Axis x+ y+
Since there are four quadrants, they provide in fact lou I' Quadrant II x- y+
available machining areas. These areas are divided by two
machine axes. Mirroring axis is Ihe machine axis about III x- y-
which all programmed motions will flip' over. Figure 4 J-4 Quadrant IV x+ y-
shows the mirror axes and theIr effect on pan orientation in
quauranls. mirror axis can be defined in two ways:
o At the machine ... by the eNC operator
o Through the program ... by the eNC programmer

typical person who is responsible for the flip' is also


lis!ed. method allows one selection of the following
possibil it ies:
1. Normal machining - no mirror image set
2. Mirrored machining about the X axis
3. Mirrored machining about the Y axis
4. Mirrored machining about the X and Yaxes
MI IMAGE

• Milling Direction MIRROR IMAGE BY SETTING


milling can be programmed
or climb milling mode. When A mirror image can be set al [he control unit No
lool motion defined in climb milling are required. Program is relatively
llllflTIf..1l.1 I, mirrored machining in Ihe tool motion for one quadrant only Not
rants will as follows: mirrored wHhout a good plan first- it must
with mirror image in mind .
o Mirrored in Quadrant II ... Conventional mode
o in III ... Climb mode • Control Setting
o Mirrored in Quadrant IV ... Conventional mode Most conlrols have a screen setting or switches dedicated
Il is importanllo understand the machining mode when
(0 mirror image set at the controL Both designs allow
nn,.'r""", to set certain parameters in a friendly way,
A conventional machining mode may
ll>lnIO'~r of overwriting other parameters by error.
not In may negatively affect the surface
a display similar 10 Ihis
tolerances.
MIRROR IMAGE X-AXIS 0 (O:OFF 1:0N)
• Arc Motion Direction MIRROR IMAGE Y-AXIS:::: 0 (O;OFF LON)
to the tool path that will happen only
where mmoring for both axes
when a is mirrored, is the rotation direction of
an arc. Any clockwise arc programmed will become coun- To apply X axis mirroring only,
terclockwise arc one axis, and
versa. is direction,
MIRROR IMAGE X-AXIS :::: 1 (0 : OFF 1: ON)
based on Quadrant I: MIRROR IMAGE Y-AXIS .. 0 (0 : OFF 1: ON)
o Quadrant!·
To apply {he Y mirror, the display must show
Quadrant II -
Quadrant III - MIRROR IMAGE X~AXIS :: 0 (O:OFF l:ON)
IV - MIRROR IMAGE Y-AXIS 1 (0: OFF 1: ON)
o Quadrant I . Original arc is CCW:
LO mirror about both axes
Quadrant Ii - CW will ON for both axes:
Quadrant III - cutting CCW
QuadranUV . CW MIRROR IMAGE X-AXIS 1 (O:OFF 1:0N)
MIRROR IMAGE Y-AXIS:::: 1 (O:OFF l;ON)
The control will automatically perform G02 as
G03 and G03 as G02 For the majority of to return (0 the nonnal
machining applications. arc motion direction change program both and Y axes is zero:
should not the both Ihe mill-
ing direction and MIRROR IMAGE X-AXIS 0 (O:OFF 1:0N)
Figure 41-3. MIRROR IMAGE Y-AXIS 0 (0 : OFF 1: ON)

• Program Start and ~:.

y
When a part IS with intent to use the mir~
ror image, make sure to use a carefully thought out pro-
ON
!ITaTIIlllilll' Ihat uses a different technique MIRROR
fhan whe~ programming in a
[MAGE
(wilhout {he XOFF
mirror image). During all motions in Ihe o YOFF
program, with the zero return, will be
mirrored, when the mirror on. That means x
the following considerations
ON
1. HOW the program is MIRROR
2. WHERE the mirror image will be IMAGE
3. WHEN the mirror image will canceled
OFF
Start and end of the program [hilt is to is usu-
Figure 41-5
ally al the same localion, typically at
Togg/e switches of mirror
Chapter 41

Y+ j G54
'--

• Programming· Manual Mirror Setting o


is a drawing with 3 holes to be machined in
quadrants. It wil! be used to illustrate the
programming of the mirror image.
of
-0
, ....
-

0 0 0
0 N "<::t <.0

<:) 0 5.0

0- 0- 3.0 ,
Figure 41·7
0 -0 1.0
Programmed tool motion for the three holes located in Quadrant I
0
0 -0 j Y+

0 0 o
0 0

Figure 41·6 ....-.


Drawing to illustrate manual mirror image programming

For a manual milTor image. the 1001 mOlion will in one


quadrant only Figure 4)·7, then the other
quadrants - Figure 4 J-8 and example 0410 I:

04101
Nl G20
(CENTER DRILL THREE HOLES) ,
N2 G17 G40 G80 Figure 41-8
N3 G90 GS4 GOO XO YO 8900 M03 (XOYO)
Resulting tool motion in all four "" •• ,"'.".",. using mirror image
N4 G43 Zl.O HOI MOS
N5 G99 G82 X6.0 Yl.0 RO.l Z-0.269 P300 F7.0
N6 X4.0 Y3. 0 Control are automalic by the program. The
N7 X2.0 YS.O program image vary between machines,
N8 GBO ZLO M09 but the applicarion principles are the same.
N9 G28 ZL 0 M05
mo GOO XO YO RETURN TO XOYO)
N11 M3D • Mirror Image Functions
%
In these functions will be used:
Look at the tirst tool motion in It locates the cUlling
tool at XOYO, where there is no hole.' This is the most im-
portant block in the program for a mirror image, because il
is this location lhat is COl11mOI1 to all Jour quadranls~

PROGRAMMABLE MIRROR IMAGE


Mirror' is sel for each axis by an M
Most controls runction is in effect when another function is
by the control setting I both be elfective. To make only one axis
program. On the other function must be canceled first.
uses the M functions (or
uses ~ubprogram$. mode when th
MIRROR IMAGE 397

• Simple Mirror Image Example N2 G17 G40 GSO


N3M23 (MIRROR OFF)
Program 04102 for the 3 holes in Figure 4 J-6. can be. N4 G90 G54 GOO XO YO S900 MO} (XOYO)
changed to the programmable mirror image. Holes abso- NS G43 Z1.0 HOI MOS
Iute locations are stored i 11 subprogram 0415] : N6 G99 G82 RO.1 Z-O.269 P300 F7.0 LO
N7 M98 P4151 (QUADRANT Il
04151 N8 M21 (X-MIRROR ON)
N1. X6. 0 Yl. 0 N9 M98 PH51 (QUADRANT II)
N2 X4. 0 Y3. 0 mo M22 (Y-MIRROR ON)
ill X2. 0 Y5. 0 NIl M98 P41S1 (QUADRANT III)
N4 M99 Nl2 M23 (MIRROR OFF)
% Nl3 MJ2 (Y-MJ:RROR ON)
Nl4 M98 P4151 (QUADRANT IV)
The main program 04 J 02 calls the subprogram 04151 in N1.S GSO Z1. 0 M09 (CYCLE CANCEL)
different quadranls, using the mirror image functions. Note Nl6 M23 (MIRROR OFF)
the XOYO localion is common to all four quadrants. NJ.7 G28 Zl. 0 MOS (Z MACHINE ZERO)
Nl8 GOO X4.0 Y6.0 (CLEAR ATe LOCATION)
N19 M30 (PROGRAM END)
04102 (MAIN PROGRAM)
%
N1. G20

150
01/8 DRILL
0.25 DEEP 0.50
12 HOLES
0.125 R1.00 RO.1S (3)

0.25 SLOT DEPTH


'00

T
l 0.50
4.00
o ·.-.-00 o
o 00 o 0.125

ALL QUADRANTS ARE


I SYMMETRICAL ABOUT
THE CENTER LINE
00

L
MATERIAL:
4.00 AL PLATE - 4 x 4 x 1/2
Figure 41-9
Comprehensive example of programmable mirror image Uses main program 04103 and subprograms 04152 and 04753
398 41

• Comp Mirror Image Example - 1/8 DIA SHORT DRILL)


NI G17 G20 G40 GSO G49 BLOCK)
example of a mirror lmage applical wilh N2 TOI M06 (TOOL CHANGE)
mollons will use two culli lools LO N3 G52 X2.0 Y2.0 M23 (MIRROR OFF)
drawing in Figure 4 N4 G90 G54 GOO XO yO SIBOO M03 T02
aUiomutlc lool N5 G43 ZI.O HOI MOB
No G99 GBI RO.I Z-O.269 F4.0 LO
arc needed - one N7 M98 P4152 (QUADRANT I)
one ror
the slot milling in
Ne M2l
N9 M98 P4152
(X-MIRROR ON)
(QUADRANT II)
NlO M2:>' (Y-MIRROR ON)
04152 (SUBPROGRAM - DRILLING) NIl M98 P41S2 (QUADRANT I II)
N1 XO.125 YO.125 Nl2 M23 (MIRROR OFF)
N2 Xl. 5 IN X)
N13 M22 (MIRROR ON)
N3 XO 125 Yl. 5 (HOLE IN Y)
NI4 M98 P4lS2 (QU1UlRANT Dl)
N4 XO YO LO (NO HOLE AT PLATE CENTER) Nl5 GSO M09 (CYCLE CANCEL)
N5 M99 <SUBPROGRAM 04152 N16 M"23 (MIRROR OFF)
% N17 G52 XO YO
NIS G28 ZO.l MOS
04152 contains only (he lhree hole loca- N19 GOO X4.0 Y6.0 (CLEAR ATC LOCATION)
l. The cycle call is not included in lhe N20 MOl (OPTIONAL STOP)
lhe return to the center (N4) is
mode but wilh lhe LO (T02 - 1/4 DIll. CENTER CUTTING END MILL)
N21 T02 M06 (TOOL T02 TO SPINDLE)
04153 (SUBPROGRAM - MILLING) N22 G52 X2.0 Y2.0 M23 (MIRROR OFF)
N1 GOO X1.S Yl.S (~n,1"I''I4'O OF SLOT) N23 G90 G54 GOO XO YO S2500 M03 TOI
N2 GOI Z-0.25 F3.0 N24 G43 ZO.l H02 MOS
N3 G03 XO.5 YO.5 10 J-I.O FS.O N25 ].198 P4153 (QUADRANT I)
N4 GOI Xl. 5 N26 M21 (X-MIRROR ON)
N5 G41 DOL X1.365 YO.4SS (SLOT START) N27 M98 P4153 (QUADRANT II)
N6 G03 XI.S YO.35 IO.135 JO N28 M22 (Y-MIRROR ON)
N7 XI.55 YO.S 10 JO.15 N29 M98 P4l53 (QUADRANT III)
N8 Xl.S YO.65 1-0.15 JO N30 M23 (MIRROR OFF)
N9 GOI XO.7254 N31 M"22 (Y-:MIRROR ON)
NlO G02 XO.6754 YO.7 10 JO.OS N32 M98 P41::i3 (QUADRANT IV)
Nil XO.677 YO.7125 10.05 JO N33 M23 (MIRROR
Nl2 XI.5 YI.35 10.823 J-0.2125 N34 G52 XO YO M09
N13 G03 XI.65 Yl.S IO JO.lS N35 G28 ZO.l MOS
N14 Xl.S Yl.65 1-0.15 JO N36 GOO X4.0 Y6.0 (CLEAR ATe LOCATION)
NlS XO.35 YO.5 10 J-l.15 N37 IDO (PROGRAM
N16 XO.s YO.35 10.15 JO %
N17 G01 Xl. 5
NlB G03 Xl.635 YO.48S 10 JO.135 In order to use the
N19 GOl G40 Xl.S YO.S (SLOT END) zero must be defined on mir-
N20 GOO ZO.l two lines (axes) arc required
N21 XO YO (MOTION TO PLATE CENTER) center plate must be the program LCro.
N22 M99 (S"CIBPRCX:;R)IM 04153 END) to relum La the X and Y machine zero,
% tool or at the end of the program.
area for the too! change IS aillhat is
Quadranl I IS also used in for one
slol. 1lle machining slarts with Ihe cutler at the slot center-
line, roughing the radius Ihe walls. culler radius MIRROR IMAGE ON CNC lATHES
offset i::, used and SIOI is fini La The subprogram
ends at the plate cenler in N2 I, the same as in drilling. The Mirror Image function has ils main aUIJtl~.'"
program 04103 uscs two ff more lools machining center. lathes, this
are used, the pwgramming technique will nOI change. lathe wilh two tulTets, one on each
linc. mirroring wii] use the X
04103 (MAIN PROGRAM) cenler I as the mirror axis and, in effect,
(USES SUBPROGRAMS 04152 AND 04153)
programming melhod for both lurrets.
(XO YO LOWER LEFT CORNER - ZO WORK TOP)
(M21 = X-MIRROR ON ----------------------) Machining with mirror image can be used
(M22 ~ Y-MIRROR ON -------------)
with other lime saving features, such as le
(M23 = MIRROR OFF --------------------)
Rotation Scaling FUllction.
COORDINATE ROTATION

A 1001 malion creates a pall ern , conlour or a ROTATION COMMANDS


pockel that can about a defined point by speci-
fied angle. With this control feature, there are many oppor- rotation uses two preparatory
tunilies Lo . ng process much more flex- 10 turn feature ON or OFF. The two G
ibe and equally very powerful programming trolling the rolation are:
fealure, usually a control option, is called the Coor-
dinate System Rotation, or Coordinate Rotation.
ti.ition ON
One of the mOSI i
talion IS a program thai is Cooldirlale sySlem rotation OFF
tation but machined at an
specificalions). The G68 command will activale thc coordinate system
and vertical orientation, which means thai the motion rotation, on the cemer of rOlcoion (also known as the
takes place program ortho- pivot point) and of rotation:
graphic tool posi-
lions

tBf where ...


1
x Absolute X of the center of rotation
y Absolute Y coordinate of the center of rotation
R The angle of

• Center of
center of rolation
which the rota-
defined by two differ-
plane, X and Y
for the G 17 active
(Olalion point coordinatcs
0.65 and GI9 will use as the point coordinates. The
\I plane selection command G 17, G 18 or G 19 muSI be en-
1- -- tered into the program unytime the rotation com-
mand G68 is issued.

Figure 42-1 If the X and Y coordinate arc not srecilied with


Original orthogonal object (a) and a rolated (b) the G68 command as the center of rotation (in the G 17
plane), the current 1001 position will
The above figurc (a) shows an orthogonal orientation of a center of rotation. This method is
rectangle. the figure below (b) shows the same recommended approach Ir1 any
rotated by 10° in the counterclockwise Manual
it is much easlcr to program the 1001 path for (a) and • Radius of Rotation
the control system change it (0 a tool path The G68 angle
figure (b). The coordinate rotation feature is a R, are cell-
lion and must be the part of the control The number of decimal places L)i"
lei: R amount will be-
Mathematically, the coordinale rotation is a come amount of the angle. R nes a CCW
requires only three items to define a rotated , negative R defines a CW rotation
of [he aogle of rotation, the
400 Chapter 42

For (l moment, ignore the rotation angle and program the

, part as if it were oriented in an orthogonal position, that is


perpendicular to the axes, as shown earlier in Figure 42-4_
For actual cutting, decide whether the approach tool mo-
CCW== + tions will be included in the rotation or not. This is a very
,- important decision. In Figure 42-5 are the two possibilitie's
a / CENTER OF ROTATION and the effect of coordinarc rotation on program zero. In
both cases, the approach tool path starts and ends at the
same location of X-I.O and Y-l.O (clearance location).

r -

CW==- PROGRAM ZERO ~ \


'CENTER OF ROTATION J
(ROTATED) ,, __ . - ..
b
Figure 42-2
f;-\
CENTER OF , , \ PROGAAM ZERO
Direction of coordinate rotation, based on the center of rotation: ROTATION = X-10 Y-i.0 ~ (ORIGINAL)
( a J Counterclockwise direction has a positive angle R
( b) Clockwise direction has a negative angle R

For a basic programming example, we use a simple pan


shape that is easy to visualize. such as a rectangular sbape
with a {mel corner radius - Figure 42-3. CENTER OF ,
ROTATION == XO YO -~, ____ ._____ -\ _\

~\
0
'-15
\ \ PROGRAM ZERO
\ (UNCHANGED)

Figure 42-5
Comparison of the programmed tool path (solid line)
and the rotated tool path (daShed line):
( a) Program zero included in the rotation
( b) Program zero not included in the rotation

Figure 42-3
The following program 04201 illustrates the above ex-
Pari oriented as per engineering drawing specification
ample (a) , in Figure

42·5, which does include the proaram
0

The actual lool path, includmg the C.lpproach towards the zero rolallon. It the program zero is not to be rotated, in-
part and the depanure from the pan, is not normally in- clude only the part profile lool path between the G68 and
cluded in the engineering drawing. Be careful here - ir the G69 commands, and exclude the toot approach or depar-
approach and/or deparlure molions are i nc\uded in the rola- ture motions, Also note the G69 in block N2 - the cancella-
tion. the program zero may also be rozated. In the Figure lion is included there for added safety.
42-4, the orientation of the part i~ 15° counterclockwIse.
04201
based on the lower len corner.
N1. G20
N2 G69 (ROTATION CANCELED IF NEEDED)
R15
N3 Gl7 GSO G40
1-
N4 G90 G54 GOO X-l.O Y-l.O S800 M03
N5 G43 ZO.l HOl MOB
30 N6 GOl Z-O.375 FlO.D
N7 G68 X-I.D Y-l.O RlS.O
NB G41 X-O.S Y-O.S DOL F20.0
N9 Y3.0
5,0 NlO X3. 5
Nll GOl XS.O Yl.5 Rl.S
Figure 42-4 N12 GOl YO.S
Part oriented as per program, using the G68 command
Nl3 X-D.S
COORDI ROTATION 401

Nl4 G40 X-l.O Y-l.O M09


N15 G69 (ROTATION ......,."".....:.....u,"-I
N16 G28 X-l.O Y-l.O Zl.O M05
N17 MJO
% PART
PER DWG
for an orthogonal
but machined at 15°,
-- WORK
block N8 conlains cuner radius offset a
or compensation programmed will
coordinale rolation lakes place .

• Coordinate Rotation Cancel PART

Command the coordinate rOlation funclion


and returns the control system to its normal onhogonal
condition.
block, as in (he
fy (he command in a separate
-
ROTATION NOT SHOWN
WORK AREA

• Common Applications
As mentioned already,
Coordinare rotation appJied to lit a long part within rhe work area
nothavelhe
they may have il
lion can be very is lypically than the actual work area, 10
allow for setup and additional space. Work area is used for
programming and the setup as well, and is always de-
o If the nature of the work includes orthogonal parts fmed by the limits motions. Work area must be able
machined at an angle per drawing requirement). 10 accommodate all tool motions and clear-
The earlier example belongs to this category. ances, Including cuLLer radius offset In effect
o If there is a short X Ytravel on the machining center
and the part is positioned on at a known angle, PRACTICAL APPLICATION
because of the limited machine travel.

The second application is example of [he co- In many cases, used very efficienlly
ordinate system rolalion, thal two major condi- togelher with Applicalions such as
lions are satisfied: milling or machining at boIL circle loca-
lions are The following detailed
o Rotated part must fit within the work area example in drawing that looks
o The angle ofthe setup must be known deceptively simple but a bit of programming.
In the Figure 42-6, a The requirements and
orthogonally, but it can opmenl must be
machine all 7 pockets with a
This method is quite type). To make the
ble to be implemented. A plunging to the full
placed within the work area length ma>(lmum deplh of' cut.
ever, there are cases when this Slack for finishing of the
be very useful, even if it is nOI LaO common. illustration addition, all sharp
only shows the general principles of application. If the chamfer. In all, only
positioning angle is nol known, use an indicalor at two 10-
(?) 30 FACE MILL
calion,:; of the mourlled part und Calculate illrigollulllt:tri- o 1/4 CENTER CUTIING
cally. In some cases, a special fixture for o 3/8 CHAMFERING
such a setup,
is definitely a lapp]
Not is expected.
With gl experience, il to IlIteq)l"et {he
program. Hopefully, [he notes will help.
2 42

-
-- - -

,,

7 EQSP POCKETS
4 x 3 x 1/2 SEE DETAIL

nmllrPflPn',IVP C"CHIfWC of coordinate system rotation - program 04202

The main program x.J-r.'-Vk


of four sUbprograms. Although some
RO.15
difficult to underSland, one
cal. In two subprograms will
G91 G68 XO YO R51.429

Its purpose is 10 shift (0 next The


XOYO remain the same - will CUJ3'U'UI.\.>. only
the angle will increment, because of

This example is not only a


nale system rotation, but also
niques of using subprograms and
lures. Wilhoul Ihe advanced programming
program could be done as well, but il would
ger and il would be virtually Impossible 10
machine. The complete program that follows
heavily documented and should present no "'~r',",',~..,..,
Figure 42-8 low its progress and structure.
Top and front view of the detail nrnl1rr!'lm 04202
COORDINATE ROTATION 403

04202 (CooRD.mATE SYSTEM ROTATION)

(7 POCKETS - PETER SMID - VERIFIED ON FANUC 15M CNC SYSTEM)


(PARAMETER #6400 BIT #0 - RIN - MUST BE SET TO 1 TO ALLOW G90 AND G91)
(WI.TE:RIAL 4 X 3 X ALUMINUM PLATE - HORIZONTAL LAYOUT)
(XOYO IS CENTER OF 2. 0 DIA CIRCLE - ZO AT THE FINISHED TOP OF THE

. . . . . .. 3.0 DIA FACE MILL - SKIM COT TO CLEAN TOP FACE)


(T02 •• .•.. DIA CENTER CUTTING END MILL - MAX DEPTH OF cur O.OS)
(T03 ...•.•• 3/8 DIA c:.H1>.MFERING TOOL - 90 DEGREES - MINIMUM CHAMFER)
/ D51 - OFFSET FOR ROUGHING POCKET WALLS .... 0.140 SUGGESTED - 0.0075 PER
/ D52 OFFSET FOR FINISHiNG POCKET WALLS ... 0.125 SUGGESTED)
(T03 / D53 - OFFSET FOR CHAMFERING . . . . . . . . . . . . . . . 0.110 SUGGESTED - TO BE ADJUSTED)
(INCREMENT OF ROTATION ••••••...•••............... 360/7 = 51.429 DEGREES)

(T01 3.0 DIA FACE MILL - SKIM COT TO CLEAN TOP FACE)
Nl G20 (ENGLISH UNITS)
lO G69 (CANCEL COORDINATE ROTATION IF ACTIVE)
N3 G17 G40 GSO Tal (SEARCH FOR TOl IF NOT READY)
N4 M06 (TOl TO THE SPINDLE)
N5 G90 G54 GOO X-l.375 Y-3.25 S3500 M03 T02 (Xl' START POSITION FOR FACE MILLING)
N6 G43 Zl.O HOl MOS (Z CLEARANCE FOR SETUP - COOLANT ON)
N7 Gal ZO FlO.O (TOP OF FrnISHED PART FOR FACE MILLING)
N8 Y3.125 F15.0 (FACE MILL LEFl' SIDE)
N9 GOO Xl. 375 (MOVE TO THE RIGHT SIDE)
NlO G01 Y-3.25 (FACE MILL RIGHT SIDE)
Nll GOO Zl.0 M09 (z AXIS RETRACT - COOLANT OFF)
Nl2 G28 Zl.0 MOS (Z AXIS HOME FOR TOOL CHANGE)
N13 Mal (OPTIONAL STOP)

(T02 - 1/4 DIA CENTER CUTTING END MILL - MAX DEPTH OF CUT 0.05)
N14 T02 (SEARCH FOR T02 IF NOT
N15 MOS (T02 TO THE SPINDLE)
Nl6 G69 {CANCEL COORDlliATE ROTATION IF ACTIVE}
N17 G90 GS4 GOO Xl.O YO S2000 M03 T03 (XY START POSITION FOR THE CENTER OF POCKET 1)
N18 043 Zl.0 H02 MOS (Z CLEARANCE FOR SETUP - COOLANT ON)
Nl9 GOl ZO.02 F30 0 (CONTROLS 0.005 LEFT ON THE POCKET BOTTOM)
N20 M98 P4252 L7 (ROUGH AND FINISH MILLING OF SEVEN POCKETS)
ml G69 (CANCEL COORDlliATE ROTATION IF ACTIVE)
lO2 G90 GOO Zl.O M09 (Z AXIS REl'RACT - COOLANT OFF)
lO3 G28 Zl.O MOS (Z AXIS HOME FOR TOOL CHANGE)
m4 MOl (OPTIONAL STOP)

(TO) - 3/8 DIA CHAMFERING TOOL 90 DE(;mEES)


ms T03 (SEARCH FOR T03 IF NOT READY)
m6 M06 (T03 TO THE SPINDLE)
N27 G59 COORDINATE ROTATION IF ACTIVE)
lOS GSa G54 GOO X-2.5 Y-2.0 S4000 MOl TOl (Xl' START POSITION FOR PERIPHERAL CHAMFERING)
lO9 043 ZL 0 HOJ M08 (Z CLEARANCE FOR SETUP - COOLANT ON)
N30 GOl Z-O.075 F50.0 (ABSOLUTE DEPTH FOR CHAMFERlNG Z-O.075)
N31 G4l X-2. 0 D53 F12. 0 (APPROACH MOTION AND RADIUS OFFSET)
N3 2 Yl. 5 (CHAMFER LEFT EDGE)
N3 3 X2. 0 TOP EDGE)
N34 Y-L 5 RIGHT EDGE)
N35 X-2. 5 BOTTOM EDGE)
N36 GOO 040 Y - 2.0 TO START POINT AND CANCEL OFFSET)
N37 ZO.l ABOVE PART)
N38 XL 0 YO TO THE CENTER OF POCKET 1)
N39 M9B P4254 L7 SEVEN POCKETS)
N40 G69 COORDINATE ROTATION IF ACTIVE)
N41 G90 GOO ZL 0 1409 (Z AXIS RETRACT - COOLANT OFF)
N42 G28 Zl. 0 MaS (Z AXIS HOME FOR TOOT; CHAN'GE)
N43 X-2.0 Y8.0 (PART CHANGE POSITION)
N44 M30 OF MAIN PROGRAM 04202)
%
404 Chapter 42

04251 (POCKET TOOL PATH AT ZERO DEGREES - POCKET 1)


mOl G91 Z-O.OS (START AT POCKET CENTER - FEED - IN BY O. 05)
m02 M98 P4253 (POCKET CONTOUR - 04253 USED FOR ROUGHING)
ID03 M99 (END OF SUBPROGRAM 04251)
%

04252 (SUBPROGRAM FOR MILLING POCKETS)


mOl M98 P4251 D51 FS.O L5 (ROUGH TO ABS" DEPTH Z - 0 . 230 IN FIVE STEPS)
N202 Z-O.OOS (FINISH TO FINAL ABSOLUTE DEPTH Z-0.235)
N203 M98 P4253 DS2 F4.0 (POCKET CONTOUR - 04253 USED AT FULL DEPTH)
N204 G90 GOO ZO.02 (RETURN TO ASS. MODE AND Z AXIS CLEAR POS.)
N205 G91 G68 XO YO RSl. 429 (NEXT POCKET ANGLE INCREMENT)
m06 G90 Xl.O YO (MOVE TO NEXT ROTATED XY AXES START POSITION)
m07 M99 (END OF SUBPROGRAM 04252)
%

04253 (POCKET TOOL PATH AT ZERO DEGREES - POCKET 1)


N30l G41 X-O.2 Y-O.05 (LEAD-IN LINEAR MOTION)
N302 G03 XO.2 Y-O.2 10.2 JO (LEAD-IN CIRCULAR MOTION)
NJ03 GOl XO.225 YO (CONTOUR BOTTOM WALL ON THE RIGHT)
N304 G03 XO.1S YO.IS 10 JO.15 (CONTOUR LR CORNER RADIUS)
N30S GOI XO YO.2 (CONTOUR RIGHT SIDE WALL)
m06 G03 X-O.1S YO.15 1-0.15 JO (CONTOUR UR CORNER RADIUS)
N307 G01 X-O.4S YO (CONTOUR TOP SIDE WALL)
IDOS G03 X-O.15 Y-O.lS IO J-0.1S (CONTOUR UL CORNER RADIUS)
ID09 G01 XO Y-O.2 (CONTOUR LEFT SIDE WALL)
IDIO G03 XO.1S Y-O.lS IO.15 JO (CONTOUR LL CORNER RADIUS)
N311 G01 XO.225 YO (CONTOUR BOTTOM WALL ON THE LEFI')
N3l2 G03 XO.2 YO. 2 IO JO.2 (LEAD-OUT CIRCULAR MOTION)
ID13 GOI G40 X-0.2 YO.OS (LEAD-OUT LINEAR MOTION)
N314 M99 (END OF SUBPROGRAM 04253)
%

04254 (SUBPROGRAM FOR CH.AMF'ERING POCKETS)


N40l G91 GOI Z-O.175 F50.0 (CHAMFERING DEPTH FOR POCKET AT ABS. Z - 0 . 07 5)
N402 M98 P4253 D53 FB.O (POCKET CONTOUR - 04253 USED FOR CHAMFERING)
N403 G90 GOO ZO.1 (RETURN TO ABS. MODE AND Z AXIS CLEAR POS.)
N404 G91 G68 XO YO R51.429 (NEXT POCKET ANGLE INCREMENT)
N40S G90 Xl.O YO (MOVE TO NEXT ROTATED XY AXES START POSITION)
N106 M99 (END OF SUBPROGRAM 04254)
%
SCALING FUNCTION

Normally, a programmed lool motion a • Scaling Function Usage


center lhe dimensions of the
with culler radius offset in effect. Occasionally, In indusfry, Ihere are many applications for I

when the machining lOol path thal path. The result is many hour.:; of extra work
1001
programmed once must be repealed, but ma- are some of the typical possibilities a
chined as smaller or larger than the original. yet slil! keep il scaling function can be beneficial:
at Ihc same lime. To achieve this goal. n can· o Similar parts in terms of their geometry
called the Scaling Function is used. Note the
following two imponant ilems: o Machining with built-in shrinkage factor

o function is an option on many controls o Mold work


may not be available on every machine o to metric and metric to conversion
o Some may be used tor
function as well
is used 10 make a new
For even flexibility in programming, the than the original one. Scaling is
can with other (increasing size) or redllc-
functions, namely with Datum Mirror Image alld an ex i51! ng loa I ra Ih - Fig tire /.
ordinate Ro((lfion - described in

DESCRIPTION
a scaling factono all
means the programmed value
Scaling process is nothing more
than multiplyi value by the scaling
factor, based on a scaling center point. The programmer Magnification
Reduction I
must supply both scaling center and the scaling Jaclor.
Through a control scaling can be made Figure 43·1
effective or i of the three main axes. but Comparison of a part reduction (left) and magnification (right)
not for any additional axes. majority of scaling is ap- wifh a part in full scale (middle)
plied to Ihe X and Y axes only.
It is important to ce.rtain values and preset PROGRAMMING FORMAT
amounts are not function, namely
various offsets. The are not To supply the control unillhe rf'flIllH"P,

changed If (he grammer mllst provide


o Cutter radius amount /D o Scaling center ... Pivot polnt
o Tool length offset amount /H o Scaling factor ... Reduction or Magnification
o Tool position offset amount /H
The most common preparatory command
In fixed are (wo also function is 051, canceled by the eomm,md
no! affected by the scaling
o X and Y shift amounts in and GSO Scaling mode cancel

o Peck drill depth Q in G83 and G73 G51 Scaring mode active
o Stored relief amount for G83 and G73
406

Scaling function uses program formal:

e where ... In order to

I of the scaling center (absolute)


J of scaling center (absolute)
K of the scaling center (absolute)
p (0.001 or 0.00001 increment)

should always be programmed In a


to the machine zero rc- AS
and should always be
If the G92 is used for

function is activated. Other


can be active. including the work A1 A4
through G59.

• Scaling Center

C :: SCALING CENTER
15M uses IIJIK La specify the center point of scal-
in XlY/Z axes respectively. These values are on the
.. "r,,.,,,,'\""\n't>ri as ahsolute values. As the center point con-
location of the scaled tool pafh, il is important to A I to A8 and points B 1 to B8 in the illustration
know one major principle: contour change points of the Lool path.

A1 to A8 is the original path,


N . . FULL SCALE "MAGNIFICATION 81 to 88 is the scaled tool path
C, with a scaling factor LESS than 1.

If the tool path 81 to 88 is the original path,


tool path A1 to AS is the scaled tool path about
center C, with a scaling factor GREATER than 1.
connecting individual points are used
a visualization of the scaling function.
from scaling center C, the line always connects Lo
contour change point. The B point is always a midpoint
tween the center poim C and the corresponding A point In
it means that the distance between C and 85 and
AS is exacl1y lhe same.

b • Scaling factor

maximum scaling factor is related to !.he smallest


factor. The more advanced CNC can set
- through a system parameter - to preset the
c scaling factor to either 0.001 or 0.00001.
can only be scI LO 0.001 as
Figure 43-2
Scaling faclOr is independent of the units
Comparison of scaled part location based on [he center the or G21.
SCALING FUNCTION 407

is set to 0.001, the largest o Using 0,00001 minimum scaling factor:


When the smallest
scaling factor is set to 0.00001, largest programmable rom> Inch = 12.7 rom x 0.03937
scale is only 9.99999. Given the choice, the programmer has o 499999 mm
to decide bet\veen . at cost of precision and rom> Inch 12.7 rum x 0.03938
precision at the cost of the majority of scal- 0.500126 rom , error of 0.000126
ing applications, the 0.001 factor the smallest, rom > Inch = 12.7 rom x 0.03936
is quite sufficient. Common terms factors are: o 499872 mm ". errorofO.O<XH28
o Scaling factor > 1 " Magnification are rather extreme
o Scaling factor = 1 , " No is to be applied, for example,
(magnification) or 0.95 (reduction) is
o Scaling factor <: 1 expected accuracy of the fmal precision.
1 block, the
by default. PROGRAM EXAMPLES
• Rounding Errors in Scaling The first '-''' ..AU..,.' .... is simple - Figure 43-4.
conversion process should
some inaccuracies, mainly due to
values. For example, the / - R1.0
uses the standard multiplying factor which is an ex-
act conversion factor. In order to convert a T\rl'\l'Ir'!>'rn

1.5 inches to its


in i.nches must be
.r- 00.5
rom = 1.5 inches x 25.4 = 38.1 rom

in this case is 100 0.75


",-,,,n,,,,,r<,,yr." accurate. Now
to convert the value of 1.5625 '1
I
rom 1.5625 inches x 25.4 = 39.6875 rom

is no problem. The resulting


shown is also 100 percent accurate within the Figure 43·4
normal programming in '-''',ISH•• n
Drawing to illustrate scaling funcfion programs 04301 and 04302

p.rogram., using a
one cut around the part periph-
without any scaling.

04301 (BASIC PROGRAM USING GS4 - NOT SCALED)


Nl G20
N2 G17 G40 GSO
N3 G90 GOO G54 X-l.25 Y-l.2S S800 M03
N4 G43 Zl.O HOl MOB
error amount with different N5 GOl Z-O.7 F50.0
N6 G41 X-0.75 001 F25.0
nun, which equals exactly to 0.500 N7 Yl.75 FlS.O
o Usi 0.001 minimum scaling factor:
N8 n.5
N9 G02 X2.5 YO.7S IO J-l 0
NlO GOl Y-O. 75
rom > Inch 12.7 rom x 0.039 Nll X-L2S
= 0.4953 inches ,., error of 0.0047 Nl2 G40 Y-L 25 M09
rom > Inch 12 . 7 rom x O. 038 Nl3 GOO Zl.O
"" 0.4826 inches ." error of 0.0174 N14 G28 Z1.0
rom> Inch 12.7 rom x 0.040 Nl5 G28 X-l.25 Y-l.25
Nl6 M30
= 0.5080 inches '" error of 0.0080
%
408 Chapter 43

Program 04302 is a modified version of 0430 L II i 11- ,""""'--- 4.0


eludes a scaling factor value of j .05 - or 5% magnification-
RO.5
and scaling center at XOYOZO. KO Cdn be omitted in G51.

04302
(PROGRAM 04]01 SCALED DY 1. OS FAcroR)
I'll G20
N2 G17 G40 G80
N3 GSO (SCALING OFF) 3.0
N4 G90 GOO G54 X-l. 25 Y-l. 25 S800 M03
NS G43 Zl.O HOl MOB
N6 GSl IO JO KO PI.OSO (FROM XOYOZO)
NI GOl Z-O.7 FSO.O
N8 G4l X-O.7S DOl F2S.0
N9 Y1.75 FIS.O
I'110 Xl. S Original contour
I'lll G02 X2.5 YO.7S IO J-l. a
,
I'll2 GOl Y-0.7S
N13 X-1.25
'\ .... -

Nl4 G40 Y-I. 2S M09 \.- START/END POINT (X-1.0 Y-1.0)


N1S GSO (SCALING OFF)
I'll6 GOO Zl.O Figure 43·5
I'll7 G2S Z1.0 Original contour in full scale
NlS G28 X-I. 25 Y-1.2S
Nl9 M30
%
7/8 SCALE AT Z-O.350!

Program 04303 is more complex. Figure 43 -5 is the orig- I Z-O 500 3/4 SCALE AT Z-O.2S0 I
inal conlour. Figure 43-6 shows contour details with new
scales and depth, Program starts with the smallest scale and Z-0.12SI
works down. Note the very imponant blocks N712 and
N713. Each contour must start from lhe original start point!

04303 (MAIN PROGRAM)


(SCALING FUNCTION - VERIFIED ON YASNAC ISO)
(TOI = 1.0 DIA END MILL)
N1 G20
N2 GSO (SCALING OFF)
N3 Gl7 G40 G80 TOI
N4 M06
NS G90 G54 GOO X-I. 0 Y-l. 0 S2500 M03
N6 G43 ZO.S HOl MOS
NI GOI Z-0.125 F12.0 (SET DEPTH)
Scaled contours
N8 GSl I2.0 J1.S PO.S (0.5X AT Z-0.12S)
N9 M98 P700l (RUN NORMJ\L CONTOUR)
Figure 43·8
NlO Gal Z-0.2S (SET DEPTH)
Nll G51 I2.0 Jl.S PO.7S (0.75X AT Z-0.2S0) Scaled contours at three depths
N12 M98 P7001 (RUN NORMAL CONTOOR) NlOS G02 X4.0 Y2.S RO.5
Nl3 Gal Z-0.35 (SET DEPTH) N706 GOI YO.S
N14 GSI I2.0 Jl.5 PO.875 (O.87SX AT Z-0.350) Nl07 G02 X3.5 YO RO.5
N15 M9S P700l (RUN NORMtIL CONTOUR) moa GOI XO.5
N16 M09 m09 G02 XO YO.S RO.5
N17 G2S ZO.5 MOS NllO G03 X-I.O Yl.S Rl.O
IDa GOO X-2.0 YIO.O mIl GOI G40 Y-I.O F1S.O
N19 M30 Nl12 GSO (SCALTI1G OFF)
% N713 X-I.a Y-l.a (RETURN TO ORIGINAL START)
N714 M99
07001 (SUBPROGRAM FOR G5l SCALE) %
(D51 '" currER RADTI7S)
NlOl GOI G41 XO D5l The scaling function offers many possibilities. Check the
m02 n.s FIO.O related control parameters and make sure the program re-
N703 G02 XO.S Y3.0 RO.5 flects the control settings. There are significant differences
m04 Gal X3. 5
between various control models.
CNC THE ACCESSORIES

machine can be equipped with additional ac- CHUCK CHUCK CLOSED


to il more functional or functional in a par- switch set to switch set to
licular way. III most CNC machines have at some IN OUT
additional either as a standard or as

are
a certain amount time to
lathes are also equipped with
accessones that arc usually
of the most noteworthy and typi-
additions (or features) of this kind are:

o Chuck control
o Tailstock quill
o 8i-directional turret indexing Figure 44-1
Part chucking - external
o Barleeder Note the setting of the CHUCK
Several other also be available as
some applications, such as ng, it is necessary
mable Opl
10 open and close the conlrol. Two M
o Parts catcher runctions Ihal conlrol the chuck or
ing arc normally available,
o Pull-out
o Tailstock and quill • Chuck functions
o Steady rest I follower rest Allhough the assigned
o Part stopper funclion'» may vary Cor
application is exactly the same.
o ... others as per machine design Typical M functions \0 conlrol arc:
Some of these are fairly common, so it is
worth lookjng at rhem in some detail and Wilh a fewexam-
ples of their programming

CHUCK CONTROL
Example:
In manual operations, a a or a special fixture programming procedure would Indue!.:
mounted on the a lathe normally opens and SLOp and dwell:
when the CNC a foot pedal. For
safety reasons, a chuck is cannot be opened. MOS (STOP SPINDLE)
because il is protected by an interlock. An- Ml.O {OPEN
Olher Important feature of G04 UO.l (DWELL 1 SEC:OND)
close depend on the method Ml.l (CLOSE CHUCK)
nal. A key switch is avail M03 (RESTART SPINDLE)
44-} shows the di
is a very si Il1pl i tied sequence. in which the clwd I I::.
are relative LO the the lime required for the bar (i'or example) 10 through to
, found on the ma- the stop posilion. Some barfeeders do not spin-
CLOSED - that has dle \0 \0 feed the bar Lhrough have a
special programming rouline of their own.

409
410 44

cfln also be used on {he machine, jaws may be hard (usually serrated for
mode in manual mode. (normally bored by the CNC operator to
II will Only soft jaws can be modified .

• Chucking Pressure
amounl of force required to clamp a
is called the chucking pressure. On most
is contTol1ed by an adjustable valve, usually in
Inil,mck area. Once the chuck pressure has been sel, il is
not changed very often. However, there are Jobs re-
the chucking pressure to be increased (tighter p) or
(looser grip) frequently, usually within lh~ same
Such special jobs will benefit from a
mabie chuck pressure control.

A very few CNC lathe manufnc!Urers offer a


pressure. If they do. it is ill
nOli-standard miscellaneous function, lor

Bored Diameter . Bored Bored Diameter


chucking pressure CORRECT I TOO TOO SMALL
Figure 44-3
Typically, the part has to reclamped in Soft jaws diameter bored rnnrprllU
either function can replace the olher,
lUrb lis position in [he holding If - one correctly bored
sure fcalUrc is present on the lalhe, In bmh incorrect ver·
supplied by tile lathe manufaclurer. or bOlh, may suffer.

TAllSTOCK AND QUI


Tailstock is iJ very common on a CNC lathe. Its
• Jaws main purpose is 10 n that is too long, (00 large,
or needs La be extra against the jaws, for ex-
to programming, but ample, In some turning operations. A tails[ock may
covers lips to Mosl chucks also be to support a finishing operation of a thin lubu-
Ihree jaws, spaced I 44-2. lar stock. or [0 supporl a parllhal has a shallow In
il from flying out. On the negative

-- o
usually in the way of lOol motions, so make sure

body
A typicaltailstock has three main

o Quill
o

All parIS are important In programming

• ilstock Body
body is the heaviest part of the latht! It
IS mounled 10 the hed orllle lathe, eilher manually during a
1 or lhrough a programmable option, hydraulically.
Programmable tai is norm<llly available only as a fac-
Figure 11-2
lory installed option and must be ordercrl :lIthe time ma-
Tvpical three-jaw chuck lor a CNC lathe
CNC LATHE ACCESSORIES 411

• Guill • Programmable Tailstock


Quill is the shiny cylinder that moves in and out of the Tailslock body is normally not programmable (only the
tailstock body. It has a fixed range of travel, for example, a quiJi is), but thiS feature IS available for many CNC lathes
3 inch travel may be found on medium size lathes. When as afactory installed option. That means it has to be or-
the tailstock body is mounted (0 (he lathe bed in a rixed ro- dered i[ when making the initial rurchase: the dealer cannol
silion, the quill is moved oul to support the part, or in, 10 al- adapt the option to the machine at a later date. Many differ-
Iowa part change. The part itself is supported by a center, ent Iypes of programmable tailstocks are availabk. for ex-
mounted in the quill. amrle, a slide-type thai moves left and right only, or a
swing out type, Ihat is out of [he way when not needed.
• Center A typical lailslock defined as programmable can be pro-
Center is a deVice thaI is placed into the quill wilh a ta- grammed using two non-standard M functions (check
pered end. held by a matching internal taper and is physi- these functions). For the example, a CNC lathe will use
cally in contact with the part. Depending on the design, if these two M functions:
the tallstock has an internal bearing, a dead center can be
used. If the tailstock has no imemal bearing, a live center Body of lailslock forward
must be used instead. Machined part has to be pre-centered
(on the CNC lathe or before), using the same anglc of Ihe M22 Body of t{]ilslOck backward
\001 as the lailstock center (normally 60°). A typical tail-
stock is illustrated in Figure 44-4.
On some CNC lathes. there may also be two additional M
functions available, one of them rOT clamping the tailstock,
the other for unclamping it. In many cases, the (Wo taiJs(ock
functions have the clamp/unclamp functions built-in.
Here is a lypical programming procedure [0 move a tail-
stock towards the part, do some machining Lind move it
back. Rather than presenting an actual programming exam-
pJe, let this procedure serve as a guide - fill-in the M func-
lions required for a particular CNC lathe:
1. Unclamp the tililstock body
2. Move tailstock body forward
Figure 44-4
3. Clamp the tailstock body
Typical rai/stock for a GNG lathe: 4. Move quill forward into the part
( 1) Tai/stock body (2 J Quill- OUT (retracted lor work change)
( 3) Center ( 4) QUlI/- IN (in work support position) 5.... do the required machining operations ...

6. Move quill backward from the part


• Guill functions 7. Unclamp the tailstock body
8. Move tailstock backward
Programming the tailstock quill motion is just about the 9. Clamp the tailstock body
same for the majority ofCNC lathes. There are two miscel-
laneous functions !har work the same way for a program- Some procedures take certain amount of time to com-
mable and non-programmable tailstock body. The two Iyp- plele, even i r [he time is measured in seconds. It is gent:ral!y
ical functions are: recommended to program a dwell function 10 guarantee !he
completion of one seep, before the next step ~tarts. A reVIC\\'
of Chapter 24 may help.
M12 Tailstock Cjui II IN orON;;;;; ilf:liw

• M13 Tailstock quill OUT or OFF = Inactive • Safety Concerns


When programming ajob lhat uses the railstock. s<l.fcty is
If the quill is supporting the part. il is in, using the M 12 at least a<; important as for other operations. The tool mo-
function. I f [he qui II is not supporti ng [he part, it is OUl, us- lion towards the part at (he (oo! rath beginning and its re-
i ng the M 13 funclion. For the setup, the M 12 and M 13 lurn La the lool change position is critical. The safest is an
functions may be used, and on many lathes, a toggle switch approach from the lool change position (ov.'ards the part
on the control is provided to operate the qUill. along the Z axis firs!. [hen the X motion. On return from a
clear position close to the work, reverse [he order - firs! re-
Spindle should be ON when the quill fully supports the Iract the X :1xi" nhovc (he pm!, fhplJ move the Z ilxis (both
<lxes usually move to a safe tool change position).
412 Chapter 44

BI·OIRECTIONAl TURRET INDEXING • Programming Example


This example is a complete program incorporating the bi-
AnOlher efficiency feature is a hi-directional turre! index- -directional indexing and also shows hoe to use a fully pro-
ing. Many CNC lathes have a so called hi-directional in- grammable tailstock. All tool mOlions are realistic but not
dexing built-in, Ihat means an automatic melhod of the tur- important for lhe example, The order of numbering the
reI indexing (the comrol decides the direction). However. rools all rhe turret may nol be consistent from one machine
there is a certain benefit in having a programmable 'lI1dex- (0 another! The Icrms!OIward and backward are related to
ing direction. If [hat fealure is avuilable on the CNC lalhe. such order. M functions described earlier are used here:
lhere will be two miscellaneous functions available to
program turret Indexing. BOlh functions are non-slI.1ndard, 04401
so check the machine 1001 manual. (BI-DIREcrIONAL INDEXING AND TAILSTOCK)
N1 G20 G99 IDS (SET INDEX BACKWARD)
Typical M functions for turret indexing are: N2 G50 81200 (LIMIT MAX RPM)
N3 T0100 (SHORT FROM T02 TO TOl WITH M1a)
N4 G96 5500 M03
M17 Indexing rorwilrd: TO j·-T02· TO] ... N5 GOO G41 X3.85 ZO.2 TOlOl MOB
N6 GOl ZO FO.03
M18 Indexing backward: ... T03-T02-TOl N7 x-O.O? FO.007
N8 GOO ZO.2
N9 G40 XlO.O Z5.0 TOIOO
Figure 44-5 shows an example of M 17 and M 18 func- N10 MOl
lions for an 8-sided turret.
N1l TOBOO (SHORT FROM TOl TO TOB WITH MlB)
N12 G97 S850 M03
N13 GOO XO ZO.2S TOSOS MOB
N14 GOl Z-O.3S FO.OOS
N1S G04 UO.3
N16 GOO ZO.25
N1? X1S.0 Z3.0 T0800
NI8 MOS (SPINDLE STOP FOR TAILSTOCK)
N19 MOl (OPTIONAL STOP)

N20 M21 (TAILSTOCK FORWARD)


N2l G04 U2. 0 (2 SEC. DWELL)
/
N22 Ml2 (QUILL IN)
1 N23 G04 Ul.O (1 SEC. DWELL)

N24 G50 M1.? (NO MAX RPM - SET INDEX FORWARD)


N2S T0100 (SHORT FROM TOa TO TOl WITH MJ.. 7)
Figure 44·5 N26 G96 5500 M03
Programmable bi-directiona! turret indexing N27 GOO G42 KJ.385 ZO.l TOlOl MOB
N28 GOl X3.685 Z-0.05 FO.008
In an example, a programmer is working with a lathe that N29 Z-2.S FO.012
NOO UO. 2
has all eight starion turret. Tool Tal will be used first, then
NOl GOO G40 X10.O ZS.O TOlOO
1001 T08 and then back to (Ool TO I again. There is no prob- N32 MOl (OPTIONAL STOP)
lem to index from TO 1 to T08 or from T08 to TO I, using the
automatic turret indexing direction. II makes sense. that a N33 T0200 (SHORT FROM TOl TO T02 WITH ill?)
bi-direclional turret indexing should be used for efllcicncy. N34 G96 5600 M03
A fter all. TO 1 and T08 may be far apart in numbers but Lhey NOS GOO 042 XJ.32S ZO.l T0202 Moe
are next to each other 011 a polygonal turret with eight sta- NJ6 G01 X3.62S Z-O.OS FO.004
tions. The control system will always choose the shorteST N37 Z-2.5 FO.006
method, in Ihis case, from TOl [0 T08 in backward direc- N3a UO.2 FO.01S
N39 GOO G40 X1S.0 ZS.O T0200
lion, then from T08 [0 TO I in forwru-d direction. N40 MOS (SPINDLE STOP FOR TAILSTOCK)
N4l MOl (OPTIONAL STOP)
If the automalic bi-directional indexing is not built in the
machine, It has to be programmed, assuming thcconlrol al- N42 ill3 (QUILL OUT)
lows thal. Otherwise, in normal programming, when going N43 G04 Ul.O (1 SEC. DWELL)
from T08 to TO I, the indexing motion will pass all olher N44 M22 (TAILSTOCK BACKWARD)
six stations. which is rather an inefficient method. The next N45 G04 U2.0 (2 SEC. DWELL)
example shows how and where to place the M ["unctions. N46 M30 (mID OF PROGRAM)
%
CNC LATHE ACCESSORIES 413

This example first uses TOI \0 face stock to {he spindle Bars of material are stored in a special tube that guides
center 1ine. Then T08 comes I n, the center drill, and makes the bar (by pushing it or pulling it) from the tube LO Ihe area
a center hole. When the center drill moves in a clear posi- where machining takes place. The only limitations are the
tion, tailsiock body moves forward and locks, then the quill bar length and the bar diameler. They are specified by the
moves into the work. TO! comes back to rough Out the barfeeder manufacturer and the spindle bore diameter of
chamfer and diameter, after which T02 comes to finish the the CNC lalhe.
chamfer and diameter. When the finishing is completed.
spindle stops, quill moves out, Ihen (he tails lock body Many ingenious designs of barfeeders do exist nowadays
moves backward. The operator sets the tailslock position. and the programming method is heavily influenced by the
design of the partjcular barfeeder.
At Ihe encl of the joh, T02 is in the active position. Thrl(
means M 18 bas to be programmed at the program begin- The functions conlrolling (he chuck opening and closing.
ning, to get a short indexing from T02 to TO I. {he block skip function, the M99 function and several spe-
cial functions, are Iypical aids and tools available for pro-
Watch how (he M 17 or M 18 functions are programmed - gramming barfeeders. Many of Ihese functions had been
their location in a particular block is very important. Either discussed earl ier.
function by itself will nol cause the turret to index - it only
sets the direction! TxxOO will make the actual indexing. • Bar Stopper
All this leads to one question - how do we fwd out if the Although the bar movement from [he guide tube is con-
available CNC lathe has a built-in automatic indexing di- trolled by the chuck open and chuck close functions (M I0
rection (shortest direction) or a programmable direction? and M 11), the target pOSItion for the bar slill has to be pro-
There is a good chance that on CNC lathes where only the vided, in terms of how far it has to move au! of the guide
forward direction Lakes place (automatic indexing is nol tube. This position should be lower than the bar diameter
available), (here is a feature called the programmable direc- and on the positive side of the 2 axis (.025 shown). This is
Tioll, available in Ine form ofM 17 and M 18 miscellaneous- the amount to be faced off (20 at the front face assumed).
or similar - functions. Figure 44-6 shows the example.
Although the tendency on modern CNC lathes is to incor-
BAR
porate the automatic tunel indexing direction IOto the con-
TRAVEL
trol system (which means thaI Ihe control system makes The
decision), there are some benefits in having [he program-
mable method available for special machining occasions.
As an example, Ihink of an oversize tool mounted on Ihe
turret. The tool is perfectly safe, as long as it does nor index BAR
STOPPER
the full swing of the turret Automatic indexing has 110 pro-
vision for such a situation! ......
With a programmable indexing, the programmer has a
complete control. Programming such a setup in a way that I?G
,0
will never cause Ihe turret to index full 360 0 al any time is
possible. This may not be a typical situation - it will take a ~
few seconds extra time, but it can happen quite oflen. Figure 44-6
Bar stopper position for bar travel
BARFEEDER ATTACHMENT
The program is quite simple. It will use the M 10 and MIl
functions. but also another two functions thai mayor may
Barfeeder is an external allachment to a CNC lathe that
not be required for a particular barfeeder. These oon-stan-
allows small and medium cylindrical pans to be machined
dard miscellaneous functions are (in the example):
without interruption, up to the number that can be ma-
chined from a single bar of several feet long. There are
many advantages of using barfeeders, particularly those of M71 Barfeeder ON - start
the modern hydrodynamic design type, rather than Ihe old
M72 Barfeeder OFF - stop
mechanical design. For example, sawing operations are
eliminated (replaced with a much more precise part-off
1001), no sofl jaws Lo bore, unattended operation is possible These functions are only examples and may be different
(at least for an extended period of time), stock material for a certain barfeeding mechanism or unnecessary alto-
economy and high spindle speeds can be achieved on many gether. flere is the sample program:
models with many Olher advantages.
4 Chapter 44

04402 intercept the part and move


N1 G20 T0100 MOS IS BAR STOPPER} box is often in the area
N2 GOO XO.125 ZO.025 T010l (STOP POSITION)
can without danger,
N3 mo (CHUCK OPEN)
There are tWO non-
N4 G04 U1. 0 (1 SEC. DWELL)
N5 M7l (BARFEEDER ON) a parts catcher:
N6 G04 U2. 0 (2 SEC. DWELL)
N"7 M1l (CHUCK CLOSE)
N8 G04 01..0 (1 SEC. DWELL)
N9 M72 (BARFEEDER OFF)
NlO GOO Xl0.0 ZS.O T0100 (CLEAR POSITION)
N1l MOl (OPTION1»L STOP)
The following program example illustrates how each
A important notes stopper may function is programmed for a part-off 1001.
helpful to develop a
04403
o Tool station 1 (TO 1) holds th e bar stop per (N 1) N1 G20 (TOP OF PROGR.AM)
o Initially, the chucking of the bar (for each
first piece from the bar) is done manually N81 T0700 TOOL ACTIVE)
N82 GSO 5l.500 (LIMIT MAXIMUM RPM)
o Spindle rotation must be stopped prior NB3 G96 S350 MOl (SPINDLE SPEED)
to the chuck opening N84 GOO X2.2 Z-2.62S T0707 MOB POS.}
NBS M73 (PART CATCHER ADVANCE)
o All miscellaneous related to the barfeeding N86 GOl X-O.Ol. FO.004 (PART-OFF MOTION)
should be programmed as separate blocks N87 GOO X2.2 M09 (MOVE ABOVE STOCK
o Dwell should be for the task but NBB XIO.O ZS.O T0700 (SAFE XZ POSITION)
not excessive Na9 M74 (PART CATCHER RETRACT)
N90 MOl STOP)
These are some considerations for I N91 M30 (CONTROLLED END OF PROGRAM)
a bar slopper, but the recom mended Nn M99 (RESTART FROM THE TOP OF PROGR.AM)
%
dure for the barfeeder
The T07 in is a .125 wide
ADDITIONAL OPTIONS ing off a 02.0 to 2.5 length, a
cess. In the there is a special
are nique used, to continuous
a CNC lathe that on the last three blocks, N90, N9\ and N92.
Some maybe
chip conveyer, or • Continuous Operation
may not be that rare, is an optional stop, lypically for setup
rest (a moving and N91 M30 - the end
too! support for of in front of the
help prevent or deflection on a relatively long part block. earlier in
or a part with Lllill walls. Chapler When the block on [he
Another two accessories that are also often related panel is set to the ON position, the control system will n01
to each other w baifeeding as well - are: process the instructions in block N91, ll1at means the pro-
gram will not end there and the will continue [0
o Part known as Part Unloader [he block where M99 is programmed.
o Pull·Out the M99 function is mainly defined as the end
Both are commonly used together wilh opera- it can also be used in the main program (as
tlons and use two miscellaneous
In that case, it causes a continuous pro-
The M99 function will the program 10
• Part Catcher or Part Unloader return to the lap, and - without interruption - repeat the
Since the first 1001 will normally have a
common accessory for a continuous machining, programmed, the moves the srock oul of
is part carcher or part unloadel; as il is and Ihe whole program indefinitely -
IS \0 calch completed part block skip switch on control panel is set to
the completed lion. Then the M30 over and M99 in
. dam- block will no!
CNC LATHE ACCESSORI 415

• Parts Counter In programming terms, the structure will Slml-

This kind of unattended lathe machining uses an- lar 10 Ihis formal (item numbers rArrpt:1C"H,n list):
feature of the control system - parts caunter.
04404
may be counted via a program (usually a user macro), or by
selling the number of required parts on the N ..
They may also be programmed by N •• T:loc •• MOS (ITEM 01)
neous functions, for example: N ••GOO XO Z .. (ITEM 02)
N ..G98 G01 Z •• F .. 03)
Count ... ascending order N ••G04 UO.S (ITEM 04)
N ..M1.0 (ITEM 05)
Count down N ••GOl Z .• F •• (ITEM 06)
N ••G04 uo.S (ITEM 07)
N ••M1.l (ITEM 08)
number for the cOUn( is usually N ••G04 U1.0 (ITEM 09)
ity or the required number of parts from a N., GOO Z .. (ITEM 10)
at the end of lhis chapter will N •• X •• Z •• T>oc.OO
N .. G99
counter function and other features.
N ..

• Pull-Out Finger to modi fy the program structure to suit re-


a pull-out finger is a device (CNC of any unique setup in the machine
that grabs ana pulls the bar out of (he
tube (while the chuck is open). This is a typi- PROGRAMMING EXAMPLE
for barfeeders of the 'pull-type '. Normally, the
pull-out is mounted in the turret, either as a a com-
Itool' , or as an add-on to an existing 1001, in order to pre- barfeeding operation, until
number available tool stations. Since these ac- been machined. The lathe opera~
with the spindle rotating, yet they of parts when starling a new
they are programmed in the G98 requires a careful study. It does
lime (in/min or mmimin). practical and advanced features, all of
the exact pull-out finger mostly in Ihis ch(lpter:
is abOUllhe same - no
04405
than its part-off:
(Nl TO IDB FOR NEW BAR ONLY - 1.5 CUT-OFF)
oI. to the tool station where Nl Ml8 (INDEX T03 TO T01)
is mounted. Spindle must be stopped N2 G20 TOlOO MOS (TOl - BAR STOPPER)
MOS! N3 GOO XO.l Zl.S T0101 (NEW BAR OUT 1.5)
N4 M1.0 (CHUCK OPEN')
02. At a rate, move to the spindle centerline ~XO), N5 G04 U1.0 (1 SEC. DWELL)
and a axis position about half-way of the overall N6 M7l (BAR.FEEDER ON)
bar projection, Nt G04 01..0 (1 SEC. DWELL)
03. feed-in towards the bar as NS Ml.1. (CHUCK CLOSE)
N9 XS.O Z2.0 T0100 , _ _ .__ POSITION)
N10 MOl (OPTIONAL STOP)
04. Dwell for about for the finger to catch
the bar stock. N11 M1.7 TOl TO T03)
N12 T0300 - a .125 WIDE PART-OFF TOOL)
05. Ope n the chuck with M10. N13 G97 S1400 M03 RPM)
OB. Pull out the bar stock from the guide tube. N14 GOO Xl_2S ZO T0303 MUS (START POSITION)
N15 GOl X-O.02 FO.004 BAR END)
07. Dwell for about second for the finger to complete N16 GOO X1.2S M09 ABOVE BAR)
the pull-out. N17 XS.O Z2.0 T0300 POSITION)
N18 MOl (OPTIONAL STOP)
08. Close the chuck with Ml1.
09. Dwell for about 1 second to chuck closing. N19 MlB TO) TO T01)
N20 TOlOO MOS (TO 1 BAR STOPPER)
10. Move the pull-out finger away from bar stock. N21 GOO XO.1. ZO.05 T0101 (0.05 STOCK ON FACE)
N22 mo (CHUCK OPEN)
ll. Return the pull-out to the safe start position. N23 G04 Ul.O (1 SEC. DWELL)
12. Reinstate the 'feed·peHevolutlon' mode. N24 M71 ON)
N25 G04 01.0 (1 SEC. DWELL)
416 44

N26 ml (CHUCK CLOSE) N43 GOO Xl.2S Z-1.125 T0303 MOS


N27 XS.O Z2.0 TOlOO (CLEAR POSITION) N44 GOl X-O.02 FO.004 (PART-OFF TO
N28 Mal STOP) N45 GOO Xl. 25 ABOVE BAR)
N29 m7 (INDEX TOl TO T02) N46 x5.0 Z2.0 T0300 POSITION)
N30 T0200 (T02 ~ FACE-CHAMFER-TURN 00) N47 MOl {OPTIONAL
N31 G96 S400 M03 SPEED) N48 'M89 (INCREASE PART COUNTER BY 1)
N32 GOO G41 Xl.2S ZO T0202 Moa (START FACE) / N49 M30 (CONTROLLED END OF .... n~""'r<.""·,l
N33 GOl X-O.07 FO.007 FRONT) N50 'M99 P19 (RESTART FROM BLOCK NJ. 9)
N34 GOO ZO.l (CLEAR %
N35 G42 XO.57 (CHAMFER
N36 GOl XO.92 Z-O.025 FO.OO) (COT goes with and the ma-
N37 Z-l.26 FO.Ol (CUT DIJi"MErER manufacturers use a number functions to
N3 8UO.:2 FO. 02 (CLEAR ABOVE BAR) deactivate a particular accessory. It is not
N39 GOO G40 XS.O Z2.0 T0200 POSITION) to cover any specific procedures into a
N40 MOl STOP)
ence material. Hopefully, the ideas presented In this chapler
N41 T0300 (T03 - 0.125 WIDE PART-OFF TOOL) will help to adapt any manufacturer's recommendations
N42 GS7 S1400 M03 and understand them better.
HELICAL MILLING

• Helical Interpolation
Helical interpolation is usually a special
option thai is designed to be used for cUlling a
arc with a third dimension. The third dimension is
by the active plane:

o In G17 XV plane . the th'lrd dimension is the Z axis


o In G18 ZX plane . the third dimension is the Y axis
o In G19 YZ plane - the third dimension is the X axis
G03 x .. y .. z .... F ..
In plane G 17 (XY), the third is Z
operation is only available for CNC machin- In the active plane G 18 (ZX), the third dimension is
centers as an optional feature. Let's look at the .~uu'c'-', Y and in the active plane G 19 the
milling a little closer. is the X axis.
In all cases, the dimension -
HELICAL MILLING OPERATION Will be a linear motion that is
plane,
What exactly is helical milling? Essentially, it is a form
'-''''~u"w interpolation - it is a programming technique to a helical interpolation can
arcs and cirdes combined with a linear interpola- statement:
tion in the same block, during the same mol1on .
Helical interpolation is a simultaneoLis
two-axis motion in the working plane,
with linear motion along the remaining axis.

an arc mali on or a motion is always synchronized by the con-


al! axes reach the target location at the same time.
(the plane that is most
of the cireu lar i nlerpolal ion wi 11
• Programming Format
general formalS interpolation in a pro-
gram are similar to the for acircular inler-
Q Using arc centers IJK for CW and CCW motion: polation - plane "'''H~''''''' important:
G02 x .. Y .. I.. J .. F .. Q Using arc centers IJK for CW CCW motion:
GO) x .. Y .. I.. J .. F ..

= Using R CW CCW motion:


Y.. Z.. I.. J. K.. F..
Y.. Z.. L J .. K.. F..
G02 x ..
Y .. R •• F ••
GQ3 X •. Y .• R •. F .•
= Using radius R for CW motion'

NOle that there is no Z


lact, ilthe Z were
cular milling, il will nOI - normally. That means it will The plane selection
not work, unless conlrol has a special fealure polation block which axes will
called the option. program and what their function will

417
418

• Arc Modifiers for Helical Interpolation Thread milling can be used in to


The arc functions are programmed using the special benefits. These benefits are
same principles as in but will be dif- o A large thread diameter· virtually any diameter
ferentfor is a summary in a table: can be thread milled (with high concentricity)
o Smoother and more accurate thread
Active Arc
(only thread grinding can be more accurate)
vectors
o Combination of thread milling within a single
G17 z I and J setup eliminates secondary operations
G18 y I and K o Full depth thread can be cut
G19 x J and K o Tap is not available
o Tapping is impractical
lO two axes (hat form
(,ITl-UUH motion linear motion no innuence o Tapping is difficult and causes problems
conlrol system supports the direct radius
o Tapping is impossible in hard materials
traditional UK vectors), the physical
automatically, within o Blind hole tapping causes
o Part cannot be rotated on a eNC lathe

• Applications and Usage U Left hand and right hand threading


has to be done with one tool
helical interpolation option is not the mos[
o External and internal ,!">,.".lIIInt1 has to be
method, it may be the only
done with one tool
special machining ap-
o Thread deburring ...... r .. Fnl".,.," or eliminated

o milling o of high
particularly in
o Helical profiling
o Extended
o Helical ramping
Ll Elimination of tapping heads
the three gTOUpS, the lhread milling is by far
o Elimination of <1vrU",''''IO
mosl common method of helical interpolation applied in
industry and is described next. The last two applications are o No need in tapping)
similar, although used less frequently and will be de-
scribed later ill this chapter as well.
o power of the tool versus the cut
1/5th is not unusual)

THREAD MILLING o One tool holder can accept inserts for


different thread pitch size

There are two familiar methods of producing a on o Reduction of overall threading costs
a CNC machine. On machining centers, predominant enhances other threading it
method of thread generating is tapping, normally not Lhem. It uses special threading cutters,
cycle G84 or 074. On CNC lathes, a lap is fhread hobs, or special multi tooth thread milling
(without the use of a cycle), but the majority cullers. In both cases, there is one common for both
threads are machined by the single point types of cullers - the pilCh of thread is built info The cutter.
the block method of 032, the simpJe cycle
repetitive cycle G76. • Conditions for Thread Milling
• Applying Thread Milling For successrul thread milling, three conditions must
before writing a program:
There are many cases in
lapping or the point o Control system must support the operation
difficult, or impossible in a a Diameter to be threaded must be pre machined
difficulties can often overcome
milling melhod instead. a Suitable thread milling tool must be selected
most common industrial
All three conditions must exisl simultaneously.
lion feature of the control.
HELICAL MILLING 419

• Thread Milling Tool • Clearance Radius


The thread milling culters are available in alleasltwo va- Clearance radius protects the thread from damage by the
rieties - some are made of a solid carbide, some use carbide cutting (001. Each cutting edge on the threading tool (hob)
mterchangeable inserts. 1n either design, the threading tool or indexable insert is ground with a decreasing angle in the
pitch must match the pitch ofa thread required by thedraw- direction of the cut - this is called the dearanrP anglp This
ing. The tool has [0 be small enough to fit into the available clear.ance angle guarantees smooth cutting conditions dur-
internal space and large enough to guarantee suitable rigid- ing thread milling.
ity while cutting externally. For internal thread milling, cut-
lers are available for thread milling in holes as small as .250 • Productivity of Thread Milling
inch (6.35 mm).
One of the reasons programmers choose the thread mill-
Unlike a lap, thread milling lools do not have the helix ing operation could be the desire to improve machining
angle built in, only the pitch. The helix angle is required for productivity. There are many sizes of thread cutting tools
threading and is controlled during helical interpolation mo- available, with just about all pitch variations. In order to
tion by the linear movement. Typical thread milling tools achieve the highest level of efficiency in thread milling, use
are dlustrated m Figure 45-1. a threadmg tool that is large enough to cut the reqUlred
thread in a single revolution (in a 360" sweep). At the same
time, the tool must have all necessary clearances.
A great deal of influence on thread milling productivity
will be the total length of travel and the selection of culti ng
feedrates. A large diameter cutter can cut more efficiently
(heavier feed rates), but cannot fit into confined areas.
Small diameter cutler has the opposite effect - it can be
used in a tight areas, but at lower feedrates. A smaller cutter
may also be used with higher spindle speeds and the corre-
sponding feedrate - the combined effect may shorten the
CUlling cycle time.

THE HELIX
The words helical and helix are quite common in CNC
programming and appear in this and other publications
quite frequently. Perhaps it is time to look at the terms relat-
ing to thread milling in more detail.
The main word that is used in this context is the word he-
lix. The word helix is based on the original Greek word for
Figure 45-/
spiral. A dictionary definition gives us some clue as to its
Typical thread milling cutters. meaning - it suggests that a hellx is anything ill the shape of
Solid carbide (left), single insert (middle) and a double insert (r(qhtj
the thread of a screw. Helix is defined in the" Machine!\"·s
Handbook" by Industrial Press, Inc., New York, NY. USA.
• Premachining Requirements this way:
A hole for a tap cannot have the same diameter as [he tap "A helix is a cun.'e generated by a poilll moving aVOlli Q
itself. It has to be smaller to accommodate ilie depth of the cylindrical surface (real or imaginary) at (I COllsrnlll rare ill
thread. The same rule applies to heJical milling: the direction of the cylinder's axis."
o If the thread is milled on the inside di ameter This quite detailed definition means that the helix is a
of the part (internally), the premachined diameter curve created by a circular mOlion of a poilIl 011 a cylinder
must be smaller that the nominal thread size or a cone, combined with a simultaneous linear advance, A
o If the thread is milled on the outside diameter curvature of a common screw thread is a typical example of
of the part (externally), the premachined diameter a straight helix.
must be equal to the nominal thread size
A cutting Lool motion based on the mathematical defini-
Either diameter (internal or external) may be slightly tion (using three axes), results in a helical motion, also
larger or slightly smaller than the 'normal' size, but Lhis de- known as helical interpolation.
viation is decided by the required 'fit' of the thread.
r 45

,
y xv VIEW ~ TOP z

I
ISOMElmC

,
z ~FRONlT YZV~EW-

45-2
A helix shown in four standard views - two revolutions are shown between the top and the bottom of the helix

A helix is a mali on that has/our


o Clockwise circular cut with positive linear motion
U Clockwise circular cut with negative linear motion
o Counterclockwise circular cut with positive linear motion
o cut with l1elllsmle linear

in Figure shows a
is a three-dimensional obiect) in four
is shown in these views:
o top view (XY) shows only a circle.
D The front view ,XZ) shows the helix from the front.
o The side view (YZ) shows the helix from the standard .. . . . . . . . . . .- . . ...... 4
right side view. 10 ~-;;;~- ~ ~+

o The isometric view iXYZ) shows a three-dimensional


appearance of a two-turn helix.

Another view thaI is often very useful, IS the


flat view (also layout). This view is com- 1
monly used to as a flat objeClthat can wrap
around a cylinder. a nat layoul of a 45-3
hand helix view representation of a righi-hand helix,
One revolution of 380 0 is illustrated
MILLING 421

THREAD MILLING EXAMPLE CUller size. characteris-


cu[\er must considered - its diameter
edges (teeth). Selecting a culler dia-
operation on CNC machining c.:enlers carefully - it must be smaller Ihan the
efficiently by using the helical in- challenge is to a
of the control system. TIle easiest way to cOITecl number of teeth per inch
explain the straight thread milling, is to show is more Important In-
an illustrated example Figure 45-4. but the pilCh cutter must
of whether the thread IS In-

!rem 5 with the lool number and


In this case, the tool number is 3,
. The loollength offsel number is
clfset number is 003. The D03 offset will con-
tai n the radius of threadi ng cutler, in this case, (he
value will be .6250. 111e offset numbers are
bers this example, others may be different. Just in
mind thal the diameter machined for an internal thread cul-
ting must be smaller than Ihe thread nominal juslllke
predrilling a hole for lapping. That introduces
Item 6.
Ilem 6 lists the bored diameter as inches. Why this
number and not other? Remember thai the thread
depth is established by a common fonnula. A
---- 03.00-12 UN ~ mula to calculate [he depth D of an internal thread mUHi-
plies the pilch by a constant:

If the formula is applied to a ><./.I.VI,I".

(1/12 = .0833333 pilCh), the


Figure 45·4
Internal thread milling example· program 04507
.0833333 x .54127 = .0451058

• Straight Thread When the formula is applied to of a


bored diameter, this amount 10 be twice
is the the required nominal
and (he
1. Internal thread is 3.00 . through the plate 3.0000 - 2 x .0451058 = 2.9097884
2. Plate thickness is 0.75 Therefore. the bored diameler the thread should be
3. 12 TPI == 12 threads per inch 02.9098
4. 1.500 diameter thread hob must be made. The
5. Tool T03 and offsets H03 and
formed on the fin-
6. Bored diameter is 2.9000 inches a certain advantage. By
a little the final
This summary sets the finish.
will do the lrick.
• Initial Calculations IS the
In the example are six calculated can rounded 10 an even 02.9,
were supplied by the leaving only ,0097884 stock on diameter. or .0048942 per
lecled or calculated as side, for finishing. No the is reasonable.
We look at the ""'''~''''L\'A.1 but il did lake
such as 2.9000.
• Starting Position • Motion Rotation and Direction
After all required data have collected and properly In it is extremely important to coor-
calculated, another step can be lhis time to calculate dinate, 10 ~\fn,pn"t\nl the following three
the thread starling position.
o
Tllalls tasy fur the X aml Yaxes 111(: <.:enler of lhe lhread o
diameter is as good start as any - In In this ex-
ample, and for simplicity, this cqUlva- o Z motion direction
to the XOYO position.
so important? Why do they have
along naled al all? Evaluate them, one by one,
milling than in
Spindle Rotation
type of milling. start position must aJ-
with the pitch as lhe CU\- Spindle rolation can either M03 (clockwise) or M04
proceed in three axes Z axis (counterclock wise).
zero (20) will be at the lOp of pllrt
Cjrcular
start position of the Z axis is by several
- the size of the rhread mill (in this case a tool with Circular the rules of circular .
an indexable insert), the pilch of Ihe (in this case lion - G02 is the direction, G03 IS the counter-
.0833333), the direction ofrhe Z oxis (up or down) clockwise
and method of the infeed along the
1 Axis MDtion
a thread is cui using
axes used must For venical
[he approach arc for circular axismay be along two
51rW\I'T\,M'1"I arc for a helical intcrpolation can o Up or positive
same procedure is exactly the same.
o Down or negative

DOWN UP

t
M03

- RIGHT HAND EXTERNAL - LEFT HAN


Figure 45-5
EXTERNAL the climb mtiling mode - right and left hand threads, spindle rotation and cutter motions shown
HELICAL MILLING 423

UP DOWN

INTERNAL - RIGHT HAND INTERNAL - LEFT HAND


45-6
INTERNAL thread milling using the climb milling mode - right and hand spindle rotation and cutter motions shown
motion item by itselr is important, bUi it is the coor- 04501 (INTERNAL RIGHT HAND THREAD MILLDlG)
dination of all motions that makes the thread to match N1 G20
neenng purposes. These motions together N2 G17 G40 GSO
of thread (left hand vs. right hand), N3 G90 G54 GOO XO YO S900 M03
N4 G43 ZO.l HOI MOB
externally or internally. Figures 45-5 and NS GOl Z~O.95 F50.0
the possibilities for the most common method of
in the climb milling mode.
Similar to a program using circular interpolation, next
• lead-In Motions step to be done is determination approach to
the lead-in arc (in climb miJIing This is also (he mo-
lion that applies tJ1e cutler radius

There is one last consideration, the In the example, the radius is in block N6:
mainly its height. The
revolutions are required to cut N6 GOI G41 XO.7S Y-O.75 DOl FlO.O
single insert cutter will
ing catalogue, determined that two next block is the lead-in are, with .750 approach fa-
ficient 10 mill the required thread. X Y axes will he needed:

To start the thread milling N7 G03 Xl 5 YO RO.7S (or 10 JO. 75)


positioned at XOYO part origin
a multi tooth insert culler is (on a
able, start will be a Iitt.le below Note
.2()(), at Z-0.95 (the plate is as per drawing).
This extra clearance provides an even entry into the thread.
The program start includes current considerations:
45

90 x .0833333 / 360
Lt .0208333 (.0208)

R1.50 , RO.75 cUlling motion takes place along the


tion (up), so the target position absolute value will
the start position. and a corrected block N7 can be

N7 G03 Xl.S YO Z-O.9292 RO.75 (or IO JO.

xol poinl, the tool is in a position


Always try to start
(0°. 90°, t 80° and
are much easier to work with.

R1A5
• Calculation
brochures or product catalogues may
Figure 45-7 on the helix angle of the threading
Lead-in and lead-out motions for thread P'''''TInJP 0450 I still remains unchanged. The thread
(top view is shown) milling cutter must by the distance that is equiva-
lent to the pitch amount in one revolution (360°). a
lend·in arc is only a portion of the pilCh is
However, would bring the
grammed. The amount of travel has to be calculated
threading cutter into the srraighl! the culler
previous example).
has the threading teeth it would cut a series of
of the earlier one. It also
grooves, not threads. Th of course, is unacceptable.
this time based on the
To make a better cut, stall with 11 helical motion for the
lead-in arc. '111at means adding Z to the circular
motion, in the upwards direction. amount ofthe Z tar-
get posilion must be calculated, not Helical ap-
proach has to consider pilCh the of
travel on the circumference of (he lead-in arc.
IIiY' wh ere ."
The thread pitch in the is
I, "" Linear travel in helical interpolation
1 / 12 = .0833333 A =:: Amount of interpolated (angle)
TPI Threads per inch
and the degrees traveled on the 90°,
from XO.75Y-0.75 to X 1.5 YO. • Milling the Thread
Considering that the thread mill has (0 advance Because of the cutter
for every 360°, it has to advance onc quarter oflhat UJ~'lal\Iv"" oiutions have been to
each 90", thread. For each revolution, that is
calculation of the linear travel can be from position of the cutter must
formula: is the .0833333 value in
is a helical milling and
can
A x P
360 absolute method will be then incre-
method:
IIiY' where ... Ne G90 G03 Xl.S YO Z-0.S4S9 1-1.5 (TURN
N9 G03 XI.S YO Z-O.7626 1-1.5 (TURN 2)
'-t Linear travel in helical
A Amount of interpolated (angle) repelitious data will not appear in the
P 1 / TPO comparison, try 10 program the two
menial
90° in Ihe example will be:
HELICAL MILLING 5

NB G9l G03 XO YO ZO.0833 I-l.S N13 G28 XO YO Zl.O MOS


N9 G03 XO YO ZO.0833 1-1.5 N14 M30
%
When the two helical motions are cutler
had traveled .1666 along the positive ,.. .... ",.".'." Z This program is only a small
the lotal of 720° (lWO revolutions). The of method. The calculations arc logical and ,.,,.r"·...·... "'"
will be the ending of the cut. Reading various lechnical specifications
cutler presents a wealth of information
• Lead-Out Motions tips), suggested by the LOa I manu
recommendations always take on a more lmporlam
the same reason why the tool approached the than any other method.
helical interpolation over a 90° are, the exit
will the same way. This deparlme 45-8 illustrates isometric view of the sample
thread (lead-au I motion) will move the milling program 04501.
cutler away from [he finished thread, again
turn motion Ihm is still in rhe helical mode.
is the same as before and so is the amount:
XO.15Y0.75Z-O.7418
Lt 90 x .0833333 J 360
Lt = .0208333 ~XOYOZ..o.74~
value will bring [he tool up Md away
in absolute mode):

mo G03 XO.75 YO.75 Z-0.7418 RO.75


or (1-0. 7S JO)

move [0 machine zero and termi-


nale the X0.7SY..O.75Z-O.95
START AT XOYOZ..o.95
N11 G40 G01 XO YO
N12 GOO Zl.0 M09
N13 G28 XO YO Zl.0 M05
N14 M30 Figure 45·8
%
Isometric view of caol motions for thread milling example
The thread cUlling job is and the complete program
can be written . • External Thread Milling

• Complete Program
The complete nrtHTr"rn

vidual calcularions and


ing culter: same rules as for an
and lead-out may be to
04501 (IN'l'ERNAL RIGHT HAND THREAD l'l.I.J...I..>.LNuj Chapter 29 (Circular Inlerpolalion).
N1 G20 motions shown in Figure 45·9.
N2 G17 G40 G80
N3 G90 GS4 GOO XO YO S900 M03 • Tapered Thread Milling
N4 G43 ZO.l HOl MOS
NS 001 Z-O.95 F50.0 It is possible, but much more difficult. to
N6 G4l XO.7S Y-O.7S 001 F10.0 gram a tapered thread (such as NPT or
N7 G03 Xl.S YO Z-O.9292 RO.7S (hread milling cutter. For threads with a small soft
N8 Z-O.84S9 I-l.S 1)
material and very narrow taper angle, a lapered Clltler may
N9 z-O.7626 I-1.S 2)
NlO XO.75 YO.7S Z-0.74l8 RO.75 be lIsed and programmed as if It were a
Nil G40 GOl XO YO single revolution. For larger threads, the only
Nl2 GOO Zl.0 M09 simulation of the helical milling (software IS In
426 Chapter 45

of the helical mOlions requires a simultaneous three-axis


linear cutting mOlion, within (he acceptable tolerance of
the thread. That means each motion will be a very small
Ihree-axis linear motion (using the X, Y and Z axes). The
more accurate thread needed, the longer program will be
generated. This method is practically impossible to do
manually. as. the development time could hardly be justified
XQYQ
in any case, What is needed is a program software lilal will
do the calculations in a matter of seconds. Many manufac-
turers of thread milling cutlers provide such a software free
ur for unly a small cost.
THREAD
START/END To illustrate this topic, the same thread will be used as in
program 0470 I. Needless to say, a simulated program may
be extremely long - at least a few hundreds blocks. Here is
Figure 45-9 an eXClmple of stich a program - it shows only a few blocks
Lead-in and lead-out motions for an external thread milling of the beginni ng and a few blocks where the tool completes
the lead-in arc. It only relates to the straight line and the part
this case). using very small increments in linear interpola- of the lead-in arc. Practically, the program is incorrect, be-
tion mode only. Holders and inserts should be selecred by cause the tool radius is not compensated. The radius com-
[he nominal size of [he thread. pensation would he done in the software, nol with G41 or
G42 in the program - this is a linear interpolation in three
Tapered threads are sometimes called conical threads and axes and cutter radius offsel may not be used. The complete
will require different tool holders for right-hand threads program had been done by using a CAD/CAM software,
and left-hand threads. This is a special application of heli- and was 463 blocks long, comparing to just 14 blocks for
cal interpolation thal does not really belong in the manual the complele program using helical interpolation.
programmmg area.
G20
• further Considerations G17 G40 GSO
G90 G54 GOO XO YO 8900 M03
Two additional considerations are necessary to cover the G43 ZO.1 HOI MOS
subject of general thread mi Iling ina reasonable depth. One GOl Z-O.9S F10.O
is the application of the CUffer radius offset and the other XO.7S Y-O.75
one is the selection of (he cutting Jeedrate. XO.7846 Y-O.7492 Z-O.9494
XO.SI9I Y-O.7468 Z-O.9488
Cutter radius offset will only be aclive for the two axes XO.8536 Y-O.7428 Z-0.9482
selected by the active plane (for example, in G 17, it will be XO.8878 Y-O.7373 Z-0.9476
XO.9216 Y-0.730l Z-O.9470
the X and Y axes). Always select theclimb milling method. XO.95S2 Y-O.7214 Z-O.9464
it is lhe preferred method for the majority of thread milling XO.9883 Y-O.7112 Z-O.94S7
appl ications.
Feedrale selection is similar to the feed rate for outside
and inside arcs described in the Circular Interpolation XI.4967 Y-O.0697 Z-0.9304
chapter (Chapter 29). Since a precision thread is the goal, Xl.4992 Y-O.0350 Z-O.9298
the cutting feed rate wi II be 10 to 30 percent slower. A good XI.SOOO YO.OOOO Z-O.9292
start is at about .001 per tooth and up by experimenting.
What the program output shows is a series of very small
THREAD MILLING SIMULATION METHOD line segments, in a very precise order and increment. Fol-
low at least a few blocks and visualize the actual motion.
There is an interesting way to mill a thread without (he By the way. it took about three seconds to generate the 463
benefit of helical interpolation option available on the con- blocks of code in CAD/CAM. Knowing a high level lan-
troL This may be a case for many CNC machines, or in guage (such as Visual Basi<.;('jl, Visual C++® and similar lan-
such cases where the machine shop needs to mill a thread guages), writing similar utlllly software can be done very
only once in a while and the helical interpolation is not efficiently. Typically, when the utility is executed. the user
worth the cost of a control update. inputs Ihe number of revolutions, the radius, thread lead
and resolution. The length of the program can be shortened
To mill a !luead (external or internal) under these condi- but the lhreading quality may not be acceptable.
tions, a helical milling simulafion will be used. Simulation
HELICAL MILLING 427

RegardJess of the method used to generate the lool path Q Example:


for thread milling, this is a machining and programming
area that deserves alai morc attention than it normally gets To illustrate the programming technique for this type of
in many machine shops. milling application, a standard, flat boltom, 0.500 inch end
mill will be used (there is no need for a center cutting type)
and open the stru1 hole to the 0.750. The pocket depth is
HELICAL RAMPING ,250 and in each helical motion the tool will be moved by
.050. The pocket center is XOYO and the start Z position
Although the thread milling is probably the most com- (clearance) is .050 above the top of part (which is (he Z axis
mon application of helical interpolation, it is not the only program zero). The tOlal number of helical motions (revo-
one. One very useful application of this control feature is lutions) is six (one above the top of work, plus another five
called helical ramping. below (he top of work).
Helical ramping is used primarily as a replacement for a Any increment value can be chosen for the depth, de-
plunge cut into solid materials. Recall that a roughing op- pending on cutting conditions. The smaller the increment.
eration in an enclosed area (for example a pockel), requires the more helical passes will be necessary and the longer
the cutting tool to reach a certain Z depth, before the actual culling time will be required.
material removal. This Z axis motion can be in an open
space, if the material had been predrilled, for instance. The The program can be in either absolute or incremental
Z axis motion can also be CUlling into a solid material, if the mode and, in this case, the incremental mode is a little eas-
cUlting [001 is of the center CUlling type (using the so called ier 10 program. The cutting will be done in the climb miU-
slot drill). Well, there is another possibility - helical ramp- ing mode - program 04502.
ing - that allows using any flat cutter and reach the required
Z depth as a series of relatively small helical cutting mo- 04502 (HELICAL RAMPING)
ill. G20
tions. The cutter can be fla! and non-cemer (laring, because N2 G17 G40 Gao
all the cutting action is done by the cutter sides, not its bot- NJ G90 G54 GOO XO YO 8700 M03
lorn. Once the required Z depth has been reached, a full cir- N4 G43 Zl.O HOi MBa
cular interpolation is often used [0 clean Up after the last N5 GOl ZO.OS FSO.O (APPROACH TO Z-START)
helical CUl. A high level CAD/CAM software can do this N6 G4l XO.37S DOl FlS.0 (START COMPENSATION)
very efficiently. N7 G9l G03 1-0.375 z-O.OS (CUT ABOVE WORK)
N8 1~O.375 Z-0.05 (CUT 1 .BELCM TOP FACE)
N9 1-0.375 Z-O.OS (CUT 2 BELOW TOP FACE)

,I
/ \
'i

Figure 45- 10
Schematic illustration of a helical mOl ion used for ramping - program 04502
428 45

NlO I-O.37S Z-O.OS (CUT 3 BELOW TOP FACE) helical mOlion. Figure 45-10 shows the schematics of the
Nll I-O.375 Z-O.OS 4 BELOW TOP FACE) program in different views.
Nl2 I-O.375 z-O.05 5 BELOW TOP FACE)
Nl3 I-O.37S (CIRCUIJ\R BOTTOM CLEANUP) interpolation can be a very powerful
N14 G90 GOl G40 XO f'Ot:~'1'Tl;o'/;.T TO XY START)
mi , irreplaceable by any other
N15 GOO Zl.O M09 though it is a conlrol option, ils
N16 G28 Zl.O MOS
program output the
N17 M30
% justify extra cost.

Two items are wotih a note One,


mental mode is used, the Z llxis Slart is
(block N4). The cutler
pie straight motion from
HORIZONTAL INING

Throughout the handbook, there have been dozens of INDEXING AND ROTARY AXES
programming examples. They all shared one common fea-
ture - they were aimed at the vertical machining cenlers. All programming concepts that ve been discussed so far,
There was a reason for this approach. First, there are more apply equally (() CNC horizontal machines. The XY axes
vertical machining centers in machines shops overall, and are used mostly for drilling and contoUling operations, the
mixing I wo different types of mach ines would make all ref- Z axis controls the CUlling depth.
erence material more complex. Second, almosl every sub-
ject covered so far for lIlt: verlical models is equally apJJlic- Horizontal maChining cenlers differ from Ihe vertical ma-
able LO the horizontal models. So what are the differences? chining centers not only in the axes orientation and the lype
of work (hat can be machined. One of the major differences
The horizontal machining center mainly differs from a is an additional axis.
vertical machining center in ils genera! functionality, While
a vertical machine is mostly used for only one face type of This is an indexing or a rotary axis, usually designated as
work, a horizontal machine is used for work on many faces the B axis. Although the two terms are often used inter-
of the part during a single selur. This fealure alone makes a changeably, Ihere is a difference between them.
horizontal machining center a much more versatile ma-
chine - and also more expensive. Figure 46-1 shows the D An indexing table will rotate the part that is mounted on it,
comparison of the axis orientation. but it cannot be used simultaneously with any kind of
cutting motion. This type supports a positioning motion.
o A rotary table will also rotate the part that is mounted on it,
'If' but a simultaneous cutting action is possible. This type

<cL
supports a contouring motion,

The most common fourth axis on a honzonlal machining


cenler is the indexing type, cailed the B axis.
<9,:.::",.: . ':
INDEXING TABLE (8 AXIS)

Indexing axis, as the name suggests, is used to index a ta-


~ ble, if the machine is equipped with this feature. 'He hori-
zonlal machining centers and boring mills have an indexing
HORIZONTAL
table as a standard fealure. A full rotary table is an 0Plion
Figure 46-1 on a both types of machining centers,
Axis orientation differences between verticar
and horizontal machines .. Units of Increment
From the illustration is clear that all the XY plane is used The indexing axis is programmed in the number of de-
for the primary plane of work and the Z axis is used to con-' grees that is required by the job. For example, to index <1 ta-
trot cutting depth. There is no difference whatsoever be- ble lo a 45° position, program:
tween the two machine types in Lhis respect.
G90 GOO B45.0
Belween programming and setup, there are lhree major
differences on a horizontal machining center: The mi n imum increment depends on the machl ne design.
For indeXing. a typical minimum unit or increment could
D Presence of a fourth axis, typically an indexing B axis
be I degree or even 5 degrees. However, for more flexibil-
o Presence of a pallet changer ity - and for rotary machining - much finer increment is re-
quired. Most machine manufacturers offer 0.1, 0.0 I and
D Richer variety of setup and offset settings
0.001 of a degree as the minimum indexing increment In
First, a brief look al the fourth axis of a typical CNC hori- all cases, the programming of the indexing motions can be
zontal machining center. done in two directions.

429
430 Chapter 46
- --------------

• Direction of Indexing • Indexing in Absolute and Incremental Mode


The B axis can be programmed to index either clockwise Just like any other axis. the B axis can be programmed in
or counterclockwise, looking from top down at (he table, the absolute mode or incrementa! mode, with the same be-
which is the XZ plane - Figure 46-2. havior as the linear axes.
The following exa.mple is in the absolute mode. showing
SETUP
:7 SLOTS two table columns. The first column is the programmed in-
dexing motion in G90 mode, the second column shows the
actual resulting indexing motion (Distance-To-Go) and its
ccw cw direction. All rotational directions are based on (he perpen-
dicular view to the XZ plane.
82700 890.0

cw)E l~\V CCW -


~ Absolute Mode - consecutive indexes:

Programmed motion in G90


G90 G28 BO
GOO B90.0
- -..
Actual indexing motion
Machine 8 zero position
CW 90 degrees
TABLE \ TABLE CENTER

,
Z+
-X+

Figure 46-2
n'---" SPINDLE
8180.0
890.0
8270.0
8247.356
CW 90 degrees
CCW -90 degrees
CW 180 degrees
CCW -22.644 degrees
B axis direction and general descriptions BO CCW -247.356 degrees
8-37.0 CCW -37 degrees
The table size including the size of comers is imponant to
determine the clearances before indexing. B42.0 CW 79 degrees
842.0 No motion (0 degrees)
• Table Clamp and Unclamp Functions
8-63.871 CCW -105.871 degrees
In order to maintain a rigid setup, the indexing table must
be clamped [0 the main body of the machine during a cut.
The next table is similar. The first column is the pro-
For indexing motions, the table must be uncJamped. This is
grammed indexing motion in G91 mode, the second col-
true of most machining centers. For this purpose, manufac-
umn shows the motion directions and the actual resulting
turers offer special miscellaneous functions - two functions
absolute position. All rotational directions are based on the
wlJl be used in the examples:
perpendicular view to (he XZ plane.
o Table Clamp ... for example M78
o Table Unclamp ... for example M79
o Incremental Mode - consecutive indexes:

The function numbers may greatly with different ma- Programmed motion in G91 Actual i'lhsolute position
~

chine designs, so check the manual for proper coding. G90 G28 BO Machine B zero position
Normally, the unclamp function is programmed before G91 G2aBO Machine zero - no motion
the indexing, followed by the B axis motion and another GOO B90.0 CW 90.000
block containing the clamp functlon:
B180.0 CW 270.000
M/9 Unclamp table B90.0 CW 360.000
GOO B90.0 In.dex ID.ble 8270.0 CW 630.000
me Clamp/able BO No motion

Some designs require other M codes. for example to con- 8125.31 CW 755.310
trol the clamping pln or a table ready confirmation. 8-180.0 CCW 575.310
The B axis is programmed logically the same way as the 8-75.31 CCW 500.000
linear axes, including the mode of dimensioning. Either the 8-75.31 CCW 424.690
absolute or the incrementa! mode can be used for indexing, 8-424.69 CCW 0.000
using standard G90 and G91 commands respectively.
HORIZONTAL MACHINING 1

Study both tables block by block, in B AXIS AND OFFSETS


results are always important for
B-37.0 in the first table - exaclly the same
achieved if the block read B323.0 as a One of the most important
and horizontal machining centers is
In the second table, the first block is in and particularly set the two major
to guarantee a start at BO. One occurrence (hat is
- when the rotation in the same direction
o Work offset
full circle). It continues to increase. It o T001 length offsets
zero again. That is something to
(in the incremental mode) takes place radius offset is not affected by the B and is
table position will be 720.000°. programmed the same way as in machining.
be necessary in the opposite way in order to relationship of offsets [0 the machined a
zero. A small example is illustrated in important and is also more complex than for the ver-
approach.

• Work Offset and B Axis


The work offset [s measured the same as before the
zero to the program zero. What is different now is
lhe reality of several faces used for machining rather than
one. That means the too! path for each has to have
own program zero, therefore its own work
shows a typical setting, looking at the
spindle.
GOO BO B45.0
r"'iI---
Machine
Zero
,/
Ibl
@)-
45·3
B axis direction from 80 to 845.0 in the absolute mode· 04501

the typical block


04601: G54 (Y}

04601
G90 GS4 GOO X.. Y.. Z ..
M79
:eo PART
J
M7S ,, ; ,

< DRILL HOLE AT )30 >


FRONT VIEW
a90 G55 GOO X . Y z
M79
Figure 46-4
)345.0
Mfa Work offset for a h"""nnt",1 aJ)plll~atllm front view shown

< DRILL HOLE AT )345.0 > Although the illustration


of the indexing table, the
of each pan or even
The LO the are not important
ther approach and is no
for the example.
specified requirement of the job,
of the work and - of course - lhe
preferences.
432 Chapter 46

When changing from one face to c:mother, remember La y


. !~
change the work offset. For example, if there are four faces - .. z
to machine, each face will have its own work offset. such as
G54, G55, G56 and G57. The B aXIs is usually noL depend-
ent on work offset, so [he best block to program a new off- -Q..
I-
0
set is during the first rapid motion. 1lle previous short ex- LO
....J

ample illustrates the method. The next section describes Ihe ..-,
0 0
N 0
work offset setting for the Z axis and tool length offset. N N l-
, I
/
I !

• Tool length Offset and B Axis I


Z-298.0 I
I"
~[-
;
It should easy to understand the concept of multiple work ,
offsets for multiple faces. Selling the tool length can be
quite complicated, depending on many factors that influ-
-
-
-
.-. - -

ence the decision. The first factor is the meLhod of setting


.... -- -300.0 - ~
[001 length. 1l1cre are aL least two methods to set the tool PART.
length offset. Both have already been covered in Chapter "V',
", ,':<.
,
J9, but now they take on a new significance.
Touch-Off Method I I
TABLE
I
I
IJ H = NEGATIVE VALUE
One method is to rouch-offlhe ZO of the machined face
and register the distance from the tool tip as a negative Figure 46·£
length offset. This was thc preferred method for vertical Touch-off roo/length offset method· example with H as negative
machines. 1l1e touch-off method may be acceptable for a
small number of tools and indexes. Although it is possible Preset Method
\0 sclect the center of indexing table as ZO, it is not a practi-
Tool length set on vertical machining cenrers is often a
cal solution. Figure 46-5 shows the principle of louch-off
touch-off method but it could also be the preset method.
setup in general terms, and Figure 46-6 shows a practical
The preset method uses a special tool length presetler
example. No[e that the setup is exactly the same as for ver-
device and is done off machine. There is a good reason why
tical machining. A program block
the preset method is much more practical for horizontal
G43 Z2.0 HOl
machining than for vertical machining.
Recall that one tool normally requires one too! length off-
will move the tool Z-298.0, if HOI is set 10 -300.0. set. Now, consider a very typical situation for a horizontal
y machining - a single tool has to machine six faces, followed
A
N
0 by other four tools Ihal also do Inacliining on the same six
-~Z faces. Each of the five tools requires a unique tool length
for each face - for the tolal of 30 different length offsets!
I-
W 0::: 0.. This is not an isolated example, but there are several solu-
<..')
0:::'
«
·W
i=
....J
tions to such a situation.
<:( '....J
0
,
I- U, 0 All solutions use the preset tool length measurement and
N N I- olle additional setting. The tool mounted into the holder is
~------~' I placed in the presetting device. Through a computerized
..... DIST-TO-GO. optical reader, [he preseHer is calibrated to match [he ma-

-~[
chine gauge line. Then, the tool length is accuralely mea-
sured. It is a positive value representing the actual tool
length from ils tool tip to the machine gauge line. This is
(he amount that wifl be input into the corresponding tool
.... H- length orfset register. There is only one problem - where is
PART rhe relationship of this measured amount to the part posi-
';{I ><: tion? In the touch-off method, (he tool touches the part and
TABLE the relationship is dIrect. The preset method has no contact
I I I I I
H =NEGATIVE VALUE - one additional seTting mentioned earlier has to be made,
This setting [s an entry or the distance hetween machine
Figure 46-5 gauge IIne and the ZO of the current work offset Z address -
Touch-off too/length offset merhod - layout with H as negative Figures 46-7 and 46-8.
HORIZONTAL MACHINING 3

y y

-+Z
G54 (Z-NEGATIVE)
I-
w
CD
0:::
«
l-
i~
10
N N•

.------;--'----, ( OIST-TO-GO
1<111 :

- I

I 1- H
TABLE
I
H :: POSITIVE VALUE H = POSITIVE

46·7 46-9
Preset toof length offset to ZO=face -layout with H as positive Preset tool length offset to lO=center • layout with Has posit.ive
y
was to the ZO position at the
option exists irZO is set as the cen-
-500.000 In fact, it is only the perception of a
0.. is the same in reality. Figures 46·9 and
i= change from the last two
.....I
o only because of the additional di-
o
l- the distance from the program zero
I
values in the program will ruso
Z-298.0 I dimensions are taken from ZO at the table
of part

-q[-
j<lll

.200.0
--lao-:
I

H= VALUE

Figure 46-8
Preset too/length offset to examD,/e with Has positive

The illustration into the


"'nip,.",£!

Z ofG54 is the distance


method
IJV~"lJl.'" as G43Z2.0HO}.
as always:
PART
1:: :x: ...
o

G54(Z) + Z clear + HOl


:: -500.0 + 2.0 + 200.0
II TABLE IJ H= VALUE
= -298.0
Figure 48-10
TIle toollhen continues (0 15.0 depth. Preset 1001 length offset to ZO=center· example with H 8S
434 46

[n Ihe is block that moves the loollO Z INDEXING AND A SUBPROGRAM


calculate the distance-Io-go
W distance thaI must always be
(iixture . or actual me~sure- . all combinations of various setup
W"".t50.O, no change for the length and theIr mfluence on the program fonnat is virtually irn-
but an Important change to thc 054 - The subject of horizontal macbining. particularly
now it is measured table center (ZO). The Z clear portion, can be quite complex and some
position includes W lenglh and the physical clearance The layout presented in
of2 mm, same as in case. In [his example, the at least the general understanding of the
amounl of is used: programming example may help_
way,
G54{Z) + Z clear + H01: drill
= -650.0 + 152.0 + 200.0
46-11. The spot drill will
= -298.0 'r".\,rnu.rof X 45°, measured from the h

The tool then normally to the Z-135.0 All the depth calculations are
Overall, this selup application is the same as
previous one. The operator must know is 20 IV'I.·Q' ... ·\.J
- 0250
for every job. This information from the
CNC in the
a

RETURN TO MACHINE RD
TOP
XZVIEW
In vertical relUrn to machine zero has
been programmed tool in majority of cases. The
relUm was along the Z axis only. reason was sjmple -
on a vel1ical machining Z machine zero is syn-
chronized with the automatic tool This is not the
case on a horizontal center.
Due to its design, [he
lion before each lool
06THRU
, 13.75 TYP
respects, programming IS
exactJy the same. 6.875 TYP
Here is a comparison a before a lool
change for the IWO machine FRONT
XY VIEW I
26.875
Vertical: G91 G28 ZO
t 1_·««««««««<<<<<<

J......;..""'-l--:.....:..;!H-i-+--J.-.J-i-.J 0 .000
Horizontal: G91 G2B YO zo
The question is what is lhe Z axis relurn in the
when only the Y return IS answer is a
one word - safety. Although only the Y is to
612 HOLES IN COLUMNS
a successful automatic lool change, the tool to be
away from (he pan al the same time. The return lhe 2
17 HOLES PER COLUMN
makes It easier. Of course,
46-11
clearance in the Z axis would also
That may pwve more difficult than it <In.,,,,,,,",, Practical ex;:;tmfJ.fe ",,,'UJllJ/r:; 04602
in an index position other than zero,
discouraged by the
tools, different part faces, fixture in the way, etc .. it
to always know exaclly how to retract
a subprogramming will nimize
length. The program does not use clamp
is why a simple rule is worth
and uncJ~mp sequ~nces, w.hich is typical to rotary type
~ aXIs. If the machme requIres unclamping before
and clamping it after indexing. use M
functions for clamp and unclamp the table.
HORIZONTAL MACHINING 435

Before getting into the program itself, the tools and their 04602 (MAIN PROGRAM)
use need [0 be selected. Only two tools will be required, a (START FROM MACHINE ZERO - TOI IN THE SPINDLE)
10 mm spot drill and a 6 mm drill. Figure 46-/2 shows the (XOYO = FIXTURE CENTER I ZO = BOTTOM OF PART)
critical positions of (he two (001 lips. (T01 - 10 MM DIA SPOT DRILL)
(T02 - 6 MM DIA DRILL THRU)

Z111.158 N:l G21


N2 G17 G40 G80
IN3 G91 G28 ZO
IN4 G2B XO YO
Z121.600

~-
INS G28 BO
N6 G90 G54 GOO XO Y26.875 S1000 M03 T02
, Z127.000 N7 G43 Z275.0 H01 MOS
N8 M98 P4651 LIS
1"'\-- R LEVEL
N9 G28 YO ZO
NlO GlB BO
Nl1 MOl
I
~--INITIAL LEVEL =Z275.000
Nl2 T02
XO N13 M06
N14 G90 G54 GOO XO Y26.875 S1250 M03 TOl
Fjgure 46·12 Nl5 043 Z275.0 H02 MOB
Detail of tool data used in program 04602 Nl6 M98 P4652 L18
N17 G28 XO yO ZO
The R level is the same for both tools and the depth for NlB G2B BO
Lhe spot drill also includes a small chamfer [0 deburr the N19 M06
N20 M30
holes. Drilling depth guarantees a full drill penetration. Ac-
%
tual calculations are not important here, but they do follow
the same rules established in the earlier chapters. 04651 (SUBPROGRAM FOR SPOT DRILL)
NlOl G91 G80 Y-6.875 (MOVE DOWN BY PITCH)
Development of the subprogram needs some work, Two Nl02 G90 Z275. 0 (CLEAR Z)
subprograms will be used. They are virtually the same, ex- Nl03 G91 BI0.0 (ROTATE BY 10 DEGREES)
cept for the fixed cycle selection. Seveml olher methods Nl04 G99 G82 R-148.0 Z-5.4 P200 F120.0 (DRL)
cou ld have been aJso used, but Ihis chapter concentrates on NQOS YL3.75 L16 (16 MORE HOLES IN Y PLUS)
the indexing table only. The two subprograms will start at Nl06 GSO GOO Y6.875 (MOVE UP BY PITCH)
the bOltom of the pattern, at the BO location (0°). This hole Nl07 G90 Z275.0 (CLEAR Z)
will be used as the start position only but will not be drilled NI08 G91 BIO.O (ROTATE BY 10 DEGREES)
NlOS G99 G82 R-148.0 Z-5.4 P200 (1 HOLE)
until all other holes have been done. The hole is not drilled NllO Y-13.75 L16 (16 MORE HOLES IN Y MINUS)
yet, but the J00 indexing has to be included in the NUl M99 (END OF SUBPROGRAM 04651)
subprogram. That is the reason for starting one column %
away. Two columns are part of each subprogram with a 10°
index between them. Comments in the subprograms ex- 04652 (SUBPROGRAM FOR 6MM DRILL)
plain (he process. Note the area marked in Figure 46-13, in- N201 G91 G80 Y-6.S7S (MOVE DOWN BY PITCH)
dicating the subprogram contents. N202 G90 Z275.0 (CLEAR Z)
N203 G91 BlO.O (ROTATE BY 10 DEGREES)
o Q 0 (I
N204 G99 G83 R-148.0 Z-15.84 Q7.0 F200.0 (DRL)
o
o 0 0 0 0000
0 0 0 0 N(T"J..;:tlO
N205 Y13.75 L16 (16 MORE HOLES IN Y PLUS)
O..-N(T"J-.::t C')('jC')("')
, N206 G80 GOO Y6.875 (MOVE UP BY PITCH)
N207 G90 Z27S.0 (CLEAR Z)
N208 G91 B10.0 (ROTATE BY 10 DEGREES)
Subprogram contents N209 G99 G83 R-148.0 Z-15.84 Q7.0 (1 HOLE)
N210 Y-13.75 L16 (16 MORE HOLES IN Y MINUS)
N211 M.99 (END OF SUBPROORAM 04652)
%

The initial level ofZ275.0, used in all three programs, is


reasonable for safe indexing. To select a suitable Z axis
First hole in main program
Last hole is subprogram -a~ ..... ',w clearance is very important and knowing (he indexing table
size and [he size of its corners is imperative. For the record,
the table for this job will be 400 x 400 mm square with 50 x
Figure 46-73 50 mm corners. The part setup is concenu'ic with the index-
Flat cvlinder layout· both ends shown for subprogram development ing rotation and there are no intertering elements.
436 Chapter 46

1 -
u co
w- l.JJ
u
li LL
~

120
16

FACE A

U (Q
l.JJ ---- l.JJ
U U
«
LL
«
LL

L NG

011 DRILL THRU


0148 B.C.D.
8 EQSP
Figure 46-14
A typical multi sided part suitable horizontal machining operation - program 04503 (subprograms 04653 and 04654J

COMPLETE PROGRAM EXAMPLE 04653 FOR S HOLES AT 148 MM BCD)


mOl X74.0 YO
part [or a horizontal machining center requires Nl02 X52.326 YS2.326
from several sides in the same setup. Such Nl03 XO Y74.0
of a housing, is shown in 46-14. Nl04 X-S2.326 YS2.326
mos X-74.0 YO
m06 X-S2.326 Y-52.326
NlO? x-o Y-H.O
NlOB X52.326 Y-S2.326
Nl09 M.99
%

04654 (SUBPROGRAM FOR 6 HOLES AT 99 MM


A, mOl X49.5 YO
is to develop two subprograms N202 X24.75 Y42.S69
hole All dimensions have been accu- N203 X-24.7S Y42.868
rately but no details are necessary. First (001 is in the N204X-49.S YO
die at The part IS located in a mos X-24.75 Y-42.868
m06 X24.7S Y-42.868
[he' table. Pallet changing has from N207 M99
the but is explained in the section that follows. %
The contain bolt pattern
MACHINING 437

04603 (MAIN PROGRAM) N51 GBO Z300.0


(FACE A = G54 = BO = 8 HOLES) N52 M79
B G55 = B90.0 = 6 HOLES) N53 B270.0
(FACE C G56 = B270.0 = 6 HOLES) N54 MIS
N55 GS6 X49.S YO ZlO.O
(TOl - lS MM DIA SPOT DRILL) N56 G99 G94 R5.0 Z-23.0 LO
(T02 - 8.4 MM TAP DRILL) N57 M98 l?46S4 (TAP FACE C)
(TQ3 - mo X L 5 TAP) N58 G80 Z300.0 M09
(T04 ~ 11 MM DIA N59 G9l G28 YO ZO MOS
N60 MOl
(TOl - is MM DIA SPOT DRILL - ALL HOLES)
N1 G21 (T04 - 11 MM DIA DRILL)
N2 G17 G40 G80 N6l T04
INJ Gn G28 ZO N62 MOG
IN4 G28 XO YO N63 M79
/NS M79 N64 BO
IN6 G2S BO N6S M78
I'IDM78 N6G G90 G54 GOO X74.0 YO 5800 M03 TOl
N8 G90 G54 GOO X74.0 YO S86S MO) T02 N67 G43 Z10.0 H04 MOS
N9 G43 ZlO.O HOi MOB N68 G99 G81 R2.0 Z-20.3 P200 F225.0 LO
NO G99 GB2 R2.0 Z-S.8 1'200 F1SO.0 LO N69 M.98 P4653 (DRILL FACE A)
Nll M98 1'4653 DRILL FACE A) N70 Gao Z300.0 M09
Nl2 GSO Z300.0 N7l G91 G28 XO YO ZO MOS
N13 M79 N72 M30
N14 B90.0 %
NlS M78
NlS GSS X49.S YO ZlO.O comments (0 the example. Bmh the
Nl7 G99 G82 R2. 0 Z-S.3 P200 LO two subprograms are quite plain.
NlS M98 P4654 (SPOT DRILL FACE B) applications, the Z axis
Nl9 GBO Z300.0 too high with Z300.0 nr"""""r-nT1n;:>/i
N20 M79
N21 B270.0
Large clearances are for
N22 M7e indexing table (0 index within a
N23 GS6 X49.S YO ZlO.O in the way. It is not
V U " «..\.d'-",

N24 G99 GS2 R2.0 Z-S.3 P200 LO minimum Zclearance, but it is


N25 M98 P4654 DRILL FACE C) enough for all faces. A CAD software
N26 GSa Z300.0 M09 a Other features and programming
N27 G91 G28 YO zO MOS same as used elsewhere in the handbook.
N28 MOl

(T02 - 8.4 MM TAP DRILL) AUTOMATIC PAllET CHANGER - APe


N29 T02
N30 M06
NJl G90 GS6 GOO X49.S yO Sll37 M03 T03 One of the greatest concerns in machining is the un-
N32 G43 ZlO.O H02 M08 productive time required initial part setup and re-
N33 G99 GS3 R2.0 Z-24.8 Q6.0 F200.0 LO mounting the pllrt when u butch job. Many
N34 M98 1'4654 DRILL FACE C) incorporated in the control or the machine
N35 Gao Z300.0 sel f can shorten the
N36 M79 They include tool length
NJ7 B90.0 offset, etc. However, none of them
N3S IDS the ti me used up when
N39 GSS X49.5 YO ZlO.O
N40 G99 GS3 R2.0 Z-24.S Q6.0 LO ble. Probably the
N4l M98 P46S4 DRILL FACE B) of a pallet table to
N42 Gao Z300.0 M09 idea in machining.
N43 G91 G2a YO ZO MOS pallets [0 mini-
N44 MOl setup
(T03 - mo x 1.5 TAP) Traditionally, one machine has one work [able. Such a
N45 T03 of a machine tool has one flaw while the ma-
N46 M06 chine is working (and the CNC is virtually idle),
N47 G90 GS5 GOO X49.5 YO 5550 M03 T04 no other work can be pelformed. for the
N48 G43 Z10.0 H03 Moa next part is done at the expense of idle,
N49 G99 GB4 RS.O Z-23.0 F825.0 LO
NSO M98 P4654 (TAP FACE B) resulting in an unproductive time.
438 -~.~~ .... ~ ..
~~--~ ..
~-~--.~
Chapter 46
....••••........••.•.....••.•

By definition, an automatic pllilet is a work table thal can The popular rotary type works on the principle of a turn-
be moved iol'o and out of the machining posilion by a pro- table, where one pallet is outside of the machine, the other
gram command. If a purpose of such a design is to improve pallet is in inside of the machine. The pallet change com-
a nonproductive setup lime, it is necessary to have at least mand rotates the pallets 1800 and its programming is very
two independent pallels available - while the part on one si mple. Figure 46-15 i Iluslrates the roeary type ..
pallet is being machined, the other pallet is available for
changing the setup for the next job or for unloading and Z+
loading individual parts. In this way, the machining and the -X+
setup can be done simultaneously, shortening or even to-
tally eliminating the unproductive time.
Although a two pallet system )s the most customary for
horizontal machining centers, designs with up to tweJve
pallets are not uncommon.
/
• Working Environment (
For a typical dual pallet changer, two major areas should - .- -"" ---
be distinguished: \

o Machining area ... within the machine


\. ) J
o Setup area ... outside of the machine \ /
~ /
One pallet is normally located in the machining area, the
other in the setup area. When a program starts, it normally
starts with Pallet # I (with the part) located in the machining
Figure 48- 15
area and Pallet #2 (wilh no part) in the setup area. 111ere are
many designs of pallets, but they all share three major parls: Typical rotary type 01 a pallet changer

o Pallet Also popu lar is the shuttle type. This design incorporales
o Machine locator double rails between the load area and (he receiver inside
tlie machine - Figure 46-16. Tts programming is still Simple
o Transfer System but more involved than for the rotary type.
Pallet is the portable work table with a ground surface to Z+
which we mount the fIxtures and parts. The table can have
T slots. tapped holes or bOlh.
Machine locator (also known as a receiver) is a special
device located inside of the machine. Its purpose is to ac-
cept and firmly hold the palJetloaded wilh a part ready for
machining. Its design must be very robust and accurate at
the same time.
Transfer system (also known as a pallet loader) is the sys-
tem that rransfers pallets between the load area and the
machine work area.
Orten the terms load and unload are used. Load means to
move the palJet into the machining area, unload means to
move the pallet into the setup area. The transfer system de-
termines the Iype of the pallet
PALLET 1 PALLET 2
• Types of Pallets
Figure 46- 76
There are two general types of pallets, based on their
TVpical shuttle type of a pallet changer
transfer system:
o Rotary type Both pallet types are loaded from the machine front area
Other pallet types are also available for some special ma-
o Shuttle type chining applications.
MACHINING

• Programming there are five axis designated, a horizontal


still only a four axis machine. The axes are:
0 X axis ... table longitudinal
0 y ... column
Automatic Pallet Changer (APC)
0 Z ... spindle quill

command works properly only when the


0 W ... table traverse
tion is at one of two machine reference points: 0 B axis ... indexing or table

Settings are similar to a W


Machine return 10 the primary reference point
During setup, lypical work
Machine return to the secondary reference point 0 G54 X ::: Negative
y Negative
Z Zero
the same, except it moves
W = Negative
B Zero
machine reference
As many horizontal boring mills do not have an auto-
• Pallet Changing Program Structure matic 1001 changer, the G30 should be set conve-
niently for the operator (0 a tool change manually
The following program emphasizes (X,Y,W axes). This position is set by a system parameter. Z
on a typical shuttle pallel system. it can axis value is Ihe length quill out of the spindle,
a system. In both cases, one
chining area, the other is in the area. Programming format is on the principle that all
mOlions into the dcpth are in W aXIS, rather [han
04604. the Z axis. The quill that is controlled by the Z axis, is
G91 G28 XO YO ZO pulled out only for its extension from
G28 BO the spindle must enough clear-
M60 (LOAD PALLET 1)
ance for the shortest program.
< machining 011 Pallet 1 ... >
G91 G28 XO YO zo Typical is followed by a more de-
G28 BO tailed explanation. reference only and
M60 match the comments
G30 XO
M60 (LOAD PALLET 2) [01] 04605 (PROGRAM
<... mnt",·""m on Pallel2 ... > [02] (MESSAGE OR COMMENT)
[03] IDO G21
G30 xO
[04] mo G91 G30 WO
M60 (iJNLOAD PALLET 2)
[OS] IDO G90 S •. MO)
lO0
[06] N4.0 GS4 GOO X.. Y..
%
[07] NSO G30 ZO
[08] N60 G43 W•. H ..
HORIZONTAL BORING Mill J mo G01 W.. F ..
[10J
(11)
The chapler on horizontal would not be com-
< 1l1il'~lUl'Ul >
plete without at least some comments relating to the ma-
chine called a horizontal mill. A CNC boring mill is
similar to a CNC horizontal center, usually a lit-
tle larger in size. It mayor not have an automatic lool
changer, and usually has spindle motion split into two
axes· Z find W. fol is a typical setup of a 4 ax is
horizontal boring mill with an indexing B axis and a Fanuc
or Similar control Wilh:
o Six work offsets ... G54 to G59
o Two rn1O,<,h", .. n.tl>r,l>nr'''' ... G28 and G30 (24] N600 M30
%
440 pter 46

following comments identification r 12] ... ( machining the part) ...


in the example: [ 13) .. .
r 14) .. .
( 01 I Program number (name up to I 15 J Rapid motion back to the clearance n
i 08
! 02 I Message to the operator· only n"'Tl",,","n r 16 J Spindle stop
! 03 1 Metric or English uniti\ selection r 17 I Rapid motion of the quill to spindle
! 04 I W axis moves to a tool change position 118 I Rapid motion to the tool change position along the
(incremental motion for safety) W axis and cancellation of tool length
[ I Selection of absolute mode and spindle functions 119] Rapid motion to the tool change position along the X
r 06 ) motion to the starting pOSition in XY within and Y axes· in incremental mode for
the work coordinate I 20 I Manual tool change
! 07l Quill out by the 121 J ••.
[08\ Tool (set I I· .. (additional machining, following the above format .. )
program zero) and motion to [23 J . .
! 09 I Feedrate motion to the I 24 I End of program
[10) .. . I I End of record (stop code)
[11 J .. .
WRITING A CNC PROGRAM

Wriring a CNC program is the final result of manual pro- PROGRAM WRITING
gramming. This last step requires a sheet of paper, or many
sheets of paper, that contain the program. The program IS Writing all collected data into a final version of the CNC
composed of individual instructions related to n:~chll1mg part program is one of the last items inside of the program-
and arranged in a series of sequential blocks. W.rttlOg does ming process. To get to this stage requires hard work
not mean usincr only·a pen or pencil. Modern Wnlll1g meth- through all other stages - when all thoughts have been col-
ods employ a ~omputer and a text editor, but the result is lected, all decisions have been made and a certain level of
still a written copy of a manually generated part program. comfort has ,.:,etlled in. In the previous chapters, the empha-
Manual program development is the result of a lot of hard sis was on the program development as a logical process.
work. A short program with a few lines of code may be as Now, lhe focus wi Il shift at the actual method of writ! ng the
easily entered into the control directly as to be written down CNC program, following this logical process.
on paper. However, the written copy will often be required Wriling (he program is based on two initial factors:
for documentation and other reference purposes.
o The corporate standards . .. company decides
The need to program by hand seems somewbat back-
wards in the aoe of computers, printers .and other hi-tech o The personal style ... you decide
c .
wonders but it is a method that will not dlsappear any lime Both factors can be adapted simultaneously in a single
soon. W;iting a part program manually requires lime and is
!.wogram - LIley are fully cOlilpati ble. It i::; unreasunable tu
always subject to errors. Manual work means wo~k b.y expect any indus!l}' or world-wide standards relating to the
hands, so it seems that a need for special computer skills lS various techniques of developing a program. It may be even
not required. Is thai a correct assessment? less reasonable to let any company based standards, unless
In lhe traditional way, a program can be written with a there is a general set of rules and rc:commendations already
pencil and a paper (and a five pound eraser, as an old car- ill existence.
toon claimed). Its final form is transferred to the control The final result is that the first guiding factor - company
unit, a short program may be keyed inlo the system directly.
standards - is replaced by the second factor - personal style.
by pressing various keyboard keys. For long progra:ns, thiS
From an objective point of view, there is nothing wrong at
approach is a waste of time. The moder~ alLernaUve (0 a
all with a personal style of programming. If the program
pencil is the keyhoard of a compu~er, Ll~lOg a ~Jmple ~exl works, who cares how it was done. From a revised point of
editor 10 make a plain ASCn text hie, WIll) no tormaHlOg.
view, it needs 10 be acknowledged that a CNC programmer
The computer creates a CNC program as a file stored on the
can never succeed in isolation. Programming involves at
hard drive. This tile can be pnnted or send directly to lhc
least one user of the final program - the CNC operator - and
CNC machine. The only difference is that the computer thac makes il. in effect. a team work.
keyboard has replaced the pencil and the editing features of
the text editor have replaced the eraser. Even today, a greal The most common problem with uncontrolled personal
amounl of manual programming work in is still done in style is inconsistency. Any CNC machine shop that i:m-
writing, using a devices such as pens, pencils, calculators ploys - or plans to employ - more than one programmer.
and erasers. should establish certain minimum standards pn:pa-
ration of a part program. Adherence to these slandards al-
Reoardless of the media used, learn how the computer -
lows any team member to pick up where another member
the c~ntrol system - interprets the written program. what
has lert. Often. the personal slyle ofille firSI programmer in
syntax to use, what to avoid and what form~( is correct. the company will carry 011 and on and eventually becomes
Even if not programming manually al all, It lS Important to
{he company standard, for better or worse. Such a situation
know Ihe principles of program writing techniques, in or- may well be very positive. but in most cases it needs revalu-
der to make changes in any program that was developed by
ation or at least a bit of modernizing.
a CAD/CAM syslem, if necessary.
To define a company standard, first evaluale some sug-
eNC program should be written in such a way geslions and practical observations thaI may be helpful \0
that it can be interpreted without a difficulty prepare the program efficienlly for any style [hat may be
suitable (0 foHow and useful in [he future.

441
442 Chapter 47

• legibility of Handwriting For instance, all and printers (even the old
preparation systems) use a special method to
Writing a assistance of a computer
individual characters on the screen and in print.
and a text means a CNC program in I,
handbook there is an obvious difference between a
A wriuen program (preferably by pencil) is
letter 0 (as in a narrow digit 0 (as in 000
easier to correct without a mess and i[ should be double or
even triple when written on a sheet of paper. Indi- The same technique applied (0 personal hand-
vidual words in a block should be by a writing. Take fact that (here is no letter 0
space, to further legibility. This way, any additions used on most controls except as a program num-
or future changes (if necessary) can ber and in a comment where a misprint will not
quite easily, yet still keeping lhe overall appearance create a problem If preferred, find a
paper copy clean neat. Problems with nation only ror the rest is all digits 0 by
manually generated are much of a fault - unless hundreds zeros are identified specifically
the program is into a computer text file. and in a unique way in part program.
in those cases, the copy be illegible for
cal reasons, such as a printer toner, for

• Programming forms
o or 0 DIGIT ZERO

In the early years of numerical control, special program-


o LETTER 0

ming forms were wilh pre-printed columns I ONE


each address in the were the days when only
the numerical values were into the appropriate col- 1 RI
umn and the column f determined the DIGIT TWO
meaning. These were often
cOnlrol and machine as an (0 LETTER Z
writing and a little on Il Today, a ruled
a sufficient. No special col- Figure 47-1
umns are a or two is justified, it can form of characters written ambiguity
drawn easily enough. use alphanu-
meric representation, the whole word - alpha char- illustration in Figure some suggested
Deters as well as numeric and special symbols. of common character in handwriting.
process is much more hardly any ma- way to write rnrl"'51rtpr~ rhat may im-
chine manufacturers print forms any more. legibility. which method
:><;;I'<;;;l,.;ll<;;;U as personally rw,.tp,.~
programmers in some is nothing worse than
ily the final program version Many manag- for evcry new program.
ers consider such work a cPr" .... r''',. responsibility. That son who prepares the program final
means somebody else (a or an will read the than confused and eventually may make a error.
written copy and has to be it corrccily, the
it was intended. Such a person absolutely no Handwritten method can be bypassed entirely by keying
of CNC programming nOI be able [0 in the data via control keyboard.
even simple syntax errors. then the part machined and
sent out the job IS finished. This
• Confusing Characters the machine for a while and is not ,.t>f'r\rt'\,,.,.,P

ryday
legibility of programmer's handwriti tern. The lS to prepare the program
portarH. Make a special effort when on a computer and send it directly 10
ters (alphabetical or numeric) that can CNC through 11 cable connection.
Depending on
can be confusing to exam- users today do not use a punched
letter 0 digit 0 can look the same. tape anymore, if still do, it is usually for old ma-
the leller Z can be con leiter 1 chines only. More modern methods are available, such as
I as well as a low case l are exam- disk storage of a or laptop computer. an
arc only some of the most obvious examples, interface computer and the machine,
but many olher characlers can also confusi depend- be IransfelTcd reliably, thus
ing on person's handwriting. Try to a punched methods altogether.
tem writi technique 10 distinguish potentially confusing method is as the program still has to
characters is a relative term, of properly formatted.
WRITING A CNC 443

PROGRAM OUTPUT FORMATTING of writing a program. AI-


some doubtful benefits, it is the leas!
with a very poor appear-
who followed this handbook from the beginning,
the CNC openHor to read
chapter chapter, should be well familiar with program-
by now. This section deals with the actual program
formal not but how it appears on the printed c::> Program Version 2 :
or screen of the computer. It will evaluate four ver-
of the same program. Identical in every respect, ex- NlG20
appearance. Feel free to be the judge as to N2G17G40G80G49
four format versions IS the most suitable and N3TOlM06
long program is presented - intentionally - N4G90G54GOOX-3.25YQS900M03T02
program. It is not important whalit does, N5G43 Zl. DH01.MOS
when printed or displayed. Each new ver- N6G99G82X-3.25YORO.lZ-O.39POSOOF8.0
N"7X3. 25Y3. 25
over the previous version.
lfTlInrnUl"'1I
N8XO
N9X-3.25
c::> Version 1 : NlOYO
NlIY-3.25
G20 N12XO
G17G40G80G49 Nl3X3.25
T01.M06 N14GSOGOOZ1.0M09
G90G54GOQX-32S00YOS900M03T02 N15G28Z1.0M05
G43Z10000HOlM08 Nl6MOl
G99G82X-32500YOR1000Z-3900POSOOF80 N17T02M06
X32500Y32500 NlSG90G54GOOX-3.25YOS750M03T03
XO Nl9G43Z1.DH02M08
X-32S00 N20G99G81X-3.25YORO.IZ-2.2563F12.0
YO N2lX3. 25Y3. 25
Y-32500 N22XO
XO N23X-3.25
X32500 N24YO
G80GOOZIOOOOM09 N2SY-3.25
G28Zl0000M05 N26XO
MOl N27X3.25
T02M06 N28G80GOOZ1.OM09
G90GS4GOOX-32S00YOS7S0M03T03 N29G2SZ1. OMOS
G43 ZlOOOOH02MO 8 N30MOl
G99GBlX-32S00YORIOOOZ-22563Fl20 N31T03M06
X32 SOOY32 500 N32G90G54GOOX-3.25YOS600M03TOl
XO N33G43Z1.0H03Moa
X-32500 N34G99G84X-3.2SYORO.5Z-1.3F37.S
YO N35X3. 25Y3. 25
Y-32500 N36XO
XO N37X-3.25
X32S00 N38YO
G80GOOZlOOOOM09 N39Y-3.25
G28Zl0000M05 N40XO
MOl N4lX3.2S
T03M06 N42G80GOOZ1.OM09
G90GS4GOOX-32500YOS600M03TOl N43G28X3.2SY-3.2SZ1.0M05
G43Zl0000H03M08 N44M30
G99G84X-32500YORSOOOZ-13000F375 %
X32500Y32500
XO IS
X-32500 gram. Look at
YO
sian of the decimal
Y-32S00
XO
X32500 in programs
G80GOOZlOOOOM09
G28X32500Y-32S00Z10DOOM05
mo The next program applies all done
% so far and addresses some addilional
444 Chapter 47

o Program Version 3 : (TOl - 1.0 DIA - 90DEG SPOT DRILL)


Nl G20
N1. G20 N2 G17 G40 G80 G49
N2 G17 G40 G80 G49 N3 T01 M06
illTOl M06 N4 G90 G54 GOO X-3.2S YO 5900 M03 T02
N4 G90 GS4 GOO X-3.2S YO S900 M03 T02 NS G43 Zl. 0 H01 MOB (INITIAL LEVEL)
N5 G43 Zl.0 HOI MOB N6 G99 G82 X-3.25 YO RO.1 Z-0.39 POSOO F8.0
N6 G99 G82 X-3.2S YO RO.l Z-0.39 (HOLE 1)
N7 X3.25 Y3.2S N7 X3. 25 Y3. 2S (HOLE 2)
N8 XO N8 XO (HOLE 3)
N9 X-3.25 N9 X-3.25 (HOLE 4)
NlO YO NlO YO (HOLE 5)
Nl1 Y-3.2S Nll Y-3.25 (HOLE 6)
N12 XO Nl2 XO (HOLE 7)
Nl3 X3.25 Nl3 X3.25 (HOLE 8)
N14 Gao GOO Zl.0 M09 Nl4 G80 GOO ZI.O M09
N1S G28 Zl.0 MOS Nl5 G28 Zl.O MOS
N16 MOl Nl6 Mal
N17 T02 M06
NI8 G90 G54 GOO X-3.2S YO S750 M03 T03 (T02 - 11/16 TAP DRILL - THROUGH)
Nl9 G43 Zl.0 H02 MOS Nl7 T02 M06
N20 G99 G81 X-3.2S YO RO.1 Z-2.2S63 F12.0 Nl8 G90 G54 GOO X-3.25 YO 5750 M03 T03
N21 X3.2S Y3.2S Nl9 G43 Zl.0 H02 MOB
N22 XO N20 G99 GBl X-3.25 YO RO.l Z-2.2563 Fl2.0
N23 X-3.2S (HOLE 1)
N24 YO N21 X3.25 Y3.2S (HOLE 2)
N2S Y-3.25 N22 XO (HOLE 3)
N26 XO N23 X-3.25 (HOLE 4)
N27 X3.25 N24 YO (HOLE 5)
N2B G80 GOO Zl.0 M09 N2S Y-3. 25 (HOLE 6)
N29 G28 Zl. 0 MOS N26 XO (HOLE 7)
N30 MOl N27 X3.25 (HOLE 8)
N31 T03 M06 N2B GSO GOO Zl.0 M09
N32 G90 G54 GOO X-3.2S YO S600 M03 TOl N29 G28 Zl. 0 MOS
N33 G43 Zl.0 H03 M08 N30 MOl
N34 099 GB4 X-3.25 YO RO.5 Z-1.3 F37.5
N35 X3.2S Y3.25 (T03 - 3/4-16 PLUG TAP)
N36 XO N31 T03 M06
N37 X-3.25 N32 G90 G54 GOO X-3.:2S YO 5600 M03 TOl
N38 YO N33 G43 Zl.O R03 MOB
N39 Y-3.25 N34 G99 G84 X-3.2S YO RO.5 Z-1.3 F37.5 (HOLE 1)
N40 XO N3 5 X3. 25 Y3.:2 5 (HOLE 2)
N41 X3.2S N36 XO (HOLE 3)
N42 G80 GOO Zl.0 M09 N37 X-3. 25 (HOLE 4)
N43 G28 X3.2S Y-3.2S Zl.0 MOS N38 YO (HOLE S)
N44 MJO N39 Y-3.2S (HOLE 6)
N40 xo (HOLE 7)
%
N41 X3.2S (HOLE 8)
N42 GBO GOO Zl.0 M09
This version is much improved. It uses all improvements N43 G2S X3.2S Y-3.2S Z1.0 MOS
of the previous version, yet adds a significant improvement N44 M30
- spaces berweeH words. Still, it is difficult Lo visually iden- %
lify the start of a tool. The next version will add a blank line
between Lools. The spaces do not impose an extra drain on The fi nal version (Version 4) may be a lUXUry for some
the CNC memory, yet the program is much easier to read. users. but it is the most elegant of all four. It adds initial de-
scriptions and messages to the operator. It includes pro-
o Program Version 4 : grammer's name and the date of the last update. It also in-
cludes the description of all tools at the program beginni ng.
(DRILL-04.NC)
It also uses the same tool descriptions for individual tools.
(PETER SMID - 07-DEC-Ol - 19;43)
at the beginning of each 1001 section, where it matters most.
(T01 - 1.0 DIA - 90DEG SPOT DRILL)
(T02 - 11/16 TAP DRILL - THROUGH)
Some lower level controls do not accept comments In the
(T03 - 3/4-16 TPI PLUG TAP) program. If there are comments in Ihe program, such 3 COn-
trol system WIll SlfJP [hem automatically during loading.
WRITING A CNC PROGRAM 5

LONG PROGRAMS shortcut compare the


- both will have the same results

who ever worked with a 10nm


directly in a max!- 04701 (TYPICAL PROGRAM)
was (he maximum tape that NIO G21 G17 G40 GBO G90
900 or meters - or 108000 N20 GS4 GOO Xl20.0 Y35.0
loday's modern there is no NnO G43 Z2S.0 HOl
anymore, most part programs will run from N40 9500 M03
CNC system. Unfortunately, that memory N50 MOa
as well. often well below what tbe tape ca- N60 G99 Gal Xl20 0 Y35.0 R3.0 Z-10.0 FlOO.O
II all means thal a situation may arise, mo X150.0
NBO Y55.0
long program will not fit inlo the mem- N90 GSO GOO Z2S.0
to a good directory cleanup, are (wO moo M09
to eliminate this problem. m10 G28 XlSO.O YSS 0 Z2S.0
m20 M30
• Program length Reduction %

A the program A grand total have been programmed.


characters from me The condensed of the program needs only 89
to a long program, the acters. with a minor Ise. Program in Ihis form is
than can be more memory efficient hue much harder to read - remember
areas that should be considered Ihis is only a shall not a long program in en-
tirety, where the di would more impressive:
o all unnecessary leading or trailing zeros 04702
~GOO = GO, XO.Ol00 = X.Ol, ... ) G90 GO X120. Y35.
o Eliminate all zeros programmed G43 Z25. Hl S500 M3
for convenience : X2.0 "" X2.1 M8
G99 Gal R3. Z-lO. F100.
o Eliminate ali or most of the block numbers X1S0.
YSS.
o If block numbers, increments Gao Z2S. M9
by one will make a shorter program G91 G28 XO YO ZO
o tool motions into M30
tool motion, if safety allows %

o Use default but check them first length hav!:! he!:!n saved
o Do not include program comments in a rather very short the program
and messages to the CNC operator may become some cases, so here are sev-
methods lhal have been above example:
o Use comments descriptions on
a !':epilrilte pi~ce of paper o Program description has been

Organizing the process will definitely o Block numbers have been eliminated
for example. many instructions in a o G21, G17 and G54 have been eliminated
block as possible, dividing them into many (correct settings assumed on the control· be careful! 1
vidual blocks. if possible, use fewer tool
o Zeros following a decimal point in a
'~"',",~U. even if thai is possible, etc. At the
full number have been canceled
same lime, watch side effects when eiimi-
naling or deviating from an program format. o Some blocks were Joined together

There is no doubt thai many these measures will result o GSO GOO has been replaced by GSO only
in some compromise between convenience and necessity. (GOO is redundant, although
When thinking well ahead organizing the work prop- o zeros in GOO. 1,
erly. the results will W011h erforl. have been removed

These methods are shortcuts and shQuld be used for emergency


o zero retum has been changed
from absolute mode to incremental mode
situations only, not as programming procedures.
o ... Keep in mind, this is a no-frills program
446 Chapter 47

with many added benefits. Tape mode is not to


Think of the Tape mode as an external
will be processed A old fashioned sense.
very important change can achieved in the lool approach
towards the the tirst example (standard version). external mode requires a lillle extra
positions X and Y axes firs!' wilh On the hardware only a i
following in a separate block. Tn the shorter '~~'U~'" with a fair size hard disk
the order of motions has been preserved for safety that will con-
reasons. If Inl conditions allow. these two required. The com-
can combined into one. TIle 043 and 054 commands from the of-
can in the same block, without a problem'

G90 GO G43 G54 X120. Y35. Z2S. Hl SSOO M3

to consider the setup first and


everything is eonligured to work
towards or away from the part. If
come in the way because of the shortcut the con-
CNC or programs on the hard a
example would be a wrong programming computer, load the software and work with the
tem as usually! The major difference is in
and its actual writing will actually resides on the hard disk oflhe
soon establishing a computer and a (ext editor to edit the CNC
Jf using a computer, learn how to conlrol system. The capacity or current hard
directly at the keyboard. it is a waste more than will ever be needed. companies,
first. Il may take a liule lime mold shops, tool and die shops and other industries thaI re-
is well worth il. quire extremely long programs this tech-
a while ago, and very
• Memory Mode and Tape Mode
consider this method for the
Most CNC system have a special Mode This relatively new
from at least two opljons - MEMORY speeds and feedrates but
mode. The Memory mode is 111is combination means extremely
frequently - pwgram is loaded into the that will nOI fit into any
edited from the memory, and is flIn from the . . . . "','"""..." system. So before investing into rather
mode is, of course. to run a program updates, investigate this method
many users ignore the possibililies this ,nr"-''''rlflP'''' a personal computer. if the u """_"'''''''
not punched lapes in the machine shop
(most comranies do not), !he Tape modecan be
PROGRAM DOCUMENTS

preparation. quile a number of vari- DATA FILES


ous pieces will accumulate. All sketches,
calculations, setup tooling sheets, job descriplions, a hard copy the
instructions to the and related notes contain valu- on adisk).
able information. information should be stored as part documents mentioned here are
of the program documentation folder. Any changes to the They creale a sel all fi
finished at a for whatever reason, can called the data files.
done much easier if the documentation IS complete.
organized and In one A files are useful \0 the programmer, but only
makes a review of [he some are impOrlanl to the CNC machine operator or
somebody to the documentation person A number of tiles are only for and
will save much way programmers are nol senl to \he machine shop. Two
documen[ programs their personal pro- for established:
gramming a reliable indication of
their sense capabililies. o Programmer keeps all the files
o Machine copies of relevant files only
A simple definition relati to program documentation
can be guarantee thallhe ullimate responsibility
the CNC programmer.
every piece of documentation for
only items Ihat relate to the actual
in the shop. Unnecessary duplica-
Many CNC even machine shop supervi- and should be avoided. The only
sors, underestImate the program docu- 10 the machine shop are:
mentation. Their the paperwork is
not worth the lime, Ihat il 100 long to collect all docu-
o
ments and prepare [he documentation, that it is essentially a Q Prog ram I'ITI"tn •• t
nonproductive effon, etc. are true, to a
o Setup sheet
point - in order 10 make a documentation, yes, some
time will be Not an amount of Ijme, but o Tooling
enough Lime La do a job. If blank
forms available, they jusl to nOI take
any more time Ihan wriling the same information on any
olher pIece of paper - ir can actually lake a lot lime. If a
CAD system is available, use il [0 a customized
tooling library and setup sheet A of blank forms
can be predefined, then filled quickly they are
CAD system will save lime, it the
doCtlmenration neal, and every in
easily retraced. Using a word processing or a
softw<:}(e is another way to save lime for
In essence, the purpose of a program documentation is to
communicate programme-r's ideas to or to
review them at a later date.
direc!iy productive work, but Those who have written programs in a high level lan-
exIra tirne. Documentation (C++, Visual Basic, etc) or in such
ment in lime management, it can save a as Basic, Pascal or even AWoLlSP (Lhe
in ming language for AutoCAD). know that
comments within the body the
Chapter 48

comments are usually enough to re- • Internal Documentation


mind (he user of what is happening program. If more
documentation is contained within the body of a
information about the nrr",r'"rT'I most likely
When writing a an effort to strate-
would be'additional even a user's man-
gically place comments into the Such messages
ua!. kind of external and program documenta- are parI of the program are categorized as in-
lion applied In sof£ware is also adaptable to a
fernal program documentation. messages are either
program. '''''r'I,!lr'''f.' blocks of a program or to individual
blocks (delimited by and can be actually seen
PROGRAM DOCUMENTATION display screen execution (on most
They are also in the copy of the program.
an internal program biggest advantage of documentation is the
deserves some Is one convenience offered [0 the operator. The only
other? Which one is that when loaded into the CNC memory, the
comments do occupy memory If the avai lable mem-
one (hat combines is scarce, be modest program comments and
for maximum between Ihe two more instructions, All program
types, let's evaluate them comments, and instructions must
enclosed in
• External Documentation
(THIS IS A COMMENT, MESSAGE OR INSTRUCrION)
documentation of a CNC program
of several items of their latest version This is the required formatting. Either comment,
Ihis last slatement is very important message or instruction can be an individual block in the
program or it can be parl a program block, control
The follOWing system will ignore all between the parenthesis.
menlation. They can To avoid long descriptions internally, use pointers to exler-
o Program copy printout nal documentation example:
o Methods sheet, if N344 •••
o Part drawing N34S MOO :ITEM
N346 ...
o Working sketches and calculations
The ITEM 4 in program comment section will be a
LJ Coordinate sheet
detailed description relates to block
o Setup sheet else in the program documentation, such as in a
o Tooling sheet
This kind of is useful when [he '"'',''''';~''' or com-
men! would to be stored in the body.
o Program data or other
the CNC operator may fi referenced
CI Special instructions sheet, under the heading of Special ill-
Sf ructions:
printout is the final of the
programming It shou Id be the exact contents of the
program stored on a or other media. In machine ITEM 4. - Remove part, clean the reverse and
shops that use or merhods sheets, the programmer clamp on the 120 mm diameter
should make it a La include a copy of the methods
sheet in the as welL drawing (or its Properly prepared internal documentation should always
copy) is important to be kept with the brieny each cutting tool
program. It is rderence source in the future.
All sketches together with a of coor- N250 T03
dina£(;s, are at a later date, pro- N251 M06
gram has to be for some reason. sheet and 1 DfCH DIA 4 - FLT ElM}
the tooling will be: discussed shortly. N252 •••

the program data source (usually slored T03 is the current This designation
media) to be included in the documen- vary depending on the tool systems
any special instructions thut may be rc- particular machine \001 builder. use of
ler, the rmiCllillc operaLOr or viallons In the program comment - ElM IS a
form for a 4-flule end mill.
PROGRAM DOCUMENTS 9

Every rime the Program MOO is used In 04802 .1)


(he program, document the reason why ie is used: (DWG A-S462 REVISION D)
SMID 07-DEC-Ol)
Nl04 GOO Zl.O Nl
NlOS MOO {CHECK DEPTH "" .157
documentation IS 10 trans,-
Nl06 ideas from the to
programming enVironment,
gain an extra space in the comment make It a the ideas from the programmer's
block: II serves as an important link within
the communication process.
Nl04 GOQ Zl.O
NlOS MOO
(DEPTH TO SHOULDER MUST BE .157 INCHES)
SETUP AND TOOLING SHEETS
Nl06 ... Iwr''' .. ''' .... printed copy and Ihe
loolillg sheer are Ihe mher two most
Comments can be in the same block as program data: program documentation. TIle ma-
the setup sheet and tooling sheel is
Nl2 GOO X3.6 Zl.O setup sheet is a or a
Nl3 MOS (CLEAN OO::PS FROM THE
and orientation of the part on
Nl4
even the description of in-
comment is written as a sheet usually lists only the
comment block is not cutting positions, with spindle
lhal are part of Ihe documentation speeds, for each tool. Examples of
Enigmatic or cryplic both types are chapter.
l<#"~'a.",,';;,,:> translate mto a lime
The ongoing many programmers always have
or the setup person and they
reminds one of a situation:
between mdividual jobs.
'Do I make The rhe rooling sheet before or
• Program Description after wriring {he program?'
systems, program descripTioll can also As is usual in many
This is a special kind of a comment, also and foes can be found on
in parentheses. There are some that
make the description special.
are
o The description must be included in the
same block as the program number the forces of
method Implies a well organized
o The must have no more than 15 characters Implies (hal everything is under control. It
o Low case characters not be accepted Ihal all fixtures and 1001s and holders
are already available in the
of program description may Include a wailing to be used. No doubt, if
in the comment seclion: both, the setup sheet and the
the program. The logic behind
04801 . 42541) is very strong indeed .

Once conditions are rollowed. the program however, does not take into
can be viewed along with its description right on the direc- chine shop realities, even if lhey are
tory screen of the control system. or even wrong. A small conflict
a delay in delivery, a
If an additional that does not fit the 15 charac- and similar problems, all cOniribUlC 10
ters is needed, enter more comments in subsequent blocks. programmer in many companies.
They will not seen on the screen, bur can still from all sides, the programmer no
be handy for documelllation. They will be to improvise, even III times of Crisis. Programmer has to
displayed processing on all controls the reality a lillie more If
that accept Ihe com ments. length of these comments is there is no choice, always try to find a rensollable compro-
not usually limited to 15 but never as an excuse for being sloppy.
450 Chapter 48

The freedom in programming is considerable but it is not sheet may have to be done for every machine or at least for
unlimited. A normal part program cannot be wrincn with- every machine type. A very simple setup sheet is shown in
out knowing the machine setup and the tooling to be used. Figure 48- J. Feel free to improve it as necessary,
In many cases, the nature of the job offers many Solulions.
Even if Ihe exact setup, or the exact rool to be used are not
known, thi nk of some ideas, have some opinions - but have
ideas and opinions based on experience. The compromise 07-Dec-01
does not rest with the 'now or later' situation, it rests in the TOP FRONT
selection of the mosl like!.}' possibility. If something has \0 .... G54X ..
be changed, make sure the changes will be minimal. ·]n any
case, it is quite possible Ihat the setup sheet and/or Ihe tool-
Ing sheet will have to be modified after the program has
been proven and optimized.

• Setup Sheet
In many shops, setup sheets are a luxury. 1t is a simple
stalement of fact, but many setup sheets are quite poorly
prepared if lhey are prepared al all. Often. they do not re- Figure 48-1
flect the latest program changes and adjustments. they are Simple setup sheet form - onlv basic data shown
not consistent between individual machines and even pro-
grammers. Although the rime spent on preparing a setup A well designed setup sheet should also include informa-
sheet is considered nonproductive from the cost angle, i! is tion about the malerial used for machining, material the
a time far from being wasted. The setup process can be program is based on. Not only the type of material, also its
organized, certain rules can be set and adhered to and they rough dimensions, amount of stock for machining, its con-
can be applied to the preparation of a good setup sheet. dItion, and other features that are important to include in
program documentation. This information is very valuable
The golden rule of a good setup sheet is 10 make it in at its conception and will be even more valuable in !.he fu-
scale. Setup sheet using an outline of the material, fixtures ture, mainly for repeated jobs. Many times, a program is
layout. finished shape, tool path. etc., should always be made when the blank material is nOI yet available. If the
done in scale. Scale. even an approximate scale, is very im- programmer finds out later that there is too much deviation
portant for visual companson. Clamps and other mounting from the estimated conditions, the necessary changes are
devices should be drawn in positions corresponding to the easier to make with good program documentation.
actual setup. Tool change location should be marked accu-
rately, different views shown. if necessary. Critical posi- Although not a strict requirement, some programmers in-
lions should be dimensioned, indicating the maximum or clude [he cutting time for each machining operation on the
minimum distances. setup sheet. When the job is run for the first time, the actual
CULLing time is unknown. As the program is used and opti-
If a cutter radius offset is used, the speeds and feeds re- mized on the machine, it becomes proven and eventually fi-
fleci a certain nominal cutter radius. Atthe discretion of the nalized, the cutting time becomes known with morc preci-
operator, the cutter radius may be changed within a reason- sion. Knowing the cuUing time may help in planning the
able range. This range should appear in the setup sheet, in- load work on the CNC machine. The most useful cutting
Cluding a note on the adjustment of speeds and feeds. time for an individual part is the chip-fa-chip lime that in-
1n many cases when the culler exceeds a certain length, it cludes all the supplementary times (for example the [001
may lnterl"ere with !.he part or olher tools. In these cases, the change time, part replacemenllimc. etc.), nO[ only the cul-
setup sheet should include the maximum cutter length al- ting time Itself,
lowed within lhat setup. For a chuck work on a lathe, (he
maximum grip of [he material should be speclfied In the • Tooling Sheet
setup sheet as well. Although the tooling is really part of the setup, it requires
The main purpose of a setup sheet is to document all de- a separate set of data, thaI mayor may nol fit on the setup
tails of how the pari IS mounted on the machine. That sheet. If Ihe setups and tools used are constantly simple, it
means it has to cover the part holding method and reference may be more convenient to have only one sheet, describing
point relationships (part, machine, and the cutting tool). It Ihem both. However, for large or complex setups. making a
has (0 descrihe the positions of auxiliary devices used, for separate tooling sheet is more practical. Both, the setup
example, a lailstock, a barfecder, a vise, a face plate, hard sheet and tooli ng sheet, are part of the same documentation
and soft jaws, and many others A master form for a setup and complement - nOI rep/ace - each other.
PROGRAM DOCUMENTS 451

Machine unit and the CNC system influence the contents


of a tooling sheet. A tool ing sheet for a lathe wi II be di t'fcr-
ent than a tooling sheet for a machining center. The data 07-Dec-01 Peter Smid 1 of 1
gathered for elwer machine will have some similarities and i oootdinal'a
some unique items. A contents of a typical {ooling sheet
will include description of the following items:
o Machine and program identification
o Type ofthe cutting tool
o Tool coordinilte data
o Tool diameter
o Insert radius and the tip number
o Offsets associated with the tool Figure 48-3
SimpJe coordinate sheet form - only basic data shown
o Toollength
o Tool projections from the holder The Z axis column will be usually blank for machining
o Block number of the tool being indexed centers and Y axis column will be blank for lathe programs.
Modify the sheet to add additional axes or make separate
o Brief description of the tool operation sheets for each machine type.
o Basic speed and feed of the tool
o Tool holder description DOCUMENTATION FILE FOLDER
o Tool number and/or tool station number
All records lhat havc been collected during program pre-
o Special instructions paration are quite likely important enough to be kept for fu-
ture reference. They may be stored aJl over the pJace, some-
In addition to the most common items, also include any times very hard to find. So, now is the time to put them all
unique information in the tooling sheet, for example, to in- together and organize (hem. It is (ime to make a file folder,
form the operator about non-standard tools. tools that re- identify it. fill il up und store it properly.
quire modificalion, premachined condition of the material,
etc. An example ofa simple tooling sheet is in Figure 48-2. • Identification Methods
Before some better methods of identifying program doc-
umentation can be suggested. t11ink about a very popular.
yet quile an impractical method. Some programmers use
the program number as a reference for all related material.
The basic thinlUng behind this idea is Ihatthe available pro-
gram number range between I and 9999 will take forever to
use up, therefore becomes very useful for olher purposes.
This is a shor1sighted thinking, usually by not a very busy
programmer who has only one machine to take care of.
Look at possible problems with this thought. (0
make almost ten thousand programs for one Ii
would lake 'almost forever'. Even if more machmes are
available, al a rate 01'25 programs a week, numbers will run
Figure 48-2 oul in a little more than 7 years. Is that the time [0 scrap the
Simple tooling sheer form - only basic data shown machine and buy a new one? And if 25 programs a week
seems a bit steep. remember that each program will have to
• Coordinate Sheet have i1 number. ThaI may be Ihree Or mOre separate opera-
lIons [or a single job. there may be dozens and dozens of
The idea of a coordinate sheet is not new. It has been used
subprograms that ruso need their own program number. So
in programming from the beginning and it was mentioned
the figures are not so unreasonable after all, and some
in tbis handbook many limes already. A simple printed
beller method should be soughl from the beginning. It
form containing the X. Y and Z axes can be used for both
could be a manually generated method, or a comprehensive
machining centers and lathes. Figure 48-3 shows an exam-
computerized database.
ple of a simple coordinate sheet.
2 48

point of Ihis evalualJOn is that all • Operator's Suggestions


menl (with the exception of subprograms),
the CNC machine operator runs
left to the CNC operat01; if possible. That means, comments, ideas, corrections and variety
to be found to identify the documentation
It may be a good idea to
a card system, a computer database. or a similar
decisions is the program name "... ,,""""'" communicating the operator's to
of the number of machining operations or Whatever system may be sel.~C(~(]
there should be only one folder available at the machine, so the operator a
only one name for one folder. The name access to it. The main benefit of such a system is
share the common denominators with any communication goes into one source and is to
10 such a name meaningful. control.

With an access to a personal computer, the chances are the nature of the particular comment or
all 10 each program are stored in com- should have the operator's name, current date,
In Ihal case, the only limiting factor is Ihe sofrware even current time, the mach! ne and job description, as
structure to name the files. For example, the old as other details that may be relevant and
up to eight alpha numeric in future.
file name and another three alpha nu-
for tile extension. Since Windows 95, .. Filing and Storage
names are allowed, up to 255 characters plus quite bulky, particularly when
extension try to advantage of this feature. Regardless media, as large size
of CNC , establish a fi Ie nam tng convention
etc. The storage of
Lo ble restrictions. There are several office steel fil ing
this approach. to evely work shift, al-
One IS an I order. In thIS simplest persons should be
form, ail related to the firsl program would
be - for POOOOOO I, the next program would be any kind media for storing [he part
POOOOOO2, etc, I f the zeros are ypnV"n""
sure they are safely stored in a separate
the files will not order on than file folder itself. Magnetic devices
display. No . The scc-
are particularly to conditions and should
number as the be stored from any source and magnetic field
maya good (including a They should be kept
that are not Jobbing shops. in a dry and dusl Keeping duplicates (or
customers means dealing even tripl in a is also a good and safe
types of drawing numbers. The variety
procedure. A very much less bulky - is stor-
may thai it is almost impossible (0 Gnd some age of proven programs on a Disk) or a DVD
common ground for Another variation on (Digital Versatile Disk),
the same theme is ajob numbel~ rather than a drawing num- and software. Although still
ber. In many jobbing shops, a number the mo- away from all heat sources, they are not a
me!'ll Ille order is Number is always netic fields.
used as the num-
Individual sheets or pages the part
ralion should be either numbered
Hopefully, the reference number on each page.
tional ideas that will suit a ",Cl,rf,r'''"'lr nets should be identified as to their contents.
There are no given rules on common enough requirements, but
individual there are no together, usually because [here is no
dard of part program losophy behind an orderly filing is
is always use the old common. sense that is often cess to a required program that provides instant
not so common. Common sense rale information.
standardization The quality
ured by its usefulness in the future.
time a particular standard can be
of thought has gone into its
PROGRAM VERIFICATION

a wrlllcn • Preventive Measures


Now,
IS a perfect AI! errors should detected and correcled by Ihe
no errors, Of course, that was intent from gram mer. who laken a certain amount of
[0 make an error
U'-l';UII'"Ul'; - . What hap- measures. The measure is to gel
of the best efforts -there is an a
SCI up procedures, sel up seL up rules. Then.
<'(",,/'I.en',",

I !ypi error can cause a severe problem when the low them thai can be found
runs on the machine. Could an error prevented? program is on machine are numerous. it
if so, how? some techniques to . . ."'1"""'''' successful in rheir dcrcclion.

should be checked all errors be- should use is


It Ihe machine. Checking can quile simple, the program and evaluate it. If
such as a visual comparison of the wnlten and the followed, the elTor check
The main purpose of a is to is easy. Programmers the appearance of the program,
mistakes - mistakes that can the established me order of commands at the
looking for them. kind ginning and end Checking the program should
are mostly syntax errors. Of course, nol lake much lime a£ all.
program is error but The second method can
programmer's desk, lhe effort should to il programmers. Ask a"" '"1'''''''-'''''
All programs arriving at the machine should gain changed program.
of CNC operalor. The operator should a check can reveal. A
to concentrate all effol1s on proving the se- oflen very productive.
run the first part. The operator has no (ime to or fresh air firSl will
errors thut could - and should
been the office. To do all program
the machine is very nonproductive and should be

DETECTION OF ERRORS A major pan of prevt;niive measures is finding synra.'( ('r-


IOrs. A syntax error is one Ihal can delected by the con-
it mllsl he trol unit. For example, if a dollar appears in the pro-
errors can found the control will reject it as illegal:nle control reLurn'
copy leaves the an error message or an 'alarm'. If the 2 is
programmer are undoubtedly to the program instead of the j nlended
they are detected during the lax error. Thai is a logical errOl~
CNC machine. This is a prellentive the control can accept.
to be corrected at the machine, during
the run of the the CNC operator has to do some- • Corrective Measures
thing that should not normally be part or the operator's du-
lies. Whaleve( action II is the operator must take, il is a cor- If an error IS discovered at the
reclille action. measures thaL can be to il was missed and the
help eliminale errors In a program are of two An error that is
II forces the
o Preventive measures . proactive measures measures and eliminate the error.
o Corrective measures measures one or two actions. One will be to return
10 programmer, the second action will
Preventive measures are panies involved error al the machine. Which is
should and conslluclive on the seriousness of Ihe error. An error can
measures require hard. A error is one thaI does not
even authority. from being processed by the

3
454 Chapter 49

For example, a missing coolom function M08 in the pro- One method of graphic verification of a CNC program is
gram can be switched on manually al the machine, without a screen plot. This optional control reature will show all
interrupting the program processing. That is an example of programmed tool mOlions on the screen. The motion will
a soft error - it is still an error, but classified i.1S a minor error. be represented as lines and arcs. The feed rate motions will
appear as a solid line of the selected color, rhe rapid motion
A hard error occurs when the program processing must will appear as a dashed line. The display of the tool path
be stopped by the operator, as the only available choice, will appear on the screen of the controL
and without doing a damage to the machine, cutting tool,
pari, or all of them. A common example of a hard error is a Many contTOls offer a graphic simulation option, where
programmed tool mOlion that cuts in Ihe wrong direction. the 1001 path IS simulated on the screen. Each cutting tooJ
The program itself is wrong and must be corrected. This is can be shows by a different color or density, making the vi~
an example of a hard error, classified as a major error. sualization easier. Some graphic simulation uses actual tool
shape and Ihe part for a realistic display. The negative pari
Most CNC operators do not like delays, especially delays of any graphic verification is [hat it can only be used when
caused by somebody elsc. A dedicated machine operator the program is loaded into the control.
Will do anything possible to correct a problem without any
assistance. For program errors, the operator wi II try to fake The second verification method is much older than the
corrective measures 10 clllninate the problem. Not every first. It is a hard copy ploUed representation of the CUlling
operator is qualified [0 do even a simple change to [he pro- 1001 motions, Hard copy plotting has been available in
gram. On the other hand, some qualified operators may not computer programming for a long Lime. To get [he benefits
be authorized to do program changes as a maHer of policy. of hard copy plouing, a pen plotter and a suitable software
will make it work. The plotter is seldom a problem In com-
Every company benefits greatly, if the CNC operator has panies using CAD software but may not be available to
at least a basic training in CNC programming. The purpose small machine shops. The required software is also part of
of such a training is nOl [0 make the machine operator a a large computer based programming system and can be
fully qualified CNC programmer. Its purpose is to highlight quile expensive. A simple version of a pen ploUed tool path
how a part program influences CNC machining, the setup, is a screen dump, usually to a printer.
tooting and all (he other relationships between program-
ming and machining. Its purpose is to offer the operalor There is a third method of graphIC verification and can be
tools Ihat can be used for minor program changes, etc. Such done in the office. It uses a computer and software specially
a training, if it is designed and delivered in a professional designed 10 read a manually generated program, then dis-
manner, is always a worthwhile investment. It may be a plays the 1001 path on the screen. Some software even uses
relatively short traming thai will pay for itself very quickly. a solid model like features, so the actual surface of the part
Time delays on CNC machines are costly and the sooner after machining can be seen as well. This is very useful for
the program is made functional, the less damage Lo the pro- 2-1 J2D and 3D lool path veri fication.
duction control has been done.
Whenever a program has been changed at the machine, AVOIDING ERRORS
the program documemation must reflect these changes,
particularly if they are permanent. Even a small permanent The goa! of every programmer is (0 write error free pro-
change should be always be documented in all copies of grams. Thatls almost impossible, since any human activity
program documentation. is subject to errors. Programmers with all levels of experi-
ence make miSlakes, at least once a while.
G VERIFICATION Since the prevention of errors should be the main goa! of
any programmer, this section looks at the subject in more
Programming etTOrs can be costly, even if their cause IS a deplh. The most com mon mistakes will be evaluated, along
minor human error. Omilled lIlil1u~ sign, a misplaced deci- with suggestions to prevent, oj' at least to minimize, their
mal point, an illegal character - all are mi nor oversights that happening. First, what exactly is a program error?
cause major errors, Although a visually checked program
should be error free. that may not always happen. The hu- Program error is the occurrence of data in a program
man eye is weaker when it evaluates nongraphic elements, that will cause the CNC machine to work contrary
to the intended plan or not to work at all.
One of the most reliable methods of part program veflfi-
carion is a graphic display of the \001 path as it appears in All errors can be classified into two groups:
the program. Almost all errors relating [0 the 1001 path can
be detected early, by one of three avai lable graphic veri fica- o Syntax errors
lion methods
o logical errors
VER IFICATION 5

Allhough the average distribution programming errors Logical errors cover an unlimited
could be generally splil al 50/50 "~t.,,o,>~ the syntax and For the following lathe program is
errors, cenain conditions swi the balance. A
programmer with limited experience wi!! all kinds of 04901
errors, An experienced programmer more er- (EXAMPLE WITH ERRORS)
rars. look at each error group. N1 G20 G40 G99
N2 GSO S2500 T0400 M42
N3 G96 S530 M03
• Syntax Errors N4 GOO G41 X12 0 ZO.l MOB
group are usualJy to deal with, once I N5 GOl X-O.06 FO.012
/ N6 GOO ZO.2
. Syntax error is simply one or more char- / N7 Xl2. 0
program that are either misplaced or do not be- NS zo
This error covers program that do not N9 GOl X-0.06
to the programming format as syntax) of mo GOO ZO.l M09
the conlrol system. For example, a lathe control systems do N1l X20.0 Z5.0 T0400 MOl
no! character Y. If the control encounters the let-
ter Y in a program, it wil] it as a syntax error nnd
the won't run. The same result will when There are errors in 04901 example. Try to
is programmed for most milling tify them before further.
can nor be used with eitJler The first error should - a tooloJfse/ is missing. In
V - it is an illegal character most the block N2, tool T0400 is without an offset. ThIS
Yet, it is very character In a fOllr block is correct Block Nil is the return to the Indexing po-
control. sition and the tool offset lallon, which was never pro-
grammed. The error is in N4 - it should be:

N4 GOO G41 X12.0 ZO.1 T0404 M08

The second error is and requires a


eye to spot it. Note symbol was In
blocks N5. N6and N7. program with the
oflhcblock cutting feedrate is
in block case, control would issue an
""",,,<.t;.:,''-, but only for time the program is
orocesseCl The correct block N8 be:

NB zo FO.012

th error is the missing cutter radius


block N II . block should correctly

NIl 040 X20.0 Z5.0 T0400 MOl

A error of this kind may have a


next tooL Even worse, this error may not
• logical Errors part ron. The correct

Logical errors are more than syntax errors. A 04902


logical error is as an error causin.g the machine fOol (EXAMPLE WITHOUT ERRORS)
to act in a to the programmer's intentions. If a N1 G20 040 G99
N2 GSa S2500 T0400 M42
motion is to the coordinate of X 1.0, N3 G96 5530 MO)
but program states conlrol will go ahead but the N4 GOO G41 Xl2.0 ZO,l T0404 MOB
tool position will same error will happen I N5 GOl X-O.Oo FO.012
whenZIO,Ois ahhough intenlwasXIO.O. I N6 GOO ZO.2
The contTol does not cannot have any buill-in protec- I N7 Xl2. 0
tion against logical errors. has the responsibil- N8 ZO FO.D12
ity to exercise all care and caution. Logical errors N9 GOl X-0.06
can be serious -Liley may not only result in a scrap. they can mo GOO ZO.l M09
NIl G40 X20.0 ZS.O T0400 MOl
damage the machine even the operator.
456 Chapter 49

After evaluating the three errors, what chances are there • Calculation Errors
that the control will return an error message? Nil, zero,
Using malh functions and formulas is a part of develop-
zilch. A11 errors in the example are good illustrations of log-
ing CNC programs manually. The type of calculation er-
ical errors. They may not always be easy to find. but they
rors include a wrong numeric input, even when a pocket
can creale a lot of additional problems if not found early. calculator is used. Keying a wrong fonnuia, wrong arith-
metic sign or placing parentheses in a wrong position, all
COMMON PROGRAMMING ERRORS represent a serious error.
Rounding Error
Strictly speaking, there are no 'common' programming
errors. Every programmer makes some unique mistakes. It A special lype of an error is causeu by incorrecf round-
is difficult 10 lisl any errors as being more common than ing. This error is an accumulative error that results fTom too
others. It is also true, that some mistakes are made more many dependent calculations. A rounded value used in
frequenlly than others and in that sense they are more com- olher calculations may lead 10 an error. In many cases the
moo. Focusing on this group should be beneficial. error will be too small to cause any problems, but never
counl on it. It may become a very bad habit.
Both syntax and logical errors share the same cause - the
person who writes the program. The mosl important step Calculations check
towards eliminating errors IS the idenli ficalion of a problem
- ask yoursel f 'wha' mistake do I do repealedly ?' Every- To prevent math errors when using fonnulas for calcula-
body makes some 'favorite' mistakes, the solution lies in tions, it is a good idea to check the calculated result once
the correct answer \0 this simple question. morc, USlng a differelll formula. Math is a generous science
and more than one calculation method is usually possible.
Most errors are a result of insufficient program planning
and a lack of precise progr<lmming style. Planning offers a • Hardware Errors
sense of direction, style offers tools and organization.
The lasl type of program errors is by tile malfum:tion oj 11
The simplest - and the most frequent - error is an omis- hardware element of the control system or machine. In
sion of some fundamenlal instruClion. It may be a coolrlnt CNC, even a bug In the software is possible. Their occur-
function, program stop. a missing minus sign and olhers. rence is rare, as modern controls are very reliable. When
Even the whole block may get 10SI, mainly when preparing encountering an error, don't blame the control or the ma-
the program from poor sourCt;S. Many errors are caused by chine as [he firs! {JIU:/ only possible cause. It shows igno-
the programmer's inability to visualize what will exactly rance and unwillingness 10 address the problem responsi-
happen when the program is processed. To this category bly. Before callmg for a service, make sure to exhaust all
belong all errors relating to setup, tooling and machining other possibil tties of error detection first.
conditions - cuts that are too heavy or 100 lighl. insufficient
clearances and depths, incorrect spindle speeds and CUlling • Miscellaneous Errors
feedrates, even Ihe selection of wrong tools for a given job.
Some errors can be traced 10 the part drawing. A n error in
• Program Input Errors lhe drawing is possible, but first make sure to interpret the
drawing correctly. Drawing errors include too many or too
Most programs are hand wrillen or typed and have to be few dimensions, rom tolerances, etc. Also make sure to
transferred to Ihe control system or a computer file. Many work with the latest drawing version only.
errors are caused by the incorrect inpw of intended data.
Keep in mind thaI if somebody else is using the program, Other errors may be caused by the wrong setup, tooling
its legibility and syntax is very important. or material. These are not programming errors, but they
have to be considered as possibilities. With some common
Input errors also i nel uue errors caused by forgetting to in- sense. and sUltable precautIons, many programming prob-
put significant characters in [he program. These sirings can lems can be cltminated. For example, to prevent an un-
be almost anything and can cause a serious problem. A proven program to be processed as a proven program. just
missed coolant function is not likely 10 cause a big prob- mark il as unproven. Mark it at Ihe beginning of the pro-
lem; a missed decimal point or a wrong 1001 retraction will. gram and leave it there untl! the program is checked.
Olher errors ale insufficientlool clearances, a depth Ihalls
100 shallow or too deep, errors relating to cutler radius off- A complete elimi nation of errors is not realistic. Mistakes
sel (this is always a big group). Be also careful when can- do nol happen - but mistakes are alwa}'s caused. Inexperi-
celing or changing modal program values. One common ence, negligence, lack of concenlraLion, poor altitudes, are
error is to cancel one kind of motion by replacing it with just some causes. Always program with the attitude to
another type of mOlion in one block, then forgetting to rein- eliminate programm errors altogether. Thnt will be the
Slate the previous motion later. Cirst step Lo making fewer errors.
CNC MACHINING

sent to ma- ideas and do commun with each other· thai is


""' ....r''''''~o is over. All the calcu- advice for becoming a better CNC programmer.
been wriHen, docu- shop offeTS tremendous resources, take of them.
way Lo the CNC
finished? Is there CNC technology is an instrument 10
back, perhaps ity with a minimal human involvement. at
or even criticism? by the physical level. As any other technology, it must
managed intelligently and by qualified people with
is peifecr, programmer will cnce. Without a firm grip and good control, without
No doubt, programmer management, the technology will not yield the
all directions. The ques- SullS - in facl - in will become counterproductive.
responsibility really
manufacturing can the The function and responsibilities a
uated? When can the program has been covered. Now, leI's look at what when
the completed program and related malerial actually
the machine shop.

MACHINING A NEW PART

The most expensive pan done on a CNC machine IS al~


ways the first one of the batch. After
completed, the CNC operator is ready to test the
and Ihe machining conditions. Setup time is non
productive and testing a program IS non produc1ive as well.
1£ takes quite a bit of lime and errorl, even if a good pan
comes out of the first run, as it should. These activities are
and must be done, hut doing too many 'first'
for one batch is not productive either.
Wrong!
to be in constant Generally, [here are two groups of CNC programs, each
field of bus! ness a different effect on program proving. The firs!
have a learn people LO covers all programs that have never been used On the
ming project. After all, machine, These programs must be proved for accu-
from talking to as well as optimized for best performance. sec-
gram or particular group covers the repelilive .iobs - programs that 11::1\(:
grams used in machine al least once before and have been proved to
lypically CNC machine correct in all respects. Programs In ,this group have most
of constructive ideas, improvements oplimized for the best performance
to them, ask quesllons, make conditions. In both cases, the CNC operator must
portant - listen La whallhey have to a care running Ihe first pan of the: balch.
never put their fOOL in the there are di ffercnces between a 11t'\\:job flm ver-
reluctanlly, programmers who may sus a repetitive job mn.
closed and ears plugged, In case, Iwo qualities relating to the parl program
tude that they are always are all on the established lirst:
Exchanging ideas with machine operators,
lions and seeking answers is the only way to a Setup integrity
formed about what is actually D
shop. It is in programmer's interest Lo how !.he
operalOrs feel about (he program, the programming
and the approach to programming overall. Do exchange

457
458 Chapter 50

These two consideraliol1s are equally important - if only Control Settings Check
one of them is weak, the final result is not satisfactory. AJ-
ways aim at [he highest level in eilher category. Also keep 0 Is the coordinate setting registered (for G54 to G59)
in mind thaI the setup integrity has to be established again
0 Are all the offsets entered correctly
with each run in the future. 111e program integrity has to be
established correclly only once. 0 Is coolant necessary
0 What is the status of the BLOCK SKIP switch
• Setup Integritv
0 Is the optional program stop MO 1 active (ON)
The machine setup is only a general description of the 0 Is the DRY RUN off if the part is mounted
lype of work actually done to gellhe 'CNC production go-
Ing. The whole process covers Ihe setup of the CUlling loots, 0 Do you start with a SINGLE BLOCK mode set to ON
as well as the part selup and many related tasks. No single 0 Do you start with spindle speed and feed rate
check lisl can ever cover all points that have to be consid- overrides set to LOW
ered during a CNC machine setup. 111e major look here is
0 What is the status of MANUAL ABSOLUTE switch
at the most important considerations. in II form of 11 brief
(if applicable)
check list. Adjusllhe individual poinls according to the ma-
chines and CNC systems in the shop. Adjusl the lis! 10 re- 0 Has the position read-out on the screen been set
flect personal working methods ancVor programming style. from zero (origin preset)
The main purpose of this check list, or any Olher for [hat
mutter, is to cover as many details as possihle and not to Machine Tool Check
omit an important item, operation, procedure, etc. Even a
small omission may cause an accident and part damage or 0 Is the slide lubrication container filled with the proper type
even a scrap due to a raully machine tool setup. ot oil (lubricant)
Cutting Tools Check 0 Is the coolant tank filled
0 Is the chuck and tailstock pressure set correctly /tuming)
0 Are the tools properly mounted in holders
0 Has the machine been zeroed before running a job
0 Are the proper inserts used - is the read-out set to zeros
(radius, grade, chipbreaker, coating)
0 I!'; th ere p.nough prf!!,;~ Ilre for the fI ir 1"Ittflchments
0 Are all the tools the right size (air hose, etc.)
0 Are the tools placed in the proper magazine station
• Program Integrity
0 Are the offsets set correctly
(set zero to unused offset values) Any new and unproved program is a potential source of
0 Is there an interference between individual tools problems.]n manual CNC programming, mistakes are a lot
more common than in a CAD/CAM program. A good way
0 Is the boring bar properly oriented (milling) to look at a new program is Ihrough the machine operator's
0 Are all the tools sharp eyes. Experienced CNC operators take a direct approach
when running a new program - they lake 110 chances. That
does nOl mean the CNC programmer IS not to be trusted - it
Part Setup Check simply renects [he facl that the machine operator is ulti-
mately responsible for the expected quality of the work and
0 Is the part mounted safely is aware of it. He or she has a sense of great responsibility.
Whether the damage La the part or even the scrap is caused
0 Is the part properly oriented on the table (milling)
by the program or for some other rcason is a littJe consola-
0 Is the proiection of the part from tion when the work is rejected.
the chuck safe (turning)
What does the CNC operator look for in a new part pro-
0 Is the part lined up for squareness (milling) gram? Most machine operators would agree that the first
0 Are the clearances sufficient anu the most important thing is the consistency in program-
ming approach. For example, are all tool approach clear-
0 Are all the clamps away from the cutting path
ances the same way as always? If nOl- is Ihe.re a reason? Is
0 Is the machine at its start {home) position the basic programming formal maintained from one pro-
betore you press Cycle Start gram to another program and from one machine to an-
0 Does the tool change take place in a clear area
other? A good operaw(" scans the written program twice -
once on the paper copy, the second time when the program
CNC MACHINING 9

is mto conlrol It is surprising what can o STEP 5 . Check the program


be seen on screen Ihal was nol seen during the
copy reverse is also true. The common slep is the firsl evaluation of the
such as a minus sign or an address, a may be removed from the fixture temporarily.
decimal amoun l extra large or extra are already set in the control,
u'-,'\J'-.,.....u on Ihe screen easier Ihan on
<.:!Jt.:t:kl.!u accurately, with all considerations.
a computer for manual programming, switches on the control panel may be I

it visually. Using a douhle Watch for lool motions in general and be sure 10 ,\latch
.. ".m...,.., can be prevented. There is specifically, Repeat this step, If not
10 graphically check the program on a
sure with any aspect of the programmed tool
simulation and file comparisons, o STEP 6 Reset the part
The style is very important in now is the
ov,:;.rem[)ll<JlSI2~ed.
Consistency is the in the fixture again. The I
confidence of the operator in the pro- steps allows continuation with
gram illtegrity, time AI this point. check the
the ad and air pressure, clamps,
RUNNING THE fl PART etc., just 10 be sure.
o ] Make a trial cut
The CNC machine starts a new job by
studying the with the program, An trial cut may be required in to
mainly the and tooling sheet. The next whether programmed speeds and reeds are reasonable
few procedures lhal will or nol and if the various offsets are set properly. Trial cut is
vary Iy. they will remain the same a cut that is designed to idemify
for most johs in offset sellings and their
sure the trial cut leaves enough material for
o STEP 1 - Set the cutting tools cut also helps 10 establish Lool
within limits,
Th is fi rsl step uses the or the looling infor-
malion from the part operator selS the o STEP 8
culling tools into their tool stations
and registers all 1001 nnrT'oh",l"<' control memory. At this ne<:essar'v adjustments are finalized in
Make sure the tools are sharp properly in the order to before production begins.
holders. TIlis slep adjustment (usually a wear
offsct). It is to adjust spindle speeds and
o STEP 2 - Set the fixture feedrates, jf
The fixture thai holds or o STEP 9 - Start the production batch
the machine, squared and
part is not mounted at this A full batch production can start now. Again - a quick
documentation. particularly second double check may prove to worth the time,
drawing may often be reqUired as well.
o STEP 3 - Set the part

Place the part into the fixture and make sure it is safely
mounted. Check for possible inlerferences and in
the setup. This slep represents the end of most initial
of CNC machine operation.
o STEP 4 - Set the tool offsets of the
will be two kinds ()f
Df:re:nding on the lyre of Ihis
the tool geometry and wear offsets, path:
set cutter radius offset, if o Tool path simulation
important parlS of this slep is (he
nate (work offsets G54 to or o Tool path animation
(G92 or not both. Work have been described in the
and most conventent selection
1001 setup.
460 50

first type of graphic representation. the tool parh PROGRAM CHANGES


simulation, shows the oUlline of a tin and the tool
molions. The part outlme IS identi by a smgle color, lhe
(001 motions are identified by a dashed line (rapid mOlion) is proven, tested and !he fi rst part
and a solid line (cuLting motion) process- a good CNC operalor looks at ways of
the order of machining is shown on the display screen improvements may be done
as either dashed lines or solid on ne, before the whole job is completed.
type. The solid area of the Some improvements require a different setup,
the lools, the chuck or or fixturlng. , it would not be practical or even
With a screen, can h1e to implement changes on the current job, but they
{he flexibililY of the
should be appl the next time the job is done.
changes 10 the are resull of a design
more descriptive method tool path lion and have to do wiLh Ihe program optimization.
to machining is fOol path allimation.]n many respects Others are taken for the best productivity rat-
to tool path simulation, the tool path animation ing. Regardless reason, virtually any
a additional benefits. The by the machine the CNC programmer who
form, rather than an outline only. has 10 apply to the new program.
and seen on the screen display;
All should be for the beuer,
can also be preset. as well as
etc .. all in a shaded form. Often a major change will re-
very accurale representation of the but more likely, a
an additional benefit. the display is also proportional in to a reasonable extent. When a pro-
the actual CUI, the material can it is said to be optimized, il is
, righl on the screen. The upgraded. That can compared to another lype of pro-
improvement over lool path gram change - program updaTe.

100% accurate display of tool path. No • Program Upgrading


can show every single detail and no
chips. What it does show is quite jm- Upgrading a CNC means to strengthen it, to en-
CNC macllini centers, control rich if, to make il better than it was before. It means to
can be set lo one of several views. change it in a way cost IS

More one view can be set at the same lime on the The cost
display screen. ng a split screen method, also W/II-
promise in quality
dow.'> or . Many CNC operators run the upgrading (optimi-
display especially for milling systems - once 111 the speeds and feedrates.
XY lime in the ZX or YZ view. optimization. Milling
display is turned on. The operations may require a approach then turning
mode, areas that arc too small or operation'>. Jobs that are repeated frequently, as well as
(or reduced for lOIS, should be scrutinized with even more care.
Cutter radius [001 in mind that only one second on a cycle lime
functions can be turned on or off will save one hour for each batch of half an
Make sure the 51 mu!ated cond llions are hour for each 1800 pieces, and so on.
as possible. Also, do nol forgetlo
set before the program is lesled. In the following check list are some
Unfonunalely, this option also adds to the overall when optimizing a CNC
cost of the control system and many companies choose not but it should serve as a
La purchase il. into and be explored. Some in
only [0 milling operations, others only 10
instructions cannot be lested by us- are also some items that apply to bOlh ,,,,,,<,,,,,'"
most controls, there will be no a special option of the cont("ol
Many other 1001 to available.
but what does show will
Since all motions
have been of the control. alilhaL
0 Fine-tune the spindle speed and/or f!::ednne
has to be done run, is [0 concentrate on 0 Choose the heaviest depth af cut possible
those details that seen on Ule display. The tasks 0 Choose the largest tool radius possible
to be checked have down and the program is
easier to follow. (J Experiment with new cutting materials
CNC MACHINING 1

0 e tool order for faster tool chan es


• Documentation Change

0 bi-directional turret rotation documentation thai is


program is not much useful if it not
0
changes done during machini
0 the MOl rather than the documented engmeering
0 Avoid excessive dwell times source. all revisions. updates.
changes should be recorded.
0 cutting' situations calculations should be especially weI documen
0 motions where applicable supplemented with formulas and sketches i f . H
are several existing copies of the documentation, they
0 Use multiaxis motion whenever safe
too, should replaced to make them current 10
[) Apply passes for threading 1l1C programmer's name, (he nature of the
even the lime of the day, should be
0 Look tor block skip applications
a change took place. Keeping the
o Avoid spindle direction change (at for a while) may
o Shorten tailstock travel distance one or tWO experiments may
on the
o not return to machine zero after each piece
o Program tool
o Reassess MACHINE SELECTION

o Consider .nl'H·",rl".,r1
planning, thjngs can go wrong, al
What happens in a machine shop when lhe
only ne is suddenly out of commissIOn? or
only, ahhough deveJ- course, this never happens, except when a rush job is just
more items can be added TO about [0 set up on [hal very machine. It usually happens
modified in their description. when it is least
only once should be
carefully audited. mayan Improvement Ihal can Every
be applied to a differenljob. sometimes in the fULUre. of action.
on another
• Program Updating be

In con!rasllo program (opllmlzation), the rca- Usually is for a specilic machine and a
son for program updating to do with decreas- CNC system. If two or more such have been in-
iog the part cost In the end, the may COSI due to a stalled in shop, can be executed on anyone
change in the or similar interventions, or them. two or more machines and/or con-
but nm because a A program needs LO lrols are totally are not transrerable
be updated after any in [he that of and a new TIle best OppOrlU-
jer.i., the CNC that have been if two machines [Ire differentlll
previously upgraded size, but with the same type. Thc exisling program
may be usable as orwith only minor modifications.
Engineering changes in pari are more common in
companies {hal own In ajob for alternate machine selection
shop, the design are Iypically by the cus- cull i ng tools
lomer, but have the same overall only difference a valluole. Tuuls I rtu:;! alloe
is in the source and origin of are di The pan posi-

A specific change (hal will


program may as small as a
sional tolerance or as large as a
Personal experience may be somewhere
upgraded CNC program will
the change - whether it is a minor
program rewrite.

grammmg
462 50

MACHINE WARM UP PROGRAM NlS G28 XO YO


/ N19 M30
mo G04 PlOOO
is guaranteed by ils manufac- N21 M99 P5 (REPEAT FROM BLOCK 5)
nO( only if it is handled properly, %
wilhin Il cerlain environmcnl rom-
are parlicularly sensitive is ,simple, in structure, yet well thouoht
0
OUL
to rapid in humidity, dust level, exter- InlenllOnal programming techniques con-
nal vibrations, eiC. All potential hazards are clearly speci- sample progr<lm:
fied In {he manufacturers' I Every CNC operator Q Thewhole is in the incremental mode
knows from precision depends a
great ue<.ll on the spindle Some ultra high pre- a The motions are to the machine zero
cision machines even an internal cooling syslem 10 a The Z is the first motio n
keep (he spindle constant. In cold climates. on
a cold morning in the Winter, when the machine was sillin o a speed is increased gradually
all night ill an unhealed the CNC c::- o Owell is to lengthen the current action
IaI' turns the spindle on for a few to it warm
At the same lime. in order 10 freely a The end tool motion is to the machine zero
moving along the a few a The end of program M30 is 'hidden' by
free mOlions In all axes, If process is a block skip function
repealed months. il may be wOr1h 10
a Each repetition of the program starts at block hiS
automate it. A will do the job.
can be developed, depending
To write such a program is simple, but there are several
work expecled on lhal ma-
important points to consider. sure thatlhe ma-
chine mOlions will always be in area wherc there is no a warm up program for il
thal are typical to a CNC
possibilily of a collision. This will used with
many jobs and modifying it a new job is set up is range, moving the
[he chuck jaws,
nOI an option. Anothcr POlnl is the spindle
a horizontal machining center,
speed in r/min, Avoid hiah
on a boring mill, the in
r/min - a [001 mounted in the up cot:ld
have a small or large diameter. 10 re- be programmed.
([self indefinitcly, usc M99 function al the end. Pro- purpose, but keep
- 10 warm up a that had been idle
also fUnclion M30 for the
block skip symbol [II. When the warm
for a relatively of lime in a cold temperature.
turn the block skip off. Also keep in mind - (he goal is a ge-
npriC program for (I specific machine rype, a program thaI
completed and the program will
can be used with all jobs, without modifications.
example 0500 I is a typical warm up
milling system and uses English units. CNC MACHINING AND SAFETY
adapted to any other machine:

05001 (WARM-UP FOR A MILL) Machine shop safety is everybody's


Nl G20 basic issues have aheadv
N2040 of Ihis handbook. J

N3 G9l G28 ZO at Ihe programming


N4 G28 XO YO machine, and so on.
N5 S300 M03 and
N6 GOO X-10.0 Y-8.0 try (0 Improve them.
N7 z- 5 °
N8 S600 the safety concerns or a machine are
N9 G04 nooo almost the same as those operators funninO" conventional
i pmenl. SnfelY starts with 11 c1enn work p~cc and
N10 X10,0 ZS.O
Nl1 Y8.0
Nl2 5750 approach [a programming, setup and
Nl3 GOl X-S.O Y-3.0 Z-2.5 F1S.0 Many do's and don'ts can be itemized. but no will sat-
N14 X-2.0 Y-2,O isfy all the safcty concerns. Here is an attempt at a
NlS Z-2 0 SSOO of concerns in CNC shop. 111ere are
Nl6 G04 PSOOO III the incomplete lis\. Many
N17 G28 ZO MOS
CNC MACHINING 463

Personal Safety o Do not alter design or functionality of


the machines or controls
o Wear suitable clothing (tucked-in shirt,
buttoned-up sleeves I o Electrical or control maintenance should
be done by authorized personnel
o watches. rings. bracelets, and
similar jewelry before machine operation o Do not use a grinding machine near the
eNC machine slides
o long hair under a net or tied up
o 00 not use a welding equipment on CNC
o Protect your feet by wearing approved safety machine under power
o your eyes - wear approved safety u Behave responsibly - do not engage in
with protective side shields at all times and horseplay around machinery
o an approved safety helmet if that is
are only some common sense nol a
the company policy
comprehensive list for CNC machining
a Always your hands - never reach
towards part while the spindle is rotating
o In some cases, protection may also be needed
for and ears, perhaps even nose
o Never remove cutting chips by hand, SHUTTING DOWN A CNC MACHINE
with or without gloves on
o or gloves around moving machine IS not used for an extended
or it should be shu! down. Many users assume
down a CNC machine means just to turn the
o When lifting ask for help, There is more than that to shutting down a ma-
use a crane or lool with a power switch.
Machine Environment
• Emergency Stop Switch
o free from oil. water,
of the emergency switch IS (0 stop all Ina-
chine InUliOI7S immedialely, regardless of the current opera-
o Check the so they are not blocked lIonal When pressed. it will lock in place and must
from any be manually in !:he opposite direction to II
o See whether all the material is safely stored and should sparingly and only in real
finished parts are in proper containers such as

Machine Tool Safety o An situation that is unsafe to


the human being is about to occur
o Do not remove guards and protective devices
o An collision of the machine
o Read and follow manuals tool elements is about to occur
o Check fixtures and tools before they are used it is to cause damage to
o On the machine, make sure all the tools are tight in pressing the Emergency Sii'ilch.
the holders, that tools are sharp and selected design, there may be several
properly for the job on located at convenient
should alw(\ys know the loca-
o Stop all when
switch. Emergency switch is
or inspecting finished work
o Do not leave on of
o Use only a suitable coolant mixture, keep WARNING!
the coolant tank clean at all times
Although the emergency stop switch disconnects
o Never use a file tor breaking corners or a sand paper all power to the machine axes, the electrical power
for surface polishing during the program execution is still !':llrmlifHI to the eNC machine.
o Deburr sharp edges before handling a part
For a complete shut-down, always follow proper
o Stop all machine power for procedures as by policies,
o Do not operate a faulty machine
464 Chapter 50

When the Emergency Slop switch is released or un- o Set the Single Block switch ON
locked, the machi ne does nOl reslm1 automatically, The Cl Set the Optional Block switch ON
machine setup conditions and other condllions have to
present before the automatic stan call be selected. This con- o Set operation mode to MDI
dition is usually achieved by pressing the Power On switch. o If available, remove the Edit key from the lock

• Parking Machine Slides Several other precautions could be also be used, but the
ones listed are the most typical and should ensure reason-
Several chapters have menlioned a comment that a CNC able safety precautions.
program cannot be executed unless the machine had been
zeroed firsl. Recalllhal zeroing the CNC machine while the • Turning the Power Off
machine slides are at - or almost at - the machine zero, is
impractical and may resull in an overtravel. The machine Procedures vary from one machine to another, so always
zero return needs about one inch minimum (or 25 mm), to consult the machine manual first However, there are some
be away from the machine zero position in each axis. This procedures pretty common to all machines. General rule is
position is often easier LO reach ill the end of work than at its to reverse the procedure of turning the power on. For exam-
beginning, A practical CNC machine operalor knows Ihat ple. if the procedure to turn the power on is
to shut off the machine when the slides are at the machine
1. Main switch on
zero position causes the subsequenl start up 10 lake a lillie 2, Machine switch on
more time. 3, Control switch on
To avoid any potential problems in lhe future, some pro- then the power off procedure will be
grammers make a small program 10 bring the machine
slides into a safe position at the end of work, before the 1, Control switch off
power is turned off. Although the idea is good, the solution 2, Machine switch off
3. Main switch off
to one problem may cause another problem. If the machine
slides arc 'parked' repeatedly at the same position for a Note lhat in either case, there is no one switch to do all
lengthy period of lime, various dirt deposits will collect un- work. This is for the safety of the sensitive electronic sys-
der the slides, possibly causing staining or even rusting in tem of the CNC unit. Also check the exact function of the
and around the 'parking' area. A beller way is to let the emergency switch (described earlier), as it relates to the
CNC operator do the positioning of the slides manually, It machine shut down procedure.
does nOltake any more lime and the slides will never be too
long at anyone position. All that is needed is a motion of
one axis at a lime, 10 a different position every time, Since it EQUIPMENT MAINTENANCE
is done manually, there is a better chance Lbat the machine
position will bc always different. To mainlain a CNC equipment is a professional disci-
pline of its own, In general, it is better to leave any kind of
• Setting the Control System maintenance to qualified technicians. The CNC machine
operator should only be concerned with the basic preven-
Control panel ofUle CNC unit has many SWitches set to a tive maintenance, just by taking care of the machine in gen-
certain Slale at the time of a shut down. Again, variations eral. Modern control systems require very liule mainte-
exist as to what is rhe proper procedure. but a good CNC nance. usually consisting of the air filter change and similar
operator will leave the control syslem in such a state that it simple tasks.
does minimize a potentially dangerous situation, when
used by the next person, Here are only some possibilities ro The manufaclurer of the CNC unit and (he machine
apply before leaving the conlrol system for a break, or a manufacturer supply reference manuals. including special
complele shut down: ones for maintenance, with their products, 111ese publica-
tions should be a compulsory reading for any person in-
o Tum down the feedrate override switch to volved with maintaining machine tools in working order,
the lowest setting electrical. electronic, or mechanicaL Many machine manu-
o Tum down the rapid override switch to the lowest setting facturers, and even dealers, also offer training courses in
maintenancc and general troubleshooting,
o Set mode to JOG or HANDLE
o Set the handle increment to Xl
INTERFACING TO DEVICES

and oplimized for RS-232C INTERFACE


for fUTure use or ref-
stored, it must he first Data transrer uelweell two
and optimized. There and controls) requires a number
program inlo same rules for each device.
the most lime manufactured by a different company, there must
at the tain independent standard that all
The RS-232C is such a standard - the leuers RS
'Recommended Standard'. Almost every CNC
computer, a tape puncher and has a connecior
(known as a port) that is marked or similar.
port in two forms. one with a .25 configuration,
the other with a 25 socket configuratIon. The one WIth {he
is known as the DB-25P connector, the one with the
socket as DB-25S connector (male/female respectively).
Figure 5 J-J illustrates the layout.
In order to load a part
unload a program rrom tbe
ncclion called a data is "",,"I1r.,rj
usually an electronic device thaL is
cale with the computer of the unit

Typical interfaces and are:


0 Tape reader and tape puncher 51·1
0 Data cassettes Typical 25-pin RS·232C port· DB type
0 Data cards The RS-232C port on the CNC unit is usually a siandard
0 Bubble cassettes and uses the DB-2SS Iype (the letter S means it is a
type). An eXlernal computer, usually a desktop com-
0 Floppy disks together with a suitable cabl~ and a com-
0 Hard (fixed} disks needed to transfer CNC pro-
use mainly the DB-25P lype
0 Removable devices P means it is a pin type). The
0 ROM (read-only-memory) devices
0 ... and others

Many of these devices are proprietary, many require not


only a special cabling. but also a software drivers lhat can
run these devices. The focus of this chapter will be on the
connections that can beeasily assembled and those that use
standard configurations There is one industrial standard
most these ~ have in common - a standard called
an RS-232C interface. Well - almost a standard. There is a
number of variations that follow the standard in principle,
but deviate it to some extent. This handbook is not an
in-depth CNC communications, it only
the stand>lrd >IS ;:I ine. nol as (l

5
466 51

To method of communications machine shops do not use tapes,


has to be installed between {he of any kind. These once tools
porI. Loading and coo- replaced by (he inexpensive microcomputer
software Ihat runs the complele and inexpensive communication software.
done first. In addition, both devices
can 'talk' LO each other. punched tape technology is obsolete nny
modern standards, it may justify a short sideline for those
Later in this a few notes relating 10 the ba- who I use it and also for those who are In
sic principles of a computer as an interface 'historical' of numerical control.
with the CNC system. a short look at the anginal in-
terface - (he punched lape - as a media Media
used for many years bUI used anymore. storing
quality, enforced paper. The
PUNCHED TAPE wide (25.4 mm) and about 900
in a single roll, man
Since the beginning of most useful descriptions and
a punched tape has the in Figure 51-2.
part program the late
1980's, the splendor and DATA
has been replaced by '-'\..o;:""\.II.J laptop computers loaded

A punched tape is Ie and bulky. It can gel dirty


easily, but it had very popular. It is economical 10 use
and is still available (although the per roll could be 1.0000
high). 1l1e majority of new not have tape
reader any more. Used older may have it. Many
of these old controls accept tape only as an input device, not
to run the job from (he tape. The only the CNC
memory. Changes (0 [he done through the
CNC and a corrected tape may out later.

• Tape Reader and Puncher


Figure 51·2
One of the original facilities for
built into the old NC and Punched tape detail· basic dimensional standards
on a CNC machine is quite
non equipment. Rather than as
source running the program,
machine is used to load the program stored on a
system memory. Once loaded, the is
from the memory. in the Mem01Y mode SCl!ing,
lhe paper {ape is no longer needed. There is one
witb rhis method. Working on a
means some inevitable changes to the program
it had loaded. Since these changes cannot be
on the tape, there can be confusion at a
bly when the job is repeated. This is an organizalional
tape material for stori
and can be resolved relatively .
proven on the machine.
is to make all the necessary cmmg':!s
punched tape is generally avai in a
CNC umt, then punch oul a new
though a folded strips version may still be
port. The difficulty of this
two main purposes:
while a built-in was common, a built-in
A significant amount o To store the program data for use at a
to be spent on an external portable tape
usually incorporates the lape (eader anyway, o To serve as a media for transferring the data into
duplication. the control system via a tape reader
INTERFACING TO DEVICES 467

Tape Coding The even parity formatlSO is also k.nown as the standard
DIN 66024 (ISO) or RS-358 (ElA) or ISO code R-840.
A punched tape consists of a series of holes, laid across The odd EIA format is the standard number RS-244-A.
the tape width, where each row represents one character of
the progra.m - a character is the smallesl unit of input. The Most modern numerical controls. providing they have a
punched characters are transferred through the tape reader tflpe render will accept either tape coding auto-
to the control system in a fonn of electric signals. Each matically, based on the pari ly of the firs! end-oj-block char-
character can be composed of up \0 eight signals, repre- acter punched on the tape.
sented by a unique combination of boles punched across
the width of the tape in .1000 (2.54 mm) increments. A Parity Check
character can be any capital letter of the English alphabet,
While punchillg a lape, make sUle llialtlie process IS con-
any digit, plus some symbols, such as a decimal point, mi-
sistent for the whole length of the program tape. Mixing
nus sign, slash, and others.
ISO and ErA codes on anyone tape will result in a rejection
ISO and [fA Tape format by the comrol tape reader. Such a fault is normally called a
parity errOl: The system check for correct parity is auto-
Whcn preparing the tape, try to understand two methods matically performed by the control unit, when the punched
of standard tape coding - one, which employs the even tape is loaded into the CNC memory or processed in a
number of punched holes, and the other, that uses the odd reel-to-reel operalion. The conlrol will check for {he occur-
number of punched holes. The technical terms for these rence of odd characters in an ISO tape and (he occurrence
two systems are Even Parity, when a character is composed of even cha(acters in an ETA tape. The purpose of such a
of 2, 4, 6 or 8 punched holes, and Odd Parity, when Ihe check is to detect malfunction of the punching or reading
character is composed of 1,3,5 or 7 punched holes. There equipment. which can be very costly if it causes a character
is also coding that is a mixture of the two, called No Parity, of one coding to become a character of the other coding.
that has no application for lhe machi ne tools. For ilIustra-
tion of a partial tape coding, see Figure 5J-3. Control in and Out

On ISO tapes (even format), a pair of punched codes rep-


ISO CODE EIA CODE resenting parenthesis identifies a section that is no/ to he
processed by the control system. Whatever infonnation is
contaIned between the parenthesis will be ignored by the
control. This is a section that may include program com-
o 7 l ments; they will appear in the hard copy printout, but will
8 8 not be rrocessed when the tape is read.
9 9 Blank Tape
.0 A A
B B Blank tare i~ [he tape purchased and i.<; completely free of
C C any holes. Often, it may be overprinted with directional ar-
D D rows, to indicate the feeding direction or the top of tape.
E E 1l1e new blank tape is sometimes called a virgin tape.
F F
Blank tape can also be one that has only sprocket holes
G G punched but no holes repreSenlJng individual program
H H characters. The sprocket holes are small size holes, located
o I I between the third and the fourth channel of the tape. Blank
section of a tape is used at the beginning (leader) and at the
end (trailer) of a punched tape, to make it easier to handle.
Figure 51-3 The blank section also provides protection to the coded
Tape coding standards section when the lape is slored rolled up.
Even parity (ISO; on the left, odd parity (EIA) on the right
Significant Section
Even parity of the punched tape corresponds [0 the Inter-
national Slaodards Organization coding, called ISO in a The section of punched tape that contains the program
common abbreviation, formerly known as the ASCII code data is often called the Significant data section. Another
(American Stannard Code for Information Interchange). term used in conjunction with the significant data section is
Odd parity is the standard of the Electronic Industries As- a label skip function. It means that everything up to the first
sociation, ETA in short, that is slowly on the decline, mostly EOB (end-of-block) character, that is punched on the tape
due 10 the limited number of available characters. will be ignored. That means the significant data seclion of a
tape is the section following the first EOB character.
468 Chapter 51

The first occurrence of a carriage return (caused by (he • Non~printable Characters


Enter key on a compuler keyboard) is the first Occurrence
~ost program characters stored on a punched tape will
of the end-oF-block characler. This signal identifies the be-
pont normally. They are called the printable characters and
ginning of the signijicQJll data section - section where the
include all capitals A to Z, the numerals 0 to 9, and most
actual program is stored. The significant data section is ter-
symbols. Allhough alpha numerical characters are print-
minated by a stop code, identified usually by a percent sign,
able, these symbols cannot be printed:
acting as the end-oI-file character. When the stop code is
read by the reader. tape reading is completed. That is whv o Stop code in EIA format
no information is ever placed past the percent sign. .I
o Delete character
• leader and Trailer o Carriage return (or Enter key)

The blank section of a punched tape is used as a leader o line teed


and a LIailer. The blank section preceding the coded pro- o Tab codes
gram data (significant data section) is called a leader, the
section following the dara is called a Iralle/: llie suitable One character appears on the display screen as a semico-
lenglh of [he leader or the (rai ler is usually about 10 inches lon ( ; ). This is a symbol for the end~of-block character and
(250 mm) for memory operation (without reels), but should is never written. Ie is a control system representation of the
be about 60 inches (1500 mm) when the tape is on reels. carriage return in the part program.
For smaller diameter reels, the leader and Irni ler section can
be shorter than for large reels. Sometimes the length of the • Storage and Handling
leader section must be exlended to allow space for tape
identification. Stickers or bright pencils can be used to sup- Paper tape is punched in a lape puncher. Punchers come
ply information aboul (he [ape in ilS leader section. with only the basic features. some have advanced features
such as keyboard, printer, lape reader, setting switches, 1n-
• Tape Identification p~UOUlput'ports, .et.c. Additional equipment, such as a tape
wmder, splicer, dlgllallapc viewer, elc., is also available.
Each punched tape should be identified as \0 its contents.
Hand written data, adhesive labels or readable characters Swragc of lapes requires a fair amount of space which in-
can be used within the leader section of the punched tape. creases wilh more tapes. Tapes are normally stored in plas-
tiC boxes, small enough to fit in specially designed metal
Adhesive labels may nol be a good choice because of their
tende~cy to peel and fall off. Hand wrillen notes may pres-
cabinets wilh dividers. Tapes can be ITansferred inlo com-
ent dlfficul(y when writing on a black back2fOund. The puter files to save space and expensive cabinets.
identification usually contains (he program or i~pe number, If still using paper lapes, handle them carefully by the
drawing number and the pan name - other mformation may edges only. InSist on the same LIcalment by the operator and
also he included. others. Take a special care for paper tapes, particularly
So called readable characters - Figu re 5 J-4 - seem to be when they are manipulated by winding or unwinding. In
the best solution, since they can be generated on the major- order to prevent curling, the tape should never be wound
Ity of tape preparation equipment. inlo a small light roll, which is very tempting for saving
storage space. Heat and direct sunlight are also enemies of
the lape, as is water. A reasonable amount of moisture
keeps the tape from becoming too dry.
Tapes can be damaged if placed into the tape reader in-
correctly. Long tapes require more care [han short tapes.
Grease and dust are the worSI enemies of paper tapes and
sllould be guardetJ against. Any tape tllal is tu be used many
limes over, should be duplicated or even triplicated.

Figure 51·4 DISTRIBUTED NUMERICAL CONTROL


Example of readable characters on a punched tape
The lnpuvOUlput (lJO) pon RS-232C on a CNC machine
These special characters are actual punched holes repre- is used to send and receive dara. The external sources are
senting real characters, namely letters, digits and symbols, usually a hard disk or a paper tape. In many shops, pro-
rather than lape codes. An end-of-block character or the grams are transferred through the means of DNC, which
stop code may nOI be used in the readable section, if Ihat means Distrihuted Nl.lmr>rim.l <-nJl.lrol. The control hctS fea-
section will go through the tape reader. tures available (0 make data transfer possible.
INTERFACING TO DEVICES 469

To communicate between one CNC machine and one • Parity


computer using the RS-232C port, all equipmenl required
Parif)." is a method or checking thal all lranSmilled data
is a cable between the two devices and a software. To com-
were sent correctly, Just imagine what would happen if
municate with two or more machines. using the same sin-
some characters or of a CNC program \Ilcre not trans-
gle RS-232C porl, each machine must be connecled to a
ferred correctly or not transferred m all. can be even,
split box with a cable. The split box is available wllh two or
odd, or none, and even is the most common ~e)ecllon for
more oullets, selectable by a switch. This is the simplest
CNC communications.
form of DNC. It requires weIJ organiz.ed procedures to
make it work efficiently. DNC is nOI a part of the conlrol
unit and is not covered here. Commercial DNC packages • Data Bits
are available at various leve!s of sophistication and cost. A bil is an acronym for Binary digit, and is the smallest
unit that can Slore information in a compliler. LIl·h billi.L!Y
Some DNC software also allows a useful feature called
digit can have a value of either one (I) or zero (0). One and
'drip-feeding', which is a method used when the program
zero represenl [he ON and OFF status respectively. so a bit
is too large 10 til into the CNC memory.
is something like a toggle switch that can be turned on and
off as needed. In the computer. every letter, digit, and sym-
TERMINOLOGY OF COMMUNICATIONS bol used in the CNC program is represented by a series of
bilS, eighl bits to be precise, that create a unit called a byte.
Communications have their own terminology. The(e arc
many terms, but five terms are commonly used in CNC: • Start and Stop Bits
o Baud Rate To prevent loss of data during communication, each byte
is preceded by a special bil calJed the start bil, which is low
o Parity
in voltage level signal. This signal is senlto the dala receiv-
o Data Bits ing device and informs it that a byte of dala is coming next.
o Start Bit A bil 5i mi lar 10 the start bit, but at the end of the byle, has
o Stop Bit exactly the opposite meaning. It sends a signal,to the re-
ceiving device [hal the byte hilS ended or stopped being
• Baud Rate transmitted. This bil at the end of a byte is called the stop
bit. Because the star! and SlOp bits go together, they are of-
Baud rale is the data transmission speed. It is measured ten teamed up together as the SlOp bits and set the devices to
as the amount of data bilS per second, written as bps. Baud nlio slap bits.
rales are only available in fixed values. Typical rales for
older Fanuc controls arc 50, 100, I ! 0, 200, 300, 600, 1200, Many lerms exist in communications. With growing in-
2400,4800 and 9600 bps. Modern controls cun have the terest. this is a very rich field to study.
baud rate set 10 2400, 4800, 9600, 19200. 38400, 57600
and 76800 bps. In terms of time, lhe higher the rate, the DATA SETTING
faster the transmission. Single data bil transfer rate will be
the result of one divided by {he baud rale: The data used for communical'ions mliSI be set properly
before the data transfer can begin. The setting at one end
(computer or the CNC system) must malch the setting at
the other end. For baud rate, consult the machine manual - a
good slar! is at 2400 bps. Newer models have a higher de-
faulL Typical software selling is done through the configu-
IE't' where ... ralion al the computer end and lhrough the CNC system p8-
rameters at the CNC end. Settings at both ends mUSl march.
Sb ::= Time required to transfer a single bit in seconds Typical Fanuc settings are:
B = Baud rate in seconds
o 4800 bps baud rate
A single bit lransferred at 300 bps will take 0.03333 of a
second, but a single bil transferred at 2400 bps will lake o Even parity
only 0.00042 of a second. In practice, it takes about 10 bits D 7 data bits (seven data bits)
\0 transfer one character (see SlOP Bits section below), so at
2400 bps selling, the transmission will be at a rate of about o 2 stop bits (two stop bits)
240 cps (characters per second). 4800 bps is a good selling
Proper connection depends mainly on the configuration
once everything is working well. Higher sCHings are neces-
of the connecting data cables.
sary for 'drip-feed' methods.
470 51

CONNECTING CABLES
1
most common for communication a
a computer is a shielded and grounded
small wires (at least eight),
plastic sleeve. The purpose of
is to com~eCl the CNC pon
with the computer port (usually 25
cable. Always use a ca-
can reach farther dis-
SIGNAL GROUND
..
choice to withstand interfer-
Wires are identified by
their gauge value, a 22-gauge or a 24-gauge
wire is a good choice for communications.

The 25-pin port has pin or socket numbered (see the


fi rSI page of Ihis ct12lote:rJ and (he individual wires of the ca-
ble have to be at each end. It
between each end. mnm.<:;I~rm;ltJ()11 Df null modem connections

num- • Cabling for Fanuc and PC


same end of the
As the most common communication will be between a
Fanuc control and a computer or a laptop, Figure
• Null 5] -7 illustrates a Iypical configura£ion. Note the simi-
larity Lo the null configuralion.
A very common is in general com-
mUnications is called a null The connection of the
two ends follows a certain shown in Figure 51-5.
Each number represents pin or on the DB-25
connector. Note the Jumps between connections 6 and 8 al
both ends. Figure 5)-6 shows Ihe same null modem con-
figuration in a graphic way. This, is a popular method
showing cable configurations.

PIN
DB-25P 0
1 1
2 3
3 2
Figure 51-7
4 5 Typical cable configuration for Fanuc controls
5 4 Regardless of what cable
7 7 good communicalion software
mm"~_m _ _
arion is also needed.
6 and 8 specially designed for

20 6 8
Figure 51-5
Null modem pin connections
MATH IN CNC PROGRAMMING

Math in programming - the specific mathematical subjects to


pears to be so powerful that it In many All of them have been selected only
programmers, it is in CNC programming ana are cle-
manual programmers in n the necessary detail.
numerous calculations
is really not look very briefly BASIC ELEMENTS
of mathematical knowledge is really neces-
to handle typical calculations for man- • Arithmetic and Algebra
program preparation.
the basic arithmetic addition, subtrac-
The subject or
involving the
rion, mulriplication and division - are at the core of any
mathematical activity. Going a bit knowledge a Addition
of common algebraic functions is mamly
roots and powers of a nllmbe/:
o Subtraction
o Multiplication
CNC rela-
lionship of points within a system o Division
a good knowledge of
Algebra is an arithmetic and deals with han-
The scope of this
dling numbers in terms equations and formulas. Typical
many principles of angles, the
usage will involve:
subsets, tapers, polygons, an
the pi constant (IT), and other top- o Square roots
of planes and axial orientations is impor-
tant in many cases as well.
o Powers of a number
o Trigonometric functions
Without a doubt, the most important part of ni>r,rn"fr\l

one that absolutely must be mastered, is the .:>VJ\,.llJ'VJ


o Solving formulas and CI.!IH:HILII

angle triangles, using lrif!,onometric functions. Very o Variable data


there will be a problem or calculat'ion that will re-
a solution using oblique triangles, although In known values
problems one or two unknown various formulas
equations, unknown solved (calculated)
to achieve the desired result

• Order of Calculations
in solving trigonometric are
In [he fieJd of mathematics, is a precisely defined
ability [0 use a speclf'ic formula and
order in which the calculations are Every elec-
- but in the inability to see the to l"l'>\'\nll',,,,,e- old rules, rna
tronic calculaLor is based on
place. Often, programming i
IS very complex in terms of geometrical
combination of various algebraic the order or
calculalions will follow
nitions of Such a drawing will have so
ments, that overlooking the obvious is possible, even o Multiplications and divisions are "'''"..." ",.",\.1 first
of analytic and spacial "to>l"\.n,;>, o Additions and subtractions follow, is not important
for a 2 and 2-1/2 ax is work, but it is es-
o Any roots, powers to a number, and """"..+i"""
in all axes, particularly parentheses are always calculated
multi surface machining or sur- and divisions.
manipulation. this kind of programming is
not done a computer and CAD/CAM software. following caJculalion will same result with
or wichout parentheses:

471
472 Chapter 52

3 + g x 2 '" 3 + (8 x :2) = 19 • Circle

The multiplication is always performed tirst, regardless Circle is mathematical curve, where every point on the
of whether it is enclosed in parenlheses or no!. If addiuon curve has the same distance from a fixed point. This fixed
must be done first, it mllst be enclosed wi thin parent heses: point is cal!ed a center.
Several terms are directly related to a circle - Figure 52-1:
(3 + 8) x 2 = 11 x 2 '" 22
D CENTER - is a point from which a circle or
These two examples show lhat an innocenlly looking an arc is drawn with a given radius.
small omission may have significant consequences. D RADIUS (radii in plural) - is a line from the
center to any point on the circumference
GEOMETRY of the circle,
D DIAMETER - is a line through the center between two
For all practical purposes, there are only three entities in points on the circumference of the circle,
the engineering drawing: D CHORD - is II straight linc joining any two points on the
D Points circumference of the circle.

D lines D ARC - is any part of the circle between two points on the
circumference of the circle.
D Circles and Arcs
D CIRCUMFERENCE - is the length of the circle
Points have no parts and are represented by the XY coor- (length of the line that bounds a circle)
dinates in a 20 plane or by XYZ coordinates in 3D space. D TANGENT - is a point where a line, an arc or another circle
Points are also created by an intersection of two lines, two touches the circumference of the circle but does not cross
circles or arcs, and a line and a circle or arc. it. This point is known as the point of tangency.
Point is also created by a line tangent to a circle, line Lan- D SECANT - is a straight line that passes through
genl to an are, a circle or an arc tangentlo another circle or a circle and divides it into two sections.
an arc.
Two area sections of a circle have their own names. They
Lines are straight connections between two points creat- are called the sector and the segment of a circle, and are
ing the shortest distance between the points. shown in Figure 52-2:
Circles and Arcs are curved elements that have at least a
center and a radius.
Other elements sllch as splines and slIlfaces are too com-
plex for manual programming, although they are also based
on the same fundamental elements.

CENTER \\
'r-- \
ARC \
~... ~.. ~L!!S!§
Figure 52-2
1 Segment and sector of a circle
~ ~~
D SECTOR - is an area within a circle formed
SECANT by two radii and the arc they intercept
D SEGMENT - is an area within a circle formed
by the chord and its arc

Neither the sector nor the segment of a circle play any


Figure 52-1 signiticant role in CNC programrnmg.
Basic elements of a circle
MATH IN CNC PROGRAMMING 473

• PI •
PI is a in mathematics to represent the by the system of
ratio of Ihe to the circle diameter. lIs Chapter 4. where lhe
symbol is 1[, it is pronounced 'pie'. and has Ihe value of There are four
and regardless of how many decimal numerals
it will always only an approx- along the
programming purposes, use the value
by a calculalor or computer, usually with six 10
1n both cases, the internal value is a lot Y+
more accurate (han the displayed value. In many cases, ihe
3. J4 IS sufficient for most resulls. =+

• Circumference of a Circle II
a circle - or its circumference - is seldom
o~
and is included bere only to en- - X+
It can be calculated from the

III
(::::2 rrxr QUADRANT
(4)
or

52·3
QUiJdmllts of iJ circle ond the mathematicol definition of
direction
IGf where ...
quadrant is exactly 90°, crossing at circle
C Circle circumference Therefore, a circle has the sum of all
11 ;;;;;; Constant 3,141592654 .. ,
to 360°. Angles are counted
( :::: Circle (ad ius
o = Circle diameter
positive, starling from zero degrees (0°).
Individual quadrant points (also known as
• length of Arc points) are onen compared to a hand direClion on
of an analogue clock or as a direction
length or an arc is also a rare requirement can
0° is arbitrarily located a£ the equivalcm
calculated from [he followIng formula:
o'clock or East direction, at 120 'clock or direc-
lion, 180° at 9 o'clock or and 2700 at 6
o'clock or South direction -

90° North
~ where ...
A
C Circle
11 ::: Constant 3. 141
r Circle radius
A = Arc angle 180" = West 1 0" = East

There are two other very \


\
to a circle. They are used in nrrHTr<ll'TI c D
should be unde;rswod welL is
circle, lhe other on the tangency of a
lations require the knowledge of
described later in the
Figure 52-4
Angles and - 0" is Eost direcrion or 3 o'clock direction
an the face standard clock
474 Chapter 52

POLYGONS
s -~

defined by a
that are joined at the end
or edges of the
;

D .".,

c
A Figure 52-6
B
Regular polygon
Inscribed and circumscribed circles and a

example, a six sided polygon (commonly as


Figure 52·5 the hexagon) has a single angle of 120°:
Sum of angles in 8 polvgon
A (6 - 2) x 180 / 6
The sum of all angles in a polygon can from A 120<>
the following rormula:
polygon is quile often defi ned by the number of
and its cenLer, located within an inscribed or cir-
5 = (N- x 180 UTIJ);V'11 circle. Figure 52-6 above illustrates the con-

inscribed and circumscribed polygon, as it applies


I@" where .. La a hexagon.

S Sum of the angles regular polygons may have virtually unlimited


N = Number of sides in the polygon sides, some polygons arc so common litat they
have a special descriptive mathematical name:
For example, a five sided polygon in
lion has the lotal sum of angles:
Number of Common name
S = (5 - 2) x 190
0
S = 540 Triangle
3
There are several different polygons used in geometry,
but only onc special kind is of imerest to CNC program-
ming. TIllS polygon is called a regular polygon, all others
are irregular polygons. Regular polygon IS a polygon where
all side::. are of equal length, called eqllilateral sides, and
where all angles are also equal, called equilateral al/gles-

A single angle II) il regular polygon can be calculated


from (his formula:

(N 2) x 180
A
N

n::;,r where ...

A Single
N Number n n-gon
MATH IN CNC PROGRAMMING 475

ption varies between


F---' example, AMER NATL
C=Fx{2 (American National Standard Taper
taper
c
/ F=Cx

F --1 FI tiLt":>,JV

2xS
F Cx
• Taper Definition
s F 8 I tan30°
Most a in two common
-'- 8 F x n30°
~~"_ _ _~R" _~_
8 C 12 o One diameter and length with taper description or note
== F / o Diameter at both and the length with taper
description or note
=-8/
, F==Cx
F = 8/
If a single diameter is
The description
il is onen the larger one.
is a note wilh an arrow pOint-
-,S ing La Lhe Laper. measurements, the noLe may
identify a standard or a per foot (TPF). In mel-
the taper is always a 52·8 [lnel 52-9 <;how
the differences between the LWO which is only wilhln
52·7
the taper identification.
The most common regular polygons· square, hexagDn and octagon

are three most common polygons-


a hexagon and all octagon. Calculatiuns uf lhe
opposite corners C, [he
lengrh of each side S are given. Note thai a
have two different orientations (two
or two vertical sides), which have no on the D
Hexagon orientation can be III
with the hexagon orientation in 7.

TAPERS L

are virtually confined to the lathe Figure 52·8


Infrequently, tapers also in Circular raper - English description
Aillapers in this section relate to the
(so called circular tapers), but can
The main purpose of tapers is to 1 X
assembled parts. By definition,

standards and are used for small


as a Morse taper or a Brown and
there standard tapered ma- -.---. -.-- L
chine lOol holder tapers, etc. In most cases,
the taper is normally by the large end diameter, its
length a note descdbing the laper. 52·9
Circular taper· Metric description
476 52

the Figure 52-8, showing J<..,UF,"''''" method, the • Taper Calculations· English Units
the following meamng: rlr::l'wlrlo dimensions in Figure
I!:i" Dimensions ... data. If the
but we want to
0 "" Diameter at the large end in inches help. To
d :::: Diameter at the small end in inches d and L are known:
L ;:: Length of taper in inches
;:: Taper per foot in inches
X ;:: Ratio value 1 : X

let-
To calculate the small diameter d, with D, Land

D Diameter atthe large end in millimeters


d Diameter at the small end in millimeters
L Le ng1h of taper in millimeters
X Ratio value 1 : X To calculate the ><ITI/" ....r D, with d, Land TPF :
All in this section use

• Per Foot
foot is defmed as:
To calculate the ifD, d, and TPF are known:
per foot is the difference in diameter in inches
over one foot of length.

defined as 3.000 inches


or 3 TPF in the drawing, 1S a
diameter by 3
vVJlU""... ,
• Taper Calculations - Metric Units
Missing may
culated from the system., the taper ra-
• Taper Ratio tio is normally can be calculated.
Metric of a taper is similar: To calculate small d, with D, L and X:

~"""rH,.n of a taper is the ratio: To calculate the large diameter D, with d, L

The ratio 1 : X means that over the length of X mm, the the length L, ifD, d, are
diameter 0 f cone (ei ther as an increase or as
a decrease) by 1 mm.
as I : 5 will increase 1 mm
X (if unknown),
,.. ..,..... .",.. as the difference in width
MATH IN CNC PROGRAMMING 477

CALCULATIONS OF TRIANGLES
C
The most common geometrical entity in programming is
a triangle. AJllriangles are polygons, but nOI all triangles ,
are regular polygons. All triangles have three sides, al- B
though nOI always of the same length. There is a number of
differenttriangl~ in geometry, but only a handful arc used 0
A + 8 + C == 180
in everyday CNC programming.
Figure 52-11
• Types of Angles and Triangles Sum of All angles in (I trhw!Jlp. i.<; fllWfJ ys 180 degrees
The main groups of triangles can be grouped together by The oblique triangle - and its close cousin [he Iso.lceles
their angles - Figure 52-l0. triangle - are types of triangles seldom ever needed in rro-
grammillg. However unlikely, it is always possible. These
A < 90° triangles can he solved only if alieasl tbree dimensions are
known, and one of them must always be a side:
B < 90°
C == 90° o One side and two angles must be known
a o Two sides and the angle opposite one ofthem
o Two sides and the included angle
o Three sides
A Isosceles triangle has two sides of equal length. Each side
b - or leg - is joined by a line ealled the basco The two angles
at the base are always equal - Figure 52-12.

a b
c
Figure 52-10
A
Typical triangles
(a) Right triangle (b) Acute triangle fe} Obtuse triangle
IF a == b N A =B
Some more derailed definilions may be useful:
Figure 52-12
o RIGHT angle means that the given angle is equal to 90° Isosceles triangle
o ACUTE angle means that the given angle is
greater than Dc and smaller than 90° A triangle that has all sides of equal lenglh is called an
eqllilalerallriangle. An equilateral (riangle is also always
o OBTUSE angle means that the given angle is an equiangular lnangle, because allmlernal angles are the
greater than 90° and smaller than 180 0 same - each angle IS 60° - Figure 52-}3.
o A right triangle is also called a right angle triangle.
It defines a triangle that has one right angle (90 6 )
o An acute triangle is also called an acute angle triangle.
It defines a triangle that has three acute angles.
c a
o An obtuse triangle is also called an obtuse angle triangle.
It defines a triangle that has one obtuse angle.

In addition, Ihere is also an oblique angle, which is nOI a A C


new Iype of an angle, just a new detinition:
b
o OBLIQUE angle ean be either an acute or an obtuse angle,
which means it cannot be 90° or 180 0 a == b =c A = B =C =60 0

AI! triangles share a single feature - Ihe sum of all angles figure 52-13
in a given triangle is always equal [0 180 0 - Figure 52-11. EquiJateraltriangle
• Right Triangles An in a semicircle is , as
A Triangle - or a right angle rriangle is triangle that
Line AB is the
one angle equal to 90° (a triangle with two or more
angles is impossible). As there are I in any triangle
(sum of all angles), that means the sum the two remam~
must also be 90", There is a of mathe-
relationships thal form of
/
is a look at those that are important in

A B
D::: DIAMETER
a right triangle (hal is opposite right angle
hypotenuse and is also the side the Figure 52·16
othertwo sides are called legs. illustration Inscribed angle in a semi-circle
shows a righllriangle, where C
right (90°) and the side c is the hypotenuse. In Figure 7 is a point A to the center of cir~
opposite (0 have a low case identification corre- de B. A line from tangency of the circle will
sponding to described in capital create either a poim The angle a is created be-
(ween lines AC and AB is a bisector of
the angle a! The two angles al
and a2 as well as ABD are idenlical.
B
c
a

A c
b

A= C =90"
Figure 52·14
RighI angle triangle and the relationship 01 angles
Bisector creates two equal angles
A circle drawn
all three sides a, b, c
culated • Similar Triangles
are considered similar if they have
angles equal and their
triangles arc similar, if:
o of one triangle are the same
of the other triangle
a
o An angle of one triangle is the same
as angle ofthe other triangle and
the including sides are proportional
o triangles are similar to another triangle
b
o sides of the two triangles
Figure 52·15
Circle inscribed in Bright In CNC mathematical relationship
angles are ite often, for example, when
tapers or 51 angular items. A Laper specified in
drawing must frequently be extended at one or
to allow tool clearances.
MATH IN CNC PROGRAMMING 479

H Y
~ L...:.-_ _ _. . -_ _ =
H

«~

~---------~««««««««««««««««««««««---- ---~~

Y1

X2 ~----

52·18 ««««««<·----w ----------~


Similar triangles - 1

illustration in Figure shows the relationship


52-19
between two triangles. same also
shows important dimensions: triangles· 2

l = Original
H == Original height
A ;;;;;; Common (shared) angle With lmown values can be
Xl Front clearance ill the X axis If U is isolated on left and knO\vn values on the
:= Back clearance in the X axis right of the equatioll, the calculation is simple:
Yl = Front clearance in the Y axis
Yl = Back clearance in the Y axis u == (2.250 x 0.500) / 1.750
Figure shows the same two triangles in a simpli-
U = 0.6428571
fied way. upper illustration, X • Sine· Cosine - Tangent
and Yare swns of the (clearances)
relationships
x n+X2
Y ::::: Yl + Y2

The shows the


the opposite sides H to the adjacent
formula of the relationship is:

H L side (b)
==
U W
a b
c tan A =
If of the are known two, the lill-
value can be "'''"••.41.... using a new formula. For ex- b a b
sinB
c = c =
a
ample, the L and Ware known, and the value U
has to be HIS 0.500, Lis 1.750 and W is
To calculate U, the formula is r",w'r<:P,r rml\,v,mol"I" functions· sine, cosine, and
This has its own and is deflned TIle following fonnula converts
as a ratio of sides, using the sine, tangent func- designation to
tions angle. Other functions, namely
cotangent, secant and cosecant are not used in
CNe
o of an abbreviated as - is a ratio of side
the angle to hypotenuse of the triangle
""r'/'I",,'to
oar where ...
o - abbreviated as cos is a ratio of side
",rI",,,,,,.,t to angle to hypotenuse of the triangle DD Decimal degrees
D
o Tangent of an - abbreviated as tan is a ratio 01 side M
the acute angle to the side S Seconds

• Inverse Trigonometric Functions


value tangent
is two sides, The depends 64"48 '27" .. isequivalenl fo:
on this is the of an inverse crigonometric func- 64 + (48 / 60) + (27 I 3600) 64.8075"
tion. An inverse function is sometimes symbolized with the
word arc, the normal function. example The abbreviations DMSID-M-S
arcsin of an the angle whose ratio of monly on scientific useful COD-
the side a to hypotenuse c. ... HO.U:t;.'- decimal to DMS. It is not
programming, to perform a
Most pocket to verify that the converted result is
sin, cos and tan calculation of DD to is nothing more
ondary than isolating the fractional part number in three
v~ • .u"'J'~' in order to convert 29.545021 to de-
0

If ." sinA : : : a I c lllre:s-s;ec!::mc]s [annat, are necessary.


Then A := arcsin I c) The [lIst amount from
Or. A = / c) the decimal "'"J';..t'-'''--'

If ." cosA :: b / c 29.545021 0.545021 = 29°


71u.m ... A = arccos(b / c)
Or ... A = (b / c) The seconds is to take the decimal portion and multi-
ply it by SIXty, to the minutes:
If tanA = a / b
Then ... arctan
A :::: / b) 0.545021 x 60 = 31.701126 ~ 32'
Or .. A = (a / b) is to take the ~_"'UU''''L
multiply it by sixty to
VVhile there IS only a result for each mj;1~Onometnlc
function, there could results for the
For example, value of 0.7071 0.701126 x 60 = 42"
of 4Y', as well as 135".
The final OMS value of the example will 29°32'42",
• Degrees and Degrees with <1 slight error.

Another type of calculation in prograrnming is con- • Pythagorean Theorem


of angles. It to a drawing using minutes and
to describe the of angular TIle well kno'Arn
quired. There are two dimensioning ciauPythagoras (6th
drawing. The older and method is the angle thagorean
DMS or D-M-S, means
modem methods are
use DD or D-D) which means decimal degrees.
calculations of
convened to DD.
MATH IN PROGRAMMING 1

I'II"£lrPJrn is used in programming to fmd ~ Example ...


triangle, if two other are If the length of hypotenuse C [5 3 units b
calculation is units, the side a can be
squared is 9.0, b squared is 7.5625, so

/ a = V(3 x 3 - 2.75 x 2.7S}

2 a = V(9
- 7.5625) = Yl.4375
Area:::: c a '" 1.1989579

roo!.

Area .. Solving Right Triangles


solutions of
Theorem or any other method are
conunon methods use the cos
functions, As always, start with In trigo-
nom etry, any triangle can providing one of the
MO data sources is

2 o Two sides of a right


Area:::: b
a One side and one of a right triangle

never used in cakula-


solutions. If
52-21 use both methods
Pythagorean Theorem

ale ::: sinA ::: cosB rlnl'\nr\m~'fnl Relationships

b/c ::: cosA ::: sinB . Opposite


S me =: .,--:...:.....--
a Hypotenuse

alb ::: tanA ::: cotS


Adjacent
Cosine == .,---'---
b HypoLenuse
b/a = cotA ::: tanB
TOA
a == c x sinA b ::; c x C ::: a I Tangent::: --'-'---
AdJacent

a ::: C x cosS b ::: c x sinB c a I


~p'
\:.J
a ::: b x tanA b ::: a x tanB c ::: b I

a b :::: a / lanA c b I cosA p ...... Peter


== b / Sin :::: -h ...... Has
...... Broken
a b:= \{7Tc - a Cos = b
...... His

-......
h
P
Tan:::: -
A ::: 90" B ::: 90" - A C b So!1!e

Figure 52·22
Trigonometric functions "",m"",,, for solving right angle triangles
482 52

ADVANCED CALCULATIONS CONCLUSION


The last two charts show fonnulas for In this chapter, only the most important and "nT''''''''''''''''''
chord C or the tangent T of a circle. used mathematical subjects
las can be used as well, but the formulas can more solutions and shortcuts are
calculations faster. With only one excepnon. operators every day, showmg their mg:enlll
solutions, dependent on the available math problems. Author will ~n1"1,rprlc:1t."
can also calculate the radius R angle A and cut or a solution to any programming and will
Calculations relative to the chord a circle are corlSlclere:(1 for the next edition of this handbook.
Figure 52-23. Calculations relative to the cangeIlt
de are shown mFigure 52-24.

d c (1 xR
--+-
2 sina x 2 d R-

R-d 2
x2xR 2x R X

CHORD circle· calculations of chord, radius and deviation

a :::

( -1)xR
cosa

tan- 1 _ T_X2 -1
COS - -
2x 2x

Figure 52-24
TANGENT of a circle angle and deviations
CNC AND CAD/CAM

Up to this point, all topics related to manual program- • CAM Software


ming of CNC machines - all fifty-two chapters. In the last
ch.apte!. we look briefly at an area where manual program- Current CNC software, commonly known as CAM soft-
ming IS replaced by a computer, a suitable software and ware, has many features thuttranslate into a CNC program,
some additional skills. Notc the word additional. Studying corresponding to individual ideas of how the part program
the handbook has certai nly nol been a was Ie of time. On the should be wrilLen. II can produce a program closely match-
contrary - the handbook covers subjects that every CNC 1I1g a particular direction of thinking, closely matching a
programmer should know, regardless of the programming particular programming style. But dosely does not always
method used. Programming with a computer 1$ always de- meall close enough. Here comes the second reason.
sirable but to know the basic skills is the most important The second reason is (hat when programming manually,
prerequisite. The basic skills are in understanding the man- the programmer understands the programming process and
ual process. All subjects and methods learned do not have the resulting output. A program generated by a computer
to be applied by a pencil and paper. They could be applied has to be in the format compatible with the CNC machme
by a CAD/CAM - or just CAM - programming. A simple and its control system. If ali goes well, there is no need to
statement may summarize it all: look at the program at all- it's there, in tile files, ready to be
loaded inLo the CNC machine. On the other hand, what if
Top class programming using CAM software requires there is a problem - what then? Going back to the computer
solid knowledge of manual programming methods.
and reprogram the part may solve the problem on hand.
The question is at what price. Ability to read Lhe CNC pro-
PROGRAMMING MANUAllY? gram code, to really understand it, also means the abilily 10
change it. Spendmg a valuable computer time jusL to add a
In the area of CNC programming application techniques, forgotten coolant function seems excessive. Would it not be
computers at all levels, from a personal computer to work- better. just to edit the program by addincr0 M08 function in
stations arc ~apable 10 produce most CNC machine pro- the ngh[ place? Although the example is oversimplified, it
grams ln a tlme much shorter than any manual program- also shows tha~ real understanding of the programming
ming method. So, why is the high importance of manual process lS very Important. The besl way to understand the
programming methods so emphasized? Is [he manual pro- process is to bypass the computer and get the same results.
grnmming still alive, find if so, how healthy is it? That can be achieved with manual programming.

There are at least I wo important reasons why manual pro- It wo~ld be unfair La compare or promote manual pro-
gramming for CNC machines it is nol dead yet and will nol grammmg agamst compuler programming and vice versa.
disappear anytime soon. What . is necessary to promote is the knowledve
D
and undcr-
srandmg of manual programming principles. Without such
The tirst reason is thal in manual programming, the pro- knowledge, one can not become a good CNC programmer.
grammer is able 10 do what computers cannot - and never
will be - programmers can think. Manual programming Most of the CNC programming can be done quite well on
teaches the invaluable lessons of discipline - a very impor- personal computers. The existing technology is prooress-
tant qual ity of a professional CNC programmer. Discipline ing very rapidly and many 2D and 3D programming ~ppl i-
means to concentrate, to constantly evaluate, to make deCI- cations are available for a fraction of the cost when com-
sions - to think all the time. In manual programming, there pared to just a few years ago. This trend will continue well
lS a to[al, absolute and unequivocal control over the final
into the future.
product - the pari program. Only a programmer can evalu-
ate a given situation, analyze the problem and adapt to un- • Desktop Computer Programming
foreseen circumstances. Only a programmer can feel that The complete computer system - [hat means the hard-
something may not be right. Only people usc instruments ware, s.ofLware and peripherals - suitable for CNC pro-
known as thinking process. intelligence, instinct, gUl feel, gramming lS challgmg at such a rapid pace that any In-
common sense and experience. Those are instruments in- depth dISCUSSIon of the hardware would be obsolete in a
~erent to humans, not computers. CNC programming is
rna(ter of weeks. Almost the same speed of obsolescence
like [he work of an artist - it can never be fully autoniated. applies to software as well. New features, new capabilities,

483
484 Chapter 53

new tools arc mi:\rket and are of- TOOL PATH GENERATION
and software
is whatlo
The key requirement of a CNC
program of an accurate 1001 path for a
Such a decision !'nust on the reqllirt>d applicn- chine. The 1001 path crealion, with all ils
lion. What will the What kind of most lime consuming task In manual
work needs to be computerized, What results makes sense 10 make it the most
arc expected? These are the primwJI when planning 10 aUiomale the
the kind of monitor or printer or cess. Only high level CNC a
They fifE' (llso ve.ry importanl - hUI only of (001 pa£hs. For example, helical milling or a full
the application needs. chining are not always in the

Certain programming applications are One mlslake in software


chine shops. Others are unique to a CNC machines
0''''1''''''",
factoring and the kind of work or and practices. This rather narrowly focused 'l",,,·"·~rM
tured. The following shalt list always successful. Consider future plans m both
that a typical computer and capital investment. Whal about the product? win
should have: the produci change In five years? Knowing the philosophy
and focus of Ihe company, its policies and
o Tool path geometry creation environment and yes - even its politics will help to make a
o Tool path generation more accurate estimate of fulure needs.
o Complete programming environment computer technology has grown a lot, yet it is so new
(hat it is in the slale of constant development. Nobody can
o Post processing
wilh absolure accuracy whalthe future will offer ill
o Training and technical support terms of CNC machining and CNC programming. If
current and the future needs are well established before
It is important to understand why ng a programming system, there is a good
ponanL Before investing inlo a technology to beat obsolescence for a long time. CNC
tlally new co the user, it helps to know what opcrs offer periodical updales to their product, wilh more
ware offers and how rhey can be used in added as computing power increases. The updates
(new versions of the software), usually reflect
TOOL PATH GEOMETRY DEVELOPMENT ments the technology, bmh on the hardware and software
It not mean purchasing every new update
Most CNC programming systems require a tool path but it is IlnpOlianl to select a CNC devel-
omeuy creation before the actual palh of a cUlling tool can by a solid and well established company lhal
1'1'1""",;;. 10 he still in existence when the need (0
The key words here are tool path A
common misconception among programmers comes up. The computer industry is very
to re-create everything in the original drawing. That IS
acquisitions and takeovers are as common as
a wrong approach and

When il comes to 1001 path geometry, two must COMPLETE RONMENT


faced. One will be work form a paper drawing, the
from a CAD drawing stored in the computer.
are di in approach, Ihe fact remains programming software al-
B new is created or an eXisting and relating tasks [0 be done from a
modi a mouse or similar pointing deVice.
thaI once the software is loaded, it
all tnsks without returning 10 the operating
programming systems are based on
modules Ii that are nol accessible fTom a menu, or
they do not cover all the in programming.
what is normally nOl
not on a two dimensional represen- The following is meant only as a very brief guide 10
depth, separaling enlilie~ by some of main that apply to CNC programming
c 1earanccs or a special on personal are the expected features
tool motion, and so 011. from any CAM
CNC CAD/CAM 485

o Multi machine support (machining centers, EOM) • Associative Operations


o Associative operations tor flexible editing When a tool path is it is aLlachcd to the previ-
o setup material blank definition ously defined lool paLh reasons. it is
not unusual to laler. The Il"a-
o list and job comments {setup sheets) ditional method vendors
o slill is) \0 recreate the then recrt'ille the tool path.
Associative operation the creal Ion oj' " new
o text editor {with CNC oriented patn, it it automatically. It IS fast and accurate. f1
works way as weI! - many tooling can
o Printing capabilities (text and graphics)
be on demand.
o plotting (plotters)
o Interlace with CAD software (DXF, CADL, ... ) • Job
o Support for solid modeling lob the
lJ:ro onglll,
o specifications and features speeds and reeds can
(including customizable post processing} job setup, as well as various
o Support for generally available hardware parameters. lhal store com mon data for
terial~ and operalions are also powerful sort ware
o Utilities and special features, open ::'fl'mr.>I'TI

described item will AI- • Tooling and Job Comments


though all items are useful a is a process covering sev(:ral
not mean Ihar all items are manually or with a
requITe an additional
tools is a manual task. Once
plotter, cabling,
identifications, speed and
can be grouped into a
• Multi Machine Support the of then usage within
When it comes LO suppor! of di machine Lypes. pans require more than one ma-
CNC software can be divided inlo lwo Complex setups require
machine operalor (setup sheet),
o Dedicated software intents. All thc~e programming
o Integrated software must and lhe documentation sent oul to
chine shop. It is only reasonable LO expect that
The rit'riirflfr>.d only one kind of ma- programming software will support a looling
chines. For example, a is designed specil-I- ina form of a tool library file and \he n,-r.E',."",
cally [0 produce equipment, library tile is also very usefu l, as it can store surface speeds
can not be used cenlers or EDM. many materials and the programmi software will cal-
the exact spindle speed based on the
Dedicated software is . This lS f\ good or In!eraClion be-
and very specialized and
to a particular mach
press brake equipment • Connection Between
The integrated allows the programmer A programming system should
of several lypes of lools, Such a selection usually lcommunicillions option) between
offers milling, EDM.ll is also common 10 and the. CNC machine. This
use Ihe son ware such as burners, routers, la- data exchange via a cable.
ser cutters, For metal cutting, this is computer to the memory or
the preferred
An important point is that not all machines have the
Another reason ity [0 lake advantage of direct
software, (hal is connection. in the shop have this
used to one bililY, it nnd
play ror a discipline to In harmony. The exis-
menus look lL~nn; a direct connection in a software is J
must. even if it is nOI used after the purchase.
486 Chapter 53

• Program Text Editor • Pen Plotting


A CNC program generated by the software should be Pen plOI will usually produce image quality superior to
100% complete and ready for use by the machine. The im- the printer plot but for a CAM programming it is an unnec-
plicalion is lhat such a program is so perfect that it needs T\O essary luxury.1l1c only lime when a pen plotter can be ben-
fUt1her editing. This is the ideal way, the way it should hap- eficial is for plotting 10 paper size that is not supported by
pen. If a change in the program is needed, it should be done standard printers. Other reasons wi II be the need for a color
wiThin the design of Ihe part shape and that means through outpUI, a special requirement by customers, or special doc-
the CNC software - 1101 aU/side of it. The reason is that any umentation development. Before tbe graphics software ap-
manual change \0 the genemled program does nol corre- peared on the markel, plotters were widely used to verify
spond to the program dala as generated by [he computer. In the lOol path. Now, the [001 path is verified directly on the
the environment where the data is shared by many users, computer display screen, during interactive programming
such n practice will cause a 101 of problems. process, including different views and zooms.
That brings up a question - why does a CNC software Most plotters are HPGL compatible. HPGL is an acro-
have a built-in lexl editor? There are two reasons. One, the nym for Hewlett-Packard Graphics Language, and is cur-
edilor can be use.d for creating ur mOLlifying various lexl rently tlie 1110:>t sUPPorled plot file exchange formal.
tiles such as selup sheets, tooling sheets, operation dala,
post processor templates. con figuration fi les, special i n- • CAD Software Access
structions, procedures, ctc. These liles can be updated and
otherwise modified as required, withoul a damage to the If an engineering drawing is generated by a CAD soft-
progranl dalauase. The second reason is !hal ill some spe- ware, all drawing 1nformation is stored ina computer data-
cial circumstances, a CNC program can be edited outside base. This database can be accessed by several program-
of the computer model, providing [he change docs not ming software packages, through a me format translalion
modify significant data. For example, to add a missing ulility (more on the subject later). Once the CNC soflware
coolanl function M08 to the part program is much faster accepted and processed the database from the CAD sys-
done in the text editor, Ulan repealing the program generat- tem, the CNC programmer can concentrate on generation
ing process with the computer. Purists are right, it is not the of the lool path itself, rather than defining the tool path ge-
right way of using the text editor, but al Icast the significant ometry from scratch. Some modifications are usually nec-
dala (loollocalions) are not tampered with and the database essary, so expect them. The most significant advancage of a
is otherwise completely accurate. quality CAD/CAM system is the avoidance of duplication.
Without CAD ~y.<;tem, the CNC programmer has a 101 of
Many programmers use various external lext editors or cxrra work to do, much of ir is duplicated.
even word processors in text mode. These types of editors
are not oriented towards the CNC programming, since they A high quality CNC software also allows the existing
lack some features typical to lhe CNC program develop- program file to be Iranslated the other way, 10 a file that a
ment Only a CNC oriented text editors can handle auto- CAD system can accept. This op6on is called reversed
matic block number sequencing, removing the block num- processing, and can be a bene/if to companies that want to
hers, adding cosmetic spaces in the program and other translate existing programs generated manually to an elec-
functions. The editor should be accessible from the main tronic form. Usually some additional work is required in
menu or from within the software. these cases.
High level CNC software is a stand alone type. Stand
• Printing Capabilities alone software means that it does not need an access to a
Any text saved into a file, CNC programs included, can CAD system - the 1001 path geometry and the tool path it-
be printed using a standard printer. The paper copy is often self can be developed from within the CAM software, inde-
necessary as a reference for the CNC operator, for stored pendenlly of other software.
documentation, or just for convenience. The printer does
not need to be top of the I ine, just One wilh a standard paper • Support for Solids
width. Some programming software supports an option Solid modeling for 3D applications had been for a long
thal is known as a printer plot or a hard copy. Hard copy is a time the domain of large computer systems. With the ad-
graphic image of the screen transferred to the printer. The vance of powerful microcomputers, solid modeling is now
image quality is usually mOre than adequate. 1111$ hard part of high level CNC software.
copy is an excellent aid during program development stage.
Betrer quality printer provides better qualilY print plot. The With solid models, the machining process of complex
printer support is provided by the Windows environment, surfaces is much more streamlined. In addition, solid mod-
as most PC based CAM soflware is developed for the Win- els offer the benefits of supplying engineering data, easier
dows operaling system. manipUlation of objects, and many other features.
CNC AND CAD/CAM 487

• Software Specifications RAM and Data Storage

Another benefit of a high level CNC software is that it Data is stored in [he computer in two forms - memory
comes well supplied with a variety of useful features. What storage and disk storage (file). When an application such as
makes each system unique, is usually the method of how CNC programming is started, the CAM software is loaded
the programming process is executed. In the early years of into the computer memory. The more powerful [he applica-
development, programming was done by using special pro- [ion software, the more memory it requires.TIlis memory is
gramming languages, such as APT'"")\ ( or Compact IfTM. known as Random Access Memol}!, usually called RAM.
Some languages are still available but heavily on the de- Every software specification identities the minimum avail-
cline. Modern interactive graphics programming has virtu- able RAM required. RAM of today hIgh level computers
ally eliminated the need for languages in just about all man- arounr! the gigabyte range is not uncommon. Any extrC1
ufacturing lields. The more popular kind of programming memory will speed up processing quite significantly. The
is based on interactive graphics. The programmer defines data in the RAM is volatile, which means the data is lost
geometry. typically as the tool path geometry, followed by when the application is ended or the computer power is in-
the tool path itself. Any error in the process is immediately terrupted. To save important data from RAM into disk files,
displayed on the graphic screen and can be corrected before a hard disk or similar media can he user!. For a micro com-
too much other work is done. puter CAD/CAM work. the absolute minimum require-
ment is high density removable drive and one large size
• Hardware Specifications hard drive. Floppy drives of any kind are not suitable.
SpecifIcation oflhe software will determine the hardware The hard drive should have a fast access time and a high
selection. Hardware is a common term for the computer, storage capacity. Another option IS a tape drive, CD-R and
monitor, keyboard, printer. modem, ploHer, mouse, scan- CD-RW disks or recordable DVD disks for backup.
ner, disk drive, storage media, CD writer, and many others.
The hardware refelTed to in this chapter is based on the Input and Output
Windows™ operating systems. Modern operating systems
Input and Output (I/O) computer fe..'llllreS, cover h>lrr!-
are based on a graphical user imeljace (CUI). Some soft-
ware can run under a different operating system, for exam- ware items such as monitor. graphic card, keyboard, digi-
ple Unix (used mainly by workstations) or different Win- tizer, scanner, printer and ploHer, Monitor suitable for
dows versJOns. It is always 10 the advantage of the user thal CAD/CAM work should be a large sile color monitor pro-
viding very high resolution. The monitor and the graphic
the latest version of the operating system and the CAM
soft ware is i Iistalled all the com puler.
card do relate to each other. The card must be able [0 gener-
ate the image, the monitor must be able to display the im-
When th inking of purchasi ng a computer hardware, con- age. Speed of the video output is also very important.
sider carefully at least three major criteria:
A keyboard is a standard feature of a computer and serves
o Performance .,' computer speed as a basic input device. Mouse (or a digitizer on larger sys-
tems) are also input devices, but much rasler than keyboard
o Data storage .,. type and size
input. In CAD/CAM, where a lot of work is done in graphic
o Input / Output ... ports mode under a menu system, the item from the menu is user
selected. In most cases it can be selected with a pointing
device. The user points a[ the menu item desired, presses a
Computer Speed
bullon on the device and the menu item is executed. The
PeJj"ormance of (he compucer system is typically mea- pointing device most suitable for CAM work in the Win-
sured by the relative speed of the main processor. The dows environment is a mouse.
higher the number, the faster the computer can process Both the printer and ploHer are theoretically opllonal. but
data. To make the comparison easier, !he original IBM PC generally worth some consideration. For CNC work alone,
mode! year 1983, had a 4.77Mhz processor speed. Later a printer is more importanllhan a pen plotter. If the setup is
model AT had 6mhz processor speed, improved further to 8 a true CAD/CAM. both peripheral devices may be needed.
and I OMhz. Later, computers used the so called 386 micro-
chip (general1y Intel 80386 or 80486) and reached 25Mhz, All peripherals are interfaced with the compU[er using
33Mhz and more. Pentium processors followed, and the specially conl~gured cables connected 10 the Input/Owplll
process is ongoing. Chips in thousand plus MHZ speed are (I/O) outlets called ports. 111e modem is normally not re-
a reality. For serious CAD/CAM work, the latest fully fea- quired for CNC programming, except for data exchange
tured processors should be used. Newest processors offer with a remote computer or Internet access. The laser or ink
much higher processing speed, and the more processing jet printers generally use a parallel interface known as the
speed is available, the better performance of the CNC pro- CeJ1lronics standard, but many other devices use a serial in-
gramming system. terface. There are also other I/O options, such as the USB
(Universal Serial Bus) interface.
53

• Typical / Software Requirements • Utilities and Special features


IJU\J .......:;u hardware most updated version of the operating system is
computer system ft is not never as powerful and flexible as many users would like it to
a simple 'shopping list' for all hardware '''1'1111,.", .. that reason, many software developers came with
CNC machine shop can use. Here are some of programs and utilities that smmu;;mlent
'.HV'''''''''UYJ
to any system and are not subject to OeC;O[ll- features. Many are
quickly. A typical list of minimum lTPF'U/';.l'CF' from the Internet and

and options may be compiled: Intemet and World Wide


a great source CNC
o Hardware compatibility with IBM (Windows based) and general
- Apple computers havevery limited CAD/CAM applications
to use a CAM software.
o latesl version of the Windows operating system many tasks associated with
(must supported by the CAM software)
o central speed - higher::: beller POST PROCESSORS
in MegaHertz units - MHz.)
o memory cache CNC software must be able to output a Drogrrum
mat unique to each control unit most ......."' ...r'"
o requirement of a numeric (math} r{\_,,,,,{\,,,,,::,,,,,,,,(
tool path generation is the data integrity. computer gen-
(normally part of the higher end processors)
erated program must be accurate and the CNC ma-
o Access Memory (RAM) - as much as Dosl)lble chine. That means the completed should require no
editing, no optimization, no other programs or
o Enough of hard disk space for program and
(measured in gigabytes or higher - with a similar manual activities. can achieved only
a well developed and a properly
o Backup system for data protection configured post CNC machine.
(tape cartridge. removahle drive, DVD,
A top quality
o High resolution graphics adapter (graphics tant customized
(shou[d have a rapid refreshing for the
data into the
o Large high resolution color monitof . non-interlaced cutting values, spindle .:>1J"""u,;>,

(measured in pixels - the more pixels per screen stored for further DH}CeSSU
the finer the display, and the smaller the pixel data, sorts it and creates a
the beller the display) sents the part crp.r\n"lF'Tr\1
o Pointing device - normally a mouse - is a current standard functions.
gardless of its even more,
o ploHer is required only in special circumstances every CN C is program codes are
needed for CNC wU!k) - B ~izt:! maximum is Llsually unique to a single machine, some are quite common to
if needed
many' of a post processor is to
cess the convert them to the machine
for individual control systems.
o Agood quality prinler with a parallel or
(lor hard copy documentation) • Customizing Post Processor
o CD or DVD drive & various multimedia a processor is more or
(sound card necessary) to be customized, at least to some extent.
in-house, usually means to cus-
o Access 10 additional global information
u ......,;)"lJl supplit!u with
(Inlernel. E-mail, usef groups, newsgroups, ... )
oroc:ess depends on type
o Two or morE! serial and changes take
o Text editor - usually part of the software (or optional)

It is smart to keep .... v,.~~.~. micro computer technol-


ogy. It develops rapidly even a weeks may change
some fundamental and decisions. Following
the development teclmology creates aware-
ness of the latest therefore a more educated
user and/or
CNC AND CAD/CAM 489

IMPORTANT FEATURES ion or the tool path for


lathe have a back
the 1001
are several important fealllres to look mto whe.n in-
inlo a CNC programming software. They do
on the !ina! runctionality of the program, <llihe
• CAD Interface
All features are important and should
carefully, A sland alone CNC prograrnmi
CAD software the
• Input from User own, Yet, in a any CAD/CAM syslem is I
the opr/on of inqJOllillg pall geulTldry fmm a
programming
Even if a company does nol need D, il
the user. This in-
pared 10 accept ils perhaps from customers or c.:orn-
thaI cnnnol he
rany branch offices.
or would require 100
arc usually small in size and Neecile<;s 10 say, if a CAD software is not
mode whenever rc- computer cannot not acccpl the riles n"',n(.>Y'l1
are a barl'eeder sc- such a software. These files are their struc-
ng routine on a horiWl1- ture is nol a maHer of public access. Therefore. mllst
supports some lype of be another way to interchange drawing is an-
it adds an eXira nexihility other way - Ii~P (1 diffr>rl>nl file forma!.

File Exchange Formats


• Machining The need 10 exchange design
a CAM software is ils ware systems has always been a prime
and repetitive cye Ies, are lHallY competing rormats or a neutral file
a manual oldest of them is called ICES (In/tial
modern sys- Specifiea/ioll), originally developed to transfer complex
ore available with a lim- design liles from one software to another. Another
i memory ly. that reason, support for cy- thaL is also used. is the DXF format by Autodesk 1';"1.
cles is very important in a as it provides
The DXF (Drawing eXchange Formal or DaTa
easy editing at the
Format) is considered by many £0 he the standard of draw-
ing liIe exchange between micro computers. II has been de-
• User Interlace veloped by Autodesk™. Inc., the developers of popular
Customizing the display is a AUlOCADTM, the mosl wieldy llsed PC based CAD in the
as crilical as orhers, but a facility 10 world. DXF format is suitable only for common
tool bars. even menus eXIra ric as points, lines. arcs and a few others.
Colors me very ,"'''',., ...;-,.,,,,'
software should also support an interrace be-
seHings should
tween the neutral files generated by a CAD system. De-
The screen appearance
pending on the nature of a particular programming appllca-
bination of colors for the j·Ar,,,,,, .. ,.,,
the Interface mtly be needed for
lext. The result is the
for more complex geometries; High
a£ least these two formats. usually many
morc. Keep In mind thal the formal and structure of the
such as DXr: or I<..iES. is not in the
developer. therefore it is a subjecllO change.

SUPPORT AND MANAGEMENT


graphic image moves comoUf, wilhout
any traces. A variation is that the
and software for CNC programming work can
comour change points only, but
It can represent a significant investmenT of
static display and is very important some
eralions, Premium CAM software also allows 10
and and can hecome a lOlal if i lis nor
properly. A failure is nOl lhcaClU<llloss Oflhc hardware and
customized tool shape, including the Lool
sQftware cost. 111C real find heaviesl loss is in the i
on (he screen ro simulate actual tool
speed and was expectcd hulncvcr
add even more realism to program
The loss is in the confidencc the COI11-
o 53

pany employees pul into the technology. .. System Management


high. To prevent such prospects, keep three
A reliable operation of all system
in mind when planning a CNC
the success of CNC software, Use
o High quality training program for long term skills good organization, it needs
definitely needs a professional
o System management philosophy and <Mr~~T"'r,".<:
CllJ'''rr1pnl establishes standards and

o Technical support for hardware and " .... "rlAI"'''', operations, Concerns about people selection,
backup methods, confidentiality and security, work
No item In Ihe list is any more important ronment qualil y , etc .• are not con fi ned to a
olhers - they are all equally imporrant. should be important in the overall company culture .

• Training • Technical Support


should be planned, thorough, and suppon is an important pan of the system man-
programs apply three levels A service contract or a support can
companies do not place enough emphasis on usually negotiated with the vendor, covering installation,
many studies and examples proving thaL update policies, new developments, etc. An im-
quality training work. The lack of lime and portant pan of technical support is the speed and reliability
costs are often used as excuses. Training is a l;;"I.-'\;:':'''-' of hand ling emergency situations. If a hard disk fails - and a
for any company that wantS to be competitive. back up does exist - what can be done? The CNC shop
is waiti for lhe cril.!cal job, while the programmer cannot
level 1
data to the machine, because an "' . . A.., ... '
firsl level of training should be aimed at the person failed. Support should cover both
with none or lillie computer experience. ft should in- I support promised by the
software to the programmer who pro- be written down. Know exactly what
Iy. It should be an overall training, mainly If something isn't in the contraCT, it isn '[ available.
in nature, with the emphasis on the system '~Y,,"H'~"
- as they relate to the company where the THE END AND E BEGINNING
software is installed, The typical general approach should
byexplaini the philosophy behind {he sort-
CNC technology holds is always hard
ware {he structure oj' menus and commands. It
indications where the \echnoJ-
is very important to show the student what the
controls with more computing
do in lied first level should be done
approach 10 programming, more
The
better storage methods, etc, are
are also inevitable in work skills,

Stand alone CNC ines will always be needed, On


Training level 2
the CNC machining centers, will much more em-
phasis on faster machining rates. CNC lathes, the
natural way of development to adapllhe tool in-
dexing teChniques of the centers. This would in-
crease the number of and
live tools away from area. Also
ing to the ni features Ihat eliminate <':P','nn"",cv
level eliminates plex milling features on
ginning of a new era.
plexilY of the first few
possible, lhe dil1icult

Training level 3

The thild level is usually months later. It covers


problems. questions, concerns, introduces
I ips, shortcuts, etc. this level is to create a
long term r'\r{'\(Jr<>TYIl'YlJ"r has
many questions, all
questions, weed out had habits,
REFERENCE TABLES
492 Appendix

D_e~mal inch - Number 1 Letter Metr~ (mml Deci 11I~.U.nch Fraction _INI rj letter M~lri~ jlT\.r:2)~
.0886 2.25 .1772 4.50
.0890 43 .1800 15
0906 2.30 .1811 4.60
.0925 2.35 .1820 14
.0935 42 .1850 13 4.70
.0938 3/32 .1870 4.75
.0945 240 .1875 3/16
.0960 41 .1890 12 4.80
.0965 2.45 .1910 11
.0980 40 1929 4.90
.0984 2.50 .1935 10
.0995 39 .1960 9
.1015 38 .1969 5.00
.1024 2.60 .1990 8
.1040 37 .2008 5.10
.1063 2.70 .2010 7
.1065 36 .2031 13/64
.1083 2.75 .2040 6
.1094 7/64 .2047 5.20
.1100 35 .2055 5
.1102 2.80 .2067 5.25
.1110 34 .2087 5.30
.1130 33 .2090 4
.1142 2.90 .2126 5.'10
.1160 32 .2130 3
.11B1 3.00 .2165 5.50
.1200 31 .2188 7/32
.12'20 :'.! 1() .2205 5.60
.1250 1/8 .2210 2
.1260 3.20 .2244 5.70
.1280 3.25 .2264 5.75
1285 30 .2280 1
.1299 3.30 .2283 5,80
.1339 3.40 .2323 5,90
.1360 29 .2340 A
.1378 3.50 .2344 15/64
.1405 28 .2362 6.00
1406 9/64 .2380 B
.1417 3.60 .2402 6.10
.1440 27 .2420 C
.1457 3.70 .2441 6.20
.1470 26 .2460 D
.1476 3.75 .2461 6.25
.1495 25 .2480 6 ..30
.1496 3.80 .2500 1(4 E
.1520 24 .2520 6.40
.1535 3.90 .2559 6.50
1540 23 .2570 F
.1562 5/32 .2598 6.60
.1570 22 .2610 G
.1575 4.00 .2638 6.70
.1590 21 .2556 17/64
.1610 20 .2657 6.75
.1614 4.10 .2660 H
.1654 4.20 .2677 6.80
.1660 19 .2717 6.90
.1673 4.25 .2720 I
.1693 4.30 .2756 7.00
,1695 18 .2770 j
.1719 11/64 .2795 7.10
.1730 17 .2810 K
.1732 4.40 .2812 9/32
.1770 16 .2835 7.20
Appendix 493

Fraction Number / Letter Metric (mm) [ Fraction Number / Leiter Meuic Imm)
.2854 7.25 .461313 15/32
.2874 7.30 .4724 12.00
.2900 L .4844 3 i/64
.2913 7.40 .4921 12.50
.2950 M .5000 ,/, 12.70
.2953 7.50 .5118 13.00
.2969 19/64 .5156 33/64
2992 7.60 .5312 17/32
3020 N .5315 13.50
.3031 7.70 .5469 35/64
.3051 7.75 .5512 1400
.3071 7.80 .5625 9/16
.3110 7.90 .5709 14.50
.3125 5/16 .5781 37/64
.3150 8.00 ,5906 15.00
.3160 0 .5938 19/32
.3189 8,10 .0094 39/64
.3228 8.20 6102 15.50
.3230 P .6250 5/8
.3248 8.25 .6299 16.00
.3268 8.30 .6406 41/64
.3281 21/64 .6496 16.50
.3307 8.40 .6562 21/32
.3320 0 .6693 17.00
.3346 8.50 .6719 43/64
.3386 8.60 .6875 11/16
.3390 R .6890 17.50
34?'i 8.70 .7031 45/64
.3438 11/32 .7087 18.00
.3445 8.75 .7188 23/32
.3465 8.80 .7283 18.50
.3480 S .7344 47/64
.3504 8.90 .7480 1900
.3543 9.00 .7500 3/4
.3580 T .7656 49/64
.3583 9.10 .7677 19.50
.3594 23/64 .7812 25/32
.3622 9.20 .7874 20.00
3642 9.25 .7969 51/64
.3661 9.30 .8071 20.50
.3680 U .8125 13/16
.3701 9.40 .8268 21.00
.3740 9.50 .8281 53{64
.3750 3/8 .8438 27/32
.3770 V .8465 21.50
3780 9.60 8594 55/64
.3819 9.70 8661 22.00
.3839 9.75 .8750 7/8
.3858 9.80 .8858 22.50
.3860 W .8906 57/64
.3898 9.90 .9055 2300
.3906 25/64 .9062 29/32
.3937 10.00 .9219 59/64
.3970 X .9252 23.50
.4040 Y .9375 15/16
.4062 13/32 .9449 24.00
4130 Z .9531 61/64
.4134 10.50 .9646 24.50
.4219 27/64 .9688 31/32
.4331 11.00 .9843 25.00
. ,4375 7/16 .9844 63/64
.4528 11.50 10000 1 2540
.4531 29/64
494

Tap Drill Size. Inch eqU~ic: alternative


drill sizes in the following tables are based on the T~/~~~~rl-~ 33/64 .515 13.00-
<onn,rnv mate fulllhrcftd deplh of72-77% of nominal.
9/16·24 3316<1 .5156 1300
5/8-11 17/32 .5313 13.50
ds UNC/UNf
II 5/B·12 35/64 .54S9
5/8·18 37/64 .5781
5/8·24 37/64 .5781
alternative
11/16-12 39/64 6094
11116·16 5/8 .6250
11/16·24 41(64 .6406
3/4-10 21/32 .6563 16.50
314·12 43/64 .6719 17.00
3/4-16 11/16 .6875 17.50
3/4·20 45/64 .7031 17.50
3/4·28 23/32 .7188
13/16-12 47/64 .7344
13/16·16 314 .7500

.~
7/0-9 49/64
7/8·12 51/64 .7
718·14 13116 .8125
718-16 13/)6 .8125 I
718·20 53/64 .82Bl
15116·12 55/64
1/8·40 #3B Hl15
15/16·16 7/B .8750
#6·32 #36 .1065
15116·20 57/64 .8906
#6-36 #34 1110
1-8 7/8 .8750
#6·40 #33 .1130
1·12 59/64 .9219
5/32-32 1/8 .1250
1·14 15/16 .9375
5/32·36 #30 .1285
61/64 .9531
#8-32 #29 .1360
63/64 .9844
#8·36 .1
.0
#8-40 #28 .1405
3/16·24 #26 .1470
3/16·32
#10-24
#22
#25
,1570
.1495
Straight Pipe Taps NPS
#10·28 .1540
#10.:30
#10-32
#12·24 1/4-18 11.50
#12·28 3/8-18 1500
#12·3:? 470 ~·14 18GO
7/32·24 3/4·14 2375
7/32·32 1· i I Y2 30.25
#14·20
1 1/4·11 Y2 38.50
#14-24
I ~·11 ~ 44.50
I • 0
2·11 ~ 56.00
1/4·28
1/4·32
5116·18 TPI Tap Drill Decimal Size
5/16·20
5/16·24 6.90 27 1/4 .2500
5/16-32 7.10 27 11/32 .3438
3/8·16 8.00
3/8-20 18 7/16 .4375
3/8·24 8.50 18 37/64 .5781
3/8-32
1/, 14 23/32 .7188
7/16·14 9.40
7/16-20 9M 314 14 59/61\ .9219
7/i6·24 10.00
1,0 11·1/2 1·5132 1.1563
7/16-28
'/2-13 1·1/4 11·1/2 15000
%·20 29/64 .4531 '1.50
'·1/2 11·1/2 '·3/4 1.7500
'/2-28 1
9116·12 31/64 .4844 2.0
''''/2 2·7132 2.2188
Appendix 495

Taper Pipe Taps NPT ~¥'t'.' t' H"" 0 (mm)


- Tap Dtil10 TiT) I··· ..
MIO x 1.5 8.50 .3346
MIl x 1.5 9.50 .3740
Tap Size
M12 X US 10.20 .3937
1/1S-27
M14 x 2 12.00 .4724
1/8<:'7 M16x2 14.00 .5512
M18 x 2.5 15.50 .6102
3/8-18 M20 x 2.5 17.50 .6890
Yl.-14 45/64 M22 x 2.5 19.50 .7S77
3/4-14 59/64 M24 x3 21.00 .8268
, -II y. 15/32 M27 x 3 24.00 .'J449
1 1/4-11 Y2 I \/2 38.00 M30 x 3.5 26.50 10433
, 'h-' 1 'h 1 47/64 44.00
2-11 'h 27/32 56.00
2 n-a 25/8 67.00 Metric Fine Threads
3-8 3 1/4 82.50
Nominal 0 x Pitch (mml
Drilled Only Taper Reamed M3 x 035
M3.5 x 0.35
Tap Dec. Tap M4 x 0.5
TPI M4.5 x 0.5 4.00
Drill Size Drill
MS x 0.5 4.50
1/16 27 D M5.5 xO.5 5.00 1969
M6 x 0.75 5.25 .2067
1/8 27 0
M7 X 075 S.25 .2461
1/4 18 7/16 M8 x 1 7.00 .2756
M9xl 8.00 .3150
3/8
Ml0 x 0.75 9.25 .3642
'I, Ml0x 1 9.00 .3543
Ml0 x 1.25 8.75 .3445
MIl xl 10.00 .3937
1-9/64 1.1406 1-1/8 1.12S0 M12 x 1 11.00 .4331
1-1/4 11-1/2 1-31/64 1-15/32 1.4688 M12)( 1.25 10.75 .'1232
M12 x 1.5 10.50 .4134
1-47/64 1.7344 I 1-23/32 1.7188
M13 x 1.5 11.50 .4528
1-1/2 2-13/64 22031 2-3/16 2.1875 M13 x 1.75 11.25
M14 x 1.25 12.75
M14 x 1.5 12.50
Metric Coa Threads M15xL5 13.50
MiS xl 15.00
x Pitch Tap Irnf!1) .ID9.~ . ' M16x 1.5 14.50 .5709
M I x 0.25
- 0.75 .0295 MIl x 1.5 fi,m
M1.2 x 0.25 0.95 .0374 M18 xl .6693
MIAxO.3 1.10 .0433 M18 x 1.5 .6496
ML5 x 0.35 1.15 .0453 M18x2 .6299
ML6 x 0.35 1.25 .0492
ML8 x 035 1.45 .0571
M2xOA 1.60 .0630
M2.2 x 0.45 1.75 .0689 M22x 1 21.00 8268
M2.5 x OA5 2.05 .0807 M22 x 1.5 20.50 .8071
M3 xO.5 2.50 .0984 M22 )(2 20.00 .7874
M3.5 x 0.6 2.90 1142 M24 x 1 2300 .9055
M4 x 0.7 3.30 .1299 M24 x 1.5 2250 .8858
M4.5 xO.75 3.75 .1476 M24 x:2 22 00 8661
MS x 0.8 4.20 J654 x 1.5
M6 x 1 5.00 .1969 M27 x 2
M7 x i 6.00 2362 M28 x2
M8)( 1.25 6.75 .2657 x2
M9 x 1.25 .3051 M30 x 3
496 NOTES

\
Selective block skip 170
Index Slash 163
169
168
\64
223

A Block IDOls 203


loois
Absolute data 70· 73. 3GB, 430 Predslon G76.
Acceleration deceleration. 88 Single pOint
Additional 18 Tool shih
Address lonmlt 43·114 !3oss
Air cutting. 165
41
APC 437·439
part 306
ATe B,95-95
299
C
a9
437-439 CAD/CAM 32·33, 483-4~:
B. 60, 95·96, l49. 155 CAM soflware
98 programming environment
100 iJP.5:kl0[l com [lU!P.f fllogramming 483
99 General features . 489
101 484
97
97 Su pport and training \

97 484
101 \ 477
98 Calculations. 40
99·102 Calculator type 76
98 Canned cycles. 177-190,314·320
102 Cartesian coordinate system 15
28 Center end mill !97
16 Centerline 129
17 Chamfering 299
18 Chamfer dtameter 191
Character 41
Chuck functions 409
?44
235-246
B Ale centel and radius.
Arc cenler vectors
238
238
Arc direction 231
Background edit 465 Arc in planes
Ball nose end mill 273 Arr; programming.
Bar/seder. 170,413 Blend radius.
8-axis. 429-436 Boss millrng _
Bitwise Input 24 Ci rcular moltOn direction
Blend rad III S 301 Elements of a circle
Block. 25,41,61-68 Feedrate for Circular motion
Block format . 63 Full Circle programming
Block numbering 63 Lead·in and lead-out
Block nu mbers incre ment 64 Parrial radius. 240
Block structUIR 61 format
Confllcling words 66 Ouadrants 236
End-Of·Block (£08) 64
block 61-68
block 25
Status block 65
Block skip 21,163-170 liZ3
Barteerier 170 4
Numbered block 170 13
HomOnlal mill in, 439

497
498 Index

Homontal machining center 9 Cycle slart 21,57,170


Lathe accessories 409·415 time 4
Lathe axes II
Machine axes 8
Milling. 7
Six-axIs lathe 13
Three·axis lathe
Turning centers and lathes
12
11
D
Two·axis lathe 12
Types of eNC lathes 11 Datum shift 381-392
9-10, 13 Cutter radius oHset 388
8 Data setting. 386
2,457·464 Lathe offsets 38B
461 Program zero 381
463 T001 length offset 387
457 MOl control mDde 389
464 parameters 389
158 Work offsets 386
459 Decimal point 75
411.462 Defaults 23
458 Delta IOcremenl 250
462 159
5 182
50 Descartes, Rene. 15
30 Diameter programming 73
Distance· To-Go 132,176
Continuous path 39 ONe 468
Equidistant 39 DraWing. 31,34
Control system 31 Charlg~s and revisions. 36
Control panel 20 Dimrsioning methods 34
Defaults 23 SpeCial instructions . 36
Features, 14 Sulfate fin ish. 35
Memory capacity 24 Titre block 34
Optional features 29 Tolerances 35
ConvenilOoal machining 2 dimension input . 30
COJ)ventlOnal 280 operations 194
Conversions Blind hotes 197
HP to kW, 39 Cenler drilling 196
kW (0 HP. 39 Drill pOint 195
Coolant functions 21,58.278 EHectlve drill diameter 195
geometry IS, 17 Fla! bottom drilling 197
Coordinate system rotation 399-404 Indexable drills 198
Counterboring 206 Multilevel drilling 2Q7
205 Nominal dnll diameter. 195
CSS 82, 305 Peck drilling 199,214
Cutter p~th diHp.rmloil!lOrL 38 Reaming 201. 214
Cutler I adius offset. 247-268.271·273 holes 196
radiUS compensation 254 Web drilling . 208
Cutler direction 256 Drip-feeding 24,469
o amount seiling, 263 Dry run. 21, 143
Direction of motion 251 Dummy tool. 95
i;ltl:!lIerenCe ef(oL 259 Dwell command 171-176.179.411
look-Ahead type 257 As TAB alternative 176
Offset cancellation 256 Dwellirl number 01 revolullons . 174
Oilset commands G40·G42 251 Dweltlng axis 176
Practical example 262 Long dwell lime 175
Programming forma! . 253 Minimum dwell 173.207
Programming techniques 250 Safely issues 170
methods. 260 Selting mode 173
Tool nose radius offset 266 Time selection 172
Toolpath center points 248 Used In fixed cycles 176
of offset 250·252 OXF files 33
Cutting mode 90
Cutting tool animatIOn 30
E G
GOO command 50, 143
GOI command 50. 159
64 G02·G03 commands 237
English units 69 G04 command. 171.439
EOB 64 G09 command 88
frrms in progra mm Ing 453 GlO data command.
Calcula lion errors. 456 G12-G13
Hardware errors 456 G15 command,
Input errors 456 G16 command ,
logical erfOrs 455 G17·G 19 commands
Miscellaneous errors . 456 G20 command
Syntax errors 455 G21 command
E-switch . 463 G27 command,
Exact stop check 89 G28 command.
Exact stop check mode 89 G29 command.
Execuiton pnority 68 G3Q command, 151. 58
G32 thread cutting command 348-349.
G40 command 251.256
G41·G42 commands 251. 266
G43 command, 123, 132
F G44 command,
G45-G48 commands
123, 132
19.122
G49 command. 132
Face 122.227-234 G50 command 83, 113.
227 ' G50-G51 commands .
228 [ command, n4,
techniques 230 G53 machine coordlrlates command 3811
compensation 233 G54.1 command 124
pari programming 166 G54·G59 work oHsets 123-130, 383-384
FeedratB control. 87 G61 command
Circular cutting motion 245 G62command 89
Circular motion leedrate 90 G63 command 89
Constant feadra Ie, 90 G54 command 89·90
Eaddress In threading , 92 G88·G69 commands 399
Feed per minute 87 G70 313.320
Feed per revolution 88 G71-G/3 cycles 313.315.317-318
Feedhold 21,25,91 G73 peck cycle 178. 184
Feedrate override , 21.27,92 G74 tapping . left hand 178. 186, 209
Inverse lime feedrate 87 G74·G75 lathe 214,313
Maximum 91 G76 precision boring 178. 189.203
Selection 88 G76 threading 313.350.352.355
Fillet radius 240 G80-G89 commands 178
Fixed 177-1 314-320 Gal 183
Absolute and incremental 180 G82 spot cycle
Basic formal structure 177 GB3 peck dri Iling cycle
Cancellation of a cycle 189 GBIl lapping hand
Cycle 179. B9 G85 boring
Detailed description 183 G86 cycle
Genera I rules 180 G87 cycle
Initial level selection 181 G88 boring cycle 18S
LO parameter 190 G89 boring 88
Plane selection . 274 G90 absolute position command , 71-72, 152·1 160.385,388
Programming format 179 G90 lathe cycle 308
R-Ievel selection , 181-182 G91 incremental motion command 71-72,152·1 lBO, 381
Selection 178 G92 posillon register command. 113,1 381,383
Shirt amount 179 G92 cycle 3Ll9-350. 363
calclJlations 182 G94 command , 88
Format notation , 43 312
Milling syslem format 43 88
Turning formal. 44 G97 corTm~ilnd 84
G9a-Gg9 commands 181,207
500 Index

G-codes
line, 13>1
47-52 K
C<lnflicting commands . 50
Group l1um bers 51
21
Milling applications 47
Modal commands , 50
Turning applications 49
Types of Gcodes _ 52
in a block
With decimal pOint.
50
52 L
Gear ranges. 2L 50,298
,. 472 179. 190
Geometry ofiset 104,128.157,254
307-322
Graphic display . 29 320
Grooving and part-off 323-334 312
Corner groove 332 313
Grooving ~nOlicallOIJS 323 P and 0 blocks 314,316·321
Grooving dimensions . 324 318
• Yt"--''''o cycle
Multiple grooves, 330 307
Pan-off , 335-338 314
Precision gro<lve . 326 308
groove 325 Lathe 294
Master tool setup 129
oHsels 295
Offset change 295

H Off set enlly ,


Offsets and tool motion
Lathe plOgram formal
294. 298
295
306
Least increment _ 73
Handle 21-22 Linear Interpolation 159. 161, 271
Helical !'HIlling 417·428 161
feedrate .
Helicalll1terpolation 417 Multiaxis molion 160
Helix 419 Programming format 160
Ramping 427 159
axis motion
Thread 418 Start and end or motion 159
Thread 421 live 5
Hockey std molion . 146,151 Local coordlnale system 224. 383
Home posi!iOr'l 108.149·158
Horizontal machining eerners 127,429-440

M
I MOO function 56
MUI function 57
IGES files 33 M02 program end function 58
incremental data mput 70, 72. 43[) !vi03 IuncI ion 59, 79
Indexing axis , 1\30·431,434 M04 function 59, 79
lable 429-436 M05 funClion 59, 80
Iniliallevel seleclio n 181 60, 95
M06 function
In-process 3U M07 function 58
or
Input dimenSions 69-76.429 MDS function 58
tnput format 73 M09 function 58
Zero suppression 74 409
M10·Mll functions.
Inscribed circle 474 M12-M13 functions. 411
Interfacing \0 devices 465-470 410
M15·M16 funclions.
Connecting cables 470 Mi7·MIB (unctiolls. . 412
Data selling , 469 M19 functIOn 60,80,102
ONe 468 M2i -M22lunctions. . 4\ I
Punched tape . 466 M23·M24 thread functions 60. 357
RS-2J2C interface 465.467,469 M30 program end func!lon 58
ll! communication, 46:3 M~ t -M44 lunciions. 298
Intermediate pOint 151 92
M48-M49 functions
Inverse time feedrate_ 87
Index 501

M60 lunction
M7I-M72 function
M73-M74 functions,
M8B-MB9 functions, 15
M9B·M99 subprogram 60, 375,4B2
Machlnabilily 37.81
Machine accessor ies. 55
MachlnB coordinate system. 384
Machine geometry 17
Machrne tock 28
Machine warm-up 175
Machine lero 108 Modal commands
Absolute and incremental mode 152 M·S·T lock .
Intermediate point 151 Multilevel drilling
MAchine zero return 149·158 Multiple cycles
machine lero. 151
commands 151
RSIlJrn /iom maCilllitl Lew . 157
158
156
149·158.434
N
2
30 Numencal control 1-6
191·216 Advantages 2
194 Definition
205 Hardwired controls .
212 Soflwired controls
199,214
201.214
202
209
191,193
208
0
37
28 OHsets 298.315
26,389 panel. 20
32-33 Optional 21,57
36 Orthograph1c oriefliatlClfl. 399
310 Overtravel 108, 122. 150
477
472
471
5%0
53,58
54
P
56
54 PaUet changer 437
related 53,56 PaUet types US
applications 54 Pnrame!ers. 22.
MDI 21,26.389 Parsons, John
24 Part catcher or unloador . .1;d
66,45:2 Pan
36 Pari reference pOln!.
Metne units 69 Part setup
Milling - G·codes. 47 Setup sheet
M-codes 54 P8rt -off
operations Parts counter
Direction o( cui 279 Pattern of holBS
End mills 275-277
Peripheral milling _ 275-280 222
Slots and 281-292 223
and teeds 277 220
Siock removal 279 220
Width and of cut 2BO Random hole paltern _ 217
Minimum axis increment _ 73 row hoi" pattern 2\8
2 Index

Typical 217 Lathes 112


Peck drilling 199,214 Machining centers 110
Percent sign , 42, 58 Selection methods 109
Bl Programming formats 42
PI constanl 473 Format flotation 113
Planes. 269·274 Word address formal 42
Absence of aXIs data , 2n 33
Circuiar In planes, 271 Programming terms 41
Culler radius offset 273 PuU·OU! 415
Definition 16,269 Punched tape 466
Fixed cycles , 274 Py1hagorean Theorem 161,480
Machining in planes 269·270
Mathemallcal planes, 269
Selection of planes 226,269·274
Pocket 281·292
Circular pockel cycles, 292 Q
Circular 289
Rectallyul(Jr 285
POint of origin 16 Quadrants . 16,238
177 in eNC programming 40
Polar coordinate system, 225
Position 119·122
Incremental mode 120
Motion length calculation 120

Z-axIs
commands 119
\22
R
Position commands 113-118
Definition 113 Radius programming 2~O
Lathes . 115 Rapid positioning 143·1118,271,294
113 Approach 10 Ihe part 148
113 Hockey std motion . 146,151
115 Motion formulas 147
Post 33. 488 Reduction of rapid rate, 26, 147
Power rating 39 1001 path mOlion . 144
PreparatOlY curt!llramJs 47·52 Real number sV8tem . 15
Pr ocess sheet 36 Reaming 214
Program 42 Recess programming 304
Program changes, Li60 Rectangular coordinate system 15
Program comments 66 Reference 107·112. 471-479, 481·482
end , 58 Fixed 108
Program header 45 Flexible point. 108
Progl8iT1 length reduction 4115 Machine lero 107·111.149- 471·479.481-482
Program structure 46 MachIne zero (home) , 108
Program documents 447-452 Part reference point 109
Documentation !lle folder 451 Reference point groups 107
(J program 448 Tool reference point . 112
Setup sheet 449 commands. 113·118
sheet 449 Return to machine zero . 109
Program ideMificatlon 62 Rigid 209,212
Program name 62 R-Ievel selection 181-182
number 62 Roughing and finishing 307
planning 31·40 RS·232C interlace . 30,465,468
Program stop 56
Program verification. 453·456
Avoidance of elfors 454
Detection of errors 453
Graphic method
errors
454
455
S
Thread 360
Program Writing 441-445 Safe block . 65
Confusing characters . 442 Safety in eNC work 6
Long programs 445 function 405-408
formatting 443 G50·G51 commands 405
forms ~42 center 406
Program zero 16.109,273 factor 406
Index 503

Screen display 21 159


block 61·68 38
retum. 28 418
SrnlNGS screen 170 421
Setup sheet 449-450 SImulation method 426
Similar 1\78 !hrEiad
block. 25
Slash symbol 163
Slot dlill 197
Slots and pockets 281-292
Speeds and feeds. 277, 344-345
Spherical end mill . 273 Hand of lh(ead
Spindle coolrcl na6 Infeed methods
Constant surface 82 Lead error
Empty spindle 101 Maximum feedrate
Maximum setting. B4 Muitislarl threads
77 PilCh vs. lead
305 testing
Spindle 81.277 Retracl from thread
Starlup 79 Single poi(Jt ,,,<,,,,,11;,,,,
Spindle JUrlChons 21.59.77 and feeds 344-345.
orientation 21.60.80.203 thread 361
formulos 82 Terminology ,
version 37 Thread forms 350
Mellie verSion. 37 Thlead reculling .
Spindle override 21, 27 Threading process
Spindle 80 Tbreading to a shoulder
207 Tooling relerence ,
65 Tool junction
202.303
307 Lathes
30 Machining cenlers.
367-380 Tool indexing - lathes
379 Toollenglh offset . 126,131 \42,
373 Cancellation.
334 or offset 1
3BB Datum Shirl . 387
368 Distance-To-Go calculation 133
377 G43-G44 difrerence . 136
371 Horizontal application, 141,432
373 Offset commands 132
369 Used with G54·59 139
368.370 Used with G92
58. 368 Tool setup
434 Off·machine.
Symbols in 45 Offset
On-machine
Preset tool
Using master tool
Tool
T Tool memory type
Fixed type
Random
Tarlslock Functions
programmirg

Check IISI 212


Pipe taps 211
Speeds and feeds 210
cnamfer geometry 210
Tap flute geometry 210
lap geometry 21U
Tapping mode. 88
on lathes. 215
504 _~~_· _ _ _ _ d

Center Ime 116 Web drilling 208


External tooling 117 Word address formal. 42
lnlemal tooling 117 addresses 45
Tooling selectlon_ 38 Order of words In block_ 51
Tooling sheet 449-450 Word 41
Trial cut 168 Work area 31
table, 481 Work coordinate system 123-130
Tligonometay 477-481 Work offsets 123·130, 386
• G-codes 49 Additional wOlk oHsels 24,387
Tuming M-codes 54 Cammon offset 128
Tumlng and boring 293-306 Datum shi/1 , 387
Turning tools 130.293 124, -386
Turret 412 128,387
i 23-130, 386
application 127,431
12B
Startup 1
U Wt'lrk ar~as available .
Work offset change
23
125
Z-axis application 126
Uffl commands 160 Walk sketch 40
Undercut plOgramming 304

W Z
Z-axis fleglaci 28
\IV-axis, 10
Wear olisel 105, )29, 254
Adjuslmem 106
NOTES
505
506 NOTES
NOTES
508 NOTES
Praise For The First
by Peter Smid fills the void for the intelligent reader who
1be simplistic concepts regurgitated in so many other books. " -

close to 20 books on CNC programming and oan honestly say that this is the
bas covered both basic and advanced programming techniques for both mills and
- Houston, Texas,

superb book, very well written, easy to understand, and should be on the desk of every
CNC Programmer and Production Engineer." - Nottingham, England

Extraordinarily comprehensive, this popular and authoritative reference covers just about every
possible subject a typical CNC programmer may encounter on a daily basis. Fully indexed to
help the user quickly locate topics of interest, this "industrial strength" handbook presents most
common programming subjects in great depth and is equally applicable to both CNC milling
and CNC turning operations. Many advanced subjects are also covered, thus making this an
unusually comprehensive reference for machinists, programmers, engineers, and supervisors.
Filled with over one thousand illustrations, tables, fonnulas, tips, shortcuts, and practical
examples, this widely respected publication is structured in a logical order that is readily adapt-
able to virtually all levels of CNC training, from the basic to the advanced.

CNC Programming Handbook has just become more valuable than ever! A new
CD-ROM, packed with actual problem-solving projects and enhancing the
material presented in the book, is included for the first time. Users will find pro-
gramming projects and exercises for most chapters, special programming and
machining pr9jects, solutions to problems, and numerous reference files useful in
CNC programming, as well as several utilities. With the majority of files in Adobe PDF, instruc-
tors will be able to quickly and easily print and distribute any of the projects, exercises, and
references to their classes. Meanwhile, students and professionals will find this CD an effective
self-study aid that allows them to enhance their understanding of the . at a time.

You might also like