Professional Documents
Culture Documents
CNC Programming
CNC Programming
Second Edition
c C
Programming Handbook
Second Edition
A Camp hensiv uid Practical CNC rogramming
t r
mi
989
ue
York, NY lOO 18
.com
Li
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
Americas,
w York, NY 10018
Copyright
2003.
America.
5678910
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
..
..
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
TABLE OF CONTENTS
1
~
NUMERICAL CONTROL
DEFINITION OF NUMERICAL CONTROL NC and CNC Technology. CONVENTIONAL AND CNC MACHINING NUMERICAL CONTROL ADVANTAGES Setup Time Reduction Lead Time Reduction. Accuracy and RepealabiliJy Contouring of Complex Shapes. Simplified Tooling and Work Holding. Cutting Time and Productivity Increase. TYPES OF CNC MACHINE TOOLS Mills and Machining Centers. Lathes and Turning Centers PERSONNEL FOR CNC CNC Programmer CNC Machine Operator SAFETY RELATED TO CNC WORK.
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
2
2
17
17 18
3
3
18
3
3 3
4
5 - CONTROL SYSTEM
GENERAL DESCRIPTION Operation Panel Screen Display and Keyboard Handle. SYSTEM FEATURES Parameter Settings System Defaults Memory Capacity. MANUAL PROGRAM INTERRUPTION.
19
20 20
21 22
4 4 5
5
5
6
22
22 23 24
25
CNC MILLING
7
7
7
Single Block Operation. Feedhold Emergency Stop MANUAL DATA INPUT - MDI PROGRAM DATA OVERRIDE 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
25 25 25
26 26
CNC MACHINES - MILLING. Types of Milling Machines . Machine Axes Vertical Machining Centers. Horizontal Machi ning Centers HOrIZontal Boring Mill Typical Specifications
8 8
9 10 10
26 27
27
27
28
3 - CNC TURNING
CNC MACHINES - TURNING Types of CNC Lathes. Number of Axes AXES DESIGNATION Two-aXIs Lathe . Three-axis Lathe Four-axis Lathe. Six-axis Lathe FEATURES AND SPECIFICATIONS Typical Machine Specifications. Control Features
11
11
11
11
28 28 28
28
29
29
29
11
12
12
30
30 30
13
13
13 13
14
30 30
30
6 - PROGRAM PLANNING
STEPS IN PROGRAM PLANNING INITIAL INFORMATION
31
31 31 31
31
4 - COORDINATE GEOMETRY
REAL NUMBER SYSTEM RECTANGULAR COORDINATE SYSTEM.
15
15
15
ix
X
---------~-.-.
--------_.-...
Table of Contents
----
Control System.
31
32
32 32 32 32 33 33
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
47
47 47 49 50
50
33
50
51
34
34
34 35
GROUPING OF COMMANDS
Group Numbers
51
51
35 36 36
G CODE TYPES.
G Codes and Decimal POln! _
52
52
53
53
53
53
36 36
36
9 - MISCELLANEOUS FUNCTIONS
DESCRIPTION AND PURPOSE.
Machine Related Functions . Program Related Functions
37
37
38
TYPICAL APPLICATIONS
Applications for Milling Applications for Turning Special MOl Functions. Application Groups
54
54
38 38
38 38
TECHNOLOGICAL DECISIONS
Cutter Path Machine Power Rating. Coolants and Lubricants
54 54 54
M FUNCTIONS IN A BLOCK
StarlU p of M Functions. Duration of M Functions
39 39
55
56 .sf)
40
40
PROGRAM FUNCTIONS
Program Stop Oplional Program Stop. Program End. Subprogram End
56
56
40
57
58
!'iR
41
41
41
MACHINE FUNCTIONS
Cooiant Functions Spindle Functions. Gear Range Selection Mil r. hi n e Ac:r.ess ori flS
58
58 59 60
flO
41
41 42
PROGRAMMING FORMATS WORD ADDRESS FORMAT FORMAT NOTATION
System Formal System Format Word Addresses'
42 42 43
43 43 44 45
10 - SEQUENCE BLOCK
BLOCK STRUCTURE
8u ildlng the Block Structure Block Structure for Milling
61
61 61
61
PROGRAM IDENTIFICATION
Program Number ProgrClm Nome.
62
62
SYMBOLS IN PROGRAMMING
and ivli nus Sign.
45
45
62
SEQUENCE NUMBERS
Sequence Number Command. Sequence Block Format Numbering Increment Long Program:> Dnd Block Numbers.
63
63
63
45 46
64 64
64 65
xi
PROGRAM COMMENTS CON NG WORDS IN A BLOCK MING VALUES
Exact Command Mode Command Exact Automatic Corner Override Mode
66 67
89 89 89 89
ITY.
68
Mode
Circular Morion Feedrates
90 90
90
91
91 91 91
11 - INPUT OF DIMENSIONS
AND METRIC UNITS
Unit Values
69
69 70
MAXIMUM
Maximum Feedrate Considerations,
AND OVERRIDE
Feedhold SWitch Feedrate Override Switch Feedrate Override Functions
70
71 72 72 72
92
IN THREADING
92
73
14 - TOOL FUNCTION
T FUNCTION FOR MACHINING
Tool Storage Magazine Fixed Tool Selection, Random Memory Tool Selection Regist8T1flg Tool Numbers Programming Format Empw Tool or Dummy Tool
93
93 93 94 94 94 95 95
73
74 74 75 76 76
95
95
12 SPINDLE CONTROL
SPINDLE FUNCTION
Spindle Speed Input,
AUTOMATIC TOOL
96
96 97 97
77
77
77 78 78 79
79
ATC System MaXimum Tool Diameter Maximum Tool Length MaXimum Tool Weight. ATC Cycle, MDIOperatlon
97 98 98
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
98
98
99
80 80
81 81
81 82
99
99
100
101
101 102
82
82 84 85
102
CONSTANT SURFACE
Maximum Spindle SpAAri Part Diameter Calculation in
102
103
103 103
T FUNCTION FOR
Lathe Too! Station Tool
13 - FEEDRATE CONTROL
FEEDRATE CONTROL
Feedrate per Minute, Feedrate per Revolution
<
87
87 87
87 88
88
TOOL
Offset.
WAil( Off<:;At
104
104
105
Wear Offset
106
106
FEEDRATE FUNCTION.
The Rand T
15 - REFERENCE POINTS
POINT G
107
88
xii
Relatlonshi p.
108
Center Line Tools 109
129
Tools Tools Command Point and Tool Work Offset
129 130
POINT
Zero, .
130
POINT
Centers.
109
109
130
110
112
131
131
131 131
TOOL
POINT
112
16 - RE
POSITION REG
MMANDS
COMMAND
113
Face.
132
113
OFFSET COMMANDS
Distance-Ta-Go in Z AXIs.
3 13
114
132 132
133
SETUP
On-Machine Tool Length Selting OffMachlne Tool Setting Tool Offset Value Register.
MACHINING
Tool Set at Machine Zero Tool Set Away from Machine Zero. Position in Z )\xis .
114
114 114 115 115
134
134
Z AXIS
Tool Tool length Touch Off a Master Tool
Drfference
Pres~t
1
"135
LATHE APPLICATION.
Tool Setup . Three-Tool Setup Groups Center line Tools Setup. External Tools Setup Internal Tool Setup. Corner Tip Detail . Programmtr'\g Example
115
116 116 116
135
136
136
PROGRAMMING
Tool Offset not Available. Tool Length Offse1 and G92
Tool Offset and G54G59
137
137 138
138
117
117
117 117
Tools
139
CHANGING TOOL
OFFSET. APPLICATION.
140
141 141
17 - POSITION COMPENSATION
DESCRIPTION.
Programming Commands Programming Formar Incremental Mode Motion Length Calculation. Position Compensation Along the Z axis G47 and G4B. Face Milling.
119
119
119 119
20 - RAPID POSITIONING
RAPID TRAVERSE MOTION GOO Command RAPID MOTION TOOL
Single Axis MOllon . Multiaxis Motion. Angular Motion. Reverse Rapid Motion
143
143
143
120
120 122
122 122
144
144
18 WORK OFFSETS
d
1
123
124
146
147
24 125
126
147 148
Z Axis Application
HORIZONTAL MACHINE APPLICATION. OFFSETS.
of Offsets. Offset Offset and Offset Numbers
127
128 1
128
149
149
150
128
129
150
151
129
151
xiii
RETURN PRIMARY MACHINE
151
LONG
Machine X AXIS is the and Dwell,
Axis,
Intermediate Point . Absolute and Incremental Mode Return from the Z Depth Position Return Required for the ATe, Zero Return for CNC Lathes
151 152
153
175 175
176 176
155 155
156 157
FIXED
AND DWELL.
176
CYCLES
POINT-TO-POINT MACHINING
Tool Motions
VS,
177
177
178
158
Fixed Cycles,
- LINEAR INTERPOLATION
LIN COMMAND
Starr and End of the Linear Motion Single Axis Linear Interpolation . Two Axes Linear Interpolation Three Axis Linear Interpolation
159
159
159 159
FIXED
178 179
180 180
160 160
160
161
161 161
183
183 183 184 184 186 186 187 187 187 188 188 189
PROGRAMMING EXAMPLE
162
163
163
TYPICAL APPLICATIONS, BLOCK SKIP SYMBOL CONTROL UNIT SETTING SKIP AND MODAL COMMANDS
Variable Stock Removal Machining Pattern Trial Cut for Program Proving, Barfeeder Application, Numbe(ed Block Skip,
163 164 1
165
166
CYCLE CANCELLATION
The L or K Address. LO or KO in a Cycle ,
189 189
190 190
68 69
170 170
26 - MACHI
HOLES
191
191
24 - DWELL COMMAND
PROGRAMMING APPLICATIONS
for for Accessories
171
171
171 171
19i
194
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
194
194 194 195 195
DWELL COMMAND
Dwell Command Structure,
171
172
172 173
173 173
195 195
196 196
MINIMUM REVOLUTIONS
173
197 197
198
174
174 174
PECK DRILLING
Typical Peck Calculating the Number of Pecks
199
199
199
xiv
Selecting the Number of Pecks _ Controlling Breakth rough Depth.
Table of Contents
200 200
28 - FACE MILLING
CUTTER SELECTION .
Basic Selection Criteria Face Mill Diameter _ Insert Geometry .
227
227
227 227
REAMING
Reamer Design Sprndle Speeds for Reaming Feeorates for Reamir\~ Stock Allowance Other Reaming ConSiderations
201
201
201
201
202
228
202
CUTTING CONSIDERATIONS
Angle of Entry Milling Mode N uJrloer of Cuttiny IIlSl:;rls
228
229
229 230
202
202 203 203
PROGRAMMING TECHNIQUES
Single Face Mill Cut Multiple Face Mill CU1S
230
231
203
203 204 205
232
233
ENLARGING HOLES
Counters inking Counterborlng , Spotfacing
205
205 206 207
29
CIRCULAR INTERPOLATION
235
235
235 236
ELEMENTS OF A CIRCLE,
Radius and Diameter , Circle Area and Circumference
QUADRANTS.
Quadrant Points
236
236
PROGRAMMING FORMAT
Arc Cutting Direction Ci reular Interpolation Block. Arc Start and End POlntS_ Arc Center and Hadius Arc Center Vectors, Arc Planes
237
237 237 238
2 1 2'12
212
213 213 214
238
238
239
214
215
RADIUS PROGRAMMING
Blend Radius Partial Radius
240
240 240
216
27 - PATTERN OF HOLES
TYPICAL HOLE PATTERNS RANDOM HOLE PATTERN STRAIGHT ROW HOLE PATTERN ANGULAR ROW HOLE PATTERN
Pattern Defined by Coordinates, Patlern Defined by Angle
217
217 217
218 218 218
L1~
80ss Milling Internal Ci rcle Cutting - Linear Start Internal Circle Cutting - Circular Start , Circle Cutting Cycle
245 245
246 246
220 220
221
247
247
248 249 249
222 223
224 224
250
250 250
225
226 226
PROGRAMMING TECHNIQUES
Direction of Cutting Motion
250
251
Table of Co ntents
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
xv
251
251
252 252
253
253
L5Ll
Steel End Mills Solid Carbide End Mills Indexable Insen End Mills Relief Ailgles End Mill Size Number of Flutes
276
276
SPEEDS
Coolants and Lubricants, Tool Chatter
APPLYING CUTIER
Methods, Cffset Cancellation, ::::utter Direction
OFFSET
254
254
256 256
277
278 278
STOCK
Infeed . In and OUI Ramping Direction of Cut Width and of CUI
279
279 279 279 280
WORKS
~:lok-Ahead
256
257
257
258
259
LOO
:JVERVIEW OF PRACTICAL EXAM RULES . MILLING
281
281 28
261
262
262
?fi2
Part Tolerances \,leasu red Part Size, Offsets Amount General Selting,
RAMMING SLOTS
Slot Example. Closed Slot Example
281
MILLING.
General Principles Pocket
2GO 265
Data Nominal or Middle)
266
TOOL NOSE
US OFFSET
266
266 266 266 267
267
RECTANGULAR
Stock Amount, ",,,,,'nm!,,,r Amount of Cut _ Semifinishing Motions Tool Path ular Pocket Program Example
286
286 287
287
287
288
Offset
268 268
CIRCULAR POCKETS,
Minimum Cutter Diameter _ Method of Linear Linear and Circular Approach, ng a Circular Pocket,
289 289
31 - PLANE SELECTION
WHAT A MACHINING IN PLANES
Mathematical Planes Machine Planes, Program Commands for Planes Definition, Default Control Status
269
269 269
269 270
270 271
289 290
291
CIRCULAR POCKET
292
- TURNING AN
T Address
LATHE OFFSETS
Offset Entry Independent Tool Offset. Tool Offset With Motion. Offset
BORING
293
293 293
STRAIG
MOTION IN
271
272
FUNCTION - TURNING
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
294
294
272 273
273
MULTIPLE
32 -
PHERAL MILLIN
275
OFFSET SETTING,
XVI
of RANGES
FUNCTIONS AUTOMATIC
298
299 301
301
320
1
32
321
301
302
Fillish
Stock and Stock Allowance
G75 GROOVE CUTTING G75 Cycle Formal 10T/l1T/15T G75 Cycle Format aT /16T/18T/20T/21T BASIC RULES FOR G74 AND
322 322
322
36 - GROOVING ON LATH
GROOVING OPERATIO
Main Grooving AP~)IICEmOflS Grooving Crltena ,
323
323
306
306
323 323
GROOVE
323
324
307
REMOVAL ON LATHES 307
307
308
308 309 309
311
Groove Width Selection Method
325 325
326
327
327
328
312
312
329
330
313
313
313 313 313 314 314
Radial Clearance
330
330
33
331
315
315 315
315
316
316
316 317
- 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
317
335
335
317
317
336
337
318
8
.il R 319
337 337
338
339
xvii
339
339
340
39 - SUBPROGRAMS
MAIN PROGRAM
Subprogram Benefits . ItJtJll\iflci;ltiull (.)f
340
341
341
SUBPROGRAMS
367
n::;
SUBPROGRAM FUNCTIONS.
ram Call Function . Subprogram End FunClion. . Block Number to Return to. . Number of ram Repetitions LO Call.
370
1
372
347
373
SU DEVELOPMENT.
Pattern Recognition Tool Motion and Subprograms . Modal Values and Subprograms.
348
373
374
MULTI
NESTING
352
One Level Nesting Two Level Three Level Four Level Nesting .
THREAD INFEED
Radial Infeed . Compound Infeed Thread Insert Angle Parameter A Thread Cutting Type - Parameter P
353
353
353 354
354
378
CHANGE SUBPROGRAM 100000 000 HOLE GRID.
379 379
355
355 355
40
DATUM SHIFT
Zero Shift.
381
381
381
THREAD RETRACT
Thread Pullout Functions Single AXlS Pullout Two-Axis Pullout
383
384
COORDINATE
Dat<'l Command Coordinate Mode
384
386 386
386
360
RMS.
360
OTHER THREAD
Thread Depth .
386
386
387
TAPERED
Depth and Clearances Taper Calculation Block Block Tapered Thread a Tapered Thread and a MultI
361
361 361
387
LENGTH OFFSETS.
Valid Input Range
362
387
388
363
Cycle.
363
388
MULTISTART
Threading Feedrate Calculation, Shift Amount
364 364
365 366
388
389
ENTRY,
389
389 390 390 391
392
THREAD
xviii
ATIACHMENT.
of
ntenls
413
413
41 - MIRROR IMAGE
RULES OF MIRROR IMAGE
393
393
393 394
Bar
ADDITIONAL OPTIONS
414
4 '14
414 4'15 415
PROGRAMMING EXAMPLE
415
395
395 396
45 - HELICAL MILLING
HELICAL MILLING OPERATION
Format, Arc Modifiers for and
417
417
417 417
4'18 18
E
Mirror Functions Mirror Image Example Mirror Image Example
396
396 397
398
THREAD MILLING,
Thread Conditions tor Thread Thread Clearance Radius Productivity of Thread
418
418
418
4'19
MI
IMAGE ON CNC
398
42
COORDINATE ROTATION
COMMANDS.
399
399
399
419
419
419
399
401 401
419 421
421
421
422
APPLICATION
401
422
423 424 424 425 425 425
43 - SCALING FUNCTION
PTION.
Function Usage .
405
405 405
PROGRAMMING FORMAT
405
406 406 407
THREAD MILLING SIMULATION METHOD HELICAL RAMPING
425 426
426 427
407
429
429
429
429
,130 430 430
409
410
L110
TAILSTOCK AND
TSllslock Quill. Center, Quill Functions Programmable Tailstock Safety Concerns,
410
410
11
.nl'l,<'Vlrv't
AND OFFSETS
Work Offset and B Axis Tool Length Oflset and B Axis
431
431 432
41 I
411 411
TO MACHINE ZERO INDEXING AND A SUBPROGRAM COMPLETE PROGRAM EXAMPLE MATIC PALLET CHANGER
411
81-DIRECTIONAL
Programming
INDEXING
412
412
Tab Ie of Contents RUNNING THE FIRST PART PROGRAM CHANGES Program Upgrading Program Updating . Documentation Change, ALTERNATE MACHINE SELECTION.
XIX
459 460
439
441
441
SHUTTING DOWN A CNC MACHINE Emergency Stop Switch, Parking Machine Slides Setting the Control System, Turning the Power Off, EQUIPMENT MAINTENANCE
445
4<16
51 - INTERFACING TO DEVICES
RS~32CINTERFACE .
465
465
466
48 - PROGRAM DOCUMENTS
'~,A
447
447
-.-
448
448 448 449
449
PUNCHED TAPE Tape Reader and Puncher Leader and Trailer Tape Iden11fication Non-printable Characters Storage and Handling, DISTRIBUTED NUMERICAL CONTROL TERMINOLOGY OF COMMUNICATIONS Baud Rate Parity Data Bits" Start and Stop Bits , DATA SEITING CON NECTING CABLES Null Modem Cabling for Fanuc and PC
469
469
469
469
469
469 470
PROGRAM VERIFICATION
CTION OF ERRORS. Measures Measures VERIFICATION, ERRORS Errors . Errors.
453
453
470 470
471
471
471 471
453 453
454 454
455 455
456
472
47?
',iMON PROGRAMMING ERRORS Input Errors "dation Ermrs Errors . : 'i!ilncous Error:J ,
473 473
473
473
474
- eNC MACHINING
:HJNING A NEW PART Integrity
457
457
458 458
XX
477 478 478 479
Hardware Specifications. Hardware Requirements, Features, and Post Processor
487 488
488
L188
S;ne ~ Cosine - Tangent Inverse Trigonometric Functions Degrees and Decimal Pythagorean Theorem Solvfng Rjght
480
480
480
481
IMPORTANT FEATURES.
489
489 489 489
489
482 482
MANAGEMENT,
483
483
483 483
490
490
490
THE END AND INNING.
PMENT
A - RE
NeE TABLES
491
491
rse Threads
Index
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.
t?e
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)
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
2
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
Chapter 1
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
5.
6.
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 many
the
whether
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
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 " . ...
NUMER
CONTROL
3
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.
o
Cl
o o o o
o
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.
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<l,n{llU'{l tooling, locators, automatic tool pallets and other advanced features, the setup time more efficient With a a comparable of a conventional good knowledge modern manufacturing, productivity can be increased significantly. , The of parts machined under one setup is Important. order 10 assess the cost a time. If a number of is machined in one setup, the setup cost per part can very" A very red~ctio~ can b~ achieved by grouping several different operDtlons IOto a .smgle setup. Even if the lime is longer, it may be Justified when compared to time required to setup conventional machines. 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.
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,
. 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
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. improvement in 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
Cl Cl
pter 1
cutting machines
Water
o
Q
Cylindrical grinders
Cl
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
Cl
Drilling machines
NUMERICAL CONTROL
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
PERSONN
FOR eNC
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
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.
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,
Chapter 1
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,
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~
CNCMILLING
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,
Many
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
Milling machine is a machine capable of a simultaneous cutting motion, an end mill as the primary cutting
'I" j'>
I
This definition eliminates all CNC presses, since covers pOSItioning not profiling. The nition also eliminates wire EDM machines a of burners, they are capable of a profiling action but not an end mill. Users these machine tools will still from m:tny covered The ciples are adaptable to the majority of machine tools. For EDM uses a very small cutter in the of a A cUlling machine uses beam as its cutter, also having a known diameter bUL term keifis used The will be concentrated on metal cutting machine of end mills as the primary tool contouring. mill can be in many ways, first look will or available machines.
Figure 22
8
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.
2 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
Q Q
eNC Vertical Machining Center - VMC CNC Horizontal Machining Center HMC 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.
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
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:
At times,
three and a
the type of of all axes vertical
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.
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!
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
......
_-
...
__
Description
1=
3 axes IXYZ) 780 x 400 mm 31 x 16 inches 20 575 mm 22.5 inches 380 mm 15 inches 470 mm
36
725mm 28.5 inches 560mm
Maximum travel- Y axis Maximum travel- Zaxis Table indexing angle Spindle speed Spindle output
nu:>t:-tlJ-t~1.1
22 inches
560 mm 22 inches 0.001 degree
18.5 inches
N/A 60-8000 rpm
40 - 4000 rpm
AC 7.5/5.5 kW
AC 10/7 HP distan ... ", - Zaxis 150 - 625 mm inches 430mm 17 inches
No. 40
AC 11/8 kW AC15/11HP
150 - 710 mm 6 - 28 inches 30 560 mm 1.2 inches
No. 50
Spindle
6-
CAT50
1 - 10000 mmlmin 0.04 - 393 in/min 30000 mm/min (XYI - 24000 1181 in/min (XV)- 945 iI\Imin Random memory 1 mm 4.1 inches
350 mm 13.75 inches 20 (2)
Tool selection
Maximum tool diameter
...
memory
80 mm (150 w/empty pockets) 3.15 inches (5.9 w/empty pockets)
Maximum
length
300mm 11.8
6 kg
131bs
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
Because their flexibility and complexity, CNC zonlal machining centers are priced significantly than vertical CNC machining centers. 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!'..
the programming point
Chapter 2 parl of the way towards the part Ihal area chine tool resources. spindle. bOlh meet in the be machined using all the ma-
eli
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
of Axes
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.
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
described by the
type
o
... an engine lathe type ... a unique slant bed
oREAR
SIan! bed type is very popular chips to operator and, in case an accident, down a area, towards the chip
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
.
I
CHUCK
/
!
JAWS
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
Figure 3-1 Typical configuration of a two axis slant bed eNG lathe - rear type
t ..... "
xx+
X+
TAILSTOCK
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.
QUILL
Z- . . . . . Z+
" t .....
XX-
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.
X+
"
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.
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.
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
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 There is more in
four-axis lathe
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. 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
Machine Specifications
lathe, with two axes and a slant
Description
Number of axes Maximum swing over bed
Specification
Two (X, Z) or three (X, Z and C)
diameter
length
12
0.1 second
Six-axis lathe
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
Motorized
Number of rotating tools Rotating tool speed Milling motor
12
30 . 3600 (Imin
AC 3.7/2.2 kW AC 5/2.95 HP
M16 metric
5/8 inches
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.
circular) can
Q Q Q
of various forms (including taper and performed, depending on the control model
p. U or X address (G04)
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
5,
a
Q
a
o
X axis can
Tailstock can be programmable Automatic
2m" .. "rv,
At mon
Q
Q
some fealures and codes nOI make sense - they are included for ,,,r,"'''''1> only. Com-
a a a
R and II Kin
Thread available with six-decimal place accuracy (for inch units) Least input increment in X is 0.001 mm or .0001 inches on diameter one half of that value per side
Constant surface speed leSS) is standard control (G96 for CSS and G97 for r/min) Absolute programming mode is X or Z or C
nr:rl~m,.'ntlll nrn"'''"rnnllnn
Q Q
mode is U or War H
COORDINATE GEOMETRY
The length of division on the scale re[>re~,e unit of measurement in a convenient and 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
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.
as
RECTANGULAR COORDINATE
2D
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
called
Coordinate System
o
r:J
Zero integer.. .
Positive integers ... (with or without sign) Negative integers ... (minus sign required) Fractions ...
Decimal fractions
L 2,
10,12943, +45
T " ..
o o
-381, 25,-77
T
1/8, 3/16. 9/32, 35/64
0.1
.546875. 3.5
-,
-;
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,
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
15
16
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
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.
-I
AY
1'1
1--+
1
T
X axis
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:
ORIGIN
Figure 4-4
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
Yaxis
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.
horizon-
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,
I I- 1-
'1--1-"
I -I
-I
1 +-1-
X axis
The word quadrant (from the Latin word quadrans or quadrall1is, the fourth parI), suggests four uniquely defined areas or quadrants. Looking down in the top at the two intersecting axes, the following definiapply to quadrants. are mathematically correct and are used in CNC/CAD/CAM applications:
Figure 4-3
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.
GEOMETRY
17
Y+
counting starts at the positive of the horizontal 4-5 illustrates the definitions.
.,
P2+
... Yaxis
II _ Quadrant I X+Y+
-1--1-+ --i--I-JiIo.
xX
-r--I-~1~~I-~-r-I--~.. I-
x+
..,.. P1
- ---- .....
.. I
1--1'- -+ -I
-u'+ "
P4
Figure 4-7
is determined solely point in a particular quadrant and its relative to the origin - Figure
ON
,
Coordinate definition of points within the rectangular coordinate system (point PI = Origin XOYO)
""""""""~,--"--
QUADRANT I
,
,-""""",
If these directions were hand, they would "",..r"''',... ''" of thumb or finger in the X direction, middle
+
Figure 46 Algebraic signs for a point location in plane quadrants
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,,",
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).
o
0
UH'"",,,,'VlI
W",UlIlI
Chapter 4
, X+ REAR LATHE
,
~--I"""-
FRONT LATHE
VERTICAL
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.
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.
r~~"'-""""
TOP VIEW
ISOMETRIC VIEW
Primary axes __ Secondary axes Arc center 1..\--+---+--+--+--+ - - vectors Rotary axes
,
X axis related
4-11
Yaxis related
Zaxis related
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
1--1 \
OPERATION MENU ON I OFF BUTTONS,
Figure 51 A typical example of 8 Fanuc control panel. actual layout and features will vary on different models (Fanuc 16M)
19
20
5
control unit - the work in conjunction anything useful on its own. if the program itself tons and keys are by control over the program "''''''''''''''.'''
GENERAL DESCRIPTION
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
ERRORS
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 D
o
ON
0
BLOCK SKIP ON
ALARM
0
MACHINE LOCK ON
OPTIONAL STOP
M-S-T LOCK
ON
@
OFF
@
OFF
@
OFF OFF
@
OFF
DRY RUN ON
@
OFF AUTO
OFF
ID MDI
TAPE
175
125
1
150
70 60 50
80
90
EDIT
MODE
Y
X
80 60 40 30 20 15 10
5
4030
20
10 0
ccw
EDIT
...!
,-_._-
80
90
110
120
0
CYCLE START FEEDHOLD
OVERRIDE %,
OVERRIDE %
AUTO
EMGSTOP
CONTROL
21
Description
Power and control switch for the main power and the control unit Feature
Feature
Description
automatic operations
Allows program execution from the memory of the CNC unit Allows program execution from an external device, such as a desktop
ONI
switch Start Emergency Stop
Feedhold
AUTO Mode
MEMORY
Starts program execution Or MDT command all machine and turns off power to the control unit motion of all axes
Allows program run one block at a time Temporarily stops the program execution (MOl required in program)
mode
mode
computer or a punched tape Allows to bt: made to a program stored in the CNC memory
Allows manual
Selects
EDlT
Single Block
Optional Stop
MANUAL
Mode JOG Mode RAPID Mode Memory Access
Block Skip
Dry Run Spindle Override Feedrate Override Chuck
Overrides the programmed spindle usually within 50-120% range Overrides the programmed feedrate, usually within 0200% range
Error lights
Red
an error
Clamp Clamp
Coolant Switch Gear
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
Selection
Spindle Rotation
Spindle Orientation Tool Change Position Handle Tailstock Switch Indexing Table Switch
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
Manual Generator (MPG). used for Axis Select and Handle Increment switches
switch to manually Tailstock and/or IJUOUI'v"1 the tails!ock
MOl Mode
22
Handle
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.
Chapter 5
SYSTEM fEATURES
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
y
X
Z
...... AXIS
SELECT
x1 x10
x100
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. 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:
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.
II
Handle Multiplier
Xl Xl0 Xl00
"
"
The Fanuc control system parameters belong to one of three groups, specified within an allowed range:
o
o
o
codes
Units inputs
Setting values
CONTROL SYSTEM
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
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!
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
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
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 reasns.
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
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
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.
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.
n>Jl
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:
where ...
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
To find the length program in/eel. when the capacity is known in charaCters, use the following fOlTnula:
IG'i"
where ...
CONTROL SYSTEM
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.
~ Formula 3 .
To find the number of characters in a given program, if the system memory capacity is known in meters:
feedhold
Feedhold is a special push button located on operation panel, usuatly dose to the Cycle Start bulton. When this button is pressed during a linear or circular axes 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.
Q Formula 4:
To find of characters, if the system memory is known in feer, use the following formula:
C
f
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.
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
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 feedrare override (rapid traverse) (modifies the rapid motion of the machine toof)
(modifies the programmed spindle T/min)
CONTROL SYSTEM
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.
""A/~r""'"
quired
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: /'
The new feedrate calculation, based on the selling, i~ similar to that for spindle speed:
where ...
Fn
Fp p ==
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
where ...
So ::::: Optimized - or new r/min
Sp
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.
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.
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
Spindle functions lock Tool functions lock
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
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
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.
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 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.
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,
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.
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.
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.
Part complexity
Manual programming /
.nfTmllr...
programming
drawing /
data
o
o
o Machining sequence
Tooling selection
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.
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.
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
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
Chapter 6
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.
PART COMPLEXITY
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.
J
Advantages
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,
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.
PROGRAM PLANNING
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
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.
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:
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.
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 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.
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
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.
--a
,
170
170
By
110 .-
lI
bl
Dr.: Chk.:
App ..
61 A title block 8xa'mDIB of an .mn,iflFlF!rinn drawing
6-2 Program using ABSOLUTE dimensions Only one change in the program is necessary
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-
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
._",......:
I
60
A drawing dimension specifies a hole as 075+0.00/-0.05 mm. What actual dimension should appear in the program?
al
70! ----.--' 40 ---' 60 --."
Figure 6-3
Program using INCREMENTAL dimensions Two (or more) in the program are necessary
Fractions
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,
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) ,
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
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.
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 ..' ' - ' ' - ' ' ' "
Drawing Revisions
Another important section the drawing, often overlooked by CNC programmers, shows the ..... ,,<u,!",'''''' (known as revisions) made on the drawing up to a date. or the designer identifies such changes, usually with both the previous and the new value exampl~:
REV' 3 / DIMENSION 5.75 WAS 5. 65
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
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
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
- REAM 2 HOLES
is a has 12 mm
PROGRAM PLANNING
37
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.
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.
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-<n,,,,I1<", system, the spindle can be calcuper minute (r/min): Machinability rating in the English per minute (ftimin). Often
For a
calculation, the
Hole 4
Figure 6-5
Il3r'
12
1000 fVmin
=
=
to
be
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
re-
mlmin = n: (pi) =
D
Program planning is not an independent dividual - it is a very interdependent and cally coherent approach to achieve a certain
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
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.
selec-
Efficiency of usage
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
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.
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.
Cutter
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
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'"
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
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.
of in can be comis not always in everyday programming. experience is often a bener teacher than formulas.
1
(\End
-i:-- ,6
/.
T r"
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
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
Identification Methods
Chapter 6
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
6-8 Coordinate
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,
Scaling a sketch is a and unprofessional that creates more problems than it ness or incompetence.
Digits
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
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 others, depending on the options.
Word
A program word is a combination of alpha-numerical creating a single to the sys-
Each term is very common important in programming deserves own detailed explanation.
Character
A character is the smallest unit of CNC program. It can have one of
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
o Digit
o Letter
Symbol
Characters are combined into meaningful words. This combination of digits, and symbols IS led the alpha-/wmerical program input.
41
42
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.
Chapter 7
6 IF
Words
F2 7 5'. 0'
Block
011
N15,
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.
block written is no\. No spaces characters.) but are only allowed before [he
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:
o Tab
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
G01
PreparaJOI)! comml1J1ti
Format
o
o
Fixed
IDO
D2S XS.75
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.
mos
HOI YO
IIwnber
CoordiJlaJe word zero l/aJue SpiJuUe speedjuJlctioJl CoordflllJJe word - Jleg(llive value
92500
z-s .14
F12.0
TOSOS
TOS
/MO 1
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.
43
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.
position
N25 G90
GOO
X13.Q Y4.S
MOB
Sequence or block number Absolute mode motion mode Coordinate location ON function
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
N5
Two digits maximum, no decimal point or sign digits maximum, no decimal point or sign Five digits maximum, no decimal point or
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
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
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.
Short Forms
Control manufacturers often specify the input format in an abbreviated - Figure 7-2.
Address Notation
Description
Rotary or
A+5.3
8+5.3
X 5
3
B
--Number of digits decimal pOint Decimal paint allowed Number of digits decimal point Positive or negative value possible Described address
1+4.4 (1+5.3)
degrees Rotary or Indexing axis - unit is - used about the Y axis Cutter radius offset number (sometimes uses address H)
Feedrate runction - may vary
4I-iII-iII-4I-e
02
F5.3
-----..
_--.-
F
G
H
and/or
length
Figure 7-2 Word address format notation - X axis format in metric mode shown
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
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
Y axis
J+4.4 (J+5.3)
Notation
,,~,"~,~ ~"""~"~~'"
Description
"
K+4.4 (K+S.3)
04
D
Fixed cycle repetition count Subprogram repetition COUnt
044
(053)
E2.6
M
N
M2
'''p,>",....~
F2.6
may vary
G2
1+4.4 (1+5.3)
Preparatory commands
Arc center modifier Taper height in X for X axis relief in G73 Direction of
X axis
P4
Subprogram number call Custom macro number call Work offset number - used with G 10 Dwell time in milliseconds Block number in main program when used with M99 Depth of peck in fixed cycles
G73 and G83
L
M
N
L4
M2
N5
s
T
o
p
04
in r/min
14
x
y Y+4.4 (Y+5.3) Z+4.4 IZ+5.3}
-----ooi
conds
value
u
US.3
Description
input Chamfer for direct
input
C+4.4
(C I 5.3)
45
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.
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 parameters.
is {he same as
X125.0
SYMBOLS IN PROGRAMMING
In addition to the basic symbols, symbols for applic(ltions. scribes all symbols available on the Symbol
Description
Fractional
Positive value
""''','''ES,
must always be programmed. If the the number becomes positive, with (in this case the tool position):
an
Comment
of a number
Symbols supplement the and digits and are an integral part the program structure.
or
PROGRAM HEADER
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)
Minus sign
*
/
Multiplication
in
Fanllc macros
Block skip function symbol or divisioll sign in Fanuc macros
!I
;1
I
#
I Sharp sign
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
Within the program, each tool
(*** T03 - 1/4-20 PLUG TAP ***)
Chapter 7
identified as well.
the X change
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
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.
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 . )
(--CUTTING MOTIONS WITH TOOL TOl ----)
(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)
(CLEAR ABOVE PART - COOLANT OFF) (HOME IN Z ONLY-SPINDLE OFF) (OPTIONAL STOP)
(-- 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
---)
(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)
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.
Example C:
N3 G90 GOO
N4 NS N6
N7 X13.0 YlO.O
C
N3
Example 0:
N2 G90
GOO
N4 ,
NS .
N6 .
N7 X13.0 YlO.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.
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.
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:
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!
C
C
N4
NS
Example A :
Example B.
N3 G90
N6
47
Chapter 8
G code
G code
Rapid positioning Li near interpolation Circular intcrpolallon clockwise Circular interpolation counterclockwise Work coordinme Local coordinate
GOO
GOl
G02 G03
G55 G56
G57
Work coordinate Work coordinate offset 3 Work coordinale offset 4 Work coordinate offset 5
GlO
Gll
G15 G16
G58 Data Seni ng mode cancel Polar Coordinate Command cancel Polar Coordinate Command G59
GSO
G61 G62 G63
G17
G18 G19 G20 G21 G22 G23 G25 G26 G27
Automatic comer override mode Tappi ng mode CUlling mode Custom macro call
G64
English units or input G65 G66 check ON Stored stroke check OFF Spindle Spindle fluctuation detection ON fluctuation detection OFF G67 G68
G69
G73
G74 G76
GSO
2)
G31 Skip function Culler radius compensation cancel
G40
compensation -
decrease
G48
G49
G98
G99
PREPARATORY COMMANDS
49
G code Description
G54
G56
G57
G59
G code
GOO
Description
Rapid posilioning
G61
G62 G64
GOl
Linear illterpolation
Circular
G03
G04 G09
Dwell (as a separate block) Exact Stop check - one block only Programmable data input
Data Selling mode cancel
units of input
- Z axis direction Setting)
Gl0
Gll
G23
G25
G26
s
Spindle
G28 G29
Machine zero return (reference poinl I) Return from machine zero point 2)
(G roup type B)
(Group IYpe B)
G94 G94
895
CUlling cycle B
G35
G36
G96
50
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 ratory 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
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.
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
Modality of
Earlier, the following C was used to the general placement of G codes into a program block:
~ Example
N3 G90 GOO N4
N5
c original:
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) :
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
Word Order in a Block
block, after the block number,
51
GROUPING OF COMMANDS
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. 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-
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
Group Numbers
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
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:
(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
The G
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:
N48 X2. 5 Y2. S
All three blocks contain the same another. The program can by simply entering the total dwell
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
52
Type
G04 GIl G30 G45 G52 GSl GSO G70 G74 G09 GIO
Chapter a
byO
MIT MIT
00
Unmodal G codes
MIT MIT
M T
G CODE TYPES
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.
T T
01
Motion Commands,
GOO GOI G02 G03 G32 G35 G36 G90 G92 G94 Gl9 G90 G91 (U and W for lathes) G22 G23 G93 G94 G95 G20 G2l
MIT
T T
-----+---1
M
02 03 04
05
M T
Stored Strokes
MIT
T
Feedrate
Radius
MIT
Offset
G40 G41 G42 G43 G44 G49 G73 G74 G76 GSO G81 G82 Ga3 GB4 Ga5 Ga6 G87 GSS Ga9
M
M M
08
Tool Length
Offset
09
10
Cycles
M
M
M M T
11
12
13 Coordinate System Cutting Modes 5 G56 G57 GSa G59 G6l G62 G64 G63
G66 G67
MIT
M
MIT
M
G6a G69
17
18 Input Speed Fluctuation
T
M
24
MIT
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.
MISCELLANEOUS FUNCTIONS
..'"".... '"'.~., M a CNC neous jUnction, sometimes
all the
lun'-UIJfI.\
a miscellaa
Not of a of
All for metal removal by have certain common features and capabilities. For example, can three - and only three ble
Q
itself. The more sui tab Ie term miscellaneous is used throughout this UW1UL'VVr....
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 . spetwo other and
Spindle rotation Gear range change Automatic tool change Automatic Caolant operation Tailstock or quill motion
CW ATC
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 <II'UC!,rpTn
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
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:
M04 MOS
Coolant ON (coolant pump molar ON) Coolam OFF (coolant pump motor OFF) open Chuck close
il<;lo{'k quill IN
:ription
"""'=
M13
M17
TailSlock quill OUT Turret indexing rurward Turret indexing reverse ;pi oriental ion (optional}
Compulsory program stop Optional program stop End of program (usually with reset. no rewind)
~ rotation normal
Spindle rotation reverse Spindle stop Automatic lool change (ATC) Coolant mist ON Coolant ON (coolant pump motor ON) Coolant OFF (coolant pump molor OFF) ;pindle orientation Program end (always with reset and rewind) Feedrate override cancel OFF Feedrate override cancel ON Automatic pallet change (A
B axis clamp
Tailstock forward Tailstock backward Thread gradual pull-out ON Thrcad gradual pull-om OFF Program end (always with reset and rewind) Low gear selection Medium gear selection 1 Medium gear selection 2 High gear selection FeedralC override cancel OFF Feedrate override cancel ON
;ubprugl"uB call
Subprogr{lm end
M07 MOS M09 M19 M30 M48 M49 M60 M78 M79 M98 M99
(deactivated) (activated)
( deactivated) (activated)
(nonstandard) (nonsfandard)
M9a M99
Description
Compulsory program stop Optional program stop End of program (usually with reset, no rewind)
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
M03
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:
Group
Typical M-functions
..... "uv,, .)
Program
Spindle
4 MOS
Tool change
Coolant
M06
M07 MOB M09 M10 Ml.2 Ml.7 M21 M78 M11 M13 MiS M22 M79
Accessories
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. place immediately, when
.""y,,,,U,,,,,, - at the start of the block?
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
2.
3.
Will the place while the tool is on the way - during a motion? 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
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
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
into two
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
M function activates at
(when the tool motion has been
of a
cOl1nDl~!ted
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).
""''''",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
""='"'=~==-==9
t. no rewind)
OF A BLOCK
M01 M02
M05 M09
Spindle stop
Coolant OFF (cool an! pump motor OFF) Program end (always with resel and rewind) Automalic pallet change (APC)
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
M30 M60
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.
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
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
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:
o
o
o Coolant function
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
57
o
In the program itself, issue a comment section with the necessary information. comment section must be enclosed in (three versions shown):
[Al
[8]
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]
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
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
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
Result of MOl
ON
OFF
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
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
Program End
the program must include a of current program. are two
Chapter 9
Percent Sign
percent sign (%) after M30 is a special stop code. This symbol terminates the loading of a from an external It is the
M02 and
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.
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
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.
MACHINE FUNCTIONS
Miscellaneous functions relating to operation of the tool are of another group. This section the most important of them in detail.
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
Is M02 the Same 8S M30 ?
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 Mis! ON Flood ON Mist or Flood OFF
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 %
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 Heat dissipation
xo
YO
(E:tiID OF PRQGR.ll.M)
On some controls, the M30 function can be used together with the axes motion - NOT recommended !:
N65 . . . N66 G91 G28 XO YO M30
%
OF PRQGR.ll.M)
o Chip removal
o Lubrication
FUNCTIONS
primary reason La use a coolant flood aimed at the 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:
will never be a situation when the coolant reaches a hot edge of the tool
IS
C)
N110 M07
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
Spindle functions
all aspects of conprogram. Miscellathe spindle control its
Chapter 12 - Spindle trolling the machine neous functions that are rotation and
NSOO M09
ON:
OFF.
Lion is always relative to a viewpoint is lion along the spindle center lion in such a view is as M04. assuming the
0\.L1,llV<.U\J
clockwise of rota point of view. The spindle as the towards itsface. CW rotaas M03, CCW direction rotated either way.
pro-
Coolant ON, when programmed with the axes motion, becomes active simultaneously with the axes motion (Example 0) Coolant OFF, programmed with the axes motion, becomes effective only upon completion of the axes motion {Example E)
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.
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
M03
<:
9
CW)
M05
<:. M04
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.
<. . .
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
o
Automatic tool change (ATC) Tool shift during a boring ",",or<>+i,," and boring cycles only)
Ranges
M function
N/A
Gear
None programmed
Low range High range Low range Medium range High range law range Medium range 1 Medium range 2 High range
2 available
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 In conclusion. the M 19 gram. It IS aVailable as a ... r~'''''''''''''''' chine operator for
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.
Ar.r.fHrt~n
Machine
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
M function
M06 M60 M23 M24 M98 M99 Automatic Thread gradual pull-out ON I OFF Subprogram call J Subprogram
Description
M M
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
o o
Block number
Preparatory commands
G
M
a
o o
XYZABCUVW ...
I J K R Q ...
S FT
o Speed,
or tool function
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
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.
Nll G43 Z2.0 S780 M03 HOl N98 GOl X2.1S Y4.575 F13.0
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
<:>
rectory more descriptive useful. The program description can be read on display screen provides an easidentification of program stored.
In lathe examples. block N67 a rapid motion to an XZ position, as well as a few other ("''''''nm,<ln,'l<: the tool nose offset startup activation of the tool (T0202), the coolant ON function M08. The example in block is a typical circular interpolation block with a
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
OJ.005 (LOWER SUPPORT A.RM: - OP 1) 01006 (LOWER SUPPORT A.RM: - OP 2)
the control screen display can show only the siXfeen characters the name, the "'''IV'''!H'''''
PROGRAM IDENTIFICATION
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
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 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.
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.
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)
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.
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-
SEQUENCE
63
Sequence Block format
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
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 5
10 100
N2, N4, N6, NS, N5, N10, N15, N20, N10, N20, N30, N40, . ..
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
-
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
block number
I~
- - <- " " " " - - <
1 2
5
10
50
100
99999
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.
mo
N40 GOO G41 Xl.S zo T0303 Moe NSO GOl X-0.07 FO.Ol N60 GOO WO.l M09
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
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),
"""'1"1"''' in
10
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<X.J,, of the part geometry the cutting tool program is modi manually, the part Ua.'LlV''''''" is not accurate any more. Any CNC program should al ways be reflected in the source of the program, as well as its result - never in result alone.
zo.os
T0303 MOS
X3.S
ZO
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
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.
Numbering Increment
in any physical order - they can also be programming UI..,",<l ..",,,, they are logical numbers in serves no useful purpose neither do duplinumbers. If the program contains dupl icate and a block number is initiated at the control system will only for the first the particular block number, which mayor block required. search will have '""1-"_"'"........ from the string found reason for the in the sequence numbering-is to to the CNC operator the program has into the
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
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
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
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
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-
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
or
66
10
PROGRAM COMMENTS
included within (he program body as
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
e Example A :
NJ30 MOO (REVERSE
What contains is simpJy not logically possible. It instructs the control to:
e
N330 MOO
8:
(REVERSE PART / CHECK
'Set the English system of dimensions, also set the system of dimensions and set the XY plane'.
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
Example C:
PART / CHECK TOOL)
IS
N330 MOO
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.
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
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
01001 (SHAFT
DWG B451)
(TOl - ROUGH TOOL - 1/32R - 80 DEG) (T02 - FINISH TOOL 1/32R - 55 DEG) (T03 - OD GROOVING TOOL - 0.125 WIDE)
CNC unit is limited, usi ng comment cal. It will listed in proper required details.
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
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.
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
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:
e Example A
Nl2 Nl3 N14 NlS Nl6 Nl7
G90 GOl Xl 5 G90 Gal XS.O G90 GOl XS.O G90 G01 Xl.S G90 GOl Xl.S G90 GOO Xl.S
N2l GOl X1S.35 Yll.348 N22 G02 Xl6.85 Y12.848 Rl.5 N23 GOl
or
N22 G02 Xl6.85 Y12.848 Rl.5 11.5 JO
68
EXECUTION PRIORITY
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. Here are two unrelated blocks used as examples:
N410 GOO X22.0 Y34.6 S8S0 M03
Chapter 10
Functions (hat will be executed simultaneously with the cutting tool motion:
M03 M04 M07 MOS
Functions that will be executed after the cutting tool motion has been completed:
MOO
MOl
MOS
M09
M98
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:
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
D
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 G21
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.
Selects English units (inches and feet) 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
units:
units:
X value
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:
Many programming terms use abbreviations. terms between the two mensional systems (older terms are in
English
ftlmin (also FPM or SFPM) in/min (also IPM or fpm) in/rev {also IPR or ipr} (also IPT or ipt)
In it is unwise to control system aTe n ..",';.",; system will trol functions will work.
even if the selection of the difference how some confollowing functions will one system of units to the
(eSS - for CNC lathes)
F
kW
HP
o
o
a
number of rlol"i..,.,,,1
o
o
Screen position
Manual pulse generator the HANDLE (value of flllIll<;!II'lII1'l. 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
Reference to a common point on the part ... known as the for ABSOLUTE input 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
Preparatory Commands 690 and G91
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.
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
0 0
/
3
-
, I
G91
---
0
1
'4
cF~ 1r1_
/:
---
,/I~
'
I
I
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. 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:
Absolute dimensioning - measured from part origin G90 command will be used in the program
-- -01
,/L-______________________
~
__ _
//~/ :J:.:_~:_:_ _
:START AND END
=I===:I==I==.!
Figure 11-2 Incremental dimensioning - measured from the current tool location G91 command will be used in the progrom
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,
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.
72
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 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.
Chapter 11
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
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.
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 on a CNC lathe can be
as
programming and Normally, the defauh ler programming. The changed to interpret the X
GOO X4. 0 GOO X2. 0
Dia.me/erdimellsioll
R(Jf/ilis
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).
Units system
Metric
Minimum increment
0.001 mm .0001 inch
In the
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. mode, the intended X mOlion will Inlhe U as a distance and be programmed as on n direction to 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:
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
of minimum
Minimum increment
.~
Converted equivalent
.00003947 inches
0.00254
..
metric system,
(ABSOLUTE START)
GOO ..
Even to this day, data can be one of the four possible ways:
Q
mo.o
(X95.0)
(Xll.2 0)
Z-40.0
ill 7 . 0
(Xl16.0)
o Decimal
74
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.
is a very imponant issue, knowing how the interprets a number that 110 decimal poim is for all motion commands and
Chapter 11 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
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:
X6250
rOs
X0000625
The metric units input of 0.42 mm, also applied 10 the axis, is written with the lending zeros suppressed as:
X420
the X axis,
X00000420
when
to
The same dimension of 0.42 mm with the suppressed will appear in the program a,,\:
X0000042
zeros
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
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
Zero suppression is a great improvement over full programming It was <ldaptation of a new format that reduced the number of zeros in thedimensional input Many controls still support the method of 7~ro suppression. but only for reasons of compatibility with old and proven programs. Zero suppression means that either leading or trailing zeros of maximum input do not have [0 be written in the CNC The result is a great reduction in program The default has been done by the control manufacturer, although default mode can be optionally set by a parameter. Don 'I allY WiThoul a reason!
the dimensional input the syslem can accept eight digits, withoUl a decimal point, ranging from 00000001 to 99999999:
o o Minimum: Maximum: 0000.0001 inches 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
75
- inches
Input
Decimal point
XO.OOOl XO.OOl XO.Ol XO.l Xl. 0
leading zeros
suppression
Xl XIO XIOO X1000 XlODOO
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 dwell
X0000050
zeros
a No
a
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
Input value comparison - millimeters
point Leading zeros suppression
XOOOOOOOl XOOOOOOl XOOOOOl Xl-O XIO.O XlOO.O XlOOO.O XIOOOO.O XlOOO XIOOOO XlOOOOO X1000000 XIOOOOOOO XOOOOl XOOOl XOOl XOl Xl
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.
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,
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
=>
X, Z, U, W, I, K, R, C,
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
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);
Y12 56 Y12.56
11
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
In some
is is
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:
H l r . . . ",,, -
selling of a system the decimal point and they will asas X25.0, not
xO.s
Y40.0
:::
X.5 X40.
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 Standard Input
i
Z-O.l
F12.0
;:;
Z-.l
F12.
Calculator Input
X345
... etc.
X345.0 XL 0
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.
Xl YO.67
Z7.48
YO.67
Z7.4B
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 '('<lInn,,,,! 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
On
SPINDLE FUNCTION
to spindle speed is conS. The programis usually within the range of point is allowed:
51
10
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-
59999
machines is not unusuaJ to For many high to five digits. in the range have spindle available of I to 99999, within S
51 to 599999
.. r/min
.. 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
Direction for Milling
Chapter 12
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,
look from the headstock towards the spindle face.
M03
M04
The first and proper method will establish the relative viewpoint starting at the headstock area of the lathe. From this position, looking towards the tailstock area, or into the same general orea, the clockwise and counterclockwise 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! 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.
R/H tool- CW
Figure 12-1
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
Headstock
CCW= M04
cw
ccw
Figure 12-2
y
Tailstock
CW= M03
Typical view of a slant bed two axis CNC larhe. CWand CCW directions only appear to be reversed Figure 12-4
CCW= M04
SPINDLE CONTROL
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.
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
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)
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
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:
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.
N1 G20
N2 GSO X13.625 Z4.0 T0100 N3 G96 S420 M03 (SPEED SET - ROTATION STARTS) N4 .
<:>
m
G20
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).
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
N1 G20
(ROTATION SET) (NO ROTATION) N4 G96 GOl ZO FO.04 T010l S420 (ROTAT. STARTS)
Selection is a matter of personal preference. 020 in a separate block in not necessary for Panuc controls.
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 ...
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.
Chapter 12
but it will
method may result in a slightly longer easier to read and maintain it, mainly with limited experience. can be
asa
Nl.20 MaS
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
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
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
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.
Figure 12-6 Built-in notch in 8 tool holder used for correct tool orientation in the spindle - not a/l machines this feature
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_
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.
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.
= = = = =
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
peripheral
type must tool or the part:
= =
.1415
x 15)
n",,'I"'(''''
is an acceptable allemaformula:
rim in
12
ft/min
1t :::
for milling,
Again, by replacing the constant 31 with constant 320 somewhat inaccurate, but within an acceptable most
is 150 fUmin,
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
(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.
previous formula is
same, but
units are
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
83
G96 S M03
G97 S M03
o Example 1 :
""rl-""c> speed is set right after
coordinate setting,
and
~
GSO (or
command:
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 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
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:
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
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 . spindle max.
N1 G20 N2 GSO X24.0 ZS.O TOIOO N3 G96 S400 M03 N4 GOO X2.0 TOlOl MOB
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-
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
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.
E>"_'~L~O
N5 G96 S400
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.
mrevolutions per .. _,,~.,~~ spindle ma:u.mlUI11 setting is clamping. Do not position register
Nt G20 TOIOO
is a simple solution to this problem, using a feature available and other ""_"rA'~ mode can be highest limit,
program function setting is normally G50. called maximum spinthis G50 with its other is an example:
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.
(1500 R/MIN MAX) SPINDLE RANGE) AND 400 Fl' /MIN) CENTER L.I.NE)
,~._.
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
to
as
a During
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
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.
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!
Use caution when presetting maximum r/min of the spindle!
12
11
ft I min x r I min
I@"
where ...
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. 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 N38 GSO S1250
= = ftlmin = 1t = r/min =
12
Diameter where CSS stops (in inches) Multiplying factor - feet to inches Active surface speed Constant 3.1415927 Preset maximum spindle speed
x 350) /
(n
x 1000).
D ==
3.82
ft I min
r I min
Double mealling
SillglemeaniJlg
For completeness, the formulas based on the English system, can be adapted to a metric environment:
::=
86
I1iilf' where ...
12
If these requirements are met, the most important source data is spindle speed actually used during machining.
stops (in - meters to mm Ac:t:ive surface speed Diameter Muftiplying
= D 1000 = mlmin =
1t
optinrum spindle speed is known, the cutting (eSS) can be calculated and used any other tool
r/min
::::
requirements
are met
Just
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.
- Metric
ft I min
the preset value in the program is S1200 and the surface speed is selected as G96 S165, the ess will be damped when it reaches the mm
D = :::: :::: (1000 x 165) / (1t x 1200) 43.767609 043.768 nm
e EXAMPLE:
drill works very speed in ftlmin?
:
at 756
IS
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 requirements
C EXAMPLE:
well at 1850 -what
is
m/min = (3.14 x 7 x 1850) / 1000
will be satisfied:
Q
Q
= 40.66
Machine
Q
Q
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.
FEEDRATE FUNCTION
word in the program is
of digits. The number of digits following the F depends on the feedrate mode and the machine tool application. Decimal place is allowed.
FEEDRATE CONTROL
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 Two feed rate types are in CNC ......nil'Y"1:Ilm""
o o
for
most typical format for feedrate minute is F3.1 English system and F4.1 for metric system.
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.
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
in G codes
for ma-
range of the
Milling
Turning Group A
Turning Group B
Turning Group C
G94
G98
G99
G94
G94 G95
In milling, the programming command (0 code) for the per minute is For most it is set autype of a 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
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 Millimeters per revolution
o
CI
speed - in rev/min
Tool diameter! M J or the tool nose radius [ T J
For
part
o
o
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
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.
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:
Exact stops increase For used on older machines, they may be required in some cases.
FEE
CONTROL
89
01304
CUTTING)
Command
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'''
01301 (NORMAL CUTTING)
~3
N13 GOO X1S.0 Y12.0 Nl4 G61 GOl X19.0 F90.0 N15 Y16.0
N16 XlS.O
of F90.0 (in/min);
in re-
By adding the GOg exact will the motion in that motion in the will start.
01302
~3
(G09
I'"'r'l"I""l'TU':!'
GOO X1S.0 Y12.0 N14 G09 G01 X19.0 F90.0 N15 G09 Y16.0 ~6 G09 X1S.0 N17 Yl2.0
point
f\
Target point
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
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.
Tapping Mode
90
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
Chapter 13
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
In case of arc (after applying cutter may be much larger or much smaller than the arc programmed to drawing dimensions.
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:
The
G62 USED
G64
lEi" where ...
Figure 132 Corner override mode 662 and default 654 cutting mode
CONSTANT fEEDRATE
In Chapter 29,
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.
FI == r/min : : :
F.
n :::;
feedrate (in/min or mm/min) Spindle speed Feedrate per tooth (cutting edge) Number of cutting edges (flutes or inserts)
up-
F.
F~
FEEDRATE CONTROL
\ ......
\
91
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
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
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.
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
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
'\~",\ \
'O~
Q,iJ
100 110
// ~
'<0
r/min =
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
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
The Rmtlx is
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
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 ",
Chapter 13
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
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
N14 N15 N16 N17
8500 M03
(usnro
TAP 12 TPI)
N19 M48
mo GOO X. Y M05
N21 MOl
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.
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.
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 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 e
English - Fanuc
F 0.0001
control:
/()
10
E :::: O. 000001
Metric - Fanuc
F '" 0.001
E
::0
control:
to
10
0.0001
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
M49
Feedrate override cancel function is ON. which means feedrate override is inaclive
TOOL FUNCTION
ly controlled machine using an automatic must have a special tool functlon (f7ifncion) 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.
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 o
Fixed type
To understand the is to understand the general tool selection, available for many centers.
rnn,nJ>'"""
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 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~,
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:
T04
(MroCE TOOL 4 READY)
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
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.
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,
TOOL FUNCTION
95
Q Example:
N81 TOl
Programming Format
Programming format for the T function used on milli~g systems depends on the maximum number of lools aVaIl-
N82 M06
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
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.
The X and Y axis positions of the tool must be selected in a clear area The next tool must be previously selected by a T function
---- . - - - - - - A program sample illustrates the tool (ween tools in (he middle of tile program illustrated in Figures 10
MAGAZINE SPIN
Chapter 14
( T02 IN SPJlNDLE) ( TO 3 READY FOR TOOL c:.Hll1NGl~) (MACHINING WITH (RETRACT FROM ",,,,,,,,,,,,,,,\ (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
N81 . .
..
N76 represents the end of machinIt will cause tool T02 to move
zero
same optional program stop lows in the block N77. 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'''''''''''''' 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~'"
TOOL MAGAZI
SPINDLE
T02
Front view
Figure 14-3
TOOL MAGAZI
\ /
'
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
10
Figure 14-4 ATC example - Block NBD (new tool waiting == next tool)
TOOL FUNCTION
97
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.
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. 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 o
Maximum tool diameter Maximum tool length
Of~toOI
GAUGE LINE
TOOL
NGTH
J (
i OVERSIZE TOOL;
/ 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!
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
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. 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:
1.
..........
-.~~-
.....
Chapter 14
MDI Operation
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.
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 tool designation represents any tool in the CNC program between the first and the last tool
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
o T02 '"
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. Regardless of the machine 1001 used, two conditions are to perform the ATC correctly: always
T03
T99
tool designation represents the last tool used in the CNC program
... tool designation an empty tool (dummy tool) as an empty tool pocket identification
aXIs IS
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
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.
TOOL FUNCTION
01401
N1 G20
(FIRST TOOL
I .........
G2B Z MOS
GOO X . Y M30
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.
In
lool is in the way of part changing, it remains "I.u ............ permanently for the job.
N3 M06
As
N4 G90 GS4 GOO X Y S.. M03 '1'02 ('1'02 READY) (APPROACH WORK) NS G43 Z Hal MaS
.. >
(TOl MAClUNING OONE) (TOl TO Z HOME) (SAFE XY POSITION) (OPTIONAL STOP)
G28
M30
x..
M06
(T02 CALL REPEATED) (T02 TO SPINDLE) G90 GOO GS4 X.. Y S.. M03 T03 (T03 READY) G43 Z H02 MOS ' .......rfiJu....'..n WORK)
T02
N50 '1'03
N51 M06
N52 G90 GOO GS4 X Y
N69
mo
100
The filled-in table below shows the status of tools for the
Chapter 14
Tool Waiting
?
in Spindle
? ?
Tal
?
T02 T01 WORKING T02 TOl T03 T02 WORKING T03 T02 TOl T03 WORKING
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.
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
TOl Tal T03 T02 TOl WORKING T02 TOl T03 T02 WORKING T03 T02 TOI T03 WORKING
T03 T03 TOl T01 TOl T02 T02 T02 T03 T03
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)
< ... m2 working .. _>
N46 N47 N4S N49 GOO Z.. M09 G28 Z MaS GOO X . Y
MOl
NSO T03
N51 M06
(T03 TO SPINDLE) NS2 G90 G54 GOO X Y.. S M03 TOl (TOl READY) N53 G43 Z.. H03 MO] (APPROACH WORK)
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.
G28 GOO
Ma6
Z .. MOS x .. Y
mo
%
IDO
FUNCTION
101
",,,u.,,,,,,.
method is not without a a tool in the spindle, it or part changing. in such a way that part setup (spindle
Since there is
is
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)
01404 N1 G20
(APPROACH
(TOl MAcmNING DONE) (Tal TO Z HOME) (SAFE XY POSITION) STOP) (T02 CALL REPEATED)
(T02 TO S M03 T03(T03 READY)
NJO T99
N31 M06 N32 TO)
NJ3 MOO
T02
M06 G90 G54 GOO X Y . G43 Z NO.2 M08
N34 G90 G54 GOO X . Y.. S . M03 N3S G43 Z.. HO:;! MOS
WORK)
(APPROACH WORK)
<,
N46 N47 N48 N49 N50
N51 N52 N53 N54
T02
GOO Z.. M09 G28 Z MOS GOO X Y
>
(T02 MAan:NING DONE)
>
(T02 MACHINING OONE)
(T02 TO Z HOME) (SAFE XY POSITION) (OP"l'I(JN.!!,L STOP)
TO Z
(SAFE XY POSITION)
MI9 MOO
(SPINDLE ORIENTATION)
(STOP AND UNLOAD TOl MANOALLY)
NSO T03
N5l M06
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) CALL REPEATED) TO) (T03 TO SPINDLE) M06 G90 GS4 GOO X . Y S.. M03 TOl (TOI READY) (APPROACH WORK) G43 Z.. H03 MOB
< . 103 working, . , > < ... 103 working .. " >
N66 GOO Z M09 N67 G28 Z M05 N6S GOO X Y
mo
N69 MOl
M06
OF PROGRAM)
NIl M30 %
1
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.
Chapter 14
must return to
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)
GOO Z M09
G28 Z .. MaS GOO X Y MOl
N30 T99
... >
(TOl MACHINING DONE) (Tal TO Z (SAFE XY POSITION) (OPTIO:N1\L STOP)
001 MOG
N32 N33 N34 N3S
(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)
(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)
(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)
MOG
< .. .
N66 N67 N68 N69
workiJlg .. . >
(T03 MACHINING DONE) (T03 TO Z HOME) (SAFE XY POSITION) (OPTIONAL STOP) (TOl TO SPINDLE) (END OF PROGRAM)
NSO MOO
NSl NS2 N53 N54
('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
GOO Z M09 G2B Z MOS GOO X.. Y . MOl mo M06 N7l lOa %
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
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.
the
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
G28
z..
(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
CNC lathe models start adopting the tool to with many more away from work area.
(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
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
Tool rndexing
N66 GOO Z . M09
N67 G2B Z MOS (TO 3 MACHINING DONE)
N68 GOO X .. Y
N69 MOl
(OPTIONAL STOP)
(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
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 Tool station number is GEOMETRY offset number
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.
104
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:
1001
Chapter 14 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.
The first pair (the first and the second digits). control the index station and the geometry offset.
~ 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'''.''
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.
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
figure 14-10
Geometry Offset
Geometry the same as the turret operator measures and fills-in the gestation number. ometry for all tools used in the program.
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
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
if-r---'
Wear Offset
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
tip detail
the
I
II
1/
I
1/ ;- PATH
I
PROGRAM
Figure 14-14
/
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
N32 T0400 M42 N33 G96 S450 M03
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,
N34 GOO G42 X3.0 ZO.! T0404 Moa N35 GOl Z-l.S FO.Ol2
N36
The R column is (he radius column. the T column is tip orientation column (Figure 14-
When the machined part is inspected (measured), it can have only one of possible inspection results:
o
o
Q
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
ON size
m
RADIUS
External diameter
Size OK
Internal diameter
Size OK SCRAP
Recut possible
Figure 14-15
OVER size
UNDER size
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
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
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 Relationship
Machine tool
n1o""",",,n
The common point here is that all cannot useful without some 'leam they have to interact. work
that
purposes, these relationships and interactions are based on one common denominator of each en- a reference point. 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:
Workpiece Tool
+ Drawing + Material
+ Cutting tool
maiep!~nOent
.. Tool
or Command point
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.
In a typical language of a
o PART {workpu~cells a
engineering design developed in a company that does not manufacture machine tools, control systems, or cutting and holders.
H ......... ""'"
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. All
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 have a - they are they are actual values programto work with individually as well
as
107
108
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
Chapter 15
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.
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 J53 illustrate both views.
MACHINE
view
152 Top view of a vertical machine as viewed towards the table
/'0 ...." 0 .. 1
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
REFERENCE POINTS
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
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
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
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
[) Accuracy of machining
o
o
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
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
Program Zero - Machining Centers
part are both parallello
IJvr\<Tr"' ......
Chapter 15
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. Step 2.
Study how drawing is dimensioned, which dimensions are critical and which are not
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
1210 75 . \
THRU
1.0 r-~
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.
-....
!
4.0 1020
x 0.5
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.
MACHI
PART
N LOCATORS
Figure 154
Three-pin concept 01 a parr setup (all pins have the same diameter)
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
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
REFERENCE POINTS
111
If the choice is between Version J and 2, select Version 2 and make sure all negative signs are programmed correctly. 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.
FIXED JAW
0
y l
I
MOVING JAW
--x
Figure 15-6 A sample part mounted in a machine vise Version 1
~ <: -:I
X
0 LU
-:I
<:
(!)
0
,'"
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
0 ::E
>
y
i !
--x
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.
FIXED JAW
o
o
)
MOVING JAW
y 1
x:..;
nr--9--~
I '
--x
figure 15-7 A sample part mounted in a machine vise - Version 2
h\!
~__0
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.
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
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
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
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.
z
o Chuck o o
,_[tpl / __
'.
,
Stock
X J
_.
-...1
---
.
-----
CHUCK
Stock
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.
JAW
~
-- < _.'
Stock
)",,~ ~
-
X
!
- - -
-~
P,ART
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 toofs
All
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
rell~ISli:::r
Position register
as
FROM the program zero, TO .. the tool current position, measured along the axes
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
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
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
from 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.
113
114
Chapter 16
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
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.
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
REGISTER
115
change posi1001 from the pro statement. This
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.
Programming Example
To illustrate how to use the position a part program for vertical have to be followed:
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.
o
o
The cutting tool should be changed first G92 must be established before any tool motions all the cutting is completed
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.
N'7 N8
~
(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)
(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
the with Fanuc and similar controls. 050 092 command:
MACHI
If 092 is
a the command is similar:
Figure 76-3
8
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.
Tools lAtn'''''tn on the part center line Tools working externally on the part Tools working internally on the part
for each group is understood well, it to any tool within a group, tools used.
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 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
REG
COMMANDS
117
zero to
for
Figure 166 Typical G50
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
concern relating to long tools is {"lp~r~lnt'p area, mcluding chuck those tools where the
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.
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
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
NB MOl
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
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 %
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 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.
the programmer and machine
term is used in the same meaning limited replacement of the culler is not covered at all for its obsoleswill be on positioning of the t~"."r,"~ the part.
Like
screens,
IJV~"LJ\.)" compensation is that requires mput the CNC maspecifies the number, the operator enters machine, using appropriate setup.
Programming Commands
and similar controls. there are four preparatory available to program position com-
G47 G48
Double increase in the Iprogr~lmrne( by double the compensation amount Double decrease in the programmed direclio1n by double the compensation amount
'- DESCRIPTION
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!.
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 ..
Incremental Mode
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:
G91 GOO G45 G45 Y . H32
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
(NO x MOTION) (NO Y MOTION)
N6
x .. H31
or
G91 GOOG45 X . D31 G45 Y D32
(D31 STORES THE X VALUE) (D32 STORES THE Y VALOE)
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.
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.
TABLE
1 '-.... 11111--_ _
H31---
MACHINE ZERO
H32
.\
PROGRAM ZERO
J"'"
\ PART
__ ~ _ J ._
o 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
'-1
H99
17
13
.'
"j,--
--15 ;-'"
17-2
Position compensation applied to different target locations: zero, positive and negative - see 01701 program Pll::l'mn/I'!
xo
H31
is a non-zero and
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:
H98 H99 = -150.000
will
interpreted as
However,
(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:
G91 GOO G46 X-l.S H31 will be
r",'or,,'/]
N6 G91 GOO G45 XO H98 N7 G46 YO H99 N8 G28 XO YO N9 G90 GOO G45 X9.0 H98 NlO G46 Y17.0 H99 Nl1 G28 XO YO N12 G91 GOO G4S X9.0 H98 N13 G46 Y17.0 H99 Nl4 G28 XO YO NlS G90 GOO G45 X-1S.O 898 Nl6 G46 Y-13.0 H99 N17 G28 XO YO Nle G91 GOO G4S X-1S.0 H98 Nl9 G46 Y-13.0 H99 N20 G28 XO YO N21 M30 %
TARGET) TARGET)
as
X+
16.5000
(INC' Y+ TARGET)
(AES X-
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/ ).
G45
TARGET) Y- TARGET)
122
control syslem will the way it was (symbol orr means an the and direction of
N3
17
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.
G90 G90
Gn G9l
G90
G90
G45
G46
G45
G46
G45
-> -> -> -> -> -> -> -> -> -> -> ->
0
0
0 0
G46 G4S
G46
+ + + +
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.
G4.5
G46
G45 G46
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.
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
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
are available on
The six work coordinate systems Fanuc control lowing preparatory commands:
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
to independvalues input into measured from the maare up to six work zero positions can be relationships, using
[X]
MACHINE ZERO
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
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
Chapter 18
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.
t
>N
o
PART PROGRAM\ ZERO \.
0)
(!)
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
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.
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.
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.
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
x=
Y
= -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:
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
II3f'
where ...
A == Actual motion length (distance-to-go displayed) M = Measured distance from machine zero P == Programmed absolute target position (axis value)
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
Be very careful when adding a negative value - mathematically, the double signs are handled according to the standard rules:
PLUS and PLUS becomes
G54 [X]--'
a + (+ b) == a
+
PLUS
PLUS and MINUS becomes
a + (- b) = a - b
0--r
I
WoJ+------'-----I
MINUS
MINUS and PLUS becomes
3. 1
_t
a -
(-I-
b) == a - b
MINUS
MINUS and MINUS becomes
a -
(- b)
:::
-I-
PLUS In the example, plus and minus combination creates a negative calculation:
-10 + (-12) = -10 - 12 = -22
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:
If any other work offset is programmed, it will be automatically replaced by the new one, before the actual tool motion takes place.
126
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.
Nt G56 XS.5 Y3.1 NB GBO ZI.0 M09 N9 G9I G54 G2a ZO MOS NlO MOl
Chapter 18
r--,...
G56 X G55X
G54X -
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.
Figure 18-5 Using multiple work offsets in one setup and one program. Three parts shown in the example,
... will rapid from the current tool position, to the program zero position of theftrst part.
G90 GOO GSS XO YO
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)
... 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
N2 G17 G40 GSO
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. 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.
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)
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.
,...----, - r
~:!'~-:-Dr;c
, G54
........ .. ................. "" . . . . .,
--
G56
" _ _ M.
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
8180
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.
0, -
~~8~,g
-...j
t:O
1""._ _-""-,""""--,-""-,""""""
80
128
Chapter 18
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.
o 00 o 00
(EXT)
(COM)
LATHE APPLICATIONS
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
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:
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
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).
t:){tlll/ul/::
of an
GEOMETRY OFFSET
No.. X
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:
TIP' _. _ _ ...1
0 3 2 0
WORK OFFSETS
129
Wear Offset
The wear offset is also known and used on milling controls, but only for the tool length offset and the cutter radius
TOOL SETUP
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
WEAR OFFSET
No.j X OFFSET. Z OFFSET
01 02 03 04 05
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
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.
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.
T01
GEOM (Z)
o
o
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.
~
~
LU (!)
--- - --<;
,,
Figure 18-1 7 Typical geometry offset setting for CENTER liNE tools
130
Turning 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
Chapter 18
Boring 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.
0.0016
a typical geometry for a turning (external) tool and Figure 18-13 illustrates a typical geometry setting a boring (internal) tool.
-1~-
0.0016
Figure 18-12
RO.0156 TOOL
GEOM (2)
RO.0313
b
I
0.0136
0.01
Figure 1814 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 1813 Typica/g8ometry offset setting for INTERNAL tools
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.
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 Actual tool length is unknown
GAUGE LINE
AT MACHINE
I.L
SPINDLE MOTION
()
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.
co
I-;I
.J
Fjgure 19-1
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
labia lop Face
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:
Chapter 19
WEAR
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
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
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.
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
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
G44
G49
offset
HOD
H.. Tool
offset cancel
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
G43 z-O. 625 H07 .....
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
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:
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
-8.855
any distance-to-go calculation along the Z axis. mentmlg with other settings may be useful.
Zd :::: Wz +
S' where ...
+H
=
~
Distance-to-go along Z axis Work coordinate value position in Z (Z coordinate) of the applied H offset number
Example - Wz = 0:
..... where:
G54 Z is set to lO, Z axis '"''"'"..........'... is 0.1 and HO 1 is set to then the distance-to-go will
~
==
:::::
The
In
distance-lo-go will be
sure the fomru1a is always correct, try to
Example Wr = 0.0200:
.0 and the
re-
= =
"'"
The result is ",.., ...."""l"1t the tool will travel towards the distance-to-go will
In the last
Example - Wz
0.0500:
The program
-'
\
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
1
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.
Chapter 19
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
Q
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.
Total of all three previous dimensions (distance between the tool gauge line and the table top}
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
LINE MACHINE ZERO
for
'i
r
1A
it is
Figure 19-3 Z axis relationships of the machine, cutting tool, table top and the height
... it is based
TOOL
OFFSET
1
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.
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 .
04
05 06
8.5000
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:
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.
GAUGE
UNE-
GAUGE
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 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:
the master tool and place it in the spindle.
Figure 19-8
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!
4. Instead of registering the measured value to the tool
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
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,
643-G44 Difference
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:
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
G44
Plus offset
Minus offset
Tool length offset Tool offset ~:I""_"""
G43
G44
G43 G44
Plus direction
Minus 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
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
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
or
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
LINE
It is
{hat the
actual Z axis is culated. USing G43, the H value will be added (+) in the calculation. Using 044, the H offset value will The a~avel motion will be:
"'/U"bn (-).
043: 044:
Z + H06 Z - H06 :
(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.
Figure 19-7 illustrates one of two ITlF'.r"v" to sel a length command - 054 or other work must be used.
GAUGE LINE
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 .
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
i""iII----
Chapter 19
Y2.8
Y2.8
GAUGE
LINE
GAUGE
LINE
Setting tool length with G43 tZl and G92 (XYj mnr''''ITn
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:
In an improved program. the tool plied 10 Ihe firs! mOl ion command of
IS
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)
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)
mo
(TOOL pas REGISTER (TOOL POS REGISTER Z) (SPINDLE COMMANDS) (Z APPROACH MOTION) (Z CUTTING MOTION)
RAPID "-"' . ......,.'" (Ml\.CHDl'E ZIi:RO RBTORN z)
(OFFSETS
CANCELLATI~
(END OF PROGRAM)
POSITION
(END OF PROGRAM)
N13 M30 %
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
01903
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 %
(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}
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 N12 Nl3 Nl4 Nl5 Nl6 Nl? Nl8 Nl9 N20 N2l N22 N23 N24 N2S N27 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
GAUGE LlNE
mo
%
Figure 19-11 Setting too/length with 643 (Zl and 1.:1'!)~f-U~" (XY) program 01903
N28 N29
N31
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
In this example. Figure 19through 059, (he blocks N2, N3 gether without a problem,
N2 G90
N3 ...
Also note that is no tool offset cancellation. Cancellation will also explained later in this chapter.
140
Chapter 19
. 0.1 L C
!
007
H07 H27
I
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
LOa I
/
/3
~hows
"",,, . . methods of programming can calculating the difference manually, multiple tool length offsets is Lo allow fine groove width example - program
,H.,,VH.
~- 1213.5
,.
I
01905
(TWO TOOL LENGTH OFFSETS FOR ONE TOOL)
Figure 1912 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 1914 Full circle milling - subprogram 07000. Start and finish of cutting is at the center of the groove. Figure 19-16 Typical tool length offset setting fOf a Program zero is at the face 0/ the
tool.
H07 is used botmill and H27 is the ~,~ ..'''' ... mill. D07 is for cutter radius only. Figure 14 shows the tool motions in subprogram 07000.
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
G54Z(N
..
10
Z
Nl76 G49 Nl77 G91 G28 ZO
',:
method
the offset
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
also be started with the length offset (under program contra!), usually In the block or initial The
Chapter 19
safety line
rule is quite explicit - any 028 or 030 com{both execute the tool return to the will cancel the tool length automatically. 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.
the tool
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
A CNC machine tool does not chips. From the moment the in a program. it goes through a (lons - some are productive (cutting), (positioning).
GOO Command
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:
""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
Example A:
From the tool change position towards From the part towards the tool Motions to bypass obstacles
part
o
Q
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
modal and reanother command of the GOl command in changes the feed rate is reproat block N23. used. It is
in
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
lions in towards a
on a lathe),
o
o
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. Some terfere examples of physical obstacles that can intool motion are:
POSITIVE
X axis NEGATIVE
POSITION
Single axis motion for a ma,r:mllina center application (XY shown)
1 !
e
e
y
"--
fixtures, rotary or
part itself, etc.
table.
machine
o
FOR LA THES :
Tailstock quill and body, chuck, steadyrest, face plate, fix1ure, other tool, part itself, etc.
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
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
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
sketch for rapid motion examples
11.812 0.91
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
rates usually
rate for both axes is the same (XY rapid mosuch as 394 in/min, il will take
= 1.44 seconds
deviation different rapid rate for each axis
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
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
= 1.44
seconds
= 0.525
seconds
.-,-
.-, . .-
to complete the Y axis motion. In this case, the resulting motion will also include an angular departure, but not at because of the different rating of rapid traverse rate axis. During the 0.525 seconds (which is the common time to both axes), the X axis motion will travel
0.525 / 60 x 394
= 3.448
inches
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
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.
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.
RAPID POSITIONING
along each
can
time:
1.440 sec.
Y axis time:
3.54 - .7B7) x 60) / 394
~
0.420 sec.
Figure 206 Rapid motion override switch set to 100% of rapid rate
I:l
Z axis time:
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
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. 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:
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
Note that the modality of GOO rapid motion command does nol require repetition in the subsequent
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
Chapter 20
Zaxis
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:
N314 G90 G54 GO 0 X10. 0 Y8. 0 S1200 M03 N31S G43 ZO.OS Hal
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).
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-
Z:::: UP (TOP)
I XV:;;;
WORK
RIGHT
i y-
,~ ,
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
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,
Although the design of CNC machining centers models, there are only four possible locations for zero, within the XY view:
o
Z:::: UP (TOP)
MACHINE ZERO POSITION
o
o o
<'
,
~j
Z-
I~
- X + .........
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
y- ' ~ ! WORKAREA
Figure 21-2
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.
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.
150
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:
Chapter 21
x+ Z+
x + Y+ Z+
x- y+ Z+
The other two comers (lower left and lower right of the XY view) are not used as machine zero.
lathes
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
Manually - using the control panel of the system 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.
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
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:
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.
151
For maN67 1328
Program Commands
are four preparatory commands relating to chine zero position:
G27
Machine zero reference position return check
block - this is an
incomplete instruction. At least one axis must be specified with the G28 command, for example,
No7 1328 Y
G28
G29 G30
reference
position
reference pOSii
which only send the Y axis to the machine zero reference position, or ...
N67 G28 Z .
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.
will only send the Z axis to the machine zerO reference position, and ...
N67 G28
x ..
Y Z ..
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.-. (MACH:INE ZERO R.E'I'ORN Z AXIS) ZERO REI'URN XY AXES)
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 G28 in block N23! must be If the command is omitted, last motion command programmed will be effective, for example, GOO or GO]!
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.
Chapter 21
MACHINE
/ /
I
!
, Y4.0
make the equal to zero and move cutting 1001 to the zero directly. This is done by specifying (he errne<jlaile point as identical to the current (001 position in absolute mode - or - by specifying a zero lool motion in incremental mode.
/
I
........ -
POINT
27-4 Intermediate puifll lor machine zero return XY axes shown
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
G90 GOO xs.o Y4.0 G2B X5.0 Y4.0
(MACHINED HOLE) 1t"la1...rL\.N,c, ZERO MOTION)
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 ..... ' ..
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 Comp,are the two program are identical in terms
( -,. G28 USED IN THE ABSOLUTE G90
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)
Nl2 GOl Z-O.7S F4.0 MOS N25 GOl X9.5 Y4.874 N26 G28 Z-O.7S Ma9
(~>
IN ABSOLUTE MODE)
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:
G90
GOO XS.O
G90
Y4.0
X12.0
La
produce
same
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
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
in an expensive and
serious error.
MACHINE
RETURN
1
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
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 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
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
By this
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\
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
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
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 coneel.
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. motion to machine zero, the current tool motion must be equal to zero for each axis specified with the G28 command.
o In G9l
XOYO
1
N24 N25 N26 N27 N2Q GOO GOl GOO a28 G29 N29 Mal Z-0.43 Z-O.75 ZO.l M09 ZO.l MOS X9.5 Y4.B?4
21
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
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 o Retract the Z axis above work in one block, then return XYZ axes to machine zero
Retract the Z axis all the way to machine zero, then return the XV axes in the next block from the current tool position
To retract the Z axis all (he way \0 then return the XY axes in the next Option 1. return the Z axis to
N26 G28 Z-O.7S M09
zero:
zero as weJl:
options.
MACHINE ZERO POSITION
Hole location in XY axes is X9.5 Y4.874
0,
zi
r-------+ ~I
/'
/'
xv
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
~t
NI
J
/'
MOl
~I
/' /'
/'
/'
e Option 3
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:
N26 G28 X9.5 Y4.874 ZO.l M09
Figure 21-5
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
N2l N22 N23 N24 N25 N26 N27
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
for Option 3:
followed by a return
LO
the
posi-
The molion
Step 1: Step 2:
1<1'-"11:'<;;
LWO
Also note rearrangements ofM09 neous Turning the coolant tical than stopping the spindle.
miscella-
5
Return for CNC lathes
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
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
o OPTION 1 ...
... is only reasonably safe, of cycle time. may
o OPTION 2 ...
cffil'i"!nt
one of all
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
Horizontal machining centers reach its reference position For safety extra grarruned as well, along Wilh sian with an adjo.cent tool in the
G91 G28 YO ZO MOo
POSITION
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
216
Machine zero return (rom a hole depth. turning application
xo BO
Absolute mode designation follows the same rules for a rotary or indexing axis, as for the linear axes.
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
Q Example 1 :
The first example does not use 028 machine zero return command at all:
N1
Chapter 21
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)
Q Example 2:
The second example will use 028 machine zero reference command. to achieve the same target position:
N1 G20 (EXAMPLE 2)
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. 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:
N8 G27 G40 X7.58 Z2.0 T0400 M09
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.
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. 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.
157
(LATHE EXAMPLE)
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)
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. A schematic sketch 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
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
IS
~.85
,
I
I
/
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. 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.
6.80--'-- 7.62
Figure 21-7 AutDmatic return from machine lero position
G28 G29
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'\"",<n""~.M"Irnlno- They come
158
21
i&
where ...
G30
P
:::: indicates the selection of a secondary reference position :::: can be P2, P3 and P4 to identify
the
XVZ
:::: is the
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
IS
x..
Y ..
same as
G30 Pl
x ..
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
o Vertical motion
o
y
axes
Angular
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.
4 -+--'--+--+3 2
~~~~~~~-i~ -~~--,.f-
LINEAR COMMAND
a
1 2 3 4 5 6 7 8
: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
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
y
Motion from
X2.0 Y1.0
22
5
4
3
1
O~~----~~~~-~~-X
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' ......" .......
o
22-2
1 234 567 8
linear motion is
(
j nterpolation
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
j.
Motion from
X2.0 Y1.0 to X6.0 Y3.0 Figure 224 Three axes
3
2
PROGRAMMING FORMAT
In order to
1 234 5 6 7 8
a lool motion in the interpolacommand GOI along with one, Lool maLian, as well as a feed-
Three
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-
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,
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
a defined tool motion can
In
LINEAR fEEDRATE
The actual be programmed
two
mm/min or in/min mm/rev or in/rev
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
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<ltp
a certain
/"--r
,
,-.
TURNING
Figure 22-5 Oal8 fDr the calculation of individual axis linear feedrate
.0001 inch
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.
to
the end
at
That means the actual travel motion is either known or it can be calculated:
Xc
Zt
14.5
= 7.25 -
10.0
6~O
= 4.5
= 1.25
162
y
above formula is root of the total sum value of 4.6703854 as common, based on the square sides, that win travel length in the
22
5
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 ....
1 2
3 4
5 6
1.
Fx = 4.5
4.6703854 x l2 = 11.562215
Fx = 1.25
4.6703854
12
3.2117263
n.o
(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
e
Fx
2:
4.6703854 x 12
= 0.0
G90
(ABSOLUTE MODE)
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.
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
(P1 TO
TO P7) TO PO) TO P5)
\,
TO
TO
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.
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.
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.
/ 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 .
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.
-"
164
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.
Chapter 23
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.
=
C
two
NS GOO XlO.O YS.O Z2.0 / N6 GOl ZO.l F30.0 MaS N7 Z-l.O Fl2.0
N8
NS GOO X10.0 YS.O Z2.0 / N6 Gal ZO.l F30.0 M08 N7 Gal Z-l.O Fl2.0 M08
N8
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 <I dry run mode, to bypass the coolant flood during verification, if no manual override is available.
....o\, ...
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'\ 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:
The processing result
LJ",,""fHUlI"
(RAPID MOTION)
ron,""'Tl'"
(RAPID MOTION)
(FEEDRATE MOTION)
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.
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:>
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
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!
Any eNC program containing block skip function should be checked at least twice.
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
X3.35
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
I I
~.
N111
I z I
co
h~
X-O.OS
I I N7 I
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.
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
........... ~----------~
........------.-------~~.........~~~----...:...
Chapter 23
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
CUT
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.
X-3.0 Y4.0
X11.0 Y4.0
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
X43.0
-"L-;.I---X35.0
Figure 23-3
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.
167
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.
02304 (MI.LL.ING EXAMPLE)
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
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. 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. 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.
N1 G21 N16 N17 N18 N19 G90 GOO G54 X30.0 Y2S.0 MOS G43 Z2S.0 S1200 M03 H04 G99 GS1 R2.5 Z-4.0 F100.0
XI05.0 Y75.0
mo
1) 2) 3) 4)
5)
6)
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 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.
ci
M
a
I
X X X ><
I
LO
uj
a Lri 0 a co ......
a (")
><
J
X
I
<0
r....:
a ......
I
uj
$
6
1
I
I"'i"'\
I $-+.
w -$ - + 5 4 <B- '-- -$ - I 2
5-
<it
-$-
$3
I-
Y75.0 Y54.0
f!1
0 0
t
0 ..... ><
Y25.0
a 0 C"')
X
a
I.()
......
Y75.0
X
I-
<0
r....:
a ..0
$-
5' Y25.0
47 4 -$ 47 3
1
Y75.0
-$1
$- -
-$.
Y25.0
Figure 23-4 Program 02304 - variable machining pattem for a milling application - result with block skip OFF (top) and ON (bottom)
Figure 23-5 Program ()2305 - variable machining pattern for a milling application . result with block skip OFF (top) and ON (borlom)
168
02305 (MILLING EXAMPLE)
Chapter 23
j--X3.0
,/
I
~~~=t~-
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
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
169
02308 (TRIAL CUT FOR TAPER.
trial cut will also the actual machining, but for a di reason - Figure 7.
..N
In the next
'!WO TOOLS)
ci
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
/ (T02 TR.IAI.. COT DIA IS 4.46 INCHES)
X4.37S - X3.87S
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
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
/ 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
/ 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
/ (TRIAL CUT DIA IS 4. 428 m:::H:E~S
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.
/ 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
Program Proving
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.
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
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.
02309 (TURNING EXAMPLE) Nl G20 G40 G9S
Chapter 23
N2 N3 N4 NS N6
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
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 .
[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:
N2 .. Nl
SKIP GROUP 1)
(BLOCK. SKIP GROUP 1)
N4
N16 N1?
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.
/2 Nl8
N19
(BLOCK SKIP GROUP 2) \"""-"'-"-'" SKIP GROUP 2) (BI,ocK SKIP GROUP .:2)
N29
NlO
/3 Nll
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
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.
I N4
Numbered block skip function is not i:lVCllll:lDle on all controls.
INl
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.
PROGRAMMING APPLICATIONS
Programming a dwell is in two applications:
o
and can
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.
is
Each application is equally important to programmers, although the two are not used simultaneously.
Applications for Cutting
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.
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
Dwell Command Structure
The structure - or format - for the
X5 3
Chapter
function is:
us . 3
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.
1304 X2.0
is equal to
1304 DODO
1s
= 1000ms
lms = O.OOls
II:~
Leading zero suppression is assumed in the format withpoinl (trailing zeros are out the
Pl
POOOl
POOIO
P01DO
where ..
s = ms second millisecond
pl0
Ploa
pYt[ferredfor long dwells n. pnd"erred for short or memwn dwells ... l(jJhe in seconds
p'
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-
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
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
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
(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
DWELL COMMAND
173
~ee~ too unreasonable, but are they really necessary? Give Jl a Itnle thought or - even better calculate it If the dweU
MINIMUM DWEll
During a cut, is for operations where cuttino tool is
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
= 0.125
less than
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 calculation and other issues related to it are shortly.
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
Time Setting
Regardless which formal is used, all dwell values in specify dwell time of 143 which is a second. It is allowed to m one program, but such a practice not represent consistent slyle.
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
G04 PlOOO
to 1000
the duration
one revolution
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
~
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
x 3 / 420 = 0.429
System Setting
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 XO.429
G04 P429 G04 UO.429
If the control
G04 >3.0
G04 P3000 G04 m.o
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:
It
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
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
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
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 '"
formula:
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
175
e:>
SSOO
G04 X1200.0 S1S00 G04 X1800.0
MOS
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.
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:>
(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
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.
24
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
program control!
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 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. In 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):
a Step 1:
Rapid motion to the hole location ... along the Xand/or Yaxis Rapid motion to ... along the Z axis point of the cut
a
o
o
2:
3: 4:
POINT-TO-POINT MACHINING
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.
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.
177
178
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
%
25
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.
Y3.40
->-1--+----'
Y1.89
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
%
A fixed is called in program a ratory G command. Fanuc and similar control the following fixed cycles:
High speed peck drilling cycle
G74
G76
GSO Gal
G82
Drilling cycle with dwell Peck drilling cycle
cycle)
G83
, , L. " J L
G87
GSB
Nl N2 N3 N4
G20 Gl1 G40 GSO G90 Gs4 GOO XS.9 Yl.89 S900 M03 G43 Zl.O HOl MOB
Ga9
FIXED CYCLES
179
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.
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.
= Z depth
P = Dwell time
o
Programmed in milliseconds (1 second
PROGRAMMING fORMAT
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):
= 1000 ms)
IN .. G.. G.. X.. Y.. R.o Z.. P.. Q.. 1.. J.. F.. L.. (or K.. )
Explanation of the addresses used in fixed cycles (in the order of the usual block appearance):
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. o
Dwell time can be in the range of 0.001 to 99999.999 seconds, programmed as Pl to P99999999
___________N = BI_o_ck n_um b_e_r__________~ ____ __ __ . 'Within the range of Nl to N9999 or Nl to N99999, depending on the control system
When used with cycles G73 or G83, it means a depth of each peck
When used with cycles G76 or G87, it means the amou nt of shift for bo ring
The addresses I and J may be used instead of address Q. depending on the control parameter setting.
I
o
= Shift amount
G (second G command)
o
Cycle number
Must include the X axis shift direction for boring cycles G76 or G87
G86~. GS7
G76
Gel
Ge2 GSS
Ge3 Gag
o
= Shift amount
~1 1~
o
________
F_= F_ee_d_r_a_te __ __
s_pe_c_if_i~ t_io_n________~ __
= R level
ThiS value is expressed in in/min or mmlmin, depending on the dimensional input selection.
180
Chapter 25
GENERAL
tions,
are
language programming but about a Fanuc or gramming, a Milsubishi or example. Fixed cycles are
discipline - it means there are jimitaprogramming is not a a lot with it. We talk
Caution: In case of command .and a motion command of Group in same block, the order of programming those commands is important
GOO Gal x .. Y.. R .. Z .. P .. Q.. L F ..
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:
fixed cycle is JIot processed, but be performed; other values will tion of the F feedrate value, which is
uations at all costs!
In this chapter, lhe individua1 fixed cycles are
in detail and each cycle has an illustration of structure.
a
a
Absolute or incremental mode of established before a fixed cycle is anytime within the fixed cycle
can or
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 Manual motion and direction Boring bar shift and direction
G90 must be programmed to select the absolute G91 command is required to select the incremental Both G9D and G91 modes are modal! 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 the cycle will be executed at the current tool position.
a
a
a
o
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). Address P for Ule dwell time designation cannot use a decimal point (G04 is not used) - dwell is always programmed in millisecon~s.
\
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. 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.
ABSOLUTE AND
VALUES
~ 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
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:
/----->t
/
- R LEVEL lO--+-
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
Nl4
N20 GBO
G98 G99
.. , will cause the cUlling 1001 10 retract to the inilial position = Z address designation ... will cause the cUlling tool to retract to the R level position R address designatioll
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.
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.
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.
INITIAL LEVEL
R LEVEL
---++--'-- lO
(Z DEPTH)
Figure 25-4 Initial level selection for fixed cycles
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
.:>vv........
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.
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. Z depth calculation is
Q
Dimension of
o Absolute or incremental programming method o Type of cutting tool used + Added tool point length
Q
or four R level usually increases about tapping operations cycles G74 G84, to feedrate acceleration 10 reach maximum.
for the
N32
N45 Gao
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
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.
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
can
G99 G83
FIXED
81
"""""'7"777"7i--t7:'177""'7'7'7 -
RO.1 Z0
Z-2.25
_.."J~<,~~~-,;'-~</7"/,fnL/C:/c","-
z- 2.4 75
--++--i-- 20
INCREMENTAL
Figure 25-6 Z depth calculation for a drilling fixed cycle
ABSOLUTE
25-7 G81 fixed
lVVII~I:IIIV
is used in the example for best Z would be the same tool point length calculain Chapter 26.
5
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.
-<~
G82
"C"",,'"''''
Step!
1 2
3
DWELL
Figure 25-8 G82 fixed cycle - typically used for spot drilling
184
GSJ - Deep Hole Drilling Cycle - Standard
4
Chapter 25
retract by a clearance value (clearance value is set by a system parameter) Feedrate motion in Z axis by the Q amount plus clearance Items 4, and 5 repeal until the programmed Z depth is reached
Rapid retract to iniliallevel (with 098) or Rapid retract to R level (with 099)
Step
1
5
6 Rapid motion to R level
2
3
10:
6
7
Items 3, 4, and 5 repeat until the Z depth is reached Rapid retract to initial level (with 098) or Rapid retract 10 R level (with G99)
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.
WHEN TO
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,
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.
G83
Q G98 Q Q
G99
:::=d
-,0--- Z'DEPTH
Figure 25-10 G73 fixed cycle - typically used far deep hole driJling (this cycle does not retract to R level after each peck)
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
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
CUt 1 CUt :2 CUt 3
x ..
and Z
I .45
= 3.4593333
The result has too used as is, because most places for English units units. The result must
Total
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:
CUt 1 CUt 2 CUt 3
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.
CUt 4
Total
4 English
Q Example 2 - Metric
G90 G99 G73
x..
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 In order to increase change the current Q
In order to decrease the number of pecks. change the current Q value to a number.
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.
if it is actually cala precise numthe R level The result :><;;,l\:; .... L~~U number of
Q value can be manipUlated in (he Q value skillfully, as an exact position of penetration, This method is depth of peck~ consider the overfor the job. The setup rigidity, the of cutting tool, the machinability contribute to what the
necessary, the number of pecks may nc','",,,,,P any cycle time benefits.
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
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
G98 (G99)
Description of G74 cycle
motion to XV position motion to R level
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
1
Spindle rotation reverse (M04) and retract to initial level (with 098) or remain at the R level (with G99)
WHEN TO
Figure 25-12 :
hand thread. At the start of die Irotation M04 must be in effect.
5
6
Spindle reverse (M04) and feedrate back to R level Spindle rotation stop Spindle rotation (M03) and retract to initial level (with or remain at the R level (with 099)
notes cover only the most important tapand apply equally to both
11 :
Q
Only for tapping a right hand thread. At the start of cycle, the normal spindle rotation M03 must be in
Rlevel should in the tapping cycle than in the other cycles to allow for the stabilization of the feedrate, due to acceleration.
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. The override switches on the control panel used for spindle speed and feedrate, are ineffective G84 or G74 cycle prol:ess.mg. Tapping motion even if the feSll:lMla is ", ..",s,.. , processing, for safety reasons.
G84
G98
?
---i-f---t--
SPIN ZO
cw
o
G74
25-11
G84fixed
G98
ccw
- Tapping Cycle - Reverse
The initial
cw
Figure 25-12 G74 fixed cycle - exclusiveJy used for left hand tapping
The
cycle
CYCLES
Step
- Boring Cycle
14 :
that require additional cycle is very similar to the
Rapid motion to XV
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.
WHEN
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
Figure 25-13
G85 - typically used and lBi1rlllllU
Step
6
4
5
Shift in by the Q value or shift back in the opposite direction of! and J
Spindle rotation on (M03)
Feedrate motion to Z
188
9 Spindle rotation stop Spindle orientation Shift out by Q value or shift by the amount and direction of I and J Rapid retract to iniliallevel
Shift ill by the Q value
Chapter 25
10
11
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
12
13
14
or shift
e rotation on
WHEN TO
CYCLE -
Spindle rotation on
25-16 :
WHEN TO
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.
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
ON G99
--~-:~zo
I G88
-~
~--
_----.1.-4-_,(_
Z DEPTH
G98 ONLY
---~-zo
Step
Rapid motion
XY position
FIXED CYCLES
189
I G89
---l Q
.. ~ G98 [ G99
r--
----+-~--+---zo
DWELL
~--->---
Z DEPTH
figure 25-18 676 fixed cycle typically used (Dr high quality boring
(ifused)
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:
N34 GBO GOO XS.O Y-S.7S
6 7
8
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
cases,
------------------~
WHEN
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.
is also axes.
to
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<U
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. 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 ..
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
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.
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.
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.
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
,.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"'"
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?
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 ... ?
are used:
Utap drill
,VJ .>UUI
o
LJ
,
/
Xy
1020
261 Evaluation of a single hole IJU"~l1""1II1U
example 02801
191
192
26
what purpose is the tap Not all done the same way. Some jobs a loose fit, others a fit. The fit for the tap is by Ihe of the tap drill. Mosl tapping applications into the 72-77% full thread depth category. In this case, 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
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
u
3/8
75%
67%
65%
stock, 75 to 80%
the bolt by only for 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.
(U)
.4675 x .5
Z-O. 2338
.23375
I
0.975 1.5
263
drill
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:
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'
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. The '-.;<lII.,.UIC.ll drilling operation are il-
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
THRU
1.086
1
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.
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. 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.
~.
P = 0.094
Figure 26-4
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
.094
the through hole in the example, 1.5 inches calculated depth to the
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 <SlNGLE HOLE EXAMPLE) DIA - 90 DEGREE SPOT Nl G20 N:2 G17 G40 GSO '1'01 N3 1406 N4 G90 G54 GOO X3.5 Y5.0 S900 M03 '1'02 N5 G43 ZO.l HOl MOB N6 G99 GS2 RO.l Z-0.2338 P300 F4.0 N7 GSa ZLO M09 N8 G28 ZL 0 MOS N9 MOl
- LE'TTER U DRILL - 0.368 DIA - .... ~~J
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.
of
By the type of
Center drill Spot drill Twist drill (HSS, cobalt, etc,) Spade drill Carbide indexable drill Special drill
.....=
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 DRILL THROUGH - 0.3125 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)
i
"
II
...
Types of Drills
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
('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
%
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)
o FRACTIONAL SIZES:
shows that even a simple and a great deal of
1/64 minimum, in diameter increments of
o NUMBER SIZES:
Drill number 80 to drill size number 1
DRILLING OPERATIONS
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.
o
Drill
SIZES:
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.
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.
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
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.
Effective Drill Diameter
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.
--j
00
r~I
p
QJO
:::
<ttj>
Y
Figure 266
1
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
I
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:
J
PROGRAMMED DEPTH (P)
J
~
tan ( 90 p ==
)
x
where ...
p
A 0
= = =
Length of the drill point Included angle of the drill point Diameter of the drill
1
same formula can be mathematical constant (fixed and used with a drill point angle): 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
o =
=
:::::
Drill point length Drill diameter Constant (see the following table)
Constant
,866025404
,575184204 ,500000000 30310
60
82
.575 .500
.300
90
118
D1
120
125
75135 83525
53829 ,207106781 .181985117 .157649394
.289
.260
130
135
140 145
150
133974596
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
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
0.500
0.300...
o o
a 118
0.200
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.
MACHINING HOLES
197
1.25 + (.750 x .300) = 1.4750
I
I
F
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)
ex-
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:
N56 GOl Z-44.8 F150.0
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
example, if material thickness is one inch and standard dril1 diameter D is of an inch, programmed including a .050 clearance, will be:
1 + .050 +
x
If the depth appears in a fixed the same depth value will be used, although in a different format:
NS6 G99 GSl X21S.0 Y175.0 R2.5 Z-44.8 FlS0.0
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.
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.
- 1)
N1 G21
N2 G17 G40 GBO
N3 G90 G54 GOO X. Y.. 5850 M03
~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
%
Chapter 26
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
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.
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
%
r ,
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.
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
199
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.<l.UU::; drills on surfaces that are 90" to the drill axis (flat Within the drill can be used to enter or exit an inclined, uneven, concave, or convex quite successfully. The may to be reduced the duration of interrupted cut. The 26-/0 shows the areas the feed rate should be slower.
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 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
Uneven entry or exit surface for indexable drills feedrate: F :::: normal feedrate, F/2 reduced feedrate (Dne half Df F)
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
200
26
Ilir'
where ... Pq
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:
Peck 1 Peck 2 Peck 3 Peck 4
Td
Number of pecks ::::: Total tool travel distance = Programmed peck depth
.4463
.4463 .4463 .0001
.4463
For example. in
following GR1
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.
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..
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.
The total drill travel from the R 1.338. To calculate the depth one: mula is similar to the
to the Z depth is
IGi'
where
a
Td p.
rProgrammed peck depth Total tool travel distance Number ofrequ ired pecks
=:
:::::
RO.1
is .446.
00.925 0.75
Using the above formula, the result I QO.446: Therefore, G83 block Q depth will
No rounding is necessary in this case. Now, look at another situation, where has very slightly:
have a distance
I
P =0.15
0.05 Z-0.825
J .~::::::~~~. ;::~ .
Figure 26-11 Controlled breakthrough of 8 hole using 683 peck drilling cycle
MACHINING
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.
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 .
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
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.
Do not program a reaming motion in the reversed spindle rotation - the cutting may or dull.
202
Chapter 26
Stock Allowance
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)
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.
D ::: EFFECTIVE
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.
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
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.
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
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
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.
26
12'27 '\
.- 025
r
I
30
~:"""':"~::-==r=:=~~~~<~. . . .~ R level
Figure 2615 Setup considerations lor a backboring roo/ Figure 2614 Drawing for 676 and 687 programming example - program 02604
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
N3 MaG
From the drawing. only the mm hole is considered, and the program input will quile simple:
N .. G99 G76
xo
N4 NS No N7
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
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.
(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
mo
MM
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
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""'''''
part to
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
Countersinking
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 done the backboring
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
o
o
o
The first boring cycle must be programmed all the way through the hole, never partially
frequent.
For the G76 cycle, only a minimum Q value is required 0.3 mm or .012 inches}
For the cycle, the Q value must be greater than one half of the difference the two diameters:
(D2D1)12 ==
To the programming (lnd the required calculations, the cutting tool used must known first Fig. ure 26~J6 shows a typical countersinking
A '-
== 1,
(0.3 mm)
o
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. 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. G87 is always programmed in G98 never in G99 mode I!! Always know the shift rllTI',r:ttrln and set the tool properly
o
o
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:
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
o o
o
S.F., or
on drawings
Ai! three machining methods will enlarge an existing hole, with one common purpose they will allow the fitting
Chapter 26
is one challenge a countersink. 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.
.866 .575
.500
==
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
A is the countersink
In [he illustration, D is
re-
e .1875 x .575 e= 1
Zdepth
a
a
0,625
Z depth
.78 x .575
.4485
o
0.000 0.750
Figure 28-17 Programming <JY"'TJ"'J> of a countersinking operation
o 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:
Z depth "" . 4485 .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
Figure
sinking
countersinking
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_
o -.....;
A
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
Counterboring
e
Figure 26- 78 for calculating the Z depth of a countersink, D and F and the A
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
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
REQUIRED
2620 Tool motion direction between holes at rl.ffll"",.t heights
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
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 262 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
--0DRilL THR~
03/16
I
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 two major efficiently (no time (no collision).
0.15 0.50
......,....,+.,-.,.Y-,.-,--:..~ --~----------
....... 0.00
0.40
1.00
Figure 20-21 Multilevel drilling nmi'lr;:lflr"lmii1fl example 02605
must be
208
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 DRILL THRU) N21 N22 N23 N24 N25
N26
Chapter 26
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 Tool point length == 0.075
Figure 25-22
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
Clearance :: 0.05
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 %
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 Zdepth control
MACHINING
209
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.
Sjng~e
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
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):
for righl hand threads Reverse tapping - for
spindle
the number
threads per
(TPI):
G74
hand threads
F
= 600
r/min / 20 TPI
= 30.0
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
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.
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
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,
I
Chapter 26
_a
TAPERED
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
PLUG
BOTTOMING
Tap
geometry
The major tap chamfer. 2623 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.
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 Plug tap
a Taper tap
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
actual feed rate value would be F26.1 or even
""""I ......'" the typical mode is always per in per minute and thefeedrate is cruculated by one of the following formulas:
where ...
= =
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
TPI
Pipe Taps
Pipe are similar in design to long to two groups:
o o Taper taps Straight (parallel)
taps. They
Ft
Ike where ...
::::
r I min x F,
F,
r/min
==
=
F,
(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
(I
1 / 20
.0500 inches
nrr,al"",.rnrnprl
tion
F = 450 x
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
.os = 22.5
= F22.5
(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 :
The following is a table taper pipe thread group and recommended tap drills, data that is CNC programming:
500 x 1.5
= 750.00
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
NPl Group
Pipe Size
1/16
Drilled Only
TPI
11/16 .9062
1.1406
57/64
H/8
will be:
212
straight pipe drills are recommended: the following With modern CNC machines, the method of rigid lapis no need for "U'~'-l''''1
compression type -
Decimal Size
.2500
1/8
27 18
18 14
1/4 3/8
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
%
3/4
1.0
1-1/4
23/32
59/64
14 11-
.9219
1.1563
1.5000 1.7500
2.2188
11/2 2.0
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 u u
Tap cutting Tap design Tap
;;,h.ronmi"nt
(have to be sharp and properly the hole being tapped) to be aligned with tapped hole)
the
o Tap feed rate (has to be related to the the machine speed) lead and
o
o
Part setup (rigidity of the machine setup and the tool is important)
Drilled hole must be premachined correctly (tap drill is important) Clearance for the tap start position (allow clearance for acceleration) Cutting fluid
;::'CIC;I"UU
onaCNC
o
o
U
Clearance at the hole bottom (the of thread must be Tap holder torque adjustment Program integrity (no errors) 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.
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
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
N40
if (surface) speed for a given ftlmin. the r/min at a 03 inch (X3.0) for the approximately:
S
3 = 573 rpm
(ERROR)
Moa
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.
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:
N36 N37 N3S N39 N40 T0200 M42 G97 S700 M03 GOO XO ZO.S T0202 MOS GOl ZO.l FO.OS
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
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.
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
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
mo
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:
N70 GOl Z-O.SS63 FO.007
N'71 GOO ZO.l N72 X12.0 N73 Z2. a T0200 M09
xo
Z K
G74 drilling cycle XO Indicates cutting on ....m'?"'.lj"" Z == Specifies the end point for drilling K Depth of each peck (always positive)
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
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
o Drilling with a
o
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
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
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
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
FLOATING TAP
9/16-12 TAP
fool on a
216
02607 ON LATHES) (ONLY THEORETICALLY CORRECT (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
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.
02608 ON
TAP DRILL 31/64) (PRAC'I'ICALLY CORRECT VERSION)
N42 MOl
IDa
(T03
A brief look at 02607 anything is wrong. essary motions therefore. correct. contains major flaws!
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
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 . machinioa o 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. o
o
Grid pattern
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
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!~_J_._L_1.
2 1B 20 .4 .
,,
figure 27'
o
o
pattern
Straight row pattern
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
02701 (RANDOM HOLE PATTERN)
N1 G20
N2 G17 G40 GSO
Cha
27
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
%
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. 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
to the X or Y axis with an equal Figure 27-2 shows a 10 hole with a pitch of .950 inch.
TYP
0.6
row hole
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
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
=2.0)
HOLES
219
N7 GBO M09
o o o
+----10.82-----.... 273
Angular hole pattern with two sets of coordinates program 02703
%
Note that the program structure is idt:nlicallu- Lhe exam-
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
2.0
= 2.1640
27-4
Angular
- 02704
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-
use
10.47251349"
C = 2.0 / sinA = 11.00329063 C1 = C / 5 = 2.20065813
m
Now, the actual increment along the two axes can culated, using C I dimension as the distance between holes:
x increment Y increment
G20
= Cl = Cl
x x
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
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
m G20
N2 G17 G40 GBO N3 G90 G54 GOO X1.0 YO.62S S900 M03 N4 G43 Zl.O HOl M08
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
To make sure all calculations are correct, a simple checking method can be used (0 compare the calculated values:
~
Chapter 27
Step 1
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:
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
x
=
= =
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):
mo
%
N9 GSO M09
G28 ZO MOS Nll G2B XO YO Nl2 1000
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.
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.
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
l
I
i-I
1.9
CD . 1--8I ,
, GOO 0 0 (j)-e-~8
(B---r .
--"'1
1 1.8 I I -wED 0 0 0
I
I ,
2.2
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
-r
2.4
PATTERN
HOLES
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. 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.
02706 (STIlAIGm' GRID PAT'I'ERN) Nl G20 N2 G17 G40 GaO
More
000
o
3.5
-14.0
27-7 Angular grid hole pattem - program example 02707
NO N4 N5 N6
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)
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:
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
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
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.
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 %
Chapter 27
STEP 1
that is nearest to 0 iodirection), then continue direction of the arc.
STEP 2
co-
==
3.849231552 1.855050358
Use the same culate XY coordinates included hole in the pattern, the second hole angle will be 40, the third Hole #2
1.0 x = 1.5+ 2.5 Y = 1.0+ 2.5
x <::os40 x sin40
= 3.415111108 = 2.606969024
2.750000000 3.165063509
.4151) .607)
4 EQSP
1.5
Hole #3
x
Y
==
c:
program 02708
Hole #4
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.
.9341) .462)
e
Hole #1:
Hole #2:
Hole #3:
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 programming, is programming task
Hole #4:
Now,
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 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
lo use will be
N8 Xl.9341 Y3.462
PATTERN OF HOLES
223
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:
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.
Hole #1
x '"
y
==
7.5 + 5.0 x cos30 '" 11. 830127 6.0 + 5.0 x sin30 '" 8.500000
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.
Hole #2
x
Y 7.5 + 5.0 x cos90 6.0 + 5.0 x sin90
==
::;;
7.5000000 11.0000000
Figure 27- 9 is a typical bolt circle drawing. The programming approach for a bolt circle is similar to arc paHern.
Hole #3
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
Hole #5
I
x
Y
== ==
== ==
L - 7 5 - -t I .
Figure 27-9 Bolt circle hole pattern program 02709
Hole #6
==
:;:::
224
Once all are calculated, the program is writpatterns: ten in the same way as
02709 (BOLT CIRCLE Nl G20
N2 017 040 080
Chapter 27
the following explanation and [he any hole in any bolt circle pattern can The formula is similar for both axes:
X Y
~
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 :::::
Xc ::: Y :=; c
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.
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
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 2710 Basis for a formula to calculate bolt hale pattern coordinates
PATTERN
HOLES
cancel
OFF
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 POLAR)
N"
G9.. G8..
U;"".",VJ..:>
x..
N1 G20
Y.. R.. Z.. F
same
N2 G17 G40 G80 N3 G90 G54 GOO Xl.S Yl.O S900 M03
IO.INl')
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:
N.. G16 N G9 GS .. N . N N . N G15
mo
x ..
next program 02711, are equally spaced on the bolt circle circumference. Dimensions in Figure 27- J3 are to the coordinate prCignurururlg lTlemlOa.
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:
120:O~-'
,I
60
;'
R6.8
180-8-
a
a
The X word becomes radius of the bolt circle The V word becomes of the hole, measured from 0
requrre-
Figure 27-13 Polar coordinate system applied to bolt hole circle - program 02711
226
02711 N1 G20 N2 GI7 N3 G90 N4 G43
N5 GIG
Chapter 27
(GI5-GI6 EXAMPLE) G40 GBO GS4 GOO XO YO S900 N03 Zl.0 HOl MOB
(PIVOT POINT)
G 17 plane is known as the XY plane. Ifworking in another plane, make double sure to adhere to the following rules:
N6 G99 GSl X6.B YO RO.I Z-O.163 F3.0 m X6.B Y60.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
ID6 M30
%
NB Xo.8 Y1.20.0
The second axis of the selected plane is programmed as the angular position of the hole.
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.
G-eode Selected plane
'I:(
First axis
Second axis
Y = angle
X = angle Z = angle
G17
G18
X = radius
Z = radius Y = radius
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.
IX
YZ
G19
Most polar coordinate applications take place in the default XY plane, programmed with the G 17 command.
Order of Machining
Plane Selection
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.
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 GtB
619
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.
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
Q
Q
Selection Criteria
mill
o
Q Q
o
Q
Insert geometry
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.
It
The last two items, cutter will influence the actual although other items are
CUTTER SELECTION
all milling operations,
tool that rotates while the
that a
a cut or milling is so effortless not pay sufficient milling cutter, proper chine requirements and
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. The top of a part to 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.
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.
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
Negative
bej'ml~rrv
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 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
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
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 ...."'rA...'''' 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
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
CUTTING CONSIDERATIONS
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.
o Negative
o Combination of both
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
FACE MILLING
229
Undesirable
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 A
Desirable
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.
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;
"
--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
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
......-- Programmed direction
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. 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
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)
b
......-- Programmed direction
If surface finish is important, change the cutter direction away from the part (in the air)
the cutter center within for better conditions part area
o
Q
Typically, select a cutter diameter that is about 1.5 larger than the intended width of cut
for
Width of cut
{InSUffiCient overlap
mills will belong into one of these three cateon the cutter density:
.. coarse pitch of
Width of cut
Coarse density
Medium density Fine density
o
o
b
Figure 28-5 Width of cut in face milling -
diameter
FACE MILLING
1
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.
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
3.0
5)(3
5)(3)(1
PLATE
287 Face mill positions for a single face mill cut example
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
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.
02801
(SINGLE FACE MILLING COT)
a Start and
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'<A-lIUU of afive face mill diameter is Once the mill has trate on the sfart and end positions. reasons, plunging to the depth has to start away from the part, in air. The decision to cut along the X axis (horizontally) has is whether from the left to the been so the left. It does not or from the right to except for the direction of chip flow, so selection from [he to the left is arbitrary.
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
Multiple face Min Cuts
Chapter 28
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 unidireclionll cutting and nwltiple bidirectional cutting (caJled at the same Z depth.
ROUGHING
Bidirectional approach to a for rough and finish face milling
FINISHING
face cut
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. scnematishow~ a
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.
Figure 2810 Schematic tool path representation for the climb face milling made, applied tD a unidirectional cutting
ROUGHING
FigUre28~
FINISHING
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.
13
10'S
i
~
13 x 6
FACE MILLING
233
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.
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
(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
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 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 <obsolete' Posirion Compensation feature of the control system, already described in Chapter It is probably only application of the position on modern CNC machining centers. to Figures show that we have to face (with cut) a 5>::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:
o o The
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.
on one
In the first case, the program 0280 I may be with following content:
result,
N2 N3 N4 N5
G40 GBO G54 GOO X7.75 Yl.O 8344 MO) Zl. 0 H01 Z-O.2 F50.0 MOe
05.0 CUTTER
Figure 28-12 Multiple face milling details for program example 02802
234
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
Chapter 28
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.
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
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
%
CIRCULAR INTERPOLATION
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-
/
RADIUS
figure 291
and and many olher machines, routers, filers, wire EDM, and others.
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
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.
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
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.
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,..tprl
235
236
Circle Area and Circumference
Chapter 29
where ... A R
1t
:=
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.
= =
1.&
where ... C
7L
Quadrant Points
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
fined mathematically:
A quadrant is anyone of the four parts of the plane formed by the system of rectangular coordinates.
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:
Compass direction
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.
Degrees
Watch
direction 3 o'clock 12 o'clock 9 o'clock 6 o'clock
located
between quadrants
IV and I
I and II
II and III
EAST
90
180
270
III and IV
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
1
ANGLE
DIRECTION
G03
MatheJ7Iatlcal rU>1Jmlll1n
quadrant poinls arc im In some cases, the quadrant ,even If the cIrcular is is particularly lrue where crossing the quadmodern controls block, wilh
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
PROGRAMMING FORMAT
The progrnmming format path must i ncl ude lask of cUlling an arc parameters are defined as:
o o
Arc cutting direction (CW or CCW)
Arc start and end points
1001
(he
"Y'I
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
majority of older conlrols, direct radius address R specified and the arc center vectors I, J and K
238
G02 x .. Y .. I.. J .. G02 X .. Z .. 1.. K .. G03 X . Y .. I.. J .. G03 X .. z .. I.. K ..
Chapter 29 _
- cw - cw - CCW - CCW
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:
G02
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.
x..
r ..
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
- CW - cw - CCW - CCW
j,
1-
START POINT
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.
-.Figure 293
K-
USED IN MILLING
Center point and start point of an arc
USED IN TURNING
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 ..
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
T
1+ JO
1+ J-
1+
/
Quadrant
III
Quadrant
J+
1+ J+
IV
1- J+
10
1- J+
error.
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
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 (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
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
E
y
G18 - ZX PLANE
Chapter 29
G19 - YZ PLANE
~------------~X
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
RADIUS PROGRAMMING
11 '" I', n
an arc,
".,-1 as a ra-
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
III
o
o
Blend radius
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.
Circular
Spotface milling
o o
or cone
CIRCULAR INTERPOLATION
1
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
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,
4) 4) 4) 4.)
thaI
COV-
"\
\
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.
cutli
--2.00 29-8
Full circle programming using one block
I1rl1f1rrnm
starting position
rant points,
more difficult by establishing the cut from any of the four are at , 1800 and 270". For exam-
entry
, 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:
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
xs
(FULL CIRCLE)
GOO ZO.1
START POINT
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
I ,--2.00-~
"- -- R1.25
'.
code
2.00
J_
R1
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
1 OF 5)
2 OF 3 OF 5) 4 OF 5) 5 OF 5)
242
From the resuits, [he start poinl of the cut can be found:
X=2+Xs '" 3.0483382
Y = 2 +
29
Boss Milling
a
Ys
2.6807988
X3.0483 Y2.6808
o
01.812
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
TOP
J
"ri,-I""'M
R.
~",
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
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
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)
--
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
withR
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.
CIRCULAR INTERPOLATION
243
N8 GOl G40 XO F20.0 M09 N9 G9l G28 XO YO Z2.0 MaS
M30
N2
N9
mo
%
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
Figure 29-11 Boss miJling example - tool motions for program 02901
This is true for almost any circular application, very few that use a special cycle.
Alternate applications may include multiple 1."""""''', a semifmishing pass, wo cutting related to machining.
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
tion will
.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:
approach
2912
Internal circle cutting - linear approach only
02902
(0 . 5 DIA CENTER END MILL)
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
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
YO.3l2S RO.3125 NlO GOI G40 XO YO F20.0 M09 Nll G9l G28 XO YO Z2.0 MOS Nl2 M30
%
244
method is slightly quality with a circular approach than with the linear approach.
Chapter 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
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.
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.
cw
ccw
lhese two speI
12
r:r-----t---t"'J - - L
0.25
13
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.
Full circle cutting using 612/613
program 02904
start
02904
(0 . 5 DTh CENTER CTJT'I'ING END N1 G20
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.
N2 N3 N4 NS N6 N7
%
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
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
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:
GOl X2.0 YS.25 F12.0 G02 X3.75 Y7.0 Rl.7S
Start point /
I
- R+
j
./
"
End point
- - CONTOUR
Start point
./
j
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
[Q
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. Another example shows programming an arc of 270", still using the R address. Are the following blocks correct?
GOl X10.5 Y8_625 F17.0 G02 X13.12S Y6.0 R2.625
(270 DEGREES)
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)
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
~
where ...
iii?
where ...
FI r/min F! = n
F0 FI
==
ormm/min)
on
Fe = 14
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
is a major incre<ls!!, to
r\n',Hl~'r
(01.5):
42.0
the normally programmed is increased for outside arcs and decreased for inside arcs Figure 29- 16.
inimin -
to determine
CUTTER
Feedrate for inside Arcs
arcs, the adjusted
feed rate, calculated from
/
/
DECREASED - - . FEEDRATE
FEEDRATE
NORMAL~
''''
F;
F, R
""
0::
"
Feedrate for arc linear feed rate Inside radius on the Cutter radius
/ .8243
3.384932
nOf-
MANUAL CALCULATIONS
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
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 center or on a CNC lathe, the cutfing rool machintn '" . 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.
is equipped with an
compensalion or
and common
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)
.....
.,... NO OFFSET
J.,.:..------~_)
PART PROFI
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.
Figure 301 Tool path not compensated (above) and CDfnp8'nSI!Jil(;:a by the cutter radius
248
Chapter 30
Point No.
I
X coordinate
XO XO
Ycoordinate
i''''''''
""""
-,
1.125
I
Pl
P2 P3
J
2.25
X2.25
'''-...-RO.625
P4
X2.25
X1.625
P5
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.
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.'
-._--P2
P1
XOYO
Figure 303
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<e or too small! TIle same procedure is used when cUlting a board wilh a saw - the saw width has to be compensated. This activity is so simple, It might have been even done automatically, without serious thinking. The radius of the router bil (or the width of the saw) was compensated for before and during the cut. Just like Ihe outline of the shape in wood is followed, [he outline of the machined part, outlille that is offset by the culler radius is followed as ,.,vell.
The tool path generated by the cuttIng 1001 center always keeps the same distance from the part contour (outline). There is even a special name for [his type of tool path - 1\ IS called the equidislom tool path, which means 'distant by the same amount'. Figure 30-5 shows the sample drawing with the applied equidistant lool 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
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
---" __ v
y-o.
?
P3' X2.6250
P4
RO,375
Figure 30-6
rpm,rlCHU
Contour change
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 from the old P L The actual value an)' cak:ulaleri flI nil, wilhaUi kllowillg the cuf-
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
x
Cutter Radius
the culler is always been phYSically of the cutler must I" (0,0025 mm = reground tools,
=1.125 +N
P2(Y) = 1.3975
Y1.125
10015
or are undersize or oversize some this means that programming the cenlerl the exacllool radius to be known althe in all cases,
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 been idenlified, but also lalions had to be done programming effort. the illustralion directly, Look at and evalu-
=1
=
,III
Y1
ate Figure 30-6. OUI of len values requirt:d. only eight have that Ihe previous lcn calcuas well, adding 10 the overall
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
center points are in the . appear in that same ordcr II) Ihe the pOlnt loc3tions hut various G and other dam.
are known,
contour.
250
momenl, it is slill 100 soon to write the new closed with the table of
Chapter 30
No.
X
X-O,375 X-O,
y
Y-O,375
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.
Pl
P3 P4
P5
X2,625 X1.625
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
o
o
Jitllclriangle
word 'delta',
control system
a vec-
[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:
o .. 5ln;nnpt'
o Unknown exact
o
o
Adjusting
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
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
or
but wilh
Offset
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
o
o
Type A offset - oldest uses special vectors in the program to establish the cutting direction (039, G40, G41, G421.
Type 8 old uses only G40, G41 and G42 in the program, but it does not look ahead. Overcutting is for Type 8 offset. Type C - current uses only G40, G41 and G42 in the program, but with the look ahead feature. Overcutting is for Type C offset.
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
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?
IS
motion oflhe
tool motion
il is
maFigure 30-9
but it is
CNC machining centers, true for other lypes l"Iser Clllling machines,
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
Offset Commands
direction), there are two to the culter
nrt>',","',r'l
and counterclockwise. These terms are circular interpolation and have no the cutter radius offset. and Right are used
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
is no difference. The comto the left or to the looking inLO the cutler
G40 command:
the direccion oj
mowmem.
30-9.
The illustration
G41
G40 E
252
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
30
last question is seltings. We are areas (offset screens on the control
the Position Tool Length 17 to 19 respectively).
answer to
area
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.
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.
cutrer
should be either
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
LARGE
registry area as clIn he used, with wilh this Iype of cal type in their
value.
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
Tool Offset Memory Type C
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
3
Address H or D ?
it is reasonmethods
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 Offset
No. 01 02 03
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.
.................... ........ww
_w
Wear
0.0000 0.0000 0,0000
...
Offset
No. 01 02 03
...
Geometry
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:
Offset
..
H-offset
Geometry
0,0000 0,0000 0.0000
Wear
0.0000 0,0000 0,0000
05
Shared offset
Mh;:~/M' PM'~~~
30-13 Fanuc (00/ offset memorv types A B, C from the top down
[here are two columns avai table, but entry in the offset screen will shown in Figure 30- ] 5:
No.
I Geometry .
Programming Format
35
Figure 30-15
G41 x. .. D
G42 X .. D ..
01' ..
10.0000
Shared offset
01' ..
G41 Y .. D ..
G4.2 Y .. D ..
or ..
of the tool motion and how at a time will be discussed in this the question of which H address or the 0 address?
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
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
together with a tool motion
Figure 30-76 Unique offset register screen for tool offset memory Type C
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? What clearances are required? Which direction will the toof take?
Geometry and
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.
o
o
o
o o
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.
i . 0.25
:~ ~I
L-yO -iY-O.625!
2. To know how to change the offset 3. To know how to end the offset 4. To know what to watch between the start and end
RO.375
./
-
XO
100.75 CUTTER 0.25 CLEARANCE
, ~-O,25
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:
Always select the start position of the cutter away from the contour, in the clear area
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)
N1 G20
N2 G17 G40 GSO
5
(c)
IS
and re-
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;
(l?2)
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)
(START OFFSET)
c,
Figure 30-18 Possible leadin molions ro apply rhe cutter radius offset
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?
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
Nll GOI X-O.625 (P2)
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
N .
as:
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
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
N .. Y1.12S
N ..
(P2)
256
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
Chapter 30 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.
or for a
that is
Offset Cancellation
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 called ramp-in and ramp-out
'fhe safest place to cancel cutter
[Q
or
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
away from the contour be a clear area position. end position, Figure 9 Lion In (he example.
IS
now be written.
cases, il is
thc The
0.25
,
j
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
RO.375
- ....
SlOp?
Figure 30-20:
program
--llIJli'-
tool.......--.- ...... -
Nl G20 N2 G17 G40 G80 N3 090 GS4 GOO X-O.62S Y-O.62S S920 M03 N4 G43 ZL 0 HOl NS GOl Z-0.S5 F2S.0 MOS (FOR 0.5 PLATE N6 G4l XO DOl F1S 0 (START 1"'1 C''C'<:!,""'"\
N7 Yl.125
N8 X2.25 Yl.856l
----"
tool
N9 YO.62S
G02 Xl.625 YO RO.62S GOl x-o 625 GOO 040 Y-O 625
Zl. 0 M09
001
(CANCEL OFFSET)
001
Figure 30-20 Ambiguous slartup for a curter motion in radius affsef mode
RADIUS OFFSET
7
does the control handle culler radius offset Type C a buill-in the 'Iook-ahead'type of cutler radius
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. ways Ihe program can be written:
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)
The control will first read the block i":l"In,t;:urlinn startup of the cutter radius offset (that is the control detects an ambiguous situation, and does not process the block as yet
N6)
o
o
Q Example 1 - Figure
next
1 left :
control advances the processing to the next block (that is NJ), to find out into which direction tool be next
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)
2next
lS
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)
Look
content of block N6 is the same, but the motion Ihat follows the N6 is nOI - Figure 30-21.
In both cases,
hued to any
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
What is
(START OFFSET)
(NO MOTION BLOCK)
(MOTION BLOCK)
-Figure 30-21 Importance af the next tool motion for curter radius offset. Y+ next direction on the y. next direction on the right
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
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!
OFFSET)
MOTION BLOCK) (NO MOTION BLOCK) (MOTION BLOCK)
n.s
258
"",,h.,,",c - but not wrong - this lime there
03002
Chapter
N1 G20 N2 G17 G40 GBO N3 G90 G54 GOO X-O.S Y-O.S Sl100 M03
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 %
03002
(In
eonUIlns more
Radius
one hal f of lhal
very - rule should help to make cutter radius offset will nOl fail:
iQVERCUT, AREAl
--+-;.. /
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
RADIUS OFFSET
9
N3 G90 G54 GOO X-O.25 Y-O.62S S920 M03
N7
RO.375
Y-O.625
o
X
3023
Cutter start position is equal to the cutter radius
in a .375 travel
If the 001 amount
as
(han .375, there will be amount is equal to grammed length and not be any molion along of the radius takes tion (0 the
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
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. In (he next we look at the cutter ence that occurs a lool mot jon, not just at or tennination of the cutter radius
Try to avoid like this one - although coo-eet, they do not provide any flexibili!y and can cause
Figure 30-24 shows a start position where partially on of(he target position. nirely not system will an alarm
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
RO.20
t.--1.00
RO.25
1: 1
o
figure 30-24
1.1
0.50
' - - -_ _ _ _ _- - - - 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-
3025
Simple drawing lor program 03003
260
03003 (DRAWING FIGURE
r 30
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
NlB M30
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~
R0.25
it follows all
!GOUGE
001
=0.375
=1:1
Figure 3026 Effect 01 overcutting (gouging) in cutter offset mode. Tvpe Cradius offset (look ahead type) does not allow overcutting
stanup, particularly if tion along twO axes, look at no problems. Now we look at
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.
o
o
o
dimensions
Program input
input
Offset amounts
may
a while
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
Possible problem in cutter radius offset mode during a startup with two axes simultaneously (intemal curting shown)
261
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
G20 (CORRECT APPROACH WITH ONE AXIS) N2 G17 040 GSO N3 G90 G54 GOO X-O.625 Y-O.62S 8920 M03 (START OFFSET) (P2)
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.
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: 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.
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
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'
oj wi
xi
t
)
'--
D01
~
'W
-j -- - D01
'0
YO
xl
YO-'-
'V:'O.62S
X
Y-O,625
o
-~~~-
Correct approach in X
Figure 3028
Correct approach in XY
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.
I M-T I Apply the cutter radius offset with the G41 or G42 command, along with a rapid or a linear motion
to the first contour element (GOO or GOl in effect).
Startup of the cutter radius offset for external cutting: Single axis approach, shown on the left Two axis approach - shown on the right
262
o [M) Reach the Z axis milling in the G40 mode offset cancel mode). the preference to a single axis approach
Chapter 30
-"""--"""-""""--"""'"
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.
or G42 in effect), blocks that do not contain an axis motion. non-motion blocks it possible Imissing X, Y and Z).
0.375 ---
o 1M)
after
from the depth (along the Z axis only) radius offset has been canceled.
I..IIC1VVHlfJ
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.
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).
the part depends on many factors, setup, cutting depth, material the selection of 1001, its exact
When a part is inspected, the measured one of tile three possible oulcomes:
can
only
... within specified ' ....I"'r"'''... ''''' ... will be scrap for ... will scrap external cutting
The next example radius offset on the part that reason, only a simple
simplest tool path. btlt not """t'I>~'~"'r'
CUTTER RADI
263
No Action Required
Scrap Likely
Y2.S
Recut Possible
->~"'---::-.-<-
it is clear (hat no action is necessary is within tolerances. regardless of or the internal cutting took place. For
or results, a recut may be possible or
the likely result.
........................
Y 1<25
(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
internal). The program XOYOZO is at the center and the top of the part:
03004
Toolpath motion
Offset position
.0
(**** 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
03004
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
Setting
cutter is work. The madiameters and the - ifnot in the
Figure 30-30 shows program - the external 30-3/ shows the lool path gram - the internal d
half of the
264
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.
Chapter 30
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.
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.
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:
To ADD more material TO the measured size, use LARGER setting amount of the 0 offset
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.
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.
CUTIER RADIUS
5
0.3750
2.4930 wiill
DOl
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)
dius,
mentally by
results of the measured size for are based on the expected and on D II holding the amount or
culler.
Internal measured dimension - Example 4 :
2.2010 will!
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.
2.0060 ""'1111
a Scrap
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
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.
When iI comes
Example 6 .
move
creased
is on the tered as a radius, crcmcnred by .004, to 0 II
In-
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
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.
266
solution is 1O move the tool machined surface by a increment amount must be error of the tool radius, as well as
r 30
away
to
pos;/ive
greater than the '-I'IJ'-'-'l'-U being suitable a recul.
pOint
meter and adjusllhe tween measured and CUl, the di is not hal
test cut is made, measure the by one half of the di fference bediameters. If only one side is
point
o X
.9
to
a
30-32
Tool reference point for turning and bon"ng - (a) turning, {bJ boring
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 G42 G40
lathes, G codes do not use in (he
G41 - LEFT
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)
edges, /lose,
JJ"'''''"J,)'' the too! cutting edge is often a n.ose radius offset became common.
Orientation
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.
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
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.
-.-~
/'
Reference point
Figure 3034
X a ......
to
I
ZO.JI
a .......
Lbl
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.
T7
Figure 30-37
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
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.
00 I'l.O
I.t) I.t)
.-
C\lN ,
NN
C'">N
NN
..- co ..- 0 ,
NN
..NN
90
7
TLR
X4.750 X4.510 X3.250 X2.650 X2.410 - - X1.990 X1.750 XO.950 -- XO.750 -XO
l.O I' 00 00 00 ...-0 0 0
.-3
I
Figure 3D-36 Schematic illustration of the too/ tip numbering (Fanuc controls)
N,
NC\J ,
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.
NN
C\J
...-
2
03005
30
NGl NG2 N33 N34 NG5 N36 N38 N39 N40 N41 N42 N43 N45 N46 N47 N48 N49 NSO N5l NS2 N53 NS4
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 G02 X4.0S Z-2.2S RO.4 GOl X4.S1 x4.8 Z-2.395
10.2
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
N37 Z-l. 85
much more often than on machining centers. shows a facing cut On a solid
10
problem is
u,,,'''-U,,.,'.Al
N44 T0400
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
approach
X1 ,00
XO
CLEARANCE -,
X-0,07
Incorrect approach
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.
Figure 30-40 Tool nose radius offset change for the same tool
>TLR x 2
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
x2
N29 X .
>TLR x 4 i
on 0
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.
correct tool motions on the
Figure 30-39 shows minimum clearances start and end of cut. Make sure the nose radius
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 ..
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 o o
Tool motion along a single axis only Tool motion along two axes simultaneously 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
o
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. 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. That is notlhe case for the following lhree programming procedures, where Ihe various consideralions change quite signilicanlly:
o o
o
Circular motion using the G02 or G03 command Cutter radius offset using the G41 or G42 command
A plane is defined by a single line and a point that does not lie on that line
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 nvo-dimellSional. In contrast, any tool mol ion lhal takes place in lhree axes al the same time is a Ihreedimensional motion.
Fixed cycles using the G81 to G89 commands, or G73, G74 and G76 commands
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
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.
A simple way to Dxes for alllhree
~O3 G;;;\ X
TOP - XY STANDARD
~O3
G;;;\
~O3 G;;;\ y
RIGHT - YZ
OF PLANES
all
malhemalical designation of is to write the alphabetical order of axes twice and pair with a space:
t ~G03 ~X
TOP-XY
----~-~------.--,..
t ~G03 ~y
-YZ
In mathcmaticalterms. the
..
--.. ,-
----
Plane
Xy
x z
y
vz
x z
reason. As will between the as defined by
is extTemely Imyet often neglected and even misunderstood by main reason is that for contounng) XY plane. is always perhorizolHal appli-
is intenlional, and for a soon apparent, there is a mathematical planes and the machine the direction of the
and operators alike. of 1001 motions are and machined in all machining centers, pendicular to the XY plane. m:e the same in this
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
o
:J
view
XV plane
G18
ZX plane selection YZ plane selection
front view
The right
view
III
.. , YZ
G19
both
planeon ill us(ratioll.
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
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.
The
PLANE
271
.cIRCULAR INTERPOLATION IN PLANES
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
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, 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:
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
G~\
,G03
interpolation - GOl :
- 2D hileantlO/Jon
GOI X-l. 5 Y4. 46 F15. 0 GOl X8. 875 Z-O. 84 FlO. 0 GOI Y12. 34 ZO.l F12. 5
7X pla}'!e - 2D IilleDnJlolion
. 2D linear/Jlotioil
'-----I"'"
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 .... "',..,..,rPu" f"""""~f'III\J by the control. regardless of any in that apply to linear motions are nol the same ror circular mOlions.
~
G02'
Figure 312 Progressive
~03
X
272
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 following format grmnming applications for circular
Cha
31
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:
The
the situation is similar. plane (G 18) match beand the actual axes orienIhal appears to be reversed
of a machinmg plane
enable
operations using circular interpolation, culler radius offset and fixed cymost common applications of Ihis type of ma(blend) Intersecling radii, circular
I.
K..
J R ..
From the
that:
7 I and J arc center modifiers
o XV axes o o
helpful.
Absence
in a Block
G20
Englishunils
XY plane selected
Slll1po.riJiDHDjli1elool
PI[llle selection "..,.pfPIJnnl
N40 G17
N41 GOO
31-3
Actual circular rooJ path direction in a/l three machine planes. Note the inconsistency fOI the G18 plane
X20.0 Y7.5 Z-3.0 N42 GOl X13. 0 FlO. 0 N43 G18 G02 X7.0 R3.0 N44 G17 GOl XO
The preparatory
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
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:
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
Example:
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
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.. ..
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.
G18X .. Y Z.. ..
If G19 command is programmed with three axes: G19 X.. Y.. Z..
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:
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.
274
3.5
Chapter 31
2.5
-,
Figure 31-5 Too! path fDr programming example 03101 Figure 31-4 Drawing for the programming example 03101
03101
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)
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.
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.
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
o
Peripheral end milling and contouring Milling of slots and keyways Channel groves, face grooves and recesses
Open and closed pockets
[)
o
o o o o o
o
Facing operations for small areas Facing operations for thin walls Counterboring Spotfacing Chamfering
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
NOSE MILL BULL NOSE END MILL
Chapter 32
informalion
D --,
R
End Mill S
rdating to the size of an end for CNC machining:
R-' /
0-o
R
321
R = DJ2
R < DJ2
End mill
mill length length
o o
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.
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
larly at sharp corners, or stored. When handled ~~r'~~rt great efficiency and
1,5D
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
Figure 322
HeJ,atlolnst,~J(J
for
of cut
PERI PH
MILLING
Number of Flutes
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. 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 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
12 ft/min
11:
: :;: 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:
Ie?
where ...
practically the only choice, even somewhat compromised. 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.
and in fact they are a
(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 different
What about
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):
ft / min
Metric
meters (mm):
1{
x 0 x r J-min
12
lool diameter is in milli-
IS
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.
Regardless of (he
laroer diameter will deflect o
278
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. 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 millimeters per revolution /11m/rev. The English units version of the formula is:
Chapter 32
in/min r I min
x
Metric units formula is very similar, it calculates the feed per [oolhfi in 111m/tooth:
mm/min r / min x N
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
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:
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:
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.
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.
PERIPHERAL MILLING
279
A
STOCK REMOVAL
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.
o
Figure 32-3
= RAMPING ANGLE
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:
Plunge Infeed
o
o
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.
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.
."..,.
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.
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.
Do not misunderstand the words climb and down describing the same machining direction.
Both terms are correct, if taken in the proper context.
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
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
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.
PROGRAMMING SLOTS
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
for example keyways, can be done with called slolli ng cullers, rather than an
reaches
morc accurate
Open
IS
Figure
drawing will
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
An open boundary
niques of an
can be used
Lo
boundary.
0.21
Closed Boundary
1.77
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
1,8
Figure '33 1
A
--
or
circular
pockets, and !>o on. can have any machinable shape, bur they still use the same machining
pockets.
One of the most commonly machined boundary shapes in manufacturing IS milling of a ty, u~ually quitl.! small, called (J sIaL
zero.
281
Chapter 33
..........................................
will relate to
o Number of tools
Maximum
Depth
o
o
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.
Method of Cutting
Number of Tools
or two lools can be
CUI, use Iwo
If
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.
Tool Size
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,
bottom, for finishing. ln a
and
i
al
moved back to the Ihe full depth for conlouring In 33-2, the XY 1001
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
IJ")
o:J
IJ")
1.0
o:J
r-....
quality. Toler-
.,,-
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-
.-
1.185
lecting the
1001
size, always
how much stock the ing cuts. Wilh the 0.500 the amount of slock left
33-2
Contouring details for the open sial
~xnmn.'F!
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:
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
:=:
Stock left on Width of slot ( slot radius times two) Cutter diameter
I 2 :::: .050
finishing with one CUL
111is is a
Speeds and FBeds
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
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
0.885
Figure 33-4 Roughing operation detail for a closed slot example 03302
Internal Contour Approach
0.21
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
0.885
A-A
i.l
an arc Improves
creates another
cannor be sraned
a non-circular
shown in slot already established will apA 0.500 inch end mill will be a center cutting geomClTy thai allows 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.
pom[
the contour:
1.1
RO.28
335
Detail of t",,,,,o"t,,,,1 lllDrllach towards an inner contDur
2
N12 GOl Xl. 5 Nl3 G03 YO.S85 RO.3 N14 Xl.78 YO.86S RO.28 N15 GOl G40 Xl.S YO.aas
33
(CUT WALL TOP) (CUT RADIUS LEFT)
(LINEAR DEPARTURE)
AJ30VE WORK}
N16 GOO Zl.0 M09 Nl7 G2B XI.S YO. BaS 21.0 MOS
Nl8 IDO
%
(M!C
(END OF PR()GRlIM)
10 approach any
This program example is also a inside conlour kinds (angular. circular. eic,), use (rated in the last two examples.
POCKET MILLING
~
where ...
Radius ofthe tool R, :::: of the approach arc arc) Rc Radius of the contour (slot radius)
RI
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. 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
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
a
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:
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
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)
V'-,111\.1II
where to
so is the widTh
di amount to
10 I~flve
AND POCKETS
5
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.
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
o
- from the inside of the pocket out 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.
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
center
Pocket Types
o Pocket corner
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
Any corner
The most common are also the easiest to gram. They all have a regular shape, without any islands:
o o o
Square pocket
Rectangular Circular
RECTANGULAR POCKETS
pocket is equally suitable for the start.
are quite easy to proare parallel 10 the X or Y axes. As pocket, the one illustrated in
IJV''''''-''''
an
0.15
I
...... "J"..,u
area:
left for finishing
-a-
---
o
o
t
2,5
"._,,-.- - - - - ' - - - - ' \
for semifinishing
are
the corner be known, as well as to other elements
dimensions of the pan, as length, the width, and pocket - they must always position and its orientation
0.5
'"'l
0.5 r-
--
R5/32
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
program 03303
L D
w
t
Q
s c
I
I
Y1
'-
Y1
f
33-7 Pocket roughing start
I.l$'
c
the comer
method
t-
T
I .
Xi;--
The
Stepover Amount
XI
V\ TLR
L::;:: W Q
=
=
S C
Stock Amount
than slepover will cuts (zigzag lype). There is number of culS is se-
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.
number:
o number of cuts will terminate the roughing on the opposite side of the pocket relative to the start location number of cuts will terminate the roughing on the same side of the pocket relative to the start location
avoid possible cUHing problems later, a secondary operation is often necessary. It is to 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.
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:
In the formula, N is
stepovers and
U"'~ULJ'b as before.
all other
L L1 END
Q Example:
0.250 (TLR S as 0.025 and semifrnishing stock
will
on
START
-1-'-"-
Q: .5 - 2 x 0.125 Q = 0.2360
2 x 0.025 - 2 x 0.01) / 5
,
Y1
..
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
il'''LU>.~,
2x
- 2x 5
Q
Ll ;;;;; 2.0 2 x 0.125 L1 == 1.7000
2 x 0.025
In
2 x 0.025
Q Example:
D
D
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.
288
pter 33
!Iii' where
Ra ;:::: Radius of the approach arc Rt Radius of the cutting tool Rc Radius of the corner
.------.~
...
~.
- L ................. .......
~
~--
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)
NlS Xl. 68
w
\
Ra Rc TYP.
N16 N17 (- NIB N19 N20 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 %
--------
----------
S) 5) 6)
N2l Xl. 7
(RIGHT X+ MOTION)
(up Y+ MOTION) (LEFI' X- MOTION)
X-l. 7
3310
Typical
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
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
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.
289
CIRCULAR POCKETS
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. To illustrate a practical programming application for a circular pockel, Figure 33-11 shows the typical dimensions of such a pocket.
f---------
'1I
o
J
I
-,
Condition: d<O
2.0 -.--------,
I
Figure 33-12
d
Relationship of the cutter diameter to the pocket diameter
>
o
3
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
Figure 3311
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 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 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 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 o As a simple straight linear motion 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
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.
,
Chapter 33
-.
2.0-
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
01.500
i.
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
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 %
- 2.0
""_m
-~I
RO.625
Tbis method is very simple, but may not always be the best, particularly for very close tolerances or high surface finish requirements. Drawing tolerances may be achieved 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: 03304 (CIRCULAR POCKET - VERSION 1) N1 G20
N2 G17 G40 G80
L_
A
0.125 2.0
01.500
Figure 33-14
Combined linear and circular approach for a circular pocket milling - program example 03305
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
291
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. The example for program 03306 uses three stepovers, calculated from the following formula:
03305 (CIRCULAR POCKET - VERSION 2) N1 G20 N2 G1. 7 G40 Gao N3 G90 G54 GOO XO YO S1200 M03
Q
l@f
==
R -
TLR -
where ...
Q
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
Calculated stepover between cuts Pocket radius (pocket diameter 0/2) Tool radius (cutter diameter /21 Stock left for finishing Number of cutting steps
In
aUf
o Example:
R
S N
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.
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.
Diameter D =. 1.5
Using Ihe above formula, the stepover amount Q can be found by calculation:
Q =
(.75 -
.1875 -
.025)
.1792
rT I
R
--Q
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)
TLR
./
-S
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
----------~--~
.............. .
a,
Figure 33-16
G12
bl
G13
GBO
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..
or
G13 1.. D.. F..
!& where ...
(CONVENTIONAL MILLING)
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
%
(CLIMB MILLING)
o ;: ;
:::::
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
%
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
Macros are very powerful programming tools, but their subject is beyond Ihe limits of this handbook.
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:
10
GOO T0214
TllOS
GOO T0404.
Tool slation 02, Ivearoff;el 14 Tool slation JI, wear offset 05 Tool SUI/ion 04, wear offset 04
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.
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:
"T-
..
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
293
294
34
lATHE
to some extent covered the tool function, II is a "y<;tem<; and <;ome reeach tool as the ac-
Offset Entry
The tool offset can be entered into the ....rr\lYr,,", ferent ways:
o
As a command Independent of the tool
two
point
10 ill~
For an independent offset entry in the is applied together with the rooiutV,c...<.,"'x
the tool
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
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.
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
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: o o o Tolerances only on the diameter Tolerances only on the shoulders (faces) Tolerances on the diameters and shoulders
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:
N34 T0200 M42 N35 G96 5190 M03 N36 GOO G41 X12.0 ZO T0202 MOB
2
General
are training purin reality. All chamfer tolerances are on the project. Matetools are used: Here is the complete
03401
(1. S ALUMINUM BAR - EXTEND 1. 5 FROM
Chapter 34
- 03401.
(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.
Diameter Tolerances
1.0
I"-
o
o
c:i
'<:t
ci
(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 ------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)
I::AOIIII)II::
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"
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
13 14
X-O.003 X+O.003
ZO.OOO ZO.OOO
shoulders) must be
TItis is the complete quired. Since TOI and not ing examples, only T03 will be shown
now on.
TURNING AND
o o o ..IS!
I.l)
I.l)
1"-
ci
1
,
t
-,--0.03 X 45" (3)
34~4
345
f!){RfDDIP.
Multiple offsets ~
Multiple offsets
F!ltJ'J,mnlll
Shoulder Tolerances
drawing shown in Figure 34-4 illustrates part with variable tolerances specified only on shoulders. programming solution is to include
(WO
Shoulder Tolerances
shown in Figure 34-5 illustrates tolerances specified on both
is to include four offsets for 13, T0314, T0315 and T0316. In amounts have to be set before machining amounts middle tolerance are shown:
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. T03 for progra~03402:
03402
13 14 15 16
is the most intensive version. Not only Lt IS eximportant where exactly [he offsets appear in
but their input amount is also critical.
(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
N3l MOl
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
------)
34
N27 Xl.37S C-O.03 (K-O.03) T0316
(- - OFFSET 16 FROM X OVER TO X UNDER ONLY - - -) .
N31 MOl
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:
~3
speeds, may have no which means only a delarge lathes may have all available spindle The most common avranges, are typically assume the definition relaavailable:
14
X-O.0030 X+O.0030
Z-O.0020 Z-O.0020
NG
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):
low
Medium low
M41
OFFSET (GEoMETRY)
NO.
ZAXIS
RADIUS
0.0000
M43 M42
0
M43
M44
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'"rlhpr! in Chapter 30.
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.
299
03404 (MANUALLY CALCOLATED CORNER BREAK USED)
o Functionality
... for strength, ease of assembly, and clearances
o Safety
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
N56 G02 XO.725
Z~0.5
of errors can
02.5
RO.1
(ERROR Dr X)
to
o N
ALLC
Figure 346 Example lor an corner break (chamfers and
RO.1
Chamfering method
Blend radius
"''''''0..,'' ..'''
34-6 shows a simple comers that will benefit programming feature matic comer the drawing qualify).
Chamfering
45 Degrees
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
For the
specify the chamfer:
300
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
Chapter 34
cC+
c+
C+
...,
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.
cK-
K+
1+
X+ Z+
Figure 348
c+
i+
In either case, the sign of I or K vector defines the direction of the chamfer cUlling within the coordinate system:
X-
1&- -
i-
KFigure 34-7
K+
Negative value of! or K vector indicates the chamfering direction into the minus direction of the axis not specified in the chamfering block
The va 1ues of I and K com rna nds are aJ ways sin gle va! ues (i.e., radius values, not diameter values). 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
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!! alonCJ the Z '.1' '-' axis before the chamfer. The chamfer deviation can only be from lhe Z axis lowards [he X axis, with the I veclor programmed:
(;>
... 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
X4.0
GOI Z-1.7S IO.125 (CUTTING ALONG Z AXIS) (CONTINUING IN X AXIS AFTER 0iAMFER)
The vector K indicates the chamfering amounl WId molion direction when the lool molion is in the order of ShouldPr-Clum1jN-f)imnf'It'l;
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
GO 1 X2. 0 K- 0 . 125 (CUITING ALONG X AXIS) Z-3.0 (CON'I'INUING IN Z AXIS AFTER CHAMFER)
programmed:
rn z
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
301
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
Blend
10
90 Degrees
a shoulder and (or
cham
CUI for
into the plus direction of the axis not specified in the radius block
- or... to create a blend radius starting from the Z axis, into the ,orZ+X-direction
Negative value of R vector indicates the radius direction into the minus direction of the axis not specified in the radius block
Programming Conditions
corners modern CNC lathes a for contains vectors lor for blend radius corner.
o
Chamfer or radius must be fully contained in a single quadrant - 90 only Chamfers must have a 45 e and radii must have a 90" angle between a shoulder and a diameter or a diameter and a 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 to the direction of the cut after rounding. one axis only
R"
....
'"
R+
R+
X+
.
R-
z-
xR-
R-
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 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 Both takes
o 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
same vector is when the /'Qmotion direction is in the opposite order which means cutting along
deviation can be from the X The axis, when the R vector is programmed:
These rules appJy equally \0 turning and lathe Study them carefully Lo avoid
lheZ
Programming Example
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.
The
302
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
Chapter 34
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.
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.
, 0 +
'-
U---.U---+
nh
n '---/
0-- v---- 8 r-
,
.
',/
l)
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.
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-
TURNING AND
303
of cut IS suftlskin' of the mRis usually a must before tool acspecifics 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. 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! 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
IIlg
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. 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
I
.~
Figure 34-11
-- W
. .~~ .'
R
f - - - Z POS
x POS
Tool orientation and cutting direction for finishing with common lathe tools. Upper row shows external tools, lower row shows internal tools.
In
Z
calculate
Note that some cutting directions are only recommended for light or medium cuts. Why? TIle answer has a lot to do with (he amount of material (stock) the tool removes in the direction .
where
In-
In
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
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:
Chapter 34
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
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
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.
There is enough data available Lo calculate the unknown depth D, using llle above formula:
D = tan3/2 x .031 + .030 / tan3 D = .60425
+ .031
-
.,
R9/16 (2)
'j
------:---=-- -./
--r
00.939
I I
-.1_
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 Since the earlier suggestion was no more (han .006, recalculate lhe example for the largest depth, if the W=.006:
D
01.029
___--i---=.<~!<
1.25 ROLLER
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:
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.
<
~R \
Drawing detail
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
r
D-'
Figure 34-14 Data required to calculate angle 'b'
I
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. 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.
Tool detail
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 =
305
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,
Once the recess depth D is known, the formula to calculate the angle b is:
b == cos -I
=:
23.07392
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<lrd formula, the spindle speed can be calculated for that diameter as 2455 r/lnin - considerably fast but also correct. The problem? There may not be one for every machine, but if ever there is a problem, the following solution will eliminate it The possible problem will be linked to the rapid motion from the 023.5 to the 0.700. The actual travel distance (per side of part) is (23.5-.700)/2, which is 11.400. During the rapid {ravel rate, the CUlling tool has [0 move I J .400 inches and - at [he same time - change the spindle speed from a slow 73 r/min, to a fast 2455 rlmin. Depending on the control system and its handling of such a situation, the tool may actually start cutting at a slower spindle speed thall was originally intended.
If such a situation docs happcn and presents a problem, Ihe only step that can be done is to preprogram the expected spindle speed in r/min, before the cutting tool approach motion, then switch to the constant surface speed (CSS) mode and continue.
03407
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.
Nl N2 N3 N4 N5
(R/MIN PRESET)
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.
N1 G20 T0100
N2 G96 8450 M03
306
Chapter 34
~-
N2 T .. 00 M4 ..
x ..
(PROGRAM START up) (TOOL AND GEAR RANGE) (STABILIZE R/MIN) Z .. T.. M08
(APPROACH)
(ClJ'I'"ING SPEED)
N6 GOl [X .. /Z .. ] F ..
c
Figure 34-15
SP - - - - -
--
(MACHINING)
z ..
N .. M30
%
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. 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.
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\.
LATHE CYCLES
Complex Cycles
as
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.
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.
307
308
Chapter 35
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.
:'II
-w
G91 is incremental mode fOT milling, U and Waxes are incremental mode for turning
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.
,. . ,
--z-
where ...
L
UJ2
x
Z
== Diameterto be cut
"" 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)
- -v
I (R)
::::
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.
o
Format 1 :
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 ..
where ...
x =
Z
F
=::
Diameter to be cut End of cut in Z position Cutting feed rate (usually inJrev or mm/rev)
GOO
LATHE CYCLES
309
NlO X2. 28 (PASS 6) Nll GOO X10.O Z2.0 T0100 M09 Nl2 MOl (END OF ROUGHING)
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
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)
-1
r
04.125
rXrl'III1JIt'
of G90 cVcle in
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.
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 to
(4.125 - 2.22) / 2
= .9525
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
r
02.25
Figure 35-4
l::xamO,le of
In the musl
to
between the
there is one
310
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
Chapter 35
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
Figure 35-5 The I amount used for G90 turning cycle - extemal and internat
. -2.5
'I
-~-~r
~
aoRKt\jAL
0.875
2.7-
-I
The illustration shows that the r amount is calculated as a single distance, i. e., as per single side (a radius value), with specified directiol'1; based on the total traveled distance and the direction of the first motion from the start position. There are two simple rules for G90 taper cutting:
o a If the direction of the first tool motion in X is negative, the I value is negative
~l
T
i
0.875
If the direction of the first tool motion in X is positive, the I value is positive
1 . . . . . . . . . .;. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .:~
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.
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
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.
LATHE CYCLES
311
Method
I,
=
i
Using Similar
First, calculate <1ltlcerence i between the two known diameters, as per drawing:
= (4 - 2.25) I 2
0.875
will be
101.75
I 2.7 =
/ 2.5
= 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~~_
3.50 ------.-;
=
::::
2.7 x tan a
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.
~n'.... u."x"'.
Similar to the "'''''''''''' be calculated, fore. TIle height i 2.5 is calculated as one 02.750 and the 01
i
the I taper amount has to of similar triangles as triangle over the length of difference between the
= 0.500
= 2.75
- 1.75 / 2
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 -
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
= 2.595
w 03 /0.
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
N"J X2 996 N8 X2.618 N9 X2.24
nal
I I
I / 2.595
:= :=
(1)
(3)
(4)
(5)
(CLEAR PeS ) NlO GOO XlO.0 Z2.0 T0100 MD9 (END OF ROUGHING) Nll MOl
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
---I.()
0')
Chapter 35
--~--~---------------~
("") (!)
I.()
(!)
..,
i'-
0,
.~ X4 . 100 I . ; -X3.778
/START
X3.456
0.173
L.
0.1-73 0.173
C-
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.
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. In Figure 359, 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. The program 03504 will usc the calculations:
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
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:
G94 X(U) .. Z(W) .. F..
(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)
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)
G94 - STRAIGHT
Figure 3510
G94 - TAPERED
LATHE
313
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 rules and has its
of
which will
etc, sj
applied, if applicable to
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.
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:
G71,
and G73
General Description
In total. there are seven multiple
able, identified by a
nY-F'n",'"''
G70
finishing cycle is designed to finish profile by allY one of the three roughing cycles.
G71
G72
G73 Pauern repealing
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
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-
Chipbreaking cycles:
G74
G75
Chipbreaking Cycles
Threading cycle:
The G76 threading cycle is described separately and In sufficient detail in Chapter 38.
314
Chapter 35
CONTOUR
CYCLES
(contouring cycles), are lalhe programming. They anrl internal (horing) maleany machinable contour.
Boundary Definition
on the detinition of two
the boundary, which is (he outline of the pan conlour, is not a new concepl at all, several programming were using this
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. Point Q represents the block number of last Xl coordinate of the finished contour.
will
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
or many points,
Olher in-depth considerations relating to (he P and Q boundary poinrs are equally important, and there are quite a few of (hem:
D
- -
~----------
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.
material removal defined by the starting point and
the p.Q contour must include all necessary clearances. 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. 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-'"<''''
rlQ4tu'I':'1"I
[J
--------:..--.,A/'
1/
_ .- Material
D
,
Part boundary
I
f I
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
D
nlr.orT,,'m
Inane
"''''.\A, ....." P and Q points is allowed is available and programmed, and then . see the next section for
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.
<
315
I:
a7l U .. R .. P10 Q . U . W. F . S mo GOO X.. (ONE AXIS FOR TYPE I)
an
TYPE I CYCLE
... is roughed out in a single depth
Q Example Type II :
Gn
G71 U . R . P10 Q U . W F S NlO GOO X.. Z.. ('!WO AXES FOR TYPE II)
TYPE II CYC
... is roughed out in several depths BI-DIRECTIONAL ... contour
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 o Fanuc Fanuc system
is not allowed
Figure 3512 Comparison of Type land . bidirectional 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
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.
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.).
all cy-
316
G71 Cycle Format - 10T/11 T/15T
The one-block format for the G7 J cycle is:
G71 P.. Q.. 1.. K.. U.. W.. D.. F.. 5 ..
~
Chapter 35
RO.125
03.0
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
................
"c
1.0
0 1.0 N
~.....
0 1.0 ,....... 0
0 1.0 0
I.()
CHAMFERS 0.05
Figure 35-13
x 45 - CORE 09/16
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.
=
=
Second block: 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.
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
The face has been done with the previous 1001 and the roughing horing bar can conlinue the machining:
----, :::i"P
I
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
J
t
P
Cutting direction
SP to P direction is negative for external cutting
Q ,
- Cutting direction
Figure 35-14
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.
(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.
The last programming example 03505, shows Ihal G71 can be used for roughing externally or infernally. There are two important differences:
G72 P.. Q.. I.. K.. U.. W.. D.. F.. S..
where ...
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.
P
Q
K
U W
o
F
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.
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
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
mo n.s
Nll Nl2 Nl3 Nl4
= = =
ZO XO.55 WO.1 FO. 02 (Q-POINT :::: END OF aJNTOUR) GOO G40 XS.O Z3.0 TOlOO MOl
Second block: 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
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
f
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.
An example program 0350() for the G72 cycle uses the drawi ng data in Figure 35- J5.
I I l
I I
I
Q
a a co a
CHAMFER 0.05
x 45
-06.0
- - 0.25 FACE STOCK
Gn
cycle
IS
,~.Q.i
Figure 35-15 Drawing example to illustrate G72 roughing cycfe - program 03506
G73 P.. Q.. 1.. K.. U.. W.. D.. F.. S..
IQj"
where ... P
Q
=:::
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:
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
319
w o
F
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
Spindle speed (ft/min or m/minl overrides spindle between the P block and the Q block
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,
parameters:
o I ... o D ...
this
amount of
oK ... amount of
control requires a double block entry cycle, the programming format is:
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 3717.
can
with a reasonable efficiency, but some 'air' an unwanted side effect for odd shaped
u
W
In the example, the largest expected material amount per will be chosen as .200 (10.2) and the
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
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
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
uses the
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
03507
320
- - - -. -------B'--
Chapter 35
. . . . . . .,
,
'1
A
For safety, use the same start point for G70 as for the roughing cycles.
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 ... )
=1+ U/2
B= K+W
Figure 3518 Schematic representation of 673 cvcle
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 N40 N41 N42 N43 N44 N45
%
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.
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
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:
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
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:
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 ..
P
Q
;;=
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)
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
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.
LATHE CYCLES
321
G14 - PECK DRILLING CYCLE
(00 FACING TOOL + GEAR) (SPEED FOR FINISH FACING)
(03506 CONTINUED ... ) N15 TOSOO M42 N16 G96 5500 M03 N1e G70 P6 Q12
Nl7 GOO G41 X6.2S ZO.3 TOSOS M08 Nl9 GOO G40 X8.0 Z3.0 TOSOO
(START POS.)
(FINISHING CYCLE)
mo
%
M30
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.
Always apply tool nose radius oHset before the stock removal cycle is called after the stock removal cycle is completed
where ...
X(U)
K
D F
= Z(W) I =
;:::
=:
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)
D address does not use decimal point, and must be programmed for leading zero suppression format:
First block: R
=:
Second block:
Only some control systems do allow a decimal point to be used for the D address (depth of cut) in G71 and G72 cycles.
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
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 3519.
the
arc
Chapter
K
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
z
35-19 Schematic format for 674 cvcle example
~
The followmg program example il 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
N1 M30
cycle:
X{U)
Z(WJ P
Q
R
F
Drilling willtuke place to a cremenls of one half of an peck is calculated from an interrupted groove is
=::
example of G75
will
in {he
of two lathe cycles available ''''''rr\J.'r with the G74 cyan inten'upted cuI, for
or
5i
motion. C75 cycle is This is also a very during a rough cut the designed 10 break axis - used mainly a
grooving operation. The cycle is identical to G74, except the X axis is replaced with the Z axis.
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
Il?
where ...
XIU) diameter to be cut of the last groove (for multiple grooves only)
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.
Z(W) =
II
GROOVING ON LATHES
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 Groove location on a part
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 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.
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.
UUV~U[)u
Figure 36-1
323
324
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.
Chapter 36
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.
. LJ
,'
....'
2 1 3
-
--
Figure 36-3 Typical groove locations on a parr Figure 36-2 CUI distribution for grooves wider than the insert
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.
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
o
o
taper cutting
ON
325
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 o have to dlmensionin <=' examfire about equally common in CNC are usually grooves that have a have a much deeper top diameter and its bartom
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.
but
,b
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
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
dimen-
~I
~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)
Jn position
bl
Figure 36-5 Groove depth dimens.ioning . two common methods
12
.15'75
326
The uses the
1001
Chapter 36
as Ihe
(TOOL 8
(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)
N40 IDO (END OF PROGRJl,M)
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)
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
I 2
= .074
same block, during the tool
actual groove plunging Block N37 is a dwell the tool return to the slanthe rrogram.
example was very slm-
, .......
importanl principles thal can of programming any face finish are very critical.
1001
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
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.
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
Figure 36-8 Precision groove distribution of cuts for the example 03802
GROOVING ON LATHES
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:
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.
Cmln =
rrw where ...
em," G w Minimum number of cuts Groove width for machining Grooving insert width
Tw
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.
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
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?
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.
+ 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
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:
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-
o
o
Tn precision grooving, these two factors are equally important and should be considered logether.
328
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
Chapter 36
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
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:
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)
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)
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:
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.
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.
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.
finishing Allowances
[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'
/
0.1250 0.1584 Z-0.6083 Z-0.6250
. Z-0.6870
= .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,
GROOVING ON LATHES
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
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. 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:
N46 Z-O.687 N47 GOl XJ.976 Z-O.62S FO.002 N48 X3.826 FO.003
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.
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 .' 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:
N54 X4.1 Z-O.6083 FO.04
N55 GOO X10.O Z2.0 T0300 M09
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
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
--_.
__.-------
Chapter 36
T0300 M42 G96 5400 M03 GOO X4.l Z-0.6083 T0303 MOa GOl X3.826 FO.004 GOO X4.1
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
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. 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.
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. 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). 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.
o
o o o o
It the groove width becomes too narrow and has to be adjusted, only the Z offset amount is changed.
To adjust the groove left side wall position, change the Z Dffset 03. To adjust the groove right wall position, change the Z offset 13.
FACE GROOVES
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.
00 not cancel the current offset - change from one to the other offset directly. 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.
GROOVING ON
331
a
groove,
o.
02.075 - / 0.125
BREAK ALL
Figure 36-10 Face grooving example - program 03603
""1--
'-- 0.25
internal groove diameters drawing, the actual as well. ...... , au,..... - find one of diameters - llial
(2.625 - 2.075) / 2
CLEARANCE RADIUS
Figure 36-12 Standard grooving insert modified (or face '-"/>,"'111''''
.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
IJrr\nr'<lrn
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:
GROOVE)
Radial Clearance
grooving inserts are
The grooving insert for
03603 (G20)
is mounted at 90" towards the part dIe center Ii ne). A standard groovi ",<or,>",,!> and most likely at its. lower end - Figure 36- J1.
cannol be
IS
ance, as
IS
is a simple operation, providing the are Make sure that the insert width and only minimum otherwise the tool loses
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
CORN GROOVES / NECK GROOVES
36
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
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
GROOVlNG CYCLES
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.
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
b~ used
Cycle Applications
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,
rpr,,,',,\
132
01.7
U/CUT
132
Although for an simplistic LO but it does chips while grooving and Anmher use is they can be In
1,00
rigure 36-13 Corner grODve - undercuf program examo,/e 03804
by alternating between and a rapid relroct motion means that one CUlling mo~'JI"~,,,,_rapid motion, on the and a built-in clearance.
no
and is not
START POINT
j
G()~tl
d d
G75
DIAMETER
(G20) N217 N218 N219 N220 N221 N222 GSO S1000 TOsOa M42
G96 S375 M03
I
I
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
N224 M30 %
DIAMETER
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
r
00.85
The program
G75 cycle, is
03606
on Figllre
Figure 3615
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
program 03605
N87 M30 %
N43 GSO N44 G96 N45 GOO N46 G75 N47 GOO N48 M30
%
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.
on ly di in program ming wi 11 be the value of K . lhe
Xl.OS Z-O.l1S TOlO) MOS XO.S IO.055 FO.OO4 X6.0 Z2.0 T0300 M09
between grooves. H the K is than the inserl CU\. If the K is individual grooves lhan (he width, a wide
the
amounts.
SPECIAL GROOVES
There are many more types in this handbook. They are
cial shapes, used by specific ind a certain purpose. The mosllypical
than can be dc
(I
exactly
of spe
(hat senc of lhis lype are und several
(.275/5.055).
Multiple
with G15
multiple grooves very easily. uscase, the groove the be equal, clearance specification d in nOI programmed.
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.
36
03607 (GRV W/SUB-PROG) - 55 DEGREE DIAMOND INSERT) N1 G20 T0100 N2 G96 5500 M03
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.
nr".I't'r"'''1''I
n r r.....
Multiple
,,,,,"<,
programmed very efficiently precision by using the technique Chapter 39. The guiding
(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 %
"'lil.IIJI"
h."r.~~,,
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 %
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.
H
Figure 37-2
b.
lei
--- ---
a~
0 0
e
[]
If
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
T
I
'-
l
--- TOOL WIDTH
----I
Figure 377
335
336
Iy has a wider insert than a short lool, in
Chapter 37
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 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
0.1
02.65 02.50 02.40
0,1
1.875
ZO-
2,125
Figure 374 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
lip.
I LEFT SIDE TOOL EDGE)
03701 (PART-OFF
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
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
TOOLS
NG P01NT
D.
-1.875 2.0
, 0125
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 %
0.125
Figure 37-3
<lr'ln.I"f'<l,r-fI -
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 375 shows correct of a part-off tool.
PART-OFF
337
Part-off with a Chamfer
H--~YES
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 (<lIang 1he 7. ax is), hut cham fering removes on Iy a small amount of maleriallhal is within the tool capabilities. Avoid chamfers thal are wider than aboul 75% of the insert width or take severa! cuts if needed. The chamfer has 10 be cut before the pan-off and il should be cut from outside in, /lot from inside OUL The correct programming technique for machining a chamfer during pan-off is summed up in the following steps:
o Position the tool further in the Z axis
Start the part off operation and tellllinate it just below the diameter where the chamfer will end
Return to the starting diameter and move to the chamfer start position 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 376 - the loo! n.:Ct:n.:nce poinlls on the lefl side, and (he required chamfer is .020 inches at 45:
CHAMFER 0.02
x 45
02.65
02A6
02.20
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
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
(LEFI' SIDE OF
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-
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-
Never touch the part while the program is in or the spindle is rotating.
usmg
part damage prevention is a CNC lathe equipped with a parts catcher, which is often a speCIal
ine option, 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
In some cases, two lools can justified for part-off of two tools has [0 be accurate. A operations. The
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 -
devices
... screws
nuts
v
Measuring tools
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
/
flm,'1::1f1<;:nfl
o 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
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
339
340
Threading Operations
list of the threading operations thaI can be
o INTERNAL THREAD
.. , is a thread that is cut on the inside of the for example as a nut
CJ
a lypical CNC lalhe. Several operations require a speciallype of threading insert and some operations can only be if the control
o
o
Constant lead threads
ANGLE
rI,::',nMI>(
.. is the angle made by the helix of the thread at the pitch with a to the axis
o
the threading tool will advance along an axis revolution. The lead always determines the and can have constant or variable form.
o
[}
[} [}
[} MAJOR DIAMETER
... is the largest diameter of the thread
[} [}
MINOR DIAMETER
of the thread
Single start threads Multi- sta rt thread s Circular threads Multi-block threads
MUlTiSTART
shifted by the pitch
PITCH
... is the distance from a .,,,,,,,...,t,,.rI corresponding of parallel to the machine axis
PITCH DIAMETER
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
... 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"
[}
ROOT
of a
.. is the bottom
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
:J
cutting:
OF THREAD
betvveen the sides of the thread, plane
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
[} DEPTH OF THREAD
o TAPERED THREAO
.. , is a thread on which the pitch diameter is increased or by a constant ratio as a
.,. generaJly, the distance between the crest and the root of the thread, normal to the axis (in programming, depth is considered as a measurable value per thread side)
[}
CJ
o TPI
... 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
EXTERNAL
". is a thread is cut on the outside of the machined part, for example as a bolt
341
A beller approach IS to cut the thread in several passes, each pass increasing the thread depth. 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.
THREADING PROCESS
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. 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.
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 Motion 2
Motion 3 From the starting position, move the tool to the thread diameter in rapid motion mode
Cut the thread - one axis thread cut (at the feed rate equal to the lead)
Rapid retract from the thread Rapid return to the starting position
Motion 4
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 .
Steps in Threading
0
Compare a threading insert wilh a common 80 diamond tool used for rough turn ing, and a few oddities wi II emerge:
Toof radius:
Threading Turning
=:;
Tool angle:
Threading Turning typically 60 and a weak support 80 and a strong support
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)
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.
::;;; 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.
342
Threading Motion 3
Chapter 38
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:
Z axis clearance for the starting point should be three to four times the length of the thread lead
The threading process is completed with the fourth molion, 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.
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. 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.! For complex methods of inked, the starting position is changing for each cut by a calculated amount.
Thread Cutting Diameter and Depth
""D
"D
ro
(
L-
I
J
..c I-
ro ..... U)
/
- Start X
. Thread 0
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.
This typical description illustrated in Figure 38-2, is only general in nature and usually not sufficient by itself for high quality thread cutting.
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.
POINT THREADING
3
Pass #1 depth - 0.0140 depth - 0.0100 depth - 0.0080
Accumulated depth = Accumulated = depth = Accumulated depth = Accumulated depth = Accumulated Accumulated
Pass Pass
o
Figure 38-3 Threading diameters distributed for
load
Threading diameter Threading diameter Threading diameter Threading diameter Threading diameter Threading diameter Threading diameter
#1
#2 #3 #4 #5
#6
#7
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
Figure
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:
There is nothing wrong with the threading diameters. Wllat this method
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:
D",,---:::::: TPI
~where
xP
...
::=
o
TPI P
Single depth of external thread Number ofthreads per inch Pitch of the thread (l;TPIj
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.9230
= 2.9130 = 2.9040
= 2.8978
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:
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
D:::
If seven threading passes are selected, \Vith the last pass of 00031 (for programming convenience), the individual depths can distributed the following way:
344
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
(START POINT XZ) (THREAD DIA START) (THREAD TO END)
Chapter 38
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.
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.
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:
N64 GOO X3.3
(RAPID
X2. 972
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.
POINT THREADING
From the last two formulas is easy (0 deduct number of starts is one, both the lead and pilCh will have the same value. TURNING TH NG should be applied for
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.
where ... F
== Required
==:
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)
= F3.0
uni(s, the above
where." P TPI
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
will
.125 x 1
= FO.125
threads are special ill lllally IS also the lead - nOl rhe
; ;:; F
rhm single
,",01"",,,,,"
over
di amelers
346
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.
Chapter 38
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 /
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
2540 rpm
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\!.
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.
e e
English example:
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:
Metric example:
= 2100 mm/min
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.
Based on this simple rule, [he maximum spindle speed for a given kad can he selected according to the following formula:
Ftma"l< S
IEf
where ... Fr "la, S Maximum feed rate tor a given spindle speed Maximum feedrate per time IX axis) \ Programmed spindle speed (r/min)
Ft ,,>ox
:=
Q English example:
(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
lr
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:
:::::
=:
Maximum lead error per inch actual feed rate rounded feedrate Number of threads per inch
6350
means the maximum lead that can 1600 rlmin must be less than 4 mm.
at
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 roundCompare the they cause (11.5 TPI over
.0869 .0870 .0871
values only indicate the aClual and the machine and do not or even suitable machining
the errors
Error
threading feed rate requires
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
off.
error over
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
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
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.
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,
v
I
lj
..... .....
b
.....
a'
-d--
-d-
--d~
Thread programming
c
The preparatory this of threading is on some controls, but G32
Figure 38-7 Typical reference points for sewp of threading tools 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
and compatibles.
or .0511:
In an example, a 12 extemalthread will be used. All cuts are disLribUled in seven for the total depth
.0140
.0100
Total depth Diameter Total depth Total depth Diameter Total depth Diameter Total depth Diameter
.0140
2.9720 .0240
lilat
2.9520
.0080 .0065
,0320
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.
2.9360
.0385 2.9230 .0435
#4 depth
.0050
1
.0480
Total depth
#7 depth
2.9040
.0031
Ihrcading and
gralR 111is
method, or
mOLion associated with the il as an individual block of lhe prois called block-by-block Ihreading
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
method.
(G97S450):
SINGLE POINT
03801
(N4S GSO Xl2.0 Z4. N46 TOSOO M42 N47 G97 S450 M03 N4a GOO X3.2 ZO.25 T0505 MOa
The next
hlock,
(PASS 1)
.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
N57 X2.9360
(PASS 2)
(hread
IS
{PASS 3}
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
NSf! N59 N60 N61 N62 N63 N64 N65 N66 N67 N68 N69 N70
xo
L=
(PASS 7)
c=
Z=
38-8
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
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
=
::::
:::::
:::::.
=
:::::
::::
350
the threading
03802
1001
Chapter 38
has been
5 (T0505) and
rrogram, the conlrol system will threads to cuL while they the previous block.
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
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.
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
An
G92
lout can be programmed with to ling [he G92 cycle. If Ihe control system always use the - G76,
cycle is:
I:@i'
where ... X Z F Current diameter of "" End position of the thread Threading feed rate in in/rev pass
The first threading pass will - N49. Note the X axis and lheZ the cutting feedrale:
N49 G92 X2.972
Z~1.6
as well as
FO.0833
(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
fully
even the
can be IS no
pro~
and
(PASS 2) (PASS 3)
(PASS 4) (PASS 5)
(PASS 6)
(PASS 7)
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)
There are two programming Ing on (he conirol model This is the other lathe cycles .
completed by an automatic return of the thread. From that the same way as for G32.
NS6 GOO Xl2.0 Z4 5 TOSOO M09
NS7 M30
One frequent with this is to only by another motion cycle can motion GOO. If GOO IS Ihis case by a
POINT
351
;.-....
x
Z-END
L:: TOTAL 0:: FI K:: TOTAL X:: ROOT
Figure 38-9 G76 - Multiple repetitive thread cutting cycle (10m
a:::::
R;;;:;
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.;:;:;;
~where
... Diameter of the last threading pass Amount of taper over the total length
x=
I
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
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!
with
FO.05
o
G76 Cycle Format - OT/16T/18T
N20 G76 POll0GO RO,05 N21 G76 X76 0 z-30 0 P812 Fl 5
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
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
Chapter 38
In the two block version, the same program will be very simi lar, applying the samc logical thinking.
03S04 (G76 N46 N47 N48 N49 NSO NS1 N52
%
METHOD - '!WO
BLOCK
METHOD)
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
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.
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).
The calculation of the firs/ thread diameter i~ done completely by the control system, providing the following In[ormation is supplied:
o The
root diameter
o
o
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
melhod has Its own procedures.
o
o
the
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
amount
Constant cutting depth
= 2.8978
Tf = .2.9720
+ (.OSl1 x 2)
- (.014)( 2)
r:J
One
cutting cutting
Both
the feature.
the
Radiallnfeed
mOSI
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 Inis 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
Figure 3810 Radial and Compound infeed for thread cutting
Compound Infeed
also called a flallk in of !he [001 tha! moves
10-
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
wards the duced by shape of a chip produced threading 1001 the away from Ihe tool
The
infeed).
or
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
controls (higher level), cycle, Lhat and defines Ihe cutting
38
with
rn
flr"rrlnn/~r1
two
main CULling
than one half of the standard A60 is programmed in will be slightly less 30,
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.
Fanuc CNC lathe controls
ling
thread CUlling
methods of control38-/2):
,
\
BSW,
English or Metric German
thread information and funher thread forms, an is very commonly used for a lire changing
P3
Figure 38 12 elJNing fDr G78 threading cycle (parameter P) Used on 10/11/15T models
P4
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
Pl P2 P3 P4
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.
DIAM
--
03.0000
0.0140
02.9720
0.0100 0.0080 .9230 02.9130 02.9040
ONE-BLOCK M
OD CALCULATIONS
02.8978
a program needs
[0
- S1 S2 S3
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
#1
#2 #3
#4
Pass #5
Pass #6 Pass
at at at at
at at at
( single depth ( single depth I single depth ( single depth ( single depth ( single depth ( single depth
I I
} ) }
and threading pass diameas an Sand S I-S7 disis shifted, [he shift disbasis of compound angle Any new calculation must be
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:
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
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
S - 51
38
#2
=
:::
#3 #4
Sx = Shift for the current thread pass incremental D :::: Single depth of the current thread pass
#5 #6 #7
:::
S2 53 54 S5 86 S7
'"
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.
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.
03805
(COMPOUND INFEED EXAMPLE)
r,
=Dx
(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
Figure 38-14
2) (PASS 2)
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
::
(START 4)
(PASS 4)
(START 5)
5) (START 6)
(PASS 6)
:::
:::
:: :::
55
56 57
x
x
x
x
x x
Total
tan29 .0078 tan29 ::: .0055 tan29 ::: .0044 .0036 tan29 tan29 = .0028 tan29 = .0025 .0017 tan29 -0283
(START 7)
7)
357
Single Axis Pullout
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:
03806
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.
(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:
03807
M23 M24
Thread finishing ON
Thread finishing OFF
(two axes)
(one axis)
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.
(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 %
1- - -
- --
....
- -
.-
d1
J
M23
i ~______~~~______
-.-- d '--
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 d1
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
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.
THREADING TO A SHOULDER
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:
o Recess groove is too narrow or non-existent
/
I .
I
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!
- ....... z+
LlH THREAD:: M03
Figure 3816 Right Hand (top) and Left Hand (bottom) thread CUI using a right hand threading holder (reverse mounting)
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.
o
o
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.
Always use care with modified tools
Insert Modification
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.
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.
359
.750 - .100
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 1enbA th '
~
.650
= =
-; A
-<--
60 V-THREAD
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 / tan30
0.25 1
0.2252
I.()
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.
!'-
r'- .....
---0.13
03.5 03.0 02.8978
co
0.25
ci ...... -0.62 --
N
t 0.3011
o --- 0.67-
I
0.35
1 0.301
!
~--
'1
- --0.05 ,-- 0.75
.J
- 0.75-Figure 38-19 Modified threading insert provides enough clearance in the recess
CJfl:!CJ
Figure 38-18 Threading insert before modificalion does nul Iii ill the I!:IC!:ISS
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
Program Testing
Chapter 38
Whether a tlueading 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 o
o
Use the SINGLE BLOCK mode and step through the program until the thread start position is reached Switch from the AUTO to the MANUAL mode - spindle stops and the threading tool is in the clearance area Select the Xl screen display (absolute mode) Switch to the HANDLE mode ior the l axis 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 If the tool reached the programmed l position first. the tool setu p is safe for the thread ing 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
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
o o
o o
For the ACME threads J 2 TPl and finer, the thread depth formula is modified only slightly:
Td ::: .500 x P + .005
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.
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.
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.
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.
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 Motion 2 Motion 3 Motion 4 Rapid from the start position to the thread diameter Cut the thread (cutting along two axes) from the thread Return to the start position
the previously established formula. the depth D of the thread used in the program will
.61343 / 8 = .0766788
.0767
rhttprp1'I1'p<::
to a slTaight thread, the only for a tapered (hread are in - Motion 3 and Motion 4 remain
rI,Q',;>,F'r\
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
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
mches taper per pilCh (8 TPI). It is a single start thread and Lhe rlrf\O'r<lm zero will be at the from face of finished part. operations have been done
for the
for example as I: 12, I: 16, etc., or as amount of taper perfoot or, raper per inch. Keep one rule in mind:
this type of
will
362
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
38
12.0 - -
- 2.51,5
AN LE:
A = tan (1.5/12)
A 7.125016349
=:
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:
3 : 4
1.5
---'- = .3125
Figure 3821 Taper thread calculations clearances excluded
3 / 4
3.10
Figure 3822 Calculated values for the
1 / 4 .. 1 : 4
nrti,n,-"m
example 03808
ng, weare only interested in at the beginning and at the end can be done ei ther means of
Block by
as'
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.
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.
end diameters have
Front0
End
(he ratio of sides method. will actually be in type of selected programa block-by-block approach depend on the thread control features.
.0165 .0145
.0120
.0100
.0080
.0060
.0040 .0030 .0027
2.0170
1. 9280 1. 9640 1.9440 1. 9280 1. 9160
1. 9080 1. 9020
1. 8966
POINT THREADING
3
to program 03808: 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.
03809
(Gn - TAPERED
2)
are
03808
- TAPERED THREAD)
N46
N47
N48 N49 NSO NSl NS2 NS3 NS4 N55 N56 NS7 N58
N59
N60
N61
N62
N63 N64
N65
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
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
1)
(PASS 3)
(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
4)
Xl.964
Xl.944
Xl.928
Xl. 916 Xl.908
%
(PASS 6)
zo. 4-
(1.8966 - 1.
8)
I 2 :::; .3875
NBO ZO.4
N81 Xl. 1216
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
N82 G32 X1.8966 Z-2.7 NB3 GOO X2.5 N84 ZO.4 NBS GOO X12.0 Z4.S Tosoa M09 Na6 M30
%
Cycle
a straighl infeed and is used for will not change very if a comis used and/or the pullout from the
start
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+
""0 C
..-----..----.-..-----
Chapter 38
--- ..... Z+
(])
ro .......
(j)
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.
0X External
1 -
0X Internal
-<tFigure 38-23 Tapered thread inclination direction I used in G76 threading cycles
The basic G76 cycle will be maintained but the I value will be added - a non-zero value must be programmed:
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
NSl %
r-.
l
/ . --.~
I
,~.---/' 90
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 .
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.
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
Figure 38-25
-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:
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:
Number of shifts
= Number of starts - 1
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
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
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. 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. To illustrate a sample rnultislart thread applicarion. thc following general thread specifications will be used
o
(J
a
P
1.5P
The number of threads per inch is twelve (12 TPI) The number of starts is two (double start thread) The thread is cut as external at 3.000 nominal diameter The calculated thread depth is .0511 (.61343 / 12)
o
-.-- 2P
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
3
Application Example
N60 N61 N62 N63 N64 N6S N66 N67
N6B
Cha
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 Xl. 944 ZO.525 Xl.944 ZO.4 Xl. 928 ZO.525 Xl. 928 ZO.4 Xl 916 ZO.525 Xl. 916
ZO.4
38
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
Z-2.7
Z-2.7 Z-2.7 Z-2.7
03811
2 - DOUBLE START THREAD 1)
N69 N70
N71
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
(--- THREAD 2)
N7S N76 N77 N7e N79 N80 NSl N82 Ne3 N84 %
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
(T2 - PI) (T2 P2) (T2 - P3) (T2 - P4) (T2 PS)
(T2 - p6)
cycle and GOO molion reason ror the G code repel remams In is the FO.2S med only once for each example.
is program-
(T2 - P7)
(T2 - P8l
THREAD RECUTTING
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
will start al a random subsequent 10 start at
maillS
(T2 - P9)
This version can mg cuts of the first In ~program 03812. will be evenly
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
the cylinder circumference. aUlomatically synchronized As long as [he threaded reis assured.
There are I wo
(Tl - PI)
1)
1. 2.
Reclamp the threaded part to run concentric w/spindie Set the X axis large enough, so the tool moves above the thread (external threading) or below the (internal threading)
Visually the threading tool tip with the thread already <:1'"....1>"",,, (only as accurate as one's eye)
(T2 - PI) (START 2) (Tl - P2) (START 1) (Tl P2) 2) (T1 - P3)
1)
3.
- P3)
2)
Thread
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 development and applications of cienl program preparation use
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 0 0
0 0
0 0
and threads
Machine warm-up routines
Pallet changing
Special functions ... and others
0
o
000 000 000
000
0 0
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
Subprograms are loaded illto Ihe IYlt>'rrlrw\ljust I programs. When several benefits:
0
0
o o o
.. ",,,,;;!,rn
length reduction
I!ffur
rl!uuctioll
and
No(
367
368
Identification of Subprograms
application of subproisolation of repetitive pronext six program Ul""'illL" zero return for a typical honat the start of program: For example, a the M98 function
N167 M98 P3951
Chapter
includes
N1 G20
N.2 G17 G40 G80 N3 G91 G28 ZO
(STATUS BLOCK)
In block N167, the CNC memory, to defaul~ depending on stored in the control
N4 G28 XO YO
N5 G2B BO
N6 G90
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.
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 M99 Subprogram call function Subprogram end function
03951
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 end
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 o The address P identifies the number
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
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. subprogram end returns immediately following the subprogram call is illustrated in 39-2 (without described next
In
represents
block
completed subprogram.
in the program of
program contains these
(MAIN - PROOR1I.M)
and the
03952 (SUB)
, ,y..., ,/ is terminated by
M99 P70
the calling program processing will continue N70 block (the main the example), bypassing
blocks N68 and N69.
'"'ULlLl .... "
M30 %
Figure 39-2
programming method
with a single subprogram
Flow of a program
is an item to be explored
associated applications
Block Number to
to
function is
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.
executes block the subprogram the original program from the block N68,
Special Applications
03952.
CDrltmues processing instructions block to return to.
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)
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 .
370
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,
39
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---1
1.0
--0/-2.0
controls do not accept the UK as of repetitions and use a different format. On a single subprogram call is the same:
<D-"?
5/8-12 TAP (5)
I
block calls the subprogram only once, as no special has In order to repeat the subprogram of programming
N342 M98 P3952 L4 (K4)
dra wing used for a subprogram development programs 03901, 03902 and 03953
cycle is used
N342 P00043952
0.2
is identical to the other version - the subpro\;.j..!~~<l.l\A.1 four times. The first four the last four
For example,
M98 P3950 03901
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:
1 - 90-DEG SPOT DRILL - 3/4 DIA)
is
M98 00013950
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)
(LR HOLE) (OR HOLE) (UL HOLE) (MIDDIJ!: HOLE)
or
M98 P00390050
N7 X8. 0
does not change for the 0/16/18120121 controls - it is represented by the first four to the of 9999.
M98 P99993952
N8 YB.O
N9 X2.0
XS.O Y5.0 N1l GSO Zl.O M09 Nl2 G28 Zl.O MOS Nl.3 MOl
(TOOL 2 - 35/64
J..Jfi..,I..JI..L.I..I}
mo
repeats the sand, nine hundred number of repetitions have the maximum
LO/KO in a
counter than is a common application. the form Dro'f!TlllnmeO'! Would
mo
N21 N22 N23 N24 N25
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
TAP) (TOOL 2 - 35/64 DRILL) MOe;
mo
ml T02
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
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
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
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.
In the program,
SUBPROGRAM NU
track
keeping track of
N2 X8. 0 N3 Y8. 0
N4 X2. 0 NS xs.o YS.O
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
subprogram
proper subpro-
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
N3 M06
GOO G54 X2.0 Y2.0 5900 M03 T02 HOI Zl.O M08 G82 RO 1 Z-O.3275 P200 F3.0 LO
P3953
ZLO MOS
N9 MOl
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
o If used in a commonly or five digits. the program number is by the letter O. followed by four on the control system
39
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 have to have assigned program TI1e program number assigned to together with the M98 function and
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
The main program negative or to zero
-
o
o
a or:
- cannot be
does not program On the 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
IS
, is !he minimum
Such a combination of the two words, M98 requirement for a subprogram call (early in [his chapier) of the a lour axis vertical machining cencan (with an assigned representing all needed commands or 021 is not included:
another
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 %
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.
zero return subprogram into the memory, every main program can start by calling the 03954:
has heen designed
03903 (MAIN PROGRAM)
(PART ABC-123)
Nl G20
N2 M98 P3954
N3 GSQ
Units
:Jut'orc'lZmm 03954 call
,;{,.
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
N4 .. _
<.,
IVlnn7117JJ"" .
>
N45 IDO
%
Main
end
the execution of the lwo system, follow all operational program execulion. DUring the program the control system will follow rhe following lions (instructions):
SUBPROGRAMS
3
06200 (SUB 2) N6201 N6202 N6203
1.
Set program number 03903 as the current program number Oisplay comment on the display screen the units of measurement (inches in the example) Branch out to the top of subprogram 03954
... A<, ...... ,O:; all
2.
3.
4.
... t:/./Idsool1
5.
6.
When M99 is processed, the subprogram ends and returns to the main program main program is processed, beginning with the block N3 When M30 is processed, the main program ends and returns to the beginning 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.
Protected Subprograms
7.
S. 9.
it may halt
On the use of
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
As
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
of this feature to protect some from umlUthorized editing or even documentation for further
Im-
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 operator to the exSuch a situation may in the content of losing track of what is really trol system at any To illustrate the
a simple application,
SUBPROGRAM DEVELOPMENT
developed, it must be well most common applicapaUern of machining, ability to recognize the main a subprogram.
Repeating Recognition
unique block
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
374
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 .
Chapter 39
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.
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)
8000
"-...'"
Figure 39-6
:: SUBPROGRAM REPETITION
0
100.407 10 PLACES 0.50 DEEP
OpOO
Figure 39-4
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)
G20
Figure 395 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
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:
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
is
way, particularly useful for a location with the most control systems:
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
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)
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.
D51 .250 radius + .007 stock = .257 D52 = .250 radius + .000 stock .250
Next, the D .. has
[0
Modal
Subprograms
be removed
the subprogram:
03904 and 03905, note repetitions of .0. They are very imporwllt. The subnot the same as
the 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,
A finish contour sub,"' ......""'y,..,~
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
finishing and
work. The reason is in the control as the full culter
t~ke
the f)
it
together wilh
M98,
376
Return from a Subprogram
Chapter 39 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.
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.
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.
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
<START>
I
021
(SUB)
I
022
(SUB)
010 (MAIN)
I
021 (SUS)
M98 P21
' -
M98 P22
M98 P21
M30
M99
'-----0/0
M30
n L% M~9
M99
<ENO>
Figure 397
<END>
Figure 39-8
Two level subprogram nesting
SUBPROGRAMS
377
<START> 010 (MAIN)
021 (SUS)
022 (SUB)
023 (SUB)
024 (SUB)
010
(MAIN)
I
023 (SUB)
~30
rr
M99
<END>
Figure 39-10 Four level subprogram nesting
'---
L
M9a P23
M98 P21
nL M;O
M99
n L% I
M99
M99
'-- %
<END>
Figure 39-9 Three level subprogram nesting
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.
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.
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
378
Chapter 39
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)
01.75
1.5
0.25 2.0
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
%
--<00-
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
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
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
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
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
1001
change
of this
is on a lypical venicnl CNC and uses automatic 1001 change function (ATC):
1.
2. 3. 4,
5.
6. 7.
off the coolant a fixed cycle mode a cutter radius offset made Turn spindle Return to Z axis machine reference position
values
following exercise lakes the extreme. Although it is note, it does serve a very of subrrograms and. their usc.
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).
(his
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
o
C'J 0-
00000! '0
./ ,,_. SUBPROGRAM
ROW1 COLUMN 1
Figure 39-13
100 DOD DOD holes - rectangular grid pattern
0.12
380
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.
Chapter 39
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 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.
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.
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
N60S M99
%
(SPOT DRILL)
N4 N5 N6 Nt
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
%
(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
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 .
The program deSign takes an advantage of the subproo oram Ilcsrin Co and Ihe lnaximulll number of r(1)critions. .0 ... t
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. 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
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.
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.
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
04001
I.l)
40
, 01
(TOOL AT
N3 S1200 M03
N8 X2. 5
(TOOL AT LAST
HOLE OF PART A)
o
40-1
mo
N9 GBO Zl.O
the four holes will be machined at loca!ions oflhe machine table setup, as
(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
Zero
N2, them relates to the in some way. Be velY careful here. Not behind G92 calculations have
troubles.
(001
It is mounted in the spindle In block N2. the part zero (reference cutting tool at this point
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
11.2
Figure 40-2
Program zero shiff using 692 command for fWo pans - 04001
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 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
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:
= -4
-8.7
7
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:
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
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:
~l
9.7
I
YS.O
CD
0
A
11.2
X2.5 Y5.0 is the last hole of the pattern
Figure 403 Calculations of G92 coordinates (XY) for program example 04001
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 Use a local coordinate system, within the current work coordinate system (work offset) selected at the beginning of program
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.
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.
40
Command
IS
active until it is
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.
program. To cancel a local coordinate turn 10 the previously aClive work (0 is to program zero values with
G52
in and to rethai
xo
YO
. , , last example
The
r.m,m~ln(l IS
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. a
rary
zero as illustrated
Figure 40~4.
GS4(X) - - - .
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
N4 G90 G54 GOO X8.0 Y3.0 S1200 M03 T02 N5 G43 Zl.0 HOl M08
PROGRAM ORIGIN
404 Local coordinate system definition using the G52 command
(CNTR)
N6 G52 X8 0 Y3. 0
(l'EMI-- PRG
ZERO AT Be CNTR)
(NO HOLE)
The llluwalion a of six holes )ocaled in a rec[angular plate. The lypical program zero is al the lower
X-l.12S
X-2.25 YO
(HOLE 5) (HOLE 6)
(RETURN TO G54 SYSTEM)
edge of plate and the bolt Y3.0 inches from [hal shift amount. The bolt hole is atlhe 0 position of
are machined
In
N15 G52 XO YO
the
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
----------)
or thiS
,'('\(\1'",1,,,,,,r.,
Gsa XO YO
DATUM SHIFT
mea-
04003 COMMAND USAGE) Nl G20 N2 G17 040 G80 TOl N3 G91 G28 ZO
(TOOL CHG
o o
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
o
o
o
usage emerges
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 (ACT1J1U., TOOL CHANGE)
%
stales that
example
with a rotary
Nl G21
04003)
from
(METRIC)
illustrates the use of the lool change at a fixed position thai is not directly related to 405.
,. ..t-----170 - - - - ,
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
/TOOLCHANGE POSITION
Figure 40-5 Machine coordinate system G53 . program example 04003
N254 , then the spindle in N255, [n the sel comhas the same mean
as:
386
always program all setting information, and do are olher practical uses for
40
sys[em,
wailing Lo
be discovered.
DATA SETTING
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.
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
in this arc for typical Fanuc a common lested on Fanue 16 Model conlrol.
In
..
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.
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
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
command is called.
All types can be set through the pro-
G41 and
if available.
WORK OfFSETS
Before studying this the concept of that de-
..
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 ..
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.
x .. Y .. x .. z ..
Z ..
Machining cenlers
mills
DATUM SHIFT
387
the in this case
to
se-
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:
Pl=G54 P4=G57
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
G90 G10 L2 P3 X-630_0 Y-408.0
Input: Values:
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 set by Gl 0 L10 P.. R.. block Separate Wear offset value
Values 1:
Input 2:
Values 2:
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..
Input 1:
for:
x..
Y.. Z - .
offset group number has changed to c",lc'l'l~ (he additional work offsets.
l'
ValuessetbyGl0110P..R .. block
Geometry offset value
ooffset code
Values 2: Values set by G1 0 l12 P.. R.. block
External Work
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
Hoffset code
Values set by G10 111 P.. R.. block
Wear
value
Values 3:
Input 4:
D offset code
Values sat by G10 l13 p.. block
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.
In all cases, Ihe L group number isler number in of Ihe offset to set lute and incremental length pr:ogrammed input as
388
As an example for a CNC machining center, the following block will input the amount of negative 468 mm into the tool length offset register number 5 (five):
........................................
Chapter 40
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:
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:
G91 GIO LIO P5 RO.5
Be careful with the G90 and G91 mode - remember to restore the mode for subsequent sections of the program.
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._
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.
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
... and so on
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
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.
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
will input 5.000 radius value inlO the culter radius geometry offset register nUlllber 7.
G90 GIO LI3 P7 R-O.03
DATUM SHIFT
389
... updates X-O.! 2 by +0.05, to the new value of X-O.07 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,
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
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
o
o
(. .. data selling .. .)
Gll
Again, to verify, check the selling of lOo] length offset H 12 - it should have [he new value of -107.475. Develop other similar tests (0 follow the same routine. It is always better LO slart a program with confidence.
Gl1
390
In case of d modal G 10 and G II combination, this meaning:
G10 Data setting mode
40
com-
If more Ihan one aXIs IS required to be sel at use mulliple .. P. R.. between G 10 funher in (his section.
R Address
same GI J -
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.
Program Portability
containing even a single programmable eter entry should be used only with the machine and for which were designed.
input
Bit type
Bit
type
0 or 1
Byte type
axis
to
127
255
on dl
con-
o to
0 to :t32767
0 to :t32767
ting the meaning of an address withnl is number 2400 (Bit #0). The parameter
n15 un Fanuc control Model ]6
a
.,"
to :t99999999
3401 (Bit #0). 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 Inabaud rate selling of an Ininterface, if (he I/O Chan-
0 to :t99999999
- a si ngle Jaw HUlIl iJer is a differenl meaning, so exercise care when cilanging one bit but not another.
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
bering and Ihe elers are input as a hyte,
Setting R-value
2
Description
50 baud 100 baud
2
3
110 baud
150 baud 200 baud
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
4
5
DATUM SHIFT
391
Description
300 baud 600 baud 1200 baud 2400 baud
G90
Setting R-value
=
N1221 PI R-250.0
Gll
B
9
10
. 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,
GIO LSO
Nl22I R-2S0000 Gll
11
12
will generate an error condition. The next example changed for two axes input:
G90
IS
GIO LSO
NOl03 RIO
Gll
GIO LSO
N122I PI R-2S0000 Nl221 P2 R-175000 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
Gll
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
(MILLrnG CONTROL)
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 ('binary' means based on two)
Gll
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:
392
eight bits. Ench bit has the End-Of-Block
40
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<lJllpk, ois as f(111ows:
INI ISO #1
will appear automatically on screen. In the saving keyboardi during manual program input.
lilt:
TVC #0
0000
#7
#2
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_'-'
NO R00101010 Gll
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
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
Gll
are completed,
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-
In any program
con-
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
principle of symmetrical
(Figure 4/-/).
UH
Part
Figure 41-2 The
nrlflf':JnIf!
versa]
lhal each quadrant requires function allows the re~ changes automatically.
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.
Depending on the quadrant "'''''c; . . ,.<:.u for the mirror image, may affecl some or all of these activities:
Arithmetic sign of axis Milling direction Arc motion direction (plus or minus) (climb or conventional)
o o
(CWor CCW)
One or more
these axes are only used for mirroring
393
394
Chapter 41
Ir
IS
QUADRANT II (Q2)
Y+ i
QUADRANT I (Q1)
MI
<_ QUADRANT
It
...........
~I
1 '\
x-
,02
G41
QUADRANTIII
...........
y_
OUADRANT IV (04)
IJ
,
yIV
Figure 413
Effect of mirror image on tool path in different [J1l~llJr~/[Jrs
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
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 .
Mirror Axis
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
x+ y+
Quadrant II
III
x- y+
x- yx+ y-
Quadrant IV
At the machine
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
MI
IMAGE
Milling Direction
milling can be programmed or climb milling mode. When
I,
rants will
as follows:
... Conventional mode
in
Mirrored in Quadrant II
III
Control Setting
(0
o Mirrored in Quadrant IV
Il is importanllo understand the machining mode when A conventional machining mode may not In may negatively affect the surface tolerances.
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
(O:OFF 1:0N) (O;OFF LON)
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! Quadrant II Quadrant III IV o Quadrant I . Original arc is CCW: Quadrant Ii CW Quadrant III - cutting CCW QuadranUV . CW
To apply
{he Y
axes
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.
program
MIRROR IMAGE X-AXIS MIRROR IMAGE Y-AXIS 0 0
both
~:.
ON
MIRROR [MAGE
Ihat uses a fhan whe~ programming in a mirror image). During program, with the mirrored, when the mirror the following considerations
!ITaTIIlllilll'
different technique
(wilhout {he all motions in Ihe zero return, will be on. That means
o
x
ON
MIRROR
IMAGE
XOFF YOFF
1.
2.
3.
HOW the program is WHERE the mirror image will be WHEN the mirror image will canceled
is usu-
OFF
Figure 41-5
Start and end of the program [hilt is to ally al the same localion, typically at
Togg/e switches
of mirror
Chapter 41
Y+ j
'--
G54
G
o
-0
, ....
-
0 "<::t
0
<.0
0 0-0
00 0 0
0
,
Programmed tool motion for the three holes located in Quadrant I
0
-0 0 0
j Y+
....-.
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 (CENTER DRILL THREE HOLES)
G40 G80 GS4 GOO XO YO 8900 M03
,
Figure 41-8
(XOYO)
Resulting tool motion in all four "" ,"'.".",. using mirror image
N6 X4.0 Y3. 0
mo
are automalic by the program. The image vary between machines, but the applicarion principles are the same. Control
program
In
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~
Most controls
by the control setting program. On the other
runction is in effect when another function is I both be elfective. To make only one axis
MIRROR IMAGE
397
N2 G17 G40 GSO
N3M23
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
N2 X4. 0 Y3. 0
(MIRROR OFF)
N4 NS N6 N7 N8 N9
G54 GOO XO YO S900 MO} (XOYO) Z1.0 HOI MOS G82 RO.1 Z-O.269 P300 F7.0 LO P4151 (QUADRANT Il
(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)
M98 PH51
mo
Nl3 Nl4 N1.S Nl6
The main program 04 J 02 calls the subprogram 04151 in different quadranls, using the mirror image functions. Note
MJ2 M98 P4151 GSO Z1. 0 M09 M23 NJ.7 G28 Zl. 0 MOS Nl8 GOO X4.0 Y6.0
N19 M30
150
'00
4.00
o o
.-.-00 00
l
0.125
0.50
00
L
4.00
MATERIAL: AL PLATE - 4
x 4 x 1/2
Figure 41-9 Comprehensive example of programmable mirror image Uses main program 04103 and subprograms 04152 and 04753
398
Comp Mirror Image Example
example of a mirror lmage applical wilh mollons will use two culli lools LO
41
drawing in Figure 4
aUiomutlc lool
arc needed - one the slot milling in
NI N2 N3 N4 N5 No N7
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)
(X-MIRROR ON) (QUADRANT II) (Y-MIRROR ON) (QUADRANT I II) (MIRROR OFF) (MIRROR ON) (QU1UlRANT Dl) (CYCLE CANCEL) (MIRROR OFF)
one
ror
Ne M2l
N4 XO YO LO N5 M99
%
<SUBPROGRAM 04152
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
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)
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
%
(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
(Y-MIRROR ON) (QUADRANT III) (MIRROR OFF) (Y-:MIRROR ON) (QUADRANT IV) (MIRROR
G52 XO YO M09 N35 G28 ZO.l MOS N36 GOO X4.0 Y6.0 N37 IDO %
(CLEAR ATe
LOCATION) (PROGRAM
mir-
Quadranl I
IS
also used in
for one
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
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
= MIRROR
Y-MIRROR ON
-------------)
OFF
--------------------)
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
10
rotation uses two preparatory turn feature ON or OFF. The two G trolling the rolation are: 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:
x
R
Absolute X of the center of rotation Absolute Y coordinate of the center of rotation The angle of
Center of
center of rolation
and GI9 will use as the plane selection command G 17, G 18 or G 19 muSI be en-
1- -Figure 42-1
(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
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
cell-
Mathematically, the coordinale rotation is a requires only three items to define a rotated of [he aogle of rotation, the
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
400
Chapter 42
,
CCW== +
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).
,a
/ CENTER OF ROTATION
__ .
CW=='CENTER OF ROTATION
b
Figure 42-2
- ..
f;-\
CENTER OF , , \ PROGAAM ZERO ROTATION = X-10 Y-i.0 ~ (ORIGINAL)
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.
~\
\
\
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
The following program 04201 illustrates the above example (a) , in Figure 425, 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)
1-
30
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
5,0
Figure 42-4 Part oriented as per program, using the G68 command
COORDI
ROTATION
401
block N8 conlains cuner radius offset or compensation programmed will coordinale rolation lakes place .
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
WORK AREA
Common Applications
Coordinare rotation appJied to lit a long part within rhe work area
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
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.
PRACTICAL APPLICATION
In many cases, togelher with milling lions are
example in
o o
Rotated part must fit within the work area The angle ofthe setup must be known
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
o 3/8 CHAMFERING
Not
With gl
(?)
30 FACE MILL
lapp]
is expected.
to IlIteq)l"et {he notes will help.
42
-- - -
,
,
x 3 x 1/2
nmllrPflPn',IVP
C"CHIfWC
RO.15
The main program x.J-r.'-Vk of four sUbprograms. Although some difficult to underSland, one cal. In two subprograms will
G91 G68 XO YO R51.429
(0
next
CUJ3'U'UI.\.>.
The
XOYO remain the same will the angle will increment, because of
only
Figure 42-8
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.
detail
nrnl1rr!'lm
04202
COORDINATE ROTATION
403
(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
04251
Chapter 42
(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)
(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)
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 function is an option on many controls may not be available on every machine Some function as well may be used tor 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 /.
path. The result is many hour.:; of extra work are some of the typical possibilities a scaling function can be beneficial:
o o Similar parts in terms of their geometry Machining with built-in shrinkage factor Mold work
o o
conversion
flexibility in programming, the with other can functions, namely with Datum Mirror Image alld ordinate Ro((lfion described in
For even
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.
It is important to amounts are not various offsets. The changed If (he
o Cutter radius
Reduction
Figure 431
Magnification
Comparison of a part reduction (left) and magnification (right) wifh a part in full scale (middle)
PROGRAMMING FORMAT
To supply the control unillhe
grammer mllst provide
rf'flIllH"P,
/D
o
o
/H /H
In fixed
no! affected
also
The most common preparatory command function is 051, canceled by the eomm,md
GSO
Scaling mode cancel
o
o
G51
406
Scaling function uses program formal:
where ...
I
In order to
of the scaling center (absolute) of scaling center (absolute) of the scaling center (absolute) (0.001 or 0.00001 increment)
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:
N . . FULL SCALE "MAGNIFICATION
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.
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.
Scaling factor
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 o
Scaling factor > 1 Scaling factor = 1
<:
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
, error of 0.000126
". errorofO.O<XH28
" Magnification
, " No
o Scaling factor
are rather extreme is to be applied, for example, (magnification) or 0.95 (reduction) is expected accuracy of the fmal precision. 1 block, the by default.
PROGRAM EXAMPLES
The first '-''' ..AU..,.' .... is
simple - Figure 43-4.
/ - R1.0
.r-
00.5
rom
= 1.5
inches x 25.4
= 38.1
rom
accurate. Now
0.75
'1
I
rom
is no problem. The resulting shown is also 100 percent accurate within the normal programming in '-''',ISH
n
p.rogram., using a one cut around the part periphwithout any scaling.
04301 (BASIC PROGRAM USING GS4 - NOT SCALED) Nl G20 N2 G17 G40 GSO N3 G90 GOO G54 X-l.25 Y-l.2S S800 M03 N4 G43 Zl.O HOl MOB N5 GOl Z-O.7 F50.0 N6 G41 X-0.75 001 F25.0 N7 Yl.75 FlS.O
N8 n.5
o Usi
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
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
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.
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
%
,""""'---
Chapter 43
4.0
RO.5
3.0
Original contour
'\
....
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
%
I Z-O 500
Scaled contours
Figure 438 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
%
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
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
machine can be equipped with additional acto il more functional or functional in a parlicular way. III most CNC machines have at some
THE ACCESSORIES
CHUCK switch set to CHUCK CLOSED switch set to
additional
either as a standard
are a certain amount
or as
IN
OUT
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
o
Tailstock quill
Figure 44-1
10
o o o
o o
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 a or a special fixture a foot pedal. For
Example:
programming procedure would Indue!.:
SLOp and dwell:
(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
cfln also be used on {he machine, mode in manual mode. jaws may be hard (usually serrated for (normally bored by the CNC operator to Only soft jaws can be modified .
44
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
CORRECT
Figure 44-3
I TOO
Bored Diameter
TOO SMALL
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.
covers lips
to
Mosl chucks
44-2.
--
o
o Quill
body
o
All parIS are important In programming
1
Figure 11-2
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<llly available only as a faclory installed option and must be ordercrl :lIthe time ma-
411
Programmable Tailstock
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.
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
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.
M22
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)
1. 2. 3. 4.
Unclamp the tililstock body Move tailstock body forward Clamp the tailstock body Move quill forward into the part
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;;;;;
ilf:liw
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.
M13
Safety Concerns
When programming ajob lhat uses the railstock. s<l.fcty is at least a<; important as for other operations. The tool molion towards the part at (he (oo! rath beginning and its relurn La the lool change position is critical. The safest is an approach from the lool change position (ov.'ards the part along the Z axis firs!. [hen the X motion. On return from a clear position close to the work, reverse [he order - firs! reIract the X :1xi" nhovc (he pm!, fhplJ move the Z ilxis (both <lxes usually move to a safe tool change position).
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
412
Chapter 44
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
M17 M18
(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 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 N1l N12 N13 N14 N1S N16
(TAILSTOCK FORWARD)
(2 SEC. DWELL) (QUILL IN) (1 SEC. DWELL)
N22 Ml2
Figure 445
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.
(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)
N33 N34 NOS NJ6 N37 N3a N39 N40 N4l
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.
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 ill3 G04 Ul.O M22 G04 U2.0 M30
(QUILL OUT) (1 SEC. DWELL)
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.
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. 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.
Bar Stopper
TRAVEL
BAR
......
,0
STOPPER
I?G
~
Figure 44-6 Bar stopper position for bar travel
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.
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 M72 Barfeeder ON - start 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
04402 N1 G20 T0100 MOS N2 GOO XO.125 ZO.025 T010l
N3
Chapter 44
IS BAR STOPPER}
(STOP POSITION)
(CHUCK OPEN) (1 SEC. DWELL) (BARFEEDER ON) (2 SEC. DWELL)
mo
intercept the part and move box is often in the area can without danger,
N4 G04 U1. 0
N5 M7l
N6 N"7 N8 N9
G04 U2. 0
M1l
G04 01..0
M72
(CHUCK CLOSE) (1 SEC. DWELL) (BARFEEDER OFF) (CLEAR POSITION) (OPTION1L STOP)
stopper may
N1 G20
N81 T0700
(TOP OF PROGR.AM)
TOOL ACTIVE)
o
o o
Spindle rotation must be stopped prior to the chuck opening All miscellaneous related to the barfeeding should be programmed as separate blocks
Dwell should be not excessive for the task but
(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)
These are some a bar slopper, but dure for the barfeeder
considerations for
the recom mended
N91 M30
Nn M99 %
ADDITIONAL OPTIONS
are
a CNC lathe that
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.
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. Another two to each other accessories that are also often related
Continuous Operation
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. is an optional stop, lypically
N91
o
o
Part
PullOut
Both are commonly used together wilh tlons and use two miscellaneous
opera-
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!
415
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
T:loc
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:
Count
Slml-
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.
GOO G98 G04 M1.0 GOl G04 M1.l G04 N., GOO
uo.S
(ITEM 01) (ITEM 02) 03) (ITEM 04) (ITEM 05) (ITEM 06)
(ITEM 07)
(ITEM 08)
U1.0 Z .. (ITEM 09) (ITEM 10)
N X Z T>oc.OO
N .. G99
N ..
Pull-Out Finger
a pull-out finger is a device (CNC
that grabs ana pulls the bar out of (he tube (while the chuck is open). This is a typi-
to modi fy
re-
PROGRAMMING EXAMPLE
a com-
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).
I
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:
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)
than its
part-off:
oI.
02.
MOS!
At a rate, move to the spindle centerline ~XO), and a axis position about half-way of the overall bar projection,
feed-in towards the bar as Dwell for about the bar stock. for the finger to catch
03.
04.
NS Ml.1.
N9 XS.O Z2.0 T0100
(CHUCK CLOSE)
N10 MOl N11 N12 N13 N14 N15 N16 N17 N18
M1.7
T0300 G97 S1400 M03
05.
OB.
07.
- a .125
TOl TO T03)
08.
09.
Close the chuck with Ml1. Dwell for about 1 second to Move the pull-out finger away from Return the pull-out chuck closing. bar stock.
GOO Xl_2S ZO T0303 MUS GOl X-O.02 FO.004 GOO X1.2S M09 XS.O Z2.0 T0300 MOl
10.
ll.
N19 MlB N20 TOlOO MOS N21 GOO XO.1. ZO.05 T0101
N22
mo
TO) TO T01) (TO 1 BAR STOPPER) (0.05 STOCK ON FACE) (CHUCK OPEN)
(1 SEC. DWELL)
12.
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
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
%
N41 T0300 (T03 - 0.125 WIDE PART-OFF TOOL) N42 GS7 S1400 M03
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:
In G18 ZX plane . the third dimension is the Y axis In G19 YZ plane - the third dimension is the X axis
x .. y .. z ....
o
F ..
In
operation is only available for CNC machincenters as an optional feature. Let's look at the .~uu'c'-', milling a little closer.
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.
an arc mali on or a
(the plane that is most of the cireu lar i nlerpolal ion wi 11
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:
CCW motion:
x .. x ..
Y .. I.. J .. F .. Y .. I.. J .. F ..
Using
CW
G02 Y .. R F GQ3 X . Y . R . F .
x ..
motion'
called the
option.
The plane selection polation block which axes will program and what their function will
417
418
Arc Modifiers for Helical Interpolation
Thread milling can be used in special benefits. These benefits are o
to
The arc functions are programmed using the same principles as in but will be differentfor is a summary in a table:
Active
Arc vectors
A large thread diameter virtually any diameter can be thread milled (with high concentricity)
Smoother and more accurate thread (only thread grinding can be more accurate)
G17
G18
z
y
I and J
I and K
G19
x
lO
J and K
(,ITl-UUH
two axes (hat form motion linear motion no innuence conlrol system supports the direct radius
o o o
o
o
U
Left hand and right hand threading has to be done with one tool
External and internal ,!">,.".lIIInt1 has to be done with one tool Thread deburring ...... r .. Fnl".,.," or eliminated
o o o
o
milling Helical profiling Helical ramping
o o
Ll
of high particularly in
Extended Elimination of Elimination of <1vrU",''''IO No need in tapping) 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 o
power of the tool versus the cut 1/5th is not unusual) different thread pitch size
THREAD MILLING
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
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
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.
For successrul thread milling, three conditions must before writing a program:
o
a Control system must support the operation Diameter to be threaded must be pre machined Suitable thread milling tool must be selected
HELICAL MILLING
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.
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. 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:
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
"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.
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.
r 45
,
y
xv VIEW ~ TOP
ISOMElmC
,
z
~FRONlT
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
o
U
Clockwise circular cut with positive linear motion Clockwise circular cut with negative linear motion Counterclockwise circular cut with positive linear motion cut with l1elllsmle linear
top view (XY) shows only a circle. The front view ,XZ) shows the helix from the front. The side view (YZ) shows the helix from the standard right side view. The isometric view iXYZ) shows a three-dimensional appearance of a two-turn helix.
o o
10
..
~-;;;~-
. . . . . . . . . .- . . ......
~
~+
Another view
thaI is often very useful, IS the layout). This view is comas a flat objeClthat can wrap
1
45-3
a nat layoul of a
MILLING
421
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 Inwith 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
!rem 5
Item 6.
Ilem 6 lists the bored diameter as inches. Why this number and not other? Remember thai the thread depth is established by a common fonnula. A mula to calculate [he depth D of an internal thread mUHiplies the pilch by a constant:
---- 03.00-12 UN
><./.I.VI,I".
.0833333 x .54127
.0451058
Straight Thread
is the
and (he
1.
When the formula is applied to bored diameter, this amount 10 be the required nominal
3.0000 - 2 x .0451058
of a twice
Internal thread is 3.00 Plate thickness is 0.75 12 TPI == 12 threads per inch 1.500 diameter thread hob
= 2.9097884
the thread should be must be made. The formed on the fina certain advantage. By a little the final finish. will do the lrick.
IS
2.
3.
02.9098
4.
5.
Tool T03 and offsets H03 and Bored diameter is 2.9000 inches
6.
Initial Calculations
the
In the example are six were supplied by the lecled or calculated as We look at the ""'''~''''L\'A.1
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
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.
along
o o o Z
motion direction
so important? Why do they have naled al all? Evaluate them, one by one,
Spindle Rotation
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
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
same
[he approach arc for circular arc for a helical intcrpolation can procedure is exactly the same.
o o
Down or negative
DOWN
UP
t
M03
- RIGHT HAND
Figure 45-5
EXTERNAL
the climb mtiling mode - right and left hand threads, spindle rotation and cutter motions shown
HELICAL MILLING
423
UP
DOWN
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.
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
lead-In Motions
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
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
is
in block N6:
X
N7 G03 Xl 5 YO RO.7S
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:
(on a
Note
45
Lt
(.0208)
R1.50
RO.75
cUlling motion takes place along the tion (up), so the target position absolute value will the start position. and a corrected block N7 can be
N7
(or IO JO.
xol
poinl, the tool is in a position Always try to start (0. 90, t 80 and are much easier to work with.
R1A5
P'''''TInJP
Calculation
0450 I
would bring the the culler it would cut a series of of course, is unacceptable.
srraighl!
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 lendin 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 is
IIiY'
wh ere ."
1 / 12
= .0833333
90,
I,
A TPI
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
formula:
from
A x P
360
IIiY'
then
incre(TURN
where ...
(TURN 2)
'-t
menial
HELICAL MILLING
5
N13 G28 XO YO Zl.O MOS N14 M30 %
cutler
Z
of
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
XO.15Y0.75Z-O.7418
~XOYOZ..o.74~
in absolute mode):
mo
or (1-0. 7S JO)
nale the
N11 N12 N13 N14
%
X0.7SY..O.75Z-O.95
G40 G01 XO YO
START AT XOYOZ..o.95
l'l.I.J...I..>.LNuj
same rules as for an and lead-out may be to Chapter 29 (Circular Inlerpolalion). motions shown in Figure 459.
1) 2)
426
Chapter 45
XQYQ
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.
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.
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
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.
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.
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)
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.
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.
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
\
'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
N17 M30 %
(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)
45
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.
One,
mental mode is used, the Z llxis Slart is (block N4). The cutler
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
comparison of the axis orientation.
INING
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. 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,
'If'
<cL
<9,:.::",.: . ':
~
The most common fourth axis on a honzonlal machining cenler is the indexing type, cailed the B axis.
HORIZONTAL
Figure 46-1
.. 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
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. 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 Presence of a pallet changer Richer variety of setup and offset settings
o
D
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
- -------------Direction of Indexing
Chapter 46
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.
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.
~ Absolute Mode - consecutive indexes:
:7
SETUP SLOTS
ccw
cw
890.0
cw)E l~\V
TABLE
,
Z+
-X+
82700
CCW
Programmed motion in G90 G90 G28 BO GOO B90.0 8180.0 890.0 8270.0 8247.356
- -..
n'---"
\ TABLE CENTER
SPINDLE
CW 90 degrees CW 90 degrees CCW -90 degrees CW 180 degrees CCW -22.644 degrees CCW -247.356 degrees CCW -37 degrees CW 79 degrees
No motion (0 degrees)
BO
8-37.0 B42.0 842.0 8-63.871
The table size including the size of comers is imponant to determine the clearances before indexing.
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 o Table Clamp Table Unclamp
... for example M78
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.
The function numbers may greatly with different machine designs, so check the manual for proper coding. Normally, the unclamp function is programmed before the indexing, followed by the B axis motion and another block containing the clamp functlon:
M/9
Programmed motion in G91 G90 G28 BO G91 G2aBO GOO B90.0 B180.0 B90.0 8270.0
GOO B90.0
me
BO
8125.31 8-180.0 8-75.31 8-75.31 8-424.69
Some designs require other M codes. for example to control the clamping pln or a table ready confirmation. 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.
HORIZONTAL MACHINING
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 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
GOO BO
B45.0
Machine
Ibl
453 B axis direction from 80 to 845.0 in the absolute mode 04501
@)-
,/
Zero
G54 (Y}
:eo
M7S
<
,,
PART
; ,
FRONT VIEW
Figure 46-4 Work offset for a h"""nnt",1 aJ)plll~atllm front view shown
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.
)345.0
Mfa
< DRILL HOLE AT )345.0 >
LO
the
432
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
Chapter 46
- .. z
0
!~
I....J
Q.. -
.., N
,
I
LO
N
I
N
/
l!
0 0
. .-
I"
-
Z-298.0
-
~[~
PART.
"V',
",
TABLE
I
I
IJ
H = NEGATIVE VALUE
One method is to rouch-offlhe ZO of the machined face and register the distance from the tool tip as a negative 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
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
N
-~Z
W <..')
<:(
I-
0:::'
W
'....J
0:::
0..
i=
....J
I,
U , N
0 0
I-
~------~'
..... DIST-TO-GO.
-~[
PART
';{I
....
><:
H-
I I
TABLE
I
=NEGATIVE VALUE
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
G54
0:::
l-
-+Z
(Z-NEGATIVE)
CD
I-
10
i~
.------;--'----, ( OIST-TO-GO
1<111 :
- I
1- H
H :: POSITIVE VALUE H = POSITIVE 46-9 Preset tool length offset to lO=center layout with Has posit.ive
TABLE
I
was
-500.000
0..
i=
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 469 and change from the last two
o o lI
.....I
Z-298.0
j<lll
-q[.200.0
--lao-:
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
H=
Figure 46-8 Preset too/length offset to
VALUE
PART
as always:
G54(Z) + Z clear + HOl :: -500.0 + 2.0 + 200.0
II
1::
TABLE
:x:
IJ
o
H=
...
VALUE
-298.0
Figure 48-10
(0
15.0 depth.
434
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:
G54{Z) + Z clear + H01: = -650.0 + 152.0 + 200.0 = -298.0
46
[n Ihe
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
\.J
- 0250
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.
Due to its design, [he lion before each lool respects, programming exactJy the same.
TOP XZVIEW
06THRU
IS
,
t
I
before a lool
FRONT XY VIEW
1_<<<<<<
26.875
zo
J......;..""'-l--:.....:..;!H-i-+--J.-.J-i-.J
0 .000
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 <In.,,,,,,,",, in an index position other than zero, tools, different part faces, fixture in the way, etc .. it to always know exaclly how to retract is why a simple rule is worth
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
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
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
~I
1"'\--
~--INITIAL
=Z275.000
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
%
XO
Fjgure 4612 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
o
Q
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) %
(I
Subprogram contents
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
co
LL
li
u wu
l.JJ
120
16
FACE A
U
l.JJ ----
(Q
LL
l.JJ
LL
L
NG
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
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
MACHINING
437
N51 N52 N53 N54 N55 N56
N57
(FACE A
B
(FACE C
= G54 = BO = 8
- 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
N60
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)
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
(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 (T02 - 8.4 MM TAP DRILL)
N29 T02
DRILL FACE C)
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'-",
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
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)
N42 Gao Z300.0 M09 N43 G91 G2a YO ZO MOS N44 MOl (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)
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. Although a two pallet system )s the most customary for horizontal machining centers, designs with up to tweJve pallets are not uncommon.
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+
Working Environment
(
- .-""
For a typical dual pallet changer, two major areas should be distinguished:
o
---
\.
)
\
~
J
/
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
o
Pallet
o Machine locator
Transfer System
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+
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. 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 o
Both pallet types are loaded from the machine front area Other pallet types are also available for some special machining applications.
MACHINING
Programming
0 0
there are five axis designated, a horizontal still only a four axis machine. The axes are:
X axis
y
command works properly only when the tion is at one of two machine reference points:
Machine return 10 the primary reference point Machine return to the secondary reference point
W
B axis
G54 X
y
:::
Z
the same, except it moves machine reference
W
B
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,
(LOAD PALLET 1)
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. Typical tailed explanation. match the comments is followed by a more dereference only and
zo
G30 XO
M60
(LOAD PALLET 2)
(iJNLOAD PALLET 2)
lO0
%
G30 WO S . MO)
mo
(11)
440
following comments in the example:
identification
pter 46 ... ( 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)
( 01 I Program number (name up to ! 02 I Message to the operator only n"'Tl",,","n ! 03 1 Metric or English uniti\ selection
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) .. .
r 06 )
[11 J .. .
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 o The corporate standards The personal style
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
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
Chapter 47
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.
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.
o or 0 o
I
Figure 47-1
form of characters written
ambiguity
ily
Many managresponsibility. That will read the it corrccily, the absolutely no nOI be able [0
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
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
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
of writing a program. AIsome doubtful benefits, it is the leas! with a very poor appearthe CNC openHor to read
c::>
Version 1 :
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
%
done
444
Chapter 47
o
ill N4 N5 N6
Program Version 3 :
(TOl - 1.0 DIA - 90DEG SPOT DRILL) Nl G20 N2 G17 G40 G80 G49
N3 T01 M06
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
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
N8 XO
N9 X-3.25 NlO YO Nl1 Y-3.2S
N12 XO
Nl3 X3.25
MOl
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
1) 2) 3) 4) 5) 6) 7) 8)
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
(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
(HOLE (HOLE (HOLE (HOLE (HOLE (HOLE (HOLE (HOLE
1) 2) 3) 4) 5) 6)
N26 XO
N27 X3.25
X-3.25 YO Y-3. 25
XO
7)
8)
MOl
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
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.
X-3. 25 YO Y-3.2S
3) 4) S) 6) 7) 8)
N44 M30
%
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)
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.
SlfJP
5
shortcut compare the - both will have the same results
10
LONG PROGRAMS
who ever worked with a directly in a
nm max!-
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
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
not a would
long program in
en-
more impressive:
Eliminate all zeros programmed for convenience : X2.0 "" X2.1 Eliminate ali or most of the block numbers
If block numbers, increments tool motions into tool motion, if safety allows
o
o o
o
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
%
Use default
o o
length hav!:! he!:!n saved the program some cases, so here are sev-
above example:
descriptions on
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. There is no doubt thai many When thinking well ahead erly. the results will W011h these measures will result
o
o
G21, G17 and G54 have been eliminated (correct settings assumed on the control be careful! 1
full number have been canceled
in some compromise between convenience and necessity. organizing the work properforl.
These methods are shortcuts and shQuld be used for emergency
GSO GOO has been replaced by GSO only (GOO is redundant, although zeros in GOO. have been removed
1,
o o
o
programming procedures.
zero retum has been changed from absolute mode to incremental mode
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'
G90 GO G43 G54 X120. Y35. Z2S. Hl SSOO M3
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-
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.
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 """_"'''''''
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
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 gramming their sense A simple definition relati
DATA FILES
a hard copy the on adisk). documents mentioned here are They creale a sel all fi
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
o
a reliable indication of
capabililies.
to program documentation
can be
Many CNC
sors, underestImate the
mentation. Their
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
o
Q
or to
tirne. Documentation
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 sofware program.
enough to reprogram. If more most likely even a user's manprogram documentais also adaptable to a
Internal Documentation
PROGRAM DOCUMENTATION
an deserves some other? Which one for maximum types, let's evaluate them internal program Is one one (hat combines between Ihe two
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
(THIS IS A COMMENT, MESSAGE OR INSTRUCrION)
External Documentation
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 ...
documentation of a CNC program of several items of their latest version Ihis last slatement is very important The follOWing menlation. They can
o
o
Methods sheet, if
Part drawing
Working sketches and calculations
o
o
LJ
:ITEM
o o
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
Sf ructions:
o
CI
Program data
Special instructions
the CNC operator may fi referenced sheet, under the heading of Special ill-
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
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
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
04802
(DWG
Every rime the Program MOO is used In (he program, document the reason why ie is used:
.1)
A-S462 REVISION D)
SMID
07-DEC-Ol)
Nl04 GOO Zl.O NlOS MOO {CHECK DEPTH "" .157 Nl06
Nl
documentation IS 10 trans,ideas from the to programming enVironment, the ideas from the programmer's II serves as an important link within the communication process.
make It a
Nl06 ...
loolillg sheer are Ihe mher two most program documentation. TIle mathe setup sheet and tooling sheel is
comment is written as a comment block is not lhal are part of Ihe documentation
Enigmatic or cryplic
l<#"~'a.",,';;,,:> translate mto a
cutting
speeds,
both types are The ongoing
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.
many programmers always have
lime
reminds one of a
'Do I make The after wriring {he
situation:
rhe rooling sheet before or program?'
Program Description
systems, program descripTioll can also This is a special kind of a comment, also in parentheses. There are some that
make the
description special.
o
o
The description must be included in the same block as the program number
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.
The
04801
. 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
450
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.
Setup Sheet
Chapter 48
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 ..
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.
Figure 48-1
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.
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
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 o
Machine and program identification Type ofthe cutting tool
07-Dec-01
Peter Smid
1 of 1
i oootdinal'a
Tool diameter Insert radius and the tip number Offsets associated with the tool
Figure 48-3 SimpJe coordinate sheet form - only basic data shown
o o
Toollength
Block number of the tool being indexed Brief description of the tool operation Basic speed and feed of the tool
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.
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.
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. 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.
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.
2
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-
48
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.
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
PROGRAM VERIFICATION
a wrlllcn
IS
Preventive Measures
detected and correcled by Ihe
Now, a perfect
U'-l';UII'"Ul'; -
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?
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. should use is
the program and evaluate it. If
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
is easy. Programmers
the established
The second method can programmers. Ask a"" '"1'''''''-''''' changed program. a check can reveal. A
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
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~
Corrective Measures
o o
. proactive measures
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
454
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.
Chapter 49
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.
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.
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.
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
logical errors
VER IFICATION
5
Logical errors cover an unlimited the following lathe program is For
04901
(EXAMPLE WITH ERRORS)
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.
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
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
and requires a In symbol was program with the cutting feedrate is control would issue an time the program is be:
zo
FO.012
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
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.
Chapter 49
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
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.
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
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.
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?
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.
is peifecr, programmer will No doubt, programmer all directions. The quesresponsibility really manufacturing can the uated? When can the program
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
D
457
458
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
Control Settings Check
0 0 0 0 0
Chapter 50
Is the coordinate setting registered (for G54 to G59) Are all the offsets entered correctly Is coolant necessary What is the status of the BLOCK SKIP switch Is the optional program stop MO 1 active (ON) Is the DRY RUN off if the part is mounted Do you start with a SINGLE BLOCK mode set to ON Do you start with spindle speed and feed rate overrides set to LOW What is the status of MANUAL ABSOLUTE switch (if applicable) Has the position read-out on the screen been set from zero (origin preset)
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 0
0 0 0
Is the slide lubrication container filled with the proper type ot oil (lubricant) Is the coolant tank filled Is the chuck and tailstock pressure set correctly /tuming) Has the machine been zeroed before running a job - is the read-out set to zeros I!'; th ere p.nough (air hose, etc.)
prf!!,;~ Ilre
0 0
Are the tools properly mounted in holders Are the proper inserts used (radius, grade, chipbreaker, coating) Are all the tools the right size Are the tools placed in the proper magazine station
0 0 0
Program Integrity
0 0 0
Is the part mounted safely Is the part properly oriented on the table (milling) Is the proiection of the part from the chuck safe (turning) Is the part lined up for squareness (milling) Are the clearances sufficient Are all the clamps away from the cutting path Is the machine at its start {home) position betore you press Cycle Start Does the tool change take place in a clear area
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
0
0 0
CNC MACHINING
9
o STEP 5 . Check the program
conlrol It is surprising what can mto screen Ihal was nol seen during the be seen on reverse is also true. The common copy
is
such as a
decimal
style is very important Consistency is the operator in the proconfidence of the gram illtegrity, time
ov,:;.rem[)ll<JlSI2~ed.
The
RUNNING THE fl
The CNC machine studying the
PART
o
now is the I steps allows continuation with AI this point. check the the ad and air pressure, clamps, etc., just 10 be sure.
in
vary
for most johs
starts a new job by with the program, and tooling sheet. The next procedures lhal will Iy. they will remain the same
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.
or the looling inforoperator selS the tool stations control memory. properly in the
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,
STEP 8
ne<:essar'v adjustments are finalized in before production begins. adjustment (usually a wear to adjust spindle speeds and
The fixture thai holds or the machine, squared and part is not mounted at this documentation. particularly drawing may often be reqUired
o
A full batch production can start now. Again - a quick worth the time,
as well.
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
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.
460
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
50
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.
All should be for the beuer, Often a major change will rebut more likely, a
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-
to a reasonable extent. When a proit is said to be optimized, il is compared to another lype of pro-
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.
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
Fine-tune the spindle speed and/or f!::ednne Choose the heaviest depth af cut possible Choose the largest tool radius possible Experiment with new cutting materials
CNC MACHINING
1
Documentation Change
0 0
0
0 0 0 0 0
[)
documentation thai is program is not much useful if it not changes done during machini
documented engmeering
the MOl rather than the Avoid excessive dwell times cutting' situations motions where applicable Use multiaxis motion whenever safe
Apply
Look tor block skip applications Avoid spindle direction change Shorten tailstock travel distance
o
o o o o
not return to machine zero after each piece Program tool Reassess
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
MACHINE SELECTION
.nl'H",rl".,r1
Consider
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.
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 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-
Program Updating
(opllmlzation), the rcato do with decreasmay COSI due to a or similar interventions, A program needs LO
In con!rasllo program son for program updating iog the part cost In the end, the change in the but nm because a
be updated after any jer.i., the CNC
in [he
that of
that have been
previously upgraded
Engineering changes in pari
if two machines [Ire differentlll size, but with the same type. Thc exisling program may be usable as orwith only minor modifications.
for
companies {hal
shop, the design lomer, but have the same overall is in the source and origin of
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
NlS G28 XO YO
mo
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
/ N19 M30
(REPEAT FROM BLOCK 5)
is ,simple in structure, yet well thouoht OUL , 0 InlenllOnal programming techniques consample progr<lm:
Q
a
a
a
o Owell is
a a
a
The end tool motion is to the machine zero The end of program M30 is 'hidden' by a block skip function
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.
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
N3 G9l G28 ZO
N4 G28 XO YO
N5 S300 M03
N8 S600
z- 5
Y8.0
5750
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
o o
o
Do not alter design or functionality of the machines or controls Electrical or control maintenance should be done by authorized personnel Do not use a grinding machine near the eNC machine slides 00 not use a welding equipment on CNC machine under power
Personal Safety
Wear suitable clothing (tucked-in shirt, buttoned-up sleeves I watches. rings. bracelets, and similar jewelry before machine operation long hair under a net or tied up Protect your feet by wearing approved safety your eyes - wear approved safety with protective side shields at all times an approved safety helmet if that is the company policy Always towards your hands - never reach part while the spindle is rotating
o
o o o o
o
u
are only some common sense comprehensive list for CNC machining
a
o
In some cases, protection may also be needed for and ears, perhaps even nose
o
o
Never remove cutting chips by hand, with or without gloves on or gloves around moving or When lifting use a crane or
Machine Environment
o o
o Check the from any
be
should such as o
See whether all the material is safely stored and finished parts are in proper containers
When pressed. it will lock in place and must manually in !:he opposite direction to II sparingly and only in real
o o o
Do not remove guards and protective devices Read and follow manuals
Check fixtures and tools before they are used the holders, that tools are sharp and selected properly for the job on
it is
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
WARNING!
Never use a file tor breaking corners or a sand paper for surface polishing during the program execution Deburr sharp edges before handling a part Stop all machine power for Do not operate a faulty machine
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
by
464
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. o
Cl
Chapter 50
Set the Single Block switch ON Set the Optional Block switch ON
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.
Several other precautions could be also be used, but the ones listed are the most typical and should ensure reasonable safety precautions.
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,
2,
3.
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,
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
o Tum down the feedrate override switch to the lowest setting Tum down the rapid override switch to the lowest setting Set mode to JOG or HANDLE Set the handle increment to Xl
o o
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
0
are:
511 Typical 25-pin RS232C port DB type
Data cassettes
Data cards
Bubble cassettes Floppy disks Hard (fixed} disks Removable devices
0 0 0
0 0
0
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
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.
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.
Later in this a sic principles of with the CNC system. terface - (he used for many years bUI
Media
storing
PUNCHED TAPE
Since the beginning of a punched tape has the part program 1980's, the has been replaced by '-'\..o;:""\.II.J
quality, enforced paper. The wide (25.4 mm) and about 900 in a single roll, man most useful descriptions and in Figure 51-2.
the late splendor and laptop computers loaded
DATA
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.
1.0000
in a
To serve as a media for transferring the the control system via a tape reader
data into
INTERFACING TO DEVICES
467
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
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
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.
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.
ISO CODE
EIA CODE
o 7 8 9
.0
8 9
A
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.
C
D
E
C
D
E F
G H I
o
Figure 51-3
G H I
Tape coding standards Even parity (ISO; on the left, odd parity (EIA) on the right
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
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
Chapter 51
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
o
line teed
Tab codes
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.
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.
Tape Identification
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.
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.
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.
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.
INTERFACING TO DEVICES
469
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.
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
TERMINOLOGY OF COMMUNICATIONS
Communications have their own terminology. The(e arc many terms, but five terms are commonly used in CNC:
A bil is an acronym for Binary digit, and is the smallest unit that can Slore information in a compliler. LIlh 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.
o Baud Rate
o Parity
o
o
Data Bits
Start Bit
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:
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
IE't'
where ...
Sb B
::=
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.
o
D
Proper connection depends mainly on the configuration of the connecting data cables.
470
51
CONNECTING CABLES
1
most common
a computer is a shielded
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-
mnm.<:;I~rm;ltJ()11 Df null
modem connections
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 2 3 4 5 7
mm"~_m
0
1 3 2 5 4 7
6
8
Figure 51-7
_ _
6 and 8
20
Figure 51-5 Null modem pin connections
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.
addition, subtracrion, mulriplication and division - are at the core of any
the basic arithmetic
specific mathematical subjects to All of them have been selected only in CNC programming ana are clen the necessary detail.
BASIC ELEMENTS
Arithmetic and Algebra
The subject
involving the
or
mathematical activity. Going a bit of common algebraic functions is roots and powers of a nllmbe/:
CNC lionship of points within a system
knowledge
a
o
Addition Multiplication
Division
mamly
rela-
o Subtraction
o
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
ni>r,rn"fr\l
o Powers of a number
o o
o
.:>VJ\,.llJ'VJ
angle triangles, using lrif!,onometric functions. Very there will be a problem or calculat'ion that will rea solution using oblique triangles, although problems
Variable data
In
one or two unknown equations, unknown to achieve the desired result
Order of Calculations
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-
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
calculalions will follow
o
o
Multiplications and divisions are
or
in all manipulation.
not done
471
472
3 + g x 2 '" 3 + (8 x :2) = 19
Chapter 52
Circle
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:
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:
(3 + 8) x 2 = 11 x 2 '" 22
These two examples show lhat an innocenlly looking small omission may have significant consequences.
CENTER - is a point from which a circle or an arc is drawn with a given radius. RADIUS (radii in plural) - is a line from the center to any point on the circumference of the circle,
DIAMETER - is a line through the center between two points on the circumference of the circle,
GEOMETRY
D
For all practical purposes, there are only three entities in the engineering drawing:
D D D
Points
CHORD - is II straight linc joining any two points on the circumference of the circle. ARC - is any part of the circle between two points on the circumference of the circle. CIRCUMFERENCE - is the length of the circle
(length of the line that bounds a circle) 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. SECANT - is a straight line that passes through
lines
Circles and Arcs
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. Point is also created by a line tangent to a circle, line Langenl to an are, a circle or an arc tangentlo another circle or
an arc.
Lines are straight connections between two points creating the shortest distance between the points.
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
CENTER \\
Figure 52-2
~~
SECTOR - is an area within a circle formed by two radii and the arc they intercept SEGMENT - is an area within a circle formed by the chord and its arc
Neither the sector nor the segment of a circle play any signiticant role in CNC programrnmg.
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.
along the
Y+
=+
Circumference of a Circle
a circle - or its circumference - is seldom and is included bere only to enIt can be calculated from the
II
o~
X+
III
(::::2
rrxr
QUADRANT
(4)
or
523
IGf
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).
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 -
length of Arc
length or an arc is also a rare requirement calculated from [he followIng formula: can
90
~
North
where ...
C
11 :::
r A
180" = West
\
1 0" = East
\
There are two other very to a circle. They are used in nrrHTr<ll'TI should be unde;rswod welL is circle, lhe other on the tangency of a lations require the knowledge of described later in the
Figure 52-4
474
Chapter 52
POLYGONS
defined by a that are joined at the end or edges of the
s
;
-~
D .".,
c
A
B
Figure 52-6 Regular polygon Inscribed and circumscribed circles and a
example, a six sided polygon (commonly the hexagon) has a single angle of 120:
A A (6 - 2) x 180 / 6 120<>
as
from
5 = (NI@"
x 180
where ..
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. regular polygons may have virtually unlimited sides, some polygons arc so common litat they have a special descriptive mathematical name:
S
N
=
in
Number of
(5 - 2) x 190
0
Common name
Triangle
S = 540
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:
il
(N
2) x 180 N
A
N
Single Number
n-gon
475
ption varies between example, AMER NATL (American National Standard Taper taper
F---'
C=Fx{2
c
F=Cx
F --1
FI 2xS
tiLt":>,JV
s
-'~~"_
F F 8 8
_
_~R" _~_
Cx 8 I tan30 F x n30 C 12
Taper Definition
a
in
Most
o
two common
== F / =-8/
,
-,S
527
F==Cx F = 8/
If a single diameter is
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 528 [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
7.
L
TAPERS
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 528
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
529
476
the Figure 52-8, showing J<..,UF,"''''" the following meamng:
I!:i"
52
method, the
Dimensions ...
0 d L
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-
X
All
To calculate the
><ITI/" ....r
Per Foot
foot is defmed as: To calculate the
per foot is the difference in diameter in inches over one foot of length.
vVJlU""... ,
Taper Ratio
Metric
of a taper is similar:
To calculate
small
d, with D, L and X:
~"""rH,.n
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. as I : 5 will increase 1 mm
are
X (if unknown),
477
CALCULATIONS OF TRIANGLES
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
A + 8 + C == 180
Figure 52-11 Sum of All angles in
(I
0
A < 90 B < 90 C == 90
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
o o o
One side and two angles must be known Two sides and the angle opposite one ofthem Two sides and the included angle 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.
c
Figure 52-10 Typical triangles (a) Right triangle (b) Acute triangle fe} Obtuse triangle
a
A
IF a == b
Figure 52-12
N A =B
Isosceles triangle
OBTUSE angle means that the given angle is greater than 90 and smaller than 180 0
A right triangle is also called a right angle triangle. It defines a triangle that has one right angle (90 6 ) An acute triangle is also called an acute angle triangle. It defines a triangle that has three acute angles.
An obtuse triangle is also called an obtuse angle triangle. It defines a triangle that has one obtuse angle.
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.
o
o
c
A b
a
C
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
== b
=c
A = B
=C =60
AI! triangles share a single feature - Ihe sum of all angles in a given triangle is always equal [0 180 0 - Figure 52-11.
Right Triangles
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
An
, as
A
a right triangle (hal is opposite
hypotenuse and is also the
B D::: DIAMETER
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
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
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.
c
A
b
c
C
A=
Figure 5214
=90"
Bisector creates two equal angles
Similar Triangles
are considered similar if they have angles equal and their triangles arc similar, if:
a
o
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 triangles are similar to another triangle sides of the two triangles
b
Figure 5215 Circle inscribed in Bright
o
o
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.
479
H
~ L...:.-_ _ _. . -_ _
=
H
~---------~----
---~~
H
Y1 X2
~----
5218
<----w
----------~
Similar triangles - 1
illustration in Figure shows the relationship same also between two triangles. shows important dimensions:
52-19 triangles 2
l
A Xl Yl
=
;;;;;;
Original 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
H == Original height
:=
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:
Yl =
u == (2.250
U
Figure shows the same two triangles in a simplified way. upper illustration, X and Yare swns of the (clearances)
x n+X2
= 0.6428571
0.500) / 1.750
Y ::::: Yl + Y2
The shows the the opposite sides H to the adjacent formula of the relationship is:
H
U
==
L
W
side (b)
a
sinB
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
If
c
b
tan A
=
=
= c
b a
rml\,v,mol"I"
CNe
o
o
This has its own as a ratio of sides, using the sine, tions angle. Other cotangent, secant and cosecant are
""r'/'I",,'to
",rI",,,,,,.,t to
Tangent of an
DD D
M S
Decimal degrees
Seconds
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.
64"48 '27"
64 + (48 /
.. isequivalenl fo:
60) + (27
3600)
64.8075"
If ."
Then
sinA : : : a
A
:=
I c I c)
/ c)
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. The [lIst the decimal "'"J';..t'-'''--'
29.545021 0.545021 = 29
arcsin
amount from
Or.
A =
If ."
71u.m ...
Or ...
cosA :: b / c A = arccos(b / c) (b / c) A =
tanA = a / b
A ::::
The seconds
ply it by
SIXty,
to
If
Then ...
Or ..
/ b) arctan (a / b) A =
0.545021 x 60
= 31.701126
32'
VVhile there IS only a function, there could For example, of 4Y', as well as
Degrees and
= 42"
2932'42",
Degrees
The final OMS value of the example will with <1 slight error.
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.
Pythagorean Theorem
thagorean
MATH IN
PROGRAMMING
1
~ Example ...
I'II"lrPJrn
/
Area:::: c
2
= V(3 = V(9
x 3 - 2.75 x 2.7S}
Area
o
a
of a right triangle
52-21
Pythagorean Theorem
ale
:::
rlnl'\nr\m~'fnl
Relationships
b/c
:::
. S me
=: .,--:...:.....--
a
alb
:::
:::
Opposite Hypotenuse
Cosine == .,---'--b/a
Adjacent
= cotA
C :::
:::
tanB
HypoLenuse
TOA
a == c x sinA
::;
c x
a I
Tangent::: --'-'--AdJacent
a ::: C x cosS
:::
x sinB
I
\:.J
~p'
a ::: b x tanA
:::
a x tanB
c ::: b I
p
== b /
b :::: a / lanA
b I cosA
Sin ::::
-h
b
a
A ::: 90" B
b:=
:::
\{7T
c - a
90" - A
Cos
......
Peter Has
Broken
His So!1!e
Tan:::: -
P b
......
Figure 5222
Trigonometric functions "",m"",,, for solving right angle triangles
482
52
ADVANCED CALCULATIONS
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.
CONCLUSION
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.
--+2
x2xR 2x
c
sina x 2
(1
xR R-d 2
R-
CHORD
a :::
cosa
-1)xR
-1 COS - -
2x
Figure 52-24 TANGENT of a circle
tan- 1 _ T_X2
2x
CAM Software
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.
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 addincr M08 function in . 0 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.
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
new tools arc mi:\rket and are ofand software is whatlo
on the reqllirt>d applicnWhat kind of What results
Chapter 53
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.
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 o Tool path geometry creation environment Tool path generation Complete programming environment
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''''''",
o o
o
Post processing
Training and technical support
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
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
RONMENT
modules
what is normally nOl not on a two dimensional represendepth, separaling enlilie~ by c 1earanccs or a special tool motion, and so 011.
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
in programming.
is meant only as a very brief guide 10 that apply to CNC programming are the expected features
CNC
o
o
CAD/CAM
485
EOM)
Multi machine support (machining centers, Associative operations tor flexible editing
Associative Operations
When a tool path is ously defined lool paLh not unusual to
ditional method slill is) \0 recreate the
o
o
setup
it is aLlachcd to the previreasons. it is laler. The Il"avendors then recrt'ille the tool path.
o
o
the creal Ion oj' " new Associative operation patn, it it automatically. It IS fast and accurate. f1
works
be
CADL,
can
... )
o o
o
o
Job lob
parameters. lhal store com mon data for terial~ and operalions are also powerful sort ware
AI-
Tooling
Dedicated software
Integrated software
The rit'riirflfr>.d
produce
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
Connection Between
A programming system should lcommunicillions option) between and the. CNC machine. This
ser cutters, the preferred Another reason software, (hal is used to one play ror a
menus look
EDM.ll is also common 10 such as burners, routers, laFor metal cutting, this is
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
Program Text Editor Pen Plotting
Chapter 53
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. 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. 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.
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. 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.
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.
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.
487
RAM and Data Storage
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
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.
Performance
Data storage
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.
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
'''1'1111,.", ..
most updated version of the operating system is never as powerful and flexible as many users would like it to
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:
o
o
Hardware compatibility with IBM (Windows based) - Apple computers havevery limited CAD/CAM applications
latesl version of the Windows operating system (must supported by the CAM software)
central speed - higher::: beller in MegaHertz units - MHz.) memory cache 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 (tape cartridge. removahle drive, DVD,
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
o
o o
o
POST PROCESSORS
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.
A top quality tant customized data into the cutting values, spindle
.:>1J"""u,;>,
stored for
further DH}CeSSU
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
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.
o
o
o
o
changes
take
micro computer technoleven a weeks may change and decisions. Following teclmology creates awaretherefore a more educated
489
ion
IMPORTANT FEATURES
are several important fealllres to look mto whe.n ininlo a CNC programming software. They do on the !ina! runctionality of the program, <llihe All features are important and should
carefully,
or the
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
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
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
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.
User Interlace
Customizing the display is a as crilical as orhers, but a facility 10 tool bars. even menus eXIra
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
jAr,,,,,, .. ,.,,
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.
and
It can represent a significant investmenT of and can hecome a lOlal if i lis nor
speed and
The loss is
customized tool shape, including the Lool on (he screen ro simulate actual tool add even more realism to program
properly. A failure is nOl lhcaClU<llloss Oflhc hardware and sQftware cost. 111C real find heaviesl loss is in the i
o
pany employees pul into the technology. high. To prevent such prospects, keep three in mind when planning a CNC
53
.. System Management
A reliable operation of all system the success of CNC software, Use
good organization, it needs
o
o
No item In Ihe list is any more important olhers - they are all equally imporrant.
backup methods, confidentiality and security, work ronment qualil y , etc . are not con fi ned to a
should be important in the overall company culture .
Training
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
with none or
Technical Support
suppon is an important pan of the system manA service contract or a support can
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
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
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,
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
Training level 2
ing to the ni level eliminates ginning of a new era. plexilY of the first few possible, lhe dil1icult
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 3
The thild level is usually problems. questions, I ips, shortcuts, etc. long term
has
many questions,
all
REFERENCE TABLES
492
D_e~mal
Appendix
inch -
Number 1 Letter
Metr~
(mml
Deci 11I~.U.nch
.1772
.1800
Fraction
_INI
rj letter
15
M~lri~ jlT\.r:2)~
.0886
2.25
4.50 4.60
14
13
.0890 0906
43
2.30 2.35
42
.1811
.0925
.0935 .0938 .0945 .0960 .0965 .0980 .0984 .0995 .1015 .1024 .1040 .1063 .1065 .1083 .1094 .1100 .1102 .1110 .1130 .1142 .1160
.11B1
3/32
3/16
12
11
10 9
5.00 8 5.10 7
13/64
.1990
.2008
7/64 35 2.80 34
33
2.90 32 3.00 31
:'.! 1()
.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
.1614 .1654
1/8
29
3.50 28
9/64
.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
.2570
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
6.40
6.50
5/32
22
4.00
21
4.40
16
.2598 .2610 .2638 .2556 .2657 .2660 .2677 .2717 .2720 .2756 .2770 .2795 .2810 .2812 .2835
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
Appendix
493
Fraction
Number / Letter
Metric (mm)
.2854
.2874 .2900 .2913 .2950 .2953 .2969
L
Fraction
Number / Leiter
Meuic Imm)
7.25 7.30
15/32
12.00 3 i/64
12.50
7.40
M
2992
3020 .3031 .3051 .3071 .3110 .3125 .3150 .3160
.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
0
8.50 8.60
R
.5000 .5118 .5156 .5312 .5315 .5469 .5512 .5625 .5709 .5781 ,5906 .5938 .0094 6102 .6250 .6299 .6406 .6496 .6562 .6693 .6719 .6875 .6890
.7031
,/,
33/64 17/32
12.70 13.00
13.50
15.50
5/8
16.00 41/64 16.50 21/32 17.00
43/64
11/16
8.70
11/32
8.75 8.80 S
8.90
9.00
T
9.10
23/64
9.40 9.50
3/8
V
.7087 .7188 .7283 .7344 .7480 .7500 .7656 .7677 .7812 .7874 .7969 .8071 .8125 .8268
.8281
23/32
18.50 47/64 1900 3/4 49/64 19.50
25/32
9.60 9.70
9.75 9.80
W
2300
29/32 59/64
23.50
15/16
Z
10.50 27/64
11.00
24.00 61/64
24.50
31/32 25.00
63/64
1
7/16
11.50
.9843 .9844
10000
2540
29/64
494
drill sizes in the following tables are based on the
<onn,rnv
T~/~~~~rl-~
9/1624 5/8-11
eqU~ic: alternative
.515 .5156 .5313 13.001300 13.50
33/64 3316<1
17/32
ds UNC/UNf
II
5/B12
5/818
35/64
37/64
.54S9
.5781 .5781 6094 .6250
alternative
5/824
11/16-12 1111616 11/1624 3/4-10 31412 3/4-16 3/420 3/428 13/16-12
13/1616
.6406
.6563
.6719 .6875
.7031
314
49/64 51/64 13116 13/)6 53/64 55/64
.~
I
1/840 #632 #6-36 #640 5/32-32 5/3236 #8-32 #836 #8-40 3/1624 3/1632 #10-24 #1028 #10.:30 #10-32 #1224 #1228 #123:? 7/3224 7/3232 #1420 #14-24
I
0
#3B
Hl15
1511612
.1065
1110 .1130
7/B 57/64
7/8
59/64 15/16
61/64
63/64 .0
.1495
.1540
1/4-18
3/8-18
11.50 1500
470
~14
3/414
1/428 1/432
511618
56.00
TPI
6.90
7.10 8.00
Tap Drill
1/4
11/32 7/16 37/64
Decimal Size
.2500 .3438 .4375
27
27
18
8.50
18
1/,
.5781 .7188
9.40 9M 10.00
14
14
23/32
314
59/61\
.9219 1.1563
15000
1,0
11/4
111/2 111/2
15132
29/64
1
.4531 .4844
'1.50
'1/2
2.0
111/2
'3/4
1.7500
2.2188
31/64
''''/2
27132
Appendix
495
~'t'.' t' H"" 0
MIO x 1.5 MIl x 1.5 Tap Size
1/1S-27
(mm)
- Tap Dtil10
M12 X US
M14 x 2 M16x2 M18 x 2.5
M20 x 2.5 45/64 M22 x 2.5 M24 x3
1/8<:'7
3/8-18
Yl.-14
TiT) I ..
.3346 .3740
.3937 .4724
.5512 .6102
.6890 .7S77
.8268 .'J449
3/4-14
, -II y.
1 1/4-11 Y2
59/64 15/32
I
M27 x 3
24.00
26.50
\/2
38.00
44.00
, 'h-' 1 'h
2-11 'h
M30 x 3.5
10433
n-a
3-8
Drilled Only
Taper Reamed
x 035
M3.5 x 0.35
TPI
1/16
1/8 1/4
Tap Drill
D
Dec. Size
Tap Drill
M4.5
4.00
4.50
27
27 18
M6 x 0.75 M7 X 075
M8 x 1
7/16
3/8
9.25
9.00
'I,
8.75 10.00
11.00 10.75 10.50
1.1406
1-1/8 1-15/32
1.12S0
1.4688
1-1/4
11-1/2
1-31/64 1-47/64
1.7344
22031
1-23/32
2-3/16
1.7188
2.1875
.'1232 .4134
.4528
11.50
11.25
1-1/2
2-13/64
12.75
12.50 13.50
Metric Coa
x Pitch
Threads
Tap
0.75
15.00 14.50
.5709
M I x 0.25
M1.2 x 0.25 MIAxO.3 ML5 x 0.35 ML6 x 0.35 ML8
fi,m
.6693
.6496 .6299
x 035
M2xOA M2.2 x 0.45 M2.5 x OA5 M3 xO.5 M3.5 x 0.6 M4 x 0.7 M4.5 xO.75 MS x 0.8 M6 x 1 M7 x i M8)( 1.25 M9 x 1.25
1.75
2.05 2.50 2.90 3.30
3.75
M22x 1
8268
.8071 .7874 .9055 .8858 8661
22 00
.1969
2362
x2
x2
.2657
.3051
M30 x 3
496
NOTES
Index
A
Absolute data Acceleration
170
163
169
168
\64
223
Block IDOls loois Predslon Single pOint Tool shih !3oss
203
G76.
Additional
Address lonmlt Air cutting. APC part
88 18
43114
165
41 437439 306 B,95-95
ATe
299
C
CAD/CAM CAM soflware programming environment iJP.5:kl0[l com [lU!P.f fllogramming General features .
a9
437-439
B. 60, 9596, l49. 155
3233,
483-4~:
98
100
483
99
101
489 484
\
97 97 97
101
\
Calculations. Calculator type Canned cycles. Cartesian coordinate system Center end mill Centerline Chamfering Chamfer dtameter Character Chuck functions
484
477 40 76 177-190,314320
98
99102
98
102
15
!97
28
16 17 18
129 299
191
41
409
?44 235-246
238
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-OfBlock (08) block block Status block Block skip Barteerier Numbered block
238
231
465 273
170,413 429-436 24 301
25,41,61-68 63 63 64
61
240 236
66
64
61-68 25
65
21,163-170 170 170
HomOnlal mill
liZ3 4 13
in, 439
497
498
Homontal machining center Lathe accessories Lathe axes Machine axes Milling. Six-axIs lathe Threeaxis lathe Turning centers and lathes Twoaxis lathe Types of eNC lathes
Index
9 409415
II 8
Cycle slart time
21,57,170 4
7
13
12
11
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
12 11 9-10, 13 8
2,457464 461
381-392 388
386
38B
463
457 464
158
459 411.462
458
462
5
50
182
Descartes, Rene. Diameter programming
15
30
Continuous path Equidistant Control system Control panel Defaults Features, Memory capacity Optional features ConvenilOoal machining COJ)ventlOnal Conversions HP to kW,
Distance To-Go
39 39
31
ONe
DraWing. 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
Charlg~s
73 132,176 468
31,34
20
23
14 24 29 2
280
36 34 36 35 34
35 30
194
197
39
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 G40G42 Practical example Programming forma! . Programming techniques methods. Tool nose radius offset Toolpath center points of offset Cutting mode Cutting tool animatIOn
39
21,58.278
IS, 17
196 195
195
197
198
2Q7
399-404 206
195
199,214
201. 214
254
256
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
263
251
95
171-176.179.411 176 174
259
257 256 251 262 253 250
176
175
173.207
170
260 266
248 250252 90 30
33
E
English units
G
GOO command 64 69 64 453 456 456
GOI command G02G03 commands G04 command. G09 command GlO data command. G12-G13 G15 command, G16 command , G17G 1 commands 9 G20 command G21 command G27 command, G28 command. G29 command. G3Q command, G32 thread cutting command G40 command G41G42 commands G43 command, G44 command, G45-G48 commands G49 command. G50 command G50-G51 commands . command, G53 machine coordlrlates command G54.1 command G54G59 work oHsets G61 command G62command G63 command G54 command G88G69 commands
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
88
456
455 456
455 463 89 89 68
151. 58
348-349.
251.256
251. 266 123, 132 123, 132 19.122 132
F
Face
122.227-234
227 ' 228 [
83, 113.
n4,
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 ,
230
3811
233
166 87 245
124
123-130, 383-384
90 90 92
89 89
8990
399 313.320 313.315.317-318 178. 184
87 88
21,25,91
G70
G71-G/3 cycles G73 peck cycle G74 tapping . left hand G74G75 lathe G76 precision boring G76 threading G80-G89 commands
21.27,92
87
91
178. 189.203
88 240
177-1 314-320 180
313.350.352.355
178 183
Gal
G82 spot cycle
177 189
179. B9
hand
181-182
178 179
Selection
Shirt amount calclJlations Format notation , Milling syslem format Turning formal.
182 43
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 ,
18S
88
71-72, 1521 160.385,388
308
71-72,1521 lBO, 381 113,1 381,383 3Ll9-350. 363
88
312
43 44
88 84
181,207
500
line,
Index
13>1
G-codes C<lnflicting commands . Group l1um bers Milling applications Modal commands , Turning applications Types of Gcodes _ in a block With decimal pOint. Gear ranges.
47-52
50 51
K
21
47 50
49
52
50 52
2L 50,298
L
179. 190
307-322 320 312 313 314,316321 cycle
,.
Geometry ofiset Graphic display . Grooving and part-off Corner groove
472
104,128.157,254 29
323-334
332
323 324
P and 0 blocks
Yt"--''''o
Grooving ~nOlicallOIJS
Grooving dimensions . Multiple grooves,
330
335-338 326
318
Pan-off ,
Precision gro<lve .
307
314
groove
325
308
Lathe Master tool setup oHsels Offset change Off set enlly , Offsets and tool motion Lathe plOgram formal Least increment _
Linear Interpolation
294 129
295
295 294. 298 295
H
Handle Helical !'HIlling Helicalll1terpolation Helix Ramping Thread Thread Hockey std molion Home posi!iOr'l Horizontal machining eerners
306
73
159. 161, 271 161
21-22
417428 417 419 427 418 421 . 146,151 108.149158 127,429-440
feedrate . Multiaxis molion Programming format axis motion Start and end or motion live Local coordlnale system
160
160 159 159 5
224. 383
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
M
33
70, 43[) 1\30431,434 429-436 181 3U 69-76.429 73 74 474 465-470
72.
56 57 58
59, 79 59, 79
59, 80
60, 95
58
or
58 58 409
411 410
470 469
.
468 466 46:3 151 87
465.467,469
Mi7MIB (unctiolls. M19 functIOn M2i -M22lunctions. . M23M24 thread functions M30 program end func!lon
M~ t -M44 lunciions. M48-M49 functions
. 412 60,80,102 4\ I
60. 357 58
298
92
Index
501
M60 lunction M7I-M72 function M73-M74 functions, M8B-MB9 functions, M9BM99 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 149158 151 151
157
158 156 149158.434
N
Numencal control Advantages Definition Hardwired controls . Soflwired controls
30
191216 194
1-6 2
205
212 199,214 201.214 202 209 191,193
208 37
28
26,389 32-33
0
OHsets
panel.
298.315 20
21,57
36
310
399
108, 122. 150
477
472
471
5%0 53,58
54
56
P
PaUet changer PaUet types Pnrame!ers. Parsons, John Part catcher or unloador .
54
related applications MDI 53,56
437 US
54
21,26.389
22.
.1;d
24
66,45:2 Metne units Milling - Gcodes. M-codes operations Direction o( cui End mills Peripheral milling _ Slots and and teeds Siock removal Width and of cut Minimum axis increment _
Pan
Pari reference pOln!. Part setup Setup sheet P8rt -off Parts counter Pattern of holBS
36 69
47
54
279
275-277 275-280 281-292 277 279
222 223
220
Random hole paltern _ row hoi" pattern
2BO
73
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 .
Index
217
Lathes Machining centers Selection methods Programming formats Format flotation Word address formal
Programming terms PuUOU! Punched tape Py1hagorean Theorem
112 110
2n
271 273
16,269
109 42 113 42 33 41
415
466
161,480
274 269270
269
226,269274 281292 292 289
Q
Quadrants . in eNC programming
285
16
177 225
119122 120
16,238 40
120
119
R
Radius programming Rapid positioning Approach 10 Ihe part Hockey std motion .
2~O
1431118,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 RS232C interlace .
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
26, 147
39
4752 36 42 Li60
144
15
214
304
15
66 58 45
4115
107111.149-
46
447-452
451
448
449
449
62
62 62
3140 56 453456
454
108 471479.481-482 108 109 107 112 113118 109 209,212 181-182 307 30,465,468
453
454
455
S
Safe block . Safety in eNC work function G50G51 commands center factor
360
441-445
65
6
405-408
442 445
443
~42
405 406
16.109,273
406
Index
503
21
6168 159 38
418
28
170 449-450 1\78 25
163
SImulation method !hrEiad
SrnlNGS screen
Setup sheet Similar
421 426
block.
Slash symbol Slot dlill Slots and pockets Speeds and feeds. Spherical end mill . Spindle coolrcl Constant surface Empty spindle Maximum
197
277, 281-292 344-345 273
Hand of lh(ead Infeed methods Lead error Maximum feedrate Muitislarl threads PilCh vs. lead testing Retracl from thread Single poi(Jt ,,,<,,,,,11;,,,,
na6
82
101
setting.
B4
77
Spindle Starlup Spindle JUrlChons orientation formulos version Mellie verSion. Spindle override Spindle
and feeds
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 G5459 Used with G92 Tool setup Offmachine. Offset On-machine Preset tool Using master tool Tool Tool memory type Fixed type Random
344-345.
21.60.80.203
82
361
350
37 37
21, 27
80
126,131 \42,
373
369 368.370 58. 368
139
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.
212 211
210
210
210
21U
88
215
504
Center Ime External tooling lnlemal tooling Tooling selectlon_ Tooling sheet Trial cut table,
_~~_ _ _ _ _ d
38
449-450
168
481 477-481
Tligonometay
G-codes
49
Web drilling Word address formal. addresses Order of words In block_ Word Work area Work coordinate system Work offsets Additional wOlk oHsels
208
42 45
51 41 31 123-130 123130, 386 24,387 128
Tuming M-codes
Tumlng and boring Turning tools
54
293-306 130.293
412
Cammon offset
Datum shi/1 ,
387
124, -386
Turret
128,387
i 23-130, 386
application
127,431
12B
1
U
Uffl commands
Undercut plOgramming
160
Startup Wt'lrk ar~as available . Work offset change Z-axis application Walk sketch
23
125 126
40
304
W
\IV-axis,
Wear olisel Adjuslmem
Z
Z-axis fleglaci
10
105, )29, 254
28
106
NOTES
505
506
NOTES
NOTES
508
NOTES
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.