CNC Programming H ndbook Second Edition
c C Programming Handbook Second Edition A Camp
hensiv
t r
989
uid
Practical CNC
rogramming
mi
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
Copyright
2003.
Americas,
w York, NY 10018
in the United States
This book or parts thereof may not
America.
reproduced, stored in a retrieval
system. or transmitted in any form without tbe permission of
5678910
publishers.
Dedication To my who
my mother never to give
dmila,
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 offered 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 practiexperience, in the industrial and ed his career, he has on all levels. He an extensive experience with CNC and CAD/CAM to manufacturing industry and educational ns on practical use of ComNumerical Control technology, part programm CAD/CAM, advanced machining, tooling, setup, and many other related comprehensive industrial background in CNC programming, machining and company training has assisted hundred companies to benefit from his wide-rang knowledge. ro.-.'7iOl"'I
companies and CNC maMr. long time association with advanced of Community and Technical Colchinery vendors, as well as his affiliation with anum industrial technology programs and skills training, have enabled him to broaden his professional and consulting areas of CNC and CAD/CAM training computer applications and evaluation, system benchmarking. programming, hardware and operations management. l
Over the years Mr. Smid has tional programs to thousands of across United States, Canada and companies and private sector l
hundreds of customized at colleges and universities as well as to a large number of manufacturing individuals. .rliOTtTc.'
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 of CNC and CAD/CAM. During his and many in-house publications on 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 You can e-mail him through the publisher of this handbook You can also e-mail him from the
CNC Programming Handbook
and industria! users. of the CD. at www-industriaipress.com
TABLE OF CONTENTS 1
~
NUMERICAL CONTROL
1
DEFINITION OF NUMERICAL CONTROL NC and CNC Technology. CONVENTIONAL AND CNC MACHINING
2
NUMERICAL CONTROL ADVANTAGES
2
Setup Time Reduction Lead Time Reduction. Accuracy and RepealabiliJy Contouring of Complex Shapes. Simplified Tooling and Work Holding. Cutting Time and Productivity Increase.
3
TYPES OF CNC MACHINE TOOLS Mills and Machining Centers. Lathes and Turning Centers
Axes and Planes Point of Origirl Ouadrarlts. Right Hand Coordinate System MACHINE GEOMETRY. Axis Orientation - Milling . Axis Onenlation - Turning. Additlona! Axes.
16 16 16 17
17 17 18
18
3
3 3 3 4
4 4 5
5 - CONTROL SYSTEM GENERAL DESCRIPTION Operation Panel Screen Display and Keyboard Handle.
19 20 20 21 22
PERSONNEL FOR CNC
5
SYSTEM FEATURES
22
CNC Programmer CNC Machine Operator
5
Parameter Settings System Defaults Memory Capacity.
22 23 24
SAFETY RELATED TO CNC WORK.
6
6
MANUAL PROGRAM INTERRUPTION.
2
~
CNC MILLING
7
Single Block Operation. Feedhold Emergency Stop
25
25 25 25
CNC MACHINES - MILLING.
7
MANUAL DATA INPUT - MDI
26
Types of Milling Machines . Machine Axes Vertical Machining Centers. Horizontal Machi ning Centers HOrIZontal Boring Mill Typical Specifications
7
PROGRAM DATA OVERRIDE
26
3 - CNC TURNING CNC MACHINES - TURNING
8 8 9 10 10
11 11 11
Types of CNC Lathes. Number of Axes
11
AXES DESIGNATION
11
Two-aXIs Lathe . Three-axis Lathe Four-axis Lathe. Six-axis Lathe FEATURES AND SPECIFICATIONS Typical Machine Specifications. Control Features
4 - COORDINATE GEOMETRY
12 12
13
13
Rapid Motion Override. Spindle Speed Override Feedrale Override. Dry Run Operation Z Axis Neglect . Manual Absolute Setting Sequence Return Auxiliary Functions Lock Machine Lock Practical Applications SYSTEM OPTIONS. G raphlD Display. In-Process Gauging . Stored Stroke Limits. Drawing Dimensions Input Machining Cycles. Cutting Tool Animation. Connection \0 External DeVices
26 27 27
27 28
28 28 28 28
29 29 29
30 30 30
30 30 30
13 13 14
15
REAL NUMBER SYSTEM
15
RECTANGULAR COORDINATE SYSTEM.
15
6 - PROGRAM PLANNING
31
STEPS IN PROGRAM PLANNING
31
INITIAL INFORMATION
31
MACHINE TOOLS FEATURES.
31
Machine Type and Size.
31
ix
X -
---------~-.-.
Control System.
31
PART COMPLEXITY
32
MANUAL PROGRAMMING
32 32 32
Disadvantages . Advantages
CAD/CAM AND CNC Integ ration Future of Manual Programming
32 33 33
TYPICAL PROGRAMMING PROCEDURE
33
PART DRAWING
34
Title Block. Dimension ing Tolerances. Surface Fintsh Drawing ReVisions Special InSHucllons
METHODS SHEET. MATERIAL SPECIFICATIONS Malerial Unlformit)' Machinability Rating.
34 34 35
35 36 36
--------_.-...
Table of Contents ---
8 - PREPARATORY COMMANDS DESCRIPTION AND PURPOSE. APPLICATIONS FOR MILLING. APPLICATIONS FOR TURNING G CODES IN A PROGRAM BLOCK Modality of G-commands. Conflicting Commands in a Block Word Order in a Block
GROUPING OF COMMANDS Group Numbers
G CODE TYPES. G Codes and Decimal POln! _
36 36
9 - MISCELLANEOUS FUNCTIONS
36
DESCRIPTION AND PURPOSE.
37
Machine Related Functions . Program Related Functions
-
--
47 47 47 49 50 50
50 51
51 51
52
52 53 53 53 53
MACHINING SEOUENCE
37
TOOLING SELECTION
38
TYPICAL APPLICATIONS
54
38 38
Applications for Milling Applications for Turning Special MOl Functions. Application Groups
54 54 54
PART SETUP Setup Sheet
TECHNOLOGICAL DECISIONS Cutter Path Machine Power Rating. Coolants and Lubricants
WORK SKETCH AND CALCULATIONS Identification Methods.
QUALITY IN CNC PROGRAMMING
7
~
PART PROGRAM STRUCTURE
BASIC PROGRAMMING TERMS O-lsr3cter l/-Jcr0
38 38
WORD ADDRESS FORMAT FORMAT NOTATION System Formal System Format· Word Addresses'
SYMBOLS IN PROGRAMMING
StarlU p of M Functions. Duration of M Functions
56 .sf)
40
PROGRAM FUNCTIONS
56
40
40
41 41 41
41
42 42 43 43 43 44 45
45
and ivli nus Sign.
45
PROGRAM HEADER
45 46
TYPICAL PROGRAM STRUCTURE.
55
39 39
41 42 PROGRAMMING FORMATS
M FUNCTIONS IN A BLOCK
54
Program Stop Oplional Program Stop. Program End. Subprogram End
!'iR
MACHINE FUNCTIONS
58
Cooiant Functions Spindle Functions. Gear Range Selection Mil r. hi n e Ac:r.ess ori flS
58 59 60
10 - SEQUENCE BLOCK BLOCK STRUCTURE 8u ildlng the Block Structure Block Structure for Milling
PROGRAM IDENTIFICATION Program Number ProgrClm Nome.
SEQUENCE NUMBERS Sequence Number Command. Sequence Block Format Numbering Increment Long Program:> Dnd Block Numbers.
END OF BLOCK CHARACTER. STARTUP BLOCK OR SAfE BLOCK
56
57 58
flO
61 61 61 61
62 62
62
63 63 63
64 64
64 65
xi PROGRAM COMMENTS CON
MING VALUES
66 67
ITY.
68
NG WORDS IN A BLOCK
11 - INPUT OF DIMENSIONS AND METRIC UNITS Unit Values
AND INCREMENTAL MODES Commands G90 and G9l . Absolute Oats G90 - G91 Combinations in a Block
PROGRAMMING
69
Exact Command Mode Command Exact Automatic Corner Override Mode
Mode Circular Morion Feedrates
MAXIMUM
90 90 90 91
Maximum Feedrate Considerations,
69 70
89 89 89 89
91
AND OVERRIDE Feedhold SWitch Feedrate Override Switch Feedrate Override Functions
70
91 91
71 72 72 72
E
73
14 - TOOL FUNCTION
93
73
T FUNCTION FOR MACHINING
74 74 75 76 76
Tool Storage Magazine Fixed Tool Selection, Random Memory Tool Selection Regist8T1flg Tool Numbers Programming Format Empw Tool or Dummy Tool
93 93 94 94 94 95 95
IN THREADING
92
92
MINIMUM MOTION INCREMENT. DIMENSIONAL INPUT
FuJI Address Forma! , Zero Decimal Point Programming, Input
CALCULATOR TYPE INPUT
TOOL CHANGE FUNCTION - M06 .
12 • SPINDLE CONTROL SPINDLE FUNCTION
77
Spindle Speed Input,
77
DIRECTION OF SPINDLE ROTATION Direction for Milling Direction for Turning. Direction Specilication , Spindle Startup
77 78 78 79 79
ORIENTATION
80 80
SPEED - R/MIN
81
SPINDLE STOP.
81 Material Spindle Speed Units Spindle Speed - Metric Units
CONSTANT SURFACE Maximum Spindle SpAAri Part Diameter Calculation in
13 - FEEDRATE CONTROL
81 82
82 82 84 85
87
FEEDRATE FUNCTION.
87 87
Feedrate per Minute, Feedrate per Revolution
87 88
FEEDRATE SELECTION
88
ACCELERATION
88
FEEDRATE CONTROL
<
95
Conditions for Tool
95
AUTOMATIC TOOL
96
ATC System MaXimum Tool Diameter Maximum Tool Length MaXimum Tool Weight. ATC Cycle, MDIOperatlon
PROGRAMMING THE Single Tool Work Programming Several Tools. Keeping Track of Tools, Any Tool in Spindle - Not the First. First Tool in the No Tool in the First Tool In the Spindle with Manual No Tool In the Spindle With Manual First Tool In the Spindle and an Oversize Tool No Tool in the Ie and an Oversize Tool
96 97 97
97 98 98
98 98 99
99
99 100 101
101 102
102
102
T FUNCTION FOR
103
Lathe Too! Station Tool
103 103
104
TOOL Offset.
104
WAil( Off<:;At
105
Wear Offset
106
The Rand T
106
15 - REFERENCE POINTS POINT G
107
xii
Center Line Tools
POINT Zero,
129
108
Relatlonshi p.
.
109
POINT
109
Tools Tools Command Point and Tool Work Offset
129 130
130
130
109
110
Centers.
112
TOOL
POINT
19 ~ TOOL LENGTH OFFSET
112 PRINCIPLES
MMANDS
16 - RE
131 131 131
113
132
Face.
COMMAND
POSITION REG
3 13 114
114 114 114 115 115
Tool Set at Machine Zero Tool Set Away from Machine Zero. Position in Z )\xis .
LATHE APPLICATION.
OFFSET COMMANDS
113
Position Definition Proqrammlnq Format Tool Position
MACHINING
115 116 116 116
Tool Setup . Three-Tool Setup Groups Center line Tools Setup. External Tools Setup Internal Tool Setup. Corner Tip Detail . Programmtr'\g Example
117 117
117 117
Distance-Ta-Go in Z AXIs.
DESCRIPTION.
119
132 132
SETUP On-Machine Tool Length Selting Off·Machlne Tool Setting Tool Offset Value Register.
Z AXIS Tool Tool length Touch Off a Master Tool
134
"135
135 136
136
Drfference
137
PROGRAMMING Tool Offset not Available. Tool Length Offse1 and G92 Tool
133
134 1
Pres~t
Offset and G54·G59
HORIZONTAL
137 138 138
Tools
139
OFFSET.
140
APPLICATION.
141 141
Tool Length Offset and
CHANGING TOOL
17 - POSITION COMPENSATION
131
TOOL LENGTH
119 119 119
Programming Commands Programming Formar Incremental Mode Motion Length Calculation. Position Compensation Along the Z axis G47 and G4B. Face Milling.
18 WORK OFFSETS d
WORK AREAS AVAILABLE Additional Work Offsets
120
RAPID TRAVERSE MOTION GOO Command
143
122 122
RAPID MOTION TOOL
144
1 123 124
Work Offset Change
Z Axis Application
126
HORIZONTAL MACHINE APPLICATION. OFFSETS.
127
Single Axis MOllon . Multiaxis Motion. Angular Motion. Reverse Rapid Motion
TYPE OF MOTION & OF RAPID MOTION MOTION FORMULAS, TOTHE PART
21 - MACHINE ZERO RETURN
128 1
of Offsets. Offset Offset and Offset Numbers
143
120 122
24 125
WORK OFFSET DEFAULT AND
20 - RAPID POSITIONING
128
128 129
129
143 144
144 146 146
146 147
147 148
149
MACHINE REFERENCE POSITION Machining Centers. lathes. the Machine Axes Program Commands Command Group
149 150
150 151
151
xiii RETURN
PRIMARY MACHINE
Intermediate Point . Absolute and Incremental Mode Return from the Z Depth Position Return Required for the ATe, Zero Return for CNC Lathes
151
POSITION CHECK COMMAND.
156
FROM MACHINE
157
RO POINT.
SECONDARY MACHI
Machine X AXIS is the and Dwell,
153
155 155
175 175
LONG
151 152
FIXED
Axis,
AND DWELL.
CYCLES
LIN
COMMAND
Starr and End of the Linear Motion Single Axis Linear Interpolation . Two Axes Linear Interpolation Three Axis Linear Interpolation
POINT-TO-POINT MACHINING
159
160 160
LINEAR FEEDRATE
161
~
BLOCK SKIP FUNCTION
1
CONTROL UNIT SETTING
163 164 1
Variable Stock Removal Machining Pattern Trial Cut for Program Proving, Barfeeder Application, Numbe(ed Block Skip,
165 166
68 69 170 170
24 - DWELL COMMAND
171
PROGRAMMING APPLICATIONS
171
for for Accessories
DWELL COMMAND Dwell Command Structure,
171 172
172
DWELL SETTING
171 171
AND DWELL
Time Number of Revolutions Setting
173 173 173
SELECTION
178
FORMAT
179 180
R
181
LECTION .
Z
CALCULATIONS PTION OF FIXED CYCLES G81 G82 G83 G73 G84 G74 G85 G86 G87 G8S G89 G76
F
Drilling Cycle, Spot-Drilling Cycle, Hole Drilling Cycle Standard Hole Drilling Cycle - Standard - Tapping Cycle - Reverse Cycle, Cycle, Backboring Cycle , - Boring Cycle , Boring Cycle, P(€cision Bonng
CYCLE CANCELLATION
FIXED CYCLE REPETITION The L or K Address. LO or KO in a Cycle ,
26 - MACHI
REVOLUTIONS
174 174 174
182
183 183 183 184 184 186 186 187 187 187 188 188 189
189 189 190 190
HOLES
SINGLE HOLE EVALUATION. Tooll ng Selection and Applications, Program Data ,
DRILLING 0 Types of Drilling Types of Drills Progiamming ConsIderatIons, Nominal Drill Diameter Effective Drill D,ameter Drill Pomt Center Through Hole Blind Hole Flat BoHom
173
MINIMUM
178
181
163
BLOCK SKIP SYMBOL
Fixed Cycles,
177
INITIAL LEVEL SELECTION
162
163
VS,
AND
161 161
TYPICAL APPLICATIONS,
SKIP AND MODAL COMMANDS
177
180
159 159
160
PROGRAMMING EXAMPLE
FIXED
159
PROGRAMMING FORMAT Feedrate Range Individual Axis Feedrate ,
176
158 Tool Motions
- LINEAR INTERPOLATION
176 176
191 191
19i 194
194 194 194 195 195
195 195 196 196
197 197 198
PECK DRILLING Typical Peck Calculating the Number of Pecks
199 199 199
xiv Selecting the Number of Pecks _ Controlling Breakth rough Depth.
REAMING Reamer Design Sprndle Speeds for Reaming Feeorates for Reamir\~ Stock Allowance Other Reaming ConSiderations
Table of Contents 200 200
201
CUTTER SELECTION .
227
201
Basic Selection Criteria Face Mill Diameter _ Insert Geometry .
227 227
201
202
202
202
Single Point Boring Tool Spindle Orientation_ Block Tools
202 203 203
Precision Bormg Cycle G76 Backboring Cycle G87, Programming Example Precau1ions in Prog ramming and Sew p_
ENLARGING HOLES Counters inking Counterborlng , Spotfacing
MULTILEVEL DRILLING WEB DRILLING TAPPING Tap Geometry Tapping Speed and Feedra1e . Pipe Taps. Tapping Check List.
HOLE OPERATIONS ON A LATHE Tool Approach Motion Tool Return Motion, alld Reaming on Lathes, Cycle - G74, Tapp!ng on Lathes Other Operations
203 203 204 205
205 205 206 207
CUTTING CONSIDERATIONS Angle of Entry Milling Mode N uJrloer of Cuttiny IIlSl:;rls
PROGRAMMING TECHNIQUES Single Face Mill Cut Multiple Face Mill CU1S
USING POSITION COMPENSATION.
29
~
CIRCULAR INTERPOLATION
ELEMENTS OF A CIRCLE, Radius and Diameter , Circle Area and Circumference
BOLT HOLE CIRCLE PATTERN Bolt Circle Formula _ Pattern Orientation ,
POLAR COORDINATE SYSTEM Plane Seleclion Order of Machining,
233
235 235 235 236
237 237 238
212 213 213 214
214 215
216
217
218 218
ARC HOLE PATTERN.
232
Arc Cutting Direction Ci reular Interpolation Block. Arc Start and End POlntS_ Arc Center and Hadius Arc Center Vectors, Arc Planes
2 1 2'12
ANGULAR ROW HOLE PATTERN
Ang ular Grid Pattern
231
237
218
GRID PATTERN
230
PROGRAMMING FORMAT
STRAIGHT ROW HOLE PATTERN
CORNER PATTERN
229 229 230
210 210
RANDOM HOLE PATTERN
Pattern Defined by Coordinates, Patlern Defined by Angle
228
QUADRANTS.
217 217
TYPICAL HOLE PATTERNS
228
207 208 209
Quadrant Points
RADIUS PROGRAMMING Blend Radius Partial Radius
FULL CIRCLE PROGRAMMING
27 - PATTERN OF HOLES
227
201
SINGLE POINT BORING
BORING WITH A TOOL SHIFT
28 - FACE MILLING
80ss Milling Internal Ci rcle Cutting - Linear Start Internal Circle Cutting - Circular Start , Circle Cutting Cycle
ARC PROGRAMMING. FEEDRATE FOR CIRCULAR MOTION Feedrate for Outside Arcs Feedrate for InSide Arcs.
236 236
238
238 239
240 240 240
240 242 243 243 244
245 245 246 246
L1~
220 220 221
222 223 224 224
225 226 226
30 - CUTTER RADIUS OFFSET MANUAL CALCULATIONS Tool Path Center Points Cutter RadiUs Center Points CAlculation
COMPENSATED CUTTER PATH. Types of Cutter Radius Offset. Definition and Applications.
PROGRAMMING TECHNIQUES Direction of Cutting Motion
247 247 248 249 249
250 250 250
250 251
xv
Table of Co ntents 251
or Right - not CW or CCW =,f(set Commands of the Cutler of Offset Types Format r\ddr8ss H or D 7, and Wear Oifsets
APPLYING CUTIER
251
252 252
253 253 L5Ll
OFFSET
254 254
Methods, Cffset Cancellation, ::::utter Direction
256 256 WORKS
~:lok-Ahead
Offset for Look-Ahead Cutter Radius Offset
256 257 257
276
Steel End Mills Solid Carbide End Mills Indexable Insen End Mills Relief Ailgles End Mill Size Number of Flutes
276
276 276 276 277
277
SPEEDS
278 278
Coolants and Lubricants, Tool Chatter
279
STOCK
279 279 279 280
Infeed . In and OUI Ramping Direction of Cut Width and of CUI
258
259
LOO RULES
261
. MILLING
262
:JVERVIEW OF PRACTICAL EXAM
Part Tolerances \,leasu red Part Size, Offsets Amount General Selting,
Data
TOOL NOSE
Slot Example. Closed Slot Example
2GO 265
General Principles Pocket
US OFFSET
266
Offset
266 266 266 267 267
268 268
31 - PLANE SELECTION WHAT
A
MACHINING IN PLANES Mathematical Planes Machine Planes, Program Commands for Planes Definition, Default Control Status
STRAIG
MOTION IN
269 269 269 269 270 270 271
271
CIRCULAR INTERPOLATION IN G 17-G 18-G 19 as Modal Commands Absence of Axis Data in a Block, Cutter Radiu:J Otr~et in Planes
PRACTICAL EXAMPLE FI
D
32 -
RAMMING SLOTS 281
283
MILLING.
284 285
RECTANGULAR
285
Stock Amount, ",,,,,'nm!,,,r Amount of Cut _ Semifinishing Motions Tool Path ular Pocket Program Example
272
272 273 273
Minimum Cutter Diameter _ Method of Linear Linear and Circular Approach, ng a Circular Pocket,
CIRCULAR POCKET
286 287
287 287 288
- TURNING AN
BORING
FUNCTION - TURNING
T Address Offset Entry Independent Tool Offset. Tool Offset With Motion. Offset
Shoulder Tolerances Diameter and Shoulder Tolerances,
OFFSET SETTING,
289 289
289 290 291
292
MULTIPLE
275
286
CIRCULAR POCKETS,
LATHE OFFSETS
IN PLANES
PHERAL MILLIN
281 28
Closed Boundary,
263 263 264 264 265 266
281
OPEN AND
262 ?fi2
Nominal or Middle)
Nose Offset Command!::
33 - SLOTS AND PO KETS
293 293 293
294 294
294 295 295 295
296 296 297 297 298
XVI
of
FUNCTIONS
RANGES
298
AUTOMATIC 299 301 301
301
302 Fillish Stock and Stock Allowance
A
IN CSS MODE FORMAT.
302 303 303
G70 Cycle Format - All Controls,
1
G74 - PECK DRILLING CYCLE
1
G74 Cycle Format· lOT111T/15T G74 Cycle Formal- OT/lOT/18T/20T/21
BASIC RULES FOR G74 AND
322
306
GROOVING OPERATIO Main Grooving AP~)IICEmOflS Grooving Crltena ,
REMOVAL ON LATHES
307
GROOVE LOCATION
324
307
GROOVE
324
- STRAIGHT CUTTING CYCLE
308
Format Turning Example Cutting ht and Taper Cutting Example
308 309 309 311
312 312
MULTIPLE REPETITIVE CYCLES.
and Part Contour. Ch,pbreaking Cycles
TYPE I AND TYPE II CYCLES. Programming Type I and Type II
G71 . STOCK REMOVAL IN TURNI G7 Format- OT/llTI15T G71 Format - OT/16T/18T/20T/21T
314 314
315 315 315
315
Groove Width Selection Method
327
327 328
Groove Tolerances Groove Surface Finish,
329 330
Radial Clearance
33 331
/ NECK GROOVES GROOVING CYCLES. Applications , Groove with G75 . Multiple Grooves with G75.
332 332 333 333
GROOVES GROOVES AND SUBPROGRAMS
316
316
317
G72 - STOCK REMOVAL IN FACING. G72 Cycle Format - 10TI1
317
G72 Cycle Format - OT/16TI18T/20T/21
318
G70· CONTOUR FINISHING
326
330
313 313 313
Direction of
G73 Cycle Form<:lt - 10T/1 H/15T G73 Cycle Format· OT/16T/18T/20T/21T G73 Example ot Panern
325
325 325
313
316 317
G73 - PATTERN REPEATING
Groove Position Groove
330
G71 for External Roughing. G71 for Internal G7 .
324
313
CONTOUR CUTTING CYCLES Boundary Definition Stan Point and tile Points P and 0 .
323 323
324
307
Format
323
Nominal Insert S]ze. Insert Mool fit;i1tion
307
. FACE CUTTING CYCLE.
323
323
GROOVE
307
321
322 322
36 - GROOVING ON LATH
306
32
G75 • GROOVE CUTTING G75 Cycle Formal 10T/l1T/15T G75 Cycle Format· aT /16T/18T/20T/21T
304 305 306 306
320
BASIC RULES FOR G70-G73
317
8 .il R 319
9
- PART-OFF PART-OFF PROCEDURE Parting Tool Description. Tool Approach Motion Stock Allowance. Tool Return IVlotion . Part-off with a Chamfer Preventing Damage to the Part
38 - SINGLE POINT THREADING
335 335
336 337
337 337 338
339
xvii
Table TH
339
ON CNC LATHES
339
Form of a Thread. Operations.
340
TERMINOLOGY OF THREADING PROCESS
341
in Thread Starl Position Thread Diameter and Thread Cutting Motion Retract from Thread i1eturn to Stzlrt Position
341
342 342 343 344 344
THREADING FEED AND SPINDLE
344 345 345
Feedra1e Selection. Ie Speed Selection. Maximum Threading Feedrate Lead Error
348
BLOCK-BY-BLOCK THREADING
348 349 350
THREADING MULTIPLE REPETITIVE G76 Format- lOT/11T/15T G76 Format· OT/16T/18T . Programming Example First Thread Calculation
350 351 351
352
SUBPROGRAMS
Subprogram Benefits . ItJtJll\iflci;ltiull (.)f
367
n::;
368
SUBPROGRAM FUNCTIONS.
368 368 369
ram Call Function . Subprogram End FunClion. . Block Number to Return to. . Number of ram Repetitions LO Call.
369
370
1 372
373 SU
DEVELOPMENT.
373
Pattern Recognition Tool Motion and Subprograms . Modal Values and Subprograms.
MULTI
374
375
NESTING
376 376
One Level Nesting Two Level Three Level Four Level Nesting .
377 377 377
353
THREAD INFEED
378
353
Radial Infeed . Compound Infeed Thread Insert Angle· Parameter A Thread Cutting Type - Parameter P
353 354
CHANGE SUBPROGRAM
379
100000 000 HOLE GRID.
379
354
ONE-BLOCK METHOD CALCULATIONS.
355 355 355
Initial Considerations Z Axis Start Position Calculation.
THREAD RETRACT
357 357 357 357
Thread Pullout Functions Single AXlS Pullout Two-Axis Pullout
HAND OF THREAD
40
~
DATUM SHIFT
381
DATUM SHIFT WITH G92 OR
381
Zero Shift.
381
383
COORDINATE SYSTEM
384
G52 Command
COORDINATE
384
358
THREADING TO A S
358
Insert iv'lod Ification . Program Testing.
360 RMS. 360
Thread Depth .
361
TAPERED Depth and Clearances Taper Calculation Block Block Tapered Thread a Tapered Thread and a MultI
MULTISTART Threading Feedrate Calculation, Shift Amount
THREAD
MAIN PROGRAM
346
347
REFERENCE POINT
OTHER THREAD
39 - SUBPROGRAMS
340
361 361
362
386
386
WORK OFFSETS . Slandard Work Offset
386
Additional Work Offset Input. External Work Offset Input.
387
387
387
LENGTH OFFSETS. Valid Input Range
388
363
CUTTER RADIUS
388
364 364
LATHE OFFSETS
388
MOl DATA SETTING
389
363 Cycle.
386 386
Dat<'l Command Coordinate Mode
365 366
PROGRAMMABLE Modal G10 Command. Parameters Notation Program Portability, . Bit Type Parameter. , Effect of Block Numbers
ENTRY,
389 389 390 390 391 392
xviii
of ATIACHMENT.
41 - MIRROR IMAGE
393
Bar
4 '14
393 394
414 4'15 415
395
Control Setting . Manual Mirror Setting
E Mirror
~
395 396
PROGRAMMING EXAMPLE
417
HELICAL MILLING OPERATION
417
396
Format, Arc Modifiers for and
396 397
398
COORDINATE ROTATION
THREAD MILLING, Thread Conditions tor Thread Thread
399
Center of Rotation , Radius of Rotation Coordinate Rotation Cancel Common Applications
399
THE HELIX,
399
THREAD MILLING
401 401
Straight Thread In itial Calculations Starting Position Motion Rotation and Direction Lead'in Motions , Thread Rise Calculation Milling the Thread Lead-Out IV" 1,lIn."
401
APPLICATION
43 - SCALING FUNCTION
405 405 405
PTION. Function Usage .
406 406 407
4'18 18
418 418 418 4'19
419
419
419 421 421
421 422
422 423 424 424 425 425 425
425 426
405
PROGRAMMING FORMAT
417 417
419 Clearance Radius Productivity of Thread
399
COMMANDS.
415
45 - HELICAL MILLING
398
IMAGE ON CNC
MI
42
Functions Mirror Image Example Mirror Image Example
414
393 394 394 395 395 395
MIRROR IMAGE BY
413 413
ADDITIONAL OPTIONS RULES OF MIRROR IMAGE
ntenls
THREAD MILLING SIMULATION METHOD HELICAL RAMPING
426 427
407
46 - HORIZONTAL MACHINING 44 - CN
LATHE ACCESSORIES
409
CHUCK CONTROL
INDEXING TABLE (8 AXIS)
429
Units 01 Increment _
L110
410 410
TSllslock Quill. Center, Quill Functions Programmable Tailstock Safety Concerns,
Programming
429
410
TAILSTOCK AND
81-DIRECTIONAL
INDEXING AND ROTARY
409
Chuck Functions Chucking Pressure Chuck Jaws,
11
41 I 411 411
INDEXING
429
.nl'l,<'Vlrv't
B
and Unclamp Functions in Absolute and Incremental Mode,
429 ,130 430 430
AND OFFSETS
431
Work Offset and B Axis Tool Length Oflset and B Axis
431 432
TO MACHINE ZERO
411
INDEXING AND A SUBPROGRAM
412
COMPLETE PROGRAM EXAMPLE
412
MATIC PALLET CHANGER·
434 434 436 437
Tab Ie of Contents
Program StruclU re BORING MILL.
47 . WRITING A CNC PROGRAM WRITING.
XIX RUNNING THE FIRST PART
459
PROGRAM CHANGES Program Upgrading Program Updating . Documentation Change,
460
ALTERNATE MACHINE SELECTION.
461
MACHINE WARM UP PROGRAM
462
eNC MACHINING AND SAFETY.
462 463
443
SHUTTING DOWN A CNC MACHINE Emergency Stop Switch, Parking Machine Slides Setting the Control System, Turning the Power Off,
445
EQUIPMENT MAINTENANCE
464
438 438 439 439
439
441 441
442 442 442 'JGRAM OUTPUT FORMATTING PROGRAMS Length Reduction. Mode and Tape Mode
48 - PROGRAM DOCUMENTS -
'~,A
- -.-
FILES
w
4<16
447 447
448
AND TOOLING SHEETS. Sheet
449
PROGRAM VERIFICATION
448 448 449 450 450 451 451
451 452 452
453
CTION OF ERRORS. Measures Measures
453
VERIFICATION,
454
ERRORS Errors . Errors. ',iMON PROGRAMMING ERRORS Input Errors "dation Ermrs Errors . : 'i!ilncous Error:J ,
- eNC MACHINING :HJNING A NEW PART Integrity
463 464 464 464
445
DOCUMENTATION Documentation, Documentation . DeSCription
_.::UMENTATION FILE FOLDER :, ',-:atlon Methods '":'''llor'S Suggestions and Storage
460 461 461
453 453 454
455 455 456
456 456 456 456
457 457
458 458
51 - INTERFACING TO DEVICES
465
RS~32CINTERFACE .
465
PUNCHED TAPE Tape Reader and Puncher Leader and Trailer Tape Iden11fication Non-printable Characters Storage and Handling,
466
DISTRIBUTED NUMERICAL CONTROL
468
TERMINOLOGY OF COMMUNICATIONS Baud Rate Parity Data Bits" Start and Stop Bits ,
469
DATA SEITING
469
CON NECTING CABLES Null Modem Cabling for Fanuc and PC
470
52 - MATH IN CNC PROGRAMMING
466 468 468 468 468
469
469 469
469
470 470
471
BASIC ELEMENTS Arithmetic and Algebra . Order of Calculations,
471
GEOMETRY Circle PI Constant" Circumference of a Circle Length of Arc , Quadrants
472
POLYGONS
474
TAPERS Taper Definition Taper Per Foot Taper Ratio. Taper Calculations - English Un its Taper Calculations - tv-letnc
475 475 476 476 476 476
CALCULATIONS OF TRIANGLES.
477
471 471
47?
473 473 473
473
XX 477 478 478 479
S;ne ~ Cosine - Tangent Inverse Trigonometric Functions Degrees and Decimal Pythagorean Theorem Solvfng Rjght
Hardware Specifications. Hardware Requirements, Features, and
480
Post Processor
L188
480
IMPORTANT FEATURES.
489
482 482
CONCLUSION.
488
480 481
ADVANCED CALCULATIONS
487 488
489 489 489
User Interlace, CAD Interface,
489
MANAGEMENT,
483
53 - CNC AND CAD/CAM
490
483
PROGRAMMING MANUALLY?
TOOL PATH GEOMETRY TOOL PATH GENERATION COMPLETE ENVIRONMENT Multi Machine Support , Associative Operations Job Setup Tooling List and Job CommenlS, Connection Between Computers Text Editor
for Solids Software Specifications ,
490
PMENT
490
483 483
THE END AND
484 484 484
A - RE
485 485 485 485 485 486 486 486 486 486 487
INNING.
NeE TABLES
491 491
Metric Metric Fine
Index
rse Threads
494 494 495 495 495
497
NUMERICAL CONTROL Numerical Co~trol technology as it is known today, emerged nud 20th It can be traced to the year of1952, u.s. Air Force, names Parsons and the Massachusetts of Technology in MA, It was not production manufacturing until 1960's. real boom came of CNC, the of 1972, a decade v.:ith introduction of micro computers. The hIstOry and development of this fascinating technology has been well documented publications. In the manufacturing field, and particularly in the area of working, Control has . . "' . . ."''"' .... SOlnethuJll"Z of a revolution. in the computw ers became standard in every company and in the machine equipped with Numerical SVS1leIn fOWld their special place in the shops. recent evolution of electronics the never ceasing computer development, including its impact on Numerical Control, brought changes to the manufacturing sector in general metalworking industry in particular.
DEFINITION OF NUMERICAL CONTROL In publications and articles, descriptions have been used during the to defme what Numerical Control It would be to try to yet another defInition, just the purpose this handbook. Many of defmitions the same same basic COl1lcer:)t. use different The
of all the known definitions can be summed simple statement:
are of the of alphaselected symbols, for a decimal sign or the parenthesis symbols. All in"'''''HV''':> are urn·.......... in a logical a predetermined collection of all instructions necessary to maa part is called an NC Program, Program, or a ""w,t:rY,I'1'" Such a can be for a future repeatedly to identical machining reUI.-UUHl)
• Ne and eNC Technology In ~trict to the terminology. there is a ence m the meaning abbreviations NC and CNC. NC for the original Numerical Control technology, whereby abbreviation stands for the newer Co~nputeriz~d Numerical Control technology, a mode~ spm-off of lts older However, practice, eNC IS the abbreviation. To clarify the proper usaf each tenn, look at the major between CNC ,.."~ ..~~,, Both perform the same tasks, bon of the purpose machining a cases, the internal design of the system the logical instructions that process the data. At this point ends. to the CNC system) uses a The system (as fLXed logical functions, that are built-in and nently wired the control These LI..llI',",U'JJJ" not be changed by the programmer or machine tor. Because of ftxed wiring logic, control IS synonymous with the term 'hardwired', The can interpret a part program, but it does not alVH...."AF>.~.., to the using the away from the typically in an environment. the NC quires the compulsory use of punched tapes for information.
t?e
The CNC uses an internal micro
but not the NC system, (i.e., a computer). This storing a variety of routines that are capable logical That means programmer or the machine '"'''"'''....,.~,''.. can change the on the control itself (at machine), with instantaneous results. flexibility is greatest advantage of CNC systems probably key element that to such a use of the technology in modern manufacturing. The CNC programs and the logical are stored on special computer chips, as software rather by c.onnections, such as that control the logical hOns. contrast to the system, the system is synonymous with the term 'softwired'. When describing a particular that to the 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 abbreviation ofNe. The 'C'stands for Computerized, and it is not applicable to hardwired All manufactured today are of the design, Abbreviations such as C&C or C 'n are not correct and reflect poorly on anybody uses them
CONVENTIONAL AND CNC MACHINING What makes CNC machining superior to the conventional methods? Is it superior at all? Where are benefits? If the CNC and the conventional machining processes are a common general approach to machining a part will -....-.M1. 2. 3. 4.
5. 6.
Obtain and study drawing Select the most suitable machining method Decide on the setup method (work holding) Select the cutting tools Establish and Machine part
This same both types of macrunmg. IS m way how data are input. A feedrate 10 inches per minute (10 mlmin) is the same in manual or CNC applications, but the method of applying it is not. The same can be about a coolant it can be activated a knob, pushing a switch or programming a special All will result in a coolant rushing out of a a certain amount of knowledge on part user is required. alL working, particularly meta! cutting, is mainly a skill, but it is also, to a great an art and a profession of large number of people. So appli~ of Computerized Numerical Control. Like any skill or art or profession, it to the detail is necessary to be successful. It takes more than technical know 1to be a CNC machinist or a CNC Work I>v?,"'....."...... ,'... and what is called a 'gut-feel', is a much needed supplement to any skill. HV"...........
In a conventional machining, the operator sets up the machine and moves each cutting using one or both hands, to produce the required part. The design of a machine tool offers many features that help the process of machining a - levers, and a15, to name just a few. same body are repeated by the every in the batch. However, the word 'same this context really means 'similar than 'identical '. Humans are not capable to every the same at all times - that is the of maPeople cannot work at the same per[orrnam;e leve! all the without a rest. All of US have some good and some bad moments. The results these moments, when applied to a part, are to predict. There will some differences and within each batch of The parts will not always be exactly the same. dimensional tolerances and <""""f",,,,,, '-'UU.H..." .
Ish quality are the most typical problems in conventional machining. Individual machinists may own 'proven' methods, different from a f their feHow leagues. Combination of and other factors create a great amount of machining under numerical control does away with the majority of inconsistencies. It does not require the same physical as machining. Numerically contToned machining does not need any levers or dials or handles, at least not in the same sense as conventional machining does. the has it can used number of over, consistent That does not mean there are no limiting cutting tools do wear out, material blank in one batch is not identical to the material another batch, the setups may vary, etc. factors should be considered and compensated for, whenever lICI.'C~~ru emergence of the numerical control technology does not mean an instant, or even a long tenn, demise of all manual There are times when a traditional machining method is preferable to a computerized method. For example, a simple one time job may be done more efficiently on a machine a CNC machine. Certain of machining jobs will beneHt from manual or semiautomachining, rather than controlled machining. CNC machine are not meant to replace every manual machine, only to supplement
In many
the
whether
ing will be done on a CNC machine or not is based on
number of required parts and nothing Although the volume of parts machined as a is always an important criteria, it should never be the only factor. Consideration should be to complexity, tolerances, the required of fmish, etc. Often, a complex part will benefit from CNC machining, while relatively parts will not. Keep in mind that numerical control has never machined a single part by Numerical is only a process or a method that enables a machine tool to used in a productive, accurate and consistent
NUMERICAL CONTROL ADVANTAGES What are the
advantages of numerical control?
It is important to know which areas of machining will benefit from it which are done the conventional It is absurd to think that a two power mill win over jobs that are currently done on a twenty times more powerful manual mill. Equally unreasonable are exof improvements cutting speeds over a conventional machine. the machining and tooling conditions are the same, the cutting rime will be close in cases.
NUMER
CONTROL
3
of the areas expect improvement:
o
Setup time reduction
Cl
lead
o o o o
Accuracy and repeatability
o
the CNC user can and
lead time, required to and manufacture several fixtures for conventional machi.nes can be by preparing a part program the ~se of plified fixluring.
reduction
Contouring of
shapes
Simplified tooling and work holding cutting time
General productivity increase
area offers only a potential improvement. Individual users will different of actual improvement, depending on the oil-site, the CNC used, setup methods, complexity of fixturing, or cutting tools, management philosophy level of engineering individual attitudes, etc.
• Setup Time Reduction
• Accuracy and Repeatability high degree and repeatability of has the single major benefit to users. Whether the part program is stored on a disk or in the ~omputer or even on a tape (the method), Il ah~'ays the same. program can changed at wlll, but on.ce proven, nO are usually required more. A gIven can be reused as many times as nec:de,:t without a single bit it conlains. to allow such changeable factors as tool program wear and operating temperatures. it has to stored safely, but generally very little' from CNC programmer or will required. The high accuracy of CNC machmes and repeatability allows high quality to produced consistently lime.
• Contouring of Complex Shapes CNC
and machining centers are capable of cona 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 programming IS Virtually mandatory for any dimensional tool path at'''''''''''' of the the serup time should not Modular lixturing, SI
•
lead Time Reduction
a part program is written and proven. it is ready 10 !n the even at a nOtice. Although l~e lead tor the run is usually it is virtually ml for any run. if an to be modified. it part requires the lead can be done usually quickly,
shapes, as can be :virhou.t the additional expense of making a model tracmg. Mirrored parts can achieved literally at the switch of a bulton, of programs is a lot simpler than storage of patterns, models, olher pattern making tools.
• Simplified Tooling and Work Holding Nonstandard and 'homemade' looling that clutters the benches and drawers around a conventional machine can beelimin~led by looling, designed . num~ncal applications. Multi-step such as pilot dnlls, step combination tools, counter borers and are with several individual ;:'l
. and work holding for CNC machines have only one. ~aJor purpose - to hold the part rigidly in the same pOSitIOn for all within a batch. Fixtures for CNC work do nOI normally jigs, pilot and hole locating
4
pter 1
• Cutting Time and Productivity Increase machine is commonly consistent. Unlike a the operator's skill, experito changes) the CNe machining is under control a computer. The small amount of manual work is restricted to the setup and loading and unloading batch runs, the high cost of the unproductive time is spread among many parts, main benefit of a consistent making it less cutting time is jobs, where the production to individual machine tools scheduling and work can be done very "'v"'''''''''''''' is
The main reason COlnp:anlces machines is strictly prr,nnrn invesilmellt. Also, on of every having a competitive technology offers plant manager. in improvement a excellent means to the overall productivity of the manufactured Like any means, it has to When more and more wisely and just having a CNC companies use the CNC anymore. The commachine does not offer the extra how to use the who panies that get forward are technology efficiently and it to competitive in the global economy. To reach the goal of a essential that users understand the h""";",,,,,,,... nM on which CNC technology is many forms, for example, un(jen.tarldulg cuitry, complex ladder diagrams, \.-UI.IILJIL,lll;;;1 ogy, machine design, machining onnC11Dles and many others. Each one has to by the person in charge. In this Hil11UUIUU.I\.. on the that relate directly to the understanding the most common Machining Centers and the lathes the Turning Centers). The should be very important to every matool operator and this goal is also reflected in the handbook approach as well as in numerous
TYPES OF CNC MACHINE TOOLS ni1ffef'ent kinds of CNC machines cover an variety. Their numbers are rapidly developmentadvances. It is . applications, they would of some groups CNC Cl
and Machining centers
Cl
and Turning Centers
Cl
Drilling machines
ChllClllCH
mills and Profilers
Cl Cl
EDM machines
o Punch presses and Shears cutting machines
Cl Cl
and Laser profilers
o
Water
o
Cylindrical grinders
Q
Cl
and Spinning machines, etc.
centers and lathes dominate industry. These two groups share market just about equally. Some industries may a of machines, depending on their higher need one that there are many different needs. One must kinds of lathes and equally many different kinds of machining centers. the programming process for a vertical is to the one for a horizontal machine or a simple mill. Even between different machine groups, there is a amount of general hons and the is generally the same. For example, a contour with an end mill has a lot common with a contour cut a
• Mills and Machining Centers Standard number axes on a milling machine is three set on a milling system is althe X, Y and Z axes. ways stationary, on a machine table. The cutting tool it can move up and down (or in and out), but it does not physically follow the tool path. CNC milling machines CNC mills - sometimes are usually small, simple without a tool changer is often or other automatic features. quite low. In industry, they are maintenance purposes, or small usually designed for contouring, CNC machining centers are far more drills and mills, benefit the user gets out ability to several diverse operations drilling, boring, counter facing and contour milling can be CNC program. In addition, automatic tool changing, minimize idle time, indexing to a different side a rotary movement of additional axes, CNC machining centers can with special software that controls the speeds and of the cutting tool, automatic in-process ",,,,,,oil''''' adjustment and other production "XU'I'Ul'.... Ul'J;:, devices.
NUMERICAL CONTROL
5
There are two basic machining machining center. They are the centers. The major difference two types is the nature of work that can be on them efficiently. For a CNC machining center, most suitable type of work are flat parts, either mounted to ble, or held in a vise or a chuck. cbining on two or more in a sirable to be done on a CNC horizontal U14'.llll.lll example is a pump and
shapes. Some multi-face ULa...'U.llllli,!:; done on a CNC vertical machining center ...'-I ..... I-'IJ ....... a table. prc)gr.:imrnulg process is the same both designs, (usually a B axis) is added to the horidesign. Ths axis is either a lHU';;;1\.U.1J;:. axis) for the table, or a fully rotary taneous contouring. an
handbook concentrates on the CNC centers applications, with a special ""... horizontal setup and machining. melmO(lS are also applicable to the small tapping machines, but the "",.r'rr,..,'..,......... " ... restrictions. 'CIVIl
•
PERSONN
FOR eNC
machine tools have no cannot evaluate a with skills and control, sk1lls are usually - one doing the machining. Their depend on the company as product manufactured is quite distinct, although many the two functions into a one, often companies called a CNC ProgrammerlOperat01:
• CNC Programmer The CNC programmer is the person who the most responsibility in shop. This person is often responsible for numerical control is held respontechnology in the plant. sible for problems operations. Although duties may vary, the ~ ..",rr..-.,_... ""~ is also responsible for a variety of tasks usage of the CNC machines, In fact, this accountable for the 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 cutmachine center line. In addition, is normally stationary, mounted in a sliding twTet. follows the contour of programmed tool path. the CNC lathes with a milling attachment, so called live tooling. the milling tool has its own motor rotates while spindle is stationary. lathe design can be horizontal or more common than the purpose in for either For horizontal group can be as a bar type, chucker type or a to combinations are aca CNC lathe an extremely flexible maaccessories such as a tailstock, steady part catchers, pullout-fingers rests or fol1ow#up milling attachment are popular compoeven a third nents of the CNC ~ lathe can be very versatile so versatile in that it is often caUed a CNC Turning Center. AU text examples in this handbook use the more tenn CNC lathe, yet still ing aU its rr'ln,('Ip.1m h"",,,,,,h ..u,,, I"nn,"I>',..,..,
analyze, dam into a the CNC pro01"1!1 ....... ",..I",. must be to decide upon the best manufacturmethodology in all respects. \"Ullv\"lvU
In addition to the machining skills, programmer has to have an understanding of mathematical principles, arcs and anmainly application of equations. Equally important is the of trigonometry. with computerized progranuning) knowledge of manual programming methods is absolutely to the the thorough understanding of control this output. important quality of a truly "'''''1'">'\''''''P1'" is his or her ability to listen to
the CNC operators, are the first prerequisite to h"""'(lI"'I""" programmer must be flexible ClllLHll1t);!, quality,
6
Chapter 1
• CNC Machine Operator The CNe machine tool operator is a complementary position to the CNe programmer. The programmer and the operator may exist in a single person., as is the case in many small shops. Although the majority of duties performed by a conventional machine operator has been transferred to the CNC programmer, the CNC operator has many unique responsibilities. In typical cases, the operator is responsible for the tool and machine setup, for the changing of the parts, often even for some in-process inspection. Many companies expect quality control at the machine - and the operator of any machine tool, manual or computerized, is also responsible for the quality of the work done on that machine. One of the very important responsibilities of the CNe machine operator is to report fmdings about each program to the programmer. Even with the best knowledge, skills, attitudes and intentions, the 'fmal' program can always be improved. The CNC operator, being the one who is the closest to the actual machining, knows precisely what extent such improvements can be.
SAFETY RELATED TO CNC WORK On the wan of many companies is a safety poster with a simple, yet powerful message: The first rule of safety is to follow all safety rules
The heading of this section does not indicate whether the safety is oriented at the programming or the machining level. The reason is that the safety is totally independent. It stands on its own and it governs behavior of everybody in a machine shop and outside of it. At fIrst sight, it may appear that safety is something related to the machining and the machine operation, perhaps to the setup as well. That is defInitely true but hardly presents a complete picture. Safety is the most important element in programming, setup, machining, tooling, ftxturing, inspection, shipping. and you-name-it operation within a typical machine shop daily work. Safety can never be overemphasized. Com~
panies talk about safety, conduct safety meetings, display posters, make speeches, call experts. This mass of information and instructions is presented to all of us for some very good reasons. Quite a few are based on past tragic occurrences - many laws, rules and regulations have been written as a result of inquests and inquiries into serious accidents. At fIrst sight, it may seem that in CNC work, the safety is a secondary issue. 111ere is a lot of automation, a part program that runs over and over again., tooling that has ben used in the past, u simple setup, etc. All this can lead to complacency and false assumption that safety is taken care of. This is a view that can have serious consequences. Safety is a large subject but a few points that relate to the CNC work are important. Every machinist should know the hazards of mechanical and electrical devices. The fIrst step towards a safe work place is with a clean work area, where no chips, oil spills and other debris are allowed to accumulate on the floor. Taking care of personal safety is equally important. Loose clothing,jewelry, ties, scarfs, unprotected long hair, improper use of gloves and similar infractions, is dangerous in machining environment. Protection of eyes, ears, hands and feet is strongly recommended. While a machine is operating, protective devices should be in place and no moving parts should be exposed. Special care should be taken around rotating spindles and automatic tool changers. Other devices that could pose a hazard are pallet changers, chip conveyors, high voltage areas,
hoists, etc. Discollllectillg allY interlocks or other safety features is dangerous - and also illegal, without appropriate skills and authorization. In programming, observation of safety rules is also important. A tool motion can be programmed in many ways. Speeds and feeds have to be realistic, not just mathematically 'correct'. Depth of cut, width of cut, the tool characteristics, all have a profound effect on overall safety. All these ideas are just a very short summary and a reminder that safety should always be taken seriously.
CNCMILLING Many
types machines are in industhe majority of them are machining centers and CNC lathes. They are by wire EDM, fabricating machines and machines special Although the this handbook is on the two that dominate the market, many can be applied to equipment. try,
CNC MACHINES - MILLING The description of CNC milling is so it 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.
• Types of Milling Machines Milling machines can divided imo Ihree categories: o
By the number of axes - two, three or more
o By the orientation of axes - vertical or horizontal o By the presence or absence of a tool ...h ..... "',"r Milling machines where the spindle motion is up and down, are categorized as vertical machines. Milling machines where the spindle motion is in out, are categoas horizontal machines - see Figure 2-1 and
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 be defmed:
this handbook, a milling machine can
Milling machine is a machine capable of a simultaneous cutting motion, an end mill as the primary cutting
Figure 2-/ Schematic representation of a CNC vertical machining center
at least two axes at the same time
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 or available machines.
'I" j'> I
Figure 2·2
Schematic representation of a CNC horizontal machining center
7
8
2
simplified not really reflect reality current state of art in .a...... "'... tool manufacturing. changing. New and machine tool industry is more powerful machines are V_'''"",'' __ and produced by manufacturers worldwide. more features. The majority of modern machines designed for milling are capable of doing a multitude of machining tasks, not machines are also capaonly the traditional milling. of many other metal operations, mainly drillng, thread cutting many others. They may with a multi-tool azine (also known as a a fully a pallet changer (abbreviated as ATC) viated as APC). a powerful computerized conlrol unit brevlated as CNC), and so on. Some machine may as adaptive control. have additional features, terface, automatic loading unloading, probing ",,,,,,rpo..,... high speed machining and other modis - can machine tools of ern technology. The capabilities be as simpleCNC milling In two words - certainly not. Milling machines that have at some of built-in. have ,."u·"'''''"" new breed of tools - CNC An/l,r".,,·, This lenn is strictly related - a manual machining cel1Jer is a description thal does nul exist.
• Machine Axes Milling machines and machining centers have at least The machines become more flexiaxes - X, Y iflhey usually an lary axis (the A horizontal models). higher with five or more axes. A found on chine wilh five ;'lxes. he a hnring mill that jor axes, plus a axis (usually the B parallel to the Z (usually the W axis). true complex and flexible five-axis profiling [ling machine is the type used in industry. where a multi-axis. simultaneous is necessary to complex shapes and and various
At times,
three and a
two and a machine is used.
machine or a terms refer to
where simultaneous limitations. For a Y and Z axis as primary axes. plus The indexing tadesignated as an A ble is used posllioning. but il cannot rotate simultaneously with the motion of primary axes. That type of a called a 'three and a half axIS ' machine. machine Ihal is a more complex but a table, is as a four can move simultaneously motion of the axes, is a good with the example of a true 'four ax.is· machine tool.
the type of of all axes vertical
machining center is described by its specifications manuas provided by the machine tool manufacturer. lists many as a quick method of comparison between one machine and another. It is not unusual to find a slightly information in the tool. brochure - after all, it is a In the area of chine tools are
systems, three most common ma-
Q
eNC Vertical Machining Center - VMC
Q
CNC Horizontal Machining Center· HMC
Q
CNC Horizontal Boring Mill
type, except the major differences will the for indexing or full rotary axes, additional the type of work suitable for individual lion of the most common type of a machining center - the Vertical Machining Center (VMC) a fairly accurate sample other group.
• Vertical Machining Centers Vertical of work, done on
for flat type of machining is setup.
A vertical machining center can be used with an optional axis. usually a head mounted on mounted either verthe main table. The rotary head can tically or horizontally, depending on the results and the type. This fourth can either for indexing or a full rotary molion. In combination with a supplied), the fourth in the vertical "nr""",,, can be long parts that need support at both ends.
maJonty vertical centers most tors work with are those with an empty table and three-axes configuration. From the programming perspective, there are at least two mentioning:
o ONE· programming always takes
from the viewpoint means the view is as if looking straight down, at ninety degrees towards the machine table for development of the tool motion. Programmers always view the top of part!
spindle, not the
Q
TWO· various markers located somewhere on the machine show the positive and the motion of the machine axes. For programming, markers should be ignored! These indicate operating directions, not programming directions. As a matter of fact, typically the programming directions are exactly the opposite of the markers on the tooL
CNC MILLING
9 Vertical and Horizontal Machining
- Typical Specifications
.-
......
_-
...
Vertical Machining Center
Description 1=
m
Horizontal Machining Center
3 axes IXYZ)
4 axes IXYZB}
Table dimensions
780 x 400 mm 31 x 16 inches
500 x 500 mm 20 )( 20 inches
Number of tools
20
36
Maximum travel- X axis
575 mm 22.5 inches
725mm 28.5 inches
Maximum travel- Y axis
380 mm 15 inches
22 inches
470 mm
Maximum travel- Zaxis
Spindle speed Spindle output distan ... ", - Zaxis
560 mm 22 inches
N/A
0.001 degree
60-8000 rpm
40 - 4000 rpm
AC 7.5/5.5 kW AC 10/7 HP
AC 11/8 kW AC15/11HP
150 - 625 mm inches
150 - 710 mm 6 - 28 inches
430mm 17 inches
30 560 mm 1.2· inches
No. 40
No. 50
6-
Spindle center-to-column distance· Y axis Spindle taper Tool shank
CAT50
2 - 10000 mm/min 0.100 - 393 in/min 30000 mm/min (XY) mm/min IZl 1181 in/min IXY) 945 in/min (Z)
Rapid traverse rate
Tool selection
memory
...
Maximum tool diameter
Maximum
560mm
18.5 inches
Table indexing angle
nu:>t:-tlJ-t~1.1
,
I~
Number of axes
Spindle
__
1 - 10000 mmlmin 0.04 - 393 in/min 30000 mm/min (XYI - 24000 1181 in/min (XV)- 945 iI\Imin Random memory
80 mm (150 w/empty pockets) 3.15 inches (5.9 w/empty pockets)
1 mm 4.1 inches
300mm 11.8
350 mm 13.75 inches
length
Maximum tool weight
• Horizontal Machining Centers Horizontal CNC Machining Centers are also as multi-tool and versatile machines. and are bieal paris, where majority of machining has to on more than one in a single setup.
(2)
6 kg
20
131bs
44 There arc many applica£ions in lhis area. Common exam-
as pump housings, cases, blocks and so on. machining centers always include a special ing table and arc equipped with a pallet and other are large manifolds,
10
Chapter 2
Because their flexibility and complexity, CNC zonlal machining centers are priced significantly than vertical CNC machining centers. the programming point
view, there are several mainly relating to the Automatic Tool the indexing table, - in some cases - to the additional for example, the changer. All differences are relatively minor. Wriling a program for horizontal machining centers is no different than writing a for venical machining center!'..
eli
• Horizontal Boring Mill Horizontal boring mill is another machine. It closely resembles a CNC horizontal machining center, but have its own Iy, a horizontal mill is by the lack some common features, such as Automatic Changer. As Ihe name of the machine its primary purpose is boring operations, mainly lengthy that reason, the reach of is extended by a specially designed quill. Anthe other typical feature is an axis parallel to the Z axis, called Ihe W axis. Although is, in the fifth nation (X, y, W), a horizontal boring mill cannot be called a true axis machine. Z axis (quill) and the W (awards axis (table) work in the other. so Ihey can be used large parts and hard-to-reach areas. It means, that during drilling, the machine table moves an quill. quill is a physical part of the spmdle. It is in the spindle where the culling 1001 ro"'lies - but in-nnd-out motions are done by the table. method offered on horizontal Think of the mills - if the quill were to be very it would lose strength and rigidity. belter way was to split the tradItional single Z axis movement into two - the quill extension the Z axis will move only of the way £Owards lhe and the table itself, the new axis, will move another
parl of the way towards the part Ihal area chine tool resources.
spindle. bOlh meet in the be machined using all the ma-
Horizontal boring mill may be called a machine, but certainly nol as-axis CNC the count of the axes is Programming CNC mills are similar to Ihe horizontal and machining centers.
• Typical Specifications On the preceding page is a comprehensive chart showi the typical specifications a CNC Vertical Machining Cellterand a CNC Horizontal Machining Centel: ifications are side by side in two not for any comparison are two different types and comparison is no\ possible all features. In order to compare individual machine tools within a category, machine tool provided by the machine manufacturer serve as the basis for comparison. specifications are contained a of verifiable data, mainly technical in nature, describes lhe individual machine by main features. Machine tool buyers frequently compare many brochures of several fcrcnt machines as parr of the pre process. agers process planners compare individual machines in the machine shop and assign the available workload 10 the most suitable machine. A fair and accurate comparison can be made between two vertical ining centers or between two horizontal machining centers, but cannOI be done to compare (ween two differenl types. In 11 typical sped chart, additional dala may be listed, not included in earlier chart In this handbook, the focus is on only those specifications Ihat are interest \0 the CNC and the CNC operator.
CNC TURNING CNC MACHIN
• TURNING
or it turret IS a common In machine shop. A lathe is used as shafts. machimng or conical work, wheels, bores, threads, etc. The most common lathe operation is removal material from a round Illrning tool for external culling. A lathe can ror internal operations such as boring, as well as for threading, etc., if a cutting tool is are usually in machining power lathes, hutlhey do have a carousel that holds cutting tools. An lathe has often one or two CUlling tools at a lime, but has more machining power. Typical lathe work controlled by a CNC system uses maknown in industry as the CNC Turning - or more commonly - the CNC term 'turning is curate overall descnption of a can be used for a number of machining opduring a example, in addition to lathe as turning and a lathe can be used for drilling, grooving, knurting and even burn It can also be used in ent modes, such as chuck work, centers. Many other combinations also exist are designed to hold tools in special can have a milling indexable chuck, a sub a tailstock, a steadyrest many other features associated with a lathe design. more than four axes ore common. With constant advances in machine technologies, more CNC appear on the market that are designed to do a number of operations in a many of them (tonally reserved for a mill or a center.
• Types of eNC lathes lathes can by the type of the number of a xes. two types are lathe and the horizontal CNC lathe. Of the two, horizontal type is by the most common in manufacturing and machine shops. A CNC lathe (incorrectly called a vertical boring mill) is somewhat less common but is irreplaceable for a work. For a CNC there are no differences in the approach between two lathe types.
•
of Axes
The most common distinction CNC lathes is by the number of programmable axes. Vertical CNC lathes have two axes in almost all The much more common CNC horizontal commonly designed with two programmable axes, are available wilh three, four or axes, adding extra to manufacturing of more complex parts. A
lathe can funhcr
described by the
type o
FRONT lathe
oREAR
... an engine lathe type ... a unique slant bed
SIan! bed type is very popular chips to operator and, in case an accident, down a area, towards the chip
its design allows
Between the of flat bed and type lathes, front and rear lathes, horizontal and venicallalhe designs, there is another variety of a lathe. This describes CNC lathes by number of axis, which probably the simplesl and most common method identification.
AXES DESIGNATION A typical CNC is designed with two standard axes one axis is the X other axis is lhe Z axis. Both axes are perpendicular to other and represent the two-axis lathe motions. X axis also represents I ravel of the cutting tool, Z represents nal morion. All varieties of tools are can be turret (a special too) or Because of this lurret loaded with all CUIZ axes, which means all Following the established and machining of making a hole by or punching, is the Z
of the milling the only machine of drilling, boring.
ma~
CNC lathe work, the oriemation a type of lathe is downwards motion axis, and left and motion for the Z axis, when looking from the machinist's position. This view is shown . following three illustrations Figure 3-1, Figure
3-3.
11
12
Chapter 3
HEADSTOCK
I
CHUCK
/
. I
!
/
JAWS
!". ---- TOOL
X+
.....t "
TAILSTOCK
x-
QUILL
Figure 3-1 Typical configuration of a two axis slant bed eNG lathe - rear type
x+
t
Z- . . . . . Z+
" .....t XX-
"
X+
Figure 3-2 Typical configuration of a CNC lathe with two turrets
Figure 3-3 Schematic representation of a vertical eNC lathe
is true for both the front and rear lathes and for lathes with or more axes. The chuck is vertically to the horizontal spindle center line for all horizontal lathes. Vertical lathes, due to their design, are rotated 90°, where the chuck face is oriented horizontally to the vertical spindle center line.
In addition to the X and Z primary axes, the of each additional axis, lathes have individual third axis, for example, the C axis is usually milling operations, using so called live tooling. More tails on the subject of coordinate system and machine geometry are available ill Ihe next
• Two-axis Lathe This is the most common type of CNC The work u!\ually a chuck, is on the left holding of machine (as viewed by the operator). The rear type, with slant bed, is most popular design for general work. some special for in the petroleum industry (where turning tube ends is a common work). a bed is usually more suitable. The CUlling lools are held in a specially designed indexing turret that can hold more tools. Many such lathes six, eight, len, also have two turrets. Advanced 1001 designs incorporate tool storage away from the work area, similar to the design of machining centers. 'even hundreds, of cutting tools may stored and used a single CNC program. Many lathes also incorporate a quick changing tooling system.
• Three-axis Lathe Three~axls lathe is essentially a two-axis lathe with an ditional This has own usually as a in absolute mode (H in incremental mode), and C is fully programmable. Normnlly, the third axis is used for cross-milling slot CUlling. bolt circle holes drilling, helical slots, etc. axis can replace some simple operations on a milling machine, reducing setup time for the job. Some limitations apply (0 many models, example, the milling or drilling operations can (ake place only at positions projecting from the tool center La the spindle center line (within a machinplane), although adjustments.
has own power source but the power raLThe third 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 an increment of two or five (j"'l'rf"'~ more useful better is an increment of 0.1'\ 0.01 0, and commonly 0.00 1° on the models. Usually the lathes with three axes ofa fine radial increment that allows a simultaneous rotary motion, with low increment values are usually designed with an oriented spindle stop only.
From the perspective ofCNC part programming, the ditional knowledge required is a subject not difficult to learn. General principles of milling apply and many programming features are also available, for fixed and other
CNC TURNING
13
• four-axis lathe
There is more in
a four-axis CNC lathe is a to proa three-axis lathe. As a matter of lathe is nothing more than programming lathes at the same time. That may sound the principle of a CNC lathe are actually two controls one each pair (set) axes. used to do the external - or (OD) and another program to do the - roughing (ID). Since a and can be pair of axes independently, at the same time, doing two different operations simultaneously. The main keys to a 4-axis lathe programming is coordination of the (ools and their operations, liming of the tool motions a sense of compromise. cannot work all the reasons, both Kf':.c.ml<,e of this programming fea(typically MiscellUres as synchronized how much (ime laneous Function), the ability to each tool requires to complete etc., are required. 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. This means that some operations simply cannot be done simultaneously.
promotional brochure than in fact, in a well technical information, (he machine tool. are the features and the CNC machine tool manufacturer considers .m.,Art..:. ... ! the customer. In the majority of brochures, there are practical can b e ' a particular CNC machine, a lathe in the
•
Machine Specifications
A typical bed may from an actual
lathe, with two axes and a slant
Description Number of axes
Two (X, Z) or three (X, Z and C)
Maximum swing over bed
diameter length
12
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 on a 2-axis
Axis travel in Xaxis
• Six-axis lathe
Axis travel in Z axis
Six-axis CNC lathes are twin turret and a set of axes per turre!. This corporales many tool of them power as well as back-machin Programming these lalhes is similar to programming a three-axis lathe twice. The control system automatically provides synchronization, when IIvl.,'V~~<'l.1 A small
\0
CNC lathe is popular and industries with simi applications.
FEATURES AND SPECIFICATIONS a promotional brochure useful in many respects. In most is impressive, the printing, and the use of colors is well done. IS the purpose of the brochure La make a marketing tool and attract the potential buyer.
A look at a CNC machine
Specification
Indexing time
0.1 second
Rapid traverse rate X axis mm/min in/min 0,01 • 500 mm/rev ,0001 • 19.68 in/rev
Main spindle motor Spindle speed
35·3500 rpm
Minimum input increment
Motorized Number of rotating tools
12
Rotating tool speed
30 . 3600 (Imin
Milling motor
AC 3.7/2.2 kW AC 5/2.95 HP
• M16 metric
·5/8 inches
3
It is very important to understand the specifications and of the CNC machine lools in shop. Many feato the control system, many others to the matool itself. In CNC programming, many imponanl are based on one or of features, for example number of tool stations available, maximum spinothers.
• Control Features in understanding the description of a lathe is the look at some control unique 10 how they differ form a typical control. of control features is described in more detail
Q
circular) can
some fealures and codes nOI make sense - they are included for ,,,r,"'''''1> only. Com-
mon
typical features are listed:
Q
X
Q
Constant surface speed leSS) is standard control (G96 for CSS and G97 for r/min)
Q
Absolute programming mode is X or Z or C
Q
Dwell can use the
Q
Tool
Q
1=,,,,,£1.,,.,,, s~!lection (normal) in mm/rev or in/rev
a
Feedrate
a
Rapid traverse rate different for X and Z axes
Q
Multiple repetitive cycles for turning, boring, facing, contour repeat, grooving, and threading are available
a
Feedrate is common from 0 to 200% in 10% increments (on some lathes only from 0 to 150%)
o
X axis can
Q
Tailstock can be programmable
a
mode is U or War H
Automatic
uses 4-digit identification
(special) in mlmin or inlmin
2m" .. "rv,
and corner rounding
R and II Kin
a diameter, nat a radius
nr:rl~m,.'ntlll nrn"'''"rnnllnn
p. U or X address (G04)
Q
5,
At
of various forms (including taper and performed, depending on the control model
a
Thread available with six-decimal place accuracy (for inch units)
a
Least input increment in X is 0.001 mm or .0001 inches on diameter· one half of that value per side
COORDINATE GEOMETRY
a in /lates. System of coordinates is on a over four mathematical principles dating are those that most important of can be applied to Ihe CNC technology today. In various these principublications on mathematics and the rea/number syspies nrc lisled under the headings (ell! and the rec/angular coordinates.
The length of division on the scale re[>re~,e unit of measurement in a convenient and ceptcd It may come as a surprise that used day. example, a simpJe ruler used in on the number scale concept, regardless of meaWeight scales using lons, pounds, of mass are other uses the same
as
RECTANGULAR COORDINATE
REAL NUMBER SYSTEM
M
coordimlte system IS a to point, using the XY coordinates, or a spapoint, using the XYZ coordinates. [t was first 17th century by a French and ......... ,"'" Rene Descartes (I I us an alternative to the rectangular
2D
key to understanding (he knowledge of arithmetic. key knowledge in this area is /lumber system. Within ten llvuiluble numerals , _ ' " , , " ' v l can be used in any of the
called
o
Zero integer.. .
0
r:J
Positive integers ... (with or without sign)
L 2,
o
Negative integers ... (minus sign required)
o
Fractions ...
1/8, 3/16. 9/32, 35/64
o
Decimal fractions
0.1
Coordinate System
10,12943, +45
" ..T
-381, ·25,-77
T .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 All information in a drawing numbers using a has to be translated into a program, using primarily numbers. are used Lo describe commands, functions, comments, so on. The mathematical rn.,r,·'n. of a real number can he expressed graphically on a straight line, scale, where all divisions 4-1. have the same
Figure 4·1 Graphical representation of the Number Scale
-, •
.
-; Figure 4-2 Rectangular coordinate system The concepts used in design, and in numerical point can be mathecontrol are over 400 years old. A matically defined on a plane (two coordinate values) or in space (three coordinate values). defin ition of one point 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 represents an exacllospecified. In programming, If such a location is on a the point is defined as a 20 point, along two axes. the location is in a space, lhe poilH is defilled as a three axes,
15
16
4
When two number scales that intersect at right angles are used, mathematical for a recTangular coordinate system is terms from tion, and all have an important role in CNC programming. understanding is very important for further
• Axes and Planes
• Point of Origin Another term that emerged from the rectangular nate is called poil11 of origin, or just origin. 11 is the point where lhe two perpendicular axes intersect. is point a zero coordinate value in each {lxis, fled a.<; planar XOYO and XOYOZO 4-4.
AY
of number an axis. This old principle, when applied to programming, means that at least two axes nvo number scales - will be mathematical definition of an
-I
1'1
1--+
1
1
1-1-1" 1- -1-1- ....
X axis
T
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 applications, while a solid object is used in 3D applications. Mathematical definition of a plane is:
the top viewpoint of the looking straight down on the illustration Figure 4-3, a viewing direction is established. This is often called viewing a plane. A plane is a 2D entity -
letter X identifies
horizon-
'1--1-"
I -I
-I
ORIGIN
Figure 4-4
Point of origin - intersection of axes
This intersection has a special meaning in CNC programming. acquires a new name, lypically the gram reference point. Other terms are also program zero, poim, workpiece zero, part zero, with the same meaning and purpose.
• Quadrants Viewing the two intersecting axes and the new four distinct areas can be clearly identified. area is bounded by two axes. areas are called quadrants. Mathematically dcfincd,
Yaxis
I I- 1-
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 definiapply 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
Quadrant IV
LOWER RIGHT
lal the Jetter Y identifies its vertical axis. 111is plane IS called XY plane. Defined mathematically, (he horizontal axis is always listed as the first of the pair. In and CNC programming. this plane is also known as the Top View or a Plan View. Other planes arc in CNC, but not to the same extent as in CAD/CAM work.
quadrants are defined in the lion from horizontal X axis and the naming convention uses Romal! numbers, not Arabic numbers normally used.
GEOMETRY
17
counting starts at the positive of the horizontal 4-5 illustrates the definitions.
Y+
.,
P2+ ... Yaxis II
I
1--1'- -+ -I
_
t
x-
Quadrant I X+Y+
-u'+ "
-1--1-+ --i--I-JiIo.
-r--I-~1~~I-~-r-I--~.. I-
x+
..,.. P1 - ---- .....
X
P4
+
.. I
Quadrant III - Quadrant IV x-yX+Y-
Figure 4·5 Quadrants in the
Any point zero. Any cation of the distance
and their identification
is determined solely point in a particular quadrant and its relative to the origin - Figure COORDI X AXIS Y AXIS
ON ,
""""""""~,--"--
..
,
,-""""",
+
QUADRANT III
+ Figure 4·6 Algebraic signs for a point location in plane quadrants
IMPORTANT: ... If the defined point lies exactly on the Xaxis, it has the Yvalue to zero (YO). If the point on the Y axis, it has the X value to zero (XO). ... If the point lies on both X and Yaxes, both X and Yvalues are zero IXO YO). 0
XOYOZO is the point itive values are written
W",UlIlI
Coordinate definition of points within the rectangular coordinate system (point PI = Origin XOYO)
If these directions were hand, they would "",..r"''',... ''" of thumb or finger in the X direction, middle
over a from root would point the Y direction and
,,--"""""""""""""''''''
QUADRANT II
•
::: X4.0 Y-3.0 ::: X-S.O Y-4.S P6 ::: X-5.0 YO.Q
Figure 4-7 value can be positive,
QUADRANT I
o
P1 ::: XQ.Q - P2- ::: XQ.Q P3 ::: X5.5 YS.O ---""""
POINT
o
T
In part programmmg, the plus sign - Figure
• Right Hand Coordinate System In {he illustrations of the number scale, quadrallfs and axes, the origin into two portions. The zero point - the point of origin - separates the positive section of the axis from the section. In the right-hand coordinate system, the at the origin and is directed towards rig III upwards for the Y axis and towards lhe viewpoint for Z Opposite directions are
majority of CNC are programmed using the so called absolute method, that is based on the point of origin XOYOZO. This absolute method of gramming follows very of rectangular coordinate geometry and aU covered in this chapter.
MACHINE GEOMETRY Machine geometry is the tween the fixed point of the a/the part. TypicaJ machine uses hand coordinate system. and negative is determined by an VIewing conit is always the vention. The basic rule for the Z along which a simple hole can machined Wilh a sinpoint tool, such as a drill, reamer, or a laser beam. Figure 4-8 illustrates the standard orientation of an type machine tools. TTlU,' TlU,,",
UH'"",,,,'VlI
• Axis Orientation - Milling A typical 3-axis machine uses controlled axes of motion. They are defined as and the Z X to of the is parallel to dimension the Z axis is the spindle movement. On a longitudimachining center, the X axis is 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 Standard orientation of planes and eNe machine tool axes
the Z axis is the spindle direction. horizontal machining centers, the terminology is changed due to the design of these machines. The X axis is table longitudinal direction, the Y is the column direction the Z axis is the spindle direction. Horizontal machine can be as a machine rotnted in space by ninety degrees. The additional feature of a horizontal machining center is the indexing B axis. Typical machine axes applied to CNC vertical machines are illustrated in 4-9.
r~~"'-""""
TOP VIEW
ISOMETRIC VIEW
Figure 4-9 Typical machine axes of a vertical eNe machining center
• Axis Orientation· Turning Most CNC lathes have two axes, X and Z. More axes are available, but they are not important at this point. A special third axis, the C axis. is designed for milling operations typical CNC lathe. (live tooling) and is an option on What is more common for CNC lathes in industry, is the double orientation of axes. Lathes are distinguished as front and a rear lathes. An example of a lathe is similar to the conventional engine lathe. All the slant bed types a lathe are the rear kind. Identification of the axes have often not followed principles.
Another variety. a venical CNC lathe, is basicaHy a horiand zan tal lathe rotated 90 0 • Typical axes for the vertical machine axes, as applied to turning, are illustrated in Figure 4-10.
• Additional Axes A CNC machine of any type can designed with one or more additional axes. normally designated as secondary axes using the U, V and W letters. These axes are normally parallel to primary X, Y and Z axes respectively. For a or an indexing applications, additional axes rotated about the are defined as A, B and C axes, as X, Y and Z axes, in their respective order. Positive direction of a rotary an indexing) is direction required to advance a right handed screw in the positive X. Y or Z axis. The relationship of the primary and the secondary (or supplementary) axes is shown 1.
Primary axes __ Secondary axes Arc center 1..\--+---+--+--+--+ - - vectors Rotary axes ,
X axis related
Yaxis related
I
Zaxis related
4-11 Relationship of the primary and the sec:oncfarv
axes
center modifiers (sometimes the arc center vectors) are not true axes, yet they are also to the primary axes This subject will described in the section on Circular Interpolation, in Chapter
CONTROL SYSTEM A unit equipped witn a control system is commonly known as a an analogy of the machine tool as the system, control unit is its are no levers, no knobs and no machine the way they function on COniVCr1lIIO£ and lathes. All the machine and hundreds of other tasks are by a programmer and controlled by a computer that is maof the CNC unit To make a program for a CNC machine tool means to make a program for system. the machine tool is a major as well, but it is the unit thai of the prostructure and its syntax.
In order to fully understand CNC programming process, it is important to understand not only the intricacies of to machine a pan, what tools to select, what speeds to use, how to many other features. It is equally the computer, the CNC unit, actually to be an expert in electronics or a I shows an actual Fanuc control The machine own panel, with all the and button needed to operate the CNC machine and all its features. A typical operation panel is illustrated in Another item required 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. if the program itself tons and keys are by control over the program "''''''''''''''.'''
a brief look at any reveals that there are two basic components - one is operation paJlel, full rotary switches, toggle and push buttons. The other component is the display screen with a keyboard or a keypad. The programmer who does not normally work on CNC machine will if ever, have a reason to use the operation panel or the display screen. They are machine operator. and at the machine to the the as well as to control the activiof the machine.
• Operation Panel Depending on CNC machine, ing table covers most typical and common found on the modern operation panel. There are some of a machining center a differences for the but both operation are similar. As with any reference book, it always a good idea to double with specifications and recommendations. It is common machines In have some special
maShould the CNC interested in chine operation? Is for the to know and understand all of the conlIol system? is only one answer to both questions - definizely CYCLE
x
z
y
o
D
ERRORS
ALARM
MOO M01 M30
4
o
0
o
0
OPTIONAL STOP
M-S-T LOCK
ON
BLOCK SKIP ON
@
@
@
OFF
OFF
OFF
MACHINE LOCK ON
ON
OFF
DRY RUN ON
@
@
OFF
OFF
OFF AUTO
ID MDI
70 60 50
175
TAPE 150
125 1
80 60 40 30 20 15 10
EDIT
MODE Y
Z
X
20
10 0
600 - 800 1000 1200 1500 2000 4000
0
90
4030
400
5
80
ccw
D
EDIT
...!
,-_._-
80
OVERRIDE %,
N
90
110
0
120
CYCLE START
OVERRIDE %
Figure 5·2 A typical operation panel of a CNC macnmlllO center actual
FEEDHOLD
AUTO
features wiN vary on different models
EMGSTOP
CONTROL
21 Description
Feature
ONI switch Start Emergency Stop
Power and control switch for the main power and the control unit
AUTO Mode MEMORY
Starts program execution Or MDT command
mode
all machine and turns off power to the control unit motion of all axes
Feedhold
Single Block
Allows program run one block at a time
Optional Stop
Temporarily stops the program execution (MOl required in program)
Block Skip
Ignores blocks preceded with a forward slash (I) in the program Enables program testing at fast
mode
EDlT
MANUAL Mode JOG Mode
Memory Access
Spindle Override
Overrides the programmed spindle usually within 50-120% range
Error lights
Feedrate Override
Overrides the programmed feedrate, usually within 0·200% range
Chuck
Shows current status of the chuck
Clamp Clamp Coolant Switch
(Outside I Inside Shows current status of table
Allows program execution from the memory of the CNC unit Allows program execution from an external device, such as a desktop
computer or a punched tape Allows to bt: made to a program stored in the CNC memory Allows manual Selects
mode for setup (switch) to allow program editing
Red
an error
is some may not be listed, vinual\y all of table are somewhat related to the CNC proMany control systems unique of their own. These features must known to The program supplied to the machine should not rigid - it should 'user friendly'. those in
• Screen Display and Keyboard Coolant control ON I
I AUTO
Gear
Shows current status of working
Selection
gear range selection
Spindle Rotation
Indicates spindle rotation direction or counterclockwise)
Spindle Orientation
Manual orientation of [he spindle
Tool Change
Switch allowing a manual tool
Position
Switches and relating to setup of the machine from reference position
Handle
Manual Generator (MPG). used for Axis Select and Handle Increment switches
Tailstock Switch
switch to manually Tailstock and/or IJUOUI'v"1 the tails!ock
Indexing Table Switch
Manually indexes machine table
MOl Mode
automatic operations
RAPID Mode
feedrales (without a mounted part)
Dry Run
Description
Feature
setup mode
The screen display is 'window' to the computer. Any the program can be viewed, including the status control, current tool position, various offsets, parameters, even a graphic representation of the Tool Path. On all CNC units, individual monochrome or color screens can be selected to have the desired display at any time, using the inkeys (keyboard pads and soft keys). Setting for internationallanguages is also possible. The keyboard pads and soft keys are used to input instructions to control. can modified or deleted, new programs can Using keyboard input, not only the machine axes motion can be controlled, but the spindle speed and feed rate as well Changing internal evaluating various diagnostics are more specific means of control, often restricted to service people. Keyboard and screen are used to set program origin and to hook up to devices, as a connection with another computer. There are many other options. keyboard allows use of fers, digits and symbols for data entry. Not every keyboard allows the use of all the alphabet letters or all available symbols. Some control panel keys have a description of an operatiol1, rather than a letter, digit or symbol, example, 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 least increment of the control system. The official Fanuc name for the handle is Manual Pulse Gen.erator. Associwith the handle is the Axis Select switch duplicated on the operation as well as on the handle) and is the least increment X I, X 10 the range of increment X I(0). The X in this case is the multiplier and stRnds for limes'. One handle division will move the seaxis by X times the minimum increment of the active of measurement. In Figure and the following table are the details a typical handle.
y X
Z ...... AXIS SELECT
x1 x10 x100
The CNC unit is more than a sophisticated spepurpose computer. 'special purpose' in this case is a computer capabll' of controlling the of a matool, such as a lathe or a machining center. It means the computer to designed a company has expertise in Ihis type of special purpose computers. Unlike many business types each CNC unit is made customer is typically maa particular customer. chine manufacturer, not the end user. The manufacturer certain requirements that the control system to requirements that reflect the uniqueness of the machines they build. The basic conlrol does not change, but some customized features may added taken away) for a specific the system IS to the manufacturer, more features are added to the system. They mainly relate to the design capabilities of the machine. A example is a CNC unit for two machines that are the same in all except one. One a 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 parameters. Some of the in this handbook is quite ~pecialized 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.
5~3
An example of a detached handle, called the Manual Pulse Generator (MPG), With a typical fayout and features. Layout and features may vory on different machine models.
When (he parameter screen is displayed, it shows the rameler number with some data in a row. Each row numone bYle, digit in the is called a word bit is the Binary digiT is smal unit of a parameter input. Numbering starts with O. from the to the left:
II
One handle division motion is ...
Handle Multiplier
Xl Xl0 Xl00
Metric units
" "
:
for English units The Fanuc control system parameters belong to one of three groups, specified within an allowed range:
0.001 mm
.0001 inch
0.010 mm
.0010
o
0.100 mm
.0100 inch
o
Units inputs
o
Setting values
codes
CONTROL SYSTEM
The groups use different input values. binary input can only have an input of a 0 or I for the bit data format, 0 10 +127 for byte type. Units inpur has a broader scope the unit can in mm, mmimin, in/min, milliseconds, etc. A value can also be specified within a given range, for example, a number within the of 0-99, or 0-99999, or + 127 to -127, etc .. A typical example of a binary input is a selection between two options, instance, a feature called dry run can set only as effective or ineffective. To select a ence, an arbitrary bit number of a parameter has be set to 0 to make the dry run effective and to I to make it ineffective,
UniTs inpur, for example, is used to selthe increment system - 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 menL Another example is a parameter selling that stores the maximum feedrate each axis, the maximum spindle speed, etc. Such values must never be set higher than the machine can support. An indexing axis with a minimum crement of 1°, will not become a rotary with ,00 I 0 increment, just because the parameter is selto a lower even if it is possible. Such a setting is wrong and can cause serious damage!
To better understand what the CNC system parameters can do, is an abbreviated Ilsting of parameter classififor a typical comrol system (many them are meaningful to the technicians only); Parameters related to Setting Parameters related to Axis Control Data Parameters related to Chopping Parameters related to the Coordinate System Parameters related to Feedrate l-':::Ir'Am;::tT",r<: related to Acceleration/Deceleration Control Parameters related to Servo Parameters related to DVDO Parameters related to MOl, EOIT. and CRT Parameters related to Programs Parameters related to Serial Spindle Output Parameters related to Graphic Display Parameters related to I/O interface Parameters related to Stroke Limit Parameters related to Pitch Error Compensation Parameters related to Inclination Compensation Parameters related to Straightness Compensation Parameters related to Spindle Control Parameters related to Tool Offset Parameters related to Canned Cycle Parameters related to Scaling and Coordinate Rotation Parameters related to Automatic Corner Override 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
23 Parameters related to High-Speed Skip Signal Input Parameters to Automatic Tool Compensation Parameters related to T001 life Management Parameters related to Turret Axis Control Parameters related to High Precision Contour Control Parameters related to Service ... and other parameters Quite a parameters have nothing to do with daily programming and are listed only as an actual example, All system should be set or only by a qualified person, as an experienced technician. A programmer or operator should not modify any parameter settings. These changes require not only qualifications but authorization as well. Keep the list of control, in a safe place, just in case. settings away from
Many parameters are periodically updated program processing. The CNC operator is usually not aware that this activity is going on at aiL There is no real need to monitor this activity. The safest to observe is that once have set by a qualified technician, any temporary changes required for a given work should be done through the CNC program. If permanent changes are required, an authorized person should assigned to do them - nobody
• System Defaults Many parameter settings in the control at the time of purchase have been entered by the manufacturer as either the only the most suitable choices, or the most not mean they will be the common selections. That settings - it means they were selected on the their common usage, Many settings are rather conservative in values, for safety reas»ns. The set of parameter values established at the time of installation are called the default seHings. The English word 'default' is a derivative of a word 'defalu', that can be translated as 'assumed'. When main to the control is turned on, there are no set values passed to parameters from a program, since no program has yet been used. However, certain active automatiwithout an external program. a culler radius offset is automatically canceled at the startup of (he control system, Also canceled are the fixed cycle mode and tool length offset. The control 'that certain conditions are preferable to others, Many operators will agree with most of these initial settings, although not necessarily with of them. Some settings are customizable by a of a parameter settings. Such settings will . . """"''''''A permanent and create a /lew 'default'.
24
5
A computer is fast and accurate but has no intelligence. People are slow and make elTors, but have one unique ability - they think. A computer is just a machine that does not assume anything, does not consider, does not feel computer does nOl think. A computer not do anything that a human effort and ingeolli.ty has not during the design process, in form of hardware and software. When the the software sets certain existing to their default condition, by engineers. Not all system parameters, only parameters can have an assumed condition - a condition that is known as the default value (condition). example, a tool motion has three basic modes - a rapid motion, a linear motion and a circular motion. The default motion is controlled by a parameter. Only
one setling can be active at the startup. Which one? The answer depends on the parameter setting. Many parameters can be to a desired state. Only the rapid or the linear mode can be set as default in the example. Since the rapid motion is the first motion in {he program, it seems to make sense La make it a default wail' Most controls are set (0 the linear motion as Ihe default (GO I command), to be in at the start - strictly for safety reasons. When the machine axes are moved manually, the parameter selling has no effect. If a manual input of an axis command value takes place. either through the program or from the control panel, a tool motion results. If the motion command is nm specified, the system will use the command mode that had been preset as the default in parameters. the default mode is a linear motion GO I, the is an error condition, faulting the system for the lack of a Jeedrate! is no cutting feed rate in effect, which the GO I requires. Had the default setting been the rapid motion GOO, a rapid motion would be performed. as it 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.... defaults for similar controls should be the same.
Modem methods measuring memory capacity prefer to use bytes as the unit, rather that a length of an obsolete tape. A byte is the smallest unit of storage capacity and is very roughly equivalent to one character in the program. The memory capacity of the control system should enough to store the longest CNC program '"''',. . '''£'''''''' on a regular basis. That requires some planning machine is purchased. example, in three dimensional mold work or high speed machining, the cost of additional memory capacity may very high. Although any cost is a relative term, there are reliable and inexpensive alwell worth looking into. One alternative is running the CNC program from a personal An communication software and cabling is required to connect the computer with the CNC system. simplest version is to transfer the CNC program from ODe computer to the other. More sophisticated possibility includes software and cables that can actually run the machine from the personal computer, without luading it 10 the memory of CNC first This method is often called 'dripleeding' or 'bitwise input', When operfrom the personal computer, the CNC program can be as long as the capacity of the storage device, typically the hard drive.
Most CNC programs will fit into the internal memory of control system. Many controls use the of available or the equivalent length of are some formulas that can be used to get at least the approximate memory capacity calculations: C) Formula 1 :
find the program length in meters,/When the capacity is known in use the following formula:
n>Jl
~
Sm = Storage capacity in meters No = Memory capacity (number of characters)
• Memory Capacity CNC programs can be stored in the control size is only limited by the capacity of the control. capacity is in a variety of ways, originally as the equivalent length of tape in meters or feet, lalely as the 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 somehow 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 can be added to the control system. The minimum memory capacity the control varies from one machine to anotheralways control specifications carefully. ",rr\('l""'1"1"1
where ...
C) Formula 2 .
To find the length program in/eel. when the capacity is known in charaCters, use the following fOlTnula:
IG'i"
where ...
5, Storage capacity in feet No :: Memory capacity (number of characters)
CONTROL SYSTEM
~ Formula 3 .
To find the number of characters in a given program, if the system memory capacity is known in meters:
lIE where ...
C Number of available characters m == Memory capacity in meters
Virtually the same results can be achieved by a slightly restructured formula:
2S block are processed as a single inSlrllClion. The blocks are received by control system in sequential order, from the top down and in the order they appear in the program. NormaDy, a CNC machine is run in a continuous mode, while blocks are processed automatically, one after another. 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 sinblock only one block of the program will be is On the optime the C)'cle eration panel, the single block mode can used separately that make or in combination with other provmg and more accurate.
• feedhold
Q Formula 4: To find
of characters, if the system memory is known in feer, use the following formula:
IGf' where ...
C f
=
Number of available characters == Memory capacity in feet
Latest controls show the available memory as the number of free screen display pages. This type of data is not easy to convert as the others. In cases the available memory capacity is too small to accept a program, several techniques are available to minimize the problem, for example, the prolength reduction methods, in Chapter 50.
MANUAL PROGRAM INTERRUPTION If a program needs Lo interrupted in the middle of processing, the control system offers several ways to do that, the operation panel. The most common features of this type are toggle or push buttons for a single block operation,feedhold and the emerge/lcy SlOp.
• Single Block Operation normal purpose of a program is to control the machine tool automatically and sequentially in a continuous of commands mode. Every program is a or instructions - written as individual of code, blocks. Blocks and their conct!pts will be described in the following chaplers. All in a
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 motion, it will immediately SLOp the motion. action applies to all axes active at the lime. is convenient for a machine setup or a first run. Some types of molion the function of feedhold or disable it altogether. For example, threading or tapping modes make the switch inoperative. Activating feedhold at the machine will not change any other program values - it will only affect motion. The will illuminated (in light), as long as feedhold It IS The CNC programmer can override the feedhold from within the program, for special purposes.
• Emergency Stop Every CNC machine has at least one special mushroom push bUHon, red in color, that is located in an accessible place on the machine. It is marked the Emergency SLOP or E-Sl0p. When this buuon is pressed, all machine ac/ivities will cease The main power will interrupted and the will have to restarted. emergency stop switch is a mandatory safety feature on all CNC machines. Pressing the emergency stop button is not always the best or even the only way LO stop a machine operation. In fact, the latest controls offer other features. far less severe, designed to prevent a collision between a cutting tool and the part or fixture. Previously discussed feedhold button is only one option, along with other features. If the emergency stop must be used at all, it should be as the resort, when any other action would require unacceptably time. panic, if something does wrong. There is no need some machine the effect of Emergency Stop is not always apparent. example, the spindle requires a certain time deceleration to slap.
26
5
MANUAL DATA INPUT - MOl A CNC
is not always operated by the means of a
program. During a pan setup, the CNC operator has to do a number of that require physical movements of the machine slides, rotation spindle, tool change) etc. There are no mechanical devices on a CNC machine. The handle (Manual Pulse GeneralOr) is an electronic, not a unit. In to operate a CNC machine without conventional mechanical devices the control system fers a feature eaHed the Manual DaTa inpUl - or MOL The Manual Data Input the input of a program into the system one program inSTruction at a time. If (00 instructions were to be input repeatedly. such as a would be very inefficient. long program, the During a setup and similar purposes, one or a few structions at a time will benefil from the MDL access the MDI !.he MDI key on the operation panel must be selected. That opens the screen display with the current status of the system. Not all, but the majority of codes are allowed in the MDI mode. Their is identical to the of a CNC program in written form, This is one area where the CNC operator acts as a CNC programmer. It is important that the operator is trained at least in the CNC programming, certainly to the point of being able to handle the setup instructions for Manual Data Input.
PROGRAM DATA OVERRIDE All CNC units are designed with a number of special rotary swttches that one common feature - they allow the CNC operator to override the programmed of the spindle or the programmed speed of axis motion. For example, a 15 in/min feedrate in the program produces a slight A knowledgeable operator will know that by increasing the feedrate or decreasing the spindle speed, the chaner may be eliminated. It is possible to Ihe or the spindle by editing the program, but this method is not very A certain 'experimentation' be necessary duri the actual cut to find the optimum value. The manual override switches come to the rescue, they can be by trial during operation. There are four override switches found on most control panels: o
Rapid feedrare override (rapid traverse) (modifies the rapid motion of the machine toof)
o Spindle speed override (modifies the programmed spindle T/min)
o
Feedrate override (cutting feedrate) (modifies the programmed feedrate)
o Dry run mode (changes cutting motions to a variable speed)
Override can used individually or together. control to make the work They are availahle on operator for both the operator and the programmer. does not need 10 'experiment' with speeds and feeds by constantly editing the program and tne programmer has a certain latitude in seuing reasonable values for the cuttino fcedrales and the spindle speed. The presence of the over~ switches is not a licence to program unreasonable cutllng values. The overrides are fine tuning tools only program must always renee! the machining conditions of the work. The usage of switches does nut make any program changes, but the CNC operator the port,unily to edit the program later to the optimum cuttmg Used properly, the switches amount of valuable programming time as can save a well as the setup time-at the CNC machine.
• Rapid Motion Override Rapid motions are selected in (he CNC by a preparatory command without a specified If a ma~hine is d~siglied to move at 500 in/min (12700 mm/min) 10 the rapId mode, this rate will never appear in the program. Instead. you call the rapid motion mode by ming a special preparatory command GOO. During program execution, all motions in the GOO mode will be at the manufacturer's fixed rate. The same program will run faster on a with high motion rating then on a machine with low rapid motion some During setup, the rapid motion rare may control for program proving. when high rapid rates are uncomfortab~ 10 work with. After the program had been proven, raptd rate can be applied at its maximum. CNC machines are equipped with a rapid override switch to allow temporary rapid motion settings. Located on the control panel, this switch can be st![ 10 one of the four as the percentage of the max Three of them arc mum rate, typically as 100%, 50% and 25%. By switching ~o one of them. the rapid motion rate changes. For example, )fthe maximum rapid rate is 500 inJmin or 12700 mm/min, the reduced rates are inJmin or 6350 mmlmin at the 50% selling and 125 in/min or 31 mm/min at the 25% setting. oflhe reduced rates is more comfonable to work with setup. The fourth position of the switch offen has no percentage and is identified as an F I or by n small symbol. In this seLting, the rapid motion rale is even slower than that Why is it not idenli fled as or 1 for example? The reason is simple - the control system allows a selection as to what the value will Jt may he a setting of between 0 and 100%. default seuin a is the mOSI logical - usually 10% of the maximum r:pid traverse rate. setting should never be higher than 25% can be done only through a setting of a system ler. Make sure that all persons who work on such a machine are aware of the
CONTROL SYSTEM
• Spindle Speed Override same logic used for the application the rapid rate override can be used the spindle speed override. The re-
quired
can be established during the actual
by using the spindle speed override switch, located on the control panel. For example, if the programmed spindle speed of 1000 rlmin is loa high or LOa [ow, it may be changed temporarily by switch. the actual cutting, the CNC operator may experiment with the spindle speed switch to tind the optimum speed for the given cutting conditions. method is a much faster thall 'experimenting' with the program values. spindle speed switch can on some controls or selectable in increments of 10%, typically 50-120% of the programmed spindle within the A programmed at 1000 r/min can be overridden during machining to 500, 600, 700,800,900,.1000, 1100 and! 200 r/min. This range allows the CNC operator flexibility the spindle rotation to suit the CUlling conditions. is a catch, however. The optimized spindle speed chnnge may apply \0 only one tool of Ihe many used in the No CNC operator can be to watch for that tool and switch the speed up or down when A simple human oversight may ruin the part, the cutting 1001 or both. recommended method is to find out the optimum speed for 1001. write it down. then change the program so all the tools can be at the 100% spindle override for production. on the Comparison of switch with the increments on switches for the rapid traverse override earlier) and the feedrate ",,,,,,.lt1,, next), more limited The reason spindle speed range of 50% to I is safety. illustrate with a rather example. no operatOr would want La mill, drill or cut any material at 0 spindle rotation), possibly combined a heavy feedrate. ]n to into 100% speed in the program, D. new spindle has to be calculated. If a programmed spindle speed of 1200 rlmin a tool is always set to 80%. it should be edited in the \0960 r/min, then at 100%. The formula is quite pie: /'
~
where ... So ::::: Optimized - or new r/min Sp
p
=
Originally programmed r/min Percentage of spindle override
Overriding the programmed spindle speed on the CNC machine should have only one purpose to the spindle rotation for best cutting conditions.
• Feedrate Override The most commonly used override switch is one that FOT milling controls, changes the feed rate programmed in in/min or mlmin. lathe controls, the feed rate is programmed in itt/rev or in mnt/rev. The [ceurate per minute on is used only in cases when the spindle is not rotaling and the needs to be controlled. The new feedrate calculation, based on the selling, i~ similar to that for spindle speed:
""A/~r""'"
~
where ... Fn
=
Fp p ==
Optimized - or newOriginally programmed tP'j>,fifl'llh"
Percentage of feedrate
can overridden within a large range, Iypically from 0% to 200% or at least 0% to 150%. When the '·"'"..n ...... ,.,. override is set to 0%, the CNC machine will stop the cutting motion. Some CNC machines do nOI have the 0% percent setting and start at 10%. maximum of 150% or 200% CUlling feedrate will cut I or than the value. There are situations, where the use of a feed rate would the pari or the cutting tool - or both. Typical examples are various tapping cycles and single point threading. These operations require spmdle rotation synchronized with the feed rate. In such cases. ineffective. The override will override will effective. if standard motion commands 000 and GO I are used to program aoy lapping or tread cutting mOlions. poimilireading command G32, tapping fixed cycles and G84, as well as lathe threading cycles 092 and 076 havc the feedrate override cancellation built into the software. All these and other related are dein the handbook, in more
• Dry Run Operation Dry run IS a special kind of override. II is activated from 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 place when the dry run is in effect. What is Ihe purpose of the dry run and what are its tits? Its purpose is to test the integrity of program The benefits are CNC operator cuts the first mainly in Ihe time saved during program proving when no a dry run. the part is normachining takes place. mally 1101 mounted in the lfthe part is mounted in
5
the device and dry run is used as well. it is very important to provide sufficient clearances. Usually, it means moving the tool away from the parr. program is then executed 'dry', without actual cutling. without a ant, just in the air. Because of the heavy feed rates in the dry run, the part cannot he machined safely. a run, the program can be checked all possible errors except those that to the actual contact of the tool with the material. The dry run is a very efficient setup aid to all integrity of the CNC program. Once the is proven during a dry run, the CNC operator can concentrate on sections of the program that contain actual machining, Dry run can used in combination with features of the operation panel.
• Sequence Return Sequence Return IS a function controlled by a switch or a key on the control panel. purpose is to enable the CNC operator to start a program from the middle of an intermemorupted program. Certain programmed functions (usually the last and feed), have to be Input by the Manual Data Input key. The operation of this function is closely lied to the machine tool design. More formation on the can be in the machine tool manual. This function is very handy when a tool breaks during processing of long programs. It can save valuable production time, if properly.
• Auxiliary Functions lock ore three available to the operation of a CNC machine that are part of the 'auxiliary junctions' group. These functions are:
• Z Axis Neglect Another very useful tool for testing programs on CNC machining centers (not lathes) is a toggle switch located on the operation panel called the Z Axis Neglecr or 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 used to profile a of the part most common contouring operations), would make no sense to temporarily cancel either one of axes. neglecting (disabling) Z temporarily, CNC operator can concentrate on the of the part contour, without worrying about the depth. Needless to say, this method of program testing must take place without a mounted part (and normally without a coolant as well), Be careful here! It is important to or disable the switch at (he right time. lf the Z axis motion is disabled before the Cycle Start key is all following Z commands will ignored. If motion is enabled or disabled during program ",.I"\"I'C<'_ ing, the position the Z may inaccurate. Z switch may be in bolh manual and automatic modes of operation, Just make sure that the motion along the Z axis is returned Lo the enabled mode, once the program proving is Some CNC machines require resetting of the Z axis position
+ Manual Absolute Setting If this feature is on the control (some controls use it automatically), it (he operator to resume a program in the middle of Manual absolute can save particularly wIlen processing long Manual Ahsolure setting switch is not a typical some extent, it is functionally to the Sequence Return setting. Check machine tool documentation using either of these two features.
Miscellaneous functions lock
Locks M functions
Spindle functions lock
locks S functions
Tool functions lock
Locks T functions
described in this chapter, auxiliary functions generally relate to the technological aspects of the CNC They control such machine functions as spindle rotation, spindle orientation, coolant selection, tool changing, indexing table, pallets and many others. To a lesser degree, they also control some program functions, such as compulsory or optional program SLOp. subprogram flow, program closing and others. When auxiliary functions are locked, machine related miscellaneous functions M, all spindle functions S all 1001 functions T will be suspended. Some machine 1001 manufacturers the name MST Lock rather than Auxiliary Functions Lock. MST is an acronym the first letters from the words Miscellaneous, Spindle and Tool, LO the program functions that will be locked. The applications of these locking funclions are limited to the job setup and program proving only and are not used for production machining.
• Machine lock Machine Lock function is yet another control feature So far, we have looked at the Z axis Neprogram provi glect function and the locking of the auxiliary functions. Neglect function will the Remember that the Z motion of the Z axis only and the Auxiliwy Functions Lock (also known as Ihe MST lock) locks the miscellaneous functions, the spindle functions lool Another 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
a locking all the tool motions, but there is a good reason to use this It CNC operator the chance to test the program with virtually no chance of a collision. When the machine lock is enabled, only the axis motion is locked. All other program functions are mally, including the tool and spindle used alone or in combination with This function can other functions in order to dlscover possible program errors. Probably the mostlypical errors are errors and the various toot offset functions.
• Practical Applications Many of the control features described in used in conjunction with each other. A is Run used in conjunction with the Z Neglect or the Auxiliary Functions Lock. By knowing what function are available, the CNC operator a to needs of the moment There are many areas of equal imporlance on which the CNC operator has to concentrate when setting up a new or Many lures of the control unit are to the operator's easier. They allow concentration on one or two items at than (he complexity of the whole program. in a reasonable These have now is the lime to look at some practical applications. During the initialization of a new program run, a good CNC operator will take certain precautions as a maHer of facL Forexample, the first part of the job will mosllike!y be tested with a rapid motion set to 25% or 50% of the available rapid rate. This relatively slow setting allows the operator to monitor the integrity of the program processing, as well as specific details. The details may include items such as a possibility of insufficient between tool and the material, checking if the Path looks reasonable, and so on. The CNC operator will have a number of tasks to perfonn simultaneously. Some the Lasks include monitoring the spindle feed rate , tool motions, tool changes, coolant, etc. A careful and conscious approach results building the confidence in the integrity of the CNC program. It may be second or even the third pan of the job when the CNC operator starts thinking of the optimization cutling values, such as spindle speed and the culting This optimization will truly reflect the ideal speeds a particular workpiece under setup.
A production supervisor should not arbitrarily an override selling than 100%. Many consider the CNC program as an unchangeable document They the attitude that what is wrilten is infallible - which is not always true. Often, the operator may no other choice bur 10 override the programmed values. What is mosl imporranl, is the modification the program that reflects the optimized cutting conditions.
29 the machine operator finds what values must be changed in the program itself, the program must edited to reflect these changes. Not only for the job currently worked on, but also for repetition of the job in Ihe fulUre. After all, it should be the goal of every programmer and CNC operator to run any job at one hundred efficiency. This efficiency is most likely as a comoperator and the programmer. A good bined effort of CNC programmer will always make the effort to 100% efficiency at desk and then improve the even
SYSTEM OPTIONS Optional features on a system are like options on a car. Whal is an option at one dealership, maybe a feature at another. Marketing and corporate philosophies have a lot to do with this Here is a look al some conlrol features Ihal mayor may nol be as optional on a system. BUI some important disclaimer first: This handbook covers the subject matter relating to the majority of control features, regardless of whether they are sold as a standard or an optional feature ofthe system. It is up to the user to find out what exact options are installed on a particular control system.
• Graphic Display Graphic representation of the tool path on the display screen is one of most important, as well as sought after, control options. Do not confuse (his oplion with any type of conversational programming, which also uses a ,..,.,."'''.~ tool path interface, In the absence a computer programming (CAM), a display on the conLrol panel is a major benefit. Whether in monochrome or in color, the convenience of seeing the 1001 motions before acmaChining is much appreciated by CNC and alike.
A typIcal graphics option shows the axes and two cursors for zooming. When the tool path is tested, individual tools are distinguished by different colors, if available or different intensity. Rapid motions are represented by a dashed line lype. cutting motions by a line lype. If the graphics function is applied during machining, the lool motions can watched on the display screen very helpful CNC machines oily and scratched safety shields. Upwards or downwards the display allows for evaluation of a tool motion or detail areas. Many controls include actuallOol path simulation, where the shape of the part and cuLting 1001 can be set first, then seen on the screen.
Chapter 5
• In-Process Gauging During many unattended machining operations, such as in manufacturing cells or Agile manufacturing, a periodic checking and adjusting dimensional tolerances of the part IS imperative. the cUlling 1001 wears out, or perhaps because causes, the dimensions may fa!! into the 'out-of-tolerance' zone. Using a device a suitable quite a satprogram, the In-Process Gauging option isfactory solution. The CNC part program for the In-Process Gauging option will 'Some quite unique written and will formal features - it will be using another option of the control system - the Custom Macros (somt!iimes called the User Macros), which offer variable lype I f a company or a CNC machine shop is a user of the InGauging option, there are good chances that other to the CNC control options are installed and programmer. Some of Ihe most typical options are probing software, tool life management. macros, etc. This technology goes a lillie too far beyond standard CNC programming, although it is closely related and frequently used. Companies that already use numerical control technolwill be well advised to look into these options to recompetitive in their lield,
• Stored Stroke limits Definition an area on a CNC lathe or a on a \0 work within, can be stored machining center that is as a control system sTored stroke limit. These stored stroke are designed to a collimachine tool sion between the cutting tool and a fixture, or the part. The area (2D) or the cube (3D) can be defined as either enabled for cutler entry or disabled for the cutor, if ler entry. It can set manually on the able, by a program input. Some controls allow only one area or cube to be defined, others allow more. unit a When this option is in effect and the motion in (he program that takes place within the forbidden zone, an error condition results and the machining is interrupted. A typical applications may include zones occupied by a tuilstock, a fixture, a chuck. a rotary table, even an unusually shaped part.
•
Drawing Dimensions Input
An option that seems somewhat is the programming method by using input of dimensions from an engineering drawing. The ability to input known coordinates, radii, chamfers and given angles directly from the drawing makes it an attractive option. This ability is somewhat by poor program portability. Such an option must be installed on all in the shop, in order \0 use the programmed features efficiently.
• Machining Cvcles Both the milling and the turning controls offer a variety of machining cycles. Typical machining for milling operations are calJedfixed cycles, also known as the canned cycles. They simplify simple poinl-Io-point machining operations such as drilling, reaming, boring, backboring and CNC cycles for face ing, pocket milling, patterns, etc. CNC lathes have many machining cycles available to remove material by roughing, profile finishing, facing, taper cutting, grooving and threading. Fanuc conlrols call cycles Multiple Repetitive Cycles. Allihese are designed for programming and faster dlanges at the machine. They are built in Ihe conlrol and cannot be changed. Programmer supplies the cutting by using approduring the program priate cycle call command. All the processi ng is done automatically, by the CNC system. Of course, there will always special programming that cannol use any cycles and have to be programmed manually or with the use of an external computer.
• Cutting Tool Animation Many of the graphic tool path displays delined earl icr, are represented by simple lines and arcs. The currenltool posiline or arc endpoinl on tion is usually the location of screen. Although this method of displaying the motion of the CUlling tool graphically is certainly useful, there are two to il. The of lhe cutting tool and the material being removed cannot be seen on the screen and a 1001 path simulation may help a bit. Many modern controls incorporate a feature called CUllillg Tool Allima~ lion. If on the il shows Ihe blank of the part, the mounting device and the tool shape. As the program is executed, the operator has a very accurate visual aid in program proving. Each graphic element is by a different color, for even a better blank the mounting device and preset for exact proportions and a variety tool shapes can be stored for repetitive use. This option is a good example of CAD/CAM-like features built into a stand-alone control system.
• Connection to External Devices The CNC computer Caft be connected to an external usually another computer, Every CNC unit has one or to more connectors, specifically designed for peripheral The most common is RS-232 (EIA standard), designed for communications between two computers. Setting up the connection with external is a specialized application. The CNC operator uses such a connection to transfer programs and other seltings between two computers, usually for slorage and backup purposes.
PROGRAM PLANNING The development of any CNC program begins with a very carefully planned process. Such a process starts with ng drawing (technical print) of the required part released for production. Before the part is machined. several have (0 be considered and carefully evaluated. The more effort is put inlo stage of the program, the results may be at the
drawing The initial part information is not limited to and the material - it also conditions not covered in the drawing, as pre- and machining, grinding allowances, features, requirements for hardening, next machine setup, and others. Collecting all this information provides enough (0 start planning the program.
STEPS IN PROGRAM PLANNING
MACHINE TOOLS fEATURES
The required in program planning are decided by the nature of the work. There is no useful fonnula for all jobs, but some basic should considered:
No amount initial information is useful if CNC is nOI suitable for job. program nlng, programmer concentrates on a parlieu/ar machine a particular Each part has to be tool, (he machine has LO large to handle the of the part, the pan should nOl be heavier than the maximum weight allowed. control system must be capable to provide the needed path, so on.
o Initial information / Machine tools features o
Part complexity
o
Manual programming /
.nfTmllr...
programming
o Typical programming procedure drawing /
CJ
o
data
Methods sheet / Material specifications
o Machining sequence o
Tooling selection
o
Part
o Technological decisions o Work sketch and calculations o Quality considerations in CNC I'IT/'Inflllmrn"nn steps in the list are suggestions only - a guideline. be adapted for job and to the specific conditions the work.
are quite tlexible and should
INITIAL INFORMATION Most drawings define only shape and of the completed part and nonnally do not specify data about the Initial blank material. For progrnmmi a good knowledge of the is an essential start - mainly in terms of its size, type, shape, condition, han.lness, etc. The and material data are the primary information about the part. At (his point, program can be planned. objective of such a plan is to use the inilial information and establish the most efficient method of machinmg. with all con- mainly part accuracy, productivity, san~ty and converHcnce.
In most cases, the CNC equipment is already available in the shop. Very companies go buy a new CNC machine just to suit a particular job. Such cases are rather rare and happen only if moke economic scnse.
• Machine Type and Size The most important considerations in planning machine, partIcularly are the type and the size the ils work or work area. Other equally' machine power rating, spindle speed number of 1001 stations, 1001 changing system, accessories. etc. Typically, small CNC mahave higher spindle speeds lower power large machines lower spindle speeds available, their power
• Control System The control system is the of a CNC Being familiar wilh all standard and oplional features availableren all controls is a must. This knowledge allows use of a variety of programml as machining subprograms, macros timesaving features a modern CNC system. A programmer not to physically run a CNC machine. Yet, the programs will become better and more with good understanding of the machine and its control system. Program development programknowledge of the CNC machine operation.
31
32
Chapter 6
of the main concerns in program plannin o should be the operator's perception of the . To a la~ge degree, such a perception is quite subjective, in (he sense that
operators will express their personal preferences. On the other hand, every operator appreciates an error-free, well documented and professionally part p.rogram, consistently and one after A poorly deof Signed program is disliked by any operator, personal
PART COMPLEXITY
• Disadvantages There are some disadvantages associated with manual Perhaps the most common is the length of reqUIred to actually develop a fully functioning CNC program. The manual calculations, verifications and other related activities in manual programming are very time Other also very high on the list, ~re a large percentage of errors, a lack of tool path verification, (he difficulty in making to a and many others. program~ing.
• Advantages At the drawing, material and the available CNC equipment are the complexity of the ming task become,s much How difficult to program the part manually? What are the capabilities of machines? What are the costs? Many questions have to be before starting the Simple progr(lmming jobs may be assigned to a experienced or the CNC operator. It makes sense from management perspective it is a good way to gain experience. will from a computerDifficult or ized programming 'technologies such as Computer Aided Design (CAD) and Computer Aided Manufacturing (CAM) have been a part of the manufacturing cess for many years. The cost of a CAD/CAM system is only a fraction of what il used to be only a few years ago. small shops now find that the benefits offered bv modern technology are too significant to ignored. programming systems are availahle various computers and can virtually job. For a typical machine shop, a Windows based programming soft ware can very benefiA typical example of this kind of application is the popular and powerful Masfercam™, from CNC Software, Inc., Tolland, are others.
On positive side, manual part programming does have qUi,le a few un~atched qualities. Manual programming is so Intense that It requIres the total involvement the CNC programmer and yet offers virtually unlimited freedom in the development of the program structure. Programming it teaches a manually does have some disadvantages, tight discipline in program development. It forces the programmer to understand programming techniques to the lasl detail. In fact, many useful skills learned in manual programming are directly applied to CAD/CAM programmIng. Programmer to know what is happening at all times and why it is happening, Very important is the tn-depth understanding of every detail during the program development. Contrary to many beliefs, a thorough knowledge of manual programming methods is absolutely essential efficient management of CAD/CAM programming,
J
MANUAL PROGRAMMING Manual programming (without a computer) been the most common method preparing a program for many years. The fatest CNC controls make manual or gramming much easier than ever before by using repetitive machining variable type programming, graphic tool motion simulation, standard mathematical input and other time saving features. manual programming, all calculations are done by hand. with the aid of a pocket no programming i~ used. Programmed data can transferred to the CNC machine via a cable, an inexpensive desktop or a laptop computer. is and more rellable than other methods, Short programs can manually, by keyboard entry; directly at the machine. A punched tape to the popular media of the past but has virtually disappeared machine shops.
CAD/CAM AND CNC The nee~ for i efficiency and accuracy in CNC programming has been major reason for development of a variety of methods that use a computer Lo prepare part Computer assisted CNC programming has been around for.many years. in the form of language based programming, such as APyrM or Compact IITM. Since the late 1970's, CAD/CAM has played a significant role by adding the visual aspect to the programming process. The acronym CAD/CAM means Computer Aided Design and Computer Aided Manufacturing. The first three letters (CAD) cover the area of engineering drafting. "' ........ 'u .. '" three (CAM), cover the area crized manufacturing, where programming is only a sman whole subject of CAD/CAM covers much more just design. drafting and programming. It is a part of modern also known as ClM - Computer Integrated Manufacturing. In area of have major role for a long Machine controls have more sophisticated, incorporating latest techni,ques of data tool path graphics, machining can now be prepared with the usc
PROGRAM PLANNING
computers, using graphical interface. is no an even small machine can afford a systems are also programming system in house. popular because of their flexibility. A typical computerized programming system not have to be dedicated only to programming - all related tasks. often done by the pro""lnr'ln"l'''r can implemented on the same computer. For of example, cuning tool inventory managemenl, part programs, material information sheets, setup sheets and tooling sheets, etc. The same computer could also used for uploading and downloadIng CNC programs.
33 the price, may handle to an absolute If the control system can handle il, manual programming is the way to the ultimate control over such a project, when other methods may not suitable. with a well customized and computerized system, how can the program output be exactly as intended? How can the CNC operator change any part of the program on the machine, without knowing its and
• Integration The keyword in the acronym CIM is - integration. It 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 duplication. One of the most important rules of using a CAD/CAM computer software is:
When a drawing is made in a CAD software (such as AutoCAD), then done again in a CAM software (such as Mastercam), there is a duplication. Duplication breeds er-
rors. In order to avoid duplication, most of the CAD tems incorporate a transfer method of the design to the seCAM system to be for CNC programming. Typical transfers are achieved through special DXF or lOES files. The DXF stands for Data Exchange Files or Drawing and the IGES abbreviation is a Specification short form of Initial Graphics Once the geometry is transferred from the CAD system to the CAM system, only the tool path related process is needed. a kind of formatter), the computer will prepare a part program, ready to be loaded directly to the CNC machine.
• future of Manual Programming It may seem that the manual is on the cline. terms of actual use, this is probably true. il is necessary to keep in perspective that any computerized technology is on already well established melhof manual programming. Manual programming for CNC machines serves as the source new technology - it is (he very concept on which computeropens the programming is door for developmem of more powerful and soft~ ware applications. The manual programming may somewhat frequently today and eventually will be used even less - but knowing it well - really understanding it - is and always will the key (0 control the power of CAM software. are some special computers cannot everything. programming projects that a CAM software, regardless of
TYPICAL PROGRAMMING PROCEDURE Planning a CNC program is no different than any other - it must planning - at home, at work, or 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 as they develop, it also forces their solution before the next step can be taken. foHowing items form a fairly common and logical sequence of tasks done in CNC programming. The items are only in a offered for further This order may changed to reflect special conditions or working habits. Some items may be missing or redundant: 1. Study of initial information (drawing and methods) 2. Material stock (blank) evaluation 3. Machine tool specifications 4. Control system features 5. Sequence of machining operations 6. Tooling selection and arrangement of cutting tools 7. Setup of the part 8. Technological data (speeds, feedrates, etc.) 9. Determination of the tool path 10. Working sketches and mathematical calculations 11. Program writing preparation for to CNC 12. Program testing and debugging 13. Program documentation
There is only one in CNC program planning and that is the completion all instructions in the form of a prothat will result in an error-free, and efficient CNC machining. suggested procedures some changes for example, should the tooling selected before or after the pall setup is determined? Can the manual the part programming methods efficiently? worki sketches necessary? Do not be afraid to modify any so called ideal procedure either temporarily, for a given job, QT permanently. to reflect a particular CNC prostyle. Remember, there are ItO ideal procedures.
34
Chapter 6
PART DRAWING The parl drawing is the single most important document used in CNC programming. It visually identifies the shape, dimensions, tolerances, tinish and many other requirements for the completed item. Drawings of complex parts often cover many sheets, with different views, details and sections. The programmer first evaluates all the drawdata first, then isolates Ihose that are relevant for the development of a particular Unfortunately, many the actual CNC manufacdrafting methods do not turing They reflect the designer's thinking, rather than the method manufacturing. Such drawings are erally correct in technical sense, but they are harder to study by the and may need to 'interprered'to be of any in CNC programming. Typical examples are of a datum point methods of applying dimensions, that can be used as a program reference point and the view orientation in which the part is drawn. In the CAD/CAM environment, traditional between design, drafting and CNC programming mUSI be eliminated, Just as it helps the programmer to understand designer's intentions, it helps the designer to understand the basics of CNC programming, Both, the designer and the programmer have to understand other's methods and find common ground that makes the whole process of design and manufacturing ,...",,,"',."',.... and
title block supvisions. special instructions, etc. Data in ply crucial information for CNC programming can be used for program documentation to make easier cross Not all title block information is needed in programming, but may used for program documentation. Revision dates in a drawing are associated with the title block. They are important to the programmer, as they indicate how carrent is the version. Only the latesl ver" sian of part design is important to manufacturing.
• Dimensioning Dimensions on the part drawing are either in metric units. Individual dimensions can be a certain datum point or they can he from the previous dimension. Often, both types of dimensions are mixed in the same drawing. When writing the more to all conprogram. it secutive - or incremental dimensions intO datum - or absolute - dimensions. Most CNC programs benefit from drawings using datum, or absolute Similarly, when developing a subprogram for tool path translation, an incremental method of programming may ,be the right choice - and the choice depends on the application. The mosl common for CNC machines uses the absolute dimensioning method (Figure 6-2), mainly because of the editing ease within the CNC system.
----
• Title Block The title block 6- / - is typical to all professional infordrawings. lts purpose is to collect all mation related to the particular drawing.
170
a 170
By
,
110 .-
lI
bl Dr.:
Date:
Chk.:
Drawing number:
App .. 6·1 A title block 8xa'mDIB of an .mn,iflFlF!rinn drawing
and contents of a title block coman the eype of manufacturing and internal usually a recl.angular box, positioned in the corner of the drawing, divided into several boxes, The contents of the title block include such items as the pari name and part number. drawing number, material data, rc-
6-2 Program using ABSOLUTE dimensions Only one change in the program is necessary
With the absolute system of dimensioning, many program changes can be done by a single modification. Incremental method requires alleast two modifications. differences between the two dimensioning systcms cnn be compared in 6-2, using the absolute dimensioning using the incremental dimenmethod, and in word incremel1tal is more common in sioning CNC. in drafting the equivalent word would be relative. Both illustrations show the a) figure before revision, and the b) figure after revision,
PROGRAM PLANNING
35 ---,60
60
._",......:
al ."
70! ----.--' 40 ---' 60 ---
Figure 6-3
Program using INCREMENTAL dimensions Two (or more) in the program are necessary Fractions
Drawings in English units contain fractions, A tional dimension was sometimes used to identify a importam dimensional tolerances (such as :1:,030 inches from the nominal number of digits following (he mal point often indicated a tolerance (the more digits specified, the the tolerance range). methods are not an ISO standard are nO use in programming. Fractional dimensions have to be changed inlo their decimal equivalents, The number of decimal places in the is determined by minimum increment of {he conIroL A dimension of 3-3/4 is as and a dimension of 5-11/64 inches is programmed as 5,1719, its closest rounding. Many companies have upgraded their to the ISO system and to principles of CNC dimensioning. In this respect, drawings usthe metric units are much more practicaL Some dimensioning problems are related (0 an improper designers use of a CAD software. such as AutoCAD. do not change the default setting of the number of decimal dimension ends up with four decimal places (inches) or three decimal (metric), This is a poor practice and should be avoided. The best approach is to for all dimensions require them. and even use Geometric Diflumsioning and Tolerancing standards (GDT) ,
•
e
I
A drawing dimension specifies a hole as 075+0.00/-0.05 mm. What actual dimension should appear in the program?
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 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 using the tool wear available on most CNC systems, during machining is Such a manual acceptable. but when done too often, it slows down the production and adds to the overall costs. A particular programming approach can control the frequency of such manual adjustments to a great Consider the mm mentioned If il is an external diameter, the tool edge wear will cause the actual dimension during machining to become larger. In the case of an internal diameter, the actual dimension will become smaller as the CUlling wears out By programming X74,95 for the external (the bottom Iimil) or X75,O for the inlerna] diameter (the top limi!), the wear of the cutting will move into the tolerance range, rather than away it The lool offset adjustment by machine operfrequently. Another apator may still be required, but proach is to select the middle of the tolerance this method will also a positive effect but more manual adjustments may necessary during machining,
•
Surface finish
Precision parts require a certain degree of surface finish quality, Technical drawing indicates the finish for various features (he part drawings indicate the in micro inches, where micro inch =, 00000)", Metric drawings use specifications expressed in microns. where 1 micron:: 0,001 mm, Symbol for a micron is a Greek letter )1. Some drawings use symbols - Figure 6-4,
Tolerances
For quality machining work, most part have a range of acceptable deviaLion fTom the nominal size, within its system of reference, example, an English of +,0011-,000 will be different from a mel ric tolerance +0.1/-0.0 mm. Dimenmu,<;1 sions of this type are usually critical dimensions 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 following example for a CNC lathe:
Figure 6-4 Surface finish marks in a drawing: English (top) and metric (bottom)
36
6
The most important factors influencing the quality of surface finish are spindle speed, cutting tool radius and amount of material removed. Generally, a larger cuLter radius and slower contribute towards finer surface finishes. The time will be longer but can often be by elimination of any subsequent operations such as grinding, honing or lapping.
• Drawing Revisions Another important section the drawing, often overlooked by CNC programmers, shows the ..... ,,
Only the latest are important to the program development. Make sure the program not only reflects the current engineering design, but also is identified some unique way to distinguish it from any previous versions. Many programmers keep a copy of the part ing corresponding to the program in the files, thus preventing a possible misunderstanding later.
• Special Instructions
METHODS SHEET Some companies have a staff qualified manufacturing for determitechnologists or process planners of the manufacturing process. people dcvc\op a of machining . detailing the route of each part through the manufacturing steps. They allocate the work to individual machines, develop machining seand setup methods, tooling, etc. Their (routing that structions arc written in a methods accompanies the part through all of manufacturing, a is available, typically in a plastic folder. If copy should become a part of the documentation. One of purposes of a methods sheet is to provide CNC programmer with as much information as possible to shorten the turnover between programs. greatest advantage of a methods sheet in programming is its comprehensive covof all required operations, both CNC tional, thus offering a overview the turing process. A good quality methods sheet will save a lot of decisions - it is made by a manufacturing who specializes in work detailing. The ideal is one recommended manufacturing process closely matches establlshed part programming methods. For whatever reason, a large number of CNC machine shops does not use methods sheets, routing sheets or lar documentation. CNC programmer acts as a . . . as well. Such an environment offers a certain degree of flexibility but demands a large degree of knowledge, skills responsibility at same time. H ..' ' - ' ' - ' ' ' "
Many drawings also include special instructions and comments that cannot with the traditional drafting symbols and are spelled out mClleoemlenlly, in words. Such instructions are very important for CNC program planning, as they may significantly influence the example, an I"ll"mpn! the part is identified as aground or diameter. drawing dimension always shows thejinished In the program, this dimension muSI be adjusted for any grinding allowance necessary - an allowance by the programmer and written as a special instruction in the proAnother example of a special instruction required in program to machining performed part assembly. example. a certain hole on the drawing should be drilled and tapped and is dimensioned same way as other hole, but a special instruction indicates the drilling and tapping must done when part is during assembly. Operations relating to such a hole are not programmed and if any overlook of a small instruction in unusable pan. such as this, may Many drawing instructions use a special pointer called a Usually it is a line, with an arrow on the pointing towards ar~ that it to. For a leader may be pointing to a with the caption: ~12
- REAM 2 HOLES
is a has 12 mm
to ream 2 holes with a reamer that
MATERIAL SPECIFICATIONS Also important consideration in program planning is evaluation of the malerial stock. Typical material is raw and bar, billet, plate, forging. etc). unmachined Some may already premachined, routed from another machine or operation. It may solid or hollow, with a small or a amount to removed by CNC machining. The shape of the material the setup mounting method. The of malerial (steel, cast iron, brass, will influence not only the of cultools, but cutting conditions for machining as well.
• Material Uniformity Another important consideration, often neglected by and alike, is the uniformity material specifications Within a particular batch or from one batch to another. For a ' ordered two suppliers La slightly different
PROGRAM PLANNING
even A similar example is a macut into sjngl~ pieces on a saw, where the length of varies beyond an acceptable range. This inconsistency between blank parts makes programming more difficult and lime consuming. It also creates potentially unmachining conuiLions. If problems are encounthe best planning is to place emphasis on safety than on time. At worst, there will some air Ctming or needed cutting feed, but no cuts will be too heavy to handle. approach is to non-uniform material groups and make programs for each group, properly identified. The method is to cover all known predictable inconsistencies program control, for using the block skip function.
• Machinability Rating IS important aspect of machinability. Charts with SUj;(g<::ste:a feeds for major tooling most common in programming, parwhen an unknown is used, The suggested values are a starting point, and can be optimized later, when the material properties are known.
is given in units terms surface feet or CS), periphper minute; constant sUlface speed eml or just surface speed are For metric meters per mindesignation of the machinability ute (m/min) are used. In both cases, spindle speed (r/min) lOol diameter (for a or a given part a lathe) is calculated, common formuI-
37
MACHINING SEQUENCE Machining sequence Technical skill help in program some common sense sequence of proach is equally must have a logical example. drilling must programmed before roughing operations before second, etc. Within this finishing. first operation order, further of the order of individual motions is required for a particular tooL For example, in turning, a face cut may be on the part first, then roughing all material on wili take place. method is to program a roughing for the meter, then face and with of the diaa center drill for some but in another a drill may be a on which method is CNC programming assignment has to be considered individually, based on Ihe criteria of safety and approach for machining seis the evaluation of all In gen"'''~'''r''''''''' should be planned in a that the cutonce selected, wi1l do as much as possible, a tool On most CNC less time is np.p,(1p('l for positioning the tool than for a tool change. Another is in benefits by programming all heavy first, then the semifinishing or finishing operations. It may mean an extra tool change or two, but this method minimizes any shift of the material in the holding while machining. Another important factor is the current position of a tool when a operation is completed. For example, when a pattern 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
calculation, the
For a
Hole 4 Figure 6-5 Il3r'
where ... r/min
12 1000 fVmin
=
= =
mlmin = n: (pi) = D
Revolutions per minute (spindle feet to inches
""''''"1''''!'1' may have
meters to millimeters Peripheral speed in feet per minute Peripheral speed in meters per minute value of 3.141593 .... (milling) or (turning) - in inches or mm
verse
to
be
tools and the setup method. not be practical in subprograms.
Program planning is not an independent dividual - it is a very interdependent and cally coherent approach to achieve a certain
re-
6
TOOLING SELECTION tool holders and cutting is another important in planning a CNC category of tooling covers n lot more than Ihe cutting lools and 1001 holders - it includes an extensive line of including nufixlures, chucks, indexing tables, clamps, Cutting lools remany other holding attention, due to variety available In
selec-
cutting tool itself is tion. It should be selected by two o
Efficiency of usage
Q
Safety in operation
Many supervisors responsible CNC programming try to make the existing tooling work at all times. Often they the fact that a suitable new lool may do the job faster and more economically, A knowledge of tooling and its applications is a technical profession - the should know principles of cutcases, a tooling .."' ......&>~'~M tool applications. tive may provide additional assistance. of usage is also a The arrangement of subject of serious in CNC program planning. On CNC lathes, each tool is assigned to a turret station, making sure disTribution of lools is anced between short and tools (such as short tools versus long This is important for of a possible during CUlling or tool Another concern should be the order in which particularly for machines that indexing. Mos:t
where the
All tool offset and other program be documented in a known as the looling sheel. a document serves as a guide to the operator job resetup. It should include at least the basic 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 Another in program planning to setup - how to mount the raw or premachined material, how what supponing tools and devices should many operations are required to complete as machining sequences as possible, where (0 select a etc. is necessary and it should be done
are designed to more productive. Mulfispmdle '''''~'''III'''~ can handle two or more parts at the same tures, such as barfeeder for a lathe, an or dual setup on the table, added as well.
• Setup Sheet At this of program planning, once the setup is demaking a setup sheet is a good A setup sheet can a simple sketch, designed mostly the use at the machine, that shows the part orientation when mounted in a tool offset numbers by the program, idenlificaof course, all Other information in setup sheet to some establ ished planning stages of of clamps, bored jaws 1"I ...n"' ... <" Setup sheet and tooling can source of Information. Most ,"", ..,,,,.~h_ own various versions.
TECHNOLOGICAL DECISIONS The next stage of CNC "',." ...... ,,'"" lection of spindle speeds, application, etc. All tors will have their Influence. of spindle speeds is of the cutter and speeds and feeds. the help determine what amount can be removed ~afely, elc. Other factors (he program design mclude tool extensions, setup rigidity, culling tool material and its condition. Not to be overlooked is the proper selection of cutting fluids and lubricants - they, too, are 1ant for the part quality.
• Cutter
The key factor understanding this principle is to visualize the tool ",,,,,,\.1,,, not (he machine mOllon. most noticeable programming a machining to a lathe is the cutter rotation comIn both cases, the in terms of the cutter .nn,lJ111'U
PLANNING
39 require more than roughing and is to isolate the area that tool do both operations? Can all Is the lool wear a problem? the surface finish achieved? When programming ooncutting rapid motions, take the same care as with motions. A particular should be lO minimize tool motions and ensure '-UlIklll'"
Figure 6-6 Contouring too! path motion - as intended (lathe or miff)
The tool path all profiling tools has to into consideration the cutter radius. either by equidistant path center of the radius or ler radius offset. machines for milling and provided with linear interpolation and lar interpolation, all as features. To more complex paths, as a helical milling motion, a special option has to in the control unit Two of typical tool o
Point-to-paint
81so called
Positioning
o
Continuous
a/so called
Contouring
a point location operations, such as drilling, and similar operations; conrinuous path generates a profile (contour). case, the programmed data to the po~ition of the culter when a certain is This position is called the tool 6-7.
• Machine Power Rating Machine tools are power. Heavy cuts require more power than cuts, A depth or width of a cut that is too large can tool and stall the machine. Such cases are 1I1"1<~f"f"f'nl must be prevented, The CNC machine specifications the power rating of the motor at the machine rating is in kW (kilowans) or HP (horsepower). Formulas are available for power ratings, calculating removal rate, tool wear faclors, etc. Useful is ofkWandHP on I HP = 550 foot-pounds second): 1 kW= 1.341 HP
of in can be comis not always in everyday programming. experience is often a bener teacher than formulas.
• Coolants and lubricants When the lool contacts the of Lime, a great amount of overheated. becomes possibilities. a
1 (\End
T r"
-i:-- ,6 /.
for an extended peM.!,;;.l''vU''''vIJ. The cutand may break. To must be used.
Water soluble oil is the most common coolant. A propcoolant dissipates the cUlting edge it acts as a lubricant of lubricaremoval easier. lion is to reduce friction and make the flood of the coolant should at 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 and so are (he positions fQr contour change. Each tarposition is called the contour change point, which has to be cnIcuiated. The order of locutions in the program is very important. That means the tool position] is the target position commencing at the Start point, position 2 is the target position beginning at point I, position 3 is the from point 2 and so on, until the End is .-.,.,,,,,,,., If the contour is be in X Y axes. In turning, Z axes.
operator is responsible for a """""VI" the machine. coolant should r'f'r'f'lIT,m,f'n(lp.t1 proportions. Water to preserve the CNC n"I"\Or~lmYrlpr not. Ceramic nn,r"'CfIl'-Jl'(f dry, without a cast flood coolant, but air blast or oil mist may be allowed. coolant functions vary between machines. so check the machine reference details.
40
Chapter 6
• Identification Methods
The of cUlling fluids outweigh their inconveniences. CUHing are often messy, the cutting edge cannot seen, may wet and old all problems recoolant smells. proper lated to coolants can tie controlled. is when to turn the A coolant related programming coolant on in the As the coolant function MOS only turns on tbe pump motor, sure the coolant actually reaches the tool edge contact with work. Programming the coolant on is better than late.
A sketch can be done directly in the drawing or on paper, Every is associated with mathematical calculations. Using color or point numbering as identification methods offers and organization. Rather (han writing coordinates at contour change drawing, use point reference numbers and crepain! in ate a coordinate sheet fonn numbers, as illustrated in Figure Position
I
X axis
Yaxis
Z axis
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 complex calculations. Almost any math problem in CNC gramming can be solved by the use of algebra and trigonometry. Advanced of mathematics - anageometry, spherical trigonometry, calculus, surface calculations, etc. - are required for programming complex molds, similar In such cases, a CAD/CAM system is necessary.
6-8 Coordinate
- blank form Ino data)
Such (\ sheet can be used for milling or turning, by filling only the icable The aim is to develop a consistent programming style from one program to another. Fill-in all values, even those that do not A compleled coordinate sheet is a reference 6-9,
Lriangle can calThose who can a right of the culations for almost any CNC program. At 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 copoint can be established. any lype often benefit from a pictorial Calculations representation. Such calculations usually need a working should sketch. sketch can done by in an approximate Larger sketch scales are to work with. Scaling sketch has one great advantage - you can immediately see rhe dimensions the others, the relationship should be smaller or larger of individual elements, the ~hape of an extremely small tail, etc. However, you should never use the sketch for: er use a scaled sketch to
Scaling a sketch is a and unprofessional that creates more problems than it ness or incompetence.
Coordinate sheet example - filled form for milling tool path
QUALITY IN CNC PROGRAMMING An important consideration in is a perapproach and attitudes, attitudes a significant influence on the program development. Ask yourself some questions. Are you attentive to detail, well Can a be improved, is it safe, it cient? program quality is more than writing an error program. complexity is only related to your knowledge and wilr to solve problems. It should be a goa! to a program is the Set your standards high! program
PART PROGRAM STRUCTURE A program is composed of a series of sequentiaJ instructions related to machining of a parI. Each tion is specified in a format the CNC system can accept, Each· must also conform to terpret and the machine tool specifications. This input method of a procan be defined as an arrangement of machining formal the CNC related inSlrUCliolls. written in tool. and aimed at a particular have a different format. bUI most are differences among manufacturers, even those same control This is common, plac.e upon the demands individual machine control manufacturer 10 accommodate many original machine features. Such variations are usually minor but programming.
BASIC PROGRAMMING TERMS field of CNC its own terminology and terms and its jargon. It has its own abbreviations expressions Ihal only the people in the. field lmderstand. CNC programming is only a of the 'zed machining and it has a The majority of them the program. There are fOllr terms used in They appear in professional books, lUres and so on. These words are the key to the CNC Word
....
Program
A character is the smallest unit of CNC program. It can have one of
o Digit
o
Symbol
Letters
The 26lelters English alphahet are 1)11 available for programming, at leasl in theory. Most control letters reject others. For example. a accept only CNC la(he control will the letter as Y axis is unique to milling (milling machines and machining centers). Capital letters are normal designation in programming, but some controls accept low case ters with the same meaning as their case equivalent. If in doubt, use CAPITAL letters only!
Svmbols Several symbols are used for programming. in addition (0 the digits letters. The most common symbols are the decimal point, minus percent sign, parenthesis and options.
• Word
• Character
Letter
There are ten digits, 0 10 available for use in a program create numbers. The are used in two modes - one for integer values a point), for real (numbers with a decimal positive or negative values. Numbers can controls, numbers can with or without the decimal pOint. Numbers applied in either mode can only be entered within the range that is allowed by the control system. to
others, depending on the
Each term is very common important in programming deserves own detailed explanation.
o
Digits
Characters are combined into meaningful words. This combination of digits, and symbols IS led the alpha-/wmerical program input.
A program word is a combination of alpha-numerical creating a single to the sys-
tem. Normally, each word begins with a letter that is followed by a number representing a code or the axes position, feevalue. Typical words indicate speed. preparatory misceLlaneous ftmelions and many Olhcr definitions .
• Block Just like the word is as a single instruclion to block is used as a multiple instruction. A the control consists individin a logical a sequence or simply a block - is composed one or several words and each word is composed or two or more
41
42
Chapter 7
In the control system, must be allOlhers. iOlhe MDI (Manual II/pur) mode al the control, block (0 end with a cial End-Of Block code (symbol), This is as EOB on the control panel. When preparing the program on a computer, (he EHler key on the keyboard will terminate the block the same result (similar to the old Carriage on typewrirers). When writing a program on paper each block should occupy only a single line on paper. program block contains a series of single instructions that are executed together.
• Program The parI program structure varies different controls, but logical approach not one control to A CNC program usually with a program number or similar identification, followed by the blocks Instructions in a logical order. program ends with a SlOp code or a program termination symbol, as the percent sigll %. Internal clocumentation and (he operator be placed in strategic places wi The format has evolved cantly during the formats emerged.
PROGRAMMING FORMATS the early days of control, three formalS had become significant in their time. They are listed in the order of their original introduction: NC only no decimal
c
6 IF Words
F2 7 5'. 0'
N15,
011
Block
N 5 GO: 1~y - '6 ~~~_L-"!..~_~_ 2J.!' 5 . ~_O: Figure 7·' Typical word address programming format
The !cHer in of the word and mllst always
is correct, are allowed wlthill a the word, meaning
block written is no\. No spaces characters.) but are only allowed before [he
numerical assignment. This varies greatly and on the preceding <1UlHC;~.:>. It may represent a sequence number N, a n ...""1"I" . ."'I," .... ' mand a function M, an number D or H. a coordinate word Y or the feed rate function F, the spindle function S, the tool function etc. one word is a series characters (at least two) that define a single instruction to control and the machine. above typical have the following meaning in a
o
Tab
o
Fixed
NC only· no decimal point
G01
PreparaJOI)! comml1J1ti
o
Word Address Format
NC or eNC - decimal point
IDO D2S
Miscellalleous funCTion Offiel nwnber selecfion mills
XS.75
Coordinale word
mos
Sequence Illlmher(block Illunber)
HOI YO
Tool length
92500
SpiJuUe speedjuJlctioJl
z-s .14
CoordflllJJe word - Jleg(llive value
F12.0
Feedmlejunction Tool funclioll . kl1hes TooljilJlClioll- mills
Format
Only the very' early control use the tab sequential or jixed formats. Both of them disappeared in the early 1970's and arc now They have been replaced by the much more convenient Word Address Formal.
WORD ADDRESS FORMAT The word address formal is on a combination of one JeHer and one or more digits - Figure 7-1. In some applications, such a combination can be mented by a symbol,' such as a minus or a point. Each teller, or symbol represents one character in the and Ihe control memory. This unique alcreates l) word, where the letter the address, lowed numerical with or without symbols. The word address \0 a specitic register of the memory. Some arc: GOI M30 D2S Z-S.14 F12.0
XS.75 TOSOS
NiOS HOI T05 /MOl
YO S2500 B180.0
TOSOS TOS /MO 1
value
IIwnber
CoordiJlaJe word· zero l/aJue
",:!block skip symbol
B180.0
Individual arc instructions grouped together to form sequences of programming code. Each will process a of instructions simullaneously, unit a sequence block or simply a block. The blocks arranged in a logical that is required to machine a complete part or a complete operation is the part program known as a program.
PART PROGRAM STRUCTURE
43
The next block
position
a rapid tool motion to (he X 13.0Y4.6, with a coolant turned on:
N25 G90 GOO Xl3.0 Y4.6 MOS t6f' where ...
N25 G90
GOO X13.Q Y4.S
MOB
Sequence or block number Absolute mode motion mode Coordinate location ON function
Address X accepts positive or negative data with the maximum of five digits in front of a decimal point and three digits maximum behind the deCImal point - decimal point is allowed.
The of a decimal point in the notation means the decimal point is not used; the absence of a plus sign in the notalion means that the value cannot be negative - a lack means a positive value implication. These samples format notalion explain the shorthand: G2
Two digits maximum, no decimal point or sign
N5
digits maximum, no decimal point or sign Five digits maximum, no decimal point or
The control will process anyone block as a complete unit
- never partially. Most controls in a block, as long as the block
a random word order lS first
fORMAT NOTATION Each word can only written in a specific The number of digits allowed In a word, depending on address and maximum number of decimal places, is set by the control manufacturer. No! all can be Only ters with an assigned meaning can be programmed, except in a comment. Symbols can be used in only some words, and their position in word is Some are in custom macros. Control limitations are imporused tant. Symbols supplement the and letfers and provide with an additional Typical symbols are sign, decimal point, a few others. All symbols are listed in a
• Short Forms Control manufacturers often specify the input format in an abbreviated - Figure 7-2.
X ± 5
F3.2 Five digits maximum, digits maximum in front of the decimal point, two digits maximum behind the decimal point, point is no sign is used
Be careful when evaluating the shorthand notations from a manual. There are no industry standards and not all conmanufacLUrers use the same methods, so the the short forms may vary significantly. list dresses, format and description is listed in the notations based on a following tables. They typical Fanuc control system.
• Milling System Format The description for pending on the input units. The table below lists formal descriptions (metric format is in parenthesis, applicable). Listed are format notations for milling units. The column is the format first column is the address, the notation and third column is a description:
Address Notation
--
Number of digits decimal pOint
--
Decimal paint allowed
_---.-
-----..
A+5.3
degrees·
B
8+5.3
Rotary or Indexing axis - unit is - used about the Y axis
0
02
F
F5.3
Number of digits decimal point
G
Positive or negative value possible
H
Feedrate runction - may vary
number (tool position
1+4.4 (1+5.3)
Figure 7-2 Word address format notation - X axis format in metric mode shown
Cutter radius offset number (sometimes uses address H)
1001
Described address
The full description each would unnecessarily too long. Consider the following complete nnd not abbreviated description of the address X· as a coorin (he metric system: dinate that is
Rotary or
A
3
4I·-iII-iII-4I-e
Description
Arc center modifier for X axis Shift amount in fixed (X) Corner vector selection for X axis (old type of controls) Arc center modifier for
J
J+4.4 (J+5.3)
and/or
length
Y axis
Shift amount in fixed cycles
Corner vector selection for Y axis type of controls)
7
Notation
Description ,,~,"~,~ ~"""~"~~'"
K
K+4.4 (K+S.3)
Arc center modifier for Z axis
D Fixed cycle repetition count Subprogram repetition COUnt
L
M
"
M2
Program number (EIA)
Number of divisions in G73
044
Depth of Cul in I and Relief amount in G74 and G75 Depth of first thread in G76
(053) E2.6
Precision feedrate for
F
F2.6
Feedrale function
G
G2
Miscellaneous function Block number or sequence number
N
04
or (:4 for ISO)
P4
p
Subprogram number call Custom macro number call
1+4.4 (1+5.3)
in fixed cycles Arc radius designation
s
S5
Spindle
T
14
Tool function
K
Direction of chamfering Motion amount in Z in G75 Thread depth in G76
L
L4
Subprogram repetition count
M
M2
Miscellaneous function
N
N5
Block number or sequence number
o
04
Program number (ErA) or (:4 for ISO)
in r/min
Subprogram number call Custom macro number call Offset number with G I0
p
-----ooi
X axis coordinate value designation
z
Z+4.4 IZ+5.3}
conds
value
u
• Turning System ............. ,'+ Ihis one is for lalhe systems. Similar chart as for same are included only A number of definltions are the met~ for convenience. Notation is in to the address. ric notation is in parenthesis, if Address
Notation
A
A3
c
(C I 5.3)
C+4.4
Direction of Arc center modifier for Z axis Taper height in Z for cycles Z axis relief in G73
Q
Y+4.4 (Y+5.3)
X axis
Arc center modifier Taper height in X for X axis relief in G73
Dwell time in milliseconds
Depth of peck in fixed cycles
y
Preparatory commands
Motion amount in X in G74
G73 and G83
x
may vary
Work offset number - used with G 10
Block number in main program when used with M99
R
'''p,>",....~
US.3
w
x
Description input Chamfer for direct
input
axis
z
Dwell function with G04
W+4.4 (W+S.3)
Incremental value in Z axis Stock allowance in Z axis
X+4.4 (X+5.J)
Absolute value in X axis
X5.J
Dwell function with G04
PART PROG RAM
45
• Multiple Word Addresses One that is in both dance different meanings for some This is a necessary feature of a word address format. After all, there are only 26 in the English but more than that number of commands and functions. As new contTol features are added, even more variations may be necessary. Some the addresses an established meaning (for example, X, Y and Z are coordinate that giving would be confusing. Many them an additional ters, on the other are not used very often and a multimeaning for is quite (addresses I, J, K, for example). In addition, the meaning of varIes the milling and turning systems. system has to have sam!; means of accepting
The
a particular word with a precisely defined meaning in the In most cases, the preparatory command G will the at other times it will be the or a setting of
table lists symbols are only with custom macro option. These symbols cannot used in s(andard programming, as they would cause an error. Typical standard symbols are found on the computer keyboard. Crrl, and All character combinations are not allowed.
• Plus and Minus Sign One of the most common - plus or can be either or negative. convenience, virtually all systems allow for an omission of for all values. This IS positive the control Positive lerm i nrlicating an MS\lmed positive value, if no grammed in a word: X+125.0
parameters.
must always be programmed. If the the number becomes positive, with (in this case the tool position):
In addition to the basic symbols, symbols for applic(ltions. scribes all symbols available on the
X-12S.0 Xl2S.0 X+12S.0
Comment
Description
X125.0
""''','''ES,
SYMBOLS IN PROGRAMMING
Symbol
is {he same as
Fractional
of a number
Positive value
or
an
Negative value Posimte value Positive value (-+- sign is ignored)
Symbols supplement the and digits and are an integral part the program structure.
PROGRAM HEADER
addition sign in Fanuc macros
*
Minus sign
Negative value or subtraction in Fanuc macros
Multiplication
Multiplication
in
Fanllc macros Block skip function symbol or divisioll sign in Fanuc macros
/
Comments or messages providing are enclosed in of inlernal documentation is to both the programmer and operator. A series of comments at the top is defined as the program where lures are identified. next 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)
!I
;1 I
#
SelmiCI)lon
I Sharp sign
Variable definition or call in Fan
macros Equality in Fanuc macros
(UNITS ••••••.•••.•••.••..••••.••••... (JOB NUMBER •••••••••••••••••••••••••••• 4321) (OPERATION ••.•••••••••••.••.. DRILL-BORE-TAP) (STOCK MATERIAL ...•............ H.R.S. PLATE) SIZE •••••••••••••••••••• 8 X 6 X ".-,J"'"......... ZERO ••••••••••...••• XO - LEFT ( YO - BOTT EDGE) ( ZO - TOP FACE ) (STATUS • • • • . • • • • • • • • • • • . • • • • • •• NOT VERIFIED)
46
Chapter 7
Within the program, each tool
identified as well.
the X change
Y axes. If Ihe absolute position is unknown, 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 change block for the current tool. Many CNC systems will an alarm if the 1001 change command cannot find tool in the the following program example, the lOa! repeat blocks will be NS, N38 and N67. 1001
TYPICAL PROGRAM STRUCTURE Although iL may be a bit early to show a complete program, it wiH do no harm to look at a typical program structure. Developing a structure is absolutely essential it is going to be lime. Each block of the program is identified with a comment Note - Program blocks use only sample block numbers. Blocks in parentheses are not required for fixed cycles. The XY value in the block N88 should be current position 00701
MAX 15 CHARS)
(PROGRAM NUMBER AND IDl (BRIEF PROGRAM DESCRIPTION) (PROGRAMMER AND DATE OF LAST REVISION) (BLANK LINE) (UNITS SETTING IN A SEPARATE BLOCK) (INITIAL SETTINGS AND CANCELLATIONS) (TOOL TOl INTO ~TING POSITION) (TOl INTO SPINDLE) (TOl RESTART BLOCK - T02 INTO WAITmG POSITION) (TOOL LG OFFSET - CL.E.AR ABOVE WORK - COOLANT ON) (FEED TO Z DEPTH IF NOT A cYCLE)
(SAMPLE PROGRAM STRUCTURE)
SMID - 07-DEC-01} N1 G20 N2 G17 G40 GSO G49 N3 T01
N4 MOG N5 GSO G54 GOO X.• Y.• S .• MOl T02 NG G43 Z2.0 H01 MOB (N? GOI Z-.. F •. ) (---
is a machine with The program structure random tool selection mode a typical control system, with some minor changes to be expected, Study flow of the program, rather than its exact contents. Note the tiveness of blocks for lool and note the addition of a blank line (empty block) between individual easier orientation in the program.
CUTTING MOTIONS WITH TOOL TOl ----)
N33 GOO GaO Z2.0 MOS N34 G2S Z2.0 MOS
(CLEAR ABOVE PART - COOLANT OFF) (HOME IN Z ONLY-SPINDLE OFF) (OPTIONAL STOP)
N3S MOl
(-- BLANK LINE --) (TOOL T02 INTO WAITIN'G POSITION - CHECK ONLY) (T02 INTO SPINDLE) (T02 RESTART BLOCK - T03 INTO WAITmG POSITION) (TOOL LG OFFSE.'T - CLEAR ABOVE WORK - COOLANT ON) TO Z DEPTH IF NOT A
N36 T02 N37 M06 N38 G90 G54 GOO X.. Y.. S .. MO) T03
N39 G43 Z2.0 H02 MOB (N40 GOl Z- •• F •• ) (-- - CUTTING MOTIONS WITH TOOL TOA
---)
N62 GOO GSO Z2.0 M09
N63 G2B Z2.0 MOS N64 MOl N6S T03 N66 M06 , N67 G90 G54 GOO X •• Y •• S .• M03 TOl
N6S G43 Z2.0 H03 MOS (N69 G01 Z- .• F .. )
(CLEAR ABOVE PART - COOLANT OFF) (HOME IN Z ONLY - SPINDLE OFF) {OPTIONAL STOP} (-- BLANK LINE --) (TOOL T03 INTO WAITIN'G POSITION - CHECK ONLY) (T03 INTO SPINDLE) (T03 RESTART BLOCK - TOl INTO WAITING POSITION) (TOOL LG OFFSET CLEAR ABOVE WORK - COOLANT ON) (FEED TO Z DEPTH IF NOT A CYCLE)
(- -- CUTTING MOTIONS WITH TOOL TO) ----}
Na6 GOO GSO Z2.0 M09 NB7 G28 Z2.0 MOS NBS G2S X •. Y .. Na9 M30
%
(CLEAR ABOVE PART ~ COOLANT OFF) (HOME IN' Z ONLY - SPINDLE OFF) (HOME IN XY ONLY) (END OF PROGRAM) (STOP CODE - END OF FILE TR.1\NSFER)
PREPARATORY COMMANDS The program address G identities a preparClfory command, often called the G code. This address has one and only objective - that is to or to prepare the control system to a certain desired condition, or (0 a certain mode or a state of operation. example, the address GOO prefor machine tool, the address sets a rapid motion G81 the drilling cycle. etc. term preparatory command indicates meaning a G code will prepare the control to accept the programming instructions fol/.owing the G in a specific way.
C
Example C:
N3 G90 GOO
N4 NS ••• N6
N7 X13.0 YlO.O
C
Example 0:
N2 G90
DESCRIPTION AND PURPOSE
N3
GOO
N4 , •• NS .••
A one block example will illustrate the purpose of the commands in the following program entry: N7 X13. 0 Y10.O
a look at this block shows that the coordinates 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 coordinates are in the Clbsohl{e or the mode. It not whether the values are in English or the metric units. Neither it indicates whether the motion to this specified target position is a rapid motion or a linear motion. If a look at the block cannot the of the block contents, neither can Ihe control system. The supplied information in such a block is incompleTe, therefore unusable by itself. Some additional for the block are required.
in order to make the block N7 a tool destiFor nation in a rapid mode using absolute dimensions, all these instructions - or commands - must be specified before block or within block:
C
Example A :
N7 G90 GOO X13.0 Y10.O
C
Example B.
N3 G90
N4 NS
N6
N7 GOO X13.0 Y10.O
N6 ••.
N7 X13.0 YlO.O
All four examples have the same machining result, providing that there is no change of allY G code mode between blocks N4 and N6 in the examples B, C and D.
Modal and non-modal will described shortly. Each conlrol has own list available G Many G codes are very common and can be found on virtually all controls. others are unique to the particular control even the machine tooL Because of the nature of machining applications. the of lypical G codes Will different for the milling systems and Ihe turning systems. The same applies for other types of machines. Each group G codes must kept "pn,"'r~IP Check machine documentation for available G codes!
APPLICATIONS FOR MILLING The G code table on the next page is a considerably tailed list of the most common preparatory commands for programming CNC milling and CNC machining centers. The listed G codes may not be applicable to a particular machine and control system, so consult the machine control manual to make sure. Some G codes listed are a option that must available on the machine and in the control system.
47
Chapter 8
G code
G code
GOO
Rapid positioning
GOl
Li near interpolation
G02
Circular intcrpolallon clockwise
G03
Circular interpolation counterclockwise
Local coordinate
Work coordinme
GlO
G55
Work coordinate
G56
Work coordinate offset 3
G57
Work coordinale offset 4
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
G65
Custom macro call
G20
English units or input
G66
G21
check ON
G22
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
compensation -
eep hole drilling cycle)
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 Type A is most common; in this handbook, all examples and explanations are A group, including Types A table below. Only one type can set at a ~nd B. can be sel by a control but lype C IS optIOnal. Generally, mOSl codes arc identical, only a few are different In the A and B types. More details on the G code is listed at the of this
G54
and
Work coordinate offset 2 G56
Work coordinate offset 3
G57
Work coordinate offset 4 Work coordinate offset 5
G59
G61
Description
G code GOO
Rapid posilioning
G62
GOl
Linear illterpolation
G64
Circular
Work coordinate offset I
Work coordinate offset 6 stop mode
clockwise
G03
Circular interpolation counterclockwise
G04
Dwell (as a separate block)
G09
Exact Stop check - one block only
Gl0
Programmable data input
Gll
Data Selling mode cancel
Custom macro modal call
for double turrets cancel
Setting)
- Z axis direction
units of input
G23
Stored stroke check
G25
Spindle speed fluctuation detection ON
G26
s
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
G35
Circular threading CW
G94
G36
Circular
895
G40
Tool nose radius offset cancel
G41
Tool nOse radius offset lefl
G42
CCW
osc radius compensation
G96
CUlling cycle B
(Group type A) fvpe D)
Constant surface speed mode
Ie per minute
50
8
Most of the preparatory commands are Ul~'i..U::'::'c;u individual applications, for Inrerpolation, G02 and G03 under Interpolation, etc. In this section, G codes are described in general, reof the type of machine or unit.
G CO
IN A PROGRAM BLOCK
Note rapid motion command GOO does it in the program? Just once - in In fact, so is command for absolute reason neither GOO nor G90 has been is v ....... QI.I,)1.both remain active from the moment of their first in the program. The cerm is to this characteristic.
Unlike the miscellaneous and described in next cm~ptl:r rator·y commands may be used in a block, providing with each other: they are not in a logical con N25 G90 GOO G54 X6.75 Y10.S
This method of program writing is severa! blocks shorter single block
tation ~ Example C - modified (as processed I : N3 G90 GOO xso.o Y30.0 N4 G90 GOO XO N5 G90 GOO Y2QO.O
N25 G90 N26 GOO N27 054 N28 X6. 75 Yl0.5
Both methods will during a '-v........ .. processing. However, example, when in a single block mode, block will require pressing the Cycle Start key to activate the The shorter method is more practical, not only length, but for the connection between individual commands within block. general considerations rules of application to G codes used with other data in a block. The most of is of modality.
• Modality of Earlier, the following C was used to the general placement of G codes into a program block: ~ Example
to repeat a example interpre-
c· original:
N6 G90 GOO XlSO.O Y:220.0 N7 G90 GOO X130.0 YlOO.O
program does not have any practical application by from one location to another at a rapid rate, but it the modality commands. The of modal values is to unnecessary duplicaof programming modes. G are used so often. thal tedious. Fortunately. writing them in the program can (he majority of G codes can only once, providing they are modal. In the control specifications, prepaas modal and unmodal. ratory commands are
• Conflicting Commands in a Block The purpose of preparatory commands is to select from two or more modes of If the rapid motion command GOO is it command to a tool mn'!,nn [0 have a rapid motion and same time, it is to
N3 G90 GOO N4 N5
N6 N7 X13.0 YlO.O
If the structure is changed slightly and filled with data, these may be the result: ~ Example C - modified (as programmed) :
N3 G90 GOO XS.O Y3.O
N4 xo NS Y:2O.O N6 XlS.O Y22.0 N7 Xl3.0 YlO.O
N74 GOl GOO X3.S Y6.125 F20.0
In the example. two commands GO 1 and GOO are m conniCL As GOO is the latter one in the block. it will come feedrale is ignored in this block. N74 GOO GOl X3.S Y6.12S F20.0
This is exact of the previous front, therefore the G01 will the GOO is in motion will take place as a of 20.0 in/min.
Here. precemotion at
PREPARATORY
51
• Word Order in a Block
GROUPING OF COMMANDS
G codes are normally programmed at Ihe beginning of a other significant data:
block, after the block number,
N40 G91 GOl Z-O.62S Fa.S
This is a traditional order,
on
that if the
the control purpose of the G codes is to to a cenain condition, the ",,..c,,,,,..,,...,I,,,,,,,,, always be placed that only non~conflicting block. Strictly there is to: N40 G91 Z-O.62S Fa.S GOl
unusual, but quite correct. next method of positioning a G
is nol the case in a block:
of conflicting G codes in one forefront. Il makes sense, motion commands as GOO, , G02 and same is not so or€~oarat;orv commands. For example, can the lool command G43 be programmed in the same as cutter offset command G41 or The answer is but leI's look at the reasOn why.
two-digit codes in one from the same f1icl with
recognizes preparatory commands into arbitrary groups. Each has a Fanuc assigned governing the simple. If two or more G codes the same block, they are in con-
N40 Z·O.625 F8.S GOl G9l
• Group Numbers
Watchfor situations like this! What case IS Ihat cutting motion G01, the depth Z will combined and executed using the current If current mode is absolute, Z executed as an absolute value, not an mcrernell1reason for this exception is values in the same block. can a feature, jf used carefully. A typical correct feature can be illustrated in this example:
The G
(G20) N45 G90 GOO G54 Xl.O Yl.0 51500 M03 (G90) N46 G43 ZO.l H02 N47 GOl Z~0.25 F5.0 N48 X2. 5 G91 Yl. S (G90 MIXE:D WITH G91) N49
through N47 are all in the aU:'U1Ul\., N48 is executed, the absolute the axes X Y is 1.0,1.0. the target location is "V"'VIUl.... position of X2.5 combined with of 1,5 inches along the Y axis. will be X2.5Y2.5, making a 45" motion. this case, the G91 will remain in effect for all subsequent blocks, unlil the G90 is programmed. Most likely, the block N48 WIll be written in absolute mode:
are typically numbered from 00 to different control models, tealtur(~s It can even be higher for the newest controls or more G codes are required. One of one and perhaps the mosl these groups - the most important as well - is the Croup 00. All preparatory commands in the 00 group are not modal, unmodal or non-modal. sometimes using [he They are only active in in which they were proare to be effective in grammed. If unmodal G consecutive they must programmed in those blocks. In majority of unmodal this titian will not pause measured in duration within the no longer. is no need to prodwell in two or more consecutive blocks. After all, what is the benefit of the next three blocks? N56 G04 P2000 NS7 G04 P3000 NS8 G04 PlOOO
All three blocks contain the same 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 in some unpleasant surprises. modes. It can There are some V""'''......HV. when this special in subprograms. brings benefits. for
following groups are typical for the Applications for milling and turning distinguished by the M and T letters column of the table:
control
Chapter a
52 Type
00
01
Unmodal G codes
Motion Commands,
Cutting Cycles
G04 GIl G30 G45 G52 GSl GSO G70 G74
G09 GIO
G27 G28 G29 G31 G46 G53 G60
G37 G47 G48 G65 G92
GOO GOI G02 G03 G32 G35 G36 G90 G92 G94
03
Dimensioning Mode
G90 G91 (U and W for lathes)
04
Stored Strokes
G22 G23
05
Feedrate
G93 G94 G95
Gl9
G20 G2l
08
09
Tool Length Offset
Cycles
MIT MIT M
T T
MIT T T
M
M T
MIT T
MIT
G40 G41 G42 G43 G44 G49
M
G73 G74 G76 GSO G81 G82 Ga3 GB4 Ga5 Ga6 G87 GSS Ga9
M M
M M
10
M
11
M T
12
Coordinate System
5 G56 G57 GSa G59
13
Cutting Modes
G6l G62 G64 G63
MIT
G66 G67
MIT
G6a G69
M
G96 G97
T
GlS GI6
M
G25 G26
MIT
17 18
24
Input Speed Fluctuation
from Group 09. In a
MIT MIT
-----+---1
Selection
Radius
byO
G CODE TYPES
T
G71 G72 G73 G75 G76
02
Offset
Group 01 is 1101 summary ...
M
group relationship makes a perfect sense in all cases. One possible exception is Group aI for Motion Commands and Group 09 for The relationship these two groups is this - if a G code from Group 01 is specified in any ofthe fixed cycle 09, the is immediately but opposite is not true. In words, an active motion command is nO! by a cycle.
Fanuc control system a nexible selection of preparatory commands. This fnct distinguishes Fanuc from many other controls. the fact that Fanuc conit only sense to the trols are used standard control configuration to follow established style A typical example is the selection of diof each mensional In Europe, Japan and other counmetric system is the standard. In America, common system of dimensioning still uses {he English both are substantial in the world trade, a clever control manufacturer tries to reach them both. Almost all control manufacturers offer a selection the dimensional But and similar controls also selection programming codes that were in Fanuc reached the worldwide market. The Fanuc controls use is a simple method of paBy the speci fie system parameter, rameter one of two or three 0 types can selected, one is typical a particular geographical user. Although majority of the G codes are same for lype, the most typical iIluslIation are G used English and metric selection of units. Many earlier US controls used 070 for units and G71 for units. tern has 020 and 1 codes for and metric Setting up a parameter, the G type is the most practical can be Such a practice, if done at all. should done only once and only when the conlIol is installed, any programs have been wriuen il. Change of G code type at random is a guaranteed way to create an organizational nightmare. in mind that a of one code meaning will affect the meaoing of another Using units for a lathe, if G70 means an English input of dimensions, you cannot use it to program a roughing Fanuc provides a code. Always with the G code All G this handbook use the default group of Type A, and the most common group.
• G Codes and Decimal Point include a G code with a 1 (Rotation copy) or (Parallel copy). Several preparatory commands in this group are related to a particular machine tool or are not typical to described in this handbook.
MISCELLANEOUS FUNCTIONS ..'"".... '"'.~., M a CNC neous jUnction, sometimes all
a miscellaa
functions are related to
CNC machine - quite a few are related to the lun'-UIJfI.\
Not of a of
itself. The more sui tab Ie term miscellaneous is used throughout this UW1UL'VVr....
DESCRIPTION AND PURPOSE the structure ofa CNe prclgr(!Jlt.progl1lmmers ofcertain aspects of the ten some means of machine operation or controlling flow. Without availability of such means, program would be mcomplete and impossible to run. let's look at the 18neOlIS functions to operation of the ma- the true machinefonctions.
All for metal removal by have certain common features and capabilities. For example, can three - and only three ble normal rotation
Q
o
Spindle reverse rotation
o
Spindle
three possibilities, there is a "'''''.,,"', .... orientation, also a machine tion. example is a coolant. Coolant can only controlled as being ON or being OFF. operations are typical to most CNC All with an M function, fonowed by no more although some control allow the M function, Fanuc 16/18, example .
• Machino Related Functions
spetwo other and
Various physical machine must be controlled by the program, to ensure fully automated machining. These functions use the M address and include the following 0
Spindle rotation
CW
0
Gear range change
low 1 Medium 1High
0
Automatic tool change
ATC
0
Automatic
0
Caolant operation
0
Tailstock or quill motion
Of
CCW
or OFF
IN or OUT
These operations vary be1:'wef~11 machines, due to the different designs by various manufacturers. A machine design, from the point of view, is on a certain primary application. A CNC milling machine will functions related to center or a CNC lathe, A machine than a numerically controlled wire cutting machine will many unique typical to that kind of machining and on no other machine. ........"..&L.......... for the same type of work, Even two for example, two vertical machining center, will each other, if they have a have functions ditterjent ferent CNC SlgOJ.tllCaIltly different I'InlMI'ITHI ferent the same manutactlmer also have functions, even with the same model of the CNC
• Program Related Functions In addition to the machine some M functions are to control the execution program. An interruption of a program execution an M function, during the change such as a part Another example is a where one proone or more subprograms. In such a case, each to have a program the number of etc, M functions previous "'''''''Ull-''.... ''', ous falls lnto two ular application: o
Control of the machine functions
o
Control of the program execution
miscellaneon a partic-
TIlls handbook covers only the most common miscellaneous functions, used by the majority controls, Unfortu~ nately, there are many functions that vary between maand the control system. functions are called machine specific junctions. reason, always consult the documentation for the machine model and its control system
54
9
TYPICAL APPLICATIONS learning the functions, note type of activity these functions regardless of whether such activity relates to machine or program. Also nOle Ihe ahundance two way toggle modes, such as ON and OFF, IN OUT, Forward and Backward, etc. Always check your manual - for reasons of consistency, M functions in this hoodbook are based on the following table:
:ription """'=
MOO
Compulsory program stop
MOl
Optional program stop
M02
End of program (usually with reset. no rewind)
M03
~ rotation normal
M04
Spindle rotation reverse
MOS
Spindle stop
6
Coolant mist ON
MOS
Coolant ON (coolant pump motor ON)
M09
Coolant OFF (coolant pump molor OFF)
M19
;pindle orientation
M30
Program end (always with reset and rewind)
M48
Feedrate override cancel OFF
(deactivated)
M49
Feedrate override cancel ON
(activated)
M60
Automatic pallet change (A
M78
B axis clamp
(nonstandard)
M79
B axis unci amp
(nonsfandard)
M98
Subprogram call
M99
end
Description
MOO
Compulsory program stop
MOl
Optional program stop End of program (usually with reset, no rewind)
M03
Spindle stop
MOS
Coolant ON (coolant pump molar ON)
M09
Coolam OFF (coolant pump motor OFF)
Ml0
open
Ml1
Chuck close
M12
il<;lo{'k quill IN
M13
TailSlock quill OUT
M17
Turret indexing rurward
MIS
Turret indexing reverse
I
;pi
oriental ion (optional}
M21
Tailstock forward
M22
Tailstock backward
M23
Thread gradual pull-out ON
M24
Thrcad gradual pull-om OFF
M30
Program end (always with reset and rewind)
M41
Low gear selection
M42
Medium gear selection 1
M43
Medium gear selection 2
M44
High gear selection
M48
FeedralC override cancel OFF
( deactivated)
M49
Feedrate override cancel ON
(activated)
M9a
;ubprugl"uB call
M99
Subprogr{lm end
• Special MDI functions
• Applications for TurRing M code
MOS
M19
Automatic lool change (ATC)
M07
Spindle rotation reverse
Mo;-r Coolant mist ON
• Applications for Milling M code
M04
Spindle rotation normal
'''''IF''"'''' M functions cannot be used in CNC n,..r,or~m at all. This group is in the Manual Data Input mode 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 outside of the scope of this handbook.
• Application Groups The two major categories, described can further into several groups, on the specific of the miscellaneous functions within each group. A (ypical distribution is contained in the following table:
be
MISCELLANEOUS FUNCTIONS
55 method of programming certain is in a block that contains a tool turning the coolant on and - at the same time the cuuing tool to a certain part location there is no conflict between may look something like this:
Typical M-functions
Group
..... "·uv,, •.)
Program 4 MOS
Spindle
N56 GOO X12.98S4 Y9.474 MOB
Tool change
M06
Coolant
M07 MOB M09
Accessories
M10 Ml.2 Ml.7 M21 M78
Threading
M23 M24
M11 M13 MiS M22 M79
or moat this combination - a Z with the program stop function
M44
Gear ranges
M48 M49 M98 M99 M60
NG19 GOl Z-12.S4S6 F20.0 MOO
This is a more situation and two answers are needed. One is what exactly will happen. the other is when exactly it will when the MOO function is activated. and three questions to There are 1.
The table does nOI cover aU M functions or even all possible groups. Neither it between machmes. On the other hand, il does indicate types of applications the miscellaneous functions are for in everyday CNC programmIng. The miscellaneous functions used throughout the book. than olhers, reflecting functions that do not l"""",......".·~ ..-.r\nn control system are not However, the concepts for their most control systems
In this chapter, only the more general functions are covin significant detail. Remaining are described in the sections covering individual apAt this stage. the stress is on the and of the most common miscellaneous
M FUNCTIONS IN A BLOCK If a miscellaneous function is programmed in a block with no other data supplementing it, only itself will be executed. For example, N45 MOl
block is correct - an M function entry. Unlike the preparatory comonly one M function is allowed in a block allows multiple M functions in the same error will occur (latest controls only).
place immediately, when .""y,,,,U,,,,,, - at the start of the block?
2.
Will the place while the tool is on the way - during a motion?
3.
Will the program command is
place when the motion - at the end of the block?
One of the Even if a practical apparent at this system interprets miscellaneous function.
- but which one? examples may nol be to know how the control a tool motion and a
Each M function is designed logically - it is also designed to make a common sense. The actual startup of a M function is groups - not three: Q
M function activates at the start of a (simultaneously with the tool
Q
M function activates at
of a
(when the tool motion has been
cOl1nDl~!ted
into two
""''''",n will be during executhere is no logic to it. What is the logical startup ON function M08 in the block N56 at correct answer is that the coolant will be same time as the tool motion begins. The correct answer the example block N319 is that the MOO function will be activated after the tool ~,., .. ,.". . completed. Makes sense? Yes, but what about functions. how do they behave in a block? them next.
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 logical thinking provides a good chance to arrive at righ! Com pare) he two following groups to confirm:
t. no rewind)
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
M02
End of program (usually with reset no rewind)
M05
Spindle stop
M09
Coolant OFF (cool an! pump motor OFF)
M30
Program end (always with resel and rewind)
M60
Automalic pallet change (APC)
SLOp
If there is an uncertainty about how the function will interact with the lool motion, safest choice is to program That way the function the M as a separate will always be processed before or after relevant program block. In the majority of applications this will be a SOltllion. •
Duration of M Functions
Knowledge of when the M function effect is logically followed by the question about how long the function will be active. Some miscellaneous functions are active only in the block they appear. Others will continue to in until canceled by another miscellaneous function. the preparatory G comThis is similar to the modality however the word modal is not usually used with M an example of a function duration, take misfunctions. cellaneous functions MOO or MOl. Either one will active for one block only. The coolant ON function M08, will be until a canceling or an altering function is programmed. anyone of the following functions will cancel the coolant ON mode - MOO, MO l, M02, M09 and M30. Compare these two tables:
The classification is quite logical and shows some common sense. There is. no to individual M best place to find functions and exact actlv!tles. out for certain, is to study manuals supplied with the CNC run right on the machine. and watch the
PROGRAM fUNCTIONS Miscellaneous functions that control program processing temporarily can used either to interrupt (in Ihe middle of a program) or permanently the end of a program), Several functions are available for Ihis purpose.
• Program Stop The MOO function is defined as an unconditional or compulsory program stop. Any time the control system encounters lhis function during program processing, all automatic operations of the machine tool will stop: o
Motion of all axes
o
Rotation of the spindle
o Coolant function o
Further program execution
Thc control will ItO! be reset when the MOO function is prclce:5scQ, All program data currently active are (feedrate. spindle etc.). program processing can only resumed by activating the spindle the Cycle Starr key. The MOO function rotation coolant function they have to be grammed in subsequent blocks.
FUNCTIONS
MOO function can be as an individual block or in a block commands, usually' motion. If the MOO is programmed together with a motion command, the motion will be completed then (he program stop will effective:
c::> MOO programmed after a motion command " N38 GOO X13.5682 N39 MOO
c::> MOO programmed with a motion command: N39
GOO X13.5682 MOO
In both cases, the motion will first, before the program is executed. The between the two examples is apparent only in a block processing mode (for example, during a trial will be no practical difference in aula mode pro(Single Block switch set to OFF). Practical Usage
program stop CNC operator's job common use is a the part is still During the stop, the part sions or the lool condition can be checked. Chips accumulated in a bored or drilled hole can be removed, for example, before another operation can start, as blind hole tapping. program stop function is also necessary to the current setup in the middle of a for to reverse a part. A tool also requires the in the
an optional program stop MO I, The control described next. The main rule of using MOO is need of a manual every parl machined. Manual lool change in a qualifies for MOO. part check may oOl if is infreneeds it. A choice. Although quent. MOl will is slight, the actual between the two cycle time can significant for large When usi'ng the MOO function, always inform the operator why the function been used and what purpose is. Make the known to avoid a This intent can be to the operator in two ways: refer to the block that contains MOO describe the manual
BLOCK N3 9 •..••. REMOVE CHIPS
57 o
In the program itself, issue a comment section with the necessary information. comment section must be enclosed in (three versions shown): [Al
109 MOO (REMmr.E CHIPS)
[8]
N39 Xl3. 5682 MOO (REMOVE CHIPS)
[C]
108 Xl3.5682 MOO (REJM'O'.i'E CHIPS)
Anyone of the methods will give Ihe operator the necessary information. From the two options, the second one [B], the comment section in the program, is The built-in can be read directly from the screen control paneL
• Optional Program Stop The miscellaneous MO I is an optional or a COIIdirional program stop. It is similar to MOO function, the MOO function, when MOl funcone diffe.rence. lion is encountered in the program, the processing will nOl SlOp, the operator the control panel. The Optional SlOP toggle switch or a button key located on the Clln be set to either ON or in the program is When the setting of will determine will or continues to
Optional Stop switch setting
Result of MOl
ON OFF
When the MOl function behaves the MOO function. The motion of coolant and any further execution will be temporarily interrupted. Feedrate, coordinate settings, setting, etc., are . The further prospindle program can only be reactivated by (he Cycle All programming rules for the MOO function also MOl function. is to program MOl function at the end of followed by a blank line with no If the program processing can continue witham Slopping, the Optional Stop switch will be set to and no production time is lost. If there is a need to program temporarily at the end of a tool, the switch will be set to ON and 100i. The lime loss is stops at the end of under the for example, to a dimension or the
58
Chapter 9
• Program End the
Percent Sign
program must include a of current program.
M functions available but a distinct
M02 and
are two
are similar,
The M02 function will terwill cause no return to the first minate the program, block at the program top. The function M30 wililerminate the program as well but it will cause a return to the lOp. The word t return' is often replaced by word 'rewind'. It is a leftover the limes when a reel-to-reel tape was common on NC tape had to be rewound when the program has completed for M30 function provided this capability.
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 conditions. On some controls the reset may not be automaTic any programmer should be aware of it.
U the program with the M02 function, the control remains at the program end, ready for the next Cycle Stan. On modem CNC equipment there is no need for M02 at all, except for backward compatibility. This function was in addition to M30 those machines (mainly NC had tape without using a short tape. (railer of tape was spliced 10 the tape creating a closed loop. When the program was finished, the start of the was next to the so no rewind was necessary. and M30. Long could not use loops and So for the history or M02 - just
percent sign (%) after M30 is a special stop code. This symbol terminates the loading of a from an external It is the
• Subprogram End last M a is M99. mary usage is in the subprograms. Typically, the M99 function will a subprogram and return to processing of the previous program, If M99 is in a standard program, it creates a program with no end such a situation is called an endless loop, M99 should be used only not in standard
MACHINE FUNCTIONS Miscellaneous functions relating to operation of the tool are of another group. This section the most important of them in detail.
• Coolant Functions Most metal removal operations that the cUlting tool is flooded with a suitable coolant In order to control the flow of coolant in program, are three neous functions usually provided for (his purpose: M07
Flood ON
Is M02 the Same 8S M30 ?
On most controls, a system parameter can be set 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 mawith a new without Tn a if the end of is terminated by the M30 function, the rewind performed; if the M02 function is used, the rewind will not be performed. When writing program, make sure the last program contains nothing else but M30 as the end (sequence block is allowed to start the block): N65 . . . N66 G91 G2S N67 mo %
xo
YO (E:tiID OF PRQGR.ll.M)
On some controls, the M30 function can be used together with the axes motion - NOT recommended !:
Mist or Flood OFF
Misl is combination of a small amount of cutting oil mixed with compressed It depends on machine tool manufacturer whether function is standard for a particular machine tool or not. Some mixture oil and air with air only. or with oil only, etc. In these cases, it is typical that an additional equipment is built into machine. If this option exists on the machine, the most common miscellaneous function to the oil or air is M07. function similar to M07 is M08 - coolant flooding . .This is by far the most common application in CNC programming. It is standard for virtually all machine. The coolant, usually a mixture oil and water, is premixed and in the tank of the machine tool. Flooding cuning edge of tool is important for three reasons: o
N65 . . . N66 G91 G28 XO YO M30 %
Mis! ON
OF PRQGR.ll.M)
Heat dissipation
o Chip removal
o Lubrication
FUNCTIONS
primary reason La use a coolant flood aimed at the cutting is to dissipate cutting. reason is to remove cutting area, using coolant pressure, Finally, also acts as a lubricant to ease the friction cutting tool and material. Lubrication helps to extend tool life and the surface finish. initial tool approach towards the part or during nal return to the tool change position, the coolant is normally not turn off (he cootant function, use M09 function - coolant off. M09 wi lllurn off the oil mist or supply and nothing else. In reality, the M09 function will shut off (he coolant pump motor. the rhree coolant related functions may in blocks or together with an are subtle but important differences in of the program processing. The explain the differences: A - oil mist is turned ON, if
C) N110 M07
a There will be no coolant splashing outside of work area (outside of the machine)
a
will never be a situation when the coolant reaches a hot edge of the tool IS
function is programmed in the an inconvenience. wet area chine may present unsafe working quickly corrected. Even more "Pro""" when the coolant suddenly starts that has already entered the material. perature at the cutting edge may cause damage the part. Carbide tools are by temperature changes than possibility can be prevented the M08 function a few blocks the actual cutting block. Long pipes or insufficient coolant pressure on the flooding. machine may delay the start of
•
C) Example B - coolant is turned ON :
Spindle functions
Chapter 12 - Spindle trolling the machine neous functions that are rotation and
N340 MOS
=
Example C - coolant is turned OFF:
all aspects of conprogram. Miscellathe spindle control its
Most spindles can rotate in
NSOO M09
(CW) and
C) Example 0 - axis motion and
Lion is always relative to a viewpoint is lion along the spindle center lion in such a view is as M04. assuming the
ON:
N230 GOO Xll.5 Y10.O MOS
=
Coolant should always be programmed with two lant considerations in mind:
E - axis motion and
OFF.
N4QO GOO Zl.O M09
The examples show cessing. The gen;;ral rules
pro-
o
Coolant ON or OFF in 8 the block in which it is
o
Coolant ON, when programmed with the axes motion, becomes active simultaneously with the axes motion (Example 0)
o
Coolant OFF, programmed with the axes motion, becomes effective only upon completion of the axes motion {Example E)
:>e:IJ'I1TClIe:
The main purpose M08 funclion is to turn the coolant pump motor on. It that the CUlling receives any coolant On large machines with long coolant pipes, or with low coolant pump is to expected before the coolant pump and cutting lOol.
clockwise of rota· point of view. The spindle as the towards itsface. CW rotaas M03, CCW direction rotated either way.
0\.L1,llV<.U\J
The drilling and milling Lypes of machines use this established convention commonly. The same convention is LO lathes. On a CNC milling machine or a machining center, it is more practical to look towards the part from the spindle side rather than from the horizontal type), the more the tailstock towards the spindle, because that (0 how the CNC machine operator stands in nu.H'l/p, M03 and M04 spindle the same way as for machining cenis the fact that left hand tools are In more than in milling applications. Make an to manual for a machine carefully in 12. Spindle function (0 program a spindle is function will stop the spindle from rotating, the rotation direction. On many machines. neous MOS must also be programmed the spindle rotation:
60
9
M03 <: •••
CW)
Machining at the current location .•• :>
M05 <:. • • M04
<. . .
a tool change ... :> (SPDmLE CCW)
at the current location ... :>
may also be required on CNC lathes. A spindle SLOP . an axis motion, will take completed. spindle control function is the function M 19, spindle orienTation. Some control call it the spindle key lock function. Regardless of the the M 19 function will cause the spindle to SLOp in position. This function is used mostly during seldom in the program. The spindle must be in two main situations: o
Automatic tool change (ATC)
o
Tool shift during a boring ",",or<>+i,," and boring cycles only)
For example, most rougbing " ....",..".i"'.~" the spindle more than the low range is usually a better selection. medium or high range is better, high can be more beneficial to the metal removing distribution of (he miscellaneous functions has entirely on the number of gear ranges the CNC available. Number of ranges IS I, 2, 3 or 4. foJlowi shows typical distribution of the M the actual commands in a machine tool manual.
Ranges
Gear
N/A
None programmed
2 available
M41 M42
Low range High range
3
M41 M42 M43
Low range Medium range High range
M41 M42 M43 M44
law range Medium range 1 Medium range 2 High range
thumb is that the higber (he gear range, the is possible and less spindle power is reis also true. Normally, the ."pindle rota be stopped to change a gear, but conanyway. In doubt, stop the spindle the then restart the spindle.
sequence and cutting tool holdthe M 19 with the first, is necessary for certain boring on mill To exit a bored hole with a 1001 away from the finished cylindrical wall, the spindle must the tool cutting bit must be aQd then the tool can be from the hole. A similar approach is back boring operations. However, use fixed cycles in the program, where is built in. For more details, Chapter
M function
• Machine
Ar.r.fHrt~n
The majority of " .. ,,,"'''',,<.1, functions is used for some physical operation of the tool <.>"'\..""""Ul this group, the more common ready covered, specifically changes. The remaining M scribed in delail elsewhere in description is offered are: chine related M
In conclusion. the M 19 gram. It IS aVailable as a ... r~'''''''''''''''' chine operator for
M function
• Gear Range Selection
M06 M60
Description M
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 terminology established a block was as a CNC system. single instruction processed by A block, a n block is normally one written line in copy, or a line typed in a text and terminated by the Enter key. This line can contain one or more program words - words that result in definition a single i to the machine. Such a program instruction may contain a of commands, coordinate words, (001 functions coolant function, speeds and commands, position registration, offsets of different English, (he contents of one block will kinds, etc. In be as a single unit before the control block. When the whole CNC program is proindividual instructions the system will (blocks) as one complete machine step. Each program consists of a series of necessary to complete a machining process. overall program number of blocks length will always depend on and their
BLOCK STRUCTURE As many program words as are allowed in a block. Some controls impose a limit on the number in one is only a maximum Fanuc and controls, in practice. The only restriction is that two or more duplicated words (functions or commands) cannot in the same block of G example, only one (with the miscellaneous M function do exist) or only one coordinate word for the X in a 5i block are al The order of words within a block follows a fairly free required words may be in providing that block (the N address) is written as (he firs! Although order of individual words in a block is allowed to be in order, it is a standard practice to place words in a ora block. ft the CNC to and understand. dependent on block slructure is and the type of the eNC machine. A may conlain the following inslructions, in the Not all data are to be specified every lime.
o
Block number
N
o
Preparatory commands
G
a
Auxiliary functions
M
o
Axis motion commands
XYZABCUVW ...
o
Words related to axes
I J K R Q ...
o Speed,
or tool function
S FT
contents of tile program block will between matools of di kinds. but the majority of general rules will be followed, regardless of CNC system or the tool
• BuHding the Block Structure program has to built with the same thoughts the same care as any other important structure, for a building. a car, or an It starts with planning. Decisions to be as lO what and what will not of the program block, to a building, car, or other structure. Also, have to as to what order commands instructions - nrc to be established within thc block many other The next few examples compare a typical structure operablocks milling operations and blocks for tions. block is as a separate
• Brock Structure for Milling In milling operations. the structure of a typical machining center block will renee! the realities of a or a machine.
C
Milling block examples:
Nll G43 Z2.0 S780 M03 HOl
{EXAMPLE
N98 GOl X2.1S Y4.575 F13.0
(EXAMPLE 2)
The first milling example in block NIl, is an illustration of a 1001 length offset applied with the ndle rotation dIe speed and example in block shows a typical prong instruction for a simple linear CUlling motion. the linear interpolation method and a suitable CUlling
61
62
<:>
Chapter 10
Turning block examples:
N67 GOO G42
5 ZO.l T0202 MOS
N23 G02 X7.5 Z-2.8 RO.5 FO.012
1) (E.XAMPLE 2)
rectory more descriptive useful. The program description can be read on display screen provides an easidentification of program stored.
If program name is than the characters recommended, no error is generated, hut only the firsl sixteen will be displayed. Make sure 10 avoid names that can ambiguous when displayed. names, they appear 10 be these two
In lathe examples. block N67 a rapid motion to an XZ position, as well as a few other ("''''''nm,
OJ.005 (LOWER SUPPORT A.RM: - OP 1) 01006 (LOWER SUPPORT A.RM: - OP 2)
PROGRAM IDENTIFICATION
the control screen display can show only the 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 number is in order to store more than in the CNC memory. name, if can be used to make a brief description of proreadable on the control screen display.
• Program Number The
is commonly a Ihecontrol system from the are available for the number - the letter a for formal, colon l : J for ASCII (ISO) formal. In memory operation, the control system always displays program number with the letter The block containing the number is not always necessary to include in the
If the program uses program numbers. typical specified within an allowed range. Programs Fanuc controls must be within the range of I - 9999, program zero (00 or 00000) is not allowed. Some not allowed controls allow a 5-digit program number. are decimal poim or a negative sign in the program of leading zeros is - for '-'h<"JJ~J'\;'. I, 0001. 00001 are all entries, in this case for a program number one.
• Program Name the latest control systems, the name of Ihc can bc i in addition to program not instead of the program number, The program name (or a brief of the program) can to sixteen long (spaces and symbols are The program name must be on same line (in same block) as the program number: 01001 (DWG. A-124D IT. 2)
This has the advantage that when directory of Ihe memory is displayed on the screen, the name of the proappears next to the program making di-
01005 SUPPORT 01006 (LOWER SUPPORT AR)
eliminate this problem, use an that is within the characters data: 01005 (LWR SOPP ARM OP1) 01006 (LWR SUPP A.RM: OP2)
If a more detailed description is to
the description split over one or more comment lines:
01005 (LWR SOPP A.RM: (OPERATION 1 - ROUGHING)
The comments in the block or blocks following the screen lislnumber will not appear on but still will be a useful aid to CNC operator. be displayed during the execution and, course, in a hard copy printout.
Keep the names short and descriptive - their purpose is to the CNC in of programs in the control memory. The data to in program name are the drawing number or number, parl name. operation, etc. Data not are the name, control mo.del, name, date or company or customer's name and similar descriptions. On many controls, program into the memory, the CNC the numon the the in the CNC program. It can be a that just bappens \0 be available in (he system, or it can be a number that has a unique meaning, perhaps indicating a group (for exall programs that begin with belong to the group associated with a single customer). Subprograms must always stared under number specified by the CNC Innovative use of program numbers may also serve 10 keep track of programs developed for each or part.
SEQUENCE
63 •
SEQUENCE NUMBERS Individual sequence blocks in the program can be referenced wilh a number for orientation within program. The program address a block number is the leuer followed by up to five digits - from I to 9999 or 99999, depending on the block number be N I to for the older controls and N I Lo for the newer controls. Some rather old accept block in the three only, NI - N999. 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 lwo lypes of For example, a program starting with N I a subprogram also starting with Nl cause a confusing situation. Technically, there is nothing with such a designalion. Refer to for on In
•
Sequence Block format
program input format notation for a using the address N. is N5 for (he more and N4 or even N3 older controls. number is not allowed. neither is a minus a fractional number or a block number using a point. Minimum block increment number must be an integer allowed is one (N 1, N4, N5. etc.). A Increment is allowed its seleclion on the personal programming style or established within the company. The typical sequence block ments then one are: Program 2
N2, N4, N6, NS,
5
N5, N10, N15, N20,
10
N10, N20, N30, N40,
100
N100, N20Q, N300, N400,
.•• .•.
Sequence Number Command
column represents seIn the following table, the quence numbers the way are used normally. second column shows the numbers in a forine control system, as applied to mal acceptable to a CNC program: Increment -
.
block number I~
- - <- " " " " - « - <
1
N1
2
N2
5
NS
10
N10
50
N50
100
N100
99999
N99999
like to start with of the NIOO, usually programmed in the incremenLS of I 10, or less. There is nothing wrong with this a large start and increment. but the CNC too long, too soon, In all cases of block incremenLS than one, the pur· pose of program is the same - to for additional blocks to be filled-in between blocks, jf a comes, The need may while proving or optimizing the program on the machine, where an addition to the existing II be required. Although new blocks (the ones inserled) will not be in the oruer ur an equal increment, at least they will numerically ascending. For a face cut on a lathe one cut (Example A) was by the operator for two cuts (Example
=
Example A - one face cut:
numbers (block numbers) in a CNC al least one likely several advantages On the positive the block program search greatly simplified repetition on (he machine. They the program to read on CNC display screen copy. That means both or on the programmer the operator benefit On the side, block will the available computer memory of the That means a of programs can stored in the memory, programs may not fit in their entirety.
N40 GOO G41 Xl.S zo T0303 Moe NSO GOl X-0.07 FO.Ol N60 GOO WO.l M09
mo
G40 Xl. S
=
Example B - two
cuts:
N40 GOO G4l Xl.5 ZO.05 T0303 MOS N50 aOl X-O.07 FO.Ol N60 GOO WO.1 N61 X3.5
N62 ZO N63 GOl X-0.07 N64 GOO WO.l M09 mo G40 Xl.S
64
10 """'1"1"''' in
N40 and N6l to this handbook is 10 I"Il"f,a!"lOlm if an addition is needed, will have no numbers at all (check if the control system allows block numbers to be omitted, most do),
Q Example A - one face cut: N40 GOO G4l X3.5 zo T0303 MOS N41 GOl X-O.07 FO.Ol N42 GOO WO.l N43 G40 X3.S
Q Example B . two face cuts: N40 GOO G4l X3.5
zo.os
T0303 MOS
N41 GOl X-D.07 FO.Ol N4.2 GOO WO. 1
X3.S ZO
GOl X-O.07 GOO WO.l N43 G40 X3.5
Note that the program is a lillie smaller and the additional or arc quite visual and noticeable when displayed on the screen. Leading zeros may (and should) be omitted in - for example. NOOOO8 can (he zeros reduce the zeros must always be written, to for sl1ch similnri 8S N08 and N80. use of block numbers in a program is optional, as shown in the earlier example. A program containing is easier to CNC operator, functions in program editing can be used depend on the numu"..... ..,.'" repetitive cycles the significant blocks
•
Numbering Increment
Block numbers in a prog(am can
in any physical order - they can also be programming UI..,",
block sequence number not affect the order of program processing, regardless of the increment. if the blocks are numbered in a or mixed the part will always be sequentially, on the of the block nO! mcnt of 5 or lOis the most to 4 to 9 That should more than sufficient for the program modifications. programmers who use a computer hased programming system, just a few relating to (he gramming of sequence numbers. Although the computer programming allows start number of the block and its to almost any adhere to the start and numbers of on.e (N I, N2, N3, ... ). The is (0 keep an accomputer based \"""""U
•
long Programs and Block Numbers
are always to into a CNC limited capacity. In such cases, the program lenoth may be shortened by omitting the block numbers altog~ther or - even - by programming them only in the significant blocks. The significant blocks are those that have to be numbered for the purpose of search, a (001 repetition, or procedure Lha[ on program numbers, such as a machining cycle or tool In these cases, select of two or the operator's numbers will convenience. limited use of Increase the length, but for reason.
rr all block numbers have been omitted in the program, the search on the machine control will 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 sequence block method unnecessarily prolong Of BLOCK CHARACTER of the control specifications, ual sequence blocks must separated by a special characler or by its known as Ihe EOB or E-O-B. most computer ""h~'''''''IP!" is generated by key on the the program is input to control by MDI on the control the EOB the block. The symbol on appears as a semicolon [ ; ].
SEQUENCE BLOCK
The semicolon symbol on the screen is only a graphic representation of the end-or-block character and is never entered literally in the CNC program. stances it should be included in the program older control systems have an asterisk [ * J as symbol for the end-of-block, rather then the ... m,,..."'" Many controls use other symbols. that of block, for example, some use the any case, remember the symbol is only the !he end-of-block character, not its actual
STARTUP BLOCK OR SAFE BLOCK A startup block (sometimes called a or a slalUS block) is a sequence block. It one Of more (usually preparatory commands of thal the control system into a state. This block is placed at the or even allhe beginning of each is processed duriog a repetition of a program a tool within a program). In the CNC program. the startup block usually precedes any motion block or as well as the tool change or tool index block. to be searched for, if the program or n"""',o,f1 cutting 1001 is to be repeated during a machine opSuch a block will be slightly different for the milland systems, due to the unique requirements of
in this handbook, in. the Chapter 5, one covstate of {he control system when the main on, which sets the system default condishould never count on they can be easily changed by without the programmer's knowlsetthe machine who designed the conshould always assume approach and will not programmer will try to preconditions under the program control, rather that ng on the defaults of the CNC system. Such an approach is not only much safer, it will also result in the that are 10 use during the setup, the tool path provi ng and tool repetition due to the tool breakage, dimensional adjustments, etc. It is also very beneficial to the CNC particularly to (hose with limited applications listed, the startup block will not machining cycle time at all. Another block is that the proone machine tool to andefault setting of a par-
65 The name safe block - which is another name for the startup block - does not become nuuie safe. Regardless of name, tain control settings for the program or slart the program in a state. tries that set the initial status are the (English/metric and absolute/incremental), any active cycle, cancellation of the cutter offset mode, the plane selection for milling, the fault selection for lathes, etc. The presented some blocks for both milling and turning 1'1"\">11"1'\1 At the beginning of the program for milling, a startup may be programmed with the following contents: Nl GOO G17 G20 G40 G54 G64 GSO G90 G98
N I block is the first sequence number, GOO rapid mode, G 17 establishes the XY plane selection, selects the English units, G40 cancels any active cutter raoffset, G64 sets a continuous cutting mode, G80 cancels any active fixed cycle, G90 selects the absolute mode, G98 will retract to the initial level in a conditions apply only when the startup as the first major block in the CNC "LlIJ""'I..ILII"'''' program changes will become block in which the change is command is effective by any subsequent cancel the GO I command. of GOO. G02, or a CNC lathe program, the startup
G codes: Nl G20 GOO G40 G99
block number, G20 selects the English the rapid mode, 040 cancels any tool nose radius offset, and the G99 selects feed rate per revolulion mode, to Ihe absolute or incremental the controls use system is usually not absolute dimensioning and the addresses X and Z addresses U and W for incremental dimensioning. For lathe controls that do nol U and W addresses, (he standard G91 is values in X and Z axes. As in the of the words programmed in by subsequent change of Some controls """'AM"" the same line. For grammed with other G G codes in separate Nl G20 017 G40 G49 Gao
two or more blocks can Nl G20 N2 G17 G40 G49 GSO
o
or
on not be proare not sure, place the
66
10
PROGRAM COMMENTS
CONFLICTING WORDS IN A BLOCK
Various comments and messages in the program can be blocks, or as parts of an existing block, mostly in cases when the mesis short. In either case, the must enclosed in parenthesis (for ASCIIIISQ
included within (he program body as
e Example A : NJ30 MOO
e
'Set the English system of dimensions, also set the system of dimensions and set the XY plane'.
8:
N330 MOO
(REVERSE PART /
CHECK
Example C:
N330 MOO PART /
CHECK TOOL)
of a message or comment the machine operator of a every time the program rpClrn,>" such message ~nr\P<~lrc ;omnlents at a understanding the for documenting the program.
IS
11:.'.:>~.al::.\;;':>
and comments relate (0 changes, chip removal from a hole, dimencutting tool condition check and others. or a comment block should be only if 1'P-1T11,,"'n task is not clear from the program to what happens in each block. 1Vle~ssages comments should be brief and focused, as a memory in the CNC memory. perspective, a at the drawing information This subject has 7 - here is just a reminder: nrrn,u'PrI
01001 (SHAFT
DWG B451)
(SHAFT TOOLING - OP 1 - 3 J1U'J CHUCK)
(TOl - ROUGH TOOL - 1/32R - 80 DEG) (T02 - FINISH TOOL 1/32R - 55 DEG) (T03 - OD GROOVING TOOL - 0.125 WIDE)
(T04 - OD THREADING TOOL - 60 DEG) Nl G20 G99 N2 •••
CNC unit is limited, usi ng comment cal. It will listed in proper required details.
Nl G20 G21 G17
What contains is simpJy not logically possible. It instructs the control to:
(REVERSE
e
In a program not impossible. For' the first block of the following words:
Definitely not actually happen a statement? The lection of possible, the mensional Fanuc systems unit will words within same the section dealing with the groups have been preparatory commands - G codes, in Chapter 8. If the computer system two or more words that belong to the same group, it will not return an error it will automatically the last word of the group. In the example of conflicting dimensional selection, it will the preparatory G21 of metric sions - thal becomes That not the selection required. than sive luck, program
the example illustrating and metric tion, the preparatory command G was used. What would happen if, for example. the address X was used? Consider following example: N120 GOl X11.774 X10.994 Y7.0S0 F1S.O
are two X addresses in the same control will not accept the second X value. but it will an alarm (error). Why? Because there is a difference "''''.',,,''',>,.. the programming rules for a G as such and the coordinate system words. allow to as many G codes in the same block as providare not in conflict with each other. But the same """",11"1'\1 system will not allow to program more one coward of the same address for block. rules may also apply. For example, the words io a block may programmed in any providing the N aa(lre~;S is the first one listed. For example, following block is (but very nontraditional in its Nj40 Z-O.75 Yll.56 Fl0.0 x6.S45 GOl
SEQUENCE
67
practices, be sure to block in a logical order. word and is usually folaxes in their alphabetical oraxes or modifiers (1.., L, K..), miscellaneous [unctions words. and the feedrate word as the last item. Select only those words needed for the indIvidual block: N340 GOl X6.84S Yl1.S6 Z-O.7S F10.O
Two other possibilities tention in programming the following block be
that may require a special athow
N150 GOl G90 X5.5 G9l Yi.7 F12.0
There is an the absolute and inmodes. Most Fanuc controls wi I] process this exactly the way it is written. X axis target posibut the Y axis will tion will be reached in absolute be an incremental distance, from (he current position of the cutter. It may not approach, but it offers advantages in some cases. - the sequence block following the block N ]50 will in the incremental mode, since G91 is specified command! The other programming block programmed in the dealing with this subject that an arc or a circle can modifiers I, J and K (depending control system is used). It also input, using the address R, can following examples are correct, 1.5 radius:
or a turnthat a direct raBoth of the in a 90° arc with a
e With I and J arc modifiers: N21 GOl XlS.3S Yll.348 N22 G02 XlS.as Y12.848 11.5 JO N23 GOl ...
e
With the direct radius R address:
N2l GOl X1S.35 Yll.348 N22 G02 Xl6.85 Y12.848 Rl.5 N23 GOl
N22 G02 Xlo.85 Y12.848 11.5 JO Rl.S
or
answer may be surprising - in both cases, the f'("\",lfV'Il the 1and J values and will only the R. order of address definition is irrelevant in case. The address R has a higher control ity I and J addresses, if programmed in same block. All examples assume that the conlrol ports R radius input.
MODAL PROGRAMMING VALUES are modal. The word modal is word 'mode' and means that the comin this mode after it has been used in the once. It can be canceled by another modal command of the same group. Without this feature, a using interpolation in absolute mode with a of J 8.0 in/min, would contain the absolute command the linear molion command GO I and the F 18.0 in every block. With modal values, the programming output is much Virtually all controls accept modal two examples illustrate the commands. ferences:
e Example A Nl2 Nl3 N14 NlS Nl6 Nl7
without modal values:
G90 GOl Xl 5 G90 Gal XS.O G90 GOl XS.O G90 G01 Xl.S G90 GOl Xl.S G90 GOO Xl.S
Y3.4 Y3.4 YO.S Y6.5 Y3.4
FIB.O F18.0 F1B.O F18.0 F18.0 Y3.4 Zl.O
e Example B - with modal values: Nl2 G90 GOl Xl.S Y3.4 F18.0 Nl3 XS.O N14 YO.S Nl5 X1.5 Nl6 Y3.4 Nl7 GOO Zl. 0 identical result.. , Compare Both examples will corresponding block each block of the the modal commands are of the B not to ..... ,..,"'""'11"/1 in the CNC program. In fact, in everyday programming, program commands used are modal. The exceptions are program Instructions, whose functionality starts and in (he same block (for example dwell, machine zero certain machining instructions, such as tool table. etc.). The M functions behave in a example, if the program contains a machine zero return two consecutive it look like this: blocks (usually for safety 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 command is not
N84, because the 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 order of commands in the block determines the priority in which the commands are executed. To complete the subject of a block, let's look at another situation.
M03
Here are two unrelated blocks used as examples: N410 GOO X22.0 Y34.6 S8S0 M03
and NS60 GOO ZS.O MOS
In the block N4J 0, the rapid motion is programmed together with two spindle commands. What will actually 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 controls, the spindle function will take effect simultaneously with the tool motion. In the block N560, a Z axis tool motion is programmed (ZS.O), this lime together with the spindle stop function (M05). Here. the result will be different. The spindle will be stopped only when the motion is one hundred percent completed. Chapter 9 covering Miscellaneous Func/ions explains this subject. Similar situations exist with a number of miscellaneeus functions (M codes), and any programmer should find out exactly how a particular machine and control system handle a motion combined with an M function address in the same block. Here is a refresher in the form of a list of the most common results:
M04
M07
MOS
Functions that will be executed after the cutting tool motion has been completed: MOO
MOl
MOS
M09
M98
Be careful here - if in doubt, program it safe. Some miscellaneous functions require an additional condition, such as another command or function to be active For example, M03 and M04 will only work if the spindle function S is in effect (spindle is rotating). Other miscellaneous functions should be programmed in separate blocks, many of them for logical or safety reasons:
Functions indicating the eod of a program or a subprogram (M02, M30, M99) should stand on their own and not combined with other commands in the same block, except in special cases. Functions relating to a mechanical activity of the machine tool (M06, M 10, Mil, MI9. M60) should be programmed without any motion in effect., for safety. 1n the case of M 19 (spindle orientation), the spindle rotation must be stopped first, otherwise machine may get damaged. Not all M functions are lisled in the examples, but they should provide a good understanding of how they may work, when programmed together with a motion. The chapter describing the miscellaneous functions also covers lhe duration of typical functions within a program block.
It never hurts to play it safe and always program these 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 position at a given moment are called the coordinate words. Coordinate words always take a dimensional value, using the currently selected units, English or metric. Typical coordinate words are X ,Y, Z, L J, K, R, etc. They are the basis of all dimensions in CNC programs. Tens, hundreds, even thousands of values may have to be calculated to make the program do what it is intended to do - to accurately machine a complete part. The dimensions in a program assume two attributes: o
Dimensional units
... English Dr Metric
D
Dimensional references
... Absolute or Incremental
The units of dimensions in a program can be of two kinds - metric or English. The reference of dimensions can be either absolute or incremental. Fractional values, for example 1/8, are not allowed in a CNC program. In the metric format, millimeters and mefers are used as units, in the English format it is incites andfeet that are used as units. Regardless of the format selected, the number of decimal places can be controlled, the suppression of leading and trailing zeros can be set and the decimal point can be programed or omitted, as applicable 10 a particular CNC system.
ENGLISH AND METRIC UNITS Drawing dimensions can be used in the program in either English or metric units. This handbook uses the combined examples of both the English system, common in the USA, to some extent in Canada and one or two other clluntries. The metric system is common in Europe, Japan and the rest of the world. With the economy reaching global markets, it is imponant to understand both systems. The use of metric system is on the increase even in countries that still use the English units of measurement, mainly the United Slates. Machines that come equipped with Fanuc controls can be programmed in either mode. The initial CNC system selection (known as the default condition) is controlled by a parilmeter setting of the control system, but can be overridden by a preparatory command written in the part program. The default condition is usually set by the machine tool manufacturers or disuibutors (sometimes even by the CNC dealers) and is based on the engineering decisions of the manufacturer, as well as the demands of their customers.
During the program development, it is imperative to consider the impact of default conditions of the control system on program execution. The default conditions come into effect the moment the CNC machine tool has been turned on. Once a command is issued in the MDI mode or in a program, the default value may be overwritten and will remain changed from that point on. The dimensional unit selection in the CNC program will change the default value (that is the internal control setting). In other words, if the English unit selection is made, the control system will remain in that mode until a metric selection command is entered. That can be done either through the MOl mode, a program block, or a system parameter. This applies even for situations when the power has been turned offand then on again! To select a specific dimensional input, regardless of the default conditions, a preparatory a command is required at the beginning of the CNC program: G20
Selects English units (inches and feet)
G21
Selects metric units
(millimeters and meters)
Without specifying the preparatory command in the program, control system will default to the status of current parameter setting. Both preparatory command selections are modal. which means the selected a code remains active until [he opposite G code is programmed - so the meuic s~stem is active until the English system replaces it and vIce versa. This reality may suggest a certain freedom of switching between the two units anywhere in the program, almost at random and indiscriminately. This is not true. All controls, including Fanuc, are based on the metric system, partially because of the Japanese influence, but mainly because the metric system is more accurate. Any 'switching' by the use of the G20 or 021 command does not necessarily produce any real conversion of one unit into the other, but merely shifts the decimal point, not the actual digits. At best, only some conversions take place, not all. For example, G20 or G21 selection will convert one measuring unit to another on some - bul not all - offset screens. The following two examples will illustrate the incorrect result of changing G21 to G20 and 020 to 021 WIthin the same program. Read the comments for each block - you may find a few surprises:
69
70
Chapter 11
c::> Example 1 - from metric to G21 GOO X60. 0
units:
• Comparable Unit Values are many units available in the metric and In CNC programming, only a very small of them is used. The are based on a milapplication. The Engdepending on for the different
IniTial wUt selection (metric) X value ,,. arrPI,,)(p/J Previous value will change into 6.0 incites (real translalion is 60 I'I1m 2.3622047 inches)
G20
c::> Example 2 - from English to G20
1niJ.ial unit seleclion
GOO X6.0
X value
units:
G21
Both examples illustrate problem by switching between the two dimensional units in the same program. For this reason, always use only one unit of If the program calls a dimensioning in a subprogram, the rule to subprograms as well:
In it is unwise to control system aTe n ..",';.",; system will trol functions will work.
fecled by the change
Dimensional words (X, Y, Z axes, I, J, K modifiers, etc.)
o
Constant Surface
o
Feedrate function
o
Offset values and tool preset
(eSS - for CNC lathes) F Hand 0 offsets for milling
a number of rlol"i..,.,,,1
o
Screen position
o
Manual pulse generator· the HANDLE (value of flllIll<;!II'lII1'l.
a
Some control system parameters
dimensional units can The initial selection setting. The control status done by a system turned on is the same as is was at when the power power shut off If neither G20 nor I is the time of the accepts the dimensional units seprogrammed, lecled by a .-.<;>'-""',1"1 ..:J"",,,H.,,,. If G20 or G21 is ""lI.lU\AJ command will always the program, the system parameter "'.... LUIl;"'. ority over - the control ""<:1"""'" mer makes preting them, but it the units setting in a ",,, ... ,,r,,t Always motion, offset selection, or fore any and G54 La G59). nate system produce incorrect results. low this ng unils for different jobs. when frequently
mm
Meter
m
Inch
in
Foot
ft
Many programming terms use abbreviations. terms between the two mensional systems (older terms are in
next table shows the
even if the selection of the difference how some confollowing functions will one system of units to the
o
Millimeter
Metric
English
mlmin (also MPM)
ftlmin (also FPM or SFPM)
mm/min
in/min (also IPM or fpm)
mm/rev
in/rev {also IPR or ipr}
mm/tooth
(also IPT or ipt)
HP
kW
ABSOLUTE AND INCREMENTAL MODES A dimension in either input units must have a rn",."h"-", point of reference. example, if X3S.0 In program and the units are millimeters, statement does nol i where the dimension of mm has needs more information to correctly. There are two
In
o
Reference to a common point on the part ... known as the for ABSOLUTE input
o
Reference to a point on the part ... known as the last tool position for INCREMENTAL input
In the example, the dimension X35.0 (and any as well) can from a selected fixed point on the part, called or program zero, or program point - all terms have the same meaning. value can be measured from the tool current position for the next cannot distinguish one two statement alone, so some added to the program.
INPUT OF DIMENSIONS
71
All dimensions in a CNC program measured from the common poinl (origin) are absolute dimensions. as illustrated in Figure JJ-J, and al I dimensions ina program measured from the current position (last point) are incremental dimensions, as illustrated in Figure J /-2.
0
2
0
3
, I
-
1
cF~ 1r1_
,/I~
/
/: ---
•
'
I I
ORIGIN,I -
Preparatory Commands 690 and G91
There are I wo preparatory commands available for the input of dimensional values, G90 and G91. to distinguish between two availabJe modes: G90
Absolute mode of dimensioning
G91
Incremental mode of dimensioning
---
'4
0 0
-
•
•
It is a good programming practice to always inclurle the required setting in lhe CNC program, not to count on any default setting in the control system. It may come as a surprise that the common default setting of the control system 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. Follow this reasoning:
Figure 71·1 Absolute dimensioning - measured from part origin G90 command will be used in the program
-- -01 ,/L-______________________
Both commands are modal, lherefore they will cancel each other. The control system uses an initial default setting when powered on, which is usually the incremental mode. This setling can be changed by a system parameter that presets the computer at the power startup or a reset. For individual CNC programs, the system setting can be controlled by including the proper preparatory command in the program, using either one of two available commands - the G90 or G91.
~
__ _
=I===:I==I==.!
//~/ :J:. :_~:_:_ _ :START AND END
Figure 11-2 Incremental dimensioning - measured from the current tool location G91 command will be used in the progrom
Absolute dimensions in the program represent the target locations of the cutting tool from origin Incremental dimensions in the program represent the actual amount and direction of the cutting tool motion from the current location
Since the dimensional address X in the example, written us X35.0, is programmed the same way for either point of reference, some additional means must be available \0 the programmer. Without them. the control system would use a default selling of a system parameter, not always reflecting the programmer's intentions. The selection of the dimensioning mode is controlled by two modal G commands.
Consider a typical start of a new program loaded into the machine control unil. The control had just been turned on, the part is safely mounted, the cutting tool is at the home position, offsets are set and the program is ready to start. Such a program is mosllikely written in the more practical absolute mode. Everything seems fine, except that the absolute G90 command is missing in the program. WhaT will happen at the machine? Think before an answer and think logically_ When the first tool motion command is processed, the chances are that the tool target values will be positive or have small negative values. Because the dimensional input mode is missing in the program, the control system 'assumes'lhe mode as incremental, which is the default value of the system parameter. The lool motion, generally in X and Y axes only, will take place to either the overtravel area, in the case of positive target values, or by a small amOlJnl, in the case of neg<1li ve target values. In either case, the chances are that no damage will be done to the machine or the part. Of course, there is no guarantee, so always program with safety in mind. G91 is the standard default mode for input of dimensions,
72
Chapter 11
• Absolute Data Input - G90 In the absolute programming mode, all are of origin. origin is the promeasured from Ihe gram poinT also known as program zero. The actual the is the di fference bet ween current absolute position the tool and the previous absoposition. The [+] plus or H refer to the quadrant of coordinates, nor direction motion. Positive does not have to written for any address. AI! z.ero values. such as XO. YO or ZO to the at program point, not to the motion itself. The zero value of any axis must written
• Combinations in a Single Block many Fanuc the absolute and incremental modes can be combined in a single nrr'O'f':~rn cial programming purposes. This usual, but are significant benefits this advanced is in one mode only plication. Normally. the either in the absolute mode or incremental mode. On controls, for to the opposite mode, the motion command must programmed in a block. do not to program an inSuch controls, for cremental motion along one axis and an absolute motion along other axis in the same block. do allow to program both in the same All that needs to be done is to specify the G90 or the G91 preparatory before the significant address. Most
absolute The preparatory command G90 mode remains modal until the command 091 is programmed. the absolute there will no motion for that is omitted in the program. main advantage programming is tbe ease of modification by the programmer or CNC operator. A change of one dimension does not any other menslOns m program. lathes with Fanuc controls, the common repreof the absolute is the axis as X command. Some lathes Fanuc controls.
• Incremental Data Input - G91 programmmg, a mode, all program dimensions are as de"'<:l,elln-", distances into a specified direction (equivalent to 'on the control The actual motion of the is the speC! fied amount along with the direction indicated as or negative. rPI,'7TH'P
signs + or - specify direction of the tool motion, not the quadrant of rectangular coordinates_ Plus for positive values does not have to be written, but sign must used. All zero input values, such as XO, YO or ZO mean there will be no tool motion aiong that axis, and do not have to written at all. If a zero axis value is programmed in inmode, it will preparatory comincremental is G91 and remains modal until the absolute is programmed. will be no motion for any axis omitted in the block. The main advantage of programs is their portability between individual of a An program can called at different locations of the part, even in different programs. It is mostly when developing or repealing an equal distance. For controlled CNC lathes, the common representation incremental is the axis designation as U and W, without the G91 command. Some lathes use I, but not those with controls.
G91 are not For lathe work, where G90 is between the X U axes and the Z and Waxes. The X and Z contain the absolute values. U Ware the incremental values. Both types can be wriuen in the same block without a problem. Here are some typical examples for both applications:
C Milling example; N68 GOl G90 X12.5031 G91 Y4.S111 Fle.S
The milling shows a motion the cutter has La reach the absolute position of 12.5037 inches and - at the same rime to move Y axis by 177 inches in the Note position commands G90 and G91 in the block - it is Important, but it may not work on all
C Turning example: N60 GOl X13.S6 W-2.S FO.013
example a lathe shows a tool motion, where the cutting tool has to reach the diameter of 13.56 inches and - at/he same time to move 2.5 inches into the Z direction. by the neremer tal address W. or G91 is not nonnally the Group A G codes is the most common one ~nd does not G code of dimensional mode selection. is a switch the absolute mode in a CNC program, me programmer must be careful not to remain in the 'wrong' mode man The switch (he modes is Iy temporary, for a specific It may one block or several blocks. thatLhe original selling for (he proRemember that both the absolute and .nf'rp,...,pnt,:; modes are modalremaIn In unby the opposite
IN
OF DIMENSIONS
73
DIAMETER PROGRAMMING All dimensions along
as programming and Normally, the defauh ler programming. The changed to interpret the X GOO X4. 0 GOO X2. 0
MINIMUM MOTION INCREMENT
on a CNC lathe can be
This approach simplifies the program to read. controls is system parameter can as a radius inpul:
Dia.me/erdimellsioll
, .. when sel 17)' {J {Ifl1'ffJl1l'lf'Y
R(Jf/ilis
... when set by (j paroJlleler
value is rnrrpt·, setting. The diameter is easier to by both the programmer and operator, use the diameter di for cylindrical suring diameters at machine is common. cerlain caution - if the diameter programming is used, all tool wear offsets for X must be treated as applicable to the diameter oJfhe not to il$ single (radius value).
Minimum increment (also called the leas! increment) is the smallest amount of an a.:ds movement the control syslem is capable supporting. The minimum increment is the smallest amount thai can be programmed within the selected input. Depending on the dimensional Ihe minimum increment is exin millimeters system or in system.
0.001 mm
of minimum
most com0.0001 inches for metunits respectively. a typical CNC increment for the X axis is also 0.00 I mm or but is measured on the diameter - that means a mm or .00005 inches minimum increment per is much more tlexjble machining the metric than in the English are O.OOl mm
Minimum increment
Converted equivalent -
.~
0.001 mm
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:
Q Example 1 - Absolute diameters:
.00003947 inches
..
.0001 inches
0.00254
the metric system system, which less accurale
J54% more accarale the English system
metric system,
(ABSOLUTE START)
FORMAT OF DIMENSIONAL INPUT year of 1959 is numerical ......."'''''~'"' have taken format of dimensional
X116.0
GOO ..
Q Example 2 - Incremental diameters:
mo.o
Metric
In the
mode, the intended X mOlion will Inlhe U as a distance and be programmed as on n direction to
GOO G42 X85.0 Z2.0 T0404 MOS GOl z-24.0 FO.3
Minimum increment
.0001 inch
Another consideration, very imporLant, is the the absolute or the incremental mode of dimensional input. The diameter programming, represents the part IS where the X much more common in the absolute mode. In those cases. when an incremental is required. that all incremental dimensions in the program must be specified per dial1letel; lIot radius.
GOO G42 X8S.0 Z2.0 T0404 MOS GOl Z-24.0 FO.3 X9S.0 Z-40.0 X1l2.0 Z-120.0
Units system
considered to be the Since that lime, that intluenced the nrr,ot":lm
Even to this day, data can be one of the four possible ways:
(ABSOLUTE START) (X95.0)
Z-40.0
Q
Full address format
o
leading zeros suppression
ill 7 . 0
(Xll.2 • 0)
o
Z-120.0 U4.0 GOO ..
(Xl16.0)
o Decimal
zeros
in
74
Chapter 11
In to understand format back some years may be beneficial. control (mainly the old NC systems as compared to the more modern CNC were nOl able to accept the input of dimensions - the decimal point formal - but the accept all the earlier formats, even decimal format is most common. The reason iscompatjbility with lheexisting programs (old programs). decimal point programming method is latest of available, systems thaI allow point programming can also accept programs written many years earlier (assumed that the control and machine tool are also compatible). The reverse is nor true.
Since leading zeros suppression and the trailing zeros suppression are mutually exclusive. which one be programmed for Without a decimal poim? As it depends on setting the control system or (he designation of (he status by the control manufacturer, the actual stnLuS must be known. status determines which zeros can suppressed. It may be the zeroes zeros allhe end of a dimension withallhe beginning or out a decimal poin!. In the extremely unlikely evenl the system is with zero suppression feature as the only programming the decimal point will not be possible. illustrate results of zero suppression. will be earlier
is a very imponant issue, knowing how the interprets a number that 110 decimal poim is for all motion commands and
Jr the English input .625 inches is to programmed in the leading zero suppression format applied to the X it will in the program as:
• fun Address format
X6250
The full format of a dimensional English metnotation of +44 in That means ali eight digits have to len for the words X, y, Z, I. J, K, etc. For example, the English of .625, applied to X axis, will be written as:
The same dimension suppressed, will
rOs
inches with the trailing zein Ihe as:
X0000625
The metric units input of 0.42 mm, also applied 10 the axis, is written with the lending zeros suppressed as:
X00006250 X420
the X axis,
dimension of 0.42 mm, written as:
when
to The same dimension of 0.42 mm with the suppressed will appear in the program a,,\:
zeros
X00000420 X0000042
full formal programming is applicable only to early control un its, but is correct even today. programmed was usually without the designation, which is determined by position of the dimension within the block. For modern CNC programming. the full format is obsolete and is used here reference format will quite comparison. Yes, modern programs, but don't used it as a standard. •
Zero Suppression
Zero suppression is a great improvement over full programming It was
Although the examples above illustrate only one small ieation, the impression leading zero suppresis more practical than the trailing zero suppression is quite Many older control systems are indeed set (rarily 10 the zero suppression as the default, because its practicality. is the reason why - study it carefully, although today the subject is more trivial than On other hand. if even one decimal point is omitted (forgOlten) in the program, this knowledge becomes very useful and subject is not trivial any more. Preference for Leading
Suppression
the dimensional input the syslem can accept eight digits, withoUl a decimal point, ranging from 00000001 to 99999999: o
Minimum:
0000.0001 inches
o
Maximum:
9999.9999 inches
or or
00000.001 mm 99999.999 mm
is nol written. If the program uses zero suppression either type, a comparison of input values should be useful:
INPUT OF DIMENSIONS
Input Decimal point
75 - inches
leading zeros
suppression
Trailing zeros suppression
XO.OOOl
Xl
XOOOOOOOl
XO.OOl
XIO
XOOOOOOl
XO.Ol
XIOO
XODOOOl
XO.l
X1000
00001
Xl. 0
XlODOO
0001 XOOl XOI
XI0000000
Xl
leading zero suppression is much more common, bebencfits numbcrs with a small parI than a large integer part. the metric input the resulls will
dwell
a
X0000050
a No
zeros
X500
a
No trailing zeros
X000005
a
Decimal point
XO.5 or X.5
Note thaI the format is the same dwell as for the words. The programmed formal will always adhere to the notation of the address. dwell is expressed by the dentally, in some P address, which a decimal point at all and the leading zero suppression must be programmed will be equal to P500. mode in effect.
• Decimal Point Programming
Input value comparison - millimeters point
the I can programmed with the X fo!lowed by the of eight digits, always positive. If control system the decimal point, there is no confusion. If the leading or the trailing zeros have to is very important
Leading zeros suppression XOOOOOOOl XOOOOOOl XOOOOOl
Xl-O
XlOOO
XOOOOl
XIO.O
XIOOOO
XOOOl
XlOO.O
XlOOOOO
XOOl
XlOOO.O
X1000000
XOl
XIOOOO.O
XIOOOOOOO
Xl
time. important for example, the programmer forgets to point or CNC operator forgets to punch it in? - and common - errors that can be avoided good knowledge. complete the section on zero suppression, let's look at a program input that uses an axis letter but no/ as a nate word. A command will be to explain. Chapter 24 covers the delails relating to the dwell gramming. use the basic format and one second dwell The dwell formal is the dwelling This format tells us that
All modem will use the decimal point for dimensional input the decimal point, particularly for program a fractional portion, makes the CNC program much to develop and to read at a later date.
From all the available nT"""""'"", used. not all can be The ones that can arc those millimeters or seconds The following two mal point is allowed in controls:
thedeciand tum-
control programs:
X, Y, Z, I, J, K, A,
=>
R
Turning control programs:
X, Z, U, W, I, K, R, C,
F
The control system that supports option of programming the decimal point, can also dimensional values without a decimal poin£, to allow with older programs. In such cases, it is the principles of programming and the traiJing zeros. If they are used rrw'r",1'" explanations). there will be no problem to the various dimensional formats to any other old or new. If possible, program the as a standard approach.
76
11
compatibility enables many users to load their old in format), into the new not the other way around usually with or no modifications at all Some units do not have the ability to an paper tape they have no tape convert any tapes that contain good programs, there are two options if - one, have someone to install a tape reader in possible and (probably not). to store the contenls of a tape in the memory computer. much better able software possible. cializing in in the metric system assume 0.00 I mm mInImUm while in the English the increment is .000 I an inch (leading zero suppression mode is in effect as a default);
• Input Comparison Differences in the input format for both and metric dimensioning can be seen clearly. One more time, the same examples will shown. as before:
Q English
Full format No leading zeros No trailing zeros Decimal point
input of .625 inches: X00006250 X6250 X0000625 XO.625 or X.625
Q Metric example input of 0.42 mm : Full format No leading zeros No trailing zeros Decimal point
X00000420 X420 X0000042 XO.42 or X.42
CALCULATOR TYPE INPUT In some
is is
Y12 • 56 Y12.56
Yl25 600 ..Jor English units Y12560
.. .jormefriculliis
without the decimal the same block:
such as woodworking or (especially metric) not require decimal only whole numbers. In these cases, the decimal point would always be followed with a zero. Fanuc provides a solution to such situations by the feature called calculator input. Using this feature can shorten program size.
N230 X4.0 Y-10
This may be beneficial extreme conservation of system memory. For X4.0 word WIll fewer characters than the X40000 - on the other hand, the Y-IO is shorter decimal poin! equivalent of y-o.OO I (both examples are in English units). If all before or after the decimal are zeros, (hey do not 10 wriUen:
xO.s
:::
Y40.0
Z-O.l F12.0
X.5 X40.
calculator type input parameter. Once the parameter is the trailing zeros do not to example, will the normally expected
selling of a system the decimal point and they will asas X25.0, not
H l r . . . ",,, -
In case the input value the decimal point, it can written as usually. means the values with a decimal point will be interpreted correctly and numbers withou( decimal point will be treated as major units only or millimeters). Here are some
Z-.l ;:;
Standard Input
F12.
RO.125 ::: R.12S
... etc.
Any zero value must be written example, XO cannot written as X only. In this all the program examples use the decimal point whenever possible. Many programmers prefer to nrr"',"'!\rT\ zeros as in the left of the example. They memory. but they are for learning.
i·
Calculator Input
X345.0
X345
XL 0
Xl
YO.67
YO.67
Z7.4B
Z7.48
Normally, the control system is set to the 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 mateuse spindle rotation when removing a rotation may be that of the cutting tool or itself (lathes). In both cases, the. spindle and the working feed rate of the to be strictly controlled by the program. require instructions that relate to the selection of a suitable speed of the machine spindle and a a given job. methods to control the spindle and cutting they all depend mainly on the type of the CNC the current machining application. In this chapter, we look at the spindle control ancl its programming appl '('
SPINDLE FUNCTION to spindle speed is conS. The programis usually within the range of point is allowed: 51
10
59999
machines is not unusuaJ to For many high to five digits. in the range have spindle available of I to 99999, within S
On
CNC lalhes, all three alternatives may on the control system. For the CNC mill' terns, peripheral spindle speed is not applicable, spindle speed code number and the direct spindle speed are. spindle speed selection by special code number is an obsolete concept, no! required on modern controls. I-'..... JJIUllII5
ndle speed designation S is not ",,..,,,,.,,,,,,,,,,,,,,.rl by itself. In addition to the additional are attributes that control is if the spindle programming instruction is not spindle function stands by itself in not include all information {he control for spindle data. A spindle speed example, to 400 r/min or 400 mlmin or 400 on (he machining application), does not information, namely,lhe spindle rotaMost can be rotated in two directions clockwise or counterclockwise, depending on the type and setup of the cutting tool used. The spindle rolation has to be specified in in addition to the spindle speed are two miscellaneous functions provided by that controllhe direction of tile spindle-
DIRECTION OF SPINDLE ROTATION 51 to 599999
and left, up and down. clockand similar directional terms, is /lIe relative to some known reference. as clockwise (CW), or as some established and standard this case a reference point of VLa'UUll
• Spindle Speed Input The address S relates to and must always the CNC program. are the numeric value (input) of the
o Spindle speed code number
spindle function, numeric value in alternatives as to what function may be: .. old controls· obsolete
o
Direct spindle speed
.. r/min
o
Peripheral spindle speed
.. ftlmin or mlmin
The direction rotation is always relative to the from the spindle side of the poim of view that IS ",;) ••:lUlI',. that contains the spindle. machine. This part a headstock. Looking and is generally called from the machine area the direction along establishes the corspindle center line and towards rect viewpoint for and CCW rotation of the spindle. For CNC CNC machining centers, is quite simple to understand. are exactly the same, and will
77
78 •
Chapter 12
Direction for Milling
It may be rather impractical to look down along the center line of the spindle, perpendicularly towards the part. The common standard view is from the operator's position, facing the front of a vertical machine. Based on this view, the terms clockwise and counterclockwise can be used accurately, as they relate to the spindle rotation - Figure 12-1.
Although the descriptions CW and CCW in the iHustration appear to be opposite to the direction of arrows, they are correcL The reason is that there are two possible points of View, and they are both using the spindle center line as {he viewing axis, Only one of the viewpoints matches the standard definition and is, therefore, correct. The definition of spindle rotation for lathes is exactly the same as for machining centers. To establish spindle rotation as CW and CCW,
M04
M03
look from the headstock towards the spindle face.
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 directions 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!
R/H tool - CCW
R/H tool- CW
Compare the following two illustrations - Figure 12-3 shows the view from the headstock, Figure 12-4 shows the 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
Figure 12-3 Spindle rotation direction as viewp.d from the headstock
Headstock
cw
ccw
y Tailstock
CW= M03 Figure 12-2 Typical view of a slant bed two axis CNC larhe. CWand CCW directions only appear to be reversed
CCW= M04
Figure 12-4 Spindle rotation direction as viewed from the taifstock
SPINDLE CONTROL
• Direction Specification If spindle rotation is clockwise, M03 function is used in the program - if the rotation is counterclockwise, M04 function is used in the program. the spindle speed S in the program is dependent on the spindle rotation function M03 or M04. their ship in a CNC program is important S and spindle function spindle speed M03 or M04 must always accepted by the control system together. One without the other will not mean anything to the control, particularly when the machine is switched on. There are at leasllwo correct ways to program tbe spindle and spindle rotation: o
If the spindle speed and rotation are programmed together in the same block, the spindle speed and the spindle rotation will start simultaneously
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 The following examples demonstrate a number of correct starts for the spindle speed and rotation 10 All examples assume that is no active setting of spindle speed either through a previous program or through the Manual DaJa Input (MDI). On machines, there is no or default speed when the machine power turned on.
<:> m
Example A - Milling application:
G20
N'2 G17 G40 GSO NJ G90 GOO G54 X14.0 Y9.S
N4 G43 Zl. 0 Hal S600 M03 (SPEE.'O WITH ....".·A·'·' N5 •••
This example is one the preferred for milling applications. Both the spindle speed and spindle rotation are set with the Z axis mOlion towards the Equally motionpopular method is to start the spindle with the in the example: Nl G90 GOO GS4 X14.0 Y9.S S600 M03
Selection is a matter of personal preference. 020 in a separate block in not necessary for Panuc controls.
e
Example B - Milling application:
N1 G20 N'2 Gl' G40 GSO
N3 G90 GOO G54 Xl4. 0 Y9. 5 S600 (SPEED ONLY) N4 G43 Zl.O HO 1 MO) (ROTATION STARTS) N5 ...
79 second example B is technical1y correct, but logically flawed. There is no benefit in splitting spindle speed and spindle rotation into two blocks. This makes the program harder to interpret.
e
C - Milling application:
N1 G20 N2 G17 G40 GBO N3 GOO G90 G54 X14.0 Y9.S M03 N4 G43 Zl.O HOl N5 GOl ZO.l FSO.O S600 N6 ••.
(ROTATiON SET) (NO ROTATION)
(ROTATION STARTS)
Again, the C example is not wrong, but it is not tical either. There is no danger. if the machine pewer has been switched on just prior to running this program. On the other hand, M03 will the spindle rotation, if another program was processed earlier. This could create a possibly dangerous situation, so foHow a simple rule:
e
Example 0 - Turning application with GSO :
N1 G20 N2 GSO X13.625 Z4.0 T0100 N3 G96 S420 M03 (SPEED SET - ROTATION STARTS) N4 •.•
This is the preferred example for lathes, if the G50 setting method is used. Because spindle is se~ as CSS - Constant Surface Speed, the control system WIll calculate the actual revolutions per minute (r/min) current part based on the CSS value of 420 (ftlmin) and at XI The next example E is correct but not recommended caution box above).
e
Example E Turning application with G50 .
N1 G20
N2 GSO X13.62S Z4.0 TOlOO M03 N3 GOO X6.0 ZO.l
(ROTATION SET) (NO ROTATION) N4 G96 GOl ZO FO.04 T010l S420 (ROTAT. STARTS) NS ...
Q Example F - Turning application without G50 : N1 G20 T0100 N2 G96 5420 M03 N3 GOO •••
(SPEED SET - ROTATION
In more contemporary example (GSO is not used as a position command anymore), the machine spindle speed will be calculated for a tool offset stored in the Work Geometry Offsel register of the control system. system will perform the ca1culation of actual r/min when the block N2 is
80 These examples are only correct methods for a spindle start. All contain rotation at the beginning of a program milling and turning applications. The beginning of a program has been selected intentionally, IJ"'-''"'''''''-' for any first tool in the program. there is no active or rotation in effect (normally carried on from a tool). However, the control unit may still store and rotation from the last tool of the previous Any toolfollowing programmed speed "'-:I<::L"'" tool. If onJy the 31..1'11"":''-' for the next tool, assume the last rotation direction. If only the direction code M03 or M04 is programmed, the speed S will the same as the previous tool. Be careful if a program program stop functions MOO Or MOl, or the function M05. Any one of them will automatically stop the spindle. It means to be absolutely sure as to when rotation will take spindle place and what it will be. speed selection and its rotation the same block and for tool. Both functions are connected and placing within a sing1e block w i l l ' and logical program structure.
SPINDLE STOP NormaHy, most work requires a speed. In some cases, a desirable. For example, before change or reverse a part in the middle a program, the spindle must be stopped first. The spindle must also be during a tapping operation and at of proSome miscellaneous functions will stop the spindle rotation automaticaHy (for example, the functions MOO, MOl, M02 and M30). Spindle rotation will during certain fixed cycles. the spindle stop should always Counting on other functions to is a programming practice. 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 the is not required. On tile ......t,nT<;Ifn exactly what is required, in a particular
Chapter 12
but it will
method may result in a slightly longer easier to read and maintain it, mainly with limited experience.
asa
can be Nl.20 MaS
block containing the tool motion, such as Nl.20 Z1.0 M05
The motion will always be completed first, then the spindle will be This is a safety feature built inlo control remember to program M03 or .,.n .... rlll", rotation,
SPINDLE ORIENTATION The last M relates to a spindle activity, is M 19, is most commonly used to set a machine spindle an position. Other M codes may be valid, on the control system. for example M20 on same spindle orientation function is a very specialized seldom appearing in the program itself. MI9 function is used, it is mainly during setup, in the Manual Data Input mode (MDI). This function is exclusive to milling systems, because only specially eqllipped may require it. The function can only be used when spindle is stationary, usually ter the spindle When the control system executes the M 19 function, the following action will The spindle will tum in both clockwise and a short period. the internal activated. In some is audible. The spindle cases, the will be locked in a and rotating it by hand, will not be exact locking position is deterby the machine tool indicated by the setting angle - Figure
Figure 12-5 Spindle orientation angle is defined bV the manufacturer and cannot be changed
ma,~fll'I'"
SPINDLE CONTROL
81
In CNC machine lool operation, the MI9 function enables machine to place a tool into the manually and guarantees a proper 1001 holder orientation. Later chapters will provide more about Ofland applications, example. in point boring
SPINDLE SPEED - R/MIN programming CNC machining centers, designate the spindle directly in revolutions per minute (rlmin). A basic that contains spindle speed 200 rlmin, for require this enu-y: N230 S200 M03
CNC centers (oat all) use tool holders that can be placed into magazine only one way. To ~chieve this goal, the 1001 holder has a special notch of the spindle built-in, matches internal Figure In order to find the the holder that has the there is a small dimple on notch side. deis intentional.
format is typical to milling controls, nO peripheral speed is used. There is no need to use ~ sp~i~l preparatory command to the rlmin setllng. It IS the a mInimUm control default. The r/min value must crement of one. or values are not allowed the r/min must always within the range of any
A few machining centers may be equipped with the option 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 direct of r/min. The distincspeeds, G97 tion between them is discussed next.
SPINDLE SPEED - SURFACE
Figure 12-6 Built-in notch in 8 tool holder used for correct tool orientation in the spindle - not a/l machines this feature
tools with flutes (cutting edges), as drills, end mills, reamers, face mills, etc., the orientation of cutting edge to the spindle is not that important. However, . point . such a~ ing bars, orienlation of cuttmg edge dunng setup lS extremely important, when fixed are used. The two cycles that use the built-in orientation, G76 G87, the retracts from mahole without rotating. In to prevent damage to the finished the tool retraction must controlled. Spindle orientation guarantees that the tool will shift away from the finished bore into a clear direction. An accurate setup is ne1ces,sary Those machines spindle either way still shift when or G87
tool holder the proper setting tools that cycles are programmeu.
Programmed spindle speed should be based on the machined 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 programmed An incorrect spindle speed will have a negative on both the tool and the
• Material Machinability spindle speed, each material a sugtool material. This machinability rating for a is either a percentage of some common material, such as mild , or a direct rating in terms periphor sUiface speed. Surface speed is specified in eral feet per minute (ftlmin) in units, in meters system. minute (nt/min) in for jtlmin is FPM, meaning Feet Per Minute. The amounts of speeds indicate level of machining difficulty with a given tool material. The (he surface speed, the more difficult it is LO machine the material. Note the on the words 'given fool material'. To comparisons meaningful fair, they must be with the same type of cutting tool, for tools will much speeds for high speed lower then for cobalt tools and. course, for carbide tools_
Chapter 12
on the surface speed (he cutler diameter (or part diameter for lathes), machine spindle speed can be calculated in revolutions per one mathematical for English units another when are programmed.
Itir where ...
= = = = =
r/min 1000 m/min 1t
o
Spindle speed in revolutions per minute Multiplying - meters to mm Peripheral in mlmin Constant3.1415927 Dia.meter in mm (cutter diameter or part diameter for
• Spindle Speed - English Units peripheral
To calculate the spindle the material as well as the
type must tool or the part:
speed is 30 mlmin meter is 15 mm: =
= =
(1000 x 30) 636.6 637 r/min
I
A version of the tive and almost as accurate as
the cutting tool
.1415
x 15)
is an acceptable allemaformula:
n",,'I"'(''''
Itir where ...
rim in
Spindle speed in revolutions Multiplying factor - feetto Peripheral speed in
12 ft/min 1t
:::
D
Constant 3.1415927 Diameter in inches (cutter or part diameter for turning)
for milling,
is 150 fUmin,
Peripheral for the selected and the cutting tool diameter is I :::
(12 x 150) / 327.4 327 r/m.in
(3.1415 x L 75)
Many applications can use a mula, without losing any significant accuracy:
r I min =
3.82 x ft I min D ILl."" .. " . the 3.82 constant may as an easier calculation a units must be applied "'Y'r,nG>rl not be correct.
• Spindle Speed - Metric Units When metric
previous formula is
is
in the program,
same, but
units are
Again, by replacing the constant 31 with constant 320 somewhat inaccurate, but within an acceptable most
(or even 300), the r/min will
CONSTANT SURFACE lathes, the machining is different from process. The turning tool has no diameter to the and the diameter of a boring bar has no It is the part diameter that is spindle used for calculations. As the machined, changes constantly. cut or during roughing operations during a eterchanges in Figure 12-7. the spindle is not practical of the many should be selected to is to use the sUrface r/min? The the lathe
is only a half of the To select a The other half is to communicate this selection to trol system. The has to be set to the surface mode, not the rlmin Operations IlS drilling, tapping, etc., are common on a lathe and distinguish between direct r/min in the the choice of face speed or per minute must be This is done with preparatory commands G96 and prior 10 the spindJe function:
SPINDLE CONTROL
G96 S •• M03
83
o Example 1 :
Swface speed selected
G97 S •• M03
""rl-""c> speed is set right after
milling. this distinction normally does not
GSO (or
and
spindle speed in rlmin is always assumed.
By the G96 for turning boring, the control enters a special known as the ConstaJlt Surface Speed or CSs. In this the spindle revolutions will and diameter cut (curautomatically, depending on rent diameter). automatic Constant Surface Speed is built in systems for most CNC lathes. It is a feature that not only saves programming time, it allows tool to remove constant amount of material at all cutting too) excessive wear "".-/''''"'''' finish. a typical example, a facing cut starts at (06.2), and faces the part to the centerline (or slightly below). G96 was used program. 6000 was the spindle of the
coordinate setting,
command:
N1 G20 GSO X16.0 ZS.O T0100 N3 G96 MOO MOl
~
In this quite common application, the actual spindle speed will be on the current diameter of 16 inches, In r/min in block In some cases, this will be too low. Consider another example:
o
2:
On large CNC lathes, GSO of the X diameter is quite large, 024.0 the previous example, target diameter the next tool motion was nat important, but in case it is. example: N1 G20 N2 GSO X24.0 ZS.O T0100 N3 G96 S400 M03
ftlmin 06.20 231 r/min -""'-- 06.00 :::; 239 r/min :::: 260 r/min 05.00:: 286 r/min ,~,- 04.50:: 318 r/min ,,'~- 04.00 :::; rIm in :::; 409 r/min - 03.00:::; 477 r/min - - - 02.50 :::; 573 r/min 02.00 :::: r/min 01.50 :::; r/min 01.00:: 1432 r/min - ' ' ' - 00.50 2865 ,!min 00.25 := 5730 r/min ~ 00.00 ::::; 6000 r/min :: Figure 12-7 i-IfR1Tlnlll at a
N4 GOO X20.0 TOIOl MOB
8375 6000 r/min max. spindle speed
In the 2, the 1001 position is at X24.0 the tool motion terminates at X20.0, both values are ters_ translates to an actual motion of only the X24.0, the spindle will rotate at 64 r/min, at X20.0 it will rolate at 76 r/min. The difference is very to warrant any programming. [t is different, however, if the starting position is at a diameter, a tool moves to a much smaller diameter.
o Example From initial position of 024.0 . move to a small of 2.0 .
the tool will
spindle max.
cut using constant surface speed mode 696
Althougb only selected diameters are shown in the illustration, along with their revolutions per ute, the updating is constant. Note the sharp increase in r/min as tool moves to machine center When the reaches XO (00.0), the speed will be at its maximum, within the current gear As this speed may be too high in some cases, the control system allows setting of a maximum, described a speed a lathe, options. In following examples, important ones will be examined. The gear tions are omitted for all examples.
are most func-
N1 G20 N2 GSO X24.0 ZS.O TOIOO N3 G96 S400 M03 N4 GOO X2.0 TOlOl MOB
Spindle speed at the start of program (block N3) will the same as in previous example, at 64 r/min. In the next block (N4), the calculated for inch will 764 rfmin, automatically calculated by the control. This rather in spindle speeds may have an effect large on some What may happen is that cutting tool will reach the 02,0 inch before the spindle speed fully to the 764 rfmin. tool may start removing material at a speed much slower than intended. In order La correct the problem, the CNC program to be modified:
84
e
12
Example 3b :
The modification in block N3.lnstead speed mode, program gramminga rect rlmin for the inches, based on 400 to calculated first, surface speed. The setting will be .... ,..("~'ml1nprl a subsequent N1 G20 N2 G50 X24.0 Z5.0 TOIOO N3 G97 S764 M03 N4 GOO X2. 0 TOIOl MOe
Whenever the mode is active reaches spindle center at XO) the result will LLY"''''........... be the highest spindle possible, within the gear range. It is but that is exactly what will happen. Such when the part is weD mounted, does not chuck or fIXture lOO out, the tool is strong and so on. When is mounted in a special or an eccentric setup is the part has a long or when some other adverse conditions are present, maximum spindle at center line may be too high for operating safety.
N5 G96 S400
is a simple solution to this problem, using a feature available and other ""_"rA'~ mode can be highest limit,
E>"_'~L~O
the example, at the 024.0 (X24.0 in N2), the actual the 02.0 (Xl.O in N4), would be only 64 r/:min. will be 764. The tool may reach X2.0 pobefore the spindle speed accelerated to full 764 if it is not calculated and programmed earlier.
CNe lathe does not modern lathes have a to wait before ac-
until the spindle
fully accelerated.
Modern CNC lathes today do not use the G50 setting and In this case, the acuse the Geometry Offset setting diameter at machine zero position is normally tual this case, not known. Some experience can program a short dwell the actual cutting.
• Maximum Spindle Speed :t8t[lng CNC lathe operates Constant Suiface the spindle speed is to the curdiameter. The smaller diameter is, the spindle speed will be. natural question is - what happen if the tool diameter is It may seem but there are at impossible to ever program a zero least two cases when that is the case. 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. is controlled directly, not change. case of a zero diameter is when facing off a solid part all the; way to the center is a different diameter situation. all operations at XO, the does not because a direct r/min is proi gramnle<1 During a cutting operation., the aIa1meter V'lX
mrevolutions per .. _,,~.,~~ spindle ma:u.mlUI11 setting is clamping. Do not position register
program function setting is normally G50. called maximum spinthis G50 with its other is an example:
01201 (SPINDLE SPEED c::t.AWP)
Nt G20 TOIOO N2 G50 X9.0 Z5.0 S1500 N3 M42
N4 G96 8400 M03 GOO G41 X5. 5 ZO TOIOl MOB
(1500 R/MIN MAX) SPINDLE RANGE) AND 400 Fl' /MIN)
NS
,~._.
N6 GOl X-O. 07 Fa. 012
CENTER L.I.NE)
N7 GOO ZO.1 N8 G40 X9.0 Z5.0 TOIOO N9 M01
What actually happens in program 0120 I? Block N 1 se.......0 ....' ... units of measurement. critical block N2 o
only the tool coordinate position, as in: GSa X9. 0 ZS. 0
o
Also sets the maximum
to
as
GSa X9.0 ZS.O 81500
a During
motion, tool nose
ant function are activated. The spindle be a formula described ter~ N6 is the actual cut. 0.012 inlrev, the tool tip reality, the end point is spindle center line. The programming must be taken into consideration with the tool nose offset and to the machine center will hapline. A later explains what pen during
SPINDLE CONTROL
Block N7 moves the tool tip .J 00 inches away from the face, at a rapid rate. ]n the remaining two blocks, the tool will rapid to the indexing position with a cancellation of radius offset in N8 and an optional program stop is provided in block N9. Now, think of what happens in blocks N5 and N6. The spindle will rotate at the speed of 278 rlmin at the 05.5. Since the CSS mode is in effect, as the tool tip faces off the part. the diameter is becoming smaller and smaller while the r/min is constantly increasinJr
Wirhout the maximum spindle speed limit in block N2, the spindle speed at the center line will be equivalent \0 the maximum rlmin available within M42 gear range. A typical speed may be 3500 rlmin or higher. With the preset maximum spindle speed limit of 1500 rlmin (GSa S 15(0), the spindle will be constantly increasing its speed, but only until it reaches the 1500 preset rlmin, then it will remain at that speed for the rest of cut. At the control, CNC operator can easi Iy change the maximum limit value, to reflect true setup conditions or to optimize the cutting values. Spindle speed is preset (or clamped) to the maximum Y/min setting, by programming the S [unclion together wilh 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 on. This error nwy be very costly!
N1S GSO XS.S Z2.5
Single meaning
N40 GSO Z4.75 S700
Double meaning
From lhese examples. G50 command should be easy to understand. There are two, completely independent, mean~ngs?f the G50 command. Either one can be programmed In a StOgIe block, or they can be separated into two individual blocks. ~f the CNC lathe supports G92 instead of G50, keep in mmd that they have exactly the same meaning and purpose. On lathes, the G50 command is more common than the G92 command but programming method is the same.
• Part Diameter Calculation in CSS Often, knowing at what diameter the spindle will actually be c1~mped can be a useful information. Such knowledge may mfluence the preset value of spindle speed clamp. To find oul at what diameter the Constant Surface Speed will remain fixed, the formula that finds the r/min at a given diameter must be reversed:
I@"
To program the GSa command as a separate block, anywhere in the program, just issue the preparatory command combined with the spindle speed preset value. Such a block will have no effect whatsoever on any active coordinate setting, it represents just another meaning of GSa command. The following examples are all correct applications of G50 command for both, the coordinate setting and/or the maximum spindle speed preset: N12 GSO X20. 0 Z3. 0 SlSOO
Double mealling
N38 GSO S1250
SillglemeaniJlg
12
ft I min x r I min
x
11
where ...
o
= = ftlmin = 1t = r/min = 12
Use caution when presetting maximum r/min of the spindle!
The maximum spindle speed can be clamped in a separate block or in a block that also includes the current tool coordinate setting. In the example 0120 I, block N2 contains both settings. Typically. the combined setting is useful at the beginning of a tool, the separate block selling is useful if the need arises to change the maximum spindle speed in the middle of a tool, for instance, between facing and turning cuts using the same tool.
=
D
Diameter where CSS stops (in inches) Multiplying factor - feet to inches Active surface speed Constant 3.1415927 Preset maximum spindle speed
o Example - English units: If the preset value in the program is GSO S 1000 and the surface speed is selected as G96 S350. the CSS will be clamped when it reaches the 01.3369 inches: D
::
(12
x 350) /
(n
x 1000).
1.3369015 01. 3369
The formula may be shortened:
D ==
3.82
x
ft I min
r I min
For completeness, the formulas based on the English system, can be adapted to a metric environment:
D
::=
1000 x m I min 1t x r I min
86
12
If these requirements are met, the most important source data is spindle speed actually used during machining.
I1iilf' where ...
Diameter Muftiplying
stops (in - meters to mm Ac:t:ive surface speed
= D 1000 = mlmin =
=
1t
r/min
requirements
3.1415927 maximum spindle speed
::::
Just
optinrum spindle speed is known, the cutting (eSS) can be calculated and used any other tool
the English version, you may shorten
met-
ric formula as well:
In a nutshe14 the whole subject can be quickly up by categorizing it as a - that of Constant Suiface Speed, also as the Cuting Speed (CS), when tool or part diameter the spindle are known. there on, it is a simple matter of IV1..111UllQ.
ft I min
- Metric
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 D = :::: ::::
are met
=
e EXAMPLE: drill works very speed in ftlmin?
(1000 x 165) / (1t x 1200) 43.767609 043.768 nm
:
at 756
IS
(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; the speed., so they are favorable. Can COlllQl1nOIlS be applied to subsequent jobs? they can - ........'VlF' .." that certain
will be satisfied: Q Q
Q Q
Machine
requirements
C EXAMPLE: well at 1850
-what
is m/min = (3.14 x 7 x 1850) / 1000
= 40.66
part setup are equivalent
tools are equivalent Malerial conditions are equivalent
Other common conditions are satisfied
DeD.em ofusing is a significant respent at the CNC machine, usully required to find and 'fine-tune' or part opttI1lli!:aU()D
optirmnn spindle speed during
FEEDRATE CONTROL Feedrate is the closest programming companion to the spindle function. While spindle function controls spindle speed and the rotation direction. feedrate controls how fast the move, usually to remove exhandbook, the rapid materiaJ (stock). In tioning, sometimes called a rapid motion or rapid traverse motion, is not considered a true feed rate and be described in Chapter 20.
Cutting feed rate is the at which the ing tool removes the m"f"YI~1 bV cutting action.
The cutting action be a rotary motion of the (drilling and milling. for example), the molion of part (lathe operations), or other action (flame cutting. cutting, water electric etc.). The feedrale function is in the CNC to select the value. suitable for the
o o
word in the program is the address F, followed
of digits. The number of digits following the F depends on the feedrate mode and the machine tool application. Decimal place is allowed.
in CNC ......nil'Y"1:Ilm""
For miHing applications, aJl cutting feedrale in linear and interpolation mode is programmed in inches (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 only by another F address word. main of the feedrale minute is thai it is not dependent on spindle useful in milling operations, usmakes it ing a large variety of tool diameters. Standard abbreviafeedrate minute are: CJ
Inches per minute
in/min (or older
CJ
Millimeters per minute
mm/min
Feedrate per Feedrate per revolution
for
The most common of machines. CNC machining centers and lathes, can programmed in either feed rate mode. In practice, it is much more common to use the jeedrale per minute on machining centers and the jeedrate revolution on lathes. There is a significant chining centers and lathes.
in G codes
for ma-
most typical format for feedrate minute is F3.1 English system and F4.1 for metric system.
For example, of 1 inches per be programmed as 5.5. In metric system, amount of mm/min will in the F250.0. A different programming expected special machine designs. important item to remember feedrate is tbe feedrate values. feedrate range of the control always that of the machine servo system. example, the feedrate range a Fanuc CNC is between .000 I and 24000.0 jn/min or 0.0001 and 240000.0 mm/min. Note that difference tween two umts IS a decimal point not an actual translation. In programming, only feedrates that specified can be used. Such a belong within feed rate wHi smaller than the control
range of the
FEED RATE
Milling
Turning Group A
Turning Group B
Turning Group C
Per minute
G94
G98
G94
G94
revolution
a
• feed rate per Minute
FEEDRATE CONTROL
Two feed rate types are
FEEDRATE FUNCTION
G99
G95
In milling, the programming command (0 code) for the per minute is For most it is set autype of a
time jeed rate. It is handbook.
feedrate is
the inverse is not discussed in
tomatically, by the written in the
default and not have to For lathe operations, feed rate per A, the 0 for seldom. In is G98, Groups Band C it is G94. use primarily jeedraJe per revolution mode.
88 • Feedrate per Revolution
o
For
CI
CNC lathe work, the feedrate is not measured terms lime, as the distance the tool in one spindle revolution (rotation). ThisJeedrate per revolution is common on lathes (099 for Group A). Its vaJue is modal and another feed rate cancels it (usually the G98). Lathes can be programmed injeedrate per minute (098), to control the feedrate when the spindle is stationary. standard abbreviations are used for JeedraJe per revolution: a
Inches per revolution
in/rev ~or older ipr)
o
Millimeters per revolution
mrn/rev
feedrate per revolution is four decimal places in thc system three decimal places in the metric system. This format means the feed rate of 0.083333 inJrev wili be applied jn the CNC program as FO.0833 on most The metric example of 0.42937 mrnJrev will be programmed as F0,429 on most controls. Many modern control systems accept fecdratc of up to decimal for English units five for metric careful when rounding feedrate values. For boring operation, reasonably feedrates are quite sufficient. Only in' point threading, the feed rate is critical for a proper thread lead, particularly for long or very can programmed with up to decimal places feedrate precision for threading only. The programming for the feedrate per revolution is G99. For most lathes, this is the system default, so it does not have to written in the unless the opposite command G98 is also
It is more common to program a feedrate per minUle (098) for a lathe program, than it is to proafeedrate per revolution (095) in a milling program. reason is that on a CNC lathe, command controls example, the feed rate while the spindle is not rotating. a barfeed operation, a part stopper is used to 'push' the to a position in chuck or a collet, or a pull-put to 'pull' the bar OuL Rapid feed would be too and feedrate revolution is not applicable. per minute is instead. In cases G98 099 commands are used in the lathe program as required. Both commands are modal and one cancels the other.
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:
o
speed - in rev/min Tool diameter! M J or the tool nose radius [ T J
requirements of
o
Cutting tool geometry
o
Machining forces
part
o Setup of the part o Tool overhang (extension) o
Length of the cunlng motion
o Amount of material removal or width of cut) o Method of milling (climb or conventional) o Number of flutes in the material (for milling cutters) o considerations The last item is safety, a programming responsibility number one, to assure safety the people and equipment. Safe speeds and are only two aspects of safety awareness in CNC programming.
ACCELERATION AND DECELERATION During a contouring operation, the direction of the cutis nothing unting motion is changed quite often. usuaJ about it, with all the intersections, points In contouring, it means that in to and gram a sharp comer on a the tool motion aJong X axis in one block will to into a motion along the Y axis in next make the change one X mocutting motion to another, the control must stop tion first, then start Y motion. Since it is impossible to start at a full instantly, without an acceleration, and equally impossible to stop a feedrate WIthout a deceleration, a possible error may occur. error cause corners on the profile to be cut with an undesirable overshoot, particularly during very high TO"'''''''',," or extremely narrow angles. It only occurs during a cutting motion in 001, 003 modes. not the rapid motion mode 000. During the rapid mOlion, the deceleration is automatic - and from the part. In a routine CNC machining, ever encountering such an error, it will likely within two commands
is a small chance of if the error is controls provide problem:
Exact stops increase For used on older machines, they may be required in some cases.
FEE
CONTROL
•
89
Command
01304
of two commands that control the feedrate machining comers is G09 command - Exact This is an unmodal command and has to be repealed in evit is required. ery block. 0] 30 I, there is no provision That may cause uneven corA'""''''.... ' ... A'''
CUTTING)
N13 GOO X1S.0 Y12.0 Nl4 G61 GOl X19.0 F90.0 N15 Y16.0 N16 XlS.O
Nl7 Y12.0 Nl8 G64
of F90.0 (in/min);
in re-
01301 (NORMAL CUTTING) ~3
N14 N15 N16 N17
GOO X1S.0 Y12.0 G01 X19.0 F90.0 Y16.0 Xl5.0 Y12.0
By adding the GOg exact will the motion in that motion in the will start. 01302
(G09
I'"'r'l"I""l'TU':!'
~3
GOO X1S.0 Y12.0 N14 G09 G01 X19.0 F90.0 N15 G09 Y16.0 ~6 G09 X1S.0 N17 Yl2.0
Example 01302 11 comer Ilt all three positions of the part. only one corner is for sharpness, program the G09 command in the block that terminates at that corner (program 0 I 01303 (G09 N13 N14 N15 N16
C'U'I'T1NG
GOO X1S.0 Y12.0 G01 X19.0 F90.0 G09 Y16. 0 X15.0
Nl7 Y12.0
The G09 command is useful only if a require the deceleration for a sharp corner. all corners must be the constant the G09 is not very efficient.
• Exact Stop Mode Command 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 too same program, making it
point
f\
Target point
GOg I G61 USED Figure 13-1 Feedrate control around comer Exact Stop commands The overshoot is for clarity
• Automatic Corner Override While a cutter radius is in for a milling cutter, the feed rate at the contour points is normally not overridden. In a case like this, command the cutting feedG62 can be used to automatically rate at the corners of a part. This command is active until the G61 command (exact stop the comG64 (cutting mode) mand (tapping mode), or is programmed.
• Tapping Mode
90
Chapter 13
• Cutting Mode When the cutting mode G64 is programmed or is active it represents the normal cutting mode. by system When command is active. exact stop check 061 will not be performed, neither will the automatic corner G62 or the mode G63. That means the acceleration and will be done and the feedrate will be effective. is the most common default for the control The CUlling mode can be (exact stop G62 command corner override mode) or G63 command (tapping mode). The G64 is not usualJy programmed, unless one or more of the other feed rate are used in the same To compare the 064 modes, see il in Figure
It is important to understand that the effeclive rawill decrease in for all internal arcs crease in size for arcs. Since the rate does not change automatically during cutter radius it must adjusted in program. Usually. offset this adjustment is not necessary, in cases where the surface finish is of great importance or the culler radius is This consideration applies only to motions. not to linear
• Circular Motion feedrates feedrates for circular motions is generally linear feedrates. In fact, most programs do not feed rate for circular tool motions. If the part surface finish is important. the 'normal' must be adjusted or lower. with consideration of (he cutter radius, the radius cutting or arc) and the cutting conditions. The cutter radius, cutting feed rate programmed arcs will more reason some correction,
same as
In case of arc (after applying 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
CONSTANT fEEDRATE In Chapter 29,
lEi" where ...
feedrate (in/min or mm/min) Spindle speed Feedrate per tooth (cutting edge) Number of cutting edges (flutes or inserts)
FI == r/min : : :
F. n
:::;
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 coordinate values for all the contour paints, based on the 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 programmed arc relates to the radius, no' the actual cut at the tool center, the cutter radius is and the path arc is offset the cutter radius, the actual arc radius that is cut can be smaller or larger. depending on the offset value for tool motion.
outside arcs, the wards. to a higher
lEi" where ...
F. F~
R
=
=
Outside radius of the part Cutter radius
up-
FEEDRATE CONTROL
91
\ ...... \
arcs, the wards, to a lower value:
is generally adjusted x (R
dOW~
r)
R Ilii" where ...
F, F, R r
=
Feedrate for arc Linear feedrate Inside radius of the part Cutter radius
MAXIMUM fEEDRATE maximum programmable jeedrate for the CNC mais determined by the machine manufacturer, not manufacturer. For although machine may several times to all but there are addiconsiderations for CNC lathes, where revolution is the main method of programtool.
• Maximum feed rate Considerations The maximum cutting feedrate per rp.;:tr./"'tpl1 by the programmed spindle maximum rapid traverse rate of It is quite to the feed rate per revolution too high withit. This problem is most common in sin-
A cannot deliver heavier than the maximum it was designed for, the results will not be accurate. results could be unacceptable, When unusually 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
fEEDHOlD AND OVERRIDE While running a program, programmed be ~emporarily suspended or changed by using one of two avatlable features of system. One is jeedhold switch. the is a jeedrate override Both switches are standard allow the CNC operator to control the feedrate during program operation panel. They are
• Feedhofd Switch FeedhoLd is a push button can be toggled between ON and Feedhold It can be modes. rate revolution. On many not only a cutting feed with 00l, 003 in effectprogram funcstop the rapid motion GOO. will remain active during a feedhold state, i"P,'I'II1.f'l11'l
machining operations, the feedhold function is automatically disabled and ineffective. This is tapping and threading, G84 and 074 cycles on machining centers threading operathe 032, 092 and
•
feed rate Override Switch is nonnally by means of a switch. located on the control panel of the 13-3.
'O~
Q,iJ
100 110
'\~",\ \
I
'<0
// ~
Figura 13-3 Typical feedrare override switch Jri" where ...
r/min =
The Rmtlx is
Max. allowed feedrate per revolution in/rev of the maximum feedrate, ' '>I •• I''1'''1'l from the X and the Z in revolutions per minute
in in/min or mmlmin. depending on the 38 nre details to
input units In feedrate limits for threading,
This rotary switch has marked settings or indicating the oj programmed jeedrate, A typical range of a override is 0 to 200%, 0 may be
no motion at all or the slowes( motion, depending on the machine. 200% doubles all programmed rates. A programmed of 12.0 in/min (FI is the 100% feedrate. If override switch is set to 80%, the actual cutting will 9.6 in/min, If the 110%, the actual will be 13.2
92
Chapter 13
simple logic to metric "'\f<'I''''f'''n programmed feed rate 300 mmlmin, it ....... rrlm/ An 80% override results in 240 mm/min cutting setting is feed rate and a 110% to 330 mm/min cutting tool. a
",
feed rate override switch works equally well forfeedrevolution. example, the programmed feedrate .014 in/rev will in actual feedrate of .0126 in/rev with 90% feed rate and .01 in/rev with 130% override. If a feed rate revolution is required, be the setFor example, programmed is FO.0I2, in revolution. A change by one division on the ,,'"" ....... '1... dial will increase or the programmed by a full 10 Therefore, feedrate etc. In will be .0108 at 90%, .0120 at 100%, .0132 at I feedrate is not required, bUl in will not for exama feedrate of .0 I in/rev, because of fIxed 10% crements on the override switch.
rates
threading Feedrate ",,"'.......... ,,'" tapping and G74 on single point threading G92 and milling tapping mode is used mand G63, both the feedrate the feedhold functions are disabled - through the program .I UI.:lUL/I/::U.
offers two override functions for cutting other than tapping or threading They are M48 and M49. These are programmable functions, may not be for all <"""Ip.rn
• feed rate Override functions Although the function uses the address F. two miscellaneous functions M can be used in the On the operagram to set the feed rate override ON or lion panel, a switch is provided for feed rate override. If the CNC decides that programmed feedrate has to be or decreased, this switch is very other hand, during machining handy. On the cutting feed rate must be as programmed, "uj.. ......,'np switch to set to I 00% only. not to any are special tapping operations without A good cycles, using GOl and GOO preparatory commands. Lions M48 and are used precisely for such cancel function is OFF, which means feed rate override is active
Feed nil t!
M49
Feedrate override cancel function is ON. which means feedrate override is inaclive
M48 function the CNC nn,"'"",,'nr to use the rate override switch freely; the function will cause to be of the on the control panel. The two functions is tapping or most common usage of threading without a cycle, where the exact programmed feed rate must be maintained. The following examshows the teChnique:
mo
8500 M03
N14 N15 N16 N17
GOO X5.0 Y4.0 Moe ZO.25
(usnro
M49
TAP 12 TPI)
(DISABLE FEEDRATE OVERRIDE)
GOl Z-O.62S F41.0 MOS N18 ZO.25 M04
N19 M48
(ENABLE FEEDRATE OVERRI:DE)
mo GOO X.• Y•• M05 N21 MOl
The tapping occurs between blocks N 16 and N]9 override is disabled for
the
E ADDRESS IN THREADING Some older rather
lathes use feed rate address E for the more common address F.
feed rate function E is similar to the F function. It also thread lead per revolution, in in/rev or in mmJrev, hut it ha.." a decimal place accuracy. control system model 6T, for the
e
English - Fanuc F
0.0001
E :::: O. 000001
e
Metric - Fanuc F '" 0.001 E
::0
0.0001
control: /() 10
50.0000 in/rev 50.000000
control: to
500.000
10
500.0000 rrm/rev
models, FS-OII 011 J/1S/16T, the On the newest is no E address), the safest way are similar the available specifications is to lookup control system. The E address is redundant on the newer controls and is retained only compatibility with older programs that be used on machines equipped with newer controls. available feedrate ranges between ferenl control systems, depend on type of feed 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 machine 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 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 with a manual tool change. the tool required al all.
a
programming for a particular center begins, the type of the (001 selection for that machine must be known. Thert~ are twu major Iypes uf luul selCX:lion in automatic tool change o
Fixed type
o
Random memory type
To understand the is to understand the general tool selection, available for many centers.
TOOL READY POSITION F;gure 14-1
Typical side view of a 20-tool ma(,aZifle
as small as len or on special cenler may machines will or oval (larger It consists of a where the tool holder setup. Each pocket is is important to know for each pocket The during and auloor MOL The number of tools that
rnn,nJ>'"""
• Tool Storage Magazine A typical CNC machining center is designed with a special 100/ a 1001 carousel), [hat contains all gram. This magazine is not a tools, but many used tools there at all limes, If magazine is illustrated in
or horizontal) called by the profor the (he commonly typical 20-tool
""... rn"",nH'<"
Within the travel of lion, used Cor aligned with the tool waiting position, tion, or just the lool (,1U11HJ'P
is one special posi-
position is the tool-ready posi-
93
94 • fixed Tool Selection A machining center that uses a fixed tool selection rethe CNC to place all into that match the tool numbers. example. (001 number I (called as TO I in the must be into the magazine pocket number I, lool 7 (cal~ed as T07 in the program) must be placea-~b.e magazme pocket 7, and so 00. magazine pocket is mounted on a side of the usually from the work area (work With the fixed selection, the control system no way of determining which 1001 number is in which magazine pocket at any The CNC has to match the numbers with the magazine numbers during setup. This of a tool selection is commonly machining centers, or on some found on many older centers. inexpensive )..."""uu~,
the lool is easy the T function is used in program, that will the tool number selected during a tool change. example, N67 T04 M06
or N67 M06 T04
or N67 T04 N68 M06
means to bring number 4 into the spindle (the las( is preferred). What will to the (001 that is in the spindle at The M06 cha~ge . will cause the tool to return to the magazme pocket It came from, the new tool will be loaded. the tool takes the way to select new tool, Today, this type of a tool selection is considered impracliand in a long run. There is a significant time during tool because the tool has to wait until the lool is found in magazine and placed into the The programmer can somewhat improve the by selecting and tool numnot necessarily in the order Examin this handbook are based on a more modern type of the random memory. tool selection,
• Random Memory Tool Selection This is the most common on modern machining centers. It also stores alltool5 required to machine a part in the tool magazine away machining area. CNC identifies by a T usually in order of usage. Calling the required tool number by program will physically move the tool to the
Chapter 14 position the too! This can simultaneously, the machine using another to cut a part. Actual tool change can take place anytime later. The is concept of next tool waiting where the T function to the next tool, not the current tool. In the the next tool can made by simple blocks: (MroCE TOOL 4 READY)
T04
<... Mac:i111'unf! wiIh previous 1001 ... > M06 T15
(ACTUAL TOOL CHANGE - T04 m SPDmLE) (MAKE NEXT TOOL
<... fVU7r""'I1'" with 10014 - 7D4 ... >
first block, the 1'04 tool was called into the walting of the tool while previous was CUlling. When machining been completed, actual tool will take place, where T04 will become the active tool. Immediately, system will for the next tool (TIS in the example) and it into the waiting position, while T04 is cutting. In
example illustrates that the T function will not any physicallool change at a!1. For that, the ~utomatic ~ool change junction - M06 - also later In secMn, is needed and must be programmed. Do not confuse the meaning of T with the tool selection the same T used with the random tool The former means the actual number of the pocket, the latter means the tool number of next tool. The call is programmed earlier than it is needed. so the sysl~m can for that tool while another tool is productive work.
• Registering 1001 Numbers and CNC in "",,..,.rll can process data quickly and with precision. the CNC work, the required input first, to make the computer work in our . In the to random tool selection method. the CNC operator lS any tool into any magazil1e as long as actual setting is into the unit, in the form control is no need to worry too much about system parameters,just acceplthem as the collection various system Registering tool numits own entry screen. operator will the required tools into writes down the numbers (which tool number is in which pocket number), and the information into the system. Such an operation is a normal of machine tool and various shortcuts can used.
TOOL FUNCTION
• Programming Format
95 Q Example:
Programming format for the T function used on milli~g systems depends on the maximum number of lools aVaIl-
N81 TOl
able for the CNC machine. Most machining centers have
N82 M06
number of available tools under 100, although very large machines will have more tool magazines available (even several hundred~. In the ex~m~l~s, two-digit tool function will used, covenng tools wlthm~ range of TO J to T99. In a typical program, the TOI tool command will call the identified in the setup sheet or a tooling sheet as tool number 1; T02 will call tool number 2, T20 will call tool number 20, elc. Leading zeros for tool number designation may be omitted, if desired - TOI can be written as Tl, T02 as 1'2, etc. Trailing zeros must always be .written, for exampJe, T20 must be written as T20, otherwIse the system WIll assume the leading zero and call the tool number 2 (T2 equals to T02, not T20). 1001
•
Empty Tool or Dummy Tool
Often, an empty spindle, free of any tool, is required. For Ihis purpose, an empty tool station has to be assigned. Such a tool will also have to be identified by a unique number, even if no physical tool is used. If the magazine pocket or the spindle contains no tool, an empty tool number is necessary for maintaining the continuity of (001 changes from one part to another. This nonexistent tool is often called the dummy tool or the empty tool. The number of an empty tool should be selected as higher than the maximum number of tools. For example, if a machining center has 24 tool pockets, the empty 1001 should be identified as TIS or higher. It is a good practice to identify such a tool by the largest number within the T function formal. 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 program. As a rule, do not identify the empty tool as TOO - alllools not assign.ed may be registered as TOO. There ~re, howeve.r, machine tools that do allow the use of TOO, WIthout POSSlble complications.
TOOL CHANGE FUNCTION - MOS The tool function T, as applied to CNC machining centers, will not cause the actual 1001 change - the miscellaneous function M06 must be used in the program to do thaL The purpose of tool change function, i~ to exc.h.ange the tool in the spindle with the tool in the wallmg pOSItIon. The purpose of the T function for milling systems is La. r?tate th.e magazine and place the selected tool into the wall!n~ POSItion, where the actual tool change can lake place. ThIS next tool search happens while the control processes blocks following the T function call.
N83 TO 2
=
loaded in the wairi.ng posilion ... brings TO) imD the spiJulJe , .. rnakes 7D2 ready = Irxuled in the wailing position ... Innkes T01 ready
The three blocks appear to be simple enough, but let's explore them anyway. In block N81, the tool addressed as TOl in the program will be placed to the waiting position. The next block, N82, will activate the actual tool change tool TO I will be placed into the spindle, ready to be used for machining. Immediately following the actual tool change is T02 in block N83. This block will cause the control system to search for the next (001, T02 in the example, to be placed into the waiting position. The search will ~ake place simultaneously with the program data followmg block N83, usually a too! motion to the culling position at the part. There will be no time lost, on the contrary, this method assures that the tool changing times will be always the same (the so called chip-to-chip time). Some programmers prefer to shorten the program somewhat by programming the tool change command together with the next tool search in the same block. This method saves one block of program for each tool: N81 TOl
N82 M06 T02
The results will be identical - the choice is personal. Some machine tools wilJ not accept the shortened two-block version and the three-block version must be programmed. If in doubt, always use the three-block version.
• Conditions for Tool Change Before calling the M06 tool change function in the program, always create safe conditions. Most machines have a light located on the control panel for visual confirmation thai the tool is at the tool change position. The safe automatic tool change can take place only if these conditions are established: o
The machine axes had been zeroed
o
The spindle must be fully retracted: ( a) In Z axis at machine zero for vertical machines ( b) In Y axis at machine zero for horizontal machines
U
The X and Y axis positions of the tool must be selected in a clear area
o
The next tool must be previously selected by a T function
Chapter 14
---- . - - - - - - A program sample illustrates the tool (ween tools in (he middle of tile program illustrated in Figures 10 MAGAZINE
SPIN
Q Example for illustrations: N51 N52
E
T03
( • •• T02 IN SPJlNDLE) ( • •• TO 3 READY FOR TOOL c:.Hll1NGl~) (MACHINING WITH (RETRACT FROM ",,,,,,,,,,,,,,,\
N75 GOO Zl. 0 N76 G28 Zl.0 MOS N77 MOl
(T02
(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
"4
t
N81 . .
N76 represents the end of machinIt will cause tool T02 to move
..
zero
ATe
same optional program stop lows in the block N77.
Front view of the machine 14·2 - Blocks N51 to N78
ATC
TOOL MAGAZI
(MACHINING WITH T03)
SPINDLE
In the following block N78, the can for this is not necessary, but may come very tool Block N79 is the actual tool in the spindle will be replaced with T03 that rently in the posluon. in block N80. the rapid motion in X and Y axes first motion of T03. with ON. Note at block end. To save lime. the next tool should placed into the waiting position as soon as possible after (he tool 1''''''''''''''
T02
note that when T02 is """'''1.1'''''' N77. il is still in the spindle! There are who not follow 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
AUTOMATIC TOOL CHANGER - ATC
Figure 14-3
ATC example - Block N79
TOOL MAGAZI
SPINDLE
references to Automatic were made in some examples. on various machines and to
\ /
method of programming times quite a bit. The machine will automatically index the proper order. Everything Programmer and operator with the type of ATC on all
'
Changer (ATe) designs of from one to say, the
10
under program control. thoroughly familiar centers in the shop .
• Typical ATC System Front view of
machine
Figure 14-4 ATC example - Block NBD (new tool waiting == next tool)
A typical Automatic Tool system may have a double swing arm, one the .... I""fYI. tool, another for outgoing tool. IL will on Random Mem01)' selection (described which mean:-.; the next 1001 can be moved to a and be ready for a tool
TOOL FUNCTION
97
change, while the current tool works. This machine feature always guarantees the same tool change time. The typical lime for the tool changing cycle can be very fast on modern CNC machines, often measured in fractions of a second. The maximum number of tools thaI C(ln be 10(lded into the tool magazine varies greatly, from as few as IOta as many as 400 or more. A small CNC vertical machining center may have typically 10 to 30 tools. Larger machining centers will have a greater tool capacity.
Of~toOI
Apart changer features, programmer and machine operator should be also aware of other technical considerations that' may influence the \00\ change under program control. They relate to the physical characteristics of cutting tools when mounted in the tool holder: o
Maximum tool diameter
o
Maximum tool length
• Maximum Tool length The tool length in relation to the ATC, is the projection of a cUlling tool from the spindle gauge line towards the part. The longer the tool length, the more important it is to pay attention to the Z axis clearance during the 1001 change. Any physical contact of the tool with the machine, the fixture or the part is extremely undesirable. Such a condition could be very dangerous - there is not much that can be done to interrupt the ATC cycle, except pressing the Emergency Switch, which is usually too late. Figure 14-6 illustrates the concept of the tool length.
GAUGE LINE
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 manufacturer. It assumes that a maximum diameter of a certain size may be used in every pocket of the lool magazine. Many machine manufacturers allow for a slightly larger tool diameter to be used, providing the two adjacent magazi ne pockets are empty (Figure 14-5). J (
I,
i OVERSIZE TOOL;
\
I
/
/ Empty pocket Figure 14-5 The adjacent pockets must be empty for a large tool diameter.
For example, a machine description lists the maximum tool diameter with adjacent lools as 4 inches (100 mm). If both adjacent pockets are empty, the maximum tooJ diameter can be increased to 5.9 inches (150 mm), which may be quite a large increase. By using tools with a larger than recommended diameter, there is a decrease in the actual number of tools that can be placed in the tool magazine. Adjacent pockets must be empty for oversize tools!
Figure 14·6 The concept of too/length
• Maximum Tool Weight Mosl programmers will usually consider the tool diameter 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 recommended weight. Keep in mind that the ATC is largely a mechanical 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. Do not exceed the recommended tool weight during setup!
For example, a given CNC machining center may have the maximum recommended tool weight specified as 22 pounds or about 10 kg. If even a slightly heavier tool is used, for example 24 lb. (l 0.8 Kg), the ATC should not be used at all- use a manual tool change for that tool only. The machine spindle may be able to withstand a slight weight increase but the tool changer may not. Since the word 'slight' is only relative, the best advice in this case is - do not overdo it! If in doubt, always consult the manufacturer's recommendations. Examples in this chapter illustrate how to program such a unusual Lool change, providing lhe tool weight is safe.
98
..........
-.~~-
• ATC Cycle
an example, the following is to a 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 problem on lool jam during the tool changing. This is a possible time loss that can be Some machines have a step-by-step cycle with a rotary switch, usually localed near the 100\ magazine. In the following example, a tool changer with a double the cutting (001 from arm swing system is used. It will the waiting position and exchange it with the tool currently in the machine ATC is a process that will execute the following orof steps when the tool change function M06 is programmed. All steps are quite typical, bUI not necessarily standard for CNC machining center. so them only as a close example:
2. 3. 4. 5. 6. 7. 8.
9. 10. 11.
Spindle orients T00\ pot moves down Arm rotates 60 degrees CCW Tool is unclamped lin the magazine and spindle) Arm moves down Arms rotates 180 degrees CW Arm moves up Tool is clamped Arm rotates 60 degrees CW The rack returns Tool pot moves up
example is only presented as general information its logic has 10 adapted to each The instruction manual for the machine usually lists relevant dcabout Ihe ATC.
Incidentally, step of the tool can usually executed through the MDI (Manual Data Input), usfunctions are only for special M functions. !>ervice via the MDl operation and cannot be used in a program. The benefit of this feature is that a \001 changing problem can be traced to its cause and corrected there. Check instructions for each machine to get details about functions.
PROGRAMMING THE ATC A number of possibilities exists in relation to the auto-marie tool Some of the important ones are number of tools used. what tool number is to the spindle (if any) at the start of ajob, whether a manual tool elc. change is required, whether an extra large tool is
In (he next several examples. some typical options will be examples can be used directly. if the CNC (001 uses exactly the same formal, or they can be adapled to a particular working environment. For the following examples, some conditions must be established that will help to understand the subject of programming a lOoi change much better. To program ATe successfully, that is needed is programming format for three tools - theftrs! tool the tools used in the middle of the program and the last tool used in the program. make the whole concept even easto understand. examples will use only four tool numbers tool number will represent one of the four available programming formats: o TOl
tool designation represents the first tool used in the CNC program
o T02 '"
tool designation represents any tool in the CNC program between the first and the last tool
o
T03
o
T99
Regardless of the machine 1001 used, two conditions are to perform the ATC correctly: always
o The spindle must be stopped (with the M05 function) o The tool changing axis must be at the home position (machine
position)
For CNC vertical machining centers, the tool changing Z axis. for the horizontal machining centers it is the Y axis. The M06 function will also stop the spindle. never count on it. It is strongly recommended to stop the spindle with the MOS function (spindle stop) before the tool cycle is
aXIs IS
Chapter 14
• MDI Operation
A programmer not have to know every related to the automatic tool changer actual operation. It is not a vital knowledge, although it may quite a useful knowledge in many applications. On the other hand, a CNC operator should know each and eVel) step of the inside oul.
1.
.....
tool designation represents the last tool used in the CNC program ... tool designation an empty tool (dummy tool) as an empty tool pocket identification
In all examples, the tools will always used, the empty tool only if required. Hopefully, these examples will illustrate the concept of many possible applicalions. Another situation is in situations only one tool is used in CNC program.
• Single Tool Work Certain jobs or special operations may only one to do the job. In this case, tool is generally mounted in the spindle during setup and no tool t:alls Uf 1001 changes are required in the program: 1001
TOOL FUNCTION
01401
(FIRST TOOL
B . .,,,,,lo,,~c~k~N=u~m~b~er~'"==T=oO=I~W=.a,.,,i.,,t,i.n..•g..... LT 001 in Spindle
N1 G20
I .........
N2 G17 G40 G80 N3 G90 G54 GOO X •• Y •• S •• M03
N4 G43 Z •• HOl MOB
< ... TO) working ... :> N26 N27 N28 N29 %
GOO Z •• M09
G2B Z •• MOS GOO X .• Y •• M30
(TO 1 MACHINING DONE) (TOl TO Z-li0111E (SAFE Xi!' (END OF PRC)GRAM)
fill the table, start from the program top and occurrence of the T address and M06 function. All are irrelevant. In the example 01402, the will filled as a practical sample of usage.
• Any Tool in Spindle - Not the first is the most common method of nr/"\"'r'lln1,1"Y1, The operator sets aU tools in the magazine, settings but leaves the last tool measured in the "1-"""" . . . most machines, this tool should not the tool. matches this too! changing method within following example is probably the one that the most useful for everyday work. All are comments.
lool is in the way of part changing, it remains "I.u ............ permanently for the job.
In
• Programming Several Tools using several tools is the most typical work. Each tool is loaded into the spindle various ATe processes. From the viewpoint. the various lool changing meththe cutting section of the program, only the start tool (before machining) or the end of the tool (after machining).
01402
(ANY TOOL IN SPINDLE AT START)
(**** NOT THE FIRST TOOL ****) N1 G20
N2 G17 G40 GSO Tal
N3 M06
As
the required tool can be changed automatically, only if the Z axis is at machine zero (for vertical or the Y axis is at machine zero (for horizontal machining tool position in axes is only important to the safety the is no tool contact with the the are formatted programs use machine of last tool, for example: zero return N393 N394 N39S N396
GOO Z •• M09 G28 Z •• MOS
G28
x..
Y ••
M30
TOOL WORK DONE) TOOL TO Z HOME) TOOL TO XY HOME) (END OF PROGRAM)
N4 G90 GS4 GOO X •• Y •• S.. M03 '1'02 ('1'02 READY) (APPROACH WORK) NS G43 Z•• Hal MaS
< ... TO}
.. >
N26 GOO Z •• M09 N27 G28 Z.. MOS N28 GOO X .• Y •• N29 MOl
N30 N3l N32 N33
(TOl MAClUNING OONE) (TOl TO Z HOME) (SAFE XY POSITION) (OPTIONAL STOP)
T02
(T02 CALL REPEATED) (T02 TO SPINDLE) G90 GOO GS4 X.. Y •• S.. M03 T03 (T03 READY) G43 Z •• H02 MOS ' .......·rfiJu....'..n WORK)
M06
< ... T02 working .. . :>
%
with this practice, but a large volume of
(INCH MODE) (GE.'T TO 1 READY) (TO 1 TO SPINDLE)
N46 GOO Z •• M09
NS7 G28 Z .• M05 N48 GOO X •• Y •• N49 MOl
MACHINING DONE) TO Z HOME) (SAFE XY
N50 '1'03
N51 M06 N52 G90 GOO GS4 X •• Y ••
• Keeping Track of Tools If the lool is easy to keep a track of where tool is at moment. In later examples, more complex (00\ will (ake place. Keeping a track which tool waiting and which tool is in the spindle can with a 3 column table with block number, 1001 waiting and tool in the spindle.
N53 G43 Z .. H03 MOS
< ... 7rJ3 working .. . :> N66 GOO Z.. M09 N67 G28 Z •• MaS N68 GOO X •. Y ••
N69
%
mo
(T03~
('1'03 TO Z XY POSITION) (END OF PRCiGRAM)
100
Chapter 14
The filled-in table below shows the status of tools for the
first part only. '?' represents any 1001 number. Block Number
Tool Waiting
Nl
?
?
N2
Tal
?
N3
?
TOl
N4
T02
TOl
in Spindle
-
A few comments to the 01402 example. Always program MO I optional S!OP before a tool change - it will be easier to repeat the tool, if necessary. Also note beginning of each tool, containing the next tool search. The tool in the block containing (he first motion has already been called compare block N4 with N30 and bluck N32 with N50, The repetition of the (001 search at the start of each tool has lwo reasons. It makes the program easier to read (tool is coming imo the spindle will be known) and it allows a repetition of the tool, regardless of which tool is currently in the spindle.
T01 WORKING
• First Tool in the Spindle
N30
T02
TOI
N31
TOl
T02
N32
T03
T02
T02 WORKING N50
T03
T02
N51
T02
T03
N52
TOl
T03
T03 WORKING When the second part is machined and any other part after that, the tools tracking is simplified and consistent. Compare the next table with the previous one - there are no question marks. The table shows where each tool is.
Block Number
Tool Waiting
Tool in Spindle ~
Nl
TOl
T03
N2
Tal
T03
N3
T03
TOl
N4
T02
T01
Program may also start with the first tool in the spindle. This is a common practice for the ATC programming. The fIrst tool in the program must be loaded into the spindle during setup. In the program, the first tool is called to the waiting station (ready position) during the last tool - not the first tool. Then, a tool change will be required in one of the last blocks in the program. The first tool in the program must be firs! for all parts within the job batch. 01403 (FIRST TOOL IN SPINDLE AT START) N1 G20 (INCH MODE) N2 G17 G40 GSa TO::! (GET T02 READY) N3 G90 G54 GOO X .• Y •. S •• M03 N4 G43 Z.. HOI MOB (APPROACH WORK)
< ... Wl working ... > N26 N27 N2S N29
GOO Z •• M09 G28 Z.. MOS GOO X •. 'l .. MOl
(Tal MACHINING OONE) (Tal TO Z HOME)
(SAFE XY POSITION) (OPTIONAL STOP)
mo T02 (T02 CALL REPEATED) N31 M06 (T02 TO SPINDLE) N32 G90 G54 GOO X .. Y .• S •• M03 T03(T03 READY) N33 G43 Z.. H02 MaS (APPROACH WORK)
TOl WORKING
< ... m2 working .. _>
N30
T02
TOl
N31
TOl
T02
N32
T03
T02
T02 WORKING N50
T03
T02
N51
T02
T03
N52
TOI
T03
N46 N47 N4S N49
MOl
(T02 MACHINING OONE) (T02 TO Z HOME) (SAFE XY POSITION) (OPTIONAL STOP)
NSO T03
(TO 3 CALL REJr"EATED )
N51 M06
(T03 TO SPINDLE) NS2 G90 G54 GOO X •• Y.. S •• M03 TOl (TOl READY) N53 G43 Z.. H03 MO] (APPROACH WORK)
< .. " m3 working . .. >
T03 WORKING Examples shown here use this method as is or slightly modified. For most jobs, there is no need to make a tool change at XY safe position, if the work area is clear of obstacles. Study this method before the others. It wiJl help to see the logic of some more advanced methods a lot easier.
GOO Z.. M09 G28 Z •• MaS GOO X •. Y ••
N66 N67 N68 N69
Ma6
mo
(T03 MACHINING OONE) (T03 TO Z HOME) (SAFE XY POSITION) (TOl TO SPINDLE)
IDO
(END OF PROGRAM)
%
GOO Z •. Ma9
G28 GOO
Z .. MOS x .. Y ••
FUNCTION
101
method is not without a a tool in the spindle, it or part changing. in such a way that part setup (spindle
",,,u.,,,,,,.
Since there is
"",,.'nIT'" an obstacle dur':
is
program the is no IDol in the spindle condition). lO
• No Tool in the Spindle
{NO TOOL IN SPINDLE AT
{INCH {GET TOl N2 Gl7 G40 GSO TOl (TOl TO SPJlNDLE) N3 M06 N4 G90 GS4 GOO X •• Y.... Sit.. M03 T02 (T02 DVJ\"",,r\
N5 843 Z.. HOI MOS
(APPROACH
< ... 10) working, .. > (TOl MAcmNING DONE) (Tal TO Z HOME) (SAFE XY POSITION) STOP)
N26 N27 N28 N29
GOO Z •• M09 G2B Z •• M05 GOO X •• Y •• MOl
NJO NJl N32 NJ3
M06 G90 G54 GOO X •• Y •. G43 Z •• NO.2 M08
(T02 CALL REPEATED)
T02
<. ""7D2 working
(T02 TO S •• M03 T03(T03 READY)
(APPROACH WORK)
>
N46 GOO Z •• Mag
(T02 MACHINING OONE)
N47 G28 Z •• MOS N48 GOO X •• Y •• N49 MOl
(T02 TO Z HOME) (SAFE XY POSITION) (OP"l'I(JN.!!,L STOP)
NSO T03 N5l M06
In the next example, dIe tool in the program may 100 heavy or too through the ATe must tool change can be done by gram supports manual tool cl1tmf!e.
spindle at the start and end of each machined productive than with the first tool in the eXlr;1 Ihe cycle time. An empty spindle at start used if the programto recover space above mer has a valid reason, the part that would otherwise occupied by recovered space may be for removing the with a crane or a programming from the previous exsituation is not much ample - except that there is an extra tool change at the program. This tool brings the first tool into the spindle, for of each program run. 01404 N1 G20
• first Tool in the Spindle with Manual Change
(TOl CALL REPEATED) (T03 TO SPJlNDLE)
N52 G90 G54 GOO X.. Y •• S .. M03 T99 (T99 READY) \.n.t:",t"J:\,.JJ:'i.....n WORK) N53 G43 Z .. HO) MOS
to use MOO program scribing the reason good selection - MOO is a the machine without carefully, to understand how a Follow the next tool change can perfonned when the firsllOoJ is in the 1'02 in example will be changed manually by the CNC 01405 TOOL IN SPINDLE AT START) (INCH MODE) N1 G20 N2 G17 G40 GBO T99 (GET T99 READY) NJ G90 G54 GOO X .• Y •• S .• M03 N4 G43 Z •• HOI MOS (APPROACH WORK)
< ... 1D J working . .. > N26 N27 N2e N29
GOO Z •• Ma9
(TOl MAanNING OONE) (TOI TO Z HOME)
Gl8 Z.. MOS GOO X •• Y •• MOl
(SAFE XY
(OPTIONAL STOP) (T99 CALL REI)Rl\,TTi:l)) (T99 TO SPINDLE)
NJO T99 N31 M06 N32 TO)
READY)
NJ3 MOO
(STOP AND LOAD T02 MANUALLY)
N34 G90 G54 GOO X .• Y.. S .• M03 N3S G43 Z.. HO:;! MOS
<,
T02
(NO NEXT TOOL)
WORK)
>
GOO Z.. M09 G28 Z •• MOS GOO X •• Y ••
(T02 MAan:NING DONE)
N46 N47 N48 N49 N50
MI9 MOO
N51 N52 N53 N54
(TO) CALL REPEATED) TO) (T03 TO SPINDLE) M06 G90 GS4 GOO X .• Y •• S.. M03 TOl (TOI READY) (APPROACH WORK) G43 Z.. H03 MOB
TO Z (SAFE XY POSITION)
(SPINDLE ORIENTATION) (STOP AND UNLOAD TOl MANOALLY)
< . 103 working, . , > < ... 103 working .. " > N66 GOO Z •• M09 N67 G28 Z •• M05 N6S GOO X •• Y ••
N69 M06 mo ICO %
(T03 MACHINING OONE) TO Z-HOME) (SAFE XY' POSITION) (T99 TO SPJlNDLE)
OF PROGRAM)
N66 GOO Z •• M09 N67 G2S Z.. MOS N68 GOO X •• Y ••
N69 MOl
mo
M06
NIl M30 %
MACHINING DONE) (T03 TO Z HOME) (SAFE XY POSITION)
(OPTIONAL STOP) (TOl TO SPINDLE) (END OF PR.OGRAM)
1
Chapter 14
Note the M19 function in block N49. miscellaneous function will orient the spindle to exactly the same were used. position as if the automatic tool changing The CNC operator can then replace the current tool with next tool and still maintain the tool position orientation. This consideration is mostly important for certain boring cycles, where the tool bit cutting has to be positioned away from the machined surface. a boring bar is used. it is to Its cutting tip.
• No Tool in the Spindle with Manual Change The following program is a variation on the previous example, except that there is no tool in the spindle when the program starts. (NO TOOL IN SPINDLE AT START) 01406 (INCH MODE) N1. G20 (GET TOl READY) N2 G17 G40 G80 TOl (TOl TO SPINDLE) N3 M06 N4 G90 G54 GOO X. _ Y.. S •• M03 T99 (T99 READY) (APPROACH WORK) N5 G43 Z.o HOl Moa
< ... 7rJl N26 N27 N28 N29
(TOl MACHINING DONE) (Tal TO Z (SAFE XY POSITION) (OPTIO:N1\L STOP)
(T99 CALL REPEATED) (T99 TO SPINDLE) (T03 READY) T03 (STOP AND LOAD T02 MANUALLY) MOO G90 G54 GOO X •• Y •• S •• M03 (NO NEXT TOOL) G43 Z .• H02 MOB (APPROACH WORK)
N30 T99 N3l MU6 N32 N33 N34 N35
< ... 7rJ2 worJdng ... > N46 N47 N48 N49
GOO Z .• M09 G28 Z •• MOS GOO X •• Y •• MJ.9
NSO MOO NSl NS2 N53 N54
Sometimes it is necessary to use a little larger tool than the machine specifications allow. In that case, the oversize 1001
must return to
same pocket in the tool
it came from and two adjacent magazine must empty. Do not use a tool that is too heavy! In [he example 01407, the large tool is 01407 (FIRST TOOL IN SPINDLE AT START) (INar MODE) N1. G20 N2 G17 040 GBO T99 (GET '1'99 RE1IDY) N3 G90 G54 GOO X .• Y •• S •• MU3 N4 G43 Z •. HOl MOB (APPROACH WORK)
< ... 7rJJ working . .. > N26 N27 N28 N29
GOO Z •• M09 G28 Z .. MaS GOO X •• Y •• MOl
(TOl MACHINING DONE) (TOl TO Z HOME) (SAFE XY POSITION) (OPTIONAL STOP)
N30 T99
(T99 CALL REPEATED) TO SPINDLE) T02 ('1'02 READY) M06 (T02 TO SPINDLE) G90 G54 GOO X •• Y.. S •• M03 (NO NEXT TOOL) 043 Z.. H02 M08 (APPROACH WORK)
001 MOG
... >
GOO Z •• M09 G28 Z •• M05 GOO X •• Y •• Mal
• First Tool in the Spindle and an Oversize Tool
(T02 MACHINING DONE) (T02 TO Z HOME) (SAFE XY (SPINDLE ORIENTATION) (STOP AND UNLOAD '1'02 MANUALLY)
('1'03 CALL REPEATED) '1'03 (T03 TO SPINDLE) M06 G90 GS4 GOO X .. Y •. S •• M03 T99(T99 READY) (APPROACH WORK) G43 Z •• HOJ MOS
N32 N33 N34 N3S
< ... 7rJ2 working .. . > N46 N47 N48 N49
GOO Z •• MU9 G28 Z •• M05 GOO X •• Y •. Mal
N50 N5l NS2 N53 N54
MOG
(T02 OUT OF SPINDLE TO THE SAME POT) T03 (T03 READY) M06 (T03 TO SPIND1..E) G90 G54 GOO X •• Y •• S .. M03 Tal ('1'01 READY) G43 Z •• H03 MOB (APPROAOi WORK)
< .. . N66 N67 N68 N69
('1'02 MACHINING OONE) (T02 TO Z HOME) (SAFE XY POSITION) (OPTIO:N1\L STOP)
workiJlg .. . >
GOO Z •• M09 G2B Z •• MOS GOO X.. Y .• MOl mo M06 N7l lOa %
(T03 MACHINING DONE) (T03 TO Z HOME) (SAFE XY POSITION) (OPTIONAL STOP) (TOl TO SPINDLE) (END OF PROGRAM)
< ... 7rJ3 working . .. >
• No Tool in the Spindle and an Oversize Tool N66 N67 N68 N69 N70 N71
%
GOO Z •• M09 G28 Z •. MaS GOO X •. Y •• M01 M06 M30
('1'03 MACHINING DONE) (T03 TO Z HOME) (SAFE XY POSITION) (OPTIONAL STOP) ('1'99 TO SPINDLE) (END OF PROGRAM)
This is another tool change version. It assumes no tool in the spindle at the program start. It also assumes the next 1001 is target" than the maximum recommended diameter, within reason. In this case, the oversize tool must return to exactly the same pocket it came from. It is important that the adjacent pocket.,;; are both empty.
TOOL FUNCTION
103 • lathe Tool Station
In (he 01408 example, 01408 (NO TOOL N1 G20 N2 G17 G40 GSO TOl N3 M06
the
m
tool.
SPINDLE AT START)
(INCH MODE) (GET Tal READY) (1'01 TO SPINDLE) N4 G90 G54 GOO X •• Y •• S •. M03 1'99 (1'99 READY) (APPROACH WORK) NS G43 Z.. Hal MOB
A slant bed uses a polygonal turret holding all external and internal cutting tools in special holders. These tool stations are similar to a tool on a madesign 8, 10, 12 or more cutchining center. ting tools - Figure 14-7.
< ... TOI wor/dng .. . > N26 N27 N2e N29 N30 N3l N32 N33 N34 N3S
GOO Z •• M09
z..
MaS GOO X •. Y •. Mal
G28
(TOI MACIaNING DONE) (Tal TO Z HOME) (SAFE XY POSITION)
(OPTIONAL STOP)
(T99 CALL REPEATED) 1'99 (T99 TO SPINDLE) M06 READY) 1'02 (T02 TO SPINDLE) M06 G90 GS4 GOO X.. Y.. S.. MO) (NO NEXT TOOL) G43 Z.. H02 MO 8
(APPROACH WORK)
Figure 14-7
Typical view of an octagonal lathe turret
< ... T02 working.. > N46 GOO N47 G28 N48 GOO X .• Y •. N49 MOl
Many MACHINING (T02 TO Z HOME) (SAFE XY POSITION) (OPTIONAL STOP)
(1'02 OUT OF SPINDLE TO THE SAME NSO M06 (T03 READY) N51 T03 N52 MOo (1'03 TO SPINDLE) READY) N53 G90 G54 GOO X •• Y.. S •• M03 1'99 (APPROACH WORK) NS4 G43 Z •• HOJ MOS
type tools available
CNC lathe models start adopting the tool to with many more away from work area.
Since all tools are held in a single turret, the one selected cutting will always carry along all other tools into the work area. This may be a design whose has but il is still commonly used in industry. cause a possible between a tool and the maor part, care must be taken not only of the active cutall orher tools mounted in turret, ting tool. but collision for ail
< ... T03 working .. . >
• Tool rndexing N66 GOO Z .• M09
(TO 3 MACHINING DONE)
N67 G2B Z •• MOS
(1'03 TO Z HOME) XY POSITION)
N68 GOO X .. Y •• N69 MOl
(OPTIONAL STOP)
NiO M06 Nil M30 %
(1'99 TO SPINDLE) {END OF PROGRAM}
To program a tool change, or rather to index the cutting tool into the position, the T function must be programmed according to its proper formal. For the CNC lathe. this format calls for the address followed four
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•••• _ _ __
So rhe tool function was as it applied to the CNC machining centers. CNC lathes use the tool function T, but with a completely different structure.
Tool station number is GEOMETRY offset number
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 about the four digits as two pairs of ralher than four single digits. Leading zeros within omitted. Each pair has its own meaning: The first pair (the first and the second digits). control the index station and the geometry offset.
display of a typical Fanuc control, there is a two screens, both very in appearance. One is called the Geometry Offset screen, the other is called lhe Wear Offset screen. Figure 14-9 and Figure 14-10 show examples of both screens, with typical (Le., reasonable) sample entries.
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
It is customary, not arbitrary. La the pairs, if ble. For example, tool function TO 10 I will select 1001 station number one, geometry number one and the assotool 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.
Figure 74·9 Example af rhe GEOMETRY offset screen display
OFFSET - WEAR
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: T0101
for turret station
, geometry offset 01 and wear offset 01
Q Example: T0111
for turret station 01, geometry offset 01 and wear offset 11
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 must be selected, for example 2J, and program it as TOI2l. Most controls have 32 or more offset for and another wear olfsets registers. offset can be applied to the CNC by registering value into the
TOOL OffSET REGISTERS word offset has been mentioned already several times with two adjectives - with the expression geometry offset and the expression wear offset. What exactly is an offset? What is the difference between one offset and the Olher?
figure 14-10
Example of the WEAR offset screen dispfay
• Geometry Offset Geometry the same as the turret operator measures and fills-in the gestation number. ometry for all tools used in the program.
The from the zero position will the distance from the tool reference point to the part refer14- J 1 shows a typical measurement tool. applied to a common All X values will normally have diameter values and are a typical rear lathe of the slant bed stored as type. The axis values will normally be (positive are but impractical). How to actually measure the geometry offset is a subject of CNC machine lOol operation training, not Figure} 4- 12 shows a lypical measurement of the geometry offset applied to a common internal tool.
TOOL FUNCTION
105 tty relating to the geometry off13. 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
,, Geometry offset X (0)
tr(:JnmJ'>f,rvofiset for external (turning) tools
program, the same are used as in the finished drawing. For examof 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 particularly when they are to be done with a worn out tool that is still good to cut a few more parts? The answer is that the propath must be adjusted,fine-tuned, to match 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
the
tip detail
is exaggerated for prnnn
!
I
Geometry offset X (0)
II
1/
14·12 geometry offset for internal (boring) tools
I
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 compensates 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 illustrate the concept offset adjustment on a rear lathe, T0404 in the program will be used as an examThe is to achieve an outside diameter of 3.0 inches and tolerance ±.OOOS. starting value the wear offset in the Txx04 will be zero. The relevant section {he program look something like this: N31 MOl
The principle of the wear offset adjustment is logical. If the machined diameter IS larger then the drawing dimen(he wear is changed the minus direction, towards the spindle center line, and versa. This principle applies equally to external and internal The only practical difference is an external internal diameter can be recut (see diameter and the lable above). Chapter 34 presents several practical examples using the wear offset creatively,
• The Rand T Settings
N32 T0400 M42 N33 G96 S450 M03
The last items are
N34 GOO G42 X3.0 ZO.! T0404 Moa N35 GOl Z-l.S FO.Ol2 N36 •••
the
The R column is (he radius column. the T column is tip orientation column (Figure 14-
i
m
o Q
T columns (Geometry and
(001
When the machined part is inspected (measured), it can have only one of possible inspection results:
o
R
Wear). The offset screen columns are only useful during
dimension Undersize dimension
If the part is measured on is no need to inlerfere. 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 oppofinish, will apply. recut may damage the a concern. If (he part is undersize, it bewhich could comes a The aim is to prevent all subsequenl parts from being as well. The following table shows Inspection results all existing possibilities: Measurement
External diameter
Internal diameter
ON size
Size OK
Size OK
OVER size
SCRAP
UNDER size
Recut possible
Let's go a little further. Whether the pan will be or...JJJldersized, something has to be done to prevent this from happening again. The action to take is adjusting the wear offset value. Again, the emphasis is (hal this is an example of an outside diameter. The diameter X3,0 in the example may result in 3,004 diameter That means il is 0.004 oversize - on diameter. The operator, who is in charge of the offset adjustments, will change the current 0.0000 value in the X register of the wear 04 to -0,0040. The subsequent cut should result in the part that will be measured within specified tolerances. If the part in the example is undersize, say at 2.9990 inches. the wear offset must adjusted by +,0010 in the X part is a positive direction. The
RADIUS
Figure 14-15
Arbitrary tool tip orientation numbers used with tool nose radius compensation (G41 or G42 mode) The rule of R T columns is (hat they are only effective in a tool nose radius offset mode. If no G4] or G42 is programmed, values in these columns are irrelevant. If G411G42 command is used, non-zero values for that tool must be set in both columns, R column requires the tool nose radius the cutting loot the T column the tool tip orientation number of the tool. Both are described in Chapter 30, in more detail. most common tool nose radii for turning and boring are: 1/64 of an inch =: .01 or 0,4 mm 1/32 of an inch == .0313 or 0,8 mm 3/64 of an inch == .0469 or 1,2 mm
tool lip numbers are arbitrary and indicate the tool orientation number used to calculate the nose tool setting in the turret. of
REFERENCE POINTS environment, importance. are three major "'.\\Ilrrm an established mathematical
n1o""",",,n
that
+ Control system (CNC unit)
Workpiece Tool
environment two. If the relationship (he sources of each ,..n'Jlrrm
+ Drawing + Material + Cutting tool maiep!~nOent
of the other right away, consider
a MACHINE TOOL is made by a company specializing in machine tools, usually not
or cutting tools
... this ellvironment is combined with . ..
a CONTROL SYSTEM is made by a company specializing in the application of electronics to machine tools. do not normally manufacture machine tools or cutting
o PART {workpu~cells a
engineering design developed in a company that does not manufacture machine tools, control systems, or cutting and holders.
a
environments . They have to
purposes, these relationships and interactions are based on one common denominator of each en- a reference point.
A
Relationship Machine tool
The common point here is that all cannot useful without some 'leam they have to interact. work
CUTTING TOOLS are a specialty of tooling companies, which mayor may not make cutting tool holders. These companies do not manufacture machine tools or CNC C:\J<::rl>nH:
is a fixed or "''''"",,",,,,,.,, arbitrary location machine, on the rool A fixed referis a precise location two or more axes, deduring manufacturing reference are established by the during the progralmrmnlg process. In these three refpoint for each of erence points are needed - one available groups:
a Machine reference point
.. Machine zero or Home
a Part reference point
.. Program zero or Part zero
a
or Command point
In a typical language of a
shop. these reference have somewhat more meamng. Home posior a machine zero are terms for machine reference point. A program zero, are terms commonly used reference point. And name tool tip or a tool command point are commonly used {he tool reference point.
REFERENCE POINT GROUPS The for short. the control CNC machine tool
H ......... ""'"
ratings, etc. a table or mounted into a or other work holding of numbers to consider. The parr size, its height, diameter, shape, Finally, the third group of numtools. Each CUlling tool its indias features that are with the
meet when a customer buys a \hese sources engineering design (part). must CNC machine. A 1001 from one manufacturer, using machined on a manufacturer. tools a control and 1001 from yet another sources are similar to a fourth source. who never played .~"'_ ... _, tet of first is a need to create a harmony. both cases By itself, environment is not very useful. A machine withoultools will not yield any profit; a 1001 that cannot be is not going to benefit manufacused on any turing cannot be machined without tools.
.. Tool
Tool reference point
All
have a - they are they are actual values programto work with individually as well
as
107
108
Chapter 15
• Reference Point Groups Relationship any 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 The key
10
o
Fixed reference
o
Flexible. or floating reference point
A point is set by the machine Lurer as part of hardware design cannot be physically by the user. A CNC machine has at fixed point. When it comes to ence points for the part or the cutting tool, programmer of freedom. A reference point (program is a flexible point, actual silion is in programmer's hands. The point for the cutting tool can either or flexible, depending on machine design.
MACHINE REFERENCE POINT The machine zero point, often called the machine zero, 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. 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 one that could be During setup, particularly after the power has been turned on, the position of all axes has to preset to be the same, from day to day, from one part to another. On older this prois done by setting a grid, on machines, by performing a machine zero return command. Fanuc and m~flY control systems prevent automatic operation of a machine tool, unless the machine zero return command 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, end of each the machine zero is located at the 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 plane (operator's front of the machine), or into YZ plane (operator's right-side view of the three planes are perpendicular to other and together creale su t:alled work cube or work space - Figure 15-1.
Figure 15-1 Machine
and axes orientation for a vertical machine
The cubical shape shown is useful only for understanding the work area. programming and the majority of work is done with one or two axes at a time. To understand the work area and machine zero point in a at the machine the top (XZ machine (YZ plane). Figures plane) and from Ihe J5-2 J5·3 illustrate both views.
MACHINE
view 15·2 Top view of a vertical machine as viewed towards the table
Spindle
/'0 ...." 0 .. 1
Gauge line
FRONT view Figure 15-3 front view of a vertical machine as viewed from the front
the two views. In top view, the the spindle center line shown in
right corfront view.
REFERENCE POINTS
Also note that in front there is a dashed idenlias the gauge line. This is an imaginary for the proper fit of the holder tapered body and is set by the machine The inside spindle is a taper that tool holder with Any (001 holder in the spindle will In the same position. Z motion illustrated will shortened by the tool projection. subject of tool referencing is later in this
• Return'to Machine Zero In manual mode, the operator physically moves the axes to the machine zero position. The operator IS to register inlo the control if necessary. turn power to the while the are at or very close to the machine zero pomachine Silion. too close will make manual machine zero return more difficult later, power had reA clearance 1.0 inch (25.0 mm) or more each machine zero is usually sufficient. A typical proto physically the machine zero position will follow these 1.
2.
3, 4.
5. 6.
7,
Turn power on and control} Select machine zero return mode the first to move (usually Z axis) Repeat for the all axes Check the in-position indicators Check the position screen display display to zero, if necessary
109 This vital reference point will be used in a ....,."IT,.".." the relationship with reference ence point of {he and the drawing dimensions. The part is commonly known as a program zero or a part zero. Because the coordinate point that selected by the represents program zero can anywhere, it is not a fixed point, but ajloQling this point is more details can covprogrammer who part zero. - after all, it is
• Program
Selection
ng the program zero, often in the comfort of is that will office, a the efficiency setup and its machining in the shop. Always allenlive (0 all are for and against a zero selection in a zero point may be selected not much of an advice, although true in terms. Within practical restrictions the mach.ine operations, only the most advantageous possibilities should be considered. Three such considerations of program zero: should govern IS
[) Accuracy of machining
o
Convenience of setup and operation
o
Safety of working conditions
Machitli"q Accuracy
safety reasons, the selected axis should machining centers and the X In bolh cases, either axis will be moving away work, into the clear area. When the axis has reached machine zero position, a small indicator light on control panel turns on to confirm that axis actually machine zero. The machine is now at its reference position, at the machine zero, or at the machine point, or at homeever term is used in the The indicator light is confirmation for each the machine is ready for use, a good will go one step further. On the posilion display screen, Ule actual position should be set to roreach axis, as a standard practice, ifil is not to zero automatically by control. The butcontrol panel the position screen
PART REfERENCE POINT A part for machining is within the machine motion \lmils. Every must mounted in a that IS suitable for required operation and not change position other part of the job run. The fixed location of the very important for consistent results and It is also very important to guarantee thaI of the job lS set the same way as the first is established, part reference can
Machining accuracy is paramount all parts must be maexactly to the same specifications. is also important repeatability. All the in the balch must the same and all subsequent jobs must be the same as well. Convenience of Setup Bnd Dperation
Operating setup can only be considered once (he machining accuracy is assured. Working desire. An experienced CNC nrl".O'r~imrnl"r think of the has in Defining program zero that difficult to set on the machine or difficult to check is not convenient. It slows down the setup process even Working
Safety is always important to whatever we do machine has a and part setup are no different. Program zero lot to do with the We look allhe lypical considerations of program zero severtical centers and lathes ally. Differences in part influence the zero selections as well.
110 •
Chapter 15
Program Zero - Machining Centers
CNC machining centers allow a variety of methods. Depending on the type of work, some most common setup methods usc vises, chucks, subplates hundreds of special fixtures. In addition. CNC milling systems allow a setup, increasing available options. In to select a program zero, all machine axes must considered. Machining centers with additional axes require zero point each of these axes as well, for the or rotary axes. What are the most common setup methods? Most machining is done clamped on table, in a or a fixture mounted on Ihe table. These basic methods can be adapted to more complex applications. programmer the setup method for any given perhaps in cooperation with machine tor. programmer selects the program zero protion for each program. The process of selecting 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
Step 2.
Decide on the method of part setup and holding
Program zero almost presents ilselfin the any make sure all critical dimensions and tolerances are from one part to another. dimensions are usually not critical. on a machine table involves simplest the part, some clamps and surfaces. run and ing surfaces must be fixed during measured from. The most typical setup of this kind is on pin Two pins form a single row the third pin is offset away at a right creating a setup corner as two locating surfaces - Figure 15-4.
MACHI
PART
part are both parallello
machine axes and perpendicular zero (part is at (he intersection edges.
IJvr\
two The
concepl is common for virtually all setups, actual If a part is mounted in a vise jaws must be parallel to or perpendicular with machine axes the fi;ced location must be established with a stopper or other fixed Since a machine most common work holding device parts, use it as a practical example of how to program zero. Figure 15-5 illustrates a lypical simple engineering drawing, with all the expected dimendescriptions material
3
1210 75 . \
THRU
1.0 r-~
--.... !
4.0 1020
Figure 15·5 Sample
x 0.5
used lor selecting program zero """::,,.... nltJ
When selecting a zero, study the The designer's dimensioning style flaws, but it still is the engineering drawing. In the example, dimensioning alJ holes is the lower left corner of the work. the program zero of the part itself? For this example, should be no question about programming 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 of the program zero selection The 2, dealing is next. A typical setup with work holding device CNC machine vise could be the one iIlust.rated 15-6.
N LOCATORS Figure 15·4
Three-pin concept 01 a parr setup (all pins have the same diameter)
Since part touches only one point on each pin, the setup is very accurate. Clamping is usually done with top clamps and The left and bottom of the
In the setup identified as Version 1, the part has positioned the vise a left pan stopper. The part orientation is the same as drawing. so all drawing will appear in the program using these drawing dimensions. It seems that this is a winning setup - yet, this is actually poor. in the IS any of What is the actual size of The drawing specifies a rectangular stock of 5.00 x 3.50. The~e are open dimen10 or more and be acceptable. sions they can vary
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 Version 3 will offer the best of both worlds. Part program will have all dimensions in the first quadrant, as per drawing. 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.
o
o
0
MOVING JAW y l
~
~ <: -:I
I
--x
<:
-:I
(!)
0 LU
Figure 15-6 A sample part mounted in a machine vise· Version 1
X
u..
Combine any acceptable tolerance with the vise design, where one jaw is a fixed jaw and the other one is a moving jaw, and the problem can be seen easily. The critical Yaxis
Z
0 ,'"
0
>
0
0 ::E
y i !
reference is against a moving jawl The program zero edge should be the fixed jaw - a jaw that does not move. Many programmers incorrectly use a moving jaw as the reference edge. The benefit of programming in the first quadrant (al! absolute values are positive) is attractive, but can produce inaccurate machining results, unless the blank material is 100% percent identical for all parts (usually not a normal case). VersiOIl 1 setup can be improved significantly by rotating the part 1800 and aligning the part stopper to the opposite side - Figure J5-7.
FIXED JAW
o
--x
Figure 15-8 A sample part mounted in a machine vise - Version 3
To select a program zero for the Z axis. the common practice is to select the top face of the finished part. That will make the Z axis positive above the face and negative below the face. Another method is to select the bottom face of the part, where it IS located in the fixture. 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 position may be built into the fixture, away from the part. 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.
0
o )
nr--9--~
MOVING JAW
x:..;
I
'
(2) ~ ,----- PROGRAM ZERO f I ~ -Q- -.-- ·¢-----~--cB· -
y 1
--x figure 15-7 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 part is located in the third quadranti All X and Y values will be negative. Drawing dimensions can be used in the program, but as negative. Just don', forget the minus signs.
h\!
~_¢_0
0
Figure 15-9 Common program zero for round objects is the center point
Chapter 40 describes the G52 command that may solve many problems associated with program zero at the center.
112
Chapter 15
• Program
-lathes
is setting program zero on the This is not a perfect selection other advantages. The only disadvanthere is no finished face. Many opface to the setup or cut a
On zero selection is simple, are only two axes to consider - the vertical X axis and the
horizontal Z axis. Because of the lathe design, the X axis program zero is always the spindle center line. On eNC lathes, the program zero for the X axis MUST be on the center rine of the spindle
z
three popular methods are used:
o Chuck o o
.. , main face of the chuck , ., locating face of the jaws
, ., front of the finished part
Stock
,_[tp __l / '. ,
_.
-
-
-
-...1
X J
---
What are the zero at the front One is that many dimensions along Z axis can be directly into program, normally with value. A depends on the of cases, the CNC programmer probably the most important, is a a tool motion indicates the work area, a is in the clear area. During program devel· opment It IS to forget a minus sign for the Z cutan error, ifnotcaught in time, will positool away from part, with the tails tack as a possible obstacle. It is a wrong position, but a better one than hilling pari. Examples in this handbook use program zero at thefrontfinishedface, unless otherwise specified.
. --
--
---
CHUCK Stock
x
~
Stock
-
-
•
-
<
- - -
_.'
-~
)",,~ ~
referenc~ point is related to the lOol. In milling
•
JAW ---
TOOL REFERENCE POINT
X !
operations, the reference point of tool is the intersection of the tool centerline the culting lip (edge). turning and boring, the most common (001 point is an imaginary tool point of the cutting 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 15-1 J shows some common tool tip points.
-
-
P,ART
Common program lero options for 8 eNC lathe· center line is XD
a chuck with the On a negaadditional 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 the first operation, material operation must always be added to Z value. is the main reason why CNC programmers away from program in special cases. zero located on jaw or fixture
tool reference
All
toofs
are connected. An error on another. The to understand
REGISTER COMMANDS reference points CNC programcorrectly. Havharmonized to rPt,"'rPlnrppoints for program zero) and tool (i.e.• tool tip) there has to be some to fit them together. means to associate them must be some means LO 'teU'the control syslem exactly where each tool is physically within the mawork area, before it can oldest method to do all lhis is to register the current of the control system .", .. 'nr.n r,'{"wlt ..p'n
a
• Position Register Definition A little more verbose defi could be
of the position way:
Position register
rell~ISli:::r
location
as FROM the program zero, TO ..• the tool current position, measured along the axes
Note that the definition does not mention the machine zero at all - instead, it mentions
POSITION REGISTER COMMAND The command for the tool position register is 092 for machining centers and lathes: ition register command
(used in milling)
ilion regisler command
in turning)
lalhe5: also lise G92 but lathes supplied with and similar controls normally use G50 command instead. In practical applications, both 092 and G50 have identical meaning and the following discussion to both commands In the first part of this the focus will applications using command, lathe using G50 command will explained later. by a much more and called the Work Offsets to U59), described in Chapter 18, and the Tool Length OffseT (G43), described in Chapter 19. However, there are still quite a few older machine tools in shops that do not the ury of the of commands. There are many but still compames developed years running on equipment. In cases, registration command is an standing the skill. This been one some grammers and found a little difficult to stand. In reality, is a very simple command. First, a look at some more detailed definition this command. A typical description only specifIes Position Register Command, which by itself is not very
current tool position.
is a very important distinction. The current tool position may be at machine zero, it may within travel limits of axes. note the emphasis on from-to By definidistance is unidirectional. between the program direction is always the current tool location. zero, 10 lool never reversed. In a correct sign of each value (positive, negaor zero) is always required. !-'v" .. " " , register is only applicable in the absolute mode programming, while G90 command is jn effect. It has no use in the incremental G91. In programmmg, do begin in
toullocation.
• Programming Format As the name (he command suggests, data associated with the G92 command will (i. e., stored) into control system memory.
The format
command is as
In all cases, the
of each axis specifies zero to the tool reference point (tool tip). Programmer provides all coordinates based on the reference point (program discussed earlier. ditional axis will also have to be registered with the indexing table on example the B axis chining centers.
from the
113
114
Chapter 16
• Tool Position Setting MACHINE ZERO
only purpose of command is to register the current 1001 posilion imo the control memory - nothing
can be seen on the absolute position effect of 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 specified in the command. tool seHing with the
MACHINING CENTERS APPLICATION In programming for CNC machining centers without the Work Coordinate SysTem feature (also known as Work Offsets), the Register must be for each axis and each lOol. There are two methods: o
The tool position is set at machine zero
18-1 Current tool position (only XY axes shown)
machine zero
Fig ure 16-/ a G92 setup on tool sel at machine zero position. method of starting program at machine zero is useful. There could be an advantage, for example, if a special fixture is permanently attached to the machine A subplate with a grid is a common example. Permanently set one or more vises may also benefit. There are numerous variations on this lype of setup.
o The tool position is set away from machine zero Which method is better? We look at both
them.
• Tool Set at Machine Zero The first method requires that the machine zero position be tool change position for all axes. This is not will necessary and definitely very impractical. Consider il for a moment and think why it is impractical. A program is usually done away from the machine. but the part position on the tabJe must be speci
• Tool Set Away from Machine Zero second method eliminates the difficulty of the ous It allows the programmer to sel XY 1001 anywhere within the machine travel limits (considering safety first) and use that position as the lool position for XY axes. there is no for machine zero itself. the CNC operator can setup the part anywhere on the table. in any reasonable position, within limits of the machine axes. Figure 16-2 shows an a set at a live X axis and a positive Y axis.
G92 X12.0 Y7.5 ZS.375
Numbers in the example look innocent enough. But conCNC al the machine, trying 10 setup 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. without some speIt is an almosl impossible task, at 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 has chosen the machine zero only tool change position (mainly in the X reference poi nt andY
IN1TIAL TOOL
POSITION
MACHINE ZERO
Figure 18·2 Current tool position (only XY axes shown)
set away (rom machine zero
REGISTER
115
In order to place tool into the tion, the operator physically moves the gram zero by amounts in is a lot easier job and also much more jng setup to the machine zero.
change posi1001 from the pro· statement. This
that
Once the lool change posilion is the program will return to this position a The Z axis automatic tool change position on chining centers musl be programmed at the only automatic tool change really applies 10 XY axes only. tion, the 092 selling will be the same for all [here is a good reason to change it.
The only major disadvantage of this method is new tool change position is only system while the power is on. When the power to chine is turned off. the tool change position is lost. nprlpn,~p.n CNC operators solve this problem by finding the actual distance from the machine zero to tool position. register it once for particular then move the tool by that distance for example, at the start of a new day.
• Programming Example To illustrate how to use the position a part program for vertical have to be followed:
o
The cutting tool should be changed first
o
G92 must be established before any tool motions
o Tool must return to the G92 position when all the cutting is completed
All three rules are followed in a 01601 N1 G20 N.2 G17 G40 GBO G90 TOl N3 M06
(TOOL 1 TO SPJCNDLE) (SE.'T CURRENT XY) GO 0 XL 0 YO. S S800 M03 (MOVE TO ZO.l NOS (MOVE TO CLEAR ABOVE) GOl Z-0.55 F5.0 (FEED TO DEPTH) X).O Y4.0 F7.0 (CUT A SLOT)
N4 G92 X9.7S Y6.S Z11.0 N5 No
N'7 N8 ~
GOO Z11.0 N09 NlO X9. 7 5 Y6. 5 MaS Nll NOl
• Position Register in Z Axis a typical vertical machine, the Z axis must be fully re[0 the machine zero, in order to make (he automatic tool change. The position register value is measured from the zero of the Z axis (usually the top of finished to the tool reference lip, while the Z axis is at mazero position. There is no other option. Normally, each tool will have a different Z value of the command, assuming the tool length is different for tool. a rule. the XY settings will not change. for 092 command along shows a typical o 1601 ill ustrates the concept.
(PROGRAM NUbmElR) (SET ENGLISH ) (GE.'T TOOL 1 READY)
(RAPID TO Z MACHINE ZERO) (RAPID TO XY SET POSITION) (OPTIONAL STOP FOR TOOL 1)
example to write but more difficult to setDon't worry about unknown program explanations should be at In
setting position must always It not maHer the tool is made, at machine zero or away from it - the prosame, of the values will Only one but normally, each Z value as the position register, length.
LATHE APPLICATION with Fanuc and similar controls. 050 092 command:
the
MACHI If 092 is
a
the command is similar:
same definition and program
Figure 76-3 8
machine zero fDr the Z axis different setting)
116 Commands G50 and are identical, except that they belong to two different G groups. Fanuc actually offers three G code for lathe controls. Based on history,typical Japanese made controls use GSO, whereby typical US made controls G92. A cooperative US and Japanese venture known as Fonuc (General Electric and Fonuc) produces controls that are the most common in North American' the G50 command. for lathe applications is very similar to that for the mills. However, due to design of CNC lathes, where all tools are mounted in turret, the projection from the turret holder must possible interference must be mounted inaclive one that is used for tools move cutting. In all are safely out of placed in a tool magazine. Several new designs of lathes are available, where tool on the lathe resembles the milling type.
• Tool Setup The most important work relates to the tions to select from, some are .....,..,C"" .. "
lathe op-
Probably the most to have the tool change to the machine zero position. POSIto move the turret 10, just control panel The position registcr to machine zcro /00 far for have one major disadvantage it most jobs, particularly on larger lathes the Z axis. imagine a tool motion ono inches or more the Z only to index the turret and than (he same 30 inch mobuck to continue the cutting cycle. It is not efficient at is a solution, however. Much more efficient method is to select tool indexing position position as close lO the part as possible. should always be based on the longest tool mounted in the turret (usually internal tools), whether the tool is in the or not. If there is enough clearance the IV"!:;'-"" will also be enough clearance
• Three-Tool Setup Groups On a typical slant bed CNC lathe, equipped with a Iygonal turret (6 to 14 stations), all cutting individual stations of the turret. During tool the tool is in the active station. the used for CNC lathe three groups normally do: o
Tools lAtn'''''tn on the part center line
Q
Tools working externally on the part
Q
Tools working internally on the part
for each group is understood well, it to any tool within a group, tools used.
• Center line Tools Setup as center line tools are typically standard twist drills, carreamers, and so on. Even an end mill can center line. All tools in this group have a common denominator, whereby the tool tip is always on spindle cenler line, while they cut These must be setup exactly at 900 to the work face (parallel to The position value in the X axis is from the spindle center line to the center line of the tool. For the Z axis, the position value is measured from program Iy, the center line tools will have zero Lo the tool a fairly large that means their GSO value the Z axis wm small, when compared to external tools, which generally do not project too much.
Figure 16-4 a using an indexable drill as an
for center line tools.
TOOL
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 the GSO command.
a tool
16-4 Typical 550 setting for center line lathe tools
COMMANDS
REG
117
• External Tools Setup TOOL
external machining operations such as diameters, taper cutting,
threading, part-off and and approaches
zero to
register value is 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 tool (turning tool shown in example).
for
AT TOOL CHANGE POSITION
Figure 16·6 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 a fairly long travel beyond Z Many lathes 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 in the sure to G5D setting for external farhe tools
•
Internal Tool
Internal tools are core or other inside of a part, in a premachined Typically, we may first a boring bar, but can be used as well for various internal operations. For exand i nlemal threading are comample, an internal mon operations on a setup rules Ihe Z axis apply in the same way for internal tools as for external lools of the same position register setting must Along the X axis, the tip the insert. Figure J6-6 be made to the setup for an internal 1001 shows a typical example). (boring bar shown in 16-4, 16-5 and /6-6) All three iIIuslrations operations (drill - tum a possible order Note that the turret position is for a typical position. not necessarily as identified as a tool That means G50 may be set machine zero of the machine, even at the mawhere within chine zero.
concern relating to long tools is {"lp~r~lnt'p area, mcluding chuck those tools where the
• Corner Tip Detail Typical turning tool contains an indexable with a strength and surface finish When command is used for a Lool that a built-in, the programmer has to know (and also tell operator), which edge corresponds to, In cases, the choice is simple. value is meaintersection of program zero to the X and Z tool shape and in the will vary. Figure next page shows settings for the a corner radius, most common orientations of a including two grooving tools.
• Programming Example The example showing how to use a position register command G50 on a lathe will be very similar to that of a machining center. First, the tool change is made, followed with G50 setting for the tool. When the machining is with (ha( tool, it to return to the same absolute position as specified in the The following simplified example is two the fir.sl 1001 is proor",mnC'lPt1 to cut a the tool is programmed to cut a 2.5 inch diameter:
118
Figure 16-7 Position
Chapter 16
setting G50 for common tool tip orientations - the heavy dot indicates XZ coordinates set by GSO X. Z. for the tool above
01602
N1 TOlOO N2 GSO X?4S ZS.5 N3 G96 S400 M03
N4 GOO X2.? ZO TOlOl MOB N5 GOl X-O.01 FO.OO?
N6 GOO ZO.l M09 N7
X7.4S ZS.5 TOlOO
NB MOl
N9 T0200 NlO GSO XB.3 Z4.B Nll G96 S425 M03 Nl2 GOO X2.S ZO.l T0202 MOB Nl3 Z-1.75 FO.OOS N14 GOO X2. 7 H09 N15 X8.3 Z4.B T0200 N16 !rOO %
Note blocks N2 and N7 first tool, and N 10 and the second tool. For tool. pairs of are exactly same. What program is the system here is that block N2 only registers the current tool position, but block N7 actuaJly returns that tool to the same posilion it came from. For second tool. block NIO registers the current tool position, block N15 forces the tool to return there.
N 15
important blocks to together are the blocks N7 and N 10. Block N7 is the tool change position for the tool. block NIO is the tool register for toot - both tool are at the same physical position the of file turret! The difference in the XZ values reflects the of each tool from the difference in the projection 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, programming are expressed as than not, these numbers, well before the actual part programming, many are exactly, others are known approximately and there known diare also many that are not known at all mensions are subject to variations Without it will facility available to (he almost impossible to setup precisely and efficiently. Fortunately, modem controls offer many features to both programming and machine an easier, and more precise activity. A coordinate offsets and compensations are typical support in programming for
can also be used for a
Like
screens,
and similar controls. there are four preparatory available to program position com-
increase in the programmed direction compensation amount
It is only one of several
The maIn purpose compensation is to correct any difference between machine zero and program zero 1001 positions. In it is in those cases, where the distance between the two reference points is subject to vanations or is not known at all. For example, when working with castings, the zero taken from the cast surface will be subject to change. Using position the need to make constant compensation will program of the fixture setup. mally, the part in a fixture on the table whole setup is this reason, the position compensation is called fixture offset or an offset and a cornlJ(!ns:aoffset. The lion is often and for any practical purposes, (Wo terms are sami!.
IJV~"LJ\.)" compensation is that requires mput the CNC maspecifies the number, the operator enters machine, using appropriate setup.
• Programming Commands
decrease in the 1pro,gn,lmrne(
the programmer and machine
'- DESCRIPTION
limited replacement of the culler is not covered at all for its obsoleswill be on positioning of the t~"."r,"~ the part.
D .. An ..."' ..... ,.,,.," ..
One of the oldest programming l""".IJlIl ..... U~~;) available in is called a position As the name suggests, using position functions, the actual tool position is compensated to its Iheorelior assumed position, methods available to On modern CNC systems, this method is still compatibility with older programs. Today, this technique is not really needed. It been replaced by the much more flexible Work Offsets (Work Coordin.ate Syslem), in the next chapter handbook. The current chapter'describes some can benefit from ustypical programming ing the old-fashioned method.
term is used in the same meaning
as the majority of users interpret it. Ppsition compensation
pensation amount
G47
Double increase in the Iprogr~lmrne( by double the compensation amount
G48
Double decrease in the programmed direclio1n by double the compensation amount
I
definilions are based on stored in the control meaning of all are inverted. None of is and are which they appear. If required in \;;~";Lll\;;,U in any subsequent block, if
• Programming Format Each G code (G45 to G48) is with a unique position compensation number, programmed with the adH. The H address points to the memory area storage of the control system. On most Fanuc control systems. the programmed leuercan be D, with exactly the same meaning. Whether the H or D is used in the program, depends on the of a control system parameter.
120 A typical programming format for position compensation function is: G91 GOO G45 X •• H ..
or G9l GOO G45 X •• D ..
where the appropriate G code (G45 through G48). is followed by the target position and number of the memory storage area (using H or D address). Note that the example uses incremental and rapid mOlion modes and only one axis. Normally, the compensation has to be applied to bolh X and Y axes. However, only a single measured amount can be stored under either H or D number. Since it is most probable that the compensation value will be different for each axis, it must be specified on separate blocks, with two different offset numbers H (or offset numbers D), for example: x .. H31
(illl STORES THE X VALUE) (H32 STORES THE Y VALUE)
G91 GOO·G45 X .• D31 G45 Y •• D32
(D31 STORES THE X VALUE) (D32 STORES THE Y VALOE)
G91 GOO G45 G45 Y •. H32
or
For the record, the H address is also used with another type of compensation, known as the tool length offser (or tool length compensation), described in Chapter 19. The D address is also used with another type of compensation, known as the cutter radius offset (or cutter radius compensation). described in Chapter 30. The applicable preparatory G code will determine how the address H or address D will be interpreted. In the examples. more common address H will be used - Figure 17-J.
TABLE
1 '-.... 11111--_ _
H31---
MACHINE ZERO
T
H32
.\ J"'"
PROGRAM ZERO
_. _ _ ~ _ J
\ PART
figure 17- 7 Position compensation - general concept
•
Incremental Mode
The question may arise why the compensated motion [s in the incremental mode, Remember that the main purpose of position compensation is to allow a correction of the distance between machine zero and program zero. The normal use is when starting the tooJ motion from machine zero position. By default, and without any offsets, coordinate settings or active compensations. the machine zero [s the absolute zero, it is the only zero the machine control system 'knows' allhe time, Take the following example of severa! blocks, typically programmed at the beginning of a program with position compensation: N1 G20 N2 G17 GSa Tal N3
M06
N4 G90 GOO G45 XO H31 N5 G45 YO H32
(NO x MOTION) (NO Y MOTION)
N6
This example illustrates a motion from machine zero (the current tool position), to program zero, which is the target position, along XY axes, Note the absolute mode setting 090 in block N4. Assume that the control system is set (0 H31 =-12.0000 inches. The control will evaluate the block and interpret it as programmer's intention to go to the absolute zero, specified by G90. It checks the current position, finds it is at the absolute zero already and does nothing. There will be no motion, regardless of the compensation value setting, if the absolute motion is programmed to eIther XO or YO target position. If the G90 is changed to 091, from absolute to incremental mode, there will be a motion along the negative direction of X axis, by the distance of exactly 12 inches and there will be a similar motion along Y axis, in block N5. The conclusion? Use position compensation commands in the incremental mode G9 J only.
• Motion length Calculation Let's look a little closer at how the control system interprets a position compensation block. Interpreting the way how the control unit manipulates numbers is important for 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 with 046 command. Both G47 and G48 commands are of no consequence at the moment. Since both commands are 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)
o
Axis target can have a lero value, or a positive value, or a negative value
o
Compensation amount may have a lero value, 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 mane zero to program zero. means a negative result is a lion from the operator's viewpoint. decision 10 set as It is cruc1al to understand how the control interprets information in a block. In compensation, it evaluin memory called by address H (or ales Ihe value D). If the value is zero. no compensation place. If the 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 machine current location is at zero position and setting on Ihecontrol is also set to zero. Then the G91 GOO G45
xo
-15.0 + 0 = -15.0000
the Iota I motion of negative \5.0 inches along
value of axis target the same formula
is a non-zero and
17 l
13
,
"j,--
.'
--15 ;-'" 17-2
Figure 1 shows for the following example 701, The applies to the X and Y axes exactly (he same way. In written in metric units and has tested on [ I M, the H address would the same way). The compensation values and H99 were set to:
the X and Y axes respectively. The modal were not repealed
interpreted as
01701 Nl G21 N2 G92 N3 G90 N4 G46 NS G28
-15.0 + 1.5 = -13.5000
However,
'-1
H98 H99 = -150.000
G91 GOO G45 Xl.S H31
will
r
H99
Position compensation applied to different target locations: zero, positive and negative - see 01701 program Pll::l'mn/I'!
H31
will be interpreted as
resulting the X axis.
9
next example is 1/01 correct:
G91 GOO G4S X-l.5 H31
AND G46 TEST} G17 XO YO ZO GOO G45 XO H98 YO H99 XO YO
(ABS (ABS
xo
TARGET) YO TARGET)
the motion will try 10 the X axis direction and result will be overtravel. Since [he value of X is G45 command cannol be used and G46 command must instead:
N6 G91 GOO G45 XO H98 N7 G46 YO H99 N8 G28 XO YO
(INC' XO TARGET) (INC' YO TARGET)
G91 GOO G46 X-l.S H31
N9 G90 GOO G45 X9.0 H98 NlO G46 Y17.0 H99 Nl1 G28 XO YO
(ABS X+ (ABS Y+
will be
r",'or,,'/]
as
-15.0 + (-1.5) '" -15.0000 - 1.S
G45
TARGET) TARGET)
16.5000
in the ....."" .. ":1',..... value could been value. could be quite confusing and but it would work quite well. To see the possibiliprogram 0 J70! is not dOl ng very much, exCCrl moving from machine zero 10 different positions and back to machine zero (G28 command refers 10 a machine zero return and is explained separately in Chapter 2/ ).
N12 G91 GOO G4S X9.0 H98 N13 G46 Y17.0 H99 Nl4 G28 XO YO
X+
(INC' Y+ TARGET)
NlS G90 GOO G45 X-1S.O 898 Nl6 G46 Y-13.0 H99 N17 G28 XO YO
(AES X-
Nle G91 GOO G4S X-1S.0 H98 Nl9 G46 Y-13.0 H99 N20 G28 XO YO N21 M30 %
(INC' X- TARGET) (INCY-TARGET)
TARGET) Y- TARGET)
122
17
control syslem will the way it was (symbol orr means an the and direction of
each motion block or the wrong way condition, preceded WiLh
method is described in Chapter 19 of the handbook. If the Z axis is programmed with G45 or G46 commands, i( will also be affected.
• Using G41 and G48 N3
N4 N6 N7
N9 NlO N12 Nl3 Nl5 Nl6 N1e Nl9
•
G90 G90
Gn G9l G90
-> -> -> ->
G91 G9l
-> -> -> ->
G90 G90 G9l G91
-> -> -> ->
G90
G45
G46 G45
G46 G45
G46 G4S G46
G4.5 G46
G45 G46
-> -> -> ->
0 0 0
no motion no motion X-2S0.0 Y+ OIT
-> -> -> ->
+ + + +
X-241.0 Y+ OjT X-241. 0 Y+
-> -> -> ->
0
X+ Y-163.0 X+ OjT Y-163.0
Position Compensation Along the Z axis
Position compensalion usually appl to the X Y axes and will nol normally be used with the In most cases, the Z to be controlled by another of compensation known as the too/length This
In the examples, compensation feature was used only between the zero and program zero, as a method exactly is the part on the table. The single mClrea~;e using G45 and the were used, because crease using G46 the only commands npPflP{"I Commands G47 (double increase) and G48 (double de~ crease) are only for a very simplified cutter radius olfsel and are not covered in this handbook of their obsOlescence. However, they can still used.
• Face In a later (Chapter 28), milli ng wi II be explained in more detail. In thai chapter is a very good example of how to apply position to offset the face mill in a regardThis is probably the only use of less of its 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 Fanuc control lowing preparatory commands:
are available on
When the control unit is is normally the most modem methods to coorrelationship between machine zero reference the program zero reference point. We will use Work Coordinate System feature of any modern control whether it is called the Work Coordinate System or 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. "'lU~I.n''-'' rl,r;.c{'nhlf'c
Basically, the work ent work areas as a the unit are
to independvalues input into measured from the maare up to six work zero positions can be relationships, using
[X]
WORK AREAS AVAILABLE
MACHINE 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 is a knowing its exact position on the machine table. 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 for the active work offset is needed in control system will do rest. will automatically make any adjustment for between the two part locations. Un1ike the position cmnOlens:aU'OI more axes may be offsets. although the Z controlled independently, offset commands. Commands are fully described in the next
AXES MOTION LIMITS Figure 18·1
Basic relationships of the work offset method
The same relationships illustrated for the def~ult apply exactly the same way for the other able work offsets 055 to G59. The values siored in the control system are always physically measured from the rnazero position 10 the program zero of the as determined hy lhe CNC programmer.
12
124
Chapter 18
The distance from machine zero to program zero of each work area is measured separately along the X and Y axes and input into the appropriate work offset register of the control unit. Note that the measurement direction is from machine zero to program zero, never the other way around. If the direction is negative, the minus sign must be entered in the offset screen. For comparison with the position register command G92, Figure J 8-2 shows the same part set with t.he older method of G92 {lnd m{lchine zem a<; a ~tart point. Note the opposite arrows designation. indicating (he direction of measurement - from program zero to machine zero. ;---- G92 [ X ) ~
MACHINE ZERO
t >-
Part position on the machine table is usually unknown during the programming process. The main purpose of work offset is to synchronize the actual position of the part as it relates to the machine zero position.
• Additional Work Offsets The standard number of six work coordinate offsets is usually enough for most types of work. However. there are jobs that may require machining with more program reference points, for example, a multi-~irlerl part on a horizonttll machining table. What options do exist, if the job requires ten work coordinate systems, for example? Fanuc offers - as an option - up to 48 additional work offsets, for the total of 54 (6+48). If this option is available on the CNC system, anyone of the 48 work offsets can be accessed by programming a special G code: GS4.1 P..
Selection of additional work offset, where P = I 1048
N
o
0)
(!)
PART
l
PROGRAM\ ZERO \. AXES MOTION UMITS Figure 18-2 Basic relationships of the Position Register cDmmand G92
For work offsets G54 to G59, a typical entry into the coordinate offset position register will be the X axis as a negative value. the Y axis as a negative value and the Z axis as a zero value, for the majority of vertical machining centers. This is done by the CNC operator at the machine. Figure 18-3 shows an example of a typical control system entry.
01 (GS4) X -12.5543 Y - 7.4462 Z 0.0000 Figure 18·3 Typical data entry for the G54 work coordinate system
By using the G54 to G59 settings in the program, the control system selects the stored measured distances and the CUlling tool may be moved to any position within the selected work offset simultaneously in both the X and Y axes, whenever desired.
Q G54.1 P.. example: G54.1 Pl G54.1 P2 GS4.1 P3 G54 1 Px.. G54.1 P48
Selection of additional work offset 1 Selection of additional work offset 2 Selection of additional work cffset 3 Selection of additional work offset x.. Selection of additional work offset 48
The utilization of additional work offsets in the program is exactly the same as that of the standard commands: N2 G90 GOO GS4.i Pi XS.S Y3.1 SlOOO M03
Most Fanuc controls will allow omission of the decimal ponion of the G54.1 command. There should be no problem programming: N2 G90 GOO G54 Pl X5.S Y3.1 S1000 M03
The presence of PI to P48 function within a block will select an w.1Ji/ional work offset. If tbe PI to P48 parameter is missing, the default work offset command G54 will be selected by the control system.
WORK OffSET DEfAULT AND STARTUP If no work offset is specified in the program and the control system supports work offsets. the control will automatically 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 the default G54 is used constantly from one program to another. The machine operator will have a better feel for the CNC program. Keep in mind that the control still has to have accurate work coordinates stored in the G54 register.
WORK OFFSETS
125
In the program, the work offset may be established in two ways - either as a separate block, with no additional information, as in this example: N1 G54
The work offset can also be programmed as part of a startup block, usually at the head of program or at the beginning of each tool: N1 G17 G40 GBO G54
The most common application is to program the appropriate work offset G code in the same block as the first cutting tool motion: N40 GOO G90 G54 X5.5 Y3.1 SlSOO M03
Figure J8-4 illustrates this concept. In (he above block N40, the absolute position of the tool has been established as XS.5Y3.1, within the GS4 work offset. What will actually happen when this block is processed? .all
x= Y
-12.5543 + 5.5 = -7.0543 + 3.1 = -4.3462
= -7.4462
These calculations are absolutely unnecessary in everyday programming - they are only useful to the thorough understanding of how the control unit interprets given data. The whole calculation is so consistent, il can be assigned into a simple fonnula. For simplicity, the seuings of the EXT (external or common) offset are not included in the formula. but are explained separately. later in the chapter:
II3f'
where ... A == Actual motion length (distance-to-go displayed) M = Measured distance from machine zero P == Programmed absolute target position (axis value)
Be very careful when adding a negative value - mathematically, the double signs are handled according to the standard rules:
G54 [X]--' PLUS and PLUS becomes
a + (+ b) == a
+
b
PLUS PLUS and MINUS becomes
0--r I WoJ+------'-----I
a + (- b) = a - b
MINUS
3. 1 _t
1-- -5.5 --1 Figure 18-4 Direct too/ motion to a given location using G54 work Dffset
Note thaI there are no X or Y values associated with the G54 command in the illustration. There is no need for them. The CNC operator places the part in any suitable 10calion on the machine table, squares it up, finds how far is the program zero away from machine zero and enters these values into the control register, under the G54 heading. The entry could be either manual or automatic. Assume for a moment, that after setup, the measured distances from machine zero to program zero were X-12.5543 and Y-7 .4462. The computer will determine (he actual motion by a simple calculation - it will always add the programmed target value X to the measured value X, and the programmed target value Y to the measured value Y. The actual tool motion in'the block N40 will be:
MINUS and PLUS becomes
b) == a - b
a -
(-I-
a -
(- b)
MINUS MINUS and MINUS becomes :::
a
-I-
b
PLUS In the example, plus and minus combination creates a negative calculation: -10 + (-12) = -10 - 12 = -22
If any other work offset is programmed, it will be automatically replaced by the new one, before the actual tool motion takes place.
• Work Offset Change A single CNC program may use one, two, or all work offsets available. In all mulli-offset cases, the work offset setting stores the distance/rom the machine zero to the program zero 0/ the each part in the setup.
126
Chapter 18
For example, if there are three parts mounted on the table, each individual part will have its own program zero posilion associated with one work offset G code.
r--,...
G56 X G55X
G54X -
I
i
Figure 18-5 Using multiple work offsets in one setup and one program. Three parts shown in the example,
Compare all possibJe motions in Figure 18-5: G90 GOO G54 xO YO
... will rapid from the current tool position, to the program zero position of theftrst part. G90 GOO GSS XO YO
... will rapid from the current tool position. to the program zero position of the second part. G90 GOO GS6 XO YO
... will rapid from the current tool position, to the program zero position of the third part. Of course, the target position does not have to be part zero (program zero) as shown in the exampJe - nOr1liaJly, the tool will be moved to the first cutting position right away, to save the cycle time. The following program exampJe will illustrate that concept. In the example, a single hole will be spot drilled on each of the three parts to the calculated depth of Z-0.14 (program 01801). Study the simplicity of transition from one work offset to another - there are no cancellations - just a new G code, new work offset. The control will do the rest OlSOl Nl G20
Nt G56 XS.5 Y3.1 NB GBO ZI.0 M09 N9 G9I G54 G2a ZO MOS NlO MOl
(SWITCH TO GS6) (SWITCH TO GS4)
Blocks N3 through N5 relate to the tirst part, within the G54 work offset. The block N6 will spot drill the hole of the second part of the same setup, within the G55 work offset and the block N7 will spot drill the hole of the third part of the same setup, within the G56 work offset. Note the return to the G54 work offset in block N9. Return to the default coordinate system is not required - it is only a suggested good practice when the tool operation is completed, The work offset selection is modal - take care of the transitions between tools from one work offset to another. 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 the current too! position and the same tool position within the next work offset. This is the greatest advantage of using work offsets - an advantage over the position compensation and the position register alternatives. All mounted parts may be identical or different from each other, as long as (hey are in the same positions for the whole setup.
• Z Axis Application So far, there was a conspicuous absence of the Z axis from aU discussions relating to the work offset. That was no accident - it was intentional. Although any selected work offset can apply to the Z axis as well, and with exactly the same logic as for X and Y axes, there is a better way of controlling the Z axis, The method used for Z axis is in the form of G43 and GM commands that relate speci fically to the too/length compensation, more commonly known as the tool length offset. This important subject is discussed separately in the next chapler. In the majority of programming applications, the work offset is used only within the Xy plane. This is a typicaJ control system selling and may be represented by the following setup example of the stored values within the control register: (G54) X-S.76l Y-7.819 ZO (GSS) X-1S.387 Y-14.122 zo (GS6) X-22.733 Y-8.3S2 zo (GS7)
The ZO offset entry is very important in the examples and in the machine control. The specified ZO means that the coordinate setting for the Z amount (representing the height of the part) does not change from one part to another, even if the XY setting does.
N2 G17 G40 GSO
N3 G90 GS4 GOO XS.5 Y3.1 S1000 M03 (G54 USED) N4 G43 ZO.l HOl ~8 NS G99 GB2 RO.l Z-O.14 P100 FB.O N6 G55 X5. 5 Y3. 1 (SWITCH TO GSS)
The only time there is a need to consider Z axis within the work offset setting is in those cases, where the height of each part in the setup is different. So far, only the X Y posi~ 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~_ 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.
~:!'~-:-Dr;c
,...----, - r
,
G56 " _ _ M.
--
G54 ........
.. ................. ""
HORIZONTAL MACHINE APPLICATION Machining several parts in a single setup is done quite frequently on CNC vertical machining centers. The multiple work offset concept is especially useful for CNC horizontal 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 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.
. . . . .,
TABLE Figure 18-6 Setting of work offsets {Dr a variable part height
Figure 18-6 shows some typicaJ and common possibilities used for special parts that have a variable height within the same tool setup. The difference between part heights has to be always known, either from the part drawing specifications or from actual measurements at the machine. If the previous multi-offset example for XY setting are also adapted for the Z axis, the work offset can be set up for parts within the same setup, but with variable heights. This 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 previous example, combined with the 2 values shown in Figure 18-6, the control system settings may look like this: (054) X-S.761 Y-7.819 ZO (GSS) X-lS.387 Y-14.122 Z-O.40S (056) X-22.733 Y-S.3S2 ZO.356
The important thing to know about the control of the Z axis within the selected work offset is that It works in very close conjunction with the tool length offset, discussed in the next chapler (Chapter 19). Stored amount of the Z axis setting within a work offset will be applied to the actual tool motion and used to adjust this malian, according (0 the setting of the tool length offset. An example may help. For instance, if the tool length offset of a particular cutting 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 offset. and -9.644 within the 056 offset - all using the examples in the previous illustration, shown in Figure J8-6.
There is no significant difference in the programming approach - the switch from one work offset to another is programmed exactly the same way as for the vertical machining applications. The only change is that the 2 axis will be retracted (0 a clear position and the table indexing will usually be programmed between the work offset change.
Figure 18-71l1ustrates a typical setting for four faces of a part, where 20 is at the top of each part face. There could be as many faces as there are table indexing positions. In either case, Ihe programming approach would be similar if 20 were at the center of indexing table, which is also quite a common setup application. See Chapter 46 for more details relating to horizontal machining.
8180
~~8~,g -...j
i
0, -
I
t:O
A
1""._ _-""-,""""--,-""-,""""""
80
Figure 18-7 Example of work offsets applied fo a horizontal machining center
128
Chapter 18
EXTERNAL WORK OFFSETS A careful look at a typical work screen display reveals one offset that is identified by one of the following
o 00 o 00
work offsets, as well as any additional will be by the values set in the external offset, based on the setting . all programmable coordinate systems will name for special offset is Work or more often, the External Work Offset.
(EXT)
LATHE APPLICATIONS
(COM)
The two zeros - 00 that this work offset is not one of the standard six G54-G59. offsets are identified by numbers 0 I 06. The designation also implies that this is nol a programmable at least not by using the CNC program~ing . Fanuc Macro B option allow programming thIS The abbreviation EXT means External, the abbreviation COM means Common. machine will have one or the other but not both. a maHer of curiosity, the COM designation is found on older UJ!'!'''I"I-'r\v the EXT designation is more recent. The With computer market, COM abbreviation become facto standard abbreviation for the word communications. Fanuc also supseveral communication methods, including the conwith a personal computer, some time ago, COM designation has replaced with the designation EXT, to prevent possible confusion between the two viations in computing. to the same and has the Either ahhreviation same purpose. On screen this special is usually located before or above for G54. example, as illustrated in Figure 18-8:
Originally, work coordinate ~ystem was designed f~r CNC machining centers only. It did not take to apply It to CNC lathes as well. The operation, logically and physiis identical to that for machining centers. work offsets CNC lathes eliminates awkward use or (;92 and makes the lathe setup operation much and
• Types of Offsets main difference in applying work offsets on a is that seldom will there a need for more than one offset. work offsets are a possibility, three or more are used for some special and complex G54 to commands are available on all modern lathes customary to ignore the work in program, more !han one offset is means the CNC lathe programmer on the G54 setting as a rule. Two special offset features found on the control Wear offsets, on the systems nre (he Geometry same screen dispJay, or on screens, depending on the control model.
• Geometry Offset
01 (G54)
00 (EXT) X Y
t:){tlll/ul/::
0.0000 0.0000 0.0000
of an
feXl'emi~IJ
X -12.5543 Y 7.4462 Z 0.0000
work offset display (EXT ::::: COM)
difference between an or common is that it is not programmable with any particuwork G code. ly set to zero for all axes. Any nOll-zero work offset in a very important way:
Geomerry is the equivalent of a known from milling controls. It rpl"lf"PCf'ntc tool reference poinllo program zero, measured from the zero along a selected Typically, on a bed CNC lathes, with the tool turret above the spindle centerline, the geometry offset both X and Z axes will be negative. Figure /8-9 illustrates reasonable geometry values for a drill, turning tool and bar (TO I , T03).
GEOMETRY OFFSET _. _TIP' _ ...1
No.. X
01 . 02' -8.6470 -9,0720 04 0.0000 05 0.0000
0.0000 0.0469 0.0313 0,0000 0.0000
18·9 Typical data emries for a lathe tool GEOMETRY offset
0 3 2 0
a
WORK OFFSETS
129
• Wear Offset
TOOL SETUP
The wear offset is also known and used on milling controls, but only for the tool length offset and the cutter radius
offset, not for the work coordinate system (work offset). On the CNC lathes, the purpose of the wear ofrsel is identical to that for machining centers. This offset compensates for the tool wear and is also used to make fine adjustments to the geometry offsets. As a rule, once the geometry offset for a given tool is set, lhat setting should be Jeft unchanged. Any adjuslments and fine lunillg of actual pan dimensions should be done by the wear offset only.
WEAR OFFSET No.j X OFFSET. Z OFFSET
01 02 03 04 05
0.0000 -0.0060 0.0000 0.0000 0.0000
0.0000 0.0000 0.0040 0.0000 0.0000
RADIUS TIP _M··t
0.0000 0.0469 0.0313 0.0000 0.0000
0
3 2 0 0
Figure 18- 70 Typical data entries for a lathe tool WEAR offset
Figure J8-10 shows some reasonable sample entries in the wear offset registers. The tool radius and tip number seHings appear in both displays and the display in both screens is automalic after the oifset value input. The tool nose radius and the tool tip orientation number are unique to CNC lathe controls. •
Tool and Offset Numbers
Just like tools on CNC machining centers have numbers, they have numbers on CNC lathes as well. Usually, only one coordinate offset is used, but different tool numbers. Remember, the tool number for a lathe has four digits, for example, 1'0404: o
o
The first two digits select the tool indexing station (turret station) and the geometry offset number. There is no choice here. Tool in station 4, for example, will also use geometry offset number 4. 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.
Depending on the control model and the display screen size. the tool offset register may have a separate screen display (page) for (he geometry and wear offsets, or both offset types may be shown on the same screen display. The work offset values (work coordinates) are always placed in the Geometry offset column.
In the next three illustrations is a very similar layout as that shown in Chapter 16, describing the use of GSO register method (position register command used in the program). Compare the TWO illustrations! The setup of the CNC lathe is identical in both cases, except for the method and purpose of the posicion measuring. All illustrations in the applications also match the reasonable data entered In the too! geometry and the tool wear offset screens of the control. Typical values along the X axis are always negative (as shown in illustrations), lypical values along the Z axis are usually negative. A positive value is also possible, but thaI means the tool is above work and tool changing can be very dangerous. Watch OUf for such situations'! The actual selling procedures are subject of a CNC machine operation training and not practical to cover in a programming handbook. There are additional methods, also part of machine training, that allow faster tool setting, using one tool as a master and setting all the remaining tools relative to the mas/er tool. •
Center line Tools
Tools that work on the spindle center line are tools that have their tool tip located on the center line during machining. This area covers all center drills, spot drills, various drills, reamers, laps, even end mills used for flat bottom holes. At the same time, it disqualifies all boring bars, since their tool tip does not normally lie on the spindle center line during machining. Center line tools are always measured from the center tine of the tool to the center I ine of the spindle along the X axis and from the tool tip to the program zero along the Z axis. Figure 18-11 illustrates a typical setting for center line tools.
TURRET AT TOOL CHANGE POSITION
T01 GEOM (Z)
~
o
~ ~
o
LU (!)
-
,,
--- - --<;
Figure 18-1 7 Typical geometry offset setting for CENTER liNE tools
130
Chapter 18
• Turning Tools
• Boring Tools
Turning tools - or program zero, imaginary tool tip to a negative diameter) and along the Z ative as well. Keep in if the culling tool sen (for turning or boring) is changed from one radius to another radius in the same Lool holder, the setup change marginal, change is enough to cause a scrap, so a good care is For turning, be extra careful for a tool nose thaLchanges from a larger to a smaller for example, from 3/64 (RO.0469) to lJ32 (RO.03l TURRET AT CHANGE POSITION
Figure 18·12 geometry offset setting for EXTERNAL tools
Boring tools - or tools - are measured the imaginary tip to program zero, along the X axis (typically as a diameter) along the Z axis, typically as a value as well. In majority of cases. the X value of a boring tool will that for a turning or other boring operations, same as for turning operations, also be extra for a lool nose that changes from a larger to a smaller It is (he same as a turning 1001. The scrap can be made very easily.
• Command Point and Tool Work Offset various reasons, it is quite common to ting insert in the of work. primarily to favorable CULLing conditions and to keep dimensional tolerances within drawing specifications. Cutting inserts are (0 very high but a certain anee devialion should be expected between inserts obtained 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 rean insert with an that has a tool nose radius. to be by the proper amount. -1~-
··0.0016
0.0016
Figure 18-12
a typical geometry for a turning (external) tool and Figure 18-13 illustrates a typical geometry setting a boring (internal) tool.
RO.0156
RO.0313
TOOL
b I
GEOM (2)
0.0136
0.01
J
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 in the example. ular Figure 18·13 Typica/g8ometry offset setting for INTERNAL tools
for the partic-
TOOL LENGTH OFFSET far. we have looked at two methods of compensation for the actual position of the cutting tool in relation to the machine reference point. One method was the type, position compensation, the other was the contemporary work coordinate system method (work offset). In both cases, the emphasis was only on the X and Y axes, not on the Z axis. Although the Z axis could have been included with method, would not have been very practical. main reason is the nature of CNC work. decides on setup of a part in the fixture appropriate location of XYZ program z.ero (part reference point or part zero). When usIng work offsets, XY axes are always measured from the machine reference point to the zero position. By a The strict definition, the same rule applies (0 the Z is that the measured values will remajor main unchanged for all tools, whether there is one tool used or one hundred tools. That is not the case with the Z The reason?
tool has a different length.
GENERAL PRINCIPLES The length of cutting tool has to be accounted for in every program for a CNC machinIng center. Since (he earliest applications of numerical control, various tech~ niques of programming tool length have They belong into one of two basic groups: o
Actual tool length is known
a
Actual tool length is unknown
out, the rest is hidden in the holder. tool holder is mounted in by means of a standardized tooling Tool designations. such as the common sizes HSK63, HSKlOO, BT40 and are examples of established European Any tool within its category will fit any machine tool designed for that category. This isjust one more precision feature built inlo the CNC machine. length of a tool for the purposes CNC programming must always be associated wilh the tool holder and in relation to machine design. For that purpose, manufacturers build a precision reference position into the spindle, called the gauge line.
• Gauge Une When the 1001 holder with the cutting lool is mounted in the spindle of a CNC machine, own taper is mounted against an opposite taper in the spindle and held in tightly by a pullbar. The precision manufacturing allows for a constant location of the tool holder (any tool holder) in spindle. position is used for reference and is comthe name it is an called the gauge line. line for Figure 19-1.
GAUGE LINE AT MACHINE
« I.L
t
Needless to say, each group requires its own unique programming technique. To understand concept of tool length in CNC programming, it is important to understand length. This length is meaning of the phrase actual known as the physical tool length or just tool length and has a very specific meaning in CNC programming and setup.
• Actual T001 length tool By holding a typical physical length with a measuring drill, we can device. In human terms, a six inch long drill has a length of to the other. In CNC inches, measured from one programming that is still true, but not quite as relevant. A of her cutting 1001 - is normally mounted in a drill - or tool holder and only a portion of the actual tool projects
w
()
W
.
SPINDLE MOTION
.J
co
«
I-;I
Fjgure 19-1
Typical front view
CNC vertical machining center
We use the gauge line for accurate measuring of lOa! length and tool mali on along the Z axis. Gauge is by machine manufacturer is closely related to another precision face, called the machine rabIe, actually, the table top face. The gauge Ii ne is one of a 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 taon which the fixture and part are mounted. Top of the table is precision to flatness and for located In addition, the table is located a certain fixed distance from the gauge line. like the position of tool holder in the spindle cannot be changed, the position of table for a removable table using a palette system) cannot be of the table creates another line and parallel reference plane that is related to the to il as well. This arrangement allows to accurately program a tool motion along the Z The tool length offset (compensation) can be defined:
in CNC The most significant benefit of tool length programmer to design a programming is that it enables complete program. using as many tools as necessary. without actually knowing the actual length of any
TOOL lENGTH OFFSET COMMANDS Fanuc systems and several other machine controls offer three commands relating to the tool length offset - all are G commands:
All three commands are only applicable to the Z Unlike the work offset commands G54-G59, G43 or G44 cannot without a further specification. They can only be used wilh an offset number designated by the dress The address H mUSI be followed by up 10 three digits, on the number of offsets available within the G43
G44
offset
G49
HOD H..
offset cancel Tool
MOS for the current tool: N66 043 Zl.O H04 MUS The resulting motion in the example will be to 1.0 inch above part zero. The control system will calculate the distance to go, based on the value of H offset stored by the operator during setup. /9-2 shows a Lypical screen for the tool length
TOOL OFFSET (LENGTH) No.
GEOMETRY
WEAR
001 002 003 004 005 006
-6.7430 8970 -7.4700 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
Figure 79·2 Typical too/length offset entry screen
set entry. Note that the actual display will vary from one and the wear offset may not be control to on some controls. The wear offset (if available) is only used adjustments to tMllength as a separate screen entry.
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 is described later in this chapter. Many CNC programmers and operators may not reaJize that the Z axis setting in a work offset (054-G59) is vel)' important for the tool offset. The reason why will be clear in the coming descriptions of different methods of 1001 length setting. programming manuals suggest the or G46 commands can also used for tool length offset. Although this is still (rue Loday and may have had some in the early days, il is best to avoid them. First, the position commands are not used very much anymore and, second. they can be used with the X and Y axes and do not truly represent the Z axis
length offset number selection
• Distance-lo-Go in Z Axis Tool length offset should always programmed in the absolute mode G90. A typical program entry will be the 043 or 044 command, followed by the Z axis number: tion and the H N66 G43 Zl.O H04
In order to interpret how the CNC system uses tool length command, the programmer or operator should able 10 calculate distance-fo-go the cutting tool. The logic behind the tool length is simple:
TOOL LENGTH
1
The value of the H offset will be added \0 the target Z position if G43 is used, because G43 is defined as the positive tool length offset
a
o The value of the Hoffset will Z position if G44 is used, negative tool length offset
G43 z-O. 625 H07 .....
054 along Z is set to 0.0500, Z axis target is -0.625 the H07 is -8.28. The distance-to-go calculation uses the same fonnula. but with values:
subtracted from the target G44 is defined as the
Za
cases is the absolute Z target position in COOirQulate in the prognun. Z setting of the (G54-G59), the H value, the Z axis target are all ,_ ....distance-to-go. can accurately calculated. control system will use
Zd :::: Wz +
~
H
e
+H
:::::
..... where:
0 + (+0.1) + (-6.743) o + 0.1 - 6.743 -6.643
In
e
sure the fomru1a is always correct, try to
T
Example Wr = 0.0200:
In this ,,"'..... i}, ....., the program contains
• On-Machine Tool length Setting
G43 Zl. 0 H03 ..... where:
Z is set to 0.0200, Z axis value of H03 is ~
is
= =
(+0.02) + (+1.0) + (-7.41) 0 . 02 + 1.0 - 7.47
"'"
-6.45
the bulk: of on-machine
.0 and the
CNe operator. Typically,
In the last
a negative target IJU"......'-,.u is
e
0.0500:
The program
re-
places a tool spindle and measures the d1S~t.an(~e tool travels from machine zero to part 'Zero (nf',nor~m This work can only done between jobs definItely nonproductive. It can justified under stances, jobbing shops and jobs or for with very few people. Although the number of tools will take longer setting of a than setting a tools, there are setup methods available to the CNe that allow reasonably speedy on-mach ine tool setup, namely using the master tool method, descnbed in this section. The one major benefit of this it does not require additional a skilled person to op.:!ralte
The result is ",.., ...."""l"1t the tool will travel towards the distance-to-go will
Example - Wz
'"'yr.....n_
options require involvement of two people, or at least two professional skills - the CNe programmer and the CNe operator. The question narrows down to who is going to do what when. To be fair, both have to do something. programmer has to •__ ~~, tools their number (the T address) the H adoffset for G43 or dress operator to physically set the register the measured values of H CNC system memory,
distance-lo-go will be
The
and can be used
of a tool used for (consisting of the and the tool holder), can be set directly on the U"\.,~1.J.J.L'" or away from it. These setup options are ofon-machine or off-machine tool length setups. an advantage and it corresponding relationship to the disadvantage. They both share a as it applies to the tool or its proto two setup options are and often cause (or at progrnmsome friendly disagreements) each setup option its advandisadvantages. Which one appears to be will depend on many factors as well.
Example - Wz = 0:
==
-8.855
TOOL lENGTH SETUP
G54 Z is set to lO, Z axis '"''"'"..........'... is 0.1 and HO 1 is set to then the distance-to-go will ~
==
Again., the fonnula works
Distance-to-go along Z axis Work coordinate value position in Z (Z coordinate) of the applied H offset number
G43 ZO.l H01
(+0.05) + (-0. + (-8.28) 0 . 05 - O. 625 - 8 ~ 28
=
any distance-to-go calculation along the Z axis. mentmlg with other settings may be useful.
S' where ...
=
==
-'
contalns a negative Z coordinate:
\
1
Chapter 19
• Off-Machine Tool length Setting In technical terms~ the off-machine requires the work of a skilled tool setter or a CNC operator. Since the seltln o is done away from the machine, a special equipment is req~ired, adding to overall cost of manufacturing. This equipment can a simple fixture with a height gage (even made or a more expensive, commercially available digital display device.
• Tool Length Offset Value Register Whichever method the tool length setting is used, it U\JI., ....... '" a value that represents the length the selected lOol. This value is by and must be somehow supplied to the program, before the job is machined. The must register meusured value into the system, the heading on the control panel.
The figure a common setup a CNC vertical machining center, looking from the front of the machine, a typical operator's viewpoint. column is located a1 machine zero position. This limit switch tion positive Z axis travel and is necessary for the autotool change on vil1ually all machining centers. All four illustrated dimensions are either known, can found in various instruction or service manuals, or can be physically They are always considered as known or dimensions and used as critical for uceurate machine Distance between the tool gauge line and
Q
the tool cutting point
... dimension A in the illustration Distance between the tool cutting point and the ZO
Q
(program zero of the part)
The control syslem contains a special registry for the tool usually under of tool setlength o.{fset, toollenglh compensation
off
of the exact heading, the sellmg procedure measured length is entered into Ihe control, so it can by the program. The is always well within Z aXIs travel limits of the machine. yet still allows for clearances for the part and the tool Chan2,f:S. To the tool length offset, try to fully stand theZ motion geometry orthe machine first. On vertical and horizontal machining centers, look at 1he XZ plane, which is the top part for both. The will be on the pies are identical, but chining center layout.
Z AXIS RELATIONSHIPS To understand the general principles of tool length let's look at the schematic illustration of a typical a vertical machining center - Figure
'i
1-
r
LINE MACHINE ZERO
A
0
I
B
for
'" dimension B in the illustration of the part (distance between the table and ZO of part)
Q
... dimension C in fhe iJlustration Q
Total of all three previous dimensions (distance between the tool gauge line and the table top}
... dimension Din the illustration It is rather rare that the programmer or the operator would always know all four dimensions. Even If that were possible, some calculations would not be worthwhile The reality is that only some dimensions are known or can be found out relatively easily. In the illustration, the dimension D is known, cause it is distance determined by the machme manufacturer. It not possible to know the C (height of part with clearances), but with planning common setup, this dimension can be known as well. That leaves A - the between the (001 gauge line and the tool cutting point. There is no ~ther method to find this dimension, but to actually measure It. In earller of numerical control, this A had to always known embedded in the program. D<;;;""a'J""" of the inconvenIences involved in finding this dimension, Olher methods have later. Today, three methods are considered in programming length setup, including the original method: Preset tool method is the original method
Q
... it is based on an external tool setting device Touch-off method is the most common method
Q
"-..Y'
Figure 19-3 Z axis relationships of the machine, cutting tool, table top and the height
o
it is
on the measurement at the ma,r.mfle
Master tool method is the most efficient method
... it is based
to the length of the longest tool
OFFSET
TOOL
1
benefits. The CNC programmer conand chooses one method over these methods and operations do not process directly - they are methsetup on the machine only. For proper unsubject CNC programmers, they DIe of which setting method t",...,,,,v,,,, to the selected setting in the a comment or message .
the tool length measurement "" ..",,..,,,,,0" cutting tip of the Lool to the gauge line is accudetermined - Figure 19-4. Preset tools will the by already mounted in a tool holder, number of the tool and with the list of measured to do, is to set retool lengths. All the CNC operator tools into the magazine and register each tool length offset register, using the proper offset number.
• 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 durapplies to horizontal machining ing setup. Another to the center of centers, where zero is the rotary or table. are disadvantages as well. tool length external
04
05 06
8.5000
.. T001 length by Touch Off cutting are set at the exmachine runs a production machine when jobs do
IS no change. All the operator values into the offset setup can be done tional G I 0 command
is to enter the measured that portion of the by using the op-
This melhod also a person responsible number of small and for presetting the cutting tools, A medium users with vertical laClnmln~ centers cannot afford the additional of the culting tools during the part Ihe louch-off when method. This method may IS small job runs are machined. scribed in the next secnon.
The tool length that uses the touch-off method is very common, jn spite some loss during setup. As the illustration in Figure each tool is assigned an H number (similar to example), called the tool length offset number:
GAUGE UNE-
GAUGE
UNE- Figure 19·5
Touch-off method of the too/length offset
T___- - -, PART
19-4
Tool len pleset away from the machine WOlk at (G54-G59) must be used
is to machine zero poThis distance corresponding H menu of the system, The important notion is that the Z axis settings for any work offset and the common offset are normally set to ZO.oooo.
•
Using a Master Tool length
Using the touch-off method to measure tool length can be a significantly speeded up by using a special method 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 norcontain 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 with setting of
the master tool and place it in the spindle.
2. lero the l axis and make sure the read-out on the relative screen is lO.OOO or lO.OOOO. 3. Measure the tool length the master tool, using the touch-off method described previously. After touching the measured the tool in that position!
The greatest benefit of this seuing method is shortened setup If certain tools are for of jobs, only the length of the master tool needs to be redefined for any new pan height while all other tools unchanged. 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 offset or one of the G54-G59 work offsets under the 1 setting! It will be 8 negative value,
5. While the master set the relative l
is touching the measured face, read-out to zero!
'6, Measure every other tool, using the touch-off method. The will be from machine zero.
master tool tip,
not from
7. Enter the measured under the H number, in the tool length offset screen. It will always be a negative value for any tool shorter than the master tool.
e Note:
•
643-G44 Difference
Initial a.t the beginning of chapter indicates that Fanuc and similar CNC systems offer two commands that activate the tool offset. two are and G44. Most programmers use G43 command exclusively in the program and may have some I.Hlliculty to interpret the meaning of G44 command, they have never used it. is a good reason why G44 IS a dormant command - not quite dead but would to know how barely breathing. and when - or even to use one over the other. is an 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 are - all are quoted literally and all typical are correct:
Choosing tool as master tool, the procedure is logically same, except (he H offset entries will be positive for any tool that is than the master and they will neRative any tool is shorter master. In rare case where the measured tool will have exactly the offset entry for that tool same length as master too), will be zero. Illustration in 19-6 shows the concept of master tool setting. Arter master tool into axis of work offset, enter distance the tool new tool to the tool tip of the master tool, and in appropriate H offset If the tool is an actual tool, rather a plain used for H offset value must be always set to 0.0.
G43
Plus offset
G44
Minus offset
G43 G44
Tool length offset Tool offset ~:I""_"""
G43 G44
Minus direction
Plus direction
These definitions are correct only if within the context their meaning into consideration, That context is not clear from of these Plus to where? of what? (he context, think about use of the toollenglh on a CNC machine. What is the purpose of the tool length
LENGTH
1
main and most important purpose of any tool length is to allow a CNC program to be away from the machine, away from tooling and fix\uring, and without knowing the cutting tool length prodevelopment. process has two - one is in the at the machine. program, either together with or 044 command is the programmer. Al number - that lS done tool length offset can be set on or off the is measured and ther way. the tool is entered into control - that is the job the operalor. It is the machine that has a number of variations of only two G
LINE
exactly the same not the tool length ming method). Program will command (043 or 044), followed by the target position along the Z axis and the H number: 043 Z1.0 H06
or
044 Zl.O H06
The system cannot any benefits, until the offset registers. measured value for H06 is if the H06 has been as 7.6385, it will as a negative value, is used, and as a positive value, ifG44 is used (1001 motions will be identical): G43 Zl.O H06 .....• H06 = 7.6385 G44 Zl.O H06 ...... H06 +7.6385
{hat the
It is
actual Z axis is culated. USing G43, the H value will be added (+) in the calculation. Using 044, the H offset value will The a~avel motion will be: "'/U"bn (-).
043: 044:
Figure 19-7 Less common method of Work offset (typically
Z + H06 Z - H06 :
+ (-7.6385) :::: -6.6385 (1.0) - (+7.6385) = -6.6385
(1.0)
(oollenglh machine with negative (touch-off) will result in The selup process can automatically input all the offset as negative. That is reason why 043 is the standard command to program tool length offset. G44 is just flOt practical for everyday work.
the tool length offset must be set as well.
Figure 19-7 illustrates one of two ITlF'.r"v" to sel a length command - 054 or other work must be used. GAUGE LINE
f
PROGRAMMING fORMATS Programming format for 1001 length is very and has been illustrated many times. the following examples 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 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 More common method of using the tool length offset. No work offset setting is required and 643 is the preferred choice.
illustrates the other, and much more comIn this case, all work offset com.!lli!nds will normally have a Z value set to 0.0.
In the early days of programming, tool length offset and work were not available. G92 position register command was G the current tool position. programmer had to every mension specifled by the machine manufacturer and dimension of (he job specifically ZfJ to the tool distance
138
Chapter 19
--i""iII----
G45X.. H31 _ _ _--'.!., Block N3
......I - -_ _
G45X .. H31 _ _ _~..;., 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
This early program reqUIred the position compensation in XY axes and the position register command G45 or command G92 in XYZ axes. Each must start at machine zero - Figure 19-9: 01901 G20 (meR MODE SEL.ECI'ED) N2 G92 XO YO ZO (MAonNE ZERO POSITION) N3 a90 GOO G4S Xl.4 H31 (X POSITION COMP) N4 G45 Y2. B H32 (Y POSITION COMP)
m
N5 a92 X3. 4 Y2. 8 No G92 Z9. 0 N7 S850 MOl N8 GOl ZO.l F1S.0 M08 N9 Z-O.89 F7.0 GOO ZO.l M09 Nll Z9. 0
mo
(TOOL pas REGISTER (TOOL POS REGISTER Z) (SPINDLE COMMANDS) (Z APPROACH MOTION) (Z CUTTING MOTION) RAPID "-"' .• ......,.'" (Ml\.CHDl'E ZIi:RO RBTORN z)
Nl2 X-.2 • 0 Yl0. 0
N13 M30 %
POSITION (END OF PROGRAM)
• T001 length Offset and G92 When the tool length became available, programming became The position compensation G45JG46 was SliH in use at the and had (0 be set for both X Y axes. However, G92 setting for the Z axis was replaced by or 044 command, with an assi~led H offset number - Figure 10. Today, this method position tian G45/G46 tool offset G43JG44 is obsolete, or alleast quile old-fa<;hionecL Only (he in programming, with the position.
Setting tool length with G43 tZl and G92 (XYj • mnr''''ITn
In an improved program. the tool plied 10 Ihe firs! mOl ion command of
IS
01902 Nl G20 (INCH MODE SE:'.LECTED) N2 G92 XO YO ZO (MACHINE ZERO POSITION) N3 G90 GOO G45 JO.4 101 (x POSITION COMP)
N4 G45 Y2.8 832 N5 G92 X3. 4 Y2. 8
(Y POSITION COMP) (TOOL POSITION R.:IOOIIS~rER
N6 G43 Zl.0 HOI
LENGTH COMP Z)
N7 S850 MO)
CClMMANDS)
N8 GOI ZO.l F1S.0 MOS N9 Z-O.89 F7.0 NlO GOO ZO.l M09
Nll G28 X3. 4 Y2. 8 Zl.O N12 G49 DOO HOO
(Z APPROACH MOTION) (Z CUTTING MOTION) RAPID RETRACT) (MAC.HJliIB ZERO R.E'I'lJlm)
(OFFSETS
CANCELLATI~
(END OF PROGRAM)
Nl3 M3 0
%
When a program is developed using blocks N6 and N7 can be joined together for convenience. if N6 G43 Zl.0 S850 MOl HOI NI
method has no effect on the tool length offset, only on the moment at which the spindle starts rotating. Position and the 1001 length cannot programmed in the same block. Note that
position compensation is still in effect in due to the lack work coordinate of
139
• Tool length Offset and G54-G59 most programming has many and functions available and G54-G59 series is one The has been replaced with work offset sysand, optionally, more. Normally, 092 is not same program that contains any work offset sethrough 059 or the extended series. example of using the tool length work environment:
.... rr..."."fTI
01903
N1 G20 N2 G90 GOO G54 Xl.4 Y2.S N3 G43 Zl.0 H01 N4
saso M03
N5 G01 ZO.l F15.0 Moa N6 Z-0.89 F7.0 N7 GOO ZO.l M09 N8 G28 Xl.4 Y2.S Zl.0 N9 G49 DOD HOO NlO M30 %
(meR MODE "''''''"....'''' ..........
(XY TARGET LOCATION) (TOOL LENGTH COMP Z) (SPINDLE caaM1iNDS) (Z APPROACH MO'lr:r:Ol~l (Z ClJI'TmG MOTION) (z RAPID (MACHINE ZERO (OFFSETS crua:LLl~TION) (END OF Iff.N..NIU!<.to.W}
• Tool length Offset and Multiple Tools of CNC programs include more than one most jobs will require many different tools. (independent of the previous drawings) enters a common method how the three tools. holes need to spot-drilled, drilled and tapped. or explanation of the is not . just concentrate on now It is the program structure that is note is no change in the program structure tool, only in the programmed 01904 Nl G20 N2 G17 G40 GBO TOl N3 M06
N4 G90 GOO G54 Xl.O Yl.5 S1800 MOl T02 NS G43 ZO.S HOl MOB (TOOL LG OFFSET FOR N6 G99 G82 RO.l Z-O.145 P200 FS.O N7 X2.0 Y2.S N8 Xl.O Yl.5 N9 GSO
zo.s
M09
NlO G2B ZO.S MOS Nl1 MOl
G54X .. Block N2 X3.4
N12 Nl3 Nl4 Nl5 Nl6 Nl? Nl8 Nl9 N20 N2l
GAUGE LlNE
N22 N23 N24 N2S
T02 M06 G90 GOO G54 Xl.O Yl.5 S1600 Mal TOl G43 ZO.S H02 MOB LG OFFSET FOR T02) G99 G81 RO.l Z-O.89 F7.0 JU.O Y2. 5 Xl-O Yl. S GSO ZO.S M09 G28 ZO.S M05 MOl T03 M06
G90 GOO GS4 Xl.a Yl.5 S740 MOl TOl MOB (TOOL LG OFFSET FOR T03) Z-l.O F37.0 X2. 0 Y2. S Xl.O Yl.S GBO Zl.O M09 G2B Zl.O 14'05 M30
G43 Zl.O H03 N26 G99 GB4 RQ.S
N27 N28 N29
mo
N31
% Figure 19-11 Setting too/length with 643 (Zl and 1.:1'!)~f-U~" (XY) • program 01903
In this example. Figure 19through 059, (he blocks N2, N3 gether without a problem, N2 G90
work offsets G54 can be joined toup processing:
GOO G54 G43 Xl.4 Y2.B Zl.0 S850 M3 HOl
N3 ...
The command will affect only the Z
axes, 043 with HO I must move in the clear.
Also note that is no tool offset cancellation. 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 offset H02, I , Tool 2 (T02) with tool the tool some special may to be the same tooL In two or more tool length applications, there for one tool.
. 0.1 L C !
007
H07 H27 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). Figure 19· 13
- 4.0
of two length offsets for a single tool. The dIftS"8ni~8 between H07 and H27 offsets is the widih of slot (.125
r
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 /
007 is mill width.
,H.,,VH.
cutter radius offset, and .125 is the un.., .....' ...
~- 1213.5
,.
•"",,, . . methods of programming can calculating the difference manually, multiple tool length offsets is Lo allow fine groove width example - program
for exammethod usduring maIt is shown
I
01905 (TWO TOOL LENGTH OFFSETS FOR ONE TOOL)
Figure 19·12 Example of programming more than one tool length offset for a single tool· program 01905
Based on the illustration, we to decide on the l..UlIllIl)t:. method flISl (premachiril~g the 03.000 hole is assumed). A .125 wide slot mill will be a good choice to file the circle, milling method for a fuJI (see Chapter 29). program can be shortened by subprogram method Chapter 39). Because the groove width is caner, more than one cut is needed - two in the first cut, the tool is lioned at the per drawing) and first cut at the bottom groove. The bottom tool will depth. For the <>"'....'v.. u cut, the top edge of the slotting mill is and the tool profile for the second groove first groove) at the depth of ally, it will (again. as
Nl G20 N2 G17 G40 G80 N3 G90 GOO G54 XO YO S600 M03 JOB CY...EARANCE) N4 G43 Zl.0 HO? MOS ~~~ EDGE - BOTTOM) NS G01 Z-0.65 F20.0 N6 M98 P7000 """""""""'"IY"I GROOVE AT Z- 0.65) EDGE - TOP) N7 G43 Z-O.43 827 NS M98 P7000 GROOVE AT Z-O.43) N9 GOO Zl. 0 Ma9 NlO G28 Zl.O MOS Nll M30 % 07000 (SUBPROORAM FOR GROOVE IN 0190
Nl G01 041 XO.875 Y-O.B75 D07 F1S.0 N2 G03 Xl.75 YO RO.S75 FlO.O N3 I-1. 7S N4 XO.875 YO.a7S RO.875 F1S.O N5 G01 G40 XO YO N6 M99 %
TOOL LENGTH
1 R1.750
f4-
G54Z(NEGATIVE)-
..
G43H .. N3 N2
( Figure 19·14 Full circle milling - subprogram 07000. Start and finish of cutting is at the center of the groove.
H07 is used botmill and H27 is the ~,~ ..'''' ... mill. D07 is for cutter radius only. Figure 14 shows the tool motions in subprogram 07000.
Figure 19-16 Typical tool length offset setting fOf a Program zero is at the face 0/ the
tool.
example, tool tom reference edge of the
The two illustrations show typIcal setup of the tool length offset for preseltools on a horizontal machining zero at the cen ter cen (er. Fig lire ) 9- J5 shows the of the table. 19-16 shows program zero at the face of the
HORIZONTAL MACHINE APPLICATION
TOOL lENGTH OFFSET CANCEL
were aimed towards a cenler. Although the logic of applies equally to any machining center, reof the Z axis orientation, there are some noticeable in (he practical applications on horizontal macenters (Chapter 46). A machining cenler allows programming of a lool on several faces of each has a different distance from the tool (along the Z axis), the for each It is common to tool work different tool face.
In programming. a well organized approach is always important. That means, a program that is turned on when should also be turned not needed anymore. Tool length offset commands are no exception. cancellation The tool program. There is a special preparatory available lha( cancels method of the 1001 length offset, command to Ihe 1001 length either G43 or offset in the program (or via MDl) is G49:
One method of a single block -
G54Z(N
ison returning to the
zerom
Z .. 10
Nl76 G49 Nl77 G91 G28 ZO
',:
A
method
the offset
N53 G9l G28 ZO HOD
Figure 19-15 offset setting lor a (he center of the
tool.
In this case, the is coupled with an H offset number zero - Hoo. Note, Ihere is no G49 in the block for and HOG does the job of cancellation. There is no Hoo on the control. It means cancellation tool length offset. .
142 A program command
safety line
Chapter 19
also be started with the length offset (under program contra!), usually In the block or initial
The is simple programmer take advantage of this rule and does not need to specifically the tool if the machi ne returns to the tool change posilength is all with an automatic examples This approach is illustrated in eluded in this handbook.
N1 G20 G17 040 GSO 049
.. , or a variaf;on of the same block: N1 G20 N2 G17 040 Gao 049
is one more way to tlot program it at all.
the tool
rule is quite explicit - any 028 or 030 com{both execute the tool return to the will cancel the tool length automatically. The
offset -do
A strange suggestion, perhaps, but founded. command at examples in this handbook do not use Why What happens at the end of each tool?
Anyone of the methods will that active tool will canceled. may be some differlength manufacturers and consulting ences between ma:crlme manual will be the approach.
RAPID POSITIONING • GOO Command
A CNC machine tool does not chips. From the moment the in a program. it goes through a (lons - some are productive (cutting), (positioning).
""I"'I,p...,/
Positioning motions are necessary but nonproductive. Unfortunately, these motions cannol be eliminated to be managed as efficiently as For this the CNC system provides a called the traverse motion. Its main objective is to shorten the time between operations. where tool is not in contact with Rapid motion operations usually involve four motion: Q
From the tool change position towards
Q
From the part towards the tool
o
Motions to bypass obstacles
Q
Motions between different positions on the part
part
Preparatory command is required in CNC program to initiate the Peed rate function P is not required if programmed, will be ignored during the GOO Such a feed rate will be effective beginning with the first occurrence of any motion (G01. G02, G03, etc.), unless 11 new P function is cutting motion:
o
Example A:
N21 GOO X24.5 F30.0 N22 Y12.0 N23 GOl X30.0
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 mawithin the travel limits common rapid rate CNC machines IS about 450 in/min (I 1430 modem offer a rapid motion up to ! (38100 even more, particularly machines. The rale rapid molion manufacturer determines of the machine axes. motion rate can be the same for each axis or it can be A different rapid rate is usually assigned to the Z axis, while the X and Y axes have the same rapid motion rate. Rapid molion can as a single axis motion. or as a compound motion of (wo or more axes simultaneously. It can be programmed in the absolute or incremental mode of dimensioning 11 can used whether the IS rotating or stationary. During program execution, operator interrupt the rapid motion pressing the on the control panel, or even set~ ting the feedrate switch to zero or a rate. Another kind rate control can be achieved by dry nm function, during setup.
o
B:
N21 GOO X24.5 FlO.O N22 Y12.0 N23 G01 X30.0 F20.0
N21, the GOO command mains in until it is canceled same group. In the example N23
The rapid traverse motion is
modal and reanother command of the GOl command in changes the feed rate is reproat block N23. used. It is in
current units traveled ill one minute
in in/min or mmlmin). The maximum rate is set by the machine manufacturer, never by the control or the program. A typical limit set by the machine is a rate between 300 and 1500 in/min (7620 and [00 mm/min), and even Since motion per is independent of the spindJe rotation, it can be applied at regardless of the last spindle rotation function M04. M05).
143
144 Depending on the machine design, motion rale can be the same for a[l axes, or each axis can have its maximum rapId rates for a typical 1181 inlmin (30000 mrnlmin) for in/min (24000 mm/min) lathe, the rates are somewhat for example I in/min (5000 mm/min) the X and 394 in/min (10000 mm/min) the Z The rapid rates can be for modern
Every motion in the GOO mode is a, rapid non-circular motion cannot normally be made at the actual linear mOlion of the tool between two points is not ne(:es~;an the path in the form of a Programmed tool and the resulting actual will be different, on several factors: o
The number of axes programmed simultaneously
o
The actual
o
The rapid traverse rate of each axis
• Single Axis Motion Any motion programmed specifically for only one at a time is always a straight line along the selected In words, motion that is parallel to one available axes, must progTammed In a rale block, The resulting is equivalent 10 distance between start and end - Figure 20-1.
Since the of the rapid is saving the unproductive (motion from the current tool position to the targellool the tool path is irrelevant to the shape of parl. Always aware of the actual rapid motion (001 path for reasons safelY, particulnrly when lWO or more axes are at the same No must in the way of the tool 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 included) occurs without any obstacles in its way.
"--
examples of physical obstacles that can intool motion are:
o FOR MACHINING CENTERS:
o
cycles G81 to 089,073, G74 During a rapid motion, the tool path is much less predictable than during cutting motions. Keep in mind that only purpose of rapid from one part to another location motion is to fast - but not necessarily straight.
of motion for each axis
Clamps,
fixtures, rotary or
machine
part itself, etc.
on a lathe),
during rapid motions GOO,
In to bypass obstacles still assure a safe motion in the program at all limes. let's (ake a closer look at (he options while a rapid
RAPID MOTION TOOL PATH
Some terfere
lions in towards a
table.
FOR LA THES : Tailstock quill and body, chuck, steadyrest, face plate, fix1ure, other tool, part itself, etc.
x
POSITIVE
1 ! e
e
X axis NEGATIVE
y
N
POSITION Single axis motion for a ma,r:mllina center application (XY shown)
Several consecutive program blocks. each containing to only a single axis motion, can be included in the obstacles to machining. This method programis preferable in cases where only the exact or approximate position of (such as or fixtures) is known during program preparation.
• Multiaxis Motion We have already that the cuning tool is moved at a rapid rale using the GOO command. If this molion is a motion of two or more axes simultaneously, the programmed path the rapid palh of the tool are not always the same. resulting compound motion can be from theoretical proand often is grammed motion
RAPID POSITIONING
145
In theory, two axes is equivalent to a straight diagonal motion. real mOlion, however, may diagonal tool path at all. Consider in Figure 20-2.
'8-
-------..,....:
9.452
o
both axes, quired to the ._ .. ,"' __ _ position. After target position ! .02 seconds left to The target must be rcacm~a continues along to reach the final
Another example, Figure 20-2, different for
coordinates in with the rapid rate
11.812 0.91
1...-_ _ _ _ _ _ _ _ _ _ _ _.:.../ _ _ _ _--1
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 IIlOtool has to travel 9.452 inches along (he X along the Y axis.
If
PROGRAMMED MOTION ACTUAL MOTION
rate for both axes is the same (XY rapid mosuch as 394 in/min, il will take
rates usually
(9.452 x 60) / 394
x ::: 394 in/m in Y::: 315 in/min
= 1.44 seconds
to complete the X axis motion - but only (2.753 x 60) / 394 = 0.42 seconds
is required to complete (he Y axis motion. Since motion is not completed until both axes reach (he end point, it . that the actual tool path will be different from tool path. 1-0.425
1.025
.-,-
.-, . .-
deviation· different rapid rate for each axis
not so common example, the X axis rate is set to (10000 mm/min) and tbe Y axis rate is set to (8000 mm/min). It will than take (9.452 x 60) / 394
x
y
Figure 20-3 Rapid motion deviation - same rapid rate for each axes
Figure 20-3 shows a combination of an a straight motion as the actual tool path. at the rate of 394 in/min (10000 mm/min) simultaneously in
seconds
to complete the X axis motion - but only .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
MOTION ACTUAL MOTION
= 1.44
= 3.448
inches
but the Y axis motion will be only
.525 / 60 x 315 = 2.753 inches
resulting motion is at 38.605" and a slight rounding applied. The actual departure angle is not always to be known, but it helps to calculate it for rapid some very tight areas of the part. It only trigonometric to make sure of path, the rate is known.
Chapter 20 """"<~""""<----~~~««««««<
Both of above examples illustrate an angular motion along two axes, followed by a straight single axis motion in the remaining graphical expression of motions is a bent resembling a hockey stick or a dog leg which are also very common terms applied to a Calculation of the actua! motion shape, as we done is only seldom Taking some prewithcautions, the rapid motion can be out any calculations. If no is within the work area imaginary rectangle by the diagonally posiis no danger of collision tioned slar! and end point), to the diverted rapid tool path. On CNC milling sysrectangly"of tems, the third axis can also used. 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.
This consideration is more important In turning appJ lions than in . due to the nature of programming for (wo In turning, approach motion may be first, to avoid a collision with the tailstock, and then along the X The reverse motion axis first, then along Z axis moshould along tion, in order to the same safety when returnto the tool A typical application of this programming technique may be useful after using a machining (such as turning. the starting facing, elc.), also its point.
• 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 rales all axes are identical Such an occurrence is rare, although not impossible. Some manufactur~ ers provide this feature as a standard and machining center does should know situation the resulting feature or not. is a straight angle, is when the rapid rating for each axis, but the required length of motion just 'falls' into the that results in a straight angular ml'llflf'ln Both of these occurrences are rare or less a case of good luck) in actual programming will seldom happen. To be on safe side, never take any chances - it is always more practical to program the rapid motion without the accalculation the tool path but with safety as a primary consideration.
Figure 20-5 Typical of a reversed rapid motion on a eNC lathe, used to bypass for example, a tai/stock
As Figure than programming a motion fTOm the turret to the cutting position be fTOm point A to point the tool motion (which was spliL approach towards the will be in the order of A to B Lo C, at a rate. point C to poillt D, the cutting takes When cutting is completed, will rapid the reverse order, back to the Rapid motion will from D to C (0 B to A. a necessary precaution to bypass a potential obstacle, for example, the tllilstock.
TYPE OF MOTION & TIME COMPARISON
• Reverse Rapid Motion Any rapid motion must be considered in terms of approach towards a and the return to the tool changing position. is the way a cutting is normally programmed - we start at a certain position and then return cUlling activity for the tool is completed. It there, when is not a mandatory method, but it is an organized method, it is consislent, and it makes programming much
lechnique of programming each separately in individual blocks of the program, is recommended only for the possible during {he (001 path strictly This method of programming requires a Slightly longer cycle than the simultaneous multiaxis rapid motion. To the cona three motion, as a typical tool proach in milling.
a rapid molion an actual the 1001 position. a rapid is required to position,
As an example, the rapid rate is at 394 in/min (10000 mmJmin) for each The motion takes place between the coordinate of X2.36 YO.787 ZO.2 (slart poinL) XI1.812 ZI.O(endpoint).
So
we have
cut, starting from the tool cutting .
return
RAPID POSITIONING
The required lime for easily calculated: I:l
X
along each
time:
«11.812 - 2.36) x 60) / 394 I:l
1.440 sec.
Y axis time: «3.54 - .7B7) x 60) / 394
I:l
can
~
0.420 sec.
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.
If all three axes are simultaneously, the total for positioning is 1.44 "...'-,...1,,1..1<>. which is the longest time required any to reach end point. The program U be: GOO X11.812 Y3.S4 Zl.0
actual production, after the program been and optimized the tool performance productivity, the override switch should be set to the ! 00% pointer, to shorten the cycle
this motion were to be into program blocks, the total time would be vidual added together:
RAPID MOTION FORMULAS
1.44 + 0.42 + 0.121 = 1.991 seconds
which is about 37.5% longer. percentage will vary, depending on the rapid motion rale and rapid travel length, measured each machine The program blocks will be written separately: GOO Xl1.812 Y3.54 Zl.O
The configuration of rapid override switch varies tween machines from On some machines, rapid motion may stopped altogether, on others, the tool will move at the slowest percentage and cannot stopped the override switch alone.
calculations relating to the rapid tool motion can be expressed as used quickJy at any time by stituting the known parameters. Relationships between the rapid traverse ra1e, length the motion and the elapsed time can be in the following three formulas:
\
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 selectable positions, depending on the machine brand and the type of control - Figure The second, third and fourth positions on the rapid motion override are as oj the acrapid rate - 25%, 50%,100% respectively. are set by the machine manufacturer. first setting, typically identified by FO (or FI) is a motion rate set through a control system parameter. FO (FI) setting should always be Slower than any other setting, typically than lowest setting of25%.
T == Required time in seconds R == Rapid traverse rate per minute for the selected axis - in/min or mm/min L = Length of motion - inches or mm
applied to the formulas must always be within the selected system of measurement in the program. Inches and inches per minute (in/min) must used with (he English Millimeters millimeters per minute (mmlmin) must be in the system. any calculation relatmg to rapid traverse time, the measuring units cannot be
1
Chapter 20
APPROACH TO THE PART
it might be a reasonable compromise to split motion into two separate motions:
20-5 had an illustration to a CNC lathe. For CNC of part approach should be with equal care. in mind that the general motion have (0 be considered for any machine. at a rapid rate, the cycle time can by keeping the part clearances to minimum. Let's have a look at some po-
NJ14 NJ15 NGl6 N317
first to a much more comfortable position 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"""" not productive, a relatively heavy As may be expected in is a was slightly increased, at the has been given an opportuoverride switch for testing the first in a block mode). Once the prodebugged, the heavy feedrale in the will speed up the operation and at the an extra safety clearance. The program motion can always be optimized not be the besl approach for repetitive is always 'new' for any repctition at a it be very useful when thousands, for example).
N314 G90 G54 GO 0 X10. 0 Y8. 0 S1200 M03 N31S G43 ZO.OS Hal
NG16 GOl Z-l.S F12.0 a melhoel of "'r"r,<1-Y,n"'L
set and part as it should he. allows very little On the other hand, an inmay not quite comfortable particularly during the early operator's convenience is considered to the overall productiv-
(
,
G90 GS4 GOO XlO.O YS.O 51200 M03 G43 ZO.S HOI GOl ZO.05 FIOO.O Z-l.S F12.0
In this method, the rapid motion has
In the following example, an approach to the part is made along the Z with a clearance of .05 inches (1.27 mm) in block N315:
\
Zaxis
MACHINE ZERO RETURN a control system to return a cutting tool to machine position is a all modern CNC systems. Programmers term mLlchine reference posiwith home posi(ion or machine is the position all machine slides at extreme limits of each axis. The exact posiby the machine manufacturer and is not h'.lrH'rt'>rI during the machine working life. Return is automatic, on request from the control or via the program. LlV~"""''-'H
Z:::: UP (TOP)
I XV:;;;
RIGHT
i y-
WORK
,,~
MACHINE REfERENCE POSITION rpt,3r?lnrp position is for referIn order the CNC machine is accuwe need more than just the high quality components, some unique location (hat can be considered the point of machine - a zero position - a home tion. Machine position is exactly such a
21·1 Machine zero of a CNC vert}
to the Z axis in the description was machine zero position for a The Z center is always where the Automatic place. This is a built-in location, distance from the machine table and most machines, the standard machine centers is at the extreme travel in the positive direction, There are excepexpected,
t",r,""'/""'"
Machine zero is a fixed position on a CNC machine that can reached repeatedly, on request, through the control panel, MOL or program code execution,
•
Machining Centers
Although the design of CNC machining centers models, there are only four possible locations for zero, within the XY view: o
Lower left corner of the machine
o
Upper left corner of the machine
o
lower right corner of the machine
o
comer ot the machine
i
MACHINE ZERO POSITION
The most common and standard machine r",t''',,''''nr.,. tion for vertical machining centers is at ner of the machine, looking XY plane - Figure 21-1.
~j
<'
Z:::: UP (TOP)
Z-
- X + .........
XV '" UPPER LEFT
I~
y- ' ~ ! WORKAREA
It is a new from also necessary to make a lion and return there pleted. So. several of the convenient for setup of the part on removal when the machining is
n located at the upper right XY comer ma,cnlflma center
,
Figure 21-2
Machine lero position located at the upper left XY comer CNC vertical machining center
21-2 illustrates. someCNC vertical machining the machine zero position at the upper left corXY plane.
1
150
Chapter 21
In both illustrations, the arrows indicate the tool motion direction towards the work area. Moving the tool from machine zero into the opposite direction will result in a condition known as overtravel - compare the two possibilities: o
Tool motion from machine zero, if machine zero is located at the upper right corner:
x + Y+ Z+
... tool motion will overtravel
o Tool motion from machine zero, if machine zero is located at the upper left corner:
x- y+ Z+
... tool motion will overtravel
The other two comers (lower left and lower right of the XY view) are not used as machine zero.
o
Tool motion from machine zero of a typicalrear lathe:
x+ Z+
... tool motion. will overtravel
• Setting the Machine Axes From the previous sections, remember that there is a direet relationship between the CNC machine, the cutting tool and the part itself. The work reference point (program zero or part zero) is always determined by the CNC programmer, the tool reference point is determined by the tool length at the cutting edge. also by the programmer. Only the machine reference point (home position) is determined by the manufacturer of the machine and is located 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 machining centers. An easy access by the CNC operator 10 the mounted part is the main detennining factor. Both, the X and the Z axes have their machine reference position at the furthest distance from the rotating part, which means away from the headstock area, consisting of the chuck, collet, face plate, etc. For the X axis. the machine zero reference position is always at the extreme limit of the travel away from the spindle center line. For the Z axis. the machine reference position is always at the extreme travel away from the machine headstock. In both cases, it normally means a positive direction towards the machine zero, the same as for the machining centers. The illustration in Figure 21-3 shows a machine zero for a typical CNC lathe.
In order to physically reach the machine reference position (home) and set the machine axes, for example, during the parlor fixture setup, there are three methods available to the CNC operator: o
The machine operator will use the XYZ (machining centers) or the XZ (lathes) switches or buttons available for that purpose. One or more machine axes can be activated Simultaneously, depending on the control unit.
o
I
X-
l figure 21-3 Machine zero position for a typical eNC lathe (rear type)
In the illustration. the arrows indicate the lool motion direction towards the work area. Moving the tool from the machine zero into the opposite direction will result in overtravel in the particular axis:
Using the MDt- Manual Data Input mode This method also uses the control panel. tn this case, the machine operator sets the MOl mode and actually programs the tool motion, using the suitable program commands (G28, G30).
o MACHINE ZERO POSITION
Manually - using the control panel of the system
In the CNC program - during a cycle operation 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.
When the operator has performed the actual machine 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 changed through a work offset, MDI mode, or the part program. This topic normally a parI of CNC machine operation training, directly at the machine. For the last two methods of a machine zero return, the CNC system offers specific preparatory commands.
MACHINE ZERO RETURN
151
• Program Commands are four preparatory commands relating to chine zero position:
For ma-
N67 1328
shows G28 programmed by itself in G27
G28
Machine zero reference position return check
Return
10 the
reference
primary machine zero
position
G29
Return/rom the machine zero reference position
G30
reference pOSii
Return to
secondary machine zero (more than one is possible)
the listed G28 is used almost sively in two and three axis CNC programming. Its only purpose is to return the current tool to the machine zero position and do it along the one or more axes in G28 program block.
• Command Group All four preparatory commands to G30 belong to the group 00 of the standard Fanuc designation that describes the non modal or one-shot G codes. In designation, each G code of the 00 group must be repeated in every example, when G28 command is block it is used in. used in one block the Z axis and then it is in the next block for the and Y axes, it has to be repeated in each block as "pp,rjpr! N230 1328 Z.. N231 1328 X •• Y.-.
block - this is an
incomplete instruction. At least one axis must be specified with the G28 command, for example,
(MACH:INE ZERO R.E'I'ORN Z AXIS) ZERO REI'URN XY AXES)
The G28 in block N23! must be If the command is omitted, last motion command programmed will be effective, for example, GOO or GO]!
RETURN TO PRIMARY MACHINE ZERO Any CNC machine may have more one machine zero reference point (home position), depending on its design. For example, many centers with a pallet changer have a secondary machine reference position. that is often used to align both the left and right pallets during pallet most common machine tool design is the one that uses ~ly a position. reach this primary home p6s[lion, the preparatory command G28 is used in the program and can also be used during the MDI control The command moves the specified axis or axes LO the home position, always at a rapid traverse rale. That means GOO command is assumed and not have to programmed. The or axes of the desired motion (with a be programmed. Only the value) must axes will affected.
No7 1328 Y ••
which only send the Y axis to the machine zero reference position, or ... N67 G28 Z •.
will only send the Z axis to the machine zerO reference position, and ... N67 G28
x ..
Y •• Z ..
will send alJ three specified axes to the machtne zero erence position. multiaxis requires caution watch for the infamous 'hockey stick' motion.
• Intermediate Point One of the elementary requirements of programming is the alpha numerical composition of a word. In the program, followed by one or more digits. The every letter must question is what values will the axes in G28 have? They will be the intermediate point for machine zero return motion. concepl the intermediate motion in G28 or G30 is one of the most misunderstood programming features. Commands G28 and G30 must always contain the interpoint (tool position). By Fanuc design and tion, the G28/G30 commands have a built-in motion to an intermediate point, on the way to machine zero. An ogy can made to an airplane flight from Los Angeles, USA to Paris, France, thallemporarily stops over in New York City. It may not be the most direct route, but it serves a certain specific purpose, example, to refuel ",prHII'"
The coordinate values of the axes associated with G28 and G30 commands always indicate an intermediate point.
of the intermediate or pOSitIon, is to shorten the program, normally by one block. reduction is so marginal that the philosophy behind the may debated. is how concept the ate point (position) works. When the or G30 IS used in the program, at least one axis must be specified in the block. The value of that axis is the intermediate point, as interpreted by the eonsystem. Absolute and incremental modes G90 and I make a great difference in interpretation the G28 or G10 behavior, and will be described shortly.
1
Chapter 21
MACHINE / / I
!
/
make the equal to zero and move cutting 1001 to the zero directly. This is done by specifying (he errne
• Absolute and Incremental Mode
I
/
........ -
, Y4.0
There is a in programming the zero return command or G30 in the absolute incremental Remember the b
POINT
G90 GOO XO YO ZO 27-4 Intermediate puifll lor machine zero return· XY axes shown
G9l GOO XO YO ZO
Each statement XOYOZO is control differently. To review, an 'v;>.> a zero, for example XC, means position at the point, if the mode is absolute, command. If the mode is incremental, the XO word means no motion for the L ..... ' ..
The tool motion in Figure 2J-4 is from the central hole of During sueh a motion, the tool can collide with the upper right clamp on its way to zero, if the motion to the home position were directly. Only the X and Y axes are An intermediate point can be location, without making the program any program without an intermediate point can be
lathes use (he U and Waxes incremental on absolute X and Z axes respectively), with same applications. Absolute axes coordinates interpreted as the programmed indicate the nrt:HIT,rlmFIlP'n
G90 GOO xs.o Y4.0 G2B X5.0 Y4.0
(MACHINED HOLE) 1t"la1...rL\.N,c, ZERO MOTION)
The same program with an intermediate point at a safe 10will change slightly: G90 GOO X5.0 Y4.0 G28 Xl2.0 Y4.0
(MACHINED HOLE) (MACHINE ZERO MOTION)
Comp,are the two program are identical in terms ( -,. G28 USED IN THE ABSOLUTE G90
Nl2 GOl Z-O.7S F4.0 MOS N25 GOl X9.5 Y4.874 N26 G28 Z-O.7S Ma9 (-
Earlier examples shown reason behind this ble motion. It is - only to save a single program block - that is all. purpose is to use onc block program to achieve two motions. that would otherwise require two blocks. A could also be:
- they are the tool motion:
~>
IN ABSOLUTE MODE)
G28 USED IN THE INCR:EMENTAL MODE)
G90
Nl2 GOl Z-O.75 F4.0 M08 N25 GOl X9.S Y4.874 N26 G9l G2B ZO M09
(G2a IN INC:REMENTAL MODE)
G90 GOO XS.O
Y4.0
X12.0
G28 Xl2.0 Y4.0
La
produce
same
(MACHINED (SAFE LOCATION) (MACHmE ZERO RE'lL'URlN'1
result, but with an extra
For example, the intermediate position, the tool can be programmed to an obstacle on the to chine zero. rnn,,.,.,.·t1 whh care, the tion may be useful. Normally, it is more
Which method is better? both methods produce on a given situation or identical results, the choice is personal preference. To switch to the incremental mode has its benefit, because the current tool location may not always known. The disadvantage this method is that G91 is most likely a temporary setting only and must be reset back (0 G90 mode, used by the majority of the program. A failure to reinstate the "mS;(]IU'IB mode may result
in an expensive and
serious error.
MACHINE
RETURN
1
Absolute mode of programming speci ties the currenltool at all times. position from program zero - always Many examples use the absolute ming mode - after all, this is - or it should - the programming mode, for the majority of
above example can be so the intermediate as the current tool posimotion is eliminated or intermediate motion can never eliminated, but tioll. it can programmed as a physical zero distance. 090
There is one incremental mode of mazero return some very It happens in those cases when the current tool position is not known to the programmer. Such a situation typically happens when using subprograms. where mode is used repeatedly to move the incrementally (0 different locations. For instance - where exactly is the cutting tool when drilling cycle is completed in the N35 block the following example? G90 N32 G99 N33 G9l N34 G90 N35 G2S
GSl Xl.S Y2.25 RO.l Z-O.163 F12.0 (REPEAT 7 TIMES) XO.3874 YO.6482 L7 (CANCEL GSO Zl.O M09 (X???? Y????) Zl.0
(UNKNOWN
~n~T'~Tf~T\
Is it worth the extra effort to find the absolute location at Probably no!. Let's look at some other examples. coordinate While in the absolute mode 090, the intermediate point locatioll. When incremental the mode 091 is programmed, the coordinate values actual and direction the intermediate motion. In both cases, intermediate tool motion be performed first. Then - and only final return to the machine zero reference position will take Y 1.0 the current lOol position as position). the program, XY values of G28 command that follows the position block are important: G90 N12 GOO X5.0 Yl.O Nl3 G28 XO YO
Nl2 GOO XS.O Yl.O Nl3 G28 XS.O Yl.O
By this
the imermediate poinl in direct motion to the machine zero. reason is that intermediate tool posiwith the current tool position. This r'\r("\, ..... r~....,.'has to do with values axes. In the part program, 1.0 in the block N 13 must repeated, while the absolute 090 is in effect
current tool position, which
In cases when current tool position is not known, the zero return to be in incremental mode. in this case, change temporarily to mode gram a zero length motion for each axis: G90 Nl2 GOO XS.O Yl.O Nl3 G91 G2B xo YO Nl4 G90
Again, an important is in place here - always remember to back to absolute as soon as in order to avoid misinterpreting the consecutive program data. [n a brief the imermediate point cannot be minated from the G28/G30 block. If situation demands a zero without going a separate return to termediale point, use a zero tool motion towards the n"I"'';'''''' point. method on the 090 or G91 mode at the o
In example, the G28 command that the CUlting tool should the machine zero position· identified as XOYO in the N 13. Since G28 command relates to the zero only, it ~ould to assume that the XOYO relates to lhe~machine zero, rather than the part zero. That is 110t con·eel.
XOYO
to the point through which tool will the machine zero positioll. That is the detined point already known to be the intermediate position for the machine zero return command. This intermediate point is assigned coordinates relating to pan (in absolute In the example, the cuuing tool will move \0 program zero to the mach i ne zero, resu Itin a single definition of two 1001 motions. This, of the intended motion. course, is not likely to C
In G90 absolute mode motion to machine zero, the current tool coordinate location must be repeated for each axis specified with G28 command.
o In G9l
motion to machine zero, the current tool motion must be equal to zero for each axis ·specified with the G28 command.
• Return from the Z Depth Position One common example of the intermediate tool in a program hlock, is the return from a cavity to the machine zero. In the following solely the purpose of better explanation, motions are used rather than a drilling to retract tool from the hole depth. In the example, the current XY position is X9.5Y 4.874. and a drilling operation will simulated in
1
21
N24 N25 N26 N27 N2Q
GOO GOl GOO a28 G29 N29 Mal
N2l G90 GOO GS4 X9.S Y4.B74 S900 MOl N22 G43 ZO.l HOl MOB N23 GOl Z-O.4S F10.O N24 GOO Z-0.43
N2S GOl Z-O.75
In block N25, the tool is at current tool position of X9.5 absolute COOfthe cutting is done and the tool has to be returned home in axes. reasons, the Z axis must retract first Several but three of them are the most common: o
Retract the Z axis above work in one block, then return XYZ axes to machine zero
o
Retract the Z axis all the way to machine zero, then return the XV axes in the next block
Q
Z-0.43 Z-O.75 ZO.l M09 ZO.l MOS X9.5 Y4.B?4
2
To retract the Z axis all (he way \0 then return the XY axes in the next Option 1. return the Z axis to
zero:
N26 G28 Z-O.7S M09
return the XY axes to
zero as weJl:
N27 G28 X9.S Y4.9?4
complete program for Option 2
o Return XYZ axes to machine zero directly from the current tool position
The Figure 21-5 shows the
the depth)
options.
xv
MACHINE ZERO POSITION
r-------+ ~I
zi
0,
~t
~I
/' /'
NI J
Hole location in XY axes is X9.5 Y4.874
/' /'
/'
INTERMEDIATE POINT CURRENT POSITION
G2B
GOO G54 X9.S Y4.B?4 S900 MOl ZO.l Hal MOS Z-O.4S F10.D Z-O.43 Z-O.7S Z-O.7S M09 X9.5 Y4.874 MOS
MOl
e Option 3
N26 G28 X9.5 Y4.874 ZO.l M09
Hole location jn XY axes is X9.5 Y4.B74
Figure 21-5
Machine zero return from a hole depth - milling
This is the intended method of programming, as Faouc controls are Some programmers may with Fanuc on but that is how it works. Here is
Q Option 1 To retract the Z work in one block return the XYZ axes to the machine zero position, commonly used: the 'normal' N26 GOO ZO.l MOS
This block must lion, along the Z
G90 G43 GOl GOO GOl G2B
To return all three axes from the current tool position the tool is still aL the hole full depth), only one zero return block will be needed:
/'
/'
N2l N22 N23 N24 N25 N26 N27 N28
followed by a return
LO
the
N27 G28 ZO.l MaS
The complete program for Option J will N2l G90 GOO GS4 X9.S Y4.874 S900 MOl N22 G43 ZO.l HOl MOS N23 Gal Z 0.45 F10.O
posi-
N2l N22 N23 N24 N25 N26 N27
for Option 3:
G90 GOO GS4 X9.S Y4.874 S900 M03 G43 ZO. 1 HOl MOS
GOl GOO GOl G28 MOl
Z-O.45 F10.O Z-O.43 Z-O.75 M09 X9.5 Y4.874 ZO.l MOS
The molion
La
1<1'-"11:'<;;
zero will take
LWO
Step 1:
Z axis will rapid to ZO.l position
Step 2:
All axes will return to machine zero
Also note rearrangements ofM09 neous Turning the coolant tical than stopping the spindle.
miscella-
MACHINE ZERO RETURN
5
Although this is a matter of opinion, the choice of many is to move the tool out of a cavity or hole first, caB the machine zero return command. If there is any ,',-,'A",-'" for this preference, it is the perceived safety the programmer puts into the program design. To be there is nbsolutely nothing wrong with the alternate memoo, if it is with care. Comparing' opwith other does some valuable
o OPTION 1 ... ... is only reasonably safe, of cycle time. may
within the ,nrla",_,."",
o OPTION 2 ... cffil'i"!nt
than the previa us option, but
one of all
Return for CNC lathes
•
work, setup. zero return is also ends at the machine zero true the X axis but not of the away on some lathe Typically, a CNC lathe program will a way, thaI machining of the will start machine zero, but any subsequent pan will from a safe tool change position. This tical if the program uses geometry offset, older 050 setting. The most common method of zero return on the lathes is the direct method, without an termcdiate point, because no G91 i s ' an error is more difficult LO make: N78 G28 UO N79 G28 wo
is the most any error in
in terms of program cycle time, could result in a collision.
• Axes Return Required for the ATC
that purpose. a axis is required to
zero return is to make an axes must be moved for only the Z
G91 G28 ZO M06
Horizontal machining centers reach its reference position For safety extra grarruned as well, along Wilh sian with an adjo.cent tool in the
These two blocks win return the cutting tool to chine zero in incremental mode. there is no motion applied. It is safer La move the incremental mode U, then the Z using the incremental mode W. If the work area is clear (watch for [he tailslock), both X and Z axes can be returned to the machine zero at the same time: N78 G28 UO
wo
Figure 21-6 illustrates a typical withdrawal
a from a hole, when the machining is completed. MACHINE ZERO
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 G91 G28 BO
If it is safe, the B axis may be programmed ously with another axis: G91 G28
xo BO
Absolute mode designation follows the same rules for a rotary or indexing axis, as for the linear axes.
21·6 Machine zero return (rom a hole depth. turning application
When using position register command G50, the XZ must always be known for this command. In this rules for machine zero return are Assuming that the machine zero position is at the coordinate position XlO.O Z3.0, the program for the tool can be wriuen in two ways - one without using command, the other one with the 028 command.
156
Chapter 21
Q Example 1 : The first example does not use 028 machine zero return command at all:
The format for G27 command is: G27 x .. Y .. Z ..
where al least one axis must be specified. N1
G20 (EXAMPLE 1) -
N58 G50 X10. 0 Z3. 0 S1000 (OLDER METHOD ONLY) N59 GOO T0300 M42 N60 G96 5400 M03 N61 GOO G41 X4.0 ZO.lS T0303 MOS N62 GOl Z-2.45 FO.012 N63 X3.8 M09 N64 GOO G40 X3.5 ZO.lS MOS N65 X10.0 Z3.0 T0300 N66 MOl
Q Example 2: The second example will use 028 machine zero reference command. to achieve the same target position: N1 G20 (EXAMPLE 2)
When used in the program. the cutling tool will automatically rapid (no GOO necessary) to the position as specified by the axes in the 027 block. The motion can be either in the absolute or incremental mode. Note that no G28 command is used. Nl G20 N2 GSO r7. 85 Z2. 0 N3 GOO T0400 M42 N4 G96 S350 M03
(OLDER METHOD ONLY)
N5 GOO G42 X4.l25 ZO.! T0404 MOa N6 GOl Z-1.75 FO.012 N7 UO. 2 FO. 04 NS G27 G40 X7.85 Z2.0 T0400 M09 N9 MOl
XIO.O Z3.0 SlOOO (OLDER METHOD ONLY) T0300 M42 S400 M03 G4l X4.0 ZO.l5 T0303 MOS Z-2.45 FO.012 X3.S M09 X3.S ZO.15 MOS T0300
In the example. block N8 contains G27, but no GOO or G28. This block instructs the CNC machine to return to the position X7.85 Z2,0 and check, upon arrival to the target position, if that position is the machine zero in all specified axes (two axes in the example). A confirmation light will turn on, if the machine zero position is confirmed. If the position is not confirmed, the program will not proceed any further until the cause (misposition) is eliminated.
Most CNC programmers will likely feel more comfortable with the ftrst example and saving one program block program will not likely be compelling enough to change their programming style. The second example (Example 2) can be programmed in the incremental mode as well, using the U and W addresses. but it would not be too practical.
Compare the starting position in block N2 and the return position in block N8. Assuming that this position is at machine zero reference point in both the X and Z axes, the above example will confirm OK position in the N8 block. Now, suppose that a small error has been made while writing block N8, and the X value was entered as X7.58 rather than the expected X7.85:
RETURN POSITION CHECK COMMAND
N8 G27 G40 X7.58 Z2.0 T0400 M09
The less common preparalory command G27 performs a checking function - and nothing else. Its only purpose is to check (which means to ~lIfirm)\ if the programmed position in the block cO'1taining G27 is at the machine zero reference point or noL H it is. the control panel indicator light for each axis that has reached the position will go on. If the reached position is not at the machme zero, the program processing is interrupted by an error condition displayed on the screen as an alarm.
In this case, the control system will return an error condition. The error is displayed automatically on the control screen (as an alarm). The system will no! process the remainder of the program, until the error is corrected. The light indicating Cycle Scarr condition will turn off and the source of the problem has to be found, When looking for the source of the problem, always check both positions, the start position block, as well as the end position block. The error is quite easy to make in either block. Also note that any axis not specified in the block will not be checked for its actual position.
N58 N59 N60 N61 N62 N63 N64 N65
GSO GOO G96 GOO GOl G40 G28 MOl
If the tool starling position is programmed at the machine zcro reference (home), it is il good practice to return there as well, when Ihe machining with that CUlling tool is completed. This is quite commonly done for CNC lathes, where the tool change (indexing) normally takes place in the same position, although this position does not always have [0 be the machine zero. Usually, it is a safe position near the machined pan.
Another important poim is the cancellation of the cutter radius offset and the tool offset The G27 preparatory com· mand should always be programmed with the G40 command and the TuOO in effect (G49 or HOO). If the tool offset or the culler radius offset is still in effect. the checking CarlllOI be dOlle properly, because the 1001 reference point is displaced by the offset value.
MACHINE ZERO RETURN
157
Here is how the FLTst (Example J) listed G27 command. Note that the can be modified to accept will only move to the coordinates specified, 1101 La any or point. Block will become the aci tual check block. The control system will move the machine axes to X 10.0 Y3.0 and checks this position is in fact machine zero reference point This is the reason Example J could modified, but not the seciond Example 2. N1 G20 N58 GSO XlO. 0 Z3. 0 91000
(OLDER METHOD ONLY)
N59 GOO TOlOO M42
(LATHE EXAMPLE)
T0303 G2S U5.0 W3.0 G29 U-4.0 ~.l75 command should always be In of both cutter radius (G40) cycles (080), jf either is employed in the program. (he standard cancellation 0 codes - G40 to cancel CUlter radius offset GSO to a fixed before the G29 command is issued in the program.
The celed
A schematic sketch
N60 G96 9400 M03
the tool
rnc,,,rm
is illustrated in
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 either the absolute or incremental mode. The absolute sta· tement in block N65 (in the example) can replaced with the version: N65 G27 U6.5
~.85
/
TOlOO
Lo this command. A small price Lo pay when this checking command is a slight cycle the deceleration of tool motion is built time loss. into the command by the control system, about one to G27 command is seconds be lost number of tools use This be a significant loss if a check in every program. IS
, I
/
I
a
The G27 command tp seldom used with geometry offset setting of the tools, wl1ich is the current modern method. The G50 command i:0llder and not anymore on newest lathes, but many lathes are slill used in try that do need the setting.
RETURN FROM MACHINE ZERO POINT The preparatory command G29 is exact opposite G28 or command. While G28 will automatically reto machine zero position, comturn the cuning mand will return the tool to its original position - again, via an intermediate point. In normal programming usage, the command 029 usualJy follows G28 or 030 cOIllmanu. The rules relating to the absolute and are for in exactly same respect as to the G28 All programmed axes are moved at the rapid traverse rate to the by the preceding G28 or intermediate position firsl, 030 command block. An example for a application lustrates the concept:
6.80--'-- 7.62
G28 G29
Figure 21-7 AutDmatic return from machine lero position
The illustration shows a tool motion from point A to point B first, then to point C, back to point B, to point D. point A is the starting point of the motion, point B is the intermediate point, point C is the machine zero point, and point D is the final point to the target position. curequivalent program commands, starting at rent [001 pOSition, which is point and resulting in the A to B to C (0 B to D lool path are quite simple: G28 018.6 W6.8 G29 U-14.86 W7.62
Of course, there would be some appropriate action programmed the two blocks. for a tool activity. change or some other Similar to G27 command, there is only a weak support comamong CNC programmers. It is one of virtumands that can be very useful in some rare cases, ally unnecessary for everyday work. However, it is always to know 'tools of trade' are available in 1'\"",
158
21
RETURN TO SECONDARY MACHINE ZERO G28 machine zero command, specific machines also have the G30 command. In ler, and handbook generally. many examples apply equally to G28 and G30 commands and were sometimes tn identified as G28/G30 to cover both. So what is G30 and why is this command needed it in the first
i&
G30
In addition to
By definition, preparatory command is a machine zero return cummand tu the machine zero posilion. That position must available on the machine at the lime of purchase. Note the descriptive word is secondary, not second. In virtually all G30 is identical to the G28, except thaI it refers to a secondary program zero. zero can be the physical third, or even point, as specified by the mamanufacturer. Not every CNC machine a secondmachine zero position, and not every mflchine machine even one. Thi~ ence point serves only some very special purposes, mainly for horiwntal machining centers. programming format for G30 command is similar to the G28 command, with an addition of the P address:
where ...
P
:::: indicates the selection of a secondary reference position :::: can be P2, P3 and P4 to identify
XVZ
:::: is the
the
(2-4) point definition (one axis minimum must be specified)
The most common use of a secondary machine zero erence point in CNe programming is for pallet In the control unit parameter distance of secondary reference point is set from primary reference point and is not normally changed during the working life of the machine and the pallet To distinguish between multiple secondary machine zero positions, address P is added in the G30 block (there is no P "t1rl .... '~'" used If the machine has only a sinsecondary machine position, the Pis not required in the program, PI is assumed in
G30
x..
IS
G30 Pl
Y ..
same as
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 positioning motion. Wbile the rapid tool motion is meant to be used from one position of the work area to withour curling, linear interpolation is u ....... "" ......... for actual material removal. such as contouring, pOj:Ke~ung, face milling cutLing motions. is used in part programming to from the start position 0 f the cut LO uses the shortest cutmotion programmed in is a straight line, the points. this mode, the cutter moves contour start from one position to another by the shortest distance between the is a very important nrr\OT~~m_ ming feature, in contouring and angular motion (such as chamfers, bevels, angles, in this mode to be accurate. etc.) must be can be generated in the linear Three types polation mode: Cl
Horizontal motion
• Start and End of the linear Motion Linear motion, other motion in CNC ming, is a motion two end points of the conLour. It position. Any start position has a start position is often called position, rhe end position is often called the target The start of a linear motion is defined by the current position, the end is defined by the target coordinates current block. It is easy to see !.hat the end position one motion will become the start position of the next motion, as the tool moves along part, through all contour points.
• Single Axis linear Interpolation The programmed tool motion along single axis is ala motion parallel ta that of the motion or mode will result Programming in in the same nrF~H'T"", but at different feedFigure 22-1 for
... single axis only
o Vertical motion o
Angular
y
Motian from XOYO
axes
means that the control thousands of intermediate coordinate points between start point and end point of the cut. The result of this calculation is rhe shortest path tween the two p~nts. All calculations are automatic - the control system constantly and adjusts the feedrate for all cutt~axes, normally two or three.
LINEAR COMMAND
to X7.0 Y4.0
5
4 -+--'--+--+3 2
~~~~~~~-i~
-~~--,.f-
1
a
x 1
:nml1;!f1<:l'lfl
In GOl mode, the function F must be in effect. linear interpolation first program block that starts mode must have a feed rate in otherwise an alarm will occur during the first run, power on. Command Gal and feedrate F are modal, which means they may be omiued in all subsequent I blocks, once they have been designated and the feedrate reunchanged. Only a location is required for the axis designation in a along two or dition to a single axis motion, a simultaneously. three axes be also
2
3
4
5
6
7
8
of the rapid mode and the linear irrt8rpo/ation mode
machmmg centers and the tool motions (hat are parallel to table motions. On the CNC lathes. as facing, drilling, tapping are In all cases, a single or the ho.rizonral within the current (working) plane. A singJe axis motion can never be motion, which requires two, three, or more axes. axis name for a motion rhat is parallel to a horizontaf or vertical only.
159
1
22
y
Motion from X2.0 Y1.0
to X2.0 Y3.0 and to
5 4
X6.0 Y3.0
3
2
1 O~·~--·--~···~·····~·····~-·~·········~-·X
o
gramming method is not enough. Such n .. ming projects more an investment into a computer based system, such as powerful and Mastercam TM, that IS based on modern computer combined with machinknow-how. This programming is using desktop by virtually all machine shops. and is Computer based programming is not a subject of this handbook, btl[ its genera! concepts are discussed briefly in chapter of the handbook 53). F' ......" .......
three-axis (XYZ) '''" ..... " .... in Figure 22·4,
1 234 567 8
linear motion is
(
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 in a slraightline the end point and at an by the control
y
Motion from
j.
X2.0 Y1.0 to X6.0 Y3.0
5
Figure 22·4 Three axes
4
3
linear interpolation motion
PROGRAMMING FORMAT
2
1
x
a
o
1 234 5 6 7 8
In order to
a lool motion in the interpolacommand GOI along with one, Lool maLian, as well as a feed-
two, or axes rate (F address) suitable for the job at hand:
Figure 22-3 Two axes simultaneous linear interpolation motion
GOI x .. Y.. Z.. F •.
• Three
All enLncs in the linear motion block are to be only if they are new or the block instruction (word) that is affected by needs to be included in the program block,
Interpolation
A linear that takes place along axis linear same time, IS simultaneous linear motion along three axes is possible on virtually all CNC machining centers. Programming a linear is not always easy, particularly when motion of this working with complex parts. Due to many difficult lions involved in this type of tool motion, the manual pro-
Depending on which programming melhod is """ . . "'I.vU. motion may be absolute or n".·"'''''''' lory commands for milling and W for the linear·
LINEAR
161 • Individual Axis feed rate
LINEAR fEEDRATE The actual be programmed
a defined tool motion can In
two
o ... per time
mm/min or in/min
o
mm/rev or in/rev
... per spindle revolution
machine type and dimenThe selection depends on ,,,,,,,,,,,,,,,~centers, drills, £lanaI units used. Typically, protilers, wire EDM, etc., mms, routers, flame lathes and turning centers lypiuse feed rate per time. cally use feed rate per
• Feedrate Range only within in milling applicais 0.0001 \ as in/min, typical " ..""un,,,, or deglmin. The lowest for linear interpoin turning is dependent on the minimum increment of the coordinate axes XZ. The following two tables point out typical ranges a normal CNC system can support. The is for All first table is for milling, the second units used in pan programming are rpXlrp.<:PfI tf>P,rlr
a certain
Minimum motion increment
MILLING
0.001 mm
0.0001 ·240000.00 mm/min
subject of actual cutting feed rate per is not eruin programming al all, It is included here for matically oriented and interested individuals only. There is no to know the following calculations at all system will do them every time. all the automatically. On the other hand. here it is as motion unit must always calculate individually. Depending on the motion (its angular value), the cornup' one and 'hold back' the other ax is and it will do it constantly during the cut The result is a between !.he start and end points of (he linear contour. Strictly speaking, it is not a straight I with edges so diminutive in that hne but a they are Iy Impossible to see, even under magnification. For all practical the result is a straight line. The calculations are to the following
the CNC system, according in Figure 22-5. END POINT
/"--r ,
deg/min
0.001 degree
END POINT
.0001 inch
,-.
'-
Minimum motion increment
TURNING
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
lhall!!t: maximum feeurate thaI can high. For actual cutting, that is true. that ranges are to the control The will feed rate, according to the macapabilities. Control system only prorange, that is more for the benefit or than the actual user. in case is to allow the machine manufacturers flexibilIty within current technological advances. As technology control system manufacturers will have to rechanges as well, by increasing the ranges.
Figure 22-5 Oal8 fDr the calculation of individual axis linear feedrate
GOO XlO.O Y6.0 GOl X14.S Yi.25 F12.0 linear motion takes place between two end points,
point at X 10.0 Y 6.0
to
the end
at
Y7.25 - the feed rate is programmed at 12 in/min as
That means the actual travel motion is either known or it can be calculated: Xc
14.5 = 7.25 -
Zt
10.0 6~O
= 4.5 = 1.25
0
tool total mali on (as illustrated) is motion, and can be calculated by Theorem:
162
22 y
above formula is root of the total sum value of 4.6703854 as
5
common, based on the square sides, that win travel length in the
~~+.~...~~...+-.-.~~~~~~~.+
+
4 3
2 1
control system will internally apply the and calculate the actual motion along we X axis (4.25), as well the Y (1 plus the length of motion il(4.6703854). values, the system will calculate the X feed rate - there no motion that takes place
0 -.... X
o
1 2
3 4
5 6
7
8
Figure 22-6 Example illustration for a simple linear interpolation
I-V
1.
(CLOOK.WJ:SE DIRECTION FROM
Fx = 4.5
Fx = 1.25
I
4.6703854 x l2 = 11.562215
I
4.6703854
x
12
3.2117263
G90 ••• G01 Xl.O Y3.0 F ••• X3.0 Y4.0
X4.5 X6.S Y'3.0 X7.5 Yl.S X4.5 YO.S Xl.O
n.o
e Fx
=
0
I
4.6703854 x 12
= 0.0
(ABSOL'!J'TE MODE) (Pl TO (P2 TO (3) (P3 TO P4) (P4 TO !;IS) (PS TO (6) (P6 TO P7) (P7 TO (8) (pa TO
2:
(COUNTERCLOCKWISE DIRECTION FROM PI)
G90 •••
In this example, there is no Z axis motion. If Z axis were part of the lool motion, for a simultaneous three dimensional linear motion, procedure will be logically identical, with the inclusion of Z axis in the calculations.
PROGRAMMING EXAMPLE In order to illustrate the .... ~._ .. _~, use of interpolation mode a CNC program, is a simple example, shown in 22-6. For even more comprehensive understanding, we example will presented twice. One tool motion will start and end at the P I location and will programmed in the c1ockthe other will start at will in the counterclockwise direction.
GOl X4.S YO.S F ... X7.S Yl.S Y3.0 X6.5 X4.5 Y4.Q X3.0 X1.0 Y3. 0 Y1.0
(ABSOLUTE MODE)
(P1 TO TO P7) TO PO) TO P5)
\,
TO TO
TO (2) TO (1)
Linear interpolation means of programming all orthogonal (i.e., horizontal) molions, as well as angular tool motions as the shortest Hnear distance between two points. CUlling must be in this mode, for proper m~lal Note coordinate location that has not changed from one point to the next one block to the next is not repeated in subsequent block or blocks.
BLO-CK SKIP FUNCTION In many control manuals, the block skip function is also called the block delete function. The expression 'block delete' offers rather a misleading description, since no progTam blocks will actually be deleted but only skipped during progTam processing. For this good reason, the more accurate description of the function is the block skip function, a term used in the handbook. This function is a standard feature of virtually all CNC controls. Its main purpose is to offer the programmer some additionaJ flexibility in designing a program for no more than nvo conflicting possibilities. In the absence of a block skip function, the only alternative is to develop two individual part progTams, each covering one unique possibility.
TYPICAL APPLICATIONS To understand the idea of two connicting possibilities, consider this programming application. The assignment is to write a program for a facing cut. The problem is that the blank material for parts delivered to the CNC machine is not consistent in size. Some blanks are slightly smaller in size and can be faced with a single cut. Others are larger and will require two facing cuts. This is not nn uncommon occurrence in CNC shops and is not always handled efficiently. Making two inefficient programs is always an option, but a single program that covers both options is a better choice - but only if the block skip function is used in such a program.
BLOCK SKIP SYMBOL To identify the block skip function in a program, a special programming symbol is required. This block skip function symbol is represented by a forward slash [ / ]. The system will recognize the slash as a code for the block skip. For most of CNC programming applications, the slash symbol is placed as the first character in a block: ~ Example 1 : Nl N2 N3
(ALWAYS PROCESSED) (ALWAYS PROCESSED) (ALWAYS PROCESSED) (PROCESSED IF BLOCK SKIP IS OFF) (PROCESSED IF BLOCK SKIP IS OFF) (PROCESSED IF BLOCK SKIP IS OFF) (ALWAYS PROCESSED) (ALWAYS PROCESSED)
/ N4
I I
N5 ••• N6 •••
N7 .•. N8 •••
On some control systems, the block skip code can also be used selectively for certain addresses within a block, rather Ihan at its beginning. Check the manual if such a technique can be used - it can be very powerful:
Q Example 2: N6 N7 GOO XSO.O N8 GOl ••.
I
MOB
-"
This challenge illustrates a situation, where two connicting 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 beprograms, each properly identified as to its purpose. Such a fore the slash code will be executed, regardless of the block skip toggle setting. If the block skip function is turned ON task can be done quite easily, but it will be a tedious, time consuming and definitely an inefficient process. The only (block skip function is active), only the instructionsfollowother 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 block skip function is turned OFF (block skip function is air cutting for those parts that require only one cut, a block not active), the whole block will be executed in Example 2, skip function will be provided in the program and applied 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 indude a selt!Clive ON/OFF sLalus LOggle, sUl:h illi the coolant function, optional program stop, pfOgTam reset, etc. Also useful are applications for bypassing a certain program operation, applying or not applying a selected tool 10 a part contour and others. Any programming deciSion that requires a choice from two predetermined options is a good candidate for the block skip function.
CONTROL UNIT SETTING Regardless of the slash code position within a block, the program will be processed in two ways. Either in its entirety, or the instruction foHowing the slash will be skipped (ignored). The final decision whether or not to use the block skip function is made during actuaJ machining, by
164
Chapter 23
the operator, depending on the of this purpose, a push button key, a switch, or a menu item . control panel the CNC unit. selection is provided on Selection of the mode can be either as (ON) - or inactive (OFF). 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 switch setting important, recommended. if the program contains even a single block containing the slash symboL active ON will cause instruccode to be ignored durtions in a block following the ing The setting will cause contralto ignore the code and process all instructions written in the program.
A simple programming solution to this potential problem is available. Just repeat all modal commands in the program thal will not affected by block skip function.
=
two
Example A - Modal commands are not repeated:
NS GOO XlO.O YS.O Z2.0 / N6 GOl ZO.l F30.0 MaS N7 Z-l.O Fl2.0
(GOl AND Moa
N8 •••
C
Example B - Modal commands are repeated:
NS GOO X10.0 YS.O Z2.0 / N6 Gal ZO.l F30.0 M08 N7 Gal Z-l.O Fl2.0 M08 N8 •••
""u",; llisled earlier, the contents of
N4, be if block function is ON. They will be processed, if the swilch IS The 2, also listed a slash in block slqsh symbol is preceding miscellaneous function M08 (coolant ON). If skip funcrion switch is ON, the coolant wi!! be if it is OFF, the coolant funclion will application may be useful in
LJ",,""fHUlI"
BLOCK SKIP AND MODAL COMMANDS
In examples A B. the program block containing position as slash code indicates an intermediate Z I. This position may only certain cases during machining will decide whether to use it or not, and also when to use it. The block, identified in the as N6, contai ns several modal functions. The commands GO 1, ZO.1. F30.0 and MOS will all remain in effect, unless they are canceled or changed in following block. From block N7 it is apparent that Z coordinate position and the cutling [eedrale value changed. However. the I M08 commands are not repeated in the example A will 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 in all blocks, in the of ....,.n"',.""n'\ The processing result
To understand the way how modal values work with skipped blocks, that modal commands can be tied only once in the program, in the block they occur first. Modal commands are nol repeated in quent as long as they unchanged. In programs where the block skip function is not at all. there is nothing to do. When the block function is used, watch carefully all modal commands. Remember that a command established in a block using the slash code will not always be in effect. It on the setting block skip switch. Any modal that to be carried over from a section with slash codes to the section without codes may lost if the block skip funclion is Overlooking modal when programming block in a program with serious errors. skip function can
be different each programexample shown. If the block skip function is active (ON) block instructions following the will not be next example A yields an unacceptable result, with a fairly possible collision. The example B uses careful thoughtful approach with very extra work. are the when block N6 is skipped:
C
Example A - Modal commands are nat repeated:
NS GOO X10.O YS.O Z2.0
, ............."" MOTION)
N7 Z-l. 0 F12. 0 N8 •••
(RAPID MOTION)
C
Example B Modal commands are
NS GOO X10.0 YS.O Z2.0 N7 GOl Z-l.O F12.0 MOS N8 ...
ron,""'Tl'"
(RAPID MOTION) (FEEDRATE MOTION)
BLOCK SKIP FUNCTION
Note that the motion I, the F30.0 and the M08 are all skipped in the example The X and Y axes have not updated in either example and will remain unchanged. conclusion is that the example motion in two consecutive A will result a Z axis In the blocks, causing a potemially dangerous correct version, listed as B, the programmed repetilion all commands - GO 1, F 12.0 and M08 - assures the nrr' .... "'''""' will be run as intended. In next section this chapter we will look at principles of program design for different practical applications. In the summary, there is one basic developing programs with blocks using the block skip function: Always program a/l the instructions. even if it means repeating some program values and commands that have to be preserved.
slash symbol can be into the nT"e,r"n. nrr,""'"rn has been designed for bOfh options. in those blocks that define the optional skip lected blocks. Always check program!
a way that there is only If the program is designed in cut, problems may oceur during Programming TWO cuts all parts a program, but will be inefficient parts with a minimum stock. There will too many tool motions as 'cutting , when the is minimal.
c:>
Example - Variable stock face:
A cutting a that in sIze is a common problem in CNC work. A suitable solution is for turning milling - the should include tool motions for two cuts and the skip function will be on all blocks relating to theftrs1 cut
is a lathe face cut, the facing siock varies mill) and .275 (7 mm). After considering several machining options, the programdY~'" that the maximum stock that can CUI will (3.5 mm) Figure 23-J. '-' .......
CHANGE
Any eNC program containing block skip function should be checked at least twice.
X3.35
I
result of this double check must be always satisfactory, whether the block skip in or without it. an error is even a very minor error. correct it After the correction. check the program at twice again, covering both types of processing. The check is that a correction made for reason for the one type of processing may cause a different error for the other type of processing.
N9
I 0
~.
co
I z I
N111
I I
h~
I I N7 I
X-O.OS
PROGRAMMING EXAMPLES block skip function is simple, often neglected, yet, it is a powerful programming tool. Many programs can benefit a creative use of this The type of and some thinking ingenuity are the only criteria for successful implementation. In the following examples, some of the skip function are shown. the examples as start points for a general program design or when covering similar machining applications.
• Variable Stock R'moval Removal of excessive material is during a rough cutting. When machining irregular (castbe difforgings, etc.) or rough facing on lathes, it ficult to determine number of cuts. example, some castings a given job may have only the minimum excessuffimaterial, so one roughing or facing cut will Other for same job may larger and two roughing or cuts arc nceded.
Figure 23-1 Variable stock for fBcing in 8 turning I!JOfJ'ilCOtion - program 02301
02301 (TURNING) (v:ARIABLE FACE STOCK)
N1. G20 G40 G99 N2 GSQ S2000 N1 GOO TQ200 M42 N4 G96 S400 M03 NS G41 X3.35 ZO.135 T0202 MOS I N6 GOl X-O.OS FO.Ol I N7 GOO ZO • .25 I NS X3.35 N9 GOl ZO FO.OS N1.0 X-O.OS FO.Ol N1.1 GOO ZO.l N12 X3.S N13 G40 Xl2.0 Z2.0 T0200 N1.4 MJO %
166
...........••• ~----------~
NS contains initiallool approach motion. tool next three blocks are preceded by a slash. In N6, front at ZD.l N7 moves the tool away cuts off to initial face, block N8 is a rapid diameter. There are no other blocks to skipped after to the fronl block N8. N9 contains a cutting motion, Nil is the N lOis the front motion, followed by standard final blocks. Evaluate the example not once least twice - it shows what exactly happens. During the first evaluation, read all blocks and the block skip function. the second time, ignore all blocks containing slash will be identical results when compared with the first the number of actual uation. The only difference will is very cuts - one, not two. In miiling,lhe An for a milling application uses a inch face material to faced varies bemill. The (ween .120 and .3! 5. largest reasonable depth cut selected will be .177 (4.5 mm) - Figure 23-2. FIRST
X-3.0 Y4.0
CUT
X11.0 Y4.0
Chapter 23
........------.-------~~.........~~~----...:...
Block does not need a for a reason - it will be either FIS.O or FIS.O, depending on whether blocks N6 to N8 were skipped or not. The is very important block 10. Such a repetition guarantees the required rate in the block, when actual cutting takes Both lathe and mill examples should offer at least some logic used in program developbasic understanding of menl, using the block function. Exactly the same logical approach can be for more than two cuts and can also be applied to operations other Ihan face cutting.
• Machining Pattern Change Another application. where the block function may be efficiently. is a simple programming. The term family programming means a programming situation bewhere there a slight difference in tween two or more parts. Such a variation between similar is often a prospect for block skip function. A minor deviation in a machining pattern one adapted in a single program usdrawing to another can ing the block skip function. Following two examples show typical possibilities of programming a change of the path. In one the emphasis is on a skipped machini ng location. In the other example, the emphasis is on the pattern change itself. Both are In illustrate 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 N4 G43 Zl.O S550 MO) Hal N5 GOl ZO.1?7 F15.0 Mn8 / N6 X-3.0 FIB.O / N7 ZO.375 / N'8 GOO Xl!. 0 N9 GOl ZO NlO x-J.a F1B.O Nll GOO Zl.O M09 Nl2 G2S X-l.O Y4.0 Zl.O M13 M30
%
Block N5 in the example contains the Z axis approach to the first cut, at 177 level. The next blocks can be if necessary. In the N6 block, the mill actually cuts at ZOo I position, N7 is the tool motion after cut, and N8 returns the tool to initial X position. There are no other blocks to be skipped block N8.
X43.0
-"L-;.I---X35.0
Figure 23-3
Variable maj:/If~lina pattern - turning application upper picture shows result with block skip lion set ON. the lower picture shows the result with block the -"arne skip function set OFF, 02303 Nl G21
Nl2 GSO SleOO
Nl3 GOO T0600 M42 Nl4 G96 S100 MD3
BLOCK SKIP FUNCTION
167
N15 X43.0 Z-20.0 T0606 MOS N16 G01 XJS.O FO.13 N17 GOO X43.0 / Nle Z-50.0 / Nl9 GOl X3S.0 / mo GOO X43.0 ml X400.0 Z4S.0 T0600 MOl
Both variations of program 02304 machine a hole pattern with 6 or 4 holes. Block skip function has been used to make a single program covering both patterns. The top of Figure 23-4 shows the hole pattern when block skip function is set OFF, the bottom shows the hole pattern when block skip mode is set ON.
Program 02303 demonstrates a single program for two parts with similar characteristics. One part requires a single groove, the other requires two grooves on the same diameler. In the example, both grooves are identical - they have the same width and depth and are machined with the same tool. The only difference between the two examples is the number of grooves and the second groove position. Machining the part will require the block skip function set ON or OFF, depending on the grove to be machined.
02304 (MI.LL.ING EXAMPLE)
Evaluate the more important blocks in the program example. The N15 block is the initial tool motion to the start 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 clearance diameter. The foHowing three blocks will cut the second groove, if it is required. That is the reason for the block skip code. In the block N 18, the tool moves to the initial position of groove 2 at Z-50.0, in N19 the groove is cut In the block N20, the tool retracts from the groove to a clearance position.
N24 GSO G28 X30.0 Y7S.0 Z2S.0
The milling example shown in Figure 23-4, also in metric, is represented in program 02304. The program handles two similar patterns that have four identical holes for both parts and two missjng holes in the second pari only. This is a good example of similar parts program, using block skip.
a
a
M
LO
ci
uj
N1 G21 N16 N17 N18 N19
mo
G90 GOO G54 X30.0 Y2S.0 MOS G43 Z2S.0 S1200 M03 H04 G99 GS1 R2.5 Z-4.0 F100.0
I N21 XSO.O Y50.0 / m2 X55.0 m3 G98 X30.0 Y7S.0
$
0
a (")
><
I
I $-+-
I"'i"'\
.
3
w -$ - + 5 4
Y75.0
0
r....:
<0
X
J
I
I
I
$-
Y50.0
-$-
4
Y25.0
uj
X
5-
I-
3
t
Y75.0 Y54.0
-
Y25.0
47 447 -$ 3
-
Y75.0
-$.
-
Y25.0
f!1
2
0
a ......
--"""""~~~""""
a 0C"') X
$
6
-$1
a
0
I.()
0
0
X
X
......
M
$-
Y75.0
$- -
Y25.0
I-
3
0
r....:
<0
X
a ..0
0 ..... ><
5'
2
Figure 23-4 Program 02304 - variable machining pattem for a milling application - result with block skip OFF (top) and ON (bottom)
6)
A variation of this application is in the program 02305. There arefive hole positions. but the block skip function is used within a block, to control only the Y position of the hole. Top of Figure 23-5 shows the pattern when block skip function is OFF, the bottom shows the pattern when skip function has been set ON. The middle hole will have a different Y axis position, depending on the setting of the block skip function at the machine.
X X X >< 6
5)
Blocks NI8 to N20 will drill holes 1,2 and 3. Hole 4 in N2! and hole 5 in N22 will be drilled only if the block skip function is set to inactive mode (OFF), but neither one will not be drilled when the block skip setting is active (ON). Block N23 will always drill hole number 6.
a
I
1) 2) 3) 4)
N25 MOl
a Lri 0 a co ......
I
(HOLE (HOLE (HOLE (HOLE (HOLE (HOLE
XI05.0 Y75.0
1
t
Figure 23-5 Program ()2305 - variable machining pattern for a milling 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 N19 n05. a mo Y7S.0 N2l X67.0 / YS4.0 m2 G98 X30.0 Y7S.0 N23 GSO G28 X30.0 Y75.0 Z25.0
j--X3.0
(HOLE l) (HOLE 2) (HOLE 3) (HOLE (HOLE 5)
/' ,/
,/
I ~~~=t~-
N24 MOl
X2.0 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 the hole 4 will drilted at coordinate mode is .0 position from tion of X67.0 Y54.0. that case, the the block N20 will overridden. to the proper drilling at position 5, the block N22 must written. If it is omitted. the Y54.0 from block N22 will precedence in block skip mode. Using the block skip feature is the simplest way of dea family of parts. applications arc the function but they the fundamentals of a powerful programming technique and an example of logical thinking. Many detailed explanations and examples of programming complex families of parts can be found in a special Custom Macro option Fanuc fers on most control
• Trial Cut for Measuring Another application of the block is to the machine operator with means of measuring the part before any final machining on the part been done. Due to dimensional the cutting tool comwith other factors, the part may slightly outside of the required tolerance range. following method of programming is very useful for parts very tolerances. It is a method lhose parts, part is difficult to measure after allinachining is for The same me.tho? ex.ample shapes, such as is also quite for parts cycle Indlviduallool is relatively long and all the offsets have to be fine be/ore machining. approach to part programming is more efficient. as it a recut. increases finish, and can even prevent a scrap. In either case, a trial cut programming method that employs the skip is used Setting the skip mode the machine operator checks the trial dimension, the individual offset, if necessary, with block set ON. general equally applicable to
X2.0563
described in example are and milling - Figure 23-6.
Figure 23-6 Application of 8 trial cut for ml!l;~~lJ,rm{'J on a lathe - program 02305 02306 (TRIAL COT -
N1 G20 NlO GSO SHOO Nll GOO T0600 M43 Nl2 G96 SoOO M03 / Nl3 Gt2 X2.0563 ZO.l T0606 MOS / Nl4 GOl Z-O.4 FO.OOS / Nl5 X2.3 FO.03 / N16 GOO G40 X).O Z2.0 T0600 MOO /
(TRIAL Dn IS :2.0563 DlCHES)
/ N17 G96 S600 M03 NlB GOO G42 Xl.67S ZO.l T0606 MOS N19 GOl Xl.O Z-O.062S FO.007 mo Z-l. 75 ml X3.5 FO.Ol N22 GOO Gto XlO.O Z2.0 TOSOO
m3
MOL
When program 02306 is processed the block set all blocks will executed, including the trial cut and finish profile. With the block set ON, the only op.....""lIn" executed will be the to size, the cut. In this case, significant instructions are retained by repetition the key commands (NI8 and NI9). Such a repetition is very crucial successful in both modes of block skip function. MOO in N16 stops the machine and enables a dimensional Selecting trial of in the example may be questioned. What is the logic it? The trial diameter can be other size, That would leave a .025 stock per for the cut. It is true a different diameter could have selected. four decimal numwas only selected for one reason - to psychologically ",n'Y"",.."e,.. the to maintain accurate offset settings. - programmers may a three or aeC:lmal number - the
BLOCK SKIP FUNCTION
169
In the next
trial cut will also the actual machining, but for a di reason - Figure 7. ..-
ci
N
02308 (TRIAL CUT FOR TAPER.
/
X4.37S·
(T02 TR.IAI.. COT DIA IS 4.46 INCHES)
GSO S1750 T0400 M43 / N9 G96 S550 M03 / 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 / NS
- X3.87S
/
23-7 Trial cut for 8 taper cutting on a lathe program 02307
In program 02307. the a feature difficult to measure the tool offset in a error is not the right a an area of the solid a straight enables the operator to trial dimension comfortably and to adjust the offset before cutting the finished 02307 (TRIAL CUT FOR TAPER. - ONE Nl G20 G99 G40 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 / N6 UO.2 FO.03 / N7 GOO G40 X10.0 Z5.0 T0200 MOO /
'!WO TOOLS)
N1 G20 G99 G40 N2 GSa 51750 T0200 M42 N3 G96 S500 Mal / N4 GOO G42 X4.46 ZO.l T0202 MOB / N5 GOl Z-0.4 FO.OOa / N6 UO.2 FO.03 / N7 GOO GtO XIO.O Z5.0 T0200 MnO
(TRIAL CUT DIA IS 4. 428 m:::H:E~S
/ NS G96 5500 M03 N9 GOO G42 X4.6 ZO.l T0202 MOS,-NlO G7l Pl1 Q13 UO.06 WO.OOS D1500 FO.Ol Nll GOO X-J.875 N12 GOl X4.375 Z-0.73 FO.008 Nl3 X4.6 FO.012 Nl4 S550 M43 Nl5 G70 PH Nl6 GOO G40 XlO.O Z5.0 T0200 MOl
a common where a cutting tool is used for both roughing and finishing operations. It a logical way of the block skip function, a form. In most applications, <'''' ....,''y"t''' tools for roughing and finishing may be depending on the of required accuracy. When two cutting for tools, the trial cut dimension is usually more the finishing than for the roughing 02308, the block skip function is illustrated is for roughing, T04 is ting (ools ous is used.
TRIAL COT DIA IS 4..428
/ N14 GSO 51750 T0200 M42 / Nl5 G96 S500 M03 N16 GOO G42 X4.6 ZO.l T0202 MOB N17 G71 PIS Q20 UO.06 WO.OOS D1500 FO.Ol N18 GOO XJ.B75 N19 GOl X4.375 Z-0.73 FO.OOS N20 X4.6 FO.012 N21 GOO G40 XlO.O Z5.0 T0200 Mal N22 GSa 51750 T0400 M43 N23 G96 5550 M03
N24 GOO G42 Xl22.0 Z3.0 T0404 MOB N25 G70 P18 Q20 N26 GOO G40 XlO.O Z5.0 T0400 M09 N27 M30
%
02308 can be improved further by includcontrol of taper on the width, for example. Programming a trial cut is useful but often a neglected technique, although it does present many applications.
•
Program Proving
can to check it limited experience easy to run a for the first time. common concerns of operators is the towards a particularly when the The rapid motion rate of many modern be very high. over 1500 in/min. At the rapid approach to the cutting position on not add to the operator's confidence, approach is \0 the close lenal. most controls, the operator can set ride rate to 100%, and slower. On the rate cannot be done. The next two 02309 and 02310, show a typical method to eliminate the problem during mosetup and program proving, yet maintain the full tion rate during operations for productivity.
170
Chapter 23
Block function in examples a less usual - it is used for a section of a block, rather than the block itself, if the control supports such a method.
GSO GOO G96 G41 GOl
S2000 T0200 M42 S400 MOl X2.75 ZO T0202 M08 X .. FO.004
For machining, the block ON or position and
function is set to the in this mode the whole
program. If the ON seuing is required for one section of the
02309 (TURNING EXAMPLE) Nl G20 G40 G9S
N2 N3 N4 NS N6
• Numbered Block Skip
but not for another, the operator to be usually in program comments. This changing block mode in of a program can unsafe and create problems. r" ................
FO.l
N7 ••• 02310 Nl G20 G17 G40 GSo N2 G90 GOO G54 X219.0 Y7S.0 MOS Nl G4l Z-1.0 8600 M03 H01 FlO.O
N4 GOl X.. F12.0 NS ...
[n both examples, the block skip is used within a single of two block. design of both programs lakes conflicting commands within the same block. If two conflicting commands in a single block, the falter command used in block will become effective. In both examples. the first command is GOO, second L Normally, the GOI motion will a pnonty. the slash the control will accept GOO. if block skip is set ON, but it will GOI, if the block mode is both skip is set OFF. When the block motion commands will be read second in that block effective (GOI overrides GOO). Watch for one possibility, already emphasized:
An optional feature on some controls is a selective or a numbered block skip function. This option allows the operator to select which portions of the required the ON setting and wbich portions OFF setting. the Cycle SIart key to seuings can be done before initialize the program. This also uses slash symbol, but followed by an within the range of I to 9. The selection mode is on the control screen (Setrings), LInder matching switch number, example. a program may tmee groups, each expecting a different setting of skip function. the switch the symbol, are clearly and all operator must do is to match the control seuings with the activity. Nl •.•
N2 .. Nl
SKIP GROUP 1)
N4
(BLOCK. SKIP GROUP 1)
n
N16 ••• N1?
/2 Nl8
12 During the firs! machine run l the operator should set the block skip making GO I command The tool will be slower in the rapid but much Also, the feedrate switch control system will become effective, offering additional flexibility. When the program proving is and the tool approach is confirmed, the block skip can be set ON, to prevent the GO I motion from processed. Both 02309 and 10 are typical of breaking with tradition to a specific result.
• Barfeeder Application On a lathe, the block skip function can in barfeeding, for a continuously running machining. If the n'>rr.,,"nPT allows it, tbe techniques is quite The typiprogram will actually have n.vo ends one will use M99 function. the end will use M30 function. block will preceded by block skip symbol and will be placed before the M30 code in the part program. This technique is in 44.
N19
(BLOCK SKIP GROUP 2) \"""-"'-"-'" SKIP GROUP 2) (BI,ocK SKIP GROUP .:2)
N29 •••
NlO
/3 Nll
(BLOCK SKIP GROUP 3) (BLOCK SKIP GROUP 3)
N4S ...
rules apply skip function as for normal version. Incidentally, the II selection is same as a plam slash only, so blocks N3 and N4 above, could have also writte~ (his
INl
I N4 Numbered block skip function is not i:lVCllll:lDle on all controls.
Programs the selective skip function can be very clever and even efficient, but they may place quite a on the machine For the majority of jobs, be a plenty of programming available by the standard block skip function.
DWELL COMMAND Dwell is another name a pause in program - It IS an intentional delay applied during program ....l"rl('''''~c In this period of specified in a CNC - any motion is while all program commands functions unaffected. When time expires, the control resumes processing the program with the block immediately following the block that contains the dwell.
•
Applications for Accessories
quite useful
second common application the dwell command certain miscellaneous functions - M functions. Several such functions are to control a of CNC as a barfeeder,·tailstock, quill, machine accessories, part catcher, custom features, and others. programmed 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. Since there will no contact of the tool with part category, It IS not important the mamaterial in chine spindle rotates or not.
Each application is equally important to programmers, although the two are not used simultaneously.
On some CNC the command may also be required when spindle speed, usually after a range This is used mainly on CNC lathes. In cases, guidance as to how and to program a dwell time is to follow the recommendation of the CNC machine manufacturer. Typical examples of a dwell lathe are described in Chaprer44, covsubject.
PROGRAMMING APPLICATIONS and can
Programming a dwell is in two applications: o
o
During actual when the tool is in contact with material For operation of machine
accl~sso
when no cutting takes
•
Applications for Cutting
is
DWEll COMMAND
When cutting tool is removing material, it is contact with the machined part. A dwell can be applied during machining a number reasons. If spindle is the spindle rotation is very important a cut is practice. the application of a dwell mainly used breaking chips while drilling, counterboring. grooving or parting-off. Dwell may al.so be used while turning or boring, in order to eliminate physical left on the by end of the 1001. This, IS attributed to the tool during cutting. many other applications, the dwell function is useful to control deceleration of the cutting feed on a corner during feedrales. example. This use of dwell could be parfor older systems. both cases, ticularly machining operation to dwell command 'forces' fu.lly completed in one block, before the next block,can be I'>"<,!""t,,,r/ The still to supply the exact peof time for the This time to be sufficient - neither too short nor too long.
common preparatory command for dwell is G04. other G commands, G04 used by itself only will do nothing, It must always another address, in this case specifying the amount of time to dwell (pause). The correct addresses dwell are X, P or U (address U can only used for a lathe). The time specified by the address is either in milliseconds, or in seconds, depending on address. Some control systems use a different address for purpose as dwell but the gramming methods remain identical. fixed eycles machining centers also use dwell. dwell is programmed together with the cycle not in a separate block. Only fixed that a dwell time can use it in the same all applications, the dwell command must programmed as an independelll 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, curis unchanged. but the rent status of cycle
171
172
Chapter
• Dwell Command Structure The structure - or format - for the
function is:
X5 • 3
AU machines, excludingJlXed cycles
us . 3
l£JJhes ... Allmtlchines. illcludingjix.edcyc/es
P53
In any case, typical representation is five digits before and three digits after decimal point, although that vary on different control systems. Since milliseconds or seconds can be used as units of dwell, the relationship can be established:
The control unit interprets such a command as a dwell, of the preparatory command 004, which establishes meaning of the address that follows it. If using the X or U address for dwell not feel comfortable, use the third alternative the address P. Keep in mind, the address P dues nat accept lhe decimal point, so the dwel1 is programmed directly as the number of milliseconds to control the pause duration. One millisecond is l/lOOOlh of a second, therefore one second is equivalent to 1000 milliseconds.
not as a axis mOlion. This is because of the
aU,"IlC~'i:>"',) X and U can also seconds, without a decimal point -
1304 X2.0
1s
= 1000ms
lms = O.OOls
POOOl
where ..
pl0
POOIO
s = ms
Ploa
P01DO
second millisecond
Examples of practical application of the dwell fonnat are: G04 X2. 0 1304 P2 000 1304 U2. 0
pYt[ferredfor long dwells n. pnd"erred for short or memwn dwells ... l(jJhe in seconds p'
In example, the dwell is 2 seconds or 2000 milliseconds. All are shown. The nexi example is similar: 1304 XO.S G04 P500 1304 UO.5
... I m.iJ.Jisecond .. 10 milliseconds .•. TOO milliseconds
Depending on the programming for dwell. the format using range of programmable time varies. For digits in front of a decimal point and three oigils follOWing it, the is 0.001 of a and up to mInI99999.999 presents a range from mum of l/lOOOth of a second, up to hours, 46 minutes and 39.999 '''TI''lIH-
Dwell programming applications are identical to both machining centers and lathes, but U address can only of either or used in lathe programs. The English dimensional units has no effect on the dwell funcis not dimensional. tion whatsoever, as
DWELL TIME SELECTION
example illustrates a dwell of 500 milliseconds, or one half of a Again, all three formats are shown. a CNC program, the dwell function may appear in the dwell as a separate block: following way - note N21 1301 Z-l. 5 F12.0 N22 1304 XO.3 N23 Z-2.7 F8.0
1304 DODO
Leading zero suppression is assumed in the format withpoinl (trailing zeros are out the Pl
II:~
is equal to
(DWELL COMMAND O. 3 SEC)
Programs using X or U addresses may cause a possible The X and U confusion, particularly to new may incorrectly be interpreted as an motion. This will never be the case. By definition, the X axis and its is the dwelling axis. X axis is lathe application, the U common to all CNC machines. the only
Seldom ever the dwell lime will exceed more than just a seconds, most often much less than only one second. Dwell is a nonproductive lime it should selected as the shortest time needed to accomplish the required action. The time delay for completion of a particular machine operation or a special machine accessory is usually by machine manufacturer. Selecting redwell time for CUlling purposes is al ways sponsibility. Unfortunately, some programmers often overthe dwell duration. After all. one second seems short but think about this example: In one block of program. a dwell function is assigned The speed is set to for the duration of one 480 rlmin and the dwell is applied at locatjons on the part. perhaps during a operation. That means the dwell, cycle lime for each part 50 seconds longer with without dwell. Fifty seconds may not then it would
DWELL COMMAND
173
~ee~ too unreasonable, but are they really necessary? Give 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 arbiby and without much thinking. In example, the minimum dwell required is only 0.125 seconds: 60 I 480
MINIMUM DWEll During a cut,
tion is important, but selting or number of revolutions).
= 0.125
This minimum dwell is eight
programmed dwell of one second. If minimum dwell is used rather estimated dwelL the wlll crease by only 6.25 seconds, than 50 sec- a significant improvement in programming effion the machine. and productivity
Minimum dwell, programmed lated, a simple
Minimum dwell (sec)
Minimum dwell calculation and other issues related to it are shortly.
C
Most programs machining centers will use feedrate per lime (programmed in inches per minute - in/min - or millimeters minute - mrn/min). applications are normally programmed in per revolution, as revolution - in/rev - or millimeters per revolution mmlrev. On many Fanuc controls. a parameter setting allows programming a in the elapsed in seconds or milliseconds - or the number ofspindle revolutions. Each has practical uses and benefits. pending on parameter setting, the dwell comwill assume a different meaning with setting:
• Time Setting
minimum d:ell definiis unimportant (time
Minimum dwell is the time to complete one revolution of the spindle,
less than
SETTING MODE AND DWEll
is for operations where cuttino tool is
contact with the machined part,
seconds, can
=
calcu-
60 r /min
Example:
To calculate minimum dwell in seconds for spindle rotarlmin into sixty (there are 60 tion of 420 r/min, divide in one minute): 60 I 420 = 0.143 seconds dwell
The format selection of dwell block in the program will depending on the machine type used and a programming All following examples represent same dwell time of 0.143 of a ;)",,",'uuu G04 XO.143 G04 P143 G04 UO.143
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 consistent slyle.
G04 PlOOO
... represents mi lliseconds.
\
dwell of one second,
to 1000
• Number of Revolutions Setting For the of spindle revolutions the dwell is expressed as the number of the spindle rotates, within the of()'OOI to 99999.999 revolutions, for example: G04 P1000
... represents the dwell of the spindle.
the duration
one revolution
practical dwell applications in a program, calculated minimum dwell is only mathematically correct not be most practical value to use. It is always and better to round off the calculated value of the minimum example. the G04 XO.I may dwell slightly upwards. 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 round off the
reasoning for this takes inlO considerIt is quite normal that the ation some machining CNC may be running 11 certain job with the perhaps even set at its speed in an override at 50%. Since 50% spindle speed override is minimum on most CNC controls, the double mini· mum will at least one complete of production lime. revolution, without
174
24
NUMBER Of REVOLUTIONS In the other dwell mode (selected the format only to the same, but be much different. In some appJicafor a certain desirable to program a revolutions, rather than for a
In a lathe tion programmed to groov i ng tool to to clean up time in secomlS
~
where ... 60 : : : Number of minutes (translation factor) n :::: Required number of spindle revolutions r/min:::: Current spindle speed (revolutions per minute)
C) Example: To calculate die revolutions, at can be applied: Dwell~
= 60
in seconds for full three of 420 rfmin, the formula
x 3 / 420 = 0.429
The program block die revolutions in terms of following forms:
• System Setting
G04 XO.429
If the control
G04 P429 G04 UO.429
is set to accept the dwell as the number of spindle revolutions, rather than as time in or is very straightforward. All milliseconds, the that is needed is to the dwell command 004, followed by the number of "-u"''' I
"U
G04 >3.0
the required three spintime will take one of
It
a good to backwards and ca1cuthe equivalent ofdwell time, represented as the number of spindle revolutions. Usually, result will not be an innumber and will rounding to the nearest value upwards. The above formula can easily reversed:
G04 P3000 G04 m.o
Each format same result - adwell in the durevolutions. How can we tell from ration of three means time or revolutions? the program whether the We cannol. We have to know the control settings. The only input values of the dwell input. clue may be the rather 3.0 revolutions are shorter than 3.0 secon(]s of dwell. Note that the point is still written, to allow fractions of a such as one half or one quarter of a revolution, for
• Time Equivalent The two modes cannot in one program deliberately and even between the mix is difficult. system parameter can set to only one dwell mode at a time. Since control are normally set for the rather than the dwell exdwell in seconds or mil spindle revolutions, the equivapressed by the number lenllime must be calculated. spindle speed (in rlmin) must always be known in a case. "<>''''''"'''1'1 number
formula:
to be equal to the follow-
Example: confirm that the formula is t'f\MrPI"I use the value of of the previous example the number of revolutions for a d well of 0.429 "".rny",." at 420 rfmin:
""""=....",,,,,, =
420 x 0.429 / 60
3 . 003 revoluJions
confirms the formula is correct. It is more than that the calculation will start with a dwell that js alrounded, for example, to one half of a
""W''''''''"rev '"
420 x 0.5 / 60 .. 3.5 re\l()f.UIj'IJ11S
based on a revoluCNC especially slow spindle A slow spindle nOl have the latitude and does a error in the dwell Keep in not allow mind that the goal is to get ar least one complete part rotation in order to achieve desired Otherwhy program dwell at all? Consider
DWELL COMMAND
Dwell is programmed for one half of a second duration, with spindle rotation set to 80 r/min. The for one half a second
ao
x 0.5 I 60 = 0.6666667
which is less than one complete spindle revolution. The reason for programming the dwell function in place is not honored and the lime has to creased. of 0.5 seconds is therefore not sufficient. The dwell has La calculated, the formula presented earlier: 60 x 1
I 80 =
0.75 seconds
Generally, there is not much use type of calculations - most programming assignments can be handled very well with the standard dwell per time calculations.
LONG DWELL TIME For machining purposes on CNC machines, an unusually long dwell is neither Does that mean long dwell times are not is the programmed time that is well A long dwell above the established average for most normal Lions. Seldom ever there is a need to dwell time during a part machining in excess of one, two, three, or four seconds. The range available on the system (over 27 hours) more important to the nl(lintl'nat1a pnthan to programmer. A~ an example of a typical application when a long dwel1 may,be beneficial, is a program developed by maintenance technicians testing the spindle functionality. carefully the following actual situation common to machine - a spindle of the CNC machine has repaired must be before the machine can baqk to production. The will consist of running the at various for a certain period time of selection. In a typical the maintenance department rea small program, In the machine "'1.1' II,,",".. will rotate 10 minutes aL 100 r/min, then for minutes at r/min. followed by the spindle rotalion at highest rate of 1500 r/min additional 30 minutes. program development is not an absolute since the maintenance technician may do the test by manual methmanual approach will not be very but it serve the purpose of the maintenance test. cases is to Slore testing proceA better choice in dure as a program, directly into CNC memory. maintenance (service) program wi)) be a little different for machining centers than for but the objectives will remain the same.
175 e:>
Example - Machining Centers Spindle test:
S100 'M03 G04 X600.0
SSOO G04 X1200.0 S1S00 G04 X1800.0 MOS
(100 R/MIN mITIAL SPEED) (600 SECONDS IS 10 MINUTES) (SPEED INCREASED TO 500 R/MIN) (1200 SECONDS IS 20 MINUTES) (SPEED INCREASED TO 1500 R/MIN)
(1800 SECONDS IS 30 (SPINDI..:E:
The example for machining centers starts with the initial spindle rotation of 100 rim in. That selection is followed by the dwell of 600 seconds, guarantees a 10 minute constant run. spindle speed is then increased to 500 r/min the dwell lime to 1200 for minutes. last selection is 1500 spindle speed running far 1800 seconds. or 30 minutes, before the spindle stops.
e:>
Example - lathes - Spindle test:
M43 G97 S100 M03 G04 X600.0
SSOO G04 X1200.0 S1S00 004 X1800.0
(GEAR RANGE SELECTION) (100 R/MIN mITIAL (600 SECONDS IS ~o MINUTES) (SPEED DlCREASED TO 500 R/MIN) (1200 SECONDS IS 20 MINUTES) (SPEED DlCREASED TO 1500 R/MIN) (1800 SECONDS IS 30 MINUTES)
MOS
(SPlNDLE
is very similar to one for a mafirst The initial spindle speed range for example. M43. spindle been set to 100 r/min. The of follows,leaving the spindle rotating for full Ja minutes. Then the speed is increased to 500 r/min and remains that for another minutes (1200 seconds). fore the is stopped, one more is done - the spindle speed increases to 1500 r/min and remains at that for another 30 minutes (1800 seconds).
• Machine WarmaUp A similar program (typically a subprogram) that uses a long dwell time is favored by many CNC programmers and CNC operators, to 'warm-up' the machine before running a critical job. This warming activity takes place typically at the start of a morning shift during winter months or in a cold shop. This aImachine to a ambient t",n'lT\Pr",tl before any precisian components are machined. same approach can also be used to gradually the maximum spindle speed for high-speed machining (5000 r/min and up). As usually, all safety considerations must have a high priority in all cases.
1
24
• X Axis is the Dwelling Axis control display screen shows how much time is still the dwell time expires. can by lV'-'!·'.H,,o:. at the X display of the (position) screen of a typical will be as X. regardless of P or are programmed. Why the ,,"',,_ ......._u as the dwelling axis and not any is a reason - because the X axis is the only common to all machine tools - i.e., machines, mills, machining centers. flame cutters, and so on. They all use XYZ axes. (there is no Y axis) and wire EDM uses no Z machines are similar.
• Safety and Dwell reminders have a great degree of caution dwell limes. particularly or '1"1""""''''''' The CNC machine should never be unattended. In case of long for warning signs should be prominently posted to prevent a potentially unsafe situation. If are not someone else should chine serviced, ,,"YPTr''''''''
fiXED CYCLES AND DWELL Chapter of handbook covers the subject of fixed cycles for CNC mach in i ng centers and dri lis in a detail. In-deplh descriptions of all cycles can this For purpose of the current topic, are just some comments relative to the subject of dwell, this time, as the dwell to fixed cycles. Several fixed o
Normally,
o
Also cycles
~
program control!
tool or inspection, lubrication, etc., if absolutely necessary as a manual operation, never
GSB,GS9 and G84, only by parameter setting
cycles is always P, to avoid duin the same block. The address U and the command are never programmed in a cycle - the dwell function is 'built' into all fixed cycles thal allow the dwell (technically all cycles do). dwell time remain the same rules for fixed cycles, as for any machining application. The dwell
Q Example. N9 GB2 Xl.2 YO.o RO.2 Z-O.7 P300 F12.0
live upon motion), but
sel1 must gram execution
can be programmed with a
- 0.3 dwell will become motion along the Z axis (actual
rapid return motion.
If a 004 P.. is programmed as a separate block in a fixed cycle mode, for example between the G82 block and the in that block and the block, no cycle will be definition is not updated. On value of P in the fixed the/latest controls, a system setting enables or disables this usage. If this is used, the command G04 P.. will be active tool rapid motion from location just completed. function will always is out of a hole, in the clear executed while the cutting This feature is seldom
Y~""'lIr~'fl
FIXED CYCLES Machining holes is probably the most common tion, mainly done on CNC milling machines and iog centers. Even in the traditionaJly known for their complex parts, and aerospace components manufacturing, instrumentation, optical holes is a vital part or mold making industries, of the manufacturing nr-r,rp.,~<.: When we think of what machining holes means, we probably think first of such operations as center drilling, spot drilling and standard drilling, using common tools. However, this category is wider. Other related tions also belong to the category of machining holes. standard center drilling, spot drilling and drilling are together with related as tapping. point boring. tools, countersinking even backboring. Machimng one simple hole may only one tool but and complex hole several tools to be Number of holes a given job is important for selection of proper ,..,,.,..,. . . rJ:l'mnnl approach. holes machined with having the same they may even be at combinations are Illd'lUlIl~ one hole may be a ::.111111111;;' many different hole a well planned anu In
of programming applications. hole operaa great number of similarities from one job to another. Hole machining is a reasonably predictable operation and operation that is is an ideal subject to be very efficiently by a For this reason, virtually aU CNC control manufacturers have incorpoingenious for in their control use so the or - morecnmmnnly - Ihefixed cycles.
POINT-TO-POINT MACHINING
method of point-to-point machining for holes is a method of controlling the of a cutting tool in X Y axes at a rapid rate, and in the Z at a cutting feed rate. Some motions along Z axis may also include rapid motions. All this means is that there is no cutting along XY axes for operations. When the tool completes al [ motions the Z axis and returns from the hole to the position, motions to a new X Y axes resume and the Z are repeated. Usually, this of motions occurs at locations. The hole and is by cutting tool Ihe cutting depth is controlled by the part program. method of machining is Iypical to fixed cycles for reaming, tapping, boring and related operations. elementary structure for point-topoint machining can four general (typical drilling sequence shown in example): Rapid motion to the hole location ... along the Xand/or Yaxis
a
Step 1:
a
2:
Rapid motion to ... along the Z axis
o
3:
Feedrate motion to the spe:ClTIl90 depth ... along the Zaxis
o
4:
Return to a clear position ... along the Zaxis
point of the cut
four also I'pn,r.,<:"nr required to program a programming method, without is only one or two holes a is more a program length is of no imporis not the common case - normally, there are in a part and several tools to be used to hole to engineering specifications. Such a difficult Lo inLerprogram could be extremely loug and pret and In fact, it may even too long to fit into 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 is along a single - virtually always cutting lype of machining is commonly known as the Z axis. point-to-point machining.
177
178
25
• Single Tool Motions VS. Fixed Cycles following two compare programming a hole pattern in individual where each of the tool must be as a ~ingle motion and same pattern using a cycle (02502). No explanations lO the programs are at this stage comparison is only a visual Lration between two distinct programming methods, It shows an application of a 03116 standard drill Ihat is used inches. Only holes are to cut a full blind depth of lf1 programmed in the example,
NS G99 GS2 RO.I Z-O.6813 P200 F4.5 N6 X3. S7 Y3. 4 N7 X2. 047 N8 GSa G28 X2.047 Y3.4 ZI.O M09 N9 M30 %
02501 required the total of 18 blocks, even cycles, three only. In program 02502, only nine blocks were needed. shorter program 02502 is also easier to there are no repetitious blocks. The moditications, updates and olher changes can be much whenever required. use cymachining holes, even if a single is machined.
FIXED CYCLE SELECTION
Y3.40 ->-1--+----'
25·1 Simple hale
Y1.89
- programs 02501 and 02502
02501 (EXAMPLE 1) (PROGRAM USES INDIVIDUAL BLOCKS)
Nl G20 N2 Gl'7 G40 GSa
N3 N4 N5 N6 N7 NS
G90 G54 GOO X5.9 Yi.89 S900 M03 G43 Zl.0 HOl MOB ZO.l MOB GOl Z-O.6S13 F4.5 G04 P200 ,_ GOO ZO.l N9 X3. 8'7 Y3.4 NlO GOl Z-O.6B13 Nll G04 P200 Nl2 GOO ZO.l Nl3 X2.047 Nl4 GOl Z-O.6813 Nl5 G04 P200 Nl6 GOO ZO.l MOg Nl7 G28 X2.04'7 Y3.4 Zl.0 NlS IDO
fixed cycles by control turers to eliminate in manual programming and allow an easy program data changes at machine. 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 become modal for the duration of the cycle Lo repeated, and until one or more change. This is usually for location new but other may be for any hole at lime, for more complex holes.
A fixed is called in program a ratory G command. Fanuc and similar control the following fixed cycles: High speed peck drilling cycle
G74
Left-hand tapping cycle
G76
cycle)
GSO Gal G82
Drilling cycle with dwell
G83
Peck drilling cycle
G87
Back boring cycle
GSB
Boring cycle
Ga9
Boring
%
The second hole pattern, but
uses same efficiency.
, , L. " J L
02502 (EXAMPLE 2) (PROGRAM USES FIXED CYCLE)
Nl N2 N3 N4
G20 Gl1 G40 GSO G90 Gs4 GOO XS.9 Yl.89 S900 M03 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, certain boring cycles may be quite suitable for reaming, although there is no reaming cycle directly specified. The next section describes programming format and details of each cyde and uffers suggesliuns fur their proper applications. Think of fixed cycles in terms of their built-in capabilities, not their general description.
PROGRAMMING fORMAT
Z = Z axis end position o Position at which the reedrate ends
The Z depth position can have an absolute value ot an incrementaJ value.
P = Dwell time o
General format for a fixed cycle is a series of parameter values specified by a unique address (not all parameters are available for every available cycle):
IN .. G.. G.. X.. Y.. R.o Z.. P.. Q.. 1.. J.. F.. L.. (or K.. )
o
I
Within the range of Nl to N9999 or Nl to N99999, depending on the control system
G (first G command) = G98 or G99 o
G9a returns tool to the initial Z position
o
G99 returns tool to the point specified by the address R
G (second G command) o
=
G74 Gas
G76
Gel
G86~. GS7
Dwell time can be in the range of 0.001 to 99999.999 seconds, programmed as Pl to P99999999
When used with cycles G73 or G83, it means a depth of each peck
o
When used with cycles G76 or G87, it means the amou nt of shift for bo ring
Must include the X axis shift direction for boring cycles G76 or G87
Ge3 Gag
'--________ Y_=__H_O_le__ p_OS_j_tio_n__in__ Y_a_X_is________
= Shift amount
The I shift may be used instead of Q ~ see above.
J
= Shift amount
Must include the Y axis shift direction for
o
boring cycles G76 or G87 The J shift may be used instead of the Q - see above.
X value can be an absolute or incremental value
~1 1~
Y value can be an absolute or incremental value
o
0
o
x = Hole position in X axis
R = Z axis start position
Q= Address Q has two meanings I'----------------------------------~
I
Cycle number
Ge2 GSS
= 1000 ms)
The addresses I and J may be used instead of address Q. depending on the control parameter setting.
0.9IY one of the following G commands can be selected: G73 Ge4
Programmed in milliseconds (1 second
The dwell time is practically applicable only to G76, G82, G88 and G89 fixed cycles. It may also apply to G74, G84 and other fixed cycles, depending on the control parameter setting.
Explanation of the addresses used in fixed cycles (in the order of the usual block appearance):
___________N __=__ BI_o_ck__n_um __b_e_r__________~ . '-
= Z depth
= R level
________
o
Applies to the cutting motion only
ThiS value is expressed in in/min or mmlmin, depending on the dimensional input selection.
Position at which the cuning feedrate is activated
The R level position can have an absolute value or an incremental value.
s_pe_c_if_i~__t_io_n________~
F_=__F_ee_d_r_a_te__
L (or K) = Number of cycle repetitions Q
Must be within the range of LO - L9999 (KO - K9999) II (Kl) is the default condition
180
Chapter 25
GENERAL tions,
discipline - it means there are jimitaprogramming is not a a lot with it. We talk
are
language programming but about a Fanuc or gramming, a Milsubishi or example. Fixed cycles are
a
GOO Gal x .. Y.. R .. Z .. P .. Q.. L •• F ..
fixed cycle is processed, while in Gal GOO X.. Y.. R.. Z.. P .. Q.. L .• F ••
fixed cycle is JIot processed, but be performed; other values will tion of the F feedrate value, which is
Consider fixed cycles as a set ules - modules that contain a grammed machining instructions. 'fixed" because their internal format cannot These program instructions relate LO predictable tool motion that rpn,""'lc sic rules and restrictions to summed up in the following items:
a
Caution: In case of command .and a motion command of Group in same block, the order of programming those commands is important
Absolute or incremental mode of established before a fixed cycle is anytime within the fixed cycle
uations at all costs! In this chapter, lhe individua1 fixed cycles are in detail and each cycle has an illustration of
can or
structure.
illustrations use shorthand graphic symbols. each with meaning. In Figure 25-2, the meaning of all symused in the illustrations is described. ---"l>
Rapid motion and direction Cutting motion and direction
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 a
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
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:
GSO Z1.125 Gao GOO Zl.125
is the SOJ11eGS or
GOO Zl.12S 01, namely GOO, G01, are the main motion comany fix.ed cycle.
method lated to the point of origin program zero, menIal method, the XY position of one hole is from the XY position of the previous the distance from {he last Z value, one established calling the cycle, to the position where vated. The Z depth value is the and the termination of feed rate motion. At fixed cycle, [001 motion 10 the R will rapid mode,
FIXED CYCLES
181 INITIAL LEVEL
INITIAL LEVEL
/--/
--->t
R
- R LEVEL lO--+-
From the practical point of view. always select this posilion 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 physically above all obstacles. Use the initial level with other precautions. to prevent n collision of the cutting tool during rapid motions. A collision occurs when the cutting tool is in an undesirable contact with the part, the holding fixture, or the machine itself. ~ Example of the initial level programming:
Figure 25-3 Absolute and incremental input values for fixed cycles
The following program segment is a typical example of programming the initiaJ level position:
NQl G90 G54 GOO XlO.O Y4.S Sl200 M03 NQ2 G43 Z2. 0 HO 1 MO B (INITIAL LEVEL AT Z2. 0) Nl3 G98 GBl XlO.O Y4.S RO.1 Z-O.82 F5.0
INITIAL LEVEL SELECTION
Nl4
There are two preparatory commands controlling the Z axis tool return (retract) when a fixed cycle is completed.
G98
.. , will cause the cUlling 1001 10 retract to the inilial position = Z address designation
G99
... will cause the cUlling tool to retract to the R level position R address designatioll
=
G98 and G99 codes are used for fixed cycles only. Their main function is to bypass obstacles between holes within a machined pattern. Obstacles may include clamps. holding fixtures. protruding sections of the part, unmachined areas, accessories, etc. Without these commands, the cycle would have to be canceled and the tool moved to a safe positIon. The cycle could then be resumed. With the G98 and G99 comm\1nds, such obstacles can be bypassed without canceling the1ixed cycle, for more efficient programming. 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.
INITIAL LEVEL
R LEVEL ---++--'-- lO
(Z DEPTH) Figure 25-4 Initial level selection for fixed cycles
N20 GBO
The fixed cycle (G8! in the example) is called in block N 13. The last Z axis value preceding this block is programmed 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 are consistent, or it may be different from one program to another. Safety is the determining issue here. Once a fixed cycle is applied, the initial Z level cannot be changed, unless the cycle is canceled first with G80. Then, the initial Z level can be changed and the required cycle be called. The initial Z level is programmed as an absolute value, in the G90 mode.
R LEVEL SELECTION 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 than once in a single block. Therefore, some adjustment in the control design must be made to accommodate both Z values required for a fixed cycle. The obvious solution is 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 applied. This address uses the letter R. A simplified term of reference to this position is the R level. Think of the R level in terms of 'Rapid to star! point', where the emphasis is Of! 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 maleDepth 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. (Z DEPTH) Figure 25-5 R level selection for fixed
of cutting .£>"",... .. ".'" it is also the Z to which cutting tool will retract upon cycle completion, if preparatory command G99 was programmed. If G98 was programmed, retract will to the level. Later, the G87 back boring cycle will described as an exception, due to its purpose, This cycle not use G99 retract mode, only G98! However, all the R level must be selected carefully. The most common values are .04-.20 of an inch (I mm) above the part ZOo Part setnp has 10 considered as well, and justments to the setting if necessary. L.VL..u."I.
or four R level usually increases about tapping operations cycles G74 G84, to feedrate acceleration 10 reach maximum.
To achieve a of a high quality, always make a cffort to program the calculated Zdepth accuratelyexactly, without guessing its value or even rounding it off. It may tempting to round-off the depth .6979 to .6980 or even to - avoid it! It is not a question of triviality or whether one can away with it. It is a malter of principle programming consislem.:y. With this apand it will be so easier to retrace the cause of a problem, should one develop later.
.:>vv........
for the
c::> Example of Alevel programming: N29 G90 GOO GS4 X6. 7 YB. a S850 M03 N30 G43 Z1.0 H04 MOB (INITIAL LEVEL IS 1. a) N31 G99 G8S RO.l Z-1.6 F9.0 ® LEVEL IS 0.1)
N32 N45 Gao
initial level in the example is in N30, set to .0. The R is set in block N3) (cycle block) as ,100 inches. same block, the G99 command is programmed during the That means the tool will above pan zero at the stall and end of When the tool moves from one hole to the next, it moves along the XY axes only at this Z height level .100 above work. pO.'\ilion is normally lnwPr Ihe initial The R level position. If these two levels coincide, the start and end points are equivalent to initial position. The R is commonly programmed as an value, in but into an incremental mode I. if the application from such a change.
Z depth calculation is Q
Dimension of
on the following criteria:
hole in the drawing (diameter and depth)
o Absolute or incremental programming method o Type of cutting tool used + Added tool point length Q
Material thickness or full
depth of the hole
o Selected clearances above and below material (below material clearance for through holes)
On machining the ZfJ is programmed as top of finished part face. In case, the of Z address will always be programmed as absolute a negative value, Recall the absence of a sign in an axis address means a positive value of that This has one strong advantage. In case programmer to write the !l.lgn, the depth value will automatically .--'·".....'A a positive value. In that case, the tool will the part, area. The move away easily corpart program win not be rected, with only a loss
c::>
of Z depth calculation:
illustrate a practical example Z depth We will use a 0.75 consider the hole detail in Figure inch drill to a hole, with a full depth a standard drill is the tuullip consideration. Its design has a typical 1 to 1200 point and we have (0 add an additional .225 inches 10 the depth: .3 x .75 .225 2.25 + .225 = 2.475
total Z depth of 2.475
G99 G83
can
X9.0 Y-4.0 RO.1 Z-2.47S Q1.125 F12.0
FIXED
81 RO.1 Z0
"""""'7"777"7i--t7:'177""'7'7'7 -
_.."J~<,~~~-,;'-~7"/,fnL/C:/c","-
Z-2.25
ABSOLUTE
INCREMENTAL Figure 25-6 Z depth calculation for a drilling fixed cycle
A peck drilling cycle machining, although for G81, G82 or G73 tion is described in
--++--i-- 20
z- 2.4 75
25-7 G81 fixed
is used in the example for best Z would be the same tool point length calculain Chapter 26.
lVVII~I:IIIV
used for drilling
• Ga2· Spot-Drilling Cycle
DESCRIPTION- OF FIXED CYCLES
Description of Ga2 cycle motion to XY position
In order to understand how each fixed cycle works, it is structure of each cycle important to understand the 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 operaof each cycle will tional sequences. Common also be described. All these details are important a help in understanding the nature of each as well as cycle to select for the best machining As a bonus, the knowledge of the internal structure wiB help in deIn area of cussigning any unique cycles, tom macro programming.
• G81 - Drilling Cycle
WHEN TO Drilling with a dwell tool pauses at the hole bottom. Used for center drilling, spot drilling, spotfacing, countersinking, etc. anytime a smooth is at bottom of hole. Often used when slow spindle needs to be programmed.
If used for boring, the G82 cycle will produce a scratch mark on the hole cylinder during retract.
-<~
G98 (G99) G81 X.. Y.. R..
Step!
5
.
,
G82
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
4
I Rapid retract to initial level (with G98)
or Rapjd retract to R level (with G99)
DWELL
WHEN TO USE 681 CYCLE - Figure 25-7 . Mainly for drilling and center Z depth is not If used for produce a on the hole
a dwell at the G81 cycle will during retract.
Figure 25-8 G82 fixed cycle - typically used for spot drilling
184
Chapter 25
• GSJ - Deep Hole Drilling Cycle - Standard
Step 1
2
Rapid motion to R level
3
Feedrale motion \0 Z deplh by the amount of Q value
4
retract by a clearance value (clearance value is set by a system parameter)
5
Feedrate motion in Z axis by the Q amount plus clearance
6
Items 4, and 5 repeal until the programmed Z depth is reached
7
Rapid retract to iniliallevel (with 098) or Rapid retract to R level (with 099)
WHEN TO USE G73 CYCLE· Figure Rapid motion to the depth less a clearance (clearance is set by a system parameter)
6
Items 3, 4, and 5 repeat until the Z depth is reached
7
Rapid retract to initial level (with 098) or Rapid retract 10 R level (with G99)
WHEN TO
10:
For deep hole drilling, also known as peck drilling, where the chip breaking is more important than the retract of the drill from the hole. The G73 cycle is often used for a long series drills, when a retract is not very important.
The G73 fixed cycle is slightly faster than the cycle, the name 'high speed', because at the time saved by not retracting to the R level after peck. Compare this cycle with the standard deep hole drilling cycle G83,
G83 CYCLE - Figure 25-9 :
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
·:::=d
Figure 25-10 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 (this cycle retracts to R level after each
• 613 - Deep Hole Drilling Cycle· High-Speed
Description of G73 motion to XY position 2
Rapid motion to R level
3
Feedrate mOlion to Z depth by the amount of Q value
When using G83 and G73 in the always have at least a reasonable idea about how many pecks will the tool in each hole. Unnecessary drilling of will accumulate total hundreds or thousands of can very significant. Try 10 avoid lost time. which can too many pecks hole. For predictable results, the number of number of pecks calculation applies equally to both fixed cycles. Calculation the number of in G83 and G73 is on the of the Q <>/""I,.lrp"", and the distance between the R level and Z depth not from the top of part! Dividing this distance the Q value will a number of tool will make at hole location. The number of in a cycle must an integer and fractional calculamust always rounded upwards:
G83 and
FIXED
185
Q Example 1 - English data: G90 G98 GS3
x ..
Y •. RO.1 Z-L4567 QO.45 F .•
In the example, depth is 1.5567 of pecks can be 1.5567
I .45
between the R the Q value is .450, so the
and Z
= 3.4593333
The result has too used as is, because most places for English units units. The result must
Y.. R2,S Z-42.S Q15.0 F ..
example, the between the R level and Z depth is exactly 45 mm and the Q value is ]5 mm. The number of pecks will be 45 exact value of 3. No of pecks executed per
l8.667 18.667 lS.666
Total
56 mm
CUt 1 CUt 2 CUt 3
18.666 18.666 18.666
CUt 4
0.002
Total
56 mm
4 • English
In this example, the distance is inches and four
Q Example 2 - Metric
x..
CUt 1 CUt :2 CUt 3
If the result is rounded to Q I 8.666, the numof pecks will be four and practically no cutting will take during the last peck:
is four, so each hole will reThe nearest higher quire four pecks. The cannot be changed, so only other available to change the number of is to change the R level the depth of each peck. The to top face of part as is practiR level is usually as cal, so there is not much can be done there. That leaves peck. By increasmg this the Q value, the depth of the total number of will be fewer, by ing the Q value, the total number of pecks will be higher.
G90 G99 G73
The result of the must be rounded to 18.667 or 18.666. Although it looks that only on.e (0.00] mm) is at it will make a big difference way the rounding is If only three pecks are round off upwards, (0 Q I
by 15, which equals to and the num-
In order to increase change the current Q
R level and Z are required:
Q : 2.5 I 4 = .625
case, no rounding is uO;;;.... O;;;:>:><11 suit jn exactly four pecks. each of
QO.625 will redepth.
drilling value of Q hole - all pecks in a
cannot be changed will have an equal the possible exception peck. If the amount is greater than the remaining distance to Zdepth. only that will be drilled.
In order to decrease the number of pecks. change the current Q value to a number.
if it is actually cala precise numthe R level The result :><;;,l\:; .... L~~U number of
necessary, the number of pecks may nc','",,,,,P any cycle time benefits.
Q value can be manipUlated in (he Q value skillfully, as an exact position of penetration, This method is
IS
Q Example 3 the distance between R level and Z IS mm. and exactly three pecks are required. The calculation of each peck depth is simple: 56 / 3
= 18.666667
part fixturing, of material and other tool can withstand.
depth of peck~ consider the overfor the job. The setup rigidity, the of cutting tool, the machinability contribute to what the
The goal in gram under That means n .. (\l'f"'~1"n deepest Q amoum thal is reasonable and practical Always jeep in mind that particular job and its 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 initial spindle rotation <>1-", ........."'.... by M03. The tap design must be G84 cycle with M03 "'1-'''-'->\......" Step
motion to R level
hand design for the in effect.
Description of G84 cycle
1
Rapid motion to XV
2
Rapid motion to R
!JV~'l"\.'ll
6
7
eedrate motion to Z pindle rotation stop
WHEN TO
5
Spindle reverse (M04) and feedrate back to R level
6
Spindle rotation stop
7
Spindle rotation (M03) and retract to initial level (with or remain at the R level (with 099)
WHEN TO USE 684 CYCI£ -
Figure 25-12 : hand thread. At the start of die Irotation M04 must be in effect.
various techniques of hole macnrnH""lUn'u""
notes cover only the most important tapand apply equally to both
11 :
Only for tapping a right hand thread. At the start of cycle, the normal spindle rotation M03 must be in
G84
Q
? SPIN ZO
Rlevel should in the tapping cycle than in the other cycles to allow for the stabilization of the feedrate, due to acceleration.
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 must be maintained at all timas.
Q
The override switches on the control panel used for spindle speed and feedrate, are ineffective G84 or G74 cycle prol:ess.mg.
o
Tapping motion even if the feSll:lMla is ", ..",s,.. , processing, for safety reasons.
G98
---i-f---t--
Spindle rotation reverse (M04) and retract to initial level (with 098) or remain at the R level (with G99)
cw
G74 25-11
G84fixed
eXC./USII'IBIV used for right hand tapping
G98
ccw •
The initial
The cycle
- Tapping Cycle - Reverse
of G7 4 fixed cycle is based on rotation - M04. must be of the left hand design for the rotation in effect
.:>1-'111 .....""
cw Figure 25-12 G74 fixed cycle - exclusiveJy used for left hand tapping
CYCLES
•
- Boring Cycle
WHEN TO USE 686 CYCLE boring rough holes or machining operations. This cycle GB 1. The difference is
Step
USE G85 CYCLE· Figure
that require additional cycle is very similar to the
spindle stop at the hole bottom.
NOTE - Although this cycle is somewhat similar to the G81 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.
Rapid motion to XV
WHEN
14 :
13: INDLE CW
boring cycle is typically used for boring and rPRmlfifi 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. 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.
20
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
4
Spindle rmarion stop
5
Rapid retract to initial level (with 098) or Rapid retract to R level (with G99)
6
Shift in by the Q value or shift back in the opposite direction of! and J
7
Spindle rotation on (M03)
8
Feedrate motion to Z
188
Chapter 25
9
Spindle rotation stop
10
Spindle orientation
11
Shift out by Q value or shift by the amount and direction of I and J
12
Rapid retract to iniliallevel
13
or shift
14
Spindle rotation on
Spindle rotation stop (feedhold condition is and the CNC operator switches 10 manual operation mode and a manual then 10 memory mode). CYCLE START will return to normal cycle
5
Shift ill by the Q value
WHEN TO
e rotation on
in the opposite direction of I and J
WHEN TO
G87 CYCLE Figure 25-15 :
is a special cycle. It can only be used for some (not all) backboring operations Its practical usage is limited, due to the ~pecial tooling and Use the G87 cycle only If the costs can be economically. In most cases, reversal of the part in a secondary operation is an option.
CYCLE -
25-16 :
T~e GSS cycle is rare. Its u~e is limited to boring operations With speCial tools that require manual interference at the bott~m of a hole. When such a operation is completed, the tool IS moved out of the hole for reasons. This may be used by some tool manufactures for certain operations.
.I
I G88
NOTE - The boring bar must be set very carefully. It must preset to match the diameter required for backboring. Its bit must set in the spindle oriented mode, facing the opposite direction than the shift direction.
ON G99 --~-:~zo
-~
Q
~--
_----.1.-4-_,(_
Z DEPTH
G98 ONLY ---~-zo
25-16 G88 fixed
. used when manual ""'Il>"""'~" is 'HHlI""'"
. Z DEPTH
• Ga9· Boring Cycle
,
•...SPINDLE START
-- R
figure 25-15 G87 cycle - t:}(GIUSI'VBIV used for backboring
• GSS - Boring Cycle
Description of GSB cycle
Step Rapid motion
(Q
XY position
Rapid mOlion to R level 3
Feedrate motion to Z depth
4
Dwell at the depth - in milliseconds (P .. )
5 6
etract to initial level (with G98) in at R level (with
WHEN TO USE G89 CYCLE Figure 25-17 : 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
~--->---
25-17 689 fixed cycle - 'typically used for boring or reaming
Z DEPTH
figure 25-18 676 fixed cycle typically used (Dr high quality boring
fiXED CYCLE CANCELLATION
• G16 ~ Precision Boring Cycle is a very useful cycle for high quality holes. There are two programming formats available for the precision fixed cycle G76 the first one Q) is much I and 1): more common than the second one
Any fixed cycle is active can be canceled with the GSO command. is automatically transferred to a rapid mOltlon GOO: N34 GSO N3S XS.O Y-S.75
Block N35 does not plies it. This is a
the rapid motion, it only improgramming practice, but speci-
fied GOO as well may be a personal choice, although not necessary: N34 GSO N3S GOO XS.O Y-S.75 milliseconds
(P~)
(ifused)
N34 GBO GOO XS.O Y-S.7S
6
cases,
7 8
Both of the examples will prOiaU(~e identical results. even be a choice. second version of the A combination of the two is a choice:
I and J retract to initial level (with or remain at R level (with G99)
rather small, but cycles. Althe cycle, it is a though GOO without G80 would poor programming practice that should be avoided. are very important to
------------------~
FIXED CYCLE REPETITION 10
WHEN
When a selected frxed cycle is pro,granmrled
676 CYCLE - Figure 25-18 :
cycle is processed once at vvJ.J,......... u:v....... tion within a part. This is the the assumption that most holes In the CNC program, there f'r.rnn"\'''nr1 that would indicate cycle. That is true, the cornmana it In fact. the """"'11".,..,,,1"11"'' ' is to be done just once LLVLJLLL
Boring operations, usually those for hole finishing, where the quality of the completed hole is very important The quality may be determined by the hole dimensional accuracy, its high surface finish, or both.
The G16 parallel to
is also axes.
to
holes cylindrical and
190 Normally, the control system will execute a cycle only once at a given location - it this case, there is no need to program the number of executions, since the system defaults to one automatically. To repeat the fixed cycle limes (more than once), program a special command that 'tells' CNC system how many times you want the fixed cycle to be executed.
• The L or K Address The command that specifies the number of repetitions (sometimes called loops) is programmed with the address Lor K some controls. The L or K the fixed cycle repetition is to have a value which is equivalent to a program statement LI or LI or Kl address does not have to be specified in the program For example. the sequence, N33 G90 G99 NJ4 G81 X17.0 Y20.0 IDS X22.0 N36 X27.0 N37 X32.0 N38 GBO •••
call of the following drilling
RO.1S z-2.4 F12.0
is equivalent to: N33 N34 N3S N36 N37 N38
G90 G99 ••. G81 X17.0 Y20.0 RO.15 Z-2.4 F12.0 Ll (Kl) X22.0 Ll (Kl) X27. 0 Ll (Kl) X32.0 Ll ) G80 ..•
examples will provide the control system with instructions for drilling four holes in a straight row - one at the location of X 17.0 Y20.0, the other holes at locations X22.0 Y20.0 and X27.0 Y20.0, and X32.0 Y20.0 respectively - all to the depth of 2.4 Inches.
If the L or K in is increased rather added to the first example), for instance. from L I to (or KILO K5). the fixed cycle will be repeated times
at hole location! is no need this type ma.chining. By changing the formal only a Htlie, the fixed cycle repetition can be used as a benefit - to make the more powerful N33 G90 G99 ... N34 Gal X17.0 Y20.0 RO.l Z-2.4 F12.0 N35 G91 XS.O L3 (K3) N36 G90 GSO GOO •..
With that change, the advantage of a feature 'hidden' in the first example is emphasized equal increment (ween holes being exactJy inches. By using incremental mode, on a temporary basis in block N35 and employing the power of the repetitive count L or K, the CNC can be shortened dramatically. This method a large number of hole programming is very efficient patterns in a single program. A fwther enhancement is (0 combine the L or K count with or macros.
• LO or KO in a Cycle In previous discussions, default for a fixed cycle repetition was specified as Ll or Kl, that does not have to be specified in the program. Any L or K value other than L 1 or K] must always be specified, within the allowable of the Lor K address. Thllt is between LO and or KO and K9999. lowest word is LO or KO - not or KI! Why would we ever program a fixed cycle and then say 'do not do iT>. The address LO or KO means exactly thaL - 'do not execute this cycle '. full benefit of the LOIKO word will apparent in the examples listed under the section for subprograms, in Chapter 39.
By programming the LO or in a fixed what we are really saying is not 'do not execute this cycle', but 'do not execute the cycle yet, just remember the cycle las for future use '. most machining, fixed cycles are quite simple to They do, however, have some complex to be in an efficient manner a single hole.
,.MACHINING HOLES good chance that the majority of programs machining centers machining of at least one hole, probably more. From a spot drill to reamIng, and a complex backboring, the field of hole very large. In we at many available machining, and learn a drilling and . and sinThe most common type of hole chining centers is in the area of drilling, A typical and single point may bc to centcr drill or spot drill a drill them, then or bore them. Machining even a single I to 089, hole will the fixed G73, G74 and all described in Ltll.U"'"
SINGLE HOLE EVALUATION even a hole on a aJ I reto be programmed. Before that, cutselected, speeds and applied, the best setup and many other must be resolved. Regardless of exact start with a thorough evaluation relates to the drawing data. will usudefine the material to machined, the hole location its dimensional Holes are often described, rather than dimensioned the programmer has to lhe missing details. 26-} shows a medium cornDlexity hole that can be using a CNC machine.
, /
1"", . ., . . . . . . . ."
How many tools will be needed? What about center drilling to maintain exact location Is the spot drill a What about drilled hole for lapping? What about the hole trdtl'r"'"I'J>(O What about ... ?
• Tooling Selection and Applications on the drawing information alone, it may seem only two tools will be needed to program this hole. In reality, the implied information must interpreted - it is not the the drawing to how to machine the hole - only the hole requirements related to functionality and A CNC machinist will most likely four tools machining are selected, tool could be a 90° spot drill, followed up by the tap drill. the through-the-hole drill and finally, tap. A center drill may instead of the spot drill, but an additional tool will be to chamfer the hole at the top. All choices to be sorted. For this example, the following four o
Tool 1 • TO 1 • 90 0 spot drill (+ chamfer)
o
Toal2· T02 -
o
Tool 3 - T03
LJ
Tool 4 - T04 - 7/16·14 UNC tap
Utap drill
are used:
,VJ .•>UUI
5/16 drill (through the 1'TI,n.,,,',,,,,
Tool f - 90 0 Spot Drill
Xy 1020 26·1 Evaluation of a single hole -
All the relevant information is in the but some is needed. details and hole location X3.SYS.0 was in the drawing, as -mild program will La top face of part. and tapping operaare obvious, but is that all there ta know?
IJU"~l1""1II1U
L
The fust tool will be a 90° spot drill. Its is duaJ - it will act as a drill and starts up at a highly A center drill or a drill are accurate XY 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 at the top of the hole, the chamfer to spot drill diameter is larger than the chamfer qulred. In this case, a 05/8 spot drill will be to chamfer the 07/16 hole.
example 02801
191
192
26
is selected, its cutling calculated, not to chamfer for a tap size 07/16 (0.4375), to be enlarged by .015 (.03 on diameter), to the .4675 chamfer diameter. shows the relationships of the hole to the tool ters and
26-2
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, T02 (letter U drill) will yield approximately full thread depth. of the thread found in catalogues all tap manufacturers. for the 7/16-14 tap: these are the
......~ -.....,,....... 00.625 SPOT 0.015x45"
0.2338
or
Z-O. 2338
Drill point length is
3/8
.3750
67%
v
.3770
65%
stock, 75 to 80%
the bolt by only for
the depth of cut will diameter (0 x
programmed Z depth the tap drill has to be deep to guarantee the full thread depth of .875. means the full diameter of drill has to reach a little deeper, for example, to That allows the end c.hamfer length of the tap (0 the full lap depth of specified in the shows the lap drill values graphically.
.4675 I 2 .4675 x .5
75%
thread depth is recommended, for 100%. A thread (hat
Figure 26-2 Spot drill operation detail TD 1 in program 02601
or
.3680
In genera] terms, for thin
00.4375 TAP :--....,. .~ 00.4675 CHAMFER ii-"--<-'l······
Note, that for a 90° one half of the
u
.23375
later in this chapter.
Tool 2 • Tap Drill
(U)
will have to be a drill. In the exused the job - one the the other one for lap is - which one first?
f
I 0.975
II certainly does matter drill is programmed first. The key here is the the two drill diameters. 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.
1.5
26·3
drill
Now comes the question of question is called a tap It is hole of proper size the lap that machining operation
detail- T02 in program 02601
In
will create a depth) that can be of operations. tapping, it makes a
actual programmed depth for the tap drill will have to into consideration one more factor ~ drill poim lenRth. drill or - 1001- point length is abbreviated as or just by the letter P. This Cmlp[(~r
MACHINING
table showing "" ... r"'1:" mathematical constants to calculate drill point most common constant uses the drill diameter by .300, a 1180 drill point angle:
(.975+.111), will provide the 1.086.
Adding the two pro.grammed Z TODIJ -
most through-hole applications, this value will not be - some extra clearance has to be added, applied to the tool penetration (breakthrough), say fifty (.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 the through drill depth will be: UJVIUi)<1'
1.5 + .094 + .05
DrjJJ
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 standard drill. As for the cutting depth of through drill. some simple calculations are needed. do the calculations, Ine required hole depth known, which is 1.5 inches in example. Then, the calculated drill can be added to the drill clearance.
to be made. Re~ been used to predrill an means a smaller tool of 0.3125 is hole. The drilling can start from than from a clearance above the part. R value is used and selected at R-0.986, 100 above the bottom of the ing hole. 10014·
drilling operation are il-
The '-.;
6
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 14 threads (1114::::: .0714 pitch). Anytime a tapping 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 the tapped hole. If there were through-hole is no through-hole, we would have a blind hole (solid bottom). and if were the same size as the tap drill, we would through hole.
=
THRU
1.086 1
for the Z depth calA through-hole is culation, closely hy semi-through hole. A blind hole has very little latitude, if any, and has to be programmed with a maximum care.
~.
P = 0.094
Figure 26-4
drill operation detail- T03 in program 02601 First, evaluflte the drill point length P It is
relationship of two given values - the drill drill pOint angie. For a standard 05116 that has 118 0 drill point angle, the 0.300 constant is used length of the drill point Pis: P
.3125 x .300
= .09375
=
.0938
the through hole in the example, 1.5 inches calculated depth to the
.094
The example drawing for the hole for the tap depth of .875 inches. This is the full depth the thread. Full depth of a thread is the actual distance a screw or a nut must travel before stopping (before programmed depth is, if fact, an exteruled depth, which must be greater than the theoretical depth, in to calculate the length of the chamfer design (its type in the tapping Zdepth is and can be optimized not a calculation but an 'intelligent nOI much that can be done and This completes the section on tooling a typical hole and provides enough data to Some of the procedures used in the now be explained in more detail.
• Program Data In the example, only one hole is machined. If more holes the following are needed, they can be added by the program inprogram. For one hole llsed in the cludes all considerations for spindle should be empty at the 02601
ma drilling is a removal of same material removal is (on milling systems) or by turning sysu~rns). In either case, a a application is possible. loose sense word. drilling operations also cover the extended areas of reaming, tapping and single point Many programming principles that apply to drilling lions, can be equally applied to all the related operations.
• Types of DriUing Operations The drilling {",\"'~'r':lrl{"'\n is determined by either the
By the type of
- LE'TTER U DRILL - 0.368 DIA - .... ~~J
NlO Nll Nl2 Nl3 Nl4 Nl5 Nl6 Nl7
'1'02 M06 G90 G43 G99 G80 G28 MOl
(Tal Nl8 '1'03
G54 GOO X3.5 YS.O S1100 M03 T03 ZO.l H02 MOS G83 RO.l Z-1.086 00.5 F8.0 Zl.O M09 Zl.O M05
G90 G43 G98 GBO G28 MOl
('1'04 N:26 '1'04 N:27 M06 N:28 a90 N:29 G43 NlO G99 Nll GSO Nl2 G28 N33 GOO Nl4 mo
By the type of hole:
Center drill
Through hole
Spot drill
Chamfered hole
Twist drill (HSS, cobalt, etc,)
Semi-blind hole
Spade drill Carbide indexable drill Special drill
DRILL THROUGH - 0.3125
i "
.....=
Blind hole Premachined hole
II
...
• Types of Drills
N19 M06
N:20 N:21 N:22 N:23 N:24 N:2S
of
hole or the rype
GS4 GOO X3.S YS.O 81150 MO] ZO.l H03 MOS G81 R-O.9B6 Z-1.644 FB.O Zl.O MOg Zl.O MOS TAP)
G54 GOO X3.S Y5.0 S750 MOl '1'01 ZO.4 H04 M08 G84 RO.4 Z-0.9 F53.57 (F = S x LEAD) GOO Zl.O M09 Zl.O M05 X-l.O Y10.O (PART CHANGE POSITION)
and by their oldest most common is aJwist drill, usually made of high Twist drill can also be of cobalt, carbide materials. Other drill deinclude spade drills, center drills, spot drills and indexable insert drills. distinction in size is not only between metric and English drills. but also a finer distinction within the category using English All drills are designated in millimeters. Since the (imperial) dimensioning is based on inches (which is dimensional unit), finer distinctions are dimensions of standard drills in English units are divided groups: Drills are
o FRACTIONAL SIZES:
%
This rather "'.... '''.un,''"' single hole gramming
shows that even a simple and a great deal of
DRILLING OPERATIONS
1/64 minimum, in diameter increments of
o NUMBER SIZES: Drill
o
SIZES: Drill
a good lIlustration of what The example 02601 kind of programming machining conditions are neceslook at the details of drillsary for a Iypical hole. ing operations in t:Tpnpr"" as they relate 10 various lools.
number 80 to drill size number 1
letter A to drill size letter Z
Metric do not need any special U''''Ll' ",LJ'U" ,,,,. English a listing of the standard drills and mal equivalents is available from many sources.
MACHINING HOLES
•
195
Programming Considerations -.
A standard drill has, regardless of size, two important features - the diameter and the point angle. The diameter is selected according to the requirements of the drawing, the tool point angle relates to the material hardness. They are both closely connected; since the diameter determines the size of the drilled hole, the tool point angle detennines its depth. A smaller consideration is the number of flutes, which is normally two.
•
Nominal Drill Diameter
The major consideration for a drill is always its diameter. Normally, the drill diameter is selected based on the information in the drawing. If the drawing calls for a hole that needs only drilling and does not need any additional machining, the drill is a standard drill. Its diameter is equivalent to the size specified in the drawing. A drill size of this kind is called a nominaL or 'off-the-shelf' size.
Most applications involve holes that require other specifications in addition to their diameter - they include tolerances, surface finish, chamfer, concentricity, etc. In those cases, a single regular drill cannot be used alone and still 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 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 specifications. These tools cover boring bars, reamers, chamfering tools, end mills and others. Using these tools does mean more work is involved, but the quality of the finished part should never be traded for personal conveniences.
During the cut, the drill angular end will be gradually entered into the part, creating an increasingly larger hole diameter, yet still smaller than the drill diameter. At the end, (he largest machined diameter will be equivalent to the effective diameter of the drill used. The effective drill diameter defines the actual bole diameter created within the zone of the drill end point. Typical use of this kind of machining is a spot drilling operation for chamfering. The spindle speed and feed must be calculated according to the effective drill diameter. not the full diameter. The rlmin for the effective diameter will be higher and the feedrate lower than the corresponding values for the nominal drill size. For this kind of jobs, selection of a short drill for rigidity is advised. Drill Point length
•
The second important consideration is the length of the drill point. This length is very important to establish the cutter depth for the full diameter. With the exception of a flat bottom drill, all twist drills have an angular point whose angle and length must be known in programming. The angles are considerably standard and the length must be calculated rather than estimated. because of its importance to the accurate hole depth - Figure 26-6.
r-
QJO
j
A
:;;:
Tool point angle
~I
p
:::
Tool point length
--j
00
1
Y
p
:::
Drill diameter
Figure 26·6 Tool point length data for a standard twist drill
•
Effective Drill Diameter
In many cases, a drill is used to penetrate its/ull diameter through the part. In many other cases, only a small portion of the drill end point is used - a portion of the angular drill tip - Figure 26-5. NOMINAL DRILL DIAMETER
On indexable insert drills this length is different, due to the drill construction. The indexable drill is not flat and its drill point length must also be considered in programming. A tooling catalogue shows the dimensions. The drill poinllength can be found quite easily. providing the diameter of the drill (nominal or effective) and the drill point angle are known. From the following fonnula and the table of constants, the required drill point length for standard drills can be calculated. Basic fonnula is:
I
J PROGRAMMED DEPTH (P)
tan ( 90 -
J
EFFECTIVE DRILL DIAMETER Figure 26·5 Nominal and effective drill diameters (tvvist drill shown)
p ==
~
-
A
2
2
where ... p
A 0
= = =
Length of the drill point Included angle of the drill point Diameter of the drill
) x
D
1 same formula can be mathematical constant (fixed
P
:::::
K
=
and used with a drill point angle):
Drill point length Drill diameter Constant (see the following table)
o =
most common constants are listed in this table:
Tool Point Angle (degrees~
Constant
60
,866025404
82
,575184204
.575
90
,500000000
.500
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 value is sufficient all programming value of the constant K value is .300430310. constant value advantage of being easy to memorize and there is no formula to solve. For most johs, only three constants are For 90° (spot drilling materials), 118 0 (standard materials), They are easy to memorize: and 135 0 (hard o
0.500
o
0.300...
o
0.200
for a 90 0 drill angle
a 118
0
•
120 drill angle 0
for a 135° drill angle
• Center Drilling Center drilling is a machining that provides a small, concentric opening for a tailstock or a pilot drill. Chamfering is not recommended hole for a a center 11. because of the 60° of the tool.
The most common tool center drilling is a 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 the center drill For some at ions. such as a tool with a called a spot drill, is a choice. Many programmers estimate the depth of a center drill, rather than calculate it. Perhaps a calculation is not necessary for a operation. What is a ......"VJJ,.v ..... compromise guessing and calculating is a in Figure 26-7. similar to
D
D1
Figure 26-7 Standard cemer drill cutting depth table· #1 to #8 plain type L is the of cut for an arbitrary effective diameter D
are all dimensions for size center drills. most important of them is cutting depth L. Its calculation been D. on an arbitrary selection of the #5 center drill has the depth value L that is based on an arbitrarily chamfer dia· meter D inches. These values can be modified as or a different table can be A similar table can for metric center
• Through Hole Drilling a hole through the common oprequires the Zdepth to materia] thickness, 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 C
P
N93 GOl Z-1.475 Fo.O or - in case of a fixed N93 G99 GS5 XS.75 Y8.125 RO.1 Z-1.47S F6.0
1
I
F
I
T p
Metric holes are treated exactly the same way. example, a 16 mm drill is to full diameter depth of 40 nun. The calculation uses the same constant as the In units: 40 + (16 x .300) = 44.8
The depth Figure 26-8 Drill depth calculation data Through hole (top) and Blind hate (bottom)
in the drawing will have to
ex-
tended by the calculated drill point length.
programmed block will have the Z axis value equal to the total of the 40 mm specified depth, plus 4.8 mm calculated point length:
In Figure is shown {hat the programmed for a through hole is the stun of the material thickness that is equivalent to full diameter depth F, plus the breakthrough clearance C, plu~ tool point length P
N56 GOl Z-44.8 F150.0
example, if material thickness is one inch and standard dril1 diameter D is of an inch, programmed including a .050 clearance, will be:
NS6 G99 GSl X21S.0 Y175.0 R2.5 Z-44.8 FlS0.0
1 + .050 +
x •
1. 2375
Pay attention to table, vise, leis, fixture, machine table, when programming the tool breakthrough clearance. There is usually a very space below bottom face of parI.
• Blind Hole Drilling major difference between drilling a blind hole and a drill does not penetrate the material. through hole is that Blind hole drilling not present any more problems than a through hoJe drilling, but use a peck drilling method for holes. Also a choice of a different drill geometry may the and the hole cleanup may often be necessary as well. In a shop depth of a blind hole is given as thefull diameter depth. The drill point length is not normally considered to be part of the depth - it is in addi· rion to specified depth. In Figure 26-8, the programmed depth a blind hole will the sum of full diameter depth P, plus the point length P. an example, if a drill (0.750) is used to drill a full diameter hole depth of ] .25 of an inch, the prodepth be:
If the depth appears in a fixed the same depth value will be used, although in a different format:
When machining blind holes, the cutting chips may clog the holes. This may cause a problem, especially if is a operation on the hole, for example, reaming or tapping. Make sure you include a slop code MOO or MO I before this operation. if the program is hole will have to be cleaned every ·-executed. Otherwise, more efficient optionaJ program Slop MOl is sufficient.
• flat Bottom Drilling bottom hole is a blind hole a bottom at 90° to drill centerline. are two common methods of programming a hole. A good practice is to use a standard drill to start the hole, use a flat bottom drill of same diameter and the hole to full depth. Also a good choice is to use a slot drill (also known as the center cutting mill), without predrilling. This is best method, but some tool may not be To program a flat bottom hole using a slot drill is quite simple. For example - a 10 mm hole should be mm deep (with a flat bottom). Using a 010 mm slot drill, the program is quite short (tool in spindle is assumed): 02602 (FLAT
~
- 1)
N1 G21 N2 G17 G40 GBO N3 G90 G54 GOO X.• Y.. 5850 M03
N4 G43 Z2.5 HOl
~e
198 N5 GOI Z-25.0 F200.0 N6 G04 XO.S N7 GOO Z2.5 M09 NB G28 Z3.0 MOS N9 M30 %
A fixed cycle could be used instead and other improvethe is correct as is. ments added as well. next example shows a program for two tools a 112 standard drillllnd a 112 inch flat bottom drill. The required finished depth is Z-0.95 at the flat bottom: 02603 (FLAT BOTTOM - 2) ('1'01 - ~ INCH STANDARD DRILL) Nl. 020 N2 017 G40 G80 '1'01 N3 M06 N4 G90 G54 GOO X .. Y•• S700 M03 T02 N5 043 ZO.1 HOI M08 N6 G01 Z-O.94 F9.0 N7 GOO ZO.l M09 N8 G28 ZO.l N9 MOl
('1'02 - ~ INCH FLAT BOTTC'IM DRILL I END MILL) Nl.0 '1'02 NIl M06
Nll Nl.3 Nl4 Nl.5
G90 G54 GOO X.. Y.. S700 M03 '1'01 G43 ZO.l HO.2 MOS GOl Z-0.74 F15.0 Z-0.95 '1!7.0 NI6 004 XO.S Nl.7 GOO ZO.l Ma9 Nl.B G2B ZO.1 MOS Nl9 mo %
are three blocks special in program 02603. first block is N6, indicating the depth of standard The drill stops short the full depth by .010 an inch. Z-0.94 is programmed of the A little experiment as to how short may be worth it. A reason for not drilling to full depth with the standard is to prevent possible mark at the hole center. The other two blocks appear in the second tool of the gram - blocks N] 4 and N 15. In block N 14, the flat bottom drill at a heavier to depth of only .740 inches. That makes sense, as is nothing to cut for the flat bottom drill for almost of an inch. Follow the calculation of the 0.740 intermediate depth from this procedure: From the total depth of .94 cut by the standard drill (TO 1), su blracl the length of the tool point P. That is for a 118 0 drill point angle 0.5 drill. The is .79. the result. subtract .05 for clearance, and the is the Z value of Z-0.74. In the block N15, the flat bottom drill removes the material left by TO I, at a suitable CUIting feedraLe, usually programmed at a slower rate.
Chapter 26
From the machining viewpoint, programming a center drill or a spot drill first to open up the hole may be a better choice. This extra operation will guarantee concentricily 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 rigid and can do the job much better.
• Indexabla Insert Drilling of great productivity improvement tools in muLlem machining is an indexable insert drill. drill uses carbide inserts, like many tools for milling or It is to drill holes in a solid material. It does not center drilling or spot drilling, it is with high spindle speeds and relatively slow feedrales and is available in a variety of sizes (English and metric). In blind most cases, it is used for through holes, holes can be drilled as well. This type of a drill can even be used some light to medium boring or facing. The of the indexable driB is very precise, assuring constant rool length, as well as elimination of regrinding dull tools. Figure 26-9 sbows the cutting portion of a typical indexable drill.
r,
D = DRILL DIAMETER H = DRILL POINT LENGTH Figure 26-9 CUffing end of a typical indexable insert drifJ
In the illustration, D of drill is the hole produced by the drill. The point length H is defined by the drill manufacturer and amount is listed in the toolcatalogue. example. an indexable drill with the D of 1.25, may have the H tip length .055. The indexable drill can be used for rotary and stationary applications, vertically or horizonlally, on machining centers or lathes. For penormance, coolant should be through the drill, particularly for tough materials, sure The coolant not only long and horizontal disperses the generated heat, it also helps flush out the chips. When using an indexable insen drill, make sure is power at the machine The power requirements at the spindle increase proportionally with indrill diameters. On a machining center, the indexable drill is mounted in the machine spindJe, therefore it becomes a rotating tool. In used in a spindle this the drill should
MACHINING HOLES
runs true - no more than .0 J0 inch (0.25 mm) (Total 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 ant, and special adapters are available for through the hole cooling, when drill is on machining centers. On a CNC lathe, the indexable drilling tool is always stationary. correct requires (he drill is tioned on the center and concentric with the spindle centerline. concentricity should nol exceecl JlO') inch (0.127 rom) T.l.R. exercise care when operation starts on a ""rl'",..,. that is not flat. For use 1IIU't;)I.
199
PECK DRilLING Peck drilling is aJso interrupted cut drilling. It is a drilling operation, using the fixed cycles G83 (standard peck drilling cycle) or G73 speed peck drilling cycle). The difference between two cycles is tool retract method. In the retract each peck will be to the R (usually the hole), in there will only be a relract (between .02 and .04 inches). Peck drilling IS often used for holes that are too deep to drilled with a single tool Peck methods standard several opportunities to improve techniques as well. Here are some possible uses of drilling methods for machining holes:
o Oeep
drilling
o Chip - also used short holes in materials o Cleanup of chips accumulated on the flutes of the drill 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 peck. value specifies the actual depth the Q the more pecks will generated vice versa. most deep hole dril1ingjobs, the exact number pecks is not important, are cases when the pecking cycle needs to be
• Typical Peck Drilling Application
Uneven entry or exit surface for indexable drills feedrate: F :::: normal feedrate, F/2 reduced feedrate (Dne half Df F)
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 depth. cycle may programmed like this: 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 indicates the area that requires a reduced For the feed rate , programming one haJf normal is sufficient In illustration, the a shows a lilted surface (inclined the b shows an uneven surface, the c and d show convex and concave respectively.
These programming values are reasonable for the hand - and that is that matters. For most jobs, the is not too
• Calculating the Number of Pecks If the number of pecks the G83/G73 cycle will is knowledge of how important, it has to be calculated. Q a given tomany pecks will result with a 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
Ilir'
26
result 1.339/3 is -a that to be rounded to the maximum of four decimal places (English units). Mathematically correct rounding to four decimal places will be Follow individual peck depths to see what will happen:
where ... Pq
Td
a
Peck 1 Peck 2 Peck 3 Peck 4
Number of pecks ::::: Total tool travel distance = Programmed peck depth
For example. in
following GR1
N73 G99 Ga3 x .. Y•. RO.12S Z-1.225 00.5 F12.0
divided by .$00, distance is 1 pecks can onty Since the which yields positive, the nearest higher integer will be the actual number of pecks, in this case 3.
• Selecting the Number of Pecks Much more common is the programming of a If only a certain number of pecks will do number of the job in the most efficient way. Q value has to be calculated Since the Q value specifies·the depth each peck not number pecks, some simple math will be nccd~d to select the depth Q. so it corresponds to the number of For example - we require 3 pecks in the following cyclewhat will the Q depth N14 G99 G83 x •• Y.• RO.l Z-1.238 0 •• F12.0
The total drill travel from the R 1.338. To calculate the depth one: mula is similar to the
to the Z depth is
Q value, the new
.4463 .4463 .4463 .0001
accumulated depth accumulated depth accumulated depth .. . accumulated depth .. .
.4463
.8926 1.3389 1.3390
will be four pecks and the last one only cut .0001 - or practically nothing at alL those cases, where the last cut is very small and inefficient, always round the calculated Q upwards, in this case to the minimum of .4464 or even to .447: N14 G99 Gsa
x..
Y.. RO.l Z-1.239 00.441 F12.0
Always remember, cutting tool will never go past depth in a very programmed Z depth, but it could reach inefficient way that should be corrected.
• Controlfing Breakthrough Depth Less frequent programming method, also very powerful, the breakthrough is to use the peck drilling cycle to of tbe drilllhrough the material, regardless of the drill size or material thickness. Here is some background. In many the tough materials, when the drill starts tom of the part (for a through hole), creates potentially the tendency difficult machining conditions. The drill to push the materia! out rather than cut it This is most common when the drill is a little dull, the material is tough. or the feed rate is fairly adverse conditions are also the lack luthe result of heat generated at the drill brication reaching the drill cutting edge, worn-off flutes 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'
r-
where
a Td p.
=:
:::::
Programmed peck depth Total tool travel distance Number ofrequ ired pecks
Using the above formula, the result I QO.446: Therefore, G83 block Q depth will
RO.1 is .446.
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 has very slightly:
have a distance
N14 G99 Gal x .. Y•. RO.l Z-1.239 Q.. F12.0
00.925
0.75
I
I
0.05
J .~ . ::::::~¥~~. ;::~
Z-0.825
P =0.15 Figure 26-11 Controlled breakthrough of 8 hole using 683 peck drilling cycle
MACHINING
Peck drilling cycle G83 is great for it, but the Q depth eulalion is extremely important. The total number of peeks is not important, only the last two are for this with the drill pose. To control the problem tration, only two peck motions are needed. illustration sllOws tile two positions a 0112 dril1 drill through 113/4 thick plate. most jobs, a hole requires no special treatment. Just one ctrt through (using G81 cycle) and no drillLet'S/evaluate Ihe solution to situation. The has point length of .300 x .500 = .1 Take one half (.075) of the drill point length as the first amount, which will bring the drjl\ .075 below the 3/4 thickness, to (he Z depth of Z-0.825. This depth has to be reached with value of{he Q depth. in mind that the from the R Q depth is an incremental value, level, in this case RO. J. That specifies the Q depth as QO.925 (.100 above .825 below ZO). The Z depth is the final drill depth. If .05 added below the plate, the Z depth will be the sum of the plate (.05) and tbe drill point thickness (.75), the (.150), the program value of G99 Ga3 x .. Y.. RO.1 Z-O.9S QO.925 F •.
does not only solve a particular job related problem, it also shows how creativity and programming are complementary terms.
REAMING The ream operations are very to the drilling operations, at least as far as the programming method is concerned. While a drill is used to make a hole (to open up the hole), D reamer is used to enLarge an existing hole, Reamers are either cylindrical or tapered, usually deof different configurawith more than two tions. of cobalt, carbide with brazed carbide lips. reamer design has its advantages and Carbide reamer, for example, has a resistance to wear, may be not economically justified every hole. A high speed steel reamer is economical, but wears out much that a carbide reamer. Many jobs do nol accept any compromise in the tooling selection and cuning 100\ has to selected correedy for a given job. Sizing and finishing such as a reamer, have to be even more carefully. Reamer is a sizing tool and is not designed for removal of heavy stock. During a reaming operation, an existing hole will be - reamer will an existing hole to close erances add a high quality finish. Reaming will not guarantee concentricity of a hole. holes requiring both high concentricity and tight center drill or spot drill the hole firsl, then drill it the normal then rough bore it and only then finish it with a reamer.
201 A reaming operation will require a coolant to help make a during cutbetter quality finish and to remove ling. Standard coolants are quite suitable, since there is not very much heat generated during reaming. The coolant also serves in an additional role, to flush away chips from the part and to maintain surface finish quality.
• Reamer DeSign In terms of design, there are two of a reamer that have a direct relationship to the CNC machining and programming. The consideration is the flute design. Most reamers are designed with a left-hand nute tion. This design is suitable to ream rhrough holes. During the the left-hand flute the to the bottom of the an empty space. holes that have to be reamed, the len-hand type of a reamer may not suitable. other factor of the reamer design is the end chamfer. to enter an existing hole that i5> ~till without a reamer end chamfer, a allowance is required. provides that allowance. Some reamers also have a short the same purpose. The chamfered taper at their is sometimes a 'beveUead'and its chamfer an 'attack angle'. Both have to he considered in programming. In
• Spindle Speeds for Reaming Just like for standard drilling and other operations, the spindle speed for must closely of material being Olher factors, such to the as the part setup, its rigidity, its and surface finish of the completed hole, etc., each contributes to spindle rule, thc spindJe speed for will reasonable use a modifying factor .660 (213), based on the speed used for drilllng of the same material. example, if a speed of 500 r/min produced drilling conditions, the two thirds (.660) of that reasonable for r",,,,rn,,..,,,·
500 x .660 = 330 r/min
Do not program a reaming motion in the reversed spindle rotation - the cutting may or dull.
• Feedrates for Reaming The reaming are programmed higher than those used for drilling. Double or triple are not unusual. The purpose of the high feedrales is to force the reamer to cut, rather than to rub the material. If the is too slow, the reamer wears out rapidly. slow feedrates reamer actually tries to encause heavy pressures as the hole, rather than remove stock.
202
Chapter 26
• Stock Allowance
SINGLE POINT BORING
material left for must be smaller (undersize) than pre~drillcd or pre-bored hole - a logical requirement. Programmer decides how smaJler. A stock too small reaming causes the premature reamer wear. Too much stock for reaming the and the reamer may break. A hole to be
A good is to about 3% of reamer diameter as the stock allowance. This applies to the diameter· not per side. For example, a 3/8 reamer (0.375), will well in most conditions if the hole to be has a diameter close to .364 inches: .375 -
(.375 )( 3 / 100)
.36375 '" .364
Most often, a drill that can machine the required hole diameter exactly will not be available. That means using a boring to the hole reaming. It also mean an extra cutting tool, more setup program and other disadvantages, but the hole quality will be worth the In cases, for materials some of the the allowance left in the hole is usuaJly decreased.
• Other Reaming Considerations general approach for is no different than for other operations. When drilling a blind hole, reaming it, it is inevitable that some chips from drilling remain in the hole and a smooth reaming operation. Using the program stop function MOO before the reaming operation allows the operator to remove all the chips first, for a dear entry of reamer.
Another sizing operation on holes is called boring. jng, in the sense of machining is a point-to-point operation along the Z only, typical to CNC milling maand machining centers. It is also known as a 'single " the most common lool is a boring bar that only one CUlling edge. Boring on lathes is considered a contouring operation and is nol covered in """"'V<~' (see Chapters 34-35). Many jobs requiring precision holes that have previously done on a special jig boring cannow done on a machining center, using a point boring (001. modern CNC machine tools are manufactured to very high accuracy, particularly for the positionmg repeatability - a proper tool and its application can produce very high quality holes.
• Single Point Boring Tool As for practical purpose, a point ishing, or at a semijinisi1il1g, operation. is to enlarge - or to size - a hole that been drilled, punched or otherwise cored. boring 1001 works on the diameter the hole is to produce the desired hole diameter, within often with a quality surface finish as well. Although is a variety of of boring tools on the market, the single point boring lool is usually designed the cartridge type inserts. These inserts are mounted at end of the holder (i. e., a bar) and have a built-in micro adjustment fine of 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 certain tolerance ranges to the reamed hole. Programming a reamer a fixed Which cywill be the most suitable? is no reaming cycle defined Thinking about the traditional machining plications, the most accepted reaming method is the feed-in moandfeed-out method. This method requires a lion to remove the material from the hole, but it rea motion back to the starting position, [0 maintain the hole quality - its and surface finish. It may be tempting to program a rapid motion out of a reamed hole to save cycle lime, but often at the cost of quality. For the best the feed-out of reamed hole is necesSuitable cycle available for the is which permitsJeed-in and feed-out mOlions. cutti ng feedrate of the cycle will the same for both motions. Any feedrate will both motions - in. and out.
D ::: EFFECTIVE
Figure 26-12 Effective diameter of a single polflt boring too/
same programming techniques are applied to the boring bars of other designs, for example, a block tool. A block (001 is a boring bar with two cutting J 80° If adjusting mechanism for the diameter is not available on the tool holder, the effective boring diameter must preset, using a special equipment, or slow but true tried trial-and-error method. trial 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 achieves the best cutting results if it is short, and run'S concentric with spindle centerline. One of the main causes of bored holes is the boring bar deflection, applying equally to milling and turning. TIle 1001 tip (usually a carbide bil), should be properly ground, with suitable cutting CfPr'rnF'I ...... ' and position of the in the spindle or its orientation - is very important many boring operations on machining centers.
• Spindle Orientation Any round tool, such as a drill or an end mill, can enter or exit a hole along the Z with IiUle programming considerations for the hole quality. Neither of the tools is holes that high quality finish close tolerances. \Vith boring, the hole surface integrity is very important. Many boring operations that the cutting tool not the hole during retract. retracting from a almost always leaves some marks in the hole, special methods retract must be There is one such method - it uses cycle G76 or G87 with the dIe orientation feature of the a shift boring tool away from the finished surface. feature was already described in Chapter 12, so just a reminder now. The sale purpose of spindJe orientation is (0 replace tool holder in exactly the same position after each tool change. Without orientation, the tool tip will stop at a random position of circumference. Orienting spindle boring purposes is only one half of the solution. The other is setting position of the boring is a responsibility of the operator, since it has to be done setup at the machine. The boring bar cutting must set in such a way that when shift place in fixed cycle or it will into direction away from the finished hole ideally by the vector relative to the angle of the orientation 26-13.
When machine is oriented, it must be in a slopped The cannot rotate during any machining operation that requires a spindle shift. Review descriptions of the fine boring fixed cycle G76 the boring cycle G87 Chapter 25. Machine operator must alwnys know which way the spindle and into direction lool shift actually moves. Programming a bored hole that will later the boring bar only to assure the and straightness of finished hole. surface finish the bored is not too important If the boring is the last machinmg operation in the hole, the are that the surfinish be very important It is difficult to retract the boring lool without leaving drag marks on the hole cylindrical that case, select a suitable fixed probably the precision boring cycle G76 is the r~"'""';"e
• Block Tools When using a single point boring bar for roughing or semi finishing operations, there is an oplion lhat is more efficient. This option also uses a boring tool, one that has two cutting (180 0 opposite) instead of one - it is called a block tool. Block tools cannot be used fine finishing operations, they cannot shifted. The only way of programming a block lool is within the 'in-and-out' tool motion. Several fixed cycles support this kind motion. All 'in at a specified On way 'out', some motions are feed rates, are rapid, depending on cycle selection. cycles that can used with block tools are G81 G82 (feed-in~rapid-out), as well as and that in and feeds oul while the machine spindle is rotating and another one, G86, when the tool retracts while is not The greatest advantage of a block lool is 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 Figure 26-13 Single point boring bar and the spindle orientation angle
Spindle orientation is factory designed fixed. grammer considers its length and, usually, its direction.
The G76 cycle is used for requiring a high quality of the size and surface finish. The boring itself is normal, nn'"JP'lIpr the retract from the hole is special. The bar stops at the bottom of the hole an oriented position, away by the Q value in cycle and retracts back to the starting position, it shifts back to normal position.
204
26
G76 cycle has been described in detail in the previous chapter. In (his chapter is an actual programming exshown as a single hole in Figure 26-/4 mm.
- - - - + - - CUTTING DIAMETER BODY DIAMETER BACK CLEARANCE
- ««<-- Initial level
.- 025
12'27 '\
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
From the drawing. only the mm hole is considered, and the program input will quile simple: N .. G99 G76
xo
YO R2.0 Z-31.0 QO.3 F12S.0
A hole bored with G76 cycle will have a high quality.
• Backboring Cycle G81
• Programming Example In order to show a complete program. four tools will be used - spot drill (TO I). drill (T02) , standard boring bar (T03) and a back boring (T04). Program is 02604. 02604 (G76 AND GS7 BORING) (TOl 15 MM DIA SPOT DRILL - 90 DEG) Nl G2l N2 Gl? G40 GSO TOl
Although backboring cycle some applications, it is not a common fixed cycle. the name suggests, it is a boring cycle that works in the reverse direction than other cycles· from the back oflhe part. Typically, the backboring operation starts at the bottom the hole, which is the 'back of the part', and the boring proceeds from the bottom upwards, in the Z positive direction.
N3 MaG
The cycle has described in the previous chapter. The Figure also shows a diameter of 27 mm, which will be during the same setup as the mm hole. This larger diameter is at the 'back side of the part' ) and it will be backbored, using the G87
mo
Figure shows the setup of tool that will bore the 27 mm hole, from (he bottom of the hole, upwards. a attention to the descriptions. the diameter of In the illustration, the 01 smaller hole. and 02 the diameter of (he hole to be backbored. is always than 01. Always make sure there is enough clearance the body of the boring bar within hole at the hole bottom.
N4 NS No N7
G90 G43 G99 GBO N8 G28 N9 MOl.
G54 GOO XO YO 51200 M03 T02 ZlO.O H01 MOS G82 R2.0 Z-S.O PlOO FI00.0 Z10.0 M09 Z10.0 MOS
(T02 - 24 MM DIA DRILL) TOJ Nll. M06 NlJ G90 G54 GOO XO YO 5650 M03 T03 N13 G43 ZlO.O H02 MOS Nl4 G99 GBl R2.0 Z-39.2 F200.0 Nl5 GSO ZlO.O M09 N16 G28 Zl.O.O MOS Nl7 MOl (T03 - 2S NlB T03
MM
DIA STANDARD BORING BAR)
Nl9 M06
N20 N21 N22 N23 N24 N25
G90 G43 G99 GSO G28 MOl
G54 GOO XO YO S900 M03 T04 ZlO.O H03 MaS G76 R2.0 Z-31.0 QO.3 F125.0 ZlO.O M09 ZlO.O MOS
(25 DIA)
MACHINING HOLES
205
(T04 - 27 MM DIA BACK BORING BAR) N26 T04 N27 M06
part to
accurately seated in hole by For a bolt that has to on a nat surrace will require countersinking or spotfacing emtlon. All three operations require a perfect alignment with the hole (concentricity). Programming technique is the same for all three operations, except for the lOa I used. and feeds for these tools are usually than for drills of equivalent Any hole to enlarged must prior to these operations, ,'"p'T""'''''
N28 G90 G54 GOO XO YO 5900 MOl Tal ~9
G43 ZlO.O H04 MOS
N30 N31 N32 N33
G98 Gao G28 G28
G87 R-32.0 Z-14.0 Ql.3 F12S.0 {27 DIA} Z10.0 M09 ZlO.O MaS XO YO
N34 M30
%
Make sure to follow all rules and gramming or setting ajob with or 087 in the 'Many of them are safely nru'nrF'f1 •
Precautions in Programming and Setup
The precautions for boring with a tool shift relate La a few special considerations thaI are realization the two cycles G76 and The following list sums up the mas! importam precautions: o
The through boring must
o
The first boring cycle must be programmed all the way through the hole, never partially
o
For the G76 cycle, only a minimum Q value is required 0.3 mm or .012 inches}
o
For the cycle, the Q value must be greater than one half of the difference the two diameters: (D2·D1)12 ==
done
the backboring
== 1,
plus the standard minimum Q
(0.3 mm)
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 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
•
Countersinking
Countersinking is an operation that enlarges an existing hole in a conical to a depth. Countersinking for holes have to accommodate a conical bolt From all three similar operations, countersinking re, quires the most calculations for precision depth. Typical three o o
degrees· the most common angle 90 degrees
Other angles are also possible, but
frequent.
To the programming (lnd the required calculations, the cutting tool used must known first Fig. ure 26~J6 shows a typical countersinking A
'-
I
L
26-16 Typical nomenclature of a countersinking tool
ENLARGING HOLES An existing can also the top. enlarge an existing hole at the top, we can use one of three methods thal will an existing hole. These methods are common in every machine shop. They are:
o o
Countersinking
C'SINK or CSINK on drawings
Counterboring
C'BORE or CaORE on drawings
o
Spotfacing
S.F., or
on drawings
Ai! three machining methods will enlarge an existing hole, with one common purpose they will allow the fitting
In the illustration, d is the countersink body A is countersink angle, F is the diameter of the lool nat (equal to z.ero for a sharp end), I is the body length. requires certain data in the Programming of a drawing. This information is provided through a de(leader/text) in the drawing, for .78 DIA CSINK - 82 OEG 13/32 DRILL THRU
Chapter 26
is one challenge a countersink. countersink accurate. That 0.78 in the description. countersink angle is diameter can by carefully calculating lhe Z depth. That should not too difficult, because we can use the constant K for the tool poml length (described earlier in then calculate the culli depth, similar to drills. The problem here is thallhe constant K for a drill point always assumes a sharp poim at tool tip. Counters! tools do not always have a (except for some sizes). Instead, they a diameter of the F, specified in toor catalogues.
countersink diameter, flat diameter, e is of the sharp Z-DEPTH is the programmed tool depth. In this case, the angle A is 82", the flat is 3116 (.1875). The diameter F as per the sharp end e can be
Figure 26-17 illustrates an quirement, shown in II Iypical
e .1875 x .575 e= 1
a
re-
process of calculation is lhe heighl e, for a given flat constants as applied to a =
.866 .575
==
.500
In [he illustration, D is
A is the countersink
Zdepth 0,625
enough. First, deterF. Use the stanlength:
Z depth
=
(K for 82" = .575) a
a
.78 x .575
end will be:
.4485
o
Since that depth the height of has to be done to find out the Z depth, is to subtract from (he theoretical Z depth:
o
Z depth "" . 4485
o o
0.000 0.750 Figure 28-17 Programming of a countersinking operation
Figure
known and unknown counterdepth of a
sinking
countersinking
o -.....;
.1078 '" .3407
This is the programmed Z depth and the for the countersink in drawing may look Ihis: N35 G99 Ga2 XO.75 YO.625 RD.l Z-O.3407 P200 FS.O
could be lowered, machined in the previous Be careful level will most likely ways program the G98 command and a small for example, I:
VIJ''''aUVlll_
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
•
e Figure 26- 78 for calculating the Z depth of a countersink, D and F and the A
Counterboring
Counlerborlng is an operation enlarges an existing depth. Counterhole in a cylindrical shape to the 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 defor this type of machining, or a suitable end mill In either case, the uses G82 fixed cycle. is always given) there depth of the are no extra calculations 26-19 a counterboring
MACHINING
DEEP
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 comwill 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 the double value or higher of the minimum dwell. Minimum dwell Dm
For example. if spindle speed is programmed as 600 rfmin, the minimum dwell will be 60/600=:0. J. and doubled to 0.2 in the as P200. Doubling the minimum dwell value guarantees that even at 50% override, there will at least one full spindle that cleans the Many programmers to use a slightly for more than one or two revolutions at the
REQUIRED 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 holes. On part shows direction of tool motion the left. the from one hole to the next cause a collision with the wall and 098 is safety. On the right, with no 098 is not and 099 the initial is usually done a clear where the Z value must tool location above all obstacles. A practical example of this technique is illustrated in Figure 26·2 J nnd 02605.
• Spotiacing Spotfacing is virtually identical to (hat the depth of cut is minimal. Often, shallow Its purpose is to enough material to provide a nat surface for a bolt, a washer. or a nul. technique is same as that for
I
I
--003/16
I
DRilL THR~
MULTILEVEL DRILLING On many occasions, the same cutting tool will have to down between di to move (steps on a part). a drill will cut the same depth. bul start at different
must be
two major efficiently (no time (no collision).
0.15 0.50
......,....,+.,-.,.Y-,.-,--:..~ --~----------
1.00 Figure 20-21 Multilevel drilling· nmi'lr;:lflr"lmii1fl example 02605
....... 0.00
0.40
208
Chapter 26
tools are - TO I is a 90° spot drill, cutting to the depth of .108 below each step T02 is a 03/16 drill Ihrough, programmed to the absolute depth of 1.106: 02605 EXAMPLE) (TOl - 0.375 SPOT DRILL - 90 DEG) Nl. G20 N2 GI7 G40 G80 TOI NJ M06 N4 G90 GS4 GOO XO.25 YO.375 5900 M03 T02 NS G43 Zl.O HOI M08 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 N1B GSO Zl.0 M09 N19 G28 Zl.0 MOS N20 MOl
WEB DRILLING Web drilling is a term for a drilling operation laking place two or more parts, separated by an empty space. The programming challenge is to make slich holes efficiently. It would be La program one motion through all the parts as well as the empty spaces. many inefficjent. holes, this approach would prove to be Evaluate the front view of a web drilling example shown in 2r5-22,
Z-1
R-1.575 - . - - - - - Z-2.0
DRILL THRU) N21 N22 N23 N24 N25 N26
N27 N2e N29 NJO NJI N32 N33 N34 N3S N36 N37 N3S NJ9 N40
T02 M06 G90 G54 GOO X2.4375 YO.375 S1000 M03 TOl G43 Zl.O H02 MOS G99 Ga3 R-O.3 Z-1.106 QO.35 F10.0 G9S Yl.125 G99 Xl. 687S Yl.625 RO.l YO.7S YO.375 XO.a7S R-O.OS Y1.12S Y1.625 XO.25 R-O.4 Y1.125 YO.7S YO.375 GSO ZI,Q M09 G2B ZI.O MOS GOO X-2.0 YlO.O :teO
%
Study the program in detail. Walch the direction of toolsTO I slarts at the left hole and at the right hole hole, in a zigzag motion. T02 starts at the lower and ends at the lower left hole, also in a zigzag motion. Note there are more G98 or G99 changes the first tool than the second tool. In hole machining undersland three areas of program control, used in 02605:
o G98 and G99 control o R level control
o Zdepth control
Tool point length == 0.075
Clearance :: 0.05
Figure 25-22
Web drifling eX8lnPIe (front view) program 02606
In program, X I.OY 1.5 is as the hole position. Drawing will not show R levels or Z depths, they have to be calculated. In the example, above and below each are .05, the first R level (RO.I). The length of the 1/4 drill point is .3 x .25 :::::: 02606 (WEB DRILLING) (T01 - 90-DEG SPOT DRILL - 0.5 DIA) Nl. G20 N2 G17 G40 GBO TOI N3 M06 N4 G90 G54 GOO Xl.O Yl.S 8900 M03 T02 NS G43 Zl.0 HOl MOS N6 G99 Ga2 RO.l Z-O.14 P250 F7.0 N7 GBO Zl. 0 M09 N8 G2a Zl.O MaS N9 MOl (T02 - 1/4 OIA DRILL) Nl.0 T02 N1l M06 N12 G90 G54 GOO Xl.O YI.S S1100 M03 Tal N13 G43 ZI.O H02 MOB N14 G99 GSl RO.l Z~O.375 F6 . 0 (TOP PLATE) (MIDDLE PLATE) NlS R-0.7 Z-1.25 Nl6 Gge R-1.S75 Z-2.0 (BOTTOM PLATE) Nl7 GSO Zl,O M09 Nl8 G28 Zl.O MOS ID9 :teO %
MACHINING
209
Sjng~e
Note that a program, rather than only one plate in the
required three blocks of the usual one. . Also note in block N 16. Only one hole is in the example, so the 098 is not reneeded. cancellation command G80 with a take care of the tool rereturn motion in block N17 tract from hole. However. if more holes are machined, move LoollO the new 080 is proIn this case, 098 is when the drilts penetrates the last plate of the parr. example is nOI a solution to drilting cuts, as there is still some wasted motion. only efficient programming is to use the optional custom macro technique and develop a unique efficient web drilling cycle.
TAPPING Tapping is only to drilling as the most common hole operation on machining centers. it is very common to tap on a CNC mill or a center, two tapping fixed cycles are avai lable for programming are the G84 plications on most control systems. for normal (R/H), and cycle for reverse tapping (UH):
The higher clearance for the R level allows acceleration of the feed rate 0 to 30 Inches minute to place in the air. the tap contacts the part, cutting feed rate should at programmed value, 1101 less. A good rule of thumb is to program the tapping clearance about two to the normal clearance. This will guarfour antee the feedrate [0 be fully effective when the actual ping begins. Try to a slightly smaller number, to the program more efficient. Another good ojrlIe tap method is to double, triple, or quadruple the and use that value as the above the Whichever method is used, purpose is to eliminate the feedrate associated with motion acceleration. was the amount. The Another high value 30 in/min (F30.0) has also been carefully calculated. Any cutting fecdratc tapping must synchronized with the spindle - the rlmin programmed as the S Keep in mind that the tap is basically aform tool the thread size shape are buill it Later in chapter, the between the spindle speed and the feed rate is explained in more detail. The cutting F in the program example was calculated by mUltiplying the thread leod the spindle given as rlmin: F
1 / 20 TPI x 600 r/min "" 30. a in/min
for righl hand threads
to calculale feedrate is to divide the
the number
G74
Reverse tapping - for
hand threads
with M04 spindle rotation
following shows that programming a to other fixed All one hole is motions, including spindle stop and boltom are in the N64 G90 G54 GOO Xl.S Y7.125 S600 M03 T06
NoS G43 Zl.O HOS MOS N66 G99 GB4 RO.4 Z-O.B4 F30.0 N67 GSO
Is it possible to tell the tap used? It should In the example, the tap 20 TPI (twenty threads per inch). plug tap. coordinates are missing from the cycle, current tool position has established in block N64. The usual R level is the starting pOSltlon the Z depth is the absolute depth thread. The address in the block is feedrate in inches per minute (in/min), programmed with the F the R ofRO.4 has a value that is somewhat higher than might used for reaming, single the programmed point boring and similar operations. feed rate to be unreasonably high. is a values - (hey are bOlh correct selected reason for intentionally.
F
= 600
r/min / 20 TPI
threads per
spindle
(TPI):
= 30.0
quality of the tapped hole is important, but it is not influenced solely by the correct of feeds, but by other as welL The the tap. its coating, its the flute helix configuration, (he the start-up being cut tap holder itself all have a final quality of tapped hole. profound effect on is mandatory, best results in tapping, a floating unless the CNC machine supports tapping. ing tap holder design gives the tap a 'feel', similar to the feel that is needed for manual tapping. A floating tap holder has is called the tension-compression holder and its applications are the same for both milling and turning tap to be pulled out erations. This type of holder allows of it or pushed it, within The only of the tool (tool oriable difference is the mounting entation) in the machine (either vertical or horizontal). High end floating tap holders also have an adjustable and even which can the feel of the of the tension Tapping applications on CNC are similar to those on machining centers. A tapping a lathe control is not needed, as one tap size can used per part tapping programmed the 032 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 make some common errors. use fixed cycles,
This chapter llses examples for tapping on CNC lathes in a
_a
TAPERED
sufficient depth .
• Tap Geometry are literally of lap used in CNC programming applications. A book would easily be filledjusr on the topic of tapping tools and their applicalions. For CNC only the core of tap geometry are important. are two considerations in the programming and the
o
Tap
PLUG
a
BOTTOMING
Figure 26·23 Typical tap end - chamfer geometry configuI8lion
geometry
o Tap chamfer geometry Flute Geometry
The flute geometry of a tap is described in tooling catalogues in terms such as 'low helix', 'high helix', 'spiral flute', and These terms basically how the cutting are ground into body of When programming a tapping operation, the effectiveness of (he flute geometry is tied to the spindle Experimenting is limited by tap lead (pitch), with the tapping but (here is a greater latitude with the spindle speed selection. The material and flute geometry of the lap both influence machine spindle speed. almost all designs (not limited to only) are the of corporate policies, engineering decisions and philosophies, various trade names and marketing there is not a one way use tool' or 'use for a CNC program. tooling catalogue of a tool is the best source of technical data, but a catalogue from another supplier provide a solution to a particular Information gathered from a catalogue is a very good starting the data in (he CNC program. Keep in mind that the share some common characteristics. Tap Chamfer Geometry
chamfer geometry relates to the end configuration of the For CNC programming, the most important of the tap end point geometry is the tap chamfer. In order to program a hole tap must hole being selected according to the specifications If tapping a blind hole, a different tap is required tapping a hote. are three of taps, divided by their geometry configuration:
o Bottoming tap o
a
Plug tap
a Taper tap
The major tap chamfer. 26·23 shows how the of the drilled hole wi 11 influence programmed depth of the selected The tap length c is measured as the number of threads. A typical number of threads for a is 8 to ! 0, a tap 3 to 5, for a I The angle chamfer a varies for typically 4-5 0 for the tap, 8-1 the plug tap and 25-35° for the bottoming tap. will almost always require a bottoming tap, A blind in most cases and a taa through hole will require a per in some rarer cases. in different words, the greater depth allowance must the the lap be to each drilled hole.
• Tapping Speed and feedrate The relationship of the spindle (r/min) and programmed cutting feedrate is extremely important when programming the cutting motion in feedrate per time mode. Per time mode is programmed as in/min (inches English and mmlmin minute) in programs (millimeters minute) for metric units programming. This per minute mode is typical to CNC milling machines and machining where virtually all work is done For tapping operations, ther in in/min or less of the machine tool. Iltways program the cutting rate as distance muSI during one spindle revolution. This always equivalent to the lead of the which is the same as the tap pitch (for taponly), taps are normally used to cut a only.
the feedrate revolution mode, mode tbat is always equivalent to 1alhes, the example, the feed rate. of .050 results in .050 feedrate. or FO.OS in the
MACHINING
211
""""I ......'" the typical mode is always per in per minute and thefeedrate is cruculated by one of the following formulas:
~
where ...
Pipe are similar in design to long to two groups:
A similar formula will produce an identical result:
Ft
::::
r I min x F,
F,
==
Feedrate per time (per minute)
=
Spindle speed Feedrate per revolution
=
F,
a 20TPI 1 / 20
~
lead for a mill will
feedrate has to spindle speed,
nrr,al"",.rnrnprl
F = 450 x
.os = 22.5
= F22.5
into considera450 r/min:
(in/min)
A metric tap on a lathe uses the same (pitch) using 500 a tap of 1.5 mm with the 750 mm/min: F :
500 x 1.5
= 750.00
o
Straight
NPT and API NPS
(parallel)
Programming pipe taps follows the considerations for standard threads. The only common difficulty is how to calculate the Z depth position at least as a reasonable one, if not exactly. The finaJ depth may be a of some experimentation a particular tap typical materials. A proper II size is very important. It will be different for tap that are only drilled and for lap holes that are drilled and reamed (using a per foot taper
The following is a table taper pipe thread group and recommended tap drills, data that is CNC programming:
F750.0 (mmVmin)
is to maintain relationship of the spindle speed. If the spindle speed is changed, the feedrate time (in/min or mm/min) must be as well. For tension-compression holders, adjustment of downwards 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 must be a new tapping F : 550 x .05 = 27.50 = F27.S
In the program, the new tapping F = 27.5 - 5% : 26.125
Taper taps
(I
.0500 inches
tion
o
taps. They
(nominal size), is not the size of but of the pipe American National 'lfH1UllJ7L pipe taper (NPT) a taper ratio of I to 16. or inch per foot (1.7899 I per side) and the tap chamis 2 to 3-112
Ike where ...
r/min
to change the spindle speed of the tool in proon the CNC machine, forget to modify the feedrate the tapping tool This mistake can happen during program preparation the office or during optimization at the machine. if the is small, may be no more due to luck than intent. If the change of spindle speed is major, the tap will most likely break in
• Pipe Taps
Feedrate per time minute) Spindle speed Number of threads per
= =
TPI
actual feed rate value would be F26.1 or even
tpop.,(1 ... ",tp
will be:
NPl Group Pipe Size
Drilled Only
TPI
1/16
11/16 .9062
57/64
1.1406
H/8
for NPT for
212 straight pipe drills are recommended:
the following
Decimal Size .2500
.3438
1/8
27
1/4
18
7/16
.4375
3/8
18
37/64
.5781
%
14
23/32
.7188
3/4
14
59/64
.9219
11-
1.0
1.1563
1-1/4
1.5000
1·1/2
1.7500
2.0
2.2188
The tapping feed rate maintains the same relationships pipe taps as for standard
• Tapping Check When programming a operation, sure program data reflect the true machining conditions. may vary between majority of them are cal to any tapping on any type of CNC Here is a short list that relate directly to (he tapping operations in CNC I"\r{"\ar!'\m,ml u
Tap cutting
u
Tap design
u
Tap
(have to be sharp and properly the hole being tapped)
;;,h.ronmi"nt
With modern CNC machines, the method of rigid lapis no need for "U'~'-l''''1
ping has become quite popular. holders. such as the
to be aligned with tapped hole)
the o
Tap feed rate (has to be related to the the machine speed)
lead and
o
Part setup (rigidity of the machine setup and the tool is important)
o
Drilled hole must be premachined correctly (tap drill is important)
o
Clearance for the tap start position (allow clearance for acceleration)
o
Cutting fluid
U
Clearance at the hole bottom (the of thread must be
o
Tap holder torque adjustment
o
Program integrity (no errors)
compression type -
ular end mill holders or collet chucks can be the cost of tool the CNC control sys(em must suppan the rigid tapping ture. To program there is a special M available - check the The rigid tapping mode must be supported by the eNC machine before it can be used in a progr
HOLE OPERATIONS ON A LATHE point hole on a CNC lathe are much more than on a CNC machining center. the number of drilled or tapped in a operation on a lathe is one part (two are rare). while the holes (or a may be in lens, hundreds and even thousands. boring (internal on a lathe is a LUlU..,.'" lion, unlike boring on a milling machine, which is a pointto-point operation. All the point-to-point machining operations on a CNC lathe are limited to those that can be machined with the culting tool spindle centerline. Typically, these operations center drilling, drilling, A variety of other cutting tools may reaming and also be a center cutting mill (slot dri II) to open up a or to make a flat bottom An internaJ burnishing may also be used for such as precise a hote, etc. To a lesser operations, such as counterboring and may lathe spindle centerline, with a special programmed at operations in point-to-point - not a contouring tool. this will have one common denominator - they are all centerline and with the X program for all programmed in (r/min), not in the constant that reason, is used - for
onaCNC
lathe must
G91 SS15 1403
;::'CIC;I"UU
will assure the required 100% spindle of cutting)
of tap holders have their own special rewhich mayor may not any effect on the If in doubt, always with the for operation.
r/min at the normal spindle
happen if is used with G96 comthan the proper command? The CNC will use the given information, the spindle in the program (given peripheraJ - or per minute, asft/min). will then calculate required spindle speed in for (he use by (he ma-
MACHINING
213
if (surface) speed for a given ftlmin. the r/min at a 03 inch (X3.0) for the approximately:
I
S
3 = 573 rpm
ftlmin is applied to the diameter formula does not change. but x 3.82) I 0 = 0
S
(ERROR)
mIght be expected to stop (because laws), it will do the exact opposite (bethe control design). Spindle speed will reach rlmin that the current gear range will allow. Be - make sure that the centerline operations lathe are always done in the G97 (r/min) mode on a not in the G96 mode (CSS) mode. ''HHllU''''--
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 programming, 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 will be to the Z where thc actual nates (or at with obstacles along way. The obstacles are - or alleast could be - the lailstock, the catcher, the steadyrest, the etc. example of this programthe is the previous example, modified: path N36 N37 N38 N39
T0200 M42 G97 S700 M03 GOO xo ZO.5 T0202 ZO.1
Moa
N40
method the tool approach along two tool positions - one is the safe clearance the other one is the safe clearance position for start. is a minor alternative to this motion Z will be at a cutting feedrale, rather motion rate:
• Tool Approach Motion A typical geometry offset configuration setup (or values) on a CNC lathe often have a relatively large X small Z value. For example. the geometry
offset for a tool may be X-lI.8Z-1.0 (or G50XJ 1.8Z1.0). location indicates a suitable tool change position to a drilL What does it mean to the lOa] motion a drilling operation? It means that the rapid motion will complele the Z motion long before completing the X axis motion (with hockey-slick motion of the rapid command). motion very close to the part N36 T0200 M42 N37 G97 S700 M03
N3S GOO XO ZO.1 T0202 MOS N39
To avoid a potential collision wards the part, use one of the o
o
Move the X axis first to the spindle ""..'t"'.·I1 ...... then the Z axis, directly to the start location for the drilling Move the Z axis first to a clear rlO~!ltlon then the X axis to the spindle then complete the Zaxis motion the drilling start position
N36 N37 N3S N39 N40
T0200 M42 G97 S700 M03 GOO XO ZO.S T0202 MOS GOl ZO.l FO.OS
approach motion, the Z axis motion has to a linear motion, with a relatively high ","'" .. ",'" in/rev (1.25 mm/rev). Feedrate override can be used setup, to conlrolthe rate of the feed. During actual production, there will be no significant loss in the cycle time.
• Tool Return Motion The same logical rules of motion in space thal apply to the 1001 approach, apply also to the tool return motion. Remember that the firsl motion from a hole must always be the Z axis: N40 GOl z-o. a563 FO. 007 N41 GOO ZO.1
N40. the actual drill cutting motion cut is completed. block N41 is out of the hole to the same position it It is not necessary to return to the same the style more
214 the cutting tool is safely out of the hole, it has to return to tool changing position. are two methods: Q
Simultaneous motion of both axes
o Single axis at a time Simultaneous motion of the same problem as it on Z axis will complete the part face. Also, during a return motion if ,-,,-,,-.,,.ll .... and the programming
mo
Z axes does not pres- on the conmotion first, moving is no reason to fear a approach motion was was consistent:
GOl Z-O. 8563 FO. 007
ml GOO ZO.l N'72 XU. 0 Z2. 0 T0200 M09
If in or if an obstacle is to in the way of a tool for example a program a single axis at a time. In most cases, that will move the positive X axis first. as most obstacles would be to the right of the part:
• Peck Drilling Cycle· G14 On Fanuc and compatible pelitive cycle G74 available, ent machining operations:
o Simple roughing with chip breaking
The example illustrates the return motion 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,...,., Other, wards and
traditional, methods for the tool motion tathe part are
• Drilling and Reaming on lathes
Peck drilling (deep hole drilling)
o
this section, the peck drilling usage of the G74 cycle is The roughing of the G74 is a . operation ordinary drilling. first, then starting position finally. its depth position. 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: G74
xo
Z •• K ••
IGi" where ...
G74 drilling cycle XO Indicates cutting on ....m'?"'.·lj"" Z == Specifies the end point for drilling K Depth of each peck (always positive)
N70 GOl Z-O.SS63 FO.007 N'71 GOO ZO.l N72 X12.0 N73 Z2. a T0200 M09
there is a multiple recan be used for two differ-
following program uses illustration in Figure 26-24, and shows an exampk~ of a 6 hole (0.1875) with a drill depth of .300 NBS N86 N87 N88
T0400 M42 G97 S1200 M03 GOO XO ZO.2 T0404 MOS G74 XO Z-O.BS63 KO.3 FO.007 N89 GOO X12.0 Z2.0 T0400 M09 N90 MOl
is also quite common operation, on a a hole opening to be used with other as means There are three tools, such as lathe machining: drilling, typical to a o
Center drilling and spotfacing
o Drilling with a o
6
drill
Indexable insert drilling
Each method same programming as those section earlier. of the mil1ing lype there are no lathe work. Keep in that on a CNC lathe, the rOlaling. whereby the tool remains stationary. keep in mind that most lathe operations take place in a zontal orientation, concerns about coolant tion and chip removal.
Z-O.8563 Figure 26-24 Sample hole for the
lathe example
The peck motion will start the position 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 cut being in the air. Programmer has to thirds of this approach is an advantage and when method would be more suitable. At the end the G74 cycle, the drill will make a distance. This distance is set by a tract by control system and is typically about .020 inches (0.5 A full retraction after each peck out of the hole (simito the cycle for milling controls) is not supported G74 cycle. thal is no programmed out when the peck drilling cycle is completed. lion is built-in within the G74 cycle. If a GOOZO.2M05 follows block N8S, no operator extra confidence when
the hole
• Tapping on lathes Tapping on CNC lathes is a common that follows the same machining principles as ing centers. The major difference for of a tapping cycle. There is no on a lathe, since most of lathe only one hole of the same type. may preselH some difficulties. Unfortuare more common among programmers with these difficulties
Step Step Step Step Step Step Step Step Step Step Step
01 Set coordinate position 02 Select tool and 03 Select spindle speed rotation 04 Rapid to the center line and clearance with offset 05 Feed-in to the depth 06 Stop the spi ndle 07 Reverse the spindle rotation 08 Feed-out to clear of the part depth 09 Stop the spindle 10 Rapid to the starting position 11 Resume normal spindle rotation or end program
Translated into a step can general guide to '",",,",,,,,,.,
careful1y. this step by everyday programming as a lathes.
layout of the part and (he 1001 example 02607. The examthe eleven steps on a very solid foundation. 02607 is correct - but only Are there possible problem
TOOL HOLDER
012.0
9/16-12 TAP
Figure 26-25 Typical setup of a
fool on a
lathe - program examples 02607 and 02608
FLOATING TAP
216 02607 ON LATHES) (ONLY THEORETICALLY CORRECT
is normally used for single controls). The G32 point threading. Two major will be achieved with the command - the spindle will be synchronized, the feedrate override will be ineffective by default will be solved If (he matically). The second die M functions are the same block as tool motion. That means the N46 with is in the new program 02608.
(T02 - TAP DRILL 31/64)
N42 MOl (T03 N43 N44 N45 N46 N47 N48 N49 NSO NSl N52
-12 PLUG TAP) T0300 M42 G97 S450 M03 GOO XO ZO. 5 M08 T0303 GOI Z-O. 875 FO. 0833 MOS M04 ZO. 5 MOS GOO X1.2. 0 Z2. 0 T0300 Ma9
02608
ON
(PRAC'I'ICALLY CORRECT VERSION) TAP DRILL 31/64)
N42 MOl
IDa
%
A brief look at 02607 anything is wrong. essary motions therefore. correct. contains major flaws!
(T03
not show that
All earlier have been carefully followed. Conducting a more study of the will reveal two areas of difficulty or even The first problem may if the feed rate override setting switch is not set to 100%. Remember, the is always equal Lo lead (FO.0833 for 12. TPI). If the switch is set to any but 100%, the will be at at worst damage. other problem will become evident only in a block mode run, during or machining. Look at N46 and N47. In the N46 hlock, tap reache~ the Z axis - while the spindle is still rotating! True, will be slopped in block N47, but in the mode it will be lao late. A situation will """"",,,.,, (he feed-oul motion. reverses in but does not move until N49 block is processed. the program is a very poor example of lapp! ng lathes. are some details usually not considered for a application (such as G84 tapping cycle), used for milling programs. milling, all tool mOlions are built-in, so they are contained within the fixed eli the first potential problem of the will 'd_'_~ programming the M481M49 disable the fecdrate Even better mOlion command mode (G33 on some
N43 N44 N4S N46 N47 N48 N49 N50 %
PLUG TAP) T0300 M42 G97 S4S0 M03 GOO XO ZO. 5 MOB T0303 G32 Z-O.S75 FO.OB33 MOS ZO.S M04 Ma5 GOO Xl2.0 Z2.0 T0300 M09 M30
The block (N48 in example) the spindle is not required if the is the last tool stop in the although it does no harm in any other program. Compare program 02608 with 02607. Program 02608 is a deal more stable possibility of any problem is virtually
• Other Operations There are many other programming reJating to machining on CNC machining centers lathes. This chaprer some of the most important and the most common possibilities. Some less common applications, such as operations using tools for backboring, or block boring tools. tools with multiple edges and other for machining may quite infrequent in However, programming unusual more difficult the A"f'fF"~"''' tool motions, everyday tools. a CNC programmer is The real ability terms of applying the knowledge and new problem. It requires a thinking process a degree of ingenuity work.
PATTERN OF HOLES In point-la-point operations, consisting of drilling, reaming, tapping, etc., we are often require9 to machine either a single or a series holes with Ihe same tool, usually followed by tools. In several holes are much more commOn than a Machining holes with the same loa I means machining a pattern of holes or a hole pattern. An English as a 'characterislic or dictionary defines the word consistent arrangement or '. Translated to hole two or more holes machined with . machinioao same lool establish a The hole IS laid out in the pari either randomly (characteristic or design) or a certain (consisTent arfolrangement or design). Dimensioning of a hole lows standard dimensioning laid out some part and the various methods their programmake malLers all programming e.xamples related (0 Lhe hole panerns wi II assume a center drill ing operation, using a #2 center drill, chamfer .150, to the depth of .163 (programmed as 2-0.163). nrr\ar:"m reference point 20) is the top 10 be in ~pindle. the of clarity, no hole diamelers or material and are specified in the examples. From the dictionary definition above, we have to establish what makes a hole paHern characteristic or consistent. Simply, any that are machined with the same tool, one hole after another, usually in of COlwenience. means all within a single pattern have the same diameter. II also means that all machining must start at same R level and at the same 2 depth. Overall, i( means that all holes wllhm a pauern are machined the same any tool.
TYPICAL HOLE PATTERNS Hole paHerns can be categorized each group having the same character. encountered in CNC programming the following pattern groups:
o o
pattern Straight row pattern
o Angular row pattern o Corner pattern
o
Grid pattern
o
Arc
o Bolt
pattern
Some groups be divided into smaller groups. A thorough understanding each pattern group pattern. should you to any similar available that have a are several control built-in hole a boll for example circle nlIll'prn nrr\a ...'~m'm ng routines simplify the hole pattern quite substantially, but the prostructure is unique to that panicular brand of conlrols. control and cannot applied to
RANDOM HOLE PATTERN The most common pattern used in programming
a
pattern. pattern holes is a where all holes share same machining characteristics, but the X and Y distances between them are inconsistent. In other words, holes within a pattem the same LaO!. the same nominal usually the same depth, but a variable distance from each other - Figure 27-/.
-
-
4.4
-.,..J
1.4
0-
o
• l
,,
2 1B 20 . .4
~_ _ _ _ _ _ _ _ _ _..... O!~_J_._L_1.
figure 27·'
Random pattern of hotes· program example 02701
are no special lime saving used in programming a random - only a fixed used at individual hole locations. All XY coordinates programmed manually; within the hole pattern have to control features will no help here at all:
217
218
Cha
02701 (RANDOM HOLE PATTERN)
Two program 02702 should be , In block N6, the di mode was absolute G90 (0 the incremental G91, to take When all ten holes have the equal pilch to include return to chined, the program zero position motion, in the example, along all axes. However. without a calculation, we do not know the lute position atlhe tenth for the X axis (the Y remains unchanged al of .60 inches = YO.6). solve this 'problem', the cycle with G80, G91 mode in move (0 the machine zero position in the Z axis first Then - still in the incremental mode I - return both X and Y axes to machine zero simullaneously.
N1 G20 N2 G17 G40 GSO
N3 G90 G54 GOO Xl.4 YO.S S900 MOl N4 G43 Zl.O HOI MOB NS G99 Gal RO.l Z-O.163 F3.0 N6 X3.0 YJ.O N7 X4.4 Y1. 6 N8 X5.2 Y2.4 N9 GBO M09 NlO G28 ZO.l MOS Nll G28 XS.2 Y2.4 N12 IDO %
STRAIGHT ROW HOLE PATTERN to the X or Y axis with an equal Figure 27-2 shows a 10 hole with a pitch of .950 inch.
Hole pitch ~s a pattern - 'I
• program example 02702
The programmi takes advantage of a fixed cycle repetition Lor K address. It would be inefficient to program hole individually. As always, (he tool wiJl be positioned at the first hole in G90 mode, then the cycle will machine hole in block N5. the remaining holes, mode must be changed to incremental mode G91, the controllo machine the olher nine incrementally, along the X axis only. The same logic would for a vertical pallern along the Y axis. In that case, would be programmed along the Y Note lhallhe repetition ofspaces, not the numcount is always equal to the of holes. The reason? hole h!ls already been machined in the cycle call block. 02702 (STRAIGHT ROW HOLE PATTERN) Nl G20 N2 G17 040 G80 N3 G90 G54 GOO Xl.lS YO.6 5900 MOl N4 043 Zl.O Hal Moe NS G99 Gal RO.l Z-0.16l Fl.O N6 G9l XO.95 L9
N7 G80 1409 N8 G28 ZO MOS N9 G28 XO YO NlO MJO %
Normally, this first tool of the example would be followed by other LOols to the hole machining. To protect the program and from possible probute command is lems, make sure that the G90 for every tool (hal
ANGULAR ROW HOLE PATTERN
TYP
0.6
row hole
27
in a row al an is a variation of a pattern. The between the two is that 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
In this method, the pattern and no pitch belween holes
is not speci-
o X and Y coordinates are given for the
hole only
In this method, paUern angular the holes is
is specified and
In either case, all the necessary Y dimensions are to write the program. However, the programming will be different for each method of drawin bo
• Pattern Defined by Coordinates method of programming is row pitch between increment between holes along be This axial distance is as X is measured X axis. along the Y axis). Such a calculation in two equally accurate ways. The lirs( calculation method can use a method, but it is much casier (0 usc the ratio stead. In the Figure 27-3, the pattern length Ilxis is I and along the Y axis it is 2.0: (2.625 -
=2.0)
HOLES
219 N7 GBO M09
o o o
N8 G28 ZO MOS N9 G28 XO YO NlO M30
% Note that the program structure is idt:nlicallu- Lhe exam-
ple of the straight row with L5 (KS) +----10.82-----.... -
except the incremental move two axes instead of one.
.. Pattern Defined by Angle
27·3
be defined in the drawing hole, the number of between holes and
Angular hole pattern with two sets of coordinates· program 02703
of this kind has all the holes by equal distances 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 overIstance of 2.0 divided by Y axis spaces. so the X number of spaces for a six (the delta X) 10.82 / 5
equally holes, angle of pattern inclination - Figure 27-4.
2.0
= 2.1640
and the Y axis increment (the 27-4
2.0 / 5 = .4
Angular
The other calculation method uses lTigonometric fllncwhich may also be as a confirmation of the first vice versa. Both must be identical, or is a mistake somewhere in the calculation. First, es-
In to calculate the X and Y coordinate trigonometric functions in this case:
02704
m
x increment Y increment
= Cl = Cl
x x
cosA = 2.1640 sinA = .4000
The calculated mcreOlents match in both methods, lalion is correct, can now be used to write the program (02703) - block the vaJues: 02703 (AN'GOLAR Raq
m G20 N2 G17 G40 GBO N3 G90 G54 GOO X1.0 YO.62S S900 M03 N4 G43 Zl.O HOl M08
NS G99 Gal RO.l Z-O.163 F3.0 N6 G91 X2.164 YO.4 L5 (K5)
use
can be written after you round off the calculated . program 02704:
C = 2.0 / sinA = 11.00329063
Now, the actual increment along the two axes can culated, using C I dimension as the distance between holes:
- 02704
x = 4.0 x coa15 = 3.863703305 Y = 4.0 x sin15 1.03527618
10.47251349"
C1 = C / 5 = 2.20065813
with coordinates, pitch
Raq 2)
G20
N2 G17 G40 G80 N3 G90 G54 GOO X2.0 Y2.0 8900 M03 N4 G43 Zl.0 HOl MOB N5 G99 GSl RO.l Z-0.163 Fl.O N6 G91 X3.8637 Y1.0353 L6 (K6) N7 GBO M09 N8 G28 ZO MOS N9 G2B XO YO
mo
M30
%
Since the calculated increments are rounded values, a certain accumulative error is inevitable. In most cases, any error will be well contained within the drawing tolerances. However, for the projects highest precision, this error may be important and must
taken into consideration.
220
Chapter 27
To make sure all calculations are correct, a simple checking method can be used (0 compare the calculated values: ~
Step 1
Find the absolute coordinates XY of the last hole:
x
Y
2.0 + (4.0 x 6 x coalS) =
25.1B221983 = X25.1822
=
2.0 + (4.0 x 6 x sinl5)
=
8.211657082 = YB.2117
~
02705 (CORNER PA'I'TERN) Nl G20 N2 G17 G40 GaO N3 G90 G54 GOO X2.2 Yl.9 S900 M03 N4 G43 Zl.O H01 MOS N5 G99 G8l RO.1 Z-0.163 F3.0
N6 G91 Xl.5 Yl.B L2 (K2)
Step 2
Compare these new XY coordinates with (he previously calculated increments as they relate to the lasl hole of the pattern (using rounded values):
x Y
Note that both X and Y values are accurate. When rounding. particularly when a large number of holes is involved, the accumulative error may cause the hole pattern out of tolerance. In that case, the only correct way to handle the programming is to calculate the coordinates of each hole as absolute dimensions (that means from a common point rather than a previous point). The programming process will take a little longer, but it will be much more accurate.
CORNER PATTERN Pattern of holes can be arranged as a corner - which is nothing more than a pattern combining the straight and/or angular hole patterns - Figure 27-5,
1,5---'
---
1.8
N7 Xl. 8 L6 (K6) NB Y-l. B L2 (K2)
N9 GSO M09
mo
G28 ZO MOS Nll G2B XO YO Nl2 1000
%
2.0 + 3.8637 x 6 25.1822 2.0 + 1.0353 x 6 = 8.2118
= =
comer hole will be machined twice. Visualize the whole process - the last hole of one row pattern is also the first hole of the next pattern, duplicated. Creating a special custom macro is worth the time for many comer patterns. The nonnal solution is to move the lool to the first position, call (he required cycle and remain within that cycle:
l
i--
I
.
l1le program offers 00 special challenges. In block N6, the angular row of holes is machined, starting from the lower lefl hole, in N7 it is the horizontal row of holes, and in N8 the vertical row of holes is machined. The order is continuous. Just like in the earlier examples, keep in mind that the repetition count Lor K is for the number of moves (spaces), not the number of holes.
GRID PATTERN Basic straIght grid pattern can also be defined as a set of equally spaced vertical and horizontal holes, each row having equally spaced holes. If the spacing of all vertical holes is the same as the spacing of all horizontal rows, the final 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 someti mes called a rectangular hole pattern - Figure 27-6.
I
1 1.8 I I -wED 0 0 0
--"'1
, GOO 0 0 (j)-e-~8
CD. 1--8I
,
1.9
(B---r .
0
0000$--'..l 2.1 OOOOUJ--, 00000 00000 00000 I
I I ,
-
2.2
figure 27-5 Corner pattern of holes· program example 02705
All rules mentioned for the straight and angular hole patterns apply for a corner pattern as well. The most important difference is the corner hole. which is common to two rows. A comer pattern can be programmed by calling a fixed cycle for each row. Soon, it will become apparent that each
I
0·0 0 0 (]j---.-L
2.4
'---1.7
-r I
Figure 27-6 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.
000
More
motion. To a zIgzag motion, program row or colwnn at any corner bole. Complete that row (column), then jump to the nearest hole the next row (column) and repeat the process until aU rows and columns are The lime of the motion is kept to the minimum.
a
G90 G54 GOO Xl.7 Y2.4 S900 M03 G43 Zl.O H01 MOS G99 GSl RO.1 Z-O.163 F3.0 G91 Y2.1 L6 (K6) N7 Xl.S N9 Y-2.l L6 (K6)
NlO X1.8 Nl1 Y2.1 L6 (K6) N12 X1. 8
N13 Y-2.l L6 (K6) N14 Xl.8 Nl5 Y2.1 L6 (K6) N16 GSO M09 Nl7 G2B ZO M05 NlB G28 XO YO N19 IDO
%
Two features the are worth noting - one is the pattern to another - it has no repejump from one row of tition address L or because only one hole is being machined at location. The feature may not be so obvious right away. make the program shorter, stan the that the larger of (the in the program 02706). example is a variation on previous examples and also adheres to all the established so A special subprogram made for a pattern is also a common programming and can be used as well.
3.5
-14.0
02706 (STIlAIGm' GRID PAT'I'ERN) Nl G20 N2 G17 G40 GaO
NO N4 N5 N6
o
27-7 Angular grid hole pattem - program example 02707
The unknown increment in the drawing is the distance a hole in one measured along the X axis, row to the next hole in following horizontal row:
x
~
4.6 x tan16 = 1.319028774 (Xl.3l9)
The program can be written in a similar as for the the extra 'jump' between rows will straight row grid, take place along both axes: 02707 (ANGULAR GRID) Nl G20 m G17 G40 GBO NJ G90 G54 GOO X4.0 YJ.5 S900 M03
N4 G43 Zl.0 HOl MUS NS G99 GS1 RO.1 Z-O.163 Fl.O N6 G91 X3.2 L5 (KS) N7 Xl. 319 Y4. 6 NS X-3.2 LS N9 Xl. 319 Y4, 6 mo X3.2 L5 ) N1l X1.319 Y4.6 N12 X-3.2 LS Nl3 GBO M09 N14 G28 ZO MUS NlS G2S xo YO N16 M30 %
• Angular Grid Pattern the straight grid pattern is the most common a grid pattern square and rectangular hole pattern may also be in the shape of a parallelogram, called an angular grid pattem - Figure 27-7. the programming approach the same as for rectangular grid pattern, the ollly extra work required is the calculation of the increments, similar to previous methods:
Many will consider even more programs for grid patterns efficient way approaching by using subprograms or even User Macros. Subprograms patterns con~isling of a large are especially useful number of rows or a large number of columns. The subprograms, including a practical example a really grid is covered in Chapter subject of user macros is not in this handbook.
Chapter 27
e
ARC HOLE PATTERN
that is nearest to 0° iodirection), then continue direction of the arc.
Another quite common pattern is a set of equally arranged an arc (not a circle). Such an equally spaced set of holes portion of a circle cumference creates an arc hole pattern. approach to programming an ~rc hole pauern should same as if programming any other hole pattern. as the one that is most convenient. Is it the or the last arc that is easier to tind the coordinates for? at 0" 0' clock or position) would be beBer? In 27-8 shows a typical layout of an arc
STEP 1
e
STEP 2
Use trigonometric ordinates of the first
to calculate the X and
co-
Hole #1
x
= 1.5 + 2.5 x cos20 Y = 1.0 + 2.5 x siDlO
e
==
3.849231552 1.855050358
3
Use the same culate XY coordinates included hole in the pattern, the second hole angle will be 40°, the third Hole #2 x = 1.5+ 2.5 Y = 1.0+ 2.5
1.0
1
I
4 EQSP 1.5
Figure 27-8 Arc hole
= 3.415111108 = 2.606969024
1.5 + 2.5 x 00s60 1.0 + 2.5 x sin60
2.750000000 3.165063509
.4151) .607)
Hole #3
x
==
Y
c:
Hole #4
program 02708
arc center locations are known, so is the
and A number of is needed to find X Y coordinates hole center location within the bolt hole pattern. procedure is similar to that an angular but with several more calculations. line in a grid The calculation uses trigonometric functions applied to each hole - all necessary data and other information are drawing.
holes, exactly the .... V~.Ul ... required to get the 1"'-'1""1'1,.1"1 ""-'...,"1"".... there are four holes, eight calculations will necessary. Initially, it may seem as a lot of work. fn terms of calculations, it is a lot work. but keep in mind that only two trigonometric formulas are involved for any number of holes, so Ihecalculations will beobservation come a lot more manageable. Incidentally, to just about any other simi lar programming can be
lo use will be
x <::os40 x sin40
programming, is programming task
x
= 1.5 + 2.5 x cosSO = 1.934120444 Y == 1.0 + 2.5 x sinelO '" 3.462019383
e Hole #1:
Hole #2: Hole #3:
Hole #4:
Now,
4
X3.8492 Xl.41S1 X2.7S00 X1.934l
Y1.B5S1 'l2.6070 Y3.16S1 Y3.4620
program for the hole arc pattern can be written, XY coordinates for hole location from the calculations 02708:
02708 (ARC PATTERN) Nl G20 N2 Gl'7 G40 GSO N3 N4 NS N6
m
.9341) .462)
G90 GS4 GOO X3.B492 Yl.85S1 S900 M03 G43 Zl.0 HOl M08 G99 G8l RO.l Z-O.163 F3.0 Xl.4151 Y2.60'7 X2. '75 Y'3.1651
N8 Xl.9341 Y3.462
PATTERN OF HOLES
223
N9 G80 M09 N10 G28 ZO.l MOS N11 G2B Xl.9341 Y3.462 N12 MJO %
There are two other methods (perhaps more efiicient) to program an arc hole pattern. The first method will take an advantage of the local coordinate system G52. described in Chapter 40. The second method will use the polar coordinate system (optional on most controls), described later in this chapter - In program 027 JO.
BOLT HOLE CIRCLE PATTERN A pattcrn of equally spaced holes along the circumference of a circle is called a bolt circle pattern or a bolt hole pattern. Since the circle diameter is actually pitch diameter of the pattern, another name for the bolt circle pattern of holes is a pitch circle pattern. The programming approach is very similar to any other pattern, particularly to the arc hole pattern and mainly depends on the way the bolt circle pattern is oriented and how the drawing is dimensioned. A typical bolt circle in a drawing is defined by XY coordinates of the circle center, its radius or diameter, the number of equally spaced holes along the circumference, and the angular orientation of holes, usually in relation to the X axis (that is to the zero degrees). A bolt circle can be made up of any number of equally spaced holes, although some numbers are much more common than others, for example,
First, select the machining location to start from, usually at program zero. Then find the absolute XY coordinates for the center of the given circle. In the illustration, the bolt pattern center coordinates are X7.5Y6,0 ..There will be no maChining at this location, but the center of the circle will be the starting point for calculations of all holes on the bolt circle, When the circle center coordinates are known, write them down. Each hole coordinate on the circumference must be adjusted by one of these values. When all calculations for the first hole are done (based on the circle center), continue to calculate the X and Y coordinates for the other holes on the circle circumference, in an orderly manner. In example 02709 are 6 equally spaced holes on the bolt circle diameter of 10.0 inches. That means there is a 60° increment between holes (360/6=60). The most common starting position for machining is at the boundary between quadrants. That means the most likely start will be at a position that corresponds to the 3, 12,9 or 6 o'clock on the face of an analog watch. In this example, the start will be at the 3 o'clock position. There is no hole at the selected location, the nearest one will be at 30° in the counterclockwise direction. A good idea is to identify this hole as a hole number I. C?ther holes may be identified in a similar way, preferably In the order of machining, relative to the first hole. Note that each calculation uses exactly the same format. Any other mathematical approach can be used as well, but watch the consistency of all calculations:
Hole #1
x '" y
==
4,5,6,8,10,12,16,18,20,24
7.5 + 5.0 x cos30 '" 11. 830127 6.0 + 5.0 x sin30 '" 8.500000
Hole #2
In later examples, the 6-hoJe and the 8-hole patterns (and their multiples) have two standard angular relationship to the X axis at zero degrees.
x
Figure 27- 9 is a typical bolt circle drawing. The programming approach for a bolt circle is similar to arc paHern.
Hole #3
7.5 + 5.0 x cos90 6.0 + 5.0 x sin90
Y
7.5000000 11.0000000
== ::;;
C
(Xl1.8301) 8 s1 . (X7 .5) (Yl1. 0)
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 :;: : 010.0
7.5 + 5.0 x cos210 y '" 6.0 -I- 5.0 x sin210
3.16987298 (X3.1699) 3.50000000 (Y3.5)
Hole #5 I
L - 7. 5 - -t I Figure 27-9 Bolt circle hole pattern· program 02709
x
==
Y
==
7.5 -I- 5.0 x cos270 6.0 + 5.0 x sin270
== ==
7.50000000 (X7 • 5) 1.00000000 (Yl.O)
Hole #6
x
== 7.5 + 5.0 x cos330 Y '" 6.0 + 5.0 x sin330
== :;:::
11.930127 (XU.8301) 3.500000 (Y3.5)
224
Chapter 27
Once all are calculated, the program is writpatterns: ten in the same way as
the following explanation and [he 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,
Y
«(n-l)x B+A)x R+Yc
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 N6 X7. 5 Yll. 0 N7 D.1699 YB.S N8 Y3.S N9 X7.S Yl.O NlO X11.830l Y3.S Nll GBO M09 Nl2 G2S ZO.l MOS Nl3 G91 G2B XO YO Nl4 ICO
~
where ...
x Y ::::: n :::: H B:::::: A :::::
%
R :::::
It would be more logical to bolt circle center as program zero, rather than the lower comer of the part. ThIS method would el" of the boll circenter position for each value and perhaps reduce a possibility of an error. At same time, it would it more djfficult to set the on the macoordinate chine. The best solution is to use offset method. This method is especially useful for those jobs that require translation of boll (or any paUern) to other locations same part setup. For details on the G52 command, see 40.
• Bolt Circle formula In
calculations, are repetitious The methods are the same, only changes. of calculation offers an opportunity for a common formula that can used, for av"n-> ... ' of a computer program, calculator data input. etc. 27-10 shows the basis for such a formula.
B
Xc ::: Yc :=;
X coordinate Hole Y coordinate Hole number counter - CCW from 0" Number of equally spaced holes between holes = 360 I H First hole angle· from 0° Bolt radius or bolt circle diameter12 Bolt center from the X origin Bo It circle center from the Y orig in
• Pattern Orientation The bolt gle of the
orientation is specified by the anthe 0° of the bolt circle.
In daily bolt circle patterns will have not only different llUIIlVl"1 holes, but different orientations as well. bolt most commonly affected are those spaced holes is based on the mul...) and multiples of eight (4, 8, 16,24,32, ... ). relationship is important, since the orientation of the first hole wlllinfluence the position of all the pattern. other holes in the bolt
I
Figure 27-1 J shows relationship of the first holt\position to the 0° location 0" location is equivalent to the 3 o'clock or the direction.
'j
I \ R ~
._-,.....i
Figure 27·10 Basis for a formula to calculate bolt hale pattern coordinates
Figure 27-11 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 lengthytrigonometric formulas to calculate each coordinate. This seems to a slow for a CNC system with a very advanced computer. Indeed, there is a special programmethod (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: cancel
Polar coordinate
27·12 Three basic characteristics of polar coordinates
OFF
Polar coordinate system
ON
for bolt hole or arc may programmed polar system commands. Check the options of the before using this method. programming format is similar to that of programming flxed cycles. The format is, identical- for
In addition to the X and Y data, polar coordinates also require tbe center of rotation. This is point grarnmed G 16 Earlier, in program 02708 and 27-8 were calculated using trigonometpolar control the can be much simplified 10: 02710 (ARC PATTERN
N"
G9.. G8..
x..
Y.. R.. Z.. F ••
N2 G17 G40 G80 N3 G90 G54 GOO Xl.S Yl.O S900 M03
distinguish a standard cycle used in the polar coordinate mode.
cycle. system 6 must be issued to acpolar mode (ON mode). the polar coordinate mode is completed no longer required in the the command G 15 must be used to it mode). Both commands must in a separate block: StaIlaaJro
N.. G16 N •• G9 •• GS .. N •. N •• N •. N •• G15
x ..
(POLAR COORDINATES ON) Y .. R •• Z •• F •• (MACHlN.ING HOLES) u .....1•..........,.
CDORDlNA'l'ES OFF)
second factor is meaning X and words. standard fIXed cycle, the XY words defIne'the of a hole rectangular coordinates, as an solute location. In the polar mode and effect (XY 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
IO.INl')
N4 G43 Zl.O HOl MOS
U;"".",VJ..:>
same
POLAR)
N1 G20
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 N8 X2.5 Y60.0 N9 X2.S Y80.0 NlO GIS COORDlNA'l'ES OFF) Nll GSO M09
N12 G9l G28 ZO M5 N13 G28 XO YO Nl4
mo
%
next program 02711, are equally spaced on the bolt circle circumference. Dimensions in Figure 27- J3 are to the coordinate prCignurururlg lTlemlOa.
120:O~-' ;'
,I
I
60°
R6.8
180°-8-
of the hole, measured from 0°
Figure illustrates ments for a polar coordinate system.
requrre-
Figure 27-13 Polar coordinate system applied to bolt hole circle - program 02711
226
Chapter 27
02711 N1 G20 N2 GI7 N3 G90 N4 G43
(GI5-GI6 EXAMPLE) G40 GBO GS4 GOO XO YO S900 N03 Zl.0 HOl MOB
N5 GIG
G 17 plane is known as the XY plane. Ifworking in another plane, make double sure to adhere to the following rules: (PIVOT POINT)
The first axis of the selected plane is programmed with the arc radius value.
(POLAR ccx)RDmATES ON)
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 is programmed as the angular position of the hole.
NB Xo.8 Y1.20.0
N9 X6.8 nao.o NlO X6.8 Y240.0 Nl1 X6.8 Y300.0 Nl2 GIS ID3 GBO M09 Nl4 G9l G28 ZO MOS N1.5 G28 XO YO
(POLAR COORDINATES OFF)
In a table fannat, all three possibilities are illustrated Note, that if no plane is selected in the program, the control system defaults to G 17 - the XY plane.
ID6 M30 %
G-eode
Selected plane
First axis
Second axis
G17
'I:(
X = radius
Y = angle
G18
IX
Z = radius
X = angle
G19
YZ
Y = radius
Z = angle
I
Note that the center of polar coordinates (also called pivot 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 the program example 02711, the center is at XOYO location (block N3) - compare it with program 02710. Both, the radius and angle values, may be programmed in either absolute mode 090 or incremental mode 091. If a particular job requires many arc or bolt hole patterns, polar coordinate system option will be worthy of purchase, even at the cost of adding it later. If the Fanuc User Macro option is installed, macro programs can be created withnut having polar coordinates on the control and offer even more programming flexibility.
•
Plane Selection
Chapter 29, and particularly Chapter 3 J, describe the subject of planes. There are three mathematical planes, used for variety of applications, such as polar coordinates.
G11
XY plane selection
GtB
ZX plane selection
619
YZ plane selection
Selection of a correct plane is extremely critical to the proper use of polar coordinates. Always make it a habit to program the necessary plane, even the default G17 plane.
Most polar coordinate applications take place in the default XY plane, programmed with the G 17 command.
•
Order of Machining
The order in which the holes are machined can be controned by changing the sign of the angular value, while the polar coordinate command is in effect. If the angular value is programmed as a positive number, the order of machining will be counterclockwise, based on. the 0° position. By changing the val.ue to a negative number, the order of machining will be clockwise. This feature is quite significant for efficient programming approach, particularly for a large number of various bolt hole patterns. For example, a center drilling or spot drilling operation can be programmed very efficiently with positive angular values (counterclockwise order). The start will be at the fust hole and, after the tool change, the drilling can continue in the reverse order, starting with the last hole. All angular values will now be negative, for the 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 application using the G 16 corrunand eliminates al.1 wmecessary rapid motions, therefore shortening the cycle time.
FACE MILLING milling is a machining operation that controls height machined part. For most applications, milling is a relatively simple operation, at least in the sense it usually does not include any difficult "V'lLU'.'" cuWng tool used for face milling is typically a tooth cutter, called a face mill, although end for certain face milling operations, usuaUy within smaJl areas. The top surfaces machined with a mill are generally perpendicular to the of the cutter. In CNC programming, the face are fairly simple, although two important .... v,'''' .....'''. are Q
Selection of the cutter diameter
Q
Initial starting position of the tool in
to
It
to have some experience milling principles, such as the right cutter tion, distribution of cuts, machine power other technical considerations. ones are covered in this chapter, but catalogues and various technical ...""F,,,,...,, ... ,,.,,,. in-depth source.
CUTTER SELECTION all milling operations, tool that rotates while the
that a
employs a cut~ stationary. material be re-
a cut or milling is so effortless not pay sufficient milling cutter, proper chine requirements and
A typical face mill is a multi cutter with interchangeable carbide inserts. face mills are not recommended for although an HSS end mill can be a suitable to mill small areas or areas hard to get to in any other Typical to a face milling operation is the fact that not of the milling cutter are actually working at same time. Each insert works only within a part of one complete revolution. This observation may be an consideration when trying to establish an optimum a face milling cutter. Face milling does power resources from the machine tool. in the cutter body. it is properly mounted.
•
Selection Criteria
Based on the job to be GUller has to Lake into account
mill
Q
Condition of the eNC machine
Q
Material oftha part
o
Setup method and work holding integrity
Q
Method of mounting
Q
Overall construction of the cutter
o
Face mill diameter
Q
Insert geometry
The last two items, cutter will influence the actual although other items are
geometry, the most,
• face Min Diameter
a single 2.5 inches mill as a suitable a good formation of For multiple cuts, that can be used for rigidity, depth and width related factors. of face milling is to machine specified height. For this type of . a mill diameter size, which in means to use relatively large diameter face mills. 2 12 inches (50 to 300 mm) are not unusual, the job.
The top of a part to
m width mill. All tooling ..........u.J.v'F.u•."., mill (5 inches in the ..."' ...... ,,1-"'"'' though body can be found in well. The nominal diameter always refers to of the cut. There is no way to tell the actual tool body from the nominal size alone, it 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 obstacles. The size of the cutter body may prevent access to some areas of the part and interfere elsewhere as well. 28- J shows some typical configurations.
Negative
bej'ml~rrv
Negative face mills the insert usually require a machine and a robust side effects are poor fonuation of the but not for some kinds of cast irons, is hardly any curling during chip forwhere mation. Their main benefit is the economy, since are generally sided, offering up to for a single inserted in mill. Double Negative Geometry
Fjgure 28-1 Nominal diameter of various face mill cutters
• Insert Geometry and ,",pr'",..,.,,,,, tenuino\ogy of to understand tenus m promilling cutters the tooling companies available gramming. Most booklets for the cutters inserts catalogues and explain the cutter as well as all they manufacture in mind that tool technology related terms. rapidly and constant are does change programming chapter, being made. very basic items insert geometry for we look cutters. face Insert geometry and insert is determined by a design I.hal
insert in the during a cut. strongly influence quality of the cutting. There are typically three general categories. on the cutting rake of the mill (known as rake angle): o ;::rtive geometry
o Negative o Combination of both
Double negative geometry can only if the machine 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 do not flyaway from ease, possibJy chip jamming against the or wedging confined areas. PositiVe/negative this clogging problem. ~FI!.:mL'R
I Negative Geometry ,
Positive / Negative geometry is most beneficial to operations where chip clogging could ...."'r·A...'''' This dual offers strength 'curling' into insert with the a spiral shape, This design usually most suitable full widtb milling. Always consult specifications the cutting tool manufacturers compare several products deciding on the most suitable choice for a particular Facc mills and their inserts come literally in hunand manufacturer claims superiority
CUTTING CONSIDERATIONS
... single or double or double ... positive I npn'l'ITI'l.11>
Any variations are too numerous to list, but a short overview offers at least some for further studies, Positive Geometry
cutters require machining power cutters, so they may more suitable on CNC machines usually small machines. They a good are a choice for machining cutting load is not too heavy. single therefore less
To program a cutting motion for a face mill, it is impor(ant to understand how a mill works best different conditions. example, unless a specially designed milling cutter insert geometry, shape and are used, try to milling a width that is to, or only a larger than, the cutter diameter. cut may cause the edge to width face wear out prematurely chip to 'weld' to the insert Not only the suffers in form of a wear out, the surface finish as well. In some more severe cases, the insert may to be discarded Increasing the machining cost. and undesirable relationship part width during milling.
FACE MILLING
229
Desirable
Undesirable
I
~
CI
28-2 Schematic relationship of the cutter diameter and. the pa.t! width. Only the cutter size (a) is although not Its posItIOn.
The illustration shows only relationship of culler diameter to the width - it does not suggest the actual of culter into the The most tant consideration programming of a face the angle the milling cutter enters inlO the
• Angle of Entry mill is by position the to the part [f a part can cutler cenler line with a single cut, avoid situations where the cutter center position the part center This neutral position causes a chatter and poor finish. [he cutter away from center line, either for a negative cutter angle, or a cutter entry angle. Figure both types angles and their effects.
A
angle of entry (not shown) culter center Needless to coincident with the part enters material, a certain force is angle, cutting Since insert it is the absorb most of 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 at the middle, at the strongest point of the insert. is the preferred method, as it increases the It is always a good to keep the mill center within [hepar! area, rather away from it. way, the will always enter at the preferred negative assume a solid part mill has to travel over some cut will intenupted. into and exit from part during imenupted cut will cause the cutter entry angle to be variable, not constant As many other facconsidered in milling, take these rectors have to ommendations and suggested only as guideAlways consult a tooling representative on the method of handling a particular face job, \ar\y materials that are difficult to
•
Milling Mode
In milling, the prograllUTIed cutting direction, to table motion direction is always important. In face, this so important it is discussed in several sections 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 / ENTRY ANGLE .~
a
"
--bl Figure 28-3 Insert entry angle into the part. W:: width of cut (a) at the strongest/nsert po.int - ne!!~tive entry angle (b) at the weakest Insert pomt . positive entry angle
o
Climb milling mode
A neulral mode is a situation where the cutter or a face, climb milling on one lows center line of a side and conventionally milling on the side of center conventional mode is also called 'up' line. mode and the climb milling is also called 'down' mode, These are aU correct although the terminolmay 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 cuts, the climb milling mode is the best overall vHI... lv'.... In Figure example (b) shows (or climb milling mode) called up cutting
(a) the neutral the so called down cutting and example shows the so conventional mode).
o
Chapter 28
As an overall general a coarse density cutter is usually a suitable choice. more cutting inserts are 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.
......-- Programmed direction
Table direction .......
a
.......... Programmed direction
At all at least one cutting must be in contact with the which will prevent heavy cut. the possible damage to the cutter and to [he machine. face mill diameter is situation occur jf a for a narrow part width .
PROGRAMMING TECHNIQUES
Table direction .......
b ......-- Programmed direction
Although defined earlier as a simple operation, milling can programmed better if some common sense points are Since milling often cutting area, it is important to consider caretool path from the start position to fully position. Here is a list of some points that should evaluated any face milling operation: o
Always plunge-in to the required depth away from the part (in the air)
o
If surface finish is important, change the cutter direction away from the part (in the air)
o
the cutter center within for better conditions
Q
Table direction .......
part area
Typically, select a cutter diameter that is about 1.5 larger than the intended width of cut
28-5 shows a simple plate
28-4 Face milJing modes: (a) Neutral milling mode (b) Climb or 'down'milling mode (c) Conventional Dr 'up' milling mode
for
Width of cut
• Number of Cutting Inserts Depending on the face mill size, the common tool is a 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. gories,
{InSUffiCient overlap
Width of cut
mills will belong into one of these three cateon the cutter density:
o
Coarse density
· .. coarse pitch of
o
Medium density
· .. medium pitch of Inserts
o
Fine density
· .. fine pitch of inserts
b Figure 28-5 Width of cut in face milling -
diameter
is the recommended method
FACE MILLING
1
Figure 28-5a illustrates incorrect and Figure the correct width a face mill cut. In the example (a), lhe cutter is in the part with full causing friction at cutting and tool The example (b) keeps only 2/3 of the cutter diameter in the work, which causes a suitable chip as well as favorable angle insert entry into the material
• Single face Mill Cut For first face programming example, we will 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.
XOYO is at lower left comer. To establish position, consider the part length of the cutter (512=2.5) and the (.25). start X axis position will be the sum of these values, X7.75. For Y axis start position the n,vp'f'hi'lnO'<.: on edges and select climb milling (It the same Actually, the climb milling be combined with a little of conventional which is quite normal face milling operations. Figure shows the cutter start position at X7.75Y 1.0, and end position at X-2.75Y 1.0, as well as the of calculations.
---5.0--~
3.0
5)(3
PLATE
5)(3)(1
Figure 28-6 Example af a single (ace miff cllt - program 02801
From the drawing is apparent that the face milling will part, so the X axis horizontal direction place along will be selected. Before the can be started, are two major decisions to a
mill diameter
a Start and
28·7 Face mill positions for a single face mill cut example
The position YLO was based on the desire to have about overhang at one quarter to one third of the cutter part edge, best insert entry angle. 1.5 inch overis 30% of cutter diameter, the programmed position was established at a convenient YI.O. Now, part program for the single milling cut can be as program zero (ZO). Only one written, with the top face cut is used - program example 02801.
position of the cut
There are important decisions to make, but these two are the most The part i~ only 3 inches wide. so a face mill that is wider than 3 inches should be selected. Allhough a inch mill seems like a natural choice, let's see if it conforms to the conditions that been established earlier. diameter should be 1.3 to 1.6 larger than the width cut. In this case, 3 x 1.3 = 3.90 and 3 x !.6 4.80. With a 04.0 mill, that means only I times larger. Cooneed for cutter to overlap both of the ;)""I'
02801 (SINGLE FACE MILLING COT)
N1 G20 N2 Gi? G40 G80 NJ G90 G54 GOO X7.75 Yl.O 5344 M03 N'4 G43 Zl.O HOi N5 GOl Z-O.2 F50.0 MOS N6 X-2.?S F21. 0 m GOO Zl. 0 M09 N8 G28 X-2.?S Yl.O Zl.0 N9 MJO %
Spindle speed and are based on 450 ftlmin surface speed, .006" per tooth and 8 cutting used only as Note the Z axis approach in block N4. Although the tool is well above an empty area, rapid motion is split between blocks N4 and N5, for safety reasons. With increased confidence, rapid to the directly be an option, if This shows the proZO at the top of the unmachined not the more customary finished face.
232 •
Chapter 28
Multiple face Min Cuts
general principles applying to a single cut do apply equally to multiple face cuts. Since the face mil! diameter is often too small (0 remove aU material in a single pass on a large material area, several passes must be programmed at the same area to be are several cutting for a milled and may produce good machining under certain circumstances. The most typical ods are multiple unidireclion£ll cutting and nwltiple bidirectional 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, mining, it the part. This is a common method lacks efficiency, because of frequent rapid return motions.
Multiple bidirectional cuts, often called
cutting, are used frequently; they are more efficient then the unidirectional method, but cause the face and milling to the conventional versa. This may work for some jobs, but is not erally recommended. In the next two i1Iuslrations, Figure 28-8 cally a unidirectional face milling. Figure bidirectional milling.
Bidirectional approach to a for rough and finish face milling
face cut
There is fairly method that cuts only in one normally in climb milling This method of a circular or a spiral motion (along the XY may axes) and is the most recommended method. It combines the two previous methods and is illustrated in Figure 28- 10.
scnematishow~ a
Figure 28·10 Schematic tool path representation for the climb face milling made, applied tD a unidirectional cutting
ROUGHING
FINISHING
FigUre28~ Unidirecti naf approach to a multiple face cut for rough d finish face milling
illustration the order and direction of viduallooi motions. is to make each cut approximately same width, only about 213 of diameter 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 be either the X or the Y pnnclpIes of the cutting motion will remain the same. Note the start position (S) nod the end position (E) in the two illustrations. They are indicated by the heavy dot at face center of cutter. Regardless of the cutting method, start and milling cutter is always in a clear position at of cutting, mainly for safety reasons.
10'S
13
i
~
6
13 x 6 Figure 28-11 Example of a multiple face mill cut - program 028D2
FACE MILLING
233
The programming example multiple face milling cuts is based on the drawing shown in Figure 28-11. The previously discussed are applied should present no difficulty in understanding the program. 02902
of the examples could been done in a shorter the X resulting in a smaller program. Howpurpose of exampJe illustrations, using the Y was more convenient.
USING POSITION COMPENSATION
(MULTIPLE FACE MILLmG CUTS)
Nl, G20 N2 G17 G40 GBO
N3 G90 G54 GOO XO.7S Y-2.75 8344 M03 N4 G43 Zl.O HOl N5 GOl z-O.2 F50.0 MOa
1) (POS 2) (POS 3)
N6 Y'8. 75 F21. 0 N7 GOO X1.2. 25
4) N8 GOl Y-2.7S (POS 5) N9 GOO X4.0 (POS NlO GOl YB.7S (POS 7 - 0.1 OVERLAP) Nll GOO XS.9 (POS 8 - END) Nl2 GOl Y-2.7S Nl3 GOO Zl.O M09 Nl4 G28 XB.7S Y-2.75 Zl.O Nl,S M30 %
In p'fOgram 02802. aH relevanr blocks are identified with too] positions corresponding to the numbers in an earlier Figure 28-10, width was separated into four equal cuteach, which is a little than 2/3 of a cutter. its width of cut. of the part are the same as for the single cut example. major deviation from the norm was the motion to position number 7 in and block Nl] in the program. The last cutting motion is from position 7 to position 8. In order to make the surface finish better, the expected cut was overlapped at X9.0 by .100 to the value of In Figure the schematics 02802 program are shown, including block number references.
In both previous examples, the starting XY position of the face has calculated, its a suitable To use 0280 I program as an example, the starting position was X7 .75 Y 1.0. part was 5.0 inches. plus a clearance of plus the inches cutter total X7.75 absolute value of cutter center. disadvantage of this is apparent when using a mill that has a different diameter than the one expected by the A last change of the mill at the may cause problems. Either there will be too much clearance (if the new tool is smaller) or worse will be not enough clearance (if tool is larger). is another way to solve this problem. As the title of section the solution is to use ::3 using a 05 inch face mill. In to the safety rules in machining, the mill has in an open area, away from the part. In ormill cutting from part by one quarter inch, the clearance of inches has to be incorporated with the ofthe face mill, which is inches, to achieve the actual tool starting position for milling cutter. In a milling program, this situation will of the following forms:
on one
mill radius is programmed using the actual values
o
The
o
Position compensation method is used
In the first case, the program 0280 I may be with following content:
result,
02801 (SmGLE FACE MILLING CUT - NO COMPENSATION) Nl G20
N2 N3 N4 N5
05.0 CUTTER Figure 28-12 Multiple face milling details for program example 02802
Gl? G90 G43 GOl
G40 GBO G54 GOO X7.75 Yl.O 8344 MO) Zl. 0 H01 Z-O.2 F50.0 MOe
N6 X-2. 75 F21. 0 N7 GOO Zl. 0 M09
NB G28 X-2.7S Yl.O Zl.O N9 M30 %
234
Chapter 28
Block N3 moves the face mill to the actual, calculated start posllion the cut. In block N6, the cut is completed again. at actual previously position. program 02803 using position compensation is similar. but it some notable does
02801 with the new proCompare the original 02803, program that uses the position compensation
5 x 3 PLATE 28-13 Example of the position con10eJr}sal[lOn as applied to face milling program 02803 02803 (SINGLE FACE MILI..ING CUT) (USING POSITION C'OlMPllmlAT
Nl G20 N2 G17 G40 GSO
N3 G90 G54 GOO XS.O Yl.O 8344 MOl N4 G43 Z1.0 HOl N5 G46 XS. 25 DOl
N6 GOl Z-O.2 F50.0 MOS N7 G47 X-O.2S F21.0 Ni GOO ZLO M09 N9 G91 a2B XO YO ZO NlO teO %
When comparing, note the major differences in N3 . (new X value), in block N5 (compensation G46), and in block N7 (compensation G47). The situation will benefit from some more detailed evaluation. The N3 block contains X position with value of X8.0. That is the initial position. Since the plan is to apply the 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 always 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 prowhich is the total of grammed coordinate value is the part length (5.0) and the selected (.250). mill radius is totally disregarded in the program. The main benefit this method is that, within reason, the grammed coordinates will not change, even if the face mill diameter is changed. example, if a 03.5 inch mill is used. the job can done very nicely, but the starting position may have to changed. In this case, the stored value 1.75, but N5 will still conthe DO I offset will CNC system will do its work. tain last block worth a further look is N7. It contai os G47 position compensation command. The X value is equivalent to the selected clearance of X-0.25. G47 command means a double elongation-of the offset value along the of the programmed direction. is need LO compensate at the start of cut, as well as at the end of cut. Also note the initial position the the same, no compensastart position cannot milling tion will take place. With some ingenuity, the can be programmed very creative]y, using a rather obsolete programming feature.
CIRCULAR INTERPOLATION
and and many olher machines, routers, filers, wire EDM, and others.
applications. there related 10 contouring. the other chapler. along a tool path contouring is called in proftling on centers, as well as such as simple and laser pro-
Circular inlel polalion is used complete circles ill such applications as radii (blend and parlia}), circular IJV'~"'''''~ CI"\n"r1r'~ Or conIcal shapes, radial recesses, corner helical even large counterbores, etc. The terpolale a defined arc wilh a very information is given in
/ - CENTER QUADRANT POINT
/ RADIUS figure 29·1
Basic elements DI a circle
• Radius
MENTS OF A CIRCLE understand the principles of programming various cirmotions, it helps to know something about basic As an that is entity known as the common in everyday life, a circle various properthat 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 common dictionary definitions - Figure 29· 1.
similar definitions of a circle that can and mathematical books. The a circle and its various properties as handbook, provides a sufficienl knowledge programming. Additional will for some specialized or complex appl At this time, become at leasl miliar with the geometrical and trigonometric for arcs and circles.
In the simplest .~u,~"'_~, terms, a circle is defined by ils c:enfer point and its os. Two of the most important in part programming are Ihe elements of a circle radius and the
center point location circle is also important of the word radius CNC programming. is radii, although the word 'has been accepled as a colloquial term. In programming, radii and diameters are used all the on a daily basis for aJmost all contouring machines. in machine shops use radius and diameter dimensions a lot, with an almost unlimited number of possible Radii and diameters are also tool insert designation, they are gauging (inspections), as well as in tions and various auxiliary programming. the actual application of an arc or is not important, only its mathematical ,..1'"I'::IT<:I,..tp·rl
235
236 •
Chapter 29
Circle Area and Circumference
The area of a circle is defined by this formula:
~
where ... A R 1t
:=
= =
Area of the circle The circle radius ((lnstant (31415927)
The circumference of a circle is the length of a circle if it were a sU"aight line:
1.&
where ... C
o
Circumference of the circle The circle diameter
7L
Constant (3.1415927)
It is important 10 note that both the area and circumference of a circle (its actual length) are seldom used in CNC programming, although understanding their concepts presents a rather useful knowledge.
QUADRANTS A quadrant is a major properly
or a circle and can be de-
fined mathematically: A quadrant is anyone of the four parts of the plane formed by the system of rectangular coordinates.
It is 10 every programmer's benefit to understand the concept of quadrants and their applications for circular motions In milling and turning programs. A circle is programmed in all four quadrants, due to its nature, while most arcs are programmed within one or two quadrants. When programming the arc vectors I, J and K (described later), the angular difference between the arc start and end points is irrelevant. The only purpose of arc vectors is to den ne a unique arc radius between two poi nts. For many arc programming projects, the direct radius can be used wi lh the R address, avai lable for majority of control systems. In this case, the angular difference between the start and end pOints is vcry important, because the computer will do its own calculations to find the arc center. The arc with the angular di ffcrenee of 1800 or less, measured between the start ;:md end points, uses an R positive value. The arc in which the angular difference is more than 180°, uses an R negative value. There ru-e two possible choices and the radius value alone cannot define a unique arc.
Also worth mentioning is a mirrored tool path and its relationship to the quadrants. Although it is not a subject of Ihe current chapter, mirroring and quadrants must be considered 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 abom mirror image as a programming subject. For now, it should be adequate to cover a very brief overview only_ For example, if a programmed tool path in Quadrant I is mirrored [0 Quadrants II or IV, the cutting method will be reversed. That meanS a climb milling will become conventional milling and vice versa. The same rule applies to a programmed tool path ill Quadram II as it relates to Quadmnts 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 desirable. Similar changes will occur for other quadrants.
•
Quadrant Points
From [he earlier definition should be clear (hat quadrants consist of two perpendicular lines that converge at the arc center poi nt and an arc that is exactly one quarter of a circle circumference. In order to understand the subject deeper, draw a line from the center of an arc thai is paraHelto one of the axes and is longer than the arc radius. The line created an intersection point between the line and the arc. This point has a special significance in programming. It is often known as the QuadraJlt Point - or the CQldinal Point - although the lauer term is not used too oftcn, except in mathematical terminology. There are four quadrant points on a given circle, or four intersections of the circle with its axes. The quadrant points locations can be remembered easier by associating them with the dial of a compass or a standard watch with an analog dial:
Degrees
Compass direction
Watch
located
direction
between quadrants
0
EAST
3 o'clock
IV and I
90
NORTH
12 o'clock
I and II
180
WEST
9 o'clock
II and III
270
SOUTH
6 o'clock
III and IV
At this point of learning, it may be a good idea to refresh some fermI) of rhe ~ngle direction c1efinition The eSf("lb-
lished industry standard (mathematics, as well as CAD, CAM and CNC) defines an absolute angular value as being positive in the counterclockwise direction and always starling from zero degrees. From the above table, zero degrees correspond to the East direction or three n 'e/()rk position of an analog clock - Figure 29-2.
CIRCULAR INTERPOLATION
237
POSITIVE DIRECTION
/
I
•
1
Circular Interpolation Block
There afC two preparatory commands programming an arc direction:
ANGLE
G02
Circul
G03
Circulm mOlion counterclockwise
DIRECTION
MatheJ7Iatlcal rU>1Jmlll1n
01 the arc direction
quadrant poinls arc im· In some cases, the quadrant ,even If the cIrcular is is particularly lrue where crossing the quadmodern controls block, wilh
PROGRAMMING FORMAT The progrnmming format path must i ncl ude lask of cUlling an arc parameters are defined as:
1001
(he
o
Arc cutting direction (CW or CCW)
o
Arc start and end points
o Arc center and radius value The cutting must more detaillaler in this used for circular molion . . . rr"'rr'........ ramelers related to the
•
"Y'I
Arc Cutting Direction
A cutting 1001 may move clockwise (CW) or lenns are assigned by convemion. mol ion direction is determined hy at the plane in which the circular mOlion The motion from [he plane venical horizontal axis is clockwise, reverse is counterclockwise. This convention has rnalltematical docs not always malch the machine axes IeI' 31 describes machining in planes, this take a brief look
Both the G02 and G03 commands are modal. they remain In effect unLilthe end of program or until canceled by another command from the same G usually by another mOlion command. The preparatory commands G02 and are words used in programming 10 establish circular tion mode. The coordinate words following 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 some conLfol indicate it as G 18. (he ZX The plane selection and the combination of circular motion and the arc cutting direclion determine the arc end point, and the R value specil'ies !hearc radius. Special arc center modifiers (known as vectors) are also availif programmer requires (hem. Wilen Iht! or G03 command is aclivaled by a CNC any active 1001 motion command is automalically canceled. 111is canceling mOlion is Lypically GOO, Gal or a cycle command, All circular 1001 path momust programmed with a cUlling feedrate in dlecl, applying the same basic rules as for linear interpolation. That means the fcedrale F must be programmed before or the cUlling mOlion block, Jf (he feedrate is not speciin the circular motion block, the control system will aUlomatically look for the last programmed feed rate. If in effecl al all. many controls usually rcturn an en'or (an alarm) to lhat effect. The feed rate tIed in one of two ways. Either directly, wilhin block only or indirectly, by assuming Ihc lasl motion in a rapid mode is not posnot possible is Ii simultaneous three axes circular molion. more details on this subject, look up Chapler helical mil On mllSI
majority of older conlrols, direct radius address R specified and the arc center vectors I, J and K
238
Chapter 29 _
... _....................................................................... ...
G02 x .. Y .. I.. J .. G02 X .. Z .. 1.. K .. G03 X •. Y .. I.. J .. G03 X .. z .. I.. K ..
Milling Turning Milling Turning
- cw - cw - CCW - CCW
program program program program
Control systems supporling the arc radius designation by address R will also accepllhe UK modifiers, bUi the reverse is not (rue. If bOlh the arc modi fiers UK and the fad ius Rare programmed in the same block, the radius value takes priority, regardless of the order:
x..
• Arc Center and Radius
r ..
J .. G02 (G03) x" Y .. I .. J .. R ..
G02
(GO))
Y .• R.o
The controls [hat accept only the modifiers UK will reLurn an error message in case Ihe circular interpolation block contains the R address (an unknown address). •
Arc Start and End Points
The Slar! poim of an arc is the point where circular interpolalion begins, as determined by the cUlling direction. This poinl must be located on the arc and it can be a tangency point or an Intersection, resulting in a blend radius or a partial radius respectIvely. The instruclion contained in the start roint block is sometimes called the departure command - Figure 29-3. CENTER POINT
j,
START ,CENTER POINT I POINT
START POINT
CCW=+
~ ~ ' .\., -, ' - R .-.::'-,- ---.-.-, --1-
-.-
1-
USED IN MILLING
~
K-
-
USED IN TURNING
Figure 29·3
Center point and start point of an arc
The arc start poilU is always relative to the cU!ling motion direction and is represented in the program by coordinates in the block preceding the circular molion. In terms of a definition, The start point of an arc is the last position of the cutting tool before the circular interpolation command,
Here is an example: N66 N67 N68
GOI XS.75 Y7.S G03 XII.. 625 Y8. 625 R1.l25 GOl X .. Y ..
In Ihe example, block N66 represents the end of a contour, such as a linear motion. It also represents (he start of the arc that follows next. III the following block N67, the arc IS machined, so Ihe coordinales represent the end of arc and slart point of the next elemen!. The last block of the exnmple is N68 and represents the end point of (he elemcnt Ihat starred from the arc. The end point of the arc is the coordinate point of any two axes, where the circular mOlion ends. This point is sometimes called the target position.
The. radius of an arc can be designated with the address R or with arc center vectors r, J and K. The R address allows programming the arc radius directly, the lJK arc center vectors are used to actually define the physical (actual) arc center position. Most modem control systems support the R address input, older conlrols require {he arc center vecto.rs only. The basic programming format will vary only slightly between the milling and turning systems, particularly for the R address version: G02 x .. Y .. R •• G02 x.. Z .. R .• G03 X .. Y .. R •• G03 X.. Z .. R •.
Milling Turning Milling Turning
program program program program
- CW - cw - CCW - CCW
Why is [he arc center location or the arc radius needed at all? It would seem that (he end pain! of an arc programmed in combination with a circular interpolation mode should 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 mathematical possibilities and all are corresponding to this incomplete definition. There is virtually an unlimited number of arc radii thal will fit between the programmed stan and end poinl~ ;mil ~till milinlrlin the cutting direction. Another important concept to understand is that the CUlling direction CW or CCW has nothing to do with the arc center or the radius. The control system needs more information than direction and target point in order to cut the desired arc. This additional information must contain a definition thaI defines a programmed arc with a unique radius. This unique radius is achieved by programming the R address for the direct radius input, or using (he UK arc center vectors. Address R is the actual mdius of the tool path, usually the radius taken from the part drawing.
•
Arc Center Vectors
Figure 29-4 shows the signs of arc vectors I and J in all possible orientations. In different planes, different pairs of vectors are used, but the logic of their usage remains ex· actly the same. Arc vectors 1. J and K are used according to the folloWlll l1 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 Quadrant
IV
J+
D
29·4 Arc vectors I and J (also known as arc modifiers) and
1+ J+
1- J+
10
1- J+
designation in different quadrants (XY plane!
error.
cases where both There is JlO
and
Arc center vector K is the with "n" ... ili"rl measured the start point or the arc, to the center of the arc, parallel to the Z axis. (he start point of lhe arc and the
arc (as specified by the DK vectors) is most as an incremenlal distance the two points. control systems. for example many Cincinllati use the absolute designation to an arc center. cases, the arc center is programmed as an absolute value from the program zero, no! from arc center. sure how each of the cOnlrol terns in the shop handles these situations. in this respect creates a major format, so be careful 10 avoid a
io those in the shop. using absolute 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 a directional sign - absence of the assumes a positive direction, minus direction and must always be written. Arcs center de· finition follow standard
•
Arc in Planes
machining centers, the three geometrical planes correct arc vectors must be G17 G02 G18 G02 G19 G02
(G03) x .. Y •• R •. (G03) X •• z .. R •• (G03) Y •• Z •• R •.
(or
I .. J .. ) 1.. K •• ) J .. K .. )
o
Chapter 29
E
G18 - ZX PLANE
G19 - YZ PLANE
x
y
z
z
~------------~X
y
29-5 Arc
direction in three planes - the orientation of the axes is based on mathematical, not machinc, plancs
rn,-n'T\f'
plane is no! aligned with the axes used mlhe program a(e [he circular molion will to the axis selection ill the program. modal motion is omiued. The Ihis potentially harmful problem is to follow a
In nonstandard planes. (he circular program always contain specifications for both a..'(es, as arc vectors or the R value. Such a block is will always be executed on the of axes priority_ This mediod is preferable to the vious!y defined plane. Even if the plane correct, the resulting tool motion will
The simplest form of a blend radius is pendicular lines that are parallelw (he orthe start and end points only a I ions or subtraclions More complex cl'llcul/'llion is when even one line is al an angle. In this case, point, functions are used to calculate the staft or or both. Similar calculations are required for blends between other entities as well. A blend arc is known as a arc or afillet radius.
•
Partial Radius
The opposite of a blend arc is a smooth blend between two conlour
RADIUS PROGRAMMING
an arc, 11 '" I', n
Progrrunming arc is very common. is only a porlioll. of a circle and are gram an arc. If the arc is 360°, it must the start position bei the same as end position. In case, a full circle is Ihe resu 1t.1f only a portion of the only 11 Two
".,-1 as a ra-
point is not tan-
il in two for the arc start a blend are, dehad used in
III
o
Blend radius
o
Partial radius
Each radius may be nrr\OrMTIrrlJ'·rI rection and each may any orientation that the culti
•
Blend Radius
A point of tangency between an arc and adjacent element creates a blend radius. Blend radius is defined as a radius tangent between a line em arc, an arc and a line, or between two arcs. A blend arc creates a smooth transition point of tanbetween one conlour element and another. gency is the only contact point between the two elements.
FUll CIRCLE PROGRAMMING All Fanue and many controls support a full circle programming. Full circle is an arc machined along 360°. Full circle is on the Jathes in theory only, since the not allow it. For the millfull is fairly rouli ne and is reas: o
Circular
o
Spotface milling
o
Helical milling (with linear
o
Milling a cylinder,
or cone
CIRCULAR INTERPOLATION
1
A full circle cutling is defined as a tool motion completes 3600 between the start end points. resulting in identlcal coordinates for the start and end tool pos)([ons. This a typical application one programInl of a full circle - Figure 29-6,
GOl G02 G02 G02 G02 GOO
Z 0.25 FlO.O X2.0 YO 7S 1-1.25 JO F12 0 XO.7S Y2.0 IO Jl.25 X2.0 YJ.25 11.25 JO X3.25 Y2.0 IO J-l.2S ZO.l
(BLOCK 1 OF (BLOCK 2 OF 3 OF (BLOCK 4. OF
a four block programmi /
\
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.
\
starting position
--2.00 -
rant points,
29-8 Full circle programming using one block
COV-
cutli
"\ \
thaI
4) 4) 4) 4.)
I1rl1f1rrnm
G90 GS4 GOO X3.25 Y2.0 S800 MQ3 GOl Z-O 25 F10.0 G02 X3.2S Y2.0 1-1.25 JO F12.0
entry
more difficult by establishing the cut from any of the four are at , 1800 and 270". For exam-
, there will be five circular ple, if the coordinates of the start poml of blocks, notfour, the arc (shown asxs ys willhavetobecalculated using trigonometric functions - Figure 29-8:
xs (FULL CIRCLE)
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 same resuiL') - Figu.re
START POINT
"- -- R1.25
I,--2.00-~•
29-8 Full circle programming using five blocks
'.
I
I
2.00 R1
I
J_
Figure 29·7 Full circle nJ'f'lI,,::.n'fflUII'I
four blocks of program entry
G90 G54 GOO X3.25 Y2.0 seoo M03
G90 G01 G02 G02 G02 G02 G02 GOO
code
GS4 GOO X3.04B3 Y2.6808 SBOO MO) Z-O.25 FlO.O X3_25 Y2.0 I-1.0483 J-O.6808 X2.0 YO.7S I-1.25 JO XO.75 Y2.0 IO Jl.25 X2.0 YJ.2S I1.25 JO X3.04S3 Y2.680B IO J-l.25 (BLOCK ZO.l
Values x~ and y, were calcu lated by the functions: ~ 1.25 x cos33 1.0483382 Ys = 1.25 x sin33 = .6807988
1 OF 5)
2 OF 3 OF 5) 4 OF 5) 5 OF 5)
242
29 •
From the resuits, [he start poinl of the cut can be found: X=2+Xs '" 3.0483382 Y = 2 +
Ys
2.6807988
Boss Milling
As an example of a full circle be used, as illustrated in Figure
X3.0483 Y2.6808
If the control in one block, quire the I
a
o 01.812
CilflnOI
G90 GOl G02 GOO
G54 GOO X3.0483 Y2.6808 S800 M03 Z-O.2S F9.0 X3.0483 Y2.6808 1-1.0483 J-0.680a ZO.l
J "ri,-I""'M
G90 GOl G02 GOO
R.
TOP
cannot be arbitrarily replaced with next example is tlot correci'
L
,-
G54 GOO X3.0483 Y2.680B 5800 M03 Z-O.2S F9.0 (* WRONG *) X3.0483 Y2.6808 Rl. 25 F12. 0 ZO.l
~",
'lIIj
····1
I FRONT
. I
. Mathematically, lhere are many options for a full programming. If an R value is programmed for a 360 0 arc, no circular motion will take place and slich a block will be ignored by (he conlrol. This is a precaution built into {he control software, to prevent from cutting an incorrect arc because of the many existing possibilities. In 29-9, only a handful of the possible ares is shown. The circles );hare the same cutting direction, start point. end poinl, and radius. They do nOT share center points.
29-10 Boss milling eXiJ~mf)"e
lor program 02901
are terms used for external milling is an milling of a full The cutler used will be j/VI.-Fl. •• l.
at
deplh:
02901 (0.75 DIA END MILL)
Common radius and motion direction
--
Common start and end point
N1 G20 N2 G17 G40 GSO N3 G90 G54 GOO X-l.O Yl.S S750 M03 N4 G43 ZO.l HOI NS GOl Z-O.37S F40.0 MOS N6 G4l YO.906 DOl F20.0 N7 XO F14.0 N8 G02 J-O.906 N9 GOl Xl.O F20.0 M09 NlO G40 Yl.5 F40.0 MOS N11 G91 G28 XO YO Z2.0 Nl2 M30 %
./
Figure 29-g
Manv mathematical possibilities exist lor a lull circle
In program 0290 I, the tool moves first to 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 by revcrsing the initial motions, it returned to its Y start poi nt - Figure 29- JJ shows Ihe block numbers.
lion and depth, then the
withR
CIRCULAR INTERPOLATION
N2
243
N9
N8 GOl G40 XO F20.0 M09 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.
N7
This is true for almost any circular application, very few that use a special cycle.
• Internal Circle Cutting ~ Circular Start
Figure 29-11 Boss miJling example - tool motions for program 02901
Alternate applications may include multiple 1."""""''', a semifmishing pass, wo cutting related to machining.
• Internal Circle Cutting - linear Start .LU""'Ll'Q' ~"'''''U1J'~,
tion will
full circle cutting is common and has many such as circular pockets or counterbores. In an a 01.25 circular cavity is to be machined to
simple linear approach programming me:thcfd
last example will not be practical when smooth blend l.vJeen the approach and the circular cut is required. prove the surface finish, the start position of ,-",-".I..u,:u tion can be reached on an arc. The usual startup is ftrst at a 45° linear motion, to apply cutter then on an arc that blends with the full 29-13 illustrates the principle and the complete program.
.250 inch, 3n program 02902. A simple moused 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 Internal circle cutting - linear approach only 02902 (0 . 5 DIA CENTER END MILL)
m
G20
N2 G17 G40 GBO N3 G90 G54 GOO XO YO 8900 M03 N4 G43 ZO.l HOl N5 GOl Z-O.25 F10.O MOB N6 G4l YO.625 DOl F12.0 N7 GO) J-O .625
Nl G20 N2 G17 G40 GSO N3 G90 G54 GOO XO YO 9900 M03 N4 G43 ZO.l HOI NS GOI Z-O.2S FlO.O MOS
N6 G41 XO.3125 YO.3125 001 F12.0 N7 GO) XO YO.62S RO.3l2S NB J-O.625 N9 X-O.3l2S
YO.3l2S RO.3125 NlO GOI G40 XO YO F20.0 M09 Nll G9l G28 XO YO Z2.0 MOS Nl2 M30 %
244
Chapter
method is slightly quality with a circular approach than with the linear approach.
If a control systems has the User Macro option and many circular are required, the 02903 could uu."JJ"'V to a macro. Some cycle built-in.
• Circle Cutting Cycle
On some CNC models, there is an additional rarne!er In the, G I 13 format - the rad illS This indicates special to reduce air cutting lime.
controls, for example some but not Fanuc, have a built-in routine circle using special preparatory G 12 and G 13. These cycles are very rnn,\lpn ming aid and to the surprise of many dropped this feature many years IS
What is not true in circular application, is true in this situation. In normal programming of arcs cles, a cutter radius cannot start in an arc tool mr,nr,n In Gl 13 mode, the start molion from center position is circular to compensated start on the arc circumference. all built into the control and [here no choice is offered. sider this situation as a special case, definitely nol as a
13 progranuning. 29-14, will
a logical relationship between G02 and G ]2, as
as between G03 and G 13: Full circle cuning
cw
Full circle cutting
ccw
12
lhese two spe-
A typical programming cial commands is quite simple:
I
r:r-----t---t"'J - - L
0.25
G12 I .. D .. F .. G13 I .. D .. F .•
Full circle CW Full circle CCW
13
start
3 or the start pomt of the cuI equivalent 10 the 9 command cannot be
is the radius of as an incremental value (plus sign is assumed), the , wh icn is equivalentto the If the sign is negative, at 1800 position. which is direction Y direction.
PrograrHJIlt;U D is ule co 11 trol register number the cutter radius offset F is address. on some controls, but are alternate versions of this very similar in nature.
be (lcceptecl for successful usThe cutting tool must a circular pocket, the plane and (he arc starting al 0 0 or J80" (Y axis start is nol possible). a cutter radius (G 12 to Uie right, G 13 to the left). Never program the commands G41 and using G 12 or G 13 command. If the culler IS In it will be overridden the seleclion orGI2 orGl3. approach is to these two mode (CUller radius cded) al all
Full circle cutting using 612/613
• program 02904
02904 (0 . 5 DTh CENTER CTJT'I'ING END N1 G20
N2 N3 N4 NS N6 N7
G17 G90 043 GOl G13 G91
G40 GSO G54 GOO XO YO 8900 M03 ZO.l HOl Z-O.25 Fl0.0 MOB IO.62S DOl F12.0 M09 G28 XO YO Z2.0 MOS
AVAILABLE)
N8 M30
%
The program is only two but it is simpler to develop. The cutter offset IS automatic (built-in) and the editing at is much easier. is also an additional since the start point on circle is not a result of a line, but a lead-in arc, finish quality will than using olher method when types of tool approach. This is a the machined surface quality is impol1ant. There is also a built-in lead-out arc in the [0 (he lead-in arc, Ihal is effective when the is completed.
CIRCULAR INTERPOLATION
245
ARC PROGRAMMING
./
/
With a full arc cutting, which means the complete 360° motion, the R address cannot be used at all. The arc center vectors I and J have to be applied, even on latest controls. What if the circle is 359.999°? Well, at first, circle must have 360°, therefore the word 'circle' is Incorrect. Even i.l 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 terms, an incomplete circle is nothing more than an arc. Look at this arc a little differently. If a 90° arc is made, Ihe R address can be programmed. for example:
- R+
Start point / "
I
j ./
I
\
End point
- - CONTOUR
Start point ./ j
GOl X2.0 YS.25 F12.0 G02 X3.75 Y7.0 Rl.7S
.// _ .._- CONTOUR
If an arc that covers exactly 1800 is programmed, {he program will no! he much different: GOl X2.0 YS.25 F12.0 G02 XS.5 YS.25 Rl.75
Figure 29-15 Sign of R address for circular cutting - onlv the center is different
The following example is identical except for the R address sign.
[Q
the previous onc,
Note that the Y coordinate is the same for the arc start and end position. The Y value In the circular motion block does not have to be repeated, it is used here only for illustration.
G01 X10.5 Y8.625 F17.0 G02 X13.125 Y6.0 R-2.625
Another example shows programming an arc of 270", still using the R address. Are the following blocks correct?
180°, establish a particular programming style. If the style
GOl X10.5 Y8_625 F17.0 G02 X13.12S Y6.0 R2.625
The blocks appear to be correct The calculations, Ihe format, individual words. they all appear to be right. Yel, Ihe program is wrong.! Its result Will be a 90° arc, not 270 0 . Study the illustration in Figure 29-} 5. It shows that there is not just one, but fHiO mathemaUcal possibilities when the R address is used for arcs. The solid contour is the tool path, the dashes identify the two possible radii. Programmers do not normally think of these mathematical alternatives, unlil they program arcs larger than ISO" (or scrap a part). This is a similar situation to U1at of a full circle, described earlier. Although (he I and J vectors can be used to relnedy the problem, a different remedy may be a preferred choice. The R address can still be used in Ihe program, but with a negative sign for any arc thal is greater than 180°. For arcs smaller than ]80 0 , the usual posili ve R radius remains in effect. Recall from some earlier explanalions lhal if there is no sign with the R word (or any other word), lhe word assumes a positive value. Compare the two programming examples: GOI XlO.5 Y8.625 F17.Q G02 X13.12S Y6.0 R2.625
(90 DEGREES)
(270 DEGREES)
If frequently programming arcs that cover more than is well thought out, it will avoid the costly mistakes associated with the R address sign error.
FEEDRATE fOR CIRCULAR MOTION In most programs, the feedrate for circular interpolation is determined the same way as feedrale for linear inlerpolalion. The cutting feed rate for arcs is based on established machining conventions. 'TIley include the work setup, material machinabi1!ty, (001 diameter and its rigidity, programmer's expenence and other factor·s. Many programmers do not consider the machined radius when seiecring the cutting feedrate for the tool. Yet, If the machined surface finish quality is really important, always consider the size of every radius specified in the parr drawing. Perhaps the same feedrate for linear and circular motions programmed so far may have to be adjusted - either upward or downward. In lathe programming, there is no reason \0 distinguish between linear and circular lool motions, regardless of the radius size. The tool nose radius is usually small, only averaging .0313 inches (or 0.8 mm) and the equidistant tool path IS close to the programmed tool path, taken from a drawing. This is not the case for milling contour programming, where large tool radii are normal and common.
Chapter 29
The arc feedrale is nol required in gram. If cutler center tool path is close LO 1 contour, no adjustment is needed. On the band, when a diameter cutter is used to contour a small outradius, a problem that affects the finish may occur. this case, the tool center path a much arc one in the drawing. In a is used shorter
Two formulas provide to find the adjusted arc feedrate, to the linear Both formulas are recommended for external or contouring only, nOT rough machining of solid material.
•
Feedrate
Outside Arcs
For outside arcs, ,ildjusled feed rate will be higher than the linear calculated from Ihis formula:
In normal programming, the arcs as well. as determined by material. The formula for ~
F0 FI
where ...
iii?
FI r/min F! = n
where ...
linear feedrate Spindle speed Feedrate per tooth Number of cutting
A
ormm/min)
on
linear feed rate of J 4 in/ml n, an requires an upward adjustment a
A linear feedrate for 1000 .0045 initooth load and culling edges, the r"""',.., ....,'" is 9 Using a relatively large cutrer diameter, (\5.875 mm) or larger, the linear feedrate or down for circugood finish. motion may be 11:........."""': (WO
The elementary rule of
Feedrate for outside arc Lineadeedrate radius on the part radius
==
Fe =
14
X
(.375 + .25) / .375 = 23.333333
is a major incre
in lhe program,
the same example with ,75 cutter
14 x (0.375 + 0.75) / 0.315
adjustmenl for arcs is that
the normally programmed is increased for outside arcs and decreased for inside arcs· Figure 29- 16.
(01.5): 42.0
TPPflrnlt" changed from 14 If1crease. use prevIOus adjustment is justified or not.
inimin -
D
3
to determine
CUTTER • Feedrate for inside Arcs arcs, the adjusted feed rate, calculated from
will lower than formula:
/ /
DECREASED - - . FEEDRATE
''''
"
NORMAL~
FEEDRATE
Figure 29·16 Feedrate adlil/stlTlel1lts for circular tool motion
F;
""
F, R
0::
Feedrate for arc linear feed rate Inside radius on the Cutter radius
Based on lhe Jinear feed rate
inch inside radius with downward: Fi
'" 14 x (.8243 -
The result is a feedrate will be Ihe applied fPpnrllfP
14 in/min, the feed rate for I must be ad-
/ .8243
=
3.384932
inimin, In the program, F address.
CUTTER RADIUS OFFSET known as a profile
IS
nOf-
MANUAL CALCULATIONS
milling applications by establishing then movmg the cutting tool inX Y or both axes simultaapplications, either (he X axis or the Z axes can be used 10 turn or bore a conof contour elemenl one block of culling molion. These mopomts can be programmed in or they can use an absolute value position or an incremental distance. In either case, keep in uses the cemer line of or X tool movements. AIprogramming is a very convenient development, it is also a method \.Jnaccomact with rhe material,
the cutting tool must touch the programmed not its cen.ter line. path for all contounng operations is always to the tool molion. Whether used on a lY machintn center or on a CNC lathe, the cutfing rool '" . must always be tangent TO The conlOw; which means the tool motion has to create a path where the cemer poinl of the cutter is always at the same distance from the contour of lhe part. This is called the equidistant tool path.
Some realities should ,",/Or'nIT'''' 30- J, The most noticeable nm"~r'J" contour must always take sated by its radius, which means macated in positions shown in the chining requirement is not by the ity of the drawing. a all dimensions to the part contour, no! the contour tool cenler. In fact, the drawing is to tool positions illustrated in the upper The question is how do the tool center uv;,,,,,,,. from a drawing 10 the part contour'? Actually, lhey
is equipped with an
cutler radius compenturning systems,
compensalion or and common
to apply the offsel
drawing dimen(he necessary calculations
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 -
\'~ I
CUTTER 0 (TYP)
.....
Tool path with
.,... NO OFFSET
J.,.:..------~_) PART PROFI
Figure 30·1 Tool path not compensated (above) and CDfnp8'nSI!Jil(;:a by the cutter radius
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 particularly when encountering a difficulty that has to resolved very quickly. To really understand cuuer offset - many programmers and machine operators nol it is important to understand the principles built in the tern, principles thal are very much based on basic mathematical 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 importanL only calculations of [he individual contour points at and tangency points.
7
248
Chapter 30
All five points can be summed up in a small table:
Point No.
X coordinate
t
-, 1.125 I
J
'''-...-RO.625 2.25
Figure 30-2 Semple drawing for manual calculations {examples)
Note that there arc. five points on the drawing, one LIt each contour change. These points are either intersections or points of tangency. As eaeh point has two coordinates, lolal of ten values will be required, The drawing always offers some points thaI need no calculations. fl is a good idea 10 gel well organized and mark the points from the drawing first Then, make a chart in the order of tool path. Study Figure 30-3 carefully - it shows all five points and all the values thaI need no calculation, perhaps some addilion or sublraClion only.
-._--X-AXIS I V-AXIS P1-XO.OOOO. YO.OOOO
P2
pi x(fQ500. Y1 :1250 P3 X2.2500. ? P4~2.2500 i YO.6250 -X1.6250 YO.oooo I
"-
P1
,
,
XOYO Figure 30·3
ContDur change points required by the cutter path
Out of the len values required. nine of them are given. The missing Y value for P3 is not expected on the drawing, Reaardless of whether the cutter radius offset is used or nOI, so~e calculations will always be necessary and this IS one of Ihem. Afler ali, /nallual programming is done by hand. Figure 30-4 shows the trigonometry method used. :-
- 2.25
~-~
_"
18 l
0
_"W,_ a:::: 2.25 x tan18 a=07311 P3(Y) P3(Y)
=1.125 + a =1.8561
Figure 30-4
Trigonometric calculatiDns to find unknown YcODrdinate
Ycoordinate i''''''''·
I
""""
Pl
XO
YO
P2
XO
Yl.125
P3
X2.25
Y1.8561
P4
X2.25
YO.625
P5
X1.625
YO
Once all the coordinates are completed, [here is enough dala to start the tool path, but only if the cutter radius offset feature is used. However, lilal is not the intention at the moment. To illustrate, a whole /lew set of points has 10 be found - coordinates for the center of the clIlter.'
• Tool Path Center Points The cutting lool for milling is always round. An end mill,
for example, has a diameter of a certain size. Even tools used for turning and boring have a round end (called the nose radius), even if it is relatively small. Of course. we all know that any round object has a center. Milling culter or a lathe tool lip are round objects, so they have a center. This evaluation may sound a bit too elementary and it is, but it is also the basis, lhe key element, the whole concept, of cutter radius offset. Every control system takes il into consideration. 1001
Take, for example, an electric router \001 to cut a shape out of wood - how is it used? Using a pencil oUlline of the desired shape, the router bit is placed into the tool and starts CUlling, Where? It starts clilling outside of the outlined shape, otherwise the piece cui will be either too 1Q/~r
The question now is - what 10 do aboulthe point coordinmes that have just been calculated and stored in lhe above table, Are lhey useful? Can they be used in a program? Yes to the firsl question, but not yet to the second. A few addiiional conditions have 10 be taken into consideration.
RADIUS OffSET
--em, PI X axis P1' X-i5:3750 P2 -
--
---
"
Y
y-o.
__ v
?
P3' X2.6250
P4
RO,375
30-5 taUI(JJsram tool path· cutter center coordinates "''''r.", ..'. . ,......
Figure 30-6 Contour change
rpm,rlCHU
the old sel of points wi II ra calcupoints, Again, try to see which are establish them first. point PI? It the new PI has (he value radius also (he value of culler radius in Y
for the cutter center path
Figure 30-7 of point P2calculalion. The trigonometry melhod is a subject programmers have 10 know how \0 work wilh - il is part of mathematics, ~x lended to CNC program A similar calculation is reqUIred for P3, shown in sin18 .y= 1.-_ -. cos18
from the old P L The actual value an)' 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 I" (0,0025 mm = reground tools,
Y1.125 10015
previ-
or are undersize or oversize some this means that programming the cenlerl the exacllool radius to be known althe in all cases,
•
x
Figure 30-7 Calculation of P2 for the cutrer
N = 1 + sin~8 x 0.375
Center Points Calculation
Coordinate poinls illustrated in Figure 30-5 above, sent the center or cuuer radius al each con ram change point. Now, another can be brought inlo lhe picture, Ihe cutter A new coordinate set of five poinls can be example, (1 brund new CUller of 0.750 will Which points can withoul any trigonometric
lY= P3{Y) P3(Y)
,III
=1 =
Y1
the illustralion directly, Look at and evalu-
ate Figure 30-6. OUI of len values requirt:d. only eight have that Ihe previous lcn calcuas well, adding 10 the overall
been idenlified, but also lalions had to be done programming effort.
on programming of the I n order to lin ish the d and P3 have to be calcutter center, the two Y values ror culaled. Let's start wilh point
30-8 Calculation of P3 lor the cutter center point are known,
center points are in the . appear in that same ordcr II) Ihe the pOlnt loc3tions hut various G and other dam.
contour.
250
Chapter 30
momenl, it is slill 100 soon to write the new closed with the table of
The Type C cutter radius offset lhe ahead lype (also called the illlersecrionollype) is one is used on all modern CNC systems today. is no need to call it Type C anymore, as there are no olher available.
0.750 cutter but none Point
Pl
No.
y
X
•
Y-O,375
X-O,375
Defini1ion and Applications offset is a of the control system [hal a contour without knowing the exact
X-O,
P3 P4
X2,625
P5
X1.625
diameter of the cutter. ture performs all points, based on
YO.625
digit I used in the calculations. It may where it came In(o {he It represents lhe value of sin 90°, which is I in fronl of (he Y - il is a symbol for
Jitllclriangle
Specified direction of the cutter motion
o
Radius of the cutter stored in
control system
[a develop a program without knowing the exact CUller diameter at the (ime of programming. It also CNC operator to adjust, to fine iunc, the WHer in the control system (nominal. oversize or undersize), during actual machining, In practical terms, cutter (and tool nose radius offset on lathes) for a number of reasons:
conhad no culler rawas developed in had to be calcu-
lat(~d WiTh the cwfer radius in This method of programming added a great amount of time to the part development process, greatly rhe possibility of
programming errors and disallowed any Oexibility during mach1l1ing. Even a small di between the pracutter radius and the culler radius required
and the creation memory in those control tcchnolcontrol syslem melh-
Tvpes of Cutter Rad
o
- and machining - this feature
The previolls examples are Iypical to (he
•
Points of the drawing contour
a vec-
COMPENSATED CUTTER PATH
or
o
word 'delta',
in mathematics 10 101', or a distance.
methods useu 011 the early trols (normally of the NC lype, not dlUS offsel feature at aIL The lOol such a way (hal the contour
sophisticated feaof contour change
Offset
o .. 5ln;nnpt'
o Unknown exact
of the cutter radius
o
Adjusting for the cutter wear
o
Adjusting
o
Roughing and finishing operations
the cutter I1pt'lpl:tlon
o Maintaining mJ'l,(,nlTlinn Every may not be LOa clear at moment, knowledge of this topic, it wjlJ 10 understand the subject. The suggestions are only some the possibil the automatic cutler radius offset Now lei's look at aClual use ill prognunmi
but wilh
PROGRAMMING TECHNIQUES
As the CNC technology developed, so dId the cutler radius 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: D
Type A offset - oldest uses special vectors in the program to establish the cutting direction (039, G40, G41, G421.
o
Type 8 old uses only G40, G41 and G42 in the program, but it does not look ahead. Overcutting is for Type 8 offset.
o
Type C - current uses only G40, G41 and G42 in the program, but with the look ahead feature. Overcutting is for Type C offset.
o
Points of the drawing contour
o
Specified direction at the cutter motion
o
of the cutter stored in the control
items are the actual data sources. work wllh dnta and the data hilS to be the purposes of this charier, we assume that conlOur chnnge points are based on the
coordinates.
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 (in milling), or the (in turning). These are two very separate to be clarified - which one 10 motion of (he [ahle or motion of Ihe lool? u. ...., ... U'l,
IS
motion oflhe
that follow one
of the CNC machine type, ir is ,"",,,,,,,,..,1 rule of CNC programming:
tool motion
statement is true for CNC lathes, where it is
but it is
CNC machining centers, true for other lypes l"Iser Clllling machines,
il is
Figure 30-9
ma-
Cutter path direction as ir relates to a stationary pM contour: fa b) No motion direction shown - left and right is unknown fe - d) Cutter positioned to the LEFT of the contour (e - f) Cutter positioned to the RIGHT of the contour
etc. When it comes to the so versus counlerciockwise, a closer look IS
•
• left or Right - not CW or CCW care of is to eliminate the ing terms r l r l r F \ , l I l reserved '-1"_11..1'::" place in
and counterclockwise. These terms are circular interpolation and have no the cutter radius offset. and Right are used
the left or to the right
the direccion oj
when faced with the we determine the correct poto a certain previously esA moving objcct is said to be La a stationary object, depending on
mowmem.
Offset Commands
In order to program one or direction), there are two to the culter
nrt>',","',r'l
I or G42 mode is canceled by
G40 command:
Cutter radius offset mode CANCEL is no difference. The comto the left or to the looking inLO the cutler
all three radius ofrser
30-9.
The illustration
a direction, a cutler with to the left of the conlow; fied and pOSItioned to the Out of the two ler? Compensation to centers, because it cutting, assuming that a with M03 rotation. There sation to the right. causing so mode of cutting. This mode cases, after consultallon with a applies to milling systems, not to
G41
G40 E
of G41, G42 and G40, to the cutter path
252
30
terms of the milling method. command is applied the climb milling mode, is applied to the conventional milling mode, is true only if the spindle 10
rotates with M03 funclion CW) and the culthe spindle must ler is right hand. If the cutter is rotate with MQ4 function aC!Ive (spindle CCW) and all rules applying to cutter radius are the exact opposite discussed here. is no cutler radius offset apG40 command is in
30- J J shows as a climb mi 11 ing and the 042 as a conventional mill' most common in Climb milling mode is millmg, particularly in contour milling.
answer to
area
last question is seltings. We are areas (offset screens on the control the Position Tool Length 17 to 19 respectively).
earlier to look at their relaAlthough of the CNC the same prin-
offsets in more depth and tionship to the compensation cutter this lopic appear to be aimed at the programmer has fa equally well, if nol in even more deprh.
• Historv of Offset Types have developed over (he and because their and many of me older in use understand the models are and their application, it is 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:
t
Conventional Milling G42
Climb Milling G41
...... Tool motion direction
Type A - lowest level of flexibility
o
Type B - medium level of
o Type C - highest level of 1'1"".1""1.1" ... ,
Figure 30-11 Climb milling and conventional milling mode for
a rigllr hllnd currer and The spindle rotarion mode M03
• Radius of the Cutter of gram Ihe Lool culler path, nOl mean forgotten or ignored question al this speci fled in the nrr,or'lrn
First, look at ferem CUHer radi
o
offset that allows to procontour were the required
cutrer
should be either
30- 12 - it illustrates the
SMALL MEDIUM
LARGE
not confuse these memory types with the Culler radius offset determine how 1001 length offset and the cutter offset will be entered into the contTol nothing else. Work offsets 054 to 059 are not
Tool Offset Memory Type A
The Type A tool offset IS the lowest level available. Its Ilexibility is very lim because Ih is offset the tool length wlth cutter radius in a single column. Because sharing for two different offoffset- In it means IS
registry area as clIn he used, with wilh this Iype of cal type in their
value.
covered later, memory are the most economi-
Tool Offset Memorv Type B
Figure 30·12 Effect of cutter radius on the actual tool path
values.
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 program uses addresses
CUTTER
3 •
Tool Offset Memory Type C
Wilh Ihe Ihree lypes of Tool MemDlY
The Type C offset group offers the most the only offset type available that values from those of {he lool radius, It still tinction of the Geometry Offset and the Wear Type B docs. That means Ihe control display columns - yes,jour columns in lOlal. In this addresses Hand D will be used for their
BOlh the Type A and rhe Type Bare with only a single register, where the lool ues are stored along with the cUller amounts. Normally, the Type A and Type B are associated wirh the H only. That means me H is with command, as well as wilh the G41 or cUfling tools do not require the cutler radius but all CUlling lools require the tool 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 in the program and stored in the control register, is the reason these offsets are called shared offsets.
Offset
No. 01 02 03
0.0000 0.0000 0.0000
.................... ........ww
Offset
No. 01 02 03
_
Wear
0,0000 0,0000 0,0000
0.0000 0.0000 0,0000
..
...
...
,
H-offset
Geometry
Wear
0,0000 0,0000 0.0000
0.0000 0,0000 0,0000
example, programmed tool T05 requires both which obviously cannol have the same offset number. is to use Ihe tool number as the tool length offset number increase that number by 20, 30,40, or so, for cutter radius offsel. The entry for the Type A in the offset screen be similar to the one in Figure 30-/4:
_w
Geometry
Offset
05
D-offset Geometry Wear 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000
3()·14
Shared offset
Mh;:~/M' PM'~~~
for tool offset memory Type A
[here are two columns avai table, but entry in the offset screen will shown in Figure 30- ] 5:
30-13 Fanuc (00/ offset memorv types A B, C from the top down
•
it is reasonmethods
able to expect somewhat different for each type. Up to a point, this IS true.
It is relatively easy to [ell which offset type is j list look at the conlrol display. Figure 30- /3 ieal appearance of each Offsef MeinDl)) with zero vaIues). The aClual appearance different, depending on the control model. Offset
Address H or D ?
Programming Format No.
35
I Geometry .
10.0000
Figure 30-15 G41 x. .. D ••
01' ..
G42 X .. D ..
01' ..
G41 Y .. D ..
or ..
Shared offset
G4.2 Y .. D ..
many axes can chapler as well, address to usc and
of the tool motion and how at a time will be discussed in this the question of which H address or the 0 address?
offset memory Tvpe B
The Type C will the 10(.)1 length and the tool umns, the same offsel no need for the 20, 30, H address is r"'C'L"r,''''''' the D address is cutler her Figure 3()~ J6 show~ an input to the Type A and the
columns. Since their own col-
both - there is
In
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
Figure 30-76 Unique offset register screen for tool offset memory Type C
•
Geometry and
together with a tool motion
I
Wear Offsets
Similar to the application of geometry and wear offsets for toollenglh offset, described in Chapter J9, the identical general rules can be used for the cutter radius offset. Offsets entered in the Geometry offset column should only contain the nominal culler radius. In the examples, we have used a 0.750 cutler, with the radius of 0.375, That is the nominal value and that would also be the typical value entered into thc Geomerry offset column. The Wear offset column should only be used for adjustments, or fine tuning, relative to the nomina! size, as required during setup andior machining. There is no separate column for adjustment or fine tuning for the Type A offset. Adjustments can still be made, the only difference is that the value in the single column will always change with each adjustment even if it represen ls the cutter rad ius.
These two rules are not arbitrary - rules can be broken. The suggestion here IS to follow the rules until a better way is found. When selecting a startup (001 position, a few questions are worth asking: o
What is the intended cutter diameter?
o
What clearances are required?
o
Which direction will the toof take?
o
Is there no danger of collision?
o
Can other diameter cutter be used if needed?
o
How much stock is to be removed?
The same drawing used already will be used for this example as well and (he cutter radius offset will be appl ied to Ihe contour. To turn the offset on, to make it effective, the cutter will be away from the actual cutling area, in the clear. The intended cutler is 0.750, the climb milling mode is desired, nnd .250 clearance is away fTom the contour. Wilh these numbers, the start position is calculated at X-0.625 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 offset in an actual CNC program are now known. The actual application, the way 10 use the offset in a CNC program, as well as the methods of proper usage, will be discussed next. There are jour nwjor keys to a successfu I use of lhe culler radius offset feature:
i . 0.25
:~ ~I
I
L-yO
1. To know how to start the offset
3. To know how to end the offset
-iY-O.625!
./
2. To know how to change the offset RO.375
J
XO
-
, ~-O,25
4. To know what to watch between the start and end
Each item is important and will be discussed in order.
100.75 CUTTER 0.25 CLEARANCE
Figure 30· 17 Slarr position of the cutter before radius affset is applied
• Startup Methods Slarting up the cutler radius offset is much more than using the G4IX ..D .. in the program (or something similar). Starting up the onset me(l.ns :1dherence to two cardinal rules and several important considerations and decisions. The cardinal rule number one is simple - it relates 10 the start position of the cutter:
Of course, the suggested location is not the only one suitable, but it is just as good as other possibilities. Note that the cutter located at the position X-0.625Y-0.625 is lwr compensated, the coordinates are to the cenTer of the cutter. Once the start location is established, tJle first few blocks of the program can be written: 03001 (DRAWING FIGURE 30-2)
Always select the start position of the cutter away from the contour, in the clear area
N1 G20 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 N5 G01 Z-O.55 F2S.0 MOB N6
extra safety, on a V2 inch although the
(c)
(FOR 0.5 PLATE THICK)
the approach to the depth of Z-0.55 plate thickness) was split into two mocutter is safely above the clear area. heen the first motion can be direction IS to the left the Moving the I command is means first target location. Howbecause the as well. That means Next decision is point. Normally, Lead-in motion, or all of them corlocation eventually. are some possible options;
and re-
IS
N.. GOl G4l XO YO 001 Fl5.0 N .. Yl 125
(l?2)
N ..
In alllhree versions. the cutter radius gether with the first motion, while still away (he option actually part contour. part, selecting the option (a) is the method of the lead-in. A combination of (a) good choice, wilh the Y axis target in Once the offset has been lUrned on, the conlour poims can be programmed along the part lhe 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: 03001 (DRAWING FIGURE 30-2) 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 has to cut, along the X axis. The question is - how far to cut and when to cancel the cutler radius offset?
c, 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, butti1at is not a practical position - the tool should move a bit farther, still along the X axis only. How far is further? Why nm to the same X-O.625, the original start position? is nOlthe only clearance posilion available, but is the most reliable and consistent. The block N II will
The (a) option is first and the cutter lion, Then, the tool continues (Y 1.1 25), already in the These two motions will appear in N .. GOl G41 XO DOl F15.0 N.. Yl.12S
as:
Nll GOI X-O.625 (P2)
N .•
The option (b) is motions, whereas two version will not be for the the progmm would stillue correct: N .. GOl G41 YO 001 F1S.0 N .• XO
N .. Y1.12S N ..
(P2)
cutter has len the pari contour area and the cutter is not required anymore. It will be canceled but a lillie review of the startup may help. culter radius was known for th is job, which is not alcase. The programmer needs a suitable 100/. because the Culling values depend on it. WIthin reason, a or 0.875 cutter are not far apart - except for clearp.:lrlH\{~(-, of .250 was selected for .375 cutler means the program is still good for cutters up 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 have to be adjusted, if necessary. We will look at what when the culle.r radius offsel is applied, rule to establish the start selected with a the largesT culler that
•
i ncreased for a
or for a
that is
complete the program, leI's the cutter radius offsct, when it is no
•
Offset Cancellation
or
A lead-in mOllon has been used at the the culler 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
Cutter Direction Change
During a normal mil cui, Ihere will seldom be a to change Ihe cutler offset direction from left to right or from 10 . If it become necessary. the normnl one mode 10 the other withow command. This practice is seldom G41 [0 G42 would 10 the
[Q
cutter radius. The lead-in and the lead-out motions are
called ramp-in and ramp-out 'fhe safest place to cancel cutter
for any ma-
away from the contour be a clear area position. end position, Figure 9 Lion In (he example.
This should
IS
Finally, the program 03001 is completed. There was no need for any tool - such an change is rarher a rare occurrence, at contouring operations using milling controls. Ihe directional change may needed in the some comments may be useful.
now be written.
HOW THE RADIUS OFFSET WORKS from given examples is good way to by a recipe or a help in cases, but it will not help much in cases where there is no
no
and no example. In those
to really undersland all principles behind
cases, il is
such as principles of the cutter
thc The
is a good beginning. Next during the tool motion in
N6 G41 XO DOl F1S.O I
0.25
,
YO
It is not as simple as illooks. We cannot block, as N6, and know exactly what to understand what the do not think. they only execute inslruclions and follow these instructions B N6 IS an Instruclion: Move 10 XO, the radius Sf 0 red in DO! 10 lhe left, during a linear motion aT 15
j
RO.375
- ....
ill/mill. This is Ihe program
. Where does the too!
Figure 30-19 Cutter radius offset cancellation· program 03001
-
ion to the control
SlOp?
ill
program
-
Figure 30-20:
tool-.......--.- ......
--llIJli'-
tool
03001 (DRAWING FIGURE 30-2)
----"
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 NlJ Nl4 Nl5 %
G02 Xl.625 YO RO.62S GOl x-o 625 GOO 040 Y-O 625
001 (CANCEL OFFSET)
001
I
-
Zl. 0 M09
G28 X-0.62S Y-O.625 Zl,O M30
Figure 30-20 Ambiguous slartup for a curter motion in radius affsef mode
RADIUS OFFSET
7
there are fWO possibilities and they are both compensate the culler to the left conditions specified in block the cUlling tool moves to as eXT)eClea is on to the left of (he pari contour, the motion, using the radius value stored in the tef what is the problem? is ambiguous. There are IWO possible outcomes, while only one is required. Which one? For lef! part of the illuslration, one where the 1001 Y + direction next, when Ihe radius offset This is the key.' The mOL ion direction thaI block must be known to the control.
does the control handle culler radius offset Type C a buill-in the 'Iook-ahead'type of cutler radius
look· ahead feature is based on the principle known as buffering or reading-ahead. Normally, the control processor executes one block at a time. There will never be a ,-aU.)",U by any huffered block (next block). In a shari overview, lhis is the sequence of events: C)
1 left :
position after N6 is Y positive direction:
next
N6)
o
control detects an ambiguous situation, and does not process the block as yet
o
control advances the processing to the next block (that is NJ), to find out into which direction tool be next
ways Ihe program can be written:
Q Example 1 - Figure
The control will first read the block i":l"In,t;:urlinn startup of the cutter radius offset (that is the
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) type of the cutler radius offset is
2next
Iy in the software, but makes the contour lS
Y negativedireClion:
mi expected,
so much easier on a daily basis. As maybe are some siluations Lo be aware of.
N3 G90 G54 GOO X-0.62S Y-0.625 5920 M03 N6 G41 XO 001 F1S.0 N7 Y-1.125
(START OFFSET) Y-MOTION FOLLOWS)
In both cases,
content of block N6 is the same, but the motion Ihat follows the N6 is nOI - Figure 30-21.
•
Rules for look-Ahead Cutter Radius Offset
Look
at
following sample program selection, not re-
hued to any
examples;
NO MOTION block N17 G90 GS4 GOO X-0.75 Y-0.7S S800 MO) N20 GOl xo DOl F17.0 N21 MOS N22 Y2.S
(START OFFSET) (NO MOTION BLOCK)
(MOTION BLOCK)
in program structure? Ignore coolant ON function in block N21. H it can wrong with it. The fact rem.Olion block N21 , wh ich is Ihe same block Ihe. control wi II look ahead 10 ror I he direction of the next too! mOlion, Look at one more program selection - again, as a new What is
-Figure 30-21 Importance af the next tool motion for curter radius offset. Y+ next direction on the y. next direction on the right
•
look-Ahead Offset Type
The block N6 alone does not contaln suflicient amount of data 10 successfully apply the nextlllolion - in fact, thf' dirf't:/irm of the next motion - must known \0 the control system at all times!
Q Example - two NO MOTION blocks: N17 G90 G54 GOO X-0.75 Y-0,75 S800 M03 N20 GOl XO 001 F17.0 N21 MOS N22 G04 PlOOO N23
n.s
OFFSET) MOTION BLOCK) (NO MOTION BLOCK) (MOTION BLOCK)
258
Chapter "",,·h.,,",c - but not wrong - this lime there
following the CUller radius offblocks do HOI include any molion. a program Ihalll1ighl be line if the radius were nOl applied. With an offset In effect, such a program structure can create problems. Controls with the 'look-ahead' can look ahead only so many blocks. If the the one block look-ahead is atare two or more look-ahead blocks availon the control features. and not all consuggestions: o
If the control has a type cutter radius It:CltUI't:;. but the number of blocks that can be UI"c:;;,;:,t;U ahead is not known, assume it is only one block
o Make a test program to find out how many blocks the control can read ahead
o
the cutter offset is started in the program, hard not to include any non· motion blocks - restructure jf necessary
in mind that the control subjects the program input to lhe rules embedded m the software. The correct input must In the foml of an accurale program,
03002
(PROGRAM WITH RADIUS OFFSE.'T """"''''VJ~J
N1 G20 N2 G17 G40 GBO N3 G90 G54 GOO X-O.S Y-O.S Sl100 M03
N4 G43 Zl.O HOi NS GOI z-O.SS F20.0
(FOR O. 5 PLATE TKICK)
N6 G41 XO 001 F12.0 Nt MOS
N8 G04 PlOOO N9 Y2.5 NlO X3.S Nll YO Nl2 G01 X-O.S Nl3 GOO G40 y-o.s Nl4 Zl. 0 M09 NlS G28 X-O.S Y-O.5 Zl.O Nl6 M30 %
(NO MOTION BLOCK) {NO MOTION '-'''-''-''-','', (MOTION """""""-''-, {MOTION ....'-"-,"-'" (MOTION BLOCK) (MOTION '-''-''-,''-'" CAl)1CE:L OFFSE.'T)
A conlrolthaL can read only one or I1vo blacks ahead \'v'iII nrr\nr,,,",,
03002
-Ihe next marion is in
In to avoid program structure lhat
(In
eonUIlns more
black,
• Radius one hal f of lhal
kind of a response can b~ expected If the culter rais 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, usually 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
--+-;.. /
error due tD w(()ng program structure· program 03002
example. in Ihe program 0300 I, the lool 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. ~iLion
There are lwo other possibilities - one, where the CUller is the same as the programmed length of the 1001 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 reason is it limits the range of adjustmenls that can 10 the actual cutter radius during machini l'\Y't1.
RADIUS OFFSET
9 N3 G90 G54 GOO X-O.25 Y-O.62S S920 M03 No G41 xO DOl F15.0 Y1.125
N7
RO.375
Y-O.625 o
X
30·23 Cutter start position is equal to the cutter radius
Tlte followillg example programmed along the X
(han .375, there will be amount is equal to grammed length and not be any molion along of the radius takes tion (0 the
in a .375 travel
as
If the 001 amount
a motion toward XO. If the 001 the difference between the length is zero and there will X axis. In that case, the without a movement and the moY I I will continue.
N3 G90 GOO G54 X-O.37S Y-O.62S S920 M03 N6 G41 XO 001 F1S.0 N7 Yl.12S
(START OFFSET) (P2)
What will happen here? Ihecontrol calculates the between the travel length and the culter radius .375. the direction of next travel as Y thai because the cutter is positioned to the the intended motion, it to move. 125 in the X direction! That does not seem to a problem. is a plenty of free there is a problem - (he control does not recognize the Programmer knows it, but that there is a free control does not. The who designed the have taken a actions; yet, they wisely to play it safe. decided to let the control to rejeci and issue an alarm. pending on the alarm 'Overcutting will occur in cutter radius or ence' or a similar will appear - the common alarm 04J on Fanuc systems. number for this error is Many programmers, even with a long perienced this alarm. If nOI, they were either or have never used cutter radius offset in the Anytime the cutler interference alarm occurs, always look al surrounding blocks as well, not just at the onc the processing.
(START
Try to avoid like this one - although coo-eet, they do not provide any flexibili!y and can cause
serious difficulties at some lime in the future.
Figure 30-24 shows a start position where partially on of(he target position. nirely not system will an alarm
In (he next we look at the cutter ence that occurs a lool mot jon, not just at or tennination of the cutter radius
•
Radius Offset interference
The last illuslrated only one of pOSSIbllines, when the cutter radius offset occur. Another 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 proin Figure 30-25. gram
1: 1
t.--1.00
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 except the X axis start if the cutter is .3750:
similar to the pretion is (00 close in the DO 1 regis-
30·25 Simple drawing lor program 03003
,
260
r 30
03003 (DRAWING FIGURE
Nl G20 N2 G17 G40 GSO N3 G90 G54 GOO X-O.625 Y-0.62S S920 M03 N4 G43 Zl.0 HOi NS GOl Z-O.SS F2S.0 Moe 0.5 PLATE THICK) N6 G41 XO DOl FlS.O (START OFFSET) N7 YO.925 N8 G02 XO.2 Yl.125 RO.2 N9 GOl X1.0 NlO YO.75 Nll G03 Xl.25 YO.S RO.25 Nl2 GOl XL 75 N13 YO Nl4 X-O.625 Nl5 GOO G40 Y-O.625 OFFSET) Nl6 Zl.O M09 Nl7 G28 X-O.625 Y-O.625 Zl.O
drawing dimension can no! be changed, of the cutter diameter must be changed, to a culler that is .500 inches. The .200 is no problem, as external
not allow gouging in cutter rafeature is built-in and is no to see what would actually happen, if were not Nobody wanls to see the gouging on the pan, but the 30-26 shows the same effect cally. rn was a real error in the earlier forms ter radius Type A and Type B.
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 inch mill. The same culler is used as before, a amount DOl stored in the control will control unit will process the information from the with the offset amounts to Then, it executes the blocks as il moves the par!. Suddenly, at block N7 alarm No. 041 occurs cutter radius inleJference problem. What
happened? There [s nothing wrong with t'he Most CNC operators would look at gram it. After careful study, if they fi nd it correct, the cause or the problem must be somewhere of Try not [0 blame the computer and don't more ti me once you are that the Check the offset input in 001. The amount the tool in there. That is also OK drawing next. That [$ erything seems and is a the screen, step.
!GOUGE 001
=0.375
=1:1
Figure 30·26 Effect 01 overcutting (gouging) in cutter offset mode. Tvpe Cradius offset (look ahead type) does not allow overcutting
• Single vs. Multiaxis Startup There is another
stanup, particularly if tion along twO axes, look at no problems. Now we look at
cutter radius startup mo,.,,.,.~. __ single axis. cutting, with cutting.
in Figure 30-27, usEvaluate the two approach ing a cutter radius offset startup towards an internal profile, for example, a wall of a pockel or in[ernal contour.
the relationships between:
o
dimensions
." alld '"
o
input
.. , and... Offset amounts
o
Offset amounts
Program input
... and... Drawing dimensions
may
a while
amount of experience a-; well, In
to. It pro-
the problem is in the relationship amount and [he drawing dimension. Study radius of 375. This
- there is an is set to the cutter
is expected \0 tit into the it cannot - hence ihe alarm.
Possible problem in cutter radius offset mode during a startup with two axes simultaneously (intemal curting shown)
CUTTER RADIUS OFFSET
o
261
Correct approach - single axis motion:
Here are the first few correct blocks of each method:
The correct programming approach shown on the left side of the illustration contains the following blocks - only the starting program blocks are listed: N1 G20 (CORRECT APPROACH WITH A SINGLE AXIS) N2 G17 G40 GSO N3 G90 G54 GOO XO YO S1200 M03 N4 G43 ZO.l HOI Nne 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 N8 YO. 75
There is no internal radius in the program 10 worry about, so the amount smred in the offset register DOl does not have [0 consider i[ and wi!J represents (he cuucr radius as is.
o
o Correct approach - single axis motion: G20 (CORRECT APPROACH WITH ONE AXIS) N2 G17 040 GSO N3 G90 G54 GOO X-O.625 Y-O.62S 8920 M03
ill.
N6 G41 XO DOL F1S.O N7 Y1.125
o
(START OFFSET) (P2)
Correct approach - multiaxis motion:
N1 G20 (CORRECT APPROACH WITH TWO AXES) N2 017 G40 Gao N3 G90 G54 GOO X-O.625 Y-0.62S 5920 M03 N6 G41 XO YO DOl FlS.0 N7 Yl.125
(START OFFSET) (P2)
Incorrect approach - multiaxis motion:
The incorrect mol ion approach shown on the right side of the illustration contains the following initial blocks: N1 G2 a (INCORRECT APPROACH WITH TWO AXES) N2 G17 G40 GSO N3 G90 G54 GOO XO YO S1200 M03
N4 G43 ZO.l HOI MOS N5 GOI Z-0.25 F6.0 (FOR 0.25 POCKET DEPTH) N6 G41 XO.7S Y-O.75 DOl F10.O (START OFFSET) N7 YO.75
There is no way the control system can detect the bottom wall of the pocket at Y-O.7S. The startup for the offset is exactly (he same as for external cutting, but more damaging. Compare the two possible startups for the drawing shown 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 with a (wo-aJ(is motion, the result is shown at the right side illustration in FiJ;ure 30-28. 1./"):
N'
t
~
oj wi
xi
YO-'-
'--
~
D01
-j -- - D01
'W
'0
xl
)
Note that in cascs of the cutter radius offset for an external contour, both programs listed are correct, because there appears LO be 110 interference with any section of the part. In fact, there is the same interference as in the internal milling example - the only difference is that Ihis type of 'interference' is of no consequence - it tokes place while in the air. There will always be a problem that cannot be solved in any handbook, regardless of how comprehensive that book may be. The subjects and examples included in this handbook present common basis for a better understanding of the subjecl. With growing experience, the understanding becomes much deeper. Before going any further, let's review some general rules of the cutter radius offset feature.
OVERVIEW Of GENERAL RULES Reminders and rules are only important until a particular subject is fully understood. Until then, a general overview and some additional poinls of interest do come handy. Programming the cuuer radius offset is no differenl. The following items are marked [M] for milling, [T] for turning, 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 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 than the smallest inside radiUS of the part contour.
o
I M-T lin the canceled mode G40, move the cutter to a clear area. Always consider the cutter radius, as well as all reasonable clearances.
o
I M-T I Apply the cutter radius offset with the G41 or G42 command, along with a rapid or a linear motion
YO
'V:'O.62S·
Y-O,625 o
X -~~~-
Correct approach in X
Correct approach in XY
Figure 30·28
Startup of the cutter radius offset for external cutting: Single axis approach, shown on the left Two axis approach - shown on the right
to the first contour element (GOO or GOl in effect).
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 watch
or G42 in effect), 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, with a
o 1M) after
0.375 ---
from the depth (along the Z axis only) radius offset has been canceled. I..IIC1VVHlfJ
o [ M I Make sure the cutter radius offset corresponds to the work plane selected (see Chapter 31).
o [ M·T ) G28 or G30 machine zero return commands will not cancel the radius offset (but either one will the tool length offset). o
-
or a linear motion (GOO/G01) only, axis motion only.
I M-T I G40 comlTland can be input through the MOl to cancel the cutter radius offset (usually as a ""lIf 'II II,.,' or an emergency measure).
to illustrate practical application of a cutter radius offset
will be on the specified lOlerance in the as +.002/- .000, for the dimensions of the I wo meters - the external and 02.0 internal. Note that of all dimensional tolerances is the same for both meters. This statement will be very important later.
•
Measured Part Size machinist knows thal
the part depends on many factors, setup, cutting depth, material the selection of 1001, its exact
PRACTICAL EXAMPLE - MilLING The following in-depth example practical appltcalion of the cutler radjus (0 CNC programmer and the CNC operator. It covers ally all situations that can happen during process and presents solutions to maintaining the dimensions of the part. The tirSI subject that (0 understood is the difference between the programmed and the measured part size. •
Part Tolerances
When a part is inspected, the measured one of tile three possible oulcomes:
o night on size o Oversize o Undersize
... will be scrap for ... will
scrap
o
method. Figure 30-29 shows
external cutting
The first outcome is always the extemal or internal
additional (wo items thai also have to
simplest tool path. btlt not """t'I>~'~"'r'
only
... within specified ' ....I"'r"'''... '''''
In both cases, the specified roleral1ce
The next example radius offset on the part that reason, only a simple
can
o
External cutting method
IS outside of the requires a look at be considered:
... known as Outside or 00
... known as Inside or 10 the machined canthe tenns oversize and WIto the type of cUlling. The folmost results:
CUTTER RADI
263
,
No Action Required Scrap Likely
Recut Possible
it is clear (hat no action is necessary is within tolerances. regardless of or the internal cutting took place. For or
Y2.S
->~"'---«««««::«-.-««<-
........................
Tool path motion
\
results, a recut may be possible or
Y 1<25
\
\
the likely result.
(02.500 inch OD in the exthaL is measured as larger than the allowed tolerance 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 examas smaller than the allowed recut, but a size that is larger then the allowed range will in a scrap.
•
3D-3D Detail lor external tool path shown in example 03004
Programmed Offsets
most a1tractive feature of the cutter it allows to change the actual tool sire right on by means of the offset registerfunction D. In example, only one lool is used - .750 mill - and one single cut for each contour
Toolpath motion
Offset position .0
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 **** ) Nl G2D N2 G17 G40 GSO N3 G90 G54 GOO XO Y2.5 S600 M03 POS.) (CLE.AR+TOOL LG.) N4 G43 ZO.l HOi MUS FOR 2.5 DIA) NS Gal Z-0.375 F20.0 MOTION) N6 G41 Yl.2S 001 FlO.O (EXT. CIRc:LE CUTTING) N7 G02 J-L2S MOTION) NB GOl G40 Y2.S ABOVE) N9 GOO ZO.l (**-- PART 2 - 2.0 DIA INTERNAL COTrING **** ) (START POS. AT XOYO) NlO YO FOR 2.0 DIA) Nil G01 Z-O.8 F20.0 (APPROACH Nl2 G41 Yl.O Dll FS.O CIRCLE ,.....,..........'L'""", Nl3 G03 J-LO MOTION) NJ.4 GOl G40 YO (CLEAR N15 GOO ZO.l M09 AXIS MACHINE ZERO) NJ.6 G28 ZO.l MOS (OPTION.1\L N17 MOl
position Figure 30-31
Detail for internal tool path shown in
As is customary in program 03004, the tool path uses programmer. This is and the other positions defined by not only the standard but also most convenient method Lo develop a CNC is easy to understand by the machine dimensions are easy to trace (if can be made, if required. In plain ignores (he CUlfer radius and as if the culter were a a cutting a zero diameter. point - in
• D The
Figure 30-30 shows program - the external 30-3/ shows the lool path gram - the internal d
half of the
03004
Setting cutter is work. The madiameters and the - ifnot in the
264
Chapter 30
One critical fact to he established first is that the CNC system always calculates a specified offset by its euUer radius, lIot by its diameter.l[ means the programmer provides [he cutter radius offsel in the form of a D address. On the machine, the programmed offset DO I will apply to the cutter radius registered in offset 1,002 \0 (he radius registered in offsel 2, ecc. What actual amounts are in these registers? Since no radius oflhc cutter is included anywhere in the program, the offset register D mllst normally contain the culler radius actual value. Be careful - some machine parameters may actually be set to accept the cutter diamefel; although all internal calculations are sti II set by the radius. Evaluate program 03004; what will be the stored amount of DOl? A 0.750 inch end mill is used, so the DOl should be set to .375. This is correct in theory, bUI factors such as tool pressures, material resistance, tool defiecLion, actual 1001 size, tooltoJerances and other faclors do inlluence the finished part size. TIle conclusion is that the DOl registered amount can be .:'75, but only under idea! conditions. Ideal conditions are rare. The same factors Ihat influence machining will also have a significant effect on part dimensions. It is easy to see thal any measured size that is not within tolerances can be only oversize or undersize and exrenwl and internal cutting method does make a difference as to how the offset can be adjusted. Regardless of the cUlling method, there is one major rule applied to the cutter radius offset adjustment in any control system - Ihe rule has two equal pans: POSITIVE increment to the cutter radius offset will cause the cutting tool to move AWAY from the machined contour. NEGATIVE increment to the cutter radius offset will cause the cutting tool to move CLOSER to the machined contour.
Note the word 'incremenr' - it means that the current radius offset amount will be changed or updated - but not replaced - with a new amount. The concept of 'moving away' and 'moving closer lO' the part refers 10 the tool motion as the CNC operator will see. TI1e measured size of the part can be controlled by adjusting the culler radius offset value in lhe control, programmed as the D address, according to these two rules. The most useful rule that applies equally to the external and internal adjustments has two alternatives:
dius offset commands G41 or G42 as well as the D address offset number - with the appropriate cancellation by G40. Evaluating what emc/I)' happens during the tool motion for each cutting method (external or iJUernal) offers certain options. In both cases, the cutling tool moves from the starting position, within (he clear area, to the large! position of the machining contour. This is the motion where the culler radius offset is applied, so Ihis motion is critical. In fact, this is the motion that determines the final measured size of the parl. Each method can be considered separately.
•
Offset Adjustment
Before any speciai details can be even considered. think about how the offset amount can be changed. rn those cases where the size of the part is to be adjusted, the incremental change of the offset value is a good choice. Incremental offset change means adding to or sublracTing/rom the current offset amount (using the +INPUf key on a Fanuc screen) or sloring the adjustment in the Wear offset screen column. Changes to the program data is never the option.
•
Offset for External Cutting
Evaluate the tolerance range for the outside circle 02.5. The tolerance for this diameter is +.002/-0.0, so all sizes
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. There are three possible results of the measured size for external cutting. All examples are hased on the expected middle size of 2.50 I and on DO 1 holding the amount of 375, which is the radius of a 0.750 milling culler.
o
External measured dimension - Example 1
2. SOlO Ivilh DOl", 0.3750
This is the ideal result - no offset adjustment is necessary. The tool culling edge touches the intended maChining surface exactly. All is working well and the offset setling is accurare. Only standard monitoring is required. This is not such a rare situation as it seems - in fact, il is quite common with a new CUller, rigid setup and common tolerances.
o
External measured dimension - Example 2 :
2.5060 'Nilh DOl::: 0.3750
To ADD more material TO the measured size, use LARGER setting amount of the 0 offset
To REMOVE material FROM the measured size. use SMALLER setting amount of the 0 offset Experienced CNC operators can change offset settings at the machine, providing the program contains the culler ra-
The measured diameter is .005 oversize. TIle tool edge 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 oversize amounl, which is on the diameter or width bUlthe offset amount is entered as a radius, per one side. Offsel DOl is adjusted incremenlally by .0025, to 001==0.3725.
o
Externalrneasured dimension - Example 3:
CUTIER RADIUS
2.4930 wiill
DOl
5 • One Offset or Multiple Offsets?
0.3750
is .008 undersize. cUlling has reached beyond the programmed machil1ing and (() move away it. The radius orf:::.et amount has 10 by One half of the undersize amounl. The on the diameter (or The
width)
and the goal was the middle tolerance of 2.50 I ternZll diameter and 2.00 I for the internal offsets in the program needed or a will a Keep in mind that (he last few possibilities that were independent no common connection. Program 03004 mon connection bel ween the two end mill, used for Culling both
dius,
mentally by
• Offset for Internal Cutting
results of the measured size for are based on the expected and on D II holding the amount or
culler.
Assume for a moment, thal only one ample 001. with the stored amount of ~ured, the external diameter is 2.00 I After nu cutting (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. The reason is bOlh have a +.002/·0.000 tolerance, The +.002 means
meter, +.002 means set alone cannot on bOfh (hat if
Internal measured dimension - Example 4 : 2.2010 will!
The program 03004 used 001 for the
and Dll for the internal diameter. Only one
Dll = 0.3750
011
is the ideal result - no offset adjustment is ne.:essary. The lool cutting !Ouches the intended machining surAll is working well and the offset selling is accurate. Only normal monitoring is required.
o
programmer should alprogram and suggest (he as a professional courtesy.
Internal measured dimension - Example 5 :
2.0060 ""'1111
D11 = 0.3750
a Scrap
The measured diameter is .005 oversize. The tool
has reached beyond the intended machining has 10 move away from it. The radius offset value by onc halfoflhe oversize amount. is 011 the diarllcter (or width), but (he offset amount is entered as a radius, pef side only. Tne Dll offset must incremented by .0025, to D 11=0.3775.
o Internal measured dimension
Example 6 .
10 initial ol'fset amounts, some can be used here. The goal is to use a way that the pari will not likely be a even with an unproven tool. A good operator can SCfilpS by wrong offsets, at least to some key is to create some temporal)! orfset goal IS 10 force a cut Ihat is oversize externally or in.ternaily, measure II, adjust it. then recut to the right
Whether machining an external or internal tool path, even the best setup will not guarantee that the part dimensions will be within tolerances. When machining ,.In contour, the diameter can be cut il1femionally (han required - in a controlled way. In this casc, the diame[cr will be roo small is present
1.9930 witll Dll = 0.3750
measured diameter is .008 undersize. [he intended maehini
move creased is on the tered as a radius, crcmcnred by .004, to 0 II
When iI comes
In-
In internal contour machining, the diameter can
cut
than required, in a cootrolled this case, the risk chalthe diameter will be 100 is ent. Either ease offers benefits but some drawbacks, 100. leI/tiona")' smaller
266
r 30
away
pos;/ive greater than the '-I'IJ'-'-'l'-U being suitable a recul.
In both cases, when
solution is 1O move the tool machined surface by a increment amount must be error of the tool radius, as well as
to
R
test cut is made, measure the by one half of the di fference bediameters. If only one side is
meter and adjusllhe tween measured and CUl, the di is not hal
pOint
point
o X
to
.9
a 30-32
• Program Data ~ Nominal or Middle?
Tool reference point for turning and bon"ng - (a) turning, {bJ boring
Many coordinale locations in the dimensions that are is - what happens if the are two erance range?
• Radius Offset Commands tions are
grammers. One
commands used in milling contouring on CNC lathes - Figure
of tolerance LO use the nominal size ignore the nions have some credibility and should not . In lhis handbook, the preference is to use the nominal dimensional sizes and let the tolerances be handled by llse of offsets - at the is that a program using machine. Two reasons prevail. in case of drawnominal dimensions is easier [0 ing changes, they will affect more often than nominal sizes.
+
G42 - RIGHT
+
G41 - LEFT
TOOL NOSE RADIUS OffSET Figure 30-33 Lathe application of the fool nose radius offset
All the principles and radius offset for a lathe mainly caused by the
In milling, the cutting tool is is the cutting edge and its radius most common is tools have a di fferent a carbide insert. An Insen may one or more CUlling edges. For strength and longer insert Ii the has a relalively small comer raturmng and boring tools are: 1/64 ::: .0156 (English) or OAO mm (metric) 1/32 .0313 (English) or 0.80 mm ,metric) 3/64 .0469 (English) or 1.20 mm (metric)
JJ"'''''"J,)'' the too! cutting edge is often a n.ose radius offset became common.
Offset of the tool nose radi us to the of the contouring direction
G42
Offset of the tool nose radius to the R!GHT of the
G40 lathes, G codes do not use in (he
edges, /lose,
• Tool Nose corner of the lOa], into allose 1ad ius. corners of a lurning tool and a boring tool. tool nose reference point in turning is often called
point, the imaginoly point and, lately, even It is the poinl tn;i! is moverl along Ihe contour, it is directly related to XOZO of the part.
G41
•
Orientation
center of a circle symbolizing an to the conlour by its radius. In are part of the 1001 radius. on lathes, tools do have a radius but ""',... ",.,,, nose center is also equidistant from the contour, the edges change their orientation, even for the same Additional definitions are needed in a form a vector pointing towards the radius center. vector is tip orientation, numbered arbitrarily. MH''''n,''' to eSLablish the nose radius center 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 a ......
to I
ZO.JI
a .......
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 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. Figures 30-35 and 30-36 show the standard tool tip numbering for CNC lathes with X+ up and Z+ [0 the right of origin.
a - PROGRAMMED CONTOUR
T2 b. Figure 30-37
T7
EHect 01 tool nose radius oHset . (a) oHset not used (b) oHset used
• Sample Program
T3 Figure 30-35
Arbitrary tOO/lip numbers for nose radius offset· rear lathe shown
2
.-
6
The following program example 03005 shows a simple application of the lDOI nose radius offset all an external and internal contour, based on the drawing in Figure 30-38. Only the finishing cuts are shown - roughing is also necessary, but would most likely use the special G71 multiple repetitive cycle, described in Chapter 35.
1
00 I'l.O
C'">N
C\lN , •
NN
.
NN
0
N
..90
NN
X4.750 X4.510
5
7 TLR
I.t) I.t)
NN
..- co ..- 0 ,
.-3
X3.250 X2.650 X2.410 - - X1.990 X1.750 XO.950 -- XO.750 -XO
I
8
4
TLR :;: Tool radius
Figure 3D-36 Schematic illustration of the too/ tip numbering (Fanuc controls)
•
Effect of Tool Nose Radius Offset
Some programmers do not bother using the tool nose rat!ius offset. ThaI is wrong.! TheorelicaJly, there is 110 need for the offset if only a single axis is programmed. However.
l.O I' 00
00 00 ...-0
0
N,
NC\J ,
0
N
NN
.
C\J
...-
,
N
Figure 30-38 Simplified sample drawing for program exampfe 03005
2
30
03005
NGl NG2 N33 N34 NG5 N36
T0300 {EXTERNAL Fnrr5EIDrG G96 5450 M03 GOO G42 X2.21 ZO.l T0303 MOB GOl X2.6S Z-O-12 FO_007 z-0.825 FO.Ol X3.2S Z-1.l2S
N37 Z-l. 85
N38 N39 N40 N41 N42 N43
Change of Motion Direction CNC lathes, a change in
10
a turning cut(-s) with G42 in
problem is
£10.2
u,,,'''-U,,.,'.Al
GOO G40 X8.0 ZS.O T0300 MOl (INTERNAL FDrrSHING)
G96 S400 M03 GOO G4l X2.19 ZO.l T0404 MOS GOl Xl.75 Z-0.l2 FO.006 Z-l.6 FO.OOS G03 XO.95 Z-2.0 RO.4 GOl XO.75 Z-2.l Z-2.925 U-O.2 GOO G40 xa.o Z2.0 T0400 MOl
X 1.70 I Correct
X 1AO
XO CLEARANCE
Minimum Clearance Required
>TLR x 2
approach
····X1 ,00
Note that the contour start positions are in the clear area - away from the pan. Make sure there is enough clearance. Cutter radius inteJference alarm (alarm #41) is always clearance.
•
•
much more often than on machining centers. shows a facing cut On a solid
G02 X4.0S Z-2.2S RO.4 GOl X4.S1 x4.8 Z-2.395
N44 T0400
N45 N46 N47 N48 N49 NSO N5l NS2 N53 NS4
nose radius offset, programming the minimum or at least.! 00 Inches per side (2.5 a clearance for all three standard tool nose radii 1164, 1/32 and 3/64 (0.40, 0.80 and 1.20 mm
-
x2
-,
X-0,07
Incorrect approach
Figure 30-40 Tool nose radius offset change for the same tool
N2l N22 N23 N24 N25 N26 N27 N28
T0100 (CORRECT APPROACH) G96 S400 M03 GOO G4l Xl.7 ZO T010l MOa (START) (FACE OFF) Gal X-O 07 FO.D07 GOO ZO.l (ONE AXIS ONLY) G42 Xl 0 (THEN COMPENSATION) Gal Xl.4 Z-O.l FO.012 ( CONTOURING) Z-O.65
N29 X ••.
Face CUlling is a single for consistency. For sol id the center line, X-0.07 in ally larger than double tool the tool leaves a small un the face will not be flat.
>TLR x 4 i
on 0
correct tool motions on the
If the above program is
>TLR x 4 on 0 >TLR x 2
-- --.-
Figure 30-39 Millimum C/l;laI8I1CB lor loo/nose radius offset
Figure 30-39 shows minimum clearances start and end of cut. Make sure the nose radius
jnlo x 2 and x 4 twice or four becomes a
N21 N22 N23 N24 N25 N26 N27
T0100 (INCORRECT VERSION) G96 S400 M03 (START) GOO G4l Xl.! ZO T010l MOS (FACE OFF) GOl X-O.07 FO.007 GOO G42 Xl_O ZO.l (*** WRONG ***) ( CONTOURING) GOl Xl.4 Z-O.l FO.012 Z-O.65
N28 X ..
... the face will never be completed!
PLANE SELECTION From all available machining operations, contol/ring or profiling is the single most common CNC application, perhaps along wilh hole making. During conlouring, Ihe 1001 mOlion IS programmed in at least three differenl way~: o
Tool motion along a single axis only
o
Tool motion along two axes simultaneously
o
Tool motion along three axes simultaneously
Planes in the mathematical sense have their own properties. There is no need Lo know them all, bUllherc are imporlant properties relaling 10 planes lhat are useful in CNC programming and in various phases or CAD/CAM work:
o Any three points that do not lie on a single line define a plane (these points are called non-collinear points)
There are additional aXIS mOlions thaL can also be applied (thefourllI andfifth axis, for example), but on a CNC machining cenler, we always work with at least three axes, although nol aiwa)'s simullaneously. This reflects the lhree dimensional reality of our world.
That is notlhe case for the following lhree programming procedures, where Ihe various consideralions change quite signilicanlly: o
Circular motion using the G02 or G03 command
o
Cutter radius offset using the G41 or G42 command
o
Fixed cycles using the G81 to G89 commands, or G73, G74 and G76 commands
A plane is defined by two lines that intersect each other
o
A plane is defined by two lines that are parallel to each other
o
A plane is defined by a single line and a point that does not lie on that line
o A plane can be defined by an arc or a circle
This chaptcr applies only 10 CNC milling systems, since turning systems normally usc only two axes, and planes are therefore no! required or used. Live tooling on CNC lathes does no! cnler lhls subject. Any absolute point in the program is defined by lhree coordinates, specified along the X, Y and Z axes. A programmed 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 considerations are required, no special programming is needed.
o
o
Two intersecting planes define a straight line
o
A straight line that intersect a plane on which it does not lie, defines a point
These malhematical deflnitions are ol1ly Included for reference and as a source of addilional information. They are !lot required Cor everyday CNC programming.
MACHINING IN PLANES The path of a CUlling lool is a combination of straighl lines and arcs. A too! mOllon in one or two axes always lakes place in a plane designated by two axes. This type of mOl ion is n·vo-dimellSional. In contrast, any tool mol ion lhal takes place in lhree axes al the same time is a Ihreedimensional motion.
•
Mathematical Planes
In all three cases - and only ill these three cases - programmer has LO conSider a special selli ng of the control system - il is called a seleCTion of lhe rnachining plane.
In CNC machining, the only planes [hal can be defined and used are planes consisting of a combination of any fwa primary axes XYZ. Therefore, the circular CUlling morion, curter radius offset and fixed cycles can Lake place only in anyone of the three available planes:
WHAT IS A PLANE?
[
To look up a definition of a plane, research a slandard textbook of malhematics or even a dictionary. From varioLiS definitions, plane can be described in one sentence: A plane is a surface in which a straight line joining any two of its points will completely lie on that surface.
';('( plane
ZX plane
YZ plane
The actual order of ax is designarioJl for a plane delinition is very imponant. For example, lhe XY plane awl the YX plane are ph.vsically the same plane. However, for the purposes of defining a relative (001 motIon direction (clockwise vs. counrerclockwise or lefr vs. right), a clear standard - must be established. .
269
270 y
international standard is based on the mathematical ru Ie that spec i fies Ihe ji rsr letter of the plane designation ways refers to the /lO/'izonral and the second reLa the verlical axis when the plane is viewed. Both axes are always orthogonal and vertical) and pendicular (aL 90°) La each In CAD/CAM, this standard deiines (he Ihe lap and baHam, front and back, elc.
~O3 G;;;\ X
arc defined as:
G;;;\
z
RIGHT - YZ
STANDARD
malhemalical designation of is to write the alphabetical order of axes twice and pair with a space:
In mathcmaticalterms. the
~O3 G;;;\ y
~O3
TOP - XY
A simple way to Dxes for alllhree
all
X
OF PLANES
z
t ~G03 ~y
t ~G03 ~X TOP-XY ----~-~------.--,..
..
-YZ
--.. ,-
----
PLANES ON A VERTICAL MACHINING CENTER
Plane
x z
Xy
vz
I
y
x z
y
NOle the emphasis on Ihe word ·mathematical'. The em-
is intenlional, and for a soon apparent, there is a mathematical planes and the machine the direction of the
•
reason. As will between the as defined by
Machine Tool Planes
is extTemely Imyet often neglected and even misunderstood by
and operators alike. of 1001 motions are and machined in all machining centers, pendicular to the XY plane. m:e the same in this
Program Commands for Planes Definition
The sekction of a plane for related controls adheres to the mathematical designation of planes, nOE the actual machine tool planes. In a each the mathematical planes can preparatory command - a G selection
front view The right
view
.. , YZ
3J-l di betwo definitions, caused by a viewpoints that are III
II is
both planeon ill us(ratioll.
The
main reason is that for contounng) XY plane. is always perhorizolHal appli-
XV plane
view
:J
o
In programming, the selection
•
machining center axes. Any two a plane. A machine be detlned by machine from standard operating position. machming center, (here are three standard perpendicularly (straighl o
of standard mathematical planes (above),
on a eNC machining center (below)
that the XY plane and lap view are Ihe same in so is the YZ plane side mathematical plane is front machine. which is XZ. as in the middle where plane plane be- ' horizontal axis
G18
ZX plane selection
G19
YZ plane selection
motions (programmed with GOO) and all linear (programmed with G01), selection command is irrelevant and even ThaI is other motion modes, where (ion in a is extremely important sidercd For machining applications using the circular interpolation mode, with G02 or G03 commands, cutter offset mode with 1 or G42 commands and fixed mode 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 LX plane in turning. If the plane grammcd, it should be induded at the Since the three plnne commands only La/" motions, cutter radius offsets and fixed selection command G 17, G 18 or G 19 can before any of these machining Always program the aplprOI)riate p,lanle se~lec·tionl cOlmmland Never rely on the control .. "'.... ,,,. . ,..'"
Any plane selection change is prior Lo actual tool path change. can onen as necessary in a program, but only one active at any time. Selection o[ one plane plane, so the G 17/G 18/G 19 commands Allhough true in an informative sense, it is most the opportunities to mix all three plane program arc remole. From all three available only the circular motion is affected by plane "'-"~'-'''VI look at the programming of a as well, at least for comparison
STRAIGHT MOTION IN PLANES rapid motions GOO and linear motions GOI arc constraight motions when compared with circular molions. Siraight molions Can be programmed for a SIngle or as a simultaneous motion along two or three axes. The following examples only show typical unrelated blocks: ~ Example - Rapid positioning - GOO
GOO X7. 5 Z-l. 5 GOO YIO.O Z-O.2S GOO X2.0 Y4.0 Z-0.75
When we compare Ihe mathematical axes Ihe actual orientation of the machine axes machining cenLer). the XY plane (G J cmd the plane (G 19) correspond to each olher. These two planes normally present no problems to CNC programmers. The plane (G 18) may cause a serious problem if not propunderstood. Mathematically, the horizontal axis in G I plane is the Z axis and the X axis is the vertical axis. a vertical machining center, the order of machine axes 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 mathemalical axes orientation is aligned with the machine axes, they will indeed match. Figure 31-2 shows the the mathematical planes with the machine planes:
x
STAN MATHEMA TICAL ZX plane
,G03
G~\
;
x
STANDARD ZX PLANE MIRRORED
XY7-3D
interpolation - GOl :
c
- 2D hileantlO/Jon
GOI X-l. 5 Y4. 46 F15. 0 GOl X8. 875 Z-O. 84 FlO. 0
the COIlfrom the with GOO'in
for CCW direction. rules, the r/ockwi.\1' clirecfion is vertical axis towards the horizontal in any SeH~C(c:O plane. Counterclockwise direction is always "'P'''''''rI the horizontal axis towards the aXIS,
XY plane - 2D XZ plane - 2D mpid mOlion l'Zplane-2D
GOO XS.O Y3.0
~
In order to complele a circular Irol system has 10 receive surficient parl program. Unli.ke rapid or linear interpolation with in polation requires a programmed is the command for CW
7X pla}'!e - 2D IilleDnJlolion
GOI Y12. 34 ZO.l F12. 5
G01 X6. 0 Y13. 0 Z -1 24 F12. 0
. 2D linear/Jlotioil
X1Z - 3D IineannoriOll
10 lool motion along the programmed not need to be used for any straight motion a single axis), unless the cutter offset or a fixed cycle is in effect. AI! tool mOlions .... "',..,..,r·Pu·" f"""""~f'III\J by the control. regardless of any in that apply to linear motions are nol the same ror circular mOlions.
'-----I"'"
X
Z
~03
~ G02'
Figure 31·2 Progressive
with the macnllJp.
X
PLANE ROTATED AFTER MIRRORING E 18 PLANE ON THE MACHINE
272
Cha
arcs does nor change plane (a), or the malhemali- . cal plane mirrored (b), or even the milTored plane rotated by (c), even if plane itself is changed. is not a creallon of any new plane What The view still represents a viewed from a dilfcrenl direcwithin
The
lalion. II is G 19 plane cause some problems is well
the situation is similar. plane (G 18) match beand the actual axes orienIhal appears to be reversed
Ihe logical structure
of a machinmg plane
pro-
G17 G02 Xl4.4 Y6.8 Rl.4 GIB G03 Xll.S7S Z-1.22 R1.0 G19 G02 Y4.5 ZO RO.85 Some older control systems do not dius designation specified by the R vectors 1, J and K must used. motion within a selected must be selected:
G17 G02 (G03) x .. Y.. I .. J .. WIll
enable
operations using circular interpolation, culler radius offset and fixed cymost common applications of Ihis type of ma(blend) Intersecling radii, circular
counlerbores, cylinders, simple spheres cones, and other Similar shapes. (0
The following format grmnming applications for circular
31
undersland the CNC applications of G02 and in planes, illustration in Figure 3 J
Gla G02 (G03) X_. Z
I.
G19 G02 (G03) Y.. Z
J R ..
From the
o XV axes o o
K..
that: 7
I and J arc center modifiers
XZ axes . G18 plane • I and K arc center modifiers 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
N40 G17
XY plane selected
X20.0 Y7.5 Z-3.0 N42 GOl X13. 0 FlO. 0 N43 G18 G02 X7.0 R3.0 N44 G17 GOl XO
Sl£ll1po.riJiDHDjli1elool
N41 GOO
31-3
Actual circular rooJ path direction in a/l three machine planes. Note the inconsistency fOI the G18 plane
•
611-618-619 as Modal Commands
The preparatory
G 18 and G 19 are all modal one of them will activate selection in the program he in another plane selection. The belong to the G codc group
Englishunils
PI[llle selection "..,.pfPIJnnl
Z axis is asswned as absent PlnJle selection irrelevGlIf
Block N43 represents a contour of a 180" arc in plane. Because of the G 18 command in N43, (he control will correclly interpret the 'missing' axis as the Z its value will be equal to the las! Z axis value Also examine the G 17 command in is always a good practice to transfer the control status to original plane selection as soon as the plane !hough Ihis is no! absolutely necessary in lhe
PLANE SELECTION
273
Omitting the G 18 command in block N43 wi II cause a serious program error. If G 18 is omitted, the originally selected command G 17 wi II sti II be in effecl and circular interpolation will take place in the XY plane, instead of {he intended ZX plane. 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 control system will process such a block as if i[ were specified in a complete block: N43 G17 G02 X7.0 YI.S R3.0
An interesting situation will develop if the plane selecrion command G J 8 in block N43 is absent, but [he circular interpolation block contains two axes coordinales ror the end point of the circular motion: N43 G02 X7.0 Z-3.0 R3.0
G17 is stilll;1 effect
Although G 17 is still the active plane, [he arc will be machined correctly in the G 18 plane, even if G 18 had not been programmed. This is because of the special control feature called complete instruction or complete data priority, provided in block N43 of the last example. The inclusion of 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 without taking on modal values. Two axes programmed in a single block override the active plane selection command.
•
Cutter Radius Offset in Planes
The plane selec\Jon for rapid or Imear motion lS lrrelevant, providing that no cutter radius offset G41 or 042 is in effect. In theory, it means that regardless of the plane selection, all GOO and GO I motions will be correct That is true, but seldom practical, since most CNC programs do use a contour] ng motJOn and they also use the cutler radius offset feature. As an example, evaluate the following blocks: N1 G2l
N120 G90 GOO X50.0 YIOO.O Z20.0 Nl21 Gal X90.0 Y140.0 ZO F180.0
When the rapid molion programmed in block N 120 is completed, the cutter will be positioned at the absolute location 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 N 12l IS completed. Adding a cutter radius offset command 041 or G42to the rapid mOlion block, the plane selection will become extremely important. The radius offset will be effective only for those two axes selected by a plane selection command.
There will no! be a 3-axis cutter radius orfset takIng place! Tn the next example, compare the absolute tool positions for each plane when the rapid molion lS complered and the cutter radius ollset is activated in the program, Tool absoIute position when the culti ng motion is completed depends on the mOlion following block N 121. The radius offset val ue of D25= 100.000 mm, stored in the conlrol offset registry, is used for the next example:
o
Example:
Nl20 G90 GOO G41 xso.o YIOO.O Z20.0 D2S N121 GOl X90.0 Y140.0 ZO F180.0
The compensated tool posit ion when block N 120 is completed, wi I! depend on the plane G l7, 018 or G 19 currently in effect: o
If G17 command is programmed with three axes: G17X .. Y.. Z..
o
If G18 command is programmed with three axes:
G18X .. Y.. Z..
o
XV motion will be compensated
LX motion will be compensated
If G19 command is programmed with three axes: G19 X.. Y.. Z..
YZ motion will be compensated
The following practical programming example illustrates both circular interpolation and cutter radius offset as they are applied in different planes.
PRACTICAL EXAMPLE The example illustrated in Figure 3 1-4 is a si mple job that requires cUHing the RO.75 arc in [he XZ plane. Typically, a ball nose end mill (also known as a spherical end mill) will be used for a job like this. In the simplified example, only two main tool passes are programmed. One pass is the left-to-right motion - across the left plane, over the cylinder, and over the right plane. The other pass is from right to left - across the right plane, over Ihe cylinder. and across the left plane. A slepover for the tool is also programmed, between the passes. The program of this type for the whole part could be done in the incremental mode and would greatly benefit from fhe use of subprograms. Figure 3J-5 demonstrates tool motion for the two passes Included in the program example. To interpret lhe program data correctly, note that program zero is at the bOllom left corner of the part. Both clearances off the part arc .l 00 and the stepover is .050:
274
Chapter 31
3.5
2.5
-, Figure 31-5 Too! path fDr programming example 03101 Figure 31-4 Drawing for the programming example 03101
FIXED CYCLES IN PLANES The last programming item relating to plane selection is
03101
the application of planes in fixed cycles. For cycles in the
Nl G20 N2 Gla
(zx PLANE SELECTED)
N3 G90 GS4 GOO X-D.I YO £600 M03 N4 G43 Z2.0 HOI MOB N5 GOI G42 ZO.S 001 FB.O N6 Xl. 0 N7 GO) X2.S 10.75
(= GO) X2.S ZO.S IO.7S
KO)
NB GOl X3.6 N9 G91 G41 YO.OS
NlO G90 X2. 5 Nll G02 Xl.0 1-0.75(: G02 Xl.O ZO.5 1-0.75 KO) Nl2 GOl X-O.l N13 091 G42 YO.OS Nl4 G90 ...
When working with lhis type or CNC program lhe first lime, it may be a good idea to test the tool path in the air. a lillIe above the job. Errors can harren quite easily. Three axes cutting motion is programmed manually only for parts where ca1culJ.tions are not too lime consuming. For parts requiring complex motions calculations, a computer programming software is a beuer choice.
G 17 plane (XY hole locations), G 17 is only important if a switch from one plane to another is contained in the same program. With special machine attachments, such as righr an.gle heads, [he drill or other tool is positioned perpendicular to the normal spindle axis, being in G 18 or G 19 plane. Although the right angle heads are not very common. in many industries they are gaining in popularity. When programming these allachments. always consider the tool direclion into the work (the depth direction). In the common applications of fixed cycles, G 17 plane uses XY axes for the hole center location and the Z axis for the deplh direclion. Iflhe angle head is set to use the Y axis a<; Lhcdepth direction, use G 18 plane and the XZ axes wi II be the hole cenler positions. If the angle head is sella use the X axis as the depth direction, use G} 9 plane and the YZ axes will be the hole center positions. In all cases, the R level always applies 10 the axis that moves along the depth direction. The difference between the tool tip and tile center line of 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 metal removal, [he rraditional HSS (high-speed steel) end mills still enjoy a great popularity for a variety of milling operations and even on lalhes. These venerable cutters offer several benefits - they are relatively inexpensive, easy 10 find, and do many jobs quite well. The term high speed sleel does nOI suggesl much produclivity improvement in modern machining, particularly when compared \0 carblde cutters. It was used long time ago to emphasize the benefit of this tool maLeriallo carbon tool sleel. The new material of the day was a 1001 steel enhanced wi th tungsten and molybdenum (i.e., hardening elements), and could use spindle speeds two La three times faster than carbon sleelloois. The term high-speed-sleel was coined and Ihe HSS abbreviation has become common to this day. The relalively low cost of high speed steel tools and their capability to machine a part to very close tolerances make Lhem a primary dluice for many millillg applications. End mills arc probably the single most versatile rotary tool used on a CNC machine. The solid carbide end mills and end mills wilh replaceable carbide spiral tlutes or inserts are frequently llsed for many different jobs. Most typical are jobs requiring a high metal removal rates and when machining hard materials. The HSS end mill is still a common cutting tool choice for everyday machining. Many machining applications call for a harder LOoling material chan a high speed steel, but not as hard as carbIde. As the tooling cost becomes an issue, the frequent solution is to employ an end mill with additional hardeners, for example a cabal I end mill. Such a 1001 ~s a lillie more expensive than a high speed steel tool, but far less expenSlve t~an a carbide 1001. Cobalt based end mills have longer cullll1g tool life and can be used the same way as a standard end mill, wilh a noticeably higher productivity rate. Solid carbide end mills arc also available in machine shops and commonly used as regular small to?]s. Larger lools made of solid carbide would be too expenslve, so special end mi lis with i ndexable j nserts are the lools of choicc. They can be used for bOlh roughing operations and precision finishing work. This chapter takes a look at some technological considerations when the CNC program calls for an end mill of any type or for a similar tool that is used as a profiling tool for peripheral cutting and cOnlouring. This is an operation when the side of (he cuttcr does most of work.
END MillS End mills are the most common tools used for penpheral milling. TI1ere is a wide selection of end mills available for just about any conceivable machining application. Traditional end mills come in metric and English sizes, variety of diameters, styles, number of CUlling flules, numerous flute designs, special corner designs, shanks, and tool material compositions. Here are some of the most common machining operations that can be performed with an end mill - HSS, cobalt, solid carbide or an indexable insert type: o
Peripheral end milling and contouring
o
Milling of slots and keyways
[)
Channel groves, face grooves and recesses
o
Open and closed pockets
o
Facing operations for small areas
o
Facing operations for thin walls
o
Counterboring
o
Spotfacing
o
Chamfering
o
Oeburring
End mills can be formed by grinding them into required shapes. The most common shapes are the flat bottom end mill (tJ1e most common lype in machine shops), an end mill with a full radius (often called a spherical or a hall nose end mill), and an end mill with a corner radius (often called the bull nose end mill). Each type of an end mill is used for a specific type of machining. Slandardflat end mill is used for all operations that require a nat bottom and a sharp corner between the part wall and bottom. A ball nose el1d mill is used for simultaneous three dimensional (3D) machining on various surfaces. An end mill similar ro a ball nose type is the hull Hose end mill used for either some 3D work, or for tlm surraces that req~ire a corner radius between the part wall and bottom. Olher shapes are also required for some special machining, for example, a center CUlling end mill (called a slot drill), or a taper ball nose end mill.
Figure 32-/ shows the Ihree most common types of end !llills usecJ ill inuuslry and the relationship of culler radius 10 the culler diameter.
275
276
Chapter 32
NOSE MILL
•
BULL NOSE END MILL
informalion
• R
D --,
R
D
R = DJ2
0
R-···' /
rdating to the size of an end for CNC machining:
0-o
R < DJ2
o o
32·1 Basic NlrltmJl""t ..~n of the three most typical end mills
•
High Speed Steel End Mills
high speed sleel end mills are Ihe 'old-limers' in maThey arc manufactured either as a or a douhle end . wilh various shank configurations. Depending on Ihe cUlling tip try, they can be used for peripheral motion (XY axes plunge motion (Z axis only), or all axes (XYZ axes). Either a single end or a double end can for CNC machining. When using a double end mill. sure the unused end is not damaged in the (001 mQunted. On a CNC machine, all end mills are held in a collet Iype \001 holder, providing the and concentricity. Chuck lype holders are not recommended for end mills of any kind.
•
End Mill S
Solid Carbide End Mills
End mill mill length length
work, the diameter of the end mil I must nominal diameters are those that are . various looling companies. Nonstandard as reground cullers, must be treated differently work. Even with the benefits of cuUer offset, it is nm advisable to use reground end mills for , . although they may do a good job far emersituations and [or some raughing_ That nm mean a reground culler cannol be used for work in the shop or for less demanding length of an end mill projected from the tool holder is very Important. A long projection cause that contributes to the wear of cuLting edges. Another effect for a long tool is deflection. Deflectjon will negali~ely influence the size and quality the finished parI. nute length is important for 11"""''-'''''''''>lion of the depth of cut. 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
1,5D
Indexable Insert End Mills
The indexablc insert mills solid carbide end mills, but with the replaceable carbide insertS. Many this category as well. The their internal diameler La the ground l1al area where the the 1001 from spinning.
in
match
The tool has a screw prevents
Figure 32·2 HeJ,atlolnst,~J(J
for
of the end mill diameter to the cuts in
of cut
PERI PH
•
MILLING
7
Number of Flutes
.SPEEDS AND FEEDS
an end mill, particularly a hardness, the number of flutes should mary For profiling, many programmers se(virtually automatically) a four-flute end mill tool than 0.625 or 0.750. - thai is - it has to cuI into a solid mate- has normally only two flutes, 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.
In many other sections of Ihe handbook, "'..,"''''''''''' are mentioned. Tooling catalogues have charts recommendations 0/1 speeds and feeds for parlitular with different materials. However, one (English version) is used for calculating the in rlmin (revolutions per minute):
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 come in two-, four-flute configurations. So what are the benefits of a two-flute versus a three-flute versus a flute for example? The type of material is guiding
12 ft/min 11:
o
: :;: Spindle speed {revolutions per Constant to convert feet to inches Surface speed in feet per minute Constant for flat to diameter conversion of in inches
formula is similar:
compositions. there is (he expected ",,,,u... ,v," or a trade On a positive side. mill better conditions (0 cuts. When cutting as aluminum. magnesium, a chip buildup is important, so a
practically the only choice, even somewhat compromised. A different
for harder materials, behave to considered - LOol chatter and fool deflection. is no doubt, that in ferrous materials, the muhi flute end mills will deflect less and chaUer less than their two-flute cnd mills? They seem to be compromise between the two-flute and four-flute Three-flute end mills have never become a standard ">J'V''-'-, even if their machining capabilities are oflen to excellent. Machinists have a difficulty to measure accurately, partools as a verticularly wHh common nier or a micrometer. very well in most materials.
Ie?
where ...
r/min 1000 == m/min 1t
o
(revolutions per minute) to convert mm to meters speed in meters per minute Constant for flat to diameter conversion Ill'!>ln ..f· .. , of the tool in millimeters
a benefit from the reverse cuning at a certain spindle speed perfect for the particular diameter of (he tool for that fi nd out the ftlmin rali ng for the to any cutter size. The next diameter is in inches):
What about
and in fact they are a
an mill with a 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. away from its axis (center line). common physical laws.
ft / min Metric
IS
meters (mm):
Regardless of (he
laroer diameter will deflect o
All entries in the formu tions and should be
1{
x 0 x r J-min 12 lool diameter is in milli-
278
Chapter 32
To calculate a culling feedrate for any milling operation, the spindle speed in rlmin must be known first. Also known has to be the number of Ilutes and the chip load on each flute (suggested chip load is usually found in tool catalogues). For the English units, the chip load is measured In 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 fcedrate that will be in inches pcr.minute - in/min.
The English units version of the formula is:
in/min r I min
mm/min r / min x N
ters per revolution /11m/rev.
~
where ... in/min r/min I,
=
N
=
Feedrate in inches per minute Spindle speed in revolutions per minute Chi p load in inches per tooth (per flute) Number of teeth ~flutes)
=: =:;
For metric system of measurement, the chipload is measured in millimeTers per looth (per flute), with the abbrevialioll of !'Iull/looth. The meuic formula is similar to lhe one listed for English units:
N
Metric units formula is very similar, it calculates the feed 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 directly specified in inches per revolution (in/rev) or millime-
in / min ;;: r / min x f t x N
x
When using carbide insert end mills for cUlling steels. the faster spindle speeds are generally better. At slow speeds, the carbide culler is in contact with a steel being cold. As the spi ndJe speed increases, so does the steel temperature at the tool cuui ng edge, produci ng lower strength of the material. That results in favorable cutting conditions. Carbide inscrt cutting lools can often be used three limes and up to five limes faster than standard HSS cutters. The two basic rules relali ng to the rei ationsh ip of tool material and spindle speed can be summed up: High speed steel (HSS) tools will wear out very quickly, 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 ... mm/min
r/min f, N
=
Feedrate in millimeters per minute Spindle speed in revolutions per minute ::: Chip load in millimeters per tooth Number of teeth (flutes)
As an example of the above formulas, a 0.750 four flute end mill may require 100 fUmin in cast iron. For the same cUlling tool and pari material, .004 per flute is (he recommended chip load. Therefore, the two calculations will be: Spindle speed:
r/min ~ (12 x 100) / (3.14 x .750) r/min '" 509 CUllingfeedrale:
in/min", 509 x .004 x 4 in/min '" 8. 1
For safety reasons. always consider the part and machine setup, their rigidity, depth andJor width of cut and other relevant conditions very carefully. Feed per toothfi (in inches per tooth), can be calculated as reversed values from the formula listed above.
• Coolants and Lubricants Using a coolant with a high speed steel (HSS) cutter is almost mandatory for culling all metals. Coolant extends the tool life and its lubricating attributes contributes to the improved surface finish. On the other hand, for carbide insert cullers, coolant may not he always necessary, particularly for roughing steel stock. Never apply coolant on a cutting edge that is already engaged in the material!
• Tool Chatter There are many reasons why a chatter occurs during peripheral milling. Frequent causes are weak tooi setup, excessive LOollength (overhang from tool holder), machining thin walls of material with laO much depth or lOO heavy fccdrate, etc. Cutler deflection may also contribute [0 Ihe chalter. Tooling experts agree that well planned experiments with the combination of spindle speeds and CUlling feed rates should be the first step. If chatter sti 11 perSists, look at the machining method used and the setup integrity.
PERIPHERAL MILLING
279
STOCK REMOVAL
o
Although peripheral milling is mainly a semifinishing and fmishing machining operation, end mills are also successfully 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 corrugated edges - a typical example is a Sfrasmann end mill. 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 order to eliminate, or at least minimize, the tool chatter and tool deflection during heavy cuts. For deep internal cavities, such as deep pockets, it is a 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 that is smaller than the drilled hole. Since the end mill penetrates to the depth in an open space, the succeeding cuts will be mainly side milling operations, enlarging the cavity into the required size, shape and depth.
•
Plunge Infeed
Entering an end mill into the part material along the Z axis alone is called center-cutting, plunging or plunge infeed. It is a typical machining operation and programming procedure to enter into an otherwise inaccessible area, such as a deep pocket, a closed slot, or any other solid material entry. Not every end mill is designed for plunge cutting and the CNC machine operator should always make sure the right end mill is always selected (HSS or carbide or indexable insert type of end mill). Programmer can make it easier by placing appropriate comments in the program.
• In and Out Ramping
A
= RAMPING ANGLE
Figure 32-3 Typical entry angle for 8 ramping infeed into a sofid materia!
•
Direction of Cut
The direction of a cut for contouring operations is controlled by the programmer. Cutting direction of the end mill for peripheral milling will make a difference for most part materials, mainly in the area of material removal and the quality of surface fInish. From the basic concepts of machining, the cutting direction can be in two modes:
o
Climb milling - also known as the DOWN milling
o
Conventional milling - also known as the UP milling
Anytime the G41 command is programmed, cutter radius is offset to the left of part and the tool is climb milling. That assumes, of course, that the spindle rotation is nonnal, programmed with the M03 function., and the cutting tool is right hand. The opposite, G42 offset, to the right of the part, will result in conventional milling. In most cases, climb milling mode is the preferred mode for peripheral milling, particularly in fUlishing operations.
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 simultaneously with the Z aXIS. Depending on the end mill diameter, 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 cutter. 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 Figure 32-3 for an il1ustrotion of a typical ramping motion. Always be very careful from which XYZ tool position the cutting tool will start cutting at the top of part. Considering only the start point and the end point may not produce the best results. It is easy to have a good start and good end tool positions, but somewhere during the cut, an unwanted section of Ole part may be removed accidentally. A few simple calculations or a CAD system may help here.
."..,.
M03 CLIMB MILUNG
CONVENTIONAL MILLING
G41
G42
Figure 32-4 Direction of the cut relative to material, with M03 in effect
280 Climb Milling Climb milling - sometimes called the down 111 i II ing - uses rotation of the cutter in the reeding direction and has the lendency to push the part against the table (or the fixture). Maximum (h of the chip occurs at the heginning of the cut and upon exit, the chip is very th in. The practical result is that most of the generated heat is absorbed by [he chip, and hardening of the part is largely prevented.
Do not misunderstand the words climb and down describing the same machining direction. Both terms are correct, if taken in the proper context.
Conventional Milling Conventional milling - sometimes called the up milling uses rotation of the culler againslthc feedi ng direction. and has the tendency to pull the part from the table (or !he (ixture). Maximum thickness of the chip occurs at the end of
Chapter 32
the cut and upon exit, the chip is very thick. The practical result is possible hardening of the part. rubbi ng the tool into (he material, and a poor surface finish.
•
Width and Depth of Cut
For good machining, the width and depth of cut should correspond to the machining conditions, namely the setup, the type of malerial being machined and the cutting tool used. Width of cut depends also on the number of flutes of the cutter that are actually engaged in the cut. Approximately one third of the diameter for the depth of is a good ru Ie of thumb for small end milis, a IiHle more for larger end mills.
CUl
Pcripheralillilllllg requires a solid Illachliling knowledge and certain amount of common sense. If a successful machining operation in one job is documented, it can be adapted to another Job with easc.
SLOTS AND POCKETS for a CNC machining cenler, to removed from the inside of a area, a coni our and a f]at boHom. This as pocketing. To have a true ,JV'''''-'''. {he pocket boundary must be are many orher applicalions, whe((~ Ihe mafrom an open area, with only a parAn open sIal is a good example of this looks at applicalions of closed pockets,
various programming techniques for internal material removal.
PROGRAMMING SLOTS Slots are ofeen considered as special
of 'grooves' usually have one or two radiJI are [WO ends, they are joined by a straight groove. A 5101 can either open or l:josed, with the same size on both ends, twO different radii, or one A cal sial that has only one end radius is a keyway. open Of dosed, straight, walls or shaped walls ~r'I"\rrt"lm!,Y\ slots with accuracy in
a the same Lool or wilh two or on the part material, required disurface finish, and olher condil
OPEN AND CLOSED BOUNDARY A continuous conlour on which (he slart point and the point is in a di localion, is called an open COntOI,It: Continuous contour defined Ifl the program that starts ends at (he same ' location, is a From the machimng of view, the major {ween an conI our is the CUlling IDOl
for example keyways, can be done with called slolli ng cullers, rather than an
a sJolLing cutter is usually a sllnple prow
morc accurate
reaches
in and oul. More complex
are machined with end mills,
walls of lhe slot arc contoured under program control.
•
Open
Figure
An open boundary
not a true pocket. but belongs !O a Machini of this kind of a contour is quite as the lool can reach the required depth in an open space. Any ity end mill in different varieties
can be used
•
IS
Lo
a drawing of a typical open sial. 10 illustrate Ihe programming tech-
drawing will
niques of an
boundary.
-
-
0.21
Closed Boundary
The excessive material within a closed boundary can be 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 cases, the actual follows, along the Olllside of a pari is nol pocketing but peripheral milling (Chapter inside a closed boundary IS typical vanous regular and irregular Some lypical examples of regular
or
shape pockets are
circular
pockets, and !>o on. can have any machinable shape, bur they still use the same machining
and programming
pockets.
One of the most commonly machined boundary shapes in manufacturing IS milling of a ty, u~ually quitl.! small, called (J sIaL
1.77
1,8
--
Figure '33 1 A
An open slot programming example 03301
• Open Slot Example Before programmi any 1001 mOlion, :'Iudy [hi.: drawing. That way, the machirll ilions can be established, a~ well as ~e!up and other program zero can be determined quicklyare from the lower That left corner (XY) and lOP will become lhe
!"\yr' .....·""'
zero.
281
Chapter 33 ..........................................
Maximum
will relate to o
Number of tools
o
Tool size
The Ihe sial depth as .210. the depth it may 100 a single CUI, small cuners or tough Although a be used for full depth. some stock at the should be left for finishing.
and feeds o
Depth
Maximum cooing depth
Method of Cutting
of
Number of Tools
If
or two lools can be
siona! lolerances are very critical or tools - one 1001 for finishing. The tools could have the same or di fferenl For [his example, only one (001 wilt be used for both roughing and finishing.
Once alllhe other maChining conditions are the melhod of CUlling almost presents itself. be positioned above a clear position and at the center line. 1001 will fed inlo the slot depth,
CUI, use Iwo
bottom, for finishing. ln a
out the material all center Then It will
and
Tool Size
al
moved back to the Ihe full depth for conlouring In
i
of the CUlling 1001 is mainly determined by the 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 inch cutter for .500 slot? 1L is possible, but the resulting cut would not
33-2, the XY 1001
program locations are shown.
IJ")
quality. Toler-
N
1001
size, always
r-....
IJ")
.,,-
o:J
c0
CI'"i
ances and surFace finish would 10 conrrol. That means choosing a 1001, available off-shelf, Ihar is a litlle smaller then lhe width. the slot in the example, a 0.500 inch end choice. When se-
lecting the
1.0
o:J
.-
1.185
how much stock the
LOol will leave un lilt! slul walls fur lillisllillg. Tau lIIuch
may require some semi cutler and the slOl width will be easy [0 calculate:
ing cuts. Wilh the 0.500 the amount of slock left 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 ... S W
:=:
o
Stock left on Width of slot ( slot radius times two) Cutter diameter
Slock left on the S ::: (.600 -
111is is a
in the example will be:
I 2 :::: .050 finishing with one CUL
Speeds and FBeds
Spindle speeds exact situation at uses a reas.onable 8 in/min.
feed rates will depend on the machine, so the 01'950 rlmin and culling
03301 (OPEN SLUT) Nl G20 (INCR MODE) N2 G17 G40 GSa UP SETTINGS) N3 G90 G54 GOO X3.87S YO.SSS 8950 Mal (START) N4 G43 ZO.1 HOI MOS (START POSITION ABOVE) NS GOI Z-O.2 FSO.O .01 LEFT ON n~~I'M\ N6 Xl.S F8.0 (CUT TO SLOT RADIUS CNTR) N7 GOO ZO. 1 (RETRAeI' ABOVE WORK) N8 X3.875 (RETURN TO START) N9 GOl Z-O.21 F50.0 TO FULL DEPTH) NlO G4I Yl.IBS DOl FB. 0 (APPROACR CONTOUR) Nll Xl.8 (CUT TOP WALL) NI2 GO) YO.SB5 RO.3 SLOT RADIUS) Nll GOI X3. 875 BOTTOM WALL) Nl4 GOO G40 YO.8SS TO START POINT) NlS Zl. 0 M09 ABOVE WORK) 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 programorder 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. eotry into the matcnal. locmion - too! has La into the the Z axis, unless there is a hole. to use a cel1ter cUlling mill (known as If this type of end mill is no! or maconditions are not suitable, tool will have to ramp into the material, as a second method. is a linear axes. usually in the XZ, the YZ, or is in
(001
0.21
Figure 33-4 Roughing operation detail for a closed slot example 03302 Internal Contour Approach
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 to its left One way is the way that the tool current tool location at make a straight linear cut the center, LO the 'south' of the left arc (while applying the cutter radius This method works, but when approaching an inner conlour it is better to use a tangential approach. An internal contour approached at a requires an auxiliary approach arc (so called lead-ill since the linear approach
1
0.885
A-A
towards the contour is not
i.l
Although the tangential surface finish of problem. cutter interpo/alion to be added "
Figure 33·3 A closed slot nrfllVlln1mUlr, example 03302
an arc Improves
creates another
cannor be sraned a non-circular
two motions from the center to the start
shown in slot already established will apA 0.500 inch end mill will be a center cutting geomClTy thai allows
pom[
the contour:
o First, a linear motion with cutter radius the tangential approach arc motion
o
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 selected arbitrarily. at a reduced will be [0 the .010 on the bOftom) and, in a linear be roughed out between 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 around the slot contour. final depth, and from the of the sial, Ihe finish contour center iocalion of the more complex this lime, bewill start Contouring cause the tool is in a rather spot.
1.1
RO.28
33·5 Detail of t",,,,,o"t,,,,1 £lllDrllach towards an inner contDur
2
33 (CUT WALL TOP) (CUT RADIUS LEFT)
N12 GOl Xl. 5 Nl3 G03 YO.S85 RO.3 N14 Xl.78 YO.86S RO.28 N15 GOl G40 Xl.S YO.aas
(LINEAR DEPARTURE)
N16 GOO Zl.0 M09 Nl7 G2B XI.S YO. BaS 21.0 MOS Nl8 IDO
AJ30VE WORK}
(M!C (END OF PR()GRlIM)
%
This program example is also a inside conlour kinds (angular. circular. eic,), use (rated in the last two examples.
10 approach any
POCKET MILLING ~
where ... RI
Radius ofthe tool R, :::: of the approach arc arc) Rc Radius of the contour (slot radius)
Supply some numeric data be calculatcd. three radii- The slOI conlOur dnlwing, Once the cUlling tool becomes fixed as well CRt). proach radius (Ru). lalcd accurately_ From the formula, it is.
radius can of all by Ihe Ihal radius ap-
thai
must be greater than the culler must be smaller Ihat the contour the range (within only increments of.O I0 are - .260 or .290? Well, the
rather a larger approach
gential approach takes place at a a smaller radius. The result is an For program 03302, .280 is as approach radius. This selection meets all the three relationships:
Thai is alilhe information needed beforc wriring the program. Note the programming similarities with the open slot listed in program 0330 I. 03302 (CLOSED SLOT) N1 G20 N2 G17 G40 GaO
(INCH MODE) (STARTUP SETTINGS) N3 G90 G54 GOO X3.0 YO.SSS 5950 M03 (START) 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) NS 041 Xl.22 YO.86S DOL F8.0 (LINEAR APPROACH) N9 G03 Xl.S YO.585 RO.28 (CIRCULAR NlO GOI X3. 0 (CUT BOTTOM WALL) Nll G03 Yl. 185 RO. 3 (CUT RIGHT SLOT RADIUS)
Pocket milling 15 also a Iyplcal and common on CNC machining centers, Milling a means to remove by material from an enclosed area, This bounded area is further by tom, although walls and bottom could tapered, convex, concave, rounded, and have other shapes. Walls create the boundary contour. Pockets can have rectangular, circular or undefined can be empty side or they may have islands. Programming pockets manually is usually only for simple pockets, pockets of regular shapes, such as rectangular or circular pockets. For pockets wilh more complex shapes and pockets with islands, the of a computer is usually required.
•
General Principles
There are two main considerations when programlTii
a
pockel for milling: o
Method of cutter entry
o Method of roughing a 10 slart mllling a pocket (into solid mateculler 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 cut IS eHher not praetical or not possible, ramping can be used very successfully. melhod is oflen used when the center cutting 1001 is the Z axis to be used toor This motion will, or a 3 axis linear motion. it
V'-,111\.1II
where to
so is the widTh di
to
milling mode. It may he difficult amount
10 I~flve
in climb eX:'lctly the same in the pockeL
AND POCKETS
5
Many cuts will be irregular and s[Ock amount will not even. thaI reason, it is quile common 10 nishing cut of the pocket contour, before cut place. One or more tools may be situation, depending on exact requirements. typical methods for roughing a
are:
o o
- from the inside of the pocket out
o
One direction - from the outside of the pocket in
other pocketing options are as a true spiral, morph, one way, and cases, there is a choice of speci fying Ihe ancut, even a user selected point of entry and ti overs. Manually, these more complex methods may as well, but it may be a very tedious work.
•
illustrate the complete tooling selection is Important. Material is lant and so are other machining rectpockets are often drawn with sharp corners, they always have COrners of the tool when The corners in the drawing are ), and 6 center CUlling end mill (0.3125). may a good choice, but for finishing, the a lillie smaller so the tool can actually cur in comer, rub there. Selection of a 0.250 end mill is reasonnot and will be used it in the example.
all the material in lhe enclosed area has to removed (including the bottom), think about aU where the cutting tool can enter into the or ramping. Ramping must always be done in a area, bUl plunging can be done almost anywhere. are only two practical locations: o
Pocket Types
o Pocket corner
The most common are also the easiest to gram. They all have a regular shape, without any islands: o
Square pocket
o
Rectangular
o
Circular
Square tally the same there IS no
center
to both selections and the ineviat the pocket center, the tool path and, after the initial cut, milling orconventional milling mode. more math calculations involved in Ibis method, starling at the pocket corner, is ar as well, but uses a zigzag motion, so one Cllt n a climb milling mode, the other cut will be in a machining. It is a little easier for calIn the eX<.Impk, the corner will be used
are their side lengths, in programming.
RECTANGULAR POCKETS Any corner
Rectangular and p
are quite easy to proare parallel 10 the X or Y axes. As pocket, the one illustrated in IJV''''''-''''
pocket is equally suitable for the start.
In the pocket will
03303. the lower lefr corner of """""rw,Cl"" factors the programmer has Lo
start location for the CUlling tool in
an 0.15
-a-
---
I
t
...... "J"..,u
area:
o
Cutter diameter (or radius)
o
Amount of
o
Amount of stock
left for finishing
for semifinishing
the corner be known, as well as to other elements
"._,,-.- - - - - ' - - - - ' \
0.5
dimensions of the pan, as length, the width, and pocket - they must always position and its orientation
are
2,5
I
'"'l
0.5 r-
Figure 33-6 Sample drawing of a rectangular
--
R5/32
program 03303
In the Figure 33-7, the point is identified as X I corner (lower left), and all and Y 1 distance from additional data are as well The letters identify the programmerl'hrV\-C''''C
L D
-
-
L
I
s c
w
w t
I
Q
I
'-
r
Y1
f
XI L::;:: W Q
•
method
T I
.
Xi;--
Figure 33·8 Result of a zigzag pocketing, without a semifinish cut
•
Stepover Amount
X location of tool at start Vlocation of tool at start
V\ TLR
S C
the comer·
of the description letters is :
The
o
t-
c
33-7 Pocket roughing start I.l$'
Y1
= =
Tool radius diameter / 2) length as per drawing Pocket width as per drawing Calculated stepover between cuts Calculated length of actual cut Stock left for finishing Stock left for semifinishing (clearance)
Stock Amount
are two stock amounts (values) - one relates to (he finishing operation. usually done with a separate finishing tool, the other one relates to the semifinishing operation. usually done with the roughing tool. The cuner moves back forth in a zigzag direction, leaving behind so scallops. In 20 work, [he word 'scallops' is to uneven wall surface caused by lhe tool shape, and is in 3D cUlling as well. The result of such a zigzag is generaHy unacceptable ror the finish machining. JeA ..m,",c of the difficulty of maintaining tolerances and surface wh de culting uneven stock.
avoid possible cUHing problems later, a secondary operation is often necessary. It is to elimmate the scallops. Choose semifinishing cut machining tough materials or when
Semifinishing allowance. as the C val ue in the ill ustralion, can to zero. 1f thai IS case, it means no additional is Typically al 11 a small value.
Figure 33-8 illustrates of a rectangular pockel, (he uneven stock (scallops) high spots create the tool, so semifinishing tool
than slepover will cuts (zigzag lype). There is number of culS is se-
number: o
number of cuts will terminate the roughing on the opposite side of the pocket relative to the start location
o
number of cuts will terminate the roughing on the same side of the pocket relative to the start location
Practically, it does not matter which corner is 10 start at or in which direction the rUS( cut begins. What matters is that the stepover is reasonable and, preferably, for all cuts. There is a simple way of calculating the over, based on a given number of cuts. [f the amount is loa small or 100 large, just repeat the calculation wilh u different number of cuts N. The calculation can be expressed in a formula:
SLOTS AND POCKETS
In the formula, N is
stepovers and
all other
L L1
U"'~ULJ'b as before.
END
Q Example: Il"'n,',,,,..,<.; are tool
on START
0.250 (TLR 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
to use the pocket be a better width. This is narrower along the X axis, than it is lJl'-J'LLLLL\.. U
Semifinishing tool path at the last roughing location, and leaves equal stock for 11I.....hlf.,., operation
-2x5
• length of Cut W
il'''LU>.~,
the length, the incremental disto be calculated.
fonnula to calculate the length of similar to Ole stepover calculation:
In
example, the D value will be:
Q Example: D
2.0 - 2 x 0.125 - 2 x 0.025 - 2 x 0.01
D
1. 6800
overs
•
is the incremental length of cut between the cutter radius offset has been used).
Semifinishing Motions
purpose of semifmisbing motions is to nate uneven stock. Since the semifmishing will be nor .. the same tool as the roughing to start cuts is the roughing sequence. In case, it was corner of the pocket. Figure 33-9 the Start to (of
The length LI and WI are between the Star! position value, along both axes.
The fonnula for the cut, its actual cutting distance, is
2x
- 2x 5
Q Ll ;;;;; 2.0 2 x 0.125 L1 == 1.7000
2 x 0.025
W1 ::::; 1.5 - 2 x 0 125 W1 1 2000
2 x 0.025
• finishing Tool Path is roughed out and semifirtished, another tool (or even same tool in some cases) can be to pocket to its fmal size. TIlis programmed tool will typically provide offsets to maintain maCninl!Jlg Tolerances and speeds and feeds to maintain required surfinish. Typical staJiing tool position for a small to medium pocket is at its center, for a large pocket the position should be at the middle of the pocket, away one of the walls, but not too far. For the fmish.ing cut, the cutter radius offset should mainly to gain flexibility in maintaining tolerances during machining. Since the cutter radius offset cannot started during an arc or a circular motion, linear . lead-out motions have to be added. Tn Figure 33-10 is illustration of a typical fmishing tool path for a pocket (with the start at the pocket center). conditions do apply in these cases. One is that leading arc radius must be calculated, using the same method as for slots:
288
pter 33
03303 (REcrANGUI.J\R POClCET) Nl G20 N2 G17 G40 G8Q TOl (.250 ROUGHING SLOT DRILL) N3 M06 N4 G90 G54 GOO XO.66 YO.66 S1250 M03 T02 NS G43 ZO.l HOl MOB N6 G01 Z-O.15 F7.0 ( - - ROUGHING START ------) N7 G91 X1.68 FlO.D N8 YO.236 (STEPOVER 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)
!Iii' where
Ra ;:::: Radius of the approach arc Rt Radius of the cutting tool Rc Radius of the corner .------.~
...
~.
- L ................. ....... ~
~--
NlS Xl. 68
w \ Ra
YO.236 X-1. 68 SEMIFINISH START X-0.01 Y-O,OI Y-1.l9
N2l Xl. 7
Rc TYP.
33·10 Typical
N16 N17 (- NIB N19 N20
tool path (or a rectangular pocket
of Iii CUI is mode and the radius offset of the contour.
o Example: To calculate the approach drawing, start with the corner 5/32 (.1563) and the lOol so the condition R, < the condition R" > Rr. larger than (he 1001 as pocket length and width are possible, choose the approach pockel widlh W, for a lillie In (he example, Ra. = W / 4 .. 1.5 / 4 Ra. c: .375
Condition is satisfied, the the tool radius, and can be
• Rectangular Pocket Program Once all selections and decisions have been done, program can be wrillen for Ihe pockel in Two lOols will be used, bmh 125.250 end mills, cuuer must be able or center cUlting. lower left corner of the parI. All tlnishlng steps art! documented in the program.
N22 N23 N24 N25 N26 N27 N28 N29 N30 N31 (-N32 N33 N34 N3S N36 N37 N38 N39 N40 N4I N42 N43 N44 N45 N46 N47 N48 %
Y1.2
X-l. 7
--------
----------
S) 5) 6)
) (SEMIFINISH STARTUP X) (SEMIFINISH STARTUP Y) (LEFr Y-
(RIGHT X+ MOTION) (up Y+ MOTION) (LEFI' X- MOTION)
G90 GOO ZO.l M09 G28 ZO.l M05 MOL T02 (.250 FINISHING END MILL) M06 a90 G54 GOO Xl.S Yl.2S 51500 M03 TOl G43 ZO.l H02 MOB GOI Z-0.15 F12.0 FINISHING POCKET ----------------- - ----) G9l a41 X-0.37S Y-0.37S D02 FlS.O G03 XO.37S Y-0.37S RO.37S F12.0 GOI XO.8437 G03 XO.1S63 YO.1563 RO.1563 GOl n.1874 G03 X-0.1563 YO.1563 RO.1563 GOl X-l.6874 G03 X-0.l563 Y-O.lS63 GOl Y-l.lB74 GO) xO 1563 Y-O.lS63 RO.1563 XO.8437 a03 XO.375 YO.375 RO.375 GOl G40 X-0.37S YO.37S FlS.O G90 GOO ZO.l M09 G28 ZO.l MOS X-2.0 YlO.O M30
the progrrun carefully. It follows all the decisions and offers many details. In the program, blocks N 17 and N 18 can be joined tointo a SI block. The same applies to blocks N 19 N20. They are only separated for the convenience of Ihe tool mouons to match the llluslrations. There is In using the incremental mode of programmode 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 implies a closed area with a solid boHom. the programming method relating to circular pockets can also be used forcircular openings that may have a hole in the middle. for example, some counterboring operations.
o I
J
To illustrate a practical programming application for a circular pockel, Figure 33-11 shows the typical dimensions of such a pocket. f---------
-,
d
-
Condition: d
2.0 -.--------,
d
I
>
o 3
Figure 33-12 Relationship of the cutter diameter to the pocket diameter
2.0
01.500
For example, the pockel diameter in the sample drawing 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 Sample drawing of a circular pocket (program examples 03304-06)
In terms of plann ing. the first thing to be done is the selection of the culler diameter. Keep in mind, that in order to make the pocket bottom clean, without any residual material (uncut portions). it is imporlan[ to keep the stepover from one cut to another by a limited distance that should be calculated, For circular pockets, this requirement influences the minimum cutler diameter thal can be used [0 cut the circular pocket in a single 3600 cut. •
Minimum Cutter Diameter
In the following illustration - Figure 33-12, the relationship of the cutter diameter to the pocket diameter is shown. There is also a formula that will determine the minimum culler diameter as one third of the pocket diameter. The mi lIing wi 11 start at the circular pockel center, with a si ngle 360" tool motion. In practical terms, selecting a cutter slightly larger thall the minimum diameter is a much better choice. The major benefit of this calculation is when the pocket has to be done with only one tool motion around. The formula is still valid, even if cutting will be repeated several times around the pocket, by increasing the diameter being cut. In that case, the formula determines the maxi mum width of the cut.
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 program zero XOYO, and the pocket depeh is .250, the beginning of lhe program may be similar to the following example (culting tool placed in the spindle is assumed): 03304 (CIRCULAR POCKET - VERSION 1) N1 G20 N2 Gl7 G40 G80
N3 G90 G54 GOO XO YO S1200 M03 N4 G43 ZO.l HOl MOS N5 GOl Z-0.25 F8.0 N6
In the next block (N6), the cutting tool will move from [he pocket center towards the pocket diameter, and apply culler radius offset "long the way, ThiS motion call be done in two ways: o
As a simple straight linear motion
o
As a combined linear motion with a circular approach
•
linear Approach
The linear departure from the pocket center can be direcled inlo any direction, but a direction lowards a quadranl point is far more practical. In the example. a motion along the Y positive direction is selected, into the 90° position.
290
Chapter 33
Along the way, cutter radius offset for the climb milling mode G4! is programmed, followed by the full 3600 arc' and another straight motion, back towards the center. During this motion, the cuttcr radius offset will be cancelcd. Figure 33-J3 shows the tool path.
-.
,
N1l M30 %
Another programming technique for a circular pocket is much morc practical - one Ibal makes better surface finishes and also maintains tight tolerances required by many drawings. Instead of a single linear approacb directly towards lhe pocket diameter, the CUlling tool can be appJied in a combi ned Itnear-circular approach.
2.0-
2,0
01.500 i.
N8 GOl G40 YO FlS.0 N9 G28 Z-0.2S M09 mo G91 G28 XO YO MOS
J
Figure 33-13 Linear approach for a circular pocket milling - program 03304
The graphic representation can be followed by a corresponding program segment - approach a quadrant point. profile the full arc, then return back to the cenler: N6 G41 YO.7S 001 FlO.O N7 G03 J-O. 75
N8 GOI G40 YO F1S.0
Now, the tool is back al lhe pocket center and the pocket is completed. The tool must also retracl first. then move to machine zero (G28 motion is always in the rapid mode): N9 G28 Z-0.2S M09 NI0 G91 G28 XO YO M05 N11 M30 %
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 by roughing operations with one 1001 and finishing operations with one or more addilional tools. A possible surface (oo! mark, lefl al the contact point with the pocket diameter, is a distinct possibility in a straight approach to the pocket diameter. The simple linear approach is quite efficient when the pocket or a counterbore is not too critical. Here is the complete listing for program 03304:
• linear and Circular Approach For this method, the cutting motion will be changed. Ideally, a small one half-arc motion could be made between the cenler and the pocket start point. That is possible only if 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 the,o Fanuc control has the optional User Macros, custom rnide G 12 or G 13 circular pocket milling cycle can be developed. Otherwise. a step-by-step method is the only way. one block at a time. Since the radius offset is needed to maintain tolerances, and the offset cannot start on an arc, a linear approach will be programmed first with the culter radius offset applied. Then, lhe circular lead-in approach is programmed. When the pocket is completed, the procedure will be reversed and Ihe rilriillS offset c:mcelerl rluring rI linear motion back to the pockel center, The approach radius calculation in this application is exactly the same as described earlier in Ihis chapler, for the slot fLnishing tool path. Figure 33-14 shows the suggested tool path. ~-
- 2.0
""_m
-~I
RO.625
0.125
L_ A
01.500
2.0
1
Figure 33-14
03304 (CIRCULAR POCKET - VERSION 1) N1 G20
Combined linear and circular approach for a circular pocket milling· - program example 03305
N2 G17 G40 G80
N3 G90 G54 GOO XO YO S1200 M03 N4 G43 ZO.l HOI M08 N5 GOl Z-0.2S FS.O N6 G41 YO.7S DOL FIO.O N7 G03 J-O. 75
This example uses an approach radius of .625. Any radius that is greater than the culler radius (.3125) and smaller thall lite pocket radius (.750) is correct. Tbe final program O:S305 complements the above illustration in Figure 33 -14
SLOTS AND POCKETS
291
03305 (CIRCULAR POCKET - VERSION 2) N1 G20 N2 G1. 7 G40 Gao N3 G90 G54 GOO XO YO S1200 M03
The calculation is logically similar to the one for the rectangular pocket and the desired amount of the stepover can be achieved by ch.anging the number of steps.
N4 G43 ZO.1 HOI MUS
The example for program 03306 uses three stepovers, calculated from the following formula:
NS GOl Z-O.25 FB.O N6 G4l XO.625 YO.125 DOl FlO.D N7 G03 XO YO.7S RO.625 N8 J-O.75 N9 X-0.625 YO.125 RO.625 NlO GOI G40 XO YO F1.5.0 N11 G28 Z-O.25 M09 Nl2 G91 G28 XO YO MOS
Q
Q
R
This programming technique is by far superior to the straight linear approach. It does not present any additional programming difficulty at all, partly because of the symmetry of tool motions. In fact, this method can be - and should be - used for just about any approach towards an internaJ contour finishing.
•
R -
TLR -
S
N
where ...
l@f
m3 IDO %
==
= =
TlR
S
=
N
In
aUf
Calculated stepover between cuts Pocket radius (pocket diameter 0/2) Tool radius (cutter diameter /21 Stock left for finishing Number of cutting steps
application. {he example values are:
o Example:
Roughing a Circular Pocket
Often a circular pocket is too large for a given tool to guarantee the bottom cleanup in a single cut around. In this case, the pocket has to be enlarged by roughtg it first, in order to remove all excessive material, then the finishing tool path can be applied. Some controls have special cycles, for example, a spiral pocketing. On Fanue conlrols, custom cycles can be created with the User Macros option.
=
R
TLR =
S N
=
r-
D
TI --Q
R I
3
Q
=
(.75 -
.1875 -
.025)
/
3
.1792
Final roughing program is quite simple and there is no cutter radius offset programmed or even needed. Note the 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 next full circle. Each circle radius (1) is increased by the amount of stepover Q: 03306 (CIRCULAR POCKET ROUGHING)
L
TLR
Diameter D =. 1.5
Using Ihe above formula, the stepover amount Q can be found by calculation: Q =
As an example, the same pocket drawing will be used as illustrated earlier in Figure 33-11, but machining will be done with a 0.375 cutter - Figure 33-15.
1.S / 2 = .75 .375 / 2 = .1875 .025
./
-S
Figure 33-15 Roughing our a circular pocket - program 03306
The 0.375 end mill is a small loolthal will not cleanup the pocket bottom using the earlier method. The method of roughing is shown in Figure 33-15, and the value ofQ is the 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.
N1 G20 N2 G17 G40 GSO N3 G90 G54 GOO XO YO 51.500 M03 N4 G43 ZO.l HOI M08 N5 GOI Z-O.2S F7.0 (STEPOVER 1) N6 G9l YO.1792 F10.O (ROUGH CIRCLE l) N7 G03 J-O.1792 (STEPOVER 2) N8 GOl YO.1792 (ROUGH CIRCLE 2) N9 GO) J-O.3584 (STEPOVER 3) mo G01 YO.1792 (ROUGH CIRCLE 3) Nll G03 J-O.S376 Nl2 G90 G01 XO Fl5.0 Nl3 G28 Z-O.2S M09 Nl4 G9l XO YO MOS m5 M30 %
292
Chapter 33 ----------~--~
.............. .
CIRCULAR POCKET CYCLES In Chapter 29, circular pocketing cycles were described briefly. In this chapter, two more examples will provide additional details. Fanuc does not have the useful G 12 and G13 circular pocketing cycle as a standard feature. ConlIols 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 optional User Macro feature, which can be developed to offer more flexibility than a built-in cycle. The two G codes are identical in all respects, exceptlhe cutting direction. The meaning of [he G codes in a circular pocket cycle is: Circular pocket cUlling CW
G12 G13
Circular pocket cutling CCW
Either cycle is always programmed with the G40 cutler radius offset cancel mode in effect, and has the following formal in the program: G1/. l.. D.. F..
(CONVENTIONAL MILLING)
or
G12
a,
bl
G13
Figure 33-16 Circular pocket cycles G72 and G13 N2 G17 G40
GBO
N3 G90 GS4 GOO XO YO S1200 M03 N4 G43 ZO.l HOl M08 NS GOl Z-O.25 FB.O N6 G4l XO.625 YO.125 001 FlO.O N7 G03 XO YO.7S RO.62S N8 J-O.75 N9 X-0.625 YO.125 RO.625 NlO GOl G40 XO YO F1S.0 Nl1 G28 Z-0.2S M09 Nl2 G91 G28 XO YO MOS Nl3 M30 %
G13 1.. D.. F..
(CLIMB MILLING)
!& where ...
I
o ;: ;
F
:::::
Pocket radius Cutter radius offset number Cutting feed rate
Typically, the cycle is called at the center and the bottom of a pocket. All cutting motions arc arc motions, and there are three of [hem. There are no linear motions. The arbitfary start point (and end point) on the pocket diameter is at 0° (3 o'clock) - Figure 33-16. Previous example in Figure 33-11 can be used to illustrate the G 12 or G 13 cycle. For comparison, here is (he program 03305, using a 0.625 end mill: 03305 (CIRCULAR POCKET - VERSION 2) Nl G20
If the G 12 or G 13 cycle or a similar macro is available, the following program 03306 can be written, using the same tool and climb milling mode: 03306 (CIRCULAR POCKET - Gl3 EXAMPLE) N1 G20 N2 G17 G40 G80 N3 G90 G54 GOO XO YO S1200 M03 N4 G43 ZO.l HOI MOB NS GOI Z-0.25 F8.0 N6 G13 IO.75 D1 FIO.O (CIRCULAR POCKET) N7 G28 Z-0.25 M09 Na G91 G2B XO YO MOS N9 M30 %
Macros are very powerful programming tools, but their subject is beyond Ihe limits of this handbook.
TURNING AND BORING There is so much information that can be covered in Ihis section. that a whole book could be written just on the subject of turning and boring. Selected subjects are presented in this chapter, others are covered in chapters dealing with lathe cycles, groovi ng, part-off, single poinllhread ing, etc.
TOOL FUNCTION - TURNING In terms of distinction, turning are boring are practically identical operations, except for (he area of metal removal where the actual machining takes place. Often, terms ex/ernal fUming and internal turning are also used, meaning the same as turning and boring respectively. From programming perspective, the rules are vinually the same, and any signi ficant differences wi]] be covered as necessary. CNC lathes require programming (he selected tool by its tool number, using the T address. In comparison with a CNC machining center, the tool function for lathes is more extensive and calls for additional details. One major difference between milling and turning controls is the facl that the T address for CNC lathes will make the actuaL tool change. This is not a case in milling. No M06 function exists on a standard CNC lathe.
• T Address One difference from machining centers is that a tool defined as TOl in the program must be mounted in the lurret station # I, tool defined as T 12 must be mounted in turret station #12, etc. Another difference between milling and turning tools is in the forma/ of the T address. The format for turning system is T4, or more accurately, T2+2. The first two digilS identify the turret station number and geometry offset, the last two digits identify the wear too! offset number for the selected tool stat ion - Figure 34-1.
Txxyy format represents tool station xx and wear offset number yy. For example, T0202 will cause the turret to index to the 1001 station #2 (first two digits) which will become the working station (active toot). At the same lime, {he associated tool wear offset number (the second pair of digits) will become effective as well.
Selection of the 1001 number (the first pair of digits), also selects the geometry offset on most modern CNC lathes. In that case, the second pair of digits will select the tool wear offsel number. Any tool station selected by the turret station number identification can be associated with any offset number within the available offset range. In mosl applications, only one tool offset number is aclive for any selected 1001. In such a case, it is wise to program the offset number 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: GOO T0214
10
TllOS
GOO T0404.
Tool slation 02, Ivearoff;el 14 Tool slation JI, wear offset 05 Tool SUI/ion 04, wear offset 04
Although all examples are technically correct, only thc last example format is recommended. When many tools are used in a program, the offset numbers for individual tools may be confusing, If they do nOl correspond to the tool Sfation numbers. There is only one ttme when the offset number cannot be the same as the lool station number. That happens in the cases when /1-tlO or more offsets are assigned to the same tool, for example T0202 for [he first wear offset, T0222 for the second wear offset. Leading zeros in the tool function can be omitted for the tool number selection, but not for selection of the wear offset number. T0202 has the same meaning when written as T202. Eliminating the leading zero for tool wear offset will result in an incorrect statement:
n2 means T0022, which is an illegal formal.
TiX,XYIY ...~[ Tool WEAR offset
"T-
..
~ Turret station number
& Tool GEOMETRY offset
Figure 34-1
In summary, the active side of the turret (tool station) is programmed by the first pai r of dlgtts, the wear offset number is programmed by the last pair of digits in the tool function command: GOO TQ404
The most useful preference is to disregard the leading zero suppression and use the tool function in its full formm, as shown above and in examples in this handbook.
an
Typical tool function address for eNC lathes
293
294
34
• Offset Entry
lATHE to some extent covered the tool function, II is a "y<;tem<; and <;ome re-
The tool offset can be entered into the ....rr\lYr,,", ferent ways: o
As a command Independent of the tool
o
As a command applied simultaneously with a tool motion statement
two
each tool as the ac-
point
10 ill~
program value and
• Independent Tool Offset For an independent offset entry in the is applied together with the rooiutV,c...<.,"'x
the tool
offset
N34 GOO T0.202
importance of 1001 wear offthat does not use it All proare ideal values, based on the draware not considered, neither is deviation from programmed dimensions will produce an incorrect ditool part is a very important conwith lighllolerances. The tool wear offset is tune' the actual machined dimensions against dimensions. r"\rr,or":\rTI
of the 1001 wear offset is to adjust the difference the programmed dImensions and the actual LOul positioll OI! the pan. If (he wear offset is not available on the control, (he adjustments are made to the only - thaI is to the geometry offset.
This command is usually programmed as the for each tool (in a clearance position). If position register is used, the offset is together coordinate register with. or immediately following, block. At this point, the tool is still at indexing position. When the tool il will cause a physical as in the offset regbefore the tool command. since it will to actually take place. but should be proS, ' control control when the power is turned usually assumes at the start up, a it looks rather absurd it is correct Rapid mothat 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
• Tool Offset with Motion The second method is to program the wear offset simultaneously with a cuuing tool motion, usually during the tool approach towards the part. This IS the preferred method. The following two examples illustrate this recommended programming of the T function for turning systems - the offset is activated when the second pair of digits in a tool number call are equal to or larger than 01: N1 G20 T0100 N2 G96 S300 M03 N3 GOO X .. Z .. T010l MOS
Note the tool change in the first block N 1 - it uses no offsel number - just lhe tool number that is also the geometry offset number. The offset is applied two blocks later in N3. In most cases. it makes no difference, whether the offset
is activated with or without a motion command. But some limitations (Ire possible when programming the 1001 offset entry without a molion command. For example, If the wear offset value stored is unusually Jarge and the tool starts from the machine zero posicion, this type of programming may cause an overtravel condition. Even in cases of a small offset value, there wi Il always be a 'jump' motion of the turret when the offset is activated. Some programmers do not like this jumpy motion, although it will do no harm to the machine. In these cases, the 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 wear offset is activated together with a motion. Earlier In this chapter was a comment that the lathe 1001 function is also a function causing the tool indeXing. Without a doubt, the one situation La avoid IS the Simultaneous toolllldexino and 1001 motion - it may ~ave dangerous consequences. '" The best approach is to start each lOa! with the too! indexing only, \vilhoU! any wear offsel: N34 T0200 M42
The above example will register the coordinate selling for 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 without tool wear offset). Gear range function may be added as well, if required, Such a block will normally be followed by (he selection of spindle speed, and rapid approach to the first position, close to the part. That is the block where the tool wear offset will be activated - on [he way towards the first posilion:
295 Also note that no GOO is required for a block containing tool indexing with zero wear offset entry. The advantage of programming the tool offset simultaneously with a motion is the el imination of the jumpy motion; at the same lime, no overtravel condition will result, even if the wear offset is unusually large. The wear offset value will only extend or shorten the progranuned rapid approach, depending on the actual offset amount stored. Generally, the tool wear offset register number is entered before or during the rapid approach motion.
• Offset Change Most lathe programs require one offset for each tool. In some cases, however, the program can benefit if two or even more offsets are assigned to the same tool. Needless [0 say. only one offset can be active at one time. The current offset can be changed La another offset for the same tool to achieve the extra fleXibility. This is useful mainly in cases when individual diameters or shoulder lengths must be machined to ex.act tolerances. Any new offset must be programmed without a cancellation of the previous one. Tn fact, this is [he preferable method for changing from one offsel (0 another. The reason is simple - remember that any offset change serves a purpose only during actual cutting. Offset cancellation could be unsafe if programmed during cutting mOlion. This is a very important - and largely unexplored programming technique - that some detailed examples are justified.
MULTIPLE OffSETS Most jobs machined on CNC lathes require very high precision. High precision requires tolerance ranges as specified in the engineering drawing and these ranges may have quite a variety. Since a single offset per toot is of Len not enough to maintain these tolerances, two or more wear offsets are required for one tool. The follOWing three examples are designed to present a complete understanding of the advanced subject covering mulliple offsets. The same basic drawing will be used for all examples. The project IS very simple - program and machine three diamelers as per drawing, and maintain colerances at the same time. One rule at the beginning - the program will no/ lise the middle tolerance of the X or Z value. This is an unfortunate praclice that makes changes to [he program much more dirficul[ at a later time, if lhe tolerances are changed by engineers or designers. In the drawings, the following tolerances can be found:
N34 T0200 M42 N35 G96 5190 M03 N36 GOO G41 X12.0 ZO T0202 MOB
o
Tolerances only on the diameter
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 are training purin reality. All chamfer tolerances are on the project. Matetools are used:
•
TOl
For the face and rough contour
T03
For the
T05
0.125 wide part-off too!
of the contour to size
Diameter Tolerances
o
o
o
'<:t
I"-
ci
03401 (1. S ALUMINUM BAR - EXTEND 1. 5 FROM
(TOl - FACE AND ROUGH TIJRN) G20 N2 G50 S3000 TOIOO N3 G96 5500 M03 N4 GOO G41 Xl.7 ZO TOIOI MOB N5 G01 X-O.07 FO.OOS N6 ZO.l N7 GOO G42 XI.55 N8 G71 P9 Q16 UO.04 WO.004 DIOOO FO.01 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 NJ.
(TOl - FmISH TIJRN) N19 GSO 53500 T0300 (-- 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 N23 G01 XO.625 Z-O.03 FO.002 N'24 Z-O.4 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 -------
The drawing in Figure 34-3 variable tolerances only on the
1.0
- 03401.
c:i
N28 Z-1.255 N29 UO.2
NJO GOO G40 XS.O ZS.Q T0300 (-- OFFSET 00 AT THE END OF TOOL ------------) NJl MOL I
L~
__
~~
__-+________________
0.03 x 45° (3)
""'
Figure 34-3 Multiple offsets·
~
I::AOIIII)II::
for diBmeters • 03401
programming solution is to include ltvo offsets for for example, T0313 and T0314. In the I'Ann-t'l\ correct amounts have to be set before machiningamounts for middle toler.ance are shown: """H"UF"
13 14
X-O.003 X+O.003
ZO.OOO ZO.OOO
shoulders) must be
NJ2 NJ3 N34 N3S N36 lO7 lOB N39 N40 N4l N42
- 0.125 WIDE TOSOO G97 S2000 MO) GOO X1.7 Z-1.255 T0505 MOB Gal Xl.2 FO.002 GOO Xl.4S Z-1.1825 GOl Xl.31S Z-1.25 FO.OOI X-O.02 FO.0015 GOO XS.O Z5.0 TOSOO M09 MlO
%
TItis is the complete quired. Since TOI and not ing examples, only T03 will be shown
now on.
TURNING AND
7
o o o ..IS!
I.l)
N
o
I.l)
1"-
ci
1 ,
t ·-,--0.03 X 45" (3) 34~4
Multiple offsets ~
34·5 f!){RfDDIP.
for shoulders - 03402
Multiple offsets
F!ltJ'J,mnlll
•
• Shoulder Tolerances
Shoulder Tolerances shown in Figure 34-5 illustrates tolerances specified on both
drawing shown in Figure 34-4 illustrates part with variable tolerances specified only on shoulders. programming solution is to include
is to include four offsets for 13, T0314, T0315 and T0316. In amounts have to be set before machining amounts middle tolerance are shown:
(WO
finishing. for example T0313 and T0314. In the control, their amounts have to be set before machining - the amounts for middle tolerance are shown:
13 14
XO.OOOO XO.OOOO
Z+O.0030 Z-O.0030
Note that in this case, the X offset (which controls the diameters) mUSl be the same for both offsets.
13 14 15 16
Z+0.0030 Z+O.0030 Z-O.0030 Z-O.0030
but their input amount is also critical.
03402
N3l MOl
X-O.0030 X+O.OO30 X+O.0030 X-O.0030
is the most intensive version. Not only Lt IS eximportant where exactly [he offsets appear in
T03 for progra~03402:
(T03 - FINISH TURN) N19 GSO S3500 T0300 ( - - OFFSET 00 AT THE START OF TOOL N20 G96 5750 M03 N21 GOO G42 Xl.7 ZO.l TOl13 MOS ( - OFFSET 13 FOR THE O. 4 SHOULDER N22 XO.365 N23 G01 XO.625 Z-O.03 FO.002 N24 Z-0.4 N25 Xl.0 C-O.03 (K-0.03) N26 Z-O.7S T0314 {- - OFFSET 14 FOR THE 0.75 SHOULDER N27 Xl.375 C-O.03 (K-0.03) N28 Z-l. 255 N29 UO.2 N30 GOO G40 XS.O ZS.O T0300 ( - - OFFSET 00 AT THE END OF TOOL
for diameters and shoulders - 03403
Note thalthe four X offsets (which control size meters) lie up wilh the four Z offsets (which control icngth of shoulders). Here is the T03 for program 03403 (TO) - FINISH TURN) NQ9 Gsa S3500 T0300 (-- OFFSET 00 AT THE START OF TOOL ----------) N20 G96 S750 M03 N21 GOO G42 Xl.7 ZO.l T0313 M08 (- - OFFSET 13 FRCM Z OVER TO Z UNDER ONLY - - -) N22 XO. 365
N23 Gal XO.62S Z-0.03 FO.002 N24 Z-0.4 N25 X1.0 C-O.03 (K-O.03) T0314 ------)
(- - OFFSET 14 FROM X UNDER TO X OVER ONLY - - - )
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 (- - OFFSET 16 FROM X OVER TO X UNDER ONLY - - -)
.
FUNCTIONS FOR GEAR RAN
N28 Z-l. 255
are designed to work in feature enables prorCCluired spindle with speof the machine. As a for spindle speed, raling will be, and vice versa. and power ralings by the machine manufacturer,
N29 00.2
N30 GOO G40 XS.O ZS.O T0300 (-- OFFSET 00 AT THE END OF TOOL ------------)
N31 MOl
J
offsets must always remain
programnre cril can be seen in and 03402, one
same (X or Z off-
instance, in the program 03401, 03 and control diameters. That means the Z value must be same always.! Thai also means, if is a need to shift the shoulders .002 to the len, all must be by the same amount: J3
X-O.0030 X+O.0030
~3
14
Z-O.0020 Z-O.0020
Depending on gear ranges may signed with ultra grammable faull gear is four gear ranges speed is usually erage is two
one, two, three, or Small lathes, or those de-
speeds, may have no which means only a delarge lathes may have all available spindle The most common av-
Miscellaneous functions M41. M42. M43 and live (0 the number of
to do that will result in inaccurate
NG
ranges, are typically assume the definition relaavailable:
Number of available ranges
Range screen selected by pressing a on will initially display the 1001 geometry and They are identical. except the tille at screen. A rypical display will (no offsets set):
2
low
3
4
M41
Medium low
OFFSET (GEoMETRY)
NO.
ZAXIS
M43
RADIUS M42
0.0000
0.0000 0.0000
X
0.0000
0
o Radius
is shown as either lhe firsl paIr of the T offset, or the second pair ~ and Z axis are (he columns where are for each number, lhe are only used if a tool nose radius case, Ihe Radius will be the lool will an arbitrary number, as detool tip orientation. This C'"rlhp·r! in Chapter 30.
M43
M44
a certain gear range is ':>'-'''~'-l~.U speed If the exact of IS Imporlanl, 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 don'l be surprised to find that len quite for spindle speeds in lWO if the J hasarange20to 1400 a range of 750 LO 2500 r/min. When available in either range, such as 1000 of is not critical, but low is limited.
is an actual, although unrelated, Low gear range: High range:
20 . 1075 r/min (M41) 70 - 3600 r/min (M42)
TURNING AND BORING
299
AUTOMATIC CORNER BREAK
03404 (MANUALLY CALCOLATED CORNER BREAK USED)
NSl TOlOO NS2 G96 5450 M03
turning and boring)
N53 GOO 042 XO.3 ZO.l T010l MOS
cut a shoulder to a diameter shoulde;r) requires (\ comer break. is a cornman practice when Many comers are to be It is up to the .... ,.",,......,.....,,...., the range of 0.005 to required corner angle, or a blend radius of the comer break is "'1J",,",a,,-,'" must apply it. Comer
NS4 N55 N56 NS7 NS8 NS9 N60 N6l N62 N63 N64 N65 N65 N67 N68 N69
o Functionality ... for strength, ease of assembly, and clearances o
Safety
Gal XO.62S Z-O.0625 FO.OOl Z-O.4 G02 XO.825 Z-O.5 RO.l Gal .:u.125 Xl.2S Z-O.S62S Z-O.9 G02 Xl.45 Z-l.O RO.l Gal .:u.675 GO) .:u.S7S Z-l.l RO.l GOl Z-1.437S X2.C Z-1.S X2.37S Xl.55 Z-l.5875 ua.2 GOO G40 XlO.O Z5.0 TOlOO Mal
... sharp corners are dangerous
o
Only the fmished contour is
Appearance ... the finished part looks
In lathe work. many comer apply to cuts ",pr""" ••" a shoulder and the (the cut takes a 90° tum in one axis at a time). start and end points calculation is not difficult but can consuming for some jobs, such as shaft with many different diameters.
(no facing cut), 1, with the calculated at a selected clearance point has to be diame:ter at XO.3. Each contour calculated. At the contour the last chamfer been completed at a clearance of 0.025 above the largat X2.55, Z at Z-1.5875. est in manual work, For of programming is it is easy to forget to for bOling). The
02.5
N56 G02 XO.725
Z~0.5
of errors can
RO.1
(ERROR Dr X)
of the correct block NS6 G02 XO.82S Z-O.5 RO.1
(X IS CORRECT)
the program in corner break?
to
o N
RO.1
ALLC Figure 34·6 Example lor an
o
Chamfering method
... for a 45° chamfer
o
Blend radius
... for a 90°
corner break (chamfers and
34-6 shows a simple comers that will benefit programming feature matic comer the drawing qualify).
Compare two methods, to better ferences applied in programming. If the not use the automatic comer break feature, change poi.nt must he calculated manually 03404: will be
in a very similar manner in both cases.
"''''''0..,'' ..'''
•
Chamfering
45 Degrees
Y"'"''''<''''''HV comer chamfering will
two special vectors I ...., ..""",,"" or a C vector on some ,I."""YV.,,,.
For the specify the chamfer:
.t",,,,,,,t1t' chamfer generation,
and the amount
300
Chapter 34
The I vector is used to create a chamfer starting from the X axis, into the X+Z-, X-Z-. X+Z+, or X-Z+ direction
c+
cC+
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-
i+
c+
c1+
Figure 34·8
X+
Vectors C for automatic corner chamfering
Z+
In either case, the sign of I or K vector defines the direction of the chamfer cUlling within the coordinate system: X-
o
i-
1&- -
K-
Positive value of I or K vector indicates the chamfering direction into the plus direction of the axis not specified in the chamfering block
-
o
K+
Negative value of! or K vector indicates the chamfering direction into the minus direction of the axis not specified in the chamfering block
Figure 34-7
The va 1ues of I and K com rna nds are aJ ways sin gle va! ues (i.e., radius values, not diameter values).
Vectors J and K lor automatic corner chamfering
When the control system encounters a block containing the chamfering veclor J or K, it will automatically shortell {he active programmed tool path length by the value of the I or K vector, as specifIed iryfhe program. If not sure whether the I or the K veclor shoJld be programmed for aulomatic chamfering, consult the above illustration, or apply the following rules: The vector I indicates the chamfering amount alld motion direction when the 1001 motion is in the order of Diameter-Cham{"er-Shoulder, which means cUllin!! '.1' '-' alonCJ the Z axis before the chamfer. The chamfer deviation can only be from lhe Z axis lowards [he X axis, with the I veclor programmed:
Many lalest controls use vectors C+ and C- that replace [he 1+. 1-, K+ and K- vectors - Figure 34-8. This is a much simpJer programming method and its applications are the same as for the blend radius R. described shortly. There is no distinction bel ween axes vector selection, just the specified direction: o
The C vector is used ... to create a chamfer starting from the X axis, into the X+Z-, X-Z-, X+Z+, or X-Z+ direction
(;>
GOI Z-1.7S IO.125 (CUTTING ALONG Z AXIS) (CONTINUING IN X AXIS AFTER 0iAMFER)
X4.0
The vector K indicates the chamfering amounl WId molion direction when the lool molion is in the order of Shoul-
which means cutting along the X axis before the chamfer. The chamfer deviation can only be from the X axis towards the Z axis, when the K vector is
dPr-Clum1jN-f)imnf'It'l;
programmed: GO 1 X2. 0 K- 0 . 125 (CUITING ALONG X AXIS) Z-3.0 (CON'I'INUING IN Z AXIS AFTER CHAMFER)
- or-
... to create a chamfer starting from the Z axis, lnto the Z-X +. Z-X-, Z+ X+, or Z+ X- direction If the unit control allows the C+ or C- veclors, the programming is much easier, as long as the motion direction is watched. The two previous examples will be: GOI Z-1.7S CO.125 X4.0
GOI X2.0 C-O.125 Z-3.0
(CUTTING ALONG Z AXIS)
(CONTINUING IN X AXIS AFTER CHAMFER)
(CONTINUING
(CUTTING ALONG X AXIS)
rn z
AXIS AFl'ER CHAMFER)
As was the case with the I and K vectors, the C vector is also spccified as a single value per side, not per diameter.
TURNING AND
•
NG
Blend
301
90 Degrees
A
a shoulder and 10
cham
(or
a similar way as the automalic 45° exclusively ill the GOl Inode.'
Only one special vector R is used. For automatic blend ra-
dius, the vector the radius:
the direction and rhe amount
CUI for
o
The R vector is used
The radius deviation can also be from the Z axis the X axis, when the R vector is programmed: GOl Z-1.75 RO.125 X4.0
(CUTTING ALONG Z AXIS)
(CONTINUING IN X AXIS AFTER RADIUS)
In either ease, the lion of the radius
R vector defines lhe direethe coordinate
o Positive value of R vector indicates the radius direction into the plus direction of the axis not specified in the radius block
starting ffom the X or X-Z + direction
o
- or... 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.
R"
....
'"
.
Negative value of R vector indicates the radius direction into the minus direction of the axis not specified in the radius block
corners modern CNC lathes a
R+
for contains vectors lor for blend radius corner.
R+ X+
.
z-
xR-
\
o
Chamfer or radius must be fully contained in a single quadrant - 90° only
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
o
The values of chamfering vectors I and K or e, as well as the radius vector R, are single values ",",,::onlrll'lper side values, not values
R-
R-
o Direction of cut before the corner rounding must be to the direction of the cut after rounding. one axis only
34-9 Vector R lor automatic comer rounding control system encounters
o
The direction of the cut following the chamfer or radius must along a single axis only, and must have the equivalent to at least the chamfer length or the radius amount the cutting direction cannot reverse
o
Both takes
o
eNe program, only the known the drawing . the sharp point - is That is the point between the shoulder and the without the or radius being considered
block containing
a blend radius vector R, it will automatically shorten the actool path length by value of the R vector, as speci tied in Ihe program. If noc sure whether the R vector should be programmed for blend radius, consult the above illustration or apply the following rule:
The vector R indicates the radius amount when the CUlling is in which means
X axis
same vector is when the /'Qmotion direction is in the opposite order which means cutting along
These rules appJy equally \0 turning and lathe Study them carefully Lo avoid
• deviation can be from the X The axis, when the R vector is programmed:
lheZ
GOI X2.0 R-O.12S Z-3.0
(CONTINUING IN Z AXIS AFTER """'''''''',);;>J
Programming Example
The
03405 combines the use radius vector, mio a complete p.xampIe. The same is used for this version, as traditional method, illustrated earlier in Figure 34-6.
302
Chapter 34
In order to fully appreciate the differences between (he two programming melhods (both are technically correct), compare Ihe followIng program O}405 wiUl the earlier program 03404. The I and K vecrors are used for chamfering, as they are more dinicu!lthen the C vectors: 03405 (AUTOMATIC CORNER BREAKS USED) NSI N52 N53 NS4 N55 NS6 N57 N58 N59 N6D N6l N62 N63 N64
TOIOO G96 5450 M03 GOO G42 XO.3 ZO.l TOlOl MaS Gal XO.625 Z-0.0625 FO.OO3 Z-O.5 RO.l X1.25 K-O.062S Z-l.O RO.l X1.875 R-O.l Z-1.5 IO.0625 X2.375 X2.55 Z-l.5875 UO.2 GOO G40 XIO.O Z5.0 TOlOO MOl
Although the program is a little shorter, the five blocks 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 allows ror very fast and easy changes during machining. if necessary. If a chamrer or u blend radius is changed in the draWing, only a single value has 10 be changed in the program. withoul any rcci.llculations. Of course, the rules and condilions mentioned earlier must be always observed. The main benefit of the auromalic contouring are the ease of changes and the absence of manual calculations.
ROUGH AND FINISHED SHAPE The vast miljorily of material removal on CNC lathe is done by using various cycles, described in detail in the next chapler. These cycles require inpul of data that is based on machining knowledge, such as a depth of cuI. stock allowance, speeds and feeds. etc. Rough and finished shapes often require manual calculatiOllS, using algebra and trigunuHlelry. Tllese calculalions should be done on separale sheels of paper, rather than in lhe drawing iLSd!'. ThaI wuy, the work is better organized. Also, if there is a change later, for example, an engineering design change, it is easier to keep lrack of what is where.
•
Rough Operations
A great part of Imlle machining amounts LO removal of excessive slock \0 create a part, almost completed. This kind of machining is generally known as roughing, rough turning, or rough boring. As a machining operation, rough-
ing does nol produce a high precision parl, that is not the purpose or roughing. Its main purpose is to remove unwanted slOck efficiently, which means fast and wilh maximum tool life, and leave suitable all-around stock for finishing. CUlling tools used for roughing are strong, usually with a relatively large nose radius. 'I'hese tools have to be able to sustain heavy depths of cut and high cutting feeds. Common diamond shaped tools suitable for roughing are 80° inserts (up \0 2+2 CUlling corners), and trigon inserts (up 10 3+3 cutting corners). 2+2 or 3+3 means on 2 or 3 CUtllllg edges 011 each Side of the Insert. Not all inserts can be used from both sides. Figure 34-10 shows some typical lools and orientation for rough turning and boring. Light cut only I
•
, 0 •+
.Li9ht cut only I I
n·h
• U---.U----
'-
+
•
•
•0-·-· •v··----· ··8 r-
',/
,
n '---/
.
+light cut only +light cut only
~
I
l)
I
i
I
Figure 34-10 Tool orientalion and cutting direction for roughing. Upper row shows external tools, lower row shows internal tools.
Allhough a number of tools can be programmed in several directions, some directions are not recommended at al!, or only for light or medium light cuts. In practice, always follow one basic rule of machining this rule IS valid for all types of machines: Always do heavy operations before light operations
This basic rule means that all roughing should be done before the first finishing CUt is programmed. The reason here is to prevent a possible shift of the material during roughing, after some finishing had already been done, For example, the requirement is to rough and finish both external and internal diameters. If the above rule is applied to these operalions, the roughing out the outside of the part will be first, {hen roughing out the inside of the parl, and only then applying the finishing cuts. It really does nOI malter whelher the roughing is done first externally or internally. as long flS il gets done b~fore any finish cuts, which also cLln be in either order.
TURNING AND
303 of cut IS suftlskin' of the mRis usually a must before tool ac-
•
Operations
Finish operations take cutting mOlions, removed (roughed OUL). after mosl of the stock stock for finishing. leaving only a small amount of nose radius and. for even The cutting 1001 can spindle and lower cuta better surface finish, ling feeds are lypical.
I
. . Light cut only
/ Medium cut
•
Light I Medium cut
Light cut only
As before, there is a general rule of axis, thai is forculting to or slightly larger than radius of the jog 1001. For example. if a .O~ I inch (001 nose mm) is used for finishing, leave to (about I mm). That is the physical amount assigned per side, not on diameter! IIlg
.~ • •
. .~~ .'
specifics the amount of material left for these operalions. If 100 much material or too I ittle is len to be cut during finishing, the part finish quality will suffer. Also, carefully allowance overall on the part. but individual ances for (he X and Z axes.
The amount of stock left on the Z axis (typically shoulders at 90°) IS much more cnhea!. If the positive X axis only turning}, or the (for boring), with a lool that has a lead angle of to not more (han .003 (0.006 inch (0.080 to 0.150 mm) on any straight shoulder. Figure 34-/2 shows the of too much stock allowance for certain cutting direcand a method to eliminale it
Many different tools can be as well, bUI the most tYPIcal mond shaped inserts, wilh a Their shape, common orientation and shown in Figure JJ. . , Light cut only
.
-- W
•
l+- = Direction of cut. -_.,
a
R \
•
f - - - Z POS
x POS
Light cui only
Figure 34-11
34·12 Effect of stock allowance Won depth of cut D
Tool orientation and cutting direction for finishing with common lathe tools. Upper row shows external tools, lower row shows internal tools.
Z
In
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 tool removes the stock to cut a desired shape, it can a certain amount of it at a time. The insert the and
In
~
In-
on the alimportant allowance
where
D A R W X POS ZPOS
::::; Actual depth of cut at == lead angle of the insert Radius of the insert == Stock left on for finishing TBrget position for the X axis Target position for the Z
304
Chapter 34
The illustration applies equally Lo (he boring, when the X axis direclion is opposite the one shown. To understand better the consequences of a heavy sLock left on the face, evaluate ibis example:
o
Example:
The amount of slack left on face is .030, the too! radius is .03 t and the tool lead angle is 3°: W = .030,
R = .031,
A
=
In CNC lathe programming, a recess can be machined very successfully wilh any 1001 (hal is used wilh Ihe proper depth of cut, and a suitable back angle clearance. It is lhe second requirement [hat will be looked at next. Figure 34-13 shows a simple drawi ng of a roller 1n the middle of the obiect, there is an undercut (recess) between
the 01.029 and the 0.939. The objective is to calculate, not to guess, what is the maximum back angle tool that can be used for CUlling the recess in a single operation.
.,
3
There is enough data available Lo calculate the unknown depth D, using llle above formula: D = tan3/2 x .031 + .030 / tan3 D = .60425
R9/16 (2)
'j -
+ .031
For an insert wilh a 0.500 inch inscribed circle (such as DNMG-432, for example), the actual depth of CUI at the face will be .60425 - more rhan any reasonable amounti
ThaL is a more reasonable depth of cut at the face, so the Z axis slock allowance of .006 can be used. For facing in Ihe opposite X direction or for not unidirectional faces, leave stock much bigger, usually close to the tool radius.
PROGRAMMING A RECESS Another very important aspect of programming for CNC lathes is tnc change of cult i ng di rection. Normally, program a tool motion in such a way Ihal Ihe mOlion direction from the starling point will be:
o Positive X direction for external machining ... and / or ... Negative Z direction for external machining
o
A recess is commonly designed by the engineers to relieve . or undercut - a certain portion of the part, for example, to allow a matching parlto tit against a shoulder, face, or surface of the machined part.
00.939
___--i---=.<~!«<
-
-.1_
1.25 ROLLER
Figure 34·13
Back angle clearance calculation example
TIle first step is to consider the drawing - that is always the given and unchangeable source of data. The difference between the diamelers and the recess radius will be required. Figure 34-14 illustrates the generic details of the provided data (except the angle b) from the drawing. Drawing detail
<
~ \ R
\
a = Tool back angle R = Spedified radius b = Clearance angle req'd D Depth of recess
=
\
\
Negative X direction for internal machining ... and / or ... Negative Z direction for internal machining
There arc also back ruming or hack boring operations used in CNC programming, but these are just related and Jess common variations of the common machining. In the most common machining on CNC lathes, any change of direction in a single axis imo the material constitutes an undercut, a cavity. or more commonly known - a recess.
--r
I I
tan3/2 x .031 + .006/tanJ + .031 .14630
D
------:---=-- -
01.029
Since the earlier suggestion was no more (han .006, recalculate lhe example for the largest depth, if the W=.006: D
-./
r I
D-'
Tool detail
Figure 34-14 Data required to calculate angle 'b'
The formula required to calculate the angle b uses simple lrigonomclric formula. First, calculate the depth of thc recess D, which is nothing more that one half of the difference between the two given diameters:
D =
LARGE DIA - SMALL DIA 2
TURNING AND BORING
305
Once the recess depth D is known, the formula to calculate the angle b is:
For the example, the calculation will be:
b == cos -I
(
.5625 - .045 ) .5625
=:
23.07392
For actual machining, select a tool with the back angle a greater than the calculated angle b. For the illustrated drawing (23.07° required c!carance), the selected tool could be either a 55° diamond shape (back angle clearance Q is 30° to 32"), or a 35" diamond shape (back angle clearance a IS 50" (0 52") - both are greater than the calculated minimum clearance. The actual angles depend on the Lool manufacturer, so a tooling catalogue is a good source of data. This type of calculation is important for any recesses, undercuts and special clearances, whether programmed with the aid of cycles or developed block by block. The example only illustrates one possibility, but can be used for any calculations where the back angle clearance is required.
SPINDLE SPEED IN CSS MODE From several earlier topics, remember thatlhe abbreviation CSS stands for Constanl SllIjace Speed. This CNC lathe feature will constantly keep recalculating the actual spindle speed in revolutions per minute (r/min), based on the programmed input of surface speed: The su:face speed is programmed infeer per minute - ftiman (English system) or in meters per minute - mfmin (metric system). In the program, the 'per minure' input uses Ihe preparatory command G96, as opposed [0 the direct rlmin input using tlie cOlllrnand G97. The Constant Surface Speed is a powerful feature of the conlrol system and without it, we would lo?k back many years. There is a rather small problem assocIated wlth tJus feature, orten neglected altogether, or at least not considered important enough. This rather 'small problem' wIll be illustrated in a simple program example. The program example covers only a few blocks at (he b~ ginning. when the cutting tool approaches the part. 1l1at 15 cnough data to consider the question that follows. 03406
N1 G20 T0100 N2 G96 8450 M03
N3 GOO G41 XO.7 ZO T0101 MOB N4 ...
The queslion is this: What is the actual spindle speed (In r/min), when the block N2 is executed? Of course, (he spindle 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 will be calculated for the current diameter, as stored in the control, specified in the geometry offset enlry. For the example, consider (hat the current diameter is 23.5 or X23.5. From the standard r/min formula, the spindle speed calculated 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 rather close La the part, at diameter of .700 (XO.7). From the same stand
Nl N2 N3 N4 N5
G20 G97 GOO G96
TOlOO 52455 M03 G41 XO.7 ZO TOlD1 MOS
(R/MIN PRESET)
5450 M03
What had been done requires more evaluation. What had been done is thai the spindle was started at the final expected r/mil1, before the tool reaches [he part, in blo~k N2. In block NJ, the tool moves to the start of CUl, while the spindle is already at the peak of Ihe ~rogrammed speed. Once the target position along the X aXIs has been reached (block N3), the corresponding CSS mode can be In effect for all subsequent cuts. This is an example that does not necessarily reflect everyday programming of CNC lathes. In this situation, some additional calculations have LO be done, but if they solve the problem - they are worth the extra effort! Some CADICAM system can be set to do exactly that automatically. If [he current X position of the tool is unknown, estimate it.
306
Chapter 34
• Approach to the Part
LATHE PROGRAM FORMAT In a review of the already presented examples, a certain consistency can be seen in the program output. This may be called a style, a format, a form, a template, as well as several other terms. Each programmer develops his or her own style over a period of timc. A consistent style is important for efficient program development, program changes and program interpretation.
• Program format - Templates Most examples have followed a cenain program formal. Note that each CNC lathe program begins with the 020 or 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 job to another - il follows a certain consistent pattern which forms the basic femplate for writing the program.
An important part of any lathe program structure is the method of approaching a revolving part. If the part is concenlric, the approach can be similar lo the A option in Figure 34-15. Although a facing cut is illustrated, the approach would be logically the same for a turning or a boring cuL Keep the slarting point SP well above the diameter, at least .100 per side and more, if the actual diameter is not known 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 motion can be further split into a rapid and cutting motion, if required. Finally, the C option uses the clearance in the Z axis, far from the front face. Again, the tinal motion toward the face can be split into a rapid and linear motion.
~-
SP - - - - -
• General Program format To view the format often enough will forge a mental im-
A
age in the programmer's mind. The detajls thaI are not understood yet will become much clearer after acquiring the general underst.anding of Ihe relationships and details used in various programming methods. Here is a suggested template for a CNC lathe program.
0.. ill
(PROGRAM NAME) G20 G40 G99
N2 T .. 00 M4 ..
N3 G97 S .. M03 N4 GOO [G41/G42) NS G96 S ..
x ..
(PROGRAM START up) (TOOL AND GEAR RANGE) (STABILIZE R/MIN) Z .. T.. M08
(APPROACH)
(ClJ'I'"£ING SPEED)
N6 GOl [X .. /Z .. ] F ..
(FIRST CUTTING MOTION)
c
N7 (MACHINING)
N.. GOO (G40] X ..
z ..
Q
r.~ ~-__________w lJt;-] _------w QEd--I
B
Q General Program Pattern - Lathe:
--
~
SP :: Start point for cutting
Figure 34-15
Safe approach to a parr - example for a facing cut shown
N .• MOL
T .. OO(TOOL CHG POSITION) (OPTIONAL STOP)
N .. M30
(PROGRAM END)
%
There are many variations on these methods, lOO numerous to list. The main objective of considering the approach 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. Feel free to adjust it as necessary. For example, not every job requires spindle speed stabilization, so block N3 will not be necessary. It also means that M03 rotation has to be moved to block N5. Take the general program pattern as an example only, not as a fixed forma\.
Turning and boring is a large subject. Many other examples could have been included in this chapter. Other chapters in this book also cover turning and boring, but in a marc specialized way, for example, turning and boring cycles. The examples that were presented in this chapter should be useful (0 any CNC lathe programming.
LATHE CYCLES •
Complex Cycles
STOCK REMOVAL ON LATHES One of tbe most time gramming for a CNC lathe is siock, lypicaJJy from a rough turning or rough
as
1b manually program a ries of coordinated rough u""",~"'''. gram for each tool motion. tour, such a method is inefficient, as well as prone to errors. try Lo sacrifice programming an uneven sLock for finishing, wear out prematurely. ished profile often suffers as It is in the area of rough lathe controls are very useful CNC lathe systems have a lhar tool path to be processed automatically, des. Roughing is not the application for there are also special cycles available simple grooving. The grooving and outside of this chapter, but will be covered in next three chapters.
•
Simple Cycles
Fanuc and similar controls suppOrt a number of special lathe cycles. There are three rather simple cycles that have been part of Fanuc controls for quite a while. They first appeared 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 machining 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.
Don'l gel misled by the cles are only complex in the then, only internally. TIley are system only. In fact, these very are much easier to program than In addition, they can also be control, to optimize them on the job.
PRINCIPLES OF LATHE CYCLES Similar to drilling operations for CNC machining cenall cycles for lathes are based on the same technologIcal principles. The programmer only enters the data (typically variable CUlling parameters), and the CNC system will calculate the details of individual cuts. These are based on the combinalion of the fixed and variable data. Return LOol motions in aillhese cycles are automatic, and only (he values to be changed are specified within call are designed exclusively to cui a straight tapers or radii and also wlth no unsimple cycles can only be used to cut verlihorizontally, or at an angle, for taper cutting, These original cannot do the same cutting operations as the and multiple repetitive cycles - for they cannot out a radius or change directhey cannot contour,
307
308
Chapter 35
G90 - STRAIGHT CUTTING CYCLE 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;
The second format adds the parameter I or R to the block and is designed for taper cutting motions, with the dominance of the Z axis - Figure 35-2.
:-
G90 is absolute mode for milling, X and Z axes are absolute mode for turning
-w
'I-
G91 is incremental mode fOT milling, 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 specified by the X and the Z axes. The resulting cut is a straight turning or boring cut. nornUllly parallel to the spindle centerline and the Z axis is the main cUlling axis. As the name of the cycle suggests, the G90 cycle is used primarily for removing a stock in a rectangular fashion (box shape). The G90 cycle can also be used for a taper cutting. In Figure 35-1, the cycle structure and motions are illustrated.
,. . ,
I
--z-
Figure 35-2 G90 cvcle structure -taper cutring application
o
Format 2 (two versions): G90 X(U) .. Z(W) .. 1.. F.. G90 X(U) .. Z(W) .. R.. F..
,.. ------w --------..-; (4)
~
L
x
UJ2
- -v
r
I (R)
""
X
F
::::
I
• Cycle format The G90 cutting cycle has two predetermined programming formats. The ~irst one is for straight cUlling only, along the Z axis, as ill ustrated in Figure 35- J.
~
Format 1 :
where ...
x = Z F
=::
== Diameterto be cut
Z
Figure 35-1 690 simple cycle structure - straight cutting application
o
where ...
End of cut in Z position Distance and the direction oftaper (1=0 or R=O for straight cutting} 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 posicion from program zero. The designation of axes as U and W is used for the incremental programming. indicating actual travel distance of the tool from the current position. The F address is (he cutting feedrate, normally in incites per revolution or millimeters per revolution. The I address is llsed for taper cutting along the horiwmal direction. It has an amount equivalent to one half of the distance from the diameter at the taper end, to the diameter at the taper beginning. The R address replaces the I address, and is available on newer comrols only. To cancel the G90 cycle, all that is necessary to do is to usc any motion command - GOO, GO l. G02 or G03. Commonly, it will be the GOO rapid motion command: G90 X(U) .• Z(W) .. I .. F ..
Diameter to be cut End of cut in Z position Cutting feed rate (usually inJrev or mm/rev)
GOO
LATHE CYCLES
309
• Straight Turning Example To
a 35-3. It
from a 04. J the length of i and no radii. This the G90 cycle 10 a the manual al[ernalive.
application of G90 rather a simple diameter down to a 'final 02.22 inch, over There arc no chamfers, no the practical simple roughing only, but still
-1 r 04.125
rXrl'III1JIt'
• programs 03501 &03502
of G90 cVcle in
the depth of each cui has Since G90 is a roughing amount left for finishing, first, then the find out how much decide on the depth of ,'p'nnr".!pn from the diameter. slock is aclua[ly there to amount of Siock is "' .... ,..." ........ per side, as a ravalue, along the X
NlO X2. 28 (PASS 6) Nll GOO X10.O Z2.0 T0100 M09 Nl2 MOl (END OF ROUGHING)
If prefen'ed, use incremental programming rnp,nr,n However, it is Lo trace the program progress with the absolute coordinates ever, here is the 03502 (G90 STRAIGHT TtJRNING CYCLE - INCREMENTAL) Nl G20 N2 T0100 M41 N3 G96 S450 M03 (START POINT) N4 GOO X4.32S ZO.l T010l MaS N5 G90 U-0.507S W-2.655 FO.Ol (PASS 2) N6 U-0.307S (PASS 3) N'7 U-0.3075 NB U-O.307S (PASS N9 U-0.3075 (PASS 5) (pASS 6) NlO U-0.3075 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 would be more than longer.
• Taper Cutting Example
to
(4.125 - 2.22) / 2
to that used for the Will be cui, also
35-4 is a example. In this the G90 simple
= .9525
r
a Slack per side finishing cuI, the .030 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 ;'''''l\,A.\~,U and .030 left per or on the diilmeter the first diameter will be X3.8175. .005 stock allowance will left on the face, so the Z end cut will be actual and in part will be the 03501 (G90 STRAIGHT TUlmDJ'G CYCLE - ABSOLUTE) Nl G20 N2 T0100 M4l N3 G96 S450 M03 (START POINT) N4 GOO X4.32S ZO.l T010l MOB (PASS 1) N5 G90 X3 B175 Z-2.555 FO.Ol (PASS 2) N6 X3.51 (PASS 3) N'7 X3. 2025 (PASS 4) N8 X2.895 (PASS 5) N9 X2.5875
02.25
I
t
Figure 35-4 l::xa·mO,le of
In the musl
to
cycle in taper cutting - program 03503
between the
cUlting methods, using the same a to distinguish these two
there is one
cuning and cycle, there of CUL, and
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 because of its association with the X axis. For straight cutting, the I value will always be zero and does not have to be written 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
~
RST MOTION DIRECTION
I
Figure 35-5 The I amount used for G90 turning cycle - extemal and internat
a
If the direction of the first tool motion in X is negative, the I value is negative
If the direction of the first tool motion in X is positive, 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 for external taper cutting (turning) and positive for internal taper cutting (boring). To program the part in Figure 35-4. keep in mind that the illustration represents the fmished item and does not contain any clearances. Always add all necessary clearances flIst, then calculate the I amOlillt. In the example, a clearance of 0.100 will be added at each 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 the same time. Either the method of similar triangles or the trigonometric method can be used for such calculation (see Chapter 52 for details on shop mathematics). Figure 35-6 and Figure 35-7 illustrate the details of the known and unknown values for the I amount calculation.
2.7-
-~-·····~··r
0.875
-I
1
~l
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.
o
'I
aoRK£t\jAL
+
There are two simple rules for G90 taper cutting:
. ····-2.5
T i
0.875
I
1 . . . . . . . . . .;. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .:~
Figure 35-7 The I distance calculation using the similar triangles method
The example shown above almost suggests the simplest method of calculation, a method that is known in mathematics as the law ofsimilar triangles. This law has several possible deflnitions, and the one that applies here is that ... Two triangles are similar, if the corresponding sides
of the two triangles are proportional.
In programming, quite often there is a situation that can be solved by more than one method. Choose the one that suits better a certain programming styJe, then try the other method, expecting the same result. Both methods will be used here, to conflrm the accuracy of the calculation.
311
LATHE CYCLES
=
Method
Using Similar
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~, ... , .., I
I 2.7 =
i
will be
101.75
/ 2.5
We know i to be 0.875, so the relations can by filling in the known ammmt:
= 0.875 / 2.5 I :::: (0.875 x 2.7) / 2.5 I :::: 0.945 ... is Jhe required alYlQunl!or programming I / 2.7
=
""m~~_
Figure 35-8 Example of G90 cycle used on 8 taper to a shoufder - 03504
Using Trigonometric Method
The second method of I amount requires trigonometry. At this point, it is known I
::::
Using the pered cut a can be used in this case as
a tathe machining shoulder. A single G90 but could result in some ex(too much or too little stock). aOltlroach is to use two modes of the cycle - one ","",,,IT''''' tapered roughing.
2.7 x tan a
and the tangent value has to
Similar to the "'''''''''''' be calculated, fore. TIle height i 2.5 is calculated as one 02.750 and the 01
tan a ::::: i / 2.5 tan a :::: 0.875 / 2.5 tan a ::::: 0.350
amount of I can be calculated I
I
2.7 x 0.35 0 . 945 ... is the required amowllfor programming
both cases) the calculations have the same .LlllJ.Jll"'E accw:acy ofthe process. I amount \"'d.LI~Ul<:IUUI Figure 35-6 and detailed in Figure is the fmal result - five cuts with 0.03 ",-:"l'{." 03503 TAPER 'I't.JRNrnG EXAMPLE 1 -
w/0. 03
X-STOCK)
Nl G20 N2 T0100 M41 N3 G96 S450 M03 N4 GOO X4.2 ZO.l T010l M08 N5 G90 X3 752 Z-2.6 I-0.945 FO.Ol N6 X3.374
(1)
(4) (5)
(CLEAR PeS ) NlO GOO XlO.0 Z2.0 T0100 MD9 (END OF ROUGHING) Nll MOl
• Straight and Taper Cutting Example v",,'''~t'''\M
of a taper is also common in 35-8 shows another and a shoulder.
i
i
= 2.75
= 0.500
~n'.... u."x"'.
the I taper amount has to of similar triangles as triangle over the length of difference between the
- 1.75 / 2
For the extended 0.005 stock amount is at the shoulder for DnlS.O:lDg and is extended by 0.100 at the front of 2.595: 2.5 - 0.005 + 0.100
nal
= 2.595
I amount can now be calculated, based on the origithe extended values:
= 0.500 / 2.5 (0.500 x 2.595) / 2.5 0.519 ... negaiive direclion
I / 2.595
(3)
N"J X2 996 N8 X2.618 N9 X2.24
3.50 ------.-;
I I
:= :=
For roughing, a 0.030 X which is 0.060 on dlalIDt:~ter
side along the
to select a In roughing operations, it is as the cutsuitable depth of cut, with safety selection conditions. In this example, will benefit from one simple ·ogJ:amm.ulg teclmique. If of cut is selected last depth will be "'''''A''''V is left to cut. A a calculated n1.lI'!lnl~r of equal cuts - Figure
312
Chapter 35 ----
0
I.() 0')
("") (!)
~
..-,
N
N
N
G94 - FACE CUTTING CYCLE
I.() (!)
i'-
0,
N
--~--~---------------~
..00
NN
0.865---- 0.865 --!-0.865 ,
/START
.•I ~ X4 . 100 . ; -X3.778
X3.456 X3.134 .- X2.812 X2.466 X2.120 X1.774
I
L.
0.173
0.1-73 0.173
C-
Figure 35-9
A cycle that is very similar to 090 is another simple turning cycle, programmed with the G94 command, This cycle is called the face cutting cycle. The purpose of C,g4 cycle is [0 remove excessive stock between the start position of the cutting tool and the coordinates specified by the X and Z axes. The resulting cut is a slTaight turning cut, normally pelpendicular to the spindle center line. In this cycle, it is the X axis that is the main CUlling direction. The 094 cycle is used primarily for facing cuts and can be used for simple vertical taper cutting as well. similar to the 090 cycle. The G94 cycle is logically identical to the G9a cycle, except the emphasis is on the X axis cutting, rather than the Z axis cutting.
Depth of cut calculation for program example 03504
For the ca1cul ation, aillha! is required is to divide the dislance per each side by the number of required cuts. The result wlll be an equal depth of cut for the whole roughing operation. If Ihe cutting depth is LOa smal! or too large, JUSl recalculate it wilh a different number of CUIS. Knowing what is a suitable depth of cut is a machining knowledge, expected from CNC programmers.
As the cycle description suggests, the 094 is normally used to perform a rough face-off of the part, towards the spindle center line or to face-off a shoulder.
• Cycle Format Similar to all cycle, lhe face culting cycle 094 also has a 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 slack allowances are in effect.
G94 X(U) .. Z(W) .. F..
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) N1 G20 N2 TOlOO M41 N3 G96 S450 M03 N4 GOO X4.1 ZO.l TOI01 MOS N5 G90 X).778 Z-2.495 FO.Ol
(START)
(STRAIGHT 1) N6 X3.456 (STRAIGHT 2) 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 Nl2 N13 Nl4
The axes X and Z are used for absolute programming, the axes U and Ware used for incremental programming, and lhe F address is the cutting feed rate. The K parameter. if greater than zero, is used for taper culling along the vertical direction. Figure 35-10 shows all programming parameters and cutting steps, Apply lhe same process as for 090 cycle.
Z-1.63 I-0.346 (TAPERED 2) Z-2.495 1-0.519 (TAPERED 3 - FINAL) GOO XIO.O Z2.0 TOIOO M09 (CLEAR PeS.) 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
G94 - TAPERED
Figure 35·10
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 do's and don'rs. The f ollowi them In detail, except the be covered separately in Chapter
etc, sj
are used for contouring. Tool nose
applied, if applicable to
Mulliple as quire a computer memory in order to NC machines controlled by a punched from them. Tn tape operation, codes sequentially, in a forward control. on the other hand, is more evaluate and process information both directions, forwards can process mathematical of a second, simplifying the
able, identified by a
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 higher level, such as the 1011 IT Or the I cycles. if they are available for the require their programming formal in twO blocks. not the normalone block. Check the parameter conlrol, (0 find about compatibility both formals is also Included in this chapler.
•
o
Cutting Cycles and Part Contour
G71,
and G73
and olle cycle is available for rllli~liing: r"r",l>nih,,'"
nY-F'n",'"''
o
G70
finishing cycle is designed to finish profile by allY one of the three roughing cycles.
Profile cutting cycles - Roughing:
In some respects, Ihere is an interesting situation in promultiple repetitive cycles. So far, the emphasis ,vas 10 program roughing cuts before finishing cuts. 111is approach perfect sense - it is also the only logical from the lechnological point of view. Don't be surprised if Ihis 'rule' is suddenly broken when com pUler
G71
G72 G73
of
which will
Probably the mOSI common multiple in turning and bor~ng are those thai are used for profile cutting or coJJtou/, cultmg. There are three available within the roughing category:
• General Description In total. there are seven multiple
rules and has its
Pauern repealing
lake over. implication here is (hal when the multiple repetilive roughing cycles, contOllr musl always be defil1edfirst, then its elm appllcd to the roughingcyperhaps, Wh~n working with easy to see that it is actually although hardly a re-
Profile cutting cycles· Finishing: Finishing cycle for 071. 072 nnd 07J
Chipbreaking cycles:
G74
Peck drilling cycle
in Z axis - horizontal
G75
Peck grooving cycle
in X axis - verticill
Threading cycle:
The G76 threading cycle is described separately and In sufficient detail in Chapter 38.
•
Chipbreaking Cycles
314
Chapter 35
CYCLES
CONTOUR
(contouring cycles), are lalhe programming. They anrl internal (horing) maleany machinable contour.
•
Boundary Definition
The roughing cycles are boundaries, typically is (he outline of blank,
on the detinition of two
material boundary, which
the boundary, which is (he outline of the pan conlour, is not a new concepl at all, several programming were using this
method, such as the Compact JI, a based system of the I
• Start Point and the Points P and 0. The poinL A in the illustration is fi Ie cuui ng cycle. It can be
Typically, SlarL point will where the rough cuuing begins. It is start point very carefully. it is more point', In fact. this special ances and the actual depth of The generic points Band C in the last come points P and Q in the Point P represents the block number of the first Xl coordinate of the finished contour.
The two defined boundaries create a !h,:\l defines the the material is removed in an
tied machining paramcters in thc Mathematically, the minimum define an area is Lhree. These lhree (meaning not on the same line), pie boundary wiLh only
sisLing
Point Q represents the block number of last Xl coordinate of the finished contour.
Olher in-depth considerations relating to (he P and Q boundary poinrs are equally important, and there are quite a few of (hem:
or many points,
D - -
c
~----------
>~! Part bou~dary ~
Roughing area by three points only
1/ f I
, I
B
material removal defined by the starting point and
D
nose radius offset should not be included between the P and a points, but programmed before the cycle is called, usually during the motion to the start point.
D
For roughing, the material to be machined will be divided into a of cuts. Each roughing cycle ""'I"'nte a number of user ""r'I-'"<''''
o
The tool motion 1)!'![Wflfm
Roughing area defined by more than three points
Figure 35-1 7 Material and part boundaries as applied to turning
A number of points may be defined between the P and a representing the XZ coordinates of the f.n,e,h<:>1i contour. The contour is programmed using GOL G02, and G03 tool motions, including teed rates. the p.Q contour must include all necessary clearances.
_ .- Material
--------:..--.,A/'
Part boundary
[J
rlQ4tu'I':'1"I
B
c
will
must be
steadily ",.,""., .....""" In the profile cutting cycles. each poinl represents a position and the POllltS A, B, and C represent the extreme corners of the selected (defined) machining area, material boundal), is nOt actually defined, it is only impl It is between points A and S, and point~ A and C. Material boundary can not contaill any other points; it must a straight line, but not always a line parallel [Q an is defined between B C, between. For CNC used rather
"''''.\A, ....." P and Q points is allowed is available and programmed, and then . see the next section for
nlr.orT,,'m
Inane D
Blocks coordinate of the contour and the of the contour a, must have a sequence number N, not duplicated :>n\,f\hln,<>r<> else in the program.
<
•
I AND TYPE II CYCLES In the initial versions of the contour cutting cycles, a of the contouring direclion into the Opposile direction one axis was not allowed. That limited these cyto some extent, because common undercuts or recesses were nol possible [0 use in the yellhey were common m shops. Presently, {his older is modern controls use ware features and the lowed. This newer method more programming flexibi cavities (undercuts). Figure and shows a disallowed contour to I external cutting a cycle. The example cycle, but can be modified for any internal cutting.
TYPE I CYCLE ... is roughed out in a single depth
315
«---_._-Programming Type I and Type If system supports boring cycles, it also
II
for some special not replaced one type JI. Of course. the question is the two lypes in the is in the contents follows the cycle call: o
o
.,. only one axis is II
'" two axes are
I: a7l U .. R .. P10 Q •. U •. W•. F •. S •• mo GOO X.. (ONE AXIS FOR TYPE I)
an
Q Example· Type II : G71 U •. R •. P10 Q •• U .• W•• F •• S •• NlO GOO X.. Z.. ('!WO AXES FOR TYPE II)
Gn
TYPE II CYC ... is roughed out in several depths BI-DIRECTIONAL ... contour
is not allowed Figure 35·12 Comparison of Type land . bi·directional change
Type 1 allows a increasing profile (for cutting) or steadily decreasing profile (for' from U1e point P to point Q (typical cutting directions). On older conlrcls, X or Z direction is not allowed. an undercut to be machi with Modern controls Type I, but the will be done with a single That metal removal in which lype Ihe supports. may be 'O..i";';:"U
Type l! allows a continually increasing profile or ally decreasing from the point P to change into the direction is allowed axis only, on active cycle. of an undercut will a multiple 1001 path. Type lor Type 11 is applicable to the cycle, by both axes in the block represented by Ihe P This lypically block immediately following. the cycle call in the I, G72, elc.).
Iflhere is no motion the cycle call and program WO as the "",""'11
Z axis in the first 11 is still required.
fer
• Cycle Formatting On the next few is a description of the six It is important to understand cycles. covered in format of each cycle as it applies 10 a particular Several Fanuc conlrol are available and for of programming multiple repelitive can be into two groups: o
Fanuc
o
Fanuc system
21T 1ST
". tower/eve! level
Practically, il only means a change in the programmed, but the is also important some incompatibility Note that the tool function oflhe examples, although it IS also T is not specified in allowed as a in all multiple repetitive Its only need maybe a tool offset change.
G71 - STOCK REMOVAL IN TURNING The most common roughing cycle is 071. Its to remove horizontal cutting, primarily Z axis, the right to the left. It is roughing oUi OUl of a solid cylinder. cles, it romes in two formats - {\ one-block block formal. on the conlrol
all cy-
316
Chapter 35
• G71 Cycle Format - 10T/11 T/15T RO.125
The one-block format for the G7 J cycle is:
03.0
G71 P.. Q.. 1.. K.. U.. W.. D.. F.. 5 .. ~
02.500 -02.250 ..".....".....,....-.. ,--.. . . . . . 02.000
where ...
p 0
=
I
=:
K
=
U W 0 F
=::
= =
S
<
The first block nu mber of the fin ishi ng profile The last block number ofthe finishing profile Distance and direction of rough semifinishing in the X axis - per side Distance and direction of Tough semifinishing in the Z axis Stock amount for finishing on the Xaxis diameter Stock left for finishing on the Z axis The depth of roughing cut Cutting feed rate (in/rev or mm/rev) overrides feed rates between the P block and the Q block Spindle speed ~ft!min or m/min) overrides spindle speeds between the P block and the Q block
................
o
o
1.0
0 1.0 N
~.....
CHAMFERS 0.05
0 1.0 ,....... 0
"c········
01.250 i-- 00.625 00.875 RO.
0 I.()
1.0 0
x 45° - CORE 09/16
Figure 35-13
The I and K parameters. are not available on alJ machines. They conlrol lhe amount of cuI for semifinishing, the last continuous cut before final roughing motions.
• G71 Cycle format - OT/16T/18T/20T/21 T If thc control requires a double block entry for the G71 cycle, the programming format is:
G71 U.. R.. G71 P.. Q.. U.. W.. F.. 5 .. IB.T'
where ... First block: U R
= =
The depth of roughing cut Amount of retract from each cut
Second block:
P
The first block number of the finishing profile The last block number of the finishing profile Stock amount for finishing on the X axis diameter W = Stock leftforfinishing on the Z axis f ::: Cutting feedrate (in/rev or mm/rev) overrides feedrates between the P block and the Q block S == Spindle speed (ftJmin or m/min) overrides spindle speeds between the P block and the Q block Q U
:;;;;;
Do not confuse the U in the iirst block, depth of cut per side, and the U in the second block, stock lefl on diameter. The rand K parameters may be used only on some controls and the retract amount R is sel by a system parameter. The external and inlernal usc of the G71 cycle will use the drawing data in Figure 35-/3.
Drawing example to illustrate G7l rQughing cycle - program 03505
•
G71 for External Roughing
The slack material in the example has an existing hole of 09/16 (.5625). For external CUlling of this part, a standard 80 0 tool will be used for a single cut on the face, as well as for roughing the ouler shape.
Program 03505 covers these operations. 03505 (G71 ROUGHING CYCLE - ROUGHING ONLY) Nl G20 N2 TOIOO M41 (OD ROUGHING TOOL + GEAR) N3 G96 S450 Me3 (SPEED FOR ROUGH TURNING) N4 GOO G4l X3.2 ZO TOlOl MOe (START FOR FACE) N5 GOI XO.36 (END OF FACE DIA) N6 GO 0 ZO. 1 (CLEAR OFF FACE) N7 G42 X3.l (START POSITION FOR CYCLE) NS G7l P9 017 UO.06 WO.004 D1250 FO.Ol4 N9 GOO Xl.7 (P POINT = START OF CONTOUR) mo GOI X2.0 Z-O.OS FO.OOS Nll Z-O. 4 FO. 01 Nl2 X2.25 N13 X2.5 Z-O.6
Nl4 NJ.S NJ.6 Nl7 Nl8
Z-O.87S RO.12S X2. 9 GOI X3.05 Z-O.95 UO.2 FO.02 (0 POINT = END OF mN'TOUR) GOO G40 XS.O Z6.0 TOlOO Nl9 MOl
The external roughing bas been completed at thiS point in the program and the internal roughing can be programmed for the next tool. In all examples that include a 1001 change between a short tool (such as a turning tool) and a long tool (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 clearance 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:
mo N21 N22 N23 N24 N25 N26 N27 N2B N29 N30 N31 N32 N33
T0300 (In ROUGHING TOOL) G96 8400 M03 (SPEED FOR ROUGH BORING) GOO G41 XO.S ZO.1 T0303 MOS (START pas.) G71 P24 Q31 U-O.06 WO.004 01000 FO.012 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 Z-O.75 XO.625 Z-1.2S Z-l. 55 U-O. 2 FO. 02 (Q POINT END OF CONTOUR) GOO 040 X5.0 Z2.0 T0300 MOl
The part has been completely roughed out. leaving only the req uired stock on diameters and faces or shoulders. Fi 11ishing with the G70 cycle, described laler, is possible wilh (he same 1001, if lolerances and/or surface finlsh arc nOlloo crilicaL Otherwise, another 1001 or 1001s will be required in the same program, after a Lool change. At 11m stage, evaluate what has been done and why. Many principles Ihat applied to the example are very common 10 other operalions that also use the mUltiple repetitive cycles. It is important 10 learn them weI! allhis point.
•
Direction of Cutti ng in G71
The last programming example 03505, shows Ihal G71 can be used for roughing externally or infernally. There are two important differences:
o
Start point relative to the P point (SP to P versus P to SP)
o
Sign oi the U address for stock allowance on diameter
The control system will process the cycle for external cUlling, if the X direclion from Ihe starl pain! SP 10 lhe point P is !legal il'e. In the example, the X slart poi nt is X3. I, the P point is X 1.7. The X direction is negalive or decreasing and an eXlernal cUlling will take place. The control syslem wi II process the cycle for internal cutling, if (he X direction from stan point SP to Ihe point Pis posiTive. In the example, the X start puinl is XO.5, the P point is XJ.55. The X direction is positive or increasing, and an internal culling will take place.
Figure 35-14 illustrates the concept of G71 cycle, as applied to both,
::Inc! intern::!l cU!ling
By (he way, although the sign of the stock U value is very important ror the final size of the part, it does lIot determine the mode of cUlling. This concludes the section relating to the G71 multiple repetitive cycle. The face roughing cycle Gn is similar, and is described next.
J
----, :::i"P I 1 1
I
SP to P direction is negative for external cutting
t P
p
/
'" _... -----------~.§E
SP to P direction is positive for external cutting
- Cutting direction
Q ,
Figure 35-14
External and internal CUl1ing in G71 cycle
G12 - STOCK REMOVAL IN fACING 111C Gn cycle is identical in every respect to the G71 cycle, excep[ the stock is removed mainly by vertical culting
(facing), lypically from (he large diameter towards the spindle center line XO. II is used for roughing of a solid cylinder, using a series of vertical cuts (face culS). Like all olher cycles In Ihis group. It COllies in two formats - a one block and a double block formal, depending on Ihe control system. Compare G72 with the G71 structure on examples in this chapter.
• G72 Cycle Format ~ 101/111/151 The one-block programming formal for the G72 cycle is:
G72 P.. Q.. I.. K.. U.. W.. D.. F.. S.. ~
where ...
P
=
The first block number of the finishing profile
Q
The last block number of the finishing profile
I
Distance and direction of rough semifinishing in the X axis - per side Distance and direction of rough semifinishing in the Z axis Stock amount for finishing on the X axis diameter Stock left for finishing on the Z axis The depth of roughing cllt Cutting ieedrate (in/rev or mm/rev) overrides feedrates between the P block and the Q block Spindle speed ~ft/min or m/min) overrides spindle speeds between the P block and the Q block
K U W
o F
S
The meaning of each address is (he same as rar the G71 cycle. The I and K parameters are nOI available on ail machines. These parameters conlrol (he amount of cut for semifinishing, which is the last continuous cut before final roughing motions are completed.
318
Chapter 35
+ G72 Cycle Format - OTj16T/1 BT/20T/21T If the control system requires a double block enlry for lbe G72 cycle, the programming formal is: G72 W.. R.. G72 P.. Q .. U.. W.. F.. 5 .. Ia"
03506 (G72 ROUGHING CYCLE - ROUGHING ONLY) G20 N2 T0100 M41 (OD FACING TOOL + GEAR) NO G96 8450 M03 (SPEED FOR ROUGH FACING) N4 GOO G4l X6.2S ZO.3 T010l MOB (START POS.) N5 G72 P6 Q12 UO.06 WO.03 D1250 FO.014 N6 GOO z-O.87S (p-POINT :::: START OF CONTOUR) N7 GOl X6.05 FO.02
m
N8 XS.9 z-o.a FO.ooa
where ...
N9 X2. 5
mo n.s
First block:
W
R
= =
The depth of roughing cut Amount of retract from each cut
Second block:
p
=
The first block number of the finishing profile == The last block number of the finishing profile Stock amount for finishing on the X axis diameter U W = Stock left for finishing on the Z axis Cutting feedrate (in/rev or mm/rev) overrides F feedrates between the P block and the Q block Spindle speed (ftlmin or m/min) overrides spindle S speeds between the P block and the Q block Q
ZO XO.55 WO.1 FO. 02 (Q-POINT :::: END OF aJNTOUR) GOO G40 XS.O Z3.0 TOlOO MOl
Nll Nl2 Nl3 Nl4
The concept of G72 cycle is illustrated in Figure 35-16. Note the posicion or (he poinl P as it relales lo Ihe start puinc SP and compare it with Ihe G7) cycle.
, ,
I I I . Cutting direction I
1n the G7 J cycle for the doubJe block definition, rhere were two addresses U. In the 072 double block definition cycle, !.here are two addresses W. Make sure you do not confuse the W in the first block - depth of cut (actually il is a 'width of cut), and the W in the second block - stock left on faces. The I and K paramelers may be available, depending on the control.
f
I I l I I
I Q
An example program 0350() for the G72 cycle uses the drawi ng data in Figure 35- J5.
a a co a
CHAMFER 0.05
x 45°
-06.0 - - 0.25 FACE STOCK
- 02.500 ·01500 03/4 CORE
,~.Q.i Figure 35-15 Drawing example to illustrate G72 roughing cycfe - program 03506
10 lhis facing application, all the main data will be reversed by 90". because the cut will be segmented along the X axis. Roughing program using the Gn cycle is logically similar to the G71 cycle:
Figure 35-16 Basic concept of G72 mUltiple repetitive cycle
G13 - PATTERN REPEATING CYCLE 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.
+ 673 Cycle Format -10Tj11Tj15T The one-block programming format for similar to (he G71 and G72 cycles:
Gn
cycle
G73 P.. Q.. 1.. K.. U.. W.. D.. F.. S.. IQj"
where ... P
=:::
Q
1 K U
=: =:
The first block number of the finishing profile The last block number of the finishing profile Xaxis distance and direction of relief - per side Z axis distance and direction of relief Stock amount tor finishing on the X axis diameter
IS
319
w o
left for on the Z axis The number of divisions Cutting feedrate !in/rev or mm/rev) overrides feed rates between the P block and the Q block
F
s
important input parameters in the G73 One pClJameter seems to be missing - there cut specification.! Tn the G73 cycle, it is not actual depth of cut is calculated au[omatically,
Spindle speed (ft/min or m/minl overrides spindle between the P block and the Q block
•
Cycle Format OT/16T/18T/20Tj21T w
control requires a double block entry cycle, the programming format is:
parameters:
o I ...
oK ... amount of
o D ... this
~
X axis distance and direction of relief· per
=
Second block: P Q = U -=W F
The first block number of the finishing The last block number of the finishing profile Stock amount for finishing on the X axis Stock left for finishing on the Z Cutting feedrate (in/rev or mm/rev) CHI<>"""'" feed rates between the P block and the Q Spindle speed {ftlmin or m/min} overrides spindle speeds between the P block and the Q block
S
In the two-block cycle entries, do nOI up the firs! block thal repeat in the second block (U the example). They have a different
•
of cutting 111\11<:1(\1'" or number of with care - its
repeating cycle G73 35-17.
material amount on the face as .300 (KO.3). divisions could be either two or three, so the r-\rr,,,r·,\rn use D3. Some modification on the control during actual setup or machining, .... ~I"/v".~, exact condition and sizes of the or
This cycle IS suitable for roughing contours where the finish contour closely matches the contour the forging. Even if there is some this be more efficient than the selection of J or cyThe program 03507 and finishing with Ihe same tool (as an example): 03507 (G73 PATTERN REPEATING CYCLE) Nl G20 M42
G7J Example of Pattern Repeating uses the
In
N2 T0100 N3 G96 S350 M03 N4 GOO G42 X3.0 ZO.l TOlOl MUS NS G73 P6 Q13 IO.2 KO.3 UO.06 WO.004 D3 FO.Ol 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
can
In the example, the largest expected material amount per will be chosen as .200 (10.2) and the
Z axis distance and direction of relief The number of cutting divisions
R
material to remove in the Z axis
with a reasonable efficiency, but some 'air' an unwanted side effect for odd shaped
First block:
W
material to remove in the X
amount rough stock to be rprnr\'''IU! Z axes. That is not the typical castings, where the stock varies all over the illustration in Figure 37·17.
where ...
u
amount of
03507
320
- - - -. --------
A
. . . . . . .,
,
B'--
,
Chapter 35
For safety, use the same start point for G70 as for the roughing cycles.
A
'1
The earlier roughing progTam 03505, using the G71 repetitive 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 ... )
A
N34 TOSOO M42 (00 FINISHING TOOL + GEAR) N35 G96 5530 M03 (SPEED FOR FINISH TURNING) N36 G42 X3.1 ZO.l TOSOS MOS (START POS.) N37 G70 P9 Q17 (FINISHING CYCLE - OD) N18 GOO G40 XS.O Z6.0 TOSOO N39 MOl
=1+ U/2
B= K+W Figure 35·18 Schematic representation of 673 cvcle
Note that (he pallern repealing cycle does exactly thaI - it repeals (he machining contour (pattern) specified between the P and Q points. Each Indlvidual 1001 path IS offset by a 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.
G10 - CONTO
ING CYCLE
The last of the contouring cycles is G70. Although il has a smaller G number than any of the three roughing cydes G71, G72 and Gn, the !imshing cycle G70 is normally used after anyone of these three rough ing cycles. As ils description suggesls, it is siriclly usedJor the finishing CUf oja previously defined conrow:
•
G70 Cycle Format· All Controls
For this cycle, there is no difference in the programming rormal for various controls - il is all the same, and the cycle call is a one-block command. The programming format for G70 cycle is:
trIir where .. "
P Q
F
S
;;=
The first block number of the finishing profile The last block number of the finishing profile Cutting feedrate (in/rev or mm/rev) Spindle speed (ft/min or m/min)
The cycle G70 acceplS a previously defined finishing contour from either or the three roughing cycles. already described. This finishing contour is defined by the P and Ihe Q points of Ihe respective cycles. and is normally repealed in the G70 cycle. allhough It can change.
N40 N41 N42 N43 N44 N45
T0700 (In FINISHING TOOL) G96 S47S M03 (SPEED FOR ROUGH BORING) GOO G41 XO.S ZO.l T0707 MOS (START POS.) G70 P24 Q31 (FINISHING CYCLE - ID) GOO G40 XS.O Z2.0 T0700 (END OF PROGRAM) M30
%
Even for the ex ternal Ii nishing. the cutting tool is still programmed 10 start above the original stock diameter and off the from face, although all roughing morions have already been completed. A similar approach applies to the internal
cut. For safely reasons, this is a recommend praclice. There are no feed rates program med for the G70 cycle, although the cycle formal accepts a feedratc. The defined block segments Pta Q for Ihe roughing 1001 already include feedratcs. These progmmmed feedrates will be ignored in 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 ;:lny feerir:1tes, lhr:n progrllm rI comm(!fljeedmle for l~nish ing all contours during the G70 cycle processing. For example, program block N17 G70 P9 Q17 FO.007
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 finishing contour al all, then N ..
G70 P .. Q .. FO.007
will use .007 in/rev exclusively for the finishing tool path. The same logic described ror G7 t cycle, appl ies eq ually Ihe G72 cycle. The roughing program 03506, using the G72 cycle for rough turning of Ihe pan face, can be completed by using another external lool for finishing euls uSing Ihe G70 cycle: La
LATHE CYCLES
321 G14 - PECK DRILLING CYCLE
(03506 CONTINUED ... ) N15 TOSOO M42 N16 G96 5500 M03
(00 FACING TOOL + GEAR) (SPEED FOR FINISH FACING)
Nl7 GOO G41 X6.2S ZO.3 TOSOS M08 N1e G70 P6 Q12
(START POS.)
(FINISHING CYCLE)
Nl9 GOO G40 X8.0 Z3.0 TOSOO
mo
M30
%
The rules mentioned earlier also apply for the contour finishing defined by the G72 cycle. Program 03507, using the G73 cycle, can be aJso be programmed by using another external Lool for finishing, applying the same rules.
BASIC RULES FOR G10-G13 CYCLES In order 10 make the multiple repetitive stock removal cycles (contouring cycles) work properly and efficiently, observing the rules of their use is very important. Often a small oversight may cause a lengthy delay.
The G74 cycle is one of two cycles usually used for non finishing work. Along with G75 cycle. it is used for machining an interrupted cm, such as chips breaking during a long CUlling moLion. C74 cycle is used along rhe Z axis. This is [he cycle commonly used for an interrupted CUl along the Zaxis. The name of the cycle is Peck Drilling Cycle, similar 10 the G73 peck drilling cycle, used for machining centers. FOr Ihe lathe work, G74 cycle application is a lillie more versatile than for its G73 equivalent on machining centers. Although its main purpose may be applied towards peck drilling, Ihe cycle can be used with equal eftlciency for interrupted eUls in turning and boring (for example, in some very hard materials), deep face grooving, difficull part-off machining. and many other applications.
• G74 Cycle Format - 10Tj11Tj15T The one-block programming format for G74 cycle is:
Here are Ihe most important rules and observations:
o
Always apply tool nose radius oHset before the stock removal cycle is called
o Always cancel tool nose radius offset after the stock removal cycle is completed
o
Return motion to the start point is automatic, and must not be programmed
o
Th e P bloc k in G71 should not include the Z axis value (Z or W) for cycle Type I
o
Change of direction is allowed only for Type II G71 cycle, and along one axis only (WO)
o
Stock allowance U is programmed on a diameter, and its sign shows to which side of the stock it is to be applied (sign is the direction in X, to or from the spindle centerline)
G74 X.. (U .. ) Z.. (W .. ) 1.. K.. D.. F.. S.. !Gf
where ...
X(U)
= Z(W) I =
K D F
S
o
D address does not use decimal point, and must be programmed for leading zero suppression format:
The two-block programming format for G74 cycle is: G74 R.. G74 X.. (U .. } Z.. (W .. ) P.. Q .. R.. F.. S.. Il..-:W where .,.
First block: R
D0750 or D750 is equivalent to .0750 depth
Only some control systems do allow a decimal point to be used for the D address (depth of cut) in G71 and G72 cycles.
=:
• G74 Cycle Format - OTj16Tj18Tj20Tj21T
o Feedrate programmed for the finishing contour (specified between the P and Q points) will be ignored during roughing
;:::
Final groove diameter to be cut Z position of the last peck - depth of hole Depth of each cut (no sign) Distance of each peck (no sign) Relief amount at the end of cut (must be zero for face grooving) Groove cutting feedrate (in/rev or mm/rev) Spindle speed (ft/min or m/min)
=:
Return amount (clearance for each cut)
Second block:
X(U)
=:::
Z(W)
p Q
==
R
=
F S
=
Final groove diameter to be cut Z position of the last peck (depth of hole) Depth of each cut (no sign) Distance of each peck (no sign) Relief amount at the end of cut (must be zero for face grooving) Groove cutting feed rate (in/rev or mm/rev) Spindle speed (ft/min or m/min)
322
Chapter
If both the X(U) and I (or P) are omitted in machining is along the Z axis only (peck cal drilling operation, only the Z, K programmed - see Figure 35·19.
=
I
the
K arc
D F S
K - - K --,
Depth of each cut (no sign) II"T~,n ..... oerwelm grooves (no sign) (for multiple only) Relief amount at the end of cut zero or not used forface groove) Groove cutting feedrate lin/rev or mm/rev) Spindle 1ft/min or m/minl
• G75 Cycle format - OTj16Tj18Tj20Tj21T ng fomlal for
The two-block
G75
z 35-19 Schematic format for 674 cvcle example
~
where ... First block:
The followmg program example il
cycle:
R 03507 (G74 PECK DRILLING) N1 G20 N2 T0200 N3 G91 51200 MO) N4 GOO XO ZO.2 T0202 MOB NS G74 Z-3.0 KO.S FO.012 N6 GOO X6.0 Z2.0 T0200
block:
X{U)
IN RPM) POSITION) (PECK DRILLING) POSITION)
Z(WJ P
R
%
F
Drilling willtuke place to a cremenls of one half of an peck is calculated from an interrupted groove is
S
A
of two lathe cycles available ''''''rr\J.'r with the G74 cyan inten'upted cuI, for
the
designed 10 break axis - used mainly
o
a
grooving operation. The cycle is identical to G74, except the X axis is replaced with the Z axis.
•
Il?
G75 Cycle format - 10Tj11TjlST
where ... XIU)
Z(W) =
diameter to be cut of the last groove (for multiple grooves only)
Z
example of G75
the
will
in {he
nOles are common to both
motion. C75 cycle is 5i
Depth of each cut (no sign) Distance between grooves (no sign) Relief amount at the end of cut (must be zero for face grooving) Groove cutting feedrate (usually In/rev or mm/rev) Spindle speed (usually ftlmin or m/minJ
BASIC RULES fOR G14 AND G75 CYCLES
or
example for break
This is also a very during a rough cut
=::
Final groove diameter to be cut
Zposition of the last groove
the Z(W) and K (or Q) are is along the X axis only
G15 * GROOVE CUTTING CYCLE 075 simple, non cle, il is used for
=
Q
(END OF PROGRAM)
N1 M30
Return amount (clearance for each
In both
the X and Z values can be programmed absolute or mode.
o Both cycles allow an o The relief amount at the end of cut can be in that case It will be assumed as zero. 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 presence of X determines the If the X value is programmed, the Rvalue means relief amount.
II
GROOVING ON LATHES
Groove cutting on CNC lalhes is a multi step machining operation. The term grooving usually applies to a process of forming a narrow cavity of a certain depth. on a cy]i nder, cone, or a face of the part. 1l1e groove shape. or at least a significant part of it, will be in the shape of the cUlling tool. Grooving tools are also used for a variety of special machining operations. The grooving tool is usually a carbide insert mounted in a special tool holder, similar to any other tool. Designs of grooving inserts vary, 1T0m a single tip, 10 an lnsert with multiple lips. Inserts are manufactured !O nominal sizes. Multi tip insert grooving tools are used (0 decrease costs and increase prmJuclivity.
GROOVING OPERATIONS The cutting tools for grooving are either external or internal and use a variety of inserls in different configuraeions. The most important difference between grooving and turning is the direClion of cut. Turnmg lool can be applied for culs in multiple directions, grooving tool is normally used to cut in a single direction only. A notable exception is (1n 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 another applicalion of a two axis simultaneous motion in grooving, a corner hreaking on the groove. Strictly speaking. this is a turmng operation. Ahhough a grooving tool is not designed for turning, it can be used for some light machining, like cutting a small chamfer. During the corner breaking cut 011 a groove, the amount of material removal is always very small and the applied feed rate is normally low. •
Main GroDving Applications
Groove is an essential pan of components machined on CNC lathes. There are many kinds of grooves used in industry. Most likeJy, programming will include many undercuts, 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 connecting parts. There arc also pulley or V-belt grooves thai are used for belts to drive a motor. O-ring grooves are specially designed for insertion of melt,1 or rubber rings, that serve as stoppers or sealers. There are many other kinds of grooves. Many industnes use grooves unique [0 [heir needs, mOst others use the more general groove lypes.
•
Grooving Criteria
For a CNC programmer, grooving usually presents no special difficulties. Some grooves may be easier to program than others, yet there could be several fairly complex grooves found in various industries thaI may present a programming or machining challenge. In any case, before a groove can be programmed, have a good look at lhe drawing specifications and do some overall evaluations. Many grooves may appear on the same parI at different locations and could benefit from a subprogram development. When planning a program for grooving, evaluate the groove carefully. In good planning, evaluate the selected groove by al leasl lhree criteria: o
Groove shape
o
Groove location on a part
o Groove dimensions and tolerances Unfortunately, many grooves are not of the highest qualilY. Perhaps it is because many grooves do no! require high precision and when a high precision groove has to be done, the programmer does not know how to handle it properly. Watch particularly for surface finish and tolerances.
GROOVE SHAPE The first evalulltion before programming grooves is the groove shape. The shape is determined by the part drawing and corresponds to (he purpose of the groove. The groove shape is the single most important factor when selecting the grooving insert. A groove with sharp corners parallel to the machine axes requires a square insert, a groove with radius requires an insert having the same or smaller radius. Special purpose grooves, for example an angular groove shape, will need an insert with the angles corresponding to the groove angJes as given in the drawing. Formed grooves require inserlS shaped into the same form, etc. Some typical shapes of grooving inserts are illustrated in Figure 36- J.
UUV~U[)u Figure 36-1
Typical shapes of common grooving tools
323
324
Chapter 36
• Nominal Insert Size In many groove ctllting operations, the groove width wIll be greater than the largest available grooving insert of a nominal size (i.e., off the shelf size). Nominal sizes are normally found in various tooling catalogues and typically have widths 1ike I mm,2 mm, 3 mm or 1/32,3/64, 1/16, 1/8 in inches, and so on, depending on the units selected. For example, a groove width of .276 inches can be cuI 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 finishing, if the tolerances or excessive 100] wear make it more practical - Figure 36-2.
Allhough some variations are possible, for practical purposes, only these three categories are considered. Each of the three locations may be either e:rtemal or internal. The two most common groove locations are on a cylinder, i,e.. on a straight outside - or exlemal- diameter, or on a straight inside - or internal- diameter. Many other grooves may be located on a face, on a taper (cone), even in a corner. The illustration in Figure 36-3 shows some lypical locations of various grooves.
....' 2
1
. LJ ,'
3
-
--
Figure 36-3 Typical groove locations on a parr Figure 36-2 CUI distribution for grooves wider than the insert
•
Insert Modification
Once in a while, programmers encounter a groove that requires a special insert in terms of its size or shape. There are two options to consider. One js \0 have a custom made insert, if il is possible and practical. For a large number of grooves, it may be a justi tied solution. The other alternative is 10 modify an existing insert in-house. Generally, in CNC programming, off-the-shelf tools and inserts should be used as much as possible. In special cases. however, a standard rool or insert can be modified 10 suil a particular job. For grooving, it may be a small extension of the insert cUlling deplh, or a radius modification. Try 10 modify lhe groove shape itself only as the last resort. Modification of srandard tools slows down the production and can be quite costly.
GROOVE LOCATION Groove location on a part is determined by the part drawing. The locations can be one of three groups: o
Groove cut on a cylinder
o
Groove cut on a cone
o
Groove cut on a face
... diameter cutting .«
taper cutting
... shoulder cutting
GROOVE DIMENSIONS The dimensions of a groove are always important when selecting the proper grooving insert. Grooving dimensions include the width and the depth of a groove, as well as the corners specifications. It is not possible to cut a groove with an insert thut is larger than the groove width, Also, it is not possible to feed into a groove depth that is greater than the depth clearance of the insert or tool holder. However, there is usually no problem in using a narrow grooving insert to make a wide groove with multiple ClltS. The same appbes for a deep culling insert used 10 make a shallow groove. The dimensions of a groove determine the method of machining. A groove whose widlh equals the insert width selected for the groove shape, requires only one cut. Simplefeed-in and rapid-out tool motion is all that is required. To program ;j groove correctly, Ihe width and depth of the groove must be known as well as its position relative to a known reference position on the parI. ThiS position is the distance to one side - or one wall - of the groove. Some extra large grooves require a special approach. For example, a groove thai is 10m m wide and 8 mm deep cannO[ 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 . It is not unusual to even use more than one tool for such an operation. Program may also need to be designed in seclions. In case of an insert breakage, only (he affected program section has to be repeated.
ON
325
• Groove Position are shown two most common methods of a The groove width is aiven in both cases as dimension W, bUl tile distance L fro;;; lhe front is d in the example a and the example D.
and boltom diameter of the I::; method has a major benefit that of the groove will actually appear as A disadvam3e:c is that the '-' and a proper grooving 36-5b docs show !he bottom diameter WIll have to dlmensionin <='o examfire about equally common in CNC are usually grooves that have a have a much deeper top diameter and its bartom
but
SIMPLE GROOVE PROGRAMMING
L
L
,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 finished groove. and it will affect the
1 programmethod. A groove may also dimensioned from anolher localion, depending on
•
Figure 36-6 Simple groove example· program 03601 Insert width is equa/l0 the groove width The program a is rapid mode, move the gTooving lool to
Depth
Tn Figure 36-5, there are two
dimen-
siomng the groove depth.
~I
r
bl Figure 36-5 Groove depth dimens.ioning . two common methods
d
Jn position
~eed-in ,to the groove depth, then rapid out back to the start~ mg posltlOn, and - the groove is finished. arc no corner breaks, no surface tinish conlrol, and no special techniques 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 . manufacturing. At the same such grooves is a good stal1 to learn more The following square The groove diameters (2.952 - 2.63'7)
12
.15'75
326
Chapter 36
uses the
The
1001
as Ihe
03601 (SIMPLE GROOVE) (G20) N33 TOSOO M42
(TOOL 8
N34 G97 5650 M03
(650 RPM SPEED)
N3S GOO Xl.1 Z 0.625 Toaos MaS (START POINT) N3S GOl X2.637 FO.003 (FEED-IN TO N37 G04 XO. 4 (DWELL AT THE BOTTOM) IDB X3.1. FO. 05 (RErRAC"r FROM N39 GOO X6.0 Z3.0 TOSOO M09 (CLEAR POSITION) (END OF PROGRJl,M)
N40 IDO
%
the following. First, the from the beginning of N34 are startup 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 10calion is the clearance the part diameter, which is .074 inches in the (3.1 - 2.952)
I 2
PRECISION GROOVING TECHNIQUES A simple in-ouf will nOl be good. I[s have a rough surface, comers will be sharp its width is dependent on insert width and its wear. most of maChining a groove is not
To p:-ogram and precision groove eXira effort, but be a high quality This effort is nol justified, as high quality comes with a price. The next two illustrations show the groove di mensions and program details. Drawing in Figure 36-7 shows a high groove, although its width is Intentionally impact of the example.
0.1584
= .074 same block, during the tool
cut, at a of 0.4 seconds,
diameter and complellon
actual groove plunging Block N37 is a dwell the tool return to the slanthe rrogram.
Although Ihis parlicular pie, tel's evaluate the program a
importanl principles thal can of programming any face finish are very critical.
, .......
BREAK CORNERS 0.012 X
example was very slm-
more. Il contains sevapplied to rhe method its precision and sur-
the clearance before the cutting begins. The is positioned .074 inches the pari diameter. at 100. Always keep this ',,"'ll"',- to a safe minimum. 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 elimithe lool drag on the
1001
in the diThe tool width of .125 never width of the or indirectly. That means groove. It will 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 mg without a single change to
for a precision groove eX<3lm/Jle
What is best cutting plunge rough cut two finish cuts, one for each are reasonable; so is .006 added to the Also, sharp corners will broken with a .012 chamfer at the 04.0. shows the distribution of the cuts.
Figure 36-8 Precision groove· distribution of cuts for the example 03802
GROOVING ON LATHES
Before the first block can be programmed, se!eclion of the cutting tool and machining method is a sign of a good planning. These are important decisions because they directly influence the final groove size and its condition.
+ Groove Width Selection The grooving Lool selected for the example in program 03602 will be an exlernaltool, assigned to the tool station number Ihree - T03. Tool reference point is selected at {he left edge of the insert. wh icll is a standard selection. The insert width has to be selected as well. Grooving inserts are available in a variety of standard widths, usually with an increment of I mm for metric tools, and 1132 or 1116 inch for (ools in the English system. In (his case, [he non-standard groove width is .! 584 inch. The nearest standard insert 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. In theory, this insert could cut the groove, but because the actual difference between the Insert width and the groove width is so small (.00215 inch over two walls), there is very little material to cut.
The dimensional difference would allow only slightly more than .00 I per each side of (he groove. which may cause the insert to rub on the wall rather than cut It. A better choice is to step down LO Ihe next lower standard insert width, !.hat is 1/8th of an inch (.1250). There is much more flexibility with 1/8 width than with 5/32 width. Once the grooving tool is selected, the initial values can be assignedthe offset number (03), the spindle speed (400 rUmin), the gear range (M42) - and a note ror the selup sheet: o
T0303 = .1250 SQUARE GROOVING TOOL
327 chined with a, 1250 wide grooving insert, will need oJ least two grooving cuts. But what about a groove that is much wider than the groove in the example? There is an easy way to calcu late the minimum nWl1her of grooving ClllS (or plunges), using the following formula:
Cmln = rrw where ... em," Gw
Tw
=
Minimum number of cuts Groove width for machining Grooving insert width
Applying the formula to the example, the starting data are the groove width of .1584 of an inch and tbe groovi ng insert width of .1250 of an inch. That translates into the minimum of fWO grooving cuts. Always round upwards, to the nearest integer: . J584/1250= /.2672=2 cuts.
A possible decision could be to plunge once to finish the left side of Ihe groove and, with one more plunge, to finish the groove right side. The necessary overlap between the two cuts is guaranteed and the only remaining operation is the chamfering. A groove programmed Ihis way may be acceptable, but will not be of a very good quality. Even if only an acceptable quality groove is produced during machining, such a result does nOL give the programmer much credit. What can be actually done lo assure the 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, in order to prevent problems at the machining level.
03602 (PRECISION GROOVE) (G20) N41 T0300 M42 N42 G96 8400 M03
+ Machining Method Once the grooving tool has been selected and assigned a station number (toollurrel rosition), the actual method of machining the groove has to be decided. Earlier, the machining method has been descrlbed generally, now a more detailed description is necessary. (001
One simple programming method is not an option - the basic in-ollt lcchmque used earlier. llUll means Q better method must be selected, a method that will guarantee a high quality groove. The first step towards that goal is the realization of the faclthat a grooving insert with the width narrower than the groove width, will have to be plunged into the groove more than once. How many times? It is not difficult to calculate that a groove .1584 wide and ma-
How call this suggestion be applied to the example? The 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 conditions, better surface fi nish control and better toollifc. If this observation is used in the current example, an important conclusion can be made, If two plunge euls of uneven width will yield at least acceptable results, three cuts Ihat are equally distributed should yield even better results. If at least Ihree grooving cuts are used to form the groove rather (han the minimum two cuts, the CNC programmer will gain control of two always Important factors:
o
Control of the groove POSITION
o
Control of the groove WIDTH
Tn precision grooving, these two factors are equally important and should be considered logether.
328
Chapter 36
Look carefully at how these factors are implemented in the example, The first factor applied under (he program control is the groove position, The groove position is given
in the drawing as .625 inches from the front face of the pan, to the left side of the groove. There is no plus or minus dimensionaltolerance specified, so the drawing dimension is used as arbilJary and is programmed directly. The second factor under the program control is the groove width, That is .1584 of an inch on the drawi ng and the selected !ool insel1 width is .1250. The goal is to program the culting mo[ions in three steps, using the technique already selected:
Q STEP 1 Rough plunge in the middle of the groove, leaving an equal material stock on both groove faces for finishing . also leave small stock on the bottom of the groove
Q STEP 2 Program the grooving tool operation on the left side of the groove, including the chamfer (corner break)
Q STEP 3 Program the grooving tool operation on the right side of the groove, including the chamfer (corner break) and sweep the groove bottom towards the left wall.
The last two steps require chamfer cutting or a comer break. The width of [he chamfer plus the width of the subsequent cut should never be larger than about one half to three quarters of the insert width. In the third step, sweeping of the bottom is dcsircd.ll11ll suggests the need to consider stock allowances for fmishing.
•
Nex[ look is at the X axis positions. The first position is where the plunge will start from. the second position is the end diameter for the plunging cuL A good position for the
start is about .050 per side above the finished diameter, which in Ih is case would be a clearance diameter calculated from the 04.0;
4.0 + .05 x 2
=
4.1
(X4.1)
Do nol start the cuI with a clearance of more than .050 inch (),27 mm) - with slow feed rates that are typical to grooves, there will be too much air to cut, which is not very efficient. The end diameter is the groove bottom, given on the drawing as 3.82. Dimension of X3.82 could be programmed as the targel diameter, but it does help to leave a very small Slack, such as .003 per side (.006 on diameter), to make a sweep finish of the groove bottom, That wi II add two times .003 to the 3.82 groove diameter, for the programmed X target as X3.826. Once the plunge is done, the (001 reI urns 10 the start diameter:
N43 GOO X4.1 Z-O.6083 T0303 MOB N44 GOI X3.826 FO.004 N45 GOO X4.1 The rapid motion back above the groove (N4S) is a good choice in this case, because the sides will be machined later with the finishing culS, so the surface finish of Ihe walls is not critical at this moment. After roughing the groove, it is lime to Slarllhe finishing operations.
All the calculated amounts can be added to the previous
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 position for the starl, fi nd fi rsl the amou nt of slack on each waJ I
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: (.1584 - .1250) I 2
;0.0167'
/
04.1 04.0 - 03.976
= .0167
The tool Z position wi II be .0167 on the positive side of the len wall. If this wall is at Z-0.625, the grooving tool Slm1 position will be at Z-O.60{l3. When the tool completes the nrsl plunge, there will be an equal amount of materia! left for finiShing on bOlh walls of Ihe groove. Do your best to avoid rounding off the figure .0167, for
example, 10 .0170 inch. It would make no difference for the machining, but it is a sound programming practice to usc only the calculated values. The benefit of such approach is in eventual program checking, and also with general consistency in programming. Equal stock amounts offer this consistency; .0167 ond "0167 is a better choice than .0170 and .0164, although the practical results will be the same,
03"826 03.82 0.1250 ·0.1584· Z-0.6083 Z-0.6250 . Z-0.6870 Figure 36-9 Precision groove - groove data used in program 03602
GROOVING ON LATHES
•
Groove Tolerances
As in any machining, program for grooves must be structured in such a way, that maintaining tolerances at the machine will be possible. There is no specified tolerance in the example, but it is implied as very close by the four-decimal place dimension. A tolerance range, such as 0.0 Lo +.00 I \ is probably a more common way of specifying a tolerance. Only' the dimensional value thai falls within the specified range can be used in a program. In Ihis example, the aim is the drawing dimension of .1584 (selected intentionally).
A possible problem often encountered during machining and a problem that influences the groove width'the most, is a tool weQJ: As the insert works harder and harder, it wears off at ils edges and actually becomes narrower. Its cutting capabilities are not necessarily impaired, but the resulting groove width may not fall within close tolerances. Another cause for an unacceptable groove width is {he insert wid!h. Inserts are manufactured within high level of accuracy, bUI also within certain tolerances. If an insert is changed, the groove width may change slightly, because the new illseli may not have exactly [hc same width as the previous onc. To eliminate, or al least minimize, the possible our oftolerance problem, use quite a simple technique - program an additional offset for finishing operations only. Earlier, when the precision groove was pJanned, offset 03 had been assigned to the grooving tool. Why would an ad· dilional offscr he needed at all? Assume for a moment, that all machine settings usc just a single offset in the program. Suddenly, during machining, the groove gets narrower due to 1001 wear. What can be done? Change the insert? Modify the program? Change (he offset? If the Z ax is offset set! ing is adjusted, either to the negative or positive direction, that will change Ihe groove position relative [0 the program zero but it will nor change Ihe groove widthi What is needed is a second offset, an offscr (hal cont[ols the groove wiJth only. In the program 03602, the left chamfer and side wlll be finished with one offset (03), the right chamfer and side will use a second offset. To make Ihe second offset easier 10 remember. number 13 wi II be used.
329 the grooving (001 will nOI contact the right side wall stock. That means do not retract [he tool further then the position of Z-0.6083. It also means do nol rapid OuL because of a possi ble contact during the 'dogleg' or 'hockey Sl ick' motion, described in Chapter 20 - Rapid Posiliolling. The best approach is (0 return 10 the initial stan position at a relatively high bur l1on-cuuing feedratc: N49 X4.1 Z-O.6083 FO.04
At this point. the left side wall is finished. To program the motions for the right side wall, the tool has to cut with the righl side (right edge) of the grooving insert. Onc method is to chnnge the GSO coordinates in the program, if this older setting is still used, or use a different work coordinale offsel. The method used here is probably the simplest and also the safest. All molions relating to the right chamfer and the right side groove wall will be programmed in the incrementa/ mode. applied 10 Ihe Z axis only, using the W address: NSO WO.0787 T0313 N51 X3.976 W-O.062 FO.002
In block N50, the tool tTavels the total distance equivalent to the sum of the right wall stock of .0167, the chamfer of .012 and the clearance of .050. In (he same block, the second offset is programmed. This is the only block where offset 13 should be applied - one block before, it's too early, and one block, afler it's too lale. Block N51 contains the target chamfer position and Ihe absolutc mode for Ihe X axis and is combined with {he incremenlal mode for the Z axis.
To complete the groove righl side wall, finish the cur at the full bottom diameter, block N52, then continue (0 remove the stock of .003 from the bollom diameter (block
N53) - this is called sweeping the groove bottom: NS2 X3.82 FO.003 N53 Z-O.6247 T0303
One other step has to be Ilnished firSI - calculalion of [he left chamfer start position. Currently, the tool is at Z-0.6083 but has to move by the wall stock oLO 167 and the chamfer as clearance of .050 - for a total travel of width .012 as .0787,10 Z-0.6S7 position. AI a slow feedrale, the chamfer is done first and [he cut continues to finish the left side, 10 Ihe same diameter as for roughing, which is X3.826:
Also look at the Z axis end amount - It IS a small value that is .0003 short of the .625 drawing dimension! The purpose here is to compensate for a possible 1001 pressure. There \(Jill nor be a srep ill the groove comeri Because the sweep will end at the left side of the groove, the original o('[<;ct (03) must be reinstated. Again, lhe block N53 is the only block where the offset change is correct. Make sure not to change the tool numbers - {he {urrer ,vill index .'
N46 Z-O.687 N47 GOl XJ.976 Z-O.62S FO.002 N48 X3.826 FO.003
The intcnded program 03602 can now be completed. All thal remains to be done is lhe return to the groove starting position, followed by the program termination blocks:
The next slep is [0 return the tool above parl diameler. This mOlion is more important than it seems. In the program, make sure Ihe finished lefl side is not damaged when the tool rctracts from the groove bottom. Al~o make sure
N54 X4.1 Z-O.6083 FO.04 N55 GOO X10.O Z2.0 T0300 M09
NS6 IDO %
330
--_.
Al (his point, (he complete program 03602 can be developed. Note program blocks where the offset has been changed, they are idemified in the comment section: 03602 (PRECISION GROOVE) (G20) N41 N42 N43 N44 N45 N46 N47 N48 N49 N50 N5l N52 N53
N54 N55 N56
T0300 M42 G96 5400 M03 GOO X4.l Z-0.6083 T0303 MOa GOl X3.826 FO.004 GOO X4.1
(NO OFFSET) (OFFSET 03)
Chapter 36
Groove Surface Finish
Programming just about any preCision groove should be fairly easy fTOm now on. Only a few last notes on (he subject of groove cutting as they relate to the surface finish. Just by following the suggested methods of equal cut distribution, proper spindle speeds and feed rates. good condition of the cutting 1001 and insert, suitable coolant, and other techniques used in the example, the surface finish will almost lake care of itself. Keep in mind, thaI the term 'precision groove' does not only describe the precise groove position and its precise dimensions, it also means a high quality look. a look thal often means much more than just a cosmetic feature.
Z-O.687 GOl X3.976 Z-O.62S FO.002 x).826 FO.003 X4.1 Z-O.6083 FO.04 WO.0787 T0313 X3.976 W-O.062 FO.002 X3.B2 FO.003 Z-O.6247 T0303 X4.1 Z-O.6083 FO.04 GOO X6.0 Z3.0 T0300 M09 M30
•
__.-------
(OFFSET 13) (OFFSET 03) (NO OFFSET)
%
WARNING! It is very important to use caution when a double tool offset for a single tool is used during machining ( this warning applies generally· not only for grooving)
Remember that the purpose of the offset in the example is to control the groove widzh, not ils diameter.
MULTIPLE GROOVES Multiple grooving is a common term used for CUlling the same groove al di fferen! positions of the same parL In these 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 valuable programming time. they are easily designed and easily edited. Although subprograms will bc discussed in Chapfer 39, an example of a mUltiple groove programming using a subprogram is shown at the end of this chapter, at least for reference and basic introduction.
o
It the groove width becomes too narrow and has to be adjusted, only the Z offset amount is changed.
When culring multiple grooves, more material will be removed. On external diameler grooves, there are no special considerations necessary, gravity will take care of the extra chips. This is not the same situation for internal grooves. The moment several grooves arc machined internally, there is a small pile of cutting chips accumulated in the bored hole. These chips can be in the way of a smooth cutting operation and could damage (he bored diameter and even the grooving 1001 itself. To solve this problem, consider machining of only a few grooves. move Ihe tool out and blow out the chips from the internal area. Using the optional stop MOl can be useful in this case, When all chips have been 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.
o
00 not cancel the current offset -
Always follow these precautions, based on the example program 03602: o
Start machining with identical initial amounts assigned to both offsets (the same XZ values for offsets 03 and 13).
o The X offset amounts of 03 and 13 must always be the same. If the X setting of one offset is changed, the setting of the other offset must be changed to the same value. Adjust both X offsets to control the groove depth tolerance.
- change from one to the other offset directly.
o
Make sure the tool number (the first two digits ofthe T address) does not change, otherwise, THERE WILL BE A TOOL CHANGE!
Other precautions can be added, depending on the exact condilions. Use common sense, and always check the program carefully, before il is released to production.
Face grooving (sometimes incorrectly called trepanning) is a horizontal groove cutting process, with (he tool moving along the Z axis. The tool is programmed along the same principles as vertical grooving along the X axis. Because of the nature of such a grooving cut, the tool orientatioll presents the most important single consideration in face groov109. The issue is the radial clearance of the cutting insert, during a cut. There is no need \0 worry too much about radial clearance for vertical grooving, because the CUlling edge of the insert is on the same plane as the machine center line. However, in horizontal grooving, the insert clearance along (he cut radius is of utmost importance.
GROOVING ON
331 a
o.
groove,
Figure 36-11 Interference of a standard grooving insert on a face groove
02.075 - / 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 (2.625 - 2.075) / 2
.275
is the actual groove width amount, .275 in the given example. Always keep in Ihallhe pl'Ogram will use a smaller .250 wide Following the progroove, listed plunge in the middle with a smail comer the groove, and two break. But first, lei's look at clearance of the programming contool. This is a one thaI is unique to mosl grooving operaoverlooked. lions, it is also one that is to
•
, in order to give them
The grooving insert for
is mounted at 90" towards the part dIe center Ii ne). A standard groovi ",",,!> and most likely at its. lower end - Figure 36- J1. cannol be IS
ance, as
IS
Figure 36-12 Standard grooving insert modified (or face '-"/>,"'111''''
• IJrr\nr'
operations to the spin-
has virtually no the
illustration is aSlS haslo modi done by grinding a In Figure 36-/2.
is a simple operation, providing the are Make sure that the insert width and only minimum otherwise the tool loses
grinding not af-
Grooving Program 03603 uses modi tied
and a .012 corner one offset is used in The tool set point is edge of insert, to the 02.075. All calculations should be they use exactl y the same as vertical gTOoving:
03603 (G20)
Radial Clearance grooving inserts are
CLEARANCE RADIUS
GROOVE)
N21 T0400 M42 N22 G96 S450 M03 N23 GOO X2.1 ZO.05 T0404 MOB N24 GOl Z-O.123 FO.003 N25 ZO.OS FO.04 N26 Xl. 951 N27 X2.075 Z-O.012 FO.OOI N28 Z-O.123 FO.003 N29 X2.1 ZO.05 FO.04 N30 UO .149 N31 U-0.124 Z-0.012 FO.OOI N32 Z-O.125 FO.003 N33 X2.0755 N34 X2.1 ZO.05 FO.04 M09 N3S GOO X8.0 Z3.0 T0400 N36 M30
%
332
36
GROOVES / NECK GROOVES
CORN
is also a grooving operation, one insert designed to cui along a ,!!roove can be square or with a 1001 and insert used and design may also be a standard lype 1001 holder, The purpose of this type is 10 of recesses and culs, in a corner of the parI. II assures a shoulder match of two components. 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
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 and N222 are the two cutling motions· one into the in N220, the other Oul of the groove in amount oflrnvel is exactly the Silme in either di dwell of 0.1 second is added for convenience at of the The block N220 can also be as an incrememal motion: N220 GOl U-O.162 W-O.OBl FO.004 N221 G04 XO.1 N222 UO.162 WO.081 FO.04
GROOVlNG CYCLES
Normally, the corner groove is specified a:; a 'minimum undercut' In this case, the cenler or lhe cut will be at the of the shou Ider and the diameter. The in and out of (he groove must be at 45°, meaning the identical amount of in both X Z axes, Figure 36a comer with a I radius minimum
two mUltiple repetitive cythat can be used for an interrupted cutprogramming formats for both cyin the previous chapler. G74 cycle is the Z axis and is used mostly for used for CUlling in the X axis, and simple grooving.
•
Cycle Applications
Although for an simplistic LO but it does chips while grooving and Anmher use is they can be b~ used
132
01.7
132
U/CUT
by alternating between and a rapid relroct motion means that one CUlling mo~'JI"~,,,,_rapid motion, on the and a built-in clearance.
In I
rpr,,,',,\
/
1,00 rigure 36-13 Corner grODve - undercuf program examo,/e 03804
The program itself
no
diflicultlo complete or interpret 03604
and is not START POINT
(CORNER GROOVE)
G()~tl
G75
DIAMETER
j
(G20) N217 N218 N219 N220 N221 N222
G75 cycle can also cut in facing, This cycle is quile any use for quality surface fimsh, main purpose is to break This is useful for some as well as face culling, the core aU( of deep grooves, so methods. ror grooving,
I GSO S1000 TOsOa M42
N224 M30 %
d
1-
d
I
G96 S375 M03
Xl.OS Z-O.95 T0505 MOB GOl XO.91B Z-1.031 Fo.a04 G04 XO.l Xl.OS Z-O.95 FO.04 N223 GOO X6.0 Z3.0 Tosoa M09
I
DIAMETER 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
r
03606 for mUltiple grooves, 36-/6.
The program
G75 cycle, is
00.85
the 675 CVcle· program 03606
on Figllre
03606
(G75 MULTIPLE GROOVES) (G20) N82 Na3 N84 N8S Na6
1
Figure 36·15 • program 03605
Single groove example using the 675
GSO G96 GOO G7S GOO
N87 M30 %
03605 cuts a single
following program and is bDsed on
51.2S0 T0300 M42 S37S M03 Xl.OS Z-O.175 T0303 MOS XO.S Z-O.67S IO.055 KO.12S FO 004 X6 0 Z2.0 T0300 M09
conditions for multiple groove. TIle only
a
In
03605 SmGLE r:
N43 GSO N44 G96 N45 GOO N46 G75 N47 GOO N48 M30
the G75 cycle call.
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.
S1.250 T0300 M42
on ly di
S375 M03
in program ming wi 11 be the value of K . lhe
between grooves. H the K is than the inserl CU\. If the K is individual grooves lhan (he width, a wide
Xl.OS Z-O.l1S TOlO) MOS XO.S IO.055 FO.OO4 X6.0 Z2.0 T0300 M09
the
amounts.
%
Note that (he r IS meaning. fn fact. il is a groove peck. The LOol or .275 per five grooving
•
Multiple
11 is possible to ing lhc075 between cycle cannot lire 36- 14 is
(I
This is not a value wilhoul a
SPECIAL GROOVES
calculated depth of
will be from 01.050 to 0.500, . There will
exactly
(.275/5·.055).
with G15 multiple grooves very easily. uscase, the groove the be equal, clearance specification d in nOI programmed.
There are many more types in this handbook. They are
than can be dc·
cial shapes, used by specific ind a certain purpose. The mosllypical
(hat senc of lhis lype are und several
of spe·
round grooves, pulley grooves, 0 ri Certain grooves, usually those lhat conrorm 10 common industrial standards, can machined with rcad· ily available inserts. A of Ihis kind or is a pulley programming principles 'nons/alldard' arc no differenl than those dcin this chapter.
3
36 03607 (GRV W/SUB-PROG) - 55 DEGREE DIAMOND INSERT) N1 G20 T0100 N2 G96 5500 M03
GROOVES AND SUBPROGRAMS mUltiple grooves with the method for precision are the groove quality and the ':>1J,''-'l.L'F. between the grooves. to program multiple grooves, a more """'I"t"".1i _ one that uses subprograms.
Ogl:a:tIJJnllllg
N3 GOO Xl.2 ZO TOIOl MOS
nr".I't'r"'''1''I
Multiple
programmed very efficiently precision by using the technique Chapter 39. The guiding
,,,,,"<,
n r r.....
and with much of suboro,graJns principle to subprogram groove, in the can be repeated at needed.
N4 GOl X-0.07 FO.OOG N5 GOO ZO.l N6 G42 XO. 7 (START OF CHAMFER) Nt GOl Xa.95 Z-O.02S FO.a03 N8 Z-2.285 N9 00.2 FO.03 NlO GOO G40 X4.0 Z4.0 T0100 MDS Nll Mal
common groove motions in the motions that vary from groove to way, the same groove or vruiable intervals, as
--
1
Nl2 Nl3 Nl4 Nl5 Nl6 N17 Nle Nl9 N20 N21 N22 N23 N24 N2S N26 N27
- 0.125 PART-OFF TOOL) GSO S2500 TOSOO G96 S500 M03 GOO Z-0.S675 T0505 MOB XLO M98 P3657
(POS-GRVl)
(COT GRV
GOO W-O.375 M98 P3657 (CUT GRV 2) (COT GRV 3) GOO W-O.375 M98 P3657 (CUT GRV 4) GOO W-O.375 M98 P36S7 GOO Z-2.285 (OPEN UP FOR PART-OFF) GOl XO.s FO 006 Xl.l (CHAMFE:R BACK START) GOO Xl.O Z-2.2 (rnAMFER) GOl XO.S Z 2.25 FO.003 (PART-OFF) X-O.02 FO.OOS (CLEAR) GOO Xl.2 G40 X4.0 Z4.0 TOSOO MaS
N28 M30 %
TYP. 0.375 TYP.---ALUMINUM BAR Figure 36-17 Multiple grooves programming 03607 is the main program and
In the Figure 36-17 is a groove progranuning, ting tools are used - a
"'lil.IIJI"
h.·"·r.~~,,
ing and a 0.125 wide cuts the part. Part-off operations are and subprograms are cliscussed in vfJ,!JUtI::.J the tool motions related to the progranuned in the mam bans related to the actual groove in the subprogram 03657. An eqllal grooves is used for the example.
of a multiple two cuttom-
03657 (SOB~PROG FOR 03607) (FEED TO ROOGFl OD) Nl GOl XO.66 FO.004 (CLEAR OUT) N2 GOO XLO N3 W-0.087S TO LEFT CHFR) N4 GOl XO.9 WO.OS FO.002 (LEFT CHFR) N5 XO.66 FO.004 TO ROUGH OD) N6 Xl.O WO.0375 FO.03 (BACK TO START) TO RIGHT CHFR) Nt WO.OS7S (RIGHT CHFR) N8 xo.S W-O.05 FO.002 N9 XO. 65 FO. 004 (FEED TO FDITSH OD) (SWEEP BOTTOM) NlO W-O.07S ('BACK TO START) Nll Xl.O WO.0375 FO.03 (RETURN TO MAIN) Nl2 M99 %
This example completes the
Although grooving is a rioll, programming lenge in certain cases,
related to grooving, mach.iniog opera-
a significant chal-
PART-OFF Pm1-of!, sometimes called a ClitOff, is a machining operalion typical 10 lathe work, usually using a barfeeder attachment. During a part-off, the cutting tool (or parI-off tool) separates the completed part from the bar slock. The completed part will fall off the bar, usually into a special bin to protect it from damage.
At the end of the metal blade is usually a carbide insert, with clearance angles on both sides. The cUlling end of the tool is available in several different configurations. always at the end lip of the carbide ponion. The most typical 1001 end configurations are shown in the following illustration 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 extension of grooving. The purpose of part-off is somewhat different, because the objective is to separate the completed 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 control, the other is coolant application.
PART-OFF TOOL
T I
----I
EFFECTIVE CUTTING RADIUS
l --- TOOL WIDTH
Figure 37·7 Part-off tool - cutting end configuration
a~
0 0
b.
e
lei
~
--- ---
[] If
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 the term cutoflis used for Ihis kind of a tool, as well as the machining method; it has the same meaning as the term part-off. -nle part-off tool is similar in design to a grooving lool, with one major difference. The length of the cutting blade is much longer than that of a grooving tool, making it suitahle for deep grooves. A Iypical example of a pan-off tool is illustrated in Figure 37-1.
'-
H Figure 37-2
• Parting Tool Description
-
a
I
Note the two kinds or each grooving insert design shown - the series without a dimple (items a, b and c), and the series with a dimple ([terns d, e andj). The dimple is an intentional dent pressed in the middle of (he cutting edge that deforms (he chip and helps in coiling it. The result is a chip Ihal is narrower than the width of the cut. Such a ell ip does not clog the generated groove and extends the tool life, although it may cost a little more. Also nOle a slight angle on b, c, e and f styles. The angle 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 applications, prohably the most versatile choice would be the ~tyle f, particularly for large cutting diameters. Unlike in the other types of machining. the cutting chips for part-off should coil, not break. The cutting insert with a dimple or a similar design is the best suited for that purpose. It is a common practice amongst programmers to usc only one paning tool for all the work. They select tbe panlog tool long enough to accommodate the maximum bar diameter and leave it permanently mounted in the tool holder, even for small diameters. The reasoning for this approach 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 lecling [hal also wastes material. A short mllTowcr insert will justify the setup
0.1 02.65 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 recby the coolant mar.ufaclUrcL Make sure coolant is supplied al particularly ror pressure coolanllo CUIflush olTihe chips that may accumulate in the
• Tool Approach Motion to program a part-off tool path IS to select a that has enough capacIty 10 completely nue the from a solid bar. The next decision is to the width and the location of the tool reference poi nL A part-off [001 that is too short will not reach the spindle me A 1001 too long may nol be may cause vibrations, even hreak during the CUI. of IS important for good cutting conditions, the tool is proportiono(c to depth caracity. iirSI
0,1
1.875
ZO-
2,125
l
Figure 37·4 Part-off tool approach· right side tool reference - program 03702
In examples, the 1001 change position and final rcsu lls are identical. Comparison of both programs shows values of X unchanged, but the values for Z axis are di (blocks N 122 and N 125). ThiS the
of the
(001
lip.
03701 (PART-OFF
N120 N121 Nl22 Nl23 Nl24 Nl2S Nl26
I LEFT SIDE TOOL EDGE)
Gsa 81250 TOSOO M42 G96 S350 M03 GOO Xl 65 Z-2.0 Toaos MOS GOl X-O.03 FO.004 GOO Xl.55 M09 XS.S Z2.0 TOBOO MJO
%
grooving and The following probetween the [001 reference of the tool tip - Figure 37-4 for program cases, the program zero is the front face of the nnj~hed
NG P01NT
TOOLS
--
, 0125
D.
0.125
1
1.875
2.0
I
Figure 37-3
len side 1001 reference - program 03701
right side and
is consistent with the previous suggestions Selling up the 1001 reference point the 1001 is for the CNC operator. If reason, set the tool reference point on (he to the Figure 37-4.
03702 (PART-OFF
I RIGHT SIDE TOOL EDGE)
Nl20 GSO 31250 T0800 M42 Nl21 G96 3350 M03 N122 GOO Xl.6S Z-1.B75 TOBOB MOB N123 GOl X-D.OJ FO.004 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 leI does exist. Take care position and program the 1001 even if the previous lUrning operations stock. Figure 37·5 shows correct of a part-off tool.
PART-OFF
337 • Part-off with a Chamfer
H--~YES
Figure 37·5 Correct and incorrect approach to stock diameter
• Stock Allowance Pan-off operation does not always mean all the machining has been completed. Often, part-off may complete on Iy the first operation and additional machining will be necessary on the machined part In such an event, some extra material (stock) has to be left on the back face, for subsequent finishing. Leave a stock amount of about .010 to .020 inches (0.3 to 0.5 mm). In that case, the block N122 would be changed in both programs - for example, from Z-2.0 10 Z-2.01 in the first program example 0370] and from Z-I.875 to Z-I.895 in the second program example 03702. Another program entry Ihat is important to look at is Ihe X value in block NI22 - it is X2.65 in the example. That will leave .125 inches aclual clearance above the 02.400. If that seems a lillIe 100 much, think again. Always consider the actual slock diameter, for safety reasons. In the example, the bar stock diameter is 2.500 inches and the aclual clearance will be a more reasonable .075 of an inch per side of the stock.
Not always the machined pal1 will be done during a secondary operation. When the machining has [0 be completed 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 operalion, pan-off tool can be a better choice. Most part-off tools are no! designed for cutli ng sirleways (
Position the tool further in the Z axis
than would be normal/or regular part· off o
Start the part· off operation and tellllinate it just below the diameter where the chamfer will end
o
Return to the starting diameter and move to the chamfer start position
o
Cut the chamfer in one block and part-off in the subsequent block
To illus!rLlte the programming technique, study the following program example 03703 and illustration shown in Figure 37·6 - the loo! n.:Ct:n.:nce poinlls on the lefl side, and (he required chamfer is .020 inches at 45°: CHAMFER 0.02
• 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 to replace the two program blocks N 124 and N 125 with a single block, then return to [lie luul change pusilion IrllllH.!diately after Ihe parI-off:
02.65
02A6 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 rhis, it could be a very hazardous procedure. The part should have been removed by the [001 and it should have fallen into [he bin - but has all this actually happened? A variety of reasons may cause an incomplete part-off. The result is a broken lool, scrapped part, possibly a damage Lo the machine itself Always return in the X axis first and always above the bar stock diameter.
0.015 --; rFigure 37-6 Comer breaking with a pan· off tool· example 03703
03703 (PART-OFF CHFR) (G20) N120 GSO S1250 T08DO M42 N121 G96 5350 M03 N122 GOO X2.65 Z-2.015 TOBDS MOS
x 45°
338 N123 N124 N125 N126 N127 N128 N129 N130 %
GOl X2_2 FO.004 X2.46 FO.OJ Z-1.95 U-O.l W-O.OS FO.002 X-0.03 FO.004 GOO X2. 65 XS.5 Z2.0 TOBOO M09 M30
rigid grooving 1001 can do the startup comthen the part-off tool can do the res£. At of the part-off, the bar stock projecting from a will have a small step. Make sure to cut for each subsequent part LO lake this slep into con-
(LEFI' SIDE OF
• Preventing Damage to the Part
122, (he tool is positioned .015 past the NI makes only a temporary groove (to N 124 is a mOlion out of the oflhechamfer(02.460). rn the 1001 shiflS in the Z axis. to chamfer. The value of 1.950 was and subtractions: 1.875 - .020
.030
T
.125
=
1.950
is the back of the part per value is (he chamfer size; .030 is the insen width. Note the .125 Clll-
usmg
saves a NI will be:
is the Culling. the incremental mode absolute mode, block
safety rules of the com-
Never touch the part while the program is in or the spindle is rotating.
part damage prevention is a CNC lathe equipped with a parts catcher, which is often a speCIal ine option,
N126 X2.36 Z-2.0 FO.002
Also note the
When the part is separated from the bar, it falls down. On , it mily suffer (l seve,re enough to make a a scrap. To prevent the possibility a damage. operator may want to place a with coolant in the path of the falling part. method IS to offset the pan-off 1001 away from the centerline, jusl lhat it does not the Ihe
for the chamfer only, to decrease can be quile remainder of the
In some cases, two lools can justified for part-off of two tools has [0 be accurate. A operations. The
at the time of machine purchase.
For part-off, just for grooving operations, always is an supply of inserts on hand. make sure or with very small radii, are generTools with ally weak some very demanding work. Nobody wants 10 run out of tools in the middle of a very important rush
SINGLE POINT THREADING Threading is a machining 10 cal groove of a particular shape, usually on a major purpose of threads is to connect fWO without damage during joining and and disassembly). The most common "r",,,n,,~,.., fall inlo four major caleg1om:$ devices
o
I-,,,,t,,,n,lnn
o
Measuring tools
... screws
Single point thread CUlling lypically known as a point lhreadlng - uses a lool holder similar to other 1001 holders. but contains one special which may have one, Iwo or three tips. shape and size of (he threading insert must to the shape and size of the fll1ished thread -
nuts
... micrometer barrel
v
o Motion transmission ... lead screw, camera lenses o increase .. , lifting or supporting A thread cuUing is a very versatile manufacturing process. are two main groups of thread production metal cutting and plastic molding. It should nol a surthaI 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
I
the metalworking area of thread production. the of interest, there are o o
o o
flm,'1::1f1<;:nfl
/
01 the thread form and the threading tool shape
a single point threading is a machinll1g rolling or thread (orming and die work milling
o
a hel ical groove of a speci fie shape with a per spindle revolution. The shape or is mainly determined by the shape and mounli ofehe cutting lOOl. The uniformity of advancement is controlled by [he programmed feedrate.
•
Form of a Thread in CNC programof the leuer V) variety of the metric and shapes
THREADING ON CNC LATHES CNC lathes can di tion to the single of feature for a ary operation of production.
a very high quality thread in adboring operations, in a This is a very attractive many machine shops have reason alone. secondthe cost
threads), even on
multiple starts, right or variable lead, cit:.
339
340 •
Threading Operations
o INTERNAL THREAD list of the threading op-
erations thaI can be
a lypical CNC lalhe. Several operations require a speciallype of threading insert and some operations can only be if the control
system is equipped with special (optional) features:
.. , is a thread that is cut on the inside of the for example as a nut CJ
H
ANGLE
·.. is the angle made by the helix of the thread at the pitch with a to the axis
rI,::',nMI>(
o
Constant lead threads
o
Variable lead threads
o
External and internal threading
[}
Cylindrical threads
[}
Tapered threads
[}
o the threading tool will advance along an axis revolution. The lead always determines the and can have constant or variable form.
[} MAJOR DIAMETER
hand (A/H) and left hand (l/H) threads
o Face threads (scroll threads)
... is the largest diameter of the thread
[}
MINOR DIAMETER
... is the smallest
of the thread
o
Single start threads
Cl
Multi- sta rt thread s
[}
Cl
Circular threads
·.. is a thread with more than one amount
Cl
Multi-block threads
o
MUlTiSTART shifted by the pitch
PITCH
... is the distance from a .,,,,,,,...,t,,.rI corresponding of parallel to the machine axis
o
TERMINOLOGY OF THREADING is a relatively large subject, In il is (l whole book dedicated to it. subjects of are, threading has its own technical terms. terms appear in hooks, articles, n-mnuals lOry
olher sources. To understand them is programmer and operator.
... on a straight thread, the pitch diameter is an imaginary 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"
[}
OF THREAD betvveen the sides of the thread, plane
[)
ROOT
· .. is the bottom
of a
the
of tlNo
adjacent threads
[} SCROll THREAD is also known as a thread it is a thread machined the X axis, rather than the more common thread along the Z axis
cutting:
o
PITCH DIAMETER
:J
SHIFT
, .. in multistart threading, it is the by which the 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
[}
.. , is a thread on which the pitch diameter is increased or by a constant ratio as a
DEPTH OF THREAD
.,. generaJly, the distance between the crest and the root of the thread, normal to the axis (in programming, depth is considered as a measurable value per thread side)
o TPI
[}
EXTERNAL
CJ
". is a thread is cut on the outside of the machined part, for example as a bolt
... in English units of measuring, the number of counted over the length of one inch (I / pitch) metric thread is defined by its pitch - TPI equivalent is not applicable
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 tasks in modern machine shop, yet it could be one of the more difficult operations done on a CNC lathe. Initially, it may seem an easy procedure 10 make a program for a tool path that has the cutting parameters very clearly defined, such as threading. Practical applications, however, could present a big departure from theory. This comment may he arguable, at least unwl il is lime to start searChing for solutions to unusual threadi ng problems or even regular threads that just don't seem to be coming out right. An experienced programmer should have the ability 10 think of yet anolher solution, when all the OIher solutions seem to have been used up. This is trlle for any problem solving process and applies equally to threading problems.
For this purpose of mUlti-pass cutting, the machine spindle rotations must be synchronized for the start of each puss, so each thread depth is at the samc position on the threaded cylinder. A quality Ihread will be completed when Ihe last clltting pass produces the proper thread size, shape, surface finish and tolerances. Since the single pointlhreading consists of several passes to cut a single thread, programmers must understand these passes well.
What often makes threading a difficul[ operation is the cutting tool application. The single point threadll1g tool is unlike any cUlling 1001. Although the. holder is moumed in the lurrel just like olher lools, the cutting insert is unique. Threading lool not only elliS, il also forms Ihe thread shape. Frequently, the threading insert has the shape of finished thread. The mounling of a threading toolm the IUrret can be at 90 0 10, or parallel with, the machine spindle centerline, regardless of thread being cuI. The decision which way to mount the lool is delCffilined by the angle of [he thread, relative to the spindle cenler line. II is important that the lool is mounled square in (he (uneL Even a small angular deviation will have an adverse effect on the finished thread.
•
Steps in Threading
Compare a threading insert wilh a common 80 diamond tool used for rough turn ing, and a few oddities wi II emerge: 0
Toof radius: Threading Turning
=:;
=
almost sharp edge typical average is .0313 radius (0.8 mm)
Tool angle: typically 60° and a weak support 80° and a strong support
Threading Turning
Typical feedrates: Threading Turning
up to .25 m/rev (6,5 mm/rev) or more .015 in/rev to .03 in/rev typical (0.4 mm/rev to 0.6 mm/rev)
Typical depth of cut: Threading Turning
::;;; small
= medium to large
The comparison shows that even a tine pitch thread cannot be cut with a single threading pass. A single pass would produce a thread of poor qualily at best and a unusable thread at worst. The tool life would also be much shorter than expected.
In programming, the structure of each pass remains [he sa me, on Iy I he thread data ch an ge fro m one pass to anot h cr. In a most elementary setup, there are at least four motions for each Ihreading pass (as applied to a straight thread): Motion 1
From the starting position, move the tool to the thread diameter in rapid motion mode
Motion 2
Cut the thread - one axis thread cut (at the feed rate equal to the lead)
Motion 3
Rapid retract from the thread
Motion 4
Rapid return to the starting position
Expending on these brief descriptions. the four step (001 mOlion process will typically include the following considerations that are critical 10 the CNC program.
Threading Motion 1 Before the first step, the threading tool must move from its indexing position 10 the position close to the machined parL This is a rapid molion, in the air. Make sure to calculate (he XZ coordinates for this position correctly. The coordinates are called the thread starling position, because they define where the thread CUI will start from ilnd eventually return to. The start position must be defined away from the part, but close to the thread. as (he intersection of the X axis clearance and the Z axis clearance. The first 1001 motion is directly related to the thread. It is a motionfi-oJ1l the starting position fo the cutting diameter of the thread. Since the tbread cannOI be cut at full depth in a single pass, the total depth must be split into a series of more manageable depths. Each depth will depend on type of tool, the malenal and the overall rigid!!y of the setup. This approach motion is programmed in rapid mode .
Threading Motion 2 When the 1001 reaches the CUlling diameter for a given depth, the second mOlion becomes effective. The actual threading pass will be cut during this slep, al the specified feedratc and only when the machine spind!e is synchronized with the threading feed rate. There is no need to take any special steps to maintain the synchronization - in threading mode, the synchronization is automatic. Thc thread will be cui to the programmed thread end position.
342
Chapter 38
Threading Motion 3
In the Third mOlion, when the thread cUlling diameter is completed, the tool must retract away from Ihe thread, at the machine rapid rate, 10 the X axis clearance position. This tool position is normally a diameter programmed Olltside of the threaded area. Threading Motion 4
When programming coarse threads, the front clearance amount required will generally be much greater than the amount for fine Or medium threads. For example, a common thread with 8 TPI requires feedrate of .1250 in/rev! If the Z axis clearance is too small, the machine acceleration process will be incomplete when the tool contacts the malerial. The result win be an imperfect and unusable thread. 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 three to four times the length of the thread lead
lion, when lhe 1001 returns to tile starling posi lioll ill a rapid
mode. All remaining passes are programmed in the same way, just by changing the thread cutting diameter (thread depth control). Note that only Threading MOlion 2 will be programmed in the threading mode, using a proper G code. Threading motions I, 3 and 4 will be in GOO (rapid) mode.
""D
c
(»
"D
ro (»
L-
..c I-
/
INDEX , - TOOL POSITION
In some cases, the Z axis clearance must be reduced because of space shortage. such as when Ihe threading starts very close 10 a tailstock or machine limits. Since the acceleration time depends directly on the spindle speed, [he only remedy for imperfect threads in thiS case is to IOlVer the spindle speed (r/min) - the feedrate must not be reduced.!
I
N
For complex methods of inked, the starting position is changing for each cut by a calculated amount.
J
t
.....ro U) /
t
/
/
• - Start X
. Thread 0
Figure 38-2 Basic steps in single point thread cutting
This typical description illustrated in Figure 38-2, is only general in nature and usually not sufficient by itself for high quality thread cutting.
•
This is only a rule of thumb and works well in every day practice. Control manuals may offer a scientific way of calculating the minimum clearance.
Thread Start Position
The mol starting position is a clearance posilion. For a sU'aight cylindrical thread, the minimum suitable clearance along the X axis is about .100 (1.5 mm) per side, more for coarse threads. For a tapered thread. (he clearance is the same, but applied over the larger diameter. As for Ihe clearance along Z axis, some special considerations are necessary. When the threading 1001 comes into contact with material, it must be advancing exactly 100% of the programmed feedrate. Since the cutting feedrate for threads is equivalent [0 the thread lead. it will take some lime [a arrive at the programmed feedrate. Just like a car needs some time to accelerate before reaching its cruising speed, the threading tool has to reach a full feed rate before it conlaC\S the material. The effect of accelerarion must be considered when deciding the from clearance amount.
Thread Cutting Diameter and Depth
For cylindrical and conicallhread CUlling using the block method of programming (no cycles), select thc cutting diameter 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 culting diameter for each pass must be selected not only with respect to the thread diameter, but also With respect to machinirlg conditions. In ihreading, the chip load on the insert becomes heavier as the cutting depth increases. A damage to the thread, [0 (he insert, or both, can be averted by maintaining a consis1C'11/ chip load on lhe insert. One way to achieve the consistency IS to decrease each subsequent depth of the thread, another way is to apply a suitable infeed methocl Both threading techniques are often used simultaneously. To calculate the depth of each pass, complex formulas are not required, just common sense and a bit of experience. All threading cycles have an algorithm (special process) buill in the control system that calculates each depth automatically. For manual calculations, {he procedure follows a logical approach. The lotal depth of the thread (measured per side) must be known - programmer decides how many threading passes will be suitable for the particular thread. Another value to be decided is the last cut depth, the cut [hat actually finishes the thread. These values usually come [rom experience. The rest is limited to mathematical calculations or available charts.
POINT THREADING
3 Pass #1 depth - 0.0140 depth - 0.0100 depth - 0.0080
Pass #7 depth - 0.0031
Accumulated depth = Accumulated = depth = Accumulated depth = Accumulated depth = Accumulated Accumulated
Threading diameter Threading diameter Threading diameter Threading diameter Threading diameter Threading diameter Threading diameter
3.0 - 2 x 0.0140 3.0 - 2 x 0.0240 = 3.0 - 2 x 0.0320 3.0 - 2 x 0.0385 = 2.9230 3.0 - 2 x 0.0435 = 3.0 - 2 x 0.0480 3.0 - 2 x 0.0511 = 2.8978
Pass Pass
Pass #4 depth 0.0065 Pass #5 depth - 0.0050 Pass #6 depth - 0.0045
0.0140 0.0240 0.0320 0.0385 0.0435 0.0480 0.0511
,03.0 NOMINAL 02.9720
"""----- 0 2.9520 02.9360 02.9230 02.9130 02.9040
o Figure 38-3 Threading diameters distributed for
Figure
load
~where
o TPI P
::=
#6
#7
in check for accuracy. is from the nominal diameter, any error in calculation is not accumulative and might be hard to flnd A much method is to calculate each threading diameter based on the calculation, using single depth of cut, not the accumulative depth - compare it with the last method:
xP
Threading diameter #1 Threading diameter #2 Threading diameter #3 diameter #4 diameter #5
... =
#2 #3 #4 #5
There is nothing wrong with the threading diameters. Wllat this method
shows a
only an example). It lS a has to find single depth of the cal way to do it, using a "t<>Y1rl<>,cJ'i profile external thread on lhe fulluwing thread metric extemal threads only:
D",,---:::::: TPI
#1
Single depth of external thread Number ofthreads per inch Pitch of the thread (l;TPIj
According to another thread specification standard (UN thread fonns), the constant in the fonnula is 0.64952. which would make the depth 0.0541. For a full profile internal thread, tbe formula to calculate the depth will be used for metric and American National threads only - D value is the internal depth:
D:::
054127 TPI :::: 0.54127 x P
If seven threading passes are selected, \Vith the last pass of 00031 (for programming convenience), the individual depths can distributed the following way:
diameter #6 Threading diameter #7
3.0000 - 2 x 0.0140 2.9720 - 2 x 0.0100 2.9520 - 2 x 0.0080 2.9360 - 2 x 0.0065 2.9230 - 2 x 0.0050 2.9130 - 2 x 0.0045 2.9040 - 2 x 0.0031
= 2.9720 = 2.9520 = 2.9360 =
2.9230
= 2.9130 = 2.9040 = 2.8978
advantage of this method is that once the last diame(2.8978 in the example), add the double depth the must be equal to the nominal or 3.0000 in the example:
+ 2 >< 0.0511
3.0000
• Thread Cutting Motion
344
Chapter 38
malian, do not use preparatory command GOI for threading. If GO I is used, the start for each pass will nOl be synchronized Wllh Ihe previous Ihread slart. Inslead of GOI command, use a G code specifically designated for threading. G32 is the most common code used by Fanuc controls for threading. During a thread cUlling motion G32, control system aUlomatically disables the feedrate override. The CNC operator has 10 be extra careful to sel Ihe Ihreading tool exactly, particularly when thread ends close to shoulders oftlle parI. To illustrate the programming process up to this point, here is a lypic!)1 program section: N61 GOO X3.3 ZO.3 N62 X2.972 N63 G32 Z-1.7S FO.OS33
•
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 mOlion in Ihe basic threading process. The relr<:lct motion can have two forms - straight away in one axis (normally along the X axis), or a gradual pullout in two axes (simultaneously along XZ axes) - Figure 38-4.
. . . STRAIGHT PULLOUT . . . GRADUAL PULLOUT Figure 38-4 Straighl and gradual pullout from a thread
Generally, Ihe siraigh! pullollt should be programmed whenever the tool ends CUlling: in an open space, for example in a relieve or a recess groovc. For threads that do not end in an open area, the gradual pullout is a bcHer choice. 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 replaced by a rapid motion mode, using the GOO command: (RAPID
our)
For the gradual pullout, the threading G code and the I'eedrate must remain ill effect. When the normal length of thread is completed - but before the tool is retracted - the threading tool moves in IWO axes simultaneously, ending outside of the thread. The normal length of the pullout is usually I to 1-1/2 times the lead (no( the pitch), the suggested angle IS 45°. It is also importnnl 10 pay alten(ion to [he clearance diameter.
(GRADUAL PULLOtIT) (RAPID OtIT)
For eJ.;rernal threads, the clearance diameter must always beJurther away from spindle center line l.han the diameter of gradual pullout. For inremal Ihreads, the clenr(lnce diameter must be closer [0 spindle center line than the diameter of gradual pullout. Figure 38-5 illustrates the concept.
CLEARANCE 0 THREAD 0 CLEARANCE 0
(START POINT XZ) (THREAD DIA START) (THREAD TO END)
Retract from Thread
N64 GOO X3.3
N64 UO.2 W-O.l N65 GOO X3.3
PULLOUT 0 THREAD (21 Figure 38-5 Thread pullout and cfearance diameter (external example)
• Return to Start Position Regardless of how the tool retraction from the thread is programmed, straight or gradual, the last step in the threading process is always a return Lo the starting position. This 1001 motion is entirely in the open space, therefore programmed Il1 the rapid mollon mode GOO. Normally, tile return motion lo the starling position is along one axis only, usually the Z axis. This is because in most programs, the 1001 retraction from the thread has already reached the X axis diameter. Here is a complete program excerpt - gradual pullout is shown: N61 GOO X3.3 ZO.3
N62 N63 N64 N65 N66
X2. 972
G32 Z-1.7S FO.OS33 UO.2 W-O.l GOO X3.3 ZO.3
(START POINT XZ)
(THREAD DIA START) (THREAD TO END) (GRADUAL PULLOtIT) (RAPID our) (RE'IURN TO Z-START)
THREADING FEED AND SPINDLE SPEED In threading, the choice of the cutting insert, the spindle speed and feed rate selection are rather restricted. Both, [he clllling tool and the feedrate arc determined by the finished thread, as specified in the engineering drawing. Threading illsert is one of the weakest tools used on CNC lathes - yet its appl icauons demand some of [he heaviest feed rates used ll1 CNC lathe programmtng for any tool. Other factors that can influence the final thread have to be dealt with as well, such as spindle speed, the depth of each threading pass, the too! edge preparation, setup of the cutting tool and insert, plus similar considerations. Often, a change of only one factor will correct a threading problem. Figure 38-6 compares 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
should be applied for
NG
nm"_""",, of turning and threading feedrates
•
Threading Feedrate Selection
of feedrale for general turning or boring is factors as material 1001 nose radius, refinish, etc. In this sense, the and boring cover a large In Ihreadis limited. The threading IS by Ihe lead of Ihe thread - never Ihe drawings, lhe thread description is of threads over one inch length, or inch), and a nominal diameler. As an exthal is described in the drawing as means thread has 8 fhrecu/s per inch, and 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 correct feed rate are the oj {he oj threading starts.
It may help to some of the basic relationships of the Thread lead and thread pilCh (see the terminology threading in Ihis chapler). In a common machine shop conversation (shop talk), the words lead and pitch are often used incorrectly. The reason is thai for a single start thread, the amount of is identical to (he amount the pilCh. Since mosl shops work wilh a Slarlthread on a Ihe mislise of Ihe terms is seldom noticed. In all laps have a sta.l1. What may in a shop talk language has 10 be interpreted CNC programming. Each lenn has a in threading, so use them in the correct
or
; ;:; F
~
where ...
== Required
F
L
P
==:
n
(in/rev or mm/rev) Lead of the thread (inch Of mm) Pitch of the {inch or mm) Number of starts (positive integer)
For example, a thread with a 11
start and the pilch rccdralc of
three millimeters (3 mm) 3 x 1
= F3.0 uni(s, the above
~
where." P TPI
=
Thread pitch Number of threads per inch
an example. the thread with one srarl of x 1
~
.125 x 1
8
will
= FO.125
threads are special ill lllally IS also the lead - nOl rhe
• Spindle Speed Selection The speecl of Ihe $pinrlle for thre!"lrl is nlwnys proin direct ilmin. never as a constant means the preparatory command must be
S, specifying the number of revolution~ example, G97S500M03, will II
over
j-: Ime
rhm single
di amelers
,",01"",,,,,"
346
Chapter 38
and the root of thread, so G96 sclection would seem logical. This is not the casco First, even for fairly deep coarse threads, the difference between the first and last diameter is insionificanL Second - and this reason is even more IJnportant- the thread cUlling rouline requires a perfect spindle llnd feedralc svnchroniWlioJ! at (he slart of each pass. Such synchronization can be more accUfmcly achieved only with constanl r/n/in rather [han constant surface speed (CSS). For the majority of threads, the selection of dmin requires only consideration of general machining conditions, similar to other turning operalions. At the same time. selectlhe spmdle speed with some consideration of the feedrale. Because of the heavy feed rates used for (hreading. [here is a distinct possibility lhat certain threads cannot be cut at any available spindle speed. If this is confusing. keep in mind thallhe feedrate is determined not only by rhe lead, but also by the overall capability of the machine. Every CNC lathe has a programmable feedrate value, specified In either in/mill or min/mill. up 10 a cerlai n max i mu m for each ax is.
Take a tYPlcal maXlmum programmable feed rate for the 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 and the fcedrate per revolulion. The result of this relationship is actually Jeedrale expressed in fums of lime. notycr revolution. The fc:edrale per lime is always Ihc result 01 the spindle speed in direct IImill mulriplled by the i"eedrate per revolution in in/rev or mIT//re\!.
e
English example:
700 r/min x .125 in/rev = 87.500 in/min
e
Metric example:
700 rpm x 3 rom/rev
= 2100 mm/min
e
English example:
Jr the thread lead Lis .125 and the maximum feedrate for Ihe X axis Frm(J\ is 250 in/mill, then the maximum threading speed RJ""\" will be: ~
=
250 /
.125 = 2000 r/min
Q Metric example: If the thread lead L is 2.5 mm and the maximum fcedrate for the X axis F[mu\" is 6350 mm/min, then the maximum Rmil< threading speed will be: ~
: 6350 / 2.5
~
The max i mum allowable rlmin only reflects Ihe Cilpnbilitics of [he CNC machine. The feed rate actually used in a program must also take inlo account the various machining and setup conditions,just like any other tool path operation. In practice, the majority of actual programmed spindle speed (r/min) will be well below the maximum capacity of the CNC machine tool.
•
Maximum Threading Feedrate
The select ion of culli ng feed rate in general was discussed earl icr, in Chapler J]. Afler studyi ng the section on the maximum r/min selection (spindle speed), it should not be surprising that Sllnilar limilations apply to the determination of a maximum threading Jeedrate for a given spindle 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. Maximum programmable threading feedrate for a given spindle speed (in dmil1) can be calculated from Ihe following formula:
Ftma"l< S
1n CNC lathe programming generally, not only in threading, always make sure lhalthe feedrLlle per revolution combined willl Ihe· "peed will he l(,H Ihon nr ('qual In the maximum available feedralc per lime Cor the axis with the lower raling, which is usually the X axis.
2540 rpm
where ...
IEf
Fr "la,
Based on this simple rule, [he maximum spindle speed for a given kad can he selected according to the following formula:
Ft ,,>ox
S
:=
Maximum feed rate tor a given spindle speed Maximum feedrate per time IX \ axis) Programmed spindle speed (r/min)
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) L "''' lead of the thread =:;
Therefore. the maximum thread lead that can he cut at 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 or 6 threads per inch.
~
where ...
:::::
Metric example:
=:
6350
I
1600 = 3,969 mm/rev
means the maximum lead that can 1600 rlmin must be less than 4 mm.
at
values only indicate the aClual and the machine and do not or even suitable machining
•
Error threading feed rate requires
decimal place accuracy for Ihread.:; in format), and three decimal place accuracy (F3.3 format). ll1e majority of accuracy is quite sufficJent. There is never threads, regardless of Lhe th(cad thread is defined by its lead already in drawing. threads programmed in the thread lead musl calculated from the given inch (TPI) in drawing. For many English threads, within [he four lead is able A 10 TPI feedrate of of divide the TPI into one
accurately, such as 8, 10, 16, most common number of threads.
I mto IhlS rather convenient group. For
Not a.ll
many other rhreads, the calculated value must be properly rounded
off.
example. The exact threading Take a 14 TPT thread, J I inches per revolution. feedrate should be JII program should be FO_0714_ The rounded used in is no noticeable error at all Over a short thread ll1al is not true and the thread is well or the rounded value has if the thread is unusually accumulative errOl; known been improperly in a possible scrap due to as the thread lead err01~ will rounded value of ,0714, an incorrect thread_ ilie loss is .000028571 thread revolulion. can be casi Iy calclliated; Lead error over one i neh
Maximum lead error per inch 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. Another somewhat more critical, is rounding a with 11.5 should be with Ihe feed rate of [0 FO,0870, the accumulated error is the error over 50 inches will machine does not allow feedrate, the proper roundthe errors
Compare the they cause (11.5 TPI over
error of ,0325 error of .0250 error of .0825
.0869 .0870 .0871
What a difrerence rounding.
one tcn-thousandths of an inch
pothreading benefi t of using it allows programming the standard four for threads allowed for metric threads using the E audress is seldom used). With proper roundlOg, the accumulative en-or is virtually negligible.
ng the same illustration of 14 TPI over error l'or the whole length will only he ,0003 FO.0714
j" replaced by E0071 a thread with 11.5 threads with the feedrate
error over
fifty inches will be only
a
crror is always a potential problem when prothread leads, Depending on the kind in the machine shop, the the thread lead may be critical or it never 10
with.
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 thread cutting, (here will be five blocks of program threading pass. When coarse threads, in hard or exotic materials, even some mulli star1 often means quite 11 program,
A 1001 selup is !O a good mcnL Wh a setup is important to
mnre Imroftilnl 10 mainlam a good setup of the tools, external and internal. The tool cutting edge has!O ""{"""F'\! oriented, securely moullted in the to be the right type. Its reference point, setup, is also very en tical.
errors, and even are the negative On the plus side. (he gmmming control over rhe fhread. control capable hands can often be applied La some i lechniques, ror a threadi ng tool much smaller than lhe thread it<;el or rnaktool. large knuckle threads with a round
lj
v I
..... .....
..... a'
b
Thread programming
--d~
-d-
-d--
I'or a constant lead thread is avai
the block technique on all CNC lathes that
support threading.
c
Figure 38-7 Typical reference points for sewp of threading tools
this of threading is on some controls, but G32
The preparatory
The rererence point of a considerations than for turning there are three possibilities, in the programming frequency. The third version (c) is the rarest and virtually no hendillo the programmer in some cases of hand threading, For mOSl lefl hand one of the two versions i~ also quite su The Ihreading insert sclli for general use and dcr. Configuration in Figure
Gj2. Command is the standard G
and compatibles.
In an example, a 12 extemalthread will be used. All cuts are disLribUled in seven for the total depth
or .0511:
Pass # 1 depth
=
Pass #2 depth
.0140 .0100
Total depth Diameter Total depth
Pass #3 depth Selection of the tool (G50 or geometry is the mas I offset selling) as tooling desirable one. when the selsetup for any lype of ling, regardless of the al the same lime. In some cases. an must be made for Ihe difference between the ... u"n"~ edge and the actual edge. The lOol! list this value precisely, or one half of the threadi width (if applicahle) can be ll~ed instead.
point thread programming gralR 111is method, or
IS
mOLion associated with the il as an individual block of lhe prois called block-by-block Ihreading
method.
=
#4 depth
=
Total depth Diameter
2.9360
.0065
Total depth Diameter
.0385 2.9230
.0050
Total depth Diameter
.0435
.0080
Total depth
,0320
1 .0480
2.9040 #7 depth
BlOCK.. BY.. BlOCK THREADING \0
.0240
2.9520
lilat
Ihrcading and
.0140 2.9720
=
.0031
Total depth Diameter
make sure all diameters are calculated without errors. Small error can cause threading operation in program 03801 will use the {ool and offset number 5 (T0505), at 450 r/min
(G97S450):
SINGLE POINT
9
03801
BASIC THREADING CYCLE - G92
(N4S GSO Xl2.0 Z4. N46 TOSOO M42 N47 G97 S450 M03 N4a GOO X3.2 ZO.25 T0505 MOa
Now, the thread start stage is to implement the first pass:
The next
hlock,
N49 X2.972
(PASS 1)
N50 G32 Z-1.6 FO_Oa33 N51 GOO X3.2 N52 ZO 25
.083333)
remntntng six passes can programmed next, just by changing the . Note that Ihe threading feedrate 110/ repeat - it is modal from block N50 on. NS3 X2.952 NS4 G32 Z-l. 6 N55 GOO X3.2 NS6 ZO.25
(PASS 2)
N57 X2.9360
{PASS 3}
NSf! N59 N60 N61 N62 N63 N64 N65 N66 N67 N68 N69 N70
can perform results in is especially for block-by-block \001 program shortened significantly. same program example thaI illustrated the and apply it to a simple threading This cycle is usually called the 092 threading on Fanuc controls. Incidentally, 092 in the tlueading context has nothing to do with [he command of the same name, the traditional and now old-fashioned 092, the position If the lathe conlrol uses G92 use G50 for the position controls only, offsets.
(hread
The
L
G32 Z-l. 6 GOO X3.2 ZO.25 X2.9230
IS
(PASS 4)
START 0
G32 Z-L6 GOO X3.2 ZO.25
THREAD (21
xo
5)
X2.9130
G32 Z-1. 6 GOO X3.2 ZO.25
X2.9040 G32 Z-1. 6 N71 GOO X3.2 N72 ZO.25 N73 X2.8978 N74 G32 Z-1.6 N75 GOO X3.2 N76 ZO .25
6)
L=
c=
Z=
(PASS 7)
Block N76 terminates the c an as if there are no more too! s N77 X12 0 Z4.5 TOSOO M09 N78 IDO %
as odd in the example, is the Observe the three blocks diameter - they are always the same. passes these repetitions wiJI hlock-by-block method has one main full control. Adjustments ~."..... h",.. of rhreads and depth of method and a gradual pullout Actual program editing after it ha<; is much more inconvenient
38-8
G92 - simple thread cutting
For a comparison with the G programming method, the same thread will 12 threads per inch on a 3.000 inch external program will do exactly the same job, except it will have a noticeably different structure. Using the 092 cycle, the laled diameters for each lhe program (no change at #1 depth #2 depth depth #4 depth depth #6 depth #7 depth
= :::: :::::
:::::.
= :::::
::::
list shows (he calcuwill appear in
350
Chapter 38
the threading
1001
and spi ndle speed - 1001
has been
rrogram, the conlrol system will threads to cuL while they the previous block.
5 (T0505) and
lilal there are more aClUally completed in
03802
The simple threading (N45 G50 X12.0 Z4.5) N46 TOSOO M42 N47 G97 S450 M03 N4S GOO X3.2 ZO.25 T0505 MOS
(START
first four blocks are identical to In the next step, the threading tool will at the first pass diameter, chase the thread, retract from the thread and return to the last blocks are repetitive for each benefit the lhreading cycle is that it eliminates data and makes the program eaSIer to fOmlal for
I:@i'
the G92 straighl
Current diameter of "" End position of the thread Threading feed rate in in/rev
various lathe cycles were the normally for turning and boring. In this will aim at one more of the multiple cycles, this time used for various threading appl
pass
The first threading pass will - N49. Note the X axis and lheZ the cutting feedrale: N49 G92 X2.972
Z~1.6
FO.0833
of CNC development, the simple cycle was a direct re~mll of the its The computer technology
as well as
(PASS 1)
The control system will Ihe X value and the last before {he cycle call as the starting position for the point for the cycle. In 7.0 25 (block
can be IS no
grammed jusl by to repeal the Z value or
pro~
(PASS 2) (PASS 3)
NSO X2.9520 N51 X2.9360 NS2 X2.9230 NS3 X2.9130
(PASS 4) (PASS 5)
N54 X2.9040 N55 X2.8978
(PASS 7)
(PASS 6)
completed by an automatic return of the thread. From that the same way as for G32. NS6 GOO Xl2.0 Z4 5 TOSOO M09
lout can be programmed with to ling [he G92 cycle. If Ihe control system always use the - G76,
An
G92
MULTIPLE REPETITIVE CYCLE - G16
cycle is:
where ... X Z F
is just that - it is simple.
without any frills. II any special infeed methods, ill fac\. Ihe only method is a straight plunge type. Later in this chapter, the plunge method of infecd will be described as notsuitable most threading operations.
and many great new programmers. These new development. One of the another ror threading - a live Ihreading cycle G76. This cycle is plex nO[ because it IS difficult to use trary) it has some powerful
fully
Ihe impact of G76
and
It wlIh the origmal G32
cycle jusl described. While a program using method requires four or even blocks of proeach threading pass, cycle requires one hlock for each threading cycle will do thread in olle block code (two blocks some the G76 cycle, any threading occupy only a very small pomon or the editing on the ma(if necessary)
even the
There are two programming Ing on (he conirol model This is the other lathe cycles .
• G16 Cycle Format 10T/11T/15T
NS7 M30
%
A threading cycle requires initial data input - information
provided to the control that
One frequent with this is to only by another motion cycle can motion GOO. If GOO IS Ihis case by a
terms. Figure 38·9 illustrates Ihe controls.
the thread in machining for Fanuc JO/11/15T
POINT
351
;.-....
~
K
x
where ... First block: p
= ,.. is a six-digit data entry in three
Z-END
a:::::
L:: TOTAL 0:: FI K:: TOTAL X:: ROOT
R;;;:;
Figure 38-9 G76 - Multiple repetitive thread cutting cycle (10m
These parameters form the structure
de (for external or internal mrea(lS
~where
x=
... Diameter of the last threading pass
Z == Position indicating the thread end I
Amount of taper over the total length
K == Single depth of the thread - positive D = Depth of the first threading pass - positive A = Included angle of the insert - positive P Infeed method (one offour)- positive
Observe differences in the fonnat structure for pie cycle G76 with the basic G92 cycle. cycle to be simple, but internally, it is very complex - the system must do a large number of calculations This is one reason why we use computers - to them do the hard work. These calculations need data (repetitive information), in the form of input parameters that establish the specifications. Yet, in spite of the more input values, the G76 is a very easy cycle to use in
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 (00. 29, 30, 55, 60, 80 only) Minimum cutting depth (positive radial value· no decimal point) Fixed amount for finish allowance (decimal point allowed)
Second block: (a) last diameter of the thread (absolute diameter) ... or ... (b) The distance from the start point to the lastthread diameter {incremental} 2 =: End of thread along the Z axis (can be an incremental distance W) R difference between start and end positions of the thread at the final pass (RO for straight thread can be omitted) p:::::;; Height of the thread (positive radial value· no decimal point) Depth of the first threading pass (positive radial value - no decimal point) F Feedrate of the thread (same as the thread lead) X.;:;:;;
a
follows the logic of several lathe cycles in Chapter 35. Do not confuse the P/QIR adthe flrst block with the P/Q/R addresses of the They have their own meaning - within each
block only!
o
English (External 1-11/16
with
NlO G76 POl1060 RO.003 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 cycle is somewhat changed from the lOll1l15T models. and remam same, the difference is only how data input is stmctured. line input, described earlier. a two
block entry for a fomlal is;
N20 G76 POll0GO RO,05 N21 G76 X76 0 z-30 0 P812
Fl 5
• Programming Example The earlier example oftne thread, with 12 temal diameler 00.000 076 programming method. controls are shown, using only the minimum program blocks (last tool sho\VIJ in
352 03803 (G76 METHOD - ONE BLOCK METHOD) (N45 GSO X12. 0 Z4. 5) N46 T0500 M42
N47 G97 S450 M03 N48 GOO X3.2 ZO.25 TOSOS MOS N49 G76 X2.8978 Z-1.6 IO KO.OS11 D0140 A60 P4 FO.OS33 (or F/EO.OS3333) NSO GOO X12.0 Z4.S TOSOO M09 NSI MJO %
Several points relating [0 the program may need clarificalion. 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 parameter in block N49, which is lhe threading cycle call. For instance, to change the depth of the firsllhreading pass to .0160 from the currenl .0140, all [hat has 10 be modified is the entry of DO 140 (0 DO 160. The comparison of the G76 cycle with G92 cycle is unfair, as each cycle is the product of a different technological era. They coexist in [he same control unit even at the present lime, mainly to be downward compatible with older programs. The two cycles are 3 good iIlustra[ion of some signincant differences between programming lechniques. For example. in the G92 threading cycle application, inof each thread pass diameter is important, in G76 cycle, only (he lasl pass diamcler input is importan!. pUI
Internally, the CNC syslem does all necessary calculalions. The supplied inrormalion is contained in the program. First, the control registers the thread sta11ing position, the same way as for G92 cycle. In (his example (block N48), the position is X3.2Z0.2S. The next slep the control goes through is the evaluation of all G76 parameters (the programmed data in block N49). The X value is the diameter of the last threading pass, the K value is the thread deplh. That provides enough information for the control [0 'know' what is the theoretical premachined pan diameter (the actual premachined diameter cannot be known). This relationship is important for selection of the tool rapid approach direction. If the Ihread star! diamelc( X is la/ger than the last pass diameter, the threading is eXlemal. If lhe thread start diameter X is smaller than the last pass diameter, the thread is imemaf.
The Z value. in [he G76 cycle has the same meaning as the Z value in the G32 Ihread clilting or the G92 threading cycle. It represents the end position of the thread and controls the thread length. Two parameters unique 10 G76 cyclc are the I and [he K values. The 1 value is always a zero if a straight diameter (hread is cut. A non-zero value is used for laper threads, where it represents the smgle difference between the start diameter of the cut and its end diameter (described later in lhe section dealing with a tapered thread).
Chapter 38
In the two block version, the same program will be very simi lar, applying the samc logical thinking. 03S04 (G76
METHOD - '!WO
BLOCK
METHOD)
(N4S GSO X12. 0 24. S)
N46 N47 N48 N49 NSO NS1 N52
T0500 M42 G97 S4S0 M03 GOO X3.2 ZO.2S TOSOS MOS G76 P011060 QOOS RO.OO) G76 X2.8978 Z-1.6 POS1l Q0140 FO.083333 GOO X12.0 Z4.5 TOSOO M09 M30
%
There are few other parameters to explai n, but first look at how the cycle calculates the tirstlhread depth. The higher le\)el controls using the one-block inpur will be used/or the expLanmioHS} unless mentioned olhenvise.
.. First Thread Calculation For the G32 block threading, as well as for the Gn simple threading cycle, the thread starting position was always determined as only reasonable, applied to both axes for the purposes of supplying a suitable tool clearance. The Z axis clearance in the start position block only lakes into consideration the lead of the thread and the spindle speed. Its purpose is 10 prevent cutting imperfect threads, due to the machine acceleration for lhe feedrale. The clearance for the X axis is an arbitrary clearance for the tool to move away from the thread. The same principles apply to G76 threadIng cycle as well and can be used the same way as In the previous thrcading methods. There is one major difference from programming the G32 and the G92 methods. In the previous threading examples, the starting position for the X axis was X3.2. In the G32 block CUlling, as well as in (he G92 simple threading cycle, [heftl'St threading diameter was all-vays programmed (in the examples, [he value was X2.972). This is nOl the case in the G76 threading cycle. In this cycle, it is the last diamete.r (hat is programmed - not the first - and lhat means the first cut diameter must be calculated by the control system internally.
The calculation of the firs/ thread diameter i~ done completely by the control system, providing the following In[ormation is supplied:
root diameter
o
The
o
The total thread depth
o
The first thread depth
I X value I ! K value I [ Dvalue I
Based on the supplied values, the first diameter TJ of (he thread will be cJ.1cu lated as:
Tf
=
X + (K x 2) - (D x 2)
POINT THREADING
353
X is 2.8978, K is II P0511), the first Ing depth D is .0 J40, entered in program as DO J 40 or QO 140, depending on Ihe Therefore, the d of the thread '0' will
= 2.8978
+ (.OSl1 x 2)
- (.014)( 2)
Tf = .2.9720
resull is same bUllhls lime it was
melhod has Its own procedures. o
amount
o
Constant cutting depth
r:J
One
o
Both
p
•
THREAD INFEED METHODS the material can be in several ways. of the mOSI important is the method that controls threading tool approach the thread, also known as the lhreading infeed. is a method detailing of [he threading 1001, one of fwo basic as illustrated in
the
cutting cutting
of the G76 cycle
the feature.
Radiallnfeed
is one of common methods, It can to a unidirectional, the cutting tool. the diameter 1001 is straighl for each new pass. as the X dala in the program. parameter IS used for a radial i grammi and G92 simple threadi IS no parameter to program, The Z axis start position is the same for thread diameters and is easier to The radial Inthe
mOSI
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 curling of the chips will also to each other. In applications, lhis will cause temperature and wear problems related to decreasing depth each infecd may not problem. If the radial In does not produce a high thread, a compound infeed approach will generally a much heller job.
RADIAL I
I
•
Compound Infeed
COMPOUND
also called a flallk in of !he [001 tha! moves
Figure 38·10 Radial and Compound infeed for thread cutting
One common the plunge method,
method in thread programming is called the radial method, also known as or perpendicular' other method is an angular method, beuef known as a compound infeed or aflank infeed. The need 10 infeed direction in offer the best conditions for the insen for threads with very leads and some soft the majority of cut~ will bene/it from a compound infeed (al an Ihreaded shapes are ror the reason of will always The angle of ill lhe G76
geometry - for example, a
thread
a plunge lofeed (straight is programmed wi Ih the A
infeed).
or
wards the duced by shape of a chip produced threading 1001 the away from Ihe tool
10-
The
the 10011 ife. The of rhe chip CJn be hea vier passes will be required for mosllhreads. In :-.hown Ihe compound where one is in constanf contact thread wall. There is no cUlli only undesirable which may cause a poor surface linish on the avoid Ihis problem, (he mfeed than the Oank hal f of the thread A Iypieal V-thread, with 60u Inangle 30° and the should be a lillie than thal, say 29". Keep in - the shape or geometry of the thread is nm that is built insert What is is way into the how the insert cut - figure 38-11.
3
38 controls (higher level), cycle, Lhat and defines Ihe cutting
•
with
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 the in feed method of a threading tool is the address A, 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..
• Thread Insert Angle - Parameter A controls), a non-zero value [he tool angle, a value that is equal 10 of the threading insert. The tool approach towards the part will be a lillie
than one half of the standard A60 is programmed in will be slightly less 30°,
Only the following
For example, if cycle, the in feed for the extra clearance.
A angle settings arc allowed in a
controls relating In addItion to the radial infecd with the AO
flr"rrlnn/~r1
,,".7"r·" parameter A), there are
main CULling
methods of control38-/2):
Fanuc CNC lathe controls
ling
076 threading cycle:
two
Ihal can be used in programming a thread infeed - a cut and a zig-zag CUI. terms refer to of cutting edges employed at one lime. The one cut refers to CUlling with one the zig-zag cut reo to CUlling with IWO clilfing of them can be in conjunction with A thread angle parameter and Ihe cUHing depth or a conslant depth. thread CUlling
, \
ISO
AD A29
ACME
ANSI
A30
Metric
DIN 103
BSW,
A55 A60
Standard 60° V-thread
ABO
German
English or Metric
thread information and funher thread forms, an is very commonly used for a lire changing
programming notes are A Merrie Trapezoid thread, with 30" , an induded angle of its usage had declined even munc standard worldwide. As A80 PG il is (\ special German pipe (Pollserrohrgewillde) , with the included angle of 80°, nOI common in Nonh
P3
P4
Figure 38· 12 elJNing fDr G78 threading cycle (parameter P) Used on 10/11/15T models
Pl P2 P3 P4
One Two One Two
cutting ... Gutting ... cutting ... cutting ...
with with with with
constant amount constant cutting amount constant depth constant cutting depth
SINGLE
THREADING
355
On Fanuc lathe controls manufactured before the lOT, the P in the cycle was not available. is oow the P I parameter was the The fault. lhal do suppon the P parameter. if the call, PI cUHing method is is the most common threading application for many jobs. It will apply one cutting 1001 and the cons/am CUlting amount. That will result in equal chip volume removaL Feel to with the Olher three options as well.
ONE-BLOCK M
DIAM
--
03.0000
0.0140
02.9720 0.0100 0.0080 .9230 02.9130 02.9040
OD CALCULATIONS
02.8978
- S1 S2 S3
a program needs [0
control other
{he G76
Unfortunately, there is only one - take a pocket calculator and calculate toot position and 1001 motion individually. ]s it a lot of work? Yes. Is it worth doing? Absolutely. It has to be a because even a sJlght modification althe very difficult. A top class programmlOgjob is worth (he extra lime and effort when qualily and of the final pan depends on ie Quality is not programmers (and machine operators) have LO Invest some time into it. The principles of "",n,",,!>] block-by-block programming are work may be tedious and impractical. Each threading a difrerenl Z aXIs start position. is lhat must be calculated exactly, will fail. It also had bener be nght the the changes could be long and COSily. example, the same thread will be as in (3.0-12 TPI). Program will use the with a modified compound i
• Initial Considerations The thread used for the examples in this 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 In there are seven the Z value (total in Figure 38-/3. shows the distribution of each for the seven threading passes and the illustration:
Figure 38-13 Compound in/eed calculations for 632 block-by-block threading
Pass Pass Pass Pass
#1
#2 #3 #4
Pass #5 Pass #6 Pass
depth depth depth depth depth depth depth
at at at at
( single depth ( single depth I single depth ( single depth ( single depth ( single depth ( single depth
at at at
lers, Figure tances. When the Z
tance must be and the threading based on Ihe last calculation.
.0140 .0100 .OOBO .0065 .0050 .0045 .0031
J
I )
I } ) }
and threading pass diameas an Sand S I-S7 disis shifted, [he shift disbasis of compound angle Any new calculation must be
• l Axis Start Position Calculation The Illustrated distance S the IOtal the nominal Z axis position, in Ihe grammed as ZO.25. The is to the Z Theorelically, it shift IS programmed - 'A"I''''',,,,,, thread.
Although another approach may distance will be calculated firs\. total II and lheselectcd compound infeed ing a standard trigonomelric formula will ranee value: S :
.0511 x tan29 = .028325l93
,so usS
356
38
a threading be its relative as an in the
The seven shi positions can be calculated, based 011 the of ZO.2783 at the 03.000: #1
D
x
Sx = Shift for the current thread pass· incremental D :::: Single depth of the current thread pass
Calculation for each uses same formula, changing the D depth input. in mind that the of this process is to find a new Z start pass· i.e., Lhe Z value for a 38-14 illustrates the process.
S - 51
#2
=
#3 #4
:::
#5 #6 #7
:::
.2705 .2650 .2606 .2570 .2542 .2517
-
-
S2 53 54 S5 86 S7
'"
the start Z axis position position
.2783 .2705 .2650 .2606 .2570 .2542 .2517
- .0078 - .0055 - .0044 .0036 - .0028 - .0025 - .0017
=
.2705 .2650 .2606 .2570 .2542 .2517 .2500
This example shows the initial the thread, then moved one step at a nal 20.25 position. Using Ihis method that the originally set .250 never be smaller. Only the Z value will programmed values are not affected at all. The complete program is not short (which is typical with programming), but it docs illustrate the compound method of threading when no cycle is available or is pracliLO use. Only the threading Lool is shown in the example.
r,
03805 (COMPOUND INFEED EXAMPLE)
o
=Dx
Figure 38-14
Calculation of rhread stan position· Z axis
Once the modified Z axis stan position is known for the first pass depth, it is easy to find start positions for subsequent pass depth. We know that the modified Z axis position for rhe threading (001 will be the already established ZO.25, plus the .0283 shift S, rounded from the calculated value of .028325193. The theoretical starti position will be ZO.2783, calculated at the 03.000, but never used in the program. itself This mitial value is needed for all the For each subsequent calculation, the value has to subTracted from the current Z starting lion, The following IiSL shows the individual shift values (as rounded In ish units)' Sl 82
::
:::
53 54
:::
55
::
56 57
:::
Total
.0140 .0lOO .0080 .0065 .0050 .0045 .0031
x
x x x
x x x
tan29 .0078 tan29 ::: .0055 tan29 ::: .0044 .0036 tan29 tan29 = .0028 tan29 = .0025 .0017 tan29 -0283
(N45 GSO Xl2.0 Z4.5) N46 T0500 M42 N47 G97 5450 M03 N48 GOO X3.2 ZO.2705 T050S N49 X2.972 NSO G32 Z-1.6 FO.OS33 N51 GOO X3.2 NS2 ZO 265 N53 X2. 952 N54 G32 Z-L 6
M08
(START
1) (PASS 1)
(or F/EO.083333)
(START
2) (PASS 2)
NSS GOO X3.2 N56 ZO.2606 NS7 X2.9360 N58 G32 Z-L 6 N59 GOO X3.2 N60 ZO.2S7 N61 X2.9230 N62 G32 Z-l. 6 N63 GOO X3.2 N64 ZO. 2542 N6S 0.9130
(START 3) (PASS 3)
(START 4) (PASS 4)
(START 5)
5)
N66 G32 Z-L 6
N67 GOO X3.2 N6B ZO.2517 N69 0.9040 N70 G32 Z-l. 6
N7l GOO X3.2 N72 ZO.25 N73 Xl.8978
N74 G32 Z-l. 6 N75 GOO X3.2 N76 ZO.25 M09
N77 X12.0 Z4.5 TOSOO N7B M30 %
(START 6) (PASS 6)
(START 7)
7)
SINGLE POINT THREADING
357
In program 03805, lhe thread infeed method is equJvalenlto the PI parameter in G76 cycle. This culting type employs only a single edge of the threading Insert, with a constant amount per each threading pass. I[ represents [he mOSl common programming melhod for threads and can be used as n sample for many olher thread cUlling applications. Block-by-block threads will be longer and will need 10 be checked for accuracy very carefully.
THREAD RETRACT MOTION Earlier, a statement had been made thaI [here are only two methods of relracting the 1001 from the thread - a slr,lIght motion along a single axis, and a gradual si multancous molion along two axes. Both are used in thread programming. ] n facl, their frequenl appJ ications even jusli fy special miscellaneous functions buill into the control system as a standard feature. These thread retracl functions are called lhe thread chamfering fllnctions or thread finishing functions.
.. Thread Pullout Functions 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 recessed, or in a solid material. The actual pullout can be programmed "long a single axis, or along both axes simultaneously. Typical Fanuc functions designed for Ihis purpose are M23 and M24. They conlrolthe pullout of the threading \001 at the thread end:
M23
Thread finishing ON
(two axes)
M24
Thread finishing OFF
(one axis)
d1 J
- --
....
-
- -
M23
.-
,
,
Figure 38·15 Tvpical miscellaneous functions for gradual thread pullout
03806
N4S N46 N47 N48 N49
(GSO Xl2.0 Z4.5) M24 (THREAD PULLOtIT OFF) TOSOO M42 G97 5450 M03 GOO X3.2 ZO.2S TOS05 MOS G76 X2.S978 Z-1.6 IO KO.OSll D0140 A60 P4 FO.0833 (or F/EO.OS3333) N50 GOO X12.0 Z4.5 TOSOa M09 NS1 M30 %
The M24 funceion appears in block N45, the only block thal was available without another 1\1 function.
• Two-Axis Pullout Two-aXlS pullout is a gradual angular tool motion along lwo axes, away fTom the thread (thread finishing ON). The example 03807 is similar to [he previous example:
N45 N46 N47 N48 N49
(GSO X12.0 Z4.5) M23 (THREAD PULLOUT ON) TOSOO M42 G97 S4S0 M03 GOO X3.2 ZO.25 T050S MOB G76 X2.8978 2-1.6 IO KO.OSll D0140 A60 P4 FO.0833 (or F/EO.OB3333) NSO GOO Xl2.0 Z4.5 TOSOO M09 N51 M24 (CANCEL M23) NS2 IDO %
In this case, M23 was applied in block N45 and an addieional block NSI was used to cancel the pullout. The cancellation was not necessary in this program. but il is a good practice 10 cancel runctions used only for specific purposes.
i ~______~~~______ -.-- d '--
I d1
A single axis pullout (thread !inishing OFF) is a simplc rapid motion programmcd at the end of threading pass as the fhird l11olion of the four basic threading sequences. The pullout direction is always at 90° to the thread. For cilher lhreadil1g cycle G92 or G76), this is the default condition, so M24 is not needed, unless M23 function is used as well, usually for another thread in the same program. two functions cancel each other. IfM24 function is used. it must be programmed before the threading cycle for which il has been applied. For examrle, the threading program 03gm using lhe G76 cycle will be Slightly modified in 03806:
03807
Other machine controls may have similar functions. The purpose of these funclions IS to enable or disable the aUlOmaric insertion of a pulloul mOlion between threading motion sequences 2 and 3, as described earlier in this chapter. Figure 38-15 i! luSlrales the comparison of the threadi ng mOlion wilh and without the pullout.
1- - -
• Single Axis Pullout
M24
There arc some conditions thaI apply to the M23 function. 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 system. If the finiShing distance dis greatcrlhan the 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 hand orienlalion, Neither selection has any effect on the profile andlor depth of the thread, but other factors are important. The majority of threading applications use the righl hand thread. RighI hand and left hand terms relate to (he helix of the thread - Figure 38- f 6.
Programming a thread that terminates at a shoulder presents a unique difficulty. The difficulty is the wall - heLler known as shoulder of the part. It is not enough lO program the end point for the thread reasonably - il must be programmed exaCTly. Even then, a collision is possible if the tool setup is not accurate. The three typical problems in this area of thread programming are:
z-
/ I
•
,
.
t
RfH THREAD::: M03
I
- ....... z+ LlH THREAD:: M03
Figure 38·16 Right Hand (top) and Left Hand (bottom) thread CUI using a right hand threading holder (reverse mounting)
The hand of thread is determined by two conditions: o
Recess groove is too narrow or non-existent
o
Threading insert is too wide
o
Thread is too deep
The first problem of threading towards a shoulder, a narrow width of the recess groove, is easy to correct - just increase Ihe recess width In the program. The majority ofrecess 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!
I
I
I
o
Cutting direction of the tool ~z + or Z-)
o Direction ofthe spindle rotatioll (M03 or M04) These conditions are used in combinations to program a particular thread. The factors that it1fluence Ihe programming method for a R/H and L/H thread arc: o
Threading tool design - right hand or left hand
o
Spindle rotation direction - M03 or M04
The second and third problems may not be related, but the solution is usually the same for both. If the threading insert IS too wide or the thread is too deep, try to increase the 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.
If a smaller tool cannOl be used. program for a modified exis1ing threading insert. Modification in [his case means grinding off the portion of the insert that is in the way of CUlling, without disturbing the portion Ihat actually removes the material. Before deciding on the modification by grinding, consider other options carefully - altering the standard lools designed for CNC work should always be I he Insf r(".$orl, not \h(". :lIltomMic first choice A cO(lied insert will loose its cutting advantages, if the coating IS removed by grinding. Be careful not lo grind off coaling within the cuLling section of [he insert. In case the program does use a modified Ihreading inserl, a few suggestions may help \0 do it with more insight.
o The cutting direction· Z+ or Zo
Tool tip orientation in the turret
Theoretically, either hand of thread can be cut with any threading tool, but this approach is nOI right. A poor choice affects the thread quality, life of the threading insert, addi· lional costs Involved. etc. When a thread starts close to a shoulder (in a recess). Ihe clearance for acceleration is limited. The only method to prevent imperfcctlhreads due to acceleration in a small area is [0 decrease the spindle speed.
Always use care with modified tools
•
Insert Modification
There is a number of standard threading inserts in every tooling catalogue and chances of finding one suitable for the job at hand are good, In case a standard threading insert needs modification, the follOWing example illuslrates a few programming considerations - Incidentally, it is irrelevant if 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 configuration firs\. Figure 38-17 shows a typical threading Q insert with the known width Wand the amwlar 1enb th A' ~
lip radius or flat R, and an unknown angular height H.
W = WIDTH OF INSERT A ANGLE LENGTH R = TIP RADIUS OR FLAT H MAXIMUM DEPTH
= =
-<--
0
60 V-THREAD
Figure 38-17 Essential dimensions of a threading insert
H
The modification requires grinding of the insert in the non-critical areas, to allow the [001 to complete the minimum .650 thread length. rn theory, the minimum amounl to be ground off the insert is .030, the difference between the 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 the best threading resulLs. Even a minor setup error on the machine can cause a serious difficulty. Always calculate the modification amounts, never guess them
In the example, insert dimension W is .250 and A dimension is .130. The included angle of the threading insert is 60° and the insert flat or tip radius R is .012. not relevanl in this casco The dimension H indicates the maximum thread depth and is normally measured to the sharp poim of tile Insen lip. It is calculated using a trigonometric function: H = A /
The minimum thread length in the illustration is only
.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 Insert IS the only way.
W -:
-; A
.650
.750 - .100
tan30
=
.130 / .577350269 H = .225166605 H = .2252
The problem is illustrated in Figure 38-18.
0.25
In the example, there are three dimensions thai influence the amount of insert modi fication. The sum of all three will be the amount to be ground off the insert. One, the thread length has to be extended by ,030 to achieve the .650 minimum length. Two, the clearance from the shoulder will also be ,030, and three, the clearance past the (hread end will be .020. The two last clearances are the arbitrary decisions by the programmer. The solution is the total amount of the insert modification being .080. In other words, Ihe amount of .080 must be ground off the original large threading insert. That will shorten the original anglllnr length of 130 to the length of .050. Always make sure the depth of thread can be achieved with the modified insert. The part program will reflecI the modification in (he thread end position of the Z 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
r'- .....
I.()
!'-
ci ...... -0.62 --
N
1 0.301
co
N
---0.13
0.35
'1 - --0.05 ,-- 0.75
~--
I
t 0.3011
03.5 03.0 02.8978
!
0.25
o --- 0.67-
.J
- 0.75-Figure 38-19 Modified threading insert provides enough clearance in the recess
Figure 38-18 Threading insert before modificalion does nul Iii ill the I!:IC!:ISS
CJfl:!CJ
The job is 10 program a thread WiUl a .100 recess groove width, using an insert thaI has an angular length A of .130. Tllis insert is not suitable for the job, as it cannot finish the minimum full depth thread length - the difference between the shoulder length and the recess width:
In threading, the rhread length is lhe aCllIa! lengrh of {he full depth rhread. The part design often allows a little longer thread, hut nOL shorter. The height of the shoulder IS also important. In (he example, the shoulder is .30 I I high and the insert modification was possible. A large threading insert may not always be modified and the only solution will be to use a smaller insert size.
360 •
Chapter 38
Program Testing
Whether a tlu·eading insert used is based on catalogue dimensions or a modified insert, threading \0 a shoulder presen[s a time of anxiety for the CNC operator. when the first part is produced. Since the reed rate ovenide and the feedhold switches are disabled during (hreading, the program verification on the lalhc will become more difficult. Even computer based graphic testing methods may not show the potential collision. A simple, yet very elTective, thread program checkmg method is always available, right al the CNC lathe. 1l1is method requires a skilled CNC lathe operator, who does understand both the program and the threading principles well. Knowledge of the operation panels is also important This method employs several features found on the contemporary CNC controls. The purpose of the program tes! is [0 find out if the threading tool will collide with the part shoulder before actual threading cut takes place. The following sters are general in nature - adaptlhem to suit local conditions when testing the threading program: o
Use the SINGLE BLOCK mode and step through the program until the thread start position is reached
o
Switch from the AUTO to the MANUAL mode - spindle stops and the threading tool is in the clearance area
o
Select the Xl screen display (absolute mode)
o
Switch to the HANDLE mode ior the l axis
o
While watching the XZ position display, move the handle in the same direction as the thread, until the tool reaches the programmed Z value, or it cannot move any further, whichever comes first
o
If the tool reached the programmed l position first. the tool setu p is safe for the thread ing
o
If the tool just about touched the part, but has not yet 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
There are other testing melhods available, for example, to use temporari ly the GO I linear modol! command, instead of (he G32 threading command, without a part mounted in the spindJe.
OTHER THREAD fORMS Allhough lhe standard V-shape thread with the 60° included lip angle is the most common thread form, it is by no means the only form. There are many threading forms and shapes programmers encounter in machine shops, (00 numerous to lis!. As an example of a different threading form, look at an ACME thread as a subject for discussion. In metric, there is an equivalent thread. called the Metric Trapezoidal thread. From the programming perspective, both threads are almost identical. ACME thread has a 29° included thread angie. Ihe metric trapezoidal thread has a 30° angle and somewhat different geometry definition. The main application of the trapezoidal type ulread is to transmit a motion. usually with a disengaging half-nut. Certain types oflead screws for conventional lathes use this type of thread. The programming of a trapezoid threads oflen requires a steadyrest, since these threads may be quite long. An important consideration is the lead error accumulated over a long distance, discussed earlier.
• Thread Depth Every thread has its formulas and mathematical relationships. There are two basic formuJas relating to an ACME thread depth. One is For threads of 10 TPI and coarsel; the other for threads of 12 TIl and finer. For ACME threads 10 TPI and coarser, the thread depth formula is: Td
:::: .500 x P + .010
For the ACME threads J 2 TPl and finer, the thread depth formula is modified only slightly: Td ::: .500 x P + .005
Td = Thread depth P = Thread pitch
In the non-threading mode, the feed overrides are effective, whereas in the threading mode, they are not!
Olher threads in the trapezoidal group are Swb ACME or a 60° Stub ACME. Programming trapezoidal threads is no more dirlicult than programming any V-shape thread, provlding the thread formulas and the geometric details of the thread design are known 10 the programmer.
By readi ng the CUTTen! tool posit ion on [he screen display and comparing it with the programmed position, il will be possible to know whether Ihe collision will happen or no\. Duri ng the test, the feed rate can be slowed down or stopped anytime. The purpose of the program lest is to establish safe working conditions before the threading lakes place.
There OIlier threads that call be: encountered outside of the 60° category - the Squ{lre threads, API threads (used in the petroleum mdustry), Buttress threads, Aero lhreads, Dardelet self locking threads, Round threads, Lebus threads (require special control fcalures), and several olhers. Thread and threading data can be found in various tooling catalogues and technical publicalions.
SINGLE
THREADING
1 • Depth and Clearances
for a tapered nificandy di than that for a straight motion i~ along two axes simultaneou~ly, nuher 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)
D
.61343 / 8 = .0766788
=
.0767
from the thread
Motion 3 Motion 4
the previously established formula. the depth D of the thread used in the program will
Return to the start position
to a slTaight thread, the only for a tapered (hread are in - Motion 3 and Motion 4 remain
rhttprp1'I1'p<::
Motion I, the starting tool position is
rI,Q',;>,·F'r\
orientation of the threading an external or an internal external thread forms, the threading tool must always be of the Lhread. For internal thread tion must always be below The (mead. This is the same requirement as but for a tapered thread it takes on an lance. examples of a tapered p!ified drawing: in Figure 38·20.
For a tapered tttl'ead, the towllength of the tool U'ave] along each axis, nOl Ihe thread length as per drawing - this is no dil'Jeren{ than for a single axis thread. The tool I ravel in the will be the combinalion of the two plus the given thread length (along the Z axis): .400 + 2.500 + .200
3.100
The next slep may not the method of is used, both the start thread will be G92 or G76 is and end diameter of
~OTPF-8
lance will cycle and is lhe pan amples were straight
01
•
per Calculation 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 process, using one of two common methods. 10
TPF = Taper per fool TPI == Threads per inch
Figure 38-20 Tapered thread example program 03808
The thread is defined fronl diameter of
Qverfllliengih (2')00), hy lhe (1.375), by its angle (3.000
mches taper per pilCh (8 TPI). It is a single start thread and Lhe rlrf\O'r
this type of
programming consideration for the depth of [he thread.
will
uses the calculated by applying
other method defines as is oflen confusing to an Typic:!1 rallo;; are rlefinerl in the
for example as I: 12, I: 16, etc., or as amount of taper perfoot or, raper per inch. Keep one rule in mind:
362
38
A standard North American pipe thread is a good examtapered thread. It is defined a taper raLio of I: 16. which is equivalent to a oj an inch per JOO! laper, mcaon the diameter and to an axis. A pipe may also be defined with a per side(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 a laper defined as the lowed by an
12.0 - -
- 2.51,5
A = tan (1.5/12)
AN LE:
A
1.5
RATIO: in the ratio must be in the same 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:
7.125016349 =:
---'- = .3125 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
---.-
of a :5 inch taper per root is equivalent to a because 3 / 12 [n
0.4
3.10 Figure 38·22 Calculated values for the
1 / 4 .. 1 : 4
ng, weare only interested in at the beginning and at the end can be done ei ther means of
nrti,n,-"m
• Block by
Thread
block threading, the taper thread programming is just as programming a straight thread, simplify the example, a straight infeed and nine threadi will be for the IOlal depth .0767.
as'
or
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.
0
Front0
End
1.2420 1.2130 1.1890 1.1690 1.1530 1.1410 1.1330 1.1270 1.1216
2.0170
end diameters have
(he ratio of sides method. will actually be in type of selected programa block-by-block approach depend on the thread control features.
example 03808
.0165 .0145 .0120
.0100 .0080
.0060 .0040 .0030 .0027
1. 9280 1. 9640 1.9440 1. 9280 1. 9160 1. 9080 1. 9020
1. 8966
POINT THREADING
are
3 to
program 03808:
03808 - TAPERED THREAD)
N46 N47
N48 N49 NSO NSl NS2 NS3 NS4 N55 N56 NS7 N58 N59
N60 N61
N62
N63 N64 N65
G50 X12.0 Z4.5) TOSOO M42 G97 S450 M03 GOO X2.S ZO.4 TOS05 MOB XL242 G32 X2.017 Z-2.7 FO.125 GOO X2.S ZO.4 XI.213 G32 Xl. 988 Z-2.7 GOO X2.S ZO.4 xl.la9 G32 Xl. 964 Z-2.7 GOO X2.S ZO.4 Xl.169 G32 Xl. 944 Z-2.7 GOO X2.5 ZO.4 Xl.1S3 G32 XL 928 Z-2.7 GOO X2.S
N66 N67 N68 za.4 N69 XL 141 N70 G32 X1.9I6 Z 2.7 N71 GOO X2.S N72 N73 N74 N75 N76 N77 N78
1) 03809 (Gn - TAPERED 2)
(PASS 3)
4)
Xl.964 Xl.944
Xl.928 Xl. 916 Xl.908
N59 lo00
% (PASS 6)
ence between meter of 1.l216,
taper inclination is of 1.8966 start diaby 2. The result
(PASS 7)
(1.8966 - 1.
G32 X1.902 Z-2.7
ID9 GOO X2.5
NBO ZO.4 (PASS 9)
N81 Xl. 1216
N51 NS2 NS3 NS4 NS5 NS6 NS7
Xl.902 Xl.8966 NS8 GOO Xl2.0 Z4.S Tosoa M09
8)
X1.127
(N4S GSO X12.0 Z4.S) N46 T0500 M42 N47 G97 S450 M03 N48 GOO X2.S ZO 4 TOSOS MOB N49 G92 Xl.01? I~O.387S Z-2.7 FO.12S NSO Xl.9SS
zo. 4-
X1.133 G32 Xl.90S Z-2.7 GOO X2. 5 ZO.4
X represents the current thread diameter allhe end cut, Z is the end position of thread, I is the side between the diameter at the end and the diameter at thesrart. I value must include an al(only direcrion of the tapcr in this case a"''''''''>'''''''' value. Program 03809 will cut a tapered thread threading cycle.
N82 G32 X1.8966 Z-2.7 NB3 GOO X2.5 N84 ZO.4 NBS GOO X12.0 Z4.S Tosoa M09 Na6 M30
This] value must have a directional LO mdicate the laper orientation (its direction from point). Inthe IheI value will be negative lhcslart is below the end diameter of the taper rear lathe. In the the entry
• Tapered Thread and a Multi
%
a straighl infeed and is used for will not change very if a comis used and/or the pullout from the
pound thread. Of course, more calculations will
• Tapered Thread Using a Simple Cycle cycle, the thread taper is programmed 1 value. wilh specified direction from the end starl diameter:
I 2 :::; .3875
start
Cycle
tiple repetitive threading cycle G76 cycle reI no! ro be a zero. if a tapered thread is cut. in the cycle specifles the difference per side. so dislance, as well as the direction between the diamecer of the programmed at that the X diameter is thread and the I supplies the taper side). CNC inclination (taper ratio axis direction an IIlcreaswg I value, and a will reqUire a I value. The I value is always a single value, measured not a diameter 38-23 illustrates for rear lathes.
364 - - - - - - - ._- j X+
--- ..... Z+
Chapter 38
..-----..----.-..•-----
ro .......
N
N
(])
0X External
These tools are the thread stan position and the thread feedrale calculations. Figure 38-24 shows symbolically the views of the thread cross sections and tbe end views.
t
""0 C
(j)
1
1-
0X Internal
-
/ . --.~
• r-.
The basic G76 cycle will be maintained but the I value will be added - a non-zero value must be programmed:
l
NSl %
mo
If this method can be used for threading. 076 cycle is the best choice. It offers the fastest program generation as well as the best opportunities for on-machine editing.
MUlTiSTART THREAD Mostlhreads have only one start, suitable for most applicalions. The most common purpose of a multistarlthread is to transfer a precision moLion very rapidly over a relatively long distance. Note (he word precision - a coarse thread can also be used to transfer a motion rapidly, bUI with very little preciSIOn. An example of precision multistart threads are some internal designs of some camera zoom lenses. For programmers, there are some unique considerations for a mulristart thread. II IS important that the start PO&ilion for each thread is in such a location, [hal when viewed from the thread end of the screw or the nut, each start on the circumference will be divided in equal angular increments. Also imponanl is to maintain the equallhread profile when viewed from the thread cross section. To achieve these conditions, two programming lools are available.
\
,~.---/' 90°
03810 (G76 - TAPERED THREAD) (N45 GSO X12.0 Z4.5) N46 Tosoa M42 N47 G97 S450 M03 N48 GOO X2.S ZO.4 T050S MOB N49 G76 Xl.8966 Z-2.7 I-O.3B7S KO.0767 D0140 FO.125 NSO GOO X12.0 Z4.5 TOSOO M09
I
Figure 38-24 Representation of mullistart threads (dots indicate thread starts)
In the illustration are four examples of the cross sections (left) and the end views (right) of a single start thread (LOp), double start (one below), triple start (two below) and a quadruple start (Ihree below). Although the examples are represented only symbolically, the thread pilch lS maintained in all examples. Also note (he equal distribution of each thread start, represented by the. heavy dots. Each angle value is the angular spaclng of individual starts, when the threaded part is viewed along Its center line. The spacing is automatic and only the correel shift value from one thread start to the next has to be programmed, in threading mode .
• Threading Feedrate Calculation The threading feedrate is always the lead of the thread, never the pilch. For a single start thread, the lead and the pitch have the same value - for a multistart thread, they do not. Take a single start thread of 16 TPI. Here, the lead and (he pi(ch are both .0625, so the feedrate is FO.0625. If the drawing spec! fies lhe thread as 16 TPI, but indicates a dou· ble start, (for example 3.0-16 TPI 2 START), that means the pitch of the thread will remain unchanged (.0625). but the lead of {he thread will double to .1250. Therefore, the programmed feed rate for the double start Ihread with the pilch of .0625 will be FO.I25. The multiplication of the pitch will always depend on the number of thread starts. That means a triple start thread will have the feedrate Lhree 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 the one less Than fhe number of slarfs:
Figure 38-25
Relationship of the pilch and the lead of a double start thread
In Figure 38-25, the relationship of pitch and lead of a double start thread is shown, The same logic Iha! applies to a double start thread, (llso applies to triple, quadruple, etc threads. The feedrate calculation is identical for all threads:
Feedrate
Number of starts
TPI
Figure 38-26 shows Ihe relationships of the pitch and Ihe lead for some common lTIuhistart threads - Ihe samc pitch-lead relationship is mainlained proponionalely.
-
O.5P
p
a
3P
c Figure 38-26
Mullistart threads - pitch and lead relationships: I a) Single start thread Lead "" Pitch = 1P I b) Double start thread Lead = 2P ( c) Triple start thread Lead = 3P
Note Ula! the formula is valid even for a single star! lhread, but there is no shi ft required (1 - I == 0). A few methods can determine when the tool shift is to be programmed. 'He first method, for a double start thread, is to program one thread Lo ils full deplh, then shift out ancl CUi
Ihe second thread to its full depth. The second method, for lhe same thread, is to cut one pass of the ti.rsLlhread, shift oul. cut the same pass for lhe second lhread, shift in, cut the second pass for the first Ihread, shift OUI again and repeat the process unlil bOlh threads are completed [0 the full depth. This approach applies to any number of starts.
To illustrate a sample rnultislart thread applicarion. thc following general thread specifications will be used
1.5P
-.-- 2P
= Number of starts - 1
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, alIhough 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 from extensive malerial removal.
I
P
Number of shifts
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)
o The number of passes will be seven (for G92 cycle) Although the block-by-block programming method G32 can be used ror special applications, acceptable results can he achieved in many threading applicalions by using (be G92 or G76 cycles, with less programming, as well as the gain or easier editing at the machine.
3
Cha
•
Application Example
The iou~ lhread with 12 TPI on a bUl as a double sian thread. The number seven, with the same depths a.s 1 I shows the completion or one thread i~ FO.2S, no! FO.1 In T is the thread
r51 program
before the other comments. P is or second:
N6B
N69 N70
03811 2 - DOUBLE START THREAD
N60 N61 N62 N63 N64 N6S N66 N67
N71
1)
GSO X12.0 Z4.5) N46 TOSOO M42 N47 G97 S450 M03 N4B GOO X2.5 ZO.4 TOS05 Moa N49 G92 X2.017 Z-2.7 FO.25 NSO Xl. 988 N5l XL964 NS2 Xl.944 NS3 XL928 N54 XL 916 NSS XL 908 N56 Xl.902 N57 Xl. 8966 N58 GOO X2.S ZO.52S N59 G92 X2.017 Z-2.7 N60 Xl. 988 N61 Xl.964 N62 Xl.944 N63 Xl. 928 N64 Xl..916 N6S Xl. 908 N66 Xl.902 N67 Xl. 8966 N68 GOO X12.0 Z4 5 TOSOO M09 N69 IDO %
N72 N73 N74
( - - - THR.EAD 1) (Tl - PI)
(Tl (Tl (Tl (Tl (Tl (TI (T1 (Tl
-
P2) P3) P4) PS) P6) P7) P8) P9)
(--- THREAD 2)
(T2 - PI) (T2 P2) (T2 - P3) (T2 - P4) (T2 PS)
Xl. 944 ZO.525 Xl.944 ZO.4 Xl. 928 ZO.525 Xl. 928 ZO.4 Xl 916 ZO.525 Xl. 916
Z-2.7 Z-2.7
(T2
Z-2.7 1) (T2 PS) (START 2) (T1 - P6) 1) - Po)
Z-2.7 Z-2.7 Z-2.7
2)
ZO.4
Xl.908 Z-2.7 ZO.525 Xl.90B Z-2.7 ZO.4 Xl.902 Z-2.7 ZO.525 Xl. 902 Z-2.7 ZO.4 Xl. 8966 z-2.7 ZO.525 Xl.8966 Z-2.7 X12.0 Z4.5 TOSOO MO.9
cycle and GOO molion reason ror the G code repel remams In is the FO.2S med only once for each example.
- P7) (START 1) - P7) (START 2) (Tl - P8) (START 1) - pe)
(START 2) - P9) (START 1) (T2 - P9)
is program-
(T2 - p6)
(T2 - P7) (T2 - P8l
THREAD RECUTTING
(T2 - P9)
checked for quality the pan is removed Once the pan is removed, any subsequent reclamping will need a great efTon in order 10 recut the thread. The lirsl Ihreading pass
This version can mg cuts of the first In ~program 03812. will be evenly
will start al a random subsequent 10 start at maillS
03812 (G92 - DOUBLE START THREAD - 2) (N45 GSO X12.0 Z4 5) N46 TOSOO M42 N47 G97 S450 M03 N48 GOO X2.S ZO.4 TOS05 MOS N49 G92 X2.0l7 z-2.7 FO.2S N50 GOO ZO.525 NS1 Gn X2.0l7 Z-2.7 N52 GOO ZO.4 N53 Gn Xl. 988 Z-2.7 NS3 GOO ZO.525 N54 G92 Xl. .988 Z-:L 7 N55 GOO ZO.4 NS6 G92 Xl. 964 Z-2 7 N57 GOO ZO.S2S N58 C92 Xl. 964- Z-2.7 N59 GOO ZO.4
N7S N76 N77 N7e N79 N80 NSl N82 Ne3 N84 %
G92 GOO G92 GOO G92 GOO G92 GOO G92 GOO G92 GOO G92 GOO G92 GOO G92 GOO G92 GOO G92 GOO G92 GOO M30
38
the cylinder circumference. aUlomatically synchronized As long as [he threaded reis assured.
There are I wo
chining, even rOf (he after removal, (--- THREAD 1)
(Tl - PI) 1)
(T2 - PI) (START 2) (Tl - P2) (START 1) (Tl P2) 2) (T1 - P3)
1.
Reclamp the threaded part to run concentric w/spindie
2.
Set the X axis large enough, so the tool moves above the thread (external threading) or below the (internal threading)
3.
Visually the threading tool tip with the thread already <:1'"....1>"",,, (only as accurate as one's eye)
in the air while carefully tool will eventually recut the
1)
- P3) 2)
Thread
difficulty is the major quality concern.
should be prevented.
10
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, subprograms are also called subrouflnes or macros, but the term subprogram is used most often and the word macro could
and less prone to elTors. programming are and custom macros. This
a different meaning altogether.
•
development and applications of cienl program preparation use
MAIN PROGRAM AND SUBPROGRAMS
Subprogram Benefits frequently programmed order of instructions or un-
block sequences, can benefit from becoming a subprogram. Typical applications for subprogr3m applicain CNe programming are: 0
Repetitive machining motions
different tools and two or more repetitive changed from a single
0
Functions relating to tool change
rale programs. Each
0
A CNC program is a
once and called when subprograms. Figure
0
shows a
pealed at differenl locations.
000
°0 o
0 0
and threads
0
Machine warm-up routines
0
Pallet changing
0
Special functions
Structurally, subprograms ure similar to standard prouse the same syntax rules and look and the , it may not be easy to see the difference beprogram and a subprogram at a casual ''''''.rr''''·''....., can
000
usc the absolute or incrementa!
Subprograms are loaded illto Ihe IYlt>'rrlrw\ljust I programs. When several benefits:
000
°0° ° 000
... and others
0
o o o
length reduction .. ",,,,;;!,rn
I!ffur
rl!uuctioll
and
o Quick and easy n\"rhW-",t,,,n,, Figure 39-1 Example 01 a part requirement suitable to be used as a subprogram
No(
the benefits, but
a reason to use subprograms.
367
368 •
Chapter
Identification of Subprograms application of subproisolation of repetitive pronext six program Ul""'illL" zero return for a typical honat the start of program:
N1 G20 N.2 G17 G40 G80 N3 G91 G28 ZO
N4 G28 XO YO N5 G2B BO
N6 G90
(STATUS BLOCK)
For example, a the M98 function
includes
N167 M98 P3951
In block N167, the CNC memory, to defaul~ depending on stored in the control
(Z AXIS RETURN) (x AND Y AXES REroRN) (8 AXIS RETURN) (ABSOLOTE MODE)
N7 •••
a typical sequence of commands repeatf:d evely time a new program for that maa program may be written many each time repeating the same sequence of inpossibility of an error, the blocks can be stored as a separate by a unique program number. Then, at the top of any main program. This "' ...r'rr .. '>'""'........,,., will become a subprogram or an extension of the main program.
N460 GOO X28.373 Y13.4193 M98 P3951
executes rapid motion fIrst, then it calls the order of words in a block makes no difblock N460 M98 P3951 GOO X28.373 Y13.4193 '="'''LUI,",U~
SUBPROGRAM FUNCTIONS A subprogram must be recognized by the control system a~ a. un~quetype ofprograrn, not as a main program. This distmctton IS accomplished with two miscellaneous nonnally applicable to subprograms only: M98
Subprogram call function
M99
Subprogram end function
Subprogram End Function
HU,'''W\JU
The subprogram call junction M98 must always be by the subprogram number P--. TIle subprogram M99 telmmates the subprogram ann the , back to program it originated from (a or a subprogram). Although M99 is it may also be rarely in .... ;J.''''"Ll..l'. the M30 function. In this case, will run 'forever', or the Reset
•
•
Subprogram Call function
The function M98 calls a program from another program. block, it will result in an error. M98 is an tion - it requires two additional T".<>,•., .....''''~t>T"< pJete, therefore effective: o
The address P identifies the
number
o
The address L or K identifies the number of subprogram repetitions ( L1 or Kl is the default)
order as if the tool motion looks illogicaL
03951
main program and the subprogram coexist in must differ by their program numbers. V,""..o;)lUi=.. they will be treated as one continuous StlIllctH)D must be made for the program end as well. end of program function is M30 aI, M02. The subprogram must be terminated Faouc uses M99 for that purpose: Subprogram start
Subprogram end
When a subprogram tenninates, the returns the processing to the program of origin it will not terminate the program - that is the exclusive function M30 . Additional parameters may also be added to the subprogram end, for example a block skip code, a block number to return to upon exit, etc. Note that the stop (the % sign) is used in the same manner for a ~rog~ as for a main program. The subprogram terminatlOn 1S unportant and must always done right. It two important instructions to the control o
To terminate the subprogram
o To return to the block following the subprogram call
3 use the program end function M30 (M02) to nate a subprogram - it will immediately all program and reset the control. The program execution that contains it.
In
represents
block
completed subprogram.
in the program of program contains these (MAIN - PROOR1I.M)
subprogram end returns immediately following the subprogram call is illustrated in 39-2 (without described next
N67 M98 P395:2 N68 N69 .. . IDO .. .
, ,y..., ,/ is terminated by
and the 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 lln(1~,,:t~r\(hrI0' ofsubprogramrning '"'ULlLl .... "
M30 % programming method
Figure 39-2
Flow of a program
•
is an item to be explored
with a single subprogram
Block Number to
associated applications
tools, such as a combinathe s lash code t.
to function is
as the last instruction in are no other commands M99 function causes the subproits execution to next from. For example, N67 M98 P39S2 N68 N69 __ _ N70 ...
executes block the subprogram the original program from the block N68,
03952. CDrltmues processing instructions block to return to.
•
Number of Subprogram Repetitions
A very important subprogram or K, depending on the control number of subprogram ..."....""h'hr.M h",."n.rr...,...,.,. has to be _,..""f,,1i processmg resumes in the original nrCII!nm1. most programs, the subprogram will be the original prowill continue.
that require a subprogram repetition proceeding with the rest original program are common. To compare, a single use of the subprogram could be called up from the of origin as: N16? M98 P3952 Ll (Kl)
Special Applications
For some special applications, it may be necessary to specify a different block number to return to, rather than us. 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 •.
ll1is is a correct program. but not to be programmed at control unit defaults to
N167 M98 P3952 Ll (Kl) is idelllicaJ 10 N167 M98 P3952
370
39
Note -In the fol/owing examples, substitute K llisted, if required by the control system.
every
There are some good reasons. 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,..,.,. the default conditions of the control The personal preference.
3.0 TYP
1.0
--0/--
Repetition Count Variation H'-"ULI',,'
--1---1
controls do not accept the UK as of repetitions and use a different format. On a single subprogram call is the same:
I
2.0
N342 M98 P3952
I block calls the subprogram only once, as no special has In order to repeat the subprogram of programming
5/8-12 TAP (5)
N342 M98 P3952 L4 (K4)
dra wing used for a subprogram development programs 03901, 03902 and 03953
nwnber of repeats directly after
in a single sta tement: N342 M98 1.'43952
islhesameas
cycle is used N342 P00043952
is identical to the other version - the subpro\;.j..!~~
is
M98 00013950
subprogram 03950. In times, program M98 P390050
or
M98 P00390050
does not change for the 0/16/18120121 controls - it is represented by the first four to the of 9999. M98 P99993952
repeats the sand, nine hundred number of repetitions have the maximum
03952, nine thou-
the maximwn (some old models may
• LO/KO in a counter than is a common application. the form Dro'f!TlllnmeO'! Would
0.2
For the tap drilI, GS1 i 2 tap. G84 cycle is hole for drilling and makes a drill will be 35/64 drill (00.5469), for 5/8-12 tap: 03901 1 - 90-DEG SPOT DRILL - 3/4 DIA)
Nl G20 N2 N3 N4 NS N6
G17 M06 G90 G43 G99
G40 G80 TOl GOO G54 X2.0 Y2.0 S900 M03 T02 HOl Zl.O M08 GS2 RO.l Z-0.327S P200 F3.0 (LL HOLE)
N7 X8. 0
(LR HOLE) (OR HOLE) (UL HOLE) (MIDDIJ!: HOLE)
N8 YB.O N9 X2.0
mo
XS.O Y5.0 N1l GSO Zl.O M09 Nl2 G28 Zl.O MOS Nl.3 MOl (TOOL 2 - 35/64
Nl.4 Nl5 Nl6 Nl7 Nl8 Nl9
mo N21 N22 N23 N24 N25
J..Jfi..,I..JI..L.I..I}
T02 M06 G90 GOO G54 X2.0 Y2.0 S840 M03 T03 G43 R02 Zl.O MOS G99 GSl RO.l Z-1.214 Fll.O X8.0 Y8.0 X2.0 xS.o Y5.0 GBO Zl.O M09 G28 Zl.O MOS MOl
SUBPROGRAMS
37
(TOOL 3 N26 T03
TAP)
(TOOL 2 - 35/64 DRILL) MOe;
mo
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 N3I xa.o N32 YS.O N33 X2.0 N34 x5.0 YS.O N3S Gao Zl.O M09 N36 G28 ZI.0 MOS N37 G28 XS.O YS.O
m4 G9S G8l RO.l Z-1.214 Fll.O LO N1S M98 P3953 N16 G28 Zl.O MOS N17 MOl
N38 IDO
%
type of program uses XY coordinates for tool (spot drilling, drilling, In order to make the program more all blocks of Ihe prowill be collected into a subprogram and much more efficiently. Here IS (he pattern of holes from the long program thal also' I.OM09, as Ihe sr3ndard end of any acrive fixed X2.0 Y2.0 X8.0 YS.O X2 0 X5.0 Y5.0 Gao Zl.O M09
it imo a main program repeating machll1mg pallern. of all five holes in the pattern are included: 03953 (SUBPROGRAM) HOLE PATTERN) X2. 0 Y2. 0
(TOOL 3
NIS N19 N20 N2l N22 N23
N24 N2S N26
M06 T03 G90 G43 G99 M98 G28 G28 M30
12 TAP)
GOO G54 X2.0 Y2.0 S500 M03 TOl H03 Zl.O MOS G84 RO 4 Z-1.4 F4l.0 LO P3953 Zl.O MOS XS.O YS.O
%
In the program,
1001 molion for each cutcutler ailhefirsl hole of the machining pattern. All in the program start at the first hole of the firsl hole definition is included in the as well as in the main program, program LO in call is mandatory, else Ihe firs! hole of the pattern wi II machined Iwicc. This is a 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 repeats after each M98 ! in the main program 03902. This practice correct but not recommended. as illacks in a clearly structured program.
ting 1001 will
SUBPROGRAM NU
m
N2 X8. 0 N3 Y8. 0
track keeping track of
N4 X2. 0 NS xs.o YS.O
No G80 Zl. 0 M09 N'7M99
%
can be called from the main program, in a new program 03902. The LO Lhe first hole: 03902 PROGRAM) (TOOL 1 - SO-DEG SPOT DRILL - 3/4
G20 N2 G17 G40 GSO TOI NJ.
N3 M06
N4 GSO NS G43 N6 G99 N7 M98
GOO G54 X2.0 Y2.0 5900 M03 T02 HOI Zl.O M08 G82 RO 1 Z-O.3275 P200 F3.0 LO
N8 G28
ZLO MOS
N9 MOl
P3953
to know exactly what they are used, what is purpose. A may be used In many other identification technique is Conlrol unit directory of program numbers and
control system recogni7es a programmed format, the lowed by {he P. subprogram
subprogram proper subpro-
important. not distinguish numbers. The only by it, M98, fol-
Alllhis means thatlhe programming level, not at It is the programmer's responsibility, not to subprogram numbers. great flexibility in organizing (he (lnd set identification - in fact, any programmer can basiC rules and related Many of the rules governing the format of main also apply to subprograms. Remember these four main
372
39
o
If used in a commonly or five digits.
the program number is by the letter O. followed by four on the control system
o
If used in a the program number can be specified by the colon commonly: for the ISO format. followed by up to four or five digits, depending on the control setting
o
The main program negative or to zero
o
The subprogram number cannot be negative or equal to zero
-
a or:
- cannot be
called from any program, main or without a fear of duplication or iii mismatch. should always be documented in some book. complete with detailed descriptions, rrom all of origins. This way, the needed, often at a short which they have been allows to organize all the (i.e., 1000, 2000, 3000. etc., or I J the type of CNC machme, the of machining
WIthin the allowed have to have assigned program TI1e program number assigned to together with the M98 function and
programmers 1$
U'AA.U"-
does not program On the
IS
Such a combination of the two words, M98 requirement for a subprogram call
, is !he minimum
another firsl is [0 gel oris even more Important if the subprograms are designed 10 up by otlIe r programs at dlr ferem rimes. There IS no one method, but some proven suggestions offer an how to npproach the subject of program numbering and a personal approach. are For example, in this handbook, all main two digits correnumbered consecutively, with sponding lo the chapler the merhod are arbialso applies to subprograms, will be the trarily increased by fifty. for third subprogram example in the Cmlp{(~r this method 10 any reasonable
•
Organized Approach
The suggested programming approach is understanding that Ihe CNC memory is lIot media for all part programs made. memory capacity is always limited. Alone point, this Imil will be reached and there will no more lefllo accommodate more programs. A good program ization is one Ihal uses tbe CNC system memory only the current program, perhaps a few more that are to soon.
If the unique program number is assigned the machine rool operaro)' during selup, the Situation some COIltrol as welL On some controls, the main number on {he written copy will not always load automatically, so It is nol Iy needed. That means, If an ' with shop supervisor lhal the CNC usi!!g ouly three numbers 1-999; then there will numI subprograms, This available for mosl manu an presents a good control over whose numbers selected. All four-digit can be documented, and
(early in [his chapier) of the a lour axis vertical machining cencan (with an assigned representing all needed commands or 021 is not included: 03954
ZERO
o~'~nJM\
mOl G17 G40 G49 GSO Nl02 G91 028 ZO N103 G28 XO YO Nl04 028 BO N105 G90 N1.06 M99 %
The units selection should for nexihilily. One(', (he
used in the main program,
zero return subprogram into the memory, every main program can start by calling the 03954: has heen designed
03903 (MAIN PROGRAM) (PART ABC-123)
Units
Nl G20 N2 M98 P3954 N3 GSQ
GS4 GOO X"
:Jut'orc'lZmm 03954 call
,;{,.
N4 .. _
<.,
IVlnn7117JJ"" ••.
N45 IDO
>
Main
%
the execution of the lwo system, follow all operational program execulion. DUring the program the control system will follow rhe following lions (instructions):
end
SUBPROGRAMS
3
1.
Set program number 03903 as the current program number
2.
Oisplay comment on the display screen
06200 (SUB 2) N6201 N6202
... t:/./Idsool1
N6203
3.
the units of measurement (inches in the example)
4.
Branch out to the top of subprogram 03954
5.
... A<, ...... ,O:; all
6.
When M99 is processed, the subprogram ends and returns to the main program
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
method works only with the maximum of one hunblocks, suitable for many subprograms. il (0 monilor a program with This not a foolproof method for all but idea will work for most jobs.
blocks in the subprogram 03954
•
Protected Subprograms
it may halt On the use of
As
the main program uses uses increments of I, but startl ng with N to 1 block number. There are lwo reasons for it. The reason is that a properly designed to any major gram will not there should extra blocks reason duplicated sequence display screen. The will quickly inform the the main program or a subprogram controls are very forgiving about and allow idcntificmion of block sewithin a range. men is of I, the subprogram
concept, here is an example. Tn a main program calls a single no rroblcm in block numbersubprogram, there should lng. Even if the are duplicaled in both it is not likely there lhe main program and hand, when several will be any confusion. subprograms are same main program, the during the main program duplicated block numbers are processed. processing, as well as to the exoperator Such a situation may in the content of losing track of what is really trol system at any To illustrate the
a simple application,
To avoid this problem, numbers to each tion. One method is to the hIgh thousands series, the block 06300, etc.
can be based on the subprogram 06100 (SUB 1) N6101 N6102 N6103
... and so Oil
unique block
a duplicanumbers in 100, 06200, in a subprogram example:
this potential problem by allowof a certain specified series of program can be locked up by a system parameter seta typical example, a program number series 9000 thin the of 09000 to 09999), will nOl display on locked by the syslem con!rol screen,
in lhis series cannot be edited or rrinted locking parameter is not set, the programs normally, like any other program.
of this feature to protect some from umlUthorized editing or even documentation for further
In
Im-
SUBPROGRAM DEVELOPMENT developed, it must be well most common applicapaUern of machining, ability to recognize the main a subprogram. •
Repeating
Recognition
pattern is n mancr of when writing a conventional program by block Visually scan the written copy firs!. If there are repealing clusters of consecutive blocks containi same it is a very good reason 10 evaluate Ihe program more and possibly develop a subprogram. This
experience su bprogrums at However, for a
374
Chapter 39
is no damage done by developing the long program firs!. It lakes more time and it is not efficient. However. this is how a professional experience is gainC{j. With limited experience, be willing [0 re-write a program from a single long form to a main program and one or more subprograms. Programmer should be able to identify those sections of a long program thal can qualify as subprograms. Once such a series of repetitive data is identified ill the conventional program, it is only a maner of small adjustmcl1ls La separate these repetitive clusters and define them as subprograms .
•
Subprogram 03955 contains this paltern and uses the L address (0 establish [he number of fixed cycle repeats. In the first main program 03904, the tool motion precedes the subprogram block. To sran the program development, concentrale on the hole pattern. First, selectlhe G91 incremental mode for the pattern. Then program the X and Y incremental values, starting from any hole, such as the lower left hand corner and continue in one direction - Figure 39-6.
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 programmed - Figure 39-4. MAIN PROGRAM -' 0.75 (3)
t 0.60 (2)
r
"-...'"
8000
o
0
OpOO 100.407 10 PLACES 0.50 DEEP
Figure 39-4
:: SUBPROGRAM REPETITION
Figure 39-6 Subprogram 03955 processing flow 03955 (SUBPROGRAM) (FOUR-CORNER LOCATIONS) N551 G91 XO.75 L3 N552 YO.6 L2
NS53 X-0.75 L3 N554 Y-O.6 N555 M99 %
Detail of the hole pattern used in program 03904
This hole pattern is repeated at four specified locations of the part, as illustrated in Figure 39-5.
llle subprogram is designed Lo machine nine holes in a rectang\llar pnHern. The rcnlh hole - ac(ually It is the firsl 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
Figure 39·5 Hole pattern layout for program examples 03904 and 03905 (both using subprogram 03955)
N4 G43 Zl.0 S350 M03 HOI N5 G99 GSl RO.l Z-O.269 F3.5 N6 M98 P3955 ill G90 X6.2S Yl.88 N8 M9S P3955 N9 G90 X6.25 Y5.0 mo M98 P3955 Nll G90 Xl.S8 YS.O Nl2 M9B P3955 Nl3 G80 G90 G28 Zl.O MOS N14 G91 G28 XO YO
(LL HOLE 1) (LL PATTERN) (LR HOLE 1) (LR PATTERN) (UR HOLE 1) (UR PATTERN) (UL HOLE 1) (UL PATTERN)
SUBPROGRAMS
375
Only one cutting 1001 was used for this other tools will follow the same ml This method of the last example is more common - in the abso· lute mode from Ihe maln program, tool is positioned at (he lower len hand corner of Ihe pattern hole of tht:: is driHt!U allilal locutiun. is called and (he remaining nme positioning
way, particularly useful for a
number of is to combine [he rapid motion to the
location with the most control systems:
call. This is
03905 (MAIN PROGRAM) (FOUR-CORNER PATTERN)
Nl G20 N2 G17 G40 GSO N3 G90 GOO G54 X1.S8 Yl.2S N4 G43 Zl.O 5350 M03 HOI 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 N8 G90 Xl.BS YS.O M98 P3955 N9 G80 GSO G28 Zl.O MOS NlO G91 G28 XO YO advantage of 03905 is shortening the 03904 - either melhod produces the same reis a malleI' of persollal
M98 P . 0 .. D can changed anytime wifhout Change to the subpromel hod is useful jf the conlour {)Vo or more different offset values, but i I not work on all controls. Here is the contenl a simple contouring , with embedded D offsel. 1 setting value is to the cutter radius:
is
03956 (CONTOUR SUBPROGRAM - A) NS61 G41 GOl XO 051 F10.O N562 Yl.75 N563 G02 XO.25 Y2.0 RO.25 N564 GOl Xl.a7S N565 YO N566 X-O.75 N567 GOO 040 Y-O 7S N558 M99
(D .. INCLUDED)
%
For conlOur normal means, from
subprogram will be called by
M98 P3956 The same subprogram can used for finishing as well as 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 conI cu(ler + Slack), 052 tain the slOck allowance stores Ihe :: cutter radius). For a
end
could be:
unnecessary repetitions axes. Modal values have to for subprograms.
• Modal
D51 .250 radius + .007 stock = .257 D52 = .250 radius + .000 stock .250 Next, the D .. has
Subprograms
[0
be removed
the subprogram:
03957 (CONTOUR SUBPROGRAM - B) (D .. NOT INCLUDED) N551 G41 GOl XO F10.O
03904 and 03905, note repetitions of .0. They are very imporwllt. The subthe control srarus to the hole of I he ten hole pattern is IIrSI hole of the pattern IS to Illal hole is in the main program,
not the same as
madlineu wlu.;n lIlt: in the absolute not within the
A finish contour sub,"' ......""'y,..,~
finishing and work. The reason is in the control as the full culter
two f) offselS PInel (hen call
it
t~ke
the f)
together wilh
M98,
) or 042 with the D is to he used for for example, it will not is fixed and is sLored The solution? Use
out nflhe. ~lIhrroBr;:!m, for example:
N562 N563 NS64 N565
Yl. 7S G02 XO.25 Y2.0 RO.25 Gal Xl. 875 YO N566 X-O.7S N567 GOO G40 Y-0.7S N568 M99 %
require the 0 offset but not same block as G41/G42. As long as 0 is I/G42, it can be passed on to the main program, depending on t M98 P3957 DSl M98 P3957 052
... for seJwfinishing . .jorJUlishing
376
Chapter 39
Return from a Subprogram
The current modal values should be clear in the main program when a subprogram is completed. Values that may have changed 1n the subprogram are absolute or incremental mode, molion command, coolant and olhers. Subprogram is always a branch of another program - il is a COlltinuous extension of the program of origin and its integral pan. All modal values set anywhere in the program are valid until changed or canceled by a command of the same group. The M99 subprogram end function will not cancel any modal values that are currently active. As the 03904 and 03905 examples show, a fixed cycle is called ITom the main program only once. Alllhe modal cycle data are carried forward [0 the subprograms. TIle main program clearly shows current modal values.
MUL11 LEVEL NESTING The last example has shown the main program ChUl calls only one subprogram and the subprogram does not call another subprogram. This is called one level nesting, or nesting at one level deep. Modern controls allow nesting up to four levels deep. 111£11 means, if the main program calls a subprogrnm number one, this subprogram can call a subprogram number two, that can call a subprogram number three, and [hal can call a subprogram number [our. This is called afour level nesting. All four levels arc rarely needed for any practical application, but these are [he programming tools available, Just in casco The following examples show program processing flow of each nesting level.
•
One level Nesting
One level nesting means thaI a main program calls only one subprogram and nothing morc. Suhprogram that is nested one level deep is the moSI common in CNC programming. The program processing starts at the top of [he
TIle processing of a subprogram that is nested (wo levels deep also starts at top of the main program. When the conlrol encounters ;J sllbrrogmln c~lI for the firs\" level, it will branch from the main program and starts processing the blocks in (he first subprogram, starling from its top. During processing of the first level subprogram, CNC system encounters a call for a second level subprogram. At this point, processing of the first level is temporarily suspended and CNC system branches to the second leveL 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 system will aUlomatically return to the program if branched OUI of [I will resume processing of Ihat program, temporarily suspended before. The return [Q the program of origin wi!! norrnally be to thc block immcdiately following the subprogram call block in that program. All remaining blocks in the first subpro· gram will be executed until anOlher M99 function is encountered. When that happens, the control system will return [0 the program it branched out of (program of origin), in this case to the main program. Since there are still some blocks left in the main program, lhey will be processed until the M30 funclion is encountered. M30 terminates the execution of the main program. Figure 39-8 illuslrates schematically the concept of a two level subprogram nesting.
I
-
M98 P21
M98 P21
%
Two level Nesting
I
I
021
022
(SUB)
(SUB)
021 (SUS)
' -
n
M30
•
010 (MAIN)
010 (MAIN)
main program. When a subprogram is called from [he main program by M98 P.. block, the control forces a branch to (he beginning of (he called subprogram, processes its contents, then it returns to the main program to process the remaining blocks of the main program - Figure 39-7.
M99
'-----0/0
~
M30
%
Figure 39·7
Figure 39-8
One level subprogram nesting
Two level subprogram nesting
M98 P22
n M~9 L%
M99
%
SUBPROGRAMS
377
• Three level Nesting The nesling up to three levels deep is the neXI logical extension of the two level nesting. As before, starling al lOp of Ihe main program (program 0 lOin the example illustraled 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. The program processing will always return to the block following the subprogram call. ending in [he main program.
010 (MAIN)
'---
M98 P21
n M;O L
0~:~,~2 (Su (SiS) M98 P22 .---
I 023 (SUB)
L
023 (SUB)
024 (SUB)
M9S P23 M98 P21
rr
~30
M98 P22
M98 P24
M[l ~[l %:i~ L~99 '" L
M99
%
Four level subprogram nesting
n I L% M99
'-- %
Figure 39-9 Three level subprogram nesting
• four level Nesting The logic of multi level subprogram nesting should be pretty clear by now. Four level nesting is just a multiple extension of a single nesting and is logically idenlical LO all the previous examples. Unnecessary addition of more branches
a multi depth
subprogram nesting makes any programming application Ihal much more complex and JlIure lIi ITiculllO masler. Programming the subprogram nesting into (he four level depth (or even the three level depth) will require a full understand in g 0 f t he pro gram processing order - and hav i ng a suitable application for it. In lypical machine shop programming, there is seldom the need [0 use level [hree and level four nesting. If a good example of a rour level nesling application is found. the typical program flow will conform LO the formaL illustrated in Figure 39- JO.
•
022 (SUB)
M9a P23
M99
%
021 (SUS)
Figure 39-10
M99
%
010 (MAIN)
Nesting Applications
Considering the realilY that each suhprogram can be rcpeated up (0 9999 limes in any program thai calls it, shows the enormous programming power available to use and explore. Always be aware of potential difficulties. even dangers, when developing subprograms wilh several multi
nested subprograms. Such a programming approach may result in a short program, but al the cost of a long development time. The program preparation lime, its development and debugging often lake more lime lhan writing convenlional programs. Not only the logical development IS complex and more lime consuming, I:l significant portion or programming lime must be spent on careful and thorough doCumenlaiion of the process flow of all programs, setling up the initial conditions, checking the validity of data, etc. There are many fairly experienced CNC programmers in the maChining trades field, who try to use a multi level nesting at all costs, and the more levels, the better programmers they fcel they are. These programmers, more often Ihen not, use such complex programming technique as the means of expressing their so called 'professional skill', usually measured against other programmers. Often, thiS is nothing more [han a unnecessary contest, a frustration perhaps, and definilely an expression of a little ego trip. When a programmer hecomcs obsessed with making tilt.: program as short as possible, at any and a/I costs, he or she is taking the wrong trek. Such programs, even if technically (lawless and logically correct, are not very easy to use by a CNC operator. A CNC machine operator with limited or no programming knowledge find !hest: programs extremely inrimidating - even skilled and experienced operators will nnd them hard [0 read. hard 10 interpret and most likely. they will be unable to make substantial changes La them, in order [0 modify or oplilnizc the programs for a bellcr performance. A simple general rule for multi level nesting technique use It only in those cases, when the frequency or their future deployment justifies the extra time spent for their development. Like anything else, many nesting levels offer advantages and (he inevitable disadvantages.
378
Chapter 39
CONTOURING WITH A SUBPROGRAM So far, a number of rrogramlmng examples have been using a subprogram. They all related to machining holes and, hopefully. offered enough material to underSland the concep! of subprogramming (there will be one marc - a ralher speCIal one - allhe end of this chapler, so look for it). There aft: other examples found throughoul Ihe handbook [hat make generous use 01" subrrograms. Here is one more example relating to this chapler. Ihis lime applying a simple XY contouring work \0 a mulliple Z depth - evaluate Figure 39-11.
01.75
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 incremenl is i Iluslratcd in Figure 39-/2. The subprogram 019.'iR will contain only the 100/ mo· tions common to all the groove cws. Thal means the .010 incremenlal plunge cui and the 360 0 circular cut. All other motions will be in (he main program 03906. Note the word lilcremenral for the plunge depth. The .010 musl be programmed incrementally, otherwise it will cut at (he absolute deplh of Z-O.OI - all twenty five times! Here is [he complele main program 03906, followed by a single related subprogram 03958 (tool TOI is assumed LO be in the spindle): 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 !) N6 M98 P39sa L25 (CALL SUBPROGRAM 25 TrnES) N7 G90 GOO Zl.O M09 N8 G28 Zl. 0 MOS N9 M30
1.5
0.25
--<00-
-
%
2.0
0.25
0.5
03958 (SUB FOR 03906) N581 G91 GOl Z-O.Ol FO.S (INCREMENT BY -O.Oll N582 G03 I-0.875 F2.0 (FULL CIRCLE CONTOUR) N583 M99 %
Figure 39-11 Main program 03906 using subprogram 03958
The job requires a groove with a 01.750 pilch 10 be machined 10 Ihe deplh of .250. II is a uti lily or rough groove, so there is no need for precision tolerances. or even the high quality of Ihe surface finish. All needed is a 0.250 center end mill (slo! drill). plunge 10 Ihe deplh, program a 36001 circular tOol ralh, and .lob is done. Well, almos\. Even in a material (hat cuts well, forexamrle brass, splitting a single depth cut of .250 inlo two depth cuts of .125 may prove beneficial. The material is D2 lOOt sleel. ralher a tOUQh material. The 100] will rlln at only 630 r/min and only plu~ge inco the material .0 I0 at a lime, repealing Ihe groove
... G91 Z-0.01 Groove width Figure 39· 72
Del8il of the subprogram 03958 . fronl view shown
Intentionally, the presented program is simple. Ii does show, however. two important consideralions [hal have LO be maintained in any subprogram developmenl. These conslderatlOi1S rclalc 10 mainlenance of a continuous relatiolJship be/lVeen the main prograrn and Ihe subprogram. They can be described as special requirements: o
... to maintain a transfer from the main program to
a subprogram Ibefore subprogram is called) o
... to maintain a transfer from the subprogram, back to the main program (after a subprogram is completed)
The firs! requiremenlls mel in block N5. The Z axis posilion mUST be al 20, nowhere else! Being at ZO, it will enable the 1001 to increment 25 limes the distance of .010, resulling in 250 groove derlh. Described differently, the tool Slarl position before a subprogram is called must be at a position [hal results in a correct tool path. 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 subprogram processing returns back to the main program. it no longer beneJits from lhe incremenlal mode, and the G90 changes Ihc Incremental mode back to absolute mode.
SUBPROGRAMS
3
TOOL CHANGE SUBPROGRAM programming sequence for a typical change (ATC) is usually shorl and simple. a system, the M06 funclion will normally do lathes, it IS the T function thai same for the tool change cannot be programmed without esconditions. Program functions to machine zero return, coolant cancellation, are all an integral part of the tool four, five or more program blocks to conditions - every time the automatic which can be quile is the fact that the blocks always regardless of the program being used. consider the following seoperations, they are quite typical, required to a 1001 for several (Ools ina single prognlm.
Also note the various cancellation quite a few oflhem in a subprogram, lhe programmer whether the coolant will be ON or or the cuuer radius offset IS has no idea as 10 what or G91 modes is.
no
or nol. current stams
or
actual status is really nollhal important. canare included in the subprogram, taking vanof fact that a cancellation of a function Ihat is canceled will be ignored by the control
example shows, even a 'simple'
1001
change
some serious thinking,
100 000 000 HOLE GRID
of this
is on a lypical venicnl CNC and uses automatic 1001 change function (ATC): 1.
2. 3. 4,
5. 6. 7.
In the last of (his chapler, perhaps a little deviation from handbook seriousness will be tolerated. ~"rtlrm will look at subprograms from a
following exercise lakes the extreme. Although it is note, it does serve a very of subrrograms and. their usc.
off the coolant a fixed cycle mode a cutter radius offset made Turn spindle Return to Z axis machine reference position
how one hundred million holes, million holes), can be spot drilled and of only 29 blocks ror the two cuteven Include the program num(% signs). Figure 39-13 shows a SImple 10000 rows (X) and 10000 columns (Y).
values
Make the actual tool change seven individual
gram (hal occur for
(his
ROW 10000 COLUMN 10000
a subprogram thaI includes in the main program when-
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 II may even chine design or a manufacinclude special requirements, programmed tmer's options. The 1001 at a certam machine modification the LOol would be Ihe addition of a change block. Anolher is a for 1001 change and Ihe ON function. manucombining the two facturers create a special M standard functions, for is Lhe combination or M06 and M08
o
C'J 0-
o
00000! '0 ./
,,_. SUBPROGRAM
ROW1 COLUMN 1 Figure 39-13 100 DOD DOD holes - rectangular grid pattern
0.12
380
Chapter 39
To make (he example reasonable, simple, and interesting al Ihe same lime, (he holes arc very small, only 05/64 (.0781), with a pitch of. 120 along each axi s, rcsu lIing in a square grid pallern of holes very close (0 each other. Only IWO tools are used, a spot drill with a 90° 1001 point angle \0 startup the hole for drilling and a 05/64 drill. Bo[h cutting 10015 start machining from RO.06 cycle position above the plate to Iheir respective depths: Z-O.04 for the spot drill and Z-0.215 for the drill. From the programmi ng pain! of view, the. program design is not difficult at all - it will usc a main program and one subprogram. The programming procedure is the same for 100 000 000 holes, as if lhe grid were only 100 holes. The main program contains the standard settings and also calls the subprogram, The subprogram will repeat the active fixed cycle 9999 times, for two rows, one in each direction.
The slart position for the first tool motion is at an arbitrary local ion X 1.0Y I .0 (shi fled hy .120 along the minus Y axis). A fixed cycle drills the firSI hole. repeats ilself9999 times, shifts in the posltive Y axis once, drills a hole and repealS along the negative X axis 9999 limes again. This subprogram pattern repeals 5000 times in the body of (he
malll program: 03960 (SUBPROGRAM) N60l G91 YO.12 N602 XO.12 L9999 N603 YO.l2 N604 X-0.12 L9999 %
(SPOT DRILL)
N3 M06
N4 N5 N6 Nt
G90 G43 G99 M98
GOO G54 Xl.0 Yl.O 53000 M03 T02 ZI.O H01 MOB G82 RO.06 Z-O.04 P30 F5.0 LO P3960 L5000 N8 G90 G80 Zl. 0 N9 G28 Zl. 0 NIO MOl Nll T02 Nl2 M06 Nl3 G90 Nl4 G43 N15 G99 N16 M98 N17 G90 m8 G28 Nl9 G9l N20 M30
drilling. A rapid traverse of 475 in/min is assumed in all axes. a reasonable speed. It is worth the few calculations? Malians between Ihe machine zero and Ihe first location are disregarded in both directions for convenience. The tirst calculation finds the lime it takes to make a rapid motion bel ween all holes. One hundred million spaces (less one space) multiplied by .120 divided by 475 in/min is 25,263,1576 minutes. These motions will be multiplied by Iwo, for two lools, therefore 50,526.3153 minutes. 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, mulliplied by one hundred million holes at the rate of 5.0 in/min. therefore cuning time for spot drilling will be 2,000,000 minutes. TIle SpOt drill will rapid oul oflhe hole one hu ndred million Ii mes the dlslance of .100 al the rale of 475 in/min, 10laling 21 ,052.63l6 minutes; Ihe dwell time at each location is 0.030 seconds. translated ioto minutes will take another 50.000 minutes. The actual drilling will take place to the depth of .215 from .060 clearance leveL for (he tOlal travel of .275 at the rate of 4.0 in/min - which is another 6,875,000 minutes. The drill will rapid out of one hundred million limes by the distance of .275, at the rate of 475 in/min, adding another lime of 57,894.7168 minutes.
N60S M99
03907 (MAIN PROGRAM) Nl G20 N2 G17 G40 G80 TOI
What makes the program even more interesting is thees(imate of machining lime. This may go a little too far, but let's finish the fun. Before reading the whole page, make a guess - how long will it take to machine all holes with the two fools? The speeds and feeds are reasonable for most materials, so are {he clearances and the dwell time for spot
(5/64 DRILL) GOO G54 X1.0 Yl.O 53000 M03 TOl ZL 0 H02 MOB GSI RO.06 Z-0.21S N.O LO P3960 L5000 G80 Zl. 0 Zl.O G28 XO YO
%
The program deSign takes an advantage of the subproo oram Ilcsrin .0 ... Co and Ihe lnaximulll number of r(1)critions. t
The grand lolal of aH results is 9,054,473.6837 minutes. which is 150,907.8947 hours, which is 6,287.829 days, which is 17.2269 veary. Believe it or not, il will take more than seventeen ye-ars of uninterrupted machining, to spot drill and drill one hundred million holes - and all thai can be done with the main program and a subprogram tOlalingjust over two dozcn blocks of input.
Going into related details, size of the plate without margins would have to be 100 x 100 feet, so the actual machine travel would have to be greater than 100 feet along the X axis as \\)el/ as the Y axis. Hardly any CNC machine on the markel can handle this monstrous task. How would Ihe plate be mounted, for example? That is another question. To make the example even more fun for the last time, consider the lime spent on programming. doing It witholll a subprogram and wi/holll the repetition count (address L). Assuming that each block will take 6 seconds to write and 55 blocks will fit on a standard paper (hard copy), it would 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' 1.818. J 82 sheets, or a stack of approximately 705 feel (215 meters) thick. Enough or thai - SlIbprograms do work .
DATUM SHIFT The majority of CNC programs will be programs for a single job - ajob thaI is relative to a specific machine available in the shop. Such a particular job will have ils unique characteristics, ils special requirements as well as its own tool path. The 1001 path is the most impol1ant of all the features of a CNC program.
It is the CNC programmer's main responsibility to develop a functional tool path for any givcn job, withoUl errors and in [he most efilcient way. The \001 path development IS very Important, because it represents a machining pattern unique to the job at hand. In most programming jobs. [his machining pattern is executed for the given job only and is irrelevnnl (0 any other CNC program. Often, programmers encounter opportunities, where an exisling machining pauem can be used for many new jobs. This discovery will encourage development of the programs more efficiently and produce CNC progfi.lms for many additional applications and without errors. The programming technique that addresses this issue is known as the Translation of a Machining Pattern or, more commonly, a DafUn! Shift. The mosltypical example oflhis technique is a temporary change of Lhe program reference point (program zero) from (he original position to a new position, so called work shift. Other programming techniques include Mirror Image, described in (he next chapter, Coordinate Rotation and Scaling FlInc/ion, described in the chapters that follow. This chapter describes in detail the advanced subjecl of DQ/um Shift. also known as the Machining Pal/ern Translation. This is a basic feature of all CNC systems Ihat can be applied in a variety of ways.
DATUM SHIFT WITH G92 OR G50 In essence, a datum shift is a temporary or permanent relocation of the part zero (program n:.'ferencc point) inside of Ihe program. When Ihis programming technique is used, it relocate.." an existing machining pallern (tool path) 10 the program a( different locations within the CNC machine work area. In an earEer section (Chapter /6), explanation of G92 (milling) and GSO (turning) commands was covered. Review Ihese commands now, before continuing further. [n particular, recailihat these commands do not cause any direclloo} motion, but they do innuence any tool motion (hal jollows it. Also keep in mind thallhe position register com-
mand G92 and G50 registers (he absolute coordinates of the currenl tool position and have no influence whatsoever on the incremental dimensions, when using the G91 command for milling or the um axes for turning. Its normal purpose is LO 'tell' the control system the curren! 1001 posilion. TIlis step is necessary alleast once at the beginning of each tool to establish the relationship between the fixed program zero (pan origin) and the actual position of the cutting tool. For example, G92 XIO. 0 Y6. 5
is "elling' lhe control system thatlhe CUlling (001 is set at positive 10.0 units away from lhe program 2Cro in the X axis and posilive 6.5 units away in the Y axis. What happens if a wrong position is rcgistc(ed? What if the values in the G92 or G50 statement do not accurately reflecl the !rue, the physical position of <1 cutting tool') A<; may be expected, the tool path will occur at the wrong place and the result is qUIte likely a scrap of the machined part. tool breakage, even a damage to the machine itself. Certainly not a desirable situation. A imaginative CNC programmer always trtcs to find ways and special methods that Lake advanlage of rhe available programming tools. G92 and GSO commands are only Iwo of many 10015 Ihat offer a tremendous power to a creative CNC programmer. For simple jobs, there is no need for special or creative manipUlations. It is not very economicallo invest precious lime on adding features to Ihe program (hal will never provide real advantages. If such a need is well justi rled, the rrogram can be optimized later.
• Program Zero Shift If the G92 command is used on machining centers or the G50 command for lathes at all, rather than the morc current and very efficienc G54 to G59 work offsets. only one G92 (GSO) posjllon register command is neededjoJ Q single 1001 - assuming thal work offsets are not used. Any occurrence of more than il single position register command per each tool in one program is called tl program
zero shift. To illustrate Ihe concept of the program zero shift. a simple bUl relevant draWing wi 11 be used. The drawing is illustrated 10 Figure 40- J.
381
2
40 04001 I.l)
o
m
, 01
N
USED FOR TWO TABLE
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
1
mo
o 40-1
A
HOLE OF PART A)
(TOOL AT LAST
N9 GBO Zl.O
drawing for zero shift illustration - program 04001
the four holes will be machined at loca!ions oflhe machine table setup, as
Nl1 Nl2 Nl3 Nl4 Nl5 Nl6 Nl7 Nl8 Nl9 %
G92 x-a.7 Y-4_7
(SET AT LAST HOLE OF A) G99 GSl X2.S Yl.S RD.l Z-0.2 P200 XC;.75 Y5.0 X2. 5 (TOOL AT LAST HOLE OF PART B) GSO Zl.O G92 X-9.0 Y-4.8 (TOOL FROM M/C ZERO) GOO Z12.S M09 XO YO (TOOL AT M/C ZE:RO) M30
N2, them relates to the in some way. Be velY careful here. Not behind G92 calculations have
. - - - G92 X(A) - - -.... 11 Machine 1
Zero
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 inches rellects th is In pleted the last hole of
9.7
zero along the X axis. Gnd I coordinale setting in block N2 N7 N8, the tool has comA (at X2.SYS.0 of the currenL
G92 selting).
11.2
~
Figure 40-2 Program zero shiff using 692 command for fWo pans - 04001
The G92 X(A) X of Par! A to (he machine zero, distance from the pan zero or Note !.hat the zero. They coule! must start from pan zero. In LO use between both must be known.. used La simplify the example:
zo
Also note thallhe Z value is the same Part 8, because (he same lool is both drill the four holes at two locations, lht: written this way - program 0400 I:
X2.5Y5.0 of ParI A. Uthe tool or ParI B. which is the gram has La 'tell' the moment - but in relation to arithmetic calculation: G92 (X) ; 11.5 + 2.5 - 22.7 (Y) = 9.8 + 5.0 - 19.5
G92
-8.7
= -4
7
Evaluate Figure 40-3 to ree(ion of arrows in the illustration is
ParI A: G92 X22.7 Y19.5 Z12.S ParlE: X-l1.2 Y-9.7
The next is NIO, At this poinl in the program. the Part A is completed. bul ParI B not yet been started. Think a little now and see the Lool is after executing block It is at
mining Ihc axis sign in the G92 block.
A
Blocks NI3 and Nl4 contain the location or Parr B. From the illustration, it easy to understand the meaning of !.he coordinate block N 16. In order to complete the LOol has to return to the home position (machine 1001
DATUM SHIFT
383
~--.... 22.7
----+I.i i?1l
~l
9.7 I
l
However, if the bolt pattern is within a rectangular area, the part zero maybe at the edge comer of the work. 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 convenient and perhaps even less prone to miscalculations:
YS.O
CD
o Use the center of the bolt circle as program zero.
0
This will be convenient for the eNC programmer only, as it causes more work during setup
A 11.2
X2.5 Y5.0 is the last hole of the pattern
Figure 40·3 Calculations of G92 coordinates (XY) for program example 04001
return will take place from X2.SYS.O of the Part IJ, which is 9.000 inches from the machine zero along the X axis and 4.800 inches along the Yaxis: G92 (Xl = 11.2 + 2.5 - 22.7 -9.0 G92 (y) ~ 9.7 + 5.0 - 19.5 = -4.8
Both programmed coordinates X and Y win be negative. Once the current tool position is set at the last hole of Part B, a return to the machine zero can be made. This retum is necessary, because it is the location of the first tool. The target position for machine zero is XOYO not because it is a machine zero, but because the 092 coordinates were measured from there! The actual X and Y motion to machine zero is programmed in block N18.
LOCAL COORDINATE SYSTEM The 092 command for position register is as old as absolute programming ilself.ln lime, it hao,; been supplemented by additional commands that control the system of coordinates. The work coordinate system (G54 to G59 work offsets) has been discussed and a suggestion made that 092 should not be used when any work offset is in effect. Such a siruation prevents changing the program zero on the fly, when needed only temporarily. Fortunately, there is a solution in the form of a progranunable subset of the work coordinate system (work offsets) called the local coordil1ate system or the child coordinate system. There are many cases, when a drawing is dimensioned in such a way that the work offsets 054 to 059 become somewhat impractical. A good example is a bolt hole pattern. If the overall machined component is round, chances are that the program zero will be selected at the center of the bolt hole pattern, which offers a certain benefit in calculations.
o
Use two different work offsets in the program, for example, G54 for the reference to the part edge and G55 for the reference to the center of the bolt circle pattern
o
Use a local coordinate system, within the current work coordinate system (work offset) selected at the beginning of program
In all cases, one significant advantage has been gained the programmer uses calculations relating to the bolt circle center coordinates, directly in the CNC program, without the need of extra additions and subtractions. This method may even simplify setup on the machine. Which method is better to select and when is addressed next. is
TI1e first method, programming to the bolt circle center, (I common method and no comments are necessary.
TIle second method, using the changes from one work offset to another, is also quite common. Its usage is not difficult. TIle limitation of this method is the reality that only six work offsets are available as a standard feature on typical Fanuc control- 054 to G59. Ifa11 six offsets are needed for some work, none is left as a 'spare', to use for situations such as a bolt circle pattem (There are additional work offsets available as an optional feature of the control system). The third method, using the local coordinate system method, has the main advantage that it allows the use of a dependent - also called a child - coordinate system within the current work offset - also caned the parent work offset. Any number of local coordinate systems can be defmed within any parent work offset. Needless to say, work is alNote: ways done in one coordinate system at a time. The local coordinate system is not a replacement for, but an addition to, the work coordinate system.
Local coordinate system is a supplement, or a subset, or a 'child' of the current work offset. It must be programmed only when a standard or additional work offset has been selected. There are many applications that can take advantage of this powerfill control feature.
3
40
•
Command
modal 052 command
What exactly is the local coordinate sySlem, and how il work? Formally, it can be defined as a co~ orCillHues associaled with the aCLive work by the preparatory command G52.
G52
The
r.m,m~ln(l IS
always complemented by the aeIhal set a new ~ thai is fempo-
zero as illustrated
rary •
In
Figure 40~4.
IS
active until it is
in and to rethai
program. To cancel a local coordinate turn 10 the previously aClive work (0 is to program zero values with
xo
. , , last example
YO
tool motions (hal follow lhe cancellation wit! original work offset, which was speci earlier in the example. The boll circle program uses the teChniques 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 N5 G43 Zl.0 HOl M08 PROGRAM ORIGIN 40·4 Local coordinate system definition using the G52 command
The llluwalion a of six holes )ocaled in a rec[angular plate. The lypical program zero is al the lower
edge of plate and the bolt Y3.0 inches from [hal shift amount. The bolt hole is atlhe 0° position of are machined
In
the
cenler is located XS.O and which will become the G52 is 04.500 inches and the I'irst Subsequent holes as holes 2,3,4,5 and 6.
transfer the to Ihe bolt circle cenillustration as a follow the programming as they to the bolt circle and in (he logical order they would in a program: What the program will
pan zero from [he lower ter, in the program.
G90 G54 GOO X8.0 Y3.0
(BOLT CIRCLE CENTER)
(-- WORK COORDINATE SYSTEM POSITION ---------)
GS2 xa. 0 Y3. 0 (-- NEW PROGRAM ZERO ESTABLISHED
----------)
(G8l) X2. 2S YO (HOLE 1 LOCATION FROM NE.W ZERO) ( - - COORDINATES FROM NEW ZERO - -
----------)
Gsa XO YO
( - - CANCEL LOCAL OFFSET AND RETURN TO G54 - - - )
N6 G52 X8 0 Y3. 0
(l'EMI-- PRG
ZERO AT Be CNTR)
N7 G99 G82 RO 1 Z-O.2 PlOD F10.O LO Ne X2.2S YO
(NO HOLE)
X-l.12S
{HOLE (HOLE 2) (HOLE 3)
X-2.25 YO
(HOLE 4)
X-l.125 Y-l.9486 Xl.125 GBO Zl.O M09
(HOLE 5) (HOLE 6)
N9 Xl.125 Y1.9486
NlO Nll N12 Nl3 N14
(CNTR)
(RETURN TO G54 SYSTEM)
N15 G52 XO YO
Nl6 G28 ZI.O MOS N17 1'(01
Nl8 T02 Nl9 M06 H2O
MACHINE COORDINATE SYSTEM So far, work (G54 to 059 work offsets) have been as well as the local coordinare syslem GS2. They are both very powerful and extremely useful programming lools. control system offers yet anolha coordinate system, not commonly used. It may he
called the third coordinale Selection
or thiS
,'('\(\1'",1,,,,,,r.,
DATUM SHIFT
Machine coordinate system uses from (he machine zero as an input -
mea-
benefits in using this unique apparent. evaluate the rules for machine coordinates some become clear: nOI
is effective only in the block where it is specified
o
coordinates are always relative
o
to machine zero position
o
It is only used in the absolute mode
o
Current work coordinate system (work is not by G53 command
o
Cutter radius offset should always be prior to GS3 command IJV.:l,;)lU,""
usage emerges
system can be used 10
same machine rable regardless of which work is on 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
04003 COMMAND USAGE) Nl G20 N2 G17 040 G80 TOl N3 G91 G28 ZO
N4 G90 GS3 GOO X-170.0 Y-SO.O N5 MO 6
N6 GS4 GOO X25 0 Y25.0 SlOOO M03 T02 N7 043 Zl.O HOl MOS
N8 G99 G82 RO.l Z-O.2 PlOO FS.O N9 xS3. 0 Y13. 0
NlO G80 G28 Zl.O M05 NIl G53 GOO X-l70 0 Y-50.0 Nl2 MOl N13 N14 MIS N16 N17 Nl8 Nl9 N20 N2l
(TOOL CHANGE POS)
T02 M06 (ACTUAL TOOL CHANGE) G90 GS4 GOO X53.0 Y13.0 S780 MO) T03 G43 Zl.O H02 MOa G99 G8l RO.l Z-O.836 Fl2.0 X26.0 Y2S.0 G80 G28 Zl,Q MOS G53 GOO X-l70.0 Y-SO.O (TOOL CHANGE POS) MOl
N22 T03 N23 M06
(ACT1J1U., TOOL CHANGE)
% stales that
lance from machine zero position, nOl the and not from any olher position. On many during i\ is ildvisable to establish a tool of the part A
example
(TOOL CHG
(AC'TUAL TOOL CHANGE)
by the machine cothe programming examsitualion, the foJlowing \0 program
with a rotary Nl G21
tbe machine program or the job
illustrates the use of the lool change at a fixed position thai is not directly related to 40·5.
,. ..t-----170 , -----
04003)
from
N250 N251 N252 N253 N2S4
(METRIC)
G90 G54 GOO X17.7 Y35 3
GOI Z-S.O F200.0 GOO ZSOO.O G53 X-400.0 Y-lOO.O MOO
(FIXED POSITION) TOOL CH.i!\.NGiE
N255 S1200 M03 (IN ORIGINAL WORX N256 XSO.O Y3S.0 N257 (... Machining continues ,..) sequence in the program is quite the XY position of (he rart In ""'.·TA.·'.... " the required machining opC!mlion, such as 1001 moves to
/
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 comhas the same mean
Figure 40-5 Machine coordinate system G53 . program example 04003
N256 G90 G54 GOO XSO.O Y35.0
as:
386
40
it new the machine coordinaLe
always program all setting information, and do are olher practical uses for
sys[em,
wailing Lo
be discovered.
DATA SETTING
G 10 command has a simple format that is di for centers and lathes. Be prepared 10 encounter minor in format for various Fanuc controls, although the programming methods arc logical the same. also vary for the different types of work offsets as opposed to tool length arc for typical Fanuc a common lested on Fanue 16 Model
in this
In
a small or medium machine shop, job shop, or any other environment stand alone CNC machines are used, (he machine typically sets all offset values that have (0 be input into CNC system during the job setup. This common when CNC programmer does not ng values - the actual ues - of various offsets at the (ime of development.
conlrol.
..
or incremental programming impact on the offset values input throughRegardless of which type of offset is
agthis An ngile or large voltechnology, such as and tool path development, automatic 1001 changand 1001 life programmable auxiliary equipment, machme automation, and so on. In such an environment, there cannOI any unknown elements - relationships 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 tool setup takes place.
There is an advanlage in such the offset data can be included in the oeled into appropriate There is no operator's automated, including the All offsets are under constant eluding their updates required for changes in tool length or radius. All this high tech aULOmation IS possible with an optional feature called Data Selling. Many control s this feature available, a feature thaI should never be underestimated. Even a small shop with CNC machine can benefit from Data
provided il is supported by the control
.. Data Setting Command select the data setting option and to set through the program, Fanuc offers a G DatI.:! se.lling
preparatory com G lOIs a 11011 valid only for the block in which it is [f it is needed in any subsequent blocks, it to in thaI block.
the G 10 command, the programmed offset the current offset amount siored in the is in absolute mode (G90 for milling turni controls).
mode
for
milling cumruls and UW
offset amounl does nor amouni stored in the conlrol:
in the program, as long command is assigned
command is called. can be set through the pro-
All types
gram, using G 10 command: to G59 and G54.1 P..
o
Work offsets
o
Toollength
G43 and G44
o
Cutter radius offsets
G41 and
This group includes all
if available.
WORK OfFSETS that de-
Before studying this the concept of
..
Work Offset Input
The standard six work offsets both the milling and turning chining Irements, they are typically with milling cOn!rols. The programming format is (he same: G10 L2 P .. G10 L2 P ..
x .. Y .. x .. z ..
Z ..
Machining cenlers
mills
DATUM SHIFT
387
L2 is aflXed offset group number !bat input as the work offset setting. The P can have a value from I to 6, to the !eclion respectivel y:
the in this case to
se-
Pl=G54 P4=G57
TOOL lENGTH OFFSETS Tool length offset value grammed with the G Ja ~~.~~,~~.N set group. Depending on type offset group will have different There are three types of memory on tool length and tool radius
for example, 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
Values 2:
Values set by G10 111 P.. R.. block
• Additional Work Offset Input to the standard six work offsets for milli
offers an oplional set of addirional ] P48. G 10 command can also be used to values to anyone of the 48 additional work sets and (he command is very similar (0 the one: G10 L20 P..
x..
Y.. Z - .
Memory C• two columns for tool offset and two columns for radius offset
Input 1: for:
l'
offset group number has changed to c",lc'l'l~ (he additional work offsets.
Separate Geometry offset value H offset code
ValuessetbyGl0110P..R .. block Geometry offset value
ooffset code Values 2:
• External Work
Input 3:
to lhe work coordinate sysor Common. This offset cannot any G code and is used to globally, affecting all work offsets. into the offset, G lOuses and PO as the offset selection: G90 G10 L2 PO X-10.O
will 10.0 into work offset, while retaining all other (the Y axis. the Z axis and any additional axis as well) n prac[ice. when using the shown sen! ng, each work in il particular program will be shifted by 10 mm the X negative direction.
Values set by G1 0 l12 P.. R.. block
Wear offset value
Used for:
Hoffset code
Values 3:
Values set by G10 111 P.. R.. block
Input 4:
Wear
value
Used tor:
D offset code
Values 4:
Values sat by G10 l13 p..
In all cases, Ihe L group number isler number in of Ihe offset to set lute and incremental length pr:ogrammed input as
block
388
........................................
As an example for a CNC machining center, the follow-
Chapter 40
ing block will input the amount of negative 468 mm into the tool length offset register number 5 (five):
If the existing offset amount needs to be only adjusted, use the incremental programming mode. The last example 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
rf the offset has to be adjusted in order to make the cut 0.5 mm less deep for the lool length offset 5, change to the incremental mode G91 and program:
Be careful with the G90 and G91 mode - remember to restore the mode for subsequent sections of the program.
G91 GIO LIO P5 RO.5
Note the G91 incremental mode. If the last two examples are used in the order listed, the lInal amount of offset number 5 will be -467.5 mm. Older Fanuc controls were using the address L1 instead of the newer L11. These controls did not have a wear offset as a separate entry. For a compatibility with the older controls, L1 is accepted on all modern controls in lieu of L11.
•
Valid Input Range
On most CNC machining centers, the range of tool length offset values is limited:
± 999.999 mm
Metric Geometry offset input
± 99.9999 inches
English Geometry offset input
± 99.999 mm
Metric Wear offset input
± 9.9999 inches
English Wenr offset input
The number of available offsets is also limited, depending on the control model. There is a minimum 32 offset numbers available. Optionally, the CNC system can have 64, 99, 200 or 400 offsets available (even more), mosl of them as a special option.
CUTIER RADIUS OFFSETS For the offset memory lype C. (he amount of the culler radius offsct (D) may he input through the program, using G 10 command with L 12 and L 13 offset groups: G90 GIO L12 P7 RS.O
will input 5.000 radius value inlO the culter radius geometry offset register nUlllber 7. G90 GIO LI3 P7 R-O.03
will input -0.030 radius amount into the culter radius
(NEW SETTING IS 0.02 MM)
LATHE OFFSETS Toollenglh offset does not apply to the lathe controls, because of a different offset structure. G I 0 command can be used to set offset data for a lathe control, using this format: G10 P .. X(U) .. Z(W) .. R(el ..
Q._
The P address is either the geomefl)' offset number or the wear offset number to be scI. The addresses X, Z and Rare absolute values, the addresses U, Wand Care theirrespective incremental eqUivalents. No G90 or G91 mode is available. using the standard G codes of the A Group . To tell apart (he geometry offset and the wear offset, the geometry offset number must be increased by an arbitrary value of 10000:
Pl 0001 Pl 0012
will be geometry offset number 1 will be geometry offset 12
... and so on
If the value of 10000 is not added. the P number will then become the number of the wear offset.
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: GIO PIOOOl XO
zo RO QO
· .. clears all geometry offset for G 01 settings (Geometry offset register I) G10 Pl XO ZO RO QO
· .. clears all wear offset for W OJ settings (Wear offset register I) Note - QO also cancels value of tool tip number in G 0 J GIO PlOOOl X-200.0 Z-lSO.O RO.8 Q3
· .. sets the contents of G OJ geometry offset to: X-200.0
Z-lS0.0
RO.8
T3
· .. also sets T3 in the wear offset - automatically .Ii.' GIO PI RO.8
wear offset register number 7. . sets RO.R
Currelll T selling assumed
value in W OJ wear offset
DATUM SHIFT
389
Note, that it may be safer to program: GIO PI RO. 8 Q3
OIlTeli1 selting 1101 assllmed
GIO PI X-O.12
, ,. wear offset W OJ is set to X-O.l2, regard less of ilS previous selli ng GlO PI UO.05
... updates X-O.! 2 by +0.05, to the new value of X-O.07
PROGRAMMABLE PARAMETER ENTRY This sectlon covers yet another aspect of programming the G10 command - Ihis time as a modal command. It is used (0 change a system parameter, through the program. This command is sometimes called the 'Write 10 parameter fUllctioll', and is definitely not very common in daily programming. Timid programmers should skip this section allogether. 11 is very imponan! to understand the concept of control system paramelers, otherwise this section will not help much. Authorization to change parameters ror lhe machine [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 geometry offset and the wear offset simultaneously, whalever the amount or the offset lype is, The reason is a control buill-in safety thai attempts to eliminate data entry error,
MDI DATA SETTING Programming various offset values through [be program selling requ ires f ul I understanding of the inpul format for a particular conlrol system. It is too late when an incorrect scuing causes a damage to the machine or the part. One method [hat can be used 10 make sure Ihe offset data selli ng is con"eel, is a simple test. Test the G I0 cntnes in the MOL mode on the CNC unit fir!>t, and check Ihe results:
o
Set the Program mude
o
Set the MDI mode
o Insert the test data For example. enter:
WARNINGI Incorrect setting of CNC system parameters may cause irreparable damage to the CNC machine!
Typical uses of [his command are common [0 changes of machining condition, for example, spindle and feedrate time constanlS, pitch crror compensation data, and olhers. This command usually appears in the so called User Macros (applied by the G65 command) and ils purpose is to control cenain mach i ne operations. The concept and explanation of User Macros is not covered by this handbook.
• Modal G1 0 Command When the G 10 command was used for [he offset data Seiling earlier, it had to he repealed in each block. G J 0 for the offsel entry can only be used as a nOll-modal command. Modern Fanuc controls also allow to do anolher type of chonge through the program - Ihe change of CNC system parameters through a modal G 10 command. 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
o Press INSERT o Press CYCLE START To veri fy, check the too! length offset H 12 - It should have the stored value of -J 06.475. While s(ill example:
10
Ihe MDI mode, inSeri another test dalJ, for
G91 GiO LiD PI2 R-l.O
o o
programming G54, the set value is seen on the work offset screen. Yet, the actual storage of G54 value takes place in a system parameter, identified hy a certain paramerer number. The G54 selling can be changed either through the offset data or through a parameter change, and the parameter number must be known. Some system parameters cannOI be changed as easily (and some cannot be changed at all), so Ihe modal G 10 command can be very usefuL In fae!, two related commands are required - G 10 to start the seui ng and GIl to cancel the setting: Gi0 LSO
Press INSERT
(. .. data selling .. .)
Press CYCLE STAH1
Gll
Again, to verify, check the selling of lOo] length offset H 12 - it should have [he new value of -107.475.
The data selling block has three entries: GiO LSD
Develop other similar tests (0 follow the same routine. It is always better LO slart a program with confidence.
.. P .. R."
Gl1
390
40
In case of d modal G 10 and G II combination, this meaning: G10
com-
Data setting mode
Programmable parameter entry mode fixed Data entry specification
If more Ihan one aXIs IS required to be sel at use mulliple .. P. R.. between G 10 funher in (his section. R Address
setting mode cancel
address R is the new value to be inlo parameter number and musl always entered. The listed above must be observed. Note or points in the entries.
Ihat are 10 be sel, one parameter number uses the N
dala use P and R
There are several types of
rameler input: Of~o,alll~'~1
Allowed input range
input
Bit type
Bit
same GI J -
• Program Portability containing even a single programmable eter entry should be used only with the machine and for which were designed.
0 or 1
0 or 1
type
a
Byte type
to
o to
axis
127
0 to :t32767
Word axis type
0 to :t32767
a
Two word
to :t99999999
example. on Fanuc control Model 15.
ting the meaning of an address withnl is number 2400 (Bit #0). The parameter
out n
connolling tile Sal!le
will use
examples illustrate various programmable and have been tested on a Fanuc 16 con!rolmill version. The selected illustration only, not necessarily as parameters on The Ina-
- a si ngle Jaw HUlIl iJer is a differenl meaning, so exercise care when cilanging one bit but not another.
Word Iype is type is also called EI
n15 un Fanuc control Model ]6
3401 (Bit #0).
0 to :t99999999
.,"
con-
numbers must be known duri
Word type
Two word
on dl
same. The exact control
255
an integer Type and the two-word inle.ge r type.
baud rate selling of an Ininterface, if (he I/O Chan-
• Parameters Notation Numbering of bit standard from 0 Lo 7 ilotfrom one), from .
type parameters is Slarf cOllnting from zero
G10 L50 N0103 IUO G11
baud rate setting for the seFrom a table supplied by where Number is the #7 10 #0 are individual
number and the
Setting R-value
Description 2
bering and Ihe elers are input as a hyte,
1
50 baud
are axis and non
2
100 baud
3
110 baud
4
150 baud
5
200 baud
PAddress
The P address IS used only for (bit axis, byte axis, word axis ramelcr does nol relate to an ax dan! and does not have to be
DATUM SHIFT
391 G90 GlO LSD
Setting R-value
Description
6
300 baud
7
600 baud
B
1200 baud
9
2400 baud
10
4800 baud
GIO LSO
11
9600 baud
Nl22I R-2S0000 Gll
12
19200 baud
=
N1221 PI R-250.0
(DECDfAL POINT NOT A.L.I..OWED)
Gll
. Proper input is without the decimal point. An error condilion (alarm or fault) will also be generaled i(ihe P address is not specified at all. For example, G90
In the previous example,
IS
G90
GIO LSO
GIO LSO
N122I PI R-2S0000 Nl221 P2 R-175000
NOl03 RIO Gll
Gll
4800 characters per second baud rate has been selected. In another example, the parameter #5130 controls the chamfering distance for thread CUlling cycles G92 and G76 (gradual pullout distance applicable to lathe controls only). The dala lype is a non axis byte, unit of the data is 0.1 of a pitch and the range is from 0 to 127: GIO LSO NSI30 Rl
If this example is used on a lathe control. PI is the X axis. P2 is the Z axis. On a machining center, [he PI is the X ax is, P2 is the Y axis and P3 will be the Z ax is, ifrequired. In eith~r case, the first two axes of the G54 work offset setting will be -250.000 and -175.000 respectively_ Sometimes it is necessary to set all axes to zero. This may be done with a standard offset setting: G90 GI0 L2 PI XO YO ZO
Gll
This program segment will change parameter #5130 to the value of I. The chamfering amount will be equivalent to ?ne pilCh of lhe thread. Do nolconfuse byte with a bil- byte lS a value 0 to 127 or 0 to 255 for the byte axis type, bil is a s[ate~nly (Oor I, OFF orON, DISABLED or ENABLED), offenng selection of only one of two options available. The word BIT is actually an abbrevialion of two words: Bil :::: Binary digit
will generate an error condition. The next example changed for two axes input:
('binary' means based on two)
Another example is for the entry of a two word parameter type. It will change the work offset G54 to X-250.000: G90
GIO LSO N1221 PI R-2S0000 Gll
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, up LO 8 axes. Because the valid range of a l~ng'integer (two word type) is required, a decimal point cannot be used. Since the selling is in metric syslem and one micron (O'(JO I mm) is the least increment, the value of -250.000 will be entered as -250000. The following exumple is NOT correct and will result in an error:
(MILLrnG CONTROL)
or write 10 a parameter, also for a milling conlro\: G90 GI0 LSD N1221 Pl RO N1221 P2 RO N1221 P3 RO
(SET G54 X COORDINATE TO 0) (SET G54 Y COORDINATE TO 0) (SET G54 Z COORDINATE TO 0)
Gll
• Bit Type Parameter The next example is quite harmless and may be used as a lest, but be careful wilh any other parameters. Its only purpose is to set automatic block sequencing ON while entering a CNC program at the control. It also serves as an illustration of a bit type parameter and IS a good example of some general thoughts and considerations that go into program preparation using programmable parameter mode. On Fanuc 16 Model B (and most of the other models as well) is a feature that allows automatic entry of sequence numbers. if the program is entered from the keyboard. This feature is intended as a time saving device for manual entry of program data. In order to enable Ihis feature, select the parameter that controls the ON and OFF status of the feature. 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 OFF is the same 8S I or 0, but only a number can An individual bit the means all the other oue. IlltiJis eX
0000
#7
o
ISO
TVC
#2
#1
#0
o
is irrelevant means the auto-
meaning of the example. TIle bit is sel to
malic block numbering is
lilt:
INI
o
o
will appear automatically on screen. In the saving keyboardi during manual program input. The idea behind the G 10 modal in the programmahIe parameter enlry is that more than one parameter can be sel as a group. (WO paramelers are cally connected, a can be with the same Iinal two smaller segments earThe modal G 10 {"n'"TlIflO"'," comes handy here: G10 LSD NOOOO R001010l0 N3216 R5
Gll
U • .:>,ClUH_'-'
The following program without changing Ihe other
neither parameter is.
will turn on the bit
omitted. The NOOOO is. the same as. legibility.
G10 L50
NO R00101010 Gll
The resulting entry in lhe
screen
WIll
reflect TVC #0
o !hal all bilS had \0 be written. The job is not done yet. however, Fanuc offers an additional reature - the increment the numbering can be as well. for examselection of 10 will use NIO, I will usc N I, N2, N3, increments ofi"ive, for NIO. NI5, etc. llle incre10 be sel - yes - by another 16. parameter number value is #3216. is a the val id range is 0 10 9999. by selling the bit in na'"""·.... "An'."..."' .... ' will look like this: G10 LSD N3216 R5
Gll are completed,
In any program
con-
lype, the address P was and was used only
to Fanuc 15 users (Fanuc 15 16) - the parameter number the automatic will IS 0, #1 (SQN). There is marc on 15 - the slarting secan be controlled with parameter #0031, 111M stores the increment amount IS as shown. Also. on 15, the allowab!e sequence numbers is lip to 99999. 111is IS a typical exampJeofadifference I wo control models, even were produced by the same manufacturer.
•
of Block Numbers f"\"'~"nH
include block "H"Tl"''''''''
N121 Gl0 L50 N122 NOODO R00101010 N123 N3216 RS N124 G'll
There are now fH!O di and N123. How will be no block wirhin lhe G is the block number, the same block will be interpreted as pa-
MIRROR IMAGE of a program development is to create a cuuer tool path in a specific location of the part or the tool path requires both the right and left programming lime can be shortened called the Mirror Image. of machining operations can be repemed using the mirror image feaLUre of the contml is no need for new calculatiol1s, so this technique of programmi reduces the programming time as well as the possibility of errors. Mirror image is sometimes [he Axis Inversion function. This description is accurate up to <:\ point. Although it is true that in mirror image mode the axes will be inverted, but several other will take TIllS makes Mirror Image more accurate. who are miliar with a thai the mirror function In IS
on
BASIC RULES Of MIRROR IMAGE rule of a mirror image is based on thl: machining a given 1001 path in one quadrant is not di than machining the same tool path In The main difference is (he reversal of That means a given one quadrant can be repeated in another same mirror
Ihal
Hand vs. Left Hand orientation part orientation -
principle of symmetrical
known as the RighI Hand (RJH) and the
(Figure 4/-/).
UH Part Figure 41-2 The
nrlflf':JnIf!
lhal each quadrant requires function allows the re~ changes automatically.
versa]
• Figure 41-7 Right hand VS. Left hand as the orm!c/D,fe of mirror image
Programming mirror image basic rectangular plies (0 quadrants. It also requires lerpolation and applications of cutter are four quadEarlier discussions established that raniS on a plane. The upper right area creates Quadran! I, the upper len area is Quadrant II, left area IS Quadrant IIf, and the lower right area is IV. Iflhe program zero is at the lower left corner programming in the tirst quadrant.
applied a machined part
Tool Path Direction
Depending on the quadrant "'''''c; . . ,.<:.u for the mirror image, may affecl some or all of these activities:
the tOOl path directiOnal o
Arithmetic sign of axis
(plus or minus)
o
Milling direction
(climb or conventional)
o
Arc motion direction
(CWor CCW)
One or more these axes are only used for mirroring
393
394
Chapter 41
Ir
IS
is no arc diof the mir-
QUADRANT II (Q2)
Y+ i
QUADRANT I (Q1)
MI
<_ QUADRANT
~I
It
1 '\
...........
x-
,02
...........
QUADRANT III (03)
,
y_
OUADRANT IV (04)
G41
IJ
QUADRANTIII
, y-
Figure 41-4 Mirror axis and its effect on pan orientation
IV
Figure 41·3 Effect of mirror image on tool path in different [J1l~llJr~/[Jrs
• Original Tool Path The originallOol path program may quadrant. If there is no condition), the tool path is in ranl only. This is how the m~iorilY of all programmed. Once mirroring is Ihe original machining pauern - the gardless in which quadrant it has been
Mirroring will always transfer the lool path) to another quadrant or quadrants. pose of the mirror image function. image requires Ihal cerlain conditions are mel. conditions is definirion of the mirror axis .
Programmable mirror image must be supported by the control system
machining follows the program as IS. For examif (he programmed path takes place In the second quadram (using absolute mode G90), the normal X values will the normal Y values will be positive. poims is always normal within the origiquadrant programmed, when no mirror image is used, the machining takes place in a mirrored quadrant, one or both signs will change.
• Sign of Coordinates 'normal' sign depends on the quadran t of the coordinate system used in programming. If programming in rhe Quadrant /, both the X and Y axes have positive absolute is the complete lis( for absolute values in all
• Mirror Axis
x+ y+
Since there are four quadrants, they provide in fact lou I' available machining areas. These areas are divided by two machine axes. Mirroring axis is Ihe machine axis about which all programmed motions will flip' over. Figure 4 J-4 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.
2. 3. 4.
Normal machining - no mirror image set Mirrored machining about the X axis Mirrored machining about the Y axis Mirrored machining about the X and Yaxes
Quadrant II
x- y+
III
x- y-
Quadrant IV
x+ y-
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 are required. Program is relatively tool motion for one quadrant only Not mirrored wHhout a good plan first- it must with mirror image in mind .
lool motion defined in climb milling llllflTIf..1l.1
I,
rants will
o
mirrored machining in Ihe
as follows:
Mirrored in Quadrant II
o
in
III
o Mirrored in Quadrant IV
... Conventional mode
• Control Setting
... Climb mode ... Conventional mode
Il is importanllo understand the machining mode when A conventional machining mode may not In may negatively affect the surface tolerances.
•
MIRROR IMAGE X-AXIS 0 MIRROR IMAGE Y-AXIS:::: 0
Arc Motion Direction
to the tool path that will happen only when a is mirrored, is the rotation direction of an arc. Any clockwise arc programmed will become counterclockwise arc one axis, and is direction, versa.
based on Quadrant I: o
Quadrant!·
(O:OFF 1:0N) (O;OFF LON)
where mmoring for both axes
To apply X axis mirroring only, MIRROR IMAGE X-AXIS :::: 1 MIRROR IMAGE Y-AXIS .. 0
To apply
Quadrant II Quadrant III IV o
Most conlrols have a screen setting or switches dedicated mirror image set at the controL Both designs allow nn,.'r""", to set certain parameters in a friendly way, ll>lnIO'~r of overwriting other parameters by error. a display similar 10 Ihis
(0
{he Y
mirror, the display must show
MIRROR IMAGE X~AXIS :: 0 MIRROR IMAGE Y-AXIS 1
Quadrant I . Original arc is CCW:
(0 : OFF 1: ON) (0 : OFF 1: ON)
(O:OFF l:ON) (0: OFF 1: ON)
LO mirror about both
Quadrant Ii CW Quadrant III - cutting CCW QuadranUV . CW
will
The control will automatically perform G02 as G03 and G03 as G02 For the majority of machining applications. arc motion direction change the both Ihe millshould not ing direction and Figure 41-3.
MIRROR IMAGE X-AXIS 1 MIRROR IMAGE Y-AXIS:::: 1
program
(O:OFF 1:0N) (O:OFF l;ON)
both
MIRROR IMAGE X-AXIS MIRROR IMAGE Y-AXIS
0 0
to return (0 the nonnal and Y axes is zero:
(O:OFF 1:0N) (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-
Ihat uses a fhan whe~ programming in a mirror image). During program, with the mirrored, when the mirror the following considerations !ITaTIIlllilll'
1.
2. 3.
ON MIRROR [MAGE
different technique
(wilhout {he all motions in Ihe zero return, will be on. That means
XOFF YOFF
o x ON
HOW the program is WHERE the mirror image will be WHEN the mirror image will canceled
Start and end of the program [hilt is to ally al the same localion, typically at
axes
ON for both axes:
MIRROR IMAGE
OFF is usu-
Figure 41-5
Togg/e switches
of mirror
Chapter 41
Y+ j
G54
'--
G
• Programming· Manual Mirror Setting
o
is a drawing with 3 holes to be machined in quadrants. It wil! be used to illustrate the of programming of the mirror image. 0 0 <:)
N
-
<.0
5.0
0-
,
3.0
-0
0
1.0
0
Figure 41·7 Programmed tool motion for the three holes located in Quadrant I
-0
0 0
j Y+
o
0 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 N2 G17 N3 G90 N4 G43 N5 G99
, ....
0
0 "<::t
0
0-
-0
,
(CENTER DRILL THREE HOLES) G40 G80 GS4 GOO XO YO 8900 M03
Figure 41-8
(XOYO)
Zl.O HOI MOS
Resulting tool motion in all four "" •• ,"'.".",. using mirror image
G82 X6.0 Yl.0 RO.l Z-0.269 P300 F7.0
N6 X4.0 Y3. 0
are automalic by the program. The image vary between machines, but the applicarion principles are the same. Control
N7 X2.0 YS.O N8 GBO ZLO M09 N9 G28 ZL 0 M05
mo
GOO XO YO N11 M3D %
Look at the tirst tool motion in
program
RETURN TO XOYO)
•
Mirror Image Functions
In
these functions will be used:
It locates the cUlling
tool at XOYO, where there is no hole.' This is the most important block in the program for a mirror image, because il is this location lhat is COl11mOI1 to all Jour quadranls~
PROGRAMMABLE MIRROR IMAGE Mirror'
Most controls by the control setting program. On the other
is sel for each axis by an M
runction is in effect when another function is I both be elfective. To make only one axis
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
Program 04102 for the 3 holes in Figure 4 J-6. can be. changed to the programmable mirror image. Holes absoIute locations are stored i 11 subprogram 0415] : 04151 N1. X6. 0 Yl. 0
N3M23
(MIRROR OFF)
G90 G43 G99 M98
G54 GOO XO YO S900 MO} (XOYO) Z1.0 HOI MOS G82 RO.1 Z-O.269 P300 F7.0 LO P4151 (QUADRANT Il
M21
(X-MIRROR ON) (QUADRANT II) (Y-MIRROR ON) (QUADRANT III) (MIRROR OFF) (Y-MJ:RROR ON) (QUADRANT IV) (CYCLE CANCEL) (MIRROR OFF) (Z MACHINE ZERO)
N4 NS N6 N7 N8 N9
M98 PH51
N2 X4. 0 Y3. 0
mo
ill X2. 0 Y5. 0 N4 M99
NIl M98 P41S1
M22
Nl2 M23
%
The main program 04 J 02 calls the subprogram 04151 in different quadranls, using the mirror image functions. Note
the XOYO localion is common to all four quadrants. 04102
(MAIN PROGRAM)
N1. G20
01/8 DRILL 0.25 DEEP 12 HOLES
Nl3 Nl4 N1.S Nl6
MJ2 M98 P4151 GSO Z1. 0 M09 M23 NJ.7 G28 Zl. 0 MOS Nl8 GOO X4.0 Y6.0
(CLEAR ATe LOCATION) (PROGRAM END)
N19 M30
%
150
0.50 0.125
R1.00
RO.1S (3)
0.25 SLOT DEPTH
'00
T
4.00
o o
·.-.-00 00
l
o
o
0.50
0.125
I
ALL QUADRANTS ARE SYMMETRICAL ABOUT THE CENTER LINE
00 L
4.00
MATERIAL: AL PLATE - 4
Figure 41-9 Comprehensive example of programmable mirror image Uses main program 04103 and subprograms 04152 and 04753
x 4 x 1/2
398 •
41
Comp
Mirror Image Example example of a mirror lmage applical wilh mollons will use two culli lools LO
drawing in Figure 4 aUiomutlc lool arc needed - one the slot milling in
one
ror
04152 (SUBPROGRAM - DRILLING) N1 XO.125 YO.125 IN X) (HOLE IN Y)
N2 Xl. 5 N3 XO 125 Yl. 5
(NO HOLE AT PLATE CENTER)
N4 XO YO LO N5 M99
%
04152 contains only (he lhree hole local. The cycle call is not included in lhe lhe return to the center (N4) is mode but wilh lhe
LO
04153 (SUBPROGRAM - MILLING) (~n,1"I''I4'O OF SLOT) N1 GOO X1.S Yl.S N2 GOI Z-0.25 F3.0 N3 G03 XO.5 YO.5 10 J-I.O FS.O N4 GOI Xl. 5 (SLOT START) N5 G41 DOL X1.365 YO.4SS N6 G03 XI.S YO.35 IO.135 JO N7 XI.55 YO.S 10 JO.15 N8 Xl.S YO.65 1-0.15 JO N9 GOI XO.7254 NlO G02 XO.6754 YO.7 10 JO.OS Nil XO.677 YO.7125 10.05 JO Nl2 XI.5 YI.35 10.823 J-0.2125 N13 G03 XI.65 Yl.S IO JO.lS N14 Xl.S Yl.65 1-0.15 JO NlS XO.35 YO.5 10 J-l.15 N16 XO.s YO.35 10.15 JO N17 G01 Xl. 5 NlB G03 Xl.635 YO.48S 10 JO.135 (SLOT END) N19 GOl G40 Xl.S YO.S N20 GOO ZO.l (MOTION TO PLATE CENTER) N21 XO YO (S"CIBPRCX:;R)IM 04153 END) N22 M99 %
Quadranl I
IS
also used in
for one
slol. 1lle machining slarts with Ihe cutler at the slot centerline, roughing the radius Ihe walls. culler radius offset i::, used and SIOI is fini La The subprogram ends at the plate cenler in N2 I, the same as in drilling. The program 04103 uscs two ff more lools are used, the pwgramming technique will nOI change.
04103 (MAIN PROGRAM) (USES SUBPROGRAMS 04152 AND 04153) (XO YO LOWER LEFT CORNER - ZO WORK TOP) (M21 = X-MIRROR ON ----------------------) (M22
(M23
~
Y-MIRROR ON
= MIRROR
OFF
-------------)
--------------------)
G17 TOI G52 G90 G43 G99 M98
1/8 DIA SHORT DRILL) G20 G40 GSO G49 BLOCK) M06 (TOOL CHANGE) X2.0 Y2.0 M23 (MIRROR OFF) G54 GOO XO yO SIBOO M03 T02 ZI.O HOI MOB GBI RO.I Z-O.269 F4.0 LO P4152 (QUADRANT I)
Ne M2l
(X-MIRROR ON) (QUADRANT II) (Y-MIRROR ON) (QUADRANT I II) (MIRROR OFF) (MIRROR ON) (QU1UlRANT Dl) (CYCLE CANCEL) (MIRROR OFF)
NI N2 N3 N4 N5 No N7
N9 M98 P4152 NlO M2:>' NIl M98 P41S2 Nl2 M23 N13 M22 NI4 M98 P4lS2 Nl5 GSO M09 N16 M"23 N17 G52 XO YO NIS G28 ZO.l MOS N19 GOO X4.0 Y6.0 N20 MOl
(CLEAR ATC
LOCATION)
(OPTIONAL STOP)
(T02 - 1/4 DIll. CENTER CUTTING END MILL) N21 T02 M06 (TOOL T02 TO SPINDLE) N22 G52 X2.0 Y2.0 M23 (MIRROR OFF) N23 G90 G54 GOO XO YO S2500 M03 TOI N24 G43 ZO.l H02 MOS N25 ].198 P4153 (QUADRANT I) (X-MIRROR ON) N26 M21 N27 M98 P4153 (QUADRANT II) N28 N29 N30 N31 N32 N33 N34
M22 M98 P4l53 M23 M"22 M98 P41::i3
M23
G52 XO YO M09 N35 G28 ZO.l MOS N36 GOO X4.0 Y6.0 N37 IDO %
(Y-MIRROR ON) (QUADRANT III) (MIRROR OFF) (Y-:MIRROR ON) (QUADRANT IV) (MIRROR
LOCATION) (PROGRAM
(CLEAR ATe
In order to use the zero must be defined on
mir-
two lines (axes) arc required center plate must be the program LCro. 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
MIRROR IMAGE ON CNC lATHES Mirror Image function has ils main aUIJtl~.'" machining center. lathes, this lathe wilh two tulTets, one on each mirroring wii] use the X linc. cenler I as the mirror axis and, in effect, programming melhod for both lurrets.
Machining with mirror image can be used with other lime saving features, such as Rotation Scaling FUllction.
le
COORDINATE ROTATION A 1001 malion creates a pall ern , conlour or a pockel that can about a defined point by specified angle. With this control feature, there are many opportunilies Lo . ng process much more flexibe and equally very powerful programming control option, is called the Coorfealure, usually a dinate System Rotation, or Coordinate Rotation. One of the mOSI i talion IS a program thai is tation but machined at an specificalions). and vertical orientation, which means thai the motion takes place program orthographic tool posilions
ROTATION COMMANDS rotation uses two preparatory turn feature ON or OFF. The two G trolling the rolation are:
10
ti.ition ON Cooldirlale sySlem rotation OFF The G68 command will activale thc coordinate system rotation, on the cemer of rOlcoion (also known as the pivot point) and of rotation:
tBf where ...
1
x
y
R
Absolute X of the center of rotation Absolute Y coordinate of the center of rotation The angle of
• Center of center of rolation
which the rotadefined by two differplane, X and Y for the G 17 active
(Olalion point coordinatcs point coordinates. The
and GI9 will use as the plane selection command G 17, G 18 or G 19 muSI be en-
0.65 \I
tered into the program unytime mand G68 is issued.
1- -Figure 42-1
Original orthogonal object (a) and a rolated
(b)
The above figurc (a) shows an orthogonal orientation of a rectangle. the figure below (b) shows the same rotated by 10° in the counterclockwise Manual it is much easlcr to program the 1001 path for (a) and the control system change it (0 a tool path figure (b). The coordinate rotation feature is a lion and must be the part of the control
Mathematically, the coordinale rotation is a requires only three items to define a rotated of [he aogle of rotation, the
the rotation com-
If the X and Y coordinate arc not srecilied with the G68 command as the center of rotation (in the G 17 plane), the current 1001 position will center of rotation. This method is recommended approach Ir1 any
•
Radius of Rotation
The G68 angle R, are
cell-
The number of decimal places L)i" R amount will become amount of the angle. R nes a CCW , negative R defines a CW rotation lei:
400
Chapter 42
, CCW== +
,a
/ CENTER OF ROTATION
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 motions will be included in the rotation or not. This is a very important decision. In Figure 42-5 are the two possibilitie's 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=='CENTER OF ROTATION
J
b
-
PROGRAM ZERO ~ \ (ROTATED) ,,
__ .
- ..
f;-\
Figure 42-2 Direction of coordinate rotation, based on the center of rotation: ( 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 , , \ PROGAAM ZERO ROTATION = X-10 Y-i.0 ~ (ORIGINAL)
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 Pari oriented as per engineering drawing specification
The actual lool path, includmg the C.lpproach towards the part and the depanure from the pan, is not normally included in the engineering drawing. Be careful here - ir the approach and/or deparlure molions are i nc\uded in the rolation. the program zero may also be rozated. In the Figure 42-4, the orientation of the part i~ 15° counterclockwIse. based on the lower len corner. R15
1-
30
5,0 Figure 42-4 Part oriented as per program, using the G68 command
The following program 04201 illustrates the above example (a) , in Figure 42·5, which does include the proaram • 0 zero rolallon. It the program zero is not to be rotated, include only the part profile lool path between the G68 and G69 commands, and exclude the toot approach or departure motions, Also note the G69 in block N2 - the cancellalion is included there for added safety. 04201 N1. G20 N2 G69
(ROTATION CANCELED IF NEEDED)
N3 Gl7 GSO G40 N4 G90 G54 GOO X-l.O Y-l.O S800 M03 N5 G43 ZO.l HOl MOB 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 NlO X3. 5 Nll GOl XS.O Yl.5 Rl.S
N12 GOl YO.S 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°, --
block N8 conlains cuner radius offset or compensation programmed will coordinale rolation lakes place .
•
a
Coordinate Rotation Cancel
PART
Command the coordinate rOlation funclion and returns the control system to its normal onhogonal condition. fy (he command in a separate
-
block, as in (he
•
o
o o
Coordinare rotation appJied to lit a long part within rhe work area
If the nature of the work includes orthogonal parts machined at an angle per drawing requirement). The earlier example belongs to this category.
If there is a short X
Ytravel on the machining center and the part is positioned on at a known angle, because of the limited machine travel.
The second application is ordinate system rolalion, lions are satisfied:
WORK AREA
ROTATION NOT SHOWN
Common Applications
As mentioned already, nothavelhe they may have il lion can be very o
WORK
example of [he cothal two major condi-
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 defmed by the limits motions. Work area must be able 10 accommodate all ances, Including
PRACTICAL APPLICATION In many cases, togelher with milling lions are
Rotated part must fit within the work area
example in
The angle ofthe setup must be known
deceptively simple but
In the Figure 42-6, a orthogonally, but it can This method is quite ble to be implemented. A placed within the work area length ever, there are cases when this be very useful, even if it is nOI LaO common. illustration only shows the general principles of application. If the positioning angle is nol known, use an indicalor at two 10calion,:; of the mourlled part und Calculate illrigollulllt:trically. In some cases, a special fixture for such a setup,
tool motions and clearcuLLer radius offset In effect
used very efficienlly Applicalions such as or machining at boIL circle locaThe following detailed drawing that looks a bit of programming.
The requirements and opmenl must be machine all 7 pockets with a type). To make the plunging to the full ma>(lmum deplh of' cut.
Slack for finishing of the addition, all sharp chamfer. In all, only (?)
30 FACE MILL
o 1/4 CENTER CUTIING
o 3/8 CHAMFERING
is definitely a With gl
lapp]
is expected.
Not experience, il
program. Hopefully, [he
to IlIteq)l"et {he notes will help.
2
42
-
-- - -
o
1
, ,
4
nmllrPflPn',IVP
C"CHIfWC
7 EQSP POCKETS SEE DETAIL
x 3 x 1/2
of coordinate system rotation - program 04202
The main program x.J-r.'-Vk of four sUbprograms. Although some difficult to underSland, one cal. In two subprograms will
RO.15
G91 G68 XO YO R51.429
Its purpose is 10 shift
(0
CUJ3'U'UI.\.>.
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',",',~..,.., low its progress and structure.
Figure 42-8
Top and front view of the
The
next
XOYO remain the same will the angle will increment, because of
detail
nrnl1rr!'lm
04202
only
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 Nl G20 lO G69 N3 G17 G40 GSO Tal N4 M06 N5 G90 G54 GOO X-l.375 Y-3.25 S3500 M03 T02 N6 G43 Zl.O HOl MOS N7 Gal ZO FlO.O N8 Y3.125 F15.0 N9 GOO Xl. 375 NlO G01 Y-3.25 Nll GOO Zl.0 M09 Nl2 G28 Zl.0 MOS N13 Mal
TOP FACE) (ENGLISH UNITS) (CANCEL COORDINATE ROTATION IF ACTIVE) (SEARCH FOR TOl IF NOT READY) (TOl TO THE SPINDLE) (Xl' START POSITION FOR FACE MILLING) (Z CLEARANCE FOR SETUP - COOLANT ON) (TOP OF FrnISHED PART FOR FACE MILLING) (FACE MILL LEFl' SIDE) (MOVE TO THE RIGHT SIDE) (FACE MILL RIGHT SIDE) (z AXIS RETRACT - COOLANT OFF) (Z AXIS HOME FOR TOOL CHANGE) (OPTIONAL STOP)
(T02 - 1/4 DIA CENTER CUTTING END MILL - MAX DEPTH OF CUT 0.05) (SEARCH FOR T02 IF NOT N14 T02 (T02 TO THE SPINDLE) N15 MOS {CANCEL COORDlliATE ROTATION IF ACTIVE} Nl6 G69 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) (CONTROLS 0.005 LEFT ON THE POCKET BOTTOM) Nl9 GOl ZO.02 F30 0 N20 M98 P4252 L7 (ROUGH AND FINISH MILLING OF SEVEN POCKETS) (CANCEL COORDlliATE ROTATION IF ACTIVE) ml G69 lO2 G90 GOO Zl.O M09 (Z AXIS REl'RACT - COOLANT OFF) lO3 G28 Zl.O MOS (Z AXIS HOME FOR TOOL CHANGE) (OPTIONAL STOP) m4 MOl (TO) - 3/8 DIA CHAMFERING TOOL 90 DE(;mEES) ms T03 m6 M06 N27 G59 lOS GSa G54 GOO X-2.5 Y-2.0 S4000 MOl TOl lO9 043 ZL 0 HOJ M08 N30 GOl Z-O.075 F50.0 N31 G4l X-2. 0 D53 F12. 0 N3 2 Yl. 5 N3 3 X2. 0
N34 N35 N36 N37 N38 N39 N40 N41 N42 N43 N44
%
Y-L 5 X-2. 5 GOO 040 Y - 2.0 ZO.l XL 0 YO M9B P4254 L7 G69 G90 GOO ZL 0 1409 G28 Zl. 0 MaS X-2.0 Y8.0 M30
(SEARCH FOR T03 IF NOT READY) (T03 TO THE SPINDLE) COORDINATE ROTATION IF ACTIVE) (Xl' START POSITION FOR PERIPHERAL CHAMFERING) (Z CLEARANCE FOR SETUP - COOLANT ON) (ABSOLUTE DEPTH FOR CHAMFERlNG Z-O.075) (APPROACH MOTION AND RADIUS OFFSET) (CHAMFER LEFT EDGE) TOP EDGE) RIGHT EDGE) BOTTOM EDGE) TO START POINT AND CANCEL OFFSET)
ABOVE PART) TO THE CENTER OF POCKET 1) SEVEN POCKETS) COORDINATE ROTATION IF ACTIVE) (Z AXIS RETRACT - COOLANT OFF) (Z AXIS HOME FOR TOOT; CHAN'GE) (PART CHANGE POSITION) OF MAIN PROGRAM 04202)
404
Chapter 42
04251
mOl G91 Z-O.OS m02 M98 P4253 ID03 M99
(POCKET TOOL PATH AT ZERO DEGREES - POCKET 1) (START AT POCKET CENTER - FEED - IN BY O. 05) (POCKET CONTOUR - 04253 USED FOR ROUGHING) (END OF SUBPROGRAM 04251)
%
04252 mOl M98 P4251 D51 FS.O L5 N202 Z-O.OOS N203 M98 P4253 DS2 F4.0 N204 G90 GOO ZO.02 N205 G91 G68 XO YO RSl. 429 m06 G90 Xl.O YO m07 M99 % 04253 N30l G41 N302 G03 NJ03 GOl N304 G03 N30S GOI m06 G03 N307 G01 IDOS G03 ID09 G01 IDIO G03 N311 G01 N3l2 G03 ID13 GOI N314 M99
(SUBPROGRAM FOR MILLING POCKETS) (ROUGH TO ABS" DEPTH Z - 0 . 230 IN FIVE STEPS) (FINISH TO FINAL ABSOLUTE DEPTH Z-0.235) (POCKET CONTOUR - 04253 USED AT FULL DEPTH) (RETURN TO ASS. MODE AND Z AXIS CLEAR POS.) (NEXT POCKET ANGLE INCREMENT)
(MOVE TO NEXT ROTATED XY AXES START POSITION) (END OF SUBPROGRAM 04252)
(POCKET TOOL PATH AT ZERO DEGREES - POCKET 1) X-O.2 Y-O.05 XO.2 Y-O.2 10.2 JO XO.225 YO XO.1S YO.IS 10 JO.15 XO YO.2 X-O.1S YO.15 1-0.15 JO X-O.4S YO X-O.15 Y-O.lS IO J-0.1S XO Y-O.2 XO.1S Y-O.lS IO.15 JO XO.225 YO XO.2 YO. 2 IO JO.2 G40 X-0.2 YO.OS
(LEAD-IN LINEAR MOTION) (LEAD-IN CIRCULAR MOTION) (CONTOUR (CONTOUR (CONTOUR (CONTOUR (CONTOUR (CONTOUR (CONTOUR (CONTOUR (CONTOUR
BOTTOM WALL ON THE RIGHT)
LR CORNER RADIUS) RIGHT SIDE WALL) UR CORNER RADIUS) TOP SIDE WALL)
UL CORNER RADIUS) LEFT SIDE WALL) LL CORNER RADIUS)
BOTTOM WALL ON THE LEFI') (LEAD-OUT CIRCULAR MOTION) (LEAD-OUT LINEAR MOTION) (END
OF SUBPROGRAM 04253)
%
04254 N40l G91 N402 M98 N403 G90 N404 G91 N40S G90 N106 M99 %
GOI Z-O.175 F50.0 P4253 D53 FB.O GOO ZO.1 G68 XO YO R51.429 Xl.O YO
(SUBPROGRAM FOR CH.AMF'ERING POCKETS) (CHAMFERING DEPTH FOR POCKET AT ABS. Z - 0 . 07 5) (POCKET CONTOUR - 04253 USED FOR CHAMFERING) (RETURN TO ABS. MODE AND Z AXIS CLEAR POS.) (NEXT POCKET ANGLE INCREMENT) (MOVE TO NEXT ROTATED XY AXES START POSITION) (END OF SUBPROGRAM 04254)
SCALING FUNCTION Normally, a programmed lool motion a center lhe dimensions of the with culler radius offset in effect. Occasionally, when the machining lOol path thal programmed once must be repealed, but machined as smaller or larger than the original. yet slil! keep il at Ihc same lime. To achieve this goal. n can· called the Scaling Function is used. Note the following two imponant ilems: o
o
function is an option on many controls may not be available on every machine
• Scaling Function Usage In indusfry, Ihere are many applications for
I
path. The result is many hour.:; of extra work are some of the typical possibilities a scaling function can be beneficial: 1001
o
Similar parts in terms of their geometry
o
Machining with built-in shrinkage factor
o
Mold work
o
conversion
to metric and metric to
may be used tor
Some function as well
is used 10 make a new than the original one. Scaling is (increasing size) or redllcan ex i51! ng loa I ra Ih - Fig tire /.
For even
flexibility in programming, the with other can functions, namely with Datum Mirror Image alld ordinate Ro((lfion described in
DESCRIPTION a scaling factono all means the programmed value Scaling process is nothing more value by the scaling than multiplyi factor, based on a scaling center point. The programmer must supply both scaling center and the scaling Jaclor. Through a control scaling can be made effective or i of the three main axes. but not for any additional axes. majority of scaling is applied to Ihe X and Y axes only. ce.rtain values and preset function, namely are not
It is important to amounts are not various offsets. The changed If (he Cutter radius
Reduction
I
Magnification
Figure 43·1 Comparison of a part reduction (left) and magnification (right) wifh a part in full scale (middle)
PROGRAMMING FORMAT To supply the control unillhe
rf'flIllH"P,
grammer mllst provide amount
/D
o
Scaling center
... Pivot polnt
o Tool length offset amount
/H
o
Scaling factor
... Reduction or Magnification
o
/H
o
Tool position offset amount
In fixed no! affected
are (wo
also
The most common preparatory command function is 051, canceled by the eomm,md
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
e
program formal:
In order to
where ... of the scaling center (absolute) of scaling center (absolute) of the scaling center (absolute) (0.001 or 0.00001 increment)
I
J K p
should always be programmed In a to the machine zero rcand should always be If the G92 is used for function is activated. Other can be active. including the work through G59.
•
AS
A1
A4
Scaling Center C :: SCALING CENTER
15M uses IIJIK La specify the center point of scalin XlY/Z axes respectively. These values are .. "r,,.,,,,'\""\n't>ri as ahsolute values. As the center point conlocation of the scaled tool pafh, il is important to know one major principle:
on the
A I to A8 and points B 1 to B8 in the illustration contour change points of the Lool path. A1 to A8 is the original path, 81 to 88 is the scaled tool path C, with a scaling factor LESS than 1.
N . . FULL SCALE "MAGNIFICATION
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 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.
a
• Scaling factor
b
c Figure 43-2 Comparison of scaled part location based on [he
center
the
maximum scaling factor is related to !.he smallest factor. The more advanced CNC can set - through a system parameter - to preset the scaling factor to either 0.001 or 0.00001. can only be scI LO 0.001 as Scaling faclOr is independent of the units or G21.
SCALING FUNCTION
407
is set to 0.001, the largest When the smallest largest programmable scaling factor is set to 0.00001, scale is only 9.99999. Given the choice, the programmer has to decide bet\veen . at cost of precision and precision at the cost of the majority of scaling applications, the 0.001 factor the smallest, is quite sufficient. Common terms factors are: o
Scaling factor > 1
o
Scaling factor = 1
o Scaling factor
<:
o
Using 0,00001 minimum scaling factor:
= 12.7 rom o 499999 mm
rom> Inch
x 0.03937
rom> Inch 12.7 rum x 0.03938 0.500126 rom rom > Inch = 12.7 rom x 0.03936 o 499872 mm
" Magnification
, error of 0.000126 ". errorofO.O
are rather extreme is to be applied, for example, (magnification) or 0.95 (reduction) is expected accuracy of the fmal precision.
, " No
1
1 block, the by default.
• Rounding Errors in Scaling
PROGRAM EXAMPLES The first '-''' ..AU..,.' .... is
simple - Figure 43-4.
conversion process should some inaccuracies, mainly due to values. For example, the uses the standard multiplying factor which is an exact conversion factor. In order to convert a 1.5 inches to its in i.nches must be
/ - R1.0
T\rl'\l'Ir'!>'rn
.r-
rom
= 1.5
inches x 25.4
= 38.1
00.5
rom
in this case is 100 to convert the value of 1.5625
0.75
accurate. Now
",-,,,n,,,,,r<,,yr."
'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 normal programming in '-''',ISH•• n
Figure 43·4 Drawing to illustrate scaling funcfion programs 04301 and 04302
p.rogram., using a one cut around the part periphwithout any scaling.
error amount with different nun, which equals exactly to 0.500
o Usi
0.001 minimum scaling factor:
rom > Inch 12.7 rom x 0.039 = 0.4953 inches rom > Inch 12 . 7 rom x O. 038 "" 0.4826 inches rom> Inch 12.7 rom x 0.040 = 0.5080 inches
,., error of 0.0047 ." error of 0.0174
'" error of 0.0080
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 N5 GOl Z-O.7 F50.0 N6 G41 X-0.75 001 F25.0 N7 Yl.75 FlS.O N8 n.5
N9 G02 X2.5 YO.7S IO J-l 0 NlO GOl Y-O. 75 Nll X-L2S Nl2 G40 Y-L 25 M09 Nl3 GOO Zl.O N14 G28 Z1.0 Nl5 G28 X-l.25 Y-l.25 Nl6 M30 %
408
Chapter 43
Program 04302 is a modified version of 0430 L II i 11eludes a scaling factor value of j .05 - or 5% magnificationand scaling center at XOYOZO. KO Cdn be omitted in G51.
RO.5
04302 (PROGRAM 04]01 SCALED DY 1. OS FAcroR) I'll G20 N2 G17 G40 G80 (SCALING OFF) N3 GSO N4 G90 GOO G54 X-l. 25 Y-l. 25 S800 M03 NS G43 Zl.O HOl MOB (FROM XOYOZO) N6 GSl IO JO KO PI.OSO NI GOl Z-O.7 FSO.O N8 G4l X-O.7S DOl F2S.0 N9 Y1.75 FIS.O I'110 Xl. S 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 (SCALING OFF) N1S GSO I'll6 GOO Zl.O I'll7 G2S Z1.0 NlS G28 X-I. 25 Y-1.2S Nl9 M30
3.0
Original contour ,
'\
....
-
\.- START/END POINT (X-1.0 Y-1.0) Figure 43·5 Original contour in full scale
7/8 SCALE AT Z-O.350!
%
I Z-O 500
Program 04303 is more complex. Figure 43 -5 is the original conlour. Figure 43-6 shows contour details with new scales and depth, Program starts with the smallest scale and 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 (SET DEPTH) NI GOI Z-0.125 F12.0 (0.5X AT Z-0.12S) N8 GSl I2.0 J1.S PO.S (RUN NORMJ\L CONTOUR) N9 M98 P700l (SET DEPTH) NlO Gal Z-0.2S (0.75X AT Z-0.2S0) Nll G51 I2.0 Jl.S PO.7S (RUN NORMAL CONTOOR) N12 M98 P7001 (SET DEPTH) Nl3 Gal Z-0.35 (O.87SX AT Z-0.350) N14 GSI I2.0 Jl.5 PO.875 (RUN NORMtIL CONTOUR) N15 M9S P700l N16 M09 N17 G2S ZO.5 MOS IDa GOO X-2.0 YIO.O N19 M30 %
07001 (SUBPROGRAM FOR G5l SCALE) (D51 '" currER RADTI7S) NlOl GOI G41 XO D5l m02 n.s FIO.O N703 G02 XO.S Y3.0 RO.5 m04 Gal X3. 5
4.0
,""""'---
3/4 SCALE AT Z-O.2S0 I Z-0.12SI
Scaled contours Figure 43·8 Scaled contours at three depths
NlOS G02 X4.0 Y2.S RO.5 N706 GOI YO.S Nl07 G02 X3.5 YO RO.5 moa GOI XO.5 m09 G02 XO YO.S RO.5 NllO G03 X-I.O Yl.S Rl.O mIl GOI G40 Y-I.O F1S.O Nl12 GSO (SCALTI1G OFF) N713 X-I.a Y-l.a (RETURN TO ORIGINAL START) N714 M99 %
The scaling function offers many possibilities. Check the related control parameters and make sure the program reflects the control settings. There are significant differences between various control models.
CNC
THE ACCESSORIES
machine can be equipped with additional acto il more functional or functional in a parlicular way. III most CNC machines have at some
additional
either as a standard
CHUCK switch set to
CHUCK CLOSED switch set to
OUT
IN
or as are
a certain amount
time to lathes are also equipped with accessones that arc usually of the most noteworthy and typiadditions (or features) of this kind are:
o Chuck control o
Tailstock quill
o 8i-directional turret indexing
Figure 44-1
o
Part chucking - external Note the setting of the CHUCK
Barleeder also be available as
Several other mable Opl
10
some applications, such as open and close the
runctions Ihal conlrol the chuck or ing arc normally available,
o
Parts catcher
o
Pull-out
o
Tailstock
o
Steady rest I follower rest
o
Part stopper
o
... others as per machine design
•
and quill
ng, it is necessary conlrol. Two M
Chuck functions
Allhough the assigned funclion'» may vary Cor application is exactly the same. 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 fewexamples of their programming
CHUCK CONTROL In manual operations, a mounted on the when the CNC
safety reasons, a chuck is because il is protected by an
Example: a
or a special fixture
a lathe normally opens and
programming procedure would Indue!.: SLOp and dwell:
a foot pedal. For
cannot be opened. interlock. An-
Olher Important feature of close depend on the method nal. A key switch is avail 44-} shows the di are relative LO the , found on the ma-
CLOSED - that has
MOS Ml.O G04 UO.l Ml.l M03
(STOP SPINDLE) {OPEN (DWELL 1 SEC:OND) (CLOSE CHUCK)
(RESTART SPINDLE)
is a very si Il1pl i tied sequence. in which the clwd I I::. the lime required for the bar (i'or example) 10 through to spinthe stop posilion. Some barfeeders do not dle \0 \0 feed the bar Lhrough have a special programming rouline of their own.
409
410
44 jaws may be hard (usually serrated for (normally bored by the CNC operator to Only soft jaws can be modified .
cfln also be used on {he machine, mode in manual mode.
II
•
will
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 rethe 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
CORRECT
chucking pressure
I TOO
Bored Diameter
TOO SMALL
Figure 44-3
Soft jaws diameter bored rnnrprllU
Typically, the part has to reclamped in either function can replace the olher, lUrb lis position in [he holding If sure fcalUrc is present on the lalhe, supplied by tile lathe manufaclurer.
- one correctly bored In bmh incorrect ver· or bOlh, may suffer.
TAllSTOCK AND QUI •
Tailstock is iJ very common main purpose is 10 n
Jaws to programming, but
covers lips
Mosl chucks
to
Ihree jaws, spaced I
44-2.
--
on a CNC lathe. Its that is too long, (00 large, or needs La be extra against the jaws, for example, In some turning operations. A tails[ock may also be to support a finishing operation of a thin lubular stock. or [0 supporl a parllhal has a shallow In il from flying out. On the negative usually in the way of lOol motions, so make sure A typicaltailstock has three main
body
o o
Quill
o All parIS are important In programming
• 1 Figure 11-2
Tvpical three-jaw chuck lor a CNC lathe
ilstock Body
body is the heaviest part of the latht! It IS mounled 10 the hed orllle lathe, eilher manually during a or lhrough a programmable option, hydraulically. Programmable tai is norm
CNC LATHE ACCESSORIES
411 •
• Guill Quill is the shiny cylinder that moves in and out of the tailstock body. It has a fixed range of travel, for example, a 3 inch travel may be found on medium size lathes. When the tailstock body is mounted (0 (he lathe bed in a rixed rosilion, the quill is moved oul to support the part, or in, 10 alIowa part change. The part itself is supported by a center, mounted in the quill.
•
Center
Center is a deVice thaI is placed into the quill wilh a tapered end. held by a matching internal taper and is physically in contact with the part. Depending on the design, if the tallstock has an internal bearing, a dead center can be used. If the tailstock has no imemal bearing, a live center must be used instead. Machined part has to be pre-centered (on the CNC lathe or before), using the same anglc of Ihe \001 as the lailstock center (normally 60°). A typical tailstock is illustrated in Figure 44-4.
Programmable Tailstock
Tailslock body is normally not programmable (only the quiJi is), but thiS feature IS available for many CNC lathes as afactory installed option. That means it has to be ordered i[ when making the initial rurchase: the dealer cannol adapt the option to the machine at a later date. Many different Iypes of programmable tailstocks are availabk. for examrle, a slide-type thai moves left and right only, or a swing out type, Ihat is out of [he way when not needed. A typical lailslock defined as programmable can be programmed using two non-standard M functions (check these functions). For the example, a CNC lathe will use these two M functions: Body of lailslock forward
M22
Body of t{]ilslOck backward
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 tailstock towards the part, do some machining Lind move it back. Rather than presenting an actual programming exampJe, let this procedure serve as a guide - fill-in the M funclions required for a particular CNC lathe: Figure 44-4
Typical rai/stock for a GNG lathe: ( 1) Tai/stock body (2 J Quill- OUT (retracted lor work change) ( 3) Center ( 4) QUlI/- IN (in work support position)
• Guill functions Programming the tailstock quill motion is just about the same for the majority ofCNC lathes. There are two miscellaneous functions !har work the same way for a programmable and non-programmable tailstock body. The two Iypical functions are:
•
M12
Tailstock Cjui II IN orON;;;;;
M13
Tailstock quill OUT or OFF = Inactive
ilf:liw
If the quill is supporting the part. il is in, using the M 12 function. I f [he qui II is not supporti ng [he part, it is OUl, usi ng the M 13 funclion. For the setup, the M 12 and M 13 functions may be used, and on many lathes, a toggle switch on the control is provided to operate the qUill. Spindle should be ON when the quill fully supports the
1. 2. 3. 4.
Unclamp the tililstock body Move tailstock body forward Clamp the tailstock body Move quill forward into the part
5.... do the required machining operations ... 6. 7. 8. 9.
Move quill backward from the part Unclamp the tailstock body Move tailstock backward Clamp the tailstock body
Some procedures take certain amount of time to complele, even i r [he time is measured in seconds. It is gent:ral!y 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.
• Safety Concerns When programming ajob lhat uses the railstock. s
412
Chapter 44
•
BI·OIRECTIONAl TURRET INDEXING AnOlher efficiency feature is a hi-directional turre! indexing. Many CNC lathes have a so called hi-directional indexing built-in, Ihat means an automatic melhod of the turreI indexing (the comrol decides the direction). However. there is a certain benefit in having a programmable 'lI1dexing direction. If [hat fealure is avuilable on the CNC lalhe. lhere will be two miscellaneous functions available to program turret Indexing. BOlh functions are non-slI.1ndard, so check the machine 1001 manual. Typical M functions
for turret indexing are:
M17
Indexing rorwilrd:
TO j·-T02· TO] ...
M18
Indexing backward:
... T03-T02-TOl
Figure 44-5 shows an example of M 17 and M 18 funclions for an 8-sided turret.
Programming Example
This example is a complete program incorporating the bi-directional indexing and also shows hoe to use a fully programmable tailstock. All tool mOlions are realistic but not important for lhe example, The order of numbering the rools all rhe turret may nol be consistent from one machine (0 another! The Icrms!OIward and backward are related to such order. M functions described earlier are used here: 04401
(BI-DIREcrIONAL INDEXING AND TAILSTOCK) N1 G20 G99 IDS (SET INDEX BACKWARD) N2 G50 81200 (LIMIT MAX RPM) N3 T0100 (SHORT FROM T02 TO TOl WITH M1a) N4 G96 5500 M03 N5 GOO G41 X3.85 ZO.2 TOlOl MOB N6 GOl ZO FO.03 N7 x-O.O? FO.007 N8 GOO ZO.2 N9 G40 XlO.O Z5.0 TOIOO N10 MOl N1l N12 N13 N14 N1S N16
TOBOO (SHORT FROM TOl TO TOB WITH MlB) G97 S850 M03 GOO XO ZO.2S TOSOS MOB GOl Z-O.3S FO.OOS G04 UO.3 GOO ZO.25 N1? X1S.0 Z3.0 T0800 NI8 MOS (SPINDLE STOP FOR TAILSTOCK) N19 MOl (OPTIONAL STOP) N20 M21 N2l G04 U2. 0 /
N22 Ml2
1
N23 G04 Ul.O
(TAILSTOCK FORWARD) (2 SEC. DWELL) (QUILL IN) (1 SEC. DWELL)
(NO MAX RPM - SET INDEX FORWARD) N2S T0100 (SHORT FROM TOa TO TOl WITH MJ.. 7) N26 G96 5500 M03 N27 GOO G42 KJ.385 ZO.l TOlOl MOB N28 GOl X3.685 Z-0.05 FO.008 N29 Z-2.S FO.012 NOO UO. 2 NOl GOO G40 X10.O ZS.O TOlOO N32 MOl (OPTIONAL STOP) N24 G50 M1.?
Figure 44·5
Programmable bi-directiona! turret indexing
In an example, a programmer is working with a lathe that has all eight starion turret. Tool Tal will be used first, then 1001 T08 and then back to (Ool TO I again. There is no problem to index from TO 1 to T08 or from T08 to TO I, using the automatic turret indexing direction. II makes sense. that a bi-direclional turret indexing should be used for efllcicncy. A fter all. TO 1 and T08 may be far apart in numbers but Lhey are next to each other 011 a polygonal turret with eight stations. The control system will always choose the shorteST method, in Ihis case, from TOl [0 T08 in backward direclion, then from T08 [0 TO I in forwru-d direction.
If the automalic bi-directional indexing is not built in the machine, It has to be programmed, assuming thcconlrol allows thal. Otherwise, in normal programming, when going from T08 to TO I, the indexing motion will pass all olher six stations. which is rather an inefficient method. The next example shows how and where to place the M ["unctions.
N33 N34 NOS NJ6 N37 N3a N39 N40 N4l
T0200 (SHORT FROM TOl TO T02 WITH ill?) G96 5600 M03 GOO 042 XJ.32S ZO.l T0202 Moe G01 X3.62S Z-O.OS FO.004 Z-2.5 FO.006 UO.2 FO.01S GOO G40 X1S.0 ZS.O T0200 (SPINDLE STOP FOR TAILSTOCK) MOS (OPTIONAL STOP) MOl
N42 N43 N44 N45 N46
ill3 G04 Ul.O M22 G04 U2.0 M30
%
(QUILL OUT) (1 SEC. DWELL)
(TAILSTOCK BACKWARD) (2 SEC. DWELL) (mID OF PROGRAM)
CNC LATHE ACCESSORIES
This example first uses TOI \0 face stock to {he spindle center 1ine. Then T08 comes I n, the center drill, and makes a center hole. When the center drill moves in a clear position, tailsiock body moves forward and locks, then the quill moves into the work. TO! comes back to rough Out the chamfer and diameter, after which T02 comes to finish the chamfer and diameter. When the finishing is completed. spindle stops, quill moves out, Ihen (he tails lock body moves backward. The operator sets the tailslock position. At Ihe encl of the joh, T02 is in the active position. Thrl( means M 18 bas to be programmed at the program beginning, to get a short indexing from T02 to TO I.
Watch how (he M 17 or M 18 functions are programmed their location in a particular block is very important. Either function by itself will nol cause the turret to index - it only sets the direction! TxxOO will make the actual indexing. All this leads to one question - how do we fwd out if the available CNC lathe has a built-in automatic indexing direction (shortest direction) or a programmable direction? There is a good chance that on CNC lathes where only the forward direction Lakes place (automatic indexing is nol available), (here is a feature called the programmable direcTioll, available in Ine form ofM 17 and M 18 miscellaneousor similar - functions.
413 Bars of material are stored in a special tube that guides the bar (by pushing it or pulling it) from the tube LO Ihe area where machining takes place. The only limitations are the bar length and the bar diameler. They are specified by the barfeeder manufacturer and the spindle bore diameter of the CNC lalhe. Many ingenious designs of barfeeders do exist nowadays and the programming method is heavily influenced by the design of the partjcular barfeeder. The functions conlrolling (he chuck opening and closing. {he block skip function, the M99 function and several special functions, are Iypical aids and tools available for programming barfeeders. Many of Ihese functions had been discussed earl ier.
•
Bar Stopper
Although the bar movement from [he guide tube is con-
trolled by the chuck open and chuck close functions (M I0 and M 11), the target pOSItion for the bar slill has to be provided, in terms of how far it has to move au! of the guide tube. This position should be lower than the bar diameter and on the positive side of the 2 axis (.025 shown). This is the amount to be faced off (20 at the front face assumed). Figure 44-6 shows the example.
Although the tendency on modern CNC lathes is to incorporate the automatic tunel indexing direction IOto the control system (which means thaI Ihe control system makes The decision), there are some benefits in having [he programmable 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 the full swing of the turret Automatic indexing has 110 provision for such a situation! With a programmable indexing, the programmer has a complete control. Programming such a setup in a way that 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.
BARFEEDER ATTACHMENT Barfeeder is an external allachment to a CNC lathe that allows small and medium cylindrical pans to be machined without interruption, up to the number that can be machined from a single bar of several feet long. There are many advantages of using barfeeders, particularly those of the modern hydrodynamic design type, rather than Ihe old 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 (at least for an extended period of time), stock material economy and high spindle speeds can be achieved on many models with many Olher advantages.
BAR
TRAVEL
BAR STOPPER
...... I?G
,0
~ Figure 44-6 Bar stopper position for bar travel
The program is quite simple. It will use the M 10 and MIl functions. but also another two functions thai mayor may not be required for a particular barfeeder. These oon-standard miscellaneous functions are (in the example): M71
Barfeeder ON - start
M72
Barfeeder OFF - stop
These functions are only examples and may be different for a certain barfeeding mechanism or unnecessary altogether. flere is the sample program:
4
Chapter 44
04402 N1 G20 T0100 MOS N2 GOO XO.125 ZO.025 T010l N3
(STOP POSITION)
mo
(CHUCK OPEN) (1 SEC. DWELL) (BARFEEDER ON) (2 SEC. DWELL)
N4 G04 U1. 0 N5 M7l N6 N"7 N8 N9
intercept the part and move box is often in the area can without danger,
IS BAR STOPPER}
G04 U2. 0 M1l
G04 01..0 M72
NlO GOO Xl0.0 ZS.O T0100 N1l MOl
There are tWO nona parts catcher:
(CHUCK CLOSE) (1 SEC. DWELL) (BARFEEDER OFF) (CLEAR POSITION) (OPTION1»L STOP)
The following program example illustrates how each A important notes helpful to develop a
stopper may
function is programmed for a part-off 1001. 04403
o
Tool station 1 (TO 1) holds th e bar stop per (N 1)
N1 G20
o
Initially, the chucking of the bar (for each first piece from the bar) is done manually
N81 T0700
o
Spindle rotation must be stopped prior to the chuck opening
o
All miscellaneous related to the barfeeding should be programmed as separate blocks
o
Dwell should be not excessive
I
considerations for
are Some maybe chip conveyer, or may not be that rare, rest (a moving too! support for help prevent or deflection on a relatively long part or a part with Lllill walls.
Part
o
Pull·Out
accessories that are also often related
w baifeeding as well - are: known as Part Unloader
Both are commonly used together wilh tlons and use two miscellaneous
(CONTROLLED END OF PROGRAM)
(RESTART FROM THE TOP OF PROGR.AM)
The T07 in is a .125 wide ing off a 02.0 to 2.5 length, a cess. In the there is a special nique used, to continuous on the last three blocks, N90, N9\ and N92.
a CNC lathe that
o
N91 M30
Nn M99 %
the recom mended
ADDITIONAL OPTIONS
Another two to each other
TOOL ACTIVE)
(LIMIT MAXIMUM RPM) N82 GSO 5l.500 NB3 G96 S350 MOl (SPINDLE SPEED) N84 GOO X2.2 Z-2.62S T0707 MOB POS.} NBS M73 (PART CATCHER ADVANCE) N86 GOl X-O.Ol. FO.004 (PART-OFF MOTION) N87 GOO X2.2 M09 (MOVE ABOVE STOCK NBB XIO.O ZS.O T0700 (SAFE XZ POSITION) Na9 M74 (PART CATCHER RETRACT) N90 MOl STOP)
for the task but
These are some a bar slopper, but dure for the barfeeder
(TOP OF PROGR.AM)
opera-
• Part Catcher or Part Unloader common accessory for a continuous machining, is part carcher or part unloadel; as il is IS \0 calch completed part the completed . dam-
• Continuous Operation is an optional stop, lypically
for setup M30 - the end in front of the earlier in Chapler When the block on [he panel is set to the ON position, the control system will n01 process the instructions in block N91, ll1at means the program will not end there and the will continue [0 [he block where M99 is programmed. and of block.
N91
the M99 function is mainly defined as the end it can also be used in the main program (as In that case, it causes a continuous proThe M99 function will the program 10 return to the lap, and - without interruption - repeat the Since the first 1001 will normally have a programmed, the moves the srock oul of and Ihe whole program indefinitely block skip switch on control panel is set to lion. Then the M30 over and M99 in block will no!
CNC LATHE ACCESSORI
415
• Parts Counter This kind of unattended lathe machining uses anfeature of the control system - parts caunter. may be counted via a program (usually a user macro), or by selling the number of required parts on the They may also be programmed by neous functions, for example: ... ascending order
Count
Count down number for the cOUn( is usually ity or the required number of parts from a at the end of lhis chapter will counter function and other features.
In programming terms, the structure will lar 10 Ihis formal (item numbers rArrpt:1C"H,n list): 04404 N .. N •• N •• N .. N •• N .. N •• N •• N •• N ••
MOS XO Z .. G01 Z •• F .. UO.S Z .• F ••
uo.S
(ITEM 08) U1.0 Z ..
(ITEM 09) (ITEM 10)
N •• X •• Z •• T>oc.OO
N .. G99 N ..
a com-
barfeeding operation, until been machined. The lathe opera~ of parts when starling a new requires a careful study. It does practical and advanced features, all of mostly in Ihis ch(lpter:
I
the exact pull-out finger abOUllhe same - no
part-off:
to the tool station where is mounted. Spindle must be stopped
MOS! 02.
At a rate, move to the spindle centerline ~XO), and a axis position about half-way of the overall bar projection,
03.
feed-in towards the bar as
04405 (Nl TO IDB FOR NEW BAR ONLY - 1.5 CUT-OFF) Nl Ml8 (INDEX T03 TO T01) N2 G20 TOlOO MOS (TOl - BAR STOPPER) N3 GOO XO.l Zl.S T0101 (NEW BAR OUT 1.5) N4 M1.0 (CHUCK OPEN') N5 G04 U1.0 (1 SEC. DWELL) N6 M7l (BAR.FEEDER ON) Nt G04 01..0 (1 SEC. DWELL)
NS Ml.1.
(CHUCK CLOSE)
, _ _ .__ POSITION) (OPTIONAL STOP)
N9 XS.O Z2.0 T0100
N10 MOl 04.
05.
re-
PROGRAMMING EXAMPLE
for barfeeders of the 'pull-type '. Normally, the pull-out is mounted in the turret, either as a tool' , or as an add-on to an existing 1001, in order to prenumber available tool stations. Since these acwith the spindle rotating, yet they they are programmed in the G98 lime (in/min or mmimin).
than its
the program structure to suit
of any unique setup in the machine
a pull-out finger is a device (CNC
oI.
(ITEM 07)
to modi fy
is
(ITEM 01) (ITEM 02) 03) (ITEM 04) (ITEM 05) (ITEM 06)
T:loc ••
GOO G98 G04 M1.0 GOl G04 M1.l G04 N., GOO
• Pull-Out Finger that grabs ana pulls the bar out of (he tube (while the chuck is open). This is a typi-
Slml-
for the finger to catch
Dwell for about the bar stock.
Ope n the chuck with M10.
OB.
Pull out the bar stock from the guide tube.
07.
Dwell for about the pull-out.
08.
Close the chuck with Ml1.
09.
Dwell for about 1 second to
10.
Move the pull-out finger away from
ll.
Return the pull-out
12.
Reinstate the 'feed·peHevolutlon' mode.
second for the finger to complete
chuck closing. bar stock.
to the safe start position.
N11 N12 N13 N14 N15 N16 N17 N18
M1.7
WIDE PART-OFF TOOL)
GOO Xl_2S ZO T0303 MUS GOl X-O.02 FO.004 GOO X1.2S M09 XS.O Z2.0 T0300 MOl
(START POSITION) BAR END) ABOVE BAR) POSITION) (OPTIONAL STOP)
N19 MlB N20 TOlOO MOS N21 GOO XO.1. ZO.05 T0101 N22
TOl TO T03)
- a .125
T0300 G97 S1400 M03
mo
N23 G04 Ul.O N24 M71 N25 G04 01.0
RPM)
TO) TO T01) (TO 1 BAR STOPPER) (0.05 STOCK ON FACE) (CHUCK OPEN) (1 SEC. DWELL)
ON) (1 SEC. DWELL)
416 N26 N27 N28 N29 N30 N31 N32 N33 N34 N35 N36 N37 N3 8 N39
(CHUCK CLOSE) ml (CLEAR POSITION) XS.O Z2.0 TOlOO STOP) Mal (INDEX TOl TO T02) m7 (T02 ~ FACE-CHAMFER-TURN 00) T0200 SPEED) G96 S400 M03 (START FACE) GOO G41 Xl.2S ZO T0202 Moa FRONT) GOl X-O.07 FO.007 (CLEAR GOO ZO.l (CHAMFER G42 XO.57 (COT GOl XO.92 Z-O.025 FO.OO) (CUT DIJi"MErER Z-l.26 FO.Ol (CLEAR ABOVE BAR) UO.:2 FO. 02 POSITION) GOO G40 XS.O Z2.0 T0200 STOP) N40 MOl
N41 T0300 (T03 - 0.125 WIDE PART-OFF TOOL) N42 GS7 S1400 M03
44 N43 GOO Xl.2S Z-1.125 T0303 MOS N44 GOl X-O.02 FO.004 (PART-OFF TO ABOVE BAR) N45 GOO Xl. 25 POSITION) N46 x5.0 Z2.0 T0300 N47 MOl {OPTIONAL (INCREASE PART COUNTER BY 1) N48 'M89 / N49 M30 (CONTROLLED END OF .... n~""'r<.""·,l (RESTART FROM BLOCK NJ. 9) N50 'M99 P19 %
goes with and the mamanufacturers use a number functions to deactivate a particular accessory. It is not to cover any specific procedures into a ence material. Hopefully, the ideas presented In this chapler will help to adapt any manufacturer's recommendations 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
G03
x .. y .. z ....
o
In G18 ZX plane . the third dimension is the Y axis
o
In G19 YZ plane - the third dimension is the X axis
F ..
In operation is only available for CNC machincenters as an optional feature. Let's look at the .~uu'c'-', milling a little closer.
HELICAL MILLING OPERATION
plane G 17 (XY), the third is Z In the active plane G 18 (ZX), the third dimension is Y and in the active plane G 19 the is the X axis.
In all cases, the dimension 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 arcs and cirdes combined with a linear interpola-
a helical interpolation can 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 (the plane that is most of the cireu lar i nlerpolal ion wi 11
Q Using arc centers IJK for CW and CCW motion: G02 GO)
x .. x ..
=
Y .. I.. J .. F .. Y .. I.. J .. F ..
Using
R
CW
motion is always synchronized by the conal! axes reach the target location at the same time.
• Programming Format general formalS gram are similar to the polation - plane "'''H~'''''''
interpolation in a profor acircular inler-
important:
Q Using arc centers IJK for CW CCW motion:
x ..
G02 Y .. R •• F •• GQ3 X •. Y .• R •. F .•
=
CCW motion:
Y.. Z.. I.. J. K.. F.. Y.. Z.. L J .. K.. F..
Using radius R for CW
motion'
NOle that there is no Z lact, ilthe Z were - normally. That means it will cular milling, il will nOI not work, unless conlrol has a special fealure
called the
option.
The plane selection polation block which axes will program and what their function will
417
418 •
Arc Modifiers for Helical Interpolation
The arc functions are programmed using the same principles as in but will be differentfor is a summary in a table: Active
Arc vectors
o
A large thread diameter· virtually any diameter can be thread milled (with high concentricity)
o
Smoother and more accurate thread (only thread grinding can be more accurate)
z
I and J
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
o
Tapping is difficult and causes problems
o
Tapping is impossible in hard materials
o
Blind hole tapping causes
o
Part cannot be rotated on a eNC lathe
U
Left hand and right hand threading has to be done with one tool
o
External and internal ,!">,.".lIIInt1 has to be done with one tool
o
Thread deburring ...... r .. Fnl".,.," or eliminated
o
of high particularly in
o
Extended
Ll
Elimination of
two axes (hat form motion linear motion no innuence conlrol system supports the direct radius
(,ITl-UUH
traditional UK vectors), the physical automatically, within
Applications and Usage helical interpolation option is not the mos[ method, it may be the only special machining ap-
o o
Helical profiling
o
Helical ramping
milling
setup eliminates secondary operations
tapping heads
the three gTOUpS, the lhread milling is by far mosl common method of helical interpolation applied in industry and is described next. The last two applications are similar, although used less frequently and will be described later ill this chapter as well.
o
Elimination of <1vrU",''''IO
o
No need
THREAD MILLING
o One tool holder can accept inserts for
are two familiar methods of producing a
on predominant a CNC machine. On machining centers, method of thread generating is tapping, normally cycle G84 or 074. On CNC lathes, a lap is (without the use of a cycle), but the majority threads are machined by the single point the block method of 032, the simpJe cycle repetitive cycle G76. There
•
Applying Thread Milling
There are many cases in lapping or the point difficult, or impossible in a difficulties can often overcome milling melhod instead. most common industrial lion feature of the control.
to
o Combination of thread milling within a single
G17
lO
•
Thread milling can be used in special benefits. These benefits are
o
in tapping)
power of the tool versus the cut 1/5th is not unusual) different thread pitch size
o
Reduction of overall threading costs
enhances other threading it Lhem. It uses special threading cutters, fhread hobs, or special multi tooth thread milling cullers. In both cases, there is one common for both types of cullers - the pilCh of thread is built info The cutter. not
•
Conditions for Thread Milling
For successrul thread milling, three conditions must before writing a program: o
Control system must support the operation
a
Diameter to be threaded must be pre machined
a
Suitable thread milling tool must be selected
All three conditions must exisl simultaneously.
HELICAL MILLING
• Thread Milling Tool The thread milling culters are available in alleasltwo varieties - some are made of a solid carbide, some use carbide mterchangeable inserts. 1n either design, the threading tool pitch must match the pitch ofa thread required by thedrawing. The tool has [0 be small enough to fit into the available internal space and large enough to guarantee suitable rigidity while cutting externally. For internal thread milling, cutlers are available for thread milling in holes as small as .250 inch (6.35 mm). Unlike a lap, thread milling lools do not have the helix angle built in, only the pitch. The helix angle is required for threading and is controlled during helical interpolation motion by the linear movement. Typical thread milling tools are dlustrated m Figure 45-1.
419 • Clearance Radius Clearance radius protects the thread from damage by the cutting (001. Each cutting edge on the threading tool (hob) or indexable insert is ground with a decreasing angle in the direction of the cut - this is called the dearanrP anglp This clear.ance angle guarantees smooth cutting conditions during thread milling.
• Productivity of Thread Milling One of the reasons programmers choose the thread milling operation could be the desire to improve machining productivity. There are many sizes of thread cutting tools available, with just about all pitch variations. In order to achieve the highest level of efficiency in thread milling, use 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 corresponding 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 relating to thread milling in more detail.
Figure 45-/ Typical thread milling cutters. Solid carbide (left), single insert (middle) and a double insert (r(qhtj
•
Premachining Requirements
A hole for a tap cannot have the same diameter as [he tap itself. It has to be smaller to accommodate ilie depth of the thread. The same rule applies to heJical milling: o
If the thread is milled on the inside di ameter of the part (internally), the premachined diameter must be smaller that the nominal thread size
o
If the thread is milled on the outside diameter of the part (externally), the premachined diameter must be equal to the nominal thread size
Either diameter (internal or external) may be slightly larger or slightly smaller than the 'normal' size, but Lhis deviation is decided by the required 'fit' of the thread.
The main word that is used in this context is the word helix. The word helix is based on the original Greek word for spiral. A dictionary definition gives us some clue as to its meaning - it suggests that a hellx is anything ill the shape of the thread of a screw. Helix is defined in the" Machine!\"·s Handbook" by Industrial Press, Inc., New York, NY. USA. this way:
"A helix is a cun.'e generated by a poilll moving aVOlli Q cylindrical surface (real or imaginary) at (I COllsrnlll rare ill the direction of the cylinder's axis." This quite detailed definition means that the helix is a curve created by a circular mOlion of a poilIl 011 a cylinder or a cone, combined with a simultaneous linear advance, A curvature of a common screw thread is a typical example of a straight helix. A cutting Lool motion based on the mathematical definition (using three axes), results in a helical motion, also known as helical interpolation.
r 45
,
xv VIEW ~ TOP
,
~FRONlT
y
•
ISOMElmC
I
z
A
z
YZV~EW-
45-2 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 right side view.
o
The isometric view iXYZ) shows a three-dimensional appearance of a two-turn helix.
Another view
flat view (also monly used to around a cylinder. hand helix
10
thaI is often very useful, IS the layout). This view is com-
. . . . . . . . . .- . . ......
~-;;;~-
~
1
as a flat objeClthat can wrap
a nat layoul of a
..
45-3
view representation of a righi-hand helix, One revolution of 380 0 is illustrated
~+
4
MILLING
421
THREAD MILLING EXAMPLE
CUller size. characterisconsidered - its diameter cu[\er must edges (teeth). Selecting a culler diacarefully - it must be smaller Ihan the a challenge is to cOITecl number of teeth per inch is more Important Inbut the pilCh cutter must of whether the thread IS In-
operation on CNC machining c.:enlers efficiently by using the helical inof the control system. TIle easiest way to explain the straight thread milling, is to show an illustrated example Figure 45-4.
!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 contai 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 culjuslllke ting must be smaller than Ihe thread nominal predrilling a hole for lapping. That introduces
Item 6.
---- 03.00-12 UN
~
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 mula to calculate [he depth D of an internal thread mUHiplies the pilch by a constant:
If the formula is applied to a Figure 45·4 Internal thread milling example· program 04507
• Straight Thread is the
and (he 1.
Internal thread is 3.00
2.
Plate thickness is 0.75
. through the plate
3.
12 TPI == 12 threads per inch
4.
1.500 diameter thread hob
5.
Tool T03 and offsets H03 and
6.
Bored diameter is 2.9000 inches
This summary sets the
•
Initial Calculations
In the example are six were supplied by the lecled or calculated as We look at the ""'''~''''L\'A.1
><./.I.VI,I".
(1/12 = .0833333 pilCh), the
.0833333 x .54127
=
.0451058
When the formula is applied to bored diameter, this amount 10 be the required nominal 3.0000 - 2 x .0451058
of a twice
= 2.9097884
Therefore. the bored diameler
the thread should be
02.9098 must be made. The formed on the fina certain advantage. By a little the final finish. will do the lrick. IS
the
calculated can rounded 10 an even 02.9, leaving only ,0097884 stock on diameter. or .0048942 per side, for finishing. No the is reasonable. but il did lake such as 2.9000.
• Starting Position
• Motion Rotation and Direction
After all required data have calculated, another step can be the thread starling position.
collected and properly lhis time to calculate
Tllalls tasy fur the X aml Yaxes 111(: <.:enler of lhe lhread In In this exdiameter is as good start as any cqUlvaample, and for simplicity, this to the XOYO position.
In dinate,
10 ~\fn,pn"t\nl
o o o Z
motion direction so important? Why do they have naled al all? Evaluate them, one by one,
along
milling than in type of milling. start position must aJwith the pitch as lhe CU\proceed in three axes Z axis zero (20) will be at the lOp of pllrt
it is extremely important to coorthe following three
Spindle Rotation
Spindle rolation can (counterclock wise).
either M03 (clockwise) or M04
Cjrcular
start position of the Z axis is by several - the size of the rhread mill (in this case a tool with an indexable insert), the pilch of Ihe (in this case .0833333), the direction ofrhe Z oxis (up or down) and method of the infeed along the
a thread is cui using axes used must 51rW\I'T\,M'1"I
same
[he approach arc for circular arc for a helical intcrpolation can procedure is exactly the same.
Circular lion - G02 is the clockwise
the rules of circular . direction, G03 IS the counter-
1 Axis MDtion
For venical may be along two
axis
o
Up or positive
o
Down or negative
UP
DOWN
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
t
INTERNAL - RIGHT HAND 45-6 INTERNAL thread milling using the climb milling mode - right and
motion item by itselr is important, bUi it is the coordination of all motions that makes the thread to match neenng purposes. These motions together of thread (left hand vs. right hand), externally or internally. Figures 45-5 and the possibilities for the most common method of in the climb milling mode.
• lead-In Motions
There is one last consideration, the mainly its height. The revolutions are required to cut single insert cutter will ing catalogue, determined that two ficient 10 mill the required thread. To start the thread milling positioned at XOYO part origin
a multi tooth insert culler is able, start will be a Iitt.le below .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:
INTERNAL - LEFT HAND spindle rotation and cutter motions shown
hand
04501 (INTERNAL RIGHT HAND THREAD MILLDlG)
N1 G20 N2 G17 G40 GSO
N3 G90 G54 GOO XO YO S900 M03 N4 G43 ZO.l HOI MOB NS GOl Z~O.95 F50.0
Similar to a program using circular interpolation, next step to be done is determination approach to the lead-in arc (in climb miJIing This is also (he molion that applies tJ1e cutler radius
In the example, the radius
is
in block N6:
N6 GOI G41 XO.7S Y-O.75 DOl FlO.O next block is the lead-in are, with .750 approach fa-
X N7 G03 Xl 5 YO RO.7S
Y axes will he needed: (or 10 JO. 75)
(on a
Note
45
90 x .0833333 / 360 .0208333
Lt
,
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
xol
•
Figure 45-7 P'''''TInJP
0450 I
(top view is shown)
However, threading cutter into the has the threading teeth grooves, not threads. Th
(or IO JO.
poinl, the tool is in a position Always try to start (0°. 90°, t 80° and are much easier to work with.
R1A5
Lead-in and lead-out motions for thread
(.0208)
would bring the the culler it would cut a series of of course, is unacceptable. srraighl!
Calculation
brochures or product catalogues may on the helix angle of the threading still remains unchanged. The thread milling cutter must by the distance that is equivalent to the pitch amount in one revolution (360°). a lend·in arc is only a portion of the pilCh is grammed. The amount of travel has to be calculated previous example). of the earlier one. It also this time based on the
To make a better cut, stall with 11 helical motion for the Z to the circular lead-in arc. '111at means adding amount ofthe Z tarmotion, in the upwards direction. get posilion must be calculated, not Helical appilCh the of proach has to consider travel on the circumference of (he lead-in arc. The thread pitch in the
1 / 12
IIiY'
is
wh ere ."
I,
= .0833333
and the degrees traveled on the from XO.75Y-0.75 to X 1.5 YO.
90°,
formula:
A x P
Threads per inch
• Milling the Thread
Considering that the thread mill has (0 advance for every 360°, it has to advance onc quarter oflhat UJ~'lal\Iv"" each 90", calculation of the linear travel can be
"" Linear travel in helical interpolation =:: Amount of interpolated (angle)
A TPI
from
Because of the cutter oiutions have been to thread. For each revolution, that is position of the cutter must is the .0833333 value in is a helical milling and can absolute method will be method:
360 IIiY'
where ...
'-t
A
P
Ne G90 G03 Xl.S YO Z-0.S4S9 1-1.5 N9 G03 XI.S YO Z-O.7626 1-1.5
Linear travel in helical Amount of interpolated (angle) 1 / TPO 90° in Ihe example will be:
repelitious data will not appear in the comparison, try 10 program the two
menial
then
incre(TURN
(TURN 2)
HELICAL MILLING
5
NB G9l G03 XO YO ZO.0833 I-l.S N9 G03 XO YO ZO.0833 1-1.5
N13 G28 XO YO Zl.O MOS N14 M30 %
When the two helical motions are
cutler
had traveled .1666 along the positive ,.. .... ",.".'." the lotal of 720° (lWO revolutions). The
This program is only a small
Z of
will be the ending of the cut.
• Lead-Out Motions the same reason why the tool approached the helical interpolation over a 90° are, the exit will the same way. This deparlme thread (lead-au I motion) will move the 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: Lt Lt
=
method. The calculations arc logical and ,.,,.r"·...·... "'" Reading various lechnical specifications cutler presents a wealth of information tips), suggested by the LOa I manu recommendations always take on a more lmporlam than any other method. 45-8 illustrates isometric view of the sample milling program 04501.
XO.15Y0.75Z-O.7418
90 x .0833333 J 360 .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 N11 N12 N13 N14
START AT XOYOZ..o.95
G40 G01 XO YO
GOO Zl.0 M09 G28 XO YO Zl.0 M05 M30
Figure 45·8 Isometric view of caol motions for
%
The thread cUlling job is can be written . •
X0.7SY..O.75Z-O.95
and the complete program
thread milling example
• External Thread Milling
Complete Program
The complete
nrtHTr"rn
vidual calcularions and
same rules as for an and lead-out may be to Chapter 29 (Circular Inlerpolalion). motions shown in Figure 45·9.
ing culter: 04501 (IN'l'ERNAL RIGHT HAND THREAD N1 G20 N2 G17 G40 G80 N3 G90 GS4 GOO XO YO S900 M03 N4 G43 ZO.l HOl MOS NS 001 Z-O.95 F50.0 N6 G4l XO.7S Y-O.7S 001 F10.0 N7 G03 Xl.S YO Z-O.9292 RO.7S N8 Z-O.84S9 I-l.S N9 z-O.7626 I-1.S NlO XO.75 YO.7S Z-0.74l8 RO.75 Nil G40 GOl XO YO Nl2 GOO Zl.0 M09
l'l.I.J...I..>.LNuj
• Tapered Thread Milling
1) 2)
It is possible, but much more difficult. to gram a tapered thread (such as NPT or soft (hread milling cutter. For threads with a small material and very narrow taper angle, a lapered Clltler may be lIsed and programmed as if It were a single revolution. For larger threads, the only 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 in any case, What is needed is a program software lilal will do the calculations in a matter of seconds. Many manufacturers of thread milling cutlers provide such a software free ur for unly a small cost.
XQYQ
THREAD START/END
Figure 45-9 Lead-in and lead-out motions for an external thread milling
this case). using very small increments in linear interpolation mode only. Holders and inserts should be selecred by [he nominal size of [he thread. Tapered threads are sometimes called conical threads and will require different tool holders for right-hand threads and left-hand threads. This is a special application of helical interpolation thal does not really belong in the manual programmmg area.
•
further Considerations
Two additional considerations are necessary to cover the subject of general thread mi Iling ina reasonable depth. One is the application of the CUffer radius offset and the other one is the selection of (he cutting Jeedrate. Cutter radius offset will only be aclive for the two axes selected by the active plane (for example, in G 17, it will be the X and Y axes). Always select theclimb milling method. it is lhe preferred method for the majority of thread milling appl ications. Feedrale selection is similar to the feed rate for outside and inside arcs described in the Circular Interpolation chapter (Chapter 29). Since a precision thread is the goal, the cutting feed rate wi II be 10 to 30 percent slower. A good start is at about .001 per tooth and up by experimenting.
THREAD MILLING SIMULATION METHOD There is an interesting way to mill a thread without (he benefit of helical interpolation option available on the controL This may be a case for many CNC machines, or in such cases where the machine shop needs to mill a thread only once in a while and the helical interpolation is not worth the cost of a control update. To mill a !luead (external or internal) under these conditions, a helical milling simulafion will be used. Simulation
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 an eXClmple of stich a program - it shows only a few blocks 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 of the lead-in arc. Practically, the program is incorrect, because the tool radius is not compensated. The radius compensation would he done in the software, nol with G41 or G42 in the program - this is a linear interpolation in three axes and cutter radius offsel may not be used. The complete program had been done by using a CAD/CAM software, and was 463 blocks long, comparing to just 14 blocks for the complele program using helical interpolation. G20 G17 G40 GSO G90 G54 GOO XO YO 8900 M03 G43 ZO.1 HOI MOS GOl Z-O.9S F10.O XO.7S Y-O.75 XO.7846 Y-O.7492 Z-O.9494 XO.SI9I Y-O.7468 Z-O.9488 XO.8536 Y-O.7428 Z-0.9482 XO.8878 Y-O.7373 Z-0.9476 XO.9216 Y-0.730l Z-O.9470 XO.95S2 Y-O.7214 Z-O.9464 XO.9883 Y-O.7112 Z-O.94S7
XI.4967 Y-O.0697 Z-0.9304 Xl.4992 Y-O.0350 Z-O.9298 XI.SOOO YO.OOOO Z-O.9292
What the program output shows is a series of very small line segments, in a very precise order and increment. Follow at least a few blocks and visualize the actual motion. By the way. it took about three seconds to generate the 463 blocks of code in CAD/CAM. Knowing a high level language (such as Visual Basi<.;('jl, Visual C++® and similar languages), writing similar utlllly software can be done very efficiently. Typically, when the utility is executed. the user inputs Ihe number of revolutions, the radius, thread lead and resolution. The length of the program can be shortened but the lhreading quality may not be acceptable.
HELICAL MILLING
427
RegardJess of the method used to generate the lool path for thread milling, this is a machining and programming area that deserves alai morc attention than it normally gets in many machine shops.
HELICAL RAMPING Although the thread milling is probably the most common application of helical interpolation, it is not the only one. One very useful application of this control feature is called helical ramping. Helical ramping is used primarily as a replacement for a plunge cut into solid materials. Recall that a roughing operation in an enclosed area (for example a pockel), requires the cutting tool to reach a certain Z depth, before the actual material removal. This Z axis motion can be in an open space, if the material had been predrilled, for instance. The Z axis motion can also be CUlling into a solid material, if the cUlting [001 is of the center CUlling type (using the so called slot drill). Well, there is another possibility - helical ramping - that allows using any flat cutter and reach the required Z depth as a series of relatively small helical cutting motions. The cutter can be fla! and non-cemer (laring, because all the cutting action is done by the cutter sides, not its botlorn. Once the required Z depth has been reached, a full circular interpolation is often used [0 clean Up after the last helical CUl. A high level CAD/CAM software can do this very efficiently.
,I
/
Q Example: To illustrate the programming technique for this type of 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 ,250 and in each helical motion the tool will be moved by .050. The pocket center is XOYO and the start Z position (clearance) is .050 above the top of part (which is (he Z axis program zero). The tOlal number of helical motions (revolutions) is six (one above the top of work, plus another five below (he top of work). Any increment value can be chosen for the depth, depending on cutting conditions. The smaller the increment. the more helical passes will be necessary and the longer culling time will be required. The program can be in either absolute or incremental mode and, in this case, the incremental mode is a little easier 10 program. The cutting will be done in the climb miUing mode - program 04502.
04502 (HELICAL RAMPING) ill. G20
N2 G17 G40 Gao NJ G90 G54 GOO XO YO 8700 M03
N4 G43 Zl.O HOi MBa N5 GOl ZO.OS FSO.O (APPROACH TO Z-START) N6 G4l XO.37S DOl FlS.0 (START COMPENSATION) (CUT ABOVE WORK) N7 G9l G03 1-0.375 z-O.OS 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
Figure 45- 10 Schematic illustration of a helical mOl ion used for ramping - program 04502
428 NlO Nll Nl2 Nl3 N14
I-O.37S Z-O.OS I-O.375 Z-O.OS I-O.375 z-O.05 I-O.37S G90 GOl G40 XO N15 GOO Zl.O M09 N16 G28 Zl.O MOS
45
(CUT 3 4 5 (CIRCUIJ\R
BELOW TOP FACE) BELOW TOP FACE) BELOW TOP FACE) BOTTOM CLEANUP) f'Ot:~'1'Tl;o'/;.T TO XY START)
N17 M30 %
Two items are wotih a note
One,
mental mode is used, the Z llxis Slart is (block N4). The cutler
pie straight motion from
helical mOlion. Figure 45-10 shows the schematics of the program in different views. interpolation can be a very powerful irreplaceable by any other though it is a conlrol option, ils program output the mi
,
justify
extra cost.
HORIZONTAL Throughout the handbook, there have been dozens of programming examples. They all shared one common feature - they were aimed at the vertical machining cenlers. There was a reason for this approach. First, there are more vertical machining centers in machines shops overall, and mixing I wo different types of mach ines would make all reference material more complex. Second, almosl every subject covered so far for lIlt: verlical models is equally apJJlicable LO the horizontal models. So what are the differences? The horizontal machining center mainly differs from a vertical machining center in ils genera! functionality, While a vertical machine is mostly used for only one face type of work, a horizontal machine is used for work on many faces of the part during a single selur. This fealure alone makes a horizontal machining center a much more versatile machine - and also more expensive. Figure 46-1 shows the
INDEXING AND ROTARY AXES All programming concepts that ve been discussed so far, apply equally (() CNC horizontal machines. The XY axes are used mostly for drilling and contoUling operations, the Z axis controls the CUlling depth. Horizontal maChining cenlers differ from Ihe vertical machining centers not only in the axes orientation and the lype of work (hat can be machined. One of the major differences is an additional axis. This is an indexing or a rotary axis, usually designated as the B axis. Although the two terms are often used interchangeably, Ihere is a difference between them. D
An indexing table will rotate the part that is mounted on it, 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, but a simultaneous cutting action is possible. This type supports a contouring motion,
comparison of the axis orientation.
'If'
INING
The most common fourth axis on a honzonlal machining cenler is the indexing type, cailed the B axis.
<9,:.::",.: . ':
INDEXING TABLE (8 AXIS) ~
HORIZONTAL Figure 46-1
Axis orientation differences between verticar and horizontal machines
From the illustration is clear that all the XY plane is used for the primary plane of work and the Z axis is used to con-' trot cutting depth. There is no difference whatsoever between the two machine types in Lhis respect.
Indexing axis, as the name suggests, is used to index a table, if the machine is equipped with this feature. 'He horizonlal machining centers and boring mills have an indexing table as a standard fealure. A full rotary table is an 0Plion on a both types of machining centers,
.. Units of Increment The indexing axis is programmed in the number of degrees that is required by the job. For example, to index <1 table lo a 45° position, program: G90 GOO B45.0
Belween programming and setup, there are lhree major differences on a horizontal machining center: D
Presence of a fourth axis, typically an indexing B axis
o
Presence of a pallet changer
D
Richer variety of setup and offset settings
First, a brief look al the fourth axis of a typical CNC horizontal machining center.
The mi n imum increment depends on the machl ne design. For indeXing. a typical minimum unit or increment could be I degree or even 5 degrees. However, for more flexibility - and for rotary machining - much finer increment is required. Most machine manufacturers offer 0.1, 0.0 I and 0.001 of a degree as the minimum indexing increment In all cases, the programming of the indexing motions can be done in two directions.
429
430 •
Chapter 46
- -------------Direction of Indexing
•
The B axis can be programmed to index either clockwise or counterclockwise, looking from top down at (he table, which is the XZ plane - Figure 46-2.
:7
SETUP SLOTS
ccw
cw
82700
TABLE ,
CCW
\ TABLE CENTER
n'---"
-X+
Z+
SPINDLE
Figure 46-2 B axis direction and general descriptions
The table size including the size of comers is imponant to determine the clearances before indexing.
•
Just like any other axis. the B axis can be programmed in the absolute mode or incrementa! mode, with the same behavior as the linear axes. The following exa.mple is in the absolute mode. showing two table columns. The first column is the programmed indexing motion in G90 mode, the second column shows the actual resulting indexing motion (Distance-To-Go) and its direction. All rotational directions are based on (he perpendicular view to the XZ plane.
890.0
cw)E l~\V
Table Clamp and Unclamp Functions
In order to maintain a rigid setup, the indexing table must be clamped [0 the main body of the machine during a cut. For indexing motions, the table must be uncJamped. This is true of most machining centers. For this purpose, manufacturers offer special miscellaneous functions - two functions wlJl be used in the examples: o
Table Clamp
... for example M78
o
Table Unclamp
... for example M79
Indexing in Absolute and Incremental Mode
~ Absolute Mode - consecutive indexes:
-
Programmed motion in G90
Actual indexing motion
G90 G28 BO
Machine 8 zero position
GOO B90.0
CW 90 degrees
8180.0
CW 90 degrees
890.0
CCW -90 degrees
8270.0
CW 180 degrees
8247.356
CCW -22.644 degrees
BO
CCW -247.356 degrees
8-37.0
CCW -37 degrees
B42.0
CW 79 degrees
842.0
No motion (0 degrees)
8-63.871
CCW -105.871 degrees
- -..
The next table is similar. The first column is the programmed indexing motion in G91 mode, the second column shows the motion directions and the actual resulting absolute position. All rotational directions are based on the perpendicular view to (he XZ plane.
o
Incremental Mode - consecutive indexes:
The function numbers may greatly with different machine designs, so check the manual for proper coding.
Programmed motion in G91
Actual i'lhsolute position
G90 G28 BO
Machine B zero position
Normally, the unclamp function is programmed before the indexing, followed by the B axis motion and another block containing the clamp functlon:
G91 G2aBO
Machine zero - no motion
GOO B90.0
CW 90.000
B180.0
CW 270.000
B90.0
CW 360.000
8270.0
CW 630.000
BO
No motion
Some designs require other M codes. for example to control the clamping pln or a table ready confirmation.
8125.31
CW 755.310
8-180.0
CCW 575.310
The B axis is programmed logically the same way as the linear axes, including the mode of dimensioning. Either the absolute or the incrementa! mode can be used for indexing, using standard G90 and G91 commands respectively.
8-75.31
CCW 500.000
8-75.31
CCW 424.690
8-424.69
CCW 0.000
M/9
GOO B90.0
me
Unclamp table In.dex ID.ble Clamp/able
~
HORIZONTAL MACHINING
1
B AXIS AND OFFSETS
Study both tables block by block, in 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 to guarantee a start at BO. One occurrence (hat is - when the rotation in the same direction full circle). It continues to increase. It zero again. That is something to (in the incremental mode) takes place table position will be 720.000°. be necessary in the opposite way in order to zero. A small example is illustrated in
and particularly set the two major
o Work offset o T001 length offsets radius offset is not affected by the B and is programmed the same way as in machining. a relationship of offsets [0 the machined important and is also more complex than for the verapproach.
• Work Offset and B Axis
GOO BO
B45.0
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. r"'iI---
Machine Zero
,/
@)-
Ibl 45·3 B axis direction from 80 to 845.0 in the absolute mode· 04501
the typical block
G54 (Y}
04601: 04601 G90 GS4 GOO X.. Y.. Z .. M79
:eo
PART
,,
M7S <
; ,
J
DRILL HOLE AT )30 >
a90 G55 GOO X . Y
FRONT VIEW
z
M79
Figure 46-4 Work offset for a h"""nnt",1 aJ)plll~atllm front view shown
)345.0
Mfa < DRILL HOLE AT )345.0 >
The for the example.
LO
the
are not important
Although the illustration of the indexing table, the of each pan or even ther approach and is no 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 change the work offset. For example, if there are four faces to machine, each face will have its own work offset. such as G54, G55, G56 and G57. The B aXIs is usually noL dependent on work offset, so [he best block to program a new offset is during the first rapid motion. 1lle previous short example illustrates the method. The next section describes Ihe work offset setting for the Z axis and tool length offset.
y
.
!~
- .. z
-Q..
0
,
One method is to rouch-offlhe ZO of the machined face and register the distance from the tool tip as a negative length offset. This was thc preferred method for vertical machines. 1l1e touch-off method may be acceptable for a small number of tools and indexes. Although it is possible \0 sclect the center of indexing table as ZO, it is not a practical solution. Figure 46-5 shows the principle of louch-off setup in general terms, and Figure 46-6 shows a practical example. No[e that the setup is exactly the same as for vertical machining. A program block G43 Z2.0 HOl
will move the tool Z-298.0, if HOI is set 10 -300.0. 0
N -~Z
0..
0:::
0:::'
i= ....J
'....J
<:(
0 0
U, N
I,
N
I-
~------~'
I
..... DIST-TO-GO.
-~[
....
PART
I I
H-
><:
';{I
TABLE I
I
I
H
!
/
Z-298.0
=NEGATIVE VALUE
Figure 46-5 Touch-off too/length offset merhod - layout with H as negative
I"
-
"V',
",
,
TABLE I
I
.-.
-
-
.... -- -300.0 -
PART.
I
« ·W
l-
I
I
;
I
Touch-Off Method
W <..')
N
N
,
offsets for multiple faces. Selling the tool length can be quite complicated, depending on many factors that influence the decision. The first factor is the meLhod of setting [001 length. 1l1cre are aL least two methods to set the tool length offset. Both have already been covered in Chapter J9, but now they take on a new significance.
I-
0 0
0
I
It should easy to understand the concept of multiple work
A
....J
LO
..-, N
• Tool length Offset and B Axis
y
I-
I
~[~
,':<.
IJ
H = NEGATIVE VALUE
Figure 46·£ Touch-off roo/length offset method· example with H as negative Preset Method
Tool length set on vertical machining cenrers is often a touch-off method but it could also be the preset method. The preset method uses a special tool length presetler device and is done off machine. There is a good reason why the preset method is much more practical for horizontal machining than for vertical machining. Recall that one tool normally requires one too! length offset. Now, consider a very typical situation for a horizontal machining - a single tool has to machine six faces, followed by other four tools Ihal also do Inacliining on the same six faces. Each of the five tools requires a unique tool length for each face - for the tolal of 30 different length offsets! This is not an isolated example, but there are several solutions to such a situation. All solutions use the preset tool length measurement and olle additional setting. The tool mounted into the holder is placed in the presetting device. Through a computerized optical reader, [he preseHer is calibrated to match [he machine gauge line. Then, the tool length is accuralely measured. 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 length orfset register. There is only one problem - where is
rhe relationship of this measured amount to the part position? In the touch-off method, (he tool touches the part and the relationship is dIrect. The preset method has no contact - one additional seTting mentioned earlier has to be made,
This setting [s an entry or the distance hetween machine gauge IIne and the ZO of the current work offset Z address Figures 46-7 and 46-8.
HORIZONTAL MACHINING
3
y
y
-+Z
G54 I-
w
(Z-NEGATIVE)
i~
CD
0:::
«
10
l-
N•
N
.------;--'----, ( OIST-TO-GO 1<111
:
- I
1- H
I
TABLE I
H = POSITIVE
H :: POSITIVE VALUE
46·7 Preset toof length offset to ZO=face -layout with H as positive
46-9 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 cenIn fact, it is only the perception of a is the same in reality. Figures 46·9 and change from the last two
-500.000 0..
i= .....I
o o l-
only because of the additional dithe distance from the program zero values in the program will ruso dimensions are taken from ZO at the table of part
I
Z-298.0
I
-q[-
j
.200.0
I
--lao-:
H=
VALUE
Figure 46-8 Preset too/length offset to
examD,/e with Has positive
The illustration Z ofG54
into the is the distance method as G43Z2.0HO}. "'nip,.",£!
IJV~"lJl.'"
as always: G54(Z) + Z clear + HOl :: -500.0 + 2.0 + 200.0
=
...
PART
1::
II
:x:
TABLE
IJ
o 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 calculate the distance-Io-go W distance thaI must always be (iixture . or actual me~sureW"".t50.O, no change for the length but an Important change to thc 054 now it is measured table center (ZO). The Z clear position includes W lenglh and the physical clearance of2 mm, same as in case. In [his example, the amounl of is used:
INDEXING AND A SUBPROGRAM . all combinations of various setup and theIr mfluence on the program fonnat is virtually irnThe subject of horizontal macbining. particularly portion, can be quite complex and some The layout presented in at least the general understanding of the programming example may help_ way, drill 46-11. The spot drill will 'r".\,rnu.rof X 45°, measured from the h All the depth calculations are
G54{Z) + Z clear + H01: = -650.0 + 152.0 + 200.0 = -298.0
The tool then normally to the Z-135.0 Overall, this selup application is the same as previous one. The operator must know is 20 IV'I.·Q' ... for every job. This information from the CNC in the a
- 0250
·\.J
RETURN TO MACHINE
RD
In vertical relUrn to machine zero has tool in majority of cases. The been programmed relUm was along the Z axis only. reason was sjmple on a vel1ical machining Z machine zero is synchronized with the automatic tool This is not the case on a horizontal center.
6.875 TYP
before a lool
FRONT XY VIEW
G91 G28 ZO G91 G2B YO
13.75 TYP
IS
Here is a comparison a change for the IWO machine Horizontal:
,
06THRU
Due to its design, [he lion before each lool respects, programming exactJy the same.
Vertical:
TOP XZVIEW
zo
in the The question is what is lhe Z axis relurn when only the Y return IS answer is a one word - safety. Although only the Y is to a successful automatic lool change, the tool to be away from (he pan al the same time. The return lhe 2 makes It easier. Of course, clearance in the Z axis would also That may pwve more difficult than it
I
t
1_·««««««««<<<<<<
J......;..""'-l--:.....:..;!H-i-+--J.-.J-i-.J
26.875
0 .000
612 HOLES IN COLUMNS 17 HOLES PER COLUMN 46-11 Practical ex;:;tmfJ.fe
",,,'UJllJ/r:;
04602
discouraged by the a subprogramming will nimize length. The program does not use clamp 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 use need [0 be selected. Only two tools will be required, a 10 mm spot drill and a 6 mm drill. Figure 46-/2 shows the critical positions of (he two (001 lips. Z111.158
Z121.600
~-
1"'\--
, Z127.000 R LEVEL
I
~--INITIAL
LEVEL
=Z275.000
XO Fjgure 46·12 Detail of tool data used in program 04602
The R level is the same for both tools and the depth for Lhe spot drill also includes a small chamfer [0 deburr the holes. Drilling depth guarantees a full drill penetration. Actual calculations are not important here, but they do follow the same rules established in the earlier chapters. Development of the subprogram needs some work, Two subprograms will be used. They are virtually the same, except for the fixed cycle selection. Seveml olher methods cou ld have been aJso used, but Ihis chapter concentrates on the indexing table only. The two subprograms will start at the bOltom of the pattern, at the BO location (0°). This hole will be used as the start position only but will not be drilled until all other holes have been done. The hole is not drilled yet, but the J00 indexing has to be included in the 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 explain (he process. Note the area marked in Figure 46-13, indicating the subprogram contents. o
Q
0
(I
o 0 0 0 0000 0 0 0 0 N(T"J..;:tlO O..-N(T"J-.::t C')('jC')("') o
,
Subprogram contents
First hole in main program Last hole is subprogram
-a~ ..... ',w
Figure 46-73 Flat cvlinder layout· both ends shown for subprogram development
04602 (MAIN PROGRAM) (START FROM MACHINE ZERO - TOI IN THE SPINDLE) (XOYO = FIXTURE CENTER I ZO = BOTTOM OF PART) (T01 - 10 MM DIA SPOT DRILL) (T02 - 6 MM DIA DRILL THRU) N:l G21
N2 G17 G40 G80 IN3 G91 G28 ZO IN4 G2B XO YO INS G28 BO N6 G90 G54 GOO XO Y26.875 S1000 M03 T02 N7 G43 Z275.0 H01 MOS N8 M98 P4651 LIS N9 G28 YO ZO NlO GlB BO Nl1 MOl Nl2 T02 N13 M06 N14 G90 Nl5 043 Nl6 M98 N17 G28 NlB G2B N19 M06 N20 M30
G54 GOO XO Y26.875 S1250 M03 TOl Z275.0 H02 MOB P4652 L18 XO yO ZO BO
%
04651 (SUBPROGRAM FOR SPOT DRILL) NlOl G91 G80 Y-6.875 (MOVE DOWN BY PITCH) Nl02 G90 Z275. 0 (CLEAR Z) Nl03 G91 BI0.0 (ROTATE BY 10 DEGREES) Nl04 G99 G82 R-148.0 Z-5.4 P200 F120.0 (DRL) NQOS YL3.75 L16 (16 MORE HOLES IN Y PLUS) Nl06 GSO GOO Y6.875 (MOVE UP BY PITCH) Nl07 G90 Z275.0 (CLEAR Z) NI08 G91 BIO.O (ROTATE BY 10 DEGREES) NlOS G99 G82 R-148.0 Z-5.4 P200 (1 HOLE) NllO Y-13.75 L16 (16 MORE HOLES IN Y MINUS) NUl M99 (END OF SUBPROGRAM 04651) % 04652 (SUBPROGRAM FOR 6MM DRILL) N201 G91 G80 Y-6.S7S (MOVE DOWN BY PITCH) N202 G90 Z275.0 (CLEAR Z) N203 G91 BlO.O (ROTATE BY 10 DEGREES) N204 G99 G83 R-148.0 Z-15.84 Q7.0 F200.0 (DRL) N205 Y13.75 L16 (16 MORE HOLES IN Y PLUS) N206 G80 GOO Y6.875 (MOVE UP BY PITCH) N207 G90 Z27S.0 (CLEAR Z) N208 G91 B10.0 (ROTATE BY 10 DEGREES) 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 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 50 mm corners. The part setup is concenu'ic with the indexing rotation and there are no intertering elements.
436
Chapter 46
-
1
u wu
co l.JJ
~
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
part [or a horizontal machining center requires from several sides in the same setup. Such of a housing, is shown in 46-14.
FOR S HOLES AT 148 MM BCD)
mOl X74.0 YO Nl02 X52.326 YS2.326
Nl03 XO Y74.0 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, is to develop two subprograms hole
All dimensions have been
accu-
rately but no details are necessary. First (001 is in the die at The part IS located in a [he' table. Pallet changing has from the but is explained in the section that follows. The
contain bolt pattern
mOl N202 N203 N204
X49.5 YO X24.75 Y42.S69 X-24.7S Y42.868
X-49.S YO mos X-24.75 Y-42.868 m06 X24.7S Y-42.868 N207 M99 %
MACHINING
437 N51 N52 N53 N54 N55 N56
04603 (MAIN PROGRAM)
(FACE A
= G54 = BO = 8
B (FACE C
HOLES) G55 = B90.0 = 6 HOLES) G56 = B270.0 = 6 HOLES)
(TOl - lS MM DIA SPOT DRILL) (T02 - 8.4 MM TAP DRILL) X L 5 TAP) (TQ3 (T04 ~ 11 MM DIA
N57
- mo
N58 N59
(TOl - is MM DIA SPOT DRILL - ALL HOLES) N1 G21 N2 G17 G40 G80 INJ Gn G28 ZO IN4 G28 XO YO /NS M79
IN6 G2S BO I'IDM78
N8 G90 G54 GOO X74.0 YO S86S MO) T02 N9 G43 ZlO.O HOi MOB NO G99 GB2 R2.0 Z-S.8 1'200 F1SO.0 LO DRILL FACE A) Nll M98 1'4653 Nl2 GSO Z300.0 N13 M79 N14 B90.0 NlS M78
MIS
GS6 X49.S YO ZlO.O G99 G94 R5.0 Z-23.0 LO M98 l?46S4 G80 Z300.0 M09 G9l G28 YO ZO MOS MOl
(TAP FACE C)
(T04 - 11 MM DIA DRILL) N6l T04 N62 MOG N63 M79 N64 BO N6S M78 N6G G90 G54 GOO X74.0 YO 5800 M03 TOl N67 G43 Z10.0 H04 MOS N68 G99 G81 R2.0 Z-20.3 P200 F225.0 LO N69 M.98 P4653
(DRILL FACE A)
N70 Gao Z300.0 M09 N7l G91 G28 XO YO ZO MOS N72 M30 %
NlS GSS X49.S YO ZlO.O Nl7 G99 G82 R2. 0 Z-S.3 P200 LO (SPOT DRILL FACE B) NlS M98 P4654 Nl9 GBO Z300.0 N20 M79 N21 B270.0 N22 M7e N23 GS6 X49.S YO ZlO.O
N24 G99 GS2 R2.0 Z-S.3 P200 LO N25 M98 P4654 N26 GSa Z300.0 M09 N27 G91 G28 YO zO MOS N28 MOl
N60
GBO Z300.0 M79 B270.0
comments (0 the example. Bmh the two subprograms are quite plain. applications, the Z axis too high with Z300.0 nr"""""r-nT1n;:>/i Large clearances are for indexing table (0 index within a in the way. It is not minimum Zclearance, but it is enough for all faces. A CAD software a Other features and programming same as used elsewhere in the handbook. V U " «..\.d'-",
DRILL FACE C)
AUTOMATIC PAllET CHANGER - APe
(T02 - 8.4 MM TAP DRILL) N29 T02
N30 M06 NJl G90 GS6 GOO X49.S yO Sll37 M03 T03 N32 G43 ZlO.O H02 M08 N33 G99 GS3 R2.0 Z-24.8 Q6.0 F200.0 LO N34 M98 1'4654 DRILL FACE C) N35 Gao Z300.0
N42 Gao Z300.0 M09 N43 G91 G2a YO ZO MOS N44 MOl
One of the greatest concerns in machining is the unproductive time required initial part setup and reu butch job. Many mounting the pllrt when or the machine incorporated in the control sel f can shorten the They include tool length offset, etc. However, none of them the ti me used up when ble. Probably the of a pallet table to idea in machining. [0 minipallets setup
(T03 - mo x 1.5 TAP) N45 T03 N46 M06 N47 G90 GS5 GOO X49.5 YO 5550 M03 T04 N48 G43 Z10.0 H03 Moa N49 G99 GB4 RS.O Z-23.0 F825.0 LO NSO M98 P4654 (TAP FACE B)
Traditionally, one machine has one work [able. Such a of a machine tool has one flaw while the machine is working (and the CNC is virtually idle), no other work can be pelformed. for the next part is done at the expense of idle, resulting in an unproductive time.
N36 M79
NJ7 B90.0 N3S IDS
N39 GSS X49.5 YO ZlO.O N40 G99 GS3 R2.0 Z-24.S Q6.0 LO N4l M98 P46S4
DRILL FACE B)
438
Chapter 46 -~.~~
By definition, an automatic pllilet is a work table thal can be moved iol'o and out of the machining posilion by a program command. If a purpose of such a design is to improve a nonproductive setup lime, it is necessary to have at least two independent pallels available - while the part on one pallet is being machined, the other pallet is available for changing the setup for the next job or for unloading and loading individual parts. In this way, the machining and the setup can be done simultaneously, shortening or even totally eliminating the unproductive time.
....
~
..
~~--~
..
~-~--.~
....••••........••.•.....••.•
The popular rotary type works on the principle of a turntable, where one pallet is outside of the machine, the other pallet is in inside of the machine. The pallet change command rotates the pallets 1800 and its programming is very si mple. Figure 46-15 i Iluslrates the roeary type .. Z+
-X+
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
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 area and Pallet #2 (wilh no part) in the setup area. 111ere are many designs of pallets, but they all share three major parls:
o
Pallet
o Machine locator o
Transfer System
Pallet is the portable work table with a ground surface to which we mount the fIxtures and parts. The table can have T slots. tapped holes or bOlh.
( - .-
-""
---
\
)
\.
J /
\ ~
/
Figure 48- 15 Typical rotary type 01 a pallet changer
Also popu lar is the shuttle type. This design incorporales double rails between the load area and (he receiver inside tlie machine - Figure 46-16. Tts programming is still Simple but more involved than for the rotary type. Z+
Machine locator (also known as a receiver) is a special device located inside of the machine. Its purpose is to accept 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 system 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 determines the Iype of the pallet PALLET 1
PALLET 2
• Types of Pallets There are two general types of pallets, based on their transfer system: o
Rotary type
o
Shuttle type
Figure 46- 76 TVpical shuttle type of a pallet changer
Both pallet types are loaded from the machine front area Other pallet types are also available for some special machining 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
0
Z
... spindle quill
0
W
... table traverse
0
B axis
... indexing or
Automatic Pallet Changer (APC)
command works properly only when the tion is at one of two machine reference points: Machine return 10 the primary reference point
Settings are similar to a During setup, lypical work
Machine return to the secondary reference point
0
G54 X
:::
y
Z W
the same, except it moves machine reference
B
• Pallet Changing Program Structure The following program emphasizes on a typical shuttle pallel system. it can a system. In both cases, one area. chining area, the other is in the 04604.
G91 G28 XO YO ZO G28 BO (LOAD PALLET 1)
M60
< machining 011 Pallet 1 ... >
G91 G28 XO YO G28 BO
=
M60
As many horizontal boring mills do not have an automatic 1001 changer, the G30 should be set conveniently for the operator (0 a tool change manually (X,Y,W axes). This position is set by a system parameter. Z axis value is Ihe length quill out of the spindle,
Programming format is on the principle that all mOlions into the dcpth are in W aXIS, rather [han the Z axis. The quill that is controlled by the Z axis, is pulled out only for its extension from the spindle must enough clearance for the shortest program.
G30 XO (LOAD PALLET 2)
M60
<... mnt",·""m on Pallel2 ... > G30 xO lO0 %
HORIZONTAL BORING Mill The chapler on horizontal would not be complete without at least some comments relating to the machine called a horizontal mill. A CNC boring mill is similar to a CNC horizontal center, usually a little 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
... G28 and G30
rn1O,<,h", .. n.tl>r,l>nr''''
[01] 04605 (PROGRAM [02] (MESSAGE OR COMMENT)
[03] IDO G21
(iJNLOAD PALLET 2)
M60
W
Negative Negative Zero Negative Zero
Typical tailed explanation. match the comments
zo
table
[04] mo G91 [OS] IDO G90 [06] N4.0 GS4 [07] NSO G30 [08] N60 G43 J G01 [10J
mo
G30 WO S •. MO)
GOO X.. Y.. ZO W•. H .. W.. F ..
(11)
< 1l1il'~lUl'Ul >
(24] N600 M30
%
is followed by a more dereference only and
440
pter 46
following comments in the example:
identification
( 01 I Program number (name up to ! 02 I Message to the operator· only n"'Tl",,","n ! 03 1 Metric or English uniti\ selection
! 04 I W axis moves to a tool change position
[
(incremental motion for safety)
I Selection of absolute mode and spindle functions
r 06 )
motion to the starting pOSition in XY within the work coordinate ! 07l Quill out by the [08\ Tool (set program zero) and motion to ! 09 I Feedrate motion to the [10) .. .
[11 J .. .
r 12] [ 13) r 14)
... ( machining the part) ... .. . .. . I 15 J Rapid motion back to the clearance i 08 r 16 J Spindle stop r 17 I Rapid motion of the quill to spindle 118 I Rapid motion to the tool change position along the W axis and cancellation of tool length 119] Rapid motion to the tool change position along the X and Y axes· in incremental mode for I 20 I Manual tool change 121 J ••. I I· .. (additional machining, following the above format .. ) [23 J . . I 24 I End of program I I End of record (stop code)
n
WRITING A CNC PROGRAM Wriring a CNC program is the final result of manual programming. This last step requires a sheet of paper, or many sheets of paper, that contain the program. The program IS composed of individual instructions related to n:~chll1mg and arranged in a series of sequential blocks. W.rttlOg does not mean usincr only·a pen or pencil. Modern Wnlll1g methods employ a ~omputer and a text editor, but the result is still a written copy of a manually generated part program. Manual program development is the result of a lot of hard work. A short program with a few lines of code may be as easily entered into the control directly as to be written down on paper. However, the written copy will often be required for documentation and other reference purposes. The need to program by hand seems somewbat backwards in the aoe of computers, printers . and other hi-tech c . wonders but it is a method that will not dlsappear any lime soon. W;iting a part program manually requires lime and is always subject to errors. Manual work means wo~k b.y hands, so it seems that a need for special computer skills lS not required. Is thai a correct assessment? In lhe traditional way, a program can be written with a pencil and a paper (and a five pound eraser, as an old cartoon claimed). Its final form is transferred to the control unit, a short program may be keyed inlo the system directly. by pressing various keyboard keys. For long progra:ns, thiS approach is a waste of time. The moder~ alLernaUve (0 a pencil is the keyhoard of a compu~er, Ll~lOg a ~Jmple ~exl editor 10 make a plain ASCn text hie, WIll) no tormaHlOg. The computer creates a CNC program as a file stored on the hard drive. This tile can be pnnted or send directly to lhc CNC machine. The only difference is that the computer keyboard has replaced the pencil and the editing features of the text editor have replaced the eraser. Even today, a greal amounl of manual programming work in is still done in writing, using a devices such as pens, pencils, calculators and erasers. Reoardless of the media used, learn how the computer the c~ntrol system - interprets the written program. what syntax to use, what to avoid and what form~( is correct. Even if not programming manually al all, It lS Important to know Ihe principles of program writing techniques, in order to make changes in any program that was developed by a CAD/CAM syslem, if necessary. eNC program should be written in such a way that it can be interpreted without a difficulty
PROGRAM WRITING Writing all collected data into a final version of the CNC part program is one of the last items inside of the programming process. To get to this stage requires hard work through all other stages - when all thoughts have been collected, all decisions have been made and a certain level of comfort has ,.:,etlled in. In the previous chapters, the emphasis was on the program development as a logical process. Now, lhe focus wi Il shift at the actual method of writ! ng the CNC program, following this logical process. Wriling (he program is based on two initial factors: o
The corporate standards
. .. company decides
o
The personal style
... you decide
Both factors can be adapted simultaneously in a single !.wogram - LIley are fully cOlilpati ble. It i::; unreasunable tu expect any indus!l}' or world-wide standards relating to the various techniques of developing a program. It may be even less reasonable to let any company based standards, unless there is a general set of rules and rc:commendations already ill existence. The final result is that the first guiding factor - company standards - is replaced by the second factor - personal style. From an objective point of view, there is nothing wrong at all with a personal style of programming. If the program works, who cares how it was done. From a revised point of view, it needs 10 be acknowledged that a CNC programmer can never succeed in isolation. Programming involves at least one user of the final program - the CNC operator - and thac makes il. in effect. a team work. The most common problem with uncontrolled personal style is inconsistency. Any CNC machine shop that i:mploys - or plans to employ - more than one programmer. should establish certain minimum standards pn:paration of a part program. Adherence to these slandards allows any team member to pick up where another member has lert. Often. the personal slyle ofille firSI programmer in the company will carry 011 and on and eventually becomes {he company standard, for better or worse. Such a situation may well be very positive. but in most cases it needs revaluation or at least a bit of modernizing. To define a company standard, first evaluale some suggeslions and practical observations thaI may be helpful \0 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 Writing a assistance of a computer and a text means a CNC program in I, A wriuen program (preferably by pencil) is easier to correct without a mess and i[ should be double or even triple when written on a sheet of paper. Individual words in a block should be by a space, to further legibility. This way, any additions or future changes (if necessary) can quite easily, yet still keeping lhe overall appearance neat. Problems with paper copy clean manually generated are much of a the program is into a computer text file. in those cases, the copy be illegible for cal reasons, such as a printer toner, for
•
Programming forms
In the early years of numerical control, special programming forms were wilh pre-printed columns each address in the were the days when only the numerical values were into the appropriate column and the column f determined the meaning. These were often cOnlrol and machine as an (0 writing and a little on Il Today, a ruled sufficient. No special cola umns are a or two is justified, it can drawn easily enough. use alphanumeric representation, the whole word - alpha charDeters as well as numeric and special symbols. process is much more hardly any machine manufacturers print forms any more. programmers in some the final program version ers consider such work a cPr" .... r''',. means somebody else (a or an written copy and has to be it was intended. Such a person of CNC programming even simple syntax errors.
ily
Many managresponsibility. That will read the it corrccily, the absolutely no nOI be able [0
• Confusing Characters legibility of programmer's handwriti portarH. Make a special effort when ters (alphabetical or numeric) that can Depending on can be confusing to examletter 0 digit 0 can look the same. the leller Z can be con leiter 1 I as well as a low case l are examarc only some of the most obvious examples, but many olher characlers can also confusi depending on person's handwriting. Try to a tem writi technique 10 distinguish potentially confusing characters is a relative term, of
For instance, all and printers (even the old preparation systems) use a special method to individual characters on the screen and in print. handbook there is an obvious difference between a a narrow digit 0 (as in 000 letter 0 (as in The same technique writing. Take used on most controls ber and in a comment create a problem nation only ror fault - unless hundreds and in a unique way in
applied (0 personal handfact that (here is no letter 0 except as a program numwhere a misprint will not If preferred, find a the rest is all digits 0 by zeros are identified specifically part program.
o or 0 o
DIGIT ZERO LETTER 0
I
ONE
1
RI DIGIT TWO LETTER Z
Figure 47-1 form of characters written
ambiguity
illustration in Figure some suggested of common character in handwriting. rnrl"'51rtpr~ rhat may imway to write legibility. which method :><;;I'<;;;l,.;ll<;;;U as personally rw,.tp,.~ is nothing worse than for evcry new program. son who prepares the program final than confused and eventually may make a error. Handwritten method can be bypassed entirely by keying in the data via control keyboard. then the part machined and sent out the job IS finished. This the machine for a while and is not ryday lS to prepare the program tern. The on a computer and send it directly 10 through 11 cable connection. CNC ,.t>f'r\rt'\,,.,.,P
users today do not use a punched tape anymore, if still do, it is usually for old machines only. More modern methods are available, such as an disk storage of a or laptop computer. interface computer and the machine, be IransfelTcd reliably, thus punched methods altogether. method is as the program still has to properly formatted.
WRITING A CNC
443
PROGRAM OUTPUT FORMATTING who followed this handbook from the beginning, chapter chapter, should be well familiar with programby now. This section deals with the actual program formal not but how it appears on the printed or screen of the computer. It will evaluate four verof the same program. Identical in every respect, exappearance. Feel free to be the judge as to four format versions IS the most suitable and long program is presented - intentionally program. It is not important whalit does, when printed or displayed. Each new verover the previous version. lfTlInrnUl"'1I
c::>
Version 1 :
G20 G17G40G80G49 T01.M06 G90G54GOQX-32S00YOS900M03T02 G43Z10000HOlM08 G99G82X-32500YOR1000Z-3900POSOOF80 X32500Y32500 XO X-32S00 YO Y-32500
XO X32500 G80GOOZIOOOOM09 G28Zl0000M05 MOl T02M06 G90GS4GOOX-32S00YOS7S0M03T03 G43 ZlOOOOH02MO 8 G99GBlX-32S00YORIOOOZ-22563Fl20 X32 SOOY32 500 XO X-32500 YO Y-32500 XO X32S00 G80GOOZlOOOOM09 G28Zl0000M05 MOl T03M06 G90GS4GOOX-32500YOS600M03TOl G43Zl0000H03M08 G99G84X-32500YORSOOOZ-13000F375 X32500Y32500 XO X-32500 YO Y-32S00 XO X32500 G80GOOZlOOOOM09 G28X32500Y-32S00Z10DOOM05
mo %
of writing a program. AIsome doubtful benefits, it is the leas! with a very poor appearthe CNC openHor to read
c::> Program Version 2 : NlG20 N2G17G40G80G49 N3TOlM06 N4G90G54GOOX-3.25YQS900M03T02 N5G43 Zl. DH01.MOS N6G99G82X-3.25YORO.lZ-O.39POSOOF8.0 N"7X3. 25Y3. 25 N8XO N9X-3.25 NlOYO NlIY-3.25 N12XO Nl3X3.25 N14GSOGOOZ1.0M09 N15G28Z1.0M05 Nl6MOl N17T02M06 NlSG90G54GOOX-3.25YOS750M03T03 Nl9G43Z1.DH02M08 N20G99G81X-3.25YORO.IZ-2.2563F12.0 N2lX3. 25Y3. 25 N22XO N23X-3.25 N24YO N2SY-3.25 N26XO N27X3.25 N28G80GOOZ1.OM09 N29G2SZ1. OMOS N30MOl N31T03M06 N32G90G54GOOX-3.25YOS600M03TOl N33G43Z1.0H03Moa N34G99G84X-3.2SYORO.5Z-1.3F37.S N35X3. 25Y3. 25 N36XO N37X-3.25 N38YO N39Y-3.25 N40XO N4lX3.2S N42G80GOOZ1.OM09 N43G28X3.2SY-3.2SZ1.0M05 N44M30 % IS
gram. Look at sian of the decimal in programs The next program applies all so far and addresses some addilional
done
444
o
Chapter 47
Program Version 3 :
N1. G20 N2 G17 G40 G80 G49
ill N4 N5 N6
TOl M06 G90 GS4 GOO X-3.2S YO S900 M03 T02 G43 Zl.0 HOI MOB G99 G82 X-3.2S YO RO.l Z-0.39 N7 X3.25 Y3.2S
N8 XO N9 X-3.25 NlO YO Nl1 Y-3.2S
N12 XO Nl3 X3.25
N14 N1S N16 N17 NI8
Gao GOO Zl.0 M09 G28 Zl.0 MOS
MOl
T02 M06 G90 G54 GOO X-3.2S YO S750 M03 T03 Nl9 G43 Zl.0 H02 MOS N20 G99 G81 X-3.2S YO RO.1 Z-2.2S63 F12.0 N21 X3.2S Y3.2S N22 XO N23 X-3.2S N24 YO N2S Y-3.25
N26 XO N27 X3.25
N2B N29 N30 N31 N32
G80 GOO Zl.0 M09 G28 Zl. 0 MOS
MOl T03 M06
G90 G54 GOO X-3.2S YO S600 M03 TOl
N33 G43 Zl.0 H03 M08
N34 099 GB4 X-3.25 YO RO.5 Z-1.3 F37.5 N35 X3.2S Y3.25
N36 XO N37 X-3.25 N38 YO N39 Y-3.25 N40 XO
N41 N42 N43 N44
X3.2S G80 GOO Zl.0 M09 G28 X3.2S Y-3.2S Zl.0 MOS MJO
%
This version is much improved. It uses all improvements of the previous version, yet adds a significant improvement - spaces berweeH words. Still, it is difficult Lo visually idenlify 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 CNC memory, yet the program is much easier to read.
o Program Version 4 : (DRILL-04.NC) (PETER SMID - 07-DEC-Ol - 19;43) (T01 - 1.0 DIA - 90DEG SPOT DRILL) (T02 - 11/16 TAP DRILL - THROUGH) (T03 - 3/4-16 TPI PLUG TAP)
(TOl - 1.0 DIA - 90DEG SPOT DRILL) Nl G20 N2 G17 G40 G80 G49 N3 T01 M06
N4 G90 G54 GOO X-3.2S YO 5900 M03 T02 NS G43 Zl. 0 H01 MOB (INITIAL LEVEL) N6 G99 G82 X-3.25 YO RO.1 Z-0.39 POSOO F8.0 N7 X3. 25 Y3. 2S N8 XO
N9 X-3.25 NlO YO Nll Y-3.25 Nl2 XO Nl3 X3.25 Nl4 G80 GOO ZI.O M09 Nl5 G28 Zl.O MOS Nl6 Mal
(HOLE (HOLE (HOLE (HOLE (HOLE (HOLE (HOLE (HOLE
1) 2) 3) 4) 5) 6) 7) 8)
(T02 - 11/16 TAP DRILL - THROUGH) Nl7 T02 M06 Nl8 G90 G54 GOO X-3.25 YO 5750 M03 T03 Nl9 G43 Zl.0 H02 MOB N20 G99 GBl X-3.25 YO RO.l Z-2.2563 Fl2.0 N21 N22 N23 N24 N2S N26 N27 N2B N29 N30
X3.25 Y3.2S XO
X-3.25 YO Y-3. 25 XO
X3.25 GSO GOO Zl.0 M09 G28 Zl. 0 MOS MOl
(HOLE (HOLE (HOLE (HOLE (HOLE (HOLE (HOLE (HOLE
1) 2) 3) 4) 5) 6)
7) 8)
(T03 - 3/4-16 PLUG TAP) N31 T03 M06
N32 G90 G54 GOO X-3.:2S YO 5600 M03 TOl N33 G43 Zl.O R03 MOB N34 G99 G84 X-3.2S YO RO.5 Z-1.3 F37.5 (HOLE 1) (HOLE 2) N3 5 X3. 25 Y3.:2 5 N36 N37 N38 N39
XO
X-3. 25 YO Y-3.2S
N40 xo N41 X3.2S N42 GBO GOO Zl.0 M09
(HOLE (HOLE (HOLE (HOLE (HOLE (HOLE
3) 4) S) 6) 7) 8)
N43 G2S X3.2S Y-3.2S Z1.0 MOS
N44 M30 %
The fi nal version (Version 4) may be a lUXUry for some users. but it is the most elegant of all four. It adds initial descriptions and messages to the operator. It includes programmer's name and the date of the last update. It also includes the description of all tools at the program beginni ng. It also uses the same tool descriptions for individual tools. at the beginning of each 1001 section, where it matters most.
Some lower level controls do not accept comments In the 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 directly in a
nm max!-
10
was (he maximum
tape that
900 or meters - or 108000 loday's modern there is no anymore, most part programs will run from CNC system. Unfortunately, that memory as well. often well below what tbe tape ca-
II all means thal a situation may arise, long program will not fit inlo the memto a good directory cleanup, are (wO to eliminate this problem.
04701 (TYPICAL PROGRAM) NIO G21 G17 G40 GBO G90 N20 GS4 GOO Xl20.0 Y35.0 NnO G43 Z2S.0 HOl N40 9500 M03 N50 MOa N60 G99 Gal Xl20 0 Y35.0 R3.0 Z-10.0 FlOO.O mo X150.0 NBO Y55.0 N90 GSO GOO Z2S.0 moo M09 m10 G28 XlSO.O YSS 0 Z2S.0 m20 M30
•
Program length Reduction the program characters from me to a long program, the than can be areas that should be considered
A
%
A grand total have been programmed. The condensed of the program needs only 89 acters. with a minor Ise. Program in Ihis form is more memory efficient hue much harder to read - remember Ihis is only a shall
tirety, where the di o ~GOO =
all unnecessary leading or trailing zeros GO, XO.Ol00 = X.Ol, ... )
o
Eliminate all zeros programmed for convenience : X2.0 "" X2.1
o
Eliminate ali or most of the block numbers
o
If
block numbers, increments
by one will make a shorter program o o
tool motions into tool motion, if safety allows
Use default
not a would
Do not include program comments and messages to the CNC operator
o
Use comments
%
in a rather very short may become methods lhal have been
length hav!:! he!:!n saved the program some cases, so here are sev-
above example:
descriptions on
a !':epilrilte pi~ce of paper
process will definitely many instructions in a dividing them into many block as possible, if possible, use fewer tool vidual blocks. if thai is possible, etc. At the '~"',",~U. even side effects when eiimisame lime, watch program format. naling or deviating from an Organizing the for example.
o
Program description has been
o
Block numbers have been eliminated
o
G21, G17 and G54 have been eliminated (correct settings assumed on the control· be careful! 1
o Zeros following a decimal point in a full number have been canceled
o
Some blocks were Joined together
these measures will result
o
in some compromise between convenience and necessity. organizing the work properforl.
GSO GOO has been replaced by GSO only (GOO is redundant, although
o
There is no doubt thai many When thinking well ahead erly. the results will W011h
These methods are shortcuts and shQuld be used for emergency
situations only, not as
en-
more impressive:
04702 G90 GO X120. Y35. G43 Z25. Hl S500 M3 M8 G99 Gal R3. Z-lO. F100. X1S0. YSS. Gao Z2S. M9 G91 G28 XO YO ZO M30
but check them first
o
long program in
zeros in GOO. have been removed
1,
o
zero retum has been changed from absolute mode to incremental mode
o
... Keep in mind, this is a no-frills program
programming procedures.
446
Chapter 47
will be processed A very important change can achieved in the lool approach towards the the tirst example (standard version). positions X and Y axes firs!' wilh following in a separate block. Tn the shorter the order of motions has been preserved for safety reasons. If Inl conditions allow. these two can combined into one. TIle 043 and 054 commands can in the same block, without a problem'
with many added benefits. Tape mode is not to Think of the Tape mode as an external old fashioned sense. external mode requires a lillle extra On the hardware only a i '~~'U~'" with a fair size hard disk that will conrequired. The comfrom the of-
G90 GO G43 G54 X120. Y35. Z2S. Hl SSOO M3
to consider the setup first and towards or away from the part. If come in the way because of the shortcut the conexample would be a wrong programming and its actual writing will soon establishing a Jf using a computer, learn how to directly at the keyboard. it is a waste first. Il may take a liule lime is well worth il.
•
Memory Mode and Tape Mode
Most CNC system have a special Mode from at least two opljons MEMORY mode. The Memory mode is frequently - pwgram is loaded into the edited from the memory, and is flIn from the . . . . "','"""..." mode is, of course. to run a program many users ignore the possibililies this ,nr"-''''rlflP'''' not punched lapes in the machine shop (most comranies do not), !he Tape modecan be
everything is eonligured to work a CNC or programs on the hard computer, load the software and work with the tem as usually! The major difference is in actually resides on the hard disk oflhe computer and a (ext editor to edit the CNC conlrol system. The capacity or current hard more than will ever be needed. companies, mold shops, tool and die shops and other industries thaI require extremely long programs this techa while ago, and very consider this method for the This relatively new speeds and feedrates but 111is combination means extremely that will nOI fit into any system. So before investing into rather updates, investigate this method a personal computer. if the u """_"'''''''
PROGRAM DOCUMENTS preparation. quile a number of various pieces will accumulate. All sketches, calculations, setup tooling sheets, job descriplions, instructions to the and related notes contain valuable information. information should be stored as part of the program documentation folder. Any changes to the finished at a for whatever reason, can done much easier if the documentation IS complete. organized and In one A makes a review of [he the documentation somebody to way programmers will save much their personal prodocumen[ programs
a reliable indication of
gramming their sense
capabililies.
A simple definition relati
to program documentation
DATA FILES a hard copy the on adisk). documents mentioned here are They creale a sel all fi
called the data files. files are useful
\0 the programmer,
but only
some are impOrlanl to the CNC machine operator or person A number of tiles are only for and are nol senl to \he machine shop. Two for established: o
Programmer keeps all the files
o
Machine
can be
copies of relevant files only
guarantee thallhe ullimate responsibility the CNC programmer. only
Many CNC sors, underestImate the
mentation. Their
even machine shop superviprogram docuthe paperwork is
not worth the lime, Ihat il 100 long to collect all documents and prepare [he documentation, that it is essentially a are true, to a nonproductive effon, etc. point - in order 10 make a documentation, yes, some time will be Not an amount of Ijme, but 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
every piece of documentation for items Ihat relate to the actual in the shop. Unnecessary duplicaand should be avoided. The only 10 the machine shop are:
o Q
Prog ram I'ITI"tn •• t
o
Setup sheet
o
Tooling
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 review them at a later date. direc!iy productive work, but exIra
tirne. Documentation
ment in lime management, it can save a in
or to
who have written programs in a high level lan(C++, Visual Basic, etc) or in such as Basic, Pascal or even AWoLlSP (Lhe ming language for AutoCAD). know that comments within the body the Those
Chapter 48
comments are usually mind (he user of what is happening information about the nrr",r'"rT'I would be'additional ua!. kind of external and lion applied In sof£ware program.
enough to reprogram. If more most likely even a user's manprogram documentais also adaptable to a
PROGRAM DOCUMENTATION internal program Is one
an deserves some other? Which one for maximum types, let's evaluate them
•
one (hat combines between Ihe two
•
Internal Documentation
documentation is contained within the body of a When writing a an effort to strategically place comments into the Such messages are parI of the program are categorized as infernal program documentation. messages are either '''''r'I,!lr'''f.' blocks of a program or to individual blocks (delimited by and can be actually seen display screen execution (on most They are also in the copy of the program. biggest advantage of documentation is the convenience offered [0 the operator. The only is that when loaded into the CNC memory, the comments do occupy memory If the avai lable memis scarce, be modest program comments and more instructions, All program comments, and instructions must enclosed in
External Documentation
documentation of a CNC program of several items of their latest version Ihis last slatement is very important The follOWing menlation. They can o
Program copy printout
o
Methods sheet, if
o
Part drawing
o
Working sketches and calculations
LJ
Coordinate sheet
o
Setup sheet
o
Tooling sheet
o
Program data
CI
Special instructions
programming program stored shops that use should make it sheet in the copy) is program. It is All sketches dina£(;s, are gram has to be the tooling
(THIS IS A COMMENT, MESSAGE OR INSTRUCrION)
This is the required formatting. Either comment, message or instruction can be an individual block in the program or it can be parl a program block, control system will ignore all between the parenthesis. To avoid long descriptions internally, use pointers to exlernal documentation example: N344 ••• N34S MOO N346
:ITEM
...
The ITEM 4 in program comment section will be a detailed description relates to block else in the program documentation, such as in a This kind of is useful when [he '"'',''''';~''' or commen! would to be stored in the body. or other
the CNC operator may fi referenced sheet, under the heading of Special ill-
printout is the final of the It shou Id be the exact contents of the or other media. In machine on a or merhods sheets, the programmer La include a copy of the methods a as welL drawing (or its important to be kept with the rderence source in the future. together with a of coorat a later date, profor some reason. sheet and will be: discussed shortly. the program data source (usually slored media) to be included in the documenany special instructions thut may be rcler, the
rmiCllillc operaLOr or
Sf ructions:
ITEM 4. - Remove part, clean the clamp on the 120 mm diameter
reverse and
Properly prepared internal documentation should always brieny each cutting tool N250 T03 N251 M06 1 DfCH DIA 4 - FLT ElM} N252 •••
T03 is the current This designation vary depending on the tool systems particular machine \001 builder. use of 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 (he program, document the reason why ie is used:
04802
Nl04 GOO Zl.O NlOS MOO {CHECK DEPTH "" .157
Nl
(DWG
.1) A-S462 REVISION D)
SMID
documentation IS 10 trans,ideas from the to programming enVironment, the ideas from the programmer's II serves as an important link within
Nl06
gain an extra space in the comment
07-DEC-Ol)
make It a
block:
the communication process.
Nl04 GOQ Zl.O NlOS MOO (DEPTH TO SHOULDER MUST BE .157 INCHES)
SETUP AND TOOLING SHEETS
Nl06 ...
Iwr''' .. ''' ....
Comments can be in the same block as program data: Nl2 GOO X3.6 Zl.O Nl3 MOS (CLEAN OO::PS Nl4
Enigmatic or cryplic l<#"~'a.",,';;,,:> translate mto a
lime
or the setup person and they
between mdividual jobs.
•
Program Description systems, program descripTioll can also This is a special kind of a comment, also in parentheses. There are some that
make the
cutting
speeds, both types are The ongoing
many programmers always have
situation:
reminds one of a 'Do I make The after wriring {he
rhe rooling sheet before or program?'
As is usual in many and foes can be found on
description special.
o
The description must be included in the same block as the program number
o
The
must have no more than 15 characters
o Low case characters
not be accepted
of program description may Include a in the comment seclion:
04801
setup sheet is a or a and orientation of the part on even the description of insheet usually lists only the positions, with spindle for each tool. Examples of chapter.
FROM THE
comment is written as a comment block is not lhal are part of Ihe documentation
printed copy and Ihe
loolillg sheer are Ihe mher two most program documentation. TIle mathe setup sheet and tooling sheel is
. 42541)
Once conditions are rollowed. the program can be viewed along with its description right on the directory screen of the control system.
If an additional that does not fit the 15 characters is needed, enter more comments in subsequent blocks. They will not seen on the screen, bur can still be handy for documelllation. They will be displayed processing on all controls that accept Ihe com ments. length of these comments is not usually limited to 15
are the forces of method Implies a well organized Implies (hal everything is under control. It Ihal all fixtures and 1001s and holders are already available in the wailing to be used. No doubt, if both, the setup sheet and the the program. The logic behind is very strong indeed . however, does not take into chine shop realities, even if lhey are or even wrong. A small conflict a delay in delivery, a and similar problems, all cOniribUlC 10 programmer in many companies. from all sides, the programmer no to improvise, even III times of Crisis. Programmer has to the reality a lillie more If there is no choice, always try to find a rensollable comprobut never as an excuse for being sloppy.
450
Chapter 48
The freedom in programming is considerable but it is not unlimited. A normal part program cannot be wrincn without knowing the machine setup and the tooling to be used. 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 does not rest with the 'now or later' situation, it rests in the selection of the mosl like!.}' possibility. If something has \0 be changed, make sure the changes will be minimal. ·]n any case, it is quite possible Ihat the setup sheet and/or Ihe toolIng sheet will have to be modified after the program has been proven and optimized. •
sheet may have to be done for every machine or at least for every machine type. A very simple setup sheet is shown in Figure 48- J. Feel free to improve it as necessary,
07-Dec-01 TOP
FRONT
....
G54X ..
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 reflect the latest program changes and adjustments. they are not consistent between individual machines and even programmers. Although the rime spent on preparing a setup sheet is considered nonproductive from the cost angle, i! is a time far from being wasted. The setup process can be organized, certain rules can be set and adhered to and they can be applied to the preparation of a good setup sheet. The golden rule of a good setup sheet is 10 make it in scale. Setup sheet using an outline of the material, fixtures layout. finished shape, tool path. etc., should always be done in scale. Scale. even an approximate scale, is very important for visual companson. Clamps and other mounting devices should be drawn in positions corresponding to the actual setup. Tool change location should be marked accurately, different views shown. if necessary. Critical posilions should be dimensioned, indicating the maximum or minimum distances.
If a cutter radius offset is used, the speeds and feeds refleci a certain nominal cutter radius. Atthe discretion of the operator, the cutter radius may be changed within a reasonable range. This range should appear in the setup sheet, inCluding a note on the adjustment of speeds and feeds.
1n many cases when the culler exceeds a certain length, it may lnterl"ere with !.he part or olher tools. In these cases, the setup sheet should include the maximum cutter length allowed within lhat setup. For a chuck work on a lathe, (he maximum grip of [he material should be speclfied In the setup sheet as well. The main purpose of a setup sheet is to document all details of how the pari IS mounted on the machine. That means it has to cover the part holding method and reference point relationships (part, machine, and the cutting tool). It has (0 descrihe the positions of auxiliary devices used, for example, a lailstock, a barfecder, a vise, a face plate, hard and soft jaws, and many others A master form for a setup
Figure 48-1
Simple setup sheet form - onlv basic data shown
A well designed setup sheet should also include information about the malerial used for machining, material the program is based on. Not only the type of material, also its rough dimensions, amount of stock for machining, its condItion, and other features that are important to include in program documentation. This information is very valuable at its conception and will be even more valuable in !.he future, mainly for repeated jobs. Many times, a program is made when the blank material is nOI yet available. If the programmer finds out later that there is too much deviation from the estimated conditions, the necessary changes are easier to make with good program documentation.
Although not a strict requirement, some programmers include [he cutting time for each machining operation on the setup sheet. When the job is run for the first time, the actual CULLing time is unknown. As the program is used and optimized on the machine, it becomes proven and eventually finalized, the cutting time becomes known with morc precision. Knowing the cuUing time may help in planning the load work on the CNC machine. The most useful cutting time for an individual part is the chip-fa-chip lime that includes all the supplementary times (for example the [001 change time, part replacemenllimc. etc.), nO[ only the culting time Itself, •
Tooling Sheet
Although the tooling is really part of the setup, it requires a separate set of data, thaI mayor may nol fit on the setup sheet. If Ihe setups and tools used are constantly simple, it may be more convenient to have only one sheet, describing Ihem both. However, for large or complex setups. making a separate tooling sheet is more practical. Both, the setup sheet and tooli ng sheet, are part of the same documentation 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'fcrent than a tooling sheet for a machining center. The data gathered for elwer machine will have some similarities and 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
07-Dec-01
Peter Smid
1 of 1
i oootdinal'a
o Tool coordinilte data o
Tool diameter
o
Insert radius and the tip number
o
Offsets associated with the tool
o
Toollength
o Tool projections from the holder o
Block number of the tool being indexed
o
Brief description of the tool operation
o
Basic speed and feed of the tool
o Tool holder description o
Tool number and/or tool station number
o
Special instructions
In addition to the most common items, also include any unique information in the tooling sheet, for example, to inform the operator about non-standard tools. tools that require modificalion, premachined condition of the material, etc. An example ofa simple tooling sheet is in Figure 48-2.
Figure 48-3 SimpJe coordinate sheet form - only basic data shown
The Z axis column will be usually blank for machining centers and Y axis column will be blank for lathe programs. Modify the sheet to add additional axes or make separate sheets for each machine type.
DOCUMENTATION FILE FOLDER All records lhat havc been collected during program preparation are quite likely important enough to be kept for future reference. They may be stored aJl over the pJace, sometimes very hard to find. So, now is the time to put them all together and organize (hem. It is (ime to make a file folder, identify it. fill il up und store it properly.
•
Identification Methods
Before some better methods of identifying program documentation 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 program 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.
Figure 48-2 Simple tooling sheer form - only basic data shown
•
Coordinate Sheet
The idea of a coordinate sheet is not new. It has been used in programming from the beginning and it was mentioned in tbis handbook many limes already. A simple printed form containing the X. Y and Z axes can be used for both machining centers and lathes. Figure 48-3 shows an example of a simple coordinate sheet.
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 oul in a little more than 7 years. Is that the time [0 scrap the machine and buy a new one? And if 25 programs a week seems a bit steep. remember that each program will have to have i1 number. ThaI may be Ihree Or mOre separate operalIons [or a single job. there may be dozens and dozens of subprograms that ruso need their own program number. So the figures are not so unreasonable after all, and some beller method should be soughl from the beginning. It could be a manually generated method, or a comprehensive computerized database.
2
48
point of Ihis evalualJOn is that all menl (with the exception of subprograms), left to the CNC operat01; if possible. That means, to be found to identify the documentation decisions is the program name "... ,,""""'" of the number of machining operations or there should be only one folder only one name for one folder. The name share the common denominators with any 10 such a name meaningful. With an access to a personal computer, the chances are 10 each program are stored in comall In Ihal case, the only limiting factor is Ihe sofrware structure to name the files. For example, the old up to eight alpha numeric file name and another three alpha nufor tile extension. Since Windows 95, names are allowed, up to 255 characters plus extension try to advantage of this feature. Regardless of CNC , establish a fi Ie nam tng convention Lo ble restrictions. There are several this approach. One IS an I order. In thIS simplest form, ail related to the firsl program would be - for POOOOOO I, the next program would be POOOOOO2, etc, I f the zeros are ypnV"n"" order on the files will not . The sccdisplay. No number as the maya good that are not Jobbing shops. customers means dealing types of drawing numbers. The variety may thai it is almost impossible (0 Gnd some common ground for Another variation on the same theme is ajob numbel~ rather than a drawing number. In many jobbing shops, a number the mome!'ll Ille order is Number is always used as the num-
Hopefully, the tional ideas that will suit a ",Cl,rf,r'''"'lr There are no given rules on individual there are no dard of part program is always use the old common. sense that is often not so common. Common sense standardization The quality ured by its usefulness in the future. time a particular standard can be of thought has gone into its
• Operator's Suggestions the CNC machine operator runs comments, ideas, corrections and variety It may be a good idea to a card system, a computer database. or a similar communicating the operator's to Whatever system may be sel.~C(~(] available at the machine, so the operator a access to it. The main benefit of such a system is communication goes into one source and is to control. the nature of the particular comment or should have the operator's name, current date, even current time, the mach! ne and job description, as as other details that may be relevant and in future.
.. Filing and Storage quite bulky, particularly when media, as large size etc. The storage of office steel fil ing to evely work shift, alpersons should be any kind media for storing [he part sure they are safely stored in a separate than file folder itself. Magnetic devices are particularly to conditions and should be stored from any source and magnetic field (including a They should be kept Keeping duplicates (or in a dry and dusl in a even tripl is also a good and safe procedure. A very much less bulky - is storage of proven programs on a Disk) or a DVD (Digital Versatile Disk), and software. Although still away from all heat sources, they are not a netic fields. Individual sheets or pages the part ralion should be either numbered reference number on each page. nets should be identified as to their contents. common enough requirements, but together, usually because [here is no losophy behind an orderly filing is cess to a required program that provides instant rale information.
PROGRAM VERIFICATION a wrlllcn Now, a perfect
IS
no errors, Of course, that was intent from [0 make an error . What hapof the best efforts -there is an a I !ypi error can cause a severe problem when the runs on the machine. Could an error prevented? if so, how?
U'-l';UII'"Ul'; -
all errors beshould be checked It Ihe machine. Checking can quile simple, and the such as a visual comparison of the wnlten The main purpose of a is to mistakes - mistakes that can looking for them. kind are mostly syntax errors. Of course, program is error but programmer's desk, lhe effort should to il All programs arriving at the machine should gain of CNC operalor. The operator should to concentrate all effol1s on proving the serun the first part. The operator has no (ime to errors thut could - and should been the office. To do all program the machine is very nonproductive and should be
DETECTION OF ERRORS it mllsl he errors can found copy leaves the programmer are undoubtedly to they are detected during the CNC machine. This is a prellentive to be corrected at the machine, during the run of the the CNC operator has to do something that should not normally be part or the operator's dulies. Whaleve( action II is the operator must take, il is a correclille action. measures thaL can be to help eliminale errors In a program are of two
o
Preventive measures
o
Corrective measures
Preventive measures are should
. proactive measures measures
panies involved and conslluclive measures require even authority.
•
Preventive Measures
AI! errors should
gram mer. who
detected and correcled by Ihe
laken a certain amount of
measures. The measure is to gel SCI up procedures, sel up seL up rules. Then. low them thai can be found program is on machine are numerous. it some techniques to . . ."'1"""'''' successful in rheir dcrcclion. <'(",,/'I.en',",
should use is the program and evaluate it. If
is easy. Programmers the established
ginning and end nol lake much lime a£ all.
followed, the elTor check the appearance of the program,
me order of commands at the
Checking the program should
The second method can programmers. Ask a"" '"1'''''''-''''' changed program. a check can reveal. A
oflen very productive. or fresh air firSl will
A major pan of prevt;niive measures is finding synra.'( ('rIOrs. A syntax error is one Ihal can delected by the control unit. For example, if a dollar appears in the prothe control will reject it as illegal:nle control reLurn' an error message or an 'alarm'. If the 2 is the program instead of the j nlended lax error. Thai is a logical errOl~
the control can accept.
•
Corrective Measures
If an error IS discovered at the il was missed and the An error that is II forces the measures and eliminate the error. one or two actions. One will be to return 10 programmer, the second action will error al the machine. Which is on the seriousness of Ihe error. An error can hard. A error is one thaI does not from being processed by the
3
454
Chapter 49
For example, a missing coolom function M08 in the program can be switched on manually al the machine, without interrupting the program processing. That is an example of a soft error - it is still an error, but classified i.1S a minor error. A hard error occurs when the program processing must be stopped by the operator, as the only available choice, and without doing a damage to the machine, cutting tool, pari, or all of them. A common example of a hard error is a programmed tool mOlion that cuts in Ihe wrong direction. The program itself is wrong and must be corrected. This is an example of a hard error, classified as a major error.
Most CNC operators do not like delays, especially delays caused by somebody elsc. A dedicated machine operator Will do anything possible to correct a problem without any assistance. For program errors, the operator wi II try to fake corrective measures 10 clllninate the problem. Not every operator is qualified [0 do even a simple change to [he program. On the other hand, some qualified operators may not be authorized to do program changes as a maHer of policy. Every company benefits greatly, if the CNC operator has least a basic training in CNC programming. The purpose of such a training is nOl [0 make the machine operator a fully qualified CNC programmer. Its purpose is to highlight how a part program influences CNC machining, the setup, tooting and all (he other relationships between programming and machining. Its purpose is to offer the operalor tools Ihat can be used for minor program changes, etc. Such a training, if it is designed and delivered in a professional manner, is always a worthwhile investment. It may be a relatively short traming thai will pay for itself very quickly. Time delays on CNC machines are costly and the sooner the program is made functional, the less damage Lo the production control has been done. at
Whenever a program has been changed at the machine, the program documemation must reflect these changes, particularly if they are permanent. Even a small permanent change should be always be documented in all copies of program documentation.
G
VERIFICATION
Programming etTOrs can be costly, even if their cause IS a minor human error. Omilled lIlil1u~ sign, a misplaced decimal point, an illegal character - all are mi nor oversights that cause major errors, Although a visually checked program should be error free. that may not always happen. The human eye is weaker when it evaluates nongraphic elements, One of the most reliable methods of part program veflficarion is a graphic display of the \001 path as it appears in the program. Almost all errors relating [0 the 1001 path can be detected early, by one of three avai lable graphic veri ficalion methods
One method of graphic verification of a CNC program is a screen plot. This optional control reature will show all
programmed tool mOlions on the screen. The motion will be represented as lines and arcs. The feed rate motions will appear as a solid line of the selected color, rhe rapid motion will appear as a dashed line. The display of the tool path will appear on the screen of the controL Many contTOls offer a graphic simulation option, where the 1001 path IS simulated on the screen. Each cutting tooJ can be shows by a different color or density, making the vi~ sualization easier. Some graphic simulation uses actual tool shape and Ihe part for a realistic display. The negative pari of any graphic verification is [hat it can only be used when the program is loaded into the control. The second verification method is much older than the first. It is a hard copy ploUed representation of the CUlling 1001 motions, Hard copy plotting has been available in computer programming for a long Lime. To get [he benefits of hard copy plouing, a pen plotter and a suitable software will make it work. The plotter is seldom a problem In companies using CAD software but may not be available to small machine shops. The required software is also part of a large computer based programming system and can be quile expensive. A simple version of a pen ploUed tool path is a screen dump, usually to a printer. There is a third method of graphIC verification and can be done in the office. It uses a computer and software specially designed 10 read a manually generated program, then displays the 1001 path on the screen. Some software even uses a solid model like features, so the actual surface of the part after machining can be seen as well. This is very useful for 2-1 J2D and 3D lool path veri fication.
AVOIDING ERRORS The goa! of every programmer is (0 write error free programs. Thatls almost impossible, since any human activity is subject to errors. Programmers with all levels of experience make miSlakes, at least once a while. Since the prevention of errors should be the main goa! of any programmer, this section looks at the subject in more deplh. The most com mon mistakes will be evaluated, along with suggestions to prevent, oj' at least to minimize, their happening. First, what exactly is a program error? Program error is the occurrence of data in a program that will cause the CNC machine to work contrary to the intended plan or not to work at all.
All errors can be classified into two groups: o
Syntax errors
o
logical errors
VER IFICATION
Allhough the average distribution programming errors could be generally splil al 50/50 "~t.,,o,>~ the syntax and errors, cenain conditions swi the balance. A programmer with limited experience wi!! all kinds of ererrors, An experienced programmer more rars. look at each error group.
• Syntax Errors group are usualJy to deal with, once . Syntax error is simply one or more charprogram that are either misplaced or do not beThis error covers program that do not to the programming format as syntax) of the conlrol system. For example, a lathe control systems do no! character Y. If the control encounters the letprogram, it wil] it as a syntax error nnd ter Y in a the won't run. The same result will when is programmed for most milling can nor be used with eitJler most V - it is an illegal character Yet, it is very character In a fOllr control.
5 Logical errors cover an unlimited the following lathe program is For 04901 (EXAMPLE WITH ERRORS)
N1 N2 N3 N4
G20 G40 G99 GSO S2500 T0400 M42 G96 S530 M03 GOO G41 X12 0 ZO.l MOB I N5 GOl X-O.06 FO.012 / N6 GOO ZO.2 / N7 Xl2. 0
NS
zo
N9 GOl X-0.06 mo GOO ZO.l M09 N1l X20.0 Z5.0 T0400 MOl
There are errors in tify them before
04901 example. Try to further.
The first error should - a tooloJfse/ is missing. In the block N2, tool T0400 is without an offset. ThIS block is correct Block Nil is the return to the Indexing polallon, which was never prosition and the tool offset N4 - it should be: grammed. The error is in N4 GOO G41 X12.0 ZO.1 T0404 M08
The second error is eye to spot it. Note blocks N5. N6and N7. oflhcblock in block case, """,,,<.t;.:,''-, but only for orocesseCl The correct block N8 NB
zo
and requires a In symbol was program with the cutting feedrate is control would issue an time the program is be:
FO.012
th error is the missing cutter radius block N II . block should correctly NIl 040 X20.0 Z5.0 T0400 MOl
• logical Errors Logical errors are more than syntax errors. A as an error causin.g the machine fOol logical error is to act in a to the programmer's intentions. If a motion is to the coordinate of X 1.0, but program states conlrol will go ahead but the tool position will same error will happen whenZIO,Ois ahhough intenlwasXIO.O. The contTol does not cannot have any buill-in protechas the responsibiltion against logical errors. ity to exercise all care and caution. Logical errors can be serious -Liley may not only result in a scrap. they can even the operator. damage the machine
A error of this kind may have a next tooL Even worse, this error may not part ron. The correct 04902 (EXAMPLE WITHOUT ERRORS)
N1 G20 040 G99 N2 GSa S2500 T0400 M42 N3 G96 5530 MO) N4 GOO G41 Xl2.0 ZO,l T0404 MOB I N5 GOl X-O.Oo FO.012 I N6 GOO ZO.2 I N7 Xl2. 0 N8 ZO FO.D12 N9 GOl X-0.06 mo GOO ZO.l M09 NIl G40 X20.0 ZS.O T0400 MOl
456
Chapter 49
After evaluating the three errors, what chances are there that the control will return an error message? Nil, zero, zilch. A11 errors in the example are good illustrations of logical errors. They may not always be easy to find. but they can creale a lot of additional problems if not found early.
COMMON PROGRAMMING ERRORS Strictly speaking, there are no 'common' programming errors. Every programmer makes some unique mistakes. It is difficult 10 lisl any errors as being more common than others. It is also true, that some mistakes are made more frequenlly than others and in that sense they are more commoo. Focusing on this group should be beneficial. Both syntax and logical errors share the same cause - the person who writes the program. The mosl important step towards eliminating errors IS the idenli ficalion of a problem - ask yoursel f 'wha' mistake do I do repealedly ?' Everybody makes some 'favorite' mistakes, the solution lies in the correct answer \0 this simple question. Most errors are a result of insufficient program planning and a lack of precise progr
function, program stop. a missing minus sign and olhers. Even the whole block may get 10SI, mainly when preparing the program from poor sourCt;S. Many errors are caused by the programmer's inability to visualize what will exactly happen when the program is processed. To this category belong all errors relating to setup, tooling and machining conditions - cuts that are too heavy or 100 lighl. insufficient clearances and depths, incorrect spindle speeds and CUlling feedrates, even Ihe selection of wrong tools for a given job.
•
Program Input Errors
Most programs are hand wrillen or typed and have to be transferred to Ihe control system or a computer file. Many errors are caused by the incorrect inpw of intended data. Keep in mind thaI if somebody else is using the program, its legibility and syntax is very important. Input errors also i nel uue errors caused by forgetting to input significant characters in [he program. These sirings can be almost anything and can cause a serious problem. A missed coolant function is not likely 10 cause a big problem; a missed decimal point or a wrong 1001 retraction will. Olher errors ale insufficientlool clearances, a depth Ihalls 100 shallow or too deep, errors relating to cutler radius offsel (this is always a big group). Be also careful when canceling or changing modal program values. One common error is to cancel one kind of motion by replacing it with another type of mOlion in one block, then forgetting to reinSlate the previous motion later.
•
Calculation Errors
Using malh functions and formulas is a part of developing CNC programs manually. The type of calculation errors include a wrong numeric input, even when a pocket calculator is used. Keying a wrong fonnuia, wrong arithmetic sign or placing parentheses in a wrong position, all represent a serious error. Rounding Error
A special lype of an error is causeu by incorrecf rounding. This error is an accumulative error that results fTom too many dependent calculations. A rounded value used in olher calculations may lead 10 an error. In many cases the error will be too small to cause any problems, but never counl on it. It may become a very bad habit.
Calculations check To prevent math errors when using fonnulas for calculations, it is a good idea to check the calculated result once morc, USlng a differelll formula. Math is a generous science and more than one calculation method is usually possible.
•
Hardware Errors
The lasl type of program errors is by tile malfum:tion oj 11 hardware element of the control system or machine. In CNC, even a bug In the software is possible. Their occurrence is rare, as modern controls are very reliable. When encountering an error, don't blame the control or the machine as [he firs! {JIU:/ only possible cause. It shows ignorance and unwillingness 10 address the problem responsibly. Before callmg for a service, make sure to exhaust all other possibil tties of error detection first.
•
Miscellaneous Errors
Some errors can be traced 10 the part drawing. A n error in lhe drawing is possible, but first make sure to interpret the drawing correctly. Drawing errors include too many or too few dimensions, rom tolerances, etc. Also make sure to work with the latest drawing version only. Other errors may be caused by the wrong setup, tooling or material. These are not programming errors, but they have to be considered as possibilities. With some common sense. and sUltable precautIons, many programming problems can be cltminated. For example, to prevent an unproven program to be processed as a proven program. just mark il as unproven. Mark it at Ihe beginning of the program and leave it there untl! the program is checked. A complete elimi nation of errors is not realistic. Mistakes do nol happen - but mistakes are alwa}'s caused. Inexperience, negligence, lack of concenlraLion, poor altitudes, are just some causes. Always program with the attitude to eliminate programm errors altogether. Thnt will be the Cirst step Lo making fewer errors.
CNC MACHINING ""' ....r''''''~o
sent to mais over. All the calcubeen wriHen, docuway Lo the CNC finished? Is there back, perhaps or even criticism?
is peifecr, programmer will No doubt, programmer all directions. The quesresponsibility really manufacturing can the uated? When can the program
ideas and do commun with each other· thai is advice for becoming a better CNC programmer. shop offeTS tremendous resources, take of them. CNC technology is an instrument 10 ity with a minimal human involvement. at by the physical level. As any other technology, it must managed intelligently and by qualified people with cnce. Without a firm grip and good control, without management, the technology will not yield the SullS - in facl - in will become counterproductive. The function and responsibilities a 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 field of bus! ness have a learn people LO ming project. After all, from talking to gram or particular grams used in machine lypically CNC machine of constructive ideas, improvements to them, ask quesllons, make portant - listen La whallhey have to never put their fOOL in the reluctanlly, programmers who may closed and ears plugged, tude that they are always are all on the Exchanging ideas with machine operators, lions and seeking answers is the only way to formed about what is actually 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
Generally, [here are two groups of CNC programs, each a different effect on program proving. The firs! covers all programs that have never been used On the machine, These programs must be proved for accuas well as optimized for best performance. secgroup covers the repelilive .iobs - programs that 11::1\(: al least once before and have been proved to correct in all respects. Programs In ,this group have most oplimized for the best performance conditions. In both cases, the CNC operator must a care running Ihe first pan of the: balch. there are di ffercnces between a 11t'\\:job flm versus a repetitive job mn. In a
case, Iwo qualities relating to the parl program established lirst: Setup integrity
D
457
458
Chapter 50
These two consideraliol1s are equally important - if only one of them is weak, the final result is not satisfactory. AJways aim at [he highest level in eilher category. Also keep
in mind thaI the setup integrity has to be established again with each run in the future. 111e program integrity has to be established correclly only once.
•
Setup Integritv
The machine setup is only a general description of the lype of work actually done to gellhe 'CNC production goIng. The whole process covers Ihe setup of the CUlling loots, as well as the part selup and many related tasks. No single check lisl can ever cover all points that have to be considered during a CNC machine setup. 111e major look here is at the most important considerations. in II form of 11 brief check list. Adjusllhe individual poinls according to the machines and CNC systems in the shop. Adjusl the lis! 10 reflect personal working methods ancVor programming style. The main purpose of this check list, or any Olher for [hat mutter, is to cover as many details as possihle and not to omit an important item, operation, procedure, etc. Even a small omission may cause an accident and part damage or even a scrap due to a raully machine tool setup. Cutting Tools Check 0
Are the tools properly mounted in holders
0
Are the proper inserts used (radius, grade, chipbreaker, coating)
0
Are all the tools the right size
0
Are the tools placed in the proper magazine station
0
Are the offsets set correctly (set zero to unused offset values)
0
Is there an interference between individual tools
0
Is the boring bar properly oriented (milling)
0
Are all the tools sharp
Part Setup Check 0
Is the part mounted safely
0
Is the part properly oriented on the table (milling)
0
Is the proiection of the part from the chuck safe (turning)
0
Is the part lined up for squareness (milling)
0
Are the clearances sufficient
0
Are all the clamps away from the cutting path
0
Is the machine at its start {home) position betore you press Cycle Start
0
Does the tool change take place in a clear area
Control Settings Check 0
Is the coordinate setting registered (for G54 to G59)
0
Are all the offsets entered correctly
0
Is coolant necessary
0
What is the status of the BLOCK SKIP switch
0
Is the optional program stop MO 1 active (ON)
0
Is the DRY RUN off if the part is mounted
0
Do you start with a SINGLE BLOCK mode set to ON
0
Do you start with spindle speed and feed rate overrides set to LOW
0
What is the status of MANUAL ABSOLUTE switch (if applicable)
0
Has the position read-out on the screen been set from zero (origin preset)
Machine Tool Check 0
Is the slide lubrication container filled with the proper type ot oil (lubricant)
0
Is the coolant tank filled
0
Is the chuck and tailstock pressure set correctly /tuming)
0
Has the machine been zeroed before running a job - is the read-out set to zeros
0
I!'; th ere p.nough (air hose, etc.)
•
prf!!,;~ Ilre
for the fI ir 1"Ittflchments
Program Integrity
Any new and unproved program is a potential source of problems.]n manual CNC programming, mistakes are a lot more common than in a CAD/CAM program. A good way to look at a new program is Ihrough the machine operator's 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 simply renects [he facl that the machine operator is ultimately responsible for the expected quality of the work and 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 by the program or for some other rcason is a littJe consolation when the work is rejected. What does the CNC operator look for in a new part program? Most machine operators would agree that the first anu the most important thing is the consistency in programming approach. For example, are all tool approach clearances the same way as always? If nOl- is Ihe.re a reason? Is the basic programming formal maintained from one program to another program and from one machine to another? A good operaw(" scans the written program twice once on the paper copy, the second time when the program
CNC MACHINING
9
is
conlrol It is surprising what can mto Ihal was nol seen during the screen be seen on reverse is also true. The common copy
such as a
minus sign or an address, a
decimal
amoun l extra large or extra u'-,'\J'-.,.....u on Ihe screen easier Ihan on a computer for manual programming, it visually. Using a douhle .. ".m...,.., can be prevented. There is 10 graphically check the program on a simulation and file comparisons,
o
STEP 5 . Check the program
slep is the firsl evaluation of the
may be removed from the fixture temporarily. are already set in the control, <.:!Jt.:t:kl.!u accurately, with all considerations. switches on the control panel may be I Watch for lool motions in general and be sure 10 ,\latch specifically, Repeat this step, If not sure with any aspect of the programmed tool o
STEP 6 Reset the part
The
style is very important Consistency is the operator in the proconfidence of the gram illtegrity, time
in
now is the I steps allows continuation with AI this point. check the the ad and air pressure, clamps, etc., just 10 be sure.
ov,:;.rem[)ll
RUNNING THE fl
PART
The CNC machine studying the
starts a new job by with the program, and tooling sheet. The next procedures lhal will Iy. they will remain the same
in the fixture again. The
o
mainly the few
vary for most johs
o
STEP 1 - Set the cutting tools
Th is fi rsl step uses the malion from the part culling tools into their and registers all 1001 nnrT'oh",l"<' Make sure the tools are sharp holders.
o
STEP 2 - Set the fixture
The fixture thai holds or the machine, squared and part is not mounted at this documentation. particularly drawing may often be reqUired o
or the looling inforoperator selS the tool stations control memory. properly in the
]
Make a trial cut
An trial cut may be required in to whether programmed speeds and reeds are reasonable or nol and if the various offsets are set properly. Trial cut is a cut that is designed to idemify in offset sellings and their sure the trial cut leaves enough material for cut also helps 10 establish Lool within limits,
o
STEP 8
At this order to TIlis slep offsct). It is feedrates, jf o
ne<:essar'v adjustments are finalized in before production begins. adjustment (usually a wear to adjust spindle speeds and
STEP 9 - Start the production batch
A full batch production can start now. Again - a quick worth the time,
second double check may prove to
as well.
STEP 3 - Set the part
Place the part into the fixture and make sure it is safely in mounted. Check for possible inlerferences and the setup. This slep represents the end of most initial of CNC machine operation. o
STEP 4 - Set the tool offsets
Df:re:nding on the lyre of
of the will be two kinds ()f path:
Ihis
the tool geometry and wear offsets, set cutter radius offset, if important parlS of this slep is (he nate (work offsets G54 to or (G92 or not both. Work and most conventent selection 1001 setup.
o
Tool path simulation
o
Tool path animation
have been described in the
460
50
first type of graphic representation. the tool parh 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) and a solid line (cuLting motion) processthe order of machining is shown on the display screen as either dashed lines or solid type. The solid area of the the lools, the chuck or With a screen, can {he flexibililY of the
tool path more descriptive method to machining is fOol path allimation.]n many respects to tool path simulation, the tool path animation a additional benefits. The form, rather than an outline only. and seen on the screen display; can also be preset. as well as etc .. all in a shaded form. very accurale representation of the an additional benefit. the display is also proportional in the actual CUI, the material can , righl on the screen. The improvement over lool path 100% accurate display of tool path. No can show every single detail and no chips. What it does show is quite jmCNC macllini centers, control can be set lo one of several views. More one view can be set at the same lime on the display screen. ng a split screen method, also W/IIdow.'> or . Many CNC operators run the display especially for milling systems - once 111 the XY lime in the ZX or YZ view. display is turned on. The too small or mode, areas that arc (or reduced for Cutter radius [001 functions can be turned on or off Make sure the 51 mu!ated cond llions are as possible. Also, do nol forgetlo set before the program is lesled. Unfonunalely, this option also adds to the overall cost of the control system and many companies choose not La purchase il. instructions cannot be lested by us-
have been has to be done those details that to be checked have easier to follow.
most controls, there will be no Many other but what does show will Since all motions of the control. alilhaL run, is [0 concentrate on seen on Ule display. The tasks down and the program is
PROGRAM CHANGES is proven, tested and !he fi rst part a good CNC operalor looks at ways of improvements may be done on ne, before the whole job is completed. Some improvements require a different setup, or fixturlng. , it would not be practical or even h1e to implement changes on the current job, but they should be appl the next time the job is done. changes 10 the are resull of a design lion and have to do wiLh Ihe program optimization. Others are taken for the best productivity rating. Regardless reason, virtually any by the machine the CNC programmer who has 10 apply to the new program. should be for the beuer, Often a major change will rebut more likely, a
All
to a reasonable extent. When a proit is said to be optimized, il is compared to another lype of pro-
upgraded. That can gram change - program updaTe.
•
Program Upgrading
Upgrading a CNC means to strengthen it, to enrich if, to make il better than it was before. It means to change it in a way cost IS The cost promise in quality upgrading (optimispeeds and feedrates. optimization. Milling operations may require a approach then turning operation'>. Jobs that are repeated frequently, as well as lOIS, should be scrutinized with even more care. in mind that only one second on a cycle lime will save one hour for each batch of half an hour for each 1800 pieces, and so on.
In the following check list are some when optimizing a CNC but it should serve as a into and be explored. Some in only [0 milling operations, others only 10 are also some items that apply to bOlh ,,,,,,<,,,,,'" a special option of the cont("ol 1001 to available. 0
Fine-tune the spindle speed and/or f!::ednne
0
Choose the heaviest depth af cut possible
0
Choose the largest tool radius possible
(J
Experiment with new cutting materials
CNC MACHINING
1
0
e tool order for faster tool chan es
0
bi-directional turret rotation
•
documentation thai is program is not much useful if it not changes done during machini
0 0
the MOl rather than the
0
Avoid excessive dwell times
documented engmeering
0
cutting' situations
0
motions where applicable
0
Use multiaxis motion whenever safe
[)
Apply
0
Look tor block skip applications
o
Avoid spindle direction change
o
Shorten
o
source. all revisions. updates. changes should be recorded. calculations should be especially weI documen supplemented with formulas and sketches i f . H are several existing copies of the documentation, they too, should replaced to make them current 10 1l1C programmer's name, (he nature of the even the lime of the day, should be a change took place. Keeping the (at for a while) may one or tWO experiments may on the
passes for threading
tailstock travel distance
not return to machine zero after each piece
o
Program tool
o
Reassess
o
Consider
MACHINE SELECTION .nl'H·",rl".,r1
only, ahhough deveJmore items can be added TO modified in their description. only once should be carefully audited. mayan Improvement Ihal can be applied to a differenljob. sometimes in the fULUre.
•
In con!rasllo program son for program updating iog the part cost In the end, the change in the but nm because a
(opllmlzation), the rcato do with decreasmay COSI due to a or similar interventions, A program needs LO
in [he
be updated after any jer.i., the CNC
that of that have been
previously upgraded Engineering changes in pari
planning, thjngs can go wrong, al What happens in a machine shop when lhe only ne is suddenly out of commissIOn? or course, this never happens, except when a rush job is just about [0 set up on [hal very machine. It usually happens when it is least Every
of action.
on another be
Program Updating
companies {hal
Documentation Change
Usually is for a specilic machine and a CNC system. If two or more such have been installed in shop, can be executed on anyone or them. two or more machines and/or conlrols are totally are not transrerable and a new TIle best OppOrlU-
if two machines [Ire differentlll size, but with the same type. Thc exisling program may be usable as orwith only minor modifications.
are more common in In ajob by the cusonly difference
for
own are Iypically
shop, the design lomer, but have the same overall is in the source and origin of
alternate machine selection cull i ng tools a valluole. Tuuls I rtu:;! alloe The pan posi-
are di
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 is guaranteed by ils manufac-
nO( only if it is handled properly, wilhin Il cerlain environmcnl romare parlicularly sensitive to rapid in humidity, dust level, external vibrations, eiC. All potential hazards are clearly specified In {he manufacturers' I Every CNC operator knows from precision depends a great ue<.ll on the spindle Some ultra high precision machines even an internal cooling syslem 10 keep (he spindle constant. In cold climates. on a cold morning in the Winter, when the machine was sillin o all night ill an unhealed the CNC c::IaI' turns the spindle on for a few to it warm At the same lime. in order 10 freely a few moving along the free mOlions In all axes, If process is repealed months. il may be wOr1h 10 automate it. A will do the job. To write such a program is simple, but there are several sure thatlhe maimportant points to consider. chine mOlions will always be in area wherc there is no possibilily of a collision. This will used with many jobs and modifying it a new job is set up is nOI an option. Anothcr POlnl is the spindle speed in r/min, Avoid hiah r/min - a [001 mounted in the up cot:ld have a small or large diameter. 10 re([self indefinitcly, usc M99 function al the end. Proalso fUnclion M30 for the block skip symbol [II. When the warm turn the block skip off. completed and the program will
example 0500 I is a typical warm up milling system and uses English units. adapted to any other machine: 05001 (WARM-UP FOR A MILL) Nl G20 N2040
N4 G28 XO YO N5 S300 M03
N6 GOO X-10.0 Y-8.0
z- 5
N8 S600
°
N9 G04 nooo N10 X10,0 ZS.O
Nl1 Nl2 Nl3 N14 NlS Nl6 N17
(REPEAT FROM BLOCK 5)
is ,simple, in structure, yet well thouoht OUL 0 InlenllOnal programming techniques consample progr
Thewhole
a
The
a
The Z
a
is in the incremental mode
motions are to the machine zero is the first motio n
speed is increased gradually
o
Owell is
a
The end tool motion is to the machine zero
a
The end of program M30 is 'hidden' by a block skip function
a
Each repetition of the program starts at block hiS
to lengthen the current action
can be developed, depending work expecled on lhal ma-
a warm up program for il thal are typical to a CNC range, moving the
[he chuck jaws, a horizontal machining center, on a boring mill, the in be programmed.
purpose, but keep - 10 warm up a that had been idle for a relatively of lime in a cold temperature. Also keep in mind - (he goal is a genpriC program for (I specific machine rype, a program thaI can be used with all jobs, without modifications.
CNC MACHINING AND SAFETY Machine shop safety is everybody's basic issues have aheadv of Ihis handbook. at Ihe programming machine, and so on. and try (0 Improve them. J
N3 G9l G28 ZO
N7
G04 PlOOO N21 M99 P5 %
Y8.0 5750
GOl X-S.O Y-3.0 Z-2.5 F1S.0 X-2.0 Y-2,O Z-2 0 SSOO
G04 PSOOO G28 ZO MOS
the safety concerns or a machine are almost the same as those operators funninO" conventional i pmenl. SnfelY starts with 11 c1enn work p~cc and approach [a programming, setup and Many do's and don'ts can be itemized. but no will satisfy all the safcty concerns. Here is an attempt at a of concerns in CNC shop. 111ere are III the incomplete lis\. Many
CNC MACHINING
463
Personal Safety
o
Wear suitable clothing (tucked-in shirt, buttoned-up sleeves I
Do not alter design or functionality of the machines or controls
o
o
watches. rings. bracelets, and similar jewelry before machine operation
Electrical or control maintenance should be done by authorized personnel
o
o o o
long hair under a net or tied up
Do not use a grinding machine near the eNC machine slides
o
00 not use a welding equipment on CNC machine under power
u
Behave responsibly - do not engage in
o
Protect your feet by wearing approved safety your eyes - wear approved safety with protective side shields at all times
o
an approved safety helmet if that is the company policy
a
Always towards
o
In some cases, protection may also be needed for and ears, perhaps even nose
o
Never remove cutting chips by hand, with or without gloves on
and horseplay around machinery are only some common sense comprehensive list for CNC machining
your hands - never reach part while the spindle is rotating
o
SHUTTING DOWN A CNC MACHINE machine IS not used for an extended it should be shu! down. Many users assume down a CNC machine means just to turn the
or gloves around moving or
o
ask for help,
When lifting use a crane or
There is more than that to shutting down a malool with a power switch.
Machine Environment
•
o
Emergency Stop Switch
free from oil. water,
o
Check the from any
o
See whether all the material is safely stored and finished parts are in proper containers
so they are not blocked
of the emergency switch IS (0 stop all Ina-
chine InUliOI7S immedialely, regardless of the current operalIonal
be
Machine Tool Safety
o
Do not remove guards and protective devices
o
Read and follow
o
Check fixtures and tools before they are used
manuals
should such as
When pressed. it will lock in place and must manually in !:he opposite direction to II sparingly and only in real
o
An situation that is unsafe to the human being is about to occur
o
An collision of the machine tool elements is about to occur
it is
o On the machine, make sure all the tools are tight in the holders, that tools are sharp and selected properly for the job on
o
nol a
Stop all
when
or inspecting finished work o
Do not leave
o
Use only a suitable coolant mixture, the coolant tank clean at all times
o
Never use a file tor breaking corners or a sand paper for surface polishing during the program execution
o
Deburr sharp edges before handling a part
o
Stop all machine power for
o
Do not operate a faulty machine
on
to cause damage to pressing the Emergency Sii'ilch. design, there may be several located at convenient should alw(\ys know the locaswitch. Emergency switch is
of
WARNING!
keep
Although the emergency stop switch disconnects all power to the machine axes, the electrical power is still !':llrmlifHI to the eNC machine. For a complete procedures as
shut-down, always follow proper policies,
by
464
Chapter 50
When the Emergency Slop switch is released or unlocked, the machi ne does nOl reslm1 automatically, The machine setup conditions and other condllions have to present before the automatic stan call be selected. This condition is usually achieved by pressing the Power On switch.
•
Parking Machine Slides
Several chapters have menlioned a comment that a CNC program cannot be executed unless the machine had been zeroed firsl. Recalllhal zeroing the CNC machine while the machine slides are at - or almost at - the machine zero, is impractical and may resull in an overtravel. The machine zero return needs about one inch minimum (or 25 mm), to be away from the machine zero position in each axis. This position is often easier LO reach ill the end of work than at its beginning, A practical CNC machine operalor knows Ihat to shut off the machine when the slides are at the machine zero position causes the subsequenl start up 10 lake a lillie more time. To avoid any potential problems in lhe future, some programmers make a small program 10 bring the machine slides into a safe position at the end of work, before the power is turned off. Although the idea is good, the solution to one problem may cause another problem. If the machine slides arc 'parked' repeatedly at the same position for a lengthy period of lime, various dirt deposits will collect under the slides, possibly causing staining or even rusting in and around the 'parking' area. A beller way is to let the CNC operator do the positioning of the slides manually, It 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 is done manually, there is a better chance Lbat the machine position will bc always different.
•
Setting the Control System
Control panel ofUle CNC unit has many SWitches set to a certain Slale at the time of a shut down. Again, variations exist as to what is rhe proper procedure. but a good CNC operator will leave the control syslem in such a state that it does minimize a potentially dangerous situation, when used by the next person, Here are only some possibilities ro apply before leaving the conlrol system for a break, or a complele shut down: o
Tum down the feedrate override switch to the lowest setting
o
Tum down the rapid override switch to the lowest setting
o
Set mode to JOG or HANDLE
o
Set the handle increment to Xl
o
Set the Single Block switch ON
Cl
Set the Optional Block switch ON
o
Set operation mode to MDI
o
If available, remove the Edit key from the lock
Several other precautions could be also be used, but the ones listed are the most typical and should ensure reasonable safety precautions.
•
Turning the Power Off
Procedures vary from one machine to another, so always consult the machine manual first However, there are some procedures pretty common to all machines. General rule is to reverse the procedure of turning the power on. For example. if the procedure to turn the power on is 1. 2, 3,
Main switch on Machine switch on Control switch on
then the power off procedure will be 1,
2, 3.
Control switch off Machine switch off Main switch off
Note lhat in either case, there is no one switch to do all work. This is for the safety of the sensitive electronic system of the CNC unit. Also check the exact function of the emergency switch (described earlier), as it relates to the machine shut down procedure.
EQUIPMENT MAINTENANCE To mainlain a CNC equipment is a professional discipline of its own, In general, it is better to leave any kind of maintenance to qualified technicians. The CNC machine operator should only be concerned with the basic preventive maintenance, just by taking care of the machine in general. Modern control systems require very liule maintenance. usually consisting of the air filter change and similar simple tasks. The manufaclurer of the CNC unit and (he machine manufacturer supply reference manuals. including special ones for maintenance, with their products, 111ese publications should be a compulsory reading for any person involved with maintaining machine tools in working order, electrical. electronic, or mechanicaL Many machine manufacturers, and even dealers, also offer training courses in maintenancc and general troubleshooting,
INTERFACING TO DEVICES and oplimized for for fUTure use or refstored, it must he first and optimized. There program inlo the most lime at the
RS-232C INTERFACE Data transrer uelweell two and controls) requires a number same rules for each device. manufactured by a different company, there must 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 or similar. (known as a port) that is marked 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 0
Tape reader and tape puncher
0
Data cassettes
0
Data cards
0
Bubble cassettes
0
Floppy disks
0
Hard (fixed} disks
0
Removable devices
0
ROM (read-only-memory) devices
0
... and others
are: 51·1 Typical 25-pin RS·232C port· DB type
The RS-232C port on the CNC unit is usually a siandard and uses the DB-2SS Iype (the letter S means it is a type). An eXlernal computer, usually a desktop comtogether with a suitable cabl~ and a comneeded to transfer CNC prouse mainly the DB-25P lype P means it is a pin type). The
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 have in common - a standard called most these ~ 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 To
51
method of communications has to be installed between {he porI. Loading and coosoftware Ihat runs the complele done first. In addition, both devices can 'talk' LO each other.
Later in this a sic principles of with the CNC system. terface - (he used for many years bUI
a few notes relating 10 the bacomputer as an interface a short look at the anginal inpunched lape - as a media used anymore.
machine shops do not use tapes, of any kind. These once tools replaced by (he inexpensive microcomputer and inexpensive communication software. punched tape technology is obsolete nny modern standards, it may justify a short sideline for those who I use it and also for those who are In 'historical' of numerical control.
Media storing
quality, enforced paper. The wide (25.4 mm) and about 900 in a single roll, man most useful descriptions and in Figure 51-2.
PUNCHED TAPE Since the beginning of a punched tape has the part program 1980's, the has been replaced by '-'\..o;:""\.II.J
the late splendor and 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 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.
DATA
1.0000
• Tape Reader and Puncher One of the original facilities for built into the old NC and 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 and can be resolved relatively . is to make all the necessary cmmg':!s CNC umt, then punch oul a new port. The difficulty of this while a built-in was common, a built-in A significant amount to be spent on an external portable tape usually incorporates the lape (eader anyway, duplication.
Figure 51·2
Punched tape detail· basic dimensional standards
tape material for stori proven on the machine.
punched tape is generally avai
in a
though a folded strips version may still be two main purposes: o
To store the program data for use at a
o
To serve as a media for transferring the the control system via a tape reader
data into
INTERFACING TO DEVICES
467
Tape Coding
A punched tape consists of a series of holes, laid across the tape width, where each row represents one character of the progra.m - a character is the smallesl unit of input. The punched characters are transferred through the tape reader to the control system in a fonn of electric signals. Each character can be composed of up \0 eight signals, represented by a unique combination of boles punched across the width of the tape in .1000 (2.54 mm) increments. A character can be any capital letter of the English alphabet, any digit, plus some symbols, such as a decimal point, minus sign, slash, and others. ISO and [fA Tape
format
Whcn preparing the tape, try to understand two methods of standard tape coding - one, which employs the even number of punched holes, and the other, that uses the odd number of punched holes. The technical terms for these two systems are Even Parity, when a character is composed of 2, 4, 6 or 8 punched holes, and Odd Parity, when Ihe character is composed of 1,3,5 or 7 punched holes. There is also coding that is a mixture of the two, called No Parity, that has no application for lhe machi ne tools. For ilIustration of a partial tape coding, see Figure 5J-3.
EIA CODE
ISO CODE
o 7 8 9
8 9
A
A
.0
o
l
B
B
C
C
D
D
E
F
E F
G H I
G H I
Figure 51-3 Tape coding standards Even parity (ISO; on the left, odd parity (EIA) on the right
The even parity formatlSO is also k.nown as the standard DIN 66024 (ISO) or RS-358 (ElA) or ISO code R-840. The odd EIA format is the standard number RS-244-A. Most modern numerical controls. providing they have a will accept either tape coding automatically, based on the pari ly of the firs! end-oj-block character punched on the tape. tflpe render
Parity Check While punchillg a lape, make sUle llialtlie process IS consistent for the whole length of the program tape. Mixing ISO and ErA codes on anyone tape will result in a rejection by the comrol tape reader. Such a fault is normally called a parity errOl: The system check for correct parity is automatically performed by the control unit, when the punched tape is loaded into the CNC memory or processed in a reel-to-reel operalion. The conlrol will check for {he occurrence of odd characters in an ISO tape and (he occurrence of even cha(acters in an ETA tape. The purpose of such a check is to detect malfunction of the punching or reading equipment. which can be very costly if it causes a character of one coding to become a character of the other coding.
Control in and Out On ISO tapes (even format), a pair of punched codes representing 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 comments; they will appear in the hard copy printout, but will not be rrocessed when the tape is read.
Blank Tape Blank tare i~ [he tape purchased and i.<; completely free of any holes. Often, it may be overprinted with directional arrows, to indicate the feeding direction or the top of tape. 1l1e new blank tape is sometimes called a virgin tape. Blank tape can also be one that has only sprocket holes punched but no holes repreSenlJng individual program characters. The sprocket holes are small size holes, located 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. The blank section also provides protection to the coded section when the lape is slored rolled up.
Significant Section Even parity of the punched tape corresponds [0 the International Slaodards Organization coding, called ISO in a common abbreviation, formerly known as the ASCII code (American Stannard Code for Information Interchange). Odd parity is the standard of the Electronic Industries Association, ETA in short, that is slowly on the decline, mostly due 10 the limited number of available characters.
The section of punched tape that contains the program data is often called the Significant data section. Another term used in conjunction with the significant data section is a label skip function. It means that everything up to the first EOB (end-of-block) character, that is punched on the tape 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 Enter key on a compuler keyboard) is the first Occurrence of the end-oF-block characler. This signal identifies the beginning of the signijicQJll data section - section where the actual program is stored. The significant data section is terminated by a stop code, identified usually by a percent sign, acting as the end-oI-file character. When the stop code is read by the reader. tape reading is completed. That is whv no information is ever placed past the percent sign. .I
•
Non~printable Characters
~ost program characters stored on a punched tape will pont normally. They are called the printable characters and include all capitals A to Z, the numerals 0 to 9, and most symbols. Allhough alpha numerical characters are printable, these symbols cannot be printed:
o Stop code in EIA format 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 program data (significant data section) is called a leader, the section following the dara is called a Iralle/: llie suitable lenglh of [he leader or the (rai ler is usually about 10 inches (250 mm) for memory operation (without reels), but should be about 60 inches (1500 mm) when the tape is on reels. For smaller diameter reels, the leader and Irni ler section can be shorter than for large reels. Sometimes the length of the leader section must be exlended to allow space for tape identification. Stickers or bright pencils can be used to supply information aboul (he [ape in ilS leader section.
o
Tab codes
•
Tape Identification
Each punched tape should be identified as \0 its contents. Hand written data, adhesive labels or readable characters can be used within the leader section of the punched tape. Adhesive labels may nol be a good choice because of their tende~cy to peel and fall off. Hand wrillen notes may present dlfficul(y when writing on a black back2fOund. The identification usually contains (he program or i~pe number, drawing number and the pan name - other mformation may also he included. So called readable characters - Figu re 5 J-4 - seem to be the best solution, since they can be generated on the majorIty of tape preparation equipment.
One character appears on the display screen as a semicolon ( ; ). This is a symbol for the end~of-block character and is never written. Ie is a control system representation of the carriage return in the part program.
•
Storage and Handling
Paper tape is punched in a lape puncher. Punchers come with only the basic features. some have advanced features such as keyboard, printer, lape reader, setting switches, 1np~UOUlput'ports, .et.c. Additional equipment, such as a tape wmder, splicer, dlgllallapc viewer, elc., is also available.
Swragc of lapes requires a fair amount of space which increases wilh more tapes. Tapes are normally stored in plastiC boxes, small enough to fit in specially designed metal cabinets wilh dividers. Tapes can be ITansferred inlo computer files to save space and expensive cabinets.
If still using paper lapes, handle them carefully by the edges only. InSist on the same LIcalment by the operator and others. Take a special care for paper tapes, particularly when they are manipulated by winding or unwinding. In order to prevent curling, the tape should never be wound 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 incorrectly. 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
These special characters are actual punched holes representing real characters, namely letters, digits and symbols, rather than lape codes. An end-of-block character or the stop code may nOI be used in the readable section, if Ihat section will go through the tape reader.
The lnpuvOUlput (lJO) pon RS-232C on a CNC machine is used to send and receive dara. The external sources are usually a hard disk or a paper tape. In many shops, programs are transferred through the means of DNC, which means Distrihuted Nl.lmr>rim.l <-nJl.lrol. The control hctS features available (0 make data transfer possible.
INTERFACING TO DEVICES
To communicate between one CNC machine and one computer using the RS-232C port, all equipmenl required is a cable between the two devices and a software. To communicate with two or more machines. using the same single RS-232C porl, each machine must be connecled to a split box with a cable. The split box is available wllh two or more oullets, selectable by a switch. This is the simplest 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 are available at various leve!s of sophistication and cost. Some DNC software also allows a useful feature called 'drip-feeding', which is a method used when the program is too large 10 til into the CNC memory.
TERMINOLOGY OF COMMUNICATIONS Communications have their own terminology. The(e arc many terms, but five terms are commonly used in CNC:
o Baud Rate o
Parity
o
Data Bits
o
Start Bit
o
Stop Bit
•
Baud Rate
Baud rale is the data transmission speed. It is measured as the amount of data bilS per second, written as bps. Baud rales are only available in fixed values. Typical rales for older Fanuc controls arc 50, 100, I ! 0, 200, 300, 600, 1200, 2400,4800 and 9600 bps. Modern controls cun have the baud rate set 10 2400, 4800, 9600, 19200. 38400, 57600 and 76800 bps. In terms of time, lhe higher the rate, the faster the transmission. Single data bil transfer rate will be the result of one divided by {he baud rale:
IE't'
where ... Sb B
::=
=
Time required to transfer a single bit in seconds Baud rate in seconds
A single bit lransferred at 300 bps will take 0.03333 of a second, but a single bil transferred at 2400 bps will lake only 0.00042 of a second. In practice, it takes about 10 bits \0 transfer one character (see SlOP Bits section below), so at 2400 bps selling, the transmission will be at a rate of about 240 cps (characters per second). 4800 bps is a good selling once everything is working well. Higher sCHings are necessary for 'drip-feed' methods.
469
• Parity Parif)." is a method or checking thal all lranSmilled data were sent correctly, Just imagine what would happen if some characters or of a CNC program \Ilcre not transferred correctly or not transferred m all. can be even, odd, or none, and even is the most common ~e)ecllon for CNC communications.
•
Data Bits
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 digit can have a value of either one (I) or zero (0). One and zero represenl [he ON and OFF status respectively. so a bit is something like a toggle switch that can be turned on and off as needed. In the computer. every letter, digit, and symbol used in the CNC program is represented by a series of bilS, eighl bits to be precise, that create a unit called a byte.
• Start and Stop Bits To prevent loss of data during communication, each byte is preceded by a special bil calJed the start bil, which is low in voltage level signal. This signal is senlto the dala receiving device and informs it that a byte of dala is coming next. A bil 5i mi lar 10 the start bit, but at the end of the byle, has exactly the opposite meaning. It sends a signal,to the receiving device [hal the byte hilS ended or stopped being transmitted. This bil at the end of a byte is called the stop bit. Because the star! and SlOp bits go together, they are often teamed up together as the SlOp bits and set the devices to nlio slap bits. Many lerms exist in communications. With growing interest. this is a very rich field to study.
DATA SETTING 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 defaulL Typical software selling is done through the configuralion al the computer end and lhrough the CNC system p8rameters at the CNC end. Settings at both ends mUSl march. Typical Fanuc settings are: o
4800 bps baud rate
o
Even parity
D
7 data bits (seven data bits)
o
2 stop bits (two stop bits)
Proper connection depends mainly on the configuration of the connecting data cables.
470
51
CONNECTING CABLES 1 most common
for communication a and grounded small wires (at least eight),
a computer is a shielded
plastic sleeve. The purpose of is to com~eCl the CNC pon with the computer port (usually 25 cable. Always use a cacan reach farther dischoice to withstand interfer-
SIGNAL GROUND
..
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 cable have to be at each end. It between each end. num-
same end of the
• Null A very common is in general commUnications 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 conpopular method figuration in a graphic way. This, is a showing cable configurations.
PIN DB-25P
1 3 2 5 4 7
As the most common communication will be between a Fanuc control and a computer or a laptop, Figure 5] -7 illustrates a Iypical configura£ion. Note the similarity Lo the null configuralion.
Typical cable configuration for Fanuc controls Regardless of what cable good communicalion software arion is also needed.
6 and 8 Figure 51-5 Null modem pin connections
• Cabling for Fanuc and PC
Figure 51-7
_ _
20
modem connections
0
1 2 3 4 5 7 mm"~_m
mnm.<:;I~rm;ltJ()11 Df null
specially designed for
6
8
MATH IN CNC PROGRAMMING Math in programming - the
pears to be so powerful that it In many programmers, it is manual programmers in numerous calculations is really not look very briefly of mathematical knowledge is really necesto handle typical calculations for manprogram preparation. the basic arithmetic
addition, subtracrion, mulriplication and division - are at the core of any
mathematical activity. Going a bit of common algebraic functions is roots and powers of a nllmbe/:
knowledge
mamly
CNC lionship of points within a system
rela-
a good knowledge of The scope of this many principles of angles, the subsets, tapers, polygons, an the pi constant (IT), and other topof planes and axial orientations is important in many cases as well. Without a doubt, the most important part of
one that absolutely must be mastered, is the
specific mathematical subjects to All of them have been selected only in CNC programming ana are clen the necessary detail.
BASIC ELEMENTS •
The subject
a
.:>VJ\,.llJ'VJ
in solving trigonometric are ability [0 use a speclf'ic formula and - but in the inability to see the to place. Often, programming i IS very complex in terms of geometrical nitions of Such a drawing will have so ments, that overlooking the obvious is possible, even of analytic and spacial "to>l"\.n,;>, for a 2 and 2-1/2 ax is work, but it is es-
manipulation.
Addition
o Subtraction o
Multiplication
o
Division
Algebra is an dling numbers in terms usage will involve: o
arithmetic and deals with hanequations and formulas. Typical
Square roots
o Powers of a number o
Trigonometric functions
o
Solving formulas and
o
Variable data
axes, particularly multi surface machining or surthis kind of programming is
a computer and CAD/CAM software.
CI.!IH:HILII
In one or two unknown equations, unknown to achieve the desired result
•
not done
or
involving the
ni>r,rn"fr\l
angle triangles, using lrif!,onometric functions. Very there will be a problem or calculat'ion that will rea solution using oblique triangles, although problems
in all
Arithmetic and Algebra
known values various formulas solved (calculated)
Order of Calculations
In [he fieJd of mathematics, is a precisely defined order in which the calculations are Every elecl"l'>\'\nll',,,,,e- old rules, rna tronic calculaLor is based on combination of various algebraic the order
or
calculalions will follow o
Multiplications and divisions are
o
Additions and subtractions follow,
"'''"..." ",.",\.1 first is not important
o Any roots, powers to a number, and """"..+i""" parentheses are always calculated and divisions.
following caJculalion will or wichout parentheses:
same result with
471
472
Chapter 52
• Circle
3 + g x 2 '" 3 + (8 x :2) = 19
The multiplication is always performed tirst, regardless of whether it is enclosed in parenlheses or no!. If addiuon must be done first, it mllst be enclosed wi thin parent heses:
Circle is mathematical curve, where every point on the curve has the same distance from a fixed point. This fixed 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
These two examples show lhat an innocenlly looking small omission may have significant consequences.
D
CENTER - is a point from which a circle or an arc is drawn with a given radius.
D
RADIUS (radii in plural) - is a line from the center to any point on the circumference of the circle,
D
DIAMETER - is a line through the center between two points on the circumference of the circle,
D
CHORD - is II straight linc joining any two points on the circumference of the circle.
D
ARC - is any part of the circle between two points on the circumference of the circle.
D
CIRCUMFERENCE - is the length of the circle
GEOMETRY For all practical purposes, there are only three entities in the engineering drawing: D
Points
D
lines
D
Circles and Arcs
(length of the line that bounds a circle)
Points have no parts and are represented by the XY coordinates in a 20 plane or by XYZ coordinates in 3D space. Points are also created by an intersection of two lines, two circles or arcs, and a line and a circle or arc.
D
Point is also created by a line tangent to a circle, line Lan-
D
Lines are straight connections between two points creating the shortest distance between the points.
SECANT - is a straight line that passes through
a circle and divides it into two sections.
genl to an are, a circle or an arc tangentlo another circle or
an arc.
TANGENT - is a point where a line, an arc or another circle touches the circumference of the circle but does not cross it. This point is known as the point of tangency.
Two area sections of a circle have their own names. They are called the sector and the segment of a circle, and are 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 complex for manual programming, although they are also based on the same fundamental elements.
'r-ARC
1
CENTER \\
\
\
~... ~.. ~L!!S!§ ~
~~
Figure 52-2
Segment and sector of a circle D
SECTOR - is an area within a circle formed by two radii and the arc they intercept
D
SEGMENT - is an area within a circle formed by the chord and its arc
SECANT
Figure 52-1 Basic elements of a circle
Neither the sector nor the segment of a circle play any signiticant role in CNC programrnmg.
MATH IN CNC PROGRAMMING
473
•
• PI PI is a in mathematics to represent the ratio of Ihe to the circle diameter. lIs symbol is 1[, it is pronounced 'pie'. and has Ihe value of and regardless of how many decimal it will always only an approxprogramming purposes, use the value by a calculalor or computer, usually with six 10 1n both cases, the internal value is a lot more accurate (han the displayed value. In many cases, ihe 3. J4 IS sufficient for most resulls.
•
by the system of Chapter 4. where lhe There are four numerals
along the
Y+
=+
II
Circumference of a Circle a circle - or its circumference - is seldom and is included bere only to enIt can be calculated from the
o~
-
X+
III (::::2
rrxr
QUADRANT (4)
or
52·3 IGf
QUiJdmllts of iJ circle ond the mathematicol definition of direction
where ... C 11
;;;;;;
(
::::
o =
quadrant is exactly 90°, crossing at circle Therefore, a circle has the sum of all to 360°. Angles are counted positive, starling from zero degrees (0°).
Circle circumference Constant 3,141592654 .. , Circle (ad ius Circle diameter
• length of Arc length or an arc is also a rare requirement calculated from [he followIng formula:
can
Individual quadrant points (also known as points) are onen compared to a hand direClion on of an analogue clock or as a direction 0° is arbitrarily located a£ the equivalcm o'clock or East direction, at 120 'clock or direcand 2700 at 6 lion, 180° at 9 o'clock or o'clock or South direction -
90° ~
North
where ...
C 11
:::
r A
=
Circle Constant 3. 141 Circle radius Arc angle
A
180" = West
There are two other very to a circle. They are used in nrrHTr
1 0" = East \
\
c
D
Figure 52-4
Angles and an the face
- 0" is Eost direcrion or 3 o'clock direction 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 the hexagon) has a single angle of 120°:
Figure 52·5
as
Sum of angles in 8 polvgon
from
The sum of all angles in a polygon can the following rormula:
5 = (NI@"
S
x 180
Sum of the angles Number of sides in the polygon
=
For example, a five sided polygon
(6 - 2) x 180 / 6 120<>
polygon is quile often defi ned by the number of and its cenLer, located within an inscribed or cirUTIJ);V'11 circle. Figure 52-6 above illustrates the coninscribed and circumscribed polygon, as it applies La a hexagon.
where ..
N
A A
in
regular polygons may have virtually unlimited sides, some polygons arc so common litat they have a special descriptive mathematical name:
lion has the lotal sum of angles: S
=
Number of
Common name
(5 - 2) x 190
S = 540
0
3
Triangle
n
n-gon
There are several different polygons used in geometry, but only onc special kind is of imerest to CNC programming. 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/glesA single angle II) from (his formula:
A
il
regular polygon can be calculated
(N
2) x 180 N
n::;,r where ...
A N
Single Number
MATH IN CNC PROGRAMMING
475 ption varies between example, AMER NATL (American National Standard Taper taper
F---'
C=Fx{2
c
/
F=Cx FI 2xS
F --1
tiLt":>,JV
s -'~~"_
_
_~R"
F F
Cx 8 I tan30°
8 8
F x n30° C 12
•
Most o
-,S
a
in
two common
One diameter and length with taper description or note
_~_
o
== F / =-8/
,
Taper Definition
Diameter at both
and the length with taper
description or note
If a single diameter is
F==Cx F = 8/
52·7
The most common regular polygons· square, hexagDn and octagon
il is onen the larger one.
is a note wilh an arrow pOintThe description ing La Lhe Laper. measurements, the noLe may identify a standard or a per foot (TPF). In melthe taper is always a 52·8 [lnel 52-9 <;how the differences between the LWO which is only wilhln the taper identification.
are three most common polygonsa 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
Hexagon orientation can be with the hexagon orientation in
on the
D
III
7.
TAPERS
L are virtually confined to the lathe Infrequently, tapers also in Aillapers in this section relate to the (so called circular tapers), but can The main purpose of tapers is to assembled parts. By definition,
Figure 52·8
Circular raper - English description
1 X
D standards and are used for small as a Morse taper or a Brown and there standard tapered machine lOol holder tapers, etc. In most cases, the taper is normally by the large end diameter, its length a note descdbing the laper.
-.---. -.-- L
52·9
Circular taper· Metric description
476
52
the Figure 52-8, showing J<..,UF,"''''" the following meamng: I!:i"
method, the
• Taper Calculations· English Units rlr::l'wlrlo
Dimensions ... 0 d L
X
dimensions in Figure data. If the
but we want to help. To d and L are known:
"" Diameter at the large end in inches :::: Diameter at the small end in inches ;:: Length of taper in inches ;:: Taper per foot in inches ;:: Ratio value 1 : X let-
To calculate the small diameter d, with D, Land D d
L
X All
•
Diameter atthe large end in millimeters Diameter at the small end in millimeters Le ng1h of taper in millimeters Ratio value 1 : X
To calculate the
>
D, with d, Land TPF :
in this section use
Per Foot foot is defmed as: ifD, d, and TPF are known:
To calculate the 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""... ,
Missing culated from the tio is normally
• Taper Ratio Metric
• Taper Calculations - Metric Units
of a taper is similar:
~"""rH,.n
of a taper is the ratio:
The ratio 1 : X means that over the length of X mm, the cone (ei ther as an increase or as diameter 0 f a decrease) by 1 mm.
To calculate
may system., the taper racan be calculated.
small
d, with D, L and X:
To calculate the large diameter D, with d, L
the length L, ifD, d,
as I : 5 will increase 1 mm X (if unknown),
,.. ..,..... .",.. as the difference in width
are
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, although nOI always of the same length. There is a number of differenttriangl~
B
in geometry, but only a handful arc used
A + 8 + C == 180
in everyday CNC programming.
0
Figure 52-11
• Types of Angles and Triangles
Sum of All angles in
The main groups of triangles can be grouped together by their angles - Figure 52-l0.
A < 90° B < 90° C == 90°
a
A
b
(I
trhw!Jlp. i.<; fllWfJ ys 180 degrees
The oblique triangle - and its close cousin [he Iso.lceles triangle - are types of triangles seldom ever needed in rrogrammillg. However unlikely, it is always possible. These triangles can he solved only if alieasl tbree dimensions are known, and one of them must always be a side:
o
One side and two angles must be known
o
Two sides and the angle opposite one ofthem
o
Two sides and the included angle
o
Three sides
Isosceles triangle has two sides of equal length. Each side - or leg - is joined by a line ealled the basco The two angles at the base are always equal - Figure 52-12.
a
b
IF a == b
N A =B
c Figure 52-10
A
Typical triangles (a) Right triangle (b) Acute triangle fe} Obtuse triangle
Some more derailed definilions may be useful:
o
RIGHT angle means that the given angle is equal to 90°
o ACUTE angle means that the given angle is greater than Dc and smaller than 90°
o
OBTUSE angle means that the given angle is greater than 90° and smaller than 180 0
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.
o
An obtuse triangle is also called an obtuse angle triangle. It defines a triangle that has one obtuse angle.
Figure 52-12
Isosceles triangle
A triangle that has all sides of equal lenglh is called an eqllilalerallriangle. An equilateral (riangle is also always an equiangular lnangle, because allmlernal angles are the same - each angle IS 60° - Figure 52-}3.
A
In addition, Ihere is also an oblique angle, which is nOI a new Iype of an angle, just a new detinition: o
OBLIQUE angle ean be either an acute or an obtuse angle, which means it cannot be 90° or 180 0
AI! triangles share a single feature - Ihe sum of all angles in a given triangle is always equal [0 180 0 - Figure 52-11.
a
c
C b
a
== b
=c
figure 52-13 EquiJateraltriangle
A = B
=C =60
0
• Right Triangles
An
Triangle - or a right angle rriangle is triangle that 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 matherelationships thal form of is a look at those that are important in
A
/
A a right triangle (hal is opposite
right angle side the illustration
hypotenuse and is also the
othertwo sides are called legs. shows a righllriangle, where C right (90°) and the side c is the hypotenuse. have a low case identification correopposite (0 sponding to described in capital
B
c
, as
in a semicircle is Line AB is the
B D::: DIAMETER
Figure 52·16 Inscribed angle in a semi-circle
point A to the center of cir~ tangency of the circle will The angle a is created beAB is a bisector of The two angles al ABD are idenlical.
In Figure 7 is a de B. A line from create either a poim (ween lines AC and the angle a! and a2 as well as
a
c
A 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
a o
b
of one triangle are the same of the other triangle 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
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
Y
H
=
~ L...:.-_ _ _. . -_ _
H
«~
~---------~««««««««««««««««««««««----
---~~
H Y1 X2
~----
52·18 ««««««<·----w
----------~
Similar triangles - 1
illustration in Figure shows the relationship same also between two triangles. shows important dimensions:
l
=
Original
H == Original height A Xl
;;;;;;
:=
Yl
=
Yl =
52-19 triangles· 2
Common (shared) angle Front clearance ill the X axis Back clearance in the X axis Front clearance in the Y axis Back clearance in the Y axis
Figure shows the same two triangles in a simplified way. upper illustration, X and Yare swns of the (clearances)
With lmown values can be If U is isolated on left and knO\vn values on the right of the equatioll, the calculation is simple:
u == (2.250 U
x
= 0.6428571
0.500) / 1.750
• Sine· Cosine - Tangent relationships
x
n+X2
Y ::::: Yl + Y2
The shows the the opposite sides H to the adjacent formula of the relationship is:
H U
==
side (b)
L W
of the are known two, the lillvalue can be "'''"••.41.... using a new formula. For example, 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
a
b
c
If
sinB
rml\,v,mol"I"
b
c
a
= c
functions· sine, cosine, and
tan A
= =
b a
This has its own as a ratio of sides, using the sine, tions angle. Other cotangent, secant and cosecant are
and is deflned tangent funcfunctions, namely not used in
CNe o
of an abbreviated as - is a ratio of side the angle to hypotenuse of the triangle
""r'/'I",,'to
o
designation to
oar where ...
- abbreviated as cos is a ratio of side angle to hypotenuse of the triangle
",rI",,,,,,.,t to
o
TIle following fonnula converts
Tangent of an
- abbreviated as
DD D
tan is a ratio 01 side
M S
the acute angle to the side •
Most pocket sin, cos and tan ondary
If ."
sinA : : : a
Then
A
Or.
A =
If ."
cosA :: b / c A = arccos(b / c) (b / c) A =
71u.m ...
Or ...
:=
I c
arcsin
I c)
tanA = a / b
Then ...
A ::::
Degrees and
64 + (48 /
.. isequivalenl fo: 60) + (27
I
64.8075"
3600)
The abbreviations DMSID-M-S monly on scientific useful COD... HO.U:t;.'- decimal to DMS. It is not programming, to perform a to verify that the converted result is calculation of DD to is nothing more than isolating the fractional part number in three 0 v~ • .u"'J'~' in order to convert 29.545021 to delllre:s-s;ec!::mc]s [annat, are necessary.
29.545021
SIXty,
to
0.545021 x 60
result for each mj;1~Onometnlc results for the value of 0.7071 135".
Degrees
Another type of calculation in prograrnming is conof angles. It to a drawing using minutes and to describe the of angular quired. There are two dimensioning drawing. The older and method is the angle DMS or D-M-S, means modem methods are use DD or D-D) which means decimal degrees. calculations of convened to DD.
amount from
0.545021 = 29°
The seconds ply it by
/ b) arctan (a / b) A =
VVhile there IS only a function, there could For example, of 4Y', as well as
64"48 '27"
The [lIst the decimal "'"J';..t'-'''--'
/ c)
If
•
Seconds
Inverse Trigonometric Functions
value tangent is two sides, The depends on this is the of an inverse crigonometric function. An inverse function is sometimes symbolized with the word arc, the normal function. example the angle whose ratio of arcsin of an the side a to hypotenuse c.
Or ..
Decimal degrees
is to take the decimal portion and multithe minutes:
= 31.701126
~
32'
is to take the ~_"'UU''''L multiply it by sixty to 0.701126 x 60
= 42"
The final OMS value of the example will with <1 slight error.
•
Pythagorean Theorem
TIle well kno'Arn ciauPythagoras (6th
thagorean
29°32'42",
MATH IN
PROGRAMMING
I'II"£lrPJrn
1 ~ Example ...
is used in programming to fmd triangle, if two other are
If the length of hypotenuse C [5 3 units is units, the side a can be
calculation
b
squared is 9.0, b squared is 7.5625, so
/
= V(3 = V(9
a
Area:::: c
x 3 - 2.75 x 2.7S}
a - 7.5625) = Yl.4375 a '" 1.1989579
2
roo!.
.. Solving Right Triangles
Area
solutions of Theorem or any other method are conunon methods use the cos functions, As always, start with nom etry, any triangle can MO data sources is 2
Area:::: b
o
Two sides of a right
a
One side and one
In trigoproviding one of the
of a right triangle
never used in cakulasolutions. If use both methods
52-21 Pythagorean Theorem
ale
:::
sinA ::: cosB
b/c
:::
cosA ::: sinB
alb
:::
rlnl'\nr\m~'fnl
. S me
Opposite Hypotenuse
=: .,--:...:.....--
a tanA
Relationships
cotS
:::
Adjacent
Cosine == .,---'---
b
b/a
= cotA
HypoLenuse
tanB
:::
TOA a == c x sinA
b
::;
c x
a ::: C x cosS
b
:::
c
x sinB
C :::
a I
c
a
Tangent::: --'-'--AdJacent
I ~p'
\:.J
a ::: b x tanA
b
a
b :::: a / lanA
== b /
b:=
a A ::: 90"
:::
B
:::
a x tanB
c ::: b I
c
\{7T
Figure 52·22 Trigonometric functions "",m"",,, for solving right angle triangles
Sin ::::
Cos
c - a
90" - A
b I cosA
C
p
-h
=
Tan:::: -
b
h
P b
...... ...... ......
......
-......
Peter Has
Broken His So!1!e
482
52
ADVANCED CALCULATIONS
CONCLUSION
The last two charts show fonnulas for chord C or the tangent T of a circle. las can be used as well, but the formulas can calculations faster. With only one excepnon. solutions, dependent on the available can also calculate the radius R angle A and Calculations relative to the chord a circle are Figure 52-23. Calculations relative to the cangeIlt de are shown mFigure 52-24.
In this chapter, only the most important and "nT'''''''''''''''''' used mathematical subjects more solutions and shortcuts are operators every day, showmg their mg:enlll math problems. Author will ~n1"1,rprlc:1t." cut or a solution to any programming and will corlSlclere:(1 for the next edition of this handbook.
c
d
--+2 x2xR
CHORD
sina x 2
xR
(1
d
R-d
2x
R
X
R-
2
circle· calculations of chord, radius and deviation
a :::
(
-1)xR
tan- 1 _ T_X2
2x Figure 52-24 TANGENT of a circle
cosa
2x
angle and deviations
-1 COS - -
CNC AND CAD/CAM Up to this point, all topics related to manual programming of CNC machines - all fifty-two chapters. In the last ch.apte!. we look briefly at an area where manual programming IS replaced by a computer, a suitable software and some additional skills. Notc the word additional. Studying the handbook has certai nly nol been a was Ie of time. On the contrary - the handbook covers subjects that every CNC programmer should know, regardless of the programming method used. Programming with a computer 1$ always desirable but to know the basic skills is the most important prerequisite. The basic skills are in understanding the manual process. All subjects and methods learned do not have to be applied by a pencil and paper. They could be applied by a CAD/CAM - or just CAM - programming. A simple statement may summarize it all: Top class programming using CAM software requires solid knowledge of manual programming methods.
PROGRAMMING MANUAllY? In the area of CNC programming application techniques, computers at all levels, from a personal computer to workstations arc ~apable 10 produce most CNC machine programs ln a tlme much shorter than any manual programming method. So, why is the high importance of manual programming methods so emphasized? Is [he manual progrnmming still alive, find if so, how healthy is it? There are at least I wo important reasons why manual programming for CNC machines it is nol dead yet and will nol disappear anytime soon. The tirst reason is thal in manual programming, the programmer is able 10 do what computers cannot - and never will be - programmers can think. Manual programming teaches the invaluable lessons of discipline - a very important qual ity of a professional CNC programmer. Discipline means to concentrate, to constantly evaluate, to make deCIsions - to think all the time. In manual programming, there lS a to[al, absolute and unequivocal control over the final product - the pari program. Only a programmer can evaluate a given situation, analyze the problem and adapt to unforeseen circumstances. Only a programmer can feel that something may not be right. Only people usc instruments known as thinking process. intelligence, instinct, gUl feel, common sense and experience. Those are instruments in~erent to humans, not computers. CNC programming is like [he work of an artist - it can never be fully autoniated.
•
CAM Software
Current CNC software, commonly known as CAM soft-
ware, has many features thuttranslate into a CNC program, corresponding to individual ideas of how the part program should be wrilLen. II can produce a program closely match1I1g a particular direction of thinking, closely matching a particular programming style. But dosely does not always meall close enough. Here comes the second reason.
The second reason is (hat when programming manually, the programmer understands the programming process and the resulting output. A program generated by a computer has to be in the format compatible with the CNC machme and its control system. If ali goes well, there is no need to 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 there is a problem - what then? Going back to the computer and reprogram the part may solve the problem on hand. The question is at what price. Ability to read Lhe CNC program code, to really understand it, also means the abilily 10 change it. Spendmg a valuable computer time jusL to add a forgotten coolant function seems excessive. Would it not be better. just to edit the program by addincr0 M08 function in the ngh[ place? Although the example is oversimplified, it also shows tha~ real understanding of the programming process lS very Important. The besl way to understand the process is to bypass the computer and get the same results. That can be achieved with manual programming. It wo~ld be unfair La compare or promote manual programmmg agamst compuler programming and vice versa. What . is necessary to promote is the knowledve and undcrD srandmg of manual programming principles. Without such knowledge, one can not become a good CNC programmer. Most of the CNC programming can be done quite well on personal computers. The existing technology is prooressing very rapidly and many 2D and 3D programming ~ppl ications are available for a fraction of the cost when compared to just a few years ago. This trend will continue well into the future.
•
Desktop Computer Programming
The complete computer system - [hat means the hardware, s.ofLware and peripherals - suitable for CNC programming lS challgmg at such a rapid pace that any Indepth dISCUSSIon of the hardware would be obsolete in a rna(ter of weeks. Almost the same speed of obsolescence applies to software as well. New features, new capabilities,
483
484
Chapter 53
new tools arc
mi:\rket and are ofand software is whatlo
Such a decision !'nust
on the reqllirt>d applicnWhat kind of What results
lion. What will the work needs to be computerized, arc expected? These are the primwJI the kind of monitor or printer or They fifE' (llso ve.ry importanl - hUI only the application needs.
Tool path geometry creation environment
o
Tool path generation
o
Complete programming environment
o
Post processing
o
Training and technical support
CNC machines and practices. This rather narrowly focused 'l",,,·"·~rM always successful. Consider future plans m both and capital investment. Whal about the product? win the produci change In five years? Knowing the philosophy and focus of Ihe company, its policies and and yes - even its politics will help to make a more accurate estimate of fulure needs. 0''''1''''''",
It is important to understand why ponanL Before investing inlo a technology tlally new co the user, it helps to know what ware offers and how rhey can be used in
TOOL PATH GEOMETRY DEVELOPMENT Most CNC programming systems require a tool path omeuy creation before the actual palh of a cUlling tool can The key words here are tool path A common misconception among programmers to re-create everything in the original drawing. That
The key requirement of a CNC program of an accurate 1001 path for a chine. The 1001 path crealion, with all ils most lime consuming task In manual makes sense 10 make it the most when planning 10 aUiomale the cess. Only high level CNC a of (001 pa£hs. For example, helical milling or a full chining are not always in the One mlslake in software
Certain programming applications are chine shops. Others are unique to a factoring and the kind of work or tured. The following shalt list that a typical computer should have: o
TOOL PATH GENERATION
IS
a wrong approach must When il comes to 1001 path geometry, two 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 B new is created or an eXisting modi
computer technology has grown a lot, yet it is so new (hat it is in the slale of constant development. Nobody can wilh absolure accuracy whalthe future will offer ill terms of CNC machining and CNC programming. If current and the future needs are well established before ng a programming system, there is a good to beat obsolescence for a long time. CNC opcrs offer periodical updales to their product, wilh more added as computing power increases. The updates (new versions of the software), usually reflect ments the technology, bmh on the hardware and software It not mean purchasing every new update but it is IlnpOlianl to select a CNC develby a solid and well established company lhal 1'1'1""",;;. 10 he still in existence when the need (0 comes up. The computer industry is very acquisitions and takeovers are as common as and
COMPLETE
modules what is normally nOl not on a two dimensional represendepth, separaling enlilie~ by c 1earanccs or a special tool motion, and so 011.
RONMENT
programming software aland relating tasks [0 be done from a 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 Ii that are nol accessible fTom a menu, or
they do not cover all the
The following some of main on personal from any CAM
in programming.
is meant only as a very brief guide 10 that apply to CNC programming are the expected features
CNC
CAD/CAM
485
o
Multi machine support (machining centers,
o
Associative operations tor flexible editing
o
setup
EOM)
When a tool path is ously defined lool paLh not unusual to
material blank definition
list and job comments {setup sheets)
o
text editor {with CNC oriented
o
Printing capabilities (text and graphics)
o
the creal Ion oj' " new Associative operation patn, it it automatically. It IS fast and accurate. f1 works
be
Interlace with CAD software (DXF,
o o
Support for solid modeling
CADL,
• Job lob
... )
specifications and features (including customizable post processing}
o
Support for generally available hardware
o
Utilities and special features, open
can
speeds and reeds can job setup, as well as various
parameters. lhal store com mon data for terial~ and operalions are also powerful sort ware AI-
a not mean Ihar all items are requITe an additional plotter, cabling,
Multi Machine Support
When it comes LO suppor! of di CNC software can be divided inlo lwo o
Dedicated software
o
Integrated software
The rit'riirflfr>.d
chines. For example, a [0
produce
can not be used
machine Lypes.
only one kind of mais designed specil-Iequipment, cenlers or EDM.
Dedicated software is and very specialized to a particular mach
use Ihe son ware
ser cutters, the preferred Another reason software, (hal is used to one play ror a menus look
• Tooling
and Job Comments is a process covering sev(:ral manually or with a tools is a manual task. Once identifications, speed and can be grouped into a the of then usage within pans require more than one maComplex setups require
machine operalor (setup sheet), intents. All thc~e programming must and lhe documentation sent oul to chine shop. It is only reasonable LO expect that programming software will support a looling ina form of a tool library file and \he n,-r.E',."", library tile is also very usefu l, as it can store surface speeds many materials and the programmi software will calthe exact spindle speed based on the . This lS f\ good or In!eraClion beand
press brake equipment The integrated of several lypes of offers milling,
the lJ:ro onglll,
::'fl'mr.>I'TI
described item will though all items are useful
cally
way as weI! - many tooling on demand.
plotting (plotters)
o
•
it is aLlachcd to the previreasons. it is laler. The Il"avendors then recrt'ille the tool path.
ditional method slill is) \0 recreate the
o
o
• Associative Operations
• Connection Between allows the programmer lools, Such a selection usually
EDM.ll is also common 10 such as burners, routers, laFor metal cutting, this is
A programming system should lcommunicillions option) between and the. CNC machine. This
data exchange via a cable. computer to the memory
or
An important point is that not all machines have the ity [0 lake advantage of direct in the shop have this connection. nnd bililY, it In harmony. The exisdiscipline to software is J lL~nn; a direct connection in a after the purchase. must. even if it is nOI used
486 •
Chapter 53
Program Text Editor
•
Pen Plotting
A CNC program generated by the software should be 100% complete and ready for use by the machine. The implicalion is lhat such a program is so perfect that it needs T\O fUt1her editing. This is the ideal way, the way it should happen. If a change in the program is needed, it should be done wiThin the design of Ihe part shape and that means through the CNC software - 1101 aU/side of it. The reason is that any manual change \0 the genemled program does nol correspond to the program dala as generated by [he computer. In the environment where the data is shared by many users, such n practice will cause a 101 of problems.
Pen plOI will usually produce image quality superior to the printer plot but for a CAM programming it is an unnecessary luxury.1l1c only lime when a pen plotter can be beneficial is for plotting 10 paper size that is not supported by standard printers. Other reasons wi II be the need for a color outpUI, a special requirement by customers, or special documentation development. Before tbe graphics software appeared on the markel, plotters were widely used to verify the lOol path. Now, the [001 path is verified directly on the computer display screen, during interactive programming process, including different views and zooms.
That brings up a question - why does a CNC software have a built-in lexl editor? There are two reasons. One, the edilor can be use.d for creating ur mOLlifying various lexl tiles such as selup sheets, tooling sheets, operation dala, post processor templates. con figuration fi les, special i nstructions, procedures, ctc. These liles can be updated and otherwise modified as required, withoul a damage to the progranl dalauase. The second reason is !hal ill some special circumstances, a CNC program can be edited outside of the computer model, providing [he change docs not modify significant data. For example, to add a missing coolanl function M08 to the part program is much faster done in the text editor, Ulan repealing the program generating process with the computer. Purists are right, it is not the right way of using the text editor, but al Icast the significant dala (loollocalions) are not tampered with and the database is otherwise completely accurate.
Most plotters are HPGL compatible. HPGL is an acronym for Hewlett-Packard Graphics Language, and is currently tlie 1110:>t sUPPorled plot file exchange formal.
Many programmers use various external lext editors or even word processors in text mode. These types of editors are not oriented towards the CNC programming, since they lack some features typical to lhe CNC program development Only a CNC oriented text editors can handle automatic block number sequencing, removing the block numhers, adding cosmetic spaces in the program and other functions. The editor should be accessible from the main menu or from within the software.
•
Printing Capabilities
Any text saved into a file, CNC programs included, can be printed using a standard printer. The paper copy is often necessary as a reference for the CNC operator, for stored documentation, or just for convenience. The printer does not need to be top of the I ine, just One wilh a standard paper width. Some programming software supports an option thal is known as a printer plot or a hard copy. Hard copy is a graphic image of the screen transferred to the printer. The image quality is usually mOre than adequate. 1111$ hard copy is an excellent aid during program development stage. Betrer quality printer provides better qualilY print plot. The printer support is provided by the Windows environment, as most PC based CAM soflware is developed for the Windows operaling system.
•
CAD Software Access
If an engineering drawing is generated by a CAD software, all drawing 1nformation is stored ina computer database. This database can be accessed by several programming software packages, through a me format translalion ulility (more on the subject later). Once the CNC soflware accepted and processed the database from the CAD system, the CNC programmer can concentrate on generation of the lool path itself, rather than defining the tool path geometry from scratch. Some modifications are usually necessary, so expect them. The most significant advancage of a quality CAD/CAM system is the avoidance of duplication. Without CAD ~y.<;tem, the CNC programmer has a 101 of cxrra work to do, much of ir is duplicated.
A high quality CNC software also allows the existing program file to be Iranslated the other way, 10 a file that a CAD system can accept. This op6on is called reversed processing, and can be a bene/if to companies that want to translate existing programs generated manually to an electronic form. Usually some additional work is required in these cases. High level CNC software is a stand alone type. Stand alone software means that it does not need an access to a CAD system - the 1001 path geometry and the tool path itself can be developed from within the CAM software, independenlly of other software.
• Support for Solids Solid modeling for 3D applications had been for a long time the domain of large computer systems. With the advance of powerful microcomputers, solid modeling is now part of high level CNC software. With solid models, the machining process of complex surfaces is much more streamlined. In addition, solid models offer the benefits of supplying engineering data, easier manipUlation of objects, and many other features.
CNC AND CAD/CAM
487
• Software Specifications Another benefit of a high level CNC software is that it comes well supplied with a variety of useful features. What makes each system unique, is usually the method of how the programming process is executed. In the early years of development, programming was done by using special programming languages, such as APT'"")\ ( or Compact IfTM. Some languages are still available but heavily on the decline. Modern interactive graphics programming has virtually eliminated the need for languages in just about all manufacturing lields. The more popular kind of programming is based on interactive graphics. The programmer defines geometry. typically as the tool path geometry, followed by the tool path itself. Any error in the process is immediately displayed on the graphic screen and can be corrected before too much other work is done.
• Hardware Specifications SpecifIcation oflhe software will determine the hardware selection. Hardware is a common term for the computer, monitor, keyboard, printer. modem, ploHer, mouse, scanner, disk drive, storage media, CD writer, and many others. The hardware refelTed to in this chapter is based on the Windows™ operating systems. Modern operating systems are based on a graphical user imeljace (CUI). Some software can run under a different operating system, for example Unix (used mainly by workstations) or different Windows versJOns. It is always 10 the advantage of the user thal the latest version of the operating system and the CAM soft ware is i Iistalled all the com puler. When th inking of purchasi ng a computer hardware, consider carefully at least three major criteria: o
Performance
.,' computer speed
o
Data storage
.,. type and size
o
Input / Output
... ports
Computer Speed
PeJj"ormance of (he compucer system is typically measured by the relative speed of the main processor. The higher the number, the faster the computer can process data. To make the comparison easier, !he original IBM PC mode! year 1983, had a 4.77Mhz processor speed. Later model AT had 6mhz processor speed, improved further to 8 and I OMhz. Later, computers used the so called 386 microchip (general1y Intel 80386 or 80486) and reached 25Mhz, 33Mhz and more. Pentium processors followed, and the process is ongoing. Chips in thousand plus MHZ speed are a reality. For serious CAD/CAM work, the latest fully featured processors should be used. Newest processors offer much higher processing speed, and the more processing speed is available, the better performance of the CNC programming system.
RAM and Data Storage
Data is stored in [he computer in two forms - memory storage and disk storage (file). When an application such as CNC programming is started, the CAM software is loaded into the computer memory. The more powerful [he applica[ion software, the more memory it requires.TIlis memory is known as Random Access Memol}!, usually called RAM. Every software specification identities the minimum available RAM required. RAM of today hIgh level computers arounr! the gigabyte range is not uncommon. Any extrC1 memory will speed up processing quite significantly. The data in the RAM is volatile, which means the data is lost when the application is ended or the computer power is interrupted. To save important data from RAM into disk files, a hard disk or similar media can he user!. For a micro computer CAD/CAM work. the absolute minimum requirement is high density removable drive and one large size hard drive. Floppy drives of any kind are not suitable. The hard drive should have a fast access time and a high storage capacity. Another option IS a tape drive, CD-R and CD-RW disks or recordable DVD disks for backup. Input and Output
Input and Output (I/O) computer fe..'llllreS, cover h>lrr!ware items such as monitor. graphic card, keyboard, digitizer, scanner, printer and ploHer, Monitor suitable for CAD/CAM work should be a large sile color monitor providing very high resolution. The monitor and the graphic card do relate to each other. The card must be able [0 generate the image, the monitor must be able to display the image. Speed of the video output is also very important.
A keyboard is a standard feature of a computer and serves as a basic input device. Mouse (or a digitizer on larger systems) are also input devices, but much rasler than keyboard input. In CAD/CAM, where a lot of work is done in graphic 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 bullon on the device and the menu item is executed. The pointing device most suitable for CAM work in the Windows environment is a mouse. Both the printer and ploHer are theoretically opllonal. but generally worth some consideration. For CNC work alone, a printer is more importanllhan a pen plotter. If the setup is a true CAD/CAM. both peripheral devices may be needed. All peripherals are interfaced with the compU[er using specially conl~gured cables connected 10 the Input/Owplll (I/O) outlets called ports. 111e modem is normally not required for CNC programming, except for data exchange with a remote computer or Internet access. The laser or ink jet printers generally use a parallel interface known as the CeJ1lronics standard, but many other devices use a serial interface. There are also other I/O options, such as the USB (Universal Serial Bus) interface.
53
• Typical
/ Software Requirements IJU\J .......:;u
hardware
computer system ft is not a simple 'shopping list' for all hardware
•
Utilities and Special features
most updated version of the operating system is never as powerful and flexible as many users would like it to
that reason, many software developers came
'''1'1111,.", ..
with
of programs and utilities that smmu;;mlent features. Many are lTPF'U/';.l'CF' from the Internet and Intemet and World Wide a great source CNC and general to use a CAM software. many tasks associated with
CNC machine shop can use. Here are some to any system and are not subject to OeC;O[llquickly. A typical list of minimum and options may be compiled:
'.HV'''''''''UYJ
o
Hardware compatibility with IBM (Windows based) - Apple computers havevery limited CAD/CAM applications
o
latesl version of the Windows operating system (must supported by the CAM software)
o
central speed - higher::: beller in MegaHertz units - MHz.)
POST PROCESSORS
o o
memory cache
CNC software must be able to output a Drogrrum mat unique to each control unit most ......."' ...r'" tool path generation is the data integrity. computer generated program must be accurate and the CNC machine. That means the completed should require no other programs or editing, no optimization, no similar manual activities. can achieved only a well developed and a properly configured post CNC machine.
o
o
requirement of a numeric (math} r{\_,,,,,{\,,,,,::,,,,,,,,( (normally part of the higher end processors) Access Memory (RAM) - as much as Dosl)lble Enough of hard disk space for program and (measured in gigabytes or higher - with a
o Backup system for data protection (tape cartridge. removahle drive,
DVD,
o
High resolution graphics adapter (graphics (shou[d have a rapid refreshing for the
o
Large high resolution color monitof . non-interlaced (measured in pixels - the more pixels per screen the finer the display, and the smaller the pixel the beller the display)
o Pointing device - normally a mouse - is a current standard o ploHer is required only in special circumstances needed for CNC wU!k) - B ~izt:! maximum is Llsually if needed
o
Agood quality prinler with a parallel or (lor hard copy documentation)
o
CD or DVD drive & various multimedia (sound card necessary)
o
Access 10 additional global information (Inlernel. E-mail, usef groups, newsgroups, ... )
o
Two or morE! serial and
o
Text editor - usually part of the software (or optional)
It is smart to keep .... v,.~~.~. ogy. It develops rapidly
some fundamental the development ness of the latest user and/or
A top quality tant customized data into the cutting values, spindle
stored for
.:>1J"""u,;>,
further DH}CeSSU
data, sorts it and creates a sents the part crp.r\n"lF'Tr\1 functions. even more, gardless of its every CN C is program codes are unique to a single machine, some are quite common to many' of a post processor is to cess the convert them to the machine for individual control systems.
•
Customizing Post Processor a
processor is more or to be customized, at least to some extent. in-house, usually means to cusu ......,;)"lJl supplit!u with oroc:ess depends on type
changes
micro computer technoleven a weeks may change and decisions. Following teclmology creates awaretherefore a more educated
take
CNC AND CAD/CAM
489
IMPORTANT FEATURES
ion
are several important fealllres to look mto whe.n ininlo a CNC programming software. They do on the !ina! runctionality of the program,
•
Input from User programming the user. This in-
thaI cnnnol he or would require 100 arc usually small in size and mode whenever rcare a barl'eeder scng routine on a horiWl1supports some lype of
it adds an eXira nexihility
or the
tool path for lathe have a back the 1001
• CAD Interface A sland alone CNC prograrnmi CAD software the own, Yet, in a any CAD/CAM syslem is I the opr/on of inqJOllillg pall geulTldry fmm a Even if a company does nol need D, il pared 10 accept ils perhaps from customers or c.:ornrany branch offices. Neecile<;s 10 say, if a CAD software is not computer cannot not acccpl the riles n"',n(.>Y'l1 such a software. These files are their structure is nol a maHer of public access. Therefore. mllst be another way to interchange drawing is another way - Ii~P (1 diffr>rl>nl file forma!. File Exchange Formats
•
Machining
a CAM software is ils and repetitive cye Ies, a manual modern sysore available with a limi memory ly. that reason, support for cycles is very important in a as it provides easy editing at the
• User Interlace Customizing the display is a as crilical as orhers, but a facility 10 tool bars. even menus eXIra
Colors me very ,"'''',., ...;-,.,,,,' seHings should The screen appearance
bination of colors for the
j·Ar,,,,,, .. ,.,,
lext. The result is the
The need 10 exchange design ware systems has always been a prime
are lHallY competing rormats or a neutral file oldest of them is called ICES (In/tial Specifiea/ioll), originally developed to transfer complex design liles from one software to another. Another thaL is also used. is the DXF format by Autodesk 1';"1.
The DXF (Drawing eXchange Formal or DaTa
Format) is considered by many £0 he the standard of drawing liIe exchange between micro computers. II has been developed by Autodesk™. Inc., the developers of popular AUlOCADTM, the mosl wieldy llsed PC based CAD in the world. DXF format is suitable only for common ric as points, lines. arcs and a few others. software should also support an interrace between the neutral files generated by a CAD system. Depending on the nature of a particular programming appllcathe Interface mtly be needed for
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 comour change points only, but static display and is very important some eralions, Premium CAM software also allows 10
customized tool shape, including the Lool on (he screen ro simulate actual tool add even more realism to program
and software for CNC programming work can
and
It can represent a significant investmenT of and can hecome a lOlal if i lis nor
properly. A failure is nOl lhcaClU
speed and The loss is
was expectcd hulncvcr in the confidencc the
COI11-
o
53
.. System Management
pany employees pul into the technology. high. To prevent such prospects, keep three in mind when planning a CNC
o
High quality training program for long term skills
o
System management philosophy and
o
Technical support for hardware and " .... "rlAI"'''',
A reliable operation of all system the success of CNC software, Use good organization, it needs
definitely needs a professional CllJ'''rr1pnl establishes standards and
operations, Concerns about people selection,
backup methods, confidentiality and security, work ronment qualil y , etc .• are not con fi ned to a
No item In Ihe list is any more important olhers - they are all equally imporrant.
should be important in the overall company culture .
• Training
• Technical Support
should be planned, thorough, and programs apply three levels companies do not place enough emphasis on many studies and examples proving thaL quality training work. The lack of lime and costs are often used as excuses. Training is a l;;"I.-'\;:':'''-' for any company that wantS to be competitive. level 1
firsl level of training should be aimed at the person lillie computer experience. ft should insoftware to the programmer who proIy. It should be an overall training, mainly in nature, with the emphasis on the system '~Y,,"H'~" - as they relate to the company where the
with none or
software is installed, The typical general approach should byexplaini the philosophy behind {he sortware {he structure oj' menus and commands. It is very important to show the student what the do in lied first level should be done
The
ing to the ni level eliminates ginning of a new era. plexilY of the first few possible, lhe dil1icult
Training level 3
many questions,
questions, weed out had habits,
usually negotiated with the vendor, covering installation, update policies, new developments, etc. An important pan of technical support is the speed and reliability of hand ling emergency situations. If a hard disk fails - and a back up does exist - what can be done? The CNC shop is waiti for lhe cril.!cal job, while the programmer cannot data to the machine, because an "' . . A.., ... ' failed. Support should cover both
I support promised by the be written down. Know exactly what
If something isn't in the contraCT, it
THE END AND
isn '[ available.
E BEGINNING CNC technology holds is always hard indications where the \echnoJcontrols with more computing approach 10 programming, more better storage methods, etc, are are also inevitable in work skills,
Stand alone CNC ines will always be needed, On the CNC machining centers, will much more emphasis on faster machining rates. CNC lathes, the natural way of development to adapllhe tool indexing teChniques of the centers. This would increase the number of and live tools away from area. Also features Ihat eliminate <':P','nn"",cv plex milling features on
Training level 2
The thild level is usually problems. questions, I ips, shortcuts, etc. long term
suppon is an important pan of the system manA service contract or a support can
months later. It covers concerns, introduces this level is to create a r'\r{'\(Jr<>TYIl'YlJ"r
has
all
REFERENCE TABLES
492 D_e~mal
Appendix
Number 1 Letter
inch -
42
3/32
240 41 2.45 40 2.50 39 38 37 36 2.75
7/64 35 2.80 34
33 2.90 32 3.00 31 :'.! 1()
1/8
3.20 3.25 30 3.30 3.40
29 3.50 28 9/64
3.60 27 3.70 26 3.75 25 3.80 24 3.90 23
22 4.00 21
20 4.10 4.20 19
,1695
18
.1719 .1730 .1732 .1770
4.25 4.30 11/64 17
4.40 16
rj letter
4.50
.1811
.1820 .1850 .1870 .1875 .1890 .1910 1929 .1935 .1960
4.60 14 13
4.70 4.75
12
4.80
3/16 11
4.90 10 9
5.00
.1990 .2010 .2031 .2040 .2047 .2055 .2067 .2087 .2090 .2126 .2130 .2165 .2188 .2205 .2210 .2244 .2264 .2280 .2283 .2323 .2340 .2344 .2362 .2380 .2402 .2420 .2441 .2460 .2461 .2480 .2500 .2520 .2559 .2598 .2610 .2638 .2556 .2657 .2660 .2677 .2717 .2720 .2756 .2770 .2795 .2810 .2812 .2835
M~lri~ jlT\.r:2)~
15
8 5.10 7 13/64
6 5.20 5 5.25 5.30 4 5.'10
3 5.50 7/32
5.60
2 5.70 5.75 1 5,80 5,90
A 15/64
6.00
B 6.10
C 6.20 D
6.25 6 ..30 1(4
E
6.40 6.50
F
.2570
5/32
.1660 .1673 .1693
_INI
.2008
2.70
.1614 .1654
Fraction
.1772
.1969
2.60
.11B1
Deci 11I~.U.nch .1800
2.30 2.35
.0925
.1200 .12'20 .1250 .1260 .1280 1285 .1299 .1339 .1360 .1378 .1405 1406 .1417 .1440 .1457 .1470 .1476 .1495 .1496 .1520 .1535 1540 .1562 .1570 .1575 .1590 .1610
(mml
43
.0890 0906 .0935 .0938 .0945 .0960 .0965 .0980 .0984 .0995 .1015 .1024 .1040 .1063 .1065 .1083 .1094 .1100 .1102 .1110 .1130 .1142 .1160
Metr~
2.25
.0886
6.60
G 6.70 17/64 6.75 H 6.80 6.90 I
7.00 j
7.10 K
9/32 7.20
493
Appendix
Fraction
Number / Letter
.2854 .2874 .2900 .2913 .2950 .2953 .2969
7.25 7.30 L
7.40 M
7.50 19/64
2992 3020 .3031 .3051 .3071 .3110 .3125 .3150 .3160
7.60 N
7.70 7.75 7.80 7.90 5/16
8.00 0 8,10 8.20
.3189
.3228 .3230 .3248 .3268 .3281 .3307 .3320 .3346 .3386 .3390 34?'i .3438 .3445 .3465 .3480 .3504 .3543 .3580 .3583 .3594 .3622 3642 .3661 .3680 .3701 .3740 .3750 .3770 3780 .3819 .3839 .3858 .3860 .3898 .3906 .3937 .3970 .4040 .4062 4130 .4134 .4219 .4331 . ,4375 .4528 .4531
Metric (mm)
P
8.25 8.30 21/64 8.40
0 8.50 8.60 R
8.70
11/32 8.75 8.80 S 8.90
9.00 T
9.10 23/64
9.20 9.25 9.30 U
9.40 9.50 3/8 V
9.60 9.70
9.75 9.80 W
9.90 25/64 10.00 X Y
Fraction
.461313 .4724 .4844
.7031
.7087 .7188 .7283 .7344 .7480 .7500 .7656 .7677 .7812 .7874 .7969 .8071 .8125 .8268
12.00 12.50
,/,
13.50
35/64 1400 9/16 14.50 37/64 15.00 19/32 39/64
15.50 5/8 16.00 41/64 16.50 21/32 17.00 43/64
11/16
17.50 45/64 18.00
23/32 18.50 47/64 1900 3/4 49/64 19.50 25/32
20.00 51/64 20.50 13/16 21.00 53{64
.8438 .8465 8594
27/32 21.50 55/64 22.00
8661
Z 10.50 27/64 11.00
7/16 11.50
.9375 .9449 .9531 .9646
12.70 13.00
33/64 17/32
.8281
.8750 .8858 .8906 .9055 .9062 .9219
Meuic Imm)
3 i/64
.4921
.5000 .5118 .5156 .5312 .5315 .5469 .5512 .5625 .5709 .5781 ,5906 .5938 .0094 6102 .6250 .6299 .6406 .6496 .6562 .6693 .6719 .6875 .6890
Number / Leiter
15/32
7/8 22.50 57/64
2300 29/32 59/64
23.50
.9252
13/32
29/64
[
15/16
24.00 61/64 24.50
.9688
31/32
.9843 .9844
63/64
10000
1
25.00 2540
494 drill sizes in the following tables are based on the
mate fulllhrcftd deplh of72-77% of nominal.
ds UNC/UNf II
alternative
1/8·40 #6·32 #6-36 #6·40 5/32-32 5/32·36 #8-32 #8·36 #8-40 3/16·24 3/16·32 #10-24 #10·28 #10.:30 #10-32 #12·24 #12·28 #12·3:? 7/32·24 7/32·32 #14·20 #14-24 I
#3B
Hl15
#36 #34 #33 1/8 #30 #29
.1065
#28
#26 #22 #25
T~/~~~~rl-~
17/32
.515 .5156 .5313
5/B·12
35/64
.54S9
5/8·18
37/64
5/8·24
37/64 39/64 5/8
.5781 .5781 6094 .6250
41(64 21/32
.6563
11/16-12 11116·16 11/16·24 3/4-10 314·12 3/4-16 3/4·20 3/4·28 13/16-12
314
7/0-9 7/8·12 718·14 718-16 718·20
49/64 51/64 13116 13/)6 53/64 55/64
16.50 17.00 17.50 17.50
.6719 .6875 .7031
.7188 .7344 .7500
.~
.7 .8125 .8125
I
.82Bl
.8750 .8906 .8750 .9219 .9375 .9531
7/B 57/64 7/8
59/64 15/16 61/64
.9844
63/64 .0
.1470 ,1570
13.001300 13.50
.6406
11/16 45/64 23/32 47/64
13/16·16
Straight Pipe Taps NPS
.1495 .1540
470
1/4-18
11.50
3/8-18
1500
~·14
18GO 2375 30.25 38.50
3/4·14
1· i I Y2 1 1/4·11 Y2 I ~·11 ~ 2·11 ~
• 0
1/4·28 1/4·32 5/16·20 5/16·24 5/16-32 3/8·16 3/8-20 3/8·24 3/8-32
44.50
56.00
TPI
Tap Drill
Decimal Size
6.90
27
1/4
.2500
7.10
27
11/32
.3438
18
7/16
.4375
18
37/64
.5781
1/,
14
23/32
.7188
314
14
59/61\
.9219
1,0
11·1/2
1·5132
1.1563
1·1/4
11·1/2
'·1/2
11·1/2
'·3/4
1.7500
2.0
''''/2
2·7132
2.2188
5116·18
8.00 8.50
9.40 9M 10.00
7/16·14
7/16-20 7/i6·24 7/16-28 '/2-13
%·20 '/2-28 9116·12
33/64 3316<1
43/64
15116·12
.1250 .1285 .1360 .1 .1405
eqU~ic: alternative
9/16·24 5/8-11
15/16·16 15116·20 1-8 1·12 1·14
1110 .1130
Tap Drill Size. Inch
29/64
.4531
1
31/64
.4844
'1.50
15000
495
Appendix
~¥'t'.' t' H"" 0
Taper Pipe Taps NPT
(mm)
MIO x 1.5 MIl x 1.5
Tap Size
M12 X US
1/1S-27
M14 x 2 M16x2 M18 x 2.5
1/8<:'7 3/8-18
M20 x 2.5
Yl.-14
45/64
3/4-14
59/64 15/32
, -II y. 1 1/4-11 Y2
I
, 'h-' 1 'h
\/2
38.00
1 47/64 27/32 25/8 3 1/4
2-11 'h
2
M22 x 2.5
n-a
3-8
- Tap Dtil10
8.50 9.50 10.20 12.00 14.00 15.50 17.50 19.50
TiT) I··· ..
.3346 .3740
.3937 .4724
.5512 .6102 .6890 .7S77
M24 x3
21.00
M27 x 3
24.00
.8268 .'J449
M30 x 3.5
26.50
10433
44.00
56.00 67.00 82.50
Metric Fine Threads Nominal 0 x Pitch (mml
Taper Reamed
Drilled Only
M3
x 035
M3.5 x 0.35
1/16
TPI
Tap Drill
27
D
1/8
27
0
1/4
18
7/16
x 0.5 x 0.5 MS x 0.5 M4
Tap Drill
Dec. Size
M4.5
M5.5 xO.5
'I,
M7 X 075
1969 .2067 .2461
M8 x 1
7.00
.2756
M9xl
8.00
Ml0 x 0.75
9.25
Ml0x 1
9.00
Ml0 x 1.25
8.75 10.00
.3150 .3642 .3543 .3445 .3937
MIl xl
1.1406
1-9/64
1-1/4
1-31/64
11-1/2
1-1/2
1-15/32
1-47/64
1.7344
2-13/64
22031
I
1.12S0
M12 x 1
11.00
.4331
1.4688
M12)( 1.25
10.75
M12 x 1.5
10.50
.'1232 .4134
M13 x 1.5
11.50
.4528
M13
x 1.75 M14 x 1.25
11.25
12.75
M14 x 1.5
12.50
1-23/32
1.7188
2-3/16
2.1875
Threads
Metric Coa x Pitch
M I x 0.25
-
0.75
0.95
MIAxO.3
1.10 1.15 1.25 1.45 1.60
ML5 x 0.35 ML6 x 0.35
x 035
M2xOA
M15xL5
13.50
MiS xl
15.00 14.50
M16x 1.5
Irnf!1) .ID9.~ . '
Tap
M1.2 x 0.25
ML8
1-1/8
.0295 .0374 .0433 .0453 .0492 .0571 .0630 .0689
M18 xl
.6693
M18 x 1.5
.6496
M18x2
.6299
M22x 1
1.75
M2.5 x OA5
.0807
M4 x 0.7
2.05 2.50 2.90 3.30
M4.5 xO.75
3.75
.1476
MS x 0.8 M7 x i
4.20 5.00 6.00
M8)( 1.25
6.75
.2657
x2
.3051
M30 x 3
M3.5 x 0.6
M6 x 1
M9 x 1.25
.0984 1142 .1299
M22 x 1.5 M22 )(2 M24 x 1
21.00 20.50 20.00 2300
M24 x 1.5
2250
22 00
J654
M24 x:2 x 1.5
.1969
M27 x 2
2362
.5709
fi,m
MIl x 1.5
M2.2 x 0.45 M3 xO.5
4.50
5.00 5.25 S.25
M6 x 0.75
3/8
4.00
M28
x2
8268 .8071 .7874 .9055 .8858 8661
496
NOTES
\
Selective block skip Slash
Index
170 163
169
168 \64
223
A Absolute data Acceleration
70· 73. 3GB, 430 deceleration.
Additional Address lonmlt Air cutting.
88 18 43·114
Block IDOls loois Predslon Single pOint Tool shih !3oss
203 G76.
165
APC part
ATe
41 437·439 306 B,95-95
299
C
a9 437-439 B. 60, 95·96, l49. 155
98 100
99
CAD/CAM CAM soflware programming environment iJP.5:kl0[l com [lU!P.f fllogramming General features .
32·33,
483
489 484
101
97 97 97
Su pport and training
98 99·102
98 102
28 16 17 18
Calculations. Calculator type Canned cycles. Cartesian coordinate system Center end mill Centerline Chamfering Chamfer dtameter Character Chuck functions
484 477 40 76 177-190,314·320
15 !97
129 299 191
41
409 ?44 235-246
B Background edit Ball nose end mill Bar/seder. 8-axis. Bitwise Input Blend rad III S Block. Block format . Block numbering Block nu mbers incre ment Block structUIR Confllcling words End-Of·Block (£08) block block Status block Block skip Barteerier Numbered block
\
\
101
483-4~:
465 273 170,413 429-436 24 301
25,41,61-68 63 63 64 61
66
Ale centel and radius.
238
Arc cenler vectors Arc direction Arc in planes Arr; programming. Blend radius. Boss millrng _ Ci rcular moltOn direction Elements of a circle Feedrate for Circular motion Full Circle programming Lead·in and lead-out Parrial radius. format Ouadrants
238
231
240 236
64
61-68 25
65 liZ3 4 13
21,163-170 170 170 HomOnlal
mill
in, 439
497
498 Homontal machining center Lathe accessories Lathe axes Machine axes Milling. Six-axIs lathe Three·axis lathe Turning centers and lathes Two·axis lathe Types of eNC lathes
Index 9 409·415
Cycle slart time
II 8
7 13
12 11
12 11 9-10, 13 8 2,457·464 461
463 457 464
158 459 411.462 458
D Datum shift Cutter radius oHset Data setting. Lathe offsets Program zero T001 length offset MOl control mDde parameters Work offsets Decimal point Defaults Delta IOcremenl
462
5 50
30
kW (0 HP. Coolant functions geometry Coordinate system rotation Counterboring CSS Cutter p~th diHp.rmloil!lOrL Cutler I adius offset. radiUS compensation Cutler direction amount seiling, Direction of motion i;ltl:!lIerenCe ef(oL look-Ahead type Offset cancellation Oilset commands G40·G42 Practical example Programming forma! . Programming techniques methods. Tool nose radius offset Toolpath center points of offset Cutting mode Cutting tool animatIOn
o
39 39 31
20 23 14 24 29 2 280
39
39 21,58.278 IS, 17
399-404 206
205 82, 305 38 247-268.271·273
254 256
263 251
259 257 256 251 262 253 250
260 266 248 250·252 90 30
381-392 388 386 38B
381 387 389 389 386 75 23 250 159
182 Descartes, Rene. Diameter programming
Distance· To-Go Continuous path Equidistant Control system Control panel Defaults Features, Memory capacity Optional features ConvenilOoal machining COJ)ventlOnal Conversions HP to kW,
21,57,170 4
ONe DraWing. Charlg~s
and revisions. Dimrsioning methods SpeCial instructions . Sulfate fin ish. Titre block Tolerances dimension input . operations Blind hotes Cenler drilling Drill pOint EHectlve drill diameter Fla! bottom drilling Indexable drills Multilevel drilling Nominal dnll diameter. Peck drilling Reaming holes
Web drilling . Drip-feeding Dry run. Dummy tool. Dwell command As TAB alternative Dwellirl number 01 revolullons . Dweltlng axis Long dwell lime Minimum dwell Safely issues Selting mode Time selection Used In fixed cycles OXF files
15
73 132,176 468 31,34
36 34 36 35 34 35 30
194 197
196 195 195
197 198 2Q7
195
199,214 201. 214
196 208 24,469 21, 143
95 171-176.179.411 176 174
176 175
173.207 170
173 172 176
33
G
E
GOO command 64 69 64 453 456 456
English units
EOB frrms in progra mm Ing Calcula lion errors. Hardware errors Input errors logical erfOrs Miscellaneous errors . Syntax errors E-switch . Exact stop check Exact stop check mode Execuiton pnority
456 455 456
455 463 89 89 68
F Face
122.227-234 227 ' 228 [
techniques compensation pari programming FeedratB control. Circular cutting motion Circular motion leedrate Constant feadra Ie, Eaddress In threading , Feed per minute Feed per revolution Feedhold Feedrate override , Inverse lime feedrate Maximum Selection Fillet radius Fixed Absolute and incremental Basic formal structure Cancellation of a cycle Cycle Detailed description Genera I rules Initial level selection LO parameter Plane selection . Programming format R-Ievel selection ,
Selection Shirt amount calclJlations Format notation , Milling syslem format Turning formal.
230
233 166 87 245
90 90 92
87 88 21,25,91
21.27,92
87 91
88 240 177-1
314-320 180
177 189 179. B9
183 180 181 190 274 179
181-182 178 179
182 43
43 44
GOI command G02·G03 commands G04 command. G09 command GlO data command. G12-G13 G15 command, G16 command , G17·G 19 commands G20 command G21 command G27 command, G28 command. G29 command. G3Q command, G32 thread cutting command G40 command G41·G42 commands G43 command, G44 command, G45-G48 commands G49 command. G50 command G50-G51 commands . command, G53 machine coordlrlates command G54.1 command G54·G59 work oHsets G61 command G62command G63 command G54 command G88·G69 commands
G70 G71-G/3 cycles G73 peck cycle G74 tapping . left hand G74·G75 lathe G76 precision boring G76 threading G80-G89 commands
50, 143 50. 159 237 171.439
88
151. 58 348-349.
251.256 251. 266 123, 132 123, 132 19.122 132
83, 113. n4,
3811
124 123-130, 383-384
89 89 89·90 399 313.320 313.315.317-318 178. 184
178. 186, 209 214,313
178. 189.203
313.350.352.355 178 183
Gal G82 spot
cycle
GB3 peck dri Iling cycle GBIl lapping G85 boring
hand
cycle G87 cycle G88 boring cycle G89 boring G90 absolute position command , G90 lathe cycle G91 incremental motion command G92 posillon register command. G92 cycle G94 command , G86
18S
88 71-72, 152·1
160.385,388
308 71-72,152·1 lBO, 381 113,1 381,383 3Ll9-350. 363
88 312
G97 corTm~ilnd G9a-Gg9 commands
88 84 181,207
500
Index 13>1
line,
47-52
G-codes C
50 51
21
47 50 49
52 50 52
L
2L 50,298
,. Geometry ofiset Graphic display . Grooving and part-off Corner groove
K
472
179. 190
104,128.157,254 29
307-322 320 312 313 314,316·321
323-334
332 323 324
Grooving ~nOlicallOIJS Grooving dimensions . Multiple grooves,
P and 0 blocks • Yt"--''''o
330
Pan-off ,
cycle
307
335-338 326
Precision gro
325
groove
H 21-22
Handle Helical !'HIlling Helicalll1terpolation Helix Ramping Thread Thread Hockey std molion Home posi!iOr'l Horizontal machining eerners
417·428 417 419 427 418 421 . 146,151 108.149·158 127,429-440
318 314
308 Lathe Master tool setup oHsels Offset change Off set enlly , Offsets and tool motion Lathe plOgram formal Least increment _ Linear Interpolation
feedrate . Multiaxis molion Programming format axis motion Start and end or motion live Local coordlnale system
294 129
295 295 294. 298 295
306 73 159. 161, 271 161
160 160 159 159 5
224. 383
M
I IGES files incremental data mput Indexing axis , lable Iniliallevel seleclio n In-process Input dimenSions tnput format Zero suppression Inscribed circle Interfacing \0 devices Connecting cables
or
Data selling , ONe Punched tape RS-2J2C interface ll! communication, Intermediate pOint Inverse time feedrate_
33 70,
72.
43[) 1\30·431,434 429-436 181 3U 69-76.429 73 74 474 465-470
470 469 .
468 466
465.467,469 46:3 151 87
MOO function MUI function M02 program end function
56 57 58
!vi03 IuncI ion M04 function M05 funClion M06 function
59, 79 59, 79
M07 function MDS function
58
M09 function M10·Mll functions. M12-M13 functions. M15·M16 funclions.
Mi7·MIB (unctiolls. M19 functIOn M2i -M22lunctions. . M23·M24 thread functions M30 program end func!lon M~ t -M44 lunciions. M48-M49 functions
59, 80
60, 95 58 58 409 411 410
. 412 60,80,102 4\ I
60. 357 58 298
92
Index
501
M60 lunction M7I-M72 function M73-M74 functions, M8B-MB9 functions, M9B·M99 subprogram Machlnabilily Machine accessor ies. MachlnB coordinate system. Machine geometry Machrne tock Machine warm-up Machine lero Absolute and incremental mode Intermediate point MAchine zero return machine lero. commands RSIlJrn /iom maCilllitl Lew .
15
60,
375,4B2 37.81 55
384 17 28 175 108 152 151 149·158 151 151
Modal commands M·S·T lock . Multilevel drilling Multiple cycles
157 158 156 149·158.434
N
2
30 191·216 194
205 212 199,214 201.214 202 209 191,193
208 37 28 26,389 32-33
36 310
1-6 2
Numencal control Advantages Definition Hardwired controls . Soflwired controls
0 OHsets panel.
Optional Orthograph1c oriefliatlClfl. Overtravel
298.315 20 21,57
399 108, 122. 150
477 472 471
5%0 53,58
54
P
56
54 related applications MDI
53,56
54 21,26.389
24 66,45:2 Metne units Milling - G·codes. M-codes operations Direction o( cui End mills Peripheral milling _ Slots and and teeds Siock removal Width and of cut Minimum axis increment _
36 69 47
54
279
PaUet changer PaUet types Pnrame!ers. Parsons, John Part catcher or unloador .
73
22. .1;d
Pan Pari reference pOln!. Part setup Setup sheet P8rt -off Parts counter Pattern of holBS
275-277 275-280 281-292 277 279
2BO
437 US
222 223 220 Random hole paltern _ row hoi" pattern
220 217 2\8
2 Typical Peck drilling Percent sign , PI constanl Planes. Absence of aXIs data , In planes, Circuiar Culler radius offset Definition Fixed cycles , Machining in planes Mathemallcal planes, Selection of planes Pocket Circular pockel cycles, Circular Rectallyul(Jr POint of origin Polar coordinate system, Position Incremental mode Motion length calculation commands Z-axIs Position commands Definition Lathes .
Post Power rating PreparatOlY curt!llramJs Pr ocess sheet Program Program changes, Program comments end , Program header Progl8iT1 length reduction Program structure Program documents Documentation !lle folder (J program Setup sheet sheet Program ideMificatlon Program name number planning Program stop Program verification. Avoidance of elfors Detection of errors Graphic method errors Thread Program Writing Confusing characters . Long programs formatting forms Program zero
Index 217
199,214 42, 58 Bl 473 269·274
2n
271 273 16,269
274 269·270
Lathes Machining centers Selection methods Programming formats Format flotation Word address formal
112 110
109 42 113 42 33 41
Programming terms PuU·OU! Punched tape Py1hagorean Theorem
415
466 161,480
269 226,269·274 281·292 292 289
Q
285 16
177 225
Quadrants . in eNC programming
16,238 40
119·122 120
120 119
\22 113-118 113 115 113 113 115 33. 488
39 47·52 36 42 Li60
66 58 45 4115
46 447-452 451
448
449 449
62
62 62 31·40 56 453·456
R Radius programming Rapid positioning Approach 10 Ihe part Hockey std motion .
2~O
143·1118,271,294
148 146,151 147
Motion formulas Reduction of rapid rate, 1001 path mOlion . Real number sV8tem . Reaming Recess programming Rectangular coordinate system Reference Fixed Flexible point. Machine lero MachIne zero (home) , Part reference point Reference point groups Tool reference point . commands. Return to machine zero . Rigid R-Ievel selection Roughing and finishing RS·232C interlace .
26, 147
144 15
214
304 15
107·112. 471-479, 481·482 108
107·111.149-
108 471·479.481-482 108 109 107 112 113·118 109 209,212 181-182 307 30,465,468
454
453
454 455
S
360 441-445
442 445
443 ~42
16.109,273
Safe block . Safety in eNC work function G50·G51 commands center factor
65 6 405-408
405 406
406
Index
503 21
Screen display block retum.
SrnlNGS screen Setup sheet Similar
block. Slash symbol Slot dlill Slots and pockets Speeds and feeds. Spherical end mill . Spindle coolrcl Constant surface Empty spindle Maximum
28
418
170 449-450 1\78 25
421 426
163
277,
281-292 344-345 273
na6 82 101
setting.
B4
305 81.277 79 21.59.77
21.60.80.203 82
37 37 21, 27
80
207 65 202.303 307 30 367-380 379 373
334 3BB 368 377 371
373 369 368.370 58. 368
434 Symbols in
45
T Tarlslock Functions programmirg
Check IISI Pipe taps Speeds and feeds cnamfer geometry Tap flute geometry lap geometry Tapping mode. on lathes.
SImulation method !hrEiad
197
77 Spindle Starlup Spindle JUrlChons orientation formulos version Mellie verSion. Spindle override Spindle
159 38
61·68
212 211
210 210
210 21U
88 215
Hand of lh(ead Infeed methods Lead error Maximum feedrate Muitislarl threads PilCh vs. lead testing Retracl from thread Single poi(Jt ,,,<,,,,,11;,,,,
and feeds
344-345.
361
thread Terminology , Thread forms Thlead reculling . Threading process Tbreading to a shoulder Tooling relerence , Tool junction Lathes Machining cenlers. Tool indexing - lathes Toollenglh offset . Cancellation. or offset Datum Shirl . Distance-To-Go calculation G43-G44 difrerence . Horizontal application, Offset commands Used with G54·59 Used with G92 Tool setup Off·machine. Offset On-machine Preset tool Using master tool Tool Tool memory type Fixed type Random
350
126,131 \42,
1 387 133 136 141,432 132
139
504
_~~_· _ _ _ _ d
Center Ime External tooling lnlemal tooling Tooling selectlon_ Tooling sheet Trial cut table,
Tligonometay
116 117 117
38 449-450 168 481 477-481
• G-codes
49
Tuming M-codes
54
Tumlng and boring Turning tools
293-306 130.293
Turret
Web drilling Word address formal. addresses Order of words In block_ Word Work area Work coordinate system Work offsets Additional wOlk oHsels
Cammon offset
208
42 45 51 41 31 123-130 123·130, 386 24,387 128
387
Datum shi/1 ,
124, -386
128,387
412
i 23-130, 386
application
127,431 12B
U Uffl commands
160
Undercut plOgramming
304
Startup Wt'lrk ar~as available . Work offset change Z-axis application Walk sketch
Z-axis fleglaci Wear olisel Adjuslmem
23 125 126
40
Z
W \IV-axis,
1
10 105, )29, 254
106
28
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 adaptable 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 programming 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, instructors 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.