41675602 cnc programming

529

Upload: sidi-rach

Post on 03-Nov-2014

138 views

Category:

Documents


3 download

TRANSCRIPT

CNC Programming H ndbookSecond Edition

c CProgramming HandbookSecond EditionA Camp hensiv uid Practical CNC rogramming

t r

mi

989

ue

York, NY lOO 18.com

Li

of Congress Cataloging-in-Publication Data

Smid, Peter. CNC programming handbook: comprehensive guide to practical CNC programming! Smid.11-3158-6 1. Machine-louls--Numerical control--Programming --Handbooks, manuals,etc ..I. Title. TJ1189 .S 2000 1.9'023--dc21 00-023974

Second

on

CNC Programming Handbook

Industrial Press Inc.989ue of

Americas,

w York, NY 10018

Copyright

2003.

in the United States

America.

This book or parts thereof may not

reproduced, stored in a retrieval publishers.

system. or transmitted in any form without tbe permission of

5678910

DedicationTo mywho my mother never to give dmila,

AcknowledgmentsIn 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, USAHP and HPGL are registered trademarks of Hewlett-Packard, Inc., Palo Alto, CA, USA IBM is a registered trademark of International Business Machines, Inc., Armonk, NY, USA WINDOWS is a registered trademarks of Microsoft, Inc., Redmond, WA, USA

..

..

About the AuthorSmid is a professional consultant, educator and with many of practiexperience, in the industrial and ed his career, he has on all levels. He an extensive experience with CNC and CAD/CAM to manufacturing industry and educational ns on practical use of ComNumerical Control technology, part programm CAD/CAM, advanced machining, tooling, setup, and many other related comprehensive industrial background in CNC programming, machining and company training has assisted hundred companies to benefit from his wide-rang knowledge.ro.-.'7iOl"'I

companies and CNC maMr. long time association with advanced of Community and Technical Colchinery vendors, as well as his affiliation with anum industrial technology programs and skills training, have enabled him to broaden his professional and consulting areas of CNC and CAD/CAM training computer applications and evaluation, system benchmarking. programming, hardware and operations management.l

Over the years Mr. Smid has tional programs to thousands of across United States, Canada and companies and private sectorl

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

and industria! users. of the CD.at www-industriaipress.com

CNC Programming Handbook

TABLE OF CONTENTS1~

NUMERICAL CONTROL

1

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

22

1717 18

33

18

33 34

5 - CONTROL SYSTEMGENERAL DESCRIPTION Operation Panel Screen Display and Keyboard Handle. SYSTEM FEATURES Parameter Settings System Defaults Memory Capacity. MANUAL PROGRAM INTERRUPTION.

1920 2021 22

4 4 5

556

2222 23 2425

6

2

~

CNC MILLING

777

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 2526 26

CNC MACHINES - MILLING. Types of Milling Machines . Machine Axes Vertical Machining Centers. Horizontal Machi ning Centers HOrIZontal Boring Mill Typical Specifications

8 89 10 10

26 2727

2728

3 - CNC TURNINGCNC 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

11111111

28 28 2828

292929

111212

3030 30

13

1313 1314

30 3030

6 - PROGRAM PLANNINGSTEPS IN PROGRAM PLANNING INITIAL INFORMATION

3131 31 3131

4 - COORDINATE GEOMETRYREAL NUMBER SYSTEM RECTANGULAR COORDINATE SYSTEM.

151515

MACHINE TOOLS FEATURES. Machine Type and Size.

ix

X---------~-.-.

-

--------_.-...

Table of Contents----

Control System.

31

PART COMPLEXITY MANUAL PROGRAMMINGDisadvantages . Advantages

3232 32 32 32 33 33

8 - PREPARATORY COMMANDSDESCRIPTION AND PURPOSE. APPLICATIONS FOR MILLING. APPLICATIONS FOR TURNING G CODES IN A PROGRAM BLOCKModality of G-commands. Conflicting Commands in a Block Word Order in a Block

4747 47 49 5050

CAD/CAM AND CNCInteg ration Future of Manual Programming

TYPICAL PROGRAMMING PROCEDURE PART DRAWINGTitle Block. Dimension ing Tolerances. Surface Fintsh Drawing ReVisions Special InSHucllons

33

5051

343434 35

GROUPING OF COMMANDSGroup Numbers

5151

35 36 36

G CODE TYPES.G Codes and Decimal POln! _

52

5253535353

METHODS SHEET. MATERIAL SPECIFICATIONSMalerial Unlformit)' Machinability Rating.

36 3636

9 - MISCELLANEOUS FUNCTIONSDESCRIPTION AND PURPOSE.Machine Related Functions . Program Related Functions

37

MACHINING SEOUENCE TOOLING SELECTION PART SETUPSetup Sheet

3738

TYPICAL APPLICATIONSApplications for Milling Applications for Turning Special MOl Functions. Application Groups

5454

38 3838 38

TECHNOLOGICAL DECISIONSCutter Path Machine Power Rating. Coolants and Lubricants

54 54 54

M FUNCTIONS IN A BLOCKStarlU p of M Functions. Duration of M Functions

39 39

5556 .sf)

WORK SKETCH AND CALCULATIONSIdentification Methods.

4040

PROGRAM FUNCTIONSProgram Stop Oplional Program Stop. Program End. Subprogram End

5656

QUALITY IN CNC PROGRAMMING

40

5758!'iR

7

~

PART PROGRAM STRUCTURE

414141

MACHINE FUNCTIONSCooiant Functions Spindle Functions. Gear Range Selection Mil r. hi n e Ac:r.ess ori flS

5858 59 60flO

BASIC PROGRAMMING TERMSO-lsr3cter l/-Jcr0

41

41 42PROGRAMMING FORMATS WORD ADDRESS FORMAT FORMAT NOTATIONSystem Formal System Format Word Addresses'

42 42 4343 43 44 45

10 - SEQUENCE BLOCKBLOCK STRUCTURE8u ildlng the Block Structure Block Structure for Milling

6161 6161

PROGRAM IDENTIFICATIONProgram Number ProgrClm Nome.

6262

SYMBOLS IN PROGRAMMINGand ivli nus Sign.

4545

62

SEQUENCE NUMBERSSequence Number Command. Sequence Block Format Numbering Increment Long Program:> Dnd Block Numbers.

636363

PROGRAM HEADER TYPICAL PROGRAM STRUCTURE.

45 46

64 64

END OF BLOCK CHARACTER. STARTUP BLOCK OR SAfE BLOCK

64 65

xiPROGRAM COMMENTS CON NG WORDS IN A BLOCK MING VALUESExact Command Mode Command Exact Automatic Corner Override Mode

66 67

89 89 89 89

ITY.

68

ModeCircular Morion Feedrates

90 90909191 91 91

11 - INPUT OF DIMENSIONSAND METRIC UNITSUnit Values

6969 70

MAXIMUMMaximum Feedrate Considerations,

AND OVERRIDEFeedhold SWitch Feedrate Override Switch Feedrate Override Functions

AND INCREMENTAL MODESCommands G90 and G9l . Absolute Oats G90 - G91 Combinations in a Block

7071 72 72 72

92

E

IN THREADING

92

PROGRAMMING MINIMUM MOTION INCREMENT. DIMENSIONAL INPUT

73

14 - TOOL FUNCTIONT FUNCTION FOR MACHININGTool Storage Magazine Fixed Tool Selection, Random Memory Tool Selection Regist8T1flg Tool Numbers Programming Format Empw Tool or Dummy Tool

9393 93 94 94 94 95 95

7374 74 75 76 76

FuJI Address Forma! ,Zero Decimal Point Programming, Input

CALCULATOR TYPE INPUT

TOOL CHANGE FUNCTION - M06 .

9595

12 SPINDLE CONTROLSPINDLE FUNCTIONSpindle Speed Input,

Conditions for Tool

AUTOMATIC TOOL

9696 97 97

7777

DIRECTION OF SPINDLE ROTATIONDirection for Milling Direction for Turning. Direction Specilication , Spindle Startup

77 78 78 7979

ATC System MaXimum Tool Diameter Maximum Tool Length MaXimum Tool Weight. ATC Cycle, MDIOperatlon

97 98 98

PROGRAMMING THESingle 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

989899

SPINDLE STOP. ORIENTATION SPEED - R/MINMaterial Spindle Speed Units Spindle Speed - Metric Units

80 8081 8181 82

99

99100101

101 102

8282 84 85

102

CONSTANT SURFACEMaximum Spindle SpAAri Part Diameter Calculation in

102103103 103

T FUNCTION FORLathe Too! Station Tool

13 - FEEDRATE CONTROLFEEDRATE CONTROLFeedrate per Minute, Feedrate per Revolutiont:-tlJ-t~1.1

22 inches560 mm 22 inches 0.001 degree

18.5 inchesN/A 60-8000 rpm

40 - 4000 rpm

AC 7.5/5.5 kWAC 10/7 HP distan ... ", - Zaxis 150 - 625 mm inches 430mm 17 inchesNo. 40

AC 11/8 kW AC15/11HP150 - 710 mm 6 - 28 inches 30 560 mm 1.2 inchesNo. 50

Spindle

6-

Spindle center-to-column distance Y axis Spindle taper Tool shank

CAT50

2 - 10000 mm/min 0.100 - 393 in/minRapid traverse rate 30000 mm/min (XY) mm/min IZl 1181 in/min IXY) 945 in/min (Z)

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 inches350 mm 13.75 inches 20 (2)

Tool selectionMaximum tool diameter

...

memory80 mm (150 w/empty pockets) 3.15 inches (5.9 w/empty pockets)

Maximum

length

300mm 11.8

Maximum tool weight

6 kg131bs

44 There arc many applicaions in lhis area. Common exam-

Horizontal Machining CentersHorizontal CNC Machining Centers are alsoas multi-tool and versatile machines. and are bieal paris, where majority of machining has to on more than one in a single setup.

as pump housings, cases, blocks and so on. machining centers always include a special ing table and arc equipped with a pallet and otherare large manifolds,

10Because 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 SpecificationsOn 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.

Horizontal Boring MillHorizontal boring mill is another machine. It closely resembles a CNC horizontal machining center, but have its own Iy, a horizontal mill is by the lack some common features, such as Automatic Changer. As Ihe name of the machine its primary purpose is boring operations, mainly lengthy that reason, the reach of is extended by a specially designed quill. Anthe other typical feature is an axis parallel to the Z axis, called Ihe W axis. Although is, in the fifth nation (X, y, W), a horizontal boring mill cannot be called a true axis machine. Z axis (quill) and the W (awards axis (table) work in the other. so Ihey can be used large parts and hard-to-reach areas. It means, that during drilling, the machine table moves an quill. quill is a physical part of the spmdle. It is in the spindle where the culling 1001 ro"'lies - but in-nnd-out motions are done by the table. method offered on horizontal Think of the mills - if the quill were to be very it would lose strength and rigidity. belter way was to split the tradItional single Z axis movement into two - the quill extension the Z axis will move only of the way Owards lhe and the table itself, the new axis, will move another

CNC TURNINGCNC 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

lathe can funhcrFRONT lathe

described by the

typeo... 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

its design allows

Between the of flat bed and type lathes, front and rear lathes, horizontal and venicallalhe designs, there is another variety of a lathe. This describes CNC lathes by number of axis, which probably the simplesl and most common method identification.

AXES DESIGNATIONA 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~

Types of eNC latheslathes can by the type of the number of a xes. two types are lathe and the horizontal CNC lathe. Of the two, horizontal type is by the most common in manufacturing and machine shops. A CNC lathe (incorrectly called a vertical boring mill) is somewhat less common but is irreplaceable for a work. For a CNC there are no differences in the approach between two lathe types.

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

". ! ---- TOOL

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

" t .....XX-

Three-axis LatheThree~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+

Figure 3-2 Typical configuration of a CNC lathe with two turrets

"

Figure 3-3 Schematic representation of a vertical eNC lathe

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

13promotional 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 lathea 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(SPDmLE CCW)

M05" such message ~nr\P

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, aat 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)

(SHAFT TOOLING - OP 1 - 3 J1U'J CHUCK)

(TOl - ROUGH TOOL - 1/32R - 80 DEG) (T02 - FINISH TOOL 1/32R - 55 DEG) (T03 - OD GROOVING TOOL - 0.125 WIDE)

(T04 - OD THREADING TOOL - 60 DEG)Nl G20 G99 N2

CNC unit is limited, usi ng comment cal. It will listed in proper required details.

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 itsNj40 Z-O.75 Yll.56 Fl0.0 x6.S45 GOl

SEQUENCE

67answer 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

MODAL PROGRAMMING VALUESare modal. The word modal is word 'mode' and means that the comin this mode after it has been used in the once. It can be canceled by another modal command of the same group. Without this feature, a using interpolation in absolute mode with a of J 8.0 in/min, would contain the absolute command the linear molion command GO I and the F 18.0 in every block. With modal values, the programming output is much Virtually all controls accept modal two examples illustrate the commands. ferences:

Two other possibilities tention in programming the following block be

that may require a special athow

N150 GOl G90 X5.5 G9l Yi.7 F12.0

There is an the absolute and inmodes. Most Fanuc controls wi I] process this exactly the way it is written. X axis target posibut the Y axis will tion will be reached in absolute be an incremental distance, from (he current position of the cutter. It may not approach, but it offers advantages in some cases. - the sequence block following the block N ]50 will in the incremental mode, since G91 is specified command! The other programming block programmed in the dealing with this subject that an arc or a circle can modifiers I, J and K (depending control system is used). It also input, using the address R, can following examples are correct, 1.5 radius:

e Example ANl2 Nl3 N14 NlS Nl6 Nl7

without modal values:Y3.4 Y3.4 YO.S Y6.5 Y3.4 FIB.O F18.0 F1B.O F18.0 F18.0 Y3.4 Zl.O

or a turnthat a direct raBoth of the in a 90 arc with a

G90 GOl Xl 5 G90 Gal XS.O G90 GOl XS.O G90 G01 Xl.S G90 GOl Xl.S G90 GOO Xl.S

e Example B - with modal values:Nl2 G90 GOl Xl.S Y3.4 F18.0 Nl3 XS.O N14 YO.S Nl5 X1.5 Nl6 Y3.4 Nl7 GOO Zl. 0identical result.. , Compare Both examples will corresponding block each block of the the modal commands are of the B not to ..... ,..,"'""'11"/1 in the CNC program. In fact, in everyday programming, program commands used are modal. The exceptions are program Instructions, whose functionality starts and in (he same block (for example dwell, machine zero certain machining instructions, such as tool table. etc.). The M functions behave in a example, if the program contains a machine zero return two consecutive it look like this: blocks (usually for safetyN83 G2B Zl.O M09

e With I and J arc modifiers:N21 GOl XlS.3S Yll.348 N22 G02 XlS.as Y12.848 11.5 JO N23 GOl ...

e

With the direct radius R address:

N2l GOl X1S.35 Yll.348 N22 G02 Xl6.85 Y12.848 Rl.5 N23 GOl

N22 G02 Xlo.85 Y12.848 11.5 JO Rl.S

orN22 G02 Xl6.85 Y12.848 Rl.5 11.5 JO

N84 G28 XS.37S Y4.0 MOS

G28 cannot be removed from command is not

N84, because the repeated.

68EXECUTION PRIORITYThere 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:MOOMOl

MOS

M09

M98

andNS60 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 DIMENSIONSAddresses 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:oD

Dimensional units Dimensional references

... English Dr Metric

... Absolute or Incremental

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)

ENGLISH AND METRIC UNITSDrawing dimensions can be used in the program in either English or metric units. This handbook uses the combined examples of both the English system, common in the USA, to some extent in Canada and one or two other clluntries. The metric system is common in Europe, Japan and the rest of the world. With the economy reaching global markets, it is imponant to understand both systems. The use of metric system is on the increase even in countries that still use the English units of measurement, mainly the United Slates. Machines that come equipped with Fanuc controls can be programmed in either mode. The initial CNC system selection (known as the default condition) is controlled by a parilmeter setting of the control system, but can be overridden by a preparatory command written in the part program. The default condition is usually set by the machine tool manufacturers or disuibutors (sometimes even by the CNC dealers) and is based on the engineering decisions of the manufacturer, as well as the demands of their customers.

Without specifying the preparatory command in the program, control system will default to the status of current parameter setting. Both preparatory command selections are modal. which means the selected a code remains active until [he opposite G code is programmed - so the meuic s~stem is active until the English system replaces it and vIce versa. This reality may suggest a certain freedom of switching between the two units anywhere in the program, almost at random and indiscriminately. This is not true. All controls, including Fanuc, are based on the metric system, partially because of the Japanese influence, but mainly because the metric system is more accurate. Any 'switching' by the use of the G20 or 021 command does not necessarily produce any real conversion of one unit into the other, but merely shifts the decimal point, not the actual digits. At best, only some conversions take place, not all. For example, G20 or G21 selection will convert one measuring unit to another on some - bul not all - offset screens. The following two examples will illustrate the incorrect result of changing G21 to G20 and 020 to 021 WIthin the same program. Read the comments for each block - you may find a few surprises:

69

70

Chapter 11

c::> Example 1 - from metric toG21GOO X60. 0G20

units:

Comparable Unit Valuesare many units available in the metric and In CNC programming, only a very small of them is used. The are based on a milapplication. The Engdepending on for the differentMillimeter Meter Inch Foot mm m inft

IniTial wUt selection (metric) X value ,,. arrPI,,)(p/JPrevious value will change into 6.0 incites (real translalion is 60 I'I1m 2.3622047 inches)

c::> Example 2 - from English toG20GOO X6.0

units:

1niJ.ial unit seleclion

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:

next table shows theMetric

Many programming terms use abbreviations. terms between the two mensional systems (older terms are in

Englishftlmin (also FPM or SFPM) in/min (also IPM or fpm) in/rev {also IPR or ipr} (also IPT or ipt)

mlmin (also MPM)

In it is unwise to control system aTe n ..",';.",; system will trol functions will work.

fecled by the changeo o Constant SurfaceFeedrate function Offset values and tool preset

even if the selection of the difference how some confollowing functions will one system of units to the(eSS - for CNC lathes)F

mm/min mm/rev mm/tooth

Dimensional words (X, Y, Z axes, I, J, K modifiers, etc.)

kW

HP

oo

ABSOLUTE AND INCREMENTAL MODESA dimension in either input units must have a rn",."h"-", point of reference. example, if X3S.0 In program and the units are millimeters, statement does nol i where the dimension of mm has needs more information to correctly. There are twooIn

Hand 0 offsets for milling

anumber of rlol"i..,.,,,1

oo

Screen position

Manual pulse generator the HANDLE (value of flllIll speed is set right after

coordinate setting,

milling. this distinction normally does notspindle speed in rlmin is always assumed.

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

N1 G20 GSO X16.0 ZS.O T0100 N3 G96 MOO MOl

In this quite common application, the actual spindle speed will be on the current diameter of 16 inches, In r/min in block In some cases, this will be too low. Consider another example:

o

2:

On large CNC lathes, GSO of the X diameter is quite large, 024.0 the previous example, target diameter the next tool motion was nat important, but in case it is. example:N1 G20 N2 GSO X24.0 ZS.O T0100N3 G96 S400 M03

N4 GOO X20.0 TOIOl MOB

83756000 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 ExampleFrom 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

the tool will

cut using constant surface speed mode 696

Althougb only selected diameters are shown in the illustration, along with their revolutions per ute, the updating is constant. Note the sharp increase in r/min as tool moves to machine center When the reaches XO (00.0), the speed will be at its maximum, within the current gear As this speed may be too high in some cases, the control system allows setting of a maximum, described a speed a lathe, options. In following examples, important ones will be examined. The gear tions are omitted for all examples. are most func-

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

e

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 subsequentN1 G20 N2 G50 X24.0 Z5.0 TOIOON3 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 registerNt 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:

CNe lathe does not modern lathes have ato wait before ac-

01201 (SPINDLE SPEED c::t.AWP)

until the spindle

fully accelerated.

N2 G50 X9.0 Z5.0 S1500N3 M42NS

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.

N4 G96 8400 M03 GOO G41 X5. 5 ZO TOIOl MOB

(1500 R/MIN MAX) SPINDLE RANGE) AND 400 Fl' /MIN) CENTER L.I.NE)

N6 GOl X-O. 07 Fa. 012N7 GOO ZO.1 N8 G40 X9.0 Z5.0 TOIOO N9 M01

,~._.

Maximum Spindle Speed :t8t[lngCNC lathe operates Constant Suiface the spindle speed is to the curdiameter. The smaller diameter is, the spindle speed will be. natural question is - what happen if the tool diameter is It may seem but there are at impossible to ever program a zero least two cases when that is the case. the first case, zero diameter i~ t'lT'l'1,~,ml'1nl"l1 ter line All drilling, center similar are programmed at (XO). are always n"'(,'C1T~ITT1Tnf"n using 097 con:uru:ma. is controlled directly, not change. case of a zero diameter is when facing off a solid part all the; way to the center is a different diameter situation. all operations at XO, the does not because a direct r/min is proi gramnle 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)

outside arcs, the wards. to a higher

up-

lEi" where ...

F.F~

R

=

=

Outside radius of the part Cutter radius

FEEDRATE CONTROL\ ......\

91

arcs, the wards, to a lower value:

is generally adjustedx (R

dOW~

fEEDHOlD AND OVERRIDEWhile running a program, programmed be ~emporarily suspended or changed by using one of two avatlable features of system. One is jeedhold switch. the is a jeedrate override Both switches are standard allow the CNC operator to control the feedrate during program operation panel. They are

r)

RIlii" where ...

F, F, R r

=

Feedrate for arc Linear feedrate Inside radius of the part Cutter radius

Feedhofd SwitchFeedhoLd 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 fEEDRATEmaximum 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

Maximum feed rate ConsiderationsThe maximum cutting feedrate per rp.;:tr./"'tpl1 by the programmed spindle maximum rapid traverse rate of It is quite to the feed rate per revolution too high withit. This problem is most common in sin-

feed rate Override Switchis nonnally by means of a switch. located on the control panel of the13-3.

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

I

// ~

'M06 T15(ACTUAL TOOL CHANGE - T04 m SPDmLE) (MAKE NEXT TOOL

N26 N27 N28 N29 %GOO Z M09

G2B Z MOSGOO X . Y M30

(TO 1 MACHINING DONE) (TOl TO Z-li0111E (SAFE Xi!' (END OF PRC)GRAM)

fill the table, start from the program top and occurrence of the T address and M06 function. All are irrelevant. In the example 01402, the will filled as a practical sample of usage.

Any Tool in Spindle - Not the firstis the most common method of nr/"\"'r'lln1,1"Y1, The operator sets aU tools in the magazine, settings but leaves the last tool measured in the "1-"""" . . . most machines, this tool should not the tool. matches this too! changing method within following example is probably the one that the most useful for everyday work. All are comments.01402N1 G20

In

lool is in the way of part changing, it remains "I.u ............ permanently for the job.

Programming Several Toolsusing several tools is the most typical work. Each tool is loaded into the spindle various ATe processes. From the viewpoint. the various lool changing meththe cutting section of the program, only the start tool (before machining) or the end of the tool (after machining). the required tool can be changed automatically, only if the Z axis is at machine zero (for vertical or the Y axis is at machine zero (for horizontal machining tool position in axes is only important to the safety the is no tool contact with the the are formatted programs use machine of last tool, for example: zero returnN393 N394 N39S N396 GOO Z M09 G28 Z MOS

(ANY TOOL IN SPINDLE AT START)

(**** NOT THE FIRST TOOL ****)N2 G17 G40 GSO Tal

N3 M06

(INCH MODE) (GE.'T TO 1 READY) (TO 1 TO SPINDLE)

As

N4 G90 GS4 GOO X Y S.. M03 '1'02 ('1'02 READY) (APPROACH WORK) NS G43 Z Hal MaS

< ... TO}

.. >(TOl MAClUNING OONE) (TOl TO Z HOME) (SAFE XY POSITION) (OPTIONAL STOP)

N26 GOO Z M09N27 G28 Z.. MOS N28 GOO X . Y N29 MOl

G28M30

x..

Y

TOOL WORK DONE) TOOL TO Z HOME) TOOL TO XY HOME) (END OF PROGRAM)

N30 N3l N32 N33

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

%

< ... T02 working .. . :>N46 GOO Z M09

with this practice, but a large volume of

NS7 G28 Z . M05N48 GOO X Y N49 MOl

MACHINING DONE) TO Z HOME) (SAFE XY

N50 '1'03

N51 M06N52 G90 GOO GS4 X Y

Keeping Track of ToolsIf the lool is easy to keep a track of where tool is at moment. In later examples, more complex (00\ will (ake place. Keeping a track which tool waiting and which tool is in the spindle can with a 3 column table with block number, 1001 waiting and tool in the spindle.

N53 G43 Z .. H03 MOS

< ... 7rJ3 working .. . :>N66 GOO Z.. M09 N67 G28 Z MaS N68 GOO X . Y (T03~

N69

mo

('1'03 TO Z XY POSITION) (END OF PRCiGRAM)

%

100The filled-in table below shows the status of tools for the

Chapter 14

first part only. '?' represents any 1001 number.Block Number-

Tool Waiting?

in Spindle? ?

Nl N2 N3 N4 N30 N31 N32 N50 N51 N52

Tal?

TOl TOl TOI T02 T02 T02 T03 T03

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.

First Tool in the SpindleProgram may also start with the first tool in the spindle. This is a common practice for the ATC programming. The fIrst tool in the program must be loaded into the spindle during setup. In the program, the first tool is called to the waiting station (ready position) during the last tool - not the first tool. Then, a tool change will be required in one of the last blocks in the program. The first tool in the program must be firs! for all parts within the job batch.01403 (FIRST TOOL IN SPINDLE AT START) N1 G20 (INCH MODE) N2 G17 G40 GSa TO::! (GET T02 READY) N3 G90 G54 GOO X . Y . S M03 N4 G43 Z.. HOI MOB (APPROACH WORK)

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.

< ... Wl working ... >N26 N27 N2S N29GOO Z M09 G28 Z.. MOS GOO X . 'l .. MOl (Tal MACHINING OONE) (Tal TO Z HOME)

Block Number

Tool Waiting~

Tool in Spindle

Nl N2 N3 N4 N30 N31 N32 N50 N51 N52

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

(SAFE XY POSITION) (OPTIONAL STOP)

mo T02 (T02 CALL REPEATED) N31 M06 (T02 TO SPINDLE) N32 G90 G54 GOO X .. Y . S M03 T03(T03 READY) N33 G43 Z.. H02 MaS (APPROACH WORK)< ... m2 working .. _>N46 N47 N4S N49 GOO Z.. M09 G28 Z MaS GOO X . Y MOl

(T02 MACHINING OONE) (T02 TO Z HOME) (SAFE XY POSITION) (OPTIONAL STOP)(TO 3 CALL REJr"EATED )

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)

< .. " m3 working . .. >N66 N67 N68 N69GOO Z . Ma9

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 GOOMa6

Z .. MOS x .. Y

mo%

(T03 MACHINING OONE) (T03 TO Z HOME) (SAFE XY POSITION) (TOl TO SPINDLE)(END OF PROGRAM)

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

first Tool in the Spindle with Manual ChangeIn the next example, dIe tool in the program may 100 heavy or too through the ATe must tool change can be done bygram supports manual tool cl1tmf!e.

"",,.'nIT'" an obstacle dur':

program the is no IDol in the spindle condition).lO

is

No Tool in the Spindlespindle at the start and end of each machined productive than with the first tool in the eXlr;1 Ihe cycle time. An empty spindle at start used if the programto recover space above mer has a valid reason, the part that would otherwise occupied by recovered space may be for removing the with a crane or a programming from the previous exsituation is not much ample - except that there is an extra tool change at the program. This tool brings the first tool into the spindle, for of each program run.{INCH {GET TOl N2 Gl7 G40 GSO TOl (TOl TO SPJlNDLE) N3 M06 N4 G90 GS4 GOO X Y.... Sit.. M03 T02 (T02 DVJ\"",,r\

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

{NO TOOL IN SPINDLE AT

< ... 1D J working . .. >N26 N27 N2e N29GOO Z Ma9

N5 843 Z.. HOI MOS

(APPROACH

Gl8 Z.. MOSGOO X Y MOl

(TOl MAanNING OONE) (TOI TO Z HOME)(SAFE XY

< ... 10) working, .. >N26 N27 N28 N29 NJO NJl N32 NJ3 GOO Z M09 G2B Z M05 GOO X Y MOl

(OPTIONAL STOP) (T99 CALL REI)Rl\,TTi:l)) (T99 TO SPINDLE)READY)

(TOl MAcmNING DONE) (Tal TO Z HOME) (SAFE XY POSITION) STOP) (T02 CALL REPEATED)(T02 TO S M03 T03(T03 READY)

NJO T99N31 M06 N32 TO)

NJ3 MOO

(STOP AND LOAD T02 MANUALLY)(NO NEXT TOOL)

T02M06 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)

(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 T03N5l M06

(TOl CALL REPEATED) (T03 TO SPJlNDLE)

N52 G90 G54 GOO X.. Y S .. M03 T99 (T99 READY) \.n.t:",t"J:\,.JJ:'i.....n WORK) N53 G43 Z .. HO) MOS

(TO) 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

(T03 MACHINING OONE)TO Z-HOME) (SAFE XY' POSITION) (T99 TO SPJlNDLE)

N66 GOO Z M09 N67 G2S Z.. MOS N68 GOO X Y

MACHINING DONE) (T03 TO Z HOME) (SAFE XY POSITION)

N69 M06 mo ICO%

mo

N69 MOlM06

(OPTIONAL STOP) (TOl TO SPINDLE)(END OF PR.OGRAM)

OF PROGRAM)

NIl M30 %

1Note 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

First Tool in the Spindle and an Oversize ToolSometimes it is necessary to use a little larger tool than the machine specifications allow. In that case, theoversize 1001

must return to

same pocket in the tool

it came from and two adjacent magazine must empty. Do not use a tool that is too heavy! In [he example 01407, the large tool is01407 (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)

No Tool in the Spindle with Manual ChangeThe following program is a variation on the previous example, except that there is no tool in the spindle when the program starts.(NO TOOL IN SPINDLE AT START) 01406 (INCH MODE) N1. G20 (GET TOl READY) N2 G17 G40 G80 TOl (TOl TO SPINDLE) N3 M06 N4 G90 G54 GOO X. _ Y.. S M03 T99 (T99 READY) (APPROACH WORK) N5 G43 Z.o HOl Moa

< ... 7rJJ working . .. >N26 N27 N28 N29

GOO Z M09G28 Z .. MaS GOO X Y MOl

(TOl MACHINING DONE) (TOl TO Z HOME) (SAFE XY POSITION) (OPTIONAL STOP)

N30 T99

< ... 7rJlN26 N27 N28 N29

... >(TOl MACHINING DONE) (Tal TO Z (SAFE XY POSITION) (OPTIO:N1\L STOP)

001 MOGN32 N33 N34 N3S

GOO Z M09 G28 Z M05 GOO X Y Mal

(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)

< ... 7rJ2 working .. . >N46 N47 N48 N49 N50 N5l NS2 N53 N54 GOO Z MU9 G28 Z M05 GOO X Y . Mal('1'02 MACHINING OONE) (T02 TO Z HOME) (SAFE XY POSITION) (OPTIO:N1\L STOP)

N30 T99 N3l MU6N32 N33 N34 N35

(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)

< ... 7rJ2 worJdng ... >N46 N47 N48 N49 GOO Z . M09 G28 Z MOS GOO X Y MJ.9 (T02 MACHINING DONE) (T02 TO Z HOME) (SAFE XY (SPINDLE ORIENTATION) (STOP AND UNLOAD '1'02 MANUALLY)

(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 MOONSl 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 %

< ... 7rJ3 working . .. >

No Tool in the Spindle and an Oversize ToolN66 N67 N68 N69 N70 N71 GOO Z M09 G28 Z . MaS GOO X . Y M01 M06 M30 ('1'03 MACHINING DONE) (T03 TO Z HOME) (SAFE XY POSITION) (OPTIONAL STOP) ('1'99 TO SPINDLE) (END OF PROGRAM)

%

This is another tool change version. It assumes no tool in the spindle at the program start. It also assumes the next 1001 is target" than the maximum recommended diameter, within reason. In this case, the oversize tool must return to exactly the same pocket it came from. It is important that the adjacent pocket.,;; are both empty.

TOOL FUNCTION

103 lathe Tool StationA 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.

In (he 01408 example,01408 (NO TOOL N1 G20 N2 G17 G40 GSO TOl N3 M06

the

tool.

m

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

< ... TOI wor/dng .. . >N26 N27 N2e N29N30 N3l N32 N33 N34 N3SGOO Z M09

MaS GOO X . Y . Mal

G28

z..

(TOI MACIaNING DONE) (Tal TO Z HOME) (SAFE XY POSITION)

(OPTIONAL STOP)

(T99 CALL REPEATED) 1'99 (T99 TO SPINDLE) M06 READY) 1'02 (T02 TO SPINDLE) M06 G90 GS4 GOO X.. Y.. S.. MO) (NO NEXT TOOL)G43 Z.. H02 MO 8 (APPROACH WORK)

Figure 14-7

Typical view of an octagonal lathe turret

< ... T02 working.. >N46 GOO N47 G28 N48 GOO X . Y . N49 MOl MACHINING (T02 TO Z HOME) (SAFE XY POSITION) (OPTIONAL STOP)

Many type tools available

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

< ... T03 working .. . >

Tool rndexingN66 GOO Z . M09N67 G2B Z MOS (TO 3 MACHINING DONE)

N68 GOO X .. Y N69 MOl

(1'03 TO Z HOME) XY POSITION)

(OPTIONAL STOP)(1'99 TO SPINDLE) {END OF PROGRAM}

NiO M06 Nil M30 %

To program a tool change, or rather to index the cutting tool into the position, the T function must be programmed according to its proper formal. For the CNC lathe. this format calls for the address followed four

digits - Figure 14-8.

illustrate some of ATe programming methods. The is not difficult once the tool changing mechanics of the machining center are known.

Tool number is tool WEAR number Tool station number is GEOMETRY offset number

T fUNCTION fOR LATHr _ _ __

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.

Figure 148 Structure of a 4-digit tool number for eNC lathes

104It 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 oneThe second pair (the third and the fourth digits), control the tool wear offset used with the selected tool.~ Example.

Txx01 - "''''P'''.''

wear offset register number one

It is customary, not arbitrary. La the pairs, if ble. For example, tool function TO 10 I will select 1001 station number one, geometry number one and the assotool wear offset number one. This format is easy 10 remember and be used every time, if only one number is assigned to the tool number.

Figure 749 Example af rhe GEOMETRY offset screen display

OFFSET - WEAR

If two or more different wear ~l!sets~e used for the same Lool, it is not possible to malch Ihe pairs:In such a case, two or more different wear offset numbers must be grammed the same 1001

Q Example:T0101 for turret station , geometry offset 01 and wear offset 01

figure 14-10

Example of the WEAR offset screen dispfay

Geometry OffsetGeometry the same as the turret operator measures and fills-in the gestation number. ometry for all tools used in the program.

Q Example:T0111for 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, notFigure} 4- 12 shows a lypical measurement of the geometry offset applied to a common internal tool.

TOOL OffSET REGISTERSword offset has been mentioned already several times with two adjectives - with the expression geometry offset and the expression wear offset. What exactly is an offset? What is the difference between one offset and the Olher?

TOOL FUNCTION

105tty 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 tipif-r---'

Wear OffsetTO 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 isdifference between the measured size of the part.J4- 14 ill ustrales the principle of the tool wear

tip detail

the

is exaggerated for prnnn"SSOOG04 X1200.0 S1S00 G04 X1800.0MOS

Dwell is programmed for one half of a second duration, with spindle rotation set to 80 r/min. The for one half a second

Example - Machining Centers Spindle test:(100 R/MIN mITIAL SPEED) (600 SECONDS IS 10 MINUTES)(SPEED INCREASED TO 500 R/MIN) (1200 SECONDS IS 20 MINUTES) (SPEED INCREASED TO 1500 R/MIN)

S100 'M03 G04 X600.0

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

(1800 SECONDS IS 30 (SPINDI..:E:

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.

LONG DWELL TIMEFor machining purposes on CNC machines, an unusually long dwell is neither Does that mean long dwell times are not is the programmed time that is well A long dwell above the established average for most normal Lions. Seldom ever there is a need to dwell time during a part machining in excess of one, two, three, or four seconds. The range available on the system (over 27 hours) more important to the nl(lintl'nat1a pnthan to programmer. A~ an example of a typical application when a long dwel1 may,be beneficial, is a program developed by maintenance technicians testing the spindle functionality. carefully the following actual situation common to machine - a spindle of the CNC machine has repaired must be before the machine can baqk to production. The will consist of running the at various for a certain period time of selection. In a typical the maintenance department rea small program, In the machine "'1.1' II,,",".. will rotate 10 minutes aL 100 r/min, then for minutes at r/min. followed by the spindle rotalion at highest rate of 1500 r/min additional 30 minutes. program development is not an absolute since the maintenance technician may do the test by manual methmanual approach will not be very but it serve the purpose of the maintenance test. cases is to Slore testing proceA better choice in dure as a program, directly into CNC memory. maintenance (service) program wi)) be a little different for machining centers than for but the objectives will remain the same.

e:>

Example - lathes - Spindle test:(GEAR RANGE SELECTION) (100 R/MIN mITIAL (600 SECONDS IS ~o MINUTES) (SPEED DlCREASED TO 500 R/MIN) (1200 SECONDS IS 20 MINUTES) (SPEED DlCREASED TO 1500 R/MIN) (1800 SECONDS IS 30 MINUTES)

M43 G97 S100 M03G04 X600.0

SSOO G04 X1200.0 S1S00 004 X1800.0MOS

(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 WarmaUpA 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 Axiscontrol 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

fiXED CYCLES AND DWELLChapter of handbook covers the subject of fixed cycles for CNC mach in i ng centers and dri lis in a detail. In-deplh descriptions of all cycles can this For purpose of the current topic, are just some comments relative to the subject of dwell, this time, as the dwell to fixed cycles.Several fixedo oNormally, Also cycles

can be programmed with a

GSB,GS9and G84, only by parameter setting

Safety and Dwellreminders have a great degree of caution dwell limes. particularly or '1"1""""''''''' The CNC machine should never be unattended. In case of long for warning signs should be prominently posted to prevent a potentially unsafe situation. If are not someone else should chine serviced,,,"YPTr''''''''

cycles is always P, to avoid duin the same block. The address U and the command are never programmed in a cycle - the dwell function is 'built' into all fixed cycles thal allow the dwell (technically all cycles do). dwell time remain the same rules for fixed cycles, as for any machining application. The dwell

Q Example.N9 GB2 Xl.2 YO.o RO.2 Z-O.7 P300 F12.0

live upon motion), but

- 0.3 dwell will become motion along the Z axis (actual

rapid return motion.

sel1 must gram execution

~

tool or inspection, lubrication, etc., if absolutely necessary as a manual operation, never

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 cuttingThis feature is seldomY~""'lIr~'fl

FIXED CYCLESMachining 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.,~

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.

aa

o If both X and Y axes are omitted in the fixed cycle

ao

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.\

SymbOts and abbreviations used in fixed cvcles illustrations

oa

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.125Gao GOO Zl.125

is the SOJ11eGSor

GOO Zl.12S01, 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

181INITIAL LEVEL INITIAL LEVELFrom 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

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

INITIAL LEVEL SELECTIONThere are two preparatory commands controlling the Z axis tool return (retract) when a fixed cycle is completed.

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.0Nl4

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 SELECTIONThe 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 CALCULATIONSfixed 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 isQ

on the following criteria:

Dimension of

hole in the drawing (diameter and depth)

o Absolute or incremental programming method o Type of cutting tool used + Added tool point lengthQ

Material thickness or full

depth of the hole

o Selected clearances above and below material(below material clearance for through holes)

or four R level usually increases about tapping operations cycles G74 G84, to feedrate acceleration 10 reach maximum.

for the

c::> Example of Alevel programming:N29 G90 GOO GS4 X6. 7 YB. a S850 M03 N30 G43 Z1.0 H04 MOB (INITIAL LEVEL IS 1. a) N31 G99 G8S RO.l Z-1.6 F9.0 LEVEL IS 0.1)

N32N45 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

total Z depth of 2.475

can

G99 G83

X9.0 Y-4.0 RO.1 Z-2.47S Q1.125 F12.0

FIXED

81"""""'7"777"7i--t7:'177""'7'7'7 -

RO.1 Z0Z-2.25

_.."J~ ~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.

Spindle Speeds for ReamingJust like for standard drilling and other operations, the spindle speed for must closely of material being Olher factors, such to the as the part setup, its rigidity, its and surface finish of the completed hole, etc., each contributes to spindlerule, thc spindJe speed for will reasonable use a modifying factor .660 (213), based on the speed used for drilllng of the same material. example, if a speed of 500 r/min produced drilling conditions, the two thirds (.660) of that reasonable for r",,,,rn,,..,,,

REAMINGThe 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.

500 x .660 = 330 r/min

Do not program a reaming motion in the reversed spindle rotation - the cutting may or dull.

Feedrates for ReamingThe reaming are programmed higher than those used for drilling. Double or triple are not unusual. The purpose of the high feedrales is to force the reamer to cut, rather than to rub the material. If the is too slow, the reamer wears out rapidly. slow feedrates reamer actually tries to encause heavy pressures as the hole, rather than remove stock.

202

Chapter 26

Stock Allowancematerial 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 beA 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 -

SINGLE POINT BORINGAnother sizing operation on holes is called boring. jng, in the sense of machining is a point-to-point operation along the Z only, typical to CNC milling maand machining centers. It is also known as a 'single " the most common lool is a boring bar that only one CUlling edge. Boring on lathes is considered a contouring operation and is nol covered in """"'VTLR x 2

-

N2l N22 N23 N24 N25 N26 N27 N28

T0100 (CORRECT APPROACH) G96 S400 M03 GOO G4l Xl.7 ZO T010l MOa (START) (FACE OFF) Gal X-O 07 FO.D07 GOO ZO.l (ONE AXIS ONLY) G42 Xl 0 (THEN COMPENSATION) Gal Xl.4 Z-O.l FO.012 ( CONTOURING) Z-O.65

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

>TLR x 4 on 0 >TLR x 2 -- --.-

If the above program isN21 N22 N23 N24 N25 N26 N27

Figure 30-39 Millimum C/l;laI8I1CB lor loo/nose radius offset

Figure 30-39 shows minimum clearances start and end of cut. Make sure the nose radius

jnlo x 2 and x 4 twice or fourbecomes a

T0100 (INCORRECT VERSION) G96 S400 M03 (START) GOO G4l Xl.! ZO T010l MOS (FACE OFF) GOl X-O.07 FO.007 GOO G42 Xl_O ZO.l (*** WRONG ***) ( CONTOURING) GOl Xl.4 Z-O.l FO.012 Z-O.65

N28 X ..

... the face will never be completed!

PLANE SELECTIONFrom 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 oTool 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 Any three points that do not lie on a single line definea plane (these points are called non-collinear points)

oo

A plane is defined by two lines that intersect each other

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 ooCircular motion using t