CNC Programming
CNC Programming
Programming
H ndbook
Second Edition
c C
Programming
Handbook
Second Edition
A Camp hensiv uid Practical CNC rogramming
t r mi
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
5678910
Dedication
To my my mother dmila,
who never to give
Acknowledgments
In this second edition of the CNC Programming Handbook, I would like to express my
thanks and appreciation to Peter Eigler for being the bottomless source of new ideas,
knowledge and inspiration - all that in more ways than one. My thanks also go to Eugene
Chishow, for his always quick thinking and his ability to point out the elusive detail or two
that I might have missed otherwise. To Ed Janzen, I thank for the many suggestions he of-
fered and for always being able to see the bigger picture. To Greg Prentice, the President of
GLP Technologies, Inc., - and my early mentor - you will always be my very good friend.
Even after three years of improving the CNC Programming Handbook and developing the
enclosed compact disc, my wife Joan will always deserve my thanks and my gratitude. To
my son Michael and my daughter Michelle - you guys have contributed to this handbook in
more ways than you can ever imagine.
I have also made a reference to several manufacturers and software developers in the
book. It is only fair to acknowledge their names:
You can also e-mail him from the CNC Programming Handbook at www-industriaipress.com
TABLE OF CONTENTS
1 ~ NUMERICAL CONTROL 1 Axes and Planes 16
Point of Origirl 16
Ouadrarlts. 16
DEFINITION OF NUMERICAL CONTROL
Right Hand Coordinate System 17
NC and CNC Technology.
MACHINE GEOMETRY. 17
CONVENTIONAL AND CNC MACHINING 2 Axis Orientation - Milling . 17
NUMERICAL CONTROL ADVANTAGES 2 Axis Onenlation - Turning. 18
Setup Time Reduction 3 Additlona! Axes. 18
Lead Time Reduction. 3
Accuracy and RepealabiliJy 3
Contouring of Complex Shapes. 3 5 - CONTROL SYSTEM 19
Simplified Tooling and Work Holding. 3
Cutting Time and Productivity Increase. 4
GENERAL DESCRIPTION 20
TYPES OF CNC MACHINE TOOLS 4 Operation Panel 20
Mills and Machining Centers. 4 Screen Display and Keyboard 21
Lathes and Turning Centers 5 Handle. 22
PERSONNEL FOR CNC 5 SYSTEM FEATURES 22
CNC Programmer 5 Parameter Settings 22
CNC Machine Operator 6 System Defaults 23
SAFETY RELATED TO CNC WORK. 6 Memory Capacity. 24
MANUAL PROGRAM INTERRUPTION. 25
Single Block Operation. 25
2 ~ CNC MILLING 7 Feedhold 25
Emergency Stop 25
CNC MACHINES - MILLING. 7 MANUAL DATA INPUT - MDI 26
Types of Milling Machines . 7 PROGRAM DATA OVERRIDE 26
Machine Axes 8
Vertical Machining Centers. 8
Rapid Motion Override. 26
Spindle Speed Override 27
Horizontal Machi ning Centers 9
Feedrale Override. 27
HOrIZontal Boring Mill 10
Typical Specifications 10
Dry Run Operation 27
Z Axis Neglect . 28
Manual Absolute Setting 28
Sequence Return 28
3 - CNC TURNING 11 Auxiliary Functions Lock 28
Machine Lock 28
CNC MACHINES - TURNING 11 Practical Applications 29
Types of CNC Lathes. 11 SYSTEM OPTIONS. 29
Number of Axes 11 G raphlD Display. 29
AXES DESIGNATION 11 In-Process Gauging . 30
Stored Stroke Limits. 30
Two-aXIs Lathe . 12
Drawing Dimensions Input 30
Three-axis Lathe 12
13
Machining Cycles. 30
Four-axis Lathe.
Six-axis Lathe 13 Cutting Tool Animation. 30
Connection \0 External DeVices 30
FEATURES AND SPECIFICATIONS 13
Typical Machine Specifications. 13
Control Features 14 6 - PROGRAM PLANNING 31
ix
X Table of Contents
---------~-.-. - --------_.-... --- - --
Control System. 31
PART COMPLEXITY 32 8 - PREPARATORY COMMANDS 47
MANUAL PROGRAMMING 32
DESCRIPTION AND PURPOSE. 47
Disadvantages . 32
Advantages 32 APPLICATIONS FOR MILLING. 47
CAD/CAM AND CNC 32 APPLICATIONS FOR TURNING 49
Integ ration 33 G CODES IN A PROGRAM BLOCK 50
Future of Manual Programming 33 Modality of G-commands. 50
TYPICAL PROGRAMMING PROCEDURE 33 Conflicting Commands in a Block 50
Word Order in a Block 51
PART DRAWING 34
GROUPING OF COMMANDS 51
Title Block. 34
Dimension ing 34 Group Numbers 51
Tolerances. 35 G CODE TYPES. 52
Surface Fintsh 35 G Codes and Decimal POln! _ 52
Drawing ReVisions 36
Special InSHucllons 36
METHODS SHEET. 36 9 - MISCELLANEOUS FUNCTIONS 53
MATERIAL SPECIFICATIONS 36
Malerial Unlformit)' 36 DESCRIPTION AND PURPOSE. 53
Machinability Rating. 37 Machine Related Functions . 53
MACHINING SEOUENCE 37 Program Related Functions 53
TOOLING SELECTION 38 TYPICAL APPLICATIONS 54
Applications for Milling 54
PART SETUP 38
Applications for Turning 54
Setup Sheet 38 Special MOl Functions. 54
TECHNOLOGICAL DECISIONS 38 Application Groups 54
Cutter Path 38 M FUNCTIONS IN A BLOCK 55
Machine Power Rating. 39 StarlU p of M Functions. 56
Coolants and Lubricants 39 Duration of M Functions .sf)
WORK SKETCH AND CALCULATIONS 40 PROGRAM FUNCTIONS 56
Identification Methods. 40 Program Stop 56
QUALITY IN CNC PROGRAMMING 40 Oplional Program Stop. 57
Program End. 58
Subprogram End !'iR
7 ~ PART PROGRAM STRUCTURE 41 MACHINE FUNCTIONS 58
Cooiant Functions 58
BASIC PROGRAMMING TERMS 41 Spindle Functions. 59
O-lsr3cter 41 Gear Range Selection 60
l/-Jcr0 41 Mil r. hi n e Ac:r.ess ori flS flO
41
42
PROGRAMMING FORMATS 42
10 - SEQUENCE BLOCK 61
WORD ADDRESS FORMAT 42 BLOCK STRUCTURE 61
FORMAT NOTATION 43 8u ildlng the Block Structure 61
43 Block Structure for Milling 61
System Formal 43 PROGRAM IDENTIFICATION 62
System Format·
44
Word Addresses'
45 Program Number 62
ProgrClm Nome. 62
SYMBOLS IN PROGRAMMING 45
SEQUENCE NUMBERS 63
and ivli nus Sign. 45
Sequence Number Command. 63
PROGRAM HEADER 45 Sequence Block Format 63
TYPICAL PROGRAM STRUCTURE. 46 Numbering Increment 64
Long Program:> Dnd Block Numbers. 64
END OF BLOCK CHARACTER. 64
STARTUP BLOCK OR SAfE BLOCK 65
xi
ATIACHMENT. 413
41 - MIRROR IMAGE 393 Bar 413
ADDITIONAL OPTIONS 414
RULES OF MIRROR IMAGE 393 4 '14
393 414
394 4'15
394 415
394
395
PROGRAMMING EXAMPLE 415
395
395
45 - HELICAL MILLING 417
MIRROR IMAGE BY 395
Control Setting 395
. Manual Mirror Setting 396
HELICAL MILLING OPERATION 417
417
E 396 Format, 417
Mirror Functions 396 Arc Modifiers for 4'18
Mirror Image Example 397 and 18
Mirror Image Example 398
THREAD MILLING, 418
MI IMAGE ON CNC 398 Thread 418
Conditions tor Thread 418
Thread 4'19
42 ~ COORDINATE ROTATION 399 419
Clearance Radius 419
Productivity of Thread 419
COMMANDS. 399
Center of Rotation , 399 THE HELIX, 419
Radius of Rotation 399 THREAD MILLING 421
Coordinate Rotation Cancel 401
Straight Thread 421
Common Applications 401
In itial Calculations 421
APPLICATION 401 Starting Position 422
Motion Rotation and Direction 422
Lead'in Motions , 423
43 - SCALING FUNCTION 405 Thread Rise Calculation 424
Milling the Thread 424
Lead-Out IV" 1,lIn." 425
PTION. 405 425
Function Usage . 405 425
PROGRAMMING FORMAT 405 425
426
406
406 THREAD MILLING SIMULATION METHOD 426
407 HELICAL RAMPING 427
407
1
2 Chapter 1
technology, described in this handbook under the abbrevia- Ish quality are the most typical problems in conventional
tion ofNe. The 'C'stands for Computerized, and it is machining. Individual machinists may own
not applicable to hardwired All 'proven' methods, different from a f their feHow
manufactured today are of the design, Abbreviations leagues. Combination of and other factors create a
such as C&C or C 'n are not correct and reflect poorly on great amount of
anybody uses them
machining under numerical control does away with
the majority of inconsistencies. It does not require the same
CONVENTIONAL AND CNC MACHINING physical as machining. Numerically
contToned machining does not need any levers or dials or
What makes CNC machining superior to the conven- handles, at least not in the same sense as conventional ma-
tional methods? Is it superior at all? Where are chining does. the has it
benefits? If the CNC and the conventional machining pro- can used number of over,
cesses are a common general approach to ma- consistent That does not mean there are no limiting
chining a part will -....-.M- cutting tools do wear out, material blank in
one batch is not identical to the material another
1. Obtain and study drawing batch, the setups may vary, etc. factors should be
2. Select the most suitable machining method considered and compensated for, whenever lICI.'C~~ru
3. Decide on the setup method (work holding)
4. Select the cutting tools emergence of the numerical control technology does
5. Establish and not mean an instant, or even a long tenn, demise of all man-
6. Machine part ual There are times when a traditional machin-
ing method is preferable to a computerized method. For ex-
This same both types of macrun- ample, a simple one time job may be done more efficiently
mg. IS m way how data
on a machine a CNC machine. Certain
are input. A feedrate 10 inches per minute (10 mlmin) is
of machining jobs will beneHt from manual or semiauto-
the same in manual or CNC applications, but the method of machining, rather than controlled ma-
applying it is not. The same can be about a coolant it
chining. CNC machine are not meant to replace
can be activated a knob, pushing a switch or every manual machine, only to supplement
programming a special All will result in
a coolant rushing out of a HV"........... In many the whether
a certain amount of knowledge on part user is ing will be done on a CNC machine or not is based on
required. alL working, particularly meta! cut- number of required parts and nothing Although the
ting, is mainly a skill, but it is also, to a great an art volume of parts machined as a is always an important
and a profession of large number of people. So appli~ criteria, it should never be the only factor. Consideration
of Computerized Numerical Control. Like any skill should be to complexity, tolerances,
or art or profession, it to the detail is neces- the required of fmish, etc. Often, a
sary to be successful. It takes more than technical know 1- complex part will benefit from CNC machining, while
to be a CNC machinist or a CNC Work relatively parts will not.
I>v?,"'....."...... ,'... and what is called a
'gut-feel', is a much needed supplement to any skill. Keep in mind that numerical control has never machined
a single part by Numerical is only a process
In a conventional machining, the operator sets or a method that enables a machine tool to used in a pro-
up the machine and moves each cutting using one or ductive, accurate and consistent
both hands, to produce the required part. The design of a
machine tool offers many features that help the NUMERICAL CONTROL ADVANTAGES
process of machining a - levers, and
a15, to name just a few. same body are re-
peated by the every in the batch. However, What are the advantages of numerical control?
the word 'same this context really means 'similar
It is important to know which areas of machining will
than 'identical '. Humans are not capable to every
benefit from it which are done the conventional
the same at all times - that is the of ma-
It is absurd to think that a two power mill
People cannot work at the same per[orrnam;e leve!
'-'UU.H..." .
win over jobs that are currently done on a twenty times
all the without a rest. All of US have some good and
more powerful manual mill. Equally unreasonable are ex-
some bad moments. The results these moments, when
applied to a part, are to predict. There of improvements cutting speeds
over a conventional machine. the machining
will some differences and within each
and tooling conditions are the same, the cutting rime will be
batch of The parts will not always be exactly the
same. dimensional tolerances and <""""f",,,,,, close in cases.
NUMER CONTROL 3
of the areas the CNC user can and lead time, required to and manufacture sev-
expect improvement: eral fixtures for conventional machi.nes can
be by preparing a part program the ~se of
o Setup time reduction
plified fixluring.
Cl lead reduction
o Accuracy and repeatability
• Accuracy and Repeatability
o Contouring of shapes high degree and repeatability of
has the single major benefit to
o Simplified tooling and work holding users. Whether the part program is stored on a disk or in the
o cutting time ~omputer or even on a tape (the method),
Il ah~'ays the same. program can changed
o General productivity increase at wlll, but on.ce proven, nO are usually required
area offers only a potential improvement. Individ-
more. A gIven can be reused as many times as
ual users will different of actual improve- nec:de,:t without a single bit it conlains.
ment, depending on the oil-site, the
program to allow such changeable factors as tool
CNC used, setup methods, complexity of wear and operating temperatures. it has to stored safely,
fixturing, or cutting tools, management philosophy but generally very little' from CNC pro-
engineering level of grammer or will required. The high accuracy of
individual attitudes, etc. CNC machmes and repeatability allows high quality
to produced consistently lime.
• Setup Time Reduction
• Contouring of Complex Shapes
CNC and machining centers are capable of con-
a variety of shapes. Many CNC users acquired their
only to able to handle A
are CNC applications in and automo-
tive , , ,The use of some form of computerized pro-
gramming IS Virtually mandatory for any dimensional
tool path at''''''''''''
shapes, as can be
of the the serup time :virhou.t the additional expense of making a model trac-
should not Modular lixturing, SI<l,n{llU'{l mg. Mirrored parts can achieved literally at the switch of
tooling, locators, automatic tool pallets and a bulton, of programs is a lot simpler than storage
other advanced features, the setup time more efficient of patterns, models, olher pattern
a comparable of a conventional With a making tools.
good knowledge modern manufacturing, productivity
can be increased significantly. • Simplified Tooling and Work Holding
, The of parts machined under one setup is Nonstandard and 'homemade' looling that clutters the
Important. order 10 assess the cost a time. If a benches and drawers around a conventional machine can
beelimin~led by looling, designed
number of is machined in one setup, the setup
cost per part can very" A very re- . num~ncal applications. Multi-step such as
pilot dnlls, step combination tools, counter borers
d~ctio~ can b~ achieved by grouping several different oper-
and are with several individual ;:'l<lIIU<l1
Dtlons IOto a .smgle setup. Even if the lime is longer, it
may be Justified when compared to time required to tools. tools are cheaper and to
setup conventional machines. than special and nonstandard tools. measures
have many tool to keep a low or even a
nonexistent inventory, increasing delivery to the
• lead Time Reduction
customer. Standard, off-the-shelf looling can usually ob-
a part program is written and proven. it is ready 10 tained faster then nonstandard LVVi""J'.,
• CNC Machine Operator panies talk about safety, conduct safety meetings, display
The CNe machine tool operator is a complementary po- posters, make speeches, call experts. This mass of informa-
sition to the CNe programmer. The programmer and the tion and instructions is presented to all of us for some very
operator may exist in a single person., as is the case in many good reasons. Quite a few are based on past tragic occur-
small shops. Although the majority of duties performed by rences - many laws, rules and regulations have been written
a conventional machine operator has been transferred to as a result of inquests and inquiries into serious accidents.
the CNC programmer, the CNC operator has many unique At fIrst sight, it may seem that in CNC work, the safety is
responsibilities. In typical cases, the operator is responsible a secondary issue. 111ere is a lot of automation, a part pro-
for the tool and machine setup, for the changing of the gram that runs over and over again., tooling that has ben
parts, often even for some in-process inspection. Many used in the past, u simple setup, etc. All this can lead to
companies expect quality control at the machine - and the complacency and false assumption that safety is taken care
operator of any machine tool, manual or computerized, is of. This is a view that can have serious consequences.
also responsible for the quality of the work done on that
machine. One of the very important responsibilities of the Safety is a large subject but a few points that relate to the
CNe machine operator is to report fmdings about each pro- CNC work are important. Every machinist should know
gram to the programmer. Even with the best knowledge, the hazards of mechanical and electrical devices. The fIrst
skills, attitudes and intentions, the 'fmal' program can al- step towards a safe work place is with a clean work area,
ways be improved. The CNC operator, being the one who where no chips, oil spills and other debris are allowed to
is the closest to the actual machining, knows precisely what accumulate on the floor. Taking care of personal safety is
extent such improvements can be. equally important. Loose clothing,jewelry, ties, scarfs, un-
protected long hair, improper use of gloves and similar
SAFETY RELATED TO CNC WORK infractions, is dangerous in machining environment. Pro-
tection of eyes, ears, hands and feet is strongly recom-
mended.
On the wan of many companies is a safety poster with a
simple, yet powerful message: While a machine is operating, protective devices should
be in place and no moving parts should be exposed. Special
The first rule of safety is to follow all safety rules care should be taken around rotating spindles and auto-
matic tool changers. Other devices that could pose a hazard
The heading of this section does not indicate whether the are pallet changers, chip conveyors, high voltage areas,
safety is oriented at the programming or the machining hoists, etc. Discollllectillg allY interlocks or other safety
level. The reason is that the safety is totally independent. It features is dangerous - and also illegal, without appropriate
stands on its own and it governs behavior of everybody in a skills and authorization.
machine shop and outside of it. At fIrst sight, it may appear In programming, observation of safety rules is also im-
that safety is something related to the machining and the portant. A tool motion can be programmed in many ways.
machine operation, perhaps to the setup as well. That is Speeds and feeds have to be realistic, not just mathemati-
defInitely true but hardly presents a complete picture. cally 'correct'. Depth of cut, width of cut, the tool charac-
Safety is the most important element in programming, teristics, all have a profound effect on overall safety.
setup, machining, tooling, ftxturing, inspection, shipping. All these ideas are just a very short summary and a re-
and you-name-it operation within a typical machine shop minder that safety should always be taken seriously.
daily work. Safety can never be overemphasized. Com~
CNCMILLING
CNC MACHINES - MILLING Milling machines where the spindle motion is up and
down, are categorized as vertical machines. Milling ma-
chines where the spindle motion is in out, are catego-
The description of CNC milling is so it as horizontal machines - see Figure 2-1 and
can fill a thick book all by itself. All machine tools from a
knee lype milling machine up to a five profiler
can included in (his They in features,
suitability for work, etc., but they do all one
common denominator - their primary axes are the X and Y
axes - this reason, they are called machines.
the category of the machines are also wire EDM
machine tools, laser and water jet cutting name
cutters. burners, routers, etc. Although do not qualify
as milling type machine tools, we mention them because
the majority of programming techniques applicable to the
mills is to machines types as well. The
example is a contouring operation, a common La
many CNC machines.
the purpose this handbook, a milling machine can
be defmed: Figure 2-/
Schematic representation of a CNC vertical machining center
Milling machine is a machine capable of a simultaneous
cutting motion, an end mill as the primary cutting
at least two axes at the same time
'I"
j'>
I
This definition eliminates all CNC presses, since
covers pOSItioning not profiling. The
nition also eliminates wire EDM machines a of
burners, they are capable of a profiling action but not
an end mill. Users these machine tools will still
from m:tny covered The
ciples are adaptable to the majority of machine tools.
For EDM uses a very small cutter
in the of a A cUlling machine uses
beam as its cutter, also having a known diameter bUL
term keifis used The will be concentrated
on metal cutting machine of end
mills as the primary tool contouring. mill
can be in many ways, first look will Figure 2·2
or available machines. Schematic representation of a CNC horizontal machining center
7
8 2
simplified not really reflect reality machining center is described by its specifications
current state of art in .a...... "'... tool manufacturing. as provided by the machine tool manufacturer. manu-
machine tool industry is changing. New and lists many as a quick method of
more powerful machines are V_'''"",'' __ and produced by comparison between one machine and another. It is not un-
manufacturers worldwide. more features. usual to find a slightly information in the
brochure - after all, it is a tool.
The majority of modern machines designed for milling
are capable of doing a multitude of machining tasks, not In the area of systems, three most common ma-
only the traditional milling. machines are also capa- chine tools are
of many other metal operations, mainly drill-
Q eNC Vertical Machining Center - VMC
ng, thread cutting
many others. They may with a multi-tool Q CNC Horizontal Machining Center· HMC
azine (also known as a a fully
Q CNC Horizontal Boring Mill
changer (abbreviated as ATC) a pallet
viated as APC). a powerful computerized conlrol unit
brevlated as CNC), and so on. Some machine may type, except
have additional features, as adaptive control. the major differences will the
terface, automatic loading unloading, probing ",,,,,,rpo..,... axes, additional for indexing or full rotary
high speed machining and other mod- the type of work suitable for individual
ern technology. The is - can machine tools of lion of the most common type of a machining center - the
capabilities be as simpleCNC milling Vertical Machining Center (VMC) - a fairly accu-
In two words - certainly not. Milling machines that have at rate sample other group.
some of built-in. have ,."u·"'''''""
new breed of tools - CNC An/l,r".,,·, • Vertical Machining Centers
This lenn is strictly related - a manual machining
cel1Jer is a description thal does nul exist. Vertical for flat type
of work, of machining is
• Machine Axes done on setup.
Milling machines and machining centers have at least A vertical machining center can be used with
axes - X, Y The machines become more flexi- an optional axis. usually a head mounted on
iflhey usually an the main table. The rotary head can mounted either ver-
lary axis (the A tically or horizontally, depending on the results and
horizontal models). higher the type. This fourth can either for in-
found on with five or more axes. A dexing or a full rotary molion. In combination with a
chine wilh five ;'lxes. he a hnring mill that supplied), the fourth in the vertical
jor axes, plus a axis (usually the B "nr""",,, can be long parts that
parallel to the Z (usually the W axis). true need support at both ends.
complex and flexible five-axis profiling [ling machine is
the type used in industry. where a multi-axis. simul- maJonty vertical centers most
taneous is necessary to complex tors work with are those with an empty table and three-axes
shapes and and various configuration.
two and a machine or a From the programming perspective, there are at least two
At times,
machine is used. terms refer to mentioning:
three and a
the type of where simultaneous o ONE· programming always takes from the viewpoint
of all axes limitations. For a spindle, not the means the view is
vertical Y and Z axis as primary axes. plus as if looking straight down, at ninety degrees towards
designated as an A The indexing ta- the machine table for development of the tool motion.
ble is used posllioning. but il cannot rotate simulta- Programmers always view the top of part!
neously with the motion of primary axes. That type of a Q TWO· various markers located somewhere on the machine
called a 'three and a half axIS ' machine. show the positive and the motion of the machine
a more complex but machine Ihal is axes. For programming, markers should be ignored!
a table, is as a four These indicate operating directions, not programming
can move simultaneously directions. As a matter of fact, typically the programming
with the motion of the axes, is a good directions are exactly the opposite of the markers on the
example of a true 'four ax.is· machine tool. tooL
CNC MILLING 9
Number of tools 20 36
575 mm 725mm
Maximum travel- X axis
22.5 inches 28.5 inches
380 mm 560mm
Maximum travel- Y axis
15 inches 22 inches
470 mm 560 mm
Maximum travel- Zaxis
18.5 inches 22 inches
AC 7.5/5.5 kW AC 11/8 kW
Spindle output
AC 10/7 HP AC15/11HP
Spindle nu:>t:-tlJ-t~1.1 distan ... ", - Zaxis 150 - 625 mm 150 - 710 mm
6- inches 6 - 28 inches
430mm 30 560 mm
Spindle center-to-column distance· Y axis
17 inches 1.2· inches
30000 mm/min (XY) - mm/min IZl 30000 mm/min (XYI - 24000 (2)
Rapid traverse rate
1181 in/min IXY) 945 in/min (Z) 1181 in/min (XV)- 945 iI\Imin
300mm 350 mm
Maximum length
11.8 13.75 inches
6 kg 20
Maximum tool weight
131bs 44
• Horizontal Machining Centers There arc many applica£ions in lhis area. Common exam-
are large as pump housings, cases,
Horizontal CNC Machining Centers are also
manifolds, blocks and so on. machining
as multi-tool and versatile machines. and are
centers always include a special ing table and arc
bieal paris, where majority of machining has to
on more than one in a single setup.
equipped with a pallet and other
10 Chapter 2
Because their flexibility and complexity, CNC parl of the way towards spindle. bOlh meet in the
zonlal machining centers are priced significantly area the part Ihal be machined using all the ma-
than vertical CNC machining centers. chine tool resources.
the programming point view, there are several Horizontal boring mill may be called a
eli mainly relating to the Automatic Tool machine, but certainly nol as-axis CNC
the indexing table, - in some cases - to the ad- the count of the axes is Programming
ditional for example, the changer. All CNC mills are similar to Ihe horizontal and
differences are relatively minor. Wriling a program for machining centers.
horizontal machining centers is no different than writing a
for venical machining center!'.. • Typical Specifications
• Horizontal Boring Mill On the preceding page is a comprehensive chart showi
the typical specifications a CNC Vertical Machining
Horizontal boring mill is another machine. It Cellterand a CNC Horizontal Machining Centel:
closely resembles a CNC horizontal machining center, but ifications are side by side in two
have its own Iy, a horizontal not for any comparison are two
mill is by the lack some common fea- different types and comparison is no\ possible
tures, such as Automatic Changer. As Ihe name of all features. In order to compare individual machine tools
the machine its primary purpose is boring opera- within a category, machine tool prov-
tions, mainly lengthy that reason, the reach of ided by the machine manufacturer serve as the basis
the is extended by a specially designed quill. An- for comparison. specifications are contained a of
other typical feature is an axis parallel to the Z axis, called verifiable data, mainly technical in nature, describes
Ihe W axis. Although is, in the fifth lhe individual machine by main features. Machine tool
nation (X, y, W), a horizontal boring mill cannot be buyers frequently compare many brochures of several
called a true axis machine. Z axis (quill) and the W fcrcnt machines as parr of the pre process.
axis (table) work in the (awards agers process planners compare individual machines in
other. so Ihey can be used large parts and hard-to-reach the machine shop and assign the available workload 10 the
areas. It means, that during drilling, the machine table most suitable machine.
moves an quill. quill is a physical part
of the spmdle. It is in the spindle where the culling 1001 ro- A fair and accurate comparison can be made between two
"'lies - but in-nnd-out motions are done by the table. vertical ining centers or between two horizontal ma-
Think of the method offered on horizontal chining centers, but cannOI be done to compare
mills - if the quill were to be very it would lose (ween two differenl types.
strength and rigidity. belter way was to split the tradI- In 11 typical sped chart, additional dala
tional single Z axis movement into two - the quill extension may be listed, not included in earlier chart In this hand-
the Z axis will move only of the way £Owards lhe book, the focus is on only those specifications Ihat are
and the table itself, the new axis, will move another interest \0 the CNC and the CNC operator.
CNC TURNING
11
12 Chapter 3
.....t
I ! TAILSTOCK
• Two-axis Lathe
This is the most common type of CNC The work
holding u!\ually a chuck, is on the left
Figure 3-1
"
x- QUILL
of
with
work.
machine (as viewed by the operator). The rear type,
slant bed, is
some special
most popular design for general
for in the petroleum
industry (where turning tube ends is a common work). a
bed is usually more suitable. The CUlling lools are held
Typical configuration of a two axis slant bed eNG lathe - rear type
in a specially designed indexing turret that can hold
x+ six, eight, len, more tools. Many such lathes
t
Z- . . . . . Z+
also have two turrets.
Advanced 1001 designs incorporate tool storage
"
X-
X-
away from the work area, similar to the design of machin-
ing centers.
stored and used
'even hundreds, of cutting tools may
a single CNC program. Many lathes
also incorporate a quick changing tooling system.
is true for both the front and rear lathes and for lathes From the perspective ofCNC part programming, the
with or more axes. The chuck is verti- ditional knowledge required is a subject not difficult to
cally to the horizontal spindle center line for all horizontal learn. General principles of milling apply and many pro-
lathes. Vertical lathes, due to their design, are rotated gramming features are also available, for fixed
90°, where the chuck face is oriented horizontally to the and other
vertical spindle center line.
CNC TURNING 13
reasons, both cannot work all the Maximum swing over bed
Kf':.c.ml<,e of this programming fea- diameter
lUres as synchronized (typically Miscel-
laneous Function), the ability to how much (ime length
each tool requires to complete etc., are re-
quired. There is a level of l"(wnnr'l"Im because only
one spindle speed can be both active cuuing tools,
although feedrate is both pairs of axes.
12
This means that some operations simply cannot
be done simultaneously.
Not every lathe job benelits from the 4-axis machining.
are cases when it IS more costly to run a job on a
lathe inefficiently it very efficient to run Indexing time 0.1 second
It is very important to understand the specifications and Q of various forms (including taper and
of the CNC machine lools in shop. Many fea- circular) can performed, depending on the control model
to the control system, many others to the ma- Q Dwell can use the p. U or X address (G04)
tool itself. In CNC programming, many imponanl
are based on one or of features, for Q Tool uses 4-digit identification
example number of tool stations available, maximum spin- Q 1=,,,,,£1.,,.,,, s~!lection (normal) in mm/rev or in/rev
others.
a Feedrate (special) in mlmin or inlmin
• Control Features a Rapid traverse rate different for X and Z axes
in understanding the description of a Q Multiple repetitive cycles for turning, boring, facing, contour
lathe is the look at some control unique 10 repeat, grooving, and threading are available
how they differ form a typical control. a Feedrate is common from 0 to 200% in 10%
of control features is described in more detail increments (on some lathes only from 0 to 150%)
5,
o X axis can
At some fealures and codes nOI make
Q Tailstock can be programmable
sense - they are included for ,,,r,"'''''1> only. Com-
mon typical features are listed: a Automatic 2m" .. "rv, and corner rounding
R and II Kin
Q X a diameter, nat a radius
a Thread available with six-decimal
Q Constant surface speed leSS) is standard control place accuracy (for inch units)
(G96 for CSS and G97 for r/min)
a Least input increment in X is 0.001 mm or .0001
Q Absolute programming mode is X or Z or C inches on diameter· one half of that value per side
Q nr:rl~m,.'ntlll nrn"'''"rnnllnn mode is U or War H
COORDINATE GEOMETRY
RECTANGULAR COORDINATE M
REAL NUMBER SYSTEM
coordimlte system IS a to
key to understanding 2D point, using the XY coordinates, or a spa-
(he knowledge of arithmetic. point, using the XYZ coordinates. [t was first
key knowledge in this area is 17th century by a French and
/lumber system. Within ......... ,"'" Rene Descartes (I I
ten llvuiluble numerals , _ ' " , , " ' v l us an alternative to the rectangular
can be used in any of the called Coordinate System
o Zero integer.. . 0
r:J Positive integers ... L 2, 10,12943, +45
(with or without sign)
-381, ·25,-77
" ..T
o Negative integers ...
(minus sign required) T
o Fractions ... 1/8, 3/16. 9/32, 35/64
o Decimal fractions 0.1 .546875. 3.5
-, .
At! groups are used
•
the mainstream of just
modern life. In CNC programming, primary goal is to
usc the numbers to 'Iranslate' the drawing, based on its
-;
menslons, into t). cutter
15
16 4
When two number scales that intersect at right angles are • Point of Origin
used, mathematical for a recTangular coordinate sys-
Another term that emerged from the rectangular
tem is terms from
nate is called poil11 of origin, or just origin. 11 is
tion, and all have an important role in CNC programming.
the point where lhe two perpendicular axes intersect. is
understanding is very important for further point a zero coordinate value in each {lxis, fled a.<;
planar XOYO and XOYOZO - 4-4.
• Axes and Planes
of number an axis. AY
-I
This old principle, when applied to programming,
means that at least two axes nvo number scales - will be
mathematical definition of an
I ORIGIN
definition can enhanced a statement thaI an
axis can also be a line of reference. In CNC programming,
an as a reference all the lime. The definition
contains word '. A plane is a term in 2D ap-
plications, while a solid object is used in 3D applications.
Figure 4-4
Mathematical definition of a plane is:
Point of origin - intersection of axes
I 1--1'- -+ -I -u'+
" -1--1-+ --i--I-JiIo. X - ---- .....
P4
+
.. I
Figure 4·6
MACHINE GEOMETRY
Algebraic signs for a point location in plane quadrants
it has the Yvalue to zero (YO). a/the part. TypicaJ machine uses
o If the point
• 0 on the Y axis, hand coordinate system. and negative
it has the X value to zero (XO). is determined by an
UH'"",,,,'VlI VIewing con-
... If the point lies on both X and Yaxes, vention. The basic rule for the Z it is always the
both X and Yvalues are zero IXO YO). along which a simple hole can machined Wilh a sin-
XOYOZO is the point In part programmmg, point tool, such as a drill, reamer, or a laser beam.
itive values are written W",UlIlI the plus sign - Figure Figure 4-8 illustrates the standard orientation of an
type machine tools.
• Right Hand Coordinate System
• Axis Orientation - Milling
In {he illustrations of the number scale, quadrallfs and
axes, the origin into two portions. The A typical 3-axis machine uses controlled axes of
zero point - the point of origin - separates the positive sec- motion. They are defined as and the Z
tion of the axis from the section. In the right-hand X to of the
coordinate system, the at the origin and is parallel to dimension
is directed towards rig III upwards for the the Z axis is the spindle movement. On a
Y axis and towards lhe viewpoint for Z machining center, the X axis is longitudi-
Opposite directions are the Y axis is the saddle cross direction and
Chapter 4
, X+
• REAR LATHE
, FRONT LATHE
VERTICAL
~--I"""- X+
Figure 4-10
Typical machine axes of a eNe lathe (turning
Primary
r~~"'-"""" axes
__ Secondary
axes
TOP VIEW ISOMETRIC VIEW Arc center
1..\--+---+--+--+--+ - - vectors
Figure 4-9
Rotary
Typical machine axes of a vertical eNe machining center axes
,
• Axis Orientation· Turning I
X axis Yaxis Zaxis
Most CNC lathes have two axes, X and Z. More axes are related related related
available, but they are not important at this point. A special
third axis, the C axis. is designed for milling operations 4-11
(live tooling) and is an option on typical CNC lathe. Relationship of the primary and the sec:oncfarv axes
What is more common for CNC lathes in industry, is the center modifiers (sometimes the arc center
double orientation of axes. Lathes are distinguished vectors) are not true axes, yet they are also to the
as front and a rear lathes. An example of a lathe is primary axes This subject will described in the
similar to the conventional engine lathe. All the slant bed section on Circular Interpolation, in Chapter
types a lathe are the rear kind. Identification of the
axes have often not followed principles.
CONTROL SYSTEM
HELP KEY
\.
GE Fanuc Series 16-M
(OFF
I
I
1--1
\
OPERATION
MENU
ON I OFF BUTTONS,
Figure 5·1
A typical example of 8 Fanuc control panel. actual layout and features will vary on different models (Fanuc 16M)
19
20 5
CYCLE D ERRORS
x y z 4 MOO M01 M30 ALARM
o 0 o 0 o
OPTIONAL BLOCK M-S-T MACHINE DRY
STOP SKIP LOCK LOCK RUN
ON ON ON ON ON
@ @ @ @ @ OFF
OFF OFF OFF OFF OFF OFF AUTO
ID MDI 90
80
TAPE 175 70
150 60
125 50
1 40-
EDIT 80 400 30
60 20
MODE 40 600 10 0
30 - 800
20 1000
Y Z 15 1200
X 10 1500
5 2000
0 4000 ccw
D
EDIT ...! ,-_._-
80 90
110 0
120 CYCLE START FEEDHOLD
OVERRIDE %, N OVERRIDE % AUTO EMGSTOP
Figure 5·2
A typical operation panel of a CNC macnmlllO center actual features wiN vary on different models
CONTROL 21
• Parameter Settings
infonnalion that establishes the built-in connection
between the control and machine tool is stored as
special data in called the system parame-
ters. Some of the in this handbook is quite ~pe-
cialized listed for reference only. Programmers with
limited experience not to know parameters
in a great depth. The original factory are sufficient
for most machining jobs.
When (he parameter screen is displayed, it shows the
rameler number with some data in a row. Each row num-
5~3
one bYle, digit in the is called a
An example of a detached handle, called the Manual Pulse word bit is the Binary digiT
Generator (MPG), With a typical fayout and features. is smal unit of a parameter input. Numbering
Layout and features may vory on different machine models.
starts with O. from the to the left:
II
One handle division motion is ...
Handle
Multiplier Metric units for English units
" The Fanuc control system parameters belong to one of
Xl 0.001 mm .0001 inch three groups, specified within an allowed range:
"
Xl0 0.010 mm .0010 o codes
The groups use different input values. binary input Parameters related to High-Speed Skip Signal Input
can only have an input of a 0 or I for the bit data format, 0 Parameters to Automatic Tool Compensation
10 +127 for byte type. Units inpur has a broader scope - Parameters related to T001 life Management
the unit can in mm, mmimin, in/min, Parameters related to Turret Axis Control
milliseconds, etc. A value can also be specified within a Parameters related to High Precision Contour Control
given range, for example, a number within the of Parameters related to Service ... and other parameters
0-99, or 0-99999, or + 127 to -127, etc ..
Quite a parameters have nothing to do with daily pro-
A typical example of a binary input is a selection be- gramming and are listed only as an actual example, All sys-
tween two options, instance, a feature called dry run tem should be set or only by a quali-
can set only as effective or ineffective. To select a fied person, as an experienced technician. A
ence, an arbitrary bit number of a parameter has be set to 0 programmer or operator should not modify any parameter
to make the dry run effective and to I to make it ineffective, settings. These changes require not only qualifications but
authorization as well. Keep the list of
UniTs inpur, for example, is used to selthe increment sys- settings away from control, in a safe place, just in case.
tem - the dimensional units, Computers in general do no!
distinguish between inch and metric, just numbers, It is up
to the user and the setting, whether the control
will 0.00] mm or .0001 inches as the Many parameters are periodically updated pro-
menL Another example is a parameter selling that stores gram processing. The CNC operator is usually not aware
the maximum feedrate each axis, the maximum spindle that this activity is going on at aiL There is no real need to
speed, etc. Such values must never be set higher than the monitor this activity. The safest to observe is that once
machine can support. An indexing axis with a minimum have set by a qualified technician, any
crement of 1°, will not become a rotary with ,00 I 0 in- temporary changes required for a given work should be
crement, just because the parameter is selto a lower done through the CNC program. If permanent changes are
even if it is possible. Such a setting is wrong and can required, an authorized person should assigned to do
cause serious damage! them - nobody
To better understand what the CNC system parameters
can do, is an abbreviated Ilsting of parameter classifi- • System Defaults
for a typical comrol system (many them are Many parameter settings in the control at the time
meaningful to the technicians only); of purchase have been entered by the manufacturer as ei-
Parameters related to Setting ther the only the most suitable choices, or the most
Parameters related to Axis Control Data common selections. That not mean they will be the
Parameters related to Chopping settings - it means they were selected on the
Parameters related to the Coordinate System their common usage, Many settings are rather conserva-
Parameters related to Feedrate tive in values, for safety reas»ns.
l-':::Ir'Am;::tT",r<: related to Acceleration/Deceleration Control
Parameters related to Servo The set of parameter values established at the time of in-
Parameters related to DVDO stallation are called the default seHings. The English word
Parameters related to MOl, EOIT. and CRT 'default' is a derivative of a word 'defalu', that can
Parameters related to Programs be translated as 'assumed'. When main to the
Parameters related to Serial Spindle Output control is turned on, there are no set values passed to pa-
Parameters related to Graphic Display rameters from a program, since no program has yet been
Parameters related to I/O interface used. However, certain active automati-
Parameters related to Stroke Limit without an external program. a culler ra-
Parameters related to Pitch Error Compensation dius offset is automatically canceled at the startup of (he
Parameters related to Inclination Compensation control system, Also canceled are the fixed cycle mode and
Parameters related to Straightness Compensation tool length offset. The control 'that certain condi-
Parameters related to Spindle Control tions are preferable to others, Many operators will agree
Parameters related to Tool Offset with most of these initial settings, although not necessarily
Parameters related to Canned Cycle with of them. Some settings are customizable by a
Parameters related to Scaling and Coordinate Rotation of a parameter settings. Such settings will . . """"''''''A
Parameters related to Automatic Corner Override permanent and create a /lew 'default'.
Parameters related to Involute Interpolation
I-'::lr::!mpte:>r!:! related to Uni-directional Positioning
A computer is fast and accurate but has no intelligence. Modem methods measuring memory capacity prefer
People are slow and make elTors, but have one unique to use bytes as the unit, rather that a length of an obsolete
ability - they think. A computer is just a machine that does tape. A byte is the smallest unit of storage capacity and is
not assume anything, does not consider, does not feel - very roughly equivalent to one character in the program.
computer does nOl think. A computer not do anything
that a human effort and ingeolli.ty has not during the The memory capacity of the control system should
design process, in form of hardware and software. enough to store the longest CNC program '"''',. . '''£''''''''
on a regular basis. That requires some planning
When the the soft- machine is purchased. example, in three dimen-
ware sets certain existing to their default condi- sional mold work or high speed machining, the cost of ad-
tion, by engineers. Not all system parameters, ditional memory capacity may very high. Although any
only parameters can have an assumed condition - a cost is a relative term, there are reliable and inexpensive al-
condition that is known as the default value (condition). well worth looking into.
example, a tool motion has three basic modes - a One alternative is running the CNC program from a per-
rapid motion, a linear motion and a circular motion. The sonal An communication software
default motion is controlled by a parameter. Only and cabling is required to connect the computer with the
one setling can be active at the startup. Which one? The an- CNC system. simplest version is to transfer the CNC
swer depends on the parameter setting. Many parameters program from ODe computer to the other. More sophisti-
can be to a desired state. Only the rapid or the linear cated possibility includes software and cables that can actu-
mode can be set as default in the example. Since the rapid ally run the machine from the personal computer, without
motion is the first motion in {he program, it seems to make luading it 10 the memory of CNC first This method is
sense La make it a default - wail' often called 'dripleeding' or 'bitwise input', When oper-
from the personal computer, the CNC program can be
Most controls are set (0 the linear motion as Ihe default as long as the capacity of the storage device, typically the
(GO I command), to be in at the start - strictly for hard drive.
safety reasons. When the machine axes are moved manu-
ally, the parameter selling has no effect. If a manual input of Most CNC programs will fit into the internal memory of
an axis command value takes place. either through the pro- control system. Many controls use the of avail-
gram or from the control panel, a tool motion results. If the able or the equivalent length of are
motion command is nm specified, the system will use the some formulas that can be used to get at least the approxi-
command mode that had been preset as the default in mate memory capacity calculations:
parameters. the default mode is a linear motion GO I,
the is an error condition, faulting the system for the C) Formula 1 :
lack of a Jeedrate! is no cutting feed rate in effect,
which the GO I requires. Had the default setting been the find the program length in meters,/When the capacity
rapid motion GOO, a rapid motion would be performed. as it
is known in use the following formula:
no! programmed
It is beneficial to know the default settings of all controls
in the shop_ Unless there is a good reason to do nrn.... n>Jl
~ where ...
defaults for similar controls should be the same.
Sm = Storage capacity in meters
• Memory Capacity No = Memory capacity (number of characters)
CNC programs can be stored in the control
C) Formula 2 .
size is only limited by the capacity of the control.
",rr\('l""'1"1"1
capacity is in a variety of ways, originally as To find the length program in/eel. when the capacity is
the equivalent length of tape in meters or feet, lalely as the known in charaCters, use the following fOlTnula:
number oj bytes or the number of screen pages. A common
minimum capacity of a CNC lathe control is 20 m
of tape (66 ft). is an old fashioned method thal some-
how persisted in staying with us. On CNC milling systems,
the memory requirements based on the same criteria are
generally and the typical minimum memory capacity
is 80 m or ft Optionally, larger memory capacity IG'i" where ...
can be added to the control system. The minimum memory
5, Storage capacity in feet
capacity the control varies from one machine to another- No :: Memory capacity (number of characters)
always control specifications carefully.
CONTROL SYSTEM 2S
the device and dry run is used as well. it is very • Sequence Return
important to provide sufficient clearances. Usually, it
Sequence Return IS a function controlled by a switch or a
means moving the tool away from the parr. program is
key on the control panel. purpose is to enable the CNC
then executed 'dry', without actual cutling. without a
operator to start a program from the middle of an inter-
ant, just in the air. Because of the heavy feed rates in the dry rupted program. Certain programmed functions memo-
run, the part cannot he machined safely. a run,
(usually the last and feed), have to be In-
the program can be checked all possible errors except
put by the Manual Data Input key. The operation of this
those that to the actual contact of the tool with function is closely lied to the machine tool design. More
the material.
formation on the can be in the machine tool
The dry run is a very efficient setup aid to manual. This function is very handy when a tool breaks
all integrity of the CNC program. Once the is during processing of long programs. It can save valuable
proven during a dry run, the CNC operator can concentrate production time, if properly.
on sections of the program that contain actual machin-
ing, Dry run can used in combination with • Auxiliary Functions lock
features of the operation panel. ore three available to the operation of a
CNC machine that are part of the 'auxiliary junctions'
group. These functions are:
• Z Axis Neglect
Miscellaneous functions lock Locks M functions
Another very useful tool for testing programs
on CNC machining centers (not lathes) is a toggle switch Spindle functions lock locks S functions
located on the operation panel called the Z Axis Neglecr or
Tool functions lock Locks T functions
Ignore. As when this switch is
activated, any motion for the will not
be performed. Why the axis? Since the X and Y axes are described in this chapter, auxiliary functions
used to profile a of the part most common con- generally relate to the technological aspects of the CNC
touring operations), would make no sense to temporarily They control such machine functions as
cancel either one of axes. neglecting (disabling) spindle rotation, spindle orientation, coolant selection, tool
Z temporarily, CNC operator can concentrate changing, indexing table, pallets and many others. To a
on the of the part contour, without worry- lesser degree, they also control some program functions,
ing about the depth. Needless to say, this method of pro- such as compulsory or optional program SLOp. subprogram
gram testing must take place without a mounted part (and flow, program closing and others.
normally without a coolant as well), Be careful here! It is
important to or disable the switch at (he right time. When auxiliary functions are locked, machine re-
lf the Z axis motion is disabled before the Cycle Start key is lated miscellaneous functions M, all spindle functions S
all following Z commands will ignored. If all 1001 functions T will be suspended. Some machine
motion is enabled or disabled during program ",.I"\"I'C<'_ 1001 manufacturers the name MST Lock rather than
ing, the position the Z may inaccurate. Auxiliary Functions Lock. MST is an acronym the
first letters from the words Miscellaneous, Spindle and
Z switch may be in bolh manual Tool, LO the program functions that will be locked.
and automatic modes of operation, Just make sure that the
motion along the Z axis is returned Lo the enabled mode, The applications of these locking funclions are limited to
once the program proving is Some CNC ma- the job setup and program proving only and are not used for
chines require resetting of the Z axis position production machining.
a locking all the tool motions, but there is a the machine operator finds what values must be
good reason to use this It CNC operator changed in the program itself, the program must edited
the chance to test the program with virtually no chance of a to reflect these changes. Not only for the job currently
collision. worked on, but also for repetition of the job in Ihe fu-
lUre. After all, it should be the goal of every programmer
When the machine lock is enabled, only the axis motion and CNC operator to run any job at one hundred ef-
is locked. All other program functions are ficiency. This efficiency is most likely as a com-
mally, including the tool and spindle bined effort of operator and the programmer. A good
This function can used alone or in combination with CNC programmer will always make the effort to
other functions in order to dlscover possible program er- 100% efficiency at desk and then improve the
rors. Probably the mostlypical errors are errors and even
the various toot offset functions.
as either enabled for cutler entry or disabled for the cut- incorporate a feature called CUllillg Tool Allima~
ler entry. It can set manually on the or, if lion. If on the il shows Ihe blank of the
able, by a program input. Some controls allow only one part, the mounting device and the tool shape. As the pro-
area or cube to be defined, others allow more. gram is executed, the operator has a very accurate vis-
ual aid in program proving. Each graphic element is
When this option is in effect and the unit a by a different color, for even a better
motion in (he program that takes place within the forbidden blank the mounting device and
zone, an error condition results and the machining is inter- preset for exact proportions and a variety tool shapes can
rupted. A typical applications may include zones occupied be stored for repetitive use. This option is a good example
by a tuilstock, a fixture, a chuck. a rotary table, even an of CAD/CAM-like features built into a stand-alone control
unusually shaped part. system.
The development of any CNC program begins with a The initial part information is not limited to drawing
very carefully planned process. Such a process starts with and the material - it also conditions not cov-
ng drawing (technical print) of the required ered in the drawing, as pre- and machining,
part released for production. Before the part is machined. grinding allowances, features, requirements for
several have (0 be considered and carefully evaluated. hardening, next machine setup, and others. Collecting all
The more effort is put inlo stage of the this information provides enough (0 start planning
program, the results may be at the the program.
31
32 Chapter 6
programming systems are availahle various computers and CAD/CAM AND CNC
can virtually job. For a typical machine shop, a
Windows based programming soft ware can very benefi-
The nee~ for i efficiency and accuracy in CNC
A typical example of this kind of application is the
programming has been major reason for development
popular and powerful Masfercam™, from CNC Soft-
of a variety of methods that use a computer Lo prepare part
ware, Inc., Tolland, are others. Computer assisted CNC programming has been
around for.many years. in the form of language based
MANUAL PROGRAMMING programming, such as APyrM or Compact IITM. Since the
late 1970's, CAD/CAM has played a significant role by
Manual programming (without a computer) been the adding the visual aspect to the programming process. The
most common method preparing a program for acronym CAD/CAM means Computer Aided Design and
many years. The fatest CNC controls make manual Computer Aided Manufacturing. The first three letters
gramming much easier than ever before by using or (CAD) cover the area of engineering drafting.
repetitive machining variable type programming, "' ........ 'u .. '" three (CAM), cover the area
graphic tool motion simulation, standard mathematical in- crized manufacturing, where programming is only a
put and other time saving features. manual program- sman whole subject of CAD/CAM covers much
ming, all calculations are done by hand. with the aid of a more just design. drafting and programming. It is a
pocket no programming i~ used. Pro- part of modern also known as ClM - Computer
grammed data can transferred to the CNC machine via a Integrated Manufacturing.
cable, an inexpensive desktop or a laptop computer. In area of have
is and more rellable than other methods, major role for a long Machine controls have
Short programs can manually, by keyboard more sophisticated, incorporating latest techni,ques of
entry; directly at the machine. A punched tape to data tool path graphics, machining
the popular media of the past but has virtually disappeared can now be prepared with the usc
machine shops.
PROGRAM PLANNING 33
computers, using graphical interface. is the price, may handle to an absolute If the con-
no an even small machine can afford a trol system can handle il, manual programming is the way
programming system in house. systems are also to the ultimate control over such a project, when other
popular because of their flexibility. A typical computerized methods may not suitable.
programming system not have to be dedicated only to
programming - all related tasks. often done by the pro- with a well customized and computer-
""lnr'ln"l'''r can implemented on the same computer. For ized system, how can the program
example, cuning tool inventory managemenl, of output be exactly as intended? How can the CNC operator
part programs, material information sheets, setup sheets change any part of the program on the machine, without
and tooling sheets, etc. The same computer could also knowing its and
used for uploading and downloadIng CNC programs.
• Integration
The keyword in the acronym CIM is - integration. It TYPICAL PROGRAMMING PROCEDURE
means putting all the elements of manufacturing together
work with them as a single unit and more efficiently.
The main behind a successful integration is to avoid Planning a CNC program is no different than any other
duplication. One of the most important rules of using a planning - at home, at work, or - it must
CAD/CAM computer software is: in a logical methodical The first
sion~ relate to what tasks have to be done and what goals
have to be reached. The other decisions relate to how to
achieve the set goals in an efficient and safe manner. Such a
progressive method not only isolates individual problems
When a drawing is made in a CAD software (such as
as they develop, it also forces their solution before the next
AutoCAD), then done again in a CAM software (such as
step can be taken.
Mastercam), there is a duplication. Duplication breeds er-
rors. In order to avoid duplication, most of the CAD foHowing items form a fairly common and logical
tems incorporate a transfer method of the design to the se- sequence of tasks done in CNC programming. The items
CAM system to be for CNC programming. are only in a offered for further
Typical transfers are achieved through special DXF or This order may changed to reflect special conditions or
lOES files. The DXF stands for Data Exchange Files or working habits. Some items may be missing or redundant:
Drawing and the IGES abbreviation is a
short form of Initial Graphics Specification 1. Study of initial information (drawing and methods)
Once the geometry is transferred from the CAD system to 2. Material stock (blank) evaluation
the CAM system, only the tool path related process is 3. Machine tool specifications
needed. a kind of formatter), 4. Control system features
the computer will prepare a part program, ready to 5. Sequence of machining operations
be loaded directly to the CNC machine. 6. Tooling selection and arrangement of cutting tools
7. Setup of the part
• future of Manual Programming 8. Technological data (speeds, feedrates, etc.)
9. Determination of the tool path
It may seem that the manual is on the 10. Working sketches and mathematical calculations
cline. terms of actual use, this is probably true. 11. Program writing preparation for to CNC
il is necessary to keep in perspective that any computerized 12. Program testing and debugging
technology is on already well established melh- 13. Program documentation
of manual programming. Manual programming for
There is only one in CNC program planning and that
CNC machines serves as the source new technology
is the completion all instructions in the form of a pro-
- it is (he very concept on which computer-
that will result in an error-free, and efficient CNC
programming is opens the
machining. suggested procedures some
door for developmem of more powerful and soft~
changes for example, should the tooling selected be-
ware applications.
fore or after the pall setup is determined? Can the manual
The manual programming may somewhat part programming methods efficiently? the
frequently today and eventually will be used even less - but worki sketches necessary? Do not be afraid to modify
knowing it well - really understanding it - is and always any so called ideal procedure either temporarily, for a
will the key (0 control the power of CAM software. given job, QT permanently. to reflect a particular CNC pro-
computers cannot everything. are some special style. Remember, there are ItO ideal procedures.
programming projects that a CAM software, regardless of
34 Chapter 6
PART DRAWING visions. special instructions, etc. Data in title block sup-
ply crucial information for CNC programming can be
used for program documentation to make easier cross
The parl drawing is the single most important document Not all title block information is needed in pro-
used in CNC programming. It visually identifies the shape, gramming, but may used for program documentation.
dimensions, tolerances, tinish and many other re-
quirements for the completed item. Drawings of complex Revision dates in a drawing are associated with the title
parts often cover many sheets, with different views, details block. They are important to the programmer, as they indi-
and sections. The programmer first evaluates all the draw- cate how carrent is the version. Only the latesl ver"
data first, then isolates Ihose that are relevant for the de- sian of part design is important to manufacturing.
velopment of a particular Unfortunately, many
drafting methods do not the actual CNC manufac- • Dimensioning
turing They reflect the designer's thinking, rather
than the method manufacturing. Such drawings are Dimensions on the part drawing are either in
erally correct in technical sense, but they are harder to study metric units. Individual dimensions can be
by the and may need to 'interprered'to be a certain datum point or they can he
of any in CNC programming. Typical examples are from the previous dimension. Often, both types of dimen-
methods of applying dimensions, of a datum point sions are mixed in the same drawing. When writing the
that can be used as a program reference point and the view program. it more to all con-
orientation in which the part is drawn. In the CAD/CAM secutive - or incremental dimensions intO datum - or abso-
environment, traditional between design, draft- lute - dimensions. Most CNC programs benefit from draw-
ing and CNC programming mUSI be eliminated, Just as it ings using datum, or absolute Similarly,
helps the programmer to understand designer's intentions, when developing a subprogram for tool path translation, an
it helps the designer to understand the basics of CNC pro- incremental method of programming may ,be the right
gramming, Both, the designer and the programmer have to choice - and the choice depends on the application. The
understand other's methods and find common ground mosl common for CNC machines
that makes the whole process of design and manufacturing uses the absolute dimensioning method (Figure 6-2),
,...",,,"',."',.... and mainly because of the editing ease within the CNC system.
• Title Block
The title block - 6- / - is typical to all professional
---- 170
a
170
By , 110 .-
l-
I
bl
Dr.: Date: 6-2
Program using ABSOLUTE dimensions
Chk.: Drawing number: Only one change in the program is necessary
App ..
With the absolute system of dimensioning, many pro-
6·1 gram changes can be done by a single modification. Incre-
A title block 8xa'mDIB of an .mn,iflFlF!rinn drawing mental method requires alleast two modifications. dif-
ferences between the two dimensioning systcms cnn be
and contents of a title block com- compared in 6-2, using the absolute dimensioning
an the eype of manufacturing and inter- method, and in using the incremental dimen-
nal usually a recl.angular box, positioned in sioning word incremel1tal is more common in
the corner of the drawing, divided into several boxes, CNC. in drafting the equivalent word would be relative.
The contents of the title block include such items as the pari Both illustrations show the a) figure before revision, and
name and part number. drawing number, material data, rc- the b) figure after revision,
PROGRAM PLANNING 35
60 ---,60 ._",......:
e A drawing dimension specifies a hole as
I 075+0.00/-0.05 mm. What actual dimension
should appear in the program?
• Tolerances
For quality machining work, most part
have a range of acceptable deviaLion fTom
the nominal size, within its system of reference, exam-
ple, an English of +,0011-,000 will be dif-
ferent from a mel ric tolerance +0.1/-0.0 mm. Dimen-
sions of this type are usually critical dimensions mu,<;1
be maintained during CNC machining. It may be true thai
CNC operator is ultimately responsible maintaining
the part within the tolerances (providing Ihe program
is correct) - but it is equally true, that the CNC programmer
can the operatoro's task Consider the Figure 6-4
following example for a CNC lathe: Surface finish marks in a drawing:
English (top) and metric (bottom)
36 6
The most important factors influencing the quality of sur- METHODS SHEET
face finish are spindle speed, cutting tool radius
and amount of material removed. Generally, a larger
cuLter radius and slower contribute towards finer Some companies have a staff qualified manufacturing
surface finishes. The time will be longer but can often technologists or process planners for determi-
be by elimination of any subsequent operations such of the manufacturing process. people dcvc\op
as grinding, honing or lapping. a of machining . detailing the route of
each part through the manufacturing steps. They allocate
• Drawing Revisions the work to individual machines, develop machining se-
and setup methods, tooling, etc. Their
Another important section the drawing, often over- structions arc written in a methods (routing that
looked by CNC programmers, shows the accompanies the part through all of manufacturing,
..... ,,<u,!",'''''' (known as revisions) made on the drawing up to a typically in a plastic folder. If a is available,
date. or the de- copy should become a part of the documentation. One of
signer identifies such changes, usually with both purposes of a methods sheet is to provide CNC pro-
the previous and the new value - exampl~: grammer with as much information as possible to shorten
the turnover between programs. greatest advantage of
REV' • 3 / DIMENSION 5.75 WAS 5. 65 a methods sheet in programming is its comprehensive cov-
of all required operations, both CNC
Only the latest are important to the program de- tional, thus offering a overview the
velopment. Make sure the program not only reflects the turing process. A good quality methods sheet will save a lot
current engineering design, but also is identified some of decisions - it is made by a manufacturing who
unique way to distinguish it from any previous specializes in work detailing. The ideal is
versions. Many programmers keep a copy of the part one recommended manufacturing process
ing corresponding to the program in the files, thus prevent- closely matches establlshed part programming methods.
ing a possible misunderstanding later.
For whatever reason, a large number of CNC machine
• Special Instructions shops does not use methods sheets, routing sheets or
lar documentation. CNC programmer acts as a . . . H ..' ' - ' ' - ' ' ' "
Many drawings also include special instructions and as well. Such an environment offers a certain de-
comments that cannot with the traditional gree of flexibility but demands a large degree of knowl-
drafting symbols and are spelled out mClleoeml- edge, skills responsibility at same time.
enlly, in words. Such instructions are very important for
CNC program planning, as they may significantly influ- MATERIAL SPECIFICATIONS
ence the example, an I"ll"mpn!
the part is identified as aground or diameter.
drawing dimension always shows thejinished In the Also important consideration in program planning is eva-
program, this dimension muSI be adjusted for any grinding luation of the malerial stock. Typical material is raw and
allowance necessary - an allowance by the pro- unmachined bar, billet, plate, forging. etc).
grammer and written as a special instruction in the pro- Some may already premachined, routed from
Another example of a special instruction required in another machine or operation. It may solid or hollow,
program to machining performed part with a small or a amount to removed by CNC ma-
assembly. example. a certain hole on the drawing chining. The shape of the material the
should be drilled and tapped and is dimensioned same setup mounting method. The of malerial (steel, cast
way as other hole, but a special instruction indicates the iron, brass, will influence not only the of cul-
drilling and tapping must done when part is tools, but cutting conditions for machining as well.
during assembly. Operations relating to such a hole are not
programmed and if any overlook of a small instruction
such as this, may in unusable pan.
Many drawing instructions use a special pointer called a
Usually it is a line, with an arrow on the point- • Material Uniformity
ing towards ar~ that it to. For a leader
may be pointing to a with the caption: Another important consideration, often neglected by
and alike, is the uniformity material
~12 - REAM 2 HOLES specifications Within a particular batch or from one batch to
another. For a ' ordered two suppli-
is a to ream 2 holes with a reamer that ers La slightly different
has 12 mm
PROGRAM PLANNING 37
per minute; constant sUlface speed or CS), periph- other is in benefits by programming
eml or just surface speed are For metric all heavy first, then the semifinishing or
designation of the machinability meters per min- finishing operations. It may mean an extra tool change or
ute (m/min) are used. In both cases, spindle speed two, but this method minimizes any shift of the material in
(r/min) lOol diameter (for a or a given part the holding while machining. Another important
a lathe) is calculated, common formu- factor is the current position of a tool when a opera-
I-<n,,,,I1<", system, the spindle can be calcu- tion is completed. For example, when a pattern
per minute (r/min): holes in of 1 the next tool as a boring
bar, reamer or a tap) should be order of
4-3-2-1 to Figure 6-5.
T02::: Drill
Hole4
For a calculation, the
Hole 4
Figure 6-5
Il3r' where ...
Figure 6-6
• Machine Power Rating
Contouring too! path motion - as intended (lathe or miff) Machine tools are power. Heavy cuts re-
quire more power than cuts, A depth or width of a cut
The tool path all profiling tools has to into con- that is too large can tool and stall the machine.
Such cases are 1I1"1<~f"f"f'nl must be prevented, The
sideration the cutter radius. either by
equidistant path center of the radius or CNC machine specifications the power rating of the
ler radius offset. machines for milling and motor at the machine rating is in kW (kilo-
provided with linear interpolation and wans) or HP (horsepower). Formulas are available for
lar interpolation, all as features. To more power ratings, calculating removal rate, tool wear
complex paths, as a helical milling motion, a special faclors, etc. Useful is ofkWandHP
option has to in the control unit Two of on I HP = 550 foot-pounds second):
typical tool
1 kW= 1.341 HP
o Point-to-paint 81so called Positioning
o Continuous a/so called Contouring
T
r"
-i:-- ,6
it acts as a lubricant
lion is to reduce friction and make the
flood of the coolant should at
of lubrica-
removal easier.
cutting edge,
/. with a pipe or through a coolant in the tool.
6-7
Contouring too! path motion with tdefltifil~d contour change points
start and end positions profile are identified operator is responsible for a """""VI"
and so are (he positions fQr contour change. Each tar- the machine. coolant should
position is called the contour change point, which has r'f'r'f'lIT,m,f'n(lp.t1 proportions. Water
to be cnIcuiated. The order of locutions in the pro- to preserve the
gram is very important. That means the tool position] is CNC n"I"\Or~lmYrlpr
the target position commencing at the Start point, position not. Ceramic
2 is the target position beginning at point I, position 3 is the nn,r"'CfIl'-Jl'(f dry, without a cast
from point 2 and so on, until the End is flood coolant, but air blast or oil mist
.-.,.,,,,,,,., If the contour is be in X may be allowed. coolant functions vary between ma-
Y axes. In turning, Z axes. chines. so check the machine reference details.
40 Chapter 6
• Identification Methods
A sketch can be done directly in the drawing
or on paper, Every is associated with mathematical
The of cUlling fluids outweigh their incon- calculations. Using color or point numbering as
veniences. CUHing are often messy, the cutting edge identification methods offers and organizat-
cannot seen, may wet and old ion. Rather (han writing coordinates at contour change
coolant smells. proper all problems re- pain! in drawing, use point reference numbers and cre-
lated to coolants can tie controlled. ate a coordinate sheet fonn
numbers, as illustrated in Figure
A coolant related programming is when to turn the
coolant on in the As the coolant function MOS Position I X axis Yaxis Z axis
only turns on tbe pump motor, sure the coolant actu-
ally reaches the tool edge contact with work. Pro-
gramming the coolant on is better than late.
41
42 Chapter 7
The next block a rapid tool motion to (he Address X accepts positive or negative data with the maximum
position X 13.0Y4.6, with a coolant turned on: of five digits in front of a decimal point and three digits
maximum behind the deCImal point - decimal point is allowed.
N25 G90 GOO Xl3.0 Y4.6 MOS
The of a decimal point in the notation means the
decimal point is not used; the absence of a plus sign in
t6f' where ...
the notalion means that the value cannot be nega-
Sequence or block number tive - a lack means a positive value implication.
N25
G90 Absolute mode These samples format notalion explain the shorthand:
GOO motion mode G2 Two digits maximum, no decimal point or sign
X13.Q Y4.S Coordinate location
MOB ON function N5 digits maximum, no decimal point or sign
The control will process anyone block as a complete unit Five digits maximum, no decimal point or
- never partially. Most controls a random word order F3.2 Five digits maximum, digits maximum in front of
in a block, as long as the block lS first the decimal point, two digits maximum behind the
decimal point, point is no sign is used
fORMAT NOTATION Be careful when evaluating the shorthand notations from
a manual. There are no industry standards and not all con-
Each word can only written in a specific The manufacLUrers use the same methods, so the
number of digits allowed In a word, depending on ad- the short forms may vary significantly. list
dress and maximum number of decimal places, is set by the dresses, format and description is listed in the
control manufacturer. No! all can be Only following tables. They notations based on a
ters with an assigned meaning can be programmed, except typical Fanuc control system.
in a comment. Symbols can be used in only some words,
and their position in word is Some are • Milling System Format
used in custom macros. Control limitations are impor-
tant. Symbols supplement the and letfers and provide The description for
with an additional Typical pending on the input units. The table below lists
formal descriptions (metric format is in parenthesis, ap-
symbols are sign, decimal point,
a few others. All symbols are listed in a plicable). Listed are format notations for milling units. The
first column is the address, the column is the format
• Short Forms notation and third column is a description:
Control manufacturers often specify the input format in Address Notation Description
an abbreviated - Figure 7-2.
Rotary or
A A+5.3 degrees·
X ± 5 3 Rotary or Indexing axis - unit is
4I·-iII-iII-4I-e B 8+5.3 - used about the Y axis
Number of digits
-- decimal pOint Cutter radius offset number
0 02 (sometimes uses address H)
-- Decimal paint allowed
F F5.3 Feedrate runction - may vary
Notation Description
,,~,"~,~ ~"""~"~~'" "
M M2 Miscellaneous function
Y+4.4 value
y
(Y+5.3)
Z+4.4
z IZ+5.3}
Similar chart as for Ihis one is for lalhe systems. US.3 Dwell function with G04
A number of definltions are same are included only
Incremental value in Z axis
W+4.4
for convenience. Notation is in the met~ w (W+S.3) Stock allowance in Z axis
ric notation is in parenthesis, if to the address.
X+4.4 Absolute value in X axis
Address Notation Description x (X+5.J)
X5.J Dwell function with G04
A A3 input
c C+4.4
(C I 5.3)
Chamfer for direct input z
PART PROG RAM 45
Symbol Description Comment Symbols supplement the and digits and are an inte-
gral part the program structure.
Fractional of a number
Positive value or PROGRAM HEADER
addition sign in Fanuc macros
Negative value or Comments or messages
Minus sign providing are enclosed in of in-
subtraction in Fanuc macros
lernal documentation is to both the programmer and
Multiplication Multiplication in operator. A series of comments at the top is de-
* Fanllc macros fined as the program where
Block skip function symbol or lures are identified. next
/ divisioll sign in Fanuc macros sample of items that may be used in
Within the program, each tool identified as well. the X Y axes. If Ihe absolute position is unknown,
change block to the incremental verSlon:
(*** T03 - 1/4-20 PLUG TAP ***)
N88 G91 G28 XO YO
Other comments and to the operator can be
added La the program as required. If a 1001 has 10 repeated, make sure not 10 include the
1001 change block for the current tool. Many CNC systems
TYPICAL PROGRAM STRUCTURE will an alarm if the 1001 change command cannot
find tool in the the following program ex-
ample, the lOa! repeat blocks will be NS, N38 and N67.
Although iL may be a bit early to show a complete pro-
gram, it wiH do no harm to look at a typical program struc- The program structure is a machine with
ture. Developing a structure is absolutely es- random tool selection mode a typical control system,
sential it is going to be lime. Each block of the with some minor changes to be expected, Study flow of
program is identified with a comment the program, rather than its exact contents. Note the
tiveness of blocks for lool and note the addition of
Note - Program blocks use only sample block numbers. a blank line (empty block) between individual eas-
Blocks in parentheses are not required for fixed cycles. The ier orientation in the program.
XY value in the block N88 should be current position
N33 GOO GaO Z2.0 MOS (CLEAR ABOVE PART - COOLANT OFF)
N34 G2S Z2.0 MOS (HOME IN Z ONLY-SPINDLE OFF)
N3S MOl (OPTIONAL STOP)
(-- BLANK LINE --)
N36 T02 (TOOL T02 INTO WAITIN'G POSITION - CHECK ONLY)
N37 M06 (T02 INTO SPINDLE)
N38 G90 G54 GOO X.. Y.. S .. MO) T03 (T02 RESTART BLOCK - T03 INTO WAITmG POSITION)
N39 G43 Z2.0 H02 MOB (TOOL LG OFFSE.'T - CLEAR ABOVE WORK - COOLANT ON)
(N40 GOl Z- •• F •• ) TO Z DEPTH IF NOT A
(-- - CUTTING MOTIONS WITH TOOL TOA ---)
N62 GOO GSO Z2.0 M09 (CLEAR ABOVE PART - COOLANT OFF)
N63 G2B Z2.0 MOS (HOME IN Z ONLY - SPINDLE OFF)
N64 MOl {OPTIONAL STOP}
(-- BLANK LINE --)
N6S T03 (TOOL T03 INTO WAITIN'G POSITION - CHECK ONLY)
N66 M06 , (T03 INTO SPINDLE)
N67 G90 G54 GOO X •• Y •• S .• M03 TOl (T03 RESTART BLOCK - TOl INTO WAITING POSITION)
N6S G43 Z2.0 H03 MOS (TOOL LG OFFSET CLEAR ABOVE WORK - COOLANT ON)
(N69 G01 Z- .• F .. ) (FEED TO Z DEPTH IF NOT A CYCLE)
(- -- CUTTING MOTIONS WITH TOOL TO) ----}
Na6 GOO GSO Z2.0 M09 (CLEAR ABOVE PART ~ COOLANT OFF)
NB7 G28 Z2.0 MOS (HOME IN' Z ONLY - SPINDLE OFF)
NBS G2S X •. Y .. (HOME IN XY ONLY)
Na9 M30 (END OF PROGRAM)
% (STOP CODE - END OF FILE TR.1\NSFER)
PREPARATORY COMMANDS
N7 X13. 0 Y10.O All four examples have the same machining result, pro-
viding that there is no change of allY G code mode between
a look at this block shows that the coordi- blocks N4 and N6 in the examples B, C and D.
nates X J3.0Y 10.0 relate to the erul position of cutting
tool, when the block is executed (i.e., processed by Ihe
control). The block does no! indicate whether the coordi-
nates are in the Clbsohl{e or the mode. It
not whether the values are in English or the Modal and non-modal will described shortly.
metric units. Neither it indicates whether the motion to this Each conlrol has own list available G
specified target position is a rapid motion or a linear mo- Many G codes are very common and can be found on virtu-
tion. If a look at the block cannot the of ally all controls. others are unique to the particular control
the block contents, neither can Ihe control system. The sup- even the machine tooL Because of the nature of
plied information in such a block is incompleTe, therefore machining applications. the of lypical G codes Will
unusable by itself. Some additional for the different for the milling systems and Ihe turning systems.
block are required. The same applies for other types of machines. Each group
G codes must kept "pn,"'r~IP
For in order to make the block N7 a tool desti-
nation in a rapid mode using absolute dimensions, all these
Check machine documentation for available G codes!
instructions - or commands - must be specified before
block or within block:
N7 G90 GOO X13.0 Y10.O The G code table on the next page is a considerably
tailed list of the most common preparatory commands
C Example B. for programming CNC milling and CNC ma-
chining centers. The listed G codes may not be applicable
N3 G90 to a particular machine and control system, so consult the
N4 machine control manual to make sure. Some
NS G codes listed are a option that must available on
N6 the machine and in the control system.
N7 GOO X13.0 Y10.O
47
Chapter 8
G code G code
GOO Rapid positioning Local coordinate
GOl Li near interpolation
G02 Circular intcrpolallon clockwise Work coordinme
G03 Circular interpolation counterclockwise G55 Work coordinate
G56 Work coordinate offset 3
G57 Work coordinale offset 4
GlO G58 Work coordinate offset 5
Gll Data Seni ng mode cancel G59
G15 Polar Coordinate Command cancel GSO
G16 Polar Coordinate Command G61
compensation - decrease
compensation - double increase
G48
G49 Tool length offset cancel
Scoling funclion cancel G98
runction G99 Return 10 R level in a fixed
PREPARATORY COMMANDS 49
G code Description
Circular clockwise
Custom macro modal call
G03 Circular interpolation counterclockwise
G04 Dwell (as a separate block)
G09 Exact Stop check - one block only
Programmable data input for double turrets cancel
Gl0 Setting)
G28 Machine zero return (reference poinl I) G90 Absolute command (G roup type B)
G29 Return from machine zero G91 Incremental command (Group IYpe B)
point 2) G92
Toul pUSilioli
Circular CCW
895
G36
G40 Tool nose radius offset cancel G96 Constant surface speed mode
Most of the preparatory commands are Ul~'i..U::'::'c;u Note rapid motion command GOO -
individual applications, for does it in the program? Just once - in
Inrerpolation, G02 and G03 under Interpolation, In fact, so is command for absolute
etc. In this section, G codes are described in general, re- reason neither GOO nor G90 has been is v ....... QI.I,)1.-
of the type of machine or unit. both remain active from the moment of their
first in the program. The cerm is to
G CO IN A PROGRAM BLOCK this characteristic.
N3 G90 GOO
N4
N5
N6 N74 GOl GOO X3.S Y6.125 F20.0
N7 X13.0 YlO.O
In the example. two commands GO 1 and GOO are m
If the structure is changed slightly and filled with conniCL As GOO is the latter one in the block. it will
data, these may be the result: come feedrale is ignored in this block.
~ Example C - modified (as programmed) : N74 GOO GOl X3.S Y6.12S F20.0
N3 G90 GOO XS.O Y3.O This is exact of the previous Here.
N4 xo
the GOO is in front, therefore the G01 will prece-
NS Y:2O.O
N6 XlS.O Y22.0 motion will take place as a motion at
N7 Xl3.0 YlO.O of 20.0 in/min.
PREPARATORY 51
Even two ........"..&L.......... for the same type of work, TIlls handbook covers only the most common miscella-
for example, two vertical machining center, will neous functions, used by the majority controls, Unfortu~
have functions ditterjent each other, if they have a nately, there are many functions that vary between ma-
ferent CNC SlgOJ.tllCaIltly different I'InlMI'ITHI and the control system. functions are called
ferent the same manutactlmer machine specific junctions. reason, always consult
also have functions, even with the same the documentation for the machine model and its
model of the CNC <II'UC!,rpTn control system
54 9
M10 M11
Ml.2 M13
or
Accessories Ml.7 MiS
at this combination - a Z mo-
M21 M22
M78 M79
with the program stop function
• Startup of M Functions
M functions completed in ONE BLOCK
""='"'=~==-==9
Take a look at the list of typical M functions.. Add a tool
motion to try to determine the way lhe function is
going to behave, based on the previous nOles. A bit of logi-
cal thinking provides a good chance to arrive at righ! t. no rewind)
Com pare) he two following groups to confirm:
Coolant mist ON
Spindle rolation reverse
Coolant ON (coolant pump motor ON)
M30 Program end (always with resel and rewind) PROGRAM fUNCTIONS
M60 Automalic pallet change (APC)
Miscellaneous functions that control program processing
can used either to interrupt temporarily
If there is an uncertainty about how the function will in- (in Ihe middle of a program) or permanently the end of a
teract with the lool motion, safest choice is to program program), Several functions are available for Ihis purpose.
the M as a separate That way the function
will always be processed before or after relevant pro- • Program Stop
gram block. In the majority of applications this will be a
SOltllion. The MOO function is defined as an unconditional or com-
pulsory program stop. Any time the control system en-
• Duration of M Functions counters lhis function during program processing, all auto-
matic operations of the machine tool will stop:
Knowledge of when the M function effect is logi-
cally followed by the question about how long the function o Motion of all axes
will be active. Some miscellaneous functions are active o Rotation of the spindle
only in the block they appear. Others will continue to in
until canceled by another miscellaneous function. o Coolant function
This is similar to the modality the preparatory G com- o Further program execution
however the word modal is not usually used with M
functions. an example of a function duration, take mis- Thc control will ItO! be reset when the MOO function is
cellaneous functions MOO or MOl. Either one will active prclce:5scQ, All program data currently active are
for one block only. The coolant ON function M08, will be (feedrate. spindle etc.).
until a canceling or an altering function is pro- program processing can only resumed by activating
grammed. anyone of the following functions the Cycle Starr key. The MOO function the spindle
will cancel the coolant ON mode - MOO, MO l, M02, M09 rotation coolant function they have to be
and M30. Compare these two tables: grammed in subsequent blocks.
FUNCTIONS 57
MOO function can be as an individual o In the program itself, issue a comment section with the
block or in a block commands, usually' necessary information. comment section must be
motion. If the MOO is programmed together enclosed in (three versions shown):
with a motion command, the motion will be completed
then (he program stop will effective: [Al 109 MOO (REMmr.E CHIPS)
c::> MOO programmed after a motion command " [8] N39 Xl3. 5682 MOO (REMOVE CHIPS)
c::> MOO programmed with a motion command: Anyone of the methods will give Ihe operator
the necessary information. From the two options, the sec-
N39 GOO X13.5682 MOO ond one [B], the comment section in the program, is
The built-in can be read directly from the
In both cases, the motion will screen control paneL
first, before the program is executed. The
between the two examples is apparent only in a • Optional Program Stop
block processing mode (for example, during a trial
will be no practical difference in aula mode pro- The miscellaneous MO I is an optional or a COII-
(Single Block switch set to OFF). dirional program stop. It is similar to MOO function,
one diffe.rence. the MOO function, when MOl func-
Practical Usage lion is encountered in the program, the processing
will nOl SlOp, the operator the control
program stop panel. The Optional SlOP toggle switch or a button key lo-
CNC operator's job cated on the Clln be set to either ON or
common use is a When the in the program is
the part is still During the stop, the part setting of will determine
sions or the lool condition can be checked. Chips accumu- will or continues to
lated in a bored or drilled hole can be removed, for exam-
ple, before another operation can start, as
blind hole tapping. program stop function is also nec- Optional Stop switch setting Result of MOl
essary to the current setup in the middle of a ON
for to reverse a part. A tool
also requires the in the OFF
primary reason La use a coolant flood aimed at the Coolant should always be programmed with two
cutting is to dissipate lant considerations in mind:
cutting. reason is to remove
cutting area, using coolant pressure, Finally, a There will be no coolant splashing outside of
also acts as a lubricant to ease the friction work area (outside of the machine)
cutting tool and material. Lubrication helps to extend tool a will never be a situation when
life and the surface finish. the coolant reaches a hot edge of the tool
clockwise
NSOO M09 (CW) and of rota·
Lion is always relative to a point of view. The
0\.L1,llV<.U\J
C) Example 0 - axis motion and ON: viewpoint is spindle as the
lion along the spindle center towards itsface. CW rota-
N230 GOO Xll.5 Y10.O MOS
M60 Automatic M
61
62 Chapter 10
<:> Turning block examples: rectory more descriptive useful. The program descrip-
tion can be read on display screen provides an eas-
N67 GOO G42 5 ZO.l T0202 MOS 1) identification of program stored.
N23 G02 X7.5 Z-2.8 RO.5 FO.012 (E.XAMPLE 2) If program name is than the characters
recommended, no error is generated, hut only the firsl six-
In lathe examples. block N67 a rapid mo- teen will be displayed. Make sure 10 avoid
tion to an XZ position, as well as a few other ("''''''nm,<ln,'l<: names that can ambiguous when displayed.
the tool nose offset startup activation of the tool these two names, they appear 10 be
(T0202), the coolant ON function M08. The ex-
ample in block is a typical circular interpolation block OJ.005 (LOWER SUPPORT A.RM: - OP 1)
with a 01006 (LOWER SUPPORT A.RM: - OP 2)
Increment block number In all cases of block incremenLS than one, the pur·
- I~ - - <- " " " " - « - <
several advantages al least one likely N40 GOO G41 Xl.S zo T0303 Moe
NSO GOl X-0.07 FO.Ol
N60 GOO WO.l M09
On the positive the block mo G40 Xl. S
program search greatly simplified
repetition on (he machine. They
to read on
the program
CNC display screen
= Example B - two cuts:
or on the copy. That means both N40 GOO G4l Xl.5 ZO.05 T0303 MOS
N50 aOl X-O.07 FO.Ol
programmer the operator benefit N60 GOO WO.1
On the side, block will the N61 X3.5
N62 ZO
available computer memory of the That means a N63 GOl X-0.07
of programs can stored in the memory, N64 GOO WO.l M09
programs may not fit in their entirety. mo G40 Xl.S
64 10
"""'1"1"''' inN40 and N6l to block sequence number not affect the order of
this handbook is 10 I"Il"f,a!"lOlm program processing, regardless of the increment. if
if an addition is needed, the blocks are numbered in a or mixed
will have no numbers at all (check if the control the part will always be sequentially, on
system allows block numbers to be omitted, most do), the of the block nO!
mcnt of 5 or lOis the most
Q Example A - one face cut: to 4 to 9
That should more than sufficient for the
N40 GOO G4l X3.5 zo T0303 MOS program modifications.
N41 GOl X-O.07 FO.Ol
N42 GOO WO.l programmers who use a computer hased
N43 G40 X3.S programming system, just a few relating to (he
gramming of sequence numbers. Although the computer
Q Example B . two face cuts: programming allows start number of the block
and its to almost any adhere to the
N40 GOO G4l X3.5 zo.os T0303 MOS start and numbers of on.e (N I, N2, N3, ... ). The
N41 GOl X-D.07 FO.Ol
N4.2 GOO WO. 1
computer based is (0 keep an ac-
X3.S \"""""U<X.J,, of the part geometry the cutting tool
ZO program is modi manually, the part
GOl X-O.07 Ua.'·LlV''''''" is not accurate any more. Any CNC
GOO WO.l program should al ways be reflected in the source of
N43 G40 X3.5 the program, as well as its result - never in result alone.
Note that the program is a lillie smaller and the additional • long Programs and Block Numbers
arc quite visual and noticeable when or
displayed on the screen. are always to into a CNC
limited capacity. In such cases, the program
Leading zeros may (and should) be omitted in lenoth may be shortened by omitting the block numbers al-
- for example. NOOOO8 can tog~ther or - even - by programming them only in the
(he zeros reduce the significant blocks. The significant blocks are those that
zeros must always be written, to have to be numbered for the purpose of search, a
for sl1ch similnri 8S N08 and N80. (001 repetition, or procedure Lha[ on program
use of block numbers in a program is optional, as numbers, such as a machining cycle or tool In these
shown in the earlier example. A program containing cases, select of two or the operator's
is easier to CNC operator, convenience. limited use of numbers will
functions in program editing can be used Increase the length, but for reason.
depend on the num- rr all block numbers have been omitted in the
u"..... ..,.'" repetitive cycles
program, the search on the machine control will
the significant blocks ralher difficult. The CNC will have no
lion but to search for next occurrence of a particular
dress within (l bJock. Y, Z, etc., rather than a se-
• Numbering Increment quence block method
Block numbers in a prog(am can in any physical order unnecessarily prolong
- they can also be
programming Of BLOCK CHARACTER
UI..,",<l ..",,,, they are logical
The semicolon symbol on the screen is only a graphic The name safe block - which is another name for the
representation of the end-or-block character and is never startup block - does not become
entered literally in the CNC program. nuuie safe. Regardless of name,
stances it should be included in the program tain control settings for the program or
older control systems have an asterisk [ * J as slart the program in a state.
symbol for the end-of-block, rather then the ... m,,..."'" tries that set the initial status are the
Many controls use other symbols. that (English/metric and absolute/incremental),
of block, for example, some use the any active cycle, cancellation of the cutter
any case, remember the symbol is only the offset mode, the plane selection for milling, the
!he end-of-block character, not its actual fault selection for lathes, etc. The presented
some blocks for both milling and turning 1'1"\">11"1'\1
STARTUP BLOCK OR SAFE BLOCK At the beginning of the program for milling, a startup
may be programmed with the following contents:
A startup block (sometimes called a or a slalUS
block) is a sequence block. It one Of more Nl GOO G17 G20 G40 G54 G64 GSO G90 G98
(usually preparatory commands of
thal the control system into a N I block is the first sequence number, GOO
state. This block is placed at the rapid mode, G 17 establishes the XY plane selection,
or even allhe beginning of each is selects the English units, G40 cancels any active cutter ra-
processed duriog a repetition of a program offset, G64 sets a continuous cutting mode, G80 can-
a tool within a program). In the CNC program. the cels any active fixed cycle, G90 selects the absolute mode,
startup block usually precedes any motion block or G98 will retract to the initial level in a
as well as the tool change or tool index block. conditions apply only when the startup
to be searched for, if the program or as the first major block in the CNC
n"""',o,f1 cutting 1001 is to be repeated during a machine op- "LlIJ""'I..ILII"'''' program changes will become
Such a block will be slightly different for the mill- block in which the change is
and systems, due to the unique requirements of command is effective by any subsequent
of GOO. G02, or cancel the GO I command.
in this handbook, in. the Chapter 5, one cov- a CNC lathe program, the startup
state of {he control system when the main G codes:
on, which sets the system default condi-
should never count on Nl G20 GOO G40 G99
they can be easily changed by
without the programmer's knowl- block number, G20 selects the English
the rapid mode, 040 cancels any
set-
the machine tool nose radius offset, and the G99 selects feed rate per rev-
who designed the con- olulion mode, to Ihe absolute or incremental
system is usually not the controls use
addresses X and Z absolute dimensioning and the
should always assume addresses U and W for incremental dimensioning. For
approach and will not lathe controls that do nol U and W addresses,
programmer will try to pre- (he standard G91 is values in X
conditions under the program control, and Z axes. As in the of the words
rather that ng on the defaults of the CNC system. programmed in by subse-
Such an approach is not only much safer, it will also result quent change of
in the that are 10 use during the setup, the
tool path provi ng and tool repetition due to the tool
Some controls """'AM"" o on
the same line. For or not be pro-
breakage, dimensional adjustments, etc. It is also very
grammed with other G are not sure, place the
beneficial to the CNC particularly to
(hose with limited applications listed, G codes in separate
the startup block will not machining cycle time Nl G20 017 G40 G49 Gao
at all. Another block is that the pro-
one machine tool to an- two or more blocks can
default setting of a par-
Nl G20
N2 G17 G40 G49 GSO
66 10
01001 (SHAFT DWG B451) are two X addresses in the same control
(SHAFT TOOLING - OP 1 - 3 J1U'J CHUCK) will not accept the second X value. but it will
an alarm (error). Why? Because there is a difference
(TOl - ROUGH TOOL - 1/32R - 80 DEG) "''''.',,,''',>,.. the programming rules for a G as such and
(T02 - FINISH TOOL 1/32R - 55 DEG) the coordinate system words. allow to
(T03 - OD GROOVING TOOL - 0.125 WIDE)
as many G codes in the same block as provid-
(T04 - OD THREADING TOOL - 60 DEG)
are not in conflict with each other. But the same
"""",11"1'\1 system will not allow to program more one co-
Nl G20 G99
N2 ••• ward of the same address for block.
rules may also apply. For example, the words io
CNC unit is limited, a block may programmed in any providing the N
usi ng comment aa(lre~;S is the first one listed. For example, following
cal. It will block is (but very nontraditional in its
listed in proper
required details. Nj40 Z-O.75 Yll.56 Fl0.0 x6.S45 GOl
SEQUENCE 67
Addresses in a CNC program that relate to the tool posi- During the program development, it is imperative to con-
tion at a given moment are called the coordinate words. Co- sider the impact of default conditions of the control system
ordinate words always take a dimensional value, using the on program execution. The default conditions come into ef-
currently selected units, English or metric. Typical coordi- fect the moment the CNC machine tool has been turned on.
nate words are X ,Y, Z, L J, K, R, etc. They are the basis of Once a command is issued in the MDI mode or in a pro-
all dimensions in CNC programs. Tens, hundreds, even gram, the default value may be overwritten and will remain
thousands of values may have to be calculated to make the changed from that point on. The dimensional unit selection
program do what it is intended to do - to accurately ma- in the CNC program will change the default value (that is
chine a complete part. the internal control setting). In other words, if the English
unit selection is made, the control system will remain in
The dimensions in a program assume two attributes: that mode until a metric selection command is entered.
o Dimensional units ... English Dr Metric That can be done either through the MOl mode, a program
block, or a system parameter. This applies even for situa-
D Dimensional references ... Absolute or Incremental tions when the power has been turned offand then on again!
The units of dimensions in a program can be of two kinds To select a specific dimensional input, regardless of the
- metric or English. The reference of dimensions can be ei- default conditions, a preparatory a command is required at
ther absolute or incremental. the beginning of the CNC program:
Fractional values, for example 1/8, are not allowed in a
CNC program. In the metric format, millimeters and mefers G20 Selects English units (inches and feet)
are used as units, in the English format it is incites andfeet
that are used as units. Regardless of the format selected, the G21 Selects metric units (millimeters and meters)
number of decimal places can be controlled, the suppres-
sion of leading and trailing zeros can be set and the decimal
point can be programed or omitted, as applicable 10 a par- Without specifying the preparatory command in the pro-
ticular CNC system. gram, control system will default to the status of current pa-
rameter setting. Both preparatory command selections are
modal. which means the selected a code remains active
ENGLISH AND METRIC UNITS until [he opposite G code is programmed - so the meuic
s~stem is active until the English system replaces it and
Drawing dimensions can be used in the program in either vIce versa.
English or metric units. This handbook uses the combined
examples of both the English system, common in the USA, This reality may suggest a certain freedom of switching
to some extent in Canada and one or two other clluntries. between the two units anywhere in the program, almost at
The metric system is common in Europe, Japan and the rest random and indiscriminately. This is not true. All controls,
of the world. With the economy reaching global markets, it including Fanuc, are based on the metric system, partially
is imponant to understand both systems. The use of metric because of the Japanese influence, but mainly because the
system is on the increase even in countries that still use the metric system is more accurate. Any 'switching' by the use
English units of measurement, mainly the United Slates. of the G20 or 021 command does not necessarily produce
any real conversion of one unit into the other, but merely
Machines that come equipped with Fanuc controls can be shifts the decimal point, not the actual digits. At best, only
programmed in either mode. The initial CNC system selec- some conversions take place, not all. For example, G20 or
tion (known as the default condition) is controlled by a pa- G21 selection will convert one measuring unit to another
rilmeter setting of the control system, but can be overridden on some - bul not all - offset screens.
by a preparatory command written in the part program. The
default condition is usually set by the machine tool The following two examples will illustrate the incorrect
manufacturers or disuibutors (sometimes even by the CNC result of changing G21 to G20 and 020 to 021 WIthin the
dealers) and is based on the engineering decisions of the same program. Read the comments for each block - you
manufacturer, as well as the demands of their customers. may find a few surprises:
69
70 Chapter 11
o Screen position number of rlol"i..,.,,,1 program and the units are millimeters, state-
ment does nol i where the dimension of mm has
o Manual pulse generator· the HANDLE (value of flllIll<;!II'lII1'l. needs more information to
a Some control system parameters correctly.
done by a system setting. The control status o Reference to a common point on the part
when the power turned on is the same as is was at ... known as the for ABSOLUTE input
the time of the power shut off If neither G20 nor I is
programmed, accepts the dimensional units se- o Reference to a point on the part
lecled by a .-.<;>'-""',1"1 ..:J"",,,H.,,,. If G20 or G21 is ""lI.lU\AJ ... known as the last tool position for INCREMENTAL input
the program, the command will always In the example, the dimension X35.0 (and any as
ority over system parameter "'.... LUIl;"'. well) can from a selected fixed point on the
mer makes - the control ""<:1"""'" part, called or program zero, or program
preting them, but it point - all terms have the same meaning.
Always the units setting in a ",,, ... ,,r,,t value can be measured from
fore any motion, offset selection, or the tool
nate system and G54 La G59). current position for the next
low this produce incorrect results. cannot distinguish one two
when frequently ng unils for different jobs. statement alone, so some
added to the program.
INPUT OF DIMENSIONS 71
All dimensions in a CNC program measured from the • Preparatory Commands 690 and G91
common poinl (origin) are absolute dimensions. as illus-
There are I wo preparatory commands available for the in-
trated in Figure JJ-J, and al I dimensions ina program mea-
put of dimensional values, G90 and G91. to distinguish be-
sured from the current position (last point) are incremental
tween two availabJe modes:
dimensions, as illustrated in Figure J /-2.
G90 Absolute mode of dimensioning
3
0 , I
G91 Incremental mode of dimensioning
2
0 - -
'4
---
cF~ 1r1_
each other. The control system uses an initial default setting
1
0 when powered on, which is usually the incremental mode.
This setling can be changed by a system parameter that pre-
sets the computer at the power startup or a reset. For indi-
,/I~ vidual CNC programs, the system setting can be controlled
/
/: • I
by including the proper preparatory command in the pro-
--- '
I gram, using either one of two available commands - the
ORIGIN,I
-
• G90 or G91.
Figure 71·1 It is a good programming practice to always inclurle the
Absolute dimensioning - measured from part origin required setting in lhe CNC program, not to count on any
G90 command will be used in the program default setting in the control system. It may come as a
surprise that the common default setting of the control sys-
tem is the incremental mode, rather than the absolute mode.
After all. absolute programming has a lot more advantages
than incremental programming and is far more popular. In
addition, even if the incremental programming is used
frequently, the program still starts up in the absolute mode.
The question is why the incremental default? The reason is
- as in many cases of defaults - the machining safety. Fol-
-- -01 low this reasoning:
,/L-______________________ __ _
~
• Incremental Data Input - G91 The milling shows a motion the cutter has
La reach the absolute position of 12.5037 inches and - at
programmmg, a the same rime - to move Y axis by
rPI,'7TH'P mode, all program dimensions are as de- 177 inches in the Note position
"'<:l,elln-", distances into a specified direction (equivalent to
commands G90 and G91 in the block - it is Im-
'on the control The actual mo- portant, but it may not work on all
tion of the is the speC! fied amount along
with the direction indicated as or negative. C Turning example:
signs + or - specify direction of the tool motion, not N60 GOl X13.S6 W-2.S FO.013
the quadrant of rectangular coordinates_ Plus for posi-
tive values does not have to be written, but sign must example a lathe shows a tool motion,
used. All zero input values, such as XO, YO or ZO mean where the cutting tool has to reach the diameter of 13.56
there will be no tool motion aiong that axis, and do not have inches and - at/he same time - to move 2.5 inches into
to written at all. If a zero axis value is programmed in in- the Z direction. by the neremer
mode, it will preparatory com- tal address W. or G91 is not nonnally
incremental is G91 and remains modal un- the Group A G codes is the most common
til the absolute is programmed. will be no one ~nd does not G code of dimen-
motion for any axis omitted in the block. sional mode selection.
The main advantage of programs is their is a switch the absolute
portability between individual of a An mode in a CNC program, me programmer
program can called at different locations of must be careful not to remain in the 'wrong' mode
the part, even in different programs. It is mostly when man The switch (he modes is Iy tem-
developing or repealing an equal distance. porary, for a specific It may one block or
several blocks. thatLhe original selling for (he pro-
For controlled CNC lathes, the common represen- Remember that both the absolute and
tation incremental is the axis designation as U .nf'rp,...,pnt,:; modes are modal- remaIn In un-
and W, without the G91 command. Some lathes use by the opposite
I, but not those with controls.
IN OF DIMENSIONS 73
In to understand format Since leading zeros suppression and the trailing zeros
back some years may be beneficial. control suppression are mutually exclusive. which one be
(mainly the old NC systems as compared to the more mod- programmed for Without a decimal poim? As it
ern CNC were nOl able to accept the input depends on setting the control system or
of dimensions - the decimal point formal - but the (he designation of (he status by the control manufacturer,
accept all the earlier formats, the actual stnLuS must be known. status deter-
even decimal format is most common. The reason mines which zeros can suppressed. It may be the zeroes
iscompatjbility with lheexisting programs (old programs). allhe beginning or zeros allhe end of a dimension with-
decimal point programming method is latest of out a decimal poin!. In the extremely unlikely evenl the
available, systems thaI allow point system is with zero suppression feature
programming can also accept programs written many years as the only programming the decimal point will not
earlier (assumed that the control and machine tool are also be possible. illustrate results of zero suppression.
compatible). The reverse is nor true. earlier will be
is a very imponant issue, knowing how the Jr the English input .625 inches is to programmed in
interprets a number that 110 decimal poim is the leading zero suppression format applied to the X
for all motion commands and it will in the program as:
The full format of a dimensional The same dimension inches with the trailing ze-
notation of +44 in English met- rOssuppressed, will in Ihe as:
That means ali eight digits have to
len for the words X, y, Z, I. J, K, etc. For example, the X0000625
English of .625, applied to X axis, will
be written as: The metric units input of 0.42 mm, also applied 10 the
axis, is written with the lending zeros suppressed as:
X00006250
X420
dimension of 0.42 mm, when to
the X axis, written as: The same dimension of 0.42 mm with the zeros
suppressed will appear in the program a,,\:
X00000420
X0000042
full formal programming is applicable only to
early control un its, but is correct even today. pro- Although the examples above illustrate only one small
grammed was usually without the desig- ieation, the impression leading zero suppres-
nation, which is determined by position of the dimension is more practical than the trailing zero suppression is
within the block. For modern CNC programming. the full quite Many older control systems are indeed set
format is obsolete and is used here reference (rarily 10 the zero suppression as the default,
comparison. Yes, format will quite because its practicality. is the reason why - study it
modern programs, but don't used it as a standard. carefully, although today the subject is more trivial than
On other hand. if even one decimal point is
• Zero Suppression omitted (forgOlten) in the program, this knowledge beco-
mes very useful and subject is not trivial any more.
Zero suppression is a great improvement over
full programming It was <ldaptation of a new Preference for Leading Suppression
format that reduced the number of zeros in thedimensional
the dimensional input the
input Many controls still support the method of
7~ro suppression. but only for reasons of compatibility with
syslem can accept eight digits, withoUl a
decimal point, ranging from 00000001 to 99999999:
old and proven programs.
o Minimum: 0000.0001 inches or 00000.001 mm
Zero suppression means that either leading or
trailing zeros of maximum input do not o Maximum: 9999.9999 inches or 99999.999 mm
have [0 be written in the CNC The result is a great
reduction in program The default has is nol written. If the program uses zero
been done by the control manufacturer, although de- suppression either type, a comparison of input values
fault mode can be optionally set by a parameter. should be useful:
Don 'I allY WiThoul a reason!
INPUT OF DIMENSIONS 75
XIOOOO.O XIOOOOOOO Xl X, Y, Z, I, J, K, A, R
time.
=> Turning control programs:
important for example, X, Z, U, W, I, K, R, C, F
programmer forgets to the
point or CNC operator forgets to punch it in? The control system that supports option of program-
- and common - errors that can be avoided ming the decimal point, can also dimensional values
good knowledge. without a decimal poin£, to allow with older
programs. In such cases, it is the
complete the section on zero suppression, let's look at principles of programming and
a program input that uses an axis letter but no/ as a the traiJing zeros. If they are used rrw'r",1'" ex-
nate word. A command will be to explain. planations). there will be no problem to the various
Chapter 24 covers the delails relating to the dwell dimensional formats to any other old or
gramming. use the basic format and one sec- new. If possible, program the as a standard
ond dwell The dwell formal is approach.
the dwelling This format tells us that
76 11
fewer characters than the X40000 - on the other hand, example, will as X25.0, not
the Y-IO is shorter decimal poin! equivalent of the normally expected
y-o.OO I (both examples are in English units). If all
before or after the decimal are zeros, (hey do not In case the input value the decimal point, it
10 wriUen: can written as usually. means the values with a dec-
imal point will be interpreted correctly and numbers with-
xO.s ::: X.5 ou( decimal point will be treated as major units only
Y40.0 X40. or millimeters). Here are some
Z-O.l Z-.l
F12.0 ;:; F12. Standard Input Calculator Input
i·
RO.125 ::: R.12S ... etc. X345.0 X345
Any zero value must be written - example, XO cannot XL 0 Xl
written as X only. In this all the program ex-
YO.67 YO.67
amples use the decimal point whenever possible.
Many programmers prefer to nrr"',"'!\rT\ zeros as in the left Z7.4B Z7.48
of the example. They
memory. but they are Normally, the control system is set to the
for learning. suppression mode and the non-decimal
preted as of the smallest units.
Z 1000 in I mode will be equivalent to .0
SPINDLE CONTROL
77
78 Chapter 12
• Direction for Milling Although the descriptions CW and CCW in the iHustra-
It may be rather impractical to look down along the center tion appear to be opposite to the direction of arrows, they
line of the spindle, perpendicularly towards the part. The are correcL The reason is that there are two possible points
of View, and they are both using the spindle center line as
common standard view is from the operator's position, fac-
ing the front of a vertical machine. Based on this view, the {he viewing axis, Only one of the viewpoints matches the
terms clockwise and counterclockwise can be used accu- standard definition and is, therefore, correct. The definition
rately, as they relate to the spindle rotation - Figure 12-1. of spindle rotation for lathes is exactly the same as for ma-
chining centers.
Figure 12-1
Direction of spindle rotation.
Front view of a vertical machining center is shown
cw
ccw
y Tailstock
• Spindle Startup
e Example 0 - Turning application with GSO :
The following examples demonstrate a number of correct
starts for the spindle speed and rotation 10 N1 G20
All examples assume that is no active setting of N2 GSO X13.625 Z4.0 T0100
spindle speed either through a previous program or N3 G96 S420 M03 (SPEED SET - ROTATION STARTS)
N4 •.•
through the Manual DaJa Input (MDI). On machines,
there is no or default speed when the ma- This is the preferred example for lathes, if the
chine power turned on.
G50 setting method is used. Because spindle is
se~ as CSS - Constant Surface Speed, the control system
<:> Example A - Milling application:
WIll calculate the actual revolutions per minute (r/min)
m G20 based on the CSS value of 420 (ftlmin) and current part
N'2 G17 G40 GSO at XI The next example E is correct but not
NJ G90 GOO G54 X14.0 Y9.S recommended caution box above).
N4 G43 Zl. 0 Hal S600 M03 (SPEE.'O WITH ....".·A·'·'
N5 ••• e Example E Turning application with G50 .
These examples are only correct methods for method may result in a slightly longer
a spindle start. All contain rotation at the begin- but it will easier to read and maintain it, mainly
ning of a program milling and turning ap- with limited experience.
plications. The beginning of a program has
been selected intentionally, IJ"'-''"'''''''-' for any first tool in the can be asa
program. there is no active or rotation in effect (nor-
mally carried on from a tool). However, the con-
Nl.20 MaS
trol unit may still store and rotation from the
last tool of the previous
block containing the tool motion, such as
Any toolfollowing
programmed speed "'-:I<::L"'"
Nl.20 Z1.0 M05
tool. If onJy the 31..1'11"":''-'
for the next tool,
The motion will always be completed first, then the spin-
assume the last rotation direction. If only the
direction code M03 or M04 is programmed, the dle will be This is a safety feature built inlo
speed S will the same as the previous tool. control remember to program M03 or
.,.n .... rlll", rotation,
Be careful if a program program stop func-
tions MOO Or MOl, or the function M05. Any SPINDLE ORIENTATION
one of them will automatically stop the spindle. It means to
be absolutely sure as to when rotation will take
place and what it will be. spindle The last M relates to a spindle activity,
speed selection and its rotation the same block and for is M 19, is most commonly used to set a ma-
tool. Both functions are connected and plac- chine spindle an position. Other M codes may
ing within a sing1e block w i l l ' and be valid, on the control system. for example
logical program structure. M20 on same spindle orientation function is
a very specialized seldom appearing in the pro-
gram itself. MI9 function is used, it is mainly during
SPINDLE STOP setup, in the Manual Data Input mode (MDI). This func-
tion is exclusive to milling systems, because only spe-
NormaHy, most work requires a cially eqllipped may require it. The function
speed. In some cases, a can only be used when spindle is stationary, usually
desirable. For example, before ter the spindle When the control system exe-
change or reverse a part in the middle a program, the cutes the M 19 function, the following action will
spindle must be stopped first. The spindle must also be
The spindle will tum in both
during a tapping operation and at of pro-
Some miscellaneous functions will stop the spindle clockwise and a short period.
rotation automaticaHy (for example, the functions MOO, the internal activated. In some
MOl, M02 and M30). Spindle rotation will cases, the is audible. The spindle
during certain fixed cycles. will be locked in a and rotating it by hand,
will not be exact locking position is deter-
the spindle stop should always
by the machine tool indicated by the
Counting on other functions to
programming practice. is a setting angle - Figure
in programming, to slop the
spindle rotation. use function MOS.
the clockwise or the counterclockwise
V\(l,lIV'1. Because M05 does not do anything
In CNC machine lool operation, the MI9 function en- SPINDLE SPEED - R/MIN
ables machine to place a tool into the
manually and guarantees a proper 1001 holder orientation.
Later chapters will provide more about Ofl- programming CNC machining centers, designate
and applications, example. in point the spindle directly in revolutions per minute (rlmin).
boring A basic that contains spindle speed 200 rlmin, for
require this enu-y:
CONSTANT SURFACE
Peripheral for the selected is 150 fUmin,
and the cutting tool diameter is I
lathes, the machining is different
from process. The turning tool has no diameter
::: (12 x 150) / (3.1415 x L 75)
327.4 and the diameter of a boring bar has no to the
327 r/m.in spindle It is the part diameter that is
used for calculations. As the
Many applications can use a machined, changes constantly.
mula, without losing any significant accuracy: during a cut or during roughing operations
eterchanges in Figure 12-7.
3.82 x ft I min the spindle is not practical -
r I min = of the many should be selected to
D r/min? The is to use the sUrface
the lathe
ILl."" .. " . the 3.82 constant may
To select a is only a half of the
as an easier calculation a
The other half is to communicate this selection to
units must be applied "'Y'r,nG>rl
trol system. The has to be set to the surface
not be correct.
mode, not the rlmin Operations IlS drilling,
tapping, etc., are common on a lathe and
direct r/min in the distinguish between
the choice of
• Spindle Speed - Metric Units face speed or per minute must be
When metric is in the program, This is done with preparatory commands G96 and
previous formula is same, but units are prior 10 the spindJe function:
SPINDLE CONTROL 83
• Maximum Spindle Speed :t8t[lng What actually happens in program 0120 I? Block N 1 se-
.......0 ....' ... units of measurement. critical block N2
CNC lathe operates Constant Suiface
the spindle speed is to the cur-
diameter. The smaller diameter is, the o only the tool coordinate position, as in:
spindle speed will be. natural question is
GSa X9. 0 ZS. 0
- what happen if the tool diameter is It may seem
impossible to ever program a zero but there are at o Also sets the maximum to as
least two cases when that is the case.
GSa X9.0 ZS.O 81500
the first case, zero diameter i~ t'lT'l'1,~,ml'1nl"l1
ter line All drilling, center
similar are programmed at
(XO). are always n"'(,'C1T~ITT1Tnf"n
using 097 con:uru:ma. a
is controlled directly, not change. During motion, tool nose
ant function are activated. The spindle
case of a zero diameter is when facing off a
"'..."'."4.....
be a formula described
solid part all the; way to the center is a different ter~ N6 is the actual cut.
situation. all operations at XO, the diameter 0.012 inlrev, the tool tip
does not because a direct r/min is proi gramnle<1 reality, the end point is
During a cutting operation., the aIa1meter V'lX<U1.5"'" spindle center line. The
the material removal continues must be taken into consideration programming
center line. No, with the tool nose offset and to the machine center
eX~Ha.:ullea .......... ,,....... Any calculation
line. A later explains what will hap-
zero, will result in
~ at the center line tIl
pen during
. .'".....,. . . . ~ to Figure 12-7 for H'W'UU""~'"
SPINDLE CONTROL
Block N7 moves the tool tip .J 00 inches away from the N1S GSO XS.S Z2.5 Single meaning
face, at a rapid rate. ]n the remaining two blocks, the tool
will rapid to the indexing position with a cancellation of ra-
N40 GSO Z4.75 S700 Double meaning
dius offset in N8 and an optional program stop is provided
in block N9. From lhese examples. G50 command should be easy to
Now, think of what happens in blocks N5 and N6. The understand. There are two, completely independent, mean-
spindle will rotate at the speed of 278 rlmin at the 05.5. ~ngs?f the G50 command. Either one can be programmed
In a StOgIe block, or they can be separated into two individ-
Since the CSS mode is in effect, as the tool tip faces off the
part. the diameter is becoming smaller and smaller while ual blocks.
the r/min is constantly increasinJr ~f the CNC lathe supports G92 instead of G50, keep in
Wirhout the maximum spindle speed limit in block N2, mmd that they have exactly the same meaning and purpose.
the spindle speed at the center line will be equivalent \0 the On lathes, the G50 command is more common than the
maximum rlmin available within M42 gear range. A typical G92 command but programming method is the same.
speed may be 3500 rlmin or higher.
• Part Diameter Calculation in CSS
With the preset maximum spindle speed limit of 1500
rlmin (GSa S 15(0), the spindle will be constantly increas- Often, knowing at what diameter the spindle will actually
ing its speed, but only until it reaches the 1500 preset rlmin, be c1~mped can be a useful information. Such knowledge
then it will remain at that speed for the rest of cut. may mfluence the preset value of spindle speed clamp. To
find oul at what diameter the Constant Surface Speed will
At the control, CNC operator can easi Iy change the maxi- remain fixed, the formula that finds the r/min at a given dia-
mum limit value, to reflect true setup conditions or to opti- meter must be reversed:
mize the cutting values.
12 x ft I min
Spindle speed is preset (or clamped) to the maximum D =
Y/min setting, by programming the S [unclion together wilh 11 x r I min
the GSO preparatory command. If the S function is in a
block not containing GSa, the control will interpret it as a
new spindle speed (eSS or r/min), active from that block I@" where ...
on. This error nwy be very costly!
o = Diameter where CSS stops (in inches)
Use caution when presetting maximum r/min of the spindle!
12 = Multiplying factor - feet to inches
ftlmin = Active surface speed
1t = Constant 3.1415927
The maximum spindle speed can be clamped in a sepa- r/min = Preset maximum spindle speed
rate block or in a block that also includes the current tool
coordinate setting. In the example 0120 I, block N2 con- o Example - English units:
tains both settings. Typically. the combined setting is useful
at the beginning of a tool, the separate block selling is use-
If the preset value in the program is GSO S 1000 and the
surface speed is selected as G96 S350. the CSS will be
ful if the need arises to change the maximum spindle speed
clamped when it reaches the 01.3369 inches:
in the middle of a tool, for instance, between facing and
turning cuts using the same tool.
D :: (12 x 350) / (n x 1000).
To program the GSa command as a separate block, any- 1.3369015
where in the program, just issue the preparatory command 01. 3369
combined with the spindle speed preset value. Such a block
will have no effect whatsoever on any active coordinate set- The formula may be shortened:
ting, it represents just another meaning of GSa command.
The following examples are all correct applications of G50 3.82 x ft I min
command for both, the coordinate setting and/or the maxi- D ==
r I min
mum spindle speed preset:
N12 GSO X20. 0 Z3. 0 SlSOO Double mealling For completeness, the formulas based on the English sys-
tem, can be adapted to a metric environment:
N38 GSO S1250 SillglemeaniJlg
D ::= 1000 x m I min
1t x r I min
86 12
I1iilf' where ... If these requirements are met, the most important source
data is spindle speed actually used during machining.
D = Diameter stops (in optinrum spindle speed is known, the cutting
1000 = Muftiplying - meters to mm (eSS) can be calculated and used any other tool
mlmin = Ac:t:ive surface speed requirements are met
1t = 3.1415927
r/min :::: maximum spindle speed In a nutshe14 the whole subject can be quickly
up by categorizing it as a - that of Constant
Just the English version, you may shorten met- Suiface Speed, also as the Cuting Speed (CS), when
ric formula as well: tool or part diameter the spindle are known.
there on, it is a simple matter of IV1..111UllQ.
- Metric ft I min =
the preset value in the program is S1200 and the
surface speed is selected as G96 S165, the ess will be
damped when it reaches the mm
e EXAMPLE:
drill works very at 756 IS
D = (1000 x 165) / (1t x 1200) speed in ftlmin?
:::: 43.767609
:::: 043.768 nm : (3.14 x 0.625 x 756) / 12 : 123.64
• CSS Calculation
The Constant Suiface (CSS) is required most
tunung and boring on a CNe lathe. It is also the
cutlnng data, from spindle speed
is calculated for all machining center operations.
Now - consider a very common scenario - the CNe
tor has the current conditions, J.U....'! ..."'W.1J:l; C EXAMPLE:
the speed., so they are favorable. Can
COlllQl1nOIlS be applied to subsequent jobs? well at 1850 -what
is
they can - ........'VlF' .." that certain requirements
will be satisfied: m/min = (3.14 x 7 x 1850) / 1000 = 40.66
Q Machine part setup are equivalent
Q tools are equivalent DeD.em ofusing is a significant re-
spent at the CNC machine, usully required
Q Malerial conditions are equivalent to find and 'fine-tune' optirmnn spindle speed during
Q Other common conditions are satisfied or part opttI1lli!:aU()D
FEEDRATE CONTROL
of two commands that control the feedrate N13 GOO X1S.0 Y12.0
machining comers is G09 command - Exact Nl4 G61 GOl X19.0 F90.0
This is an unmodal command and has to be repealed in ev- N15 Y16.0
ery block. it is required. N16 XlS.O
Nl7 Y12.0
0] 30 I, there is no provision Nl8 G64
That may cause uneven cor-
A'""''''.... ' ... A''' of F90.0 (in/min);
in re-
01301 (NORMAL CUTTING)
f\
~3 GOO X1S.0 Y12.0
N14 G09 G01 X19.0 F90.0
N15 G09 Y16.0
~6 G09 X1S.0 point Target point
N17 Yl2.0
Figura 13-3
Typical feedrare override switch
Jri" where ... This rotary switch has marked settings or indi-
cating the oj programmed jeedrate, A typical
Max. allowed feedrate per revolution in/rev range of a override is 0 to 200%, 0 may be
of the maximum feedrate, no motion at all or the slowes( motion, depending on the
' '>I •• I''1'''1'l from the X and the Z machine. 200% doubles all programmed
r/min = in revolutions per minute
rates. A programmed of 12.0 in/min (FI is the
The Rmtlx is in in/min or mmlmin. depending on the 100% feedrate. If override switch is set to 80%, the ac-
input units In 38 nre details to tual cutting will 9.6 in/min, If the
feedrate limits for threading, 110%, the actual will be 13.2
92 Chapter 13
simple logic to metric "'\f<'I''''f'''n M48 function the CNC nn,"'"",,'nr to use the
programmed feed rate 300 mmlmin, it ....... rrlm/ a
", rate override switch freely; the function will cause
An 80% override results in 240 mm/min cutting to be of the
feed rate and a 110% setting is on the control panel. The
to 330 mm/min cutting tool. most common usage of two functions is tapping or
threading without a cycle, where the exact programmed
feed rate override switch works equally well forfeed- feed rate must be maintained. The following exam-
rates revolution. example, the programmed feed- shows the teChnique:
rate .014 in/rev will in actual feedrate of .0126
in/rev with 90% feed rate and .01 in/rev with mo 8500 M03 (usnro TAP 12 TPI)
130% override. If a feed rate
revolution is required, be the set- N14 GOO X5.0 Y4.0 Moe
For example, programmed is FO.0I2, in N15 ZO.25
revolution. A change by one division on the N16 M49 (DISABLE FEEDRATE OVERRIDE)
,,'"" ....... '1... dial will increase or the pro- N17 GOl Z-O.62S F41.0 MOS
N18 ZO.25 M04
grammed by a full 10 Therefore, feedrate N19 M48 (ENABLE FEEDRATE OVERRI:DE)
will be .0108 at 90%, .0120 at 100%, .0132 at I etc. In mo GOO X.• Y•• M05
feedrate is not required, bUl in N21 MOl
will not for exam-
a feedrate of .0 I in/rev, because of fIxed 10%
crements on the override switch. The tapping occurs between blocks N 16 and N]9 the
override is disabled for
threading
Feedrate ",,"'.......... ,,'"
UI.:lUL/I/::U.
a 1001 carousel), [hat contains all by the pro- Within the travel of is one special posi-
gram. This magazine is not a for the lion, used Cor position is
tools, but many (he commonly aligned with the tool the
used tools there at all limes, If typical 20-tool waiting position, tool-ready posi-
magazine is illustrated in tion, or just the lool (,1U11HJ'P
93
94 Chapter 14
The tool function T, as applied to CNC machining cen- o The spindle must be fully retracted:
ters, will not cause the actual 1001 change - the miscella- ( a) In Z axis at machine zero for vertical machines
neous function M06 must be used in the program to do thaL ( b) In Y axis at machine zero for horizontal machines
The purpose of tool change function, i~ to exc.h.ange the tool
in the spindle with the tool in the wallmg pOSItIon. The pur- U The X and Y axis positions of the tool
pose of the T function for milling systems is La. r?tate th.e must be selected in a clear area
magazine and place the selected tool into the wall!n~ POSI- o The next tool must be previously
tion, where the actual tool change can lake place. ThIS next selected by a T function
tool search happens while the control processes blocks fol-
lowing the T function call.
Chapter 14
---- . - - - - - - -
A program sample illustrates the tool Q Example for illustrations:
(ween tools in (he middle of tile program
illustrated in Figures 10 N51 ( • •• T02 IN SPJlNDLE)
N52 T03 ( • •• TO 3 READY FOR TOOL c:.Hll1NGl~)
(MACHINING WITH
MAGAZINE SPIN E N75 GOO Zl. 0 (RETRACT FROM ",,,,,,,,,,,,,,,\
N76 G28 Zl.0 MOS (T02
N77 MOl (OPTIONAL
(BLANK LINE BETWEEN
N78 T03 (T03 CALL REl?E1!,TElDI
N79 M06 OUT - T03 IN THE SPJCNDLE)
NBO G90 G54 GOO X-lS.S6 Y14.43 9700 M03 T04
N81 . . (MACHINING WITH T03)
"4
t ..
zero
N76 represents the end of machin-
It will cause tool T02 to move
ATe
same optional program stop
lows in the block N77.
Front view of the machine
In the following block N78, the can for
14·2 this is not necessary, but may come very
ATC - Blocks N51 to N78 tool Block N79 is the actual tool
in the spindle will be replaced with T03 that
TOOL MAGAZI SPINDLE rently in the posluon.
in block N80. the rapid motion in X and Y axes
first motion of T03. with ON. Note
T02 at block end. To save lime. the next tool should
placed into the waiting position as soon as possible after
(he tool 1''''''''''''''
note that when T02 is """'''1.1'''''' N77. il is
still in the spindle! There are who not fol-
low If the tool change is right after
block (machine zero return) the MOl
it will be more difficult for " . . ..,'.. ot,...... to repeat the
tool that just finished working, if it n .. (·r\Tm~'"
Front view
Figure 14-3 AUTOMATIC TOOL CHANGER - ATC
ATC example - Block N79
references to Automatic Changer (ATe)
TOOL MAGAZI SPINDLE were made in some examples. designs of
on various machines and from one
to to say, the
method of programming
times quite a bit. The machine
\ / '
will automatically index 10
the proper order. Everything under program control.
Programmer and operator thoroughly familiar
with the type of ATC on all centers in the shop .
change, while the current tool works. This machine feature • Maximum Tool length
always guarantees the same tool change time. The typical
The tool length in relation to the ATC, is the projection of
lime for the tool changing cycle can be very fast on modern
a cUlling tool from the spindle gauge line towards the part.
CNC machines, often measured in fractions of a second.
The longer the tool length, the more important it is to pay
The maximum number of tools thaI C(ln be 10(lded into attention to the Z axis clearance during the 1001 change.
the tool magazine varies greatly, from as few as IOta as Any physical contact of the tool with the machine, the fix-
many as 400 or more. A small CNC vertical machining ture or the part is extremely undesirable. Such a condition
center may have typically 10 to 30 tools. Larger machining could be very dangerous - there is not much that can be
centers will have a greater tool capacity. done to interrupt the ATC cycle, except pressing the Emer-
Of~toOI
gency Switch, which is usually too late. Figure 14-6 illus-
Apart changer features, programmer and ma- trates the concept of the tool length.
chine operator should be also aware of other technical con-
siderations that' may influence the \00\ change under pro-
gram control. They relate to the physical characteristics of
cutting tools when mounted in the tool holder:
o Maximum tool diameter GAUGE LINE
o The spindle must be stopped (with the M05 function) In all examples, the tools will always used,
the empty tool only if required. Hopefully, these examples
o The tool changing axis must be at the home position will illustrate the concept of many possible applica-
(machine position)
lions. Another situation is in situations only
For CNC vertical machining centers, the tool changing one tool is used in CNC program.
aXIs IS Z axis. for the horizontal machining centers it is
the Y axis. The M06 function will also stop the spindle. • Single Tool Work
never count on it. It is strongly recommended to stop the
Certain jobs or special operations may only one
spindle with the MOS function (spindle stop) before the tool
1001 to do the job. In this case, tool is generally mounted
cycle is
in the spindle during setup and no tool t:alls Uf 1001 changes
are required in the program:
TOOL FUNCTION
< ... TO) working ... :> fill the table, start from the program top and
occurrence of the T address and M06 function. All
N26 GOO Z •• M09 (TO 1 MACHINING DONE) are irrelevant. In the example 01402, the will
N27 G2B Z •• MOS (TOl TO Z-li0111E filled as a practical sample of usage.
N28 GOO X .• Y •• (SAFE Xi!'
N29 M30 (END OF PRC)GRAM) • Any Tool in Spindle - Not the first
%
is the most common method of nr/"\"'r'lln1,1"Y1,
lool is in the way of part changing, it remains The operator sets aU tools in the magazine,
In "I.u ............ permanently for the job. settings but leaves the last tool measured in the "1-"""" . . .
most machines, this tool should not the tool.
• Programming Several Tools matches this too! changing method within
following example is probably the one that
using several tools is the most typical the most useful for everyday work. All are
work. Each tool is loaded into the spindle comments.
various ATe processes. From the
viewpoint. the various lool changing meth- 01402 (ANY TOOL IN SPINDLE AT START)
the cutting section of the program, only (**** NOT THE FIRST TOOL ****)
the start tool (before machining) or the end of the N1 G20 (INCH MODE)
tool (after machining). N2 G17 G40 GSO Tal (GE.'T TO 1 READY)
N3 M06 (TO 1 TO SPINDLE)
As the required tool can be changed N4 G90 GS4 GOO X •• Y •• S.. M03 '1'02 ('1'02 READY)
automatically, only if the Z axis is at machine zero (for ver- NS G43 Z•• Hal MaS (APPROACH WORK)
tical or the Y axis is at machine zero
(for horizontal machining tool position in < ... TO} .. >
axes is only important to the safety the
is no tool contact with the the N26 GOO Z •• M09 (TOl MAClUNING OONE)
are formatted N27 G28 Z.. MOS (TOl TO Z HOME)
programs use machine N28 GOO X .• Y •• (SAFE XY POSITION)
zero return of last tool, for example: N29 MOl (OPTIONAL STOP)
N50 '1'03
N51 M06
N52 G90 GOO GS4 X •• Y ••
N53 G43 Z .. H03 MOS
• Keeping Track of Tools
< ... 7rJ3 working .. . :>
If the lool is easy
to keep a track of where tool is at moment.
N66 GOO Z.. M09 (T03~
In later examples, more complex (00\ will (ake N67 G28 Z •• MaS ('1'03 TO Z
place. Keeping a track which tool waiting and N68 GOO X •. Y •• XY POSITION)
which tool is in the spindle can with a 3 column ta- N69 mo (END OF PRCiGRAM)
ble with block number, 1001 waiting and tool in the spindle. %
100 Chapter 14
The filled-in table below shows the status of tools for the A few comments to the 01402 example. Always pro-
first part only. '?' represents any 1001 number. gram MO I optional S!OP before a tool change - it will be
easier to repeat the tool, if necessary. Also note beginning
Block Number Tool Waiting in Spindle of each tool, containing the next tool search. The tool in the
-
block containing (he first motion has already been called -
Nl ? ? compare block N4 with N30 and bluck N32 with N50, The
N2 Tal ? repetition of the (001 search at the start of each tool has lwo
reasons. It makes the program easier to read (tool is coming
N3 ? TOl imo the spindle will be known) and it allows a repetition of
N4 T02 TOl the tool, regardless of which tool is currently in the spindle.
method is not without a ",,,u.,,,,,,. Since there is • first Tool in the Spindle with Manual Change
a tool in the spindle, it "",,.'nIT'" an obstacle dur':
In the next example,
or part changing. is program the
lO
dIe tool in the program
in such a way that is no IDol in the spindle
may 100 heavy or too
part setup (spindle condition).
through the ATe must
tool change can be done by
• No Tool in the Spindle gram supports manual tool cl1tmf!e.
spindle at the start and end of each machined to use MOO program
productive than with the first tool in the scribing the reason
eXlr;1 Ihe cycle time. An good selection - MOO is a
empty spindle at start used if the program- the machine without
mer has a valid reason, to recover space above Follow the next carefully, to understand how a
the part that would otherwise occupied by tool change can perfonned when the firsllOoJ is
recovered space may be for removing the in the 1'02 in example will be changed manu-
with a crane or a programming ally by the CNC
situation is not much from the previous ex-
ample - except that there is an extra tool change at the 01405 TOOL IN SPINDLE AT START)
program. This tool brings the first tool N1 G20 (INCH MODE)
into the spindle, for of each program run. N2 G17 G40 GBO T99 (GET T99 READY)
NJ G90 G54 GOO X .• Y •• S .• M03
01404 {NO TOOL IN SPINDLE AT N4 G43 Z •• HOI MOS (APPROACH WORK)
N1 G20 {INCH
N2 Gl7 G40 GSO TOl {GET TOl < ... 1D J working . .. >
N3 M06 (TOl TO SPJlNDLE)
N4 G90 GS4 GOO X •• Y.... Sit.. M03 T02 (T02 DVJ\"",,r\
(APPROACH N26 GOO Z •• Ma9 (TOl MAanNING OONE)
N5 843 Z.. HOI MOS
N27 Gl8 Z.. MOS (TOI TO Z HOME)
N2e GOO X •• Y •• (SAFE XY
< ... 10) working, .. > N29 MOl (OPTIONAL STOP)
N26 GOO Z •• M09 (TOl MAcmNING DONE) NJO T99 (T99 CALL REI)Rl\,TTi:l))
N27 G2B Z •• M05 (Tal TO Z HOME) N31 M06 (T99 TO SPINDLE)
N28 GOO X •• Y •• (SAFE XY POSITION) N32 TO) READY)
N29 MOl STOP) NJ3 MOO (STOP AND LOAD T02 MANUALLY)
NJO T02 (T02 CALL REPEATED) N34 G90 G54 GOO X .• Y.. S .• M03 (NO NEXT TOOL)
NJl M06 (T02 TO N3S G43 Z.. HO:;! MOS WORK)
N32 G90 G54 GOO X •• Y •. S •• M03 T03(T03 READY)
NJ3 G43 Z •• NO.2 M08 (APPROACH WORK) <, T02 >
<. ""7D2 working > N46 GOO Z.. M09 (T02 MAan:NING DONE)
N47 G28 Z •• MOS TO Z
N46 GOO Z •• Mag (T02 MACHINING OONE) N48 GOO X •• Y •• (SAFE XY POSITION)
N47 G28 Z •• MOS (T02 TO Z HOME) N49 MI9 (SPINDLE ORIENTATION)
N48 GOO X •• Y •• (SAFE XY POSITION) N50 MOO (STOP AND UNLOAD TOl MANOALLY)
N49 MOl (OP"l'I(JN.!!,L STOP)
N51 TO) (TO) CALL REPEATED)
NSO T03 (TOl CALL REPEATED) N52 M06 (T03 TO SPINDLE)
N5l M06 (T03 TO SPJlNDLE) N53 G90 GS4 GOO X .• Y •• S.. M03 TOl (TOI READY)
N52 G90 G54 GOO X.. Y •• S .. M03 T99 (T99 READY) N54 G43 Z.. H03 MOB (APPROACH WORK)
N53 G43 Z .. HO) MOS \.n.t:",t"J:\,.JJ:'i.....n WORK)
%
%
1 Chapter 14
Note the M19 function in block N49. miscella- • First Tool in the Spindle and an Oversize Tool
neous function will orient the spindle to exactly the same
Sometimes it is necessary to use a little larger
position as if the automatic tool changing were used.
tool than the machine specifications allow. In that case, the
The CNC operator can then replace the current tool with
oversize 1001 must return to same pocket in the tool
next tool and still maintain the tool position orientation.
it came from and two adjacent magazine
This consideration is mostly important for certain boring
must empty. Do not use a tool that is too heavy!
cycles, where the tool bit cutting has to be positioned In [he example 01407, the large tool is
away from the machined surface. a boring bar is used. it
is to Its cutting tip. 01407 (FIRST TOOL IN SPINDLE AT START)
N1. G20 (INar MODE)
• No Tool in the Spindle with Manual Change N2 G17 040 GBO T99 (GET '1'99 RE1IDY)
N3 G90 G54 GOO X .• Y •• S •• MU3
The following program is a variation on the previous ex- N4 G43 Z •. HOl MOB (APPROACH WORK)
ample, except that there is no tool in the spindle when the
program starts. < ... 7rJJ working . .. >
01406 (NO TOOL IN SPINDLE AT START)
N26 GOO Z •• M09 (TOl MACHINING DONE)
N1. G20 (INCH MODE)
N27 G28 Z .. MaS (TOl TO Z HOME)
N2 G17 G40 G80 TOl (GET TOl READY)
N28 GOO X •• Y •• (SAFE XY POSITION)
N3 M06 (TOl TO SPINDLE)
N29 MOl (OPTIONAL STOP)
N4 G90 G54 GOO X. _ Y.. S •• M03 T99 (T99 READY)
N5 G43 Z.o HOl Moa (APPROACH WORK)
N30 T99 (T99 CALL REPEATED)
001 MOG TO SPINDLE)
< ... 7rJl ... > N32 T02 ('1'02 READY)
N33 M06 (T02 TO SPINDLE)
N26 GOO Z •• M09 (TOl MACHINING DONE) N34 G90 G54 GOO X •• Y.. S •• M03 (NO NEXT TOOL)
N27 G28 Z •• M05 (Tal TO Z N3S 043 Z.. H02 M08 (APPROACH WORK)
N28 GOO X •• Y •• (SAFE XY POSITION)
N29 Mal (OPTIO:N1\L STOP) < ... 7rJ2 working .. . >
N30 T99 (T99 CALL REPEATED)
N46 GOO Z •• MU9 ('1'02 MACHINING OONE)
N3l MU6 (T99 TO SPINDLE)
N47 G28 Z •• M05 (T02 TO Z HOME)
N32 T03 (T03 READY)
N48 GOO X •• Y •. (SAFE XY POSITION)
N33 MOO (STOP AND LOAD T02 MANUALLY)
N49 Mal (OPTIO:N1\L STOP)
N34 G90 G54 GOO X •• Y •• S •• M03 (NO NEXT TOOL)
N35 G43 Z .• H02 MOB (APPROACH WORK)
N50 MOG (T02 OUT OF SPINDLE TO THE SAME POT)
N5l T03 (T03 READY)
< ... 7rJ2 worJdng ... > NS2 M06 (T03 TO SPIND1..E)
N53 G90 G54 GOO X •• Y •• S .. M03 Tal ('1'01 READY)
N46 GOO Z .• M09 (T02 MACHINING DONE) N54 G43 Z •• H03 MOB (APPROAOi WORK)
N47 G28 Z •• MOS (T02 TO Z HOME)
N48 GOO X •• Y •• (SAFE XY < .. . workiJlg .. . >
N49 MJ.9 (SPINDLE ORIENTATION)
NSO MOO (STOP AND UNLOAD '1'02 MANUALLY)
(T03 MACHINING DONE)
N66 GOO Z •• M09
N67 G2B Z •• MOS (T03 TO Z HOME)
NSl '1'03 ('1'03 CALL REPEATED)
N68 GOO X.. Y .• (SAFE XY POSITION)
NS2 M06 (T03 TO SPINDLE)
N69 MOl (OPTIONAL STOP)
N53 G90 GS4 GOO X .. Y •. S •• M03 T99(T99 READY)
N54 G43 Z •• HOJ MOS (APPROACH WORK)
mo M06 (TOl TO SPINDLE)
N7l lOa (END OF PROGRAM)
%
< ... 7rJ3 working . .. >
• No Tool in the Spindle and an Oversize Tool
N66 GOO Z •• M09 ('1'03 MACHINING DONE)
N67 G28 Z •. MaS (T03 TO Z HOME) This is another tool change version. It assumes no tool in
N68 GOO X •. Y •• (SAFE XY POSITION) the spindle at the program start. It also assumes the next
N69 M01 (OPTIONAL STOP) 1001 is target" than the maximum recommended diameter,
N70 M06 ('1'99 TO SPINDLE)
within reason. In this case, the oversize tool must return to
N71 M30 (END OF PROGRAM)
%
exactly the same pocket it came from. It is important that
the adjacent pocket.,;; are both empty.
TOOL FUNCTION 103
It is important to understand this function well. Think display of a typical Fanuc control, there
about the four digits as two pairs of ralher than four is a two screens, both very in appearance.
single digits. Leading zeros within omit- One is called the Geometry Offset screen, the other is called
ted. Each pair has its own meaning: lhe Wear Offset screen. Figure 14-9 and Figure 14-10 show
examples of both screens, with typical (Le., reasonable)
The first pair (the first and the second digits). control the sample entries.
index station and the geometry offset.
1001
~ Example:
~ Example.
T0101 for turret station , Example of the WEAR offset screen dispfay
geometry offset 01 and wear offset 01
• Geometry Offset
Q Example:
Geometry the same as the turret
T0111 for turret station 01, station number. operator measures and fills-in the ge-
geometry offset 01 and wear offset 11 ometry for all tools used in the program.
!
Geometry
offset X (0)
I
II
14·12 1/
I
1/ ;- PATH
I PROGRAM
Figure 14-14
/
Programmed tool path and tool path with wear offset
Tool tip
The wear offset only one purpose - il compen-
sates between the programmed value, for example of the
3.0 the as measured
The differential
register. This is
of the (001
Geometry
X (0)
figure 14-13
Typical geometry offset for center line (drilling) tools
1
• Wear Offset Adjustment The principle of the wear offset adjustment is logical. If
illustrate the concept offset adjustment on a rear the machined diameter IS larger then the drawing dimen-
lathe, T0404 in the program will be used as an exam- (he wear is changed the minus direc-
The is to achieve an outside diameter of 3.0 inches tion, towards the spindle center line, and versa. This
and tolerance ±.OOOS. starting value the wear off- principle applies equally to external and internal
set in the Txx04 will be zero. The relevant section The only practical difference is an external
{he program look something like this: diameter and internal diameter can be recut (see
the lable above). Chapter 34 presents several practical ex-
N31 MOl amples using the wear offset creatively,
m
o
o dimension
Q Undersize dimension
If the part is measured on is no need to inler-
fere. The tool setup and program are working correctly.
If the is oversize. it can usually be recut for machining
an outside diameter. an inside diameTer. the exact oppo-
will apply. recut may damage the finish,
which could a concern. If (he part is undersize, it be-
comes a The aim is to prevent all subsequenl parts
from being as well. The following table shows RADIUS
Inspection results all existing possibilities:
Let's go a little further. Whether the pan will be The rule of R T columns is (hat they are
or...JJJldersized, something has to be done to prevent this only effective in a tool nose radius offset mode. If no G4]
from happening again. The action to take is adjusting the or G42 is programmed, values in these columns are irrele-
wear offset value. Again, the emphasis is (hal this is an vant. If G411G42 command is used, non-zero values for
example of an outside diameter. that tool must be set in both columns, R column re-
quires the tool nose radius the cutting loot the T column
The diameter X3,0 in the example may result in the tool tip orientation number of the tool.
3,004 diameter That means il is 0.004 over- Both are described in Chapter 30, in more detail. most
size - on diameter. The operator, who is in charge of the off- common tool nose radii for turning and boring are:
set adjustments, will change the current 0.0000 value in the
X register of the wear 04 to -0,0040. The subsequent 1/64 of an inch =: .01 or 0,4 mm
cut should result in the part that will be measured within 1/32 of an inch == .0313 or 0,8 mm
3/64 of an inch == .0469 or 1,2 mm
specified tolerances.
If the part in the example is undersize, say at 2.9990 tool lip numbers are arbitrary and indicate the tool
inches. the wear offset must adjusted by +,0010 in the X orientation number used to calculate the nose
positive direction. The part is a of tool setting in the turret.
REFERENCE POINTS
environment maiep!~nOent of the other a Machine reference point .. Machine zero or Home
two. If the relationship right away, consider a Part reference point .. Program zero or Part zero
(he sources of each ,..n'Jlrrm
a Tool reference point .. Tool or Command point
a MACHINE TOOL is made by a company specializing in
machine tools, usually not or cutting tools In a typical language of a shop. these reference
have somewhat more meamng. Home posi-
... this ellvironment is combined with . .. or a machine zero are terms for machine
a CONTROL SYSTEM is made by a company specializing reference point. A program zero,
in the application of electronics to machine tools. are terms commonly used
do not normally manufacture machine tools reference point. And name tool tip or a tool com-
or cutting mand point are commonly used {he tool reference point.
o PART {workpu~cells a engineering design
developed in a company that does not manufacture REFERENCE POINT GROUPS
machine tools, control systems, or cutting and
holders. The
a CUTTING TOOLS are a specialty of tooling companies, for short.
which mayor may not make cutting tool holders. the control
These companies do not manufacture machine tools CNC machine tool H ......... ""'"
107
108 Chapter 15
Also note that in front there is a dashed idenli- This vital reference point will be used in a ....,."IT,.".."
as the gauge line. This is an imaginary for the the relationship with reference
proper fit of the holder tapered body and is set by the ence point of {he and the drawing dimensions.
machine The inside spindle is a
taper that tool holder with The part is commonly known as a pro-
Any (001 holder in the spindle will gram zero or a part zero. Because the coordinate point that
In the same position. Z motion illustrated will represents program zero can selected by the
shortened by the tool projection. subject of anywhere, it is not a fixed point, but ajloQling
tool referencing is later in this this point is more details can cov-
- after all, it is programmer who part zero.
• Return'to Machine Zero
• Program Selection
In manual mode, the operator physically moves the
axes to the machine zero position. The operator IS ng the program zero, often in the comfort of
to register inlo the control if office, a is that will
necessary. turn power to the while the the efficiency setup and its machining in
machine are at or very close to the machine zero po- the shop. Always allenlive (0 all are for
Silion. too close will make manual machine zero and against a zero selection in a
return more difficult later, power had re- zero point may be selected
A clearance 1.0 inch (25.0 mm) or more each not much of an advice, although true
IS
machine zero is usually sufficient. A typical pro- in terms. Within practical restrictions
to physically the machine zero position will the mach.ine operations, only the most advantageous possi-
follow these bilities should be considered. Three such considerations
1. Turn power on and control} should govern of program zero:
2. Select machine zero return mode
3, the first to move (usually Z axis) [) Accuracy of machining
4. Repeat for the all axes o Convenience of setup and operation
5. Check the in-position indicators
6. Check the position screen display o Safety of working conditions
7, display to zero, if necessary
Machitli"q Accuracy
safety reasons, the selected axis should
machining centers and the X Machining accuracy is paramount all parts must be ma-
In bolh cases, either axis will be moving away work, exactly to the same specifications.
into the clear area. When the axis has reached machine zero is also important repeatability. All the
position, a small indicator light on control panel turns in the balch must the same and all subsequent jobs
on to confirm that axis actually machine zero. must be the same as well.
The machine is now at its reference position, at the machine
Convenience of Setup Bnd Dperation
zero, or at the machine point, or at home-
ever term is used in the The indicator light is con- Operating setup can only be considered
firmation for each the machine is ready for once (he machining accuracy is assured. Working
use, a good will go one step further. On the posi- desire. An experienced CNC nrl".O'r~imrnl"r
lion display screen, Ule actual position should be think of the has in
set to roreach axis, as a standard practice, ifil Defining program zero that difficult to set on the
is not to zero automatically by control. The but- machine or difficult to check is not convenient. It
control panel the position screen slows down the setup process even
• Program Zero - Machining Centers part are both parallello machine axes and perpendicular
CNC machining centers allow a variety of meth- zero (part
IJvr\<Tr"' ...... is at (he intersection
ods. Depending on the type of work, some most common two edges.
setup methods usc vises, chucks, subplates hundreds of The concepl is common for virtually all setups,
special fixtures. In addition. CNC milling systems allow a actual If a part is mounted in a
setup, increasing available options. In vise jaws must be parallel to or
to select a program zero, all machine axes must perpendicular with machine axes the fi;ced location
considered. Machining centers with additional axes re- must be established with a stopper or other fixed
quire zero point each of these axes as well, for
the or rotary axes. Since a machine most common work holding
device parts, use it as a practical example of
What are the most common setup methods? Most ma- how to program zero. Figure 15-5 illustrates a lypical
chining is done clamped on table, in a simple engineering drawing, with all the expected dimen-
or a fixture mounted on Ihe table. These basic methods can descriptions material
be adapted to more complex applications.
4.0
make sure all critical dimensions and tolerances are 1020 x 0.5
from one part to another. dimensions
are usually not critical. Figure 15·5
Sample used lor selecting program zero """::,,.... nltJ
simplest on a machine table involves
the part, some clamps and surfaces. When selecting a zero, study the
ing surfaces must be fixed during run and The designer's dimensioning style
measured from. The most typical setup of this kind is flaws, but it still is the engineering drawing. In the example,
on pin Two pins form a single row dimensioning alJ holes is the lower left corner of
the third pin is offset away at a right creating a the work. the program zero of the part itself?
setup corner as two locating surfaces - Figure 15-4.
For this example, should be no question about pro-
gramming the point except at
lower left corner the part. the drawing origin and
it will become the part origin as well. It also satisfies Step 1
MACHI PART of the program zero selection The 2, dealing
with work holding device is next. A typical setup
CNC machine vise could be the one iIlust.rated
15-6.
o 0
ing. Also, the part reference edge wiU be against the fix.ed
jaw! What is the solution? Rotate the vise 900 and position
the part as shown - Figure 15-8) if possible.
MOVING JAW
y
l ~
I ~ <:
<: -:I
--x -:I
0
(!)
Z
Figure 15-6
LU
X
0 >
A sample part mounted in a machine vise· Version 1 u.. 0
0 0 ::E
Combine any acceptable tolerance with the vise design, ,'"
y
where one jaw is a fixed jaw and the other one is a moving i
jaw, and the problem can be seen easily. The critical Yaxis !
reference is against a moving jawl --x
The program zero edge should be the fixed jaw - a jaw Figure 15-8
that does not move. Many programmers incorrectly use a A sample part mounted in a machine vise - Version 3
moving jaw as the reference edge. The benefit of program-
ming in the first quadrant (al! absolute values are positive) To select a program zero for the Z axis. the common prac-
is attractive, but can produce inaccurate machining results, tice is to select the top face of the finished part. That will
unless the blank material is 100% percent identical for all make the Z axis positive above the face and negative below
parts (usually not a normal case). VersiOIl 1 setup can be the face. Another method is to select the bottom face of the
improved significantly by rotating the part 1800 and align- part, where it IS located in the fixture.
ing the part stopper to the opposite side - Figure J5-7.
Special fixtures can also be used for a part setup. In order
to hold a complex part. a fixture can be custom made. In
many applications of special fixtures, the program zero po-
FIXED JAW sition may be built into the fixture, away from the part.
On eNC lathes, the program zero for the X axis What are the zero at the front
MUST be on the center rine of the spindle One is that many dimensions along Z axis
can be directly into program, normally with
z three popular methods are used: value. A depends on the
of cases, the CNC programmer
o Chuck .. , main face of the chuck
probably the most important, is a
o , ., locating face of the jaws a tool motion indicates the work area, a
o is in the clear area. During program devel·
, ., front of the finished part
opment It IS to forget a minus sign for the Z cut-
an error, ifnotcaught in time, will posi-
tool away from part, with the tails tack as a possible
Stock X
,_[tp
__l / J obstacle. It is a wrong position, but a better one than hilling
pari. Examples in this handbook use program zero at
'. _. - - - -...1 ---
thefrontfinishedface, unless otherwise specified.
, .
-- -- ---
CHUCK
TOOL REFERENCE POINT
Stock x referenc~ point is related to the lOol. In milling
• operations, the reference point of tool is
the intersection of the tool centerline the
culting lip (edge).
~
---
!
- - • - < _.' )",,~ ~ -
For tools such as drills and other point-to-point tools
in milling or lurning. the reference point is
- - - -~ -
Ireme tip the tool, as measured along Z
P,ART 15-1 J shows some common tool tip points.
a chuck
with the
On a nega-
additional
drawing
113
114 Chapter 16
MACHI
Figure 76-3
machine zero fDr the Z axis
8 different setting)
116
Commands G50 and are identical, except that they • Three-Tool Setup Groups
belong to two different G groups. Fanuc actually of-
On a typical slant bed CNC lathe, equipped with a
fers three G code for lathe controls. Based on his-
Iygonal turret (6 to 14 stations), all cutting
tory,typical Japanese made controls use GSO, whereby typ-
individual stations of the turret. During tool
ical US made controls G92. A cooperative US and
the tool is in the active station.
Japanese venture known as Fonuc (General Electric
the used for CNC lathe
and Fonuc) produces controls that are the most common in three groups
North American' the G50 command. normally do:
for lathe applications is o Tools lAtn'''''tn on the part center line
very similar to that for the mills. However, due to
design of CNC lathes, where all tools are mounted in Q Tools working externally on the part
turret, the projection from the Q Tools working internally on the part
turret holder must possible in-
terference must be mounted inaclive for each group is understood well,
tools move one that is used for it to any tool within a group,
cutting. In all are safely out of tools used.
placed in a tool magazine. Several new designs of
lathes are available, where tool on the lathe • Center line Tools Setup
resembles the milling type.
as center line tools are typically
• Tool Setup standard twist drills, car-
reamers, and so on. Even an end mill can
The most important lathe center line. All tools in this group
work relates to the op- have a common denominator, whereby the tool tip is
tions to select from, some are .....,..,C"" .. " always on spindle cenler line, while they cut
These must be setup exactly at 900 to the work
Probably the most face (parallel to
to have the tool change
to the machine zero position. POSI- The position value in the X axis is from the spin-
to move the turret 10, just control panel dle center line to the center line of the tool. For the Z
The position registcr to machine zcro axis, the position value is measured from program
have one major disadvantage it /00 far for zero Lo the tool Iy, the center line tools will have
most jobs, particularly on larger lathes the Z axis. a fairly large that means their GSO value
imagine a tool motion ono inches or more the Z the Z axis wm small, when compared to
only to index the turret and than (he same 30 inch mo- external tools, which generally do not project too much.
buck to continue the cutting cycle. It is not efficient at
is a solution, however. Figure 16-4 a for center line tools.
using an indexable drill as an
Much more efficient method is to select tool indexing
position as close lO the part as possible. position
should always be based on the longest tool mounted in the TOOL
turret (usually internal tools), whether the tool is in the
or not. If there is enough clearance the IV"!:;'-""
will also be enough clearance
of two
position at the X
not too distant) and JUS!
register value is
zero to tool tip of the
this chapter). In case of tools
tool, G50 amuunl is usually
the insert, for safety reasons,
16-5 illustrates a typical position for
tool (turning tool shown in example).
Figure 16·6
AT
TOOL CHANGE POSITION Typical G50 for internal lathe tools
Figure 16-7
Position setting G50 for common tool tip orientations - the heavy dot indicates XZ coordinates set by GSO X. Z. for the tool above
are also many that are not known at all known di-
mensions are subject to variations Without Like IJV~"LJ\.)" compensation is
facility available to (he it will that requires mput the CNC ma-
almost impossible to setup precisely and ef- specifies the
D .. An ..."' ..... ,.,,.," ..
ficiently. Fortunately, modem controls offer many features number, the operator enters
to both programming and machine an easier, machine, using appropriate
and more precise activity. A coordinate screens, setup.
offsets and compensations are typical support
in programming for • Programming Commands
One of the oldest programming l""".IJlIl ..... U~~;) available in and similar controls. there are four preparatory
is called a position As the available to program position com-
name suggests, using position functions, the
actual tool position is compensated to its Iheoreli-
or assumed position, increase in the programmed direction
compensation amount
It is only one of several methods available to
the programmer and machine On modern CNC decrease in the 1pro,gn,lmrne(
systems, this method is still compatibility with pensation amount
older programs. Today, this technique is not really needed. Double increase in the Iprogr~lmrne(
It been replaced by the much more flexible Work Off- G47 by double the compensation amount
sets (Work Coordin.ate Syslem), in the next chap-
ter handbook. The current chapter'describes some Double decrease in the programmed direclio1n I
G48 by double the compensation amount
typical programming can benefit from us-
ing the old-fashioned method.
definilions are based on
'- DESCRIPTION stored in the control
meaning of all
The maIn purpose compensation is to correct are inverted. None of
any difference between machine zero and program zero is and are
1001 positions. In it is in those cases, where which they appear. If required in
the distance between the two reference points is subject to \;;~";Lll\;;,U in any subsequent block, if
vanations or is not known at all. For example, when work-
ing with castings, the zero taken from the cast sur- • Programming Format
face will be subject to change. Using position
Each G code (G45 to G48) is with a unique
compensation will the need to make constant
position compensation number, programmed with the ad-
program of the fixture setup.
H. The H address points to the memory area storage
mally, the part in a fixture on the table
of the control system. On most Fanuc control sys-
whole setup is this reason, the position
tems. the programmed leuercan be D, with exactly the
compensation is called fixture offset or
same meaning. Whether the H or D is used in the
offset. The an offset and a cornlJ(!ns:a-
program, depends on the of a control system
lion is often and for any practical purposes,
parameter.
(Wo terms are sami!.
120
G91 GOO G45 x .. H31 (illl STORES THE X VALUE) This example illustrates a motion from machine zero (the
G45 Y •. H32 (H32 STORES THE Y VALUE) current tool position), to program zero, which is the target
position, along XY axes, Note the absolute mode setting
or 090 in block N4. Assume that the control system is set (0
H31 =-12.0000 inches. The control will evaluate the block
G91 GOO·G45 X .• D31 (D31 STORES THE X VALUE) and interpret it as programmer's intention to go to the abso-
G45 Y •• D32 (D32 STORES THE Y VALOE) lute zero, specified by G90. It checks the current position,
finds it is at the absolute zero already and does nothing.
For the record, the H address is also used with another There will be no motion, regardless of the compensation
type of compensation, known as the tool length offser (or value setting, if the absolute motion is programmed to eI-
tool length compensation), described in Chapter 19. The D ther XO or YO target position. If the G90 is changed to 091,
address is also used with another type of compensation, from absolute to incremental mode, there will be a motion
known as the cutter radius offset (or cutter radius compen- along the negative direction of X axis, by the distance of
sation). described in Chapter 30. exactly 12 inches and there will be a similar motion along
The applicable preparatory G code will determine how Y axis, in block N5. The conclusion? Use position compen-
the address H or address D will be interpreted. In the exam- sation commands in the incremental mode G9 J only.
ples. more common address H will be used - Figure 17-J.
• Motion length Calculation
MACHINE Let's look a little closer at how the control system inter-
TABLE 1
'-....
11111--_ _ H31--- ZERO prets a position compensation block. Interpreting the way
how the control unit manipulates numbers is important for
T
understanding how a particular offset or compensation
works. Earlier definition has stated that a single increase is
programmed with G45 command and a single decrease
H32 with 046 command. Both G47 and G48 commands are of
no consequence at the moment. Since both commands are
J"'"
.\ _. _ _ ~ _ J
\ PART
tied up with a particular axis and with a unique H address,
all possible combinations available must be evaluated:
o Either an increase or a decrease is programmed
(G45 or G46)
PROGRAM ZERO o Axis target can have a lero value, or a positive value,
or a negative value
figure 17- 7 o Compensation amount may have a lero value,
Position compensation - general concept or a positive value, or a negative value
POSITION COMPENSATION 121
will be interpreted as
Figure 1 shows for the following
-15.0 + 0 = -15.0000 example 701, The applies to the X and Y axes ex-
actly (he same way. In written in metric units and has
resulting the Iota I motion of negative \5.0 inches along tested on [ I M, the H address would
the X axis. the same way). The compensation values
and H99 were set to:
value of axis target is a non-zero and
the same formula H98
H99 = -150.000
G91 GOO G45 Xl.S H31
the X and Y axes respectively. The modal
will interpreted as were not repealed
control syslem will each motion block method is described in Chapter 19 of the handbook. If the
the way it was or the wrong way Z axis is programmed with G45 or G46 commands, i( will
(symbol orr means an condition, preceded WiLh also be affected.
the and direction of
• Using G41 and G48
N3 G90 -> G45 -> 0 no motion
N4 G90 -> G46 -> 0 no motion In the examples, compensation feature was used
N6 Gn -> G45 -> 0 X-2S0.0 only between the zero and program zero, as a
N7 G9l -> G46 -> 0 Y+ OIT method exactly is the part on
the table. The single mClrea~;e using G45 and the
N9 G90 -> G45 -> + X-241.0 crease using G46 were used, because
NlO G90 -> G46 -> + Y+ OjT
the only commands npPflP{"I
N12 G91 -> G4S -> + X-241. 0
Nl3 G9l -> G46 -> + Y+ Commands G47 (double increase) and G48 (double de~
crease) are only for a very simplified cutter ra-
Nl5 G90 -> G4.5 -> X+
Nl6 G90 Y-163.0 dius olfsel and are not covered in this handbook of
-> G46 ->
N1e G9l -> G45 -> X+ OjT their obsOlescence. However, they can still used.
Nl9 G91 -> G46 -> Y-163.0
• Face
• Position Compensation Along the Z axis In a later (Chapter 28), mill-
i ng wi II be explained in more detail. In thai chapter is a very
Position compensalion usually appl to the
X Y axes and will nol normally be used with the good example of how to apply position to
In most cases, the Z to be controlled by another offset the face mill in a regard-
of compensation known as the too/length This less of its This is probably the only use of
G45 and 046 commands in contemporary programming.
WORK OFFSETS
12
124 Chapter 18
The distance from machine zero to program zero of each Part position on the machine table is usually unknown
work area is measured separately along the X and Y axes during the programming process. The main purpose of
and input into the appropriate work offset register of the work offset is to synchronize the actual position of the part
control unit. Note that the measurement direction is from as it relates to the machine zero position.
machine zero to program zero, never the other way around.
If the direction is negative, the minus sign must be entered • Additional Work Offsets
in the offset screen.
The standard number of six work coordinate offsets is
For comparison with the position register command G92, usually enough for most types of work. However. there are
Figure J 8-2 shows the same part set with t.he older method jobs that may require machining with more program refer-
of G92 {lnd m{lchine zem a<; a ~tart point. Note the opposite ence points, for example, a multi-~irlerl part on a horizonttll
arrows designation. indicating (he direction of measure- machining table. What options do exist, if the job requires
ment - from program zero to machine zero. ten work coordinate systems, for example?
Fanuc offers - as an option - up to 48 additional work off-
;---- G92 [ X ) ~ MACHINE sets, for the total of 54 (6+48). If this option is available on
ZERO
the CNC system, anyone of the 48 work offsets can be ac-
cessed by programming a special G code:
t GS4.1 P..
Selection of additional work offset,
>- where P = I 1048
N
0)
o (!) Q G54.1 P.. example:
PART l G54.1 Pl
G54.1 P2
Selection of additional work offset 1
Selection of additional work offset 2
PROGRAM\ GS4.1 P3 Selection of additional work cffset 3
ZERO \. G54 1 Px.. Selection of additional work offset x..
G54.1 P48 Selection of additional work offset 48
AXES MOTION UMITS
Figure 18-2
The utilization of additional work offsets in the program
is exactly the same as that of the standard commands:
Basic relationships of the Position Register cDmmand G92
N2 G90 GOO GS4.i Pi XS.S Y3.1 SlOOO M03
For work offsets G54 to G59, a typical entry into the co-
ordinate offset position register will be the X axis as a nega- Most Fanuc controls will allow omission of the decimal
tive value. the Y axis as a negative value and the Z axis as a ponion of the G54.1 command. There should be no prob-
zero value, for the majority of vertical machining centers. lem programming:
This is done by the CNC operator at the machine. Figure
18-3 shows an example of a typical control system entry. N2 G90 GOO G54 Pl X5.S Y3.1 S1000 M03
In the program, the work offset may be established in two x= -12.5543 + 5.5 = -7.0543
ways - either as a separate block, with no additional infor- Y = -7.4462 + 3.1 = -4.3462
mation, as in this example:
These calculations are absolutely unnecessary in every-
N1 G54 day programming - they are only useful to the thorough un-
derstanding of how the control unit interprets given data.
The work offset can also be programmed as part of a
startup block, usually at the head of program or at the be- The whole calculation is so consistent, il can be assigned
into a simple fonnula. For simplicity, the seuings of the
ginning of each tool:
EXT (external or common) offset are not included in the
N1 G17 G40 GBO G54 formula. but are explained separately. later in the chapter:
For example, if there are three parts mounted on the table, Nt G56 XS.5 Y3.1 (SWITCH TO GS6)
each individual part will have its own program zero posi- NB GBO ZI.0 M09
lion associated with one work offset G code. N9 G9I G54 G2a ZO MOS (SWITCH TO GS4)
NlO MOl
r--- G56 X
,... G55X Blocks N3 through N5 relate to the tirst part, within the
G54X - G54 work offset. The block N6 will spot drill the hole of
the second part of the same setup, within the G55 work off-
set and the block N7 will spot drill the hole of the third part
of the same setup, within the G56 work offset. Note the re-
turn to the G54 work offset in block N9. Return to the de-
fault coordinate system is not required - it is only a sug-
gested good practice when the tool operation is completed,
The work offset selection is modal - take care of the transi-
I
tions between tools from one work offset to another.
i Bringing back the default offset G54 may always be helpful
at the end of each tool.
If all these blocks are in the same program, the control
unit will automatically determine the difference between
Figure 18-5
the current too! position and the same tool position within
Using multiple work offsets in one setup and one program. the next work offset. This is the greatest advantage of using
Three parts shown in the example,
work offsets - an advantage over the position compensation
and the position register alternatives. All mounted parts
Compare all possibJe motions in Figure 18-5:
may be identical or different from each other, as long as
(hey are in the same positions for the whole setup.
G90 GOO G54 xO YO
... will rapid from the current tool position, to the pro- • Z Axis Application
gram zero position of theftrst part. So far, there was a conspicuous absence of the Z axis
from aU discussions relating to the work offset. That was no
G90 GOO GSS XO YO
accident - it was intentional. Although any selected work
... will rapid from the current tool position. to the pro- offset can apply to the Z axis as well, and with exactly the
gram zero position of the second part. same logic as for X and Y axes, there is a better way of con-
trolling the Z axis, The method used for Z axis is in the
G90 GOO GS6 XO YO form of G43 and GM commands that relate speci fically to
the too/length compensation, more commonly known as
... will rapid from the current tool position, to the pro- the tool length offset. This important subject is discussed
gram zero position of the third part. separately in the next chapler. In the majority of program-
ming applications, the work offset is used only within the
Of course, the target position does not have to be part zero Xy plane. This is a typicaJ control system selling and may
(program zero) as shown in the exampJe - nOr1liaJly, the tool be represented by the following setup example of the stored
will be moved to the first cutting position right away, to values within the control register:
save the cycle time. The following program exampJe will
illustrate that concept. (G54) X-S.76l Y-7.819 ZO
(GSS) X-1S.387 Y-14.122 zo
In the example, a single hole will be spot drilled on each (GS6) X-22.733 Y-8.3S2 zo
of the three parts to the calculated depth of Z-0.14 (pro- (GS7)
gram 01801). Study the simplicity of transition from one
work offset to another - there are no cancellations - just a The ZO offset entry is very important in the examples and
new G code, new work offset. The control will do the rest in the machine control. The specified ZO means that the co-
ordinate setting for the Z amount (representing the height
OlSOl of the part) does not change from one part to another, even
Nl G20 if the XY setting does.
N2 G17 G40 GSO
N3 G90 GS4 GOO XS.5 Y3.1 S1000 M03 (G54 USED) The only time there is a need to consider Z axis within the
N4 G43 ZO.l HOl ~8 work offset setting is in those cases, where the height of
NS G99 GB2 RO.l Z-O.14 P100 FB.O each part in the setup is different. So far, only the X Y posi~
N6 G55 X5. 5 Y3. 1 (SWITCH TO GSS) tions were considered, as they had been the ones changing.
WORK OFFSETS 127
If the 2 amouot changes as well, that change must be con~_ HORIZONTAL MACHINE APPLICATION
sidered by modifying the coordinate register selling of the
control. This is the responsibility of the CNC operator, but
the programmer can learn an important lesson as well. Machining several parts in a single setup is done quite
frequently on CNC vertical machining centers. The multi-
ple work offset concept is especially useful for CNC hori-
zontal machi ning centers or boring mills, where many part
faces may have to be machined during a single setup.
Machining two, three, four, or more faces of the part on a
CNC horizontal machining center is a typical everyday
work in many companies. For this purpose, the work offset
selection is a welcome tool. For example, the program zero
at the pivot point of the indexing table can be set for the X
and Y axes. Program selling of the Z axis may be in the
~:!'~-:-Dr;c
,...----, - r
-- same position (the pivot point of the indexing table) or it
can be on the face of each indexed position - either choice is
acceptable. The work offset handles this application very
nicely, up to six faces with a standard range of the G codes.
G56 , G54
" _ _ M. ........ .. ................. "" . . . . .,
~~8~,g
(056) X-22.733 Y-S.3S2 ZO.356
The important thing to know about the control of the Z -...j i I t:O
axis within the selected work offset is that It works in very 0,
- A
close conjunction with the tool length offset, discussed in 1""._ _-""-,""""--,-""-,""""""
the next chapler (Chapter 19). Stored amount of the Z axis 80
setting within a work offset will be applied to the actual tool
motion and used to adjust this malian, according (0 the set-
ting of the tool length offset. An example may help.
For instance, if the tool length offset of a particular cut-
ting tool is measured as 2-10.0, the actual motion of such a
tool to the program zero along Z axis will be -10.0 Inches
within the 054 work offset, -10.408 within the G55 work Figure 18-7
offset. and -9.644 within the 056 offset - all using the ex-
Example of work offsets applied fo a horizontal machining center
amples in the previous illustration, shown in Figure J8-6.
128 Chapter 18
TOOL
a boring (internal) tool.
RO.0156 RO.0313
b J
I
Figure 18·14
Setting error caused by a different insert radius in the same holder
Figure 18·13
Typica/g8ometry offset setting for INTERNAL tools
TOOL LENGTH OFFSET
far. we have looked at two methods of compensation out, the rest is hidden in the holder. tool holder is
for the actual position of the cutting tool in relation to the mounted in by means of a standardized tooling
machine reference point. One method was the type, Tool designations. such as the common sizes
position compensation, the other was the contempo- HSK63, HSKlOO, BT40 and are examples of es-
rary work coordinate system method (work offset). In both tablished European Any tool
cases, the emphasis was only on the X and Y axes, not on within its category will fit any machine tool de-
the Z axis. Although the Z axis could have been included signed for that category. This isjust one more precision fea-
with method, would not have been very ture built inlo the CNC machine.
practical. main reason is the nature of CNC work.
length of a tool for the purposes CNC program-
decides on setup of a part in ming must always be associated wilh the tool holder and in
the fixture appropriate location of XYZ relation to machine design. For that purpose, manufac-
program z.ero (part reference point or part zero). When turers build a precision reference position into the spindle,
usIng work offsets, XY axes are always measured from the called the gauge line.
machine reference point to the zero position. By a
strict definition, the same rule applies (0 the Z The • Gauge Une
major is that the measured values will re-
main unchanged for all tools, whether there is one tool used When the 1001 holder with the cutting lool is mounted in
or one hundred tools. That is not the case with the Z the spindle of a CNC machine, own taper is mounted
against an opposite taper in the spindle and held in tightly
The reason? tool has a different length. by a pullbar. The precision manufacturing allows for a
constant location of the tool holder (any tool holder) in
GENERAL PRINCIPLES spindle. position is used for reference and is com-
called the gauge line. the name it is an
line for
The length of cutting tool has to be accounted for in Figure 19-1.
every program for a CNC machinIng center. Since (he
earliest applications of numerical control, various tech~
niques of programming tool length have They
GAUGE LINE
belong into one of two basic groups:
AT MACHINE w
()
o Actual tool length is known «
I.L
a Actual tool length is unknown
Needless to say, each group requires its own unique pro-
gramming technique. To understand concept of tool
t W
.J
.
SPINDLE co
length in CNC programming, it is important to understand MOTION «
I-;-
meaning of the phrase actual length. This length is I
131.
132 Chapter 19
a The value of the H offset will be added \0 the target Z position G43 z-O. 625 H07 .....
if G43 is used, because G43 is defined as the positive tool
length offset 054 along Z is set to 0.0500, Z axis target is -0.625
o The value of the Hoffset will subtracted from the target the H07 is -8.28. The distance-to-go calculation uses the
Z position if G44 is used, G44 is defined as the same fonnula. but with values:
negative tool length offset
Za == (+0.05) + (-0. + (-8.28)
target position in cases is the absolute Z = 0 . 05 - O. 625 - 8 ~ 28
COOirQulate in the prognun. Z setting of the == -8.855
(G54-G59), the H value, the Z axis target are all
,_ ....- distance-to-go. can accurately calculated. Again., the fonnula works and can be used
control system will use any distance-to-go calculation along the Z axis. '"'yr.....n_
• Off-Machine Tool length Setting The figure a common setup a CNC vertical
In technical terms~ the off-machine requires the machining center, looking from the front of the machine, a
work of a skilled tool setter or a CNC operator. Since the typical operator's viewpoint. column is located
seltln o is done away from the machine, a special equipment a1 machine zero position. This limit switch
is req~ired, adding to overall cost of manufacturing. tion positive Z axis travel and is necessary for the auto-
This equipment can a simple fixture with a height gage tool change on vil1ually all machining centers. All
(even made or a more expensive, commercially four illustrated dimensions are either known, can found
available digital display device. in various instruction or service manuals, or can be physi-
cally They are always considered as known
• Tool Length Offset Value Register or dimensions and used as critical
for uceurate machine
Whichever method the tool length setting is used, it Q Distance between the tool gauge line and
U\JI., ....... '" a value that represents the length the the tool cutting point
selected lOol. This value is by and must be
somehow supplied to the program, before the job is ma- ... dimension A in the illustration
chined. The must register meusured value into
the system, the heading on the control panel. Q Distance between the tool cutting point and the ZO
(program zero of the part)
The control syslem contains a special registry for the tool
usually under of tool set- '" dimension B in the illustration
length o.{fset, toollenglh compensation off Q of the part (distance between
of the exact heading, the sellmg procedure the table and ZO of part)
measured length is entered into Ihe con-
trol, so it can by the program. The ... dimension C in fhe iJlustration
is always well within Z aXIs travel limits of the ma-
Q Total of all three previous dimensions
chine. yet still allows for clearances for the part (distance between the tool gauge line and the table top}
and the tool Chan2,f:S.
To the tool length offset, try to fully ... dimension Din the illustration
stand theZ motion geometry orthe machine It is rather rare that the programmer or the operator would
first. On vertical and horizontal machining centers, look at always know all four dimensions. Even If that were possi-
1he XZ plane, which is the top part for both. The ble, some calculations would not be worthwhile The
pies are identical, but will be on the reality is that only some dimensions are known or can be
chining center layout. found out relatively easily.
benefits. The CNC programmer con- the tool length measurement "" ..",,..,,,,,0"
and chooses one method over cutting tip of the Lool to the gauge line is accu-
these methods and operations do not determined - Figure 19-4. Preset tools will the
process directly - they are meth- already mounted in a tool holder, by
setup on the machine only. For proper un- number of the tool and with the list of measured
subject CNC programmers, they DIe tool lengths. All the CNC operator to do, is to set re-
of which setting method tools into the magazine and register each tool length
t",...,,,,v,,,, to the selected setting in the offset register, using the proper offset number.
a comment or message .
GAUGE
UNE- -
Figure 19·5
Touch-off method of the too/length offset
T___- - -, PART
is to
machine zero po-
This distance
corresponding H
menu of the
19-4 system, The important notion is that the Z axis
Tool len pleset away from the machine
settings for any work offset and the common off-
WOlk at (G54-G59) must be used set are normally set to ZO.oooo.
• Using a Master Tool length
Using the touch-off method to measure tool length can be
significantly speeded up by using a special method a
I1Ulster tool, usually the longest tool. This tool can a real
or just a long bar with a tip, permanently
mounted in a tool holder. Within the Z travel, this new
'(001' usually extend out more anticipated
too) that be used.
and the work nor-
contain theZ set to 0.0, when the part touch-off
is used. This setting will change for master tool
length The master tool length measurement is very
efficient requires the following setup It
vides suggested steps may need some modification: Figure 19-8
the master tool
the master tool and place it in the spindle. with setting of
2. lero the l axis and make sure the read-out on the
relative screen is lO.OOO or lO.OOOO. The greatest benefit of this seuing method is shortened
setup If certain tools are for of jobs, only
3. Measure the tool length the master tool, using the the length of the master tool needs to be redefined for any
touch-off method described previously. After touching new pan height while all other tools unchanged.
the measured the tool in that position!
They are related to the master tool
4. Instead of registering the measured value to the tool
length offset number, register it into the common work • 643-G44 Difference
offset or one of the G54-G59 work offsets under the
1 setting! It will be 8 negative value, Initial a.t the beginning of chapter indi-
5. While the master is touching the measured face, cates that Fanuc and similar CNC systems offer two
set the relative l read-out to zero! commands that activate the tool offset.
two are and G44. Most programmers use
'6, Measure every other tool, using the touch-off method. G43 command exclusively in the program and may
The will be from master tool tip, not from have some I.Hlliculty to interpret the meaning of G44 com-
machine zero.
mand, they have never used it. is a good rea-
7. Enter the measured under the H number, son why G44 IS a dormant command - not quite dead but
in the tool length offset screen. It will always be barely breathing. would to know how -
a negative value for any tool shorter than the master tool. and when - or even to use one over the other. is an
e Note: attempt at explanation.
First, a look at the definitions found in various CNC
reference books and manufacturers' specifications
In different versions of these publications, the following
typical are - all are quoted literally and all
are correct:
Choosing tool as master tool, the procedure is
logically same, except (he H offset entries will be positive G43 Plus offset
for any tool that is than the master and they will G44 Minus offset
neRative any tool is shorter master. In
rare case where the measured tool will have exactly the G43 Tool length offset
same length as master too), offset entry for that tool G44 Tool offset ~:I""_"""
will be zero. Illustration in 19-6 shows the concept
of master tool setting. G43 Plus direction
G44 Minus direction
Arter master tool into
axis of work offset, enter distance the tool These definitions are correct only if within the con-
new tool to the tool tip of the master tool, and text their meaning into consideration, That context is not
in appropriate H offset If the tool is an clear from of these Plus to where?
actual tool, rather a plain used for H off- of what? (he context, think about use of
set value must be always set to 0.0. the toollenglh on a CNC machine. What is the pur-
pose of the tool length
LENGTH 1
main and most important purpose of any tool length exactly the same
is to allow a CNC program to be away not the
from the machine, away from tooling and fix\uring, and ming method). Program will tool length
without knowing the cutting tool length pro- command (043 or 044), followed by the target position
development. along the Z axis and the H number:
process has two - one is in the
043 Z1.0 H06 or 044 Zl.O H06
at the machine. program, either
or 044 command is together with The system cannot any benefits, until
number - that lS done the programmer. Al measured value for H06 is the offset registers.
tool length offset can be set on or off the if the H06 has been as 7.6385, it will
ther way. the tool is measured and as a negative value, is used, and as a positive
is entered into control - that is the job the opera- value, ifG44 is used (1001 motions will be identical):
lor. It is the machine that has a number of
variations - of only two G
G43 Zl.O H06 .....• H06 = 7.6385
G44 Zl.O H06 ...... H06 +7.6385
actual Z axis is
culated. USing G43, the H value will be added (+) in
the calculation. Using 044, the H offset value will
"'/U"bn (-).The a~avel motion will be:
(oollenglh machine
(touch-off) will result in with negative The
selup process can automatically input all
Figure 19-7
the offset as negative. That is reason why
Less common method of the tool length offset
Work offset (typically must be set as well. 043 is the standard command to program tool length off-
set. G44 is just flOt practical for everyday work.
Figure 19-7 illustrates one of two ITlF'.r"v" to sel a
length command - 054 or other work must be used. PROGRAMMING fORMATS
Y2.8 Y2.8
GAUGE GAUGE
LINE LINE
Figure 19·9
Setting too/length without too/length offset· program 01901 Setting tool length with G43 tZl and G92 (XYj • mnr''''ITn
This early program reqUIred the position compensation In an improved program. the tool IS
command G45 or in XY axes and the position register plied 10 Ihe firs! mOl ion command of
command G92 in XYZ axes. Each must start at ma-
chine zero - Figure 19-9: 01902
Nl G20 (INCH MODE SE:'.LECTED)
01901 N2 G92 XO YO ZO (MACHINE ZERO POSITION)
m G20 (meR MODE SEL.ECI'ED) N3 G90 GOO G45 JO.4 101 (x POSITION COMP)
N2 G92 XO YO ZO (MAonNE ZERO POSITION) N4 G45 Y2.8 832 (Y POSITION COMP)
N3 a90 GOO G4S Xl.4 H31 (X POSITION COMP) N5 G92 X3. 4 Y2. 8 (TOOL POSITION R.:IOOIIS~rER
N4 G45 Y2. B H32 (Y POSITION COMP) N6 G43 Zl.0 HOI LENGTH COMP Z)
N5 a92 X3. 4 Y2. 8 (TOOL pas REGISTER N7 S850 MO) CClMMANDS)
No G92 Z9. 0 (TOOL POS REGISTER Z) N8 GOI ZO.l F1S.0 MOS (Z APPROACH MOTION)
N7 S850 MOl (SPINDLE COMMANDS) N9 Z-O.89 F7.0 (Z CUTTING MOTION)
N8 GOl ZO.l F1S.0 M08 (Z APPROACH MOTION) NlO GOO ZO.l M09 RAPID RETRACT)
N9 Z-O.89 F7.0 (Z CUTTING MOTION) Nll G28 X3. 4 Y2. 8 Zl.O (MAC.HJliIB ZERO R.E'I'lJlm)
mo GOO ZO.l M09 RAPID "-"' .• ......,.'" N12 G49 DOO HOO (OFFSETS CANCELLATI~
Nll Z9. 0 (Ml\.CHDl'E ZIi:RO RBTORN z) Nl3 M3 0 (END OF PROGRAM)
Nl2 X-.2 • 0 Yl0. 0 POSITION %
N13 M30 (END OF PROGRAM)
% When a program is developed using blocks N6 and
N7 can be joined together for convenience. if
• T001 length Offset and G92
N6 G43 Zl.0 S850 MOl HOI
When the tool length became available, program- NI
ming became The position compensation G45JG46
was SliH in use at the and had (0 be set for both X method has no effect on the tool length offset, only
Y axes. However, G92 setting for the Z axis was re- on the moment at which the spindle starts rotating. Position
placed by or 044 command, with an assi~led H offset and the 1001 length cannot pro-
number - Figure 10. grammed in the same block.
Today, this method position Note that position compensation is still in effect in
tian G45/G46 tool offset G43JG44 is due to the lack work coordinate of
obsolete, or alleast quile old-fa<;hionecL Only (he
in programming, with the position.
139
• Tool length Offset and G54-G59 • Tool length Offset and Multiple Tools
most programming has many of CNC programs include more than one
and functions available and G54-G59 series is one most jobs will require many different tools.
The has been replaced with work offset sys- (independent of the previous drawings)
and, optionally, more. Normally, 092 is not a common method how the enters
same program that contains any work offset se- three tools.
through 059 or the extended series.
holes need to spot-drilled, drilled and tapped.
example of using the tool length
.... rr..."."fTI or explanation of the is not
work environment: . just concentrate on
It is the program structure that is now -
01903 note is no change in the program structure
N1 G20 (meR MODE "''''''"....'''' .......... tool, only in the programmed
N2 G90 GOO G54 Xl.4 Y2.S (XY TARGET LOCATION)
N3 G43 Zl.0 H01 (TOOL LENGTH COMP Z)
01904
N4 saso M03 (SPINDLE caaM1iNDS) Nl G20
N5 G01 ZO.l F15.0 Moa (Z APPROACH MO'lr:r:Ol~l
N2 G17 G40 GBO TOl
N6 Z-0.89 F7.0 (Z ClJI'TmG MOTION)
N3 M06
N7 GOO ZO.l M09 (z RAPID N4 G90 GOO G54 Xl.O Yl.5 S1800 MOl T02
N8 G28 Xl.4 Y2.S Zl.0 (MACHINE ZERO
NS G43 ZO.S HOl MOB (TOOL LG OFFSET FOR
N9 G49 DOD HOO (OFFSETS crua:LLl~TION)
N6 G99 G82 RO.l Z-O.145 P200 FS.O
NlO M30 (END OF Iff.N..NIU!<.to.W}
N7 X2.0 Y2.S
% N8 Xl.O Yl.5
N9 GSO zo.s M09
G54X .. NlO G2B ZO.S MOS
Block N2 Nl1 MOl
X3.4 N12 T02
Nl3 M06
Nl4 G90 GOO G54 Xl.O Yl.5 S1600 Mal TOl
Nl5 G43 ZO.S H02 MOB LG OFFSET FOR T02)
Nl6 G99 G81 RO.l Z-O.89 F7.0
Nl? JU.O Y2. 5
Nl8 Xl-O Yl. S
Nl9 GSO ZO.S M09
GAUGE N20 G28 ZO.S M05
LlNE N2l MOl
N22 T03
N23 M06
N24 G90 GOO GS4 Xl.a Yl.5 S740 MOl TOl
N2S G43 Zl.O H03 MOB (TOOL LG OFFSET FOR T03)
N26 G99 GB4 RQ.S Z-l.O F37.0
N27 X2. 0 Y2. S
N28 Xl.O Yl.S
N29 GBO Zl.O M09
mo G2B Zl.O 14'05
N31 M30
%
Figure 19-11
Setting too/length with 643 (Zl and 1.:1'!)~f-U~" (XY) • program 01903
The command axes, 043 with HO I Also note that is no tool offset cancellation.
will affect only the Z must move in the clear. Cancellation will also explained later in this chapter.
140 Chapter 19
01905
(TWO TOOL LENGTH OFFSETS FOR ONE TOOL)
Nl G20
Figure 19·12 N2 G17 G40 G80
Example of programming more than one tool length offset for a N3 G90 GOO G54 XO YO S600 M03
single tool· program 01905 N4 G43 Zl.0 HO? MOS JOB CY...EARANCE)
NS G01 Z-0.65 F20.0 ~~~ EDGE - BOTTOM)
Based on the illustration, we to decide on the l..UlIllIl)t:. N6 M98 P7000 """""""""'"IY"I GROOVE AT Z- 0.65)
method flISl (premachiril~g the 03.000 hole is as- N7 G43 Z-O.43 827 EDGE - TOP)
sumed). A .125 wide slot mill will be a good choice to NS M98 P7000 GROOVE AT Z-O.43)
file the circle, milling method for a fuJI N9 GOO Zl. 0 Ma9
NlO G28 Zl.O MOS
(see Chapter 29). program can be shortened by Nll M30
subprogram method Chapter 39). Because the %
groove width is caner, more than one cut is
needed - two in the first cut, the tool is 07000
lioned at the per drawing) and (SUBPROORAM FOR GROOVE IN 0190
first cut at the bottom groove. The bottom Nl G01 041 XO.875 Y-O.B75 D07 F1S.0
tool will depth. N2 G03 Xl.75 YO RO.S75 FlO.O
N3 I-1. 7S
For the <>"'....'v.. u cut, the top edge of the slotting mill is N4 XO.875 YO.a7S RO.875 F1S.O
and the tool profile for the second groove N5 G01 G40 XO YO
ally, it will first groove) at the depth of N6 M99
%
(again. as
TOOL LENGTH 1
G43H ..
..
N3
N2
example, tool H07 is used bot- The two illustrations show typIcal setup of the
tom reference edge of the mill and H27 is tool length offset for preseltools on a horizontal machining
the ~,~ ..'''' ... mill. D07 is for cen (er. Fig lire ) 9- J5 shows the zero at the cen ter
cutter radius only. Figure 14 shows the tool motions of the table. 19-16 shows program zero at the
in subprogram 07000. face of the
A program also be started with the length offset The rule is quite explicit - any 028 or 030 com-
command (under program contra!), usually In the {both execute the tool return to the
safety line block or initial will cancel the tool length automatically.
N1 G20 G17 040 GSO 049 The is simple programmer take advantage
of this rule and does not need to specifically the tool
.. , or a variaf;on of the same block: length if the machi ne returns to the tool change posi-
is all with an automatic
N1 G20 This approach is illustrated in examples
N2 G17 040 Gao 049 eluded in this handbook.
is one more way to the tool offset -do Anyone of the methods will that active tool
tlot program it at all. length will canceled. may be some differ-
ences between manufacturers and consulting
A strange suggestion, perhaps, but founded. ma:crlme manual will be the approach.
examples in this handbook do not use command at
Why What happens at the end of each tool?
RAPID POSITIONING
143
144
Since the
unproductive
the targellool
the shape of
of the rapid is saving the
(motion from the current tool position to
the tool path is irrelevant to
parl. Always aware of the ac-
tual rapid motion (001 path for reasons
lnrly when lWO or more axes are
safelY, particu-
at the same
x POSITIVE
1
e
No must in the way of the tool e
If there is an
path, the obslacle
control for one
of detecting an obstacle. It is programmer's
responsibility to assure that any lool mali on (rapid motion
X axis NEGATIVE
!
POSITION
y
N
terfere tool motion are: Several consecutive program blocks. each containing
o FOR MACHINING CENTERS: only a single axis motion, can be included in the to
obstacles to machining. This method program-
Clamps, fixtures, rotary or table. is preferable in cases where only the exact or approxi-
machine part itself, etc. mate position of (such as or fix-
tures) is known during program preparation.
o FOR LA THES :
Both of above examples illustrate an angular motion This consideration is more important In turning appJ
along two axes, followed by a straight single axis motion in lions than in . due to the nature of programming for
the remaining graphical expression of mo- (wo In turning, approach motion
tions is a bent resembling a hockey stick or a dog leg may be first, to avoid a collision with the
which are also very common terms applied to a tailstock, and then along the X The reverse motion
should along axis first, then along Z axis mo-
tion, in order to the same safety when return-
Calculation of the actua! motion shape, as we done to the tool
is only seldom Taking some pre-
cautions, the rapid motion can be with- A typical application of this programming technique may
out any calculations. If no is within the work area be useful after using a machining (such as turning.
imaginary rectangle by the diagonally posi- facing, elc.), the starting
tioned slar! and end point), is no danger of collision also its point.
to the diverted rapid tool path. On CNC milling sys-
tems, the third axis can also used. rectangly"of
above example will enhanced by the third difnension
and a three dimensional space must be considered. In this
case, no should be chis
same rules apply a rapid motion along three axes as
a two-axis simultaneous motion. Note that the rapid
rale for Z axis on machining centers is usually
lower than the rapid rate for the X and Y axes.
\ ,
MACHINE ZERO RETURN
tion. Machine position is exactly such a The Z machine zero position for a
center is always where the Automatic
Machine zero is a fixed position on a CNC machine that place. This is a built-in location,
can reached repeatedly, on request, through the control distance from the machine table and
panel, MOL or program code execution, most machines, the standard machine
centers is at the extreme travel
• Machining Centers in the positive direction, There are excep-
expected,
Although the design of CNC machining centers
models, there are only four possible locations for i
~j
<'
zero, within the XY view:
Z:::: UP (TOP)
o Lower left corner of the machine
o Upper left corner of the machine MACHINE ZERO
POSITION Z-
o lower right corner of the machine - X + .........
o comer ot the machine XV '" UPPER LEFT I~
It is y- '
a new from ~ ! WORKAREA
also necessary to make a ,
lion and return there
pleted. So. several of the
convenient for setup of the part on Figure 21-2
removal when the machining is Machine lero position located at the upper left XY comer
CNC vertical machining center
The most common and standard machine r",t''',,''''nr.,.
tion for vertical machining centers is at 21-2 illustrates. someCNC vertical machining
ner of the machine, looking the machine zero position at the upper left cor-
XY plane - Figure 21-1. XY plane.
1
150 Chapter 21
In both illustrations, the arrows indicate the tool motion o Tool motion from machine zero of a typicalrear lathe:
direction towards the work area. Moving the tool from ma-
chine zero into the opposite direction will result in a condi- x+ Z+ ... tool motion. will overtravel
tion known as overtravel - compare the two possibilities:
• Setting the Machine Axes
o Tool motion from machine zero, if machine zero is located
at the upper right corner: From the previous sections, remember that there is a di-
reet relationship between the CNC machine, the cutting
x + Y+ Z+ ... tool motion will overtravel tool and the part itself. The work reference point (program
o Tool motion from machine zero, if machine zero is located zero or part zero) is always determined by the CNC pro-
at the upper left corner: grammer, the tool reference point is determined by the tool
length at the cutting edge. also by the programmer.
x- y+ Z+ ... tool motion will overtravel
Only the machine reference point (home position) is de-
The other two comers (lower left and lower right of the termined by the manufacturer of the machine and is located
XY view) are not used as machine zero. at afixed position. This is a very important consideration.
G29 Return/rom the machine zero reference position which only send the Y axis to the machine zero refer-
ence position, or ...
Return to secondary machine zero
G30 reference pOSii (more than one is possible)
N67 G28 Z •.
the listed G28 is used almost will only send the Z axis to the machine zerO reference
sively in two and three axis CNC programming. Its only position, and ...
purpose is to return the current tool to the machine zero po-
N67 G28 x .. Y •• Z ..
sition and do it along the one or more axes in
G28 program block. will send alJ three specified axes to the machtne zero
erence position. multiaxis requires caution -
• Command Group watch for the infamous 'hockey stick' motion.
All four preparatory commands to G30 belong to the
group 00 of the standard Fanuc designation that describes • Intermediate Point
the non modal or one-shot G codes. In designation, One of the elementary requirements of programming is
each G code of the 00 group must be repeated in every the alpha numerical composition of a word. In the program,
block it is used in. example, when G28 command is every letter must followed by one or more digits. The
used in one block the Z axis and then it is in the question is what values will the axes in G28 have? They
next block for the and Y axes, it has to be repeated in will be the intermediate point for machine zero return mo-
each block as "pp,rjpr!
tion. concepl the intermediate motion in G28 or G30
is one of the most misunderstood programming features.
N230 1328 Z.. (MACH:INE ZERO R.E'I'ORN Z AXIS)
N231 1328 X •• Y.-. ZERO REI'URN XY AXES) Commands G28 and G30 must always contain the inter-
",prHII'" point (tool position). By Fanuc design and
The G28 in block N23! must be If tion, the G28/G30 commands have a built-in motion to an
the command is omitted, last motion command pro- intermediate point, on the way to machine zero. An
grammed will be effective, for example, GOO or GO]! ogy can made to an airplane flight from Los Angeles,
USA to Paris, France, thallemporarily stops over in New
RETURN TO PRIMARY MACHINE ZERO York City. It may not be the most direct route, but it serves a
certain specific purpose, example, to refuel
Any CNC machine may have more one machine
zero reference point (home position), depending on its de- The coordinate values of the axes associated with G28 and
sign. For example, many centers with a pallet G30 commands always indicate an intermediate point.
changer have a secondary machine reference position. that
is often used to align both the left and right pallets during of the intermediate or pOSitIon, is to
pallet most common machine tool design is shorten the program, normally by one block. reduc-
the one that uses ~ly a position. reach this tion is so marginal that the philosophy behind the
primary home p6s[lion, the preparatory command G28 is may debated. is how concept the
used in the program and can also be used during the MDI ate point (position) works.
control
When the or G30 IS used in the program,
The command moves the specified axis or axes LO at least one axis must be specified in the block. The value of
the home position, always at a rapid traverse rale. That that axis is the intermediate point, as interpreted by the eon-
means GOO command is assumed and not have to system. Absolute and incremental modes G90 and I
programmed. The or axes of the desired motion (with a make a great difference in interpretation the G28 or G10
value) must be programmed. Only the behavior, and will be described shortly.
axes will affected.
1 Chapter 21
The tool motion in Figure 2J-4 is from the central hole of a zero, for example XC, means position at the
During sueh a motion, the tool can collide with the point, if the mode is absolute,
upper right clamp on its way to zero, if the motion command. If the mode is incremental,
to the home position were directly. Only the the XO word means no motion for the
X and Y axes are An interme-
diate point can be location, without lathes use (he U and Waxes incremental
making the program any program without an on absolute X and Z axes respectively), with
intermediate point can be same applications. Absolute axes coordinates
interpreted as the programmed
G90 indicate the nrt:HIT,rlmFIlP'n
GOO xs.o Y4.0 (MACHINED HOLE) Comp,are the two program - they are the
G2B X5.0 Y4.0 1t"la1...rL\.N,c, ZERO MOTION) are identical in terms tool motion:
G90
Which method is better? both methods produce
GOO XS.O Y4.0 (MACHINED identical results, the choice is on a given situation or
X12.0 (SAFE LOCATION) personal preference. To switch to the incremental mode has
G28 Xl2.0 Y4.0 (MACHmE ZERO RE'lL'URlN'1
its benefit, because the current tool location may not always
known. The disadvantage this method is that G91 is
La produce same result, but with an extra most likely a temporary setting only and must be reset back
(0 G90 mode, used by the majority of the program.
For example, the intermediate position, the tool can
be programmed to an obstacle on the to A failure to reinstate the "mS;(]IU'IB mode may result
chine zero. rnn,,.,.,.·t1 whh care, the in an expensive and serious error.
tion may be useful. Normally, it is more
MACHINE RETURN 1
Absolute mode of programming speci ties the currenltool above example can be so the intermediate
position from program zero - always at all times. motion is eliminated or - as the current tool posi-
Many examples use the absolute tioll. intermediate motion can never eliminated, but
ming mode - after all, this is - or it should - the it can programmed as a physical zero distance.
programming mode, for the majority of
090
There is one incremental mode of ma-
zero return some very It Nl2 GOO XS.O Yl.O
happens in those cases when the current tool position is not Nl3 G28 XS.O Yl.O
known to the programmer. Such a situation typically hap-
pens when using subprograms. where mode is
used repeatedly to move the incrementally (0 different By this the imermediate poinl
locations. For instance - where exactly is the cutting current tool position, which in direct motion to the
tool when drilling cycle is completed in the N35 machine zero. reason is that intermediate tool posi-
block the following example? with the current tool position. This r'\r("\, ..... r~....,.'-
has to do with values axes.
G90 In the part program, 1.0 in the block N 13 must
repeated, while the absolute 090 is in effect
N32 G99 GSl Xl.S Y2.25 RO.l Z-O.163 F12.0
N33 G9l XO.3874 YO.6482 L7 (REPEAT 7 TIMES) In cases when current tool position is not known, the
N34 G90 GSO Zl.O M09 (CANCEL zero return to be in incremental mode. in
N35 G2S (X???? Y????) Zl.0 (UNKNOWN ~n~T'~Tf~T\
this case, change temporarily to mode
gram a zero length motion for each axis:
Is it worth the extra effort to find the absolute location at G90
Probably no!. Let's look at some other examples.
While in the absolute mode 090, coordinate Nl2 GOO XS.O Yl.O
the intermediate point locatioll. When incremental Nl3 G91 G2B xo YO
mode 091 is programmed, the coordinate values the Nl4 G90
actual and direction the intermediate motion. In
both cases, intermediate tool motion be performed Again, an important is in place here - always
first. Then - and only final return to the machine remember to back to absolute as soon as
zero reference position will take in order to avoid misinterpreting the consecutive
the current lOol position as Y 1.0 program data.
position). the program, XY values of G28 com- [n a brief the imermediate point cannot be
mand that follows the position block are important: minated from the G28/G30 block. If situation demands a
return to zero without going a separate
G90
termediale point, use a zero tool motion towards the
N12 GOO X5.0 Yl.O n"I"'';'''''' point. method on the 090 or
Nl3 G28 XO YO G91 mode at the
o In G90 absolute mode motion to machine zero, the current
In example, the G28 command that the CUl- tool coordinate location must be repeated for each axis
specified with G28 command.
ting tool should the machine zero position· identified
as XOYO in the N 13. Since G28 command relates o In G9l motion to machine zero, the current tool
to the zero only, it ~ould to assume motion must be equal to zero for each axis ·specified with
that the XOYO relates to lhe~machine zero, rather than the the G28 command.
part zero. That is 110t con·eel.
• Return from the Z Depth Position
XOYO to the point through which tool will
the machine zero positioll. That is the detined point One common example of the intermediate tool
already known to be the intermediate position for the ma- in a program hlock, is the return from a
chine zero return command. This intermediate point is as- cavity to the machine zero. In the following
signed coordinates relating to pan (in absolute solely the purpose of better explanation,
In the example, the cuuing tool will move \0 motions are used rather than a drilling to retract
program zero to the mach i ne zero, resu It- tool from the hole depth. In the example, the current XY
C in a single definition of two 1001 motions. This, of position is X9.5Y 4.874. and a drilling operation will
course, is not likely to the intended motion. simulated in
1 21
Q 2
In block N25, the tool is at
current tool position of X9.5 absolute COOf- To retract the Z axis all (he way \0
the cutting is done and the tool has to be re- then return the XY axes in the next
turned home in axes. reasons, the Z axis Option 1. return the Z axis to zero:
must retract first Several but three
of them are the most common: N26 G28 Z-O.7S M09
o Retract the Z axis above work in one block, return the XY axes to zero as weJl:
then return XYZ axes to machine zero
N27 G28 X9.S Y4.9?4
o Retract the Z axis all the way to machine zero,
then return the XV axes in the next block complete program for Option 2
o Return XYZ axes to machine zero directly
from the current tool position the depth)
N2l G90 GOO G54 X9.S Y4.B?4 S900 MOl
The Figure 21-5 shows the options. N22 G43 ZO.l Hal MOS
N23 GOl Z-O.4S F10.D
xv MACHINE N24 GOO Z-O.43
r-------+ ZERO N25 GOl Z-O.7S
~I POSITION N26 G2B Z-O.7S M09
zi N27 G2B X9.5 Y4.874 MOS
0, N28 MOl
Hole location
~t in XY axes is
~I /'
/'
/' X9.5 Y4.874 e Option 3
NI /'
J /'
/' To return all three axes
/'
INTERMEDIATE POINT from the current tool position the tool is still aL the
hole full depth), only one zero return block will be needed:
CURRENT POSITION N26 G28 X9.5 Y4.874 ZO.l M09
Hole location jn XY axes is X9.5 Y4.B74
This is the intended method of programming, as Faouc
Figure 21-5 controls are Some programmers may
Machine zero return from a hole depth - milling with Fanuc on but that is how it works.
Although this is a matter of opinion, the choice of many • Return for CNC lathes
is to move the tool out of a cavity or hole first,
work,
caB the machine zero return command. If there is any
setup.
,',-,'A",-'" for this preference, it is the perceived safety the
zero return is also
programmer puts into the program design. To be ends at the machine zero
there is nbsolutely nothing wrong with the alternate true the X axis but not of the
memoo, if it is with care. Comparing' op- away on some lathe
with other does some valuable
Typically, a CNC lathe program will
o OPTION 1 ... a way, thaI machining of the will start
... is only reasonably safe, machine zero, but any subsequent pan will
of cycle time. may from a safe tool change position. This
within the ,nrla",_,."", tical if the program uses geometry offset,
older 050 setting. The most common method of
o OPTION 2 ... zero return on the lathes is the direct method, without an
termcdiate point, because no G91 i s ' an
cffil'i"!nt than the previa us option, but
one of all
error is more difficult LO make:
N78 G28 UO
N79 G28 wo
is the most in terms of program cycle time,
any error in could result in a collision. These two blocks win return the cutting tool to
chine zero in incremental mode. there is no
• Axes Return Required for the ATC motion applied. It is safer La move the
incremental mode U, then the Z using the incremental
zero return is to make an mode W. If the work area is clear (watch for [he tailslock),
axes must be moved for both X and Z axes can be returned to the machine zero at
that purpose. a only the Z the same time:
axis is required to
N78 G28 UO wo
G91 G28 ZO M06
Figure 21-6 illustrates a typical withdrawal a
Horizontal machining centers from a hole, when the machining is completed.
reach its reference position
For safety extra MACHINE
grarruned as well, along Wilh ZERO
sian with an adjo.cent tool in the POSITION
If it is safe, the B axis may be programmed When using position register command G50, the XZ
ously with another axis: must always be known for this command. In this
rules for machine zero return are
G91 G28 xo BO Assuming that the machine zero position is at
the coordinate position XlO.O Z3.0, the program for the
Absolute mode designation follows the same rules for a tool can be wriuen in two ways - one without using
rotary or indexing axis, as for the linear axes. command, the other one with the 028 command.
156 Chapter 21
RETURN POSITION CHECK COMMAND N8 G27 G40 X7.58 Z2.0 T0400 M09
,
/
machine point return check can be in I
/
either the absolute or incremental mode. The absolute sta· I
tement in block N65 (in the example) can replaced
with the version:
)
LINEAR INTERPOLATION
Linear interpolation is closely related to the rapid posi- • Start and End of the linear Motion
tioning motion. Wbile the rapid tool motion is meant to be
used from one position of the work area to Linear motion, other motion in CNC
withour curling, linear interpolation is u ....... "" ......... ming, is a motion two end points of the conLour. It
for actual material removal. such as contouring, pOj:Ke~ung, has a start position position. Any start position
face milling cutLing motions. is often called position, rhe end position is
often called the target The start of a linear motion
is used in part programming to is defined by the current position, the end is defined by
from the start position 0 f the cut LO the target coordinates current block. It is easy to see
uses the shortest cut- !.hat the end position one motion will become the start
motion programmed in position of the next motion, as the tool moves along
is a straight line, the part, through all contour points.
contour start points. this mode, the cutter moves
from one position to another by the shortest distance be- • Single Axis linear Interpolation
tween the is a very important nrr\OT~~m_
ming feature, in contouring and The programmed tool motion along single axis is al-
angular motion (such as chamfers, bevels, angles, a motion parallel ta that of the motion
etc.) must be in this mode to be accurate. Programming in or mode will result
Three types can be generated in the linear in the same nrF~H'T"", but at different feed-
polation mode: Figure 22-1 for
Cl Horizontal motion ... single axis only
o Vertical motion y Motian from
o Angular axes XOYO
to
means that the control 5 X7.0 Y4.0
thousands of intermediate coor-
dinate points between start point and end point of the 4 -+--'--+--+-
cut. The result of this calculation is rhe shortest path 3
tween the two p~nts. All calculations are automatic - the 2 ~~~~~~~-i~ -~~--,.f-
In GOl mode, the function F must be in effect. machmmg centers and the
first program block that starts linear interpolation tool motions (hat are parallel to table
mode must have a feed rate in otherwise an alarm motions. On the CNC lathes.
will occur during the first run, power on. Command as facing,
Gal and feedrate F are modal, which means they may be drilling, tapping are
omiued in all subsequent I blocks, once In all cases, a single
they have been designated and the feedrate re- or the ho.rizonral within the
unchanged. Only a location is current (working) plane. A singJe axis motion can never be
required for the axis designation in a motion, which requires two, three, or more axes.
dition to a single axis motion, a along two or name for a motion rhat is parallel to a axis
three axes be also simultaneously. horizontaf or vertical only.
159
1 22
y Motion from gramming method is not enough. Such n .. F' ......" .......
X2.0 Y1.0
ming projects more an investment into a
to computer based system, such as
5 X2.0 Y3.0
powerful and Mastercam TM, that IS based
and to
on modern computer combined with machin-
4 know-how. This programming is using desktop
X6.0 Y3.0
3 and is by virtually all machine shops.
Computer based programming is not a subject of this hand-
2 book, btl[ its genera! concepts are discussed briefly in
1 chapter of the handbook 53).
O~·~--·--~···~·····~·····~-·~·········~-·X
three-axis (XYZ) '''" ..... " .... linear motion is
o 1 234 567 8 in Figure 22·4,
22-2 (
Single lJxis linear interpolation motion
j nterpolation
4
the Y axis.
y Motion from
j. X2.0 Y1.0
to
Figure 22·4
5 X6.0 Y3.0
Three axes linear interpolation motion
4
3
2 PROGRAMMING FORMAT
1
In order to a lool motion in the interpola-
a x command GOI along with one,
o 1 234 5 6 7 8 two, or axes Lool maLian, as well as a feed-
rate (F address) suitable for the job at hand:
Figure 22-3
GOI x .. Y.. Z.. F •.
Two axes simultaneous linear interpolation motion
All enLncs in the linear motion block are
• Three Interpolation to be only if they are new or
the block instruction (word) that is affected by
A linear that takes place along needs to be included in the program block,
same time, IS axis linear
simultaneous linear motion along three axes is possible on Depending on which programming melhod is """ . . "'I.vU.
virtually all CNC machining centers. Programming a linear the linear· motion may be
motion of this is not always easy, particularly when absolute or n".·"''''''''
working with complex parts. Due to many difficult lory commands for milling
lions involved in this type of tool motion, the manual pro- and W for
LINEAR 161
0.001 mm
MILLING
'-
Minimum motion increment TURNING Figure 22-5
.==.
Oal8 fDr the calculation of individual axis linear feedrate
0.001 mm 0.00001 - 500.00000 mm/min
lhall!!t: maximum feeurate thaI can linear motion takes place between two end points,
high. For actual cutting, that is true. point at X 10.0 Y 6.0 to the end at
that ranges are to the control Y7.25 - the feed rate is programmed at 12 in/min as
The will That means the actual travel motion
feed rate, according to the ma- is either known or it can be calculated:
capabilities. Control system only pro-
range, that is more for the benefit or Xc 14.5 10.0 = 4.5
= 7.25 - 6~O = 1.25
than the actual user. Zt 0
in case is to allow the machine manufacturers flexibil-
Ity within current technological advances. As technology tool total mali on (as illustrated) is
control system manufacturers will have to re- motion, and can be calculated by
changes as well, by increasing the ranges. Theorem:
162 22
e 2:
(COUNTERCLOCKWISE DIRECTION FROM PI)
Fx = 0 I 4.6703854 x 12 = 0.0
G90 ••• (ABSOLUTE MODE)
In this example, there is no Z axis motion. If Z axis GOl X4.S YO.S F ... (P1 TO
were part of the lool motion, for a simulta- X7.S Yl.S TO P7)
neous three dimensional linear motion, procedure will Y3.0 TO PO)
be logically identical, with the inclusion of Z axis in the X6.5 TO P5)
X4.5 Y4.Q TO
calculations.
X3.0 \, TO
X1.0 Y3. 0 TO (2)
PROGRAMMING EXAMPLE Y1.0 TO (1)
In order to illustrate the .... ~._ .. _~, use of interpola- Linear interpolation means of programming all
tion mode a CNC program, is a simple example, orthogonal (i.e., horizontal) molions, as well as
shown in 22-6. angular tool motions as the shortest Hnear distance between
For even more comprehensive understanding, we exam- two points. CUlling must be in this
ple will presented twice. One tool motion will start and mode, for proper m~lal Note coordinate
end at the P I location and will programmed in the c1ock- location that has not changed from one point to the next -
the other will start at one block to the next is not repeated in subsequent
will in the counterclockwise block or blocks.
direction.
BLO-CK SKIP FUNCTION
In many control manuals, the block skip function is also BLOCK SKIP SYMBOL
called the block delete function. The expression 'block de-
lete' offers rather a misleading description, since no pro- To identify the block skip function in a program, a special
gTam blocks will actually be deleted but only skipped dur- programming symbol is required. This block skip function
ing progTam processing. For this good reason, the more symbol is represented by a forward slash [ / ]. The system
accurate description of the function is the block skip func- will recognize the slash as a code for the block skip. For
tion, a term used in the handbook. This function is a stan- most of CNC programming applications, the slash symbol
dard feature of virtually all CNC controls. Its main purpose is placed as the first character in a block:
is to offer the programmer some additionaJ flexibility in de-
signing a program for no more than nvo conflicting possi- ~ Example 1 :
bilities. In the absence of a block skip function, the only al-
ternative is to develop two individual part progTams, each Nl (ALWAYS PROCESSED)
covering one unique possibility. N2 (ALWAYS PROCESSED)
N3 (ALWAYS PROCESSED)
/ N4 (PROCESSED IF BLOCK SKIP IS OFF)
TYPICAL APPLICATIONS I N5 ••• (PROCESSED IF BLOCK SKIP IS OFF)
I N6 ••• (PROCESSED IF BLOCK SKIP IS OFF)
To understand the idea of two connicting possibilities, N7 .•. (ALWAYS PROCESSED)
N8 ••• (ALWAYS PROCESSED)
consider this programming application. The assignment is
to write a program for a facing cut. The problem is that the
On some control systems, the block skip code can also be
blank material for parts delivered to the CNC machine is
used selectively for certain addresses within a block, rather
not consistent in size. Some blanks are slightly smaller in
Ihan at its beginning. Check the manual if such a technique
size and can be faced with a single cut. Others are larger
can be used - it can be very powerful:
and will require two facing cuts. This is not nn uncommon
occurrence in CNC shops and is not always handled effi- Q Example 2:
ciently. Making two inefficient programs is always an op-
tion, but a single program that covers both options is a N6
better choice - but only if the block skip function is used in N7 GOO XSO.O I MOB
such a program. N8 GOl ••.
-"
This challenge illustrates a situation, where two connict-
ing options are required in a program at the same time. The In those cases, when the control system does allow the
most obvious solution would be to prepare two separate block skip within a programmed block, aJl instructions be-
programs, each properly identified as to its purpose. Such a fore the slash code will be executed, regardless of the block
task can be done quite easily, but it will be a tedious, time skip toggle setting. If the block skip function is turned ON
consuming and definitely an inefficient process. The only (block skip function is active), only the instructionsfollow-
other solution is to write a single program, with tool mo- / ' ing the slash code, will be skipped. In the Example 2, the
tions covering facing cuts for both possibilities. To avoid coolant function M08 (block N7) will be skipped. If the
air cutting for those parts that require only one cut, a block block skip function is turned OFF (block skip function is
skip function will be provided in the program and applied not active), the whole block will be executed in Example 2,
to all blocks relating to the first facing cut. The 'second' cut including the coolant function.
will always be needed!
Other common applications of the block skip function in- CONTROL UNIT SETTING
dude a selt!Clive ON/OFF sLalus LOggle, sUl:h illi the coolant
function, optional program stop, pfOgTam reset, etc. Also Regardless of the slash code position within a block, the
useful are applications for bypassing a certain program op- program will be processed in two ways. Either in its en-
eration, applying or not applying a selected tool 10 a part tirety, or the instruction foHowing the slash will be skipped
contour and others. Any programming deciSion that re- (ignored). The final decision whether or not to use the
quires a choice from two predetermined options is a good block skip function is made during actuaJ machining, by
candidate for the block skip function.
164 Chapter 23
the operator, depending on the of this A simple programming solution to this potential
purpose, a push button key, a switch, or a menu item . problem is available. Just repeat all modal commands in
selection is provided on control panel the CNC unit. the program thal will not affected by block
Selection of the mode can be either as skip function.
(ON) - or inactive (OFF).
two
programs will not require any skip codes. In
such cases, the setting mode for the block skip function on
the control panel is irrelevant, but OFF mode is strongly
= Example A - Modal commands are not repeated:
Note that the motion I, the F30.0 and If the program is designed in a way that there is only
the M08 are all skipped in the example The X cut, problems may oceur during
and Y axes have not updated in either example and Programming TWO cuts all
will remain unchanged. conclusion is that the example parts a program, but will be inefficient
A will result a Z axis motion in two consecutive parts with a minimum stock. There will too many tool
blocks, causing a potemially dangerous In the motions as 'cutting , when the is minimal.
correct version, listed as B, the programmed repe-
tilion all commands - GO 1, F 12.0 and M08 - assures the c:> Example - Variable stock face:
nrr' .... "'''""' will be run as intended. In next section this
chapter we will look at principles of program design for A cutting a that in sIze is a common
problem in CNC work. A suitable solution is for
different practical applications.
turning milling - the should include tool mo-
In the summary, there is one basic developing tions for two cuts and the skip function will be
programs with blocks using the block skip function: on all blocks relating to theftrs1 cut
is a lathe face cut, the
Always program a/l the instructions. even if it means repeating
some program values and commands that have to be preserved. facing siock varies mill) and .275 (7 mm).
After considering several machining options, the program-
dY~'" that the
'-' ....... maximum stock that can
slash symbol can be into the nT"e,r"n. CUI will (3.5 mm) Figure 23-J.
nrr,""'"rn has been designed for bOfh options.
in those blocks that define the optional skip
lected blocks. Always check program! CHANGE
PROGRAMMING EXAMPLES
block skip function is simple, often neglected,
yet, it is a powerful programming tool. Many programs can
Figure 23-1
benefit a creative use of this The type of
and some thinking ingenuity are the only criteria for suc- Variable stock for fBcing in 8 turning I!JOfJ'ilCOtion - program 02301
cessful implementation. In the following examples, some
02301 (TURNING)
of the skip function are shown. (v:ARIABLE FACE STOCK)
the examples as start points for a general program de- N1. G20 G40 G99
sign or when covering similar machining applications. N2 GSQ S2000
N1 GOO TQ200 M42
• Variable Stock R'moval N4 G96 S400 M03
NS G41 X3.35 ZO.135 T0202 MOS
Removal of excessive material is during I N6 GOl X-O.OS FO.Ol
a rough cutting. When machining irregular (cast- I N7 GOO ZO • .25
forgings, etc.) or rough facing on lathes, it be dif- I NS X3.35
ficult to determine number of cuts. example, some N9 GOl ZO FO.OS
castings a given job may have only the minimum exces- N1.0 X-O.OS FO.Ol
N1.1 GOO ZO.l
material, so one roughing or facing cut will suffi- N12 X3.S
Other for same job may larger and N13 G40 Xl2.0 Z2.0 T0200
two roughing or cuts arc nceded. N1.4 MJO
%
166 ...........••• ~----------~
Chapter 23
........------.-------~~.........~~~----...:...
NS contains initiallool approach motion. Block does not need a for a reason - it will
next three blocks are preceded by a slash. In N6, tool be either FIS.O or FIS.O, depending on whether blocks N6
cuts off front at ZD.l N7 moves the tool away to N8 were skipped or not. The is very important
face, block N8 is a rapid to initial block 10. Such a repetition guarantees the required
diameter. There are no other blocks to skipped after rate in the block, when actual cutting takes
block N8. N9 contains a to the fronl
N lOis the front cutting motion, Nil is the Both lathe and mill examples should offer at least some
motion, followed by standard final blocks. basic understanding of logic used in program develop-
menl, using the block function. Exactly the same logi-
Evaluate the example not once least twice - it shows cal approach can be for more than two cuts and can
what exactly happens. During the first evaluation, read all also be applied to operations other Ihan face cutting.
blocks and the block skip function. the sec-
ond time, ignore all blocks containing slash • Machining Pattern Change
will be identical results when compared with the first
uation. The only difference will the number of actual Another application. where the block function may
cuts - one, not two. In miiling,lhe is very be efficiently. is a simple programming. The
term family programming means a programming situation
An for a milling application uses a inch face where there a slight difference in be-
mill. The material to faced varies be- tween two or more parts. Such a variation between
(ween .120 and .3! 5. largest reasonable depth cut similar is often a prospect for block skip func-
selected will be .177 (4.5 mm) - Figure 23-2. tion. A minor deviation in a machining pattern one
drawing to another can adapted in a single program us-
ing the block skip function. Following two examples show
FIRST CUT
typical possibilities of programming a change of the
path. In one the emphasis is on a skipped machin-
X-3.0 X11.0
Y4.0 Y4.0 i ng location. In the other example, the emphasis is on the
pattern change itself. Both are In illus-
trate a simple operation. the lathe example,
Figure 23-3 is related to program 02303.
23-2
Variable stock for facing in 8 ml1ling application· program 02302
02302 (MILLING)
(VARIABLE FACE STOCK)
N1 G20
N2 GI? G40 G49 Geo
N3 GSO GOO GS4 XlI.0 Y4.0 X43.0
N4 G43 Zl.O S550 MO) Hal
N5 GOl ZO.1?7 F15.0 Mn8 -"L-;.I---X35.0
/ N6 X-3.0 FIB.O
/ N7 ZO.375
/ N'8 GOO Xl!. 0
N9 GOl ZO Figure 23-3
NlO x-J.a F1B.O Variable maj:/If~lina pattern - turning application
Nll GOO Zl.O M09
Nl2 G2S X-l.O Y4.0 Zl.O upper picture shows result with block skip
M13 M30 lion set ON. the lower picture shows the result with block
% skip function set OFF, the -"arne
Block N5 in the example contains the Z axis approach to
02303
the first cut, at 177 level. The next blocks can be Nl G21
if necessary. In the N6 block, the mill actually
cuts at ZOo I position, N7 is the tool motion af- Nl2 GSO SleOO
ter cut, and N8 returns the tool to initial X position. Nl3 GOO T0600 M42
There are no other blocks to be skipped block N8. Nl4 G96 S100 MD3
BLOCK SKIP FUNCTION 167
N15 X43.0 Z-20.0 T0606 MOS Both variations of program 02304 machine a hole pat-
N16 G01 XJS.O FO.13 tern with 6 or 4 holes. Block skip function has been used to
N17 GOO X43.0 make a single program covering both patterns. The top of
/ Nle Z-50.0 Figure 23-4 shows the hole pattern when block skip func-
/ Nl9 GOl X3S.0
/ mo GOO X43.0 tion is set OFF, the bottom shows the hole pattern when
ml X400.0 Z4S.0 T0600 MOl block skip mode is set ON.
Program 02303 demonstrates a single program for two 02304 (MI.LL.ING EXAMPLE)
parts with similar characteristics. One part requires a single N1 G21
groove, the other requires two grooves on the same diame-
N16 G90 GOO G54 X30.0 Y2S.0 MOS
ler. In the example, both grooves are identical - they have N17 G43 Z2S.0 S1200 M03 H04
the same width and depth and are machined with the same N18 G99 GS1 R2.5 Z-4.0 F100.0 (HOLE 1)
tool. The only difference between the two examples is the N19 XI05.0 (HOLE 2)
number of grooves and the second groove position. Ma- mo Y75.0 (HOLE 3)
chining the part will require the block skip function set ON I N21 XSO.O Y50.0 (HOLE 4)
or OFF, depending on the grove to be machined. / m2 X55.0 (HOLE 5)
m3 G98 X30.0 Y7S.0 (HOLE 6)
Evaluate the more important blocks in the program ex- N24 GSO G28 X30.0 Y7S.0 Z2S.0
ample. The N15 block is the initial tool motion to the start N25 MOl
of the first groove at Z-20.0. In the next two blocks. Nl6
and N 17, the groove will be cut and the tool returns to the Blocks NI8 to N20 will drill holes 1,2 and 3. Hole 4 in
clearance diameter. The foHowing three blocks will cut the N2! and hole 5 in N22 will be drilled only if the block skip
second groove, if it is required. That is the reason for the function is set to inactive mode (OFF), but neither one will
block skip code. In the block N 18, the tool moves to the ini- not be drilled when the block skip setting is active (ON).
tial position of groove 2 at Z-50.0, in N19 the groove is cut Block N23 will always drill hole number 6.
In the block N20, the tool retracts from the groove to a A variation of this application is in the program 02305.
clearance position. There arefive hole positions. but the block skip function is
The milling example shown in Figure 23-4, also in met- used within a block, to control only the Y position of the
ric, is represented in program 02304. The program handles hole. Top of Figure 23-5 shows the pattern when block skip
two similar patterns that have four identical holes for both function is OFF, the bottom shows the pattern when skip
parts and two missjng holes in the second pari only. This is function has been set ON. The middle hole will have a dif-
a good example of similar parts program, using block skip. ferent Y axis position, depending on the setting of the block
skip function at the machine.
a 0
a a a Lri 0 0 uj
ci uj 0 a a r....: a
......
M LO co ...... (") <0
X X X >< >< X X
I I J I I
--"""""~~~""""
f!1 t - Y25.0
a a
a I.() 0 0 ..0
0C"') 0
...... 0 r....: 0
.....
M <0
X X X X ><
$ $- I- Y75.0
47 447 -$ - Y75.0
6 3 5' 3
-$- $- - -$.
1 2
Y25.0
1 t - Y25.0
mo Y7S.0
N2l X67.0 / YS4.0
(HOLE 3)
(HOLE
,/
,/
I X2.0563
m2 G98 X30.0 Y7S.0 (HOLE 5) ~~~=t~- X2.0
N23 GSO G28 X30.0 Y75.0 Z25.0
N24 MOl X1.67S
following method of programming is very useful for When program 02306 is processed the block
parts very tolerances. It is set all blocks will executed, including the trial cut
a method lhose parts, part is and finish profile. With the block set ON, the only op-
difficult to measure after allinachining is for .....""lIn" executed will be the to size, the
ex.ample shapes, such as The same me.tho? cut. In this case, significant instructions are retained
is also quite for parts cycle Indl- by repetition the key commands (NI8 and NI9). Such a
viduallool is relatively long and all the offsets have to repetition is very crucial successful in both
be fine be/ore machining. modes of block skip function. MOO in N16
approach to part programming is more efficient. as it stops the machine and enables a dimensional
a recut. increases finish, and can even Selecting trial of in the example may be
prevent a scrap. In either case, a trial cut programming questioned. What is the logic it? The trial diameter can
method that employs the skip is used Set- be other size, That would leave a .025
ting the skip mode the machine operator checks stock per for the cut. It is true a different
the trial dimension, the individual offset, if neces- diameter could have selected. four decimal num-
sary, with block set ON. was only selected for one reason - to psychologically
general described in example are ",n'Y"",.."e,.. the to maintain accurate offset settings.
equally applicable to and milling - Figure 23-6. - programmers may a three or
aeC:lmal number - the
BLOCK SKIP FUNCTION 169
During the firs! machine run l the operator should set the N29 •••
block skip making GO I command The NlO (BLOCK SKIP GROUP 3)
tool will be slower in the rapid but much /3 Nll (BLOCK SKIP GROUP 3)
Also, the feedrate switch control sys-
tem will become effective, offering additional flexibility.
N4S ...
When the program proving is and the tool
approach is confirmed, the block skip can be set ON, to pre- rules apply skip function as
vent the GO I motion from processed. Both 02309 for normal version. Incidentally, the II selection is
and 10 are typical of breaking with tradition same as a plam slash only, so blocks N3 and N4 above,
to a specific result. could have also writte~ (his
171
172 Chapter
• Dwell Command Structure The control unit interprets such a command as a dwell,
The structure - or format - for the function is: not as a axis mOlion. This is because of the of the
preparatory command 004, which establishes meaning of
the address that follows it. If using the X or U address for
X5 • 3 AU machines, excludingJlXed cycles dwell not feel comfortable, use the third alternative -
us . 3 l£JJhes the address P. Keep in mind, the address P dues nat ac-
P53 ... Allmtlchines. illcludingjix.edcyc/es cept lhe decimal point, so the dwel1 is programmed directly
as the number of milliseconds to control the pause duration.
In any case, typical representation is five digits before One millisecond is l/lOOOlh of a second, therefore one sec-
and three digits after decimal point, although that ond is equivalent to 1000 milliseconds.
vary on different control systems.
aU,"IlC~'i:>"',) X and U can also
Since milliseconds or seconds can be used as units of seconds, without a decimal point -
dwell, the relationship can be established:
1304 X2.0 is equal to 1304 DODO
1s = 1000ms
Leading zero suppression is assumed in the format with-
out the poinl (trailing zeros are
lms = O.OOls
Pl POOOl ... I m.iJ.Jisecond
II:~ where .. pl0 POOIO .. 10 milliseconds
s = second Ploa P01DO .•. TOO milliseconds
ms millisecond
Depending on the programming for dwell. the
Examples of practical application of the dwell fonnat are: range of programmable time varies. For format using
digits in front of a decimal point and three oigils fol-
G04 X2. 0 p' pYt[ferredfor long dwells lOWing it, the is 0.001 of a and up to
99999.999 presents a range from mInI-
1304 P2 000 n. pnd"erred for short or memwn dwells
mum of l/lOOOth of a second, up to hours, 46 minutes
1304 U2. 0 ... l(jJhe in seconds and 39.999 '''TI''lIH-
In example, the dwell is 2 seconds or 2000 millisec- Dwell programming applications are identical to both
onds. All are shown. The nexi example is machining centers and lathes, but U address can only
similar: used in lathe programs. The of either or
English dimensional units has no effect on the dwell func-
1304 XO.S tion whatsoever, as is not dimensional.
G04 P500
1304 UO.5
DWELL TIME SELECTION
example illustrates a dwell of 500 milliseconds, or
one half of a Again, all three formats are shown. Seldom ever the dwell lime will exceed more than just a
seconds, most often much less than only one second.
a CNC program, the dwell function may appear in the
Dwell is a nonproductive lime it should se-
following way - note dwell as a separate block:
lected as the shortest time needed to accomplish the re-
N21 1301 Z-l. 5 F12.0 quired action. The time delay for completion of a particular
N22 1304 XO.3 (DWELL COMMAND O. 3 SEC) machine operation or a special machine accessory is usu-
N23 Z-2.7 F8.0 ally by machine manufacturer. Selecting
dwell time for CUlling purposes is al ways re-
Programs using X or U addresses may cause a possible sponsibility. Unfortunately, some programmers often over-
confusion, particularly to new The X and U the dwell duration. After all. one second seems
may incorrectly be interpreted as an motion. short but think about this example:
This will never be the case. By definition, the X axis and its
lathe application, the U is the dwelling axis. X axis is In one block of program. a dwell function is assigned
the only common to all CNC machines. for the duration of one The speed is set to
480 rlmin and the dwell is applied at locatjons on the
part. perhaps during a operation. That means the
cycle lime for each part 50 seconds longer with dwell,
then it would without dwell. Fifty seconds may not
DWELL COMMAND 173
~ee~ too unreasonable, but are they really necessary? Give MINIMUM DWEll
Jl a Itnle thought or - even better calculate it If the dweU·
must used at all, sure to calculate mlllllnum
dwell that can do the job. It is easy to the dwell arbi- During a cut, is for operations where cuttino tool is
by and without much thinking. In ex- contact with the machined part, minimum d:ell defini-
ample, the minimum dwell required is only 0.125 seconds: tion is important, but selting is unimportant (time
or number of revolutions).
60 I 480 = 0.125
Minimum dwell is the time
This minimum dwell is eight less than pro- to complete one revolution of the spindle,
grammed dwell of one second. If minimum dwell is
used rather estimated dwelL the wlll Minimum dwell, programmed seconds, can calcu-
crease by only 6.25 seconds, than 50 sec- lated, a simple
- a significant improvement in programming effi-
and productivity on the machine. 60
Minimum dwell (sec) =
Minimum dwell calculation and other issues related to it r /min
are shortly.
C Example:
SETTING MODE AND DWEll
To calculate minimum dwell in seconds for spindle rota-
Most programs machining centers will use feedrate tion of 420 r/min, divide rlmin into sixty (there are 60
per lime (programmed in inches per minute - in/min - or in one minute):
millimeters minute - mrn/min). applications are
normally programmed in per revolution, as 60 I 420 = 0.143 seconds dwell
revolution - in/rev - or millimeters per revolution -
mmlrev. On many Fanuc controls. a parameter setting al- The format selection of dwell block in the program will
lows programming a in the elapsed in sec- depending on the machine type used and a
onds or milliseconds - or the number ofspindle revolutions. programming All following examples represent
Each has practical uses and benefits. same dwell time of 0.143 of a ;)",,",'uuu
pending on parameter setting, the dwell com-
G04 XO.143
will assume a different meaning with setting: G04 P143
G04 UO.143
• Time Setting
Regardless which formal is used, all dwell values in
specify dwell time of 143 which is
a second. It is allowed to m
one program, but such a practice not represent consis-
tent slyle.
practical dwell applications in a program,
calculated minimum dwell is only mathematically correct
G04 PlOOO and not be most practical value to use. It is always
\ better to round off the calculated value of the minimum
... represents dwell of one second, to 1000 dwell slightly upwards. example. the G04 XO.I may
mi lliseconds. become 004 XO.2, or - if a double value is used - then G04
XO.143 wlll G04 XO.286, or even G04 XO.3 LO
• Number of Revolutions Setting round off the
For the of spindle revolutions the dwell is reasoning for this takes inlO consider-
expressed as the number of the spindle rotates, within ation some machining It is quite normal that the
the of()'OOI to 99999.999 revolutions, for example: CNC may be running 11 certain job with the
speed in an override perhaps even set at its
G04 P1000 at 50%. Since 50% spindle speed override is
minimum on most CNC controls, the double mini·
... represents the dwell the duration one revolution mum will at least one complete
of the spindle. revolution, without of production lime.
174 24
NUMBER Of REVOLUTIONS
In the other dwell mode (selected
the format only to the same,
but be much different. In some appJica- ~ where ...
desirable to program a for a certain
revolutions, rather than for a 60 : : : Number of minutes (translation factor)
n :::: Required number of spindle revolutions
r/min:::: Current spindle speed (revolutions per minute)
In a lathe
tion programmed to
C) Example:
groov i ng tool to To calculate in seconds for full three
to clean up die revolutions, at of 420 rfmin, the formula
time in secomlS can be applied:
Dwell is programmed for one half of a second duration, e:> Example - Machining Centers Spindle test:
with spindle rotation set to 80 r/min. The
for one half a second S100 'M03 (100 R/MIN mITIAL SPEED)
G04 X600.0 (600 SECONDS IS 10 MINUTES)
ao x 0.5 I 60 = 0.6666667 SSOO (SPEED INCREASED TO 500 R/MIN)
G04 X1200.0 (1200 SECONDS IS 20 MINUTES)
which is less than one complete spindle revolution. The S1S00 (SPEED INCREASED TO 1500 R/MIN)
G04 X1800.0 (1800 SECONDS IS 30
reason for programming the dwell function in MOS (SPINDI..:E:
place is not honored and the lime has to
creased. of 0.5 seconds is therefore not sufficient. The example for machining centers starts with the initial
The dwell has La calculated, the for- spindle rotation of 100 rim in. That selection is followed by
mula presented earlier: the dwell of 600 seconds, guarantees a 10 minute
constant run. spindle speed is then increased to 500
60 x 1 I 80 = 0.75 seconds r/min the dwell lime to 1200 for
minutes. last selection is 1500 spindle speed run-
Generally, there is not much use type of calcula- ning far 1800 seconds. or 30 minutes, before the
tions - most programming assignments can be handled very spindle stops.
well with the standard dwell per time calculations.
e:> Example - lathes - Spindle test:
LONG DWELL TIME
M43 (GEAR RANGE SELECTION)
G97 S100 M03 (100 R/MIN mITIAL
For machining purposes on CNC machines, an unusually G04 X600.0 (600 SECONDS IS ~o MINUTES)
long dwell is neither Does that SSOO (SPEED DlCREASED TO 500 R/MIN)
mean long dwell times are not G04 X1200.0 (1200 SECONDS IS 20 MINUTES)
S1S00 (SPEED DlCREASED TO 1500 R/MIN)
A long dwell is the programmed time that is well 004 X1800.0 (1800 SECONDS IS 30 MINUTES)
above the established average for most normal MOS (SPlNDLE
Lions. Seldom ever there is a need to dwell time
during a part machining in excess of one, two, three, or four is very similar to one for a ma-
seconds. The range available on the system first The initial spindle speed
(over 27 hours) more important to the nl(lintl'nat1a pn- range for example. M43.
than to programmer. A~ an example of a spindle been set to 100 r/min. The of
typical application when a long dwel1 may,be beneficial, is follows,leaving the spindle rotating for full Ja
a program developed by maintenance technicians minutes. Then the speed is increased to 500 r/min and re-
testing the spindle functionality. mains that for another minutes (1200 seconds).
fore the is stopped, one more is done - the
carefully the following actual situation com- spindle speed increases to 1500 r/min and remains at that
mon to machine - a spindle of the CNC machine for another 30 minutes (1800 seconds).
has repaired must be before the machine
can baqk to production. The will
consist of running the at various for a cer-
tain period time of selection.
In a typical the maintenance department re- • Machine WarmaUp
a small program, In the machine "'1.1' II,,","..
A similar program (typically a subprogram) that uses a
will rotate 10 minutes aL 100 r/min, then for
minutes at r/min. followed by the spindle rotalion at long dwell time is favored by many CNC programmers and
CNC operators, to 'warm-up' the machine before
highest rate of 1500 r/min additional 30 minutes.
program development is not an absolute since the running a critical job. This warming activity takes
maintenance technician may do the test by manual meth- place typically at the start of a morning shift during winter
manual approach will not be very but it months or in a cold shop. This aI-
machine to a ambient t",n'lT\Pr",tl
serve the purpose of the maintenance test.
before any precisian components are machined. same
A better choice in cases is to Slore testing proce- approach can also be used to gradually the maximum
dure as a program, directly into CNC memory. spindle speed for high-speed machining (5000 r/min and
maintenance (service) program wi)) be a little different up). As usually, all safety considerations must have a high
for machining centers than for but the objec- priority in all cases.
tives will remain the same.
1 24
is a reason - because the X axis is the only com- Several fixed can be programmed with a
mon to all machine tools - i.e., machines, o Normally, GSB,GS9
mills, machining centers. flame cutters,
and so on. They all use XYZ axes. o Also cycles and G84, only by parameter setting
(there is no Y axis) and wire EDM uses
no Z machines are similar. The dwell cycles is always P, to avoid du-
in the same block. The address U
• Safety and Dwell and the command are never programmed in a cy-
cle - the dwell function is 'built' into all fixed cycles thal al-
reminders have low the dwell (technically all cycles do).
a great degree of caution
,,"YPTr'''''''' rules for dwell time remain the same
dwell limes. particularly or fixed cycles, as for any machining application.
'1"1""""''''''' The CNC machine should never be
unattended. In case of long Q Example.
for warning signs should be prominently
posted to prevent a potentially unsafe situation. If N9 GB2 Xl.2 YO.o RO.2 Z-O.7 P300 F12.0
are not someone else should
- 0.3
chine serviced,
dwell will become
live upon motion along the Z axis (actual
motion), but rapid return motion.
If a 004 P.. is programmed as a separate block in a fixed
tool or cycle mode, for example between the G82 block and the
sel1 inspection, lubrication, etc., block, no cycle will be in that block and the
must if absolutely necessary
value of P in the fixed definition is not updated. On
gram execution ~ as a manual operation, never the/latest controls, a system setting enables or
program control! disables this usage. If this is used, the command
G04 P.. will be active tool rapid motion from
location just completed. function will always
executed while the cutting is out of a hole, in the clear
This feature is seldom Y~""'lIr~'fl
FIXED CYCLES
Machining holes is probably the most common method of point-to-point machining for holes is a
tion, mainly done on CNC milling machines and method of controlling the of a cutting tool in X
iog centers. Even in the traditionaJly known for Y axes at a rapid rate, and in the Z at a
their complex parts, and aerospace compo- cutting feed rate. Some motions along Z axis may also in-
nents manufacturing, instrumentation, optical clude rapid motions. All this means is that there is no cut-
or mold making industries, holes is a vital part ting along XY axes for operations. When the
of the manufacturing nr-r,rp.,~<.: tool completes al [ motions the Z axis and returns
from the hole to the position, motions
When we think of what machining holes means, we X Y axes resume and to a new
probably think first of such operations as center drilling, the Z are repeated. Usually, this
spot drilling and standard drilling, using common tools. of motions occurs at locations. The hole
However, this category is wider. Other related and is by cutting tool
tions also belong to the category of machining holes. Ihe cutting depth is controlled by the part program.
standard center drilling, spot drilling and drilling are method of machining is Iypical to fixed cycles for
together with related as tapping. reaming, tapping, boring and related operations.
point boring. tools, countersinking
even backboring. elementary structure for point-to-
point machining can four general
Machimng one simple hole may only one tool but (typical drilling sequence shown in example):
and complex hole several tools to be
Number of holes a given job is im- a Step 1: Rapid motion to the hole location
portant for selection of proper ,..,,.,..,. . . rJ:l'mnnl approach. ... along the Xand/or Yaxis
holes machined with a 2: Rapid motion to point of the cut
having the same ... along the Z axis
they may even be at o 3: Feedrate motion to the spe:ClTIl90 depth
combinations are ... along the Zaxis
Illd'lUlIl~ one hole may be a ::.111111111;;'
o 4: Return to a clear position
many different hole ... along the Zaxis
a well planned anu
four also I'pn,r.,<:"nr
In of programming applications. hole opera- required to program a
a great number of similarities from one job to programming method, without
another. Hole machining is a reasonably predictable opera- is only one or two holes a
tion and operation that is is an ideal subject is more a
to be very efficiently by a For this rea- program length is of no impor-
son, virtually aU CNC control manufacturers have incorpo- is not the common case - normally, there are
ingenious for in a part and several tools to be used to
in their control use so the hole to engineering specifications. Such a
or - morecnmmnnly - Ihefixed cycles. program could be extremely loug and difficult Lo inLer-
pret and In fact, it may even too long to fit into
POINT-TO-POINT MACHINING the memory.
177
178 25
• Single Tool Motions VS. Fixed Cycles NS G99 GS2 RO.I Z-O.6813 P200 F4.5
N6 X3. S7 Y3. 4
following two compare N7 X2. 047
programming a hole pattern in individual N8 GSa G28 X2.047 Y3.4 ZI.O M09
where each of the tool must be as a N9 M30
~ingle motion and same pattern using a %
cycle (02502). No explanations lO the programs are
at this stage comparison is only a visual 02501 required the total of 18 blocks, even
Lration between two distinct programming methods, It three only. In program 02502, cycles,
shows an application of a 03116 standard drill Ihat is used only nine blocks were needed. shorter program 02502
to cut a full blind depth of inches. Only holes are is also easier to there are no repetitious blocks. The
programmed in the example, lf1 moditications, updates and olher changes can be
much whenever required. use cy-
machining holes, even if a single is machined.
02502 (EXAMPLE 2)
(PROGRAM USES FIXED CYCLE) G87 Back boring cycle
Nl G20
N2 Gl1 G40 GSO GSB Boring cycle
N3 G90 Gs4 GOO XS.9 Yl.89 S900 M03
Ga9 Boring
N4 G43 Zl.O HOl MOB
FIXED CYCLES 179
'--________
Y_=__H_O_le__
p_OS_j_tio_n__in__
Y_a_X_is________ ~1 1~
o
________ s_pe_c_if_i~__t_io_n________~
F_=__F_ee_d_r_a_te__
Applies to the cutting motion only
Y value can be an absolute or incremental value
ThiS value is expressed in in/min or mmlmin, depending
R = Z axis start position = R level on the dimensional input selection.
~ Example:
method
GSO Z1.125 is the SOJ11eGS lated to the point of origin - program zero,
menIal method, the XY position of one hole is
Gao GOO Zl.125 or from the XY position of the previous
the distance from {he last Z value, one established
GOO Zl.12S calling the cycle, to the position where
vated. The Z depth value is the
01, namely GOO, G01, and the termination of feed rate motion. At
are the main motion com- fixed cycle, [001 motion 10 the R will
any fix.ed cycle. rapid mode,
FIXED CYCLES 181
INITIAL INITIAL From the practical point of view. always select this posi-
LEVEL LEVEL lion as the safe level - not just anywhere and not without
/--- some prior thoughts. It is important that the level to which
/ the tool retracts when G98 command is in effect is physi-
--->t cally above all obstacles. Use the initial level with other
R
- R LEVEL precautions. to prevent n collision of the cutting tool during
rapid motions. A collision occurs when the cutting tool is in
lO--+-
an undesirable contact with the part, the holding fixture, or
the machine itself.
Z DEPTH CALCULATIONS
fixed cycle must include a depth of cut. is the
at which the cutting tool stops feeding into the male-
Depth is programmed by the Z address in the
block. The point for the depth cut is programmed as a Z
value, normally lower the R level the initial level.
Again, 087 cycle is an exception.
To achieve a of a high quality, always make a
(Z DEPTH) cffort to program the calculated Zdepth accurately-
.:>vv........
exactly, without guessing its value or even rounding it
off. It may tempting to round-off the depth
Figure 25-5 .6979 to .6980 or even to - avoid it! It is not a question
R level selection for fixed of triviality or whether one can away with it. It is a mal-
ter of principle programming consislem.:y. With this ap-
of cutting .£>"",... .. ".'" and it will be so easier to retrace the
it is also the Z to which cutting tool will retract cause of a problem, should one develop later.
upon cycle completion, if preparatory command G99 was
programmed. If G98 was programmed, retract will Z depth calculation is on the following criteria:
to the level. Later, the G87 back boring cycle will
Q Dimension of hole in the drawing (diameter and depth)
described as an exception, due to its purpose, This cycle
not use G99 retract mode, only G98! However, all o Absolute or incremental programming method
the R level
L.VL..u."I. must be selected carefully. The o Type of cutting tool used + Added tool point length
most common values are .04-.20 of an inch (I mm) above
the part ZOo Part setnp has 10 considered as well, and Q Material thickness or full depth of the hole
justments to the setting if necessary. o Selected clearances above and below material
R level usually increases about or four for (below material clearance for through holes)
tapping operations cycles G74 G84, to the On machining the ZfJ is pro-
feedrate acceleration 10 reach maximum. grammed as top of finished part face. In case, the
absolute of Z address will always be programmed as
c::> Example of Alevel programming: a negative value, Recall the absence of a sign in an axis
address means a positive value of that This
N29 G90 GOO GS4 X6. 7 YB. a S850 M03 has one strong advantage. In case programmer
N30 G43 Z1.0 H04 MOB (INITIAL LEVEL IS 1. a) to write the !l.lgn, the depth value will automatically
N31 G99 G8S RO.l Z-1.6 F9.0 ® LEVEL IS 0.1) .--'·".....'A a positive value. In that case, the tool will
N32 move away the part, area. The
part program win not be easily cor-
rected, with only a loss
N45 Gao
c::> of Z depth calculation:
initial level in the example is in N30, set to
.0. The R is set in block N3) (cycle block) as illustrate a practical example Z depth
,100 inches. same block, the G99 command is pro- consider the hole detail in Figure We will use a 0.75
grammed during the That means inch drill to a hole, with a full depth
the tool will above pan zero at the stall and a standard drill is the tuullip
end of When the tool moves from one hole to the consideration. Its design has a typical 1 to 1200 point
next, it moves along the XY axes only at this Z height level and we have (0 add an additional .225 inches 10 the
.100 above work. depth:
The R pO.'\ilion is normally lnwPr Ihe initial .3 x .75 .225
level position. If these two levels coincide, the start and end 2.25 + .225 = 2.475
points are equivalent to initial position. The R is
commonly programmed as an value, in total Z depth of 2.475 can
but into an incremental mode I. if the
application from such a change.
G99 G83 X9.0 Y-4.0 RO.1 Z-2.47S Q1.125 F12.0
FIXED
81
RO.1
"""""'7"777"7i--t7:'177""'7'7'7 - Z0
INCREMENTAL ABSOLUTE
Figure 25-6
25-7
Z depth calculation for a drilling fixed cycle
G81 fixed lVVII~I:IIIV used for drilling
A peck drilling cycle is used in the example for best
machining, although Z would be the same • Ga2· Spot-Drilling Cycle
for G81, G82 or G73 tool point length calcula-
tion is described in in Chapter 26.
For deep hole drilling, also known as peck drilling, where the
drill has to be retracted above the part (to a clearance position)
after drilling to a certain depth. Compare this cycle with the
high speed deep hole drilling cycle G73.
G99
G83
Q
G98
Q
Q
- - - - - - - - - " -.. . .- .....~ Z DEPTH
Figure 25-10
·:::=d
G73 fixed cycle - typically used far deep hole driJling
(this cycle does not retract to R level after each peck)
-,0--- Z'DEPTH
Number of pecks calculation
Figure 25-9
G83 fixed cycle - typically used for deep hole drilling When using G83 and G73 in the always
(this cycle retracts to R level after each have at least a reasonable idea about how many pecks will
the tool in each hole. Unnecessary drilling of
hundreds or thousands of will accumulate total
lost time. which can can very significant. Try 10 avoid
• 613 - Deep Hole Drilling Cycle· High-Speed too many pecks hole. For predictable results,
the number of
number of pecks calculation applies equally to both
G83 and fixed cycles. Calculation the number of
Description of G73
in G83 and G73 is on the of the Q
motion to XY position <>/""I,.lrp"", and the distance between the R level and Z
depth not from the top of part! Dividing this distance
2 Rapid motion to R level the Q value will a number of
Feedrate mOlion to Z depth tool will make at hole location. The number of
3 by the amount of Q value in a cycle must an integer and fractional calcula-
must always rounded upwards:
FIXED 185
example, the between the R level and Z case, no rounding is uO;;;.... O;;;:>:><11 QO.625 will re-
depth is exactly 45 mm and the Q value is ]5 mm. The suit jn exactly four pecks. each of depth.
number of pecks will be 45 by 15, which equals to
exact value of 3. No and the num- drilling value of Q cannot be changed
of pecks executed per hole - all pecks in a will have an equal
the possible exception peck. If the
In order to increase amount is greater than the remaining distance to
change the current Q Zdepth. only that will be drilled.
necessary,
IS
depth of peck~ consider the over-
the number of pecks may nc','",,,,,P for the job. The setup rigidity, the
any cycle time benefits. part fixturing, of cutting tool, the machinability
of material and other contribute to what the
Q Example 3 - tool can withstand.
G74
25-11
G84fixed eXC./USII'IBIV used for right hand tapping G98
ccw
• - Tapping Cycle - Reverse
G8S
- typically used for rough and semifinish
Figure 25-13
G85 - typically used and lBi1rlllllU
Step
figure 25-15
G87 cycle - t:}(GIUSI'VBIV used for backboring
I G89
---l Q r--
.. ~ G98
[ G99
----+-~--+---zo
DWELL
z ~--->--- Z DEPTH
N34 GSO
N3S GOO XS.O Y-S.75
7
cases, rather small, but
I and J are very important to cycles. Al-
retract to initial level (with though GOO without G80 would the cycle, it is a
8 poor programming practice that should be avoided.
or remain at R level (with G99)
------------------~
Boring operations, usually those for hole finishing, where the the assumption that most holes
quality of the completed hole is very important The quality In the CNC program, there
may be determined by the hole dimensional accuracy, its f'r.rnn"\'''nr1 that would indicate
Normally, the control system will execute a cycle at hole location! is no need this type ma-
only once at a given location - it this case, there is no need .chining. By changing the formal only a Htlie, the fixed cy-
to program the number of executions, since the system de- cle repetition can be used as a benefit - to make the
faults to one automatically. To repeat the fixed cycle more powerful
limes (more than once), program a special command that
'tells' CNC system how many times you want the fixed N33 G90 G99 ...
cycle to be executed. N34 Gal X17.0 Y20.0 RO.l Z-2.4 F12.0
N35 G91 XS.O L3 (K3)
• The L or K Address N36 G90 GSO GOO •..
The command that specifies the number of repetitions With that change, the advantage of a feature 'hidden' in
(sometimes called loops) is programmed with the address the first example is emphasized - equal increment
Lor K some controls. The L or K the fixed (ween holes being exactJy inches. By using incre-
cycle repetition is to have a value which is mental mode, on a temporary basis in block N35 and em-
equivalent to a program statement LI or LI or Kl ploying the power of the repetitive count L or K, the CNC
address does not have to be specified in the program can be shortened dramatically. This method
programming is very efficient a large number of hole
For example. the call of the following drilling patterns in a single program. A fwther enhancement is (0
sequence, combine the L or K count with or macros.
good chance that the majority of pro- All the relevant information is in the but some
grams machining centers machining of at details and is needed.
1"", . ., . . . . . . . ."
least one hole, probably more. From a spot drill to hole location X3.SYS.0 was in the drawing, as
reamIng, and a complex backboring, the field of -mild program will
hole very large. In we at La top face of part. and tapping opera-
many available machin- are obvious, but is that all there ta know?
ing, and learn a drilling
and . and sin- How many tools will be needed? What about center drill-
ing to maintain exact location Is the spot drill a
What about drilled hole for
The most common type of hole lapping? What about the hole trdtl'r"'"I'J>(O
chining centers is in the area of drilling, What about ... ?
and single point A typical
may bc to centcr drill or spot drill a • Tooling Selection and Applications
drill them, then or bore them. Machining even a single
hole will the fixed I to 089, on the drawing information alone, it may seem
G73, G74 and all described in Ltll.U"'"
only two tools will be needed to program this hole. In real-
ity, the implied information must interpreted - it is not
the the drawing to how to machine the
SINGLE HOLE EVALUATION hole - only the hole requirements related to functionality
and A CNC machinist will most likely
even a hole on a aJ I re- four tools machining are
to be programmed. Before that, cut- selected, tool could be a 90° spot drill, followed up
selected, speeds and applied, the by the tap drill. the through-the-hole drill and finally,
best setup and many other must tap. A center drill may instead of the
be resolved. Regardless of exact start spot drill, but an additional tool will be to chamfer
with a thorough evaluation the hole at the top. All choices to be sorted.
relates to the drawing data. will usu- For this example, the following four are used:
define the material to machined, the hole location
its dimensional Holes are often described, o Tool 1 • TO 1 • 90 0 spot drill (+ chamfer)
rather than dimensioned the programmer has to o Toal2· T02 - Utap drill ,VJ .•>UUI
191
192 26
00.4375 TAP
ii-"--<-'l······
In genera] terms, for thin stock, 75 to 80%
thread depth is recommended, for
:--....,. .~ 00.4675 CHAMFER
100%. A thread (hat
Figure 26-2 the bolt
by only
Spot drill operation detail TD 1 in program 02601
for
Note, that for a 90° the depth of cut will programmed Z depth the tap drill has to be deep
one half of the diameter (0 x to guarantee the full thread depth of .875.
means the full diameter of drill has to reach a little
.4675 I 2 deeper, for example, to That allows the end
or .4675 x .5 .23375 c.hamfer length of the tap (0 the full lap depth of
or Z-O. 2338 specified in the shows the lap
drill values graphically.
Drill point length is later in this chapter.
Tool 2 • Tap Drill (U)
will have to be a drill. In the ex-
used the job - one the f
the other one for lap
is - which one first? I
0.975
II certainly does matter drill is programmed first. 1.5
The key here is the the two drill dia-
meters. It is a very small only .0555 measured
on diameter, in fact. a machining point of view, it
makes sense to use the larger drill first, than the smaller
drill. The tap drill is larger than the through hole drill, so the
will be the lap drill If drill is programmed
firs!, the larger drill that produce an inaccurate
hole, due to a very small amount material to remove. 26·3
drill detail- T02 in program 02601
Now comes the question of In
question is called a tap It is will create a actual programmed depth for the tap drill will have to
hole of proper size depth) that can be into consideration one more factor ~ drill poim
the lap that of operations. lenRth. drill or - 1001- point length is abbre-
machining operation tapping, it makes a viated as or just by the letter P. This Cmlp[(~r
MACHINING
table showing "" ... r"'1:" mathematical constants to calculate most through-hole applications, this value will not be
drill point most common constant uses the drill - some extra clearance has to be added, applied to
diameter by .300, a 1180 drill point angle: the tool penetration (breakthrough), say fifty UJVIUi)<1'
• Programming Considerations During the cut, the drill angular end will be gradually
-.
A standard drill has, regardless of size, two important
entered into the part, creating an increasingly larger hole
features - the diameter and the point angle. The diameter is diameter, yet still smaller than the drill diameter. At the
end, (he largest machined diameter will be equivalent to the
selected according to the requirements of the drawing, the
tool point angle relates to the material hardness. They are effective diameter of the drill used. The effective drill diam-
both closely connected; since the diameter determines the eter defines the actual bole diameter created within the zone
size of the drilled hole, the tool point angle detennines its of the drill end point. Typical use of this kind of machining
depth. A smaller consideration is the number of flutes, is a spot drilling operation for chamfering. The spindle
which is normally two. speed and feed must be calculated according to the effective
drill diameter. not the full diameter. The rlmin for the effec-
tive diameter will be higher and the feedrate lower than the
• Nominal Drill Diameter
corresponding values for the nominal drill size. For this
The major consideration for a drill is always its diameter. kind of jobs, selection of a short drill for rigidity is advised.
Normally, the drill diameter is selected based on the infor-
mation in the drawing. If the drawing calls for a hole that • Drill Point length
needs only drilling and does not need any additional ma-
chining, the drill is a standard drill. Its diameter is equiva- The second important consideration is the length of the
lent to the size specified in the drawing. A drill size of this drill point. This length is very important to establish the
kind is called a nominaL or 'off-the-shelf' size. cutter depth for the full diameter. With the exception of a
flat bottom drill, all twist drills have an angular point whose
Most applications involve holes that require other specifi- angle and length must be known in programming. The an-
cations in addition to their diameter - they include toler- gles are considerably standard and the length must be cal-
ances, surface finish, chamfer, concentricity, etc. In those culated rather than estimated. because of its importance to
cases, a single regular drill cannot be used alone and still the accurate hole depth - Figure 26-6.
satisfy all requirements. A nominal drill alone, even if the
size is available. will not guarantee a high quality bole, due
to machining conditions. Choosing a multitool technique to --j 00 r- QJO ::: Drill
diameter
machine such a hole is a better choice. The normal practice
in those cases is to use a drill size a bit smaller than the final
hole diameter. then use one or more additional tools, which
are capable of finishing the hole to the drawing specifica-
tions. These tools cover boring bars, reamers, chamfering
<ttj> Y
1
~I
j
p
A
p
:;;:
:::
Tool point
angle
Tool point
tools, end mills and others. Using these tools does mean length
more work is involved, but the quality of the finished part
should never be traded for personal conveniences. Figure 26·6
Tool point length data for a standard twist drill
• Effective Drill Diameter
On indexable insert drills this length is different, due to
In many cases, a drill is used to penetrate its/ull diameter the drill construction. The indexable drill is not flat and its
through the part. In many other cases, only a small portion drill point length must also be considered in programming.
of the drill end point is used - a portion of the angular drill A tooling catalogue shows the dimensions.
tip - Figure 26-5.
The drill poinllength can be found quite easily. providing
the diameter of the drill (nominal or effective) and the drill
NOMINAL point angle are known. From the following fonnula and the
DRILL DIAMETER table of constants, the required drill point length for stan-
dard drills can be calculated. Basic fonnula is:
I
J A
tan ( 90 - - )
PROGRAMMED J p ==
2
2
x D
DEPTH (P)
EFFECTIVE
~ where ...
DRILL DIAMETER
p = Length of the drill point
Figure 26·5
Nominal and effective drill diameters (tvvist drill shown)
A = Included angle of the drill point
0 = Diameter of the drill
1
same formula can be and used with a The most common tool center drilling is a
mathematical constant (fixed drill point angle): center drill (often called a combined drill and countersink),
producing a 60° angle. North American
trial standards use a numbering system from #00 to
(plain type) or #11 to # 18 (bell type) for center drills. In
metric system, center are defined by the pilot
for example, a 4 mm center will have the pilot
meter of 4 mm. In cases, the higher the number, the
P ::::: Drill point length the center drill For some
o = Drill diameter at ions. such as a tool with a
K = Constant (see the following table)
called a spot drill, is a choice.
most common constants are listed in this table:
Many programmers estimate the depth of a center
drill, rather than calculate it. Perhaps a calculation is not
Tool Point Angle necessary for a operation. What is a ......"VJJ,.v .....
(degrees~ Constant compromise guessing and calculating is a
60 ,866025404 similar to in Figure 26-7.
82 ,575184204 .575
90 ,500000000 .500
D D1
118 30310 .300
130 53829
runs true - no more than .0 J0 inch (0.25 mm) (To- PECK DRilLING
tal Indicator Reading). On spindles that have a quill, try t6
work with the quill spindle, or extend it as little as
possible. Coolant provisions may an internal Peck drilling is aJso interrupted cut drilling. It is a
ant, and special adapters are available for through the hole drilling operation, using the fixed cycles G83 (standard
cooling, when drill is on machining centers. peck drilling cycle) or G73 speed peck drilling cy-
cle). The difference between two cycles is tool re-
On a CNC lathe, the indexable drilling tool is always sta- tract method. In the retract each peck will be to
tionary. correct requires (he drill is the R (usually the hole), in there will only
tioned on the center and concentric with the spindle cen- be a relract (between .02 and .04 inches).
terline. concentricity should nol exceecl JlO') inch
(0.127 rom) T.l.R. Peck drilling IS often used for holes that are too deep to
drilled with a single tool Peck methods
exercise care when operation starts several opportunities to improve standard
on a ""rl'",..,. that is not flat. For use 1IIU't;)I.<l.UU::; techniques as well. Here are some possible uses of
drills on surfaces that are 90" to the drill axis (flat drilling methods for machining holes:
Within the drill can be used to enter or exit an
o Oeep drilling
inclined, uneven, concave, or convex quite success-
fully. The may to be reduced the duration o Chip - also used short holes in materials
of interrupted cut. The 26-/0 shows the areas
o Cleanup of chips accumulated on the flutes of the drill
the feed rate should be slower.
o Frequent cooling and lubricating of the drill cutting
o Controlling the drill penetration through the material
For example. in following GR1 will be four pecks and the last one only cut
.0001 - or practically nothing at alL those cases, where
N73 G99 Ga3 x .. Y•. RO.12S Z-1.225 00.5 F12.0 the last cut is very small and inefficient, always round the
calculated Q upwards, in this case to the minimum of
distance is 1 divided by .$00, .4464 or even to .447:
which yields Since the pecks can onty
positive, the nearest higher integer will be the actual N14 G99 Gsa x.. Y.. RO.l Z-1.239 00.441 F12.0
number of pecks, in this case 3.
Always remember, cutting tool will never go past
• Selecting the Number of Pecks programmed Z depth, but it could reach depth in a very
inefficient way that should be corrected.
Much more common is the programming of a
number of If only a certain number of pecks will do • Controlfing Breakthrough Depth
the job in the most efficient way. Q value has to be cal-
culated Since the Q value specifies·the depth Less frequent programming method, also very powerful,
each peck not number pecks, some simple is to use the peck drilling cycle to the breakthrough
math will be nccd~d to select the depth Q. so it corresponds of tbe drilllhrough the material, regardless of the drill size
to the number of or material thickness. Here is some background. In many
tough materials, when the drill starts the
For example - we require 3 pecks in the following cycle- tom of the part (for a through hole), creates potentially
what will the Q depth difficult machining conditions. The drill the tendency
to push the materia! out rather than cut it This is most com-
N14 G99 G83 x •• Y.• RO.l Z-1.238 0 •• F12.0 mon when the drill is a little dull, the material is tough. or
the feed rate is fairly adverse conditions are also
The total drill travel from the R to the Z depth is
the result of heat generated at the drill the lack lu-
1.338. To calculate the depth Q value, the new
brication reaching the drill cutting edge, worn-off flutes
mula is similar to the one:
and several other factors.
The solution to problem is to relieve the
pressure when it is about halfway through the hole, but not
completely through - 26- J I,
IGi' where
Z-0.825
Peck drilling cycle G83 is great for it, but the Q depth A reaming operation will require a coolant to help make a
eulalion is extremely important. The total number of peeks better quality finish and to remove during cut-
is not important, only the last two are for this ling. Standard coolants are quite suitable, since there is not
pose. To control the problem with the drill very much heat generated during reaming. The coolant also
tration, only two peck motions are needed. illustration serves in an additional role, to flush away chips from
sllOws tile two positions a 0112 dril1 drill through 113/4 the part and to maintain surface finish quality.
thick plate.
• Reamer DeSign
most jobs, a hole requires no special treatment.
Just one ctrt through (using G81 cycle) and no drill- In terms of design, there are two of a reamer that
Let'S/evaluate Ihe solution to situation. The have a direct relationship to the CNC machining and pro-
has point length of .300 x .500 = .1 Take one gramming. The consideration is the flute design.
half (.075) of the drill point length as the first
amount, which will bring the drjl\ .075 below the 3/4 Most reamers are designed with a left-hand nute
thickness, to (he Z depth of Z-0.825. This depth has to be tion. This design is suitable to ream rhrough holes. During
reached with value of{he Q depth. in mind that the the the left-hand flute the to the
Q depth is an incremental value, from the R bottom of the an empty space. holes
level, in this case RO. J. That specifies the Q depth as that have to be reamed, the len-hand type of a reamer may
QO.925 (.100 above .825 below ZO). The not suitable.
Z depth is the final drill depth. If .05 added other factor of the reamer design is the end chamfer.
below the plate, the Z depth will be the sum of the plate In to enter an existing hole that i5> ~till without a
thickness (.75), the (.05) and tbe drill point chamfer, a allowance is required. reamer end
(.150), the program value of provides that allowance. Some reamers also have a short
taper at their the same purpose. The chamfered
G99 Ga3 x .. Y.. RO.1 Z-O.9S QO.925 F •.
is sometimes a 'beveUead'and its chamfer an 'attack
does not only solve a particular job re- angle'. Both have to he considered in programming.
lated problem, it also shows how creativity and program-
ming are complementary terms. • Spindle Speeds for Reaming
Just like for standard drilling and other operations, the
REAMING spindle speed for must closely
to the of material being Olher factors, such
The ream operations are very to the drilling op- as the part setup, its rigidity, its and surface finish of the
erations, at least as far as the programming method is con- completed hole, etc., each contributes to spindle
cerned. While a drill is used to make a hole (to open up the
hole), D reamer is used to enLarge an existing hole, rule, thc spindJe speed for
Reamers are either cylindrical or tapered, usually de- will reasonable use a modifying factor
with more than two of different configura- .660 (213), based on the speed used for drilllng of the same
tions. of cobalt, carbide material. example, if a speed of 500 r/min produced
with brazed carbide lips. reamer design has its ad- drilling conditions, the two thirds (.660) of that
reasonable for r",,,,rn,,..,,,·
vantages and Carbide reamer, for example,
has a resistance to wear, may be not economi-
500 x .660 = 330 r/min
cally justified every hole. A high speed steel reamer is
economical, but wears out much that a carbide
Do not program a reaming motion in the reversed spindle
reamer. Many jobs do nol accept any compromise in the
rotation - the cutting may or dull.
tooling selection and cuning 100\ has to selected cor-
reedy for a given job. Sizing and finishing such as a
reamer, have to be even more carefully. • Feedrates for Reaming
The reaming are programmed higher than those
Reamer is a sizing tool and is not designed for removal of
used for drilling. Double or triple are not unusual.
heavy stock. During a reaming operation, an existing hole
The purpose of the high feedrales is to force the reamer to
will be - reamer will an existing hole to close
cut, rather than to rub the material. If the is too
erances add a high quality finish. Reaming will
slow, the reamer wears out rapidly. slow feedrates
not guarantee concentricity of a hole. holes requiring
cause heavy pressures as reamer actually tries to en-
both high concentricity and tight center drill or
the hole, rather than remove stock.
spot drill the hole firsl, then drill it the normal then
rough bore it and only then finish it with a reamer.
202 Chapter 26
Just any other cutting tool, a single point boring When machine is oriented, it must be in a
achieves the best cutting results if it is short, and run'S slopped The cannot rotate during any ma-
concentric with spindle centerline. One of the main causes chining operation that requires a spindle shift. Review de-
of bored holes is the boring bar deflection, applying scriptions of the fine boring fixed cycle G76 the
equally to milling and turning. TIle 1001 tip (usually a car- boring cycle G87 Chapter 25. Machine operator must
bide bil), should be properly ground, with suitable cutting alwnys know which way the spindle and into
CfPr'rnF'I ...... ' and position of the direction lool shift actually moves.
in the spindle or its orientation - is very important
many boring operations on machining centers. Programming a bored hole that will later
r~"'""';"ethe boring bar only to assure the and
• Spindle Orientation straightness of finished hole. surface finish the
bored is not too important If the boring is the last ma-
Any round tool, such as a drill or an end mill, can enter or chinmg operation in the hole, the are that the sur-
exit a hole along the Z with IiUle programming con- finish be very important It is difficult to retract the
siderations for the hole quality. Neither of the tools is boring lool without leaving drag marks on the hole cylin-
holes that high quality finish close drical that case, select a suitable fixed
tolerances. \Vith boring, the hole surface integrity is very probably the precision boring cycle G76 is the
important. Many boring operations that the cutting
tool not the hole during retract. • Block Tools
retracting from a almost always leaves some marks in
the hole, special methods retract must be There is When using a single point boring bar for roughing or
one such method - it uses cycle G76 or G87 with the semi finishing operations, there is an oplion lhat is more ef-
dIe orientation feature of the a shift bor- ficient. This option also uses a boring tool, one that has
ing tool away from the finished surface. feature was two cutting (180 0 opposite) instead of one - it is
already described in Chapter 12, so just a reminder now. called a block tool. Block tools cannot be used fine fin-
ishing operations, they cannot shifted. The only
The sale purpose of spindJe orientation is (0 replace way of programming a block lool is within the 'in-and-out'
tool holder in exactly the same position after each tool tool motion. Several fixed cycles support this kind mo-
change. Without orientation, the tool tip will stop at tion. All 'in at a specified On way
a random position of circumference. Orienting spin- 'out', some motions are feed rates, are rapid, depend-
dle boring purposes is only one half of the solution. The ing on cycle selection. cycles that can used with
other is setting position of the boring is block tools are G81 G82 (feed-in~rapid-out), as well as
a responsibility of the operator, since it has to be done and that in and feeds oul while the machine
setup at the machine. The boring bar cutting must spindle is rotating and another one, G86, when the tool re-
set in such a way that when shift place in fixed cy- tracts while is not
cle or it will into direction away from the
finished hole ideally by the vector relative to the The greatest advantage of a block lool is
angle of the orientation - 26-13. that can programmed for this tool.
jf the feed rate for a single point tool is .007 per flute, a
block tool it will be at least double .. 014 inches per flute or
more. Block tools are generally available in from
about 0.750 inch and
CUTIING
BIT
A
BORING WITH A TOOL SHifT
There are two fixed cycles that require the tool shift away
from the centerline of current bole. These cycles are boring
G76 and G87. G76 is by far most useful both
are illustrated in 02604.
G76 cycle has been described in detail in the previ- - - - - + - - CUTTING DIAMETER
ous chapter. In (his chapter is an actual programming ex-
BODY DIAMETER
shown as a single hole in Figure 26-/4 - mm.
BACK CLEARANCE
r
I ~:"""':"~::-==r=:=~~~~«<~. . . .~ R level
30
Figure 26·15
Setup considerations lor a backboring roo/
Figure 26·14
Drawing for 676 and 687 programming example - program 02604
• Programming Example
From the drawing. only the mm hole is considered,
In order to show a complete program. four tools will be
and the program input will quile simple:
used - spot drill (TO I). drill (T02) , standard boring bar
N .. G99 G76 xo YO R2.0 Z-31.0 QO.3 F12S.0 (T03) and a back boring (T04). Program is 02604.
A hole bored with G76 cycle will have a high quality. 02604 (G76 AND GS7 BORING)
(TOl 15 MM DIA SPOT DRILL - 90 DEG)
Nl G2l
• Backboring Cycle G81 N2 Gl? G40 GSO TOl
N3 MaG
Although backboring cycle some applications, it
N4 G90 G54 GOO XO YO 51200 M03 T02
is not a common fixed cycle. the name suggests, it is a NS G43 ZlO.O H01 MOS
boring cycle that works in the reverse direction than other No G99 G82 R2.0 Z-S.O PlOO FI00.0
cycles· from the back oflhe part. Typically, the backboring N7 GBO Z10.0 M09
operation starts at the bottom the hole, which is the 'back N8 G28 Z10.0 MOS
of the part', and the boring proceeds from the bottom up- N9 MOl.
wards, in the Z positive direction.
(T02 - 24 MM DIA DRILL)
The cycle has described in the previous chap- mo TOJ
ter. The Figure also shows a diameter of 27 mm, Nll. M06
which will be during the same setup as the mm NlJ G90 G54 GOO XO YO 5650 M03 T03
N13 G43 ZlO.O H02 MOS
hole. This larger diameter is at the 'back side of the part' ) Nl4 G99 GBl R2.0 Z-39.2 F200.0
and it will be backbored, using the G87 Nl5 GSO ZlO.O M09
N16 G28 Zl.O.O MOS
Figure shows the setup of tool that will bore
Nl7 MOl
the 27 mm hole, from (he bottom of the hole, upwards.
a attention to the descriptions. (T03 - 2S MM DIA STANDARD BORING BAR)
NlB T03
In the illustration, the 01 the diameter of Nl9 M06
smaller hole. and 02 the diameter of (he hole to N20 G90 G54 GOO XO YO S900 M03 T04
be backbored. is always than 01. Always make N21 G43 ZlO.O H03 MaS
sure there is enough clearance the body of the boring N22 G99 G76 R2.0 Z-31.0 QO.3 F125.0 (25 DIA)
bar within hole at the hole bottom. N23 GSO ZlO.O M09
N24 G28 ZlO.O MOS
N25 MOl
MACHINING HOLES 205
o For the G76 cycle, only a minimum Q value is required To the programming (lnd the required
0.3 mm or .012 inches} calculations, the cutting tool used must known first Fig.
ure 26~J6 shows a typical countersinking
o For the cycle, the Q value must be greater than one
half of the difference the two diameters:
(D2·D1)12 == == 1, A '-
plus the standard minimum Q (0.3 mm)
I
o Always watch for the body of boring bar, so it does
not hit the surface during the shift. This can happen
with boring bars, small holes, or a large shift amount.
o Always watch the body of the boring bar, so it does not
hit an obstacle the part. Remember that the tool L
length o11set is measured to the cutting edge, not to the
actual bottom of the boring tool.
o G87 is always programmed in G98
never in G99 mode I!!
o Always know the shift rllTI',r:ttrln and set the tool properly
26-16
ENLARGING HOLES
Typical nomenclature of a countersinking tool
An existing can also the top. In the illustration, d is the countersink body A is
enlarge an existing hole at the top, we can use one of three countersink angle, F is the diameter of the lool nat
methods thal will an existing hole. These methods (equal to z.ero for a sharp end), I is the body length.
are common in every machine shop. They are:
Programming of a requires certain data in the
o Countersinking C'SINK or CSINK on drawings drawing. This information is provided through a de-
o Counterboring C'BORE or CaORE on drawings (leader/text) in the drawing, for
o Spotfacing S.F., or on drawings .78 DIA CSINK - 82 OEG
13/32 DRILL THRU
Ai! three machining methods will enlarge an existing
hole, with one common purpose they will allow the fitting
Chapter 26
• Counterboring
Counlerborlng is an operation enlarges an existing
hole in a cylindrical shape to the depth. Counter-
for holes that have to accommodate a round
It is often used on uneven or rough surfaces. or
are not at 90° to boll assembly. As for the
selection, use a tool specially de-
for this type of machining, or a suitable end mill
e In either case, the uses G82 fixed cycle.
depth of the is always given) there
Figure 26- 78 are no extra calculations 26-19 a
for calculating the Z depth of a countersink, counterboring
D and F and the A
MACHINING
Figure 26-19
Programming example of a counterboring operation
Note that a Sjng~e required three blocks of the The higher clearance for the R level allows acceleration
program, rather than usual one. . of the feed rate 0 to 30 Inches minute to place
only one plate in the Also note in block N 16. in the air. the tap contacts the part, cutting feed rate
Only one hole is in the example, so the 098 is not re- should at programmed value, 1101 less. A good rule of
needed. cancellation command G80 with a thumb is to program the tapping clearance about two to
return motion in block N17 take care of the tool re- four the normal clearance. This will guar-
tract from hole. However. if more holes are machined, antee the feedrate [0 be fully effective when the actual
move LoollO the new 080 is pro- ping begins. Try to a slightly smaller num-
In this case, 098 is when the drilts ber, to the program more efficient. Another good
penetrates the last plate of the parr. example is nOI a method is to double, triple, or quadruple the ojrlIe tap
solution to drilting cuts, as there is still some and use that value as the above the Which-
wasted motion. only efficient programming is ever method is used, purpose is to eliminate the feedrate
to use the optional custom macro technique and develop a associated with motion acceleration.
unique efficient web drilling cycle.
Another was the amount. The
high value 30 in/min (F30.0) has also been carefully cal-
TAPPING culated. Any cutting fecdratc tapping must synchro-
nized with the spindle - the rlmin programmed as the
Tapping is only to drilling as the most common S Keep in mind that the tap is basically aform tool
hole operation on machining centers. it is the thread size shape are buill it Later in
very common to tap on a CNC mill or a center, chapter, the between the spindle speed and the
two tapping fixed cycles are avai lable for programming feed rate is explained in more detail. The cutting F
plications on most control systems. are the G84 in the program example was calculated by mUltiplying the
for normal (R/H), and cycle for reverse thread leod the spindle given as rlmin:
tapping (UH):
F 1 / 20 TPI x 600 r/min "" 30. a in/min
for righl hand threads
to calculale feedrate is to divide the spindle
the number threads per (TPI):
Reverse tapping - for hand threads
G74 with M04 spindle rotation F = 600 r/min / 20 TPI = 30.0
quality of the tapped hole is important, but it is
following shows that programming a not influenced solely by the correct of
one hole is to other fixed All feeds, but by other as welL The
motions, including spindle stop and the tap. its coating, its the flute
boltom are in the helix configuration, (he the start-up
being cut - tap holder itself all have a
profound effect on final quality of tapped hole.
N64 G90 G54 GOO Xl.S Y7.125 S600 M03 T06 best results in tapping, a floating is mandatory,
NoS G43 Zl.O HOS MOS
N66 G99 GB4 RO.4 Z-O.B4 F30.0
unless the CNC machine supports tapping.
N67 GSO ing tap holder design gives the tap a 'feel', similar to the
feel that is needed for manual tapping. A floating tap holder
Is it possible to tell the tap used? It should In the has is called the tension-compression holder and its
example, the tap 20 TPI (twenty threads applications are the same for both milling and turning
per inch). plug tap. coordinates are missing from erations. This type of holder allows tap to be pulled out
the cycle, current tool position has of it or pushed it, within The only
established in block N64. The usual R level is the able difference is the mounting of the tool (tool ori-
starting pOSltlon the Z depth is the absolute depth entation) in the machine (either vertical or horizontal).
thread. The address in the block is feedrate in inches High end floating tap holders also have an adjustable
per minute (in/min), programmed with the F which can the feel of the and even
of the tension
the R ofRO.4 has a value that is somewhat
higher than might used for reaming, single Tapping applications on CNC are similar to those
point boring and similar operations. the programmed on machining centers. A tapping a lathe
feed rate to be unreasonably high. is a control is not needed, as one tap size can used per
reason for values - (hey are bOlh correct selected part tapping programmed the 032
intentionally. command and block-by-block method.
210 Chapter 26
I
lathe tapping is different but not mo~difficult than
tapping for CNC machimng centers. Because it does nol
use fixed cycles, make some common errors. _a TAPERED
This chapter llses examples for tapping on CNC lathes in a
sufficient depth .
• Tap Geometry
a PLUG
are literally of lap used in
CNC programming applications. A book would eas-
ily be filledjusr on the topic of tapping tools and their appli-
calions. For CNC only the core of tap a BOTTOMING
geometry are important.
are two considerations in
Figure 26·23
the programming and the
Typical tap end - chamfer geometry configuI8lion
o Tap geometry
o Tap chamfer geometry The major
tap chamfer. 26·23 shows how the of
Flute Geometry the drilled hole wi 11 influence programmed depth of the se-
lected
The flute geometry of a tap is described in tooling cata-
logues in terms such as 'low helix', 'high helix', 'spiral The tap length c is measured as the number of
flute', and These terms basically how the threads. A typical number of threads for a
cutting are ground into body of When is 8 to ! 0, a tap 3 to 5, for a
programming a tapping operation, the effectiveness of (he I The angle chamfer a varies for
flute geometry is tied to the spindle Experimenting typically 4-5 0 for the tap, 8-1 the plug tap and
with the tapping is limited by tap lead (pitch), 25-35° for the bottoming tap.
but (here is a greater latitude with the spindle speed selec-
tion. The material and flute geometry of the lap A blind will almost always require a bottoming tap,
both influence machine spindle speed. almost all a through hole will require a in most cases and a ta-
designs (not limited to only) are the of per in some rarer cases. in different words,
corporate policies, engineering decisions and philosophies, the the lap the greater depth allowance must
various trade names and marketing there is not a be to each drilled hole.
one way use tool' or 'use for a CNC
program. tooling catalogue of a tool is the best • Tapping Speed and feedrate
source of technical data, but a catalogue from another sup- The relationship of the spindle (r/min)
plier provide a solution to a particular and programmed cutting feedrate is extremely impor-
Information gathered from a catalogue is a very good start- tant when programming the cutting motion in feedrate per
ing the data in (he CNC program. Keep in mind time mode. Per time mode is programmed as in/min (inches
that the share some common characteristics. minute) in programs English and mmlmin
Tap Chamfer Geometry (millimeters minute) for metric units programming.
This per minute mode is typical to CNC milling machines
chamfer geometry relates to the end configuration of and machining where virtually all work is done
the For CNC programming, the most important of ther in in/min or For tapping operations,
the tap end point geometry is the tap chamfer. less of the machine tool. Iltways program the cutting
rate as distance muSI during one
In order to program a hole tap must spindle revolution. This always equivalent to the
selected according to the specifications hole being lead of the which is the same as the tap pitch (for tap-
If tapping a blind hole, a different tap is required only), taps are normally used to cut a
tapping a hote. are three of only.
taps, divided by their geometry configuration:
the feedrate revolution mode, mode tbat
o Bottoming tap 1alhes, the is always equivalent to
o Plug tap the feed rate. example, of .050 results in .050
feedrate. or FO.OS in the
a Taper tap
MACHINING 211
""""I ......'" the typical mode is actual feed rate value would be F26.1 or even
always per in per minute and the- to change the spindle speed of the tool in pro-
feedrate is cruculated by one of the following formulas: on the CNC machine, forget to
modify the feedrate the tapping tool This mistake
can happen during program preparation the office or dur-
ing optimization at the machine. if the is
small, may be no more due to luck than in-
tent. If the change of spindle speed is major, the tap will
~ where ... most likely break in
In the program, the new tapping tpop.,(1 ... ",tp will be:
F = 27.5 - 5% : 26.125
212
straight pipe the following With modern CNC machines, the method of rigid lap-
drills are recommended: ping has become quite popular. is no need for "U'~'-l''''1
holders. such as the compression type -
Decimal Size ular end mill holders or collet chucks can be
the cost of tool the CNC
.2500 control sys(em must suppan the rigid tapping
1/8 27 .3438 ture. To program there is a special M
1/4 18 7/16 .4375
available - check the
3/8 18 37/64 .5781 The rigid tapping mode must be supported by
% 14 23/32 .7188 the eNC machine before it can be used in a progr
3/4 14 59/64 .9219
1.0 11- 1.1563 HOLE OPERATIONS ON A LATHE
1-1/4 1.5000
1.7500
point hole on a CNC lathe are much
1·1/2
more than on a CNC machining center.
2.0 2.2188 the number of drilled or tapped in a
operation on a lathe is one part (two are
The tapping feed rate maintains the same relationships rare). while the holes (or a
pipe taps as for standard may be in lens, hundreds and even thousands.
boring (internal on a lathe is a LUlU..,.'"
• Tapping Check lion, unlike boring on a milling machine, which is a point-
to-point operation.
When programming a operation, sure
program data reflect the true machining conditions. All the point-to-point machining operations on a CNC
may vary between majority of them are lathe are limited to those that can be machined with the cul-
cal to any tapping on any type of CNC ting tool spindle centerline. Typically,
Here is a short list that relate directly to (he tapping these operations center drilling, drilling,
operations in CNC I"\r{"\ar!'\m,ml reaming and A variety of other cutting tools may
u Tap cutting (have to be sharp and properly
also be a center cutting mill (slot
dri II) to open up a or to make a flat bottom An in-
u Tap design the hole being tapped) ternaJ burnishing may also be used for such
u Tap ;;,h.ronmi"nt to be aligned with tapped hole)
as precise a hote, etc. To a lesser op-
erations, such as counterboring and may
programmed at lathe spindle centerline, with a special
the point-to-point - not a contouring tool. operations in
o Tap feed rate (has to be related to the lead and this will have one common denominator - they are all
the machine speed) centerline and with the X
program
o Part setup
(rigidity of the machine setup and the tool is important) for all onaCNC
o Drilled hole must be premachined correctly
lathe must programmed in
(tap drill is important) (r/min), not in the constant
that reason, is used - for
o Clearance for the tap start position
(allow clearance for acceleration) G91 SS15 1403
o Cutting fluid ;::'CIC;I"UU
will assure the required r/min at the normal spindle
U Clearance at the hole bottom 100% spindle
(the of thread must be
happen if is used with G96 com-
o Tap holder torque adjustment of cutting)
than the proper command? The CNC
o Program integrity (no errors) will use the given information, the spindle
in the program (given peripheraJ - or
of tap holders have their own special re- per minute, asft/min). will then calculate
which mayor may not any effect on the required spindle speed in for (he use by (he ma-
If in doubt, always with the
for operation.
MACHINING 213
the cutting tool is safely out of the hole, it has to re- • Peck Drilling Cycle· G14
turn to tool changing position. are two methods:
On Fanuc and compatible there is a multiple re-
Q Simultaneous motion of both axes pelitive cycle G74 available, can be used for two differ-
ent machining operations:
o Single axis at a time
o Simple roughing with chip breaking
Simultaneous motion of the Z axes does not pres-
same problem as it on - on the con- o Peck drilling (deep hole drilling)
Z axis will complete motion first, moving this section, the peck drilling usage of the G74 cycle is
the part face. Also, is no reason to fear a The roughing of the G74 is a
during a return motion if approach motion was . operation
,-,,-,,-.,,.ll .... and the programming was consistent:
ordinary drilling.
first, then
mo GOl Z-O. 8563 FO. 007 starting position finally. its depth posi-
ml GOO ZO.l
N'72 XU. 0 Z2. 0 T0200 M09
tion. In addition, establish (or even calculate) the depth of
each peck. The lathe cycle 074 is limited in what it
can do, but it has its uses. Its format for peck-drilling is:
If in or if an obstacle is to in the way of
a tool for example a program a single G74 xo Z •• K ••
axis at a time. In most cases, that will move the positive X
IGi" where ...
axis first. as most obstacles would be to the right of the part:
G74 drilling cycle
XO Indicates cutting on ....m'?"'.·lj""
N70 GOl Z-O.SS63 FO.007
N'71 GOO ZO.l Z == Specifies the end point for drilling
N72 X12.0 K Depth of each peck (always positive)
N73 Z2. a T0200 M09
following program uses illustration in Figure 26-24,
and shows an exampk~ of a 6 hole (0.1875)
The example illustrates the return motion with a drill depth of .300
with the programmed first Tht! that Lhe tuol is
.] 00 off the front face is irrelevant - after all, Ihe tool started
Culling that distance without a .....1"1,1'\1,...,., NBS T0400 M42
N86 G97 S1200 M03
Other, traditional, methods for the tool motion ta- N87 GOO XO ZO.2 T0404 MOS
N88 G74 XO Z-O.BS63 KO.3 FO.007
wards and the part are N89 GOO X12.0 Z2.0 T0400 M09
N90 MOl
• Drilling and Reaming on lathes
on a is also quite common operation,
as means a hole opening to be used with other
tools, such as There are three
drilling, typical to a lathe machining:
o Center drilling and spotfacing 6
o Drilling with a drill
o Indexable insert drilling
Z-O.l
Z-O.4
Z-O.7
Z-O.SS63
TOOL
HOLDER
9/16-12 TAP
Figure 26-25
Typical setup of a fool on a lathe - program examples 02607 and 02608
216
,,
Overall, i( means that all holes wllhm a pauern are ma-
chined the same any tool. 0-
2
TYPICAL HOLE PATTERNS o •
l 1B 20
. .4
~_ _ _ _ _ _ _ _ _ _..... O!~_J_._L_1.
Hole paHerns can be categorized
each group having the same character.
encountered in CNC programming figure 27·'
the following pattern groups: Random pattern of hotes· program example 02701
o pattern
are no special lime saving used in pro-
o Straight row pattern gramming a random - only a fixed
used at individual hole locations. All XY coordinates
o Angular row pattern
within the hole pattern have to programmed manually;
o Corner pattern control features will no help here at all:
217
218 Cha 27
N7 GBO M09
N8 G28 ZO MOS
N9 G28 XO YO
o
o o
NlO M30
%
2.0 / 5 = .4 27-4
Angular with coordinates, pitch - 02704
The other calculation method uses lTigonometric fllnc-
which may also be as a confirmation of the first In to calculate the X and Y coordinate use
vice versa. Both must be identical, or trigonometric functions in this case:
is a mistake somewhere in the calculation. First, es-
x = 4.0 x coa15 = 3.863703305
Y = 4.0 x sin15 1.03527618
10.47251349"
can be written after you round off the calculated
C = 2.0 / sinA = 11.00329063 . program 02704:
02703 (AN'GOLAR Raq Since the calculated increments are rounded values, a certain
m G20 accumulative error is inevitable. In most cases, any error will
N2 G17 G40 GBO be well contained within the drawing tolerances.
N3 G90 G54 GOO X1.0 YO.62S S900 M03 However, for the projects highest precision, this
N4 G43 Zl.O HOl M08 error may be important and must taken into consideration.
NS G99 Gal RO.l Z-O.163 F3.0
N6 G91 X2.164 YO.4 L5 (K5)
220 Chapter 27
To make sure all calculations are correct, a simple check- comer hole will be machined twice. Visualize the whole
ing method can be used (0 compare the calculated values: process - the last hole of one row pattern is also the first
hole of the next pattern, duplicated. Creating a special cus-
~ Step 1 tom macro is worth the time for many comer patterns. The
nonnal solution is to move the lool to the first position, call
Find the absolute coordinates XY of the last hole:
(he required cycle and remain within that cycle:
x 2.0 + (4.0 x 6 x coalS) 02705 (CORNER PA'I'TERN)
= 25.1B221983 = X25.1822 Nl G20
N2 G17 G40 GaO
Y = 2.0 + (4.0 x 6 x sinl5) N3 G90 G54 GOO X2.2 Yl.9 S900 M03
N4 G43 Zl.O H01 MOS
= 8.211657082 = YB.2117
N5 G99 G8l RO.1 Z-0.163 F3.0
N6 G91 Xl.5 Yl.B L2 (K2)
~ Step 2 N7 Xl. 8 L6 (K6)
NB Y-l. B L2 (K2)
Compare these new XY coordinates with (he previously N9 GSO M09
calculated increments as they relate to the lasl hole of the mo G28 ZO MOS
pattern (using rounded values): Nll G2B XO YO
Nl2 1000
x = 2.0 + 3.8637 x 6 25.1822 % .
Y = 2.0 + 1.0353 x 6 = 8.2118
l1le program offers 00 special challenges. In block N6,
Note that both X and Y values are accurate. When round- the angular row of holes is machined, starting from the
ing. particularly when a large number of holes is involved, lower lefl hole, in N7 it is the horizontal row of holes, and
the accumulative error may cause the hole pattern out of in N8 the vertical row of holes is machined. The order is
tolerance. In that case, the only correct way to handle the continuous. Just like in the earlier examples, keep in mind
programming is to calculate the coordinates of each hole as that the repetition count Lor K is for the number of moves
absolute dimensions (that means from a common point (spaces), not the number of holes.
rather than a previous point). The programming process
will take a little longer, but it will be much more accurate. GRID PATTERN
CORNER PATTERN Basic straIght grid pattern can also be defined as a set of
equally spaced vertical and horizontal holes, each row hav-
Pattern of holes can be arranged as a corner - which is ing equally spaced holes. If the spacing of all vertical holes
nothing more than a pattern combining the straight and/or is the same as the spacing of all horizontal rows, the final
angular hole patterns - Figure 27-5, grid pattern will be a square. ff the spacing of all vertical
holes is not the same as the spacing of all horizontal rows,
the resulting grid pattem is a rectangle. A grid pattern is
1,5---' --- 1.8 l i-- someti mes called a rectangular hole pattern - Figure 27-6.
I I
OOOOUJ--,
- 2.2 00000
00000
figure 27-5 00000 I
Corner pattern of holes· program example 02705
0·0 0 0 (]j---.-L
2.4
All rules mentioned for the straight and angular hole pat-
terns apply for a corner pattern as well. The most important '---1.7
-r I
difference is the corner hole. which is common to two rows.
A comer pattern can be programmed by calling a fixed cy- Figure 27-6
cle for each row. Soon, it will become apparent that each Rectangular grid hole pattern - program example 02706
PATTERN HOLES 1
e 3
Use the same
culate XY coordinates
hole in the pattern, included
the second hole angle will be 40°, the third
Hole #2
arc center locations are known, so is the x = 1.5 + 2.5 x cosSO = 1.934120444 .9341)
and Y == 1.0 + 2.5 x sinelO '" 3.462019383 .462)
N9 G80 M09 First, select the machining location to start from, usually
N10 G28 ZO.l MOS at program zero. Then find the absolute XY coordinates for
N11 G2B Xl.9341 Y3.462 the center of the given circle. In the illustration, the bolt pat-
N12 MJO
tern center coordinates are X7.5Y6,0 ..There will be no ma-
%
Chining at this location, but the center of the circle will be
There are two other methods (perhaps more efiicient) to the starting point for calculations of all holes on the bolt cir-
program an arc hole pattern. The first method will take an cle, When the circle center coordinates are known, write
advantage of the local coordinate system G52. described in them down. Each hole coordinate on the circumference
Chapter 40. The second method will use the polar coordi- must be adjusted by one of these values. When all calcula-
nate system (optional on most controls), described later in tions for the first hole are done (based on the circle center),
this chapter - In program 027 JO. continue to calculate the X and Y coordinates for the other
holes on the circle circumference, in an orderly manner.
BOLT HOLE CIRCLE PATTERN In example 02709 are 6 equally spaced holes on the bolt
circle diameter of 10.0 inches. That means there is a 60° in-
A pattcrn of equally spaced holes along the circumfer- crement between holes (360/6=60). The most common
ence of a circle is called a bolt circle pattern or a bolt hole starting position for machining is at the boundary between
pattern. Since the circle diameter is actually pitch diameter quadrants. That means the most likely start will be at a po-
of the pattern, another name for the bolt circle pattern of sition that corresponds to the 3, 12,9 or 6 o'clock on the
holes is a pitch circle pattern. The programming approach face of an analog watch. In this example, the start will be at
is very similar to any other pattern, particularly to the arc the 3 o'clock position. There is no hole at the selected loca-
hole pattern and mainly depends on the way the bolt circle tion, the nearest one will be at 30° in the counterclockwise
pattern is oriented and how the drawing is dimensioned. direction. A good idea is to identify this hole as a hole num-
ber I. C?ther holes may be identified in a similar way, pref-
A typical bolt circle in a drawing is defined by XY coor- erably In the order of machining, relative to the first hole.
dinates of the circle center, its radius or diameter, the num-
ber of equally spaced holes along the circumference, and Note that each calculation uses exactly the same format.
the angular orientation of holes, usually in relation to the X Any other mathematical approach can be used as well, but
axis (that is to the zero degrees). watch the consistency of all calculations:
C
mon than others, for example, x '" 7.5 + 5.0 x cos30 '" 11. 830127 (Xl1.8301)
y == 6.0 + 5.0 x sin30 '" 8.500000 8 s1
4,5,6,8,10,12,16,18,20,24 .
Hole #2
In later examples, the 6-hoJe and the 8-hole patterns (and
their multiples) have two standard angular relationship to x 7.5 + 5.0 x cos90 7.5000000 (X7 .5)
==
the X axis at zero degrees. Y 6.0 + 5.0 x sin90 ::;; 11.0000000 (Yl1. 0)
Figure 27- 9 is a typical bolt circle drawing. The program- Hole #3
ming approach for a bolt circle is similar to arc paHern.
x '" 7.5+ 5.0 x cos150 3.1698729B (X3 .1699)
Y = 6.0 + 5.0 x sin150 '" 8.50000000 (Y8.S)
Hole #4
x :;: :
7.5 + 5.0 x cos210 3.16987298 (X3.1699)
010.0 y '" 6.0 -I- 5.0 x sin210 3.50000000 (Y3.5)
Hole #5
I
x == 7.5 -I- 5.0 x cos270 == 7.50000000 (X7 • 5)
Y == 6.0 + 5.0 x sin270 == 1.00000000 (Yl.O)
L
I - 7. 5 - -t Hole #6
Figure 27-9
x == 7.5 + 5.0 x cos330 == 11.930127 (XU.8301)
Y '" 6.0 + 5.0 x sin330 :;::: 3.500000 (Y3.5)
Bolt circle hole pattern· program 02709
224 Chapter 27
Once all are calculated, the program is writ- the following explanation and [he
ten in the same way as patterns: any hole in any bolt circle pattern can
The formula is similar for both axes:
02709 (BOLT CIRCLE
Nl G20
N2 017 040 080 X cos«(n-l)x B+A)x R+X,
N3 G90 G54 GOO Xll.8301 Y8.S S900 M03
N4 G43 Zl.O HOI MOe
N5 G99 G8l RO.l Z-O.163 F3.0 Y «(n-l)x B+A)x R+Yc
N6 X7. 5 Yll. 0
N7 D.1699 YB.S ~ where ...
N8 Y3.S
N9 X7.S Yl.O
NlO X11.830l Y3.S
x X coordinate
Y ::::: Hole Y coordinate
Nll GBO M09 n :::: Hole number counter - CCW from 0"
Nl2 G2S ZO.l MOS H Number of equally spaced holes
Nl3 G91 G2B XO YO B:::::: between holes = 360 I H
Nl4 ICO A ::::: First hole angle· from 0°
% R ::::: Bolt radius or bolt circle diameter12
Xc ::: Bolt center from the X origin
It would be more logical to bolt circle center as Yc :=; Bo It circle center from the Y orig in
program zero, rather than the lower comer of the part.
ThIS method would el" of the boll cir- • Pattern Orientation
center position for each value and perhaps
reduce a possibility of an error. At same time, it would The bolt orientation is specified by the an-
it more djfficult to set the on the ma- gle of the the 0° of the bolt circle.
chine. The best solution is to use coordinate
offset method. This method is especially useful for those In daily bolt circle patterns will have not
jobs that require translation of boll (or any only different llUIIlVl"1 holes, but different orientations as
paUern) to other locations same part setup. For well. bolt most commonly affected are those
details on the G52 command, see 40. spaced holes is based on the mul-
...) and multiples of eight (4, 8,
• Bolt Circle formula 16,24,32, ... ). relationship is important, since the ori-
entation of the first hole wlllinfluence the position of all the
In calculations,
The methods are the same, only
are repetitious
changes.
other holes in the bolt pattern. I
of calculation offers an opportunity for Figure 27-1 J shows relationship of the first holt\position
a common formula that can used, for av"n-> ... ' to the 0° location 0" location is equivalent
of a computer program, calculator data input. to the 3 o'clock or the direction.
etc. 27-10 shows the basis for such a formula.
'j
B
I
\ R
~
._-,.....i
N.. G16 (POLAR COORDINATES ON) next program 02711, are equally spaced on
N •• G9 •• GS .. x .. Y .. R •• Z •• F •• the bolt circle circumference. Dimensions in Figure 27- J3
N •. are to the coordinate prCignurururlg lTlemlOa.
N •• (MACHlN.ING HOLES)
N •.
N •• G15 u .....1•..........,. CDORDlNA'l'ES OFF)
height
milling is a machining operation that controls
machined part. For most applications,
• Selection Criteria
milling is a relatively simple operation, at least in the sense Based on the job to be mill
it usually does not include any difficult "V'lLU'.'" GUller has to Lake into account
cuWng tool used for face milling is typically a Q Condition of the eNC machine
tooth cutter, called a face mill, although end
for certain face milling operations, usu- Q Material oftha part
aUy within smaJl areas. The top surfaces machined with a o Setup method and work holding integrity
mill are generally perpendicular to the of the
cutter. In CNC programming, the face Q Method of mounting
are fairly simple, although two important .... v,'''' .....'''. Q Overall construction of the cutter
are
o Face mill diameter
Q Selection of the cutter diameter
Q Insert geometry
Q Initial starting position of the tool in to
The last two items, cutter geometry,
It to have some experience will influence the actual the most,
milling principles, such as the right cutter although other items are
tion, distribution of cuts, machine power
other technical considerations. • face Min Diameter
ones are covered in this chapter, but
catalogues and various technical ...""F,,,,...,, ... ,,.,,,.
in-depth source.
227
Chapter 28
Figure 28-5a illustrates incorrect and Figure XOYO is at lower left comer. To establish
the correct width a face mill cut. In the example (a), lhe position, consider the part length of
cutter is in the part with full causing the cutter (512=2.5) and the (.25). start
friction at cutting and tool The ex- X axis position will be the sum of these values, X7.75. For
ample (b) keeps only 2/3 of the cutter diameter in the Y axis start position the n,vp'f'hi'lnO'<.:
work, which causes a suitable chip as well as fa- on edges and select climb milling (It the same
vorable angle insert entry into the material Actually, the climb milling be combined with a
little of conventional which is quite normal face
• Single face Mill Cut milling operations. Figure shows the cutter start posi-
tion at X7.75Y 1.0, and end position at X-2.75Y 1.0, as
For first face programming example, we will well as the of calculations.
use a 5x3 (1 inch thick) that has to be face milled
along the top to the final thickness of .800.
28-6 shows this simple drawing.
---5.0--~
3.0
5)(3
28·7
5)(3)(1 PLATE Face mill positions for a single face mill cut example
Figure 28-6 The position YLO was based on the desire to have about
Example af a single (ace miff cllt - program 02801 one quarter to one third of the cutter overhang at
part edge, best insert entry angle. 1.5 inch over-
From the drawing is apparent that the face milling will is 30% of cutter diameter, the programmed
place along part, so the X axis horizontal direction position was established at a convenient YI.O.
will be selected. Before the can be started,
are two major decisions to Now, part program for the single milling cut can be
written, with the top as program zero (ZO). Only one
a mill diameter
face cut is used - program example 02801.
a Start and position of the cut
02801
There are important decisions to make, but these (SINGLE FACE MILLING COT)
two are the most N1 G20
N2 Gi? G40 G80
The part i~ only 3 inches wide. so a face mill that is wider NJ G90 G54 GOO X7.75 Yl.O 5344 M03
than 3 inches should be selected. Allhough a inch N'4 G43 Zl.O HOi
mill seems like a natural choice, let's see if it conforms N5 GOl Z-O.2 F50.0 MOS
to the conditions that been established earlier. N6 X-2.?S F21. 0
diameter should be 1.3 to 1.6 larger than the width m GOO Zl. 0 M09
N8 G28 X-2.?S Yl.O Zl.0
cut. In this case, 3 x 1.3 = 3.90 and 3 x !.6 4.80. With a N9 MJO
04.0 mill, that means only I times larger. Coo- %
need for cutter to overlap both of the
;)""I'<A-lIUU of afive face mill diameter is Spindle speed and are based on 450 ftlmin sur-
face speed, .006" per tooth and 8 cutting used only
Once the mill has as Note the Z axis approach in block N4.
trate on the sfart and end positions. reasons,
Although the tool is well above an empty area, rapid
plunging to the depth has to start away from the part, in
motion is split between blocks N4 and N5, for safety rea-
air. The decision to cut along the X axis (horizontally) has sons. With increased confidence, rapid to the directly
been so the is whether from the left to the be an option, if This shows the pro-
or from the right to left. It does not
ZO at the top of the unmachined not the more
except for the direction of chip flow, so selection from [he
customary finished face.
to the left is arbitrary.
232 Chapter 28
Figure 28·10
Schematic tool path representation for the climb face milling made,
applied tD a unidirectional cutting
ROUGHING FINISHING
illustration the order and direction of
FigUre28~ viduallooi motions. is to make each cut approxi-
Unidirecti naf approach to a multiple face cut mately same width, only about 213 of diameter
for rough d finish face milling cutting at any time, and always in climb milling mode.
Compare the motions of two methods, In
a tool path difference (cutter position) between
irlg and finiShing is also showli. The directi?n .may
13
10'S
be either the X or the Y pnnclpIes i
~
of the cutting motion will remain the same.
Note the start position (S) nod the end position (E) in the 6
two illustrations. They are indicated by the heavy dot at
center of cutter. Regardless of the cutting method, face
milling cutter is always in a clear position at start and 13 x 6
of cutting, mainly for safety reasons.
Figure 28-11
Example of a multiple face mill cut - program 028D2
FACE MILLING 233
The programming example multiple face milling cuts of the examples could been done in a shorter
is based on the drawing shown in Figure 28-11. The previ- the X resulting in a smaller program. How-
ously discussed are applied should present no purpose of exampJe illustrations, using the Y
difficulty in understanding the program. was more convenient.
02801
(SmGLE FACE MILLING CUT - NO COMPENSATION)
Nl G20
N2 Gl? G40 GBO
N3 G90 G54 GOO X7.75 Yl.O 8344 MO)
N4 G43 Zl. 0 H01
N5 GOl Z-O.2 F50.0 MOe
N6 X-2. 75 F21. 0
05.0 CUTTER N7 GOO Zl. 0 M09
NB G28 X-2.7S Yl.O Zl.O
Figure 28-12 N9 M30
%
Multiple face milling details for program example 02802
234 Chapter 28
Block N3 moves the face mill to the actual, calculated When comparing, note the major differences in N3
start posllion the cut. In block N6, the cut is completed - . (new X value), in block N5 (compensation G46), and
again. at actual previously position. pro- in block N7 (compensation G47). The situation will benefit
gram 02803 using position compensation is similar. but it from some more detailed evaluation.
does some notable
The N3 block contains X position with value of X8.0.
Compare the original 02801 with the new pro- That is the initial position. Since the plan is to apply the
02803, program that uses the position compensation compensation G46 (single contraction), the tool has to be at
a position of a larger value than one expected when
compensation is completed. Therefore, XS.O is an
value. Note that if the G45 compensation command were
the initial position would have to be a smaller
than the one when compensation is
completed. This is because the position compensation is al-
ways relative to the programmed direction.
The N5 block is added to program 02803. It contains the
position compensation G46, which is a single contraction
in programmed direction by the compensation amount
contained in the register of DOl offset. Note that the pro-
grammed coordinate value is which is the total of
the part length (5.0) and the selected (.250).
5 x 3 PLATE
mill radius is totally disregarded in the program. The
28-13 main benefit this method is that, within reason, the
Example of the position con10eJr}sal[lOn as applied to face milling - grammed coordinates will not change, even if the face mill
program 02803 diameter is changed. example, if a 03.5 inch mill
is used. the job can done very nicely, but the starting po-
02803 sition may have to changed. In this case, the stored value
(SINGLE FACE MILI..ING CUT) the DO I offset will 1.75, but N5 will still con-
(USING POSITION C'OlMPllmlAT tain CNC system will do its work.
Nl G20
N2 G17 G40 GSO last block worth a further look is N7. It contai os G47
N3 G90 G54 GOO XS.O Yl.O 8344 MOl position compensation command. The X value is equiva-
N4 G43 Z1.0 HOl lent to the selected clearance of X-0.25. G47 command
N5 G46 XS. 25 DOl means a double elongation-of the offset value along the
N6 GOl Z-O.2 F50.0 MOS programmed direction. is of the
N7 G47 X-O.2S F21.0
need LO compensate at the start of cut, as well as at the end
Ni GOO ZLO M09
N9 G91 a2B XO YO ZO of cut. Also note the initial position the
NlO teO start position cannot the same, no compensa-
% tion will take place. With some ingenuity, the milling
can be programmed very creative]y, using a rather obsolete
programming feature.
CIRCULAR INTERPOLATION
applications. there
related 10 contouring. / - CENTER
the other
chapler. QUADRANT
along POINT
a tool path
contouring is called
in proftling on
/
and centers, as well as
and many olher such as simple
machines, routers, and laser pro-
filers, wire EDM, and others.
Circular inlel polalion is used
complete circles ill such applications as RADIUS
radii (blend and parlia}), circular IJV'~"'''''~ CI"\n"r1r'~ Or conI-
cal shapes, radial recesses, corner helical figure 29·1
even large counterbores, etc. The Basic elements DI a circle
terpolale a defined arc wilh a very
information is given in
• Radius
MENTS OF A CIRCLE In the simplest .~u,~"'_~, terms, a circle is defined by
ils c:enfer point and its os. Two of the most important
understand the principles of programming various cir- elements of a circle in part programming are Ihe
motions, it helps to know something about basic radius and the
entity known as the As an that is
common in everyday life, a circle various proper-
that are slrletly mathematical. only considered in
disciplines, such as Computerized
mol ion control and aUlomation.
following definition ora circle and
that are related (0 a circle arc based on some com-
mon dictionary definitions - Figure 29· 1. center point location circle is also important
CNC programming. of the word radius
is radii, although the word 'has been accepled as
a colloquial term. In programming, radii and dia-
meters are used all the on a daily basis for aJmost all
contouring machines. in machine shops use
similar definitions of a circle that can radius and diameter dimensions a lot, with an almost un-
and mathematical books. The limited number of possible
a circle and its various properties as
handbook, provides a sufficienl knowledge Radii and diameters are also
programming. Additional will tool insert designation, they are
for some specialized or complex gauging (inspections), as well as in
appl At this time, become at leasl tions and various auxiliary programming. the
miliar with the geometrical and trigonometric actual application of an arc or is not important, only
for arcs and circles. its mathematical ,..1'"I'::IT<:I,..tp·rl
235
236 Chapter 29
• Circle Area and Circumference Also worth mentioning is a mirrored tool path and its re-
The area of a circle is defined by this formula: lationship to the quadrants. Although it is not a subject of
Ihe current chapter, mirroring and quadrants must be con-
sidered together. What happens to the tool path when it is
mirrored is determined by the quadranl where the mirrored
tool palh is posilioned. rn the Chapter 41 are more details
~ where ... abom mirror image as a programming subject. For now, it
should be adequate to cover a very brief overview only_
A := Area of the circle
R = The circle radius For example, if a programmed tool path in Quadrant I is
1t = ((lnstant (31415927) mirrored [0 Quadrants II or IV, the cutting method will be
reversed. That meanS a climb milling will become conven-
The circumference of a circle is the length of a circle if it tional milling and vice versa. The same rule applies to a
were a sU"aight line: programmed tool path ill Quadram II as it relates to Quad-
mnts 1 and III. ThIS IS a very important consideration ror
many materials used in CNC machining, because climb
milling in Quadrant! will turn into conventional milling in
Quadmnts II and IV - a situation that is not always desir-
1.& where ... able. Similar changes will occur for other quadrants.
C Circumference of the circle • Quadrant Points
o The circle diameter
7L Constant (3.1415927) From [he earlier definition should be clear (hat quadrants
It is important 10 note that both the area and circumfer-
consist of two perpendicular lines that converge at the arc
center poi nt and an arc that is exactly one quarter of a circle
ence of a circle (its actual length) are seldom used in CNC
circumference. In order to understand the subject deeper,
programming, although understanding their concepts pres-
draw a line from the center of an arc thai is paraHelto one of
ents a rather useful knowledge.
the axes and is longer than the arc radius. The line created
an intersection point between the line and the arc. This
QUADRANTS point has a special significance in programming. It is often
known as the QuadraJlt Point - or the CQldinal Point - al-
A quadrant is a major properly or a circle and can be de- though the lauer term is not used too oftcn, except in math-
fined mathematically: ematical terminology. There are four quadrant points on a
given circle, or four intersections of the circle with its axes.
A quadrant is anyone of the four parts of the plane The quadrant points locations can be remembered easier by
formed by the system of rectangular coordinates. associating them with the dial of a compass or a standard
watch with an analog dial:
It is 10 every programmer's benefit to understand the con-
cept of quadrants and their applications for circular mo- Compass Watch located
tions In milling and turning programs. Degrees
direction direction between quadrants
A circle is programmed in all four quadrants, due to its
0 EAST 3 o'clock IV and I
nature, while most arcs are programmed within one or two
quadrants. When programming the arc vectors I, J and K
90 NORTH 12 o'clock I and II
(described later), the angular difference between the arc
start and end points is irrelevant. The only purpose of arc 180 WEST 9 o'clock II and III
vectors is to den ne a unique arc radius between two poi nts.
For many arc programming projects, the direct radius can 270 SOUTH 6 o'clock III and IV
be used wi lh the R address, avai lable for majority of control
systems. In this case, the angular difference between the At this point of learning, it may be a good idea to refresh
start and end pOints is vcry important, because the com- some fermI) of rhe ~ngle direction c1efinition The eSf("lb-
puter will do its own calculations to find the arc center. The lished industry standard (mathematics, as well as CAD,
arc with the angular di ffcrenee of 1800 or less, measured CAM and CNC) defines an absolute angular value as being
between the start ;:md end points, uses an R positive value. positive in the counterclockwise direction and always starl-
The arc in which the angular difference is more than 180°, ing from zero degrees. From the above table, zero degrees
uses an R negative value. There ru-e two possible choices correspond to the East direction or three n 'e/()rk position of
and the radius value alone cannot define a unique arc. an analog clock - Figure 29-2.
CIRCULAR INTERPOLATION 237
POSITIVE DIRECTION
/
I
MatheJ7Iatlcal rU>1Jmlll1n 01 the arc direction Both the G02 and G03 commands are modal.
they remain In effect unLilthe end of program or until can-
quadrant poinls arc im· celed by another command from the same G
In some cases, the quadrant usually by another mOlion command.
,even If the cIrcular
is is particularly lrue The preparatory commands G02 and are
where crossing the quad- words used in programming 10 establish circular
modern controls tion mode. The coordinate words following
block, wilh command are always designated within a
The plane is normally based on the available axes
lions ofXY, ZX and YZ for milling or applications.
Normally, (here is no plane selection on a lathe, ahhough
PROGRAMMING FORMAT some conLfol indicate it as G 18. (he ZX
The progrnmming format The plane selection and the combination of circular mo-
1001
(he tion and the arc cutting direclion determine the
path must i ncl ude
lask of cUlling an arc arc end point, and the R value specil'ies !hearc radius. Spe-
parameters are defined as: cial arc center modifiers (known as vectors) are also avail-
if programmer requires (hem.
o Arc cutting direction (CW or CCW)
Wilen Iht! or G03 command is aclivaled by a CNC
o Arc start and end points any active 1001 motion command is au-
o Arc center and radius value tomalically canceled. 111is canceling mOlion is Lypically
GOO, Gal or a cycle command, All circular 1001 path mo-
The cutting must must programmed with a cUlling feedrate in dlecl,
more detaillaler in this applying the same basic rules as for linear interpolation.
used for circular molion . . . rr"'rr'........ "Y'I That means the fcedrale F must be programmed before or
ramelers related to the the cUlling mOlion block, Jf (he feedrate is not speci-
in the circular motion block, the control system will
• Arc Cutting Direction aUlomatically look for the last programmed feed rate. If
in effecl al all. many controls usually rc-
A cutting 1001 may move turn an en'or (an alarm) to lhat effect. The feed rate
clockwise (CW) or tIed in one of two ways. Either directly, wilhin
lenns are assigned by convemion. block only or indirectly, by assuming Ihc lasl
mol ion direction is determined hy motion in a rapid mode is not pos-
at the plane in which the circular mOlion not possible is Ii simultaneous three axes circu-
The motion from [he plane venical lar molion. more details on this subject, look up Chap-
horizontal axis is clockwise, reverse is counter- ler helical mil
clockwise. This convention has rnalltematical
docs not always malch the machine axes On majority of older conlrols, direct radius address R
IeI' 31 describes machining in planes, this specified and the arc center vectors I, J and K
take a brief look mllSI
238 Chapter
_ 29
... _....................................................................... ...
G02 x .. Y .. I.. J .. Milling program - cw In Ihe example, block N66 represents the end of a con-
G02 X .. Z .. 1.. K .. Turning program - cw tour, such as a linear motion. It also represents (he start of
G03 X •. Y .. I.. J .. Milling program - CCW the arc that follows next. III the following block N67, the
G03 X .. z .. I.. K .. Turning program - CCW arc IS machined, so Ihe coordinales represent the end of arc
and slart point of the next elemen!. The last block of the ex-
Control systems supporling the arc radius designation by
address R will also accepllhe UK modifiers, bUi the reverse nmple is N68 and represents the end point of (he elemcnt
is not (rue. If bOlh the arc modi fiers UK and the fad ius Rare Ihat starred from the arc. The end point of the arc is the co-
programmed in the same block, the radius value takes pri- ordinate point of any two axes, where the circular mOlion
ority, regardless of the order: ends. This point is sometimes called the target position.
j,
POINT POINT I POINT POINT in combination with a circular interpolation mode should
CCW=+ be sufficient. This is never true. Always keep in mind lha!
numerical cOlltrol means control of the LOol path by nUn/-
ben', In this case, there is an infinite number of mathemati-
cal possibilities and all are corresponding to this incom-
plete definition. There is virtually an unlimited number of
~ ~
' .\.,
.-.::'-,- ---.-.-,
- R -, ' -
--1- arc radii thal will fit between the programmed stan and end
poinl~ ;mil ~till milinlrlin the cutting direction.
The arc start poilU is always relative to the cU!ling motion This unique radius is achieved by programming the R ad-
direction and is represented in the program by coordinates dress for the direct radius input, or using (he UK arc center
in the block preceding the circular molion. In terms of a vectors. Address R is the actual mdius of the tool path, usu-
definition, ally the radius taken from the part drawing.
The start point of an arc is the last position of the cutting • Arc Center Vectors
tool before the circular interpolation command,
Figure 29-4 shows the signs of arc vectors I and J in all
possible orientations. In different planes, different pairs of
Here is an example: vectors are used, but the logic of their usage remains ex·
actly the same.
N66 GOI XS.75 Y7.S
N67 G03 XII.. 625 Y8. 625 R1.l25 Arc vectors 1. J and K are used according to the folloWlll l1
N68 GOl X .. Y .. definitions (only I and J are shown in the illustration): e
CIRCULAR INTERPOLATION 239
G02 G03
Quadrant
Quadrant
II
1+ JO 1+ J- 1+
T
/
/
Quadrant
III
J+ 1+ J+
Quadrant
IV D 1- J+ 10 1- J+
29·4
Arc vectors I and J (also known as arc modifiers) and designation in different quadrants (XY plane!
error. io those
cases where both in the shop.
There is JlO using absolute
and arc center.
specified direction applies only to the incremental
of arc center. It is the of relative posi·
tion oflhe arc center from the starl point, programmed with
Arc center vector K is the with "n" ... ili"rl a directional sign - absence of the assumes a
measured the start point or the arc, positive direction, minus direction
to the center of the arc, parallel to the Z axis. and must always be written. Arcs center de·
finition follow standard
(he start point of lhe arc and the
arc (as specified by the DK vectors) is • Arc in Planes
most as an incremenlal distance machining centers,
the two points. control systems. for example many the three geometrical planes
Cincinllati use the absolute designation to correct arc vectors must be
an arc center. cases, the arc center is programmed
as an absolute value from the program zero, no! from G17 G02 (G03) x .. Y •• R •. I .. J .. )
arc center. sure how each of the cOnlrol G18 G02 (G03) X •• z .. R •• (or 1.. K •• )
terns in the shop handles these situations. G19 G02 (G03) Y •• Z •• R •. J .. K .. )
~------------~X z y
29-5
Arc direction in three planes - the orientation of the axes is based on mathematical, not machinc, plancs
plane is no! aligned with the The simplest form of a blend radius is
axes used mlhe program a(e pendicular lines that are parallelw (he
[he circular molion will orthe start and end points only a
rn,-n'T\f' to the axis selection ill the program. I ions or subtraclions More complex cl'llcul/'llion is
modal motion is omiued. The when even one line is al an angle. In this case,
Ihis potentially harmful problem is to follow a functions are used to calculate the staft or point,
or both. Similar calculations are required for blends be-
tween other entities as well. A blend arc is known as a
In nonstandard planes. (he circular program arc or afillet radius.
always contain specifications for both a..'(es, as
arc vectors or the R value. Such a block is • Partial Radius
will always be executed on the of axes
priority_ This mediod is preferable to the The opposite of a blend arc is a
vious!y defined plane. Even if the plane smooth blend between two conlour
correct, the resulting tool motion will
RADIUS PROGRAMMING
an arc,
11 '" I', n ".,-1 as a ra-
Progrrunming arc is very common. point is not tan-
is only a porlioll. of a circle and are il in two
gram an arc. If the arc is 360°, it must for the arc start
the start position bei the same as end position. a blend are, de-
In case, a full circle is Ihe resu 1t.1f only a portion of the had used in
only 11 Two
III
I,--2.00-~•
'. 29-8
Full circle programming using five blocks code
G90 G54 GOO X3.25 Y2.0 seoo M03 ~ 1.25 x cos33 1.0483382
Ys = 1.25 x sin33 = .6807988
242 29
From the resuits, [he start poinl of the cut can be found: • Boss Milling
X3.0483
As an example of a full circle a
X=2+Xs '" 3.0483382
Y = 2 + Ys 2.6807988 Y2.6808 be used, as illustrated in Figure
If the control o
in one block,
quire the I 01.812
CilflnOI
'lIIj
····1
G90 G54 GOO X3.0483 Y2.680B 5800 M03 ,- I
GOl Z-O.2S F9.0
G02 X3.0483 Y2.6808 Rl. 25 F12. 0 (* WRONG *)
GOO ZO.l . FRONT
I
Figure 29·13
Internal circle cutting linear and approach
02903
(0 . 5 DIA CEN"l'ER END
29·12 Nl G20
Internal circle cutting - linear approach only N2 G17 G40 GSO
N3 G90 G54 GOO XO YO 9900 M03
02902 N4 G43 ZO.l HOI
(0 . 5 DIA CENTER END MILL) NS GOI Z-O.2S FlO.O MOS
m G20 N6 G41 XO.3125 YO.3125 001 F12.0
N2 G17 G40 GBO N7 GO) XO YO.62S RO.3l2S
N3 G90 G54 GOO XO YO 8900 M03 NB J-O.625
N4 G43 ZO.l HOl N9 X-O.3l2S YO.3l2S RO.3125
N5 GOl Z-O.25 F10.O MOB NlO GOI G40 XO YO F20.0 M09
N6 G4l YO.625 DOl F12.0 Nll G9l G28 XO YO Z2.0 MOS
N7 GO) J-O .625 Nl2 M30
%
244 Chapter
ARC PROGRAMMING ./
/
End point
What if the circle is 359.999°? Well, at first, circle must \ I
have 360°, therefore the word 'circle' is Incorrect. Even i.l - - CONTOUR
small difference of 0.00 I ° does make a difference between
a circle and an arc. Although this difference IS much more
important mathematically than for practical programming,
the distinction is very important. In circular interpolation Start point
terms, an incomplete circle is nothing more than an arc. ./
Look at this arc a little differently. If a 90° arc is made, Ihe j
If an arc that covers exactly 1800 is programmed, {he pro- Figure 29-15
gram will no! he much different: Sign of R address for circular cutting - onlv the center is different
The arc feedrale is nol required in Two formulas provide to find the adjusted arc
gram. If cutler center tool path is close LO feedrate, to the linear
1 contour, no adjustment is needed. On the band, Both formulas are recommended for external or
when a diameter cutter is used to contour a small out- contouring only, nOT rough machining of solid material.
radius, a problem that affects the finish may
occur. this case, the tool center path a much • Feedrate Outside Arcs
arc one in the drawing. In a
is used For outside arcs, ,ildjusled feed rate will be higher than
shorter the linear calculated from Ihis formula:
~ where ...
/
/
DECREASED - - . -
FEEDRATE
Figure 29·16
''''
NORMAL~
FEEDRATE
"
F,
R 0::
linear feed rate
Inside radius on the
Cutter radius
Based on lhe Jinear feed rate 14 in/min, the feed rate for
inch inside radius with I must be ad-
Feedrate adlil/stlTlel1lts for circular tool motion downward:
PART PROFI tern, principles thal are very much based on basic mathe-
matical calculations, including the often unpopular
nomclry calculations. A very simple drawing is shown in
30-2 for that purpose.
program zero will he selected at the lower left corner
of Ihe parl. Since lhe culling will be external, in a climb
milling mode, the tool will start along the Y direction
At moment, the start and end 1001 position is not impor-
Figure 30·1 tanL only calculations of [he individual contour points at
Tool path not compensated (above) and CDfnp8'nSI!Jil(;:a and tangency points.
by the cutter radius
7
248 Chapter 30
-, t Pl XO YO
P2 XO Yl.125
1.125
I P3 X2.25 Y1.8561
J '''-...-RO.625 P4 X2.25 YO.625
2.25
P5 X1.625 YO
Figure 30-2 Once all the coordinates are completed, [here is enough
Semple drawing for manual calculations {examples) dala to start the tool path, but only if the cutter radius offset
feature is used. However, lilal is not the intention at the mo-
Note that there arc. five points on the drawing, one LIt each ment. To illustrate, a whole /lew set of points has 10 be
contour change. These points are either intersections or found - coordinates for the center of the clIlter.'
points of tangency. As eaeh point has two coordinates, lolal
of ten values will be required, • Tool Path Center Points
The drawing always offers some points thaI need no cal- The cutting lool for milling is always round. An end mill,
culations. fl is a good idea 10 gel well organized and mark for example, has a diameter of a certain size. Even tools
the points from the drawing first Then, make a chart in the used for turning and boring have a round end (called the
order of tool path. Study Figure 30-3 carefully - it shows all 1001 nose radius), even if it is relatively small. Of course.
five points and all the values thaI need no calculation, per- we all know that any round object has a center. Milling cul-
haps some addilion or sublraClion only. ter or a lathe tool lip are round objects, so they have a cen-
ter. This evaluation may sound a bit too elementary and it
-._--- is, but it is also the basis, lhe key element, the whole con-
X-AXIS I V-AXIS cept, of cutter radius offset. Every control system takes il
P1-XO.OOOO. YO.OOOO into consideration.
P2 pi x(fQ500. Y1 :1250
"- , ,
--em,
PI X axis Y
P1' X-i5:3750 y-o.
P2
- -- --- " __ v
P3' X2.6250 ?
P4
RO,375
"''''r.", ..'. . ,...... the old sel of points wi II ra calcu- Figure 30-7 of point P2calculalion. The
points, Again, try to see which are trigonometry melhod is a subject programmers have
establish them first. 10 know how \0 work wilh - il is part of mathematics, ~x
lended to CNC program A similar calculation is re-
point PI? It qUIred for P3, shown in
the new PI has (he value radius
also (he value of culler radius in Y .y= 1.-_
sin18
-- x
from the old P L The actual value an)' . cos18
cak:ulaleri flI nil, wilhaUi kllowillg the cuf-
=1.125 +N
• Cutter Radius P2(Y) = 1.3975
the culler is always
been phYSically
of the cutler must Y1.125
I" (0,0025 mm =
reground tools, 10015 previ-
or are undersize or oversize some Figure 30-7
this means that programming the cenlerl
Calculation of P2 for the cutrer
the exacllool radius to be known althe
in all cases,
N = 1 + sin~8 x 0.375
• Center Points Calculation
lY=
Coordinate poinls illustrated in Figure 30-5 above, ,III
sent the center or
point. Now, another
cuuer radius al each con ram change
can be brought inlo lhe
P3{Y) =1
picture, Ihe cutter A new coordinate set of five P3(Y) =
poinls can be example, (1 brund new CUl-
ler of 0.750 will
Y1
Which points can the illustralion directly,
withoul any trigonometric Look at and evalu-
ate Figure 30-6. OUI of len values requirt:d. only eight have 30-8
been idenlified, but also that Ihe previous lcn calcu- Calculation of P3 lor the cutter center point
lalions had to be done as well, adding 10 the overall
programming effort. are known, center
contour. points are in the
I n order to lin ish the d on programming of the . appear in that same ordcr II) Ihe
cutter center, the two Y values ror and P3 have to be cal- the pOlnt loc3tions hut various G
culaled. Let's start wilh point and other dam.
250 Chapter 30
momenl, it is slill 100 soon to write the The Type C cutter radius offset lhe ahead lype (also
closed with the table of new called the illlersecrionollype) is one is used on all
0.750 cutter but none modern CNC systems today. is no need to call it Type
C anymore, as there are no olher available.
Point No. X y
• Defini1ion and Applications
Pl X-O,375 Y-O,375
X-O, offset is a of the control system [hal
a contour without knowing the exact
P3 diameter of the cutter. sophisticated fea-
ture performs all of contour change
P4 X2,625 YO.625
points, based on
P5 X1.625
o Points of the drawing contour
digit I used in the calculations. It may o Specified direction of the cutter motion
where it came In(o {he It repre-
o Radius of the cutter stored in control system
sents lhe value of sin 90°, which is I Jitllclriangle
in fronl of (he Y - il is a symbol for word 'delta', - and machining - this feature
in mathematics 10 a vec- [a develop a program without
o .. 5ln;nnpt'
101', or a distance. knowing the exact CUller diameter at the (ime of program-
ming. It also CNC operator to adjust, to fine
COMPENSATED CUTTER PATH iunc, the WHer in the control system (nominal. over-
size or undersize), during actual machining, In practical
terms, cutter (and tool nose radius offset
The previolls examples are Iypical to (he
on lathes) for a number of reasons:
methods useu 011 the early con-
trols (normally of the NC lype, not had no culler ra- o Unknown exact of the cutter radius
dlUS offsel feature at aIL The lOol was developed in
o Adjusting for the cutter wear
such a way (hal the contour had to be calcu-
lat(~d WiTh the cwfer radius in This method of pro- o Adjusting the cutter I1pt'lpl:tlon
gramming added a great amount of time to the part devel-
o Roughing and finishing operations
opment process, greatly rhe possibility of
programming errors and disallowed any Oexibility during o Maintaining mJ'l,(,nlTlinn
mach1l1ing. Even a small di between the pra-
cutter radius and the culler radius required Every
or and the creation
memory in those may not be LOa clear at moment,
control tcchnol- but wilh knowledge of this topic, it wjlJ
control syslem 10 understand the subject. The suggestions are only some
melh- the possibil the automatic cutler radius offset
Now lei's look at aClual use ill prognunmi
D Type A offset - oldest uses special vectors in the program o Specified direction at the cutter motion
to establish the cutting direction (039, G40, G41, G421. o of the cutter stored in the control
o Type 8 old uses only G40, G41 and G42
items are the actual data sources.
in the program, but it does not look ahead.
work wllh dnta and the data hilS to be
Overcutting is for Type 8 offset.
the purposes of this charier, we assume that
o Type C - current uses only G40, G41 and G42 conlOur chnnge points are based on the
in the program, but with the look ahead feature. coordinates.
Overcutting is for Type C offset.
RADIUS OFFSET 1
tool motion
statement is true for CNC lathes, where it is
but it is CNC machining centers, il is Figure 30-9
true for other lypes ma- Cutter path direction as ir relates to a stationary pM contour:
l"Iser Clllling machines, fa b) No motion direction shown - left and right is unknown
fe - d) Cutter positioned to the LEFT of the contour
etc. When it comes to the so (e - f) Cutter positioned to the RIGHT of the contour
versus counlerciockwise, a closer look
IS
• Offset Commands
• left or Right - not CW or CCW
In order to program one or
care of is to eliminate the direction), there are two nrt>',","',r'l
The illustration
a direction, a cutler with
to the left of the conlow;
fied and pOSItioned to the
G41
Out of the two
ler? Compensation to
centers, because it
cutting, assuming that a
with M03 rotation. There G40
sation to the right. causing so E
mode of cutting. This mode
cases, after consultallon with a
applies to milling systems, not to
of G41, G42 and G40, to the cutter path
252 30
The Type C offset group offers the most Wilh Ihe Ihree lypes of Tool MemDlY it is reason-
the only offset type available that able to expect somewhat different methods
values from those of {he lool radius, It still for each type. Up to a point, this IS true.
tinction of the Geometry Offset and the Wear
BOlh the Type A and rhe Type Bare
Type B docs. That means Ihe control display
columns - yes,jour columns in lOlal. In this with only a single register, where the lool
ues are stored along with the cUller amounts.
addresses Hand D will be used for their
Normally, the Type A and Type B are associated wirh the
It is relatively easy to [ell which offset type is H only. That means me H is with
j list look at the conlrol display. Figure 30- /3 command, as well as wilh the G41 or
ieal appearance of each Offsef MeinDl)) cUfling tools do not require the cutler radius
with zero vaIues). The aClual appearance but all CUlling lools require the tool
different, depending on the control model. program. If a particular cutler requires both 1001
offset number and cutler radius offset number, two
offset numbers from the same offset range must be
Offset Offset in the program and stored in the control register,
No.
is the reason these offsets are called shared offsets.
01 0.0000
02 0.0000 example, programmed tool T05 requires both
03 0.0000 which obviously cannol have the same offset number.
_w is to use Ihe tool number as the tool length offset
.................... ........ww _
number increase that number by 20, 30,40, or so, for
Offset Geometry Wear cutter radius offsel. The entry for the Type A in the off-
No. set screen be similar to the one in Figure 30-/4:
01 0,0000 0.0000
02 0,0000 0.0000
03 0,0000 0,0000 Offset
... .. , ...
H-offset D-offset 05
Geometry Wear Geometry Wear
0,0000 0.0000 0.0000 0.0000
0,0000 0,0000 0.0000 0.0000 3()·14
0.0000 0,0000 0.0000 0.0000 Shared offset Mh;:~/M' PM'~~~ for tool offset memory Type A
35 10.0000
Figure 30-15
G41 x. .. D •• 01' .. Shared offset offset memory Tvpe B
G42 X .. D .. 01' ..
The Type C will columns. Since
G41 Y .. D .. or ..
the 10(.)1 length and the tool their own col-
G4.2 Y .. D .. umns, the same offsel both - there is
no need for the 20, 30, In
of the tool motion and how H address is r"'C'L"r,'''''''
many axes can at a time will be discussed in this the D address is cutler
chapler as well, the question of which her Figure 3()~ J6 show~ an input
address to usc and H address or the 0 address? to the Type A and the
254 Chapter 30
I
offset in an actual CNC program are now known. The ac- :~
tual application, the way 10 use the offset in a CNC pro-
gram, as well as the methods of proper usage, will be dis- ~I
i . 0.25
cussed next. There are jour nwjor keys to a successfu I use
of lhe culler radius offset feature: L-yO
control offset registry. The may Finally, the program 03001 is completed. There was no
have to be adjusted, if necessary. We will look at what need for any tool - such an change is
when the culle.r radius offsel is applied, rarher a rare occurrence, at contouring operations
using milling controls. Ihe directional change may
rule to establish the start needed in the some comments may be useful.
selected with a
the largesT culler that • Cutter Direction Change
i ncreased for a
or for a that is During a normal mil cui, Ihere will seldom be a
complete the program, leI's to change Ihe cutler offset direction from left to right or
the cutter radius offsct, when it is no from 10 . If it become necessary. the normnl
one mode 10 the other withow
• Offset Cancellation command. This practice is seldom
G41 [0 G42 would
A lead-in mOllon has been used at the or
the culler 10 the
radius offset. To cancellhe offset a motion will be
length of Ihe lead-out (just as the length of the
has (0 be somewhat greater Ihan or at least equal [Q
-
NlJ Zl. 0 M09
Nl4 G28 X-0.62S Y-O.625 Zl,O Figure 30-20
Nl5 M30 Ambiguous slartup for a curter motion in radius affsef mode
%
RADIUS OFFSET 7
there are fWO possibilities and they are both does the control handle
compensate the culler to the left culler radius offset Type C a buill-in
conditions specified in block the 'Iook-ahead'type of cutler radius
the cUlling tool moves to as eXT)eClea
is on to the left of (he pari contour, look· ahead feature is based on the principle known
the motion, using the radius value stored in the as buffering or reading-ahead. Normally, the control pro-
tef what is the problem? cessor executes one block at a time. There will never be a
,-aU.)",U by any huffered block (next block).
"",,·h.,,",c - but not wrong - this lime there 03002 (PROGRAM WITH RADIUS OFFSE.'T """"''''VJ~J
following the CUller radius off- N1 G20
blocks do HOI include any molion. N2 G17 G40 GBO
N3 G90 G54 GOO X-O.S Y-O.S Sl100 M03
a program Ihalll1ighl be line if the N4 G43 Zl.O HOi
radius were nOl applied. With an offset In effect, such NS GOI z-O.SS F20.0 (FOR O. 5 PLATE TKICK)
a program structure can create problems. Controls with the N6 G41 XO 001 F12.0
Nt MOS (NO MOTION BLOCK)
'look-ahead' can look ahead only so many blocks. N8 G04 PlOOO {NO MOTION '-'''-''-''-','',
If the the one block look-ahead is at- N9 Y2.5 (MOTION """""""-''-,
are two or more look-ahead blocks avail- NlO X3.S {MOTION ....'-"-,"-'"
on the control features. and not all con- Nll YO (MOTION BLOCK)
suggestions: Nl2 G01 X-O.S (MOTION '-''-''-,''-'"
Nl3 GOO G40 y-o.s CAl)1CE:L OFFSE.'T)
o If the control has a type cutter radius Nl4 Zl. 0 M09
It:CltUI't:;. but the number of blocks that can be NlS G28 X-O.S Y-O.5 Zl.O
UI"c:;;,;:,t;U ahead is not known, assume it is only one block Nl6 M30
%
o Make a test program to find out how many blocks
the control can read ahead A conlrolthaL can read only one or I1vo blacks ahead \'v'iII
o the cutter offset is started in the program, nrr\nr,,,",, 03002 -Ihe next marion is in
hard not to include any non· motion blocks - restructure In to avoid
jf necessary (In program structure lhat
eonUIlns more black,
in mind that the control subjects the program input
to lhe rules embedded m the software. The correct input • Radius
must In the foml of an accurale program,
one hal f of lhal
kind of a response can b~ expected If the culter ra-
is programmed wrong? Prohably a scrap of the
If the conlrol syslem cannol calculate the offset culler
position, it will act as if the offset were not programmed at
all. means, Ihe initial tool motion will be towards the
XO wllh the cUfter center. When Ihe necessary information
is passed on [0 the control, the offset will be applied, usu-
ally lao lale, after Ihe CLllIer has entered the parl. Scrap is
the most likely result in Ihis case. Such an incorreCT
gram is shown in Figure 30-22:
t.--1.00 1: 1
RO.20
RO.25
o 1.1
0.50
figure 30-24
' - - -_ _ _ _ _- - - - 1 _ ,
Cutter start position is smaller then the cutter radius
program sample is similar to the pre-
except the X axis start tion is (00 close
if the cutter is in the DO 1 regis- 30·25
.3750: Simple drawing lor program 03003
260 r 30
control unit will process the information from the 001 =0.375 =1:1
with the offset amounts to Figure 30·26
Then, it executes the blocks as il moves Effect 01 overcutting (gouging) in cutter offset mode.
the par!. Suddenly, at block N7 alarm No. 041 Tvpe Cradius offset (look ahead type) does not allow overcutting
occurs cutter radius inleJference problem.
What happened? There [s nothing wrong with t'he • Single vs. Multiaxis Startup
Most CNC operators would look at
There is another cutter radius
gram it. After careful study, if they fi nd it correct,
the cause or the problem must be somewhere stanup, particularly if startup mo-
tion along twO axes, ,.,,.,.~. __ single axis.
of Try not [0 blame the computer and don't
more ti me once you are that the look at cutting, with
Check the offset input in 001. The amount no problems. Now we look at cutting.
there. That is also OK the tool in Evaluate the two approach in Figure 30-27, us-
drawing next. That [$ ing a cutter radius offset startup towards an internal profile,
erything seems and is a for example, a wall of a pockel or in[ernal contour.
the screen, step.
the relationships between:
o dimensions ." alld '" Program input
o input .. , and... Offset amounts
o Offset amounts ... and... Drawing dimensions
o Correct approach - single axis motion: Here are the first few correct blocks of each method:
The correct programming approach shown on the left o Correct approach - single axis motion:
side of the illustration contains the following blocks - only
the starting program blocks are listed: G20 (CORRECT APPROACH WITH ONE AXIS)
ill.
N2 G17 040 GSO
N1 G20 (CORRECT APPROACH WITH A SINGLE AXIS) N3 G90 G54 GOO X-O.625 Y-O.62S 8920 M03
N2 G17 G40 GSO
N3 G90 G54 GOO XO YO S1200 M03 N6 G41 XO DOL F1S.O (START OFFSET)
N4 G43 ZO.l HOI Nne N7 Y1.125 (P2)
NS G01 Z-O.25 F6.0 (FOR 0.25 POCKET DEPTH)
N6 G41 Y-0.7S DOl FIO.O (START OFFSET)
N7 XO. 75 o Correct approach - multiaxis motion:
N8 YO. 75
N1 G20 (CORRECT APPROACH WITH TWO AXES)
N2 017 G40 Gao
There is no internal radius in the program 10 worry about, N3 G90 G54 GOO X-O.625 Y-0.62S 5920 M03
so the amount smred in the offset register DOl does not
have [0 consider i[ and wi!J represents (he cuucr radius as is. N6 G41 XO YO DOl FlS.0 (START OFFSET)
N7 Yl.125 (P2)
o Incorrect approach - multiaxis motion:
The incorrect mol ion approach shown on the right side of Note that in cascs of the cutter radius offset for an exter-
the illustration contains the following initial blocks: nal contour, both programs listed are correct, because there
appears LO be 110 interference with any section of the part. In
N1 G2 a (INCORRECT APPROACH WITH TWO AXES) fact, there is the same interference as in the internal milling
N2 G17 G40 GSO example - the only difference is that Ihis type of 'interfer-
N3 G90 G54 GOO XO YO S1200 M03 ence' is of no consequence - it tokes place while in the air.
N4 G43 ZO.l HOI MOS
N5 GOI Z-0.25 F6.0 (FOR 0.25 POCKET DEPTH) There will always be a problem that cannot be solved in
N6 G41 XO.7S Y-O.75 DOl F10.O (START OFFSET) any handbook, regardless of how comprehensive that book
N7 YO.75 may be. The subjects and examples included in this hand-
book present common basis for a better understanding of
There is no way the control system can detect the bottom the subjecl. With growing experience, the understanding
wall of the pocket at Y-O.7S. The startup for the offset is ex- becomes much deeper. Before going any further, let's re-
actly (he same as for external cutting, but more damaging. view some general rules of the cutter radius offset feature.
Compare the two possible startups for the drawing shown OVERVIEW Of GENERAL RULES
in Figure 30-2, earlier in the chapter. If [he radius offset is
started with a single axis motion, (he result is shown at the
left side illustration in Figure 30-28.1f the offset is started Reminders and rules are only important until a particular
with a (wo-aJ(is motion, the result is shown at the right side subject is fully understood. Until then, a general overview
illustration in FiJ;ure 30-28. and some additional poinls of interest do come handy. Pro-
gramming the cuuer radius offset is no differenl. The fol-
lowing items are marked [M] for milling, [T] for turning,
1./"):
N'
oj
wi
xi
~
t '-- D01 ~
'W
'0
xl
-j -- - D01
and [M-TJ for both types of control systems:
o [M-T J Never start or cancel the radius offset in an
arc cutting mode (with G02 or G03 in effect\. Between
YO-'- ) YO the startup block and the cancel block, arc commands
are allowed and normal, if the job requires them.
o [M·T J Make sure the cutter radius is always smaller
'V:'O.62S· Y-O,625 than the smallest inside radiUS of the part contour.
o o I M-T lin the canceled mode G40, move the cutter to a
X
-~~~- clear area. Always consider the cutter radius, as well as
Correct approach in X Correct approach in XY all reasonable clearances.
Figure 30·28 o I M-T I Apply the cutter radius offset with the G41 or
Startup of the cutter radius offset for external cutting: G42 command, along with a rapid or a linear motion
Single axis approach, shown on the left to the first contour element (GOO or GOl in effect).
Two axis approach - shown on the right
262 Chapter 30
-"""--"""-""""--"""'"
• Programmed Offsets
most a1tractive feature of the cutter Offset
position
it allows to change the actual tool sire right on Toolpath
by means of the offset registerfunction D. In motion .0
example, only one lool is used - .750
mill - and one single cut for each contour
internal). The program XOYOZO is at the center
and the top of the part:
One critical fact to he established first is that the CNC dius offset commands G41 or G42 as well as the D address
system always calculates a specified offset by its euUer ra- offset number - with the appropriate cancellation by G40.
dius, lIot by its diameter.l[ means the programmer provides
[he cutter radius offsel in the form of a D address. On the Evaluating what emc/I)' happens during the tool motion
machine, the programmed offset DO I will apply to the cut- for each cutting method (external or iJUernal) offers certain
ter radius registered in offset 1,002 \0 (he radius registered options. In both cases, the cutling tool moves from the
in offsel 2, ecc. What actual amounts are in these registers? starting position, within (he clear area, to the large! posi-
tion of the machining contour. This is the motion where the
Since no radius oflhc cutter is included anywhere in the culler radius offset is applied, so Ihis motion is critical. In
program, the offset register D mllst normally contain the fact, this is the motion that determines the final measured
culler radius actual value. Be careful - some machine pa- size of the parl. Each method can be considered separately.
rameters may actually be set to accept the cutter diamefel;
although all internal calculations are sti II set by the radius. • Offset Adjustment
Evaluate program 03004; what will be the stored amount Before any speciai details can be even considered. think
of DOl? A 0.750 inch end mill is used, so the DOl should about how the offset amount can be changed. rn those cases
be set to .375. This is correct in theory, bUI factors such as where the size of the part is to be adjusted, the incremental
tool pressures, material resistance, tool defiecLion, actual change of the offset value is a good choice. Incremental
1001 size, tooltoJerances and other faclors do inlluence the offset change means adding to or sublracTing/rom the cur-
finished part size. TIle conclusion is that the DOl registered rent offset amount (using the +INPUf key on a Fanuc
amount can be .:'75, but only under idea! conditions. screen) or sloring the adjustment in the Wear offset screen
column. Changes to the program data is never the option.
Ideal conditions are rare. The same factors Ihat influence
machining will also have a significant effect on part dimen- • Offset for External Cutting
sions. It is easy to see thal any measured size that is not
within tolerances can be only oversize or undersize and ex- Evaluate the tolerance range for the outside circle 02.5.
renwl and internal cutting method does make a difference The tolerance for this diameter is +.002/-0.0, so all sizes
as to how the offset can be adjusted. between 2.500 and 2.502 are correct. Any sIze smaller than
2.5 is undersize and a size greater than 2.502 is oversize.
Regardless of the cUlling method, there is one major rule
applied to the cutter radius offset adjustment in any control There are three possible results of the measured size for
system - Ihe rule has two equal pans: external cutting. All examples are hased on the expected
middle size of 2.50 I and on DO 1 holding the amount of
POSITIVE increment to the cutter radius offset will cause 375, which is the radius of a 0.750 milling culler.
the cutting tool to move AWAY from the machined contour.
o External measured dimension - Example 1
NEGATIVE increment to the cutter radius offset will cause
the cutting tool to move CLOSER to the machined contour. 2. SOlO Ivilh DOl", 0.3750
Note the word 'incremenr' - it means that the current ra- This is the ideal result - no offset adjustment is necessary.
dius offset amount will be changed or updated - but not re- The tool culling edge touches the intended maChining sur-
placed - with a new amount. The concept of 'moving away' face exactly. All is working well and the offset setling is ac-
and 'moving closer lO' the part refers 10 the tool motion as curare. Only standard monitoring is required. This is not
the CNC operator will see. TI1e measured size of the part such a rare situation as it seems - in fact, il is quite common
can be controlled by adjusting the culler radius offset value with a new CUller, rigid setup and common tolerances.
in lhe control, programmed as the D address, according to
these two rules. The most useful rule that applies equally to
o External measured dimension - Example 2 :
the external and internal adjustments has two alternatives:
2.5060 'Nilh DOl::: 0.3750
To ADD more material TO the measured size,
The measured diameter is .005 oversize. TIle tool edge
use LARGER setting amount of the 0 offset
has nOI reached the contour and has to move closer to it.
The radius offset amount has to decrease by one hal f of the
To REMOVE material FROM the measured size. oversize amounl, which is on the diameter or width bUlthe
use SMALLER setting amount of the 0 offset offset amount is entered as a radius, per one side. Offsel
DOl is adjusted incremenlally by .0025, to 001==0.3725.
Experienced CNC operators can change offset settings at
the machine, providing the program contains the culler ra- o Externalrneasured dimension - Example 3:
CUTIER RADIUS 5
Lbl
Figure 30·34
Relationship of the /00/ reference point and the nose radius center
T2
b.
Figure 30-37
T7 EHect 01 tool nose radius oHset . (a) oHset not used (b) oHset used
• Sample Program
The following program example 03005 shows a simple
T3 application of the lDOI nose radius offset all an external and
internal contour, based on the drawing in Figure 30-38.
Figure 30-35 Only the finishing cuts are shown - roughing is also neces-
Arbitrary tOO/lip numbers for nose radius offset· rear lathe shown sary, but would most likely use the special G71 multiple
repetitive cycle, described in Chapter 35.
6
2
.- 1 00
I'l.O
I.t) I.t)
NN
0
N
C'">N
C\lN
,
NN
• .
..- co
..- 0 ,
NN
..-
90
NN
X4.750
7 5 X4.510
X3.250
TLR X2.650
3
.--
I
4
X2.410
- - X1.990
8 TLR :;: Tool radius X1.750
XO.950
Figure 3D-36 -- XO.750
-XO
Schematic illustration of the too/ tip numbering (Fanuc controls)
l.O 00 0
I' 00 C\J
• Effect of Tool Nose Radius Offset ...-
.
00 ...-0
N, ,
NC\J 0 ,
Some programmers do not bother using the tool nose ra- N NN N
t!ius offset. ThaI is wrong.! TheorelicaJly, there is 110 need Figure 30-38
for the offset if only a single axis is programmed. However.
Simplified sample drawing for program exampfe 03005
2 30
Note that the contour start positions are in the Figure 30-40
clear area - away from the pan. Make sure there is enough Tool nose radius offset change for the same tool
clearance. Cutter radius inteJference alarm
(alarm #41) is always clearance. N2l T0100 (CORRECT APPROACH)
N22 G96 S400 M03
• Minimum Clearance Required N23 GOO G4l Xl.7 ZO T010l MOa (START)
N24 Gal X-O 07 FO.D07 (FACE OFF)
N25 GOO ZO.l (ONE AXIS ONLY)
N26 G42 Xl 0 (THEN COMPENSATION)
N27 Gal Xl.4 Z-O.l FO.012 ( CONTOURING)
N28 Z-O.65
>TLR x 2 - x2 N29 X ••.
From all available machining operations, contol/ring or Planes in the mathematical sense have their own proper-
profiling is the single most common CNC application, per- ties. There is no need Lo know them all, bUllherc are impor-
haps along wilh hole making. During conlouring, Ihe 1001 lant properties relaling 10 planes lhat are useful in CNC
mOlion IS programmed in at least three differenl way~: programming and in various phases or CAD/CAM work:
o Tool motion along a single axis only o Any three points that do not lie on a single line define
a plane (these points are called non-collinear points)
o Tool motion along two axes simultaneously
o A plane is defined by two lines that intersect each other
o Tool motion along three axes simultaneously
o A plane is defined by two lines that are
There are additional aXIS mOlions thaL can also be applied parallel to each other
(thefourllI andfifth axis, for example), but on a CNC ma-
chining cenler, we always work with at least three axes, al- o A plane is defined by a single line
and a point that does not lie on that line
though nol aiwa)'s simullaneously. This reflects the lhree
dimensional reality of our world. o A plane can be defined by an arc or a circle
This chaptcr applies only 10 CNC milling systems, since o Two intersecting planes define a straight line
turning systems normally usc only two axes, and planes are o A straight line that intersect a plane
therefore no! required or used. Live tooling on CNC lathes on which it does not lie, defines a point
does no! cnler lhls subject.
These malhematical deflnitions are ol1ly Included for ref-
Any absolute point in the program is defined by lhree co- erence and as a source of addilional information. They are
ordinates, specified along the X, Y and Z axes. A pro- !lot required Cor everyday CNC programming.
grammed rapid motion GOO or a linear mOlion GO I can use
allY number of axes simullaneously, as long as lhe resulling
(001 motion is safe wilhin the work area. No special consid-
MACHINING IN PLANES
erations are required, no special programming is needed.
The path of a CUlling lool is a combination of straighl
That is notlhe case for the following lhree programming lines and arcs. A too! mOllon in one or two axes always
procedures, where Ihe various consideralions change quite lakes place in a plane designated by two axes. This type of
signilicanlly: mOl ion is n·vo-dimellSional. In contrast, any tool mol ion
o Circular motion using the G02 or G03 command lhal takes place in lhree axes al the same time is a Ihree-
dimensional motion.
o Cutter radius offset using the G41 or G42 command
o Fixed cycles using the G81 to G89 commands, • Mathematical Planes
or G73, G74 and G76 commands
In CNC machining, the only planes [hal can be defined
In all three cases - and only ill these three cases - pro- and used are planes consisting of a combination of any fwa
grammer has LO conSider a special selli ng of the control sys- primary axes XYZ. Therefore, the circular CUlling morion,
tem - il is called a seleCTion of lhe rnachining plane. curter radius offset and fixed cycles can Lake place only in
anyone of the three available planes:
WHAT IS A PLANE? [ ';('( plane ZX plane YZ plane
To look up a definition of a plane, research a slandard The actual order of ax is designarioJl for a plane delinition
textbook of malhematics or even a dictionary. From varioLiS is very imponant. For example, lhe XY plane awl the YX
definitions, plane can be described in one sentence: plane are ph.vsically the same plane. However, for the pur-
poses of defining a relative (001 motIon direction (clock-
A plane is a surface in which a straight line joining any wise vs. counrerclockwise or lefr vs. right), a clear standard
two of its points will completely lie on that surface. - must be established. .
269
270
(0 undersland the CNC applications of G02 and o XZ axes . G18 plane • I and K arc center modifiers
in planes, illustration in Figure 3 J o axes . G19 J K arc center modifiers
helpful.
• Absence in a Block
N .. G20 Englishunils
Omitting the G 18 command in block N43 wi II cause a se- There will no! be a 3-axis cutter radius orfset takIng place!
rious program error. If G 18 is omitted, the originally se- Tn the next example, compare the absolute tool positions
lected command G 17 wi II sti II be in effecl and circular in- for each plane when the rapid molion lS complered and the
terpolation will take place in the XY plane, instead of {he cutter radius ollset is activated in the program, Tool abso-
intended ZX plane. Iute position when the culti ng motion is completed depends
on the mOlion following block N 121.
In [his case, the axis assumed as 'missing' in the G 17
plane will be the Y axis and its programmed value of Y7.5. The radius offset val ue of D25= 100.000 mm, stored in
The control system will process such a block as if i[ were the conlrol offset registry, is used for the next example:
specified in a complete block:
o Example:
N43 G17 G02 X7.0 YI.S R3.0
Nl20 G90 GOO G41 xso.o YIOO.O Z20.0 D2S
An interesting situation will develop if the plane selecrion N121 GOl X90.0 Y140.0 ZO F180.0
command G J 8 in block N43 is absent, but [he circular in-
terpolation block contains two axes coordinales ror the end The compensated tool posit ion when block N 120 is com-
point of the circular motion: pleted, wi I! depend on the plane G l7, 018 or G 19 currently
in effect:
N43 G02 X7.0 Z-3.0 R3.0 G17 is stilll;1 effect o If G17 command is programmed with three axes:
Although G 17 is still the active plane, [he arc will be ma- G17X .. Y.. Z.. XV motion will be compensated
chined correctly in the G 18 plane, even if G 18 had not been
programmed. This is because of the special control feature
o If G18 command is programmed with three axes:
called complete instruction or complete data priority, pro-
vided in block N43 of the last example. The inclusion of G18X .. Y.. Z.. LX motion will be compensated
cwo axes for the end point of circular motion has a higher
priority rating than a plane selection command itself. A
complete block is one that includes all necessary addresses o If G19 command is programmed with three axes:
without taking on modal values.
G19 X.. Y.. Z.. YZ motion will be compensated
Two axes programmed in a single block The following practical programming example illustrates
override the active plane selection command.
both circular interpolation and cutter radius offset as they
are applied in different planes.
3.5
2.5
-,
Figure 31-5
Too! path fDr programming example 03101
Even with the ever increasing use of carbide cutters for END MillS
metal removal, [he rraditional HSS (high-speed steel) end
mills still enjoy a great popularity for a variety of milling End mills are the most common tools used for penpheral
operations and even on lalhes. These venerable cutters of- milling. TI1ere is a wide selection of end mills available for
fer several benefits - they are relatively inexpensive, easy 10 just about any conceivable machining application. Tradi-
find, and do many jobs quite well. The term high speed tional end mills come in metric and English sizes, variety of
sleel does nOI suggesl much produclivity improvement in diameters, styles, number of CUlling flules, numerous flute
modern machining, particularly when compared \0 carblde designs, special corner designs, shanks, and tool material
cutters. It was used long time ago to emphasize the benefit compositions.
of this tool maLeriallo carbon tool sleel. The new material
of the day was a 1001 steel enhanced wi th tungsten and mo- Here are some of the most common machining opera-
lybdenum (i.e., hardening elements), and could use spindle tions that can be performed with an end mill - HSS, cobalt,
speeds two La three times faster than carbon sleelloois. The solid carbide or an indexable insert type:
term high-speed-sleel was coined and Ihe HSS abbrevia-
tion has become common to this day. o Peripheral end milling and contouring
o Milling of slots and keyways
The relalively low cost of high speed steel tools and their
capability to machine a part to very close tolerances make [) Channel groves, face grooves and recesses
Lhem a primary dluice for many millillg applications. End o Open and closed pockets
mills arc probably the single most versatile rotary tool used
on a CNC machine. o Facing operations for small areas
The solid carbide end mills and end mills wilh replace- o Facing operations for thin walls
able carbide spiral tlutes or inserts are frequently llsed for o Counterboring
many different jobs. Most typical are jobs requiring a high
metal removal rates and when machining hard materials. o Spotfacing
The HSS end mill is still a common cutting tool choice for o Chamfering
everyday machining.
o Oeburring
Many machining applications call for a harder LOoling
End mills can be formed by grinding them into required
material chan a high speed steel, but not as hard as carbIde.
shapes. The most common shapes are the flat bottom end
As the tooling cost becomes an issue, the frequent solution
mill (tJ1e most common lype in machine shops), an end mill
is to employ an end mill with additional hardeners, for ex-
with a full radius (often called a spherical or a hall nose end
ample a cabal I end mill. Such a 1001 ~s a lillie more expen-
mill), and an end mill with a corner radius (often called the
sive than a high speed steel tool, but far less expenSlve t~an
bull nose end mill).
a carbide 1001. Cobalt based end mills have longer cullll1g
tool life and can be used the same way as a standard end Each type of an end mill is used for a specific type of ma-
mill, wilh a noticeably higher productivity rate. chining. Slandardflat end mill is used for all operations that
require a nat bottom and a sharp corner between the part
Solid carbide end mills arc also available in machine
wall and bottom. A ball nose el1d mill is used for simultane-
shops and commonly used as regular small to?]s. Larger
ous three dimensional (3D) machining on various surfaces.
lools made of solid carbide would be too expenslve, so spe-
An end mill similar ro a ball nose type is the hull Hose end
cial end mi lis with i ndexable j nserts are the lools of choicc.
mill used for either some 3D work, or for tlm surraces that
They can be used for bOlh roughing operations and preci-
sion finishing work.
req~ire a corner radius between the part wall and bottom.
Olher shapes are also required for some special machining,
This chapter takes a look at some technological consid- for example, a center CUlling end mill (called a slot drill), or
erations when the CNC program calls for an end mill of any a taper ball nose end mill.
type or for a similar tool that is used as a profiling tool for
Figure 32-/ shows the Ihree most common types of end
peripheral cutting and cOnlouring. This is an operation
!llills usecJ ill inuuslry and the relationship of culler radius
when the side of (he cuttcr does most of work.
10 the culler diameter.
275
276 Chapter 32
NOSE
MILL
BULL NOSE
END MILL
•
infor-
malion
• End Mill S
R R-···' / rdating to the size of an end
D --, D 0--
for CNC machining:
IS a
larly at sharp corners, or
stored. When handled ~~r'~~rt
great efficiency and t
I
• Indexable Insert End Mills 1,5D
• Number of Flutes
.SPEEDS AND FEEDS
an end mill, particularly a
hardness, the number of flutes should In many other sections of Ihe handbook, "'..,"'''''''''''
mary For profiling, many programmers se- are mentioned. Tooling catalogues have charts
(virtually automatically) a four-flute end mill recommendations 0/1 speeds and feeds for parlitular
tool than 0.625 or 0.750. with different materials. However, one
- thai is - it has to cuI into a solid mate- (English version) is used for calculating the
- has normally only two flutes, in rlmin (revolutions per minute):
This 'plunging-lype' of end mill is
a more technical name as a cemer-culling
old-fashioned name, a SIOl drill. The
no relation to the tool called a drill, but La
- just like a drill, a slot drill penelrates
parallel to the Z axis.
n::ii' where ...
II is the area of small medium end mill diameters thal
the most attention, In this size range, the end mil!s : :;: Spindle speed {revolutions per
come in two-, four-flute configurations. So what 12 Constant to convert feet to inches
are the benefits of a two-flute versus a three-flute versus a ft/min Surface speed in feet per minute
11: Constant for flat to diameter conversion
flute for example? The type of material is o of in inches
guiding
formula is similar:
compositions. there is (he expected
",,,,u... ,v," or a trade On a positive side.
mill better conditions (0
cuts.
To calculate a culling feedrate for any milling operation, The English units version of the formula is:
the spindle speed in rlmin must be known first. Also known
has to be the number of Ilutes and the chip load on each in/min
flute (suggested chip load is usually found in tool cata-
logues). For the English units, the chip load is measured In r I min x N
inches per IOOTh (3 tooth is Ule same as 3 flute or an insert),
with the abbreviation of in/rooth. The result is the cutting Metric units formula is very similar, it calculates the feed
fcedrate that will be in inches pcr.minute - in/min. per [oolhfi in 111m/tooth:
For a lathe feedralc using standard turning and boring
lOols, the number of {lutes is flut applicable, the result is di- mm/min
rectly specified in inches per revolution (in/rev) or millime- r / min x N
ters per revolution /11m/rev.
When using carbide insert end mills for cUlling steels. the
in / min ;;: r / min x f t x N faster spindle speeds are generally better. At slow speeds,
the carbide culler is in contact with a steel being cold. As
~ where ... the spi ndJe speed increases, so does the steel temperature at
the tool cuui ng edge, produci ng lower strength of the mate-
in/min = Feedrate in inches per minute rial. That results in favorable cutting conditions. Carbide
r/min =: Spindle speed in revolutions per minute inscrt cutting lools can often be used three limes and up to
I, =:; Chi p load in inches per tooth (per flute)
five limes faster than standard HSS cutters. The two basic
N = Number of teeth ~flutes)
rules relali ng to the rei ationsh ip of tool material and spindle
For metric system of measurement, the chipload is meas- speed can be summed up:
ured in millimeTers per looth (per flute), with the abbrevia-
lioll of !'Iull/looth. The meuic formula is similar to lhe one High speed steel (HSS) tools will wear out very quickly,
listed for English units: if used at high spindle speeds = high r/min
~ where ...
• Coolants and Lubricants
mm/min = Feedrate in millimeters per minute
r/min Spindle speed in revolutions per minute Using a coolant with a high speed steel (HSS) cutter is al-
f, ::: Chip load in millimeters per tooth most mandatory for culling all metals. Coolant extends the
N Number of teeth (flutes)
tool life and its lubricating attributes contributes to the im-
As an example of the above formulas, a 0.750 four flute proved surface finish. On the other hand, for carbide insert
end mill may require 100 fUmin in cast iron. For the same cullers, coolant may not he always necessary, particularly
cUlling tool and pari material, .004 per flute is (he recom- for roughing steel stock.
mended chip load. Therefore, the two calculations will be:
Never apply coolant on a cutting edge
that is already engaged in the material!
Spindle speed:
• In and Out Ramping Figure 32-4 illustrates the two cutting directions,
Climb Milling the cut and upon exit, the chip is very thick. The practical
result is possible hardening of the part. rubbi ng the tool into
Climb milling - sometimes called the down 111 i II ing - uses (he material, and a poor surface finish.
rotation of the cutter in the reeding direction and has the
lendency to push the part against the table (or the fixture). • Width and Depth of Cut
Maximum (h of the chip occurs at the heginning of
the cut and upon exit, the chip is very th in. The practical re- For good machining, the width and depth of cut should
sult is that most of the generated heat is absorbed by [he correspond to the machining conditions, namely the setup,
chip, and hardening of the part is largely prevented. the type of malerial being machined and the cutting tool
used. Width of cut depends also on the number of flutes of
Do not misunderstand the words climb and down describing the cutter that are actually engaged in the cut.
the same machining direction.
Approximately one third of the diameter for the depth of
Both terms are correct, if taken in the proper context. CUl is a good ru Ie of thumb for small end milis, a IiHle more
for larger end mills.
Conventional Milling
Pcripheralillilllllg requires a solid Illachliling knowledge
Conventional milling - sometimes called the up milling - and certain amount of common sense. If a successful ma-
uses rotation of the culler againslthc feedi ng direction. and chining operation in one job is documented, it can be
has the tendency to pull the part from the table (or !he (ix- adapted to another Job with easc.
ture). Maximum thickness of the chip occurs at the end of
SLOTS AND POCKETS
• Closed Boundary
The excessive material within a closed boundary can be 1.77
removed in two on the cutling operation.
One way is La use an move II cowards the
outside of the boundary, another way is to use an internal
1001 and move it towards of the boundary. In both 1,8 --
cases, the actual follows, along the Olll-
side of a pari is nol pocketing but peripheral Figure '33 1
A
281
Chapter 33
..........................................
of Method of Cutting
an much.
is in eotry into the matcnal.
(001
locmion - too! has La into the
the Z axis, unless there is a hole. Figure 33-4
to use a cel1ter cUlling mill (known as Roughing operation detail for a closed slot example 03302
If this type of end mill is no! or ma-
conditions are not suitable, tool will have to ramp Internal Contour Approach
into the material, as a second method. is a linear
usually in the XZ, the YZ, or axes. In the tool is now at the center of the
of slot, ready to start cut. Climb milling mode
has been selected (he contour approached In such a
way that the tool to its left One way is the
make a straight linear cut current tool location at
the center, LO the 'south' of the left arc (while ap-
0.21 plying the cutter radius
This method works, but when approaching an inner con-
lour it is better to use a tangential approach. An internal
1 contour approached at a requires an auxiliary ap-
proach arc (so called lead-ill since the linear approach
towards the contour is not i.l
0.885 A-A
Although the tangential an arc Improves
surface finish of creates another
problem. cutter cannor be sraned
Figure 33·3 interpo/alion a non-circular
A closed slot nrfllVlln1mUlr, example 03302 to be added " two motions from the
center to the start
shown in pom[ the contour:
slot
already established will ap- o First, a linear motion with cutter radius
A 0.500 inch end mill will be o the tangential approach arc motion
a center cutting geomClTy thai allows
technique is illustrated in
POCKET MILLING
~ where ...
Pocket milling 15 also a Iyplcal and common on
RI Radius ofthe tool CNC machining centers, Milling a means to remove
R, :::: of the approach arc arc) material from an enclosed area, by
Rc Radius of the contour (slot radius) This bounded area is further by
tom, although walls and bottom could tapered, convex,
Supply some numeric data radius can
concave, rounded, and have other shapes. Walls
be calculatcd. of all
create the boundary contour. Pockets can have rec-
three radii- The slOI conlOur by Ihe
tangular, circular or undefined can be empty
dnlwing, Once the cUlling tool Ihal radius
side or they may have islands.
becomes fixed as well CRt). ap-
proach radius (Ru). Programming pockets manually is usually only
lalcd accurately_ for simple pockets, pockets of regular shapes, such as rec-
tangular or circular pockets. For pockets wilh more com-
From the formula, it is. thai
plex shapes and pockets with islands, the of a
must be greater than the culler
computer is usually required.
must be smaller Ihat the contour
the range (within
• General Principles
only increments of.O I0 are
- .260 or .290? Well, the There are two main considerations when programlTii a
rather a larger approach pockel for milling:
gential approach takes place at a
a smaller radius. The result is an o Method of cutter entry
For program 03302, .280 is as approach ra- o Method of roughing
dius. This selection meets all the three relationships:
a 10 slart mllling a pocket (into solid mate-
culler mollon has to be programmed to enter along
of spindle (2 axis), which means the cutter
center cutting to be able to plunge cut. In cases
Thai is alilhe information needed beforc wriring the pro- cut IS eHher not praetical or not possible,
gram. Note the programming similarities with the open slot ramping can be used very successfully.
listed in program 0330 I. melhod is oflen used when the center cutting 1001 is
the Z axis to be used to-
03302 (CLOSED SLOT) or This motion will,
N1 G20 (INCH MODE)
or a 3 axis linear motion.
N2 G17 G40 GaO (STARTUP SETTINGS)
N3 G90 G54 GOO X3.0 YO.SSS 5950 M03 (START)
it
N4 G43 ZO.l HOl MOS (START POSITION ABOVE)
N5 GOl z-O.2 F4.0 (0.01 LEFT ON EOTTOM)
N6 Xl.5 F8.0 (CUT TO SLOT RADIUS CENTER)
N7 Z-O.21 F2.0 (FEED TO FULL DEPTH) V'-,111\.1II where to
NS 041 Xl.22 YO.86S DOL F8.0 (LINEAR APPROACH) so is the widTh
N9 G03 Xl.S YO.585 RO.28 (CIRCULAR di to in climb
NlO GOI X3. 0 (CUT BOTTOM WALL) milling mode. It may he difficult 10 I~flve eX:'lctly the same
Nll G03 Yl. 185 RO. 3 (CUT RIGHT SLOT RADIUS) amount in the pockeL
AND POCKETS 5
Many cuts will be irregular and s[Ock amount will not illustrate the complete
even. thaI reason, it is quile common 10 tooling selection is Important. Material is
nishing cut of the pocket contour, before lant and so are other machining rect-
cut place. One or more tools may be pockets are often drawn with sharp corners, they
situation, depending on exact requirements. always have COrners of the tool when
The corners in the drawing are ), and
typical methods for roughing a are: 6 center CUlling end mill (0.3125).
o may a good choice, but for finishing, the
a lillie smaller so the tool can actually cur in comer,
o - from the inside of the pocket out not rub there. Selection of a 0.250 end mill is reason-
o One direction - from the outside of the pocket in and will be used it in the example.
other pocketing options are all the material in lhe enclosed area has to re-
as a true spiral, morph, one way, and moved (including the bottom), think about aU
cases, there is a choice of speci fying Ihe an- where the cutting tool can enter into the
cut, even a user selected point of entry and ti or ramping. Ramping must always be done in a
overs. Manually, these more complex methods may area, bUl plunging can be done almost anywhere.
as well, but it may be a very tedious work. are only two practical locations:
o center
• Pocket Types
o Pocket corner
The most common are also the easiest to
gram. They all have a regular shape, without any islands: to both selections and the inevi-
at the pocket center, the tool
o Square pocket path and, after the initial cut,
o Rectangular milling orconventional milling mode.
more math calculations involved in Ibis
o Circular method, starling at the pocket corner, is
are ar as well, but uses a zigzag motion, so one Cllt
Square
tally the same their side lengths, n a climb milling mode, the other cut will be in a
there IS no in programming. machining. It is a little easier for cal-
In the eX<.Impk, the corner will be used
RECTANGULAR POCKETS
Any corner pocket is equally suitable for the start.
Rectangular and are quite easy to pro-
IJV''''''-''''
In the 03303. the lower lefr corner of
p<!rticularly jf are parallel 10 the X or Y axes. As pocket will
an example of a pocket, the one illustrated in """""rw,Cl"" factors the programmer has Lo
Figure 33-6 will be start location for the CUlling tool in
an ...... "J"..,u area:
0.15 -a- --- o Cutter diameter (or radius)
I
o Amount of left for finishing
t o Amount of stock for semifinishing
s
c w w
t
I
I
Q
'- r Y1
Y1 T
f c t- I .
Xi;--
• Stock Amount
are two stock amounts (values) - one relates to (he
finishing operation. usually done with a separate finishing than slepover will
tool, the other one relates to the semifinishing operation. cuts (zigzag lype). There is
usually done with the roughing tool. The cuner moves back number of culS is se-
forth in a zigzag direction, leaving behind so number:
scallops. In 20 work, [he word 'scallops' is to
uneven wall surface caused by lhe tool shape, and is o number of cuts will terminate the roughing
on the opposite side of the pocket relative
in 3D cUlling as well. The result of such a zigzag to the start location
is generaHy unacceptable ror the finish machining. JeA ..m,",c
of the difficulty of maintaining tolerances and surface o number of cuts will terminate the roughing
wh de culting uneven stock. on the same side of the pocket relative
to the start location
avoid possible cUHing problems later, a secondary
operation is often necessary. It is to Practically, it does not matter which corner is 10
elimmate the scallops. Choose semifinishing cut start at or in which direction the rUS( cut begins. What mat-
machining tough materials or when ters is that the stepover is reasonable and, preferably,
Semifinishing allowance. for all cuts. There is a simple way of calculating the
as the C val ue in the ill ustralion, can to zero. 1f over, based on a given number of cuts. [f the
thai IS case, it means no additional is amount is loa small or 100 large, just repeat the calculation
Typically al 11 a small value. wilh u different number of cuts N.
Q: .5 - 2 x 0.125
Q = 0.2360
2 x 0.025 - 2 x 0.01) / 5
,
Y1
..
-....., X11--
figure 33·9
Semifinishing tool path at the last roughing location,
to use the pocket
lJl'-J'LLLLL\.. U
and leaves equal stock for 11I.....hlf.,., operation
width. This be a better
is narrower along the X axis, than it is
-2x5
• length of Cut
il'''LU>.~,the length, the incremental dis- W 2x - 2x 5
to be calculated.
N11 X1.68 3)
N12 YO.236 3)
N13 X-l. 68 4)
N14 YO.236 (STEPOVER 4)
NlS Xl. 68 S)
N16 YO.236 5)
N17 X-1. 68 6)
w (- - SEMIFINISH START -------- ---------- )
NIB X-0.01 (SEMIFINISH STARTUP X)
N19 Y-O,OI (SEMIFINISH STARTUP Y)
N20 Y-1.l9 (LEFr Y-
\ N2l Xl. 7 (RIGHT X+ MOTION)
N22 Y1.2 (up Y+ MOTION)
Ra N23 X-l. 7 (LEFI' X- MOTION)
Rc TYP.
N24 G90 GOO ZO.l M09
N25 G28 ZO.l M05
33·10 N26 MOL
Typical tool path (or a rectangular pocket
N27 T02 (.250 FINISHING END MILL)
of Iii CUI is N28 M06
mode and the radius offset N29 a90 G54 GOO Xl.S Yl.2S 51500 M03 TOl
N30 G43 ZO.l H02 MOB
of the contour. N31 GOI Z-0.15 F12.0
o Example: (--
N32
FINISHING POCKET ----------------- - ----)
G9l a41 X-0.37S Y-0.37S D02 FlS.O
N33 G03 XO.37S Y-0.37S RO.37S F12.0
To calculate the approach N34 GOI XO.8437
drawing, start with the corner N3S G03 XO.1S63 YO.1563 RO.1563
5/32 (.1563) and the lOol N36 GOl n.1874
so the condition R, < N37 G03 X-0.1563 YO.1563 RO.1563
the condition R" > Rr. N38 GOl X-l.6874
larger than (he 1001 as N39 G03 X-0.l563 Y-O.lS63
pocket length and width are N40 GOl Y-l.lB74
possible, choose the approach N4I GO) xO 1563 Y-O.lS63 RO.1563
N42 XO.8437
pockel widlh W, for a lillie N43 a03 XO.375 YO.375 RO.375
In (he example, N44 GOl G40 X-0.37S YO.37S FlS.O
N45 G90 GOO ZO.l M09
Ra. = W / 4 .. 1.5 / 4 N46 G28 ZO.l MOS
Ra. c: .375 N47 X-2.0 YlO.O
N48 M30
Condition is satisfied, the %
the tool radius, and can be
the progrrun carefully. It follows all the decisions
• Rectangular Pocket Program and offers many details.
Once all selections and decisions have been done, In the program, blocks N 17 and N 18 can be joined to-
program can be wrillen for Ihe pockel in into a SI block. The same applies to blocks N 19
Two lOols will be used, bmh 125.250 end mills, N20. They are only separated for the convenience of
cuuer must be able or center cUlting. Ihe tool mouons to match the llluslrations. There is
lower left corner of the parI. All In using the incremental mode of program-
tlnishlng steps art! documented in the program. mode would have beenjust as easy.
SLOTS AND POCKETS 289
CIRCULAR POCKETS
'1I
The olher common types of pockets are so called circular
or round pockets. Although the word pDcket somehow im-
plies a closed area with a solid boHom. the programming
method relating to circular pockets can also be used forcir- o
cular openings that may have a hole in the middle. for ex-
ample, some counterboring operations. I
J
To illustrate a practical programming application for a
circular pockel, Figure 33-11 shows the typical dimensions
Condition:
of such a pocket. -, d -
d<O
f--------- 2.0 -.--------,
I d > o
3
Figure 33-12
Relationship of the cutter diameter to the pocket diameter
2.0
• Method of Entry
The next step is to determine the method of the tool entry.
Figure 33·11 In a circular pocket, the best place to enter along the Z axis,
is al the center of lhe pocket. ff the pocket center is also the
Sample drawing of a circular pocket (program examples 03304-06)
program zero XOYO, and the pocket depeh is .250, the be-
ginning of lhe program may be similar to the following
In terms of plann ing. the first thing to be done is the selec- example (culting tool placed in the spindle is assumed):
tion of the culler diameter. Keep in mind, that in order to
make the pocket bottom clean, without any residual mate- 03304 (CIRCULAR POCKET - VERSION 1)
rial (uncut portions). it is imporlan[ to keep the stepover N1 G20
from one cut to another by a limited distance that should be N2 Gl7 G40 G80
calculated, For circular pockets, this requirement influ- N3 G90 G54 GOO XO YO S1200 M03
ences the minimum cutler diameter thal can be used [0 cut N4 G43 ZO.l HOl MOS
the circular pocket in a single 3600 cut. N5 GOl Z-0.25 F8.0
N6
• Minimum Cutter Diameter In the next block (N6), the cutting tool will move from
In the following illustration - Figure 33-12, the relation- [he pocket center towards the pocket diameter, and apply
ship of the cutter diameter to the pocket diameter is shown. culler radius offset "long the way, ThiS motion call be done
There is also a formula that will determine the minimum in two ways:
culler diameter as one third of the pocket diameter. The o As a simple straight linear motion
mi lIing wi 11 start at the circular pockel center, with a si ngle
360" tool motion. In practical terms, selecting a cutter o As a combined linear motion with a circular approach
slightly larger thall the minimum diameter is a much better
choice. The major benefit of this calculation is when the • linear Approach
pocket has to be done with only one tool motion around.
The linear departure from the pocket center can be di-
The formula is still valid, even if cutting will be repeated
recled inlo any direction, but a direction lowards a quadranl
several times around the pocket, by increasing the diameter
point is far more practical. In the example. a motion along
being cut. In that case, the formula determines the maxi
the Y positive direction is selected, into the 90° position.
mum width of the cut.
290 Chapter 33
Along the way, cutter radius offset for the climb milling N8 GOl G40 YO FlS.0
mode G4! is programmed, followed by the full 3600 arc' N9 G28 Z-0.2S M09
and another straight motion, back towards the center. Dur- mo G91 G28 XO YO MOS
N1l M30
ing this motion, the cuttcr radius offset will be cancelcd.
%
Figure 33-J3 shows the tool path.
Another programming technique for a circular pocket is
-.
, 2.0- much morc practical - one Ibal makes better surface fin-
ishes and also maintains tight tolerances required by many
drawings. Instead of a single linear approacb directly to-
wards lhe pocket diameter, the CUlling tool can be appJied
in a combi ned Itnear-circular approach.
03305 (CIRCULAR POCKET - VERSION 2) The calculation is logically similar to the one for the rec-
N1 G20 tangular pocket and the desired amount of the stepover can
N2 G1. 7 G40 Gao be achieved by ch.anging the number of steps.
N3 G90 G54 GOO XO YO S1200 M03
N4 G43 ZO.1 HOI MUS The example for program 03306 uses three stepovers,
NS GOl Z-O.25 FB.O calculated from the following formula:
N6 G4l XO.625 YO.125 DOl FlO.D
N7 G03 XO YO.7S RO.625
N8 J-O.75 R - TLR - S
N9 X-0.625 YO.125 RO.625 Q ==
NlO GOI G40 XO YO F1.5.0 N
N11 G28 Z-O.25 M09
Nl2 G91 G28 XO YO MOS l@f where ...
m3 IDO
% Q Calculated stepover between cuts
R = Pocket radius (pocket diameter 0/2)
This programming technique is by far superior to the TlR = Tool radius (cutter diameter /21
straight linear approach. It does not present any additional S Stock left for finishing
programming difficulty at all, partly because of the sym- N = Number of cutting steps
metry of tool motions. In fact, this method can be - and
should be - used for just about any approach towards an in- In aUf application. {he example values are:
ternaJ contour finishing.
o Example:
• Roughing a Circular Pocket
R = 1.S / 2 = .75 Diameter D =. 1.5
Often a circular pocket is too large for a given tool to TLR = .375 / 2 = .1875
guarantee the bottom cleanup in a single cut around. In this S .025
case, the pocket has to be enlarged by roughtg it first, in N = 3
order to remove all excessive material, then the finishing
tool path can be applied. Some controls have special cycles, Using Ihe above formula, the stepover amount Q can be
for example, a spiral pocketing. On Fanue conlrols, custom found by calculation:
cycles can be created with the User Macros option.
Q = (.75 - .1875 - .025) / 3
As an example, the same pocket drawing will be used as Q = .1792
illustrated earlier in Figure 33-11, but machining will be
done with a 0.375 cutter - Figure 33-15. Final roughing program is quite simple and there is no
cutter radius offset programmed or even needed. Note the
r- D benefit of incremental mode G91. It allows the stepover Q
to be easily seen in the program, in the GOl linear mode.
Every following block contains the arc vector J, cutting the
TI next full circle. Each circle radius (1) is increased by the
--Q amount of stepover Q:
R
I
L 03306 (CIRCULAR POCKET ROUGHING)
N1 G20
N2 G17 G40 GSO
N3 G90 G54 GOO XO YO 51.500 M03
-S N4 G43 ZO.l HOI M08
TLR ./ N5 GOI Z-O.2S F7.0
N6 G9l YO.1792 F10.O (STEPOVER 1)
N7 G03 J-O.1792 (ROUGH CIRCLE l)
N8 GOl YO.1792 (STEPOVER 2)
Figure 33-15 N9 GO) J-O.3584 (ROUGH CIRCLE 2)
Roughing our a circular pocket - program 03306 mo G01 YO.1792 (STEPOVER 3)
Nll G03 J-O.S376 (ROUGH CIRCLE 3)
The 0.375 end mill is a small loolthal will not cleanup Nl2 G90 G01 XO Fl5.0
the pocket bottom using the earlier method. The method of Nl3 G28 Z-O.2S M09
roughing is shown in Figure 33-15, and the value ofQ is the Nl4 G9l XO YO MOS
m5 M30
equal stepover amount, calculated from the number of %
steps N, the cutter radius TLR and the stock amount S, left
for (he fmishing tool path.
292 Chapter 33
----------~--~ .............. .
There is so much information that can be covered in Ihis Txxyy format represents tool station xx and wear offset
section. that a whole book could be written just on the sub- number yy. For example, T0202 will cause the turret to in-
ject of turning and boring. Selected subjects are presented dex to the 1001 station #2 (first two digits) which will be-
in this chapter, others are covered in chapters dealing with come the working station (active toot). At the same lime,
lathe cycles, groovi ng, part-off, single poinllhread ing, etc. {he associated tool wear offset number (the second pair of
digits) will become effective as well.
TOOL FUNCTION - TURNING Selection of the 1001 number (the first pair of digits), also
selects the geometry offset on most modern CNC lathes. In
In terms of distinction, turning are boring are practically that case, the second pair of digits will select the tool wear
identical operations, except for (he area of metal removal offsel number. Any tool station selected by the turret station
where the actual machining takes place. Often, terms ex/er- number identification can be associated with any offset
nal fUming and internal turning are also used, meaning the number within the available offset range. In mosl applica-
same as turning and boring respectively. From program- tions, only one tool offset number is aclive for any selected
ming perspective, the rules are vinually the same, and any 1001. In such a case, it is wise to program the offset number
signi ficant differences wi]] be covered as necessary. the same as the 1001 number. Such an approach makes the
opera lor's j ob much east er. Consider the f oj low j n g ch oices:
CNC lathes require programming (he selected tool by its
tool number, using the T address. In comparison with a
GOO T0214 Tool slation 02, Ivearoff;el 14
CNC machining center, the tool function for lathes is more
extensive and calls for additional details. One major differ- 10 TllOS Tool slation JI, wear offset 05
ence between milling and turning controls is the facl that GOO T0404. Tool SUI/ion 04, wear offset 04
the T address for CNC lathes will make the actuaL tool
change. This is not a case in milling. No M06 function ex- Although all examples are technically correct, only thc
ists on a standard CNC lathe. last example format is recommended. When many tools are
used in a program, the offset numbers for individual tools
• T Address may be confusing, If they do nOl correspond to the tool Sfa-
tion numbers. There is only one ttme when the offset num-
One difference from machining centers is that a tool de- ber cannot be the same as the lool station number. That
fined as TOl in the program must be mounted in the lurret happens in the cases when /1-tlO or more offsets are assigned
station # I, tool defined as T 12 must be mounted in turret to the same tool, for example T0202 for [he first wear off-
station #12, etc. Another difference between milling and set, T0222 for the second wear offset.
turning tools is in the forma/ of the T address. The format
for turning system is T4, or more accurately, T2+2. The Leading zeros in the tool function can be omitted for the
first two digilS identify the turret station number and geom- tool number selection, but not for selection of the wear off-
etry offset, the last two digits identify the wear too! offset set number. T0202 has the same meaning when written as
number for the selected tool stat ion - Figure 34-1. T202. Eliminating the leading zero for tool wear offset will
result in an incorrect statement:
n2 means T0022, which is an illegal formal.
In summary, the active side of the turret (tool station) is
TiX,XYIY
"T-
...~[ Tool WEAR offset.. programmed by the first pai r of dlgtts, the wear offset num-
ber is programmed by the last pair of digits in the tool func-
tion command:
293
294 34
TURRET AT
MACHINE
X GEOMETRY OFFSET
( Diameter is negative]
Figure 34-2
Geometry offset is the distance from tool reference to program zero, measured along an axis from machine zero
TURNING AND BORING 295
• Tool Offset with Motion Also note that no GOO is required for a block containing
The second method is to program the wear offset simulta- tool indexing with zero wear offset entry. The advantage of
neously with a cuuing tool motion, usually during the tool programming the tool offset simultaneously with a motion
approach towards the part. This IS the preferred method. is the el imination of the jumpy motion; at the same lime, no
The following two examples illustrate this recommended overtravel condition will result, even if the wear offset is
programming of the T function for turning systems - the unusually large. The wear offset value will only extend or
shorten the progranuned rapid approach, depending on the
offset is activated when the second pair of digits in a tool
actual offset amount stored.
number call are equal to or larger than 01:
Generally, the tool wear offset register number is entered
N1 G20 T0100 before or during the rapid approach motion.
N2 G96 S300 M03
N3 GOO X .. Z .. T010l MOS
• Offset Change
Most lathe programs require one offset for each tool. In
Note the tool change in the first block N 1 - it uses no off-
some cases, however, the program can benefit if two or
sel number - just lhe tool number that is also the geometry
even more offsets are assigned to the same tool. Needless [0
offset number. The offset is applied two blocks later in N3.
say. only one offset can be active at one time. The current
In most cases. it makes no difference, whether the offset offset can be changed La another offset for the same tool to
is activated with or without a motion command. But some achieve the extra fleXibility. This is useful mainly in cases
limitations (Ire possible when programming the 1001 offset when individual diameters or shoulder lengths must be ma-
entry without a molion command. For example, If the wear chined to ex.act tolerances. Any new offset must be pro-
offset value stored is unusually Jarge and the tool starts grammed without a cancellation of the previous one. Tn
from the machine zero posicion, this type of programming fact, this is [he preferable method for changing from one
may cause an overtravel condition. offsel (0 another. The reason is simple - remember that any
offset change serves a purpose only during actual cutting.
Even in cases of a small offset value, there wi Il always be Offset cancellation could be unsafe if programmed during
a 'jump' motion of the turret when the offset is activated. cutting mOlion. This is a very important - and largely unex-
Some programmers do not like this jumpy motion, al- plored programming technique - that some detailed exam-
though it will do no harm to the machine. In these cases, the ples are justified.
besl approach is to activate the tool wear offsct during the
tirst motion, usuaJJy as a rapid approach motion towards
the part. One consideration is very important when the tool
MULTIPLE OffSETS
wear offset is activated together with a motion. Earlier In
this chapter was a comment that the lathe 1001 function is Most jobs machined on CNC lathes require very high
also a function causing the tool indeXing. Without a doubt, precision. High precision requires tolerance ranges as
the one situation La avoid IS the Simultaneous toolllldexino specified in the engineering drawing and these ranges may
and 1001 motion - it may ~ave dangerous consequences. '" have quite a variety. Since a single offset per toot is of Len
not enough to maintain these tolerances, two or more wear
The best approach is to start each lOa! with the too! index- offsets are required for one tool.
ing only, \vilhoU! any wear offsel:
The follOWing three examples are designed to present a
N34 T0200 M42 complete understanding of the advanced subject covering
mulliple offsets. The same basic drawing will be used for
The above example will register the coordinate selling for all examples.
tool 2, it will also index tool 2 into the working position, but
it will/wI activate any offset (T0200 means index for {ool 2 The project IS very simple - program and machine three
without tool wear offset). Gear range function may be diamelers as per drawing, and maintain colerances at the
added as well, if required, Such a block will normally be same time. One rule at the beginning - the program will no/
followed by (he selection of spindle speed, and rapid ap- lise the middle tolerance of the X or Z value. This is an un-
proach to the first position, close to the part. That is the fortunate praclice that makes changes to [he program much
block where the tool wear offset will be activated - on [he more dirficul[ at a later time, if lhe tolerances are changed
way towards the first posilion: by engineers or designers.
In the drawings, the following tolerances can be found:
N34 T0200 M42
N35 G96 5190 M03 o Tolerances only on the diameter
N36 GOO G41 X12.0 ZO T0202 MOB
N37 GOI Xl.6 FO.OOa o Tolerances only on the shoulders (faces)
o Tolerances on the diameters and shoulders
2 Chapter 34
- 0.125 WIDE
I
L~ __ ~~ __-+________________ ~ NJ2 TOSOO
""' 0.03 x 45° (3) NJ3 G97 S2000 MO)
N34 GOO X1.7 Z-1.255 T0505 MOB
N3S Gal Xl.2 FO.002
Figure 34-3 N36 GOO Xl.4S
Multiple offsets· I::AOIIII)II:: for diBmeters • 03401 lO7 Z-1.1825
lOB GOl Xl.31S Z-1.25 FO.OOI
programming solution is to include ltvo offsets for N39 X-O.02 FO.0015
for example, T0313 and T0314. In the I'Ann-t'l\
"""H"UF" N40 GOO XS.O
correct amounts have to be set before machining- N4l Z5.0 TOSOO M09
amounts for middle toler.ance are shown: N42 MlO
%
13 X-O.003 ZO.OOO
14 X+O.003 ZO.OOO TItis is the complete
quired. Since TOI and not
shoulders) must be ing examples, only T03 will be shown now on.
TURNING AND 7
o
o
o I.l) o
N I.l)
..- 1"-
IS! ci
1
,
t
·-,--0.03 X 45" (3)
34~4 34·5
Multiple offsets ~ f!){RfDDIP. for shoulders - 03402 Multiple offsets F!ltJ'J,mnlll for diameters and shoulders - 03403
(T03 - FINISH TURN) Note thalthe four X offsets (which control size
N19 GSO S3500 T0300 meters) lie up wilh the four Z offsets (which control
( - - OFFSET 00 AT THE START OF TOOL icngth of shoulders). Here is the T03 for program
N20 G96 5750 M03
N21 GOO G42 Xl.7 ZO.l TOl13 MOS 03403
( - OFFSET 13 FOR THE O. 4 SHOULDER
N22 XO.365 (TO) - FINISH TURN)
N23 G01 XO.625 Z-O.03 FO.002 NQ9 Gsa S3500 T0300
N24 Z-0.4 (-- OFFSET 00 AT THE START OF TOOL ----------)
N25 Xl.0 C-O.03 (K-0.03) N20 G96 S750 M03
N26 Z-O.7S T0314 N21 GOO G42 Xl.7 ZO.l T0313 M08
{- - OFFSET 14 FOR THE 0.75 SHOULDER (- - OFFSET 13 FRCM Z OVER TO Z UNDER ONLY - - -)
N27 Xl.375 C-O.03 (K-0.03) N22 XO. 365
N28 Z-l. 255 N23 Gal XO.62S Z-0.03 FO.002
N29 UO.2 N24 Z-0.4
N30 GOO G40 XS.O ZS.O T0300 N25 X1.0 C-O.03 (K-O.03) T0314
( - - OFFSET 00 AT THE END OF TOOL ------) (- - OFFSET 14 FROM X UNDER TO X OVER ONLY - - - )
N3l MOl N26 Z-0.75 TOll5
(-- OFFSET 15 FROM Z UNDER TO Z OVER ONLY
34
OFFSET (GEoMETRY)
0.0000 0
a certain gear range is ':>'-'''~'-l~.U speed
0.0000 0.0000 o is limited. If the exact of IS Im-
porlanl, always make an effort to alit the available
spindle in each range. Don't be 10 find out
that on most CNC machines, one rpm (I
lowest spindle speed may be
X Radius
don'l be surprised to find that
is shown as
len quite for spindle speeds in lWO
either lhe firsl paIr of the T if the J hasarange20to 1400
offset, or the second pair ~ a range of 750 LO 2500 r/min. When
and Z axis are (he columns where available in either range, such as 1000
are for each number, lhe of is not critical, but low
are only used if a tool nose radius
case, Ihe Radius will be the lool
is an actual, although unrelated,
will an arbitrary number, as de-
tool tip orientation. This Low gear range: 20 . 1075 r/min (M41)
C'"rlhp·r! in Chapter 30. High range: 70 - 3600 r/min (M42)
TURNING AND BORING 299
NSl TOlOO
turning and boring) NS2 G96 5450 M03
cut a shoulder to a diameter N53 GOO 042 XO.3 ZO.l T010l MOS
shoulde;r) requires (\ comer break. NS4 Gal XO.62S Z-O.0625 FO.OOl
is a cornman practice when N55 Z-O.4
N56 G02 XO.825 Z-O.5 RO.l
Many
NS7 Gal .:u.125
comers are to be NS8 Xl.2S Z-O.S62S
It is up to the .... ,.",,......,.....,,...., NS9 Z-O.9
the range of 0.005 to N60 G02 Xl.45 Z-l.O RO.l
required corner N6l Gal .:u.675
angle, or a blend radius N62 GO) .:u.S7S Z-l.l RO.l
of the comer break is "'1J",,",a,,-,'" N63 GOl Z-1.437S
N64 X2.C Z-1.S
must apply it. Comer
N65 X2.37S
o Functionality N65 Xl.55 Z-l.5875
... for strength, ease of assembly, and clearances N67 ua.2
N68 GOO G40 XlO.O Z5.0 TOlOO
o Safety N69 Mal
... sharp corners are dangerous
Only the fmished contour is (no facing cut),
o Appearance
at a selected clearance 1, with the calculated
... the finished part looks
diame:ter at XO.3. Each contour point has to be
In lathe work. many comer apply to cuts ",pr""" ••" calculated. At the contour the last chamfer
a shoulder and the (the cut takes a 90° been completed at a clearance of 0.025 above the larg-
tum in one axis at a time). start and end points calcula- est at X2.55, Z at Z-1.5875.
tion is not difficult but can consuming for some in manual work, of errors can
jobs, such as shaft with many different diameters. For
of programming is
02.5 it is easy to forget to
for bOling). The
the program in to
corner break?
o
N
The I vector
is used to create a chamfer starting from the X axis, c- c+
into the X+Z-, X-Z-. X+Z+, or X-Z+ direction
C+ C+
The K vector
is used to create a chamfer starting from the Z axis,
into the Z-X +, Z-X-. Z+ X+, or Z+ X- direction ...,
c- c-
......._ . . L ___ ~ __ ~---I....
K- K+
c- c+
i+ 1+
Figure 34·8
X+ Vectors C for automatic corner chamfering
Z+
In either case, the sign of I or K vector defines the direc-
tion of the chamfer cUlling within the coordinate system:
X- o Positive value of I or K vector indicates the
chamfering direction into the plus direction
1- i- of the axis not specified in the chamfering block
&- - -
GOI Z-1.7S IO.125 (CUTTING ALONG Z AXIS) If the unit control allows the C+ or C- veclors, the pro-
X4.0 (CONTINUING IN X AXIS AFTER 0iAMFER) gramming is much easier, as long as the motion direction is
watched. The two previous examples will be:
The vector K indicates the chamfering amounl WId mo-
lion direction when the lool molion is in the order of Shoul- GOI Z-1.7S CO.125 (CUTTING ALONG Z AXIS)
dPr-Clum1jN-f)imnf'It'l; which means cutting along the X X4.0 (CONTINUING IN X AXIS AFTER CHAMFER)
axis before the chamfer. The chamfer deviation can only be
from the X axis towards the Z axis, when the K vector is GOI X2.0 C-O.125 (CUTTING ALONG X AXIS)
programmed:
Z-3.0 (CONTINUING rn z AXIS AFl'ER CHAMFER)
• Blend 90 Degrees The radius deviation can also be from the Z axis
A a shoulder and (or
the X axis, when the R vector is programmed:
10 a similar way as the automalic 45°
GOl Z-1.75 RO.125 (CUTTING ALONG Z AXIS)
cham exclusively ill the GOl Inode.' X4.0 (CONTINUING IN X AXIS AFTER RADIUS)
Only one special vector R is used. For automatic blend ra-
dius, the vector the direction and rhe amount In either ease, the R vector defines lhe diree-
CUI for the radius: lion of the radius the coordinate
o The R vector is used o Positive value of R vector indicates the radius direction
into the plus direction of the axis not specified in the
starting ffom the X radius block
or X-Z + direction
o Negative value of R vector indicates the radius direction
- or- into the minus direction of the axis not specified in the
radius block
... to create a blend radius starting from the Z axis,
into the ,orZ+X-direction • Programming Conditions
The R vector definition is illustrated in Figure 34-9. corners for
modern CNC lathes a
In order to fully appreciate the differences between (he ing does nol produce a high precision parl, that is not the
two programming melhods (both are technically correct), purpose or roughing. Its main purpose is to remove un-
compare Ihe followIng program O}405 wiUl the earlier wanted slOck efficiently, which means fast and wilh maxi-
program 03404. The I and K vecrors are used for chamfer- mum tool life, and leave suitable all-around stock for fin-
ing, as they are more dinicu!lthen the C vectors: ishing. CUlling tools used for roughing are strong, usually
with a relatively large nose radius. 'I'hese tools have to be
03405 (AUTOMATIC CORNER BREAKS USED) able to sustain heavy depths of cut and high cutting feeds.
Common diamond shaped tools suitable for roughing are
NSI TOIOO 80° inserts (up \0 2+2 CUlling corners), and trigon inserts
N52 G96 5450 M03 (up 10 3+3 cutting corners). 2+2 or 3+3 means on 2 or 3
N53 GOO G42 XO.3 ZO.l TOlOl MaS
CUtllllg edges 011 each Side of the Insert. Not all inserts can
NS4 Gal XO.625 Z-0.0625 FO.OO3
N55 Z-O.5 RO.l be used from both sides. Figure 34-10 shows some typical
NS6 X1.25 K-O.062S lools and orientation for rough turning and boring.
N57 Z-l.O RO.l
Light cut only I
•
N58 X1.875 R-O.l .Li9ht cut only I
N59 Z-1.5 IO.0625
,
N6D X2.375 I
of cut IS suftl- specifics the amount of material left for these opera-
skin' of the mR- . lions. If 100 much material or too I ittle is len to be
is usually a must cut during finishing, the part finish
before tool ac- quality will suffer. Also, carefully
allowance overall on the part. but individual
ances for (he X and Z axes.
• Operations
As before, there is a general rule of
Finish operations take cutting mOlions, axis, thai is forculting
after mosl of the stock removed (roughed OUL). to or slightly larger than radius of the
leaving only a small amount of stock for finishing. jog 1001. For example. if a .O~ I inch (001 nose
The cutting 1001 can nose radius and. for even mm) is used for finishing, leave to
a better surface finish, spindle and lower cut- (about I mm). That is the physical
ling feeds are lypical. amount assigned per side, not on diameter!
Many different tools can be The amount of stock left on the Z axis (typically
as well, bUI the most tYPIcal IIlgshoulders at 90°) IS much more cnhea!. If
mond shaped inserts, wilh a the positive X axis only turning}, or the
Their shape, common orientation and (for boring), with a lool that has a lead angle of to
shown in Figure JJ. not more (han .003 (0.006 inch (0.080 to 0.150
mm) on any straight shoulder. Figure 34-/2 shows the
. , Light cut only I . . Light cut only of too much stock allowance for certain cutting direc-
and a method to eliminale it
.~ -- W
l+- = Direction of cut.
-_.,
• •
. •
•
/ Medium cut
Light I Medium cut a
.~~ R
The illustration applies equally Lo (he boring, when the X In CNC lathe programming, a recess can be machined
axis direclion is opposite the one shown. To understand very successfully wilh any 1001 (hal is used wilh Ihe proper
better the consequences of a heavy sLock left on the face, depth of cut, and a suitable back angle clearance. It is lhe
evaluate ibis example: second requirement [hat will be looked at next.
D
D
tan3/2 x .031 + .006/tanJ + .031
.14630
- 1.25 -
ROLLER
Figure 34·13
ThaL is a more reasonable depth of cut at the face, so the Z
Back angle clearance calculation example
axis slock allowance of .006 can be used. For facing in Ihe
opposite X direction or for not unidirectional faces, leave TIle first step is to consider the drawing - that is always
stock much bigger, usually close to the tool radius. the given and unchangeable source of data. The difference
between the diamelers and the recess radius will be re-
PROGRAMMING A RECESS quired. Figure 34-14 illustrates the generic details of the
provided data (except the angle b) from the drawing.
Another very important aspect of programming for CNC
Drawing detail a = Tool back angle
lathes is tnc change of cult i ng di rection. Normally, program <
~
a tool motion in such a way Ihal Ihe mOlion direction from R = Spedified radius
the starling point will be: \ R b = Clearance angle req'd
=
D Depth of recess
o Positive X direction for external machining
... and / or ...
\ \
\
Negative Z direction for external machining
o Negative X direction for internal machining
... and / or ...
Negative Z direction for internal machining r
I
D-' Tool detail
There arc also back ruming or hack boring operations
used in CNC programming, but these are just related and Figure 34-14
Jess common variations of the common machining. In the Data required to calculate angle 'b'
most common machining on CNC lathes, any change of di-
rection in a single axis imo the material constitutes an un- The formula required to calculate the angle b uses simple
dercut, a cavity. or more commonly known - a recess. lrigonomclric formula. First, calculate the depth of thc re-
cess D, which is nothing more that one half of the differ-
A recess is commonly designed by the engineers to re- ence between the two given diameters:
lieve . or undercut - a certain portion of the part, for exam-
ple, to allow a matching parlto tit against a shoulder, face, LARGE DIA - SMALL DIA
or surface of the machined part. D =
2
TURNING AND BORING 305
Once the recess depth D is known, the formula to calcu- The queslion is this: What is the actual spindle speed (In
late the angle b is: r/min), when the block N2 is executed? Of course, (he spin-
dle speed is unknown at the moment. It cannot be known,
unless the current diameter, the diameter where the tool IS
located at thai moment, is also known. The control system
keeps track of the current tool position al all limes. So,
when block N2 is executed. the actual r/min of the spindle
For the example, the calculation will be: will be calculated for the current diameter, as stored in the
control, specified in the geometry offset enlry. For the ex-
ample, consider (hat the current diameter is 23.5 or X23.5.
b == cos -I ( .5625 - .045 ) =: 23.07392
.5625 From the standard r/min formula, the spindle speed cal-
culated for 450 fUmm and 023.5 as 73 rIm in is rather slow,
but correc\. At the nex.t block, block N3. the tool position is
For actual machining, select a tool with the back angle a
rather close La the part, at diameter of .700 (XO.7). From the
greater than the calculated angle b. For the illustrated draw-
same stand<lrd formula, the spindle speed can be calculated
ing (23.07° required c!carance), the selected tool could be
for that diameter as 2455 r/lnin - considerably fast but also
either a 55° diamond shape (back angle clearance Q is 30°
correct. The problem? There may not be one for every
to 32"), or a 35" diamond shape (back angle clearance a IS
machine, but if ever there is a problem, the following solu-
50" (0 52") - both are greater than the calculated minimum
tion will eliminate it
clearance. The actual angles depend on the Lool manufac-
turer, so a tooling catalogue is a good source of data. The possible problem will be linked to the rapid motion
from the 023.5 to the 0.700. The actual travel distance
This type of calculation is important for any recesses, un-
(per side of part) is (23.5-.700)/2, which is 11.400. During
dercuts and special clearances, whether programmed with
the rapid {ravel rate, the CUlling tool has [0 move I J .400
the aid of cycles or developed block by block. The example
inches and - at [he same time - change the spindle speed
only illustrates one possibility, but can be used for any cal-
from a slow 73 r/min, to a fast 2455 rlmin. Depending on
culations where the back angle clearance is required.
the control system and its handling of such a situation, the
tool may actually start cutting at a slower spindle speed
SPINDLE SPEED IN CSS MODE thall was originally intended.
If such a situation docs happcn and presents a problem,
From several earlier topics, remember thatlhe abbrevia-
Ihe only step that can be done is to preprogram the expected
tion CSS stands for Constanl SllIjace Speed. This CNC
spindle speed in r/min, before the cutting tool approach
lathe feature will constantly keep recalculating the actual
motion, then switch to the constant surface speed (CSS)
spindle speed in revolutions per minute (r/min), based on
mode and continue.
the programmed input of surface speed: The su:face speed
is programmed infeer per minute - ftiman (English system) 03407
or in meters per minute - mfmin (metric system). Nl G20 TOlOO
N2 G97 52455 M03 (R/MIN PRESET)
In the program, the 'per minure' input uses Ihe prepara- N3 GOO G41 XO.7 ZO TOlD1 MOS
tory command G96, as opposed [0 the direct rlmin input N4 G96 5450 M03
using tlie cOlllrnand G97. N5
The Constant Surface Speed is a powerful feature of the What had been done requires more evaluation. What had
conlrol system and without it, we would lo?k back many been done is thai the spindle was started at the final ex-
years. There is a rather small problem assocIated wlth tJus pected r/mil1, before the tool reaches [he part, in blo~k N2.
feature, orten neglected altogether, or at least not consid- In block NJ, the tool moves to the start of CUl, while the
ered important enough. This rather 'small problem' wIll be spindle is already at the peak of Ihe ~rogrammed speed.
illustrated in a simple program example. Once the target position along the X aXIs has been reached
The program example covers only a few blocks at (he b~ (block N3), the corresponding CSS mode can be In effect
ginning. when the cutting tool approaches the part. 1l1at 15 for all subsequent cuts.
cnough data to consider the question that follows. This is an example that does not necessarily reflect every-
day programming of CNC lathes. In this situation, some
03406
additional calculations have LO be done, but if they solve the
N1 G20 T0100
N2 G96 8450 M03
problem - they are worth the extra effort! Some CADICAM
N3 GOO G41 XO.7 ZO T0101 MOB system can be set to do exactly that automatically. If [he
N4 ... current X position of the tool is unknown, estimate it.
306 Chapter 34
r.~ ~-__________w
• General Program format
A
To view the format often enough will forge a mental im-
age in the programmer's mind. The detajls thaI are not un-
derstood yet will become much clearer after acquiring the
general underst.anding of Ihe relationships and details used I
lJt;-]
in various programming methods. Here is a suggested tem-
plate for a CNC lathe program.
• Complex Cycles
307
308 Chapter 35
G90 - STRAIGHT CUTTING CYCLE The second format adds the parameter I or R to the block
and is designed for taper cutting motions, with the domi-
nance of the Z axis - Figure 35-2.
Before going further. a reminder. Do not confuse G90 for
lathes with G90 for machining centers. In turning, G90 is a
lathe cycle, G90 is the absolute mode in milling;
:- -w
G90 is absolute mode for milling,
X and Z axes are absolute mode for turning
x = Diameter to be cut
Z End of cut in Z position GOO
F =:: Cutting feed rate (usually inJrev or mm/rev)
LATHE CYCLES 309
Since G90 is a roughing the depth of each cui has • Taper Cutting Example
to first, then the amount left for finishing,
decide on the depth of find out how much 35-4 is a to that used for the
slock is aclua[ly there to ,'p'nnr".!pn from the diameter. example. In this Will be cui, also
amount of Siock is "' .... ,..." ........ per side, as a ra- the G90 simple
value, along the X
FIRST
TAPER LENGTH . MOTION
rmAL TOOL TRA\.7Eli DIRECTION
Figure 35-6
Known and unknown values for taper culling -program 03503
Amount 'i' is known, amount 'J' has to be calculated
I . ····-2.5 'I
~
aoRK£t\jAL -~-·····~··r
+
0.875
RST
MOTION
DIRECTION
1
Figure 35-5
I 2.7- -I
~l
The I amount used for G90 turning cycle - extemal and internat
i = (4 - 2.25) I 2 0.875
I I 2.7 = i / 2.5
I.()
0')
0
("")
I.()
(!)
G94 - FACE CUTTING CYCLE
~ (!) i'- ..-
N ..-, 0, 00
N N N NN A cycle that is very similar to 090 is another simple turn-
ing cycle, programmed with the G94 command, This cycle
is called the face cutting cycle. The purpose of C,g4 cycle is
0.865---- 0.865 --!--
, 0.865
/START [0 remove excessive stock between the start position of the
.•I ~ X4 . 100 cutting tool and the coordinates specified by the X and Z
. ; -X3.778 axes. The resulting cut is a slTaight turning cut, normally
X3.456 pelpendicular to the spindle center line. In this cycle, it is
I X3.134 the X axis that is the main CUlling direction. The 094 cycle
L. .- X2.812 is used primarily for facing cuts and can be used for simple
0.173 X2.466
0.1-73 vertical taper cutting as well. similar to the 090 cycle.
X2.120
0.173 X1.774
C- The G94 cycle is logically identical to the G9a cycle,
except the emphasis is on the X axis cutting,
Figure 35-9 rather than the Z axis cutting.
Depth of cut calculation for program example 03504
As the cycle description suggests, the 094 is normally
For the ca1cul ation, aillha! is required is to divide the dis- used to perform a rough face-off of the part, towards the
lance per each side by the number of required cuts. The re- spindle center line or to face-off a shoulder.
sult wlll be an equal depth of cut for the whole roughing op-
eration. If Ihe cutting depth is LOa smal! or too large, JUSl • Cycle Format
recalculate it wilh a different number of CUIS. Knowing
what is a suitable depth of cut is a machining knowledge, Similar to all cycle, lhe face culting cycle 094 also has a
expected from CNC programmers. predetermined programming format. For straight facing.
the cycle fonnat is:
In Figure 35·9, there are four cuts of .161 for the slraight
roughing and three cuts of .173 for Lhe tapered cutting. All G94 X(U) .. Z(W) .. F..
slack allowances are in effect.
For tapered turning, the cycle format is:
The program 03504 will usc the calculations:
G94 X(U)" Z(W) .. K.. F..
03504
(G90 TAPER TURNING EXAMPLE - 2) The axes X and Z are used for absolute programming, the
N1 G20 axes U and Ware used for incremental programming, and
N2 TOlOO M41 lhe F address is the cutting feed rate. The K parameter. if
N3 G96 S450 M03
N4 GOO X4.1 ZO.l TOI01 MOS (START)
greater than zero, is used for taper culling along the vertical
N5 G90 X).778 Z-2.495 FO.Ol (STRAIGHT 1) direction. Figure 35-10 shows all programming parameters
N6 X3.456 (STRAIGHT 2) and cutting steps, Apply lhe same process as for 090 cycle.
N7 X3.134 (STRAIGHT 3)
N8 X2. 812 (STRAIGHT 4)
N9 GOO X3. 0 (CHANGE STRAIGHT TO TAPERED)
mo G90 X2.B12 Z-O.765 I-O.173 (TAPERED 1)
Nll Z-1.63 I-0.346 (TAPERED 2)
Nl2 Z-2.495 1-0.519 (TAPERED 3 - FINAL)
N13 GOO XIO.O Z2.0 TOIOO M09 (CLEAR PeS.)
Nl4 MOL (END OF ROUGlITNG)
[ I (R) =
SMALLER DIA - LARGER DIA
2 G94 - STRAIGHT
Figure 35·10
G94 - TAPERED
The rcsult will also include thc sign of fhe J amount. G94 turning cycle structure· straight and tapered application
LATHE 313
Threading cycle:
>~!
Part bou~dary ~
Roughing area
by
rlQ4tu'I':'1"I
[J material removal defined by the starting point and
the p.Q contour must include all necessary clearances.
B three points only
D nose radius offset should not be included between
the P and a points, but programmed before the cycle is
_ .- Material called, usually during the motion to the start point.
c --------:..--.,A/'
1/ D For roughing, the material to be machined will be divided
f into a of cuts. Each roughing cycle
,
I
Roughing area ""'I"'nte a number of user ""r'I-'"<''''
Part boundary
I defined by more
B than three points
is defined between B C,
between. For CNC
used rather
< «---_._-- 315
N22
N23
GOO G41 XO.S ZO.1 T0303 MOS (START pas.)
G71 P24 Q31 U-O.06 WO.004 01000 FO.012
-P
p
SP to P direction
N24
N25
N26
N27
GOO Xl.5S (p POINT '" START OF CONTOUR)
GOl Xl.2S Z-O.05 FO.004
Z-O.55 R-O.l FO.OOB
XO.875 K-O.OS
'" _...
-----------~.§E
/
t is positive for
external cutting
The part has been completely roughed out. leaving only G12 - STOCK REMOVAL IN fACING
the req uired stock on diameters and faces or shoulders. Fi 11-
ishing with the G70 cycle, described laler, is possible wilh
111C Gn cycle is identical in every respect to the G71 cy-
(he same 1001, if lolerances and/or surface finlsh arc nOlloo
crilicaL Otherwise, another 1001 or 1001s will be required in cle, excep[ the stock is removed mainly by vertical culting
(facing), lypically from (he large diameter towards the
the same program, after a Lool change.
spindle center line XO. II is used for roughing of a solid cyl-
At 11m stage, evaluate what has been done and why. inder, using a series of vertical cuts (face culS). Like all
Many principles Ihat applied to the example are very com- olher cycles In Ihis group. It COllies in two formats - a one
mon 10 other operalions that also use the mUltiple repetitive block and a double block formal, depending on Ihe control
cycles. It is important 10 learn them weI! allhis point. system. Compare G72 with the G71 structure on examples
in this chapter.
• Direction of Cutti ng in G71
• G72 Cycle Format ~ 101/111/151
The last programming example 03505, shows Ihal G71
can be used for roughing externally or infernally. There are The one-block programming formal for the G72 cycle is:
two important differences:
G72 P.. Q.. I.. K.. U.. W.. D.. F.. S..
o Start point relative to the P point (SP to P versus P to SP)
~ where ...
o Sign oi the U address for stock allowance on diameter
The control system will process the cycle for external P = The first block number of the finishing profile
cUlling, if the X direclion from Ihe starl pain! SP 10 lhe Q The last block number of the finishing profile
point P is !legal il'e. In the example, the X slart poi nt is X3. I, I Distance and direction of rough semifinishing
in the X axis - per side
the P point is X 1.7. The X direction is negalive or decreas-
K Distance and direction of rough
ing and an eXlernal cUlling will take place.
semifinishing in the Z axis
The control syslem wi II process the cycle for internal cut- U Stock amount for finishing on the X axis diameter
ling, if (he X direction from stan point SP to Ihe point Pis
W Stock left for finishing on the Z axis
posiTive. In the example, the X start puinl is XO.5, the P
o The depth of roughing cllt
F Cutting ieedrate (in/rev or mm/rev) overrides
point is XJ.55. The X direction is positive or increasing, feedrates between the P block and the Q block
and an internal culling will take place. S Spindle speed ~ft/min or m/min) overrides spindle
speeds between the P block and the Q block
Figure 35-14 illustrates the concept of G71 cycle, as ap-
plied to both, ::Inc! intern::!l cU!ling The meaning of each address is (he same as rar the G71
cycle. The I and K parameters are nOI available on ail
By (he way, although the sign of the stock U value is very
machines. These parameters conlrol (he amount of cut for
important ror the final size of the part, it does lIot determine
semifinishing, which is the last continuous cut before final
the mode of cUlling. This concludes the section relating to
roughing motions are completed.
the G71 multiple repetitive cycle. The face roughing cycle
Gn is similar, and is described next.
318 Chapter 35
+ G72 Cycle Format - OTj16T/1 BT/20T/21T 03506 (G72 ROUGHING CYCLE - ROUGHING ONLY)
m G20
If the control system requires a double block enlry for lbe N2 T0100 M41 (OD FACING TOOL + GEAR)
G72 cycle, the programming formal is: NO G96 8450 M03 (SPEED FOR ROUGH FACING)
N4 GOO G4l X6.2S ZO.3 T010l MOB (START POS.)
G72 W.. R.. N5 G72 P6 Q12 UO.06 WO.03 D1250 FO.014
G72 P.. Q .. U.. W.. F.. 5 .. N6 GOO z-O.87S (p-POINT :::: START OF CONTOUR)
N7 GOl X6.05 FO.02
Ia" where ... N8 XS.9 z-o.a FO.ooa
N9 X2. 5
First block: mo n.s ZO
Nll XO.55
W = The depth of roughing cut Nl2 WO.1 FO. 02 (Q-POINT :::: END OF aJNTOUR)
R = Amount of retract from each cut Nl3 GOO G40 XS.O Z3.0 TOlOO
Nl4 MOl
Second block:
The concept of G72 cycle is illustrated in Figure 35-16.
p =The first block number of the finishing profile Note the posicion or (he poinl P as it relales lo Ihe start puinc
Q == The last block number of the finishing profile SP and compare it with Ihe G7) cycle.
U Stock amount for finishing on the X axis diameter
W = Stock left for finishing on the Z axis
F
S
Cutting feedrate (in/rev or mm/rev) overrides
feedrates between the P block and the Q block
Spindle speed (ftlmin or m/min) overrides spindle
,
,
I
speeds between the P block and the Q block I
I . Cutting direction
1n the G7 J cycle for the doubJe block definition, rhere I
were two addresses U. In the 072 double block definition f
cycle, !.here are two addresses W. Make sure you do not I
I
confuse the W in the first block - depth of cut (actually il is l
a 'width of cut), and the W in the second block - stock left on I
faces. The I and K paramelers may be available, depending I
on the control. I
Q
An example program 0350() for the G72 cycle uses the
drawi ng data in Figure 35- J5.
a CHAMFER 0.05 x 45° Figure 35-16
a
co Basic concept of G72 mUltiple repetitive cycle
a
- - 0.25 FACE STOCK The pattern repeating cycle is also called the Closed Loop
or a Profile Copying cycle. lIS purpose is to minimize the
CUlling lime for roughing material of irregular shapes and
forms, for example, forgings and ca..c;tings.
- 02.500
·01500 + 673 Cycle Format -10Tj11Tj15T
03/4 CORE The one-block programming format for Gn cycle IS
Figure 35-15 G73 P.. Q.. 1.. K.. U.. W.. D.. F.. S..
Drawing example to illustrate G72 roughing cycfe - program 03506
IQj" where ...
10 lhis facing application, all the main data will be re-
versed by 90". because the cut will be segmented along the P =::: The first block number of the finishing profile
Q The last block number of the finishing profile
X axis. Roughing program using the Gn cycle is logically
1 =: Xaxis distance and direction of relief - per side
similar to the G71 cycle: K =: Z axis distance and direction of relief
U Stock amount tor finishing on the X axis diameter
319
01.050
00.550
Figure 35-17
Pattern repeating cycle 673 program 03507
320 Chapter 35
- - - -. --------
A . . . . . . .,
,
B'--
A
, For safety, use the same start point for G70
as for the roughing cycles.
'1 The earlier roughing progTam 03505, using the G71 re-
petitive cycle for rough turning and rough boring, can be
compleled by using another IWO tools, one for external. one
for internal finishing lool path:
The programming format for G70 cycle is: will be a waste of time, since the .007 in/rev feedra\e will
never be used. It will be overridden by the feedrate defined
between blocks N9 and N 17 of program 03505). On the
Olher hand. if [here is no feedratc programmed for the fin-
trIir where .. "
ishing contour al all, then
P The first block number of the finishing profile
Q The last block number of the finishing profile N .. G70 P .. Q .. FO.007
F ;;= Cutting feedrate (in/rev or mm/rev)
S Spindle speed (ft/min or m/min) will use .007 in/rev exclusively for the finishing tool path.
The cycle G70 acceplS a previously defined finishing The same logic described ror G7 t cycle, appl ies eq ually
contour from either or the three roughing cycles. already La Ihe G72 cycle. The roughing program 03506, using the
described. This finishing contour is defined by the P and G72 cycle for rough turning of Ihe pan face, can be com-
Ihe Q points of Ihe respective cycles. and is normally re- pleted by using another external lool for finishing euls
pealed in the G70 cycle. allhough It can change. uSing Ihe G70 cycle:
LATHE CYCLES 321
Only some control systems do allow a decimal point X(U) =::: Final groove diameter to be cut
to be used for the D address (depth of cut) Z(W) Z position of the last peck (depth of hole)
p Depth of each cut (no sign)
in G71 and G72 cycles.
Q == Distance of each peck (no sign)
R = Relief amount at the end of cut
(must be zero for face grooving)
F Groove cutting feed rate (in/rev or mm/rev)
S = Spindle speed (ft/min or m/min)
322 Chapter
If both the X(U) and I (or P) are omitted in the I = Depth of each cut (no sign)
machining is along the Z axis only (peck K II"T~,n ..... oerwelm grooves (no sign)
z
35-19 ~ where ...
Schematic format for 674 cvcle example
First block:
The followmg program example il cycle:
R Return amount (clearance for each
03507 (G74 PECK DRILLING)
N1 G20 block:
N2 T0200
N3 G91 51200 MO) IN RPM) X{U) = Final groove diameter to be cut
N4 GOO XO ZO.2 T0202 MOB POSITION) Z(WJ Zposition of the last groove
NS G74 Z-3.0 KO.S FO.012 (PECK DRILLING) P Depth of each cut (no sign)
N6 GOO X6.0 Z2.0 T0200 POSITION) Q Distance between grooves (no sign)
N1 M30 (END OF PROGRAM) R Relief amount at the end of cut
% (must be zero for face grooving)
F Groove cutting feedrate
Drilling willtuke place to a (usually In/rev or mm/rev)
cremenls of one half of an S =:: Spindle speed (usually ftlmin or m/minJ
peck is calculated from
an interrupted groove is the Z(W) and K (or Q) are the
is along the X axis only
G15 * GROOVE CUTTING CYCLE A example of G75 will in {he
The cutting tools for grooving are either external or inter- o Groove dimensions and tolerances
nal and use a variety of inserls in different configuraeions.
Unfortunately, many grooves are not of the highest qual-
The most important difference between grooving and turn-
ilY. Perhaps it is because many grooves do no! require high
ing is the direClion of cut. Turnmg lool can be applied for
precision and when a high precision groove has to be done,
culs in multiple directions, grooving tool is normally used
the programmer does not know how to handle it properly.
to cut in a single direction only. A notable exception is (1n
Watch particularly for surface finish and tolerances.
operation known as necking (relief grooving), which lakes
place at 45", where the angle of the cUlling insert and the
angJe of infeed must be identical (usually aI45°). There is GROOVE SHAPE
another applicalion of a two axis simultaneous motion in
grooving, a corner hreaking on the groove. Strictly speak- The first evalulltion before programming grooves is the
ing. this is a turmng operation. Ahhough a grooving tool is groove shape. The shape is determined by the part drawing
not designed for turning, it can be used for some light ma- and corresponds to (he purpose of the groove. The groove
chining, like cutting a small chamfer. During the corner shape is the single most important factor when selecting the
breaking cut 011 a groove, the amount of material removal is grooving insert. A groove with sharp corners parallel to the
always very small and the applied feed rate is normally low. machine axes requires a square insert, a groove with radius
requires an insert having the same or smaller radius. Spe-
• Main GroDving Applications cial purpose grooves, for example an angular groove shape,
will need an insert with the angles corresponding to the
Groove is an essential pan of components machined on
groove angJes as given in the drawing. Formed grooves re-
CNC lathes. There are many kinds of grooves used in
quire inserlS shaped into the same form, etc. Some typical
industry. Most likeJy, programming will include many un-
shapes of grooving inserts are illustrated in Figure 36- J.
dercuts, clearance and recess grooves, oil grooves. etc.
Some of the main purposes of grooving are to allow two
components to fit face-Io-face (or shoulder-la-shoulder)
and. in case of lubrication grooves, to let oil or some other
lubricant to flow smoothly between two or more connect-
ing parts. There arc also pulley or V-belt grooves thai are
used for belts to drive a motor. O-ring grooves are specially
UUV~U[)u
designed for insertion of melt,1 or rubber rings, that serve as
stoppers or sealers. There are many other kinds of grooves.
Figure 36-1
Many industnes use grooves unique [0 [heir needs, mOst
others use the more general groove lypes. Typical shapes of common grooving tools
323
324 Chapter 36
• Nominal Insert Size Allhough some variations are possible, for practical pur-
In many groove ctllting operations, the groove width wIll poses, only these three categories are considered. Each of
be greater than the largest available grooving insert of a the three locations may be either e:rtemal or internal.
nominal size (i.e., off the shelf size). Nominal sizes are nor- The two most common groove locations are on a cylin-
mally found in various tooling catalogues and typically der, i,e.. on a straight outside - or exlemal- diameter, or on a
have widths 1ike I mm,2 mm, 3 mm or 1/32,3/64, 1/16, 1/8 straight inside - or internal- diameter. Many other grooves
in inches, and so on, depending on the units selected. may be located on a face, on a taper (cone), even in a cor-
For example, a groove width of .276 inches can be cuI ner. The illustration in Figure 36-3 shows some lypical lo-
cations of various grooves.
with a nearest lower nominal insert width of .250 inch. In
such cases, the groove program has to include at least two
eulS - one or more roughing cUls, in addition to alleast one
finishing CUL Another grooving 1001 may be used for fin-
ishing, if the tolerances or excessive 100] wear make it more
practical - Figure 36-2.
....'
2 1 3
. LJ ,' - --
Figure 36-3
Typical groove locations on a parr
Figure 36-2
CUI distribution for grooves wider than the insert GROOVE DIMENSIONS
• Insert Modification The dimensions of a groove are always important when
Once in a while, programmers encounter a groove that re- selecting the proper grooving insert. Grooving dimensions
quires a special insert in terms of its size or shape. There are include the width and the depth of a groove, as well as the
two options to consider. One js \0 have a custom made in- corners specifications. It is not possible to cut a groove with
sert, if il is possible and practical. For a large number of an insert thut is larger than the groove width, Also, it is not
grooves, it may be a justi tied solution. The other alternative possible to feed into a groove depth that is greater than the
is 10 modify an existing insert in-house. depth clearance of the insert or tool holder. However, there
is usually no problem in using a narrow grooving insert to
Generally, in CNC programming, off-the-shelf tools and make a wide groove with multiple ClltS. The same appbes
inserts should be used as much as possible. In special cases. for a deep culling insert used 10 make a shallow groove. The
however, a standard rool or insert can be modified 10 suil a dimensions of a groove determine the method of machin-
particular job. For grooving, it may be a small extension of ing. A groove whose widlh equals the insert width selected
the insert cUlling deplh, or a radius modification. Try 10 for the groove shape, requires only one cut. Simplefeed-in
modify lhe groove shape itself only as the last resort. Modi- and rapid-out tool motion is all that is required. To program
fication of srandard tools slows down the production and ;j groove correctly, Ihe width and depth of the groove must
can be quite costly. be known as well as its position relative to a known refer-
ence position on the parI. ThiS position is the distance to
GROOVE LOCATION one side - or one wall - of the groove.
Some extra large grooves require a special approach. For
Groove location on a part is determined by the part draw- example, a groove thai is 10m m wide and 8 mm deep can-
ing. The locations can be one of three groups: nO[ be Cul in a single pass. In this case, the rough cuts for
lhe groove will control not only its widlh, but also ils depth .
o Groove cut on a cylinder ... diameter cutting
It is not unusual to even use more than one tool for such an
o Groove cut on a cone .« taper cutting operation. Program may also need to be designed in sec-
lions. In case of an insert breakage, only (he affected pro-
o Groove cut on a face ... shoulder cutting
gram section has to be repeated.
ON 325
L L
SIMPLE GROOVE PROGRAMMING
,b l
simplest of aU grooves is the One that
and shape as the tool cutting edge -
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 following
square
The groove
bl diameters
Figure 36-5
Groove depth dimens.ioning . two common methods
(2.952 - 2.63'7) 12 .15'75
326 Chapter 36
Before the first block can be programmed, se!eclion of chined with a, 1250 wide grooving insert, will need oJ least
the cutting tool and machining method is a sign of a good two grooving cuts. But what about a groove that is much
planning. These are important decisions because they di- wider than the groove in the example?
rectly influence the final groove size and its condition.
There is an easy way to calcu late the minimum nWl1her of
+ Groove Width Selection grooving ClllS (or plunges), using the following formula:
The dimensional difference would allow only slightly A possible decision could be to plunge once to finish the
more than .00 I per each side of (he groove. which may left side of Ihe groove and, with one more plunge, to finish
cause the insert to rub on the wall rather than cut It. A better the groove right side. The necessary overlap between the
choice is to step down LO Ihe next lower standard insert two cuts is guaranteed and the only remaining operation is
width, !.hat is 1/8th of an inch (.1250). There is much more the chamfering. A groove programmed Ihis way may be ac-
flexibility with 1/8 width than with 5/32 width. Once the ceptable, but will not be of a very good quality.
grooving tool is selected, the initial values can be assigned-
Even if only an acceptable quality groove is produced
the offset number (03), the spindle speed (400 rUmin), the
during machining, such a result does nOL give the program-
gear range (M42) - and a note ror the selup sheet:
mer much credit. What can be actually done lo assure the
o T0303 = .1250 SQUARE GROOVING TOOL highest groove quality possible?
The first few program blocks can now be written: In order to write first class programs, make the best efforts
to deliver an exceptional quality at the programming level,
03602 (PRECISION GROOVE) in order to prevent problems at the machining level.
(G20)
Once the grooving tool has been selected and assigned a If this observation is used in the current example, an im-
(001 station number (toollurrel rosition), the actual method portant conclusion can be made, If two plunge euls of un-
of machining the groove has to be decided. Earlier, the ma- even width will yield at least acceptable results, three cuts
chining method has been descrlbed generally, now a more Ihat are equally distributed should yield even better results.
detailed description is necessary.
If at least Ihree grooving cuts are used to form the groove
One simple programming method is not an option - the rather (han the minimum two cuts, the CNC programmer
basic in-ollt lcchmque used earlier. llUll means Q better will gain control of two always Important factors:
method must be selected, a method that will guarantee a
o Control of the groove POSITION
high quality groove. The first step towards that goal is the
realization of the faclthat a grooving insert with the width o Control of the groove WIDTH
narrower than the groove width, will have to be plunged
into the groove more than once. How many times? It is not Tn precision grooving, these two factors are equally im-
difficult to calculate that a groove .1584 wide and ma- portant and should be considered logether.
328 Chapter 36
Look carefully at how these factors are implemented in Nex[ look is at the X axis positions. The first position is
the example, The first factor applied under (he program where the plunge will start from. the second position is the
control is the groove position, The groove position is given end diameter for the plunging cuL A good position for the
in the drawing as .625 inches from the front face of the pan, start is about .050 per side above the finished diameter,
to the left side of the groove. There is no plus or minus di- which in Ih is case would be a clearance diameter calculated
mensionaltolerance specified, so the drawing dimension is from the 04.0;
used as arbilJary and is programmed directly. The second
factor under the program control is the groove width, That 4.0 + .05 x 2 = 4.1 (X4.1)
is .1584 of an inch on the drawi ng and the selected !ool in-
sel1 width is .1250. The goal is to program the culting mo- Do nol start the cuI with a clearance of more than .050
[ions in three steps, using the technique already selected: inch (),27 mm) - with slow feed rates that are typical to
grooves, there will be too much air to cut, which is not very
Q STEP 1 efficient. The end diameter is the groove bottom, given on
the drawing as 3.82. Dimension of X3.82 could be pro-
Rough plunge in the middle of the groove, leaving an
equal material stock on both groove faces for finishing grammed as the targel diameter, but it does help to leave a
. also leave small stock on the bottom of the groove very small Slack, such as .003 per side (.006 on diameter),
to make a sweep finish of the groove bottom, That wi II add
Q STEP 2 two times .003 to the 3.82 groove diameter, for the pro-
grammed X target as X3.826. Once the plunge is done, the
Program the grooving tool operation on the left side
(001 reI urns 10 the start diameter:
of the groove, including the chamfer (corner break)
• finishing Allowances
During the first step, the first plunge has [0 take pJace at
the exact center of the groove. To calculate the Z axis posi-
tion for the starl, fi nd fi rsl the amou nt of slack on each waJ I ;0.0167'
that is left for finishing. The slock amount will be one half
of (he groove width minllS the insert width - see details in
the previous Figure 36-8: / 04.1
04.0
(.1584 - .1250) I 2 = .0167 - 03.976
Do your best to avoid rounding off the figure .0167, for Z-0.6083
example, 10 .0170 inch. It would make no difference for the
machining, but it is a sound programming practice to usc Z-0.6250
only the calculated values. The benefit of such approach is
in eventual program checking, and also with general con- . Z-0.6870
sistency in programming. Equal stock amounts offer this
consistency; .0167 ond "0167 is a better choice than .0170 Figure 36-9
and .0164, although the practical results will be the same,
Precision groove - groove data used in program 03602
GROOVING ON LATHES 329
• Groove Tolerances the grooving (001 will nOI contact the right side wall stock.
As in any machining, program for grooves must be struc- That means do not retract [he tool further then the position
tured in such a way, that maintaining tolerances at the ma- of Z-0.6083. It also means do nol rapid OuL because of a
chine will be possible. There is no specified tolerance in the possi ble contact during the 'dogleg' or 'hockey Sl ick' mo-
example, but it is implied as very close by the four-decimal tion, described in Chapter 20 - Rapid Posiliolling. The best
place dimension. A tolerance range, such as 0.0 Lo +.00 I \ is approach is (0 return 10 the initial stan position at a rela-
probably a more common way of specifying a tolerance. tively high bur l1on-cuuing feedratc:
Only' the dimensional value thai falls within the specified
N49 X4.1 Z-O.6083 FO.04
range can be used in a program. In Ihis example, the aim is
the drawing dimension of .1584 (selected intentionally). At this point. the left side wall is finished. To program the
A possible problem often encountered during machining motions for the right side wall, the tool has to cut with the
and a problem that influences the groove width'the most, is righl side (right edge) of the grooving insert. Onc method is
a tool weQJ: As the insert works harder and harder, it wears to chnnge the GSO coordinates in the program, if this older
off at ils edges and actually becomes narrower. Its cutting setting is still used, or use a different work coordinale off-
capabilities are not necessarily impaired, but the resulting sel. The method used here is probably the simplest and also
groove width may not fall within close tolerances. Another the safest. All molions relating to the right chamfer and the
cause for an unacceptable groove width is {he insert wid!h. right side groove wall will be programmed in the incremen-
Inserts are manufactured within high level of accuracy, bUI ta/ mode. applied 10 Ihe Z axis only, using the W address:
also within certain tolerances. If an insert is changed, the
NSO WO.0787 T0313
groove width may change slightly, because the new illseli
N51 X3.976 W-O.062 FO.002
may not have exactly [hc same width as the previous onc.
To eliminate, or al least minimize, the possible our oftoler- In block N50, the tool tTavels the total distance equivalent
ance problem, use quite a simple technique - program an to the sum of the right wall stock of .0167, the chamfer of
additional offset for finishing operations only. .012 and the clearance of .050. In (he same block, the sec-
Earlier, when the precision groove was pJanned, offset 03 ond offset is programmed. This is the only block where off-
had been assigned to the grooving tool. Why would an ad· set 13 should be applied - one block before, it's too early,
dilional offscr he needed at all? Assume for a moment, that and one block, afler it's too lale.
all machine settings usc just a single offset in the program. Block N51 contains the target chamfer position and Ihe
Suddenly, during machining, the groove gets narrower due absolutc mode for Ihe X axis and is combined with {he in-
to 1001 wear. What can be done? Change the insert? Modify cremenlal mode for the Z axis.
the program? Change (he offset? If the Z ax is offset set! ing
is adjusted, either to the negative or positive direction, that To complete the groove righl side wall, finish the cur at
will change Ihe groove position relative [0 the program zero the full bottom diameter, block N52, then continue (0 re-
but it will nor change Ihe groove widthi What is needed is a move the stock of .003 from the bollom diameter (block
second offset, an offscr (hal cont[ols the groove wiJth only. N53) - this is called sweeping the groove bottom:
In the program 03602, the left chamfer and side wlll be
finished with one offset (03), the right chamfer and side NS2 X3.82 FO.003
will use a second offset. To make Ihe second offset easier 10 N53 Z-O.6247 T0303
remember. number 13 wi II be used.
Also look at the Z axis end amount - It IS a small value
One other step has to be Ilnished firSI - calculalion of [he that is .0003 short of the .625 drawing dimension! The pur-
left chamfer start position. Currently, the tool is at Z-0.6083 pose here is to compensate for a possible 1001 pressure.
but has to move by the wall stock oLO 167 and the chamfer There \(Jill nor be a srep ill the groove comeri Because the
width .012 as as clearance of .050 - for a total travel of sweep will end at the left side of the groove, the original
.0787,10 Z-0.6S7 position. AI a slow feedrale, the chamfer o('[<;ct (03) must be reinstated. Again, lhe block N53 is the
is done first and [he cut continues to finish the left side, 10 only block where the offset change is correct. Make sure
Ihe same diameter as for roughing, which is X3.826: not to change the tool numbers - {he {urrer ,vill index .'
N46 Z-O.687 The intcnded program 03602 can now be completed. All
N47 GOl XJ.976 Z-O.62S FO.002 thal remains to be done is lhe return to the groove starting
N48 X3.826 FO.003 position, followed by the program termination blocks:
The next slep is [0 return the tool above parl diameler. N54 X4.1 Z-O.6083 FO.04
This mOlion is more important than it seems. In the pro- N55 GOO X10.O Z2.0 T0300 M09
gram, make sure Ihe finished lefl side is not damaged when NS6 IDO
the tool rctracts from the groove bottom. Al~o make sure %
330 --_. __.------- Chapter 36
Al (his point, (he complete program 03602 can be de- • Groove Surface Finish
veloped. Note program blocks where the offset has been
Programming just about any preCision groove should be
changed, they are idemified in the comment section:
fairly easy fTOm now on. Only a few last notes on (he sub-
ject of groove cutting as they relate to the surface finish.
03602 (PRECISION GROOVE)
(G20) Just by following the suggested methods of equal cut distri-
bution, proper spindle speeds and feed rates. good condition
N41 T0300 M42 (NO OFFSET) of the cutting 1001 and insert, suitable coolant, and other
N42 G96 5400 M03 techniques used in the example, the surface finish will al-
N43 GOO X4.l Z-0.6083 T0303 MOa (OFFSET 03) most lake care of itself.
N44 GOl X3.826 FO.004
N45 GOO X4.1 Keep in mind, thaI the term 'precision groove' does not
N46 Z-O.687 only describe the precise groove position and its precise di-
N47 GOl X3.976 Z-O.62S FO.002 mensions, it also means a high quality look. a look thal of-
N48 x).826 FO.003 ten means much more than just a cosmetic feature.
N49 X4.1 Z-O.6083 FO.04
N50 WO.0787 T0313 (OFFSET 13)
N5l X3.976 W-O.062 FO.002 MULTIPLE GROOVES
N52 X3.B2 FO.003
N53 Z-O.6247 T0303 (OFFSET 03)
N54 X4.1 Z-O.6083 FO.04 Multiple grooving is a common term used for CUlling the
N55 GOO X6.0 Z3.0 T0300 M09 (NO OFFSET) same groove al di fferen! positions of the same parL In these
N56 M30 cases, the program will mas( likely benefit from developing
% a subprogram (Subrouline) for multiple grooves, that will
be called at various groove locations. Subprograms save
WARNING! valuable programming time. they are easily designed and
It is very important to use caution when a double easily edited. Although subprograms will bc discussed in
tool offset for a single tool is used during machining Chapfer 39, an example of a mUltiple groove programming
( this warning applies generally· not only for grooving) using a subprogram is shown at the end of this chapter, at
least for reference and basic introduction.
Remember that the purpose of the offset in the example is
to control the groove widzh, not ils diameter. When culring multiple grooves, more material will be re-
moved. On external diameler grooves, there are no special
Always follow these precautions, based on the example considerations necessary, gravity will take care of the extra
program 03602: chips. This is not the same situation for internal grooves.
The moment several grooves arc machined internally, there
o Start machining with identical initial amounts assigned to
is a small pile of cutting chips accumulated in the bored
both offsets (the same XZ values for offsets 03 and 13).
hole. These chips can be in the way of a smooth cutting op-
o The X offset amounts of 03 and 13 must always be the eration and could damage (he bored diameter and even the
same. If the X setting of one offset is changed, the setting grooving 1001 itself. To solve this problem, consider ma-
of the other offset must be changed to the same value. chining of only a few grooves. move Ihe tool out and blow
Adjust both X offsets to control the groove depth tolerance. out the chips from the internal area. Using the optional stop
o It the groove width becomes too narrow and has to be MOl can be useful in this case, When all chips have been
adjusted, only the Z offset amount is changed. removed. continue with the same tool to cut more grooves.
o To adjust the groove left side wall position,
change the Z Dffset 03. FACE GROOVES
o To adjust the groove right wall position,
change the Z offset 13. Face grooving (sometimes incorrectly called trepanning)
is a horizontal groove cutting process, with (he tool moving
o 00 not cancel the current offset - along the Z axis. The tool is programmed along the same
- change from one to the other offset directly. principles as vertical grooving along the X axis. Because of
o Make sure the tool number (the first two digits the nature of such a grooving cut, the tool orientatioll pres-
ofthe T address) does not change, otherwise, ents the most important single consideration in face groov-
THERE WILL BE A TOOL CHANGE! 109. The issue is the radial clearance of the cutting insert,
during a cut. There is no need \0 worry too much about ra-
Other precautions can be added, depending on the exact dial clearance for vertical grooving, because the CUlling
condilions. Use common sense, and always check the pro- edge of the insert is on the same plane as the machine cen-
gram carefully, before il is released to production. ter line. However, in horizontal grooving, the insert clear-
ance along (he cut radius is of utmost importance.
GROOVING ON 331
a
groove, o.
Figure 36-11
02.075 - / Interference of a standard grooving insert on a face groove
0.125 ""1--
'-- 0.25
BREAK ALL
Figure 36-10
Face grooving example - program 03603
CORN GROOVES / NECK GROOVES Block N219 positions the tool in such a way that rhe ceo-
(as well as the setup pomt) is in on center of
groove (,050 clearance in X and Z Blocks
is also a grooving operation, one and N222 are the two cutling motions· one into the
insert designed to cui along a in N220, the other Oul of the groove in
,!!roove can be square or with a
amount oflrnvel is exactly the Silme in either di
1001 and insert used and design
dwell of 0.1 second is added for convenience at
may also be a standard lype of the The block N220 can also be as an
1001 holder, The purpose of this type
incrememal motion:
is 10 of recesses and
culs, in a corner of the parI. II assures a shoulder N220 GOl U-O.162 W-O.OBl FO.004
match of two components. N221 G04 XO.1
N222 UO.162 WO.081 FO.04
To a corner groove (neck groove), the radius
lhegrooving insert mmt be known, .031 (1/32)ofan inch
in the example. cUlling deplh is established from the GROOVlNG CYCLES
Normally, the corner groove is specified a:; a
'minimum undercut' In this case, the cenler or lhe two mUltiple repetitive cy-
cut will be at the of the shou Ider and the diame- that can be used for an interrupted cut-
ter. The in and out of (he groove must be at programming formats for both cy-
45°, meaning the identical amount of in both X Z in the previous chapler. G74 cycle is
axes, Figure 36- a comer with a I the Z axis and is used mostly for
radius minimum used for CUlling in the X axis, and
simple grooving.
• Cycle Applications
Although ror grooving, G75 cycle can also
b~ used for an cut in facing, This cycle is quile
simplistic LO any use for quality surface fimsh,
but it does main purpose is to break
132 chips while This is useful for some
01.7 grooving and as well as face culling,
U/CUT 132 Anmher use is the core aU( of deep grooves, so
they can be methods.
In by alternating between
I rpr,,,',,\and a rapid relroct motion
/
means that one CUlling mo-
~'JI"~,,,,_rapid motion, on the
1,00 and a built-in clearance.
rigure 36-13
Corner grODve - undercuf program examo,/e 03804 G75
The program itself no
diflicultlo complete or interpret
and is not
START POINT G()~tl
03604 (CORNER GROOVE) j DIAMETER
(G20) I
d
N217 GSO S1000 TOsOa M42 I
N218 G96 S375 M03 I
N219 Xl.OS Z-O.95 T0505 MOB 1- d
N220 GOl XO.91B Z-1.031 Fo.a04
N221 G04 XO.l
N222 Xl.OS Z-O.95 FO.04
DIAMETER
N223 GOO X6.0 Z3.0 Tosoa M09
N224 M30 36-14
% Schematic representation of the G75
GROOVING ON LATHES 333
Figure 36·16
Muflipfe gffJove eX<51mO'Je the 675 CVcle· program 03606
00.85 03606
(G75 MULTIPLE GROOVES)
(G20)
Pm1-of!, sometimes called a ClitOff, is a machining opera- At the end of the metal blade is usually a carbide insert,
lion typical 10 lathe work, usually using a barfeeder attach- with clearance angles on both sides. The cUlling end of the
ment. During a part-off, the cutting tool (or parI-off tool) tool is available in several different configurations. always
separates the completed part from the bar slock. The com- at the end lip of the carbide ponion. The most typical 1001
pleted part will fall off the bar, usually into a special bin to end configurations are shown in the following illustration -
protect it from damage. Figure 37-2:
PART-OFF PROCEDURE
335
336 Chapter 37
D.
--, 0125
1 N124 GOO Xl.6S MOS
Nl25 XS.5 Z2.12S T0800
Nl26 MJO
%
Another program entry Ihat is important to look at is Ihe o Cut the chamfer in one block and
X value in block NI22 - it is X2.65 in the example. That part-off in the subsequent block
will leave .125 inches aclual clearance above the 02.400. If
To illus!rLlte the programming technique, study the fol-
that seems a lillIe 100 much, think again. Always consider
lowing program example 03703 and illustration shown in
the actual slock diameter, for safety reasons. In the exam-
Figure 37·6 - the loo! n.:Ct:n.:nce poinlls on the lefl side, and
ple, the bar stock diameter is 2.500 inches and the aclual
(he required chamfer is .020 inches at 45°:
clearance will be a more reasonable .075 of an inch per side
of the stock.
CHAMFER 0.02 x 45°
• Tool Return Motion
Another safety aspeci of programming a part-off 1001 is
the method of returning 10 the lool change position. when
the parting operation is completed. It may be very tempting 02.65
to replace the two program blocks N 124 and N 125 with a 02A6
single block, then return to [lie luul change pusilion IrllllH.!-
diately after Ihe parI-off:
02.20
N124 GOO X5.5 Z2.0 (or Z2.12S) T0800 M09
Arter all, the part has just been separated, fallen into the
bin and one block in the program can be saved. Don '/ do 0.015 --; r-
rhis, it could be a very hazardous procedure. The part
should have been removed by the [001 and it should have
Figure 37-6
fallen into [he bin - but has all this actually happened? A va-
riety of reasons may cause an incomplete part-off. The re- Comer breaking with a pan· off tool· example 03703
sult is a broken lool, scrapped part, possibly a damage Lo
the machine itself 03703 (PART-OFF CHFR)
(G20)
Always return in the X axis first N120 GSO S1250 T08DO M42
and always above the bar stock diameter. N121 G96 5350 M03
N122 GOO X2.65 Z-2.015 TOBDS MOS
338
N123 GOl X2_2 FO.004 rigid grooving 1001 can do the startup
N124 X2.46 FO.OJ then the part-off tool can do the res£. At com-
N125 Z-1.95 (LEFI' SIDE OF of the part-off, the bar stock projecting from
N126 U-O.l W-O.OS FO.002
will have a small step. Make sure to a
N127 X-0.03 FO.004
N128 GOO X2. 65 cut for each subsequent part LO lake this slep into con-
N129 XS.5 Z2.0 TOBOO M09
N130 M30
% • Preventing Damage to the Part
122, (he tool is positioned .015 past the When the part is separated from the bar, it falls down. On
NI makes only a temporary groove (to , it mily suffer (l seve,re enough to make a
N 124 is a mOlion out of the a scrap. To prevent the possibility a damage.
oflhechamfer(02.460). rn operator may want to place a
the 1001 shiflS in the Z axis. to with coolant in the path of the falling part.
chamfer. The value of 1.950 was method IS to offset the pan-off 1001 away from the center-
and subtractions: line, jusl lhat it does not the
Ihe
1.875 - .020 .030 T .125 = 1.950
N126 X2.36 Z-2.0 FO.002 For part-off, just for grooving operations, always
make sure is an supply of inserts on hand.
Also note the for the chamfer only, to Tools with or with very small radii, are gener-
decrease can be quile ally weak some very demanding work. No-
remainder of the body wants 10 run out of tools in the middle of a very
important rush
o • Form of a Thread
in CNC program-
of the leuer V)
variety of the
metric and
shapes
339
340
Cl Circular threads ·.. is a thread with more than one shifted by the pitch
amount
Cl Multi-block threads
o PITCH
... is the distance from a .,,,,,,,...,t,,.rI
corresponding of
parallel to the machine axis
o PITCH DIAMETER
... on a straight thread, the pitch diameter is an imaginary
TERMINOLOGY OF THREADING diameter, "the surface of which would pass through the threads
at such points as to make equal the Width of the threads and
the width of the spaces cut by the of the cylinder"
is a relatively large subject, In il is
[} ROOT
(l whole book dedicated to it. subjects of
are, threading has its own technical terms. · .. is the bottom of a the of tlNo
terms appear in hooks, articles, adjacent threads
n-mnuals olher sources. To understand them is
[} SCROll THREAD
lOry programmer and operator.
is also known as a thread it is a thread machined
the X axis, rather than the more common thread
cutting: along the Z axis
o OF THREAD :J SHIFT
betvveen the sides of the thread, , .. in multistart threading, it is the by which the
plane cutting tool is displaced to cut another this distance is
always equal to the pitch of the number of shifts
[) is always one less than the number of starts
... IS the top surface of a thread that joins the two sides o TAPERED THREAO
[} DEPTH OF THREAD .. , is a thread on which the pitch diameter is increased
or by a constant ratio as a
.,. generaJly, the distance between the crest and the root
of the thread, normal to the axis (in programming, o TPI
depth is considered as a measurable value per thread side)
... in English units of measuring, the number of
[} EXTERNAL counted over the length of one inch (I / pitch) metric
thread is defined by its pitch - TPI equivalent is not applicable
CJ ". is a thread is cut on the outside of the machined
part, for example as a bolt
SINGLE POINT THREADING 341
The threading process is completed with the fourth mo- Z axis clearance for the starting point should be
lion, when lhe 1001 returns to tile starling posi lioll ill a rapid three to four times the length of the thread lead
mode. All remaining passes are programmed in the same
way, just by changing the thread cutting diameter (thread This is only a rule of thumb and works well in every day
depth control). practice. Control manuals may offer a scientific way of cal-
culating the minimum clearance.
Note that only Threading MOlion 2 will be programmed
in the threading mode, using a proper G code. Threading In some cases, the Z axis clearance must be reduced be-
motions I, 3 and 4 will be in GOO (rapid) mode. cause of space shortage. such as when Ihe threading starts
very close 10 a tailstock or machine limits. Since the accel-
eration time depends directly on the spindle speed, [he only
""D
c
(»
/
, - TOOL INDEX
POSITION
remedy for imperfect threads in thiS case is to IOlVer the
spindle speed (r/min) - the feedrate must not be reduced.!
"D N I
ro J
For complex methods of inked, the starting position is
(» t /
.....ro
t
L-
..c changing for each cut by a calculated amount.
I- U)
/
/
• Thread Cutting Diameter and Depth
- Start X
For cylindrical and conicallhread CUlling using the block
. Thread 0 method of programming (no cycles), select thc cutting dia-
meter for each pass of the threading tool in Ule program.
From the thread starting position, tile culling tool will move
towards spindle centerline for external threads and away
from spindle centerline for internal thJeads. The actual cul-
Figure 38-2
ting diameter for each pass must be selected not only with
Basic steps in single point thread cutting respect to the thread diameter, but also With respect to ma-
chinirlg conditions.
This typical description illustrated in Figure 38-2, is only
In ihreading, the chip load on the insert becomes heavier
general in nature and usually not sufficient by itself for high
as the cutting depth increases. A damage to the thread, [0
quality thread cutting.
(he insert, or both, can be averted by maintaining a consis-
1C'11/ chip load on lhe insert. One way to achieve the consis-
• Thread Start Position
tency IS to decrease each subsequent depth of the thread,
The mol starting position is a clearance posilion. For a another way is to apply a suitable infeed methocl Both
sU'aight cylindrical thread, the minimum suitable clearance threading techniques are often used simultaneously.
along the X axis is about .100 (1.5 mm) per side, more for
To calculate the depth of each pass, complex formulas are
coarse threads. For a tapered thread. (he clearance is the
not required, just common sense and a bit of experience.
same, but applied over the larger diameter.
All threading cycles have an algorithm (special process)
As for Ihe clearance along Z axis, some special consider- buill in the control system that calculates each depth auto-
ations are necessary. When the threading 1001 comes into matically. For manual calculations, {he procedure follows a
contact with material, it must be advancing exactly 100% logical approach. The lotal depth of the thread (measured
of the programmed feedrate. Since the cutting feedrate for per side) must be known - programmer decides how many
threads is equivalent [0 the thread lead. it will take some threading passes will be suitable for the particular thread.
lime [a arrive at the programmed feedrate. Just like a car Another value to be decided is the last cut depth, the cut
needs some time to accelerate before reaching its cruising [hat actually finishes the thread. These values usually come
speed, the threading tool has to reach a full feed rate before [rom experience. The rest is limited to mathematical calcu-
it conlaC\S the material. The effect of accelerarion must be lations or available charts.
considered when deciding the from clearance amount.
POINT THREADING 3
,03.0 NOMINAL
02.9720
"""----- 0 2.9520
02.9360
02.9230
02.9130 Threading diameter #1 3.0 - 2 x 0.0140
02.9040 Threading diameter #2 3.0 - 2 x 0.0240 =
o Threading diameter #3 3.0 - 2 x 0.0320
Threading diameter #4 3.0 - 2 x 0.0385 = 2.9230
Threading diameter #5 3.0 - 2 x 0.0435 =
Figure 38-3 Threading diameter #6 3.0 - 2 x 0.0480
Threading diameters distributed for load
Threading diameter #7 3.0 - 2 x 0.0511 = 2.8978
Figure shows a There is nothing wrong with
only an example). It lS a the threading diameters. Wllat this method
has to find single depth of the in check for accuracy. is
cal way to do it, using a "t<>Y1rl<>,cJ'i from the nominal diameter, any error in calculation is not
profile external thread accumulative and might be hard to flnd A much
on lhe fulluwing thread method is to calculate each threading diameter based on the
metric extemal threads only: calculation, using single depth of cut, not the ac-
cumulative depth - compare it with the last method:
For a full profile internal thread, tbe formula to calculate + 2 >< 0.0511 3.0000
the depth will be used for metric and American National
threads only - D value is the internal depth:
054127
D::: TPI :::: 0.54127 x P
• Thread Cutting Motion
malian, do not use preparatory command GOI for thread- N64 UO.2 W-O.l (GRADUAL PULLOtIT)
ing. If GO I is used, the start for each pass will nOl be syn- N65 GOO X3.3 (RAPID OtIT)
chronized Wllh Ihe previous Ihread slart. Inslead of GOI
command, use a G code specifically designated for thread- For eJ.;rernal threads, the clearance diameter must always
ing. G32 is the most common code used by Fanuc controls beJurther away from spindle center line l.han the diameter
for threading. During a thread cUlling motion G32, control of gradual pullout. For inremal Ihreads, the clenr(lnce di-
system aUlomatically disables the feedrate override. The ameter must be closer [0 spindle center line than the diame-
CNC operator has 10 be extra careful to sel Ihe Ihreading ter of gradual pullout. Figure 38-5 illustrates the concept.
tool exactly, particularly when thread ends close to shoul-
ders oftlle parI. To illustrate the programming process up to CLEARANCE 0
this point, here is a lypic!)1 program section:
THREAD 0
N61 GOO X3.3 ZO.3 (START POINT XZ) CLEARANCE 0
N62 X2.972 (THREAD DIA START)
N63 G32 Z-1.7S FO.OS33 (THREAD TO END) PULLOUT 0
THREAD (21
and the root of thread, so G96 sclection would seem logi- e English example:
cal. This is not the casco First, even for fairly deep coarse
threads, the difference between the first and last diameter is Jr the thread lead Lis .125 and the maximum feedrate for
insionificanL Second - and this reason is even more IJnpor- Ihe X axis Frm(J\ is 250 in/mill, then the maximum threading
tant- the thread cUlling rouline requires a perfect spindle speed RJ""\" will be:
llnd feedralc svnchroniWlioJ! at (he slart of each pass. Such
synchronization can be more accUfmcly achieved only with ~ = 250 / .125 = 2000 r/min
constanl r/n/in rather [han constant surface speed (CSS).
Q Metric example:
For the majority of threads, the selection of dmin requires
If the thread lead L is 2.5 mm and the maximum fcedrate
only consideration of general machining conditions, simi-
for the X axis F[mu\" is 6350 mm/min, then the maximum
lar to other turning operalions. At the same time. selectlhe
Rmil< threading speed will be:
spmdle speed with some consideration of the feedrale. Be-
cause of the heavy feed rates used for (hreading. [here is a
~ : 6350 / 2.5 ~ 2540 rpm
distinct possibility lhat certain threads cannot be cut at any
available spindle speed. If this is confusing. keep in mind The max i mum allowable rlmin only reflects Ihe Cilpnbili-
thallhe feedrate is determined not only by rhe lead, but also tics of [he CNC machine. The feed rate actually used in a
by the overall capability of the machine. Every CNC lathe program must also take inlo account the various machining
has a programmable feedrate value, specified In either and setup conditions,just like any other tool path operation.
in/mill or min/mill. up 10 a cerlai n max i mu m for each ax is. In practice, the majority of actual programmed spindle
Take a tYPlcal maXlmum programmable feed rate for the speed (r/min) will be well below the maximum capacity of
the CNC machine tool.
X axis may as 250 in/min (6350 mm/min); the maximum
for the Z axis may be 450 in/min (ll430 mmlmin). Recall
that there is a direct relationship between Ihe spindle speed
• Maximum Threading Feedrate
and the fcedrate per revolulion. The result of this relation- The select ion of culli ng feed rate in general was discussed
ship is actually Jeedrale expressed in fums of lime. notycr earl icr, in Chapler J]. Afler studyi ng the section on the
revolution. The fc:edrale per lime is always Ihc result 01 the maximum r/min selection (spindle speed), it should not be
spindle speed in direct IImill mulriplled by the i"eedrate per surprising that Sllnilar limilations apply to the determina-
revolution in in/rev or mIT//re\!. tion of a maximum threading Jeedrate for a given spindle
e English example:
speed (programmed as r/min). Again, the limits oflile CNC
machine tool arc very imponant, so be aware of them when
writing {he thread CUlling program.
700 r/min x .125 in/rev = 87.500 in/min
Maximum programmable threading feedrate for a given
e Metric example: spindle speed (in dmil1) can be calculated from Ihe follow-
ing formula:
700 rpm x 3 rom/rev = 2100 mm/min
1n CNC lathe programming generally, not only in thread- Ftma"l<
ing, always make sure lhalthe feedrLlle per revolution com- S
bined willl Ihe· "peed will he l(,H Ihon nr ('qual In
the maximum available feedralc per lime Cor the axis with
IEf where ...
the lower raling, which is usually the X axis.
Based on this simple rule, [he maximum spindle speed Fr "la, Maximum feed rate tor a given spindle speed
for a given kad can he selected according to the following Ft ,,>ox := Maximum feedrate per time IX\ axis)
S Programmed spindle speed (r/min)
formula:
Q English example:
lr(he maximum machine feed rate along X axis is 250
in/min and the spindle speed S is selected as 2000 rlmin,
(hen the maximum programmable feedrale will be:
where ...
250 J 2000 = .125 in/rev
Rm" Maximum allowable r/min
Ft == Maximum feedrate per time (X axis) Therefore. the maximum thread lead that can he cut at
L "'''=:; lead of the thread 2000 r/rnin is .125 inches, which [lllow~ R lhreads per inch
or liner.
POINT THREADING 347
v
I
lj capable hands can often be applied La some
i lechniques, ror a
threadi ng tool much smaller than lhe thread it<;el or rnak-
large knuckle threads with a round tool.
a' b c
Figure 38-7
Typical reference points for sewp of threading tools
The preparatory this of threading is
The rererence point of a Gj2. Command on some controls, but G32
considerations than for turning is the standard G and compatibles.
there are three possibilities, in the programming
frequency. The third version (c) is the rarest and vir-
In an example, a 12 extemalthread will be used.
tually no hendillo the programmer in some cases of
All cuts are disLribUled in seven for the total depth
hand threading, For mOSl lefl hand one of the
or .0511:
two versions i~ also quite su Pass # 1 depth = .0140 Total depth .0140
The Ihreading insert sclli
Diameter 2.9720
for general use and
Pass #2 depth .0100 Total depth .0240
dcr. Configuration in Figure
2.9520
lilat
Pass #3 depth = .0080 Total depth ,0320
Selection of the tool (G50 or geometry Diameter 2.9360
offset selling) as is the mas I
desirable one. when the tooling
#4 depth .0065 Total depth .0385
sel-
Diameter 2.9230
setup for any lype of
ling, regardless of the al
the same lime. In some cases. an must be made = .0050 Total depth .0435
Diameter 1
for Ihe difference between the ... u"n"~ edge and the
actual edge. The lOol! list this value precisely, or
Total depth .0480
one half of the threadi width (if applicahle) can be 2.9040
ll~ed instead.
the threading 1001 has been rrogram, the conlrol system will lilal there are more
and spi ndle speed - 1001 5 (T0505) and threads to cuL while they aClUally completed in
the previous block.
03802
The simple threading is just that - it is simple.
(N45 G50 X12.0 Z4.5) without any frills. II any special infeed meth-
N46 TOSOO M42 ods, ill fac\. Ihe only method is a straight plunge
N47 G97 S450 M03 type. Later in this chapter, the plunge method of infecd will
N4S GOO X3.2 ZO.25 T0505 MOS (START be described as notsuitable most threading operations.
first four blocks are identical to An lout can be programmed with
In the next step, the threading tool will G92 to ling [he G92 cycle.
at the first pass diameter, chase the thread, retract If Ihe control system
from the thread and return to the last always use the
blocks are repetitive for each benefit - G76,
the lhreading cycle is that it eliminates
data and makes the program eaSIer to
fOmlal for the G92 straighl cycle is: MULTIPLE REPETITIVE CYCLE - G16
various lathe cycles were the
normally for turning and boring. In this
I:@i' where ... will aim at one more of the multiple
cycles, this time used for various threading appl
X Current diameter of pass
Z "" End position of the thread of CNC development, the simple
F Threading feed rate in in/rev cycle was a direct re~mll of the
The first threading pass will its The computer technology
- N49. Note the X axis and lheZ as well as and many great new
the cutting feedrale: programmers. These new
development. One of the
N49 G92 X2.972 Z~1.6 FO.0833 (PASS 1) another ror threading - a
live Ihreading cycle G76. This cycle is
The control system will Ihe X value and the last plex nO[ because it IS difficult to use
before {he cycle call as the starting position for the trary) it has some powerful
point for the cycle. In
7.0 25 (block fully Ihe impact of G76
can be pro~
It wlIh the origmal G32 and
grammed jusl by IS no
even the cycle jusl described. While a program using
to repeal the Z value or method requires four or even blocks of pro-
each threading pass, cycle requires
NSO X2.9520 (PASS 2) one hlock for each threading cycle will do
N51 X2.9360 (PASS 3) thread in olle block code (two blocks
NS2 X2.9230 (PASS 4) some the G76 cycle, any
NS3 X2.9130 (PASS 5) threading occupy only a very
N54 X2.9040 (PASS 6) small pomon or the editing on the ma-
N55 X2.8978 (PASS 7) (if necessary)
completed by an automatic return There are two programming
of the thread. From that Ing on (he conirol model This is
the same way as for G32. the other lathe cycles .
;.-....
~ where ...
K First block:
o
• G76 Cycle Format - OT/16T/18T
On the popular Fanuc controls OT, 16T and 18T, the G76 N20 G76 POll0GO RO,05
cycle is somewhat changed from the lOll1l15T models. N21 G76 X76 0 z-30 0 P812 Fl 5
and remam same, the difference is only
how data input is stmctured. • Programming Example
line input, described earlier.
The earlier example oftne thread, with 12
a two
temal diameler 00.000
block entry for a 076 programming method.
fomlal is; controls are shown, using only the minimum
program blocks (last tool sho\VIJ in
352 Chapter 38
03803 (G76 METHOD - ONE BLOCK METHOD) In the two block version, the same program will be very
simi lar, applying the samc logical thinking.
(N45 GSO X12. 0 Z4. 5)
N46 T0500 M42 03S04 (G76 METHOD - '!WO BLOCK METHOD)
N47 G97 S450 M03
N48 GOO X3.2 ZO.25 TOSOS MOS (N4S GSO X12. 0 24. S)
N49 G76 X2.8978 Z-1.6 IO KO.OS11 D0140 A60 N46 T0500 M42
P4 FO.OS33 (or F/EO.OS3333) N47 G97 S4S0 M03
NSO GOO X12.0 Z4.S TOSOO M09 N48 GOO X3.2 ZO.2S TOSOS MOS
NSI MJO N49 G76 P011060 QOOS RO.OO)
% NSO G76 X2.8978 Z-1.6 POS1l Q0140 FO.083333
NS1 GOO X12.0 Z4.5 TOSOO M09
Several points relating [0 the program may need clarifica- N52 M30
lion. The fact thal the whole program requires only six or %
seven blocks is, in itself, significant. Any programming
change can be done by a simple modification of a proper There are few other parameters to explai n, but first look at
parameter in block N49, which is lhe threading cycle call. how the cycle calculates the tirstlhread depth. The higher
For instance, to change the depth of the firsllhreading pass le\)el controls using the one-block inpur will be used/or the
to .0160 from the currenl .0140, all [hat has 10 be modified expLanmioHS} unless mentioned olhenvise.
is the entry of DO 140 (0 DO 160.
.. First Thread Calculation
The comparison of the G76 cycle with G92 cycle is un-
fair, as each cycle is the product of a different technological For the G32 block threading, as well as for the Gn sim-
era. They coexist in [he same control unit even at the pres- ple threading cycle, the thread starting position was always
ent lime, mainly to be downward compatible with older determined as only reasonable, applied to both axes for the
programs. The two cycles are 3 good iIlustra[ion of some purposes of supplying a suitable tool clearance. The Z axis
signincant differences between programming lechniques. clearance in the start position block only lakes into consid-
eration the lead of the thread and the spindle speed. Its pur-
For example. in the G92 threading cycle application, in- pose is 10 prevent cutting imperfect threads, due to the ma-
pUIof each thread pass diameter is important, in G76 cycle, chine acceleration for lhe feedrale. The clearance for the X
only (he lasl pass diamcler input is importan!. axis is an arbitrary clearance for the tool to move away
Internally, the CNC syslem does all necessary calcula- from the thread. The same principles apply to G76 thread-
lions. The supplied inrormalion is contained in the pro- Ing cycle as well and can be used the same way as In the
gram. First, the control registers the thread sta11ing posi- previous thrcading methods.
tion, the same way as for G92 cycle. In (his example (block There is one major difference from programming the
N48), the position is X3.2Z0.2S. The next slep the control G32 and the G92 methods. In the previous threading exam-
goes through is the evaluation of all G76 parameters (the ples, the starting position for the X axis was X3.2. In the
programmed data in block N49). The X value is the diame- G32 block CUlling, as well as in (he G92 simple threading
ter of the last threading pass, the K value is the thread cycle, [heftl'St threading diameter was all-vays programmed
deplh. That provides enough information for the control [0 (in the examples, [he value was X2.972). This is nOl the
'know' what is the theoretical premachined pan diameter case in the G76 threading cycle. In this cycle, it is the last
(the actual premachined diameter cannot be known). This diamete.r (hat is programmed - not the first - and lhat means
relationship is important for selection of the tool rapid ap- the first cut diameter must be calculated by the control sys-
proach direction. If the Ihread star! diamelc( X is la/ger tem internally.
than the last pass diameter, the threading is eXlemal. If lhe
thread start diameter X is smaller than the last pass diame- The calculation of the firs/ thread diameter i~ done com-
ter, the thread is imemaf. pletely by the control system, providing the following In-
[ormation is supplied:
The Z value. in [he G76 cycle has the same meaning as the
Z value in the G32 Ihread clilting or the G92 threading cy- o The root diameter I X value I
cle. It represents the end position of the thread and controls o The total thread depth ! K value I
the thread length.
o The first thread depth [ Dvalue I
Two parameters unique 10 G76 cyclc are the I and [he K
values. The 1 value is always a zero if a straight diameter Based on the supplied values, the first diameter TJ of (he
(hread is cut. A non-zero value is used for laper threads, thread will be cJ.1cu lated as:
where it represents the smgle difference between the start
diameter of the cut and its end diameter (described later in Tf = X + (K x 2) - (D x 2)
lhe section dealing with a tapered thread).
POINT THREADING
353
• Compound Infeed
COMPOUND also called a flallk in
of !he [001 tha! moves 10-
Figure 38·10 wards the The
Radial and Compound infeed for thread cutting duced by
shape of a chip produced
One common method in thread programming is threading 1001 the
the plunge method, called the radial method, away from Ihe tool
also known as or perpendicular' the 10011 ife. The of rhe chip CJn be hea vier
other method is an angular method, beuef known as passes will be required for mosllhreads. In
a compound infeed or aflank infeed. :-.hown Ihe compound where one is in
constanf contact thread wall. There is no cUlli
The need 10 infeed direction in only undesirable which may cause a poor surface
offer the best conditions for the insen linish on the avoid Ihis problem, (he
for threads with very leads and some soft the mfeed than the Oank hal f of
majority of cut~ will bene/it from a compound the thread A Iypieal V-thread, with 60u In-
infeed (al an Ihreaded shapes are ror angle 30° and the
the reason of geometry - for example, a thread should be a lillie than thal, say 29". Keep in - the
will always a plunge lofeed (straight infeed). shape or geometry of the thread is nm that is built
The angle of ill is programmed wi Ih the A or into the insert What is is way
lhe G76 how the insert cut - figure 38-11.
3 38
rn
the G76 threading cycle, are very powerful tools
in forms of cutting parameters, twO of which nrc related to controls
the in feed method of a threading tool is the address A, relating
and other is the address P. Only the Jngle description is
available for Ihe two-block method, as last pair of the P
address in (he first G76 N49 076 P.... 60 Q .. R.. In addItion to the radial infecd
flr"rrlnn/~r1
with the AO
• Thread Insert Angle - Parameter A ,,".7"r·" parameter A), there are two main CULling
Ihal can be used in programming a thread infeed - a
controls), a non-zero value cut and a zig-zag CUI. terms refer to
[he tool angle, a of cutting edges employed at one lime. The one
value that is equal 10 of the threading in- cut refers to CUlling with one the zig-zag cut reo
sert. The tool approach towards the part will be a lillie to CUlling with IWO clilfing of them can be
than one half of the For example, if in conjunction with A thread angle pa-
standard A60 is programmed in cycle, the in feed rameter and Ihe cUHing depth
will be slightly less 30°, for the extra clearance. or a conslant depth.
Only the following A angle settings arc allowed in a Fanuc CNC lathe controls methods of control-
076 threading cycle: ling thread CUlling 38-/2):
,
\
AD ISO
A29 ACME ANSI
A30 Metric DIN 103
A55 BSW,
A60 Standard 60° V-thread English or Metric
ABO German thread
03805
(COMPOUND INFEED EXAMPLE)
o
(N45 GSO Xl2.0 Z4.5)
N46 T0500 M42
N47 G97 5450 M03
N48 GOO X3.2 ZO.2705 T050S M08 (START 1)
=Dx N49 X2.972 (PASS 1)
NSO G32 Z-1.6 FO.OS33 (or F/EO.083333)
N51 GOO X3.2
NS2 ZO 265 (START 2)
Figure 38-14 N53 X2. 952 (PASS 2)
N54 G32 Z-L 6
Calculation of rhread stan position· Z axis NSS GOO X3.2
N56 ZO.2606 (START 3)
Once the modified Z axis stan position is known for the NS7 X2.9360 (PASS 3)
first pass depth, it is easy to find start positions for N58 G32 Z-L 6
subsequent pass depth. We know that the modified Z axis N59 GOO X3.2
position for rhe threading (001 will be the already N60 ZO.2S7 (START 4)
established ZO.25, plus the .0283 shift S, rounded from the N61 X2.9230 (PASS 4)
calculated value of .028325193. The theoretical starti N62 G32 Z-l. 6
position will be ZO.2783, calculated at the 03.000, but N63 GOO X3.2
N64 ZO. 2542 (START 5)
never used in the program. itself This mitial value is needed N6S 0.9130 5)
for all the For each subsequent calculation, the N66 G32 Z-L 6
value has to subTracted from the current Z starting N67 GOO X3.2
lion, The following IiSL shows the individual shift values (as N6B ZO.2517 (START 6)
rounded In ish units)' N69 0.9040 (PASS 6)
N70 G32 Z-l. 6
Sl :: .0140 x tan29 .0078 N7l GOO X3.2
82 ::: .0lOO x tan29 ::: .0055 N72 ZO.25 (START 7)
N73 Xl.8978 7)
53 .0080 x tan29 ::: .0044
N74 G32 Z-l. 6
54 ::: .0065 x tan29 .0036 N75 GOO X3.2
55 :: .0050 x tan29 = .0028 N76 ZO.25 M09
56 ::: .0045 x tan29 = .0025 N77 X12.0 Z4.5 TOSOO
57 .0031 x tan29 .0017 N7B M30
Total -0283 %
SINGLE POINT THREADING 357
In program 03805, lhe thread infeed method is equJva- • Single Axis Pullout
lenlto the PI parameter in G76 cycle. This culting type em-
A single axis pullout (thread !inishing OFF) is a simplc
ploys only a single edge of the threading Insert, with a con-
rapid motion programmcd at the end of threading pass as
stant amount per each threading pass. I[ represents [he mOSl
the fhird l11olion of the four basic threading sequences. The
common programming melhod for threads and can be used
pullout direction is always at 90° to the thread. For cilher
as n sample for many olher thread cUlling applications.
lhreadil1g cycle G92 or G76), this is the default condition,
Block-by-block threads will be longer and will need 10 be
so M24 is not needed, unless M23 function is used as well,
checked for accuracy very carefully.
usually for another thread in the same program. two
functions cancel each other. IfM24 function is used. it must
THREAD RETRACT MOTION be programmed before the threading cycle for which il has
been applied. For examrle, the threading program 03gm
Earlier, a statement had been made thaI [here are only two using lhe G76 cycle will be Slightly modified in 03806:
methods of relracting the 1001 from the thread - a slr,lIght
motion along a single axis, and a gradual si multancous mo- 03806
lion along two axes. Both are used in thread programming. N4S (GSO Xl2.0 Z4.5) M24 (THREAD PULLOtIT OFF)
] n facl, their frequenl appJ ications even jusli fy special mis- N46 TOSOO M42
cellaneous functions buill into the control system as a stan- N47 G97 5450 M03
dard feature. These thread retracl functions are called lhe N48 GOO X3.2 ZO.2S TOS05 MOS
thread chamfering fllnctions or thread finishing functions. N49 G76 X2.S978 Z-1.6 IO KO.OSll D0140 A60
P4 FO.0833 (or F/EO.OS3333)
.. Thread Pullout Functions N50 GOO X12.0 Z4.5 TOSOa M09
NS1 M30
When using the Ihreading cycles G92 and G76 ror lhe %
CNC l;:lIhe work, the end of the thread (the Z axis value)
will either be in a maleria! [hat has been previously re- The M24 funceion appears in block N45, the only block
cessed, or in a solid material. The actual pullout can be pro- thal was available without another 1\1 function.
grammed "long a single axis, or along both axes simultane-
ously. Typical Fanuc functions designed for Ihis purpose • Two-Axis Pullout
are M23 and M24. They conlrolthe pullout of the threading Two-aXlS pullout is a gradual angular tool motion along
\001 at the thread end:
lwo axes, away fTom the thread (thread finishing ON). The
example 03807 is similar to [he previous example:
M23 Thread finishing ON (two axes)
03807
M24 Thread finishing OFF (one axis)
N45 (GSO X12.0 Z4.5) M23 (THREAD PULLOUT ON)
Other machine controls may have similar functions. The
N46 TOSOO M42
N47 G97 S4S0 M03
purpose of these funclions IS to enable or disable the aUlO- N48 GOO X3.2 ZO.25 T050S MOB
maric insertion of a pulloul mOlion between threading mo- N49 G76 X2.8978 2-1.6 IO KO.OSll D0140 A60
tion sequences 2 and 3, as described earlier in this chapter. P4 FO.0833 (or F/EO.OB3333)
Figure 38-15 i! luSlrales the comparison of the threadi ng NSO GOO Xl2.0 Z4.5 TOSOO M09
mOlion wilh and without the pullout. N51 M24 (CANCEL M23)
NS2 IDO
%
1- - - - -- .... - - - .- M23
d1 i In this case, M23 was applied in block N45 and an addi-
eional block NSI was used to cancel the pullout. The can-
J ~______~~~______ cellation was not necessary in this program. but il is a good
-.-- d '-- practice 10 cancel runctions used only for specific purposes.
There arc some conditions thaI apply to the M23 func-
I
d1 , , M24 tion. In Figure 38-15, the finishing distance d is set by the
control parameter, within the range of.1 OOx to 12.700x the
thread lead. Normal control setting is equivalent to one
times the thread lcad. The pullout {lngle from the thread is
usually 45°, or a little less because of a delay In the servo
Figure 38·15 system. If the finiShing distance dis greatcrlhan the pUllout
Tvpical miscellaneous functions for gradual thread pullout dislance dl, the pullout will no! be done.
358 Chapter 38
Any thread can be cut in either the right hand or the left Programming a thread that terminates at a shoulder pres-
hand orienlalion, Neither selection has any effect on the ents a unique difficulty. The difficulty is the wall - heLler
profile andlor depth of the thread, but other factors are im- known as shoulder of the part. It is not enough lO program
portant. The majority of threading applications use the the end point for the thread reasonably - il must be pro-
righl hand thread. RighI hand and left hand terms relate to grammed exaCTly. Even then, a collision is possible if the
(he helix of the thread - Figure 38- f 6. tool setup is not accurate. The three typical problems in this
area of thread programming are:
o Recess groove is too narrow or non-existent
To modify a standard threading lnsert, look at its normal .750 - .100 .650
configuration firs\. Figure 38-17 shows a typical threading
insert with the known width Wand the amwlar 1enb Q
th A' ~
The minimum thread length in the illustration is only
lip radius or flat R, and an unknown angular height H. .620. There are no clearances and the length orthe thread is
too short. To solve Ihis problem, select a smaller sIze
threading
. .
insert if possible. If not, modification of a laroer
b
W -: Insert IS the only way.
The modification requires grinding of the insert in the
W = WIDTH OF INSERT non-critical areas, to allow the [001 to complete the mini-
=
A ANGLE LENGTH mum .650 thread length. rn theory, the minimum amounl to
R = TIP RADIUS OR FLAT be ground off the insert is .030, the difference between the
=
H MAXIMUM DEPTH required and the actual thread lengths. This modil~cation
does nol provide for any clearance at the thread shoulder or
at (he insert tip. Both of these clearances are essential for
-; A -<--
the best threading resulLs. Even a minor setup error on the
0
60 V-THREAD machine can cause a serious difficulty.
Figure 38-17 Always calculate the modification amounts, never guess them
Essential dimensions of a threading insert
In the example, insert dimension W is .250 and A dimen- In the example, there are three dimensions thai influence
sion is .130. The included angle of the threading insert is the amount of insert modi fication. The sum of all three will
60° and the insert flat or tip radius R is .012. not relevanl in be the amount to be ground off the insert. One, the thread
this casco The dimension H indicates the maximum thread length has to be extended by ,030 to achieve the .650 mini-
depth and is normally measured to the sharp poim of tile In- mum length. Two, the clearance from the shoulder will also
sen lip. It is calculated using a trigonometric function: be ,030, and three, the clearance past the (hread end will be
.020. The two last clearances are the arbitrary decisions by
H = A / tan30 the programmer. The solution is the total amount of the in-
H =
.130 / .577350269 sert modification being .080. In other words, Ihe amount of
H = .225166605 .080 must be ground off the original large threading insert.
H = .2252 That will shorten the original anglllnr length of 130 to the
length of .050. Always make sure the depth of thread can be
The problem is illustrated in Figure 38-18. achieved with the modified insert. The part program will
reflecI the modification in (he thread end position of the Z
0.25 axis, which will be wrillen as Z-O.S (setup position of the
insert does nol change), and IS illu.-;trated In Figul"p 38-19.
1
0.2252
I.()
!'-
r'- ..... co 0.25
o --- 0.67-
ci ...... -0.62 -- N I
N ---0.13
t 0.35
1 03.5 0.3011 '1
0.301 03.0
! 02.8978 - --0.05
,-- 0.75 .J
~-- - 0.75--
Figure 38-19
Figure 38-18 Modified threading insert provides enough clearance in the recess
Threading insert before modificalion does nul Iii ill the I!:IC!:ISS CJfl:!CJ
In threading, the rhread length is lhe aCllIa! lengrh of {he
The job is 10 program a thread WiUl a .100 recess groove full depth rhread. The part design often allows a little lon-
width, using an insert thaI has an angular length A of .130. ger thread, hut nOL shorter. The height of the shoulder IS
Tllis insert is not suitable for the job, as it cannot finish the also important. In (he example, the shoulder is .30 I I high
minimum full depth thread length - the difference between and the insert modification was possible. A large threading
the shoulder length and the recess width: insert may not always be modified and the only solution
will be to use a smaller insert size.
360 Chapter 38
RATIO: 1.5 =:
are to program 03808: X represents the current thread diameter allhe end
cut, Z is the end position of thread, I is the
03808 side between the diameter at the end and the
diameter at thesrart. I value must include an al-
- TAPERED THREAD) (only
G50 X12.0 Z4.5) direcrion of the tapcr in this case a"''''''''>''''''''
N46 TOSOO M42
N47 G97 S450 M03 value. Program 03809 will cut a tapered thread
N48 GOO X2.S ZO.4 TOS05 MOB threading cycle.
N49 XL242 1)
NSO G32 X2.017 Z-2.7 FO.125 03809
NSl GOO X2.S
NS2 ZO.4 (Gn - TAPERED
NS3 XI.213 2) (N4S GSO X12.0 Z4.S)
NS4 G32 Xl. 988 Z-2.7 N46 T0500 M42
N55 GOO X2.S N47 G97 S450 M03
N56 ZO.4 N48 GOO X2.S ZO 4 TOSOS MOB
NS7 xl.la9 (PASS 3) N49 G92 Xl.01? I~O.387S Z-2.7 FO.12S
N58 G32 Xl. 964 Z-2.7 NSO Xl.9SS
N59 GOO X2.S N51 Xl.964
N60 ZO.4 NS2 Xl.944
N61 Xl.169 4) NS3 Xl.928
N62 G32 Xl. 944 Z-2.7 NS4 Xl. 916
N63 GOO X2.5 NS5 Xl.908
N64 ZO.4 NS6 Xl.902
N65 Xl.1S3 NS7 Xl.8966
N66 G32 XL 928 Z-2.7 NS8 GOO Xl2.0 Z4.S Tosoa M09
N67 GOO X2.S N59 lo00
N68 za.4 %
N69 XL 141 (PASS 6)
N70 G32 X1.9I6 Z 2.7 taper inclination is
N71 GOO X2.S ence between of 1.8966 start dia-
N72 zo. 4- meter of 1.l216, by 2. The result
N73 X1.133 (PASS 7)
N74 G32 Xl.90S Z-2.7 (1.8966 - 1. I 2 :::; .3875
N75 GOO X2. 5
N76 ZO.4 This] value must have a directional LO mdi-
N77 X1.127 8)
N78 G32 X1.902 Z-2.7
cate the laper orientation (its direction from point).
ID9 GOO X2.5 Inthe IheI value will be negative lhcslart
NBO ZO.4 is below the end diameter of the taper
N81 Xl. 1216 (PASS 9) rear lathe. In the the entry
N82 G32 X1.8966 Z-2.7
NB3 GOO X2.5
N84 ZO.4 • Tapered Thread and a Multi Cycle
NBS GOO X12.0 Z4.S Tosoa M09
Na6 M30 tiple repetitive threading cycle G76 cycle re-
% I no! ro be a zero. if a tapered thread is cut.
in the cycle specifles the difference per side. so
a straighl infeed and is used for dislance, as well as the direction between the
will not change very if a com- start diamecer of the
pound is used and/or the pullout from the
thread. Of course, more calculations will that the X diameter is programmed at
thread and the I supplies the taper
• Tapered Thread Using a Simple Cycle inclination (taper ratio side). CNC
axis direction
cycle, the thread taper is programmed an IIlcreaswg
1 value. wilh specified direction from the end I value, and a will reqUire a
starl diameter: I value. The I value is always a single value, measured
not a diameter 38-23 illustrates
for rear lathes.
364 Chapter 38
- - - - - - - ._- - ..-----..----.-..•-----
j X+ These tools are the thread stan position and the thread
""0 t
C ro
....... feedrale calculations. Figure 38-24 shows symbolically the
(])
--- ..... Z+ (j)
views of the thread cross sections and tbe end views.
N N
1
0X External
1-
0X Internal
-<t-
Figure 38-23
Tapered thread inclination direction I used in G76 threading cycles
/ . --.~
The basic G76 cycle will be maintained but the I value
will be added - a non-zero value must be programmed: • r-.
l I \
03810
,~.---/' 90°
(G76 - TAPERED THREAD) Figure 38-24
(N45 GSO X12.0 Z4.5) Representation of mullistart threads (dots indicate thread starts)
N46 Tosoa M42
N47 G97 S450 M03 In the illustration are four examples of the cross sections
N48 GOO X2.S ZO.4 T050S MOB (left) and the end views (right) of a single start thread (LOp),
N49 G76 Xl.8966 Z-2.7 I-O.3B7S KO.0767 D0140 double start (one below), triple start (two below) and a
FO.125 quadruple start (Ihree below).
NSO GOO X12.0 Z4.5 TOSOO M09
NSl mo Although the examples are represented only symboli-
% cally, the thread pilch lS maintained in all examples. Also
note (he equal distribution of each thread start, represented
If this method can be used for threading. 076 cycle is the
by the. heavy dots. Each angle value is the angular spaclng
best choice. It offers the fastest program generation as well
of individual starts, when the threaded part is viewed along
as the best opportunities for on-machine editing.
Its center line. The spacing is automatic and only the cor-
reel shift value from one thread start to the next has to be
MUlTiSTART THREAD programmed, in threading mode .
Mostlhreads have only one start, suitable for most appli- • Threading Feedrate Calculation
calions. The most common purpose of a multistarlthread is The threading feedrate is always the lead of the thread,
to transfer a precision moLion very rapidly over a relatively never the pilch. For a single start thread, the lead and the
long distance. Note (he word precision - a coarse thread can pitch have the same value - for a multistart thread, they do
also be used to transfer a motion rapidly, bUI with very little
not. Take a single start thread of 16 TPI. Here, the lead and
preciSIOn. An example of precision multistart threads are
(he pi(ch are both .0625, so the feedrate is FO.0625. If the
some internal designs of some camera zoom lenses. drawing spec! fies lhe thread as 16 TPI, but indicates a dou·
For programmers, there are some unique considerations ble start, (for example 3.0-16 TPI 2 START), that means
for a mulristart thread. II IS important that the start PO&ilion the pitch of the thread will remain unchanged (.0625). but
for each thread is in such a location, [hal when viewed from the lead of {he thread will double to .1250. Therefore, the
the thread end of the screw or the nut, each start on the cir- programmed feed rate for the double start Ihread with the
cumference will be divided in equal angular increments. pilch of .0625 will be FO.I25. The multiplication of the
Also imponanl is to maintain the equallhread profile when pitch will always depend on the number of thread starts.
viewed from the thread cross section. To achieve these con- That means a triple start thread will have the feedrate Lhree
ditions, two programming lools are available. tj mes the pi tch, quadruple start thread four limes, and so on.
SINGLE POINT THREADING 365
• Shift Amount
Fecdmte is nOllhe only consideration for programming a
thread with two or more srarts. The olher, equally important
factor, is Ihe programmed amount of [he tool point shift.
if! will guanmlee that each start will be in (he rroper
relationship 10 all other starts. When one thread i~ linished,
the sLarLing position of the (oot has to be shifted (in Z axis
only), always by Ihe pitch amount. The formula for the lool
shin amount will be:
PITCH
LEAD
-- The shirt has 10 be programmedjor each slart above the
first one. That means the number of shifts in the program is
Figure 38-25
the one less Than fhe number of slarfs:
Relationship of the pilch and the lead of a double start thread
Number of shifts = Number of starts - 1
In Figure 38-25, the relationship of pitch and lead of a
double start thread is shown, The same logic Iha! applies to
Note Ula! the formula is valid even for a single star!
a double start thread, (llso applies to triple, quadruple, etc
lhread, but there is no shi ft required (1 - I == 0).
threads. The feedrate calculation is identical for all threads:
A few methods can determine when the tool shift is to be
Number of starts programmed. 'He first method, for a double start thread, is
Feedrate to program one thread Lo ils full deplh, then shift out ancl CUi
TPI Ihe second thread to its full depth. The second method, for
lhe same thread, is to cut one pass of the ti.rsLlhread, shift
Figure 38-26 shows Ihe relationships of the pitch and Ihe oul. cut the same pass for lhe second lhread, shift in, cut the
lead for some common lTIuhistart threads - Ihe samc second pass for the first Ihread, shift OUI again and repeat
pitch-lead relationship is mainlained proponionalely. the process unlil bOlh threads are completed [0 the full
depth. This approach applies to any number of starts.
O.5P -
I The obvious advantage to the first method is the ease of
programming. On the negalive side, if the 1001 cutting edge
wears out on the firSI thread, the second Ihread will not be
as accurate. The advantage of the second method is thal the
(001 wear will be equally distributed over bOlh threads, al-
Ihough the programming will require Ii 101 more effort,
which presents the negalive side. Additional problem is
lilat in many hard materials, the thread edge life may suffer
p
from extensive malerial removal.
a
P 1.5P To illustrate a sample rnultislart thread applicarion. thc
following general thread specifications will be used
o The number of threads per inch is twelve (12 TPI)
(J The number of starts is two (double start thread)
o The thread is cut as external at 3.000 nominal diameter
o The calculated thread depth is .0511 (.61343 / 12)
-.-- 2P 3P
o The number of passes will be seven (for G92 cycle)
c
Figure 38-26 Although the block-by-block programming method G32
can be used ror special applications, acceptable results can
Mullistart threads - pitch and lead relationships:
he achieved in many threading applicalions by using (be
I a) Single start thread Lead "" Pitch = 1P
G92 or G76 cycles, with less programming, as well as the
I b) Double start thread Lead = 2P
( c) Triple start thread Lead = 3P gain or easier editing at the machine.
3 Cha 38
°0
o
000
0
0
, it may not be easy to see the difference be-
program and a subprogram at a casual
''''''.rr''''·''....., can usc the absolute or incrementa!
Subprograms are loaded illto Ihe
IYlt>'rrlrw\ljust I programs. When
several benefits:
000
°0°
° 000
0
o
o
o
.. ",,,,;;!,rn
length reduction
I!ffur rl!uuctioll
and
o Quick and easy n\"rhW-",t,,,n,,
Figure 39-1 No( the benefits, but
Example 01 a part requirement suitable to be used as a subprogram a reason to use subprograms.
367
368 Chapter
The subprogram call junction M98 must always be 03951 Subprogram start
by the subprogram number P--. TIle subprogram
M99 telmmates the subprogram ann the
, back to program it originated from (a Subprogram end
or a subprogram). Although M99 is
it may also be rarely in
.... ;J.''''"Ll..l'. the M30 function. In this case, When a subprogram tenninates, the returns the
will run 'forever', or the Reset processing to the program of origin it will not terminate
the program - that is the exclusive function M30 .
• Subprogram Call function Additional parameters may also be added to the
subprogram end, for example a block skip code, a block
The function M98 calls a
number to return to upon exit, etc. Note that the stop
program from another program.
(the % sign) is used in the same manner for a
block, it will result in an error. M98 is an
~rog~ as for a main program. The subprogram termina-
tion - it requires two additional T".<>,•., .....''''~t>T"<
tlOn 1S unportant and must always done right. It
pJete, therefore effective:
two important instructions to the control
o The address P identifies the number
o To terminate the subprogram
o The address L or K identifies the number of subprogram
repetitions ( L1 or Kl is the default) o To return to the block following the subprogram call
3
03952 (SUB)
M99 P70
%
lln(1~,,:t~r\(hrI0' ofsubprogramrning
M30
%
Note -In the fol/owing examples, substitute K every There are some good reasons.
llisted, if required by the control system. five hole pattern has to be spot drilled,
Number of repetitions for some control
tween LO and L9999 and the L address other
always be programmed. Some programmers
block:, even for a single repetition, rather than "Aunt,..,.,.
3.0 TYP --1---1 1.0
the default conditions of the control The
personal preference.
Repetition Count Variation --0/--
controls do not accept the UK as
H'-"ULI',,' of repetitions and use a different format. On
a single subprogram call is the same: I
03953 (SUBPROGRAM)
HOLE PATTERN) SUBPROGRAM NU
m X2. 0 Y2. 0
N2 X8. 0 track
N3 Y8. 0 keeping track of
N4 X2. 0
NS xs.o YS.O
to know exactly what
No G80 Zl. 0 M09 they are used, what is purpose. A subprogram
N'7M99 may be used In many other proper subpro-
% identification technique is important.
can be called from the main program, in Conlrol unit directory of not distinguish
a new program 03902. The LO program numbers and numbers. The
Lhe first hole: control system recogni7es a only by it,
programmed format, the M98, fol-
03902 PROGRAM) lowed by {he P. subprogram
(TOOL 1 - SO-DEG SPOT DRILL - 3/4
NJ.G20 Alllhis means thatlhe
N2 G17 G40 GSO TOI programming level, not at
N3 M06 It is the programmer's responsibility, not
N4 GSO GOO G54 X2.0 Y2.0 5900 M03 T02 to subprogram numbers.
NS G43 HOI Zl.O M08 great flexibility in organizing (he
N6 G99 G82 RO 1 Z-O.3275 P200 F3.0 LO identification - in fact, any programmer can (lnd set
N7 M98 P3953
basiC rules and related Many of the
N8 G28 ZLO MOS
N9 MOl
rules governing the format of main also apply to
subprograms. Remember these four main
372 39
For example, in this handbook, all main are 03954 ZERO o~'~nJM\
numbered consecutively, with two digits corre- mOl G17 G40 G49 GSO
Nl02 G91 028 ZO
sponding lo the chapler the merhod
N103 G28 XO YO
also applies to subprograms, are arbi- Nl04 028 BO
trarily increased by fifty. for will be the N105 G90
third subprogram example in the Cmlp{(~r N1.06 M99
this method 10 any reasonable %
• Organized Approach The units selection should used in the main program,
for nexihilily. One(', (he zero return subprogram
The suggested programming approach is has heen designed into the memory, every main
understanding that Ihe CNC memory is lIot program can start by calling the 03954:
media for all part programs made.
memory capacity is always limited. Alone point, this Imil 03903 (MAIN PROGRAM)
will be reached and there will no more lefllo ac- (PART ABC-123)
commodate more programs. A good program ization Nl G20 Units
is one Ihal uses tbe CNC system memory only the cur- N2 M98 P3954 :Jut'orc'lZmm 03954 call
rent program, perhaps a few more that are to soon.
N3 GSQ GS4 GOO X" ,;{,.
If the unique program number is assigned the machine N4 .. _
rool operaro)' during selup, the Situation some COIl-
trol as welL On some controls, the main number <., IVlnn7117JJ"" ••. >
on {he written copy will not always load automatically, so It
is nol Iy needed. That means, If an '
N45 IDO Main end
with shop supervisor lhal the CNC
usi!!g ouly three %
numbers 1-999; then there will num-
the execution of the lwo
I subprograms, This available
for mosl manu system, follow all operational
an presents a good control over program execulion. DUring the program
whose numbers selected. All four-digit the control system will follow rhe following
lions (instructions):
can be documented, and
SUBPROGRAMS 3
06100 (SUB 1)
N6101 experience
N6102 su bprogrums at
N6103 ... and so Oil However, for a
374 Chapter 39
is no damage done by developing the long program firs!. It Subprogram 03955 contains this paltern and uses the L
lakes more time and it is not efficient. However. this is how address (0 establish [he number of fixed cycle repeats. In
a professional experience is gainC{j. With limited experi- the first main program 03904, the tool motion precedes the
ence, be willing [0 re-write a program from a single long subprogram block. To sran the program development, con-
form to a main program and one or more subprograms. centrale on the hole pattern. First, selectlhe G91 incremen-
Programmer should be able to identify those sections of a tal mode for the pattern. Then program the X and Y incre-
long program thal can qualify as subprograms. Once such a mental values, starting from any hole, such as the lower left
series of repetitive data is identified ill the conventional hand corner and continue in one direction - Figure 39-6.
program, it is only a maner of small adjustmcl1ls La separate
these repetitive clusters and define them as subprograms .
MAIN PROGRAM
-' 0.75 (3)
Only one cutting 1001 was used for this other M98 P . 0 ..
tools will follow the same ml This
method of the last example is more common - in the abso· D can changed anytime
lute mode from Ihe maln program, tool is positioned at is wifhout Change to the subpro-
(he lower len hand corner of Ihe pattern hole of mel hod is useful jf the con-
tht:: is driHt!U allilal locutiun. lour {)Vo or more different offset values, but i I
is called and (he remaining nme not work on all controls. Here is the contenl a simple
positioning contouring , with embedded D offsel. 1 set-
ting value is to the cutter radius:
Return from a Subprogram main program. When a subprogram is called from [he main
program by M98 P.. block, the control forces a branch to
The current modal values should be clear in the main pro- (he beginning of (he called subprogram, processes its con-
gram when a subprogram is completed. Values that may tents, then it returns to the main program to process the re-
have changed 1n the subprogram are absolute or incremen- maining blocks of the main program - Figure 39-7.
tal mode, molion command, coolant and olhers. Subpro-
gram is always a branch of another program - il is a COll- • Two level Nesting
tinuous extension of the program of origin and its integral
pan. All modal values set anywhere in the program are TIle processing of a subprogram that is nested (wo levels
valid until changed or canceled by a command of the same deep also starts at top of the main program. When the con-
group. The M99 subprogram end function will not cancel lrol encounters ;J sllbrrogmln c~lI for the firs\" level, it will
any modal values that are currently active. branch from the main program and starts processing the
blocks in (he first subprogram, starling from its top. During
As the 03904 and 03905 examples show, a fixed cycle is processing of the first level subprogram, CNC system en-
called ITom the main program only once. Alllhe modal cy- counters a call for a second level subprogram.
cle data are carried forward [0 the subprograms. TIle main
program clearly shows current modal values. At this point, processing of the first level is temporarily
suspended and CNC system branches to the second leveL
MUL11 LEVEL NESTING Since there is no subprogram call from the second level, all
blocks in the subprogram will be processed. Anytime the
block containing M99 function is encountered, (he CNC
The last example has shown the main program ChUl calls system will aUlomatically return to the program if branched
only one subprogram and the subprogram does not call an- OUI of [I will resume processing of Ihat program, tempo-
other subprogram. This is called one level nesting, or nest- rarily suspended before.
ing at one level deep. Modern controls allow nesting up to
four levels deep. 111£11 means, if the main program calls a The return [Q the program of origin wi!! norrnally be to
subprogrnm number one, this subprogram can call a sub- thc block immcdiately following the subprogram call block
program number two, that can call a subprogram number in that program. All remaining blocks in the first subpro·
three, and [hal can call a subprogram number [our. This is gram will be executed until anOlher M99 function is en-
called afour level nesting. All four levels arc rarely needed countered. When that happens, the control system will re-
for any practical application, but these are [he program- turn [0 the program it branched out of (program of origin),
ming tools available, Just in casco The following examples in this case to the main program.
show program processing flow of each nesting level.
Since there are still some blocks left in the main program,
• One level Nesting lhey will be processed until the M30 funclion is encoun-
tered. M30 terminates the execution of the main program.
One level nesting means thaI a main program calls only Figure 39-8 illuslrates schematically the concept of a two
one subprogram and nothing morc. Suhprogram that is level subprogram nesting.
nested one level deep is the moSI common in CNC pro-
gramming. The program processing starts at the top of [he
<START>
010
<START> I I
(MAIN) 021 022
010
I (SUB) (SUB)
(MAIN) 021
(SUS)
' -
-
M98 P21
-
M98 P22
M98 P21
M30
%
n
<ENO>
'-----0/0
M99
M30
%
<END>
~ %
n
M~9 L%
M99
<START>
010
(MAIN)
0~:~,~2
(Su (SiS)
I
023
(SUB)
~30rr
<END>
M[l
%:i~ L~99
~[l
'" L M99
%
Figure 39-10
'---
M98 P22 L Four level subprogram nesting
.--- M9a P23
M98 P21
n n
I L%
M99
nested subprograms. Such a programming approach may
result in a short program, but al the cost of a long develop-
ment time. The program preparation lime, its development
M;O L
M99 and debugging often lake more lime lhan writing conven-
% M99 lional programs. Not only the logical development IS com-
'-- % plex and more lime consuming, I:l significant portion or
%
programming lime must be spent on careful and thorough
<END>
doCumenlaiion of the process flow of all programs, setling
up the initial conditions, checking the validity of data, etc.
Figure 39-9
Three level subprogram nesting There are many fairly experienced CNC programmers in
the maChining trades field, who try to use a multi level nest-
• four level Nesting ing at all costs, and the more levels, the better programmers
they fcel they are. These programmers, more often Ihen
The logic of multi level subprogram nesting should be not, use such complex programming technique as the
pretty clear by now. Four level nesting is just a multiple ex- means of expressing their so called 'professional skill',
tension of a single nesting and is logically idenlical LO all usually measured against other programmers. Often, thiS
the previous examples. is nothing more [han a unnecessary contest, a frustration
perhaps, and definilely an expression of a little ego trip.
Unnecessary addition of more branches a multi depth
subprogram nesting makes any programming application When a programmer hecomcs obsessed with making tilt.:
Ihal much more complex and JlIure lIi ITiculllO masler. program as short as possible, at any and a/I costs, he or she
is taking the wrong trek. Such programs, even if
Programming the subprogram nesting into (he four level
technically (lawless and logically correct, are not
depth (or even the three level depth) will require a full un-
very easy to use by a CNC operator. A CNC machine op-
derstand in g 0 f t he pro gram processing order - and hav i ng a
erator with limited or no programming knowledge find
suitable application for it. In lypical machine shop pro-
!hest: programs extremely inrimidating - even skilled and
gramming, there is seldom the need [0 use level [hree and
experienced operators will nnd them hard [0 read. hard 10
level four nesting. If a good example of a rour level nesling
interpret and most likely. they will be unable to make
application is found. the typical program flow will conform
substantial changes La them, in order [0 modify or oplilnizc
LO the formaL illustrated in Figure 39- JO.
the programs for a bellcr performance.
• Nesting Applications A simple general rule for multi level nesting technique -
use It only in those cases, when the frequency or their future
Considering the realilY that each suhprogram can be rc- deployment justifies the extra time spent for their develop-
peated up (0 9999 limes in any program thai calls it, shows
ment. Like anything else, many nesting levels offer advan-
the enormous programming power available to use and ex-
tages and (he inevitable disadvantages.
plore. Always be aware of potential difficulties. even dan-
gers, when developing subprograms wilh several multi
378 Chapter 39
CONTOURING WITH A SUBPROGRAM profile 25 times, for 25 x .010 = .250 lolal required deplh.
Preference for a subprogram in such a case IS wilhout a
question. Symbolic detail of Ihe depth cui for a single in-
So far, a number of rrogramlmng examples have been us- cremenl is i Iluslratcd in Figure 39-/2.
ing a subprogram. They all related to machining holes and,
hopefully. offered enough material to underSland the con- The subprogram 019.'iR will contain only the 100/ mo·
cep! of subprogramming (there will be one marc - a ralher tions common to all the groove cws. Thal means the .010
speCIal one - allhe end of this chapler, so look for it). There incremenlal plunge cui and the 360 0 circular cut. All other
aft: other examples found throughoul Ihe handbook [hat motions will be in (he main program 03906. Note the word
make generous use 01" subrrograms. lilcremenral for the plunge depth. The .010 musl be pro-
grammed incrementally, otherwise it will cut at (he abso-
Here is one more example relating to this chapler. Ihis lute deplh of Z-O.OI - all twenty five times! Here is [he
lime applying a simple XY contouring work \0 a mulliple Z complele main program 03906, followed by a single re-
depth - evaluate Figure 39-11. lated subprogram 03958 (tool TOI is assumed LO be in the
spindle):
... G91 Z-0.01 The second requirement is mel in block N7. It is Ihe G90
comJnnnd [hat makes Ihis block special. Why? Because lhe
subprogram uses G91 incremenlal mode. When the sub-
Groove width program processing returns back to the main program. it no
longer beneJits from lhe incremenlal mode, and the G90
Figure 39· 72 changes Ihc Incremental mode back to absolute mode.
Del8il of the subprogram 03958 . fronl view shown
SUBPROGRAMS 3
To make (he example reasonable, simple, and interesting What makes the program even more interesting is thees-
al Ihe same lime, (he holes arc very small, only 05/64 (imate of machining lime. This may go a little too far, but
(.0781), with a pitch of. 120 along each axi s, rcsu lIing in a let's finish the fun. Before reading the whole page, make a
square grid pallern of holes very close (0 each other. guess - how long will it take to machine all holes with the
two fools? The speeds and feeds are reasonable for most
Only IWO tools are used, a spot drill with a 90° 1001 point materials, so are {he clearances and the dwell time for spot
angle \0 startup the hole for drilling and a 05/64 drill. Bo[h drilling. A rapid traverse of 475 in/min is assumed in all
cutting 10015 start machining from RO.06 cycle position axes. a reasonable speed. It is worth the few calculations?
above the plate to Iheir respective depths: Z-O.04 for the Malians between Ihe machine zero and Ihe first location
spot drill and Z-0.215 for the drill. are disregarded in both directions for convenience.
From the programmi ng pain! of view, the. program design The tirst calculation finds the lime it takes to make a rapid
is not difficult at all - it will usc a main program and one motion bel ween all holes. One hundred million spaces (less
subprogram. The programming procedure is the same for one space) multiplied by .120 divided by 475 in/min is
100 000 000 holes, as if lhe grid were only 100 holes. The 25,263,1576 minutes. These motions will be multiplied by
main program contains the standard settings and also calls Iwo, for two lools, therefore 50,526.3153 minutes.
the subprogram, The subprogram will repeat the active
fixed cycle 9999 times, for two rows, one in each direction. The spot drill will move .060 from the clearance to the
lop of part and .040 depth of cut, for the totalleng!h of. 100,
The slart position for the first tool motion is at an arbi- mulliplied by one hundred million holes at the rate of 5.0
trary local ion X 1.0Y I .0 (shi fled hy .120 along the minus Y in/min. therefore cuning time for spot drilling will be
axis). A fixed cycle drills the firSI hole. repeats ilself9999 2,000,000 minutes. TIle SpOt drill will rapid oul oflhe hole
times, shifts in the posltive Y axis once, drills a hole and re- one hu ndred million Ii mes the dlslance of .100 al the rale of
pealS along the negative X axis 9999 limes again. This 475 in/min, 10laling 21 ,052.63l6 minutes; Ihe dwell time at
subprogram pattern repeals 5000 times in the body of (he each location is 0.030 seconds. translated ioto minutes will
malll program: take another 50.000 minutes.
03960 (SUBPROGRAM) The actual drilling will take place to the depth of .215
N60l G91 YO.12 from .060 clearance leveL for (he tOlal travel of .275 at the
N602 XO.12 L9999 rate of 4.0 in/min - which is another 6,875,000 minutes.
N603 YO.l2
The drill will rapid out of one hundred million limes by the
N604 X-0.12 L9999
N60S M99
distance of .275, at the rate of 475 in/min, adding another
% lime of 57,894.7168 minutes.
The majority of CNC programs will be programs for a mand G92 and G50 registers (he absolute coordinates of
single job - ajob thaI is relative to a specific machine avail- the currenl tool position and have no influence whatsoever
able in the shop. Such a particular job will have ils unique on the incremental dimensions, when using the G91 com-
characteristics, ils special requirements as well as its own mand for milling or the um axes for turning. Its normal
tool path. The 1001 path is the most impol1ant of all the fea- purpose is LO 'tell' the control system the curren! 1001 posi-
tures of a CNC program. lion. TIlis step is necessary alleast once at the beginning of
each tool to establish the relationship between the fixed
It is the CNC programmer's main responsibility to de- program zero (pan origin) and the actual position of the
velop a functional tool path for any givcn job, withoUl er- cutting tool. For example,
rors and in [he most efilcient way. The \001 path develop-
ment IS very Important, because it represents a machining G92 XIO. 0 Y6. 5
pattern unique to the job at hand. In most programming
jobs. [his machining pattern is executed for the given job is "elling' lhe control system thatlhe CUlling (001 is set at
only and is irrelevnnl (0 any other CNC program. Often, positive 10.0 units away from lhe program 2Cro in the X
programmers encounter opportunities, where an exisling axis and posilive 6.5 units away in the Y axis.
machining pauem can be used for many new jobs. This dis-
covery will encourage development of the programs more What happens if a wrong position is rcgistc(ed? What if
efficiently and produce CNC progfi.lms for many additional the values in the G92 or G50 statement do not accurately
applications and without errors. reflecl the !rue, the physical position of <1 cutting tool') A<;
may be expected, the tool path will occur at the wrong
The programming technique that addresses this issue is place and the result is qUIte likely a scrap of the machined
known as the Translation of a Machining Pattern or, more part. tool breakage, even a damage to the machine itself.
commonly, a DafUn! Shift. The mosltypical example oflhis Certainly not a desirable situation.
technique is a temporary change of Lhe program reference
point (program zero) from (he original position to a new A imaginative CNC programmer always trtcs to find
position, so called work shift. Other programming tech- ways and special methods that Lake advanlage of rhe avail-
niques include Mirror Image, described in (he next chapter, able programming tools. G92 and GSO commands are only
Coordinate Rotation and Scaling FlInc/ion, described in Iwo of many 10015 Ihat offer a tremendous power to a
the chapters that follow. creative CNC programmer.
This chapter describes in detail the advanced subjecl of For simple jobs, there is no need for special or creative
DQ/um Shift. also known as the Machining Pal/ern Transla- manipUlations. It is not very economicallo invest precious
tion. This is a basic feature of all CNC systems Ihat can be lime on adding features to Ihe program (hal will never
applied in a variety of ways. provide real advantages. If such a need is well justi rled, the
rrogram can be optimized later.
DATUM SHIFT WITH G92 OR G50 • Program Zero Shift
In essence, a datum shift is a temporary or permanent re- If the G92 command is used on machining centers or the
location of the part zero (program n:.'ferencc point) inside of G50 command for lathes at all, rather than the morc current
Ihe program. When Ihis programming technique is used, it and very efficienc G54 to G59 work offsets. only one G92
relocate.." an existing machining pallern (tool path) 10 the (GSO) posjllon register command is neededjoJ Q single 1001
program a( different locations within the CNC machine - assuming thal work offsets are not used.
work area.
Any occurrence of more than il single position register
In an earEer section (Chapter /6), explanation of G92 command per each tool in one program is called tl program
(milling) and GSO (turning) commands was covered. Re- zero shift.
view Ihese commands now, before continuing further. [n
To illustrate Ihe concept of the program zero shift. a sim-
particular, recailihat these commands do not cause any di-
ple bUl relevant draWing wi 11 be used. The drawing is illus-
reclloo} motion, but they do innuence any tool motion (hal
trated 10 Figure 40- J.
jollows it. Also keep in mind thallhe position register com-
381
2 40
04001
USED FOR TWO TABLE
I.l)
o N , 01 m G20 G90
N2 G92 X22.7 Y19.5 Z12.5 (TOOL AT
N3 S1200 M03
N4 MOS
N5 G99 G82 X2.S Yl.S RO.l Z-0.2 P200 FS.O
No X6.75
N7 YS.O
N8 X2. 5 (TOOL AT LAST HOLE OF PART A)
N9 GBO Zl.O
1
mo G92 x-a.7 Y-4_7 (SET AT LAST HOLE OF A)
o Nl1 G99 GSl X2.S Yl.S RD.l Z-0.2 P200
Nl2 XC;.75
Nl3 Y5.0
Nl4 X2. 5 (TOOL AT LAST HOLE OF PART B)
40-1 Nl5 GSO Zl.O
A drawing for zero shift illustration - program 04001 Nl6 G92 X-9.0 Y-4.8 (TOOL FROM M/C ZERO)
Nl7 GOO Z12.S M09
the four holes will be machined at Nl8 XO YO (TOOL AT M/C ZE:RO)
loca!ions oflhe machine table setup, as Nl9 M30
%
N2,
. - - - G92 X(A) - - -....
11 Machine 1
Zero them relates to the
in some way. Be velY careful here. Not
behind G92 calculations have
troubles.
11.2 ~
The next is NIO, At this poinl in the pro-
gram. the Part A is completed. bul ParI B not yet
Figure 40-2 been started. Think a little now and see the
Program zero shiff using 692 command for fWo pans - 04001 Lool is after executing block It is at
X2.5Y5.0 of ParI A. Uthe tool
The G92 X(A) X or ParI B. which is the
of Par! A to (he machine zero, gram has La 'tell' the
distance from the pan zero or moment - but in relation to
Note !.hat the arithmetic calculation:
zero. They coule!
G92 (X) ; 11.5 + 2.5 - 22.7 -8.7
must start from pan zero. In LO use
between both must be known..
G92 (Y) = 9.8 + 5.0 - 19.5 = -4 7
~--.... 22.7 ----+I.i However, if the bolt pattern is within a rectangular area, the
part zero maybe at the edge comer of the work.
i?1l
~l
Normally. absolute locations of the bolt holes will have to
be calculated from program zero, unless either a shift of the
program zero is used (using 092 described earlier), or a
special coordinate system is selected.
When working with work offsets, three programming
methods are available to make the job a lot more conve-
9.7 YS.O nient and perhaps even less prone to miscalculations:
o Use the center of the bolt circle as program zero.
l
I
CD 0 This will be convenient for the eNC programmer only,
A as it causes more work during setup
X2.5 Y5.0 is the last o Use two different work offsets in the program,
11.2 hole of the pattern for example, G54 for the reference to the part edge
and G55 for the reference to the center
Figure 40·3 of the bolt circle pattern
Calculations of G92 coordinates (XY) for program example 04001 o Use a local coordinate system, within the current work
coordinate system (work offset) selected at the
return will take place from X2.SYS.O of the Part IJ, which beginning of program
is 9.000 inches from the machine zero along the X axis and
4.800 inches along the Yaxis: In all cases, one significant advantage has been gained -
the programmer uses calculations relating to the bolt circle
G92 (Xl = 11.2 + 2.5 - 22.7 -9.0 center coordinates, directly in the CNC program, without
G92 (y) ~ 9.7 + 5.0 - 19.5 = -4.8 the need of extra additions and subtractions. This method
may even simplify setup on the machine. Which method is
Both programmed coordinates X and Y win be negative. better to select and when is addressed next.
Once the current tool position is set at the last hole of Part TI1e first method, programming to the bolt circle center,
B, a return to the machine zero can be made. This retum is is (I common method and no comments are necessary.
necessary, because it is the location of the first tool. The tar-
get position for machine zero is XOYO not because it is a TIle second method, using the changes from one work
machine zero, but because the 092 coordinates were mea- offset to another, is also quite common. Its usage is not dif-
sured from there! The actual X and Y motion to machine ficult. TIle limitation of this method is the reality that only
zero is programmed in block N18. six work offsets are available as a standard feature on typi-
cal Fanuc control- 054 to G59. Ifa11 six offsets are needed
LOCAL COORDINATE SYSTEM for some work, none is left as a 'spare', to use for situations
such as a bolt circle pattem (There are additional work off-
sets available as an optional feature of the control system).
The 092 command for position register is as old as abso-
lute programming ilself.ln lime, it hao,; been supplemented The third method, using the local coordinate system
by additional commands that control the system of coordi- method, has the main advantage that it allows the use of a
nates. The work coordinate system (G54 to G59 work off- dependent - also called a child - coordinate system within
sets) has been discussed and a suggestion made that 092 the current work offset - also caned the parent work offset.
should not be used when any work offset is in effect. Such a Any number of local coordinate systems can be defmed
siruation prevents changing the program zero on the fly, within any parent work offset. Needless to say, work is al-
when needed only temporarily. Fortunately, there is a solu- ways done in one coordinate system at a time. Note:
tion in the form of a progranunable subset of the work co-
ordinate system (work offsets) called the local coordil1ate The local coordinate system is not a replacement for,
system or the child coordinate system. but an addition to, the work coordinate system.
There are many cases, when a drawing is dimensioned in Local coordinate system is a supplement, or a subset, or a
such a way that the work offsets 054 to 059 become some- 'child' of the current work offset. It must be programmed
what impractical. A good example is a bolt hole pattern. If only when a standard or additional work offset has been se-
the overall machined component is round, chances are that lected. There are many applications that can take advantage
the program zero will be selected at the center of the bolt of this powerfill control feature.
hole pattern, which offers a certain benefit in calculations.
3 40
Gsa XO YO
( - - CANCEL LOCAL OFFSET AND RETURN TO G54 - - - )
DATUM SHIFT
Nl G21 (METRIC)
illustrates the use of the N250 G90 G54 GOO X17.7 Y35 3
lool change at a fixed position N251 GOI Z-S.O F200.0
tbe machine thai is not directly related to N252 GOO ZSOO.O
program or the job 40·5. N253 G53 X-400.0 Y-lOO.O (FIXED POSITION)
N2S4 MOO TOOL CH.i!\.NGiE
,. ..t-----170
, ----- N255 S1200 M03
N256 XSO.O Y3S.0 (IN ORIGINAL WORX
N257 (... Machining continues ,..)
All this high tech aULOmation IS possible with an optional This group includes all if available.
feature called Data Selling. Many control s this
feature available, a feature thaI should never be WORK OfFSETS
underestimated. Even a small shop with
CNC machine can benefit from Data
provided il is supported by the control Before studying this that de-
the concept of
.. Data Setting Command
select the data setting option and to set
.. Work Offset Input
through the program, Fanuc offers a G The standard six work offsets
both the milling and turning
chining Irements, they are typically with
DatI.:! se.lling milling cOn!rols. The programming format is (he same:
G90 G10 L2 P3 X-630_0 Y-408.0 Values: Value set by Gl0 L11 P.. R.. block
ooffset code
Values 2: Values set by G1 0 l12 P.. R.. block
• External Work Input 3: Wear offset value
to lhe work coordinate sys-
or Common. This offset cannot Used for: Hoffset code
any G code and is used to Values 3: Values set by G10 111 P.. R.. block
globally, affecting all work offsets.
Input 4: Wear value
into the offset, G lOuses
and PO as the offset selection: Used tor: D offset code
G90 G10 L2 PO X-10.O Values 4: Values sat by G10 l13 p.. block
will 10.0 into work offset, while re- In all cases, Ihe L
taining all other (the Y axis. the Z axis and any ad- group number
ditional axis as well) n prac[ice. when using the shown isler number in
sen! ng, each work in il particular program will of Ihe offset to set
be shifted by 10 mm the X negative direction. lute and incremental
length pr:ogrammed input as
388 ........................................
Chapter 40
As an example for a CNC machining center, the follow- If the existing offset amount needs to be only adjusted,
ing block will input the amount of negative 468 mm into use the incremental programming mode. The last example
the tool length offset register number 5 (five): of a wear offset will be updated by adding 0.010 mm:
G90 GIO LIO P5 R-468.0 G91 GIO L13 P7 RO.OI (NEW SETTING IS 0.02 MM)
rf the offset has to be adjusted in order to make the cut 0.5 Be careful with the G90 and G91 mode - remember to re-
mm less deep for the lool length offset 5, change to the in- store the mode for subsequent sections of the program.
cremental mode G91 and program:
LATHE OFFSETS
G91 GIO LIO P5 RO.5
Note the G91 incremental mode. If the last two examples Toollenglh offset does not apply to the lathe controls, be-
are used in the order listed, the lInal amount of offset cause of a different offset structure. G I 0 command can be
number 5 will be -467.5 mm. used to set offset data for a lathe control, using this format:
Older Fanuc controls were using the address L1 instead of G10 P .. X(U) .. Z(W) .. R(el .. Q._
the newer L11. These controls did not have a wear offset
as a separate entry. For a compatibility with the older The P address is either the geomefl)' offset number or the
controls, L1 is accepted on all modern controls in lieu of L11. wear offset number to be scI. The addresses X, Z and Rare
absolute values, the addresses U, Wand Care theirrespec-
tive incremental eqUivalents. No G90 or G91 mode is avail-
• Valid Input Range able. using the standard G codes of the A Group .
To tell apart (he geometry offset and the wear offset, the
On most CNC machining centers, the range of tool length
geometry offset number must be increased by an arbitrary
offset values is limited:
value of 10000:
± 999.999 mm Metric Geometry offset input Pl 0001 will be geometry offset number 1
Pl 0012 will be geometry offset 12 ... and so on
± 99.9999 inches English Geometry offset input
If the value of 10000 is not added. the P number will then
± 99.999 mm Metric Wear offset input become the number of the wear offset.
G10 Pl XO ZO RO QO
CUTIER RADIUS OFFSETS
· .. clears all wear offset for W OJ settings
For the offset memory lype C. (he amount of the culler ra- (Wear offset register I)
dius offsct (D) may he input through the program, using Note - QO also cancels value of tool tip number in G 0 J
G 10 command with L 12 and L 13 offset groups:
GIO PlOOOl X-200.0 Z-lSO.O RO.8 Q3
G90 GIO L12 P7 RS.O
· .. sets the contents of G OJ geometry offset to:
will input 5.000 radius value inlO the culter radius ge- X-200.0 Z-lS0.0 RO.8 T3
ometry offset register nUlllber 7.
· .. also sets T3 in the wear offset - automatically .Ii.'
G90 GIO LI3 P7 R-O.03
will input -0.030 radius amount into the culter radius GIO PI RO.8 Currelll T selling assumed
wear offset register number 7.
. sets RO.R value in W OJ wear offset
DATUM SHIFT 389
Again, to verify, check the selling of lOo] length offset The data selling block has three entries:
H 12 - it should have [he new value of -107.475.
GiO LSD
Develop other similar tests (0 follow the same routine. It .. P .. R."
is always better LO slart a program with confidence. Gl1
390 40
In case of d modal G 10 and G II combination, com- If more Ihan one aXIs IS required to be sel at same
this meaning: use mulliple .. P. R.. between G 10 GI J -
funher in (his section.
G10 Data setting mode
Programmable parameter entry mode fixed R Address
Data entry specification
setting mode cancel address R is the new value to be inlo
parameter number and musl always entered. The
Ihat are 10 be sel, one listed above must be observed. Note or
parameter number uses the N points in the entries.
dala use P and R There are several types of
rameler input:
• Program Portability
containing even a single programmable
Of~o,alll~'~1 input Allowed input range eter entry should be used only with the machine and
for which were designed.
Bit type 0 or 1
Bit type 0 or 1
G90
Setting R-value Description GlO LSD
=
N1221 PI R-250.0 (DECDfAL POINT NOT A.L.I..OWED)
6 300 baud Gll
7 600 baud
. Proper input is without the decimal point. An error condi-
B 1200 baud lion (alarm or fault) will also be generaled i(ihe P address
is not specified at all. For example,
9 2400 baud
G90
10 4800 baud GIO LSO
Nl22I R-2S0000
11 9600 baud Gll
This program segment will change parameter #5130 to or write 10 a parameter, also for a milling conlro\:
the value of I. The chamfering amount will be equivalent to
?ne pilCh of lhe thread. Do nolconfuse byte with a bil- byte G90
GI0 LSD
lS a value 0 to 127 or 0 to 255 for the byte axis type, bil is a
N1221 Pl RO (SET G54 X COORDINATE TO 0)
s[ate~nly (Oor I, OFF orON, DISABLED or ENABLED), N1221 P2 RO (SET G54 Y COORDINATE TO 0)
offenng selection of only one of two options available. The N1221 P3 RO (SET G54 Z COORDINATE TO 0)
word BIT is actually an abbrevialion of two words: Gll
Bil :::: Binary digit ('binary' means based on two) • Bit Type Parameter
Another example is for the entry of a two word parameter The next example is quite harmless and may be used as a
type. It will change the work offset G54 to X-250.000: lest, but be careful wilh any other parameters. Its only pur-
pose is to set automatic block sequencing ON while enter-
G90 ing a CNC program at the control. It also serves as an illus-
GIO LSO
N1221 PI R-2S0000 tration of a bit type parameter and IS a good example of
Gll some general thoughts and considerations that go into pro-
gram preparation using programmable parameter mode.
Parameter # 122 I controls G54, # 1222 controls G55, and
so on. P I refers to the X ax is, P2 refers to the Y axis and so On Fanuc 16 Model B (and most of the other models as
on, up LO 8 axes. Because the valid range of a l~ng'integer well) is a feature that allows automatic entry of sequence
(two word type) is required, a decimal point cannot be numbers. if the program is entered from the keyboard. This
used. Since the selling is in metric syslem and one micron feature is intended as a time saving device for manual entry
(O'(JO I mm) is the least increment, the value of -250.000 of program data. In order to enable Ihis feature, select the
will be entered as -250000. The following exumple is NOT parameter that controls the ON and OFF status of the fea-
correct and will result in an error: ture. On Fllnuc 16 it is 11 parameter number 0000 (same as
0). This is a bit-type parameter, which means it contains
392 40
UH
Part
Figure 41-2
The nrlflf':JnIf! applied a machined part
Earlier discussions established that are four quad- o Arc motion direction (CWor CCW)
raniS on a plane. The upper right area creates Quadran! I,
One or more
the upper len area is Quadrant II, left area IS
these axes are only
Quadrant IIf, and the lower right area is IV. Iflhe
used for mirroring
program zero is at the lower left corner
programming in the tirst quadrant.
393
394 Chapter 41
Ir IS
Y+
is no arc di- QUADRANT II (Q2) QUADRANT I (Q1)
i
of the mir- MI
<_ QUADRANT
~I
It 1 '\
...........
x- ,
,02
........... QUADRANT III (03) y_ OUADRANT IV (04)
G41
,
Figure 41-4
IJ Mirror axis and its effect on pan orientation
QUADRANT-
y-
III IV Programmable mirror image must be
supported by the control system
Figure 41·3
Effect of mirror image on tool path in different [J1l~llJr~/[Jrs
machining follows the program as IS. For exam-
• Original Tool Path if (he programmed path takes place In the second quad-
ram (using absolute mode G90), the normal X values will
The originallOol path program may the normal Y values will be positive.
quadrant. If there is no poims is always normal within the origi-
condition), the tool path is in quadrant programmed, when no mirror image is used,
ranl only. This is how the m~iorilY of all the machining takes place in a mirrored quadrant, one
programmed. Once mirroring is or both signs will change.
Ihe original machining pauern - the
gardless in which quadrant it has been • Sign of Coordinates
Mirroring will always transfer the 'normal' sign depends on the quadran t of the coordi-
lool path) to another quadrant or quadrants. nate system used in programming. If programming in rhe
pose of the mirror image function. Quadrant /, both the X and Y axes have positive absolute
image requires Ihal cerlain conditions are mel. is the complete lis( for absolute values in all
conditions is definirion of the mirror axis .
• Mirror Axis x+ y+
Since there are four quadrants, they provide in fact lou I' Quadrant II x- y+
available machining areas. These areas are divided by two
machine axes. Mirroring axis is Ihe machine axis about III x- y-
which all programmed motions will flip' over. Figure 4 J-4 Quadrant IV x+ y-
shows the mirror axes and theIr effect on pan orientation in
quauranls. mirror axis can be defined in two ways:
o At the machine ... by the eNC operator
o Through the program ... by the eNC programmer
y
When a part IS with intent to use the mir~
ror image, make sure to use a carefully thought out pro-
ON
!ITaTIIlllilll' Ihat uses a different technique MIRROR
fhan whe~ programming in a
[MAGE
(wilhout {he XOFF
mirror image). During all motions in Ihe o YOFF
program, with the zero return, will be
mirrored, when the mirror on. That means x
the following considerations
ON
1. HOW the program is MIRROR
2. WHERE the mirror image will be IMAGE
3. WHEN the mirror image will canceled
OFF
Start and end of the program [hilt is to is usu-
Figure 41-5
ally al the same localion, typically at
Togg/e switches of mirror
Chapter 41
Y+ j G54
'--
0 0 0
0 N "<::t <.0
<:) 0 5.0
0- 0- 3.0 ,
Figure 41·7
0 -0 1.0
Programmed tool motion for the three holes located in Quadrant I
0
0 -0 j Y+
0 0 o
0 0
04101
Nl G20
(CENTER DRILL THREE HOLES) ,
N2 G17 G40 G80 Figure 41-8
N3 G90 GS4 GOO XO YO 8900 M03 (XOYO)
Resulting tool motion in all four "" •• ,"'.".",. using mirror image
N4 G43 Zl.O HOI MOS
N5 G99 G82 X6.0 Yl.0 RO.l Z-0.269 P300 F7.0
N6 X4.0 Y3. 0 Control are automalic by the program. The
N7 X2.0 YS.O program image vary between machines,
N8 GBO ZLO M09 but the applicarion principles are the same.
N9 G28 ZL 0 M05
mo GOO XO YO RETURN TO XOYO)
N11 M3D • Mirror Image Functions
%
In these functions will be used:
Look at the tirst tool motion in It locates the cUlling
tool at XOYO, where there is no hole.' This is the most im-
portant block in the program for a mirror image, because il
is this location lhat is COl11mOI1 to all Jour quadranls~
150
01/8 DRILL
0.25 DEEP 0.50
12 HOLES
0.125 R1.00 RO.1S (3)
T
l 0.50
4.00
o ·.-.-00 o
o 00 o 0.125
L
MATERIAL:
4.00 AL PLATE - 4 x 4 x 1/2
Figure 41-9
Comprehensive example of programmable mirror image Uses main program 04103 and subprograms 04152 and 04753
398 41
• Center of
center of rolation
which the rota-
defined by two differ-
plane, X and Y
for the G 17 active
(Olalion point coordinatcs
0.65 and GI9 will use as the point coordinates. The
\I plane selection command G 17, G 18 or G 19 muSI be en-
1- -- tered into the program unytime the rotation com-
mand G68 is issued.
r -
~\
0
'-15
\ \ PROGRAM ZERO
\ (UNCHANGED)
Figure 42-5
Comparison of the programmed tool path (solid line)
and the rotated tool path (daShed line):
( a) Program zero included in the rotation
( b) Program zero not included in the rotation
Figure 42-3
The following program 04201 illustrates the above ex-
Pari oriented as per engineering drawing specification
ample (a) , in Figure
•
42·5, which does include the proaram
0
The actual lool path, includmg the C.lpproach towards the zero rolallon. It the program zero is not to be rotated, in-
part and the depanure from the pan, is not normally in- clude only the part profile lool path between the G68 and
cluded in the engineering drawing. Be careful here - ir the G69 commands, and exclude the toot approach or depar-
approach and/or deparlure molions are i nc\uded in the rola- ture motions, Also note the G69 in block N2 - the cancella-
tion. the program zero may also be rozated. In the Figure lion is included there for added safety.
42-4, the orientation of the part i~ 15° counterclockwIse.
04201
based on the lower len corner.
N1. G20
N2 G69 (ROTATION CANCELED IF NEEDED)
R15
N3 Gl7 GSO G40
1-
N4 G90 G54 GOO X-l.O Y-l.O S800 M03
N5 G43 ZO.l HOl MOB
30 N6 GOl Z-O.375 FlO.D
N7 G68 X-I.D Y-l.O RlS.O
NB G41 X-O.S Y-O.S DOL F20.0
N9 Y3.0
5,0 NlO X3. 5
Nll GOl XS.O Yl.5 Rl.S
Figure 42-4 N12 GOl YO.S
Part oriented as per program, using the G68 command
Nl3 X-D.S
COORDI ROTATION 401
• Common Applications
As mentioned already,
Coordinare rotation appJied to lit a long part within rhe work area
nothavelhe
they may have il
lion can be very is lypically than the actual work area, 10
allow for setup and additional space. Work area is used for
programming and the setup as well, and is always de-
o If the nature of the work includes orthogonal parts fmed by the limits motions. Work area must be able
machined at an angle per drawing requirement). 10 accommodate all tool motions and clear-
The earlier example belongs to this category. ances, Including cuLLer radius offset In effect
o If there is a short X Ytravel on the machining center
and the part is positioned on at a known angle, PRACTICAL APPLICATION
because of the limited machine travel.
The second application is example of [he co- In many cases, used very efficienlly
ordinate system rolalion, thal two major condi- togelher with Applicalions such as
lions are satisfied: milling or machining at boIL circle loca-
lions are The following detailed
o Rotated part must fit within the work area example in drawing that looks
o The angle ofthe setup must be known deceptively simple but a bit of programming.
In the Figure 42-6, a The requirements and
orthogonally, but it can opmenl must be
machine all 7 pockets with a
This method is quite type). To make the
ble to be implemented. A plunging to the full
placed within the work area length ma>(lmum deplh of' cut.
ever, there are cases when this Slack for finishing of the
be very useful, even if it is nOI LaO common. illustration addition, all sharp
only shows the general principles of application. If the chamfer. In all, only
positioning angle is nol known, use an indicalor at two 10-
(?) 30 FACE MILL
calion,:; of the mourlled part und Calculate illrigollulllt:tri- o 1/4 CENTER CUTIING
cally. In some cases, a special fixture for o 3/8 CHAMFERING
such a setup,
is definitely a lapp]
Not is expected.
With gl experience, il to IlIteq)l"et {he
program. Hopefully, [he notes will help.
2 42
-
-- - -
,,
7 EQSP POCKETS
4 x 3 x 1/2 SEE DETAIL
(T01 3.0 DIA FACE MILL - SKIM COT TO CLEAN TOP FACE)
Nl G20 (ENGLISH UNITS)
lO G69 (CANCEL COORDINATE ROTATION IF ACTIVE)
N3 G17 G40 GSO Tal (SEARCH FOR TOl IF NOT READY)
N4 M06 (TOl TO THE SPINDLE)
N5 G90 G54 GOO X-l.375 Y-3.25 S3500 M03 T02 (Xl' START POSITION FOR FACE MILLING)
N6 G43 Zl.O HOl MOS (Z CLEARANCE FOR SETUP - COOLANT ON)
N7 Gal ZO FlO.O (TOP OF FrnISHED PART FOR FACE MILLING)
N8 Y3.125 F15.0 (FACE MILL LEFl' SIDE)
N9 GOO Xl. 375 (MOVE TO THE RIGHT SIDE)
NlO G01 Y-3.25 (FACE MILL RIGHT SIDE)
Nll GOO Zl.0 M09 (z AXIS RETRACT - COOLANT OFF)
Nl2 G28 Zl.0 MOS (Z AXIS HOME FOR TOOL CHANGE)
N13 Mal (OPTIONAL STOP)
(T02 - 1/4 DIA CENTER CUTTING END MILL - MAX DEPTH OF CUT 0.05)
N14 T02 (SEARCH FOR T02 IF NOT
N15 MOS (T02 TO THE SPINDLE)
Nl6 G69 {CANCEL COORDlliATE ROTATION IF ACTIVE}
N17 G90 GS4 GOO Xl.O YO S2000 M03 T03 (XY START POSITION FOR THE CENTER OF POCKET 1)
N18 043 Zl.0 H02 MOS (Z CLEARANCE FOR SETUP - COOLANT ON)
Nl9 GOl ZO.02 F30 0 (CONTROLS 0.005 LEFT ON THE POCKET BOTTOM)
N20 M98 P4252 L7 (ROUGH AND FINISH MILLING OF SEVEN POCKETS)
ml G69 (CANCEL COORDlliATE ROTATION IF ACTIVE)
lO2 G90 GOO Zl.O M09 (Z AXIS REl'RACT - COOLANT OFF)
lO3 G28 Zl.O MOS (Z AXIS HOME FOR TOOL CHANGE)
m4 MOl (OPTIONAL STOP)
when the machining lOol path thal path. The result is many hour.:; of extra work
1001
programmed once must be repealed, but ma- are some of the typical possibilities a
chined as smaller or larger than the original. yet slil! keep il scaling function can be beneficial:
at Ihc same lime. To achieve this goal. n can· o Similar parts in terms of their geometry
called the Scaling Function is used. Note the
following two imponant ilems: o Machining with built-in shrinkage factor
DESCRIPTION
a scaling factono all
means the programmed value
Scaling process is nothing more
than multiplyi value by the scaling
factor, based on a scaling center point. The programmer Magnification
Reduction I
must supply both scaling center and the scaling Jaclor.
Through a control scaling can be made Figure 43·1
effective or i of the three main axes. but Comparison of a part reduction (left) and magnification (right)
not for any additional axes. majority of scaling is ap- wifh a part in full scale (middle)
plied to Ihe X and Y axes only.
It is important to ce.rtain values and preset PROGRAMMING FORMAT
amounts are not function, namely
various offsets. The are not To supply the control unillhe rf'flIllH"P,
o Peck drill depth Q in G83 and G73 G51 Scaring mode active
o Stored relief amount for G83 and G73
406
• Scaling Center
C :: SCALING CENTER
15M uses IIJIK La specify the center point of scal-
in XlY/Z axes respectively. These values are on the
.. "r,,.,,,,'\""\n't>ri as ahsolute values. As the center point con-
location of the scaled tool pafh, il is important to A I to A8 and points B 1 to B8 in the illustration
know one major principle: contour change points of the Lool path.
b • Scaling factor
p.rogram., using a
one cut around the part periph-
without any scaling.
04302
(PROGRAM 04]01 SCALED DY 1. OS FAcroR)
I'll G20
N2 G17 G40 G80
N3 GSO (SCALING OFF) 3.0
N4 G90 GOO G54 X-l. 25 Y-l. 25 S800 M03
NS G43 Zl.O HOl MOB
N6 GSl IO JO KO PI.OSO (FROM XOYOZO)
NI GOl Z-O.7 FSO.O
N8 G4l X-O.7S DOl F2S.0
N9 Y1.75 FIS.O
I'110 Xl. S Original contour
I'lll G02 X2.5 YO.7S IO J-l. a
,
I'll2 GOl Y-0.7S
N13 X-1.25
'\ .... -
Program 04303 is more complex. Figure 43 -5 is the orig- I Z-O 500 3/4 SCALE AT Z-O.2S0 I
inal conlour. Figure 43-6 shows contour details with new
scales and depth, Program starts with the smallest scale and Z-0.12SI
works down. Note the very imponant blocks N712 and
N713. Each contour must start from lhe original start point!
are
a certain amount time to
lathes are also equipped with
accessones that arc usually
of the most noteworthy and typi-
additions (or features) of this kind are:
o Chuck control
o Tailstock quill
o 8i-directional turret indexing Figure 44-1
Part chucking - external
o Barleeder Note the setting of the CHUCK
Several other also be available as
some applications, such as ng, it is necessary
mable Opl
10 open and close the conlrol. Two M
o Parts catcher runctions Ihal conlrol the chuck or
ing arc normally available,
o Pull-out
o Tailstock and quill • Chuck functions
o Steady rest I follower rest Allhough the assigned
o Part stopper funclion'» may vary Cor
application is exactly the same.
o ... others as per machine design Typical M functions \0 conlrol arc:
Some of these are fairly common, so it is
worth lookjng at rhem in some detail and Wilh a fewexam-
ples of their programming
CHUCK CONTROL
Example:
In manual operations, a a or a special fixture programming procedure would Indue!.:
mounted on the a lathe normally opens and SLOp and dwell:
when the CNC a foot pedal. For
safety reasons, a chuck is cannot be opened. MOS (STOP SPINDLE)
because il is protected by an interlock. An- Ml.O {OPEN
Olher Important feature of G04 UO.l (DWELL 1 SEC:OND)
close depend on the method Ml.l (CLOSE CHUCK)
nal. A key switch is avail M03 (RESTART SPINDLE)
44-} shows the di
is a very si Il1pl i tied sequence. in which the clwd I I::.
are relative LO the the lime required for the bar (i'or example) 10 through to
, found on the ma- the stop posilion. Some barfeeders do not spin-
CLOSED - that has dle \0 \0 feed the bar Lhrough have a
special programming rouline of their own.
409
410 44
cfln also be used on {he machine, jaws may be hard (usually serrated for
mode in manual mode. (normally bored by the CNC operator to
II will Only soft jaws can be modified .
• Chucking Pressure
amounl of force required to clamp a
is called the chucking pressure. On most
is contTol1ed by an adjustable valve, usually in
Inil,mck area. Once the chuck pressure has been sel, il is
not changed very often. However, there are Jobs re-
the chucking pressure to be increased (tighter p) or
(looser grip) frequently, usually within lh~ same
Such special jobs will benefit from a
mabie chuck pressure control.
-- o
usually in the way of lOol motions, so make sure
body
A typicaltailstock has three main
o Quill
o
• ilstock Body
body is the heaviest part of the latht! It
IS mounled 10 the hed orllle lathe, eilher manually during a
1 or lhrough a programmable option, hydraulically.
Programmable tai is norm<llly available only as a fac-
Figure 11-2
lory installed option and must be ordercrl :lIthe time ma-
Tvpical three-jaw chuck lor a CNC lathe
CNC LATHE ACCESSORIES 411
This example first uses TOI \0 face stock to {he spindle Bars of material are stored in a special tube that guides
center 1ine. Then T08 comes I n, the center drill, and makes the bar (by pushing it or pulling it) from the tube LO Ihe area
a center hole. When the center drill moves in a clear posi- where machining takes place. The only limitations are the
tion, tailsiock body moves forward and locks, then the quill bar length and the bar diameler. They are specified by the
moves into the work. TO! comes back to rough Out the barfeeder manufacturer and the spindle bore diameter of
chamfer and diameter, after which T02 comes to finish the the CNC lalhe.
chamfer and diameter. When the finishing is completed.
spindle stops, quill moves out, Ihen (he tails lock body Many ingenious designs of barfeeders do exist nowadays
moves backward. The operator sets the tailslock position. and the programming method is heavily influenced by the
design of the partjcular barfeeder.
At Ihe encl of the joh, T02 is in the active position. Thrl(
means M 18 bas to be programmed at the program begin- The functions conlrolling (he chuck opening and closing.
ning, to get a short indexing from T02 to TO I. {he block skip function, the M99 function and several spe-
cial functions, are Iypical aids and tools available for pro-
Watch how (he M 17 or M 18 functions are programmed - gramming barfeeders. Many of Ihese functions had been
their location in a particular block is very important. Either discussed earl ier.
function by itself will nol cause the turret to index - it only
sets the direction! TxxOO will make the actual indexing. • Bar Stopper
All this leads to one question - how do we fwd out if the Although the bar movement from [he guide tube is con-
available CNC lathe has a built-in automatic indexing di- trolled by the chuck open and chuck close functions (M I0
rection (shortest direction) or a programmable direction? and M 11), the target pOSItion for the bar slill has to be pro-
There is a good chance that on CNC lathes where only the vided, in terms of how far it has to move au! of the guide
forward direction Lakes place (automatic indexing is nol tube. This position should be lower than the bar diameter
available), (here is a feature called the programmable direc- and on the positive side of the 2 axis (.025 shown). This is
Tioll, available in Ine form ofM 17 and M 18 miscellaneous- the amount to be faced off (20 at the front face assumed).
or similar - functions. Figure 44-6 shows the example.
Although the tendency on modern CNC lathes is to incor-
BAR
porate the automatic tunel indexing direction IOto the con-
TRAVEL
trol system (which means thaI Ihe control system makes The
decision), there are some benefits in having [he program-
mable method available for special machining occasions.
As an example, Ihink of an oversize tool mounted on Ihe
turret. The tool is perfectly safe, as long as it does nor index BAR
STOPPER
the full swing of the turret Automatic indexing has 110 pro-
vision for such a situation! ......
With a programmable indexing, the programmer has a
complete control. Programming such a setup in a way that I?G
,0
will never cause Ihe turret to index full 360 0 al any time is
possible. This may not be a typical situation - it will take a ~
few seconds extra time, but it can happen quite oflen. Figure 44-6
Bar stopper position for bar travel
BARFEEDER ATTACHMENT
The program is quite simple. It will use the M 10 and MIl
functions. but also another two functions thai mayor may
Barfeeder is an external allachment to a CNC lathe that
not be required for a particular barfeeder. These oon-stan-
allows small and medium cylindrical pans to be machined
dard miscellaneous functions are (in the example):
without interruption, up to the number that can be ma-
chined from a single bar of several feet long. There are
many advantages of using barfeeders, particularly those of M71 Barfeeder ON - start
the modern hydrodynamic design type, rather than Ihe old
M72 Barfeeder OFF - stop
mechanical design. For example, sawing operations are
eliminated (replaced with a much more precise part-off
1001), no sofl jaws Lo bore, unattended operation is possible These functions are only examples and may be different
(at least for an extended period of time), stock material for a certain barfeeding mechanism or unnecessary alto-
economy and high spindle speeds can be achieved on many gether. flere is the sample program:
models with many Olher advantages.
4 Chapter 44
This kind of unattended lathe machining uses an- lar 10 Ihis formal (item numbers rArrpt:1C"H,n list):
feature of the control system - parts caunter.
04404
may be counted via a program (usually a user macro), or by
selling the number of required parts on the N ..
They may also be programmed by N •• T:loc •• MOS (ITEM 01)
neous functions, for example: N ••GOO XO Z .. (ITEM 02)
N ..G98 G01 Z •• F .. 03)
Count ... ascending order N ••G04 UO.S (ITEM 04)
N ..M1.0 (ITEM 05)
Count down N ••GOl Z .• F •• (ITEM 06)
N ••G04 uo.S (ITEM 07)
N ••M1.l (ITEM 08)
number for the cOUn( is usually N ••G04 U1.0 (ITEM 09)
ity or the required number of parts from a N., GOO Z .. (ITEM 10)
at the end of lhis chapter will N •• X •• Z •• T>oc.OO
N .. G99
counter function and other features.
N ..
• 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:
417
418
o milling o of high
particularly in
o Helical profiling
o Extended
o Helical ramping
Ll Elimination of tapping heads
the three gTOUpS, the lhread milling is by far
o Elimination of <1vrU",''''IO
mosl common method of helical interpolation applied in
industry and is described next. The last two applications are o No need in tapping)
similar, although used less frequently and will be de-
scribed later ill this chapter as well.
o power of the tool versus the cut
1/5th is not unusual)
There are two familiar methods of producing a on o Reduction of overall threading costs
a CNC machine. On machining centers, predominant enhances other threading it
method of thread generating is tapping, normally not Lhem. It uses special threading cutters,
cycle G84 or 074. On CNC lathes, a lap is fhread hobs, or special multi tooth thread milling
(without the use of a cycle), but the majority cullers. In both cases, there is one common for both
threads are machined by the single point types of cullers - the pilCh of thread is built info The cutter.
the block method of 032, the simpJe cycle
repetitive cycle G76. • Conditions for Thread Milling
• Applying Thread Milling For successrul thread milling, three conditions must
before writing a program:
There are many cases in
lapping or the point o Control system must support the operation
difficult, or impossible in a a Diameter to be threaded must be pre machined
difficulties can often overcome
milling melhod instead. a Suitable thread milling tool must be selected
most common industrial
All three conditions must exisl simultaneously.
lion feature of the control.
HELICAL MILLING 419
THE HELIX
The words helical and helix are quite common in CNC
programming and appear in this and other publications
quite frequently. Perhaps it is time to look at the terms relat-
ing to thread milling in more detail.
The main word that is used in this context is the word he-
lix. The word helix is based on the original Greek word for
Figure 45-/
spiral. A dictionary definition gives us some clue as to its
Typical thread milling cutters. meaning - it suggests that a hellx is anything ill the shape of
Solid carbide (left), single insert (middle) and a double insert (r(qhtj
the thread of a screw. Helix is defined in the" Machine!\"·s
Handbook" by Industrial Press, Inc., New York, NY. USA.
• Premachining Requirements this way:
A hole for a tap cannot have the same diameter as [he tap "A helix is a cun.'e generated by a poilll moving aVOlli Q
itself. It has to be smaller to accommodate ilie depth of the cylindrical surface (real or imaginary) at (I COllsrnlll rare ill
thread. The same rule applies to heJical milling: the direction of the cylinder's axis."
o If the thread is milled on the inside di ameter This quite detailed definition means that the helix is a
of the part (internally), the premachined diameter curve created by a circular mOlion of a poilIl 011 a cylinder
must be smaller that the nominal thread size or a cone, combined with a simultaneous linear advance, A
o If the thread is milled on the outside diameter curvature of a common screw thread is a typical example of
of the part (externally), the premachined diameter a straight helix.
must be equal to the nominal thread size
A cutting Lool motion based on the mathematical defini-
Either diameter (internal or external) may be slightly tion (using three axes), results in a helical motion, also
larger or slightly smaller than the 'normal' size, but Lhis de- known as helical interpolation.
viation is decided by the required 'fit' of the thread.
r 45
,
y xv VIEW ~ TOP z
•
I
ISOMElmC
,
z ~FRONlT YZV~EW-
45-2
A helix shown in four standard views - two revolutions are shown between the top and the bottom of the helix
in Figure shows a
is a three-dimensional obiect) in four
is shown in these views:
o top view (XY) shows only a circle.
D The front view ,XZ) shows the helix from the front.
o The side view (YZ) shows the helix from the standard .. . . . . . . . . . .- . . ...... 4
right side view. 10 ~-;;;~- ~ ~+
DOWN UP
t
M03
UP DOWN
There is one last consideration, the In the example, the radius is in block N6:
mainly its height. The
revolutions are required to cut N6 GOI G41 XO.7S Y-O.75 DOl FlO.O
single insert cutter will
ing catalogue, determined that two next block is the lead-in are, with .750 approach fa-
ficient 10 mill the required thread. X Y axes will he needed:
90 x .0833333 / 360
Lt .0208333 (.0208)
R1A5
• Calculation
brochures or product catalogues may
Figure 45-7 on the helix angle of the threading
Lead-in and lead-out motions for thread P'''''TInJP 0450 I still remains unchanged. The thread
(top view is shown) milling cutter must by the distance that is equiva-
lent to the pitch amount in one revolution (360°). a
lend·in arc is only a portion of the pilCh is
However, would bring the
grammed. The amount of travel has to be calculated
threading cutter into the srraighl! the culler
previous example).
has the threading teeth it would cut a series of
of the earlier one. It also
grooves, not threads. Th of course, is unacceptable.
this time based on the
To make a better cut, stall with 11 helical motion for the
lead-in arc. '111at means adding Z to the circular
motion, in the upwards direction. amount ofthe Z tar-
get posilion must be calculated, not Helical ap-
proach has to consider pilCh the of
travel on the circumference of (he lead-in arc.
IIiY' wh ere ."
The thread pitch in the is
I, "" Linear travel in helical interpolation
1 / 12 = .0833333 A =:: Amount of interpolated (angle)
TPI Threads per inch
and the degrees traveled on the 90°,
from XO.75Y-0.75 to X 1.5 YO. • Milling the Thread
Considering that the thread mill has (0 advance Because of the cutter
for every 360°, it has to advance onc quarter oflhat UJ~'lal\Iv"" oiutions have been to
each 90", thread. For each revolution, that is
calculation of the linear travel can be from position of the cutter must
formula: is the .0833333 value in
is a helical milling and
can
A x P
360 absolute method will be then incre-
method:
IIiY' where ... Ne G90 G03 Xl.S YO Z-0.S4S9 1-1.5 (TURN
N9 G03 XI.S YO Z-O.7626 1-1.5 (TURN 2)
'-t Linear travel in helical
A Amount of interpolated (angle) repelitious data will not appear in the
P 1 / TPO comparison, try 10 program the two
menial
90° in Ihe example will be:
HELICAL MILLING 5
• Complete Program
The complete nrtHTr"rn
,I
/ \
'i
Figure 45- 10
Schematic illustration of a helical mOl ion used for ramping - program 04502
428 45
NlO I-O.37S Z-O.OS (CUT 3 BELOW TOP FACE) helical mOlion. Figure 45-10 shows the schematics of the
Nll I-O.375 Z-O.OS 4 BELOW TOP FACE) program in different views.
Nl2 I-O.375 z-O.05 5 BELOW TOP FACE)
Nl3 I-O.37S (CIRCUIJ\R BOTTOM CLEANUP) interpolation can be a very powerful
N14 G90 GOl G40 XO f'Ot:~'1'Tl;o'/;.T TO XY START)
mi , irreplaceable by any other
N15 GOO Zl.O M09 though it is a conlrol option, ils
N16 G28 Zl.O MOS
program output the
N17 M30
% justify extra cost.
Throughout the handbook, there have been dozens of INDEXING AND ROTARY AXES
programming examples. They all shared one common fea-
ture - they were aimed at the vertical machining cenlers. All programming concepts that ve been discussed so far,
There was a reason for this approach. First, there are more apply equally (() CNC horizontal machines. The XY axes
vertical machining centers in machines shops overall, and are used mostly for drilling and contoUling operations, the
mixing I wo different types of mach ines would make all ref- Z axis controls the CUlling depth.
erence material more complex. Second, almosl every sub-
ject covered so far for lIlt: verlical models is equally apJJlic- Horizontal maChining cenlers differ from Ihe vertical ma-
able LO the horizontal models. So what are the differences? chining centers not only in the axes orientation and the lype
of work (hat can be machined. One of the major differences
The horizontal machining center mainly differs from a is an additional axis.
vertical machining center in ils genera! functionality, While
a vertical machine is mostly used for only one face type of This is an indexing or a rotary axis, usually designated as
work, a horizontal machine is used for work on many faces the B axis. Although the two terms are often used inter-
of the part during a single selur. This fealure alone makes a changeably, Ihere is a difference between them.
horizontal machining center a much more versatile ma-
chine - and also more expensive. Figure 46-1 shows the D An indexing table will rotate the part that is mounted on it,
comparison of the axis orientation. but it cannot be used simultaneously with any kind of
cutting motion. This type supports a positioning motion.
o A rotary table will also rotate the part that is mounted on it,
'If' but a simultaneous cutting action is possible. This type
<cL
supports a contouring motion,
429
430 Chapter 46
- --------------
,
Z+
-X+
Figure 46-2
n'---" SPINDLE
8180.0
890.0
8270.0
8247.356
CW 90 degrees
CCW -90 degrees
CW 180 degrees
CCW -22.644 degrees
B axis direction and general descriptions BO CCW -247.356 degrees
8-37.0 CCW -37 degrees
The table size including the size of comers is imponant to
determine the clearances before indexing. B42.0 CW 79 degrees
842.0 No motion (0 degrees)
• Table Clamp and Unclamp Functions
8-63.871 CCW -105.871 degrees
In order to maintain a rigid setup, the indexing table must
be clamped [0 the main body of the machine during a cut.
The next table is similar. The first column is the pro-
For indexing motions, the table must be uncJamped. This is
grammed indexing motion in G91 mode, the second col-
true of most machining centers. For this purpose, manufac-
umn shows the motion directions and the actual resulting
turers offer special miscellaneous functions - two functions
absolute position. All rotational directions are based on the
wlJl be used in the examples:
perpendicular view to (he XZ plane.
o Table Clamp ... for example M78
o Table Unclamp ... for example M79
o Incremental Mode - consecutive indexes:
The function numbers may greatly with different ma- Programmed motion in G91 Actual i'lhsolute position
~
chine designs, so check the manual for proper coding. G90 G28 BO Machine B zero position
Normally, the unclamp function is programmed before G91 G2aBO Machine zero - no motion
the indexing, followed by the B axis motion and another GOO B90.0 CW 90.000
block containing the clamp functlon:
B180.0 CW 270.000
M/9 Unclamp table B90.0 CW 360.000
GOO B90.0 In.dex ID.ble 8270.0 CW 630.000
me Clamp/able BO No motion
Some designs require other M codes. for example to con- 8125.31 CW 755.310
trol the clamping pln or a table ready confirmation. 8-180.0 CCW 575.310
The B axis is programmed logically the same way as the 8-75.31 CCW 500.000
linear axes, including the mode of dimensioning. Either the 8-75.31 CCW 424.690
absolute or the incrementa! mode can be used for indexing, 8-424.69 CCW 0.000
using standard G90 and G91 commands respectively.
HORIZONTAL MACHINING 1
04601
G90 GS4 GOO X.. Y.. Z ..
M79
:eo PART
J
M7S ,, ; ,
ample illustrates the method. The next section describes Ihe ..-,
0 0
N 0
work offset setting for the Z axis and tool length offset. N N l-
, I
/
I !
-~[
chine gauge line. Then, the tool length is accuralely mea-
sured. It is a positive value representing the actual tool
length from ils tool tip to the machine gauge line. This is
(he amount that wifl be input into the corresponding tool
.... H- length orfset register. There is only one problem - where is
PART rhe relationship of this measured amount to the part posi-
';{I ><: tion? In the touch-off method, (he tool touches the part and
TABLE the relationship is dIrect. The preset method has no contact
I I I I I
H =NEGATIVE VALUE - one additional seTting mentioned earlier has to be made,
This setting [s an entry or the distance hetween machine
Figure 46-5 gauge IIne and the ZO of the current work offset Z address -
Touch-off too/length offset merhod - layout with H as negative Figures 46-7 and 46-8.
HORIZONTAL MACHINING 3
y y
-+Z
G54 (Z-NEGATIVE)
I-
w
CD
0:::
«
l-
i~
10
N N•
.------;--'----, ( OIST-TO-GO
1<111 :
- I
I 1- H
TABLE
I
H :: POSITIVE VALUE H = POSITIVE
46·7 46-9
Preset toof length offset to ZO=face -layout with H as positive Preset tool length offset to lO=center • layout with Has posit.ive
y
was to the ZO position at the
option exists irZO is set as the cen-
-500.000 In fact, it is only the perception of a
0.. is the same in reality. Figures 46·9 and
i= change from the last two
.....I
o only because of the additional di-
o
l- the distance from the program zero
I
values in the program will ruso
Z-298.0 I dimensions are taken from ZO at the table
of part
-q[-
j<lll
.200.0
--lao-:
I
H= VALUE
Figure 46-8
Preset too/length offset to examD,/e with Has positive
The tool then normally to the Z-135.0 All the depth calculations are
Overall, this selup application is the same as
previous one. The operator must know is 20 IV'I.·Q' ... ·\.J
- 0250
for every job. This information from the
CNC in the
a
RETURN TO MACHINE RD
TOP
XZVIEW
In vertical relUrn to machine zero has
been programmed tool in majority of cases. The
relUm was along the Z axis only. reason was sjmple -
on a vel1ical machining Z machine zero is syn-
chronized with the automatic tool This is not the
case on a horizontal center.
Due to its design, [he
lion before each lool
06THRU
, 13.75 TYP
respects, programming IS
exactJy the same. 6.875 TYP
Here is a comparison a before a lool
change for the IWO machine FRONT
XY VIEW I
26.875
Vertical: G91 G28 ZO
t 1_·««««««««<<<<<<
J......;..""'-l--:.....:..;!H-i-+--J.-.J-i-.J 0 .000
Horizontal: G91 G2B YO zo
The question is what is lhe Z axis relurn in the
when only the Y return IS answer is a
one word - safety. Although only the Y is to
612 HOLES IN COLUMNS
a successful automatic lool change, the tool to be
away from (he pan al the same time. The return lhe 2
17 HOLES PER COLUMN
makes It easier. Of course,
46-11
clearance in the Z axis would also
That may pwve more difficult than it <In.,,,,,,,",, Practical ex;:;tmfJ.fe ",,,'UJllJ/r:; 04602
in an index position other than zero,
discouraged by the
tools, different part faces, fixture in the way, etc .. it
to always know exaclly how to retract
a subprogramming will nimize
length. The program does not use clamp
is why a simple rule is worth
and uncJ~mp sequ~nces, w.hich is typical to rotary type
~ aXIs. If the machme requIres unclamping before
and clamping it after indexing. use M
functions for clamp and unclamp the table.
HORIZONTAL MACHINING 435
Before getting into the program itself, the tools and their 04602 (MAIN PROGRAM)
use need [0 be selected. Only two tools will be required, a (START FROM MACHINE ZERO - TOI IN THE SPINDLE)
10 mm spot drill and a 6 mm drill. Figure 46-/2 shows the (XOYO = FIXTURE CENTER I ZO = BOTTOM OF PART)
critical positions of (he two (001 lips. (T01 - 10 MM DIA SPOT DRILL)
(T02 - 6 MM DIA DRILL THRU)
~-
INS G28 BO
N6 G90 G54 GOO XO Y26.875 S1000 M03 T02
, Z127.000 N7 G43 Z275.0 H01 MOS
N8 M98 P4651 LIS
1"'\-- R LEVEL
N9 G28 YO ZO
NlO GlB BO
Nl1 MOl
I
~--INITIAL LEVEL =Z275.000
Nl2 T02
XO N13 M06
N14 G90 G54 GOO XO Y26.875 S1250 M03 TOl
Fjgure 46·12 Nl5 043 Z275.0 H02 MOB
Detail of tool data used in program 04602 Nl6 M98 P4652 L18
N17 G28 XO yO ZO
The R level is the same for both tools and the depth for NlB G2B BO
Lhe spot drill also includes a small chamfer [0 deburr the N19 M06
N20 M30
holes. Drilling depth guarantees a full drill penetration. Ac-
%
tual calculations are not important here, but they do follow
the same rules established in the earlier chapters. 04651 (SUBPROGRAM FOR SPOT DRILL)
NlOl G91 G80 Y-6.875 (MOVE DOWN BY PITCH)
Development of the subprogram needs some work, Two Nl02 G90 Z275. 0 (CLEAR Z)
subprograms will be used. They are virtually the same, ex- Nl03 G91 BI0.0 (ROTATE BY 10 DEGREES)
cept for the fixed cycle selection. Seveml olher methods Nl04 G99 G82 R-148.0 Z-5.4 P200 F120.0 (DRL)
cou ld have been aJso used, but Ihis chapter concentrates on NQOS YL3.75 L16 (16 MORE HOLES IN Y PLUS)
the indexing table only. The two subprograms will start at Nl06 GSO GOO Y6.875 (MOVE UP BY PITCH)
the bOltom of the pattern, at the BO location (0°). This hole Nl07 G90 Z275.0 (CLEAR Z)
will be used as the start position only but will not be drilled NI08 G91 BIO.O (ROTATE BY 10 DEGREES)
NlOS G99 G82 R-148.0 Z-5.4 P200 (1 HOLE)
until all other holes have been done. The hole is not drilled NllO Y-13.75 L16 (16 MORE HOLES IN Y MINUS)
yet, but the J00 indexing has to be included in the NUl M99 (END OF SUBPROGRAM 04651)
subprogram. That is the reason for starting one column %
away. Two columns are part of each subprogram with a 10°
index between them. Comments in the subprograms ex- 04652 (SUBPROGRAM FOR 6MM DRILL)
plain (he process. Note the area marked in Figure 46-13, in- N201 G91 G80 Y-6.S7S (MOVE DOWN BY PITCH)
dicating the subprogram contents. N202 G90 Z275.0 (CLEAR Z)
N203 G91 BlO.O (ROTATE BY 10 DEGREES)
o Q 0 (I
N204 G99 G83 R-148.0 Z-15.84 Q7.0 F200.0 (DRL)
o
o 0 0 0 0000
0 0 0 0 N(T"J..;:tlO
N205 Y13.75 L16 (16 MORE HOLES IN Y PLUS)
O..-N(T"J-.::t C')('jC')("')
, N206 G80 GOO Y6.875 (MOVE UP BY PITCH)
N207 G90 Z27S.0 (CLEAR Z)
N208 G91 B10.0 (ROTATE BY 10 DEGREES)
Subprogram contents N209 G99 G83 R-148.0 Z-15.84 Q7.0 (1 HOLE)
N210 Y-13.75 L16 (16 MORE HOLES IN Y MINUS)
N211 M.99 (END OF SUBPROORAM 04652)
%
1 -
u co
w- l.JJ
u
li LL
~
120
16
FACE A
U (Q
l.JJ ---- l.JJ
U U
«
LL
«
LL
L NG
By definition, an automatic pllilet is a work table thal can The popular rotary type works on the principle of a turn-
be moved iol'o and out of the machining posilion by a pro- table, where one pallet is outside of the machine, the other
gram command. If a purpose of such a design is to improve pallet is in inside of the machine. The pallet change com-
a nonproductive setup lime, it is necessary to have at least mand rotates the pallets 1800 and its programming is very
two independent pallels available - while the part on one si mple. Figure 46-15 i Iluslrates the roeary type ..
pallet is being machined, the other pallet is available for
changing the setup for the next job or for unloading and Z+
loading individual parts. In this way, the machining and the -X+
setup can be done simultaneously, shortening or even to-
tally eliminating the unproductive time.
Although a two pallet system )s the most customary for
horizontal machining centers, designs with up to tweJve
pallets are not uncommon.
/
• Working Environment (
For a typical dual pallet changer, two major areas should - .- -"" ---
be distinguished: \
o Pallet Also popu lar is the shuttle type. This design incorporales
o Machine locator double rails between the load area and (he receiver inside
tlie machine - Figure 46-16. Tts programming is still Simple
o Transfer System but more involved than for the rotary type.
Pallet is the portable work table with a ground surface to Z+
which we mount the fIxtures and parts. The table can have
T slots. tapped holes or bOlh.
Machine locator (also known as a receiver) is a special
device located inside of the machine. Its purpose is to ac-
cept and firmly hold the palJetloaded wilh a part ready for
machining. Its design must be very robust and accurate at
the same time.
Transfer system (also known as a pallet loader) is the sys-
tem that rransfers pallets between the load area and the
machine work area.
Orten the terms load and unload are used. Load means to
move the palJet into the machining area, unload means to
move the pallet into the setup area. The transfer system de-
termines the Iype of the pallet
PALLET 1 PALLET 2
• Types of Pallets
Figure 46- 76
There are two general types of pallets, based on their
TVpical shuttle type of a pallet changer
transfer system:
o Rotary type Both pallet types are loaded from the machine front area
Other pallet types are also available for some special ma-
o Shuttle type chining applications.
MACHINING
Wriring a CNC program is the final result of manual pro- PROGRAM WRITING
gramming. This last step requires a sheet of paper, or many
sheets of paper, that contain the program. The program IS Writing all collected data into a final version of the CNC
composed of individual instructions related to n:~chll1mg part program is one of the last items inside of the program-
and arranged in a series of sequential blocks. W.rttlOg does ming process. To get to this stage requires hard work
not mean usincr only·a pen or pencil. Modern Wnlll1g meth- through all other stages - when all thoughts have been col-
ods employ a ~omputer and a text editor, but the result is lected, all decisions have been made and a certain level of
still a written copy of a manually generated part program. comfort has ,.:,etlled in. In the previous chapters, the empha-
Manual program development is the result of a lot of hard sis was on the program development as a logical process.
work. A short program with a few lines of code may be as Now, lhe focus wi Il shift at the actual method of writ! ng the
easily entered into the control directly as to be written down CNC program, following this logical process.
on paper. However, the written copy will often be required Wriling (he program is based on two initial factors:
for documentation and other reference purposes.
o The corporate standards . .. company decides
The need to program by hand seems somewbat back-
wards in the aoe of computers, printers .and other hi-tech o The personal style ... you decide
c .
wonders but it is a method that will not dlsappear any lime Both factors can be adapted simultaneously in a single
soon. W;iting a part program manually requires lime and is
!.wogram - LIley are fully cOlilpati ble. It i::; unreasunable tu
always subject to errors. Manual work means wo~k b.y expect any indus!l}' or world-wide standards relating to the
hands, so it seems that a need for special computer skills lS various techniques of developing a program. It may be even
not required. Is thai a correct assessment? less reasonable to let any company based standards, unless
In lhe traditional way, a program can be written with a there is a general set of rules and rc:commendations already
pencil and a paper (and a five pound eraser, as an old car- ill existence.
toon claimed). Its final form is transferred to the control The final result is that the first guiding factor - company
unit, a short program may be keyed inlo the system directly.
standards - is replaced by the second factor - personal style.
by pressing various keyboard keys. For long progra:ns, thiS
From an objective point of view, there is nothing wrong at
approach is a waste of time. The moder~ alLernaUve (0 a
all with a personal style of programming. If the program
pencil is the keyhoard of a compu~er, Ll~lOg a ~Jmple ~exl works, who cares how it was done. From a revised point of
editor 10 make a plain ASCn text hie, WIll) no tormaHlOg.
view, it needs 10 be acknowledged that a CNC programmer
The computer creates a CNC program as a file stored on the
can never succeed in isolation. Programming involves at
hard drive. This tile can be pnnted or send directly to lhc
least one user of the final program - the CNC operator - and
CNC machine. The only difference is that the computer thac makes il. in effect. a team work.
keyboard has replaced the pencil and the editing features of
the text editor have replaced the eraser. Even today, a greal The most common problem with uncontrolled personal
amounl of manual programming work in is still done in style is inconsistency. Any CNC machine shop that i:m-
writing, using a devices such as pens, pencils, calculators ploys - or plans to employ - more than one programmer.
and erasers. should establish certain minimum standards pn:pa-
ration of a part program. Adherence to these slandards al-
Reoardless of the media used, learn how the computer -
lows any team member to pick up where another member
the c~ntrol system - interprets the written program. what
has lert. Often. the personal slyle ofille firSI programmer in
syntax to use, what to avoid and what form~( is correct. the company will carry 011 and on and eventually becomes
Even if not programming manually al all, It lS Important to
{he company standard, for better or worse. Such a situation
know Ihe principles of program writing techniques, in or- may well be very positive. but in most cases it needs revalu-
der to make changes in any program that was developed by
ation or at least a bit of modernizing.
a CAD/CAM syslem, if necessary.
To define a company standard, first evaluale some sug-
eNC program should be written in such a way geslions and practical observations thaI may be helpful \0
that it can be interpreted without a difficulty prepare the program efficienlly for any style [hat may be
suitable (0 foHow and useful in [he future.
441
442 Chapter 47
• legibility of Handwriting For instance, all and printers (even the old
preparation systems) use a special method to
Writing a assistance of a computer
individual characters on the screen and in print.
and a text means a CNC program in I,
handbook there is an obvious difference between a
A wriuen program (preferably by pencil) is
letter 0 (as in a narrow digit 0 (as in 000
easier to correct without a mess and i[ should be double or
even triple when written on a sheet of paper. Indi- The same technique applied (0 personal hand-
vidual words in a block should be by a writing. Take fact that (here is no letter 0
space, to further legibility. This way, any additions used on most controls except as a program num-
or future changes (if necessary) can ber and in a comment where a misprint will not
quite easily, yet still keeping lhe overall appearance create a problem If preferred, find a
paper copy clean neat. Problems with nation only ror the rest is all digits 0 by
manually generated are much of a fault - unless hundreds zeros are identified specifically
the program is into a computer text file. and in a unique way in part program.
in those cases, the copy be illegible for
cal reasons, such as a printer toner, for
• Programming forms
o or 0 DIGIT ZERO
ryday
legibility of programmer's handwriti tern. The lS to prepare the program
portarH. Make a special effort when on a computer and send it directly 10
ters (alphabetical or numeric) that can CNC through 11 cable connection.
Depending on
can be confusing to exam- users today do not use a punched
letter 0 digit 0 can look the same. tape anymore, if still do, it is usually for old ma-
the leller Z can be con leiter 1 chines only. More modern methods are available, such as
I as well as a low case l are exam- disk storage of a or laptop computer. an
arc only some of the most obvious examples, interface computer and the machine,
but many olher characlers can also confusi depend- be IransfelTcd reliably, thus
ing on person's handwriting. Try to a punched methods altogether.
tem writi technique 10 distinguish potentially confusing method is as the program still has to
characters is a relative term, of properly formatted.
WRITING A CNC 443
o Use default but check them first length hav!:! he!:!n saved
o Do not include program comments in a rather very short the program
and messages to the CNC operator may become some cases, so here are sev-
methods lhal have been above example:
o Use comments descriptions on
a !':epilrilte pi~ce of paper o Program description has been
Organizing the process will definitely o Block numbers have been eliminated
for example. many instructions in a o G21, G17 and G54 have been eliminated
block as possible, dividing them into many (correct settings assumed on the control· be careful! 1
vidual blocks. if possible, use fewer tool
o Zeros following a decimal point in a
'~"',",~U. even if thai is possible, etc. At the
full number have been canceled
same lime, watch side effects when eiimi-
naling or deviating from an program format. o Some blocks were Joined together
There is no doubt thai many these measures will result o GSO GOO has been replaced by GSO only
in some compromise between convenience and necessity. (GOO is redundant, although
When thinking well ahead organizing the work prop- o zeros in GOO. 1,
erly. the results will W011h erforl. have been removed
the program data source (usually slored T03 is the current This designation
media) to be included in the documen- vary depending on the tool systems
any special instructions thut may be rc- particular machine \001 builder. use of
ler, the rmiCllillc operaLOr or viallons In the program comment - ElM IS a
form for a 4-flule end mill.
PROGRAM DOCUMENTS 9
Once conditions are rollowed. the program however, does not take into
can be viewed along with its description right on the direc- chine shop realities, even if lhey are
tory screen of the control system. or even wrong. A small conflict
a delay in delivery, a
If an additional that does not fit the 15 charac- and similar problems, all cOniribUlC 10
ters is needed, enter more comments in subsequent blocks. programmer in many companies.
They will not seen on the screen, bur can still from all sides, the programmer no
be handy for documelllation. They will be to improvise, even III times of Crisis. Programmer has to
displayed processing on all controls the reality a lillie more If
that accept Ihe com ments. length of these comments is there is no choice, always try to find a rensollable compro-
not usually limited to 15 but never as an excuse for being sloppy.
450 Chapter 48
The freedom in programming is considerable but it is not sheet may have to be done for every machine or at least for
unlimited. A normal part program cannot be wrincn with- every machine type. A very simple setup sheet is shown in
out knowing the machine setup and the tooling to be used. Figure 48- J. Feel free to improve it as necessary,
In many cases, the nature of the job offers many Solulions.
Even if Ihe exact setup, or the exact rool to be used are not
known, thi nk of some ideas, have some opinions - but have
ideas and opinions based on experience. The compromise 07-Dec-01
does not rest with the 'now or later' situation, it rests in the TOP FRONT
selection of the mosl like!.}' possibility. If something has \0 .... G54X ..
be changed, make sure the changes will be minimal. ·]n any
case, it is quite possible Ihat the setup sheet and/or Ihe tool-
Ing sheet will have to be modified after the program has
been proven and optimized.
• Setup Sheet
In many shops, setup sheets are a luxury. 1t is a simple
stalement of fact, but many setup sheets are quite poorly
prepared if lhey are prepared al all. Often. they do not re- Figure 48-1
flect the latest program changes and adjustments. they are Simple setup sheet form - onlv basic data shown
not consistent between individual machines and even pro-
grammers. Although the rime spent on preparing a setup A well designed setup sheet should also include informa-
sheet is considered nonproductive from the cost angle, i! is tion about the malerial used for machining, material the
a time far from being wasted. The setup process can be program is based on. Not only the type of material, also its
organized, certain rules can be set and adhered to and they rough dimensions, amount of stock for machining, its con-
can be applied to the preparation of a good setup sheet. dItion, and other features that are important to include in
program documentation. This information is very valuable
The golden rule of a good setup sheet is 10 make it in at its conception and will be even more valuable in !.he fu-
scale. Setup sheet using an outline of the material, fixtures ture, mainly for repeated jobs. Many times, a program is
layout. finished shape, tool path. etc., should always be made when the blank material is nOI yet available. If the
done in scale. Scale. even an approximate scale, is very im- programmer finds out later that there is too much deviation
portant for visual companson. Clamps and other mounting from the estimated conditions, the necessary changes are
devices should be drawn in positions corresponding to the easier to make with good program documentation.
actual setup. Tool change location should be marked accu-
rately, different views shown. if necessary. Critical posi- Although not a strict requirement, some programmers in-
lions should be dimensioned, indicating the maximum or clude [he cutting time for each machining operation on the
minimum distances. setup sheet. When the job is run for the first time, the actual
CULLing time is unknown. As the program is used and opti-
If a cutter radius offset is used, the speeds and feeds re- mized on the machine, it becomes proven and eventually fi-
fleci a certain nominal cutter radius. Atthe discretion of the nalized, the cutting time becomes known with morc preci-
operator, the cutter radius may be changed within a reason- sion. Knowing the cuUing time may help in planning the
able range. This range should appear in the setup sheet, in- load work on the CNC machine. The most useful cutting
Cluding a note on the adjustment of speeds and feeds. time for an individual part is the chip-fa-chip lime that in-
1n many cases when the culler exceeds a certain length, it cludes all the supplementary times (for example the [001
may lnterl"ere with !.he part or olher tools. In these cases, the change time, part replacemenllimc. etc.), nO[ only the cul-
setup sheet should include the maximum cutter length al- ting time Itself,
lowed within lhat setup. For a chuck work on a lathe, (he
maximum grip of [he material should be speclfied In the • Tooling Sheet
setup sheet as well. Although the tooling is really part of the setup, it requires
The main purpose of a setup sheet is to document all de- a separate set of data, thaI mayor may nol fit on the setup
tails of how the pari IS mounted on the machine. That sheet. If Ihe setups and tools used are constantly simple, it
means it has to cover the part holding method and reference may be more convenient to have only one sheet, describing
point relationships (part, machine, and the cutting tool). It Ihem both. However, for large or complex setups. making a
has (0 descrihe the positions of auxiliary devices used, for separate tooling sheet is more practical. Both, the setup
example, a lailstock, a barfecder, a vise, a face plate, hard sheet and tooli ng sheet, are part of the same documentation
and soft jaws, and many others A master form for a setup and complement - nOI rep/ace - each other.
PROGRAM DOCUMENTS 451
With an access to a personal computer, the chances are the nature of the particular comment or
all 10 each program are stored in com- should have the operator's name, current date,
In Ihal case, the only limiting factor is Ihe sofrware even current time, the mach! ne and job description, as
structure to name the files. For example, the old as other details that may be relevant and
up to eight alpha numeric in future.
file name and another three alpha nu-
for tile extension. Since Windows 95, .. Filing and Storage
names are allowed, up to 255 characters plus quite bulky, particularly when
extension try to advantage of this feature. Regardless media, as large size
of CNC , establish a fi Ie nam tng convention
etc. The storage of
Lo ble restrictions. There are several office steel fil ing
this approach. to evely work shift, al-
One IS an I order. In thIS simplest persons should be
form, ail related to the firsl program would
be - for POOOOOO I, the next program would be any kind media for storing [he part
POOOOOO2, etc, I f the zeros are ypnV"n""
sure they are safely stored in a separate
the files will not order on than file folder itself. Magnetic devices
display. No . The scc-
are particularly to conditions and should
number as the be stored from any source and magnetic field
maya good (including a They should be kept
that are not Jobbing shops. in a dry and dusl Keeping duplicates (or
customers means dealing even tripl in a is also a good and safe
types of drawing numbers. The variety
procedure. A very much less bulky - is stor-
may thai it is almost impossible (0 Gnd some age of proven programs on a Disk) or a DVD
common ground for Another variation on (Digital Versatile Disk),
the same theme is ajob numbel~ rather than a drawing num- and software. Although still
ber. In many jobbing shops, a number the mo- away from all heat sources, they are not a
me!'ll Ille order is Number is always netic fields.
used as the num-
Individual sheets or pages the part
ralion should be either numbered
Hopefully, the reference number on each page.
tional ideas that will suit a ",Cl,rf,r'''"'lr nets should be identified as to their contents.
There are no given rules on common enough requirements, but
individual there are no together, usually because [here is no
dard of part program losophy behind an orderly filing is
is always use the old common. sense that is often cess to a required program that provides instant
not so common. Common sense rale information.
standardization The quality
ured by its usefulness in the future.
time a particular standard can be
of thought has gone into its
PROGRAM VERIFICATION
I !ypi error can cause a severe problem when the low them thai can be found
runs on the machine. Could an error prevented? program is on machine are numerous. it
if so, how? some techniques to . . ."'1"""'''' successful in rheir dcrcclion.
3
454 Chapter 49
For example, a missing coolom function M08 in the pro- One method of graphic verification of a CNC program is
gram can be switched on manually al the machine, without a screen plot. This optional control reature will show all
interrupting the program processing. That is an example of programmed tool mOlions on the screen. The motion will
a soft error - it is still an error, but classified i.1S a minor error. be represented as lines and arcs. The feed rate motions will
appear as a solid line of the selected color, rhe rapid motion
A hard error occurs when the program processing must will appear as a dashed line. The display of the tool path
be stopped by the operator, as the only available choice, will appear on the screen of the controL
and without doing a damage to the machine, cutting tool,
pari, or all of them. A common example of a hard error is a Many contTOls offer a graphic simulation option, where
programmed tool mOlion that cuts in Ihe wrong direction. the 1001 path IS simulated on the screen. Each cutting tooJ
The program itself is wrong and must be corrected. This is can be shows by a different color or density, making the vi~
an example of a hard error, classified as a major error. sualization easier. Some graphic simulation uses actual tool
shape and Ihe part for a realistic display. The negative pari
Most CNC operators do not like delays, especially delays of any graphic verification is [hat it can only be used when
caused by somebody elsc. A dedicated machine operator the program is loaded into the control.
Will do anything possible to correct a problem without any
assistance. For program errors, the operator wi II try to fake The second verification method is much older than the
corrective measures 10 clllninate the problem. Not every first. It is a hard copy ploUed representation of the CUlling
operator is qualified [0 do even a simple change to [he pro- 1001 motions, Hard copy plotting has been available in
gram. On the other hand, some qualified operators may not computer programming for a long Lime. To get [he benefits
be authorized to do program changes as a maHer of policy. of hard copy plouing, a pen plotter and a suitable software
will make it work. The plotter is seldom a problem In com-
Every company benefits greatly, if the CNC operator has panies using CAD software but may not be available to
at least a basic training in CNC programming. The purpose small machine shops. The required software is also part of
of such a training is nOl [0 make the machine operator a a large computer based programming system and can be
fully qualified CNC programmer. Its purpose is to highlight quile expensive. A simple version of a pen ploUed tool path
how a part program influences CNC machining, the setup, is a screen dump, usually to a printer.
tooting and all (he other relationships between program-
ming and machining. Its purpose is to offer the operalor There is a third method of graphIC verification and can be
tools Ihat can be used for minor program changes, etc. Such done in the office. It uses a computer and software specially
a training, if it is designed and delivered in a professional designed 10 read a manually generated program, then dis-
manner, is always a worthwhile investment. It may be a plays the 1001 path on the screen. Some software even uses
relatively short traming thai will pay for itself very quickly. a solid model like features, so the actual surface of the part
Time delays on CNC machines are costly and the sooner after machining can be seen as well. This is very useful for
the program is made functional, the less damage Lo the pro- 2-1 J2D and 3D lool path veri fication.
duction control has been done.
Whenever a program has been changed at the machine, AVOIDING ERRORS
the program documemation must reflect these changes,
particularly if they are permanent. Even a small permanent The goa! of every programmer is (0 write error free pro-
change should be always be documented in all copies of grams. Thatls almost impossible, since any human activity
program documentation. is subject to errors. Programmers with all levels of experi-
ence make miSlakes, at least once a while.
G VERIFICATION Since the prevention of errors should be the main goa! of
any programmer, this section looks at the subject in more
Programming etTOrs can be costly, even if their cause IS a deplh. The most com mon mistakes will be evaluated, along
minor human error. Omilled lIlil1u~ sign, a misplaced deci- with suggestions to prevent, oj' at least to minimize, their
mal point, an illegal character - all are mi nor oversights that happening. First, what exactly is a program error?
cause major errors, Although a visually checked program
should be error free. that may not always happen. The hu- Program error is the occurrence of data in a program
man eye is weaker when it evaluates nongraphic elements, that will cause the CNC machine to work contrary
to the intended plan or not to work at all.
One of the most reliable methods of part program veflfi-
carion is a graphic display of the \001 path as it appears in All errors can be classified into two groups:
the program. Almost all errors relating [0 the 1001 path can
be detected early, by one of three avai lable graphic veri fica- o Syntax errors
lion methods
o logical errors
VER IFICATION 5
Allhough the average distribution programming errors Logical errors cover an unlimited
could be generally splil al 50/50 "~t.,,o,>~ the syntax and For the following lathe program is
errors, cenain conditions swi the balance. A
programmer with limited experience wi!! all kinds of 04901
errors, An experienced programmer more er- (EXAMPLE WITH ERRORS)
rars. look at each error group. N1 G20 G40 G99
N2 GSO S2500 T0400 M42
N3 G96 S530 M03
• Syntax Errors N4 GOO G41 X12 0 ZO.l MOB
group are usualJy to deal with, once I N5 GOl X-O.06 FO.012
/ N6 GOO ZO.2
. Syntax error is simply one or more char- / N7 Xl2. 0
program that are either misplaced or do not be- NS zo
This error covers program that do not N9 GOl X-0.06
to the programming format as syntax) of mo GOO ZO.l M09
the conlrol system. For example, a lathe control systems do N1l X20.0 Z5.0 T0400 MOl
no! character Y. If the control encounters the let-
ter Y in a program, it wil] it as a syntax error nnd
the won't run. The same result will when There are errors in 04901 example. Try to
is programmed for most milling tify them before further.
can nor be used with eitJler The first error should - a tooloJfse/ is missing. In
V - it is an illegal character most the block N2, tool T0400 is without an offset. ThIS
Yet, it is very character In a fOllr block is correct Block Nil is the return to the Indexing po-
control. sition and the tool offset lallon, which was never pro-
grammed. The error is in N4 - it should be:
NB zo FO.012
After evaluating the three errors, what chances are there • Calculation Errors
that the control will return an error message? Nil, zero,
Using malh functions and formulas is a part of develop-
zilch. A11 errors in the example are good illustrations of log-
ing CNC programs manually. The type of calculation er-
ical errors. They may not always be easy to find. but they
rors include a wrong numeric input, even when a pocket
can creale a lot of additional problems if not found early. calculator is used. Keying a wrong fonnuia, wrong arith-
metic sign or placing parentheses in a wrong position, all
COMMON PROGRAMMING ERRORS represent a serious error.
Rounding Error
Strictly speaking, there are no 'common' programming
errors. Every programmer makes some unique mistakes. It A special lype of an error is causeu by incorrecf round-
is difficult 10 lisl any errors as being more common than ing. This error is an accumulative error that results fTom too
others. It is also true, that some mistakes are made more many dependent calculations. A rounded value used in
frequenlly than others and in that sense they are more com- olher calculations may lead 10 an error. In many cases the
moo. Focusing on this group should be beneficial. error will be too small to cause any problems, but never
counl on it. It may become a very bad habit.
Both syntax and logical errors share the same cause - the
person who writes the program. The mosl important step Calculations check
towards eliminating errors IS the idenli ficalion of a problem
- ask yoursel f 'wha' mistake do I do repealedly ?' Every- To prevent math errors when using fonnulas for calcula-
body makes some 'favorite' mistakes, the solution lies in tions, it is a good idea to check the calculated result once
the correct answer \0 this simple question. morc, USlng a differelll formula. Math is a generous science
and more than one calculation method is usually possible.
Most errors are a result of insufficient program planning
and a lack of precise progr<lmming style. Planning offers a • Hardware Errors
sense of direction, style offers tools and organization.
The lasl type of program errors is by tile malfum:tion oj 11
The simplest - and the most frequent - error is an omis- hardware element of the control system or machine. In
sion of some fundamenlal instruClion. It may be a coolrlnt CNC, even a bug In the software is possible. Their occur-
function, program stop. a missing minus sign and olhers. rence is rare, as modern controls are very reliable. When
Even the whole block may get 10SI, mainly when preparing encountering an error, don't blame the control or the ma-
the program from poor sourCt;S. Many errors are caused by chine as [he firs! {JIU:/ only possible cause. It shows igno-
the programmer's inability to visualize what will exactly rance and unwillingness 10 address the problem responsi-
happen when the program is processed. To this category bly. Before callmg for a service, make sure to exhaust all
belong all errors relating to setup, tooling and machining other possibil tties of error detection first.
conditions - cuts that are too heavy or 100 lighl. insufficient
clearances and depths, incorrect spindle speeds and CUlling • Miscellaneous Errors
feedrates, even Ihe selection of wrong tools for a given job.
Some errors can be traced 10 the part drawing. A n error in
• Program Input Errors lhe drawing is possible, but first make sure to interpret the
drawing correctly. Drawing errors include too many or too
Most programs are hand wrillen or typed and have to be few dimensions, rom tolerances, etc. Also make sure to
transferred to Ihe control system or a computer file. Many work with the latest drawing version only.
errors are caused by the incorrect inpw of intended data.
Keep in mind thaI if somebody else is using the program, Other errors may be caused by the wrong setup, tooling
its legibility and syntax is very important. or material. These are not programming errors, but they
have to be considered as possibilities. With some common
Input errors also i nel uue errors caused by forgetting to in- sense. and sUltable precautIons, many programming prob-
put significant characters in [he program. These sirings can lems can be cltminated. For example, to prevent an un-
be almost anything and can cause a serious problem. A proven program to be processed as a proven program. just
missed coolant function is not likely 10 cause a big prob- mark il as unproven. Mark it at Ihe beginning of the pro-
lem; a missed decimal point or a wrong 1001 retraction will. gram and leave it there untl! the program is checked.
Olher errors ale insufficientlool clearances, a depth Ihalls
100 shallow or too deep, errors relating to cutler radius off- A complete elimi nation of errors is not realistic. Mistakes
sel (this is always a big group). Be also careful when can- do nol happen - but mistakes are alwa}'s caused. Inexperi-
celing or changing modal program values. One common ence, negligence, lack of concenlraLion, poor altitudes, are
error is to cancel one kind of motion by replacing it with just some causes. Always program with the attitude to
another type of mOlion in one block, then forgetting to rein- eliminate programm errors altogether. Thnt will be the
Slate the previous motion later. Cirst step Lo making fewer errors.
CNC MACHINING
457
458 Chapter 50
These two consideraliol1s are equally important - if only Control Settings Check
one of them is weak, the final result is not satisfactory. AJ-
ways aim at [he highest level in eilher category. Also keep 0 Is the coordinate setting registered (for G54 to G59)
in mind thaI the setup integrity has to be established again
0 Are all the offsets entered correctly
with each run in the future. 111e program integrity has to be
established correclly only once. 0 Is coolant necessary
0 What is the status of the BLOCK SKIP switch
• Setup Integritv
0 Is the optional program stop MO 1 active (ON)
The machine setup is only a general description of the 0 Is the DRY RUN off if the part is mounted
lype of work actually done to gellhe 'CNC production go-
Ing. The whole process covers Ihe setup of the CUlling loots, 0 Do you start with a SINGLE BLOCK mode set to ON
as well as the part selup and many related tasks. No single 0 Do you start with spindle speed and feed rate
check lisl can ever cover all points that have to be consid- overrides set to LOW
ered during a CNC machine setup. 111e major look here is
0 What is the status of MANUAL ABSOLUTE switch
at the most important considerations. in II form of 11 brief
(if applicable)
check list. Adjusllhe individual poinls according to the ma-
chines and CNC systems in the shop. Adjusl the lis! 10 re- 0 Has the position read-out on the screen been set
flect personal working methods ancVor programming style. from zero (origin preset)
The main purpose of this check list, or any Olher for [hat
mutter, is to cover as many details as possihle and not to Machine Tool Check
omit an important item, operation, procedure, etc. Even a
small omission may cause an accident and part damage or 0 Is the slide lubrication container filled with the proper type
even a scrap due to a raully machine tool setup. ot oil (lubricant)
Cutting Tools Check 0 Is the coolant tank filled
0 Is the chuck and tailstock pressure set correctly /tuming)
0 Are the tools properly mounted in holders
0 Has the machine been zeroed before running a job
0 Are the proper inserts used - is the read-out set to zeros
(radius, grade, chipbreaker, coating)
0 I!'; th ere p.nough prf!!,;~ Ilre for the fI ir 1"Ittflchments
0 Are all the tools the right size (air hose, etc.)
0 Are the tools placed in the proper magazine station
• Program Integrity
0 Are the offsets set correctly
(set zero to unused offset values) Any new and unproved program is a potential source of
0 Is there an interference between individual tools problems.]n manual CNC programming, mistakes are a lot
more common than in a CAD/CAM program. A good way
0 Is the boring bar properly oriented (milling) to look at a new program is Ihrough the machine operator's
0 Are all the tools sharp eyes. Experienced CNC operators take a direct approach
when running a new program - they lake 110 chances. That
does nOl mean the CNC programmer IS not to be trusted - it
Part Setup Check simply renects [he facl that the machine operator is ulti-
mately responsible for the expected quality of the work and
0 Is the part mounted safely is aware of it. He or she has a sense of great responsibility.
Whether the damage La the part or even the scrap is caused
0 Is the part properly oriented on the table (milling)
by the program or for some other rcason is a littJe consola-
0 Is the proiection of the part from tion when the work is rejected.
the chuck safe (turning)
What does the CNC operator look for in a new part pro-
0 Is the part lined up for squareness (milling) gram? Most machine operators would agree that the first
0 Are the clearances sufficient anu the most important thing is the consistency in program-
ming approach. For example, are all tool approach clear-
0 Are all the clamps away from the cutting path
ances the same way as always? If nOl- is Ihe.re a reason? Is
0 Is the machine at its start {home) position the basic programming formal maintained from one pro-
betore you press Cycle Start gram to another program and from one machine to an-
0 Does the tool change take place in a clear area
other? A good operaw(" scans the written program twice -
once on the paper copy, the second time when the program
CNC MACHINING 9
it visually. Using a douhle Watch for lool motions in general and be sure 10 ,\latch
.. ".m...,.., can be prevented. There is specifically, Repeat this step, If not
10 graphically check the program on a
sure with any aspect of the programmed tool
simulation and file comparisons, o STEP 6 Reset the part
The style is very important in now is the
ov,:;.rem[)ll<JlSI2~ed.
Consistency is the in the fixture again. The I
confidence of the operator in the pro- steps allows continuation with
gram illtegrity, time AI this point. check the
the ad and air pressure, clamps,
RUNNING THE fl PART etc., just 10 be sure.
o ] Make a trial cut
The CNC machine starts a new job by
studying the with the program, An trial cut may be required in to
mainly the and tooling sheet. The next whether programmed speeds and reeds are reasonable
few procedures lhal will or nol and if the various offsets are set properly. Trial cut is
vary Iy. they will remain the same a cut that is designed to idemify
for most johs in offset sellings and their
sure the trial cut leaves enough material for
o STEP 1 - Set the cutting tools cut also helps 10 establish Lool
within limits,
Th is fi rsl step uses the or the looling infor-
malion from the part operator selS the o STEP 8
culling tools into their tool stations
and registers all 1001 nnrT'oh",l"<' control memory. At this ne<:essar'v adjustments are finalized in
Make sure the tools are sharp properly in the order to before production begins.
holders. TIlis slep adjustment (usually a wear
offsct). It is to adjust spindle speeds and
o STEP 2 - Set the fixture feedrates, jf
The fixture thai holds or o STEP 9 - Start the production batch
the machine, squared and
part is not mounted at this A full batch production can start now. Again - a quick
documentation. particularly second double check may prove to worth the time,
drawing may often be reqUired as well.
o STEP 3 - Set the part
Place the part into the fixture and make sure it is safely
mounted. Check for possible inlerferences and in
the setup. This slep represents the end of most initial
of CNC machine operation.
o STEP 4 - Set the tool offsets of the
will be two kinds ()f
Df:re:nding on the lyre of Ihis
the tool geometry and wear offsets, path:
set cutter radius offset, if o Tool path simulation
important parlS of this slep is (he
nate (work offsets G54 to or o Tool path animation
(G92 or not both. Work have been described in the
and most conventent selection
1001 setup.
460 50
More one view can be set at the same lime on the The cost
display screen. ng a split screen method, also W/II-
promise in quality
dow.'> or . Many CNC operators run the upgrading (optimi-
display especially for milling systems - once 111 the speeds and feedrates.
XY lime in the ZX or YZ view. optimization. Milling
display is turned on. The operations may require a approach then turning
mode, areas that arc too small or operation'>. Jobs that are repeated frequently, as well as
(or reduced for lOIS, should be scrutinized with even more care.
Cutter radius [001 in mind that only one second on a cycle lime
functions can be turned on or off will save one hour for each batch of half an
Make sure the 51 mu!ated cond llions are hour for each 1800 pieces, and so on.
as possible. Also, do nol forgetlo
set before the program is lesled. In the following check list are some
Unfonunalely, this option also adds to the overall when optimizing a CNC
cost of the control system and many companies choose not but it should serve as a
La purchase il. into and be explored. Some in
only [0 milling operations, others only 10
instructions cannot be lested by us- are also some items that apply to bOlh ,,,,,,<,,,,,'"
most controls, there will be no a special option of the cont("ol
Many other 1001 to available.
but what does show will
Since all motions
have been of the control. alilhaL
0 Fine-tune the spindle speed and/or f!::ednne
has to be done run, is [0 concentrate on 0 Choose the heaviest depth af cut possible
those details that seen on Ule display. The tasks 0 Choose the largest tool radius possible
to be checked have down and the program is
easier to follow. (J Experiment with new cutting materials
CNC MACHINING 1
o Consider .nl'H·",rl".,r1
planning, thjngs can go wrong, al
What happens in a machine shop when lhe
only ne is suddenly out of commissIOn? or
only, ahhough deveJ- course, this never happens, except when a rush job is just
more items can be added TO about [0 set up on [hal very machine. It usually happens
modified in their description. when it is least
only once should be
carefully audited. mayan Improvement Ihal can Every
be applied to a differenljob. sometimes in the fULUre. of action.
on another
• Program Updating be
In con!rasllo program (opllmlzation), the rca- Usually is for a specilic machine and a
son for program updating to do with decreas- CNC system. If two or more such have been in-
iog the part cost In the end, the may COSI due to a stalled in shop, can be executed on anyone
change in the or similar interventions, or them. two or more machines and/or con-
but nm because a A program needs LO lrols are totally are not transrerable
be updated after any in [he that of and a new TIle best OppOrlU-
jer.i., the CNC that have been if two machines [Ire differentlll
previously upgraded size, but with the same type. Thc exisling program
may be usable as orwith only minor modifications.
Engineering changes in pari are more common in
companies {hal own In ajob for alternate machine selection
shop, the design are Iypically by the cus- cull i ng tools
lomer, but have the same overall only difference a valluole. Tuuls I rtu:;! alloe
is in the source and origin of are di The pan posi-
grammmg
462 50
When the Emergency Slop switch is released or un- o Set the Single Block switch ON
locked, the machi ne does nOl reslm1 automatically, The Cl Set the Optional Block switch ON
machine setup conditions and other condllions have to
present before the automatic stan call be selected. This con- o Set operation mode to MDI
dition is usually achieved by pressing the Power On switch. o If available, remove the Edit key from the lock
• Parking Machine Slides Several other precautions could be also be used, but the
ones listed are the most typical and should ensure reason-
Several chapters have menlioned a comment that a CNC able safety precautions.
program cannot be executed unless the machine had been
zeroed firsl. Recalllhal zeroing the CNC machine while the • Turning the Power Off
machine slides are at - or almost at - the machine zero, is
impractical and may resull in an overtravel. The machine Procedures vary from one machine to another, so always
zero return needs about one inch minimum (or 25 mm), to consult the machine manual first However, there are some
be away from the machine zero position in each axis. This procedures pretty common to all machines. General rule is
position is often easier LO reach ill the end of work than at its to reverse the procedure of turning the power on. For exam-
beginning, A practical CNC machine operalor knows Ihat ple. if the procedure to turn the power on is
to shut off the machine when the slides are at the machine
1. Main switch on
zero position causes the subsequenl start up 10 lake a lillie 2, Machine switch on
more time. 3, Control switch on
To avoid any potential problems in lhe future, some pro- then the power off procedure will be
grammers make a small program 10 bring the machine
slides into a safe position at the end of work, before the 1, Control switch off
power is turned off. Although the idea is good, the solution 2, Machine switch off
3. Main switch off
to one problem may cause another problem. If the machine
slides arc 'parked' repeatedly at the same position for a Note lhat in either case, there is no one switch to do all
lengthy period of lime, various dirt deposits will collect un- work. This is for the safety of the sensitive electronic sys-
der the slides, possibly causing staining or even rusting in tem of the CNC unit. Also check the exact function of the
and around the 'parking' area. A beller way is to let the emergency switch (described earlier), as it relates to the
CNC operator do the positioning of the slides manually, It machine shut down procedure.
does nOltake any more lime and the slides will never be too
long at anyone position. All that is needed is a motion of
one axis at a lime, 10 a different position every time, Since it EQUIPMENT MAINTENANCE
is done manually, there is a better chance Lbat the machine
position will bc always different. To mainlain a CNC equipment is a professional disci-
pline of its own, In general, it is better to leave any kind of
• Setting the Control System maintenance to qualified technicians. The CNC machine
operator should only be concerned with the basic preven-
Control panel ofUle CNC unit has many SWitches set to a tive maintenance, just by taking care of the machine in gen-
certain Slale at the time of a shut down. Again, variations eral. Modern control systems require very liule mainte-
exist as to what is rhe proper procedure. but a good CNC nance. usually consisting of the air filter change and similar
operator will leave the control syslem in such a state that it simple tasks.
does minimize a potentially dangerous situation, when
used by the next person, Here are only some possibilities ro The manufaclurer of the CNC unit and (he machine
apply before leaving the conlrol system for a break, or a manufacturer supply reference manuals. including special
complele shut down: ones for maintenance, with their products, 111ese publica-
tions should be a compulsory reading for any person in-
o Tum down the feedrate override switch to volved with maintaining machine tools in working order,
the lowest setting electrical. electronic, or mechanicaL Many machine manu-
o Tum down the rapid override switch to the lowest setting facturers, and even dealers, also offer training courses in
maintenancc and general troubleshooting,
o Set mode to JOG or HANDLE
o Set the handle increment to Xl
INTERFACING TO DEVICES
5
466 51
Tape Coding The even parity formatlSO is also k.nown as the standard
DIN 66024 (ISO) or RS-358 (ElA) or ISO code R-840.
A punched tape consists of a series of holes, laid across The odd EIA format is the standard number RS-244-A.
the tape width, where each row represents one character of
the progra.m - a character is the smallesl unit of input. The Most modern numerical controls. providing they have a
punched characters are transferred through the tape reader tflpe render will accept either tape coding auto-
to the control system in a fonn of electric signals. Each matically, based on the pari ly of the firs! end-oj-block char-
character can be composed of up \0 eight signals, repre- acter punched on the tape.
sented by a unique combination of boles punched across
the width of the tape in .1000 (2.54 mm) increments. A Parity Check
character can be any capital letter of the English alphabet,
While punchillg a lape, make sUle llialtlie process IS con-
any digit, plus some symbols, such as a decimal point, mi-
sistent for the whole length of the program tape. Mixing
nus sign, slash, and others.
ISO and ErA codes on anyone tape will result in a rejection
ISO and [fA Tape format by the comrol tape reader. Such a fault is normally called a
parity errOl: The system check for correct parity is auto-
Whcn preparing the tape, try to understand two methods matically performed by the control unit, when the punched
of standard tape coding - one, which employs the even tape is loaded into the CNC memory or processed in a
number of punched holes, and the other, that uses the odd reel-to-reel operalion. The conlrol will check for {he occur-
number of punched holes. The technical terms for these rence of odd characters in an ISO tape and (he occurrence
two systems are Even Parity, when a character is composed of even cha(acters in an ETA tape. The purpose of such a
of 2, 4, 6 or 8 punched holes, and Odd Parity, when Ihe check is to detect malfunction of the punching or reading
character is composed of 1,3,5 or 7 punched holes. There equipment. which can be very costly if it causes a character
is also coding that is a mixture of the two, called No Parity, of one coding to become a character of the other coding.
that has no application for lhe machi ne tools. For ilIustra-
tion of a partial tape coding, see Figure 5J-3. Control in and Out
CONNECTING CABLES
1
most common for communication a
a computer is a shielded and grounded
small wires (at least eight),
plastic sleeve. The purpose of
is to com~eCl the CNC pon
with the computer port (usually 25
cable. Always use a ca-
can reach farther dis-
SIGNAL GROUND
..
choice to withstand interfer-
Wires are identified by
their gauge value, a 22-gauge or a 24-gauge
wire is a good choice for communications.
PIN
DB-25P 0
1 1
2 3
3 2
Figure 51-7
4 5 Typical cable configuration for Fanuc controls
5 4 Regardless of what cable
7 7 good communicalion software
mm"~_m _ _
arion is also needed.
6 and 8 specially designed for
20 6 8
Figure 51-5
Null modem pin connections
MATH IN CNC PROGRAMMING
• Order of Calculations
in solving trigonometric are
In [he fieJd of mathematics, is a precisely defined
ability [0 use a speclf'ic formula and
order in which the calculations are Every elec-
- but in the inability to see the to l"l'>\'\nll',,,,,e- old rules, rna
tronic calculaLor is based on
place. Often, programming i
IS very complex in terms of geometrical
combination of various algebraic the order or
calculalions will follow
nitions of Such a drawing will have so
ments, that overlooking the obvious is possible, even o Multiplications and divisions are "'''"..." ",.",\.1 first
of analytic and spacial "to>l"\.n,;>, o Additions and subtractions follow, is not important
for a 2 and 2-1/2 ax is work, but it is es-
o Any roots, powers to a number, and """"..+i"""
in all axes, particularly parentheses are always calculated
multi surface machining or sur- and divisions.
manipulation. this kind of programming is
not done a computer and CAD/CAM software. following caJculalion will same result with
or wichout parentheses:
471
472 Chapter 52
The multiplication is always performed tirst, regardless Circle is mathematical curve, where every point on the
of whether it is enclosed in parenlheses or no!. If addiuon curve has the same distance from a fixed point. This fixed
must be done first, it mllst be enclosed wi thin parent heses: point is cal!ed a center.
Several terms are directly related to a circle - Figure 52-1:
(3 + 8) x 2 = 11 x 2 '" 22
D CENTER - is a point from which a circle or
These two examples show lhat an innocenlly looking an arc is drawn with a given radius.
small omission may have significant consequences. D RADIUS (radii in plural) - is a line from the
center to any point on the circumference
GEOMETRY of the circle,
D DIAMETER - is a line through the center between two
For all practical purposes, there are only three entities in points on the circumference of the circle,
the engineering drawing: D CHORD - is II straight linc joining any two points on the
D Points circumference of the circle.
D lines D ARC - is any part of the circle between two points on the
circumference of the circle.
D Circles and Arcs
D CIRCUMFERENCE - is the length of the circle
Points have no parts and are represented by the XY coor- (length of the line that bounds a circle)
dinates in a 20 plane or by XYZ coordinates in 3D space. D TANGENT - is a point where a line, an arc or another circle
Points are also created by an intersection of two lines, two touches the circumference of the circle but does not cross
circles or arcs, and a line and a circle or arc. it. This point is known as the point of tangency.
Point is also created by a line tangent to a circle, line Lan- D SECANT - is a straight line that passes through
genl to an are, a circle or an arc tangentlo another circle or a circle and divides it into two sections.
an arc.
Two area sections of a circle have their own names. They
Lines are straight connections between two points creat- are called the sector and the segment of a circle, and are
ing the shortest distance between the points. shown in Figure 52-2:
Circles and Arcs are curved elements that have at least a
center and a radius.
Other elements sllch as splines and slIlfaces are too com-
plex for manual programming, although they are also based
on the same fundamental elements.
CENTER \\
'r-- \
ARC \
~... ~.. ~L!!S!§
Figure 52-2
1 Segment and sector of a circle
~ ~~
D SECTOR - is an area within a circle formed
SECANT by two radii and the arc they intercept
D SEGMENT - is an area within a circle formed
by the chord and its arc
• PI •
PI is a in mathematics to represent the by the system of
ratio of Ihe to the circle diameter. lIs Chapter 4. where lhe
symbol is 1[, it is pronounced 'pie'. and has Ihe value of There are four
and regardless of how many decimal numerals
it will always only an approx- along the
programming purposes, use the value
by a calculalor or computer, usually with six 10
1n both cases, the internal value is a lot Y+
more accurate (han the displayed value. In many cases, ihe
3. J4 IS sufficient for most resulls. =+
• Circumference of a Circle II
a circle - or its circumference - is seldom
o~
and is included bere only to en- - X+
It can be calculated from the
III
(::::2 rrxr QUADRANT
(4)
or
52·3
QUiJdmllts of iJ circle ond the mathematicol definition of
direction
IGf where ...
quadrant is exactly 90°, crossing at circle
C Circle circumference Therefore, a circle has the sum of all
11 ;;;;;; Constant 3,141592654 .. ,
to 360°. Angles are counted
( :::: Circle (ad ius
o = Circle diameter
positive, starling from zero degrees (0°).
Individual quadrant points (also known as
• length of Arc points) are onen compared to a hand direClion on
of an analogue clock or as a direction
length or an arc is also a rare requirement can
0° is arbitrarily located a£ the equivalcm
calculated from [he followIng formula:
o'clock or East direction, at 120 'clock or direc-
lion, 180° at 9 o'clock or and 2700 at 6
o'clock or South direction -
90° North
~ where ...
A
C Circle
11 ::: Constant 3. 141
r Circle radius
A = Arc angle 180" = West 1 0" = East
POLYGONS
s -~
defined by a
that are joined at the end
or edges of the
;
D .".,
c
A Figure 52-6
B
Regular polygon
Inscribed and circumscribed circles and a
(N 2) x 180
A
N
A Single
N Number n n-gon
MATH IN CNC PROGRAMMING 475
F --1 FI tiLt":>,JV
2xS
F Cx
• Taper Definition
s F 8 I tan30°
Most a in two common
-'- 8 F x n30°
~~"_ _ _~R" _~_
8 C 12 o One diameter and length with taper description or note
== F / o Diameter at both and the length with taper
description or note
=-8/
, F==Cx
F = 8/
If a single diameter is
The description
il is onen the larger one.
is a note wilh an arrow pOint-
-,S ing La Lhe Laper. measurements, the noLe may
identify a standard or a per foot (TPF). In mel-
the taper is always a 52·8 [lnel 52-9 <;how
the differences between the LWO which is only wilhln
52·7
the taper identification.
The most common regular polygons· square, hexagDn and octagon
TAPERS L
the Figure 52-8, showing J<..,UF,"''''" method, the • Taper Calculations· English Units
the following meamng: rlr::l'wlrlo dimensions in Figure
I!:i" Dimensions ... data. If the
but we want to
0 "" Diameter at the large end in inches help. To
d :::: Diameter at the small end in inches d and L are known:
L ;:: Length of taper in inches
;:: Taper per foot in inches
X ;:: Ratio value 1 : X
let-
To calculate the small diameter d, with D, Land
• Per Foot
foot is defmed as:
To calculate the ifD, d, and TPF are known:
per foot is the difference in diameter in inches
over one foot of length.
The ratio 1 : X means that over the length of X mm, the the length L, ifD, d, are
diameter 0 f cone (ei ther as an increase or as
a decrease) by 1 mm.
as I : 5 will increase 1 mm
X (if unknown),
,.. ..,..... .",.. as the difference in width
MATH IN CNC PROGRAMMING 477
CALCULATIONS OF TRIANGLES
C
The most common geometrical entity in programming is
a triangle. AJllriangles are polygons, but nOI all triangles ,
are regular polygons. All triangles have three sides, al- B
though nOI always of the same length. There is a number of
differenttriangl~ in geometry, but only a handful arc used 0
A + 8 + C == 180
in everyday CNC programming.
Figure 52-11
• Types of Angles and Triangles Sum of All angles in (I trhw!Jlp. i.<; fllWfJ ys 180 degrees
The main groups of triangles can be grouped together by The oblique triangle - and its close cousin [he Iso.lceles
their angles - Figure 52-l0. triangle - are types of triangles seldom ever needed in rro-
grammillg. However unlikely, it is always possible. These
A < 90° triangles can he solved only if alieasl tbree dimensions are
known, and one of them must always be a side:
B < 90°
C == 90° o One side and two angles must be known
a o Two sides and the angle opposite one ofthem
o Two sides and the included angle
o Three sides
A Isosceles triangle has two sides of equal length. Each side
b - or leg - is joined by a line ealled the basco The two angles
at the base are always equal - Figure 52-12.
a b
c
Figure 52-10
A
Typical triangles
(a) Right triangle (b) Acute triangle fe} Obtuse triangle
IF a == b N A =B
Some more derailed definilions may be useful:
Figure 52-12
o RIGHT angle means that the given angle is equal to 90° Isosceles triangle
o ACUTE angle means that the given angle is
greater than Dc and smaller than 90° A triangle that has all sides of equal lenglh is called an
eqllilalerallriangle. An equilateral (riangle is also always
o OBTUSE angle means that the given angle is an equiangular lnangle, because allmlernal angles are the
greater than 90° and smaller than 180 0 same - each angle IS 60° - Figure 52-}3.
o A right triangle is also called a right angle triangle.
It defines a triangle that has one right angle (90 6 )
o An acute triangle is also called an acute angle triangle.
It defines a triangle that has three acute angles.
c a
o An obtuse triangle is also called an obtuse angle triangle.
It defines a triangle that has one obtuse angle.
AI! triangles share a single feature - Ihe sum of all angles figure 52-13
in a given triangle is always equal [0 180 0 - Figure 52-11. EquiJateraltriangle
• Right Triangles An in a semicircle is , as
A Triangle - or a right angle rriangle is triangle that
Line AB is the
one angle equal to 90° (a triangle with two or more
angles is impossible). As there are I in any triangle
(sum of all angles), that means the sum the two remam~
must also be 90", There is a of mathe-
relationships thal form of
/
is a look at those that are important in
A B
D::: DIAMETER
a right triangle (hal is opposite right angle
hypotenuse and is also the side the Figure 52·16
othertwo sides are called legs. illustration Inscribed angle in a semi-circle
shows a righllriangle, where C
right (90°) and the side c is the hypotenuse. In Figure 7 is a point A to the center of cir~
opposite (0 have a low case identification corre- de B. A line from tangency of the circle will
sponding to described in capital create either a poim The angle a is created be-
(ween lines AC and AB is a bisector of
the angle a! The two angles al
and a2 as well as ABD are idenlical.
B
c
a
A c
b
A= C =90"
Figure 52·14
RighI angle triangle and the relationship 01 angles
Bisector creates two equal angles
A circle drawn
all three sides a, b, c
culated • Similar Triangles
are considered similar if they have
angles equal and their
triangles arc similar, if:
o of one triangle are the same
of the other triangle
a
o An angle of one triangle is the same
as angle ofthe other triangle and
the including sides are proportional
o triangles are similar to another triangle
b
o sides of the two triangles
Figure 52·15
Circle inscribed in Bright In CNC mathematical relationship
angles are ite often, for example, when
tapers or 51 angular items. A Laper specified in
drawing must frequently be extended at one or
to allow tool clearances.
MATH IN CNC PROGRAMMING 479
H Y
~ L...:.-_ _ _. . -_ _ =
H
«~
~---------~««««««««««««««««««««««---- ---~~
Y1
X2 ~----
l = Original
H == Original height
A ;;;;;; Common (shared) angle With lmown values can be
Xl Front clearance ill the X axis If U is isolated on left and knO\vn values on the
:= Back clearance in the X axis right of the equatioll, the calculation is simple:
Yl = Front clearance in the Y axis
Yl = Back clearance in the Y axis u == (2.250 x 0.500) / 1.750
Figure shows the same two triangles in a simpli-
U = 0.6428571
fied way. upper illustration, X • Sine· Cosine - Tangent
and Yare swns of the (clearances)
relationships
x n+X2
Y ::::: Yl + Y2
H L side (b)
==
U W
a b
c tan A =
If of the are known two, the lill-
value can be "'''"••.41.... using a new formula. For ex- b a b
sinB
c = c =
a
ample, the L and Ware known, and the value U
has to be HIS 0.500, Lis 1.750 and W is
To calculate U, the formula is r",w'r<:P,r rml\,v,mol"I" functions· sine, cosine, and
This has its own and is deflned TIle following fonnula converts
as a ratio of sides, using the sine, tangent func- designation to
tions angle. Other functions, namely
cotangent, secant and cosecant are not used in
CNe
o of an abbreviated as - is a ratio of side
the angle to hypotenuse of the triangle
""r'/'I",,'to
oar where ...
o - abbreviated as cos is a ratio of side
",rI",,,,,,.,t to angle to hypotenuse of the triangle DD Decimal degrees
D
o Tangent of an - abbreviated as tan is a ratio 01 side M
the acute angle to the side S Seconds
2 a = V(9
- 7.5625) = Yl.4375
Area:::: c a '" 1.1989579
roo!.
-......
h
P
Tan:::: -
A ::: 90" B ::: 90" - A C b So!1!e
Figure 52·22
Trigonometric functions "",m"",,, for solving right angle triangles
482 52
d c (1 xR
--+-
2 sina x 2 d R-
R-d 2
x2xR 2x R X
a :::
( -1)xR
cosa
tan- 1 _ T_X2 -1
COS - -
2x 2x
Figure 52-24
TANGENT of a circle angle and deviations
CNC AND CAD/CAM
There are at least I wo important reasons why manual pro- It wo~ld be unfair La compare or promote manual pro-
gramming for CNC machines it is nol dead yet and will nol grammmg agamst compuler programming and vice versa.
disappear anytime soon. What . is necessary to promote is the knowledve
D
and undcr-
srandmg of manual programming principles. Without such
The tirst reason is thal in manual programming, the pro- knowledge, one can not become a good CNC programmer.
grammer is able 10 do what computers cannot - and never
will be - programmers can think. Manual programming Most of the CNC programming can be done quite well on
teaches the invaluable lessons of discipline - a very impor- personal computers. The existing technology is prooress-
tant qual ity of a professional CNC programmer. Discipline ing very rapidly and many 2D and 3D programming ~ppl i-
means to concentrate, to constantly evaluate, to make deCI- cations are available for a fraction of the cost when com-
sions - to think all the time. In manual programming, there pared to just a few years ago. This trend will continue well
lS a to[al, absolute and unequivocal control over the final
into the future.
product - the pari program. Only a programmer can evalu-
ate a given situation, analyze the problem and adapt to un- • Desktop Computer Programming
foreseen circumstances. Only a programmer can feel that The complete computer system - [hat means the hard-
something may not be right. Only people usc instruments ware, s.ofLware and peripherals - suitable for CNC pro-
known as thinking process. intelligence, instinct, gUl feel, gramming lS challgmg at such a rapid pace that any In-
common sense and experience. Those are instruments in- depth dISCUSSIon of the hardware would be obsolete in a
~erent to humans, not computers. CNC programming is
rna(ter of weeks. Almost the same speed of obsolescence
like [he work of an artist - it can never be fully autoniated. applies to software as well. New features, new capabilities,
483
484 Chapter 53
new tools arc mi:\rket and are of- TOOL PATH GENERATION
and software
is whatlo
The key requirement of a CNC
program of an accurate 1001 path for a
Such a decision !'nust on the reqllirt>d applicn- chine. The 1001 path crealion, with all ils
lion. What will the What kind of most lime consuming task In manual
work needs to be computerized, What results makes sense 10 make it the most
arc expected? These are the primwJI when planning 10 aUiomale the
the kind of monitor or printer or cess. Only high level CNC a
They fifE' (llso ve.ry importanl - hUI only of (001 pa£hs. For example, helical milling or a full
the application needs. chining are not always in the
Another benefit of a high level CNC software is that it Data is stored in [he computer in two forms - memory
comes well supplied with a variety of useful features. What storage and disk storage (file). When an application such as
makes each system unique, is usually the method of how CNC programming is started, the CAM software is loaded
the programming process is executed. In the early years of into the computer memory. The more powerful [he applica-
development, programming was done by using special pro- [ion software, the more memory it requires.TIlis memory is
gramming languages, such as APT'"")\ ( or Compact IfTM. known as Random Access Memol}!, usually called RAM.
Some languages are still available but heavily on the de- Every software specification identities the minimum avail-
cline. Modern interactive graphics programming has virtu- able RAM required. RAM of today hIgh level computers
ally eliminated the need for languages in just about all man- arounr! the gigabyte range is not uncommon. Any extrC1
ufacturing lields. The more popular kind of programming memory will speed up processing quite significantly. The
is based on interactive graphics. The programmer defines data in the RAM is volatile, which means the data is lost
geometry. typically as the tool path geometry, followed by when the application is ended or the computer power is in-
the tool path itself. Any error in the process is immediately terrupted. To save important data from RAM into disk files,
displayed on the graphic screen and can be corrected before a hard disk or similar media can he user!. For a micro com-
too much other work is done. puter CAD/CAM work. the absolute minimum require-
ment is high density removable drive and one large size
• Hardware Specifications hard drive. Floppy drives of any kind are not suitable.
SpecifIcation oflhe software will determine the hardware The hard drive should have a fast access time and a high
selection. Hardware is a common term for the computer, storage capacity. Another option IS a tape drive, CD-R and
monitor, keyboard, printer. modem, ploHer, mouse, scan- CD-RW disks or recordable DVD disks for backup.
ner, disk drive, storage media, CD writer, and many others.
The hardware refelTed to in this chapter is based on the Input and Output
Windows™ operating systems. Modern operating systems
Input and Output (I/O) computer fe..'llllreS, cover h>lrr!-
are based on a graphical user imeljace (CUI). Some soft-
ware can run under a different operating system, for exam- ware items such as monitor. graphic card, keyboard, digi-
ple Unix (used mainly by workstations) or different Win- tizer, scanner, printer and ploHer, Monitor suitable for
dows versJOns. It is always 10 the advantage of the user thal CAD/CAM work should be a large sile color monitor pro-
viding very high resolution. The monitor and the graphic
the latest version of the operating system and the CAM
soft ware is i Iistalled all the com puler.
card do relate to each other. The card must be able [0 gener-
ate the image, the monitor must be able to display the im-
When th inking of purchasi ng a computer hardware, con- age. Speed of the video output is also very important.
sider carefully at least three major criteria:
A keyboard is a standard feature of a computer and serves
o Performance .,' computer speed as a basic input device. Mouse (or a digitizer on larger sys-
tems) are also input devices, but much rasler than keyboard
o Data storage .,. type and size
input. In CAD/CAM, where a lot of work is done in graphic
o Input / Output ... ports mode under a menu system, the item from the menu is user
selected. In most cases it can be selected with a pointing
device. The user points a[ the menu item desired, presses a
Computer Speed
bullon on the device and the menu item is executed. The
PeJj"ormance of (he compucer system is typically mea- pointing device most suitable for CAM work in the Win-
sured by the relative speed of the main processor. The dows environment is a mouse.
higher the number, the faster the computer can process Both the printer and ploHer are theoretically opllonal. but
data. To make the comparison easier, !he original IBM PC generally worth some consideration. For CNC work alone,
mode! year 1983, had a 4.77Mhz processor speed. Later a printer is more importanllhan a pen plotter. If the setup is
model AT had 6mhz processor speed, improved further to 8 a true CAD/CAM. both peripheral devices may be needed.
and I OMhz. Later, computers used the so called 386 micro-
chip (general1y Intel 80386 or 80486) and reached 25Mhz, All peripherals are interfaced with the compU[er using
33Mhz and more. Pentium processors followed, and the specially conl~gured cables connected 10 the Input/Owplll
process is ongoing. Chips in thousand plus MHZ speed are (I/O) outlets called ports. 111e modem is normally not re-
a reality. For serious CAD/CAM work, the latest fully fea- quired for CNC programming, except for data exchange
tured processors should be used. Newest processors offer with a remote computer or Internet access. The laser or ink
much higher processing speed, and the more processing jet printers generally use a parallel interface known as the
speed is available, the better performance of the CNC pro- CeJ1lronics standard, but many other devices use a serial in-
gramming system. terface. There are also other I/O options, such as the USB
(Universal Serial Bus) interface.
53
(measured in pixels - the more pixels per screen stored for further DH}CeSSU
the finer the display, and the smaller the pixel data, sorts it and creates a
the beller the display) sents the part crp.r\n"lF'Tr\1
o Pointing device - normally a mouse - is a current standard functions.
gardless of its even more,
o ploHer is required only in special circumstances every CN C is program codes are
needed for CNC wU!k) - B ~izt:! maximum is Llsually unique to a single machine, some are quite common to
if needed
many' of a post processor is to
cess the convert them to the machine
for individual control systems.
o Agood quality prinler with a parallel or
(lor hard copy documentation) • Customizing Post Processor
o CD or DVD drive & various multimedia a processor is more or
(sound card necessary) to be customized, at least to some extent.
in-house, usually means to cus-
o Access 10 additional global information
u ......,;)"lJl supplit!u with
(Inlernel. E-mail, usef groups, newsgroups, ... )
oroc:ess depends on type
o Two or morE! serial and changes take
o Text editor - usually part of the software (or optional)
o Technical support for hardware and " .... "rlAI"'''', operations, Concerns about people selection,
backup methods, confidentiality and security, work
No item In Ihe list is any more important ronment qualil y , etc .• are not con fi ned to a
olhers - they are all equally imporrant. should be important in the overall company culture .
Training level 3
D_e~mal inch - Number 1 Letter Metr~ (mml Deci 11I~.U.nch Fraction _INI rj letter M~lri~ jlT\.r:2)~
.0886 2.25 .1772 4.50
.0890 43 .1800 15
0906 2.30 .1811 4.60
.0925 2.35 .1820 14
.0935 42 .1850 13 4.70
.0938 3/32 .1870 4.75
.0945 240 .1875 3/16
.0960 41 .1890 12 4.80
.0965 2.45 .1910 11
.0980 40 1929 4.90
.0984 2.50 .1935 10
.0995 39 .1960 9
.1015 38 .1969 5.00
.1024 2.60 .1990 8
.1040 37 .2008 5.10
.1063 2.70 .2010 7
.1065 36 .2031 13/64
.1083 2.75 .2040 6
.1094 7/64 .2047 5.20
.1100 35 .2055 5
.1102 2.80 .2067 5.25
.1110 34 .2087 5.30
.1130 33 .2090 4
.1142 2.90 .2126 5.'10
.1160 32 .2130 3
.11B1 3.00 .2165 5.50
.1200 31 .2188 7/32
.12'20 :'.! 1() .2205 5.60
.1250 1/8 .2210 2
.1260 3.20 .2244 5.70
.1280 3.25 .2264 5.75
1285 30 .2280 1
.1299 3.30 .2283 5,80
.1339 3.40 .2323 5,90
.1360 29 .2340 A
.1378 3.50 .2344 15/64
.1405 28 .2362 6.00
1406 9/64 .2380 B
.1417 3.60 .2402 6.10
.1440 27 .2420 C
.1457 3.70 .2441 6.20
.1470 26 .2460 D
.1476 3.75 .2461 6.25
.1495 25 .2480 6 ..30
.1496 3.80 .2500 1(4 E
.1520 24 .2520 6.40
.1535 3.90 .2559 6.50
1540 23 .2570 F
.1562 5/32 .2598 6.60
.1570 22 .2610 G
.1575 4.00 .2638 6.70
.1590 21 .2556 17/64
.1610 20 .2657 6.75
.1614 4.10 .2660 H
.1654 4.20 .2677 6.80
.1660 19 .2717 6.90
.1673 4.25 .2720 I
.1693 4.30 .2756 7.00
,1695 18 .2770 j
.1719 11/64 .2795 7.10
.1730 17 .2810 K
.1732 4.40 .2812 9/32
.1770 16 .2835 7.20
Appendix 493
Fraction Number / Letter Metric (mm) [ Fraction Number / Leiter Meuic Imm)
.2854 7.25 .461313 15/32
.2874 7.30 .4724 12.00
.2900 L .4844 3 i/64
.2913 7.40 .4921 12.50
.2950 M .5000 ,/, 12.70
.2953 7.50 .5118 13.00
.2969 19/64 .5156 33/64
2992 7.60 .5312 17/32
3020 N .5315 13.50
.3031 7.70 .5469 35/64
.3051 7.75 .5512 1400
.3071 7.80 .5625 9/16
.3110 7.90 .5709 14.50
.3125 5/16 .5781 37/64
.3150 8.00 ,5906 15.00
.3160 0 .5938 19/32
.3189 8,10 .0094 39/64
.3228 8.20 6102 15.50
.3230 P .6250 5/8
.3248 8.25 .6299 16.00
.3268 8.30 .6406 41/64
.3281 21/64 .6496 16.50
.3307 8.40 .6562 21/32
.3320 0 .6693 17.00
.3346 8.50 .6719 43/64
.3386 8.60 .6875 11/16
.3390 R .6890 17.50
34?'i 8.70 .7031 45/64
.3438 11/32 .7087 18.00
.3445 8.75 .7188 23/32
.3465 8.80 .7283 18.50
.3480 S .7344 47/64
.3504 8.90 .7480 1900
.3543 9.00 .7500 3/4
.3580 T .7656 49/64
.3583 9.10 .7677 19.50
.3594 23/64 .7812 25/32
.3622 9.20 .7874 20.00
3642 9.25 .7969 51/64
.3661 9.30 .8071 20.50
.3680 U .8125 13/16
.3701 9.40 .8268 21.00
.3740 9.50 .8281 53{64
.3750 3/8 .8438 27/32
.3770 V .8465 21.50
3780 9.60 8594 55/64
.3819 9.70 8661 22.00
.3839 9.75 .8750 7/8
.3858 9.80 .8858 22.50
.3860 W .8906 57/64
.3898 9.90 .9055 2300
.3906 25/64 .9062 29/32
.3937 10.00 .9219 59/64
.3970 X .9252 23.50
.4040 Y .9375 15/16
.4062 13/32 .9449 24.00
4130 Z .9531 61/64
.4134 10.50 .9646 24.50
.4219 27/64 .9688 31/32
.4331 11.00 .9843 25.00
. ,4375 7/16 .9844 63/64
.4528 11.50 10000 1 2540
.4531 29/64
494
.~
7/0-9 49/64
7/8·12 51/64 .7
718·14 13116 .8125
718-16 13/)6 .8125 I
718·20 53/64 .82Bl
15116·12 55/64
1/8·40 #3B Hl15
15/16·16 7/B .8750
#6·32 #36 .1065
15116·20 57/64 .8906
#6-36 #34 1110
1-8 7/8 .8750
#6·40 #33 .1130
1·12 59/64 .9219
5/32-32 1/8 .1250
1·14 15/16 .9375
5/32·36 #30 .1285
61/64 .9531
#8-32 #29 .1360
63/64 .9844
#8·36 .1
.0
#8-40 #28 .1405
3/16·24 #26 .1470
3/16·32
#10-24
#22
#25
,1570
.1495
Straight Pipe Taps NPS
#10·28 .1540
#10.:30
#10-32
#12·24 1/4-18 11.50
#12·28 3/8-18 1500
#12·3:? 470 ~·14 18GO
7/32·24 3/4·14 2375
7/32·32 1· i I Y2 30.25
#14·20
1 1/4·11 Y2 38.50
#14-24
I ~·11 ~ 44.50
I • 0
2·11 ~ 56.00
1/4·28
1/4·32
5116·18 TPI Tap Drill Decimal Size
5/16·20
5/16·24 6.90 27 1/4 .2500
5/16-32 7.10 27 11/32 .3438
3/8·16 8.00
3/8-20 18 7/16 .4375
3/8·24 8.50 18 37/64 .5781
3/8-32
1/, 14 23/32 .7188
7/16·14 9.40
7/16-20 9M 314 14 59/61\ .9219
7/i6·24 10.00
1,0 11·1/2 1·5132 1.1563
7/16-28
'/2-13 1·1/4 11·1/2 15000
%·20 29/64 .4531 '1.50
'·1/2 11·1/2 '·3/4 1.7500
'/2-28 1
9116·12 31/64 .4844 2.0
''''/2 2·7132 2.2188
Appendix 495
\
Selective block skip 170
Index Slash 163
169
168
\64
223
97 484
101 \ 477
98 Calculations. 40
99·102 Calculator type 76
98 Canned cycles. 177-190,314·320
102 Cartesian coordinate system 15
28 Center end mill !97
16 Centerline 129
17 Chamfering 299
18 Chamfer dtameter 191
Character 41
Chuck functions 409
?44
235-246
B Ale centel and radius.
Arc cenler vectors
238
238
Arc direction 231
Background edit 465 Arc in planes
Ball nose end mill 273 Arr; programming.
Bar/seder. 170,413 Blend radius.
8-axis. 429-436 Boss millrng _
Bitwise Input 24 Ci rcular moltOn direction
Blend rad III S 301 Elements of a circle
Block. 25,41,61-68 Feedrate for Circular motion
Block format . 63 Full Circle programming
Block numbering 63 Lead·in and lead-out
Block nu mbers incre ment 64 Parrial radius. 240
Block structUIR 61 format
Confllcling words 66 Ouadrants 236
End-Of·Block (£08) 64
block 61-68
block 25
Status block 65
Block skip 21,163-170 liZ3
Barteerier 170 4
Numbered block 170 13
HomOnlal mill in, 439
497
498 Index
G-codes
line, 13>1
47-52 K
C<lnflicting commands . 50
Group l1um bers 51
21
Milling applications 47
Modal commands , 50
Turning applications 49
Types of Gcodes _ 52
in a block
With decimal pOint.
50
52 L
Gear ranges. 2L 50,298
,. 472 179. 190
Geometry ofiset 104,128.157,254
307-322
Graphic display . 29 320
Grooving and part-off 323-334 312
Corner groove 332 313
Grooving ~nOlicallOIJS 323 P and 0 blocks 314,316·321
Grooving dimensions . 324 318
• Yt"--''''o cycle
Multiple grooves, 330 307
Pan-off , 335-338 314
Precision gro<lve . 326 308
groove 325 Lathe 294
Master tool setup 129
oHsels 295
Offset change 295
M
I MOO function 56
MUI function 57
IGES files 33 M02 program end function 58
incremental data mput 70, 72. 43[) !vi03 IuncI ion 59, 79
Indexing axis , 1\30·431,434 M04 function 59, 79
lable 429-436 M05 funClion 59, 80
Iniliallevel seleclio n 181 60, 95
M06 function
In-process 3U M07 function 58
or
Input dimenSions 69-76.429 MDS function 58
tnput format 73 M09 function 58
Zero suppression 74 409
M10·Mll functions.
Inscribed circle 474 M12-M13 functions. 411
Interfacing \0 devices 465-470 410
M15·M16 funclions.
Connecting cables 470 Mi7·MIB (unctiolls. . 412
Data selling , 469 M19 functIOn 60,80,102
ONe 468 M2i -M22lunctions. . 4\ I
Punched tape . 466 M23·M24 thread functions 60. 357
RS-2J2C interface 465.467,469 M30 program end func!lon 58
ll! communication, 46:3 M~ t -M44 lunciions. 298
Intermediate pOint 151 92
M48-M49 functions
Inverse time feedrate_ 87
Index 501
M60 lunction
M7I-M72 function
M73-M74 functions,
M8B-MB9 functions, 15
M9B·M99 subprogram 60, 375,4B2
Machlnabilily 37.81
Machine accessor ies. 55
MachlnB coordinate system. 384
Machine geometry 17
Machrne tock 28
Machine warm-up 175
Machine lero 108 Modal commands
Absolute and incremental mode 152 M·S·T lock .
Intermediate point 151 Multilevel drilling
MAchine zero return 149·158 Multiple cycles
machine lero. 151
commands 151
RSIlJrn /iom maCilllitl Lew . 157
158
156
149·158.434
N
2
30 Numencal control 1-6
191·216 Advantages 2
194 Definition
205 Hardwired controls .
212 Soflwired controls
199,214
201.214
202
209
191,193
208
0
37
28 OHsets 298.315
26,389 panel. 20
32-33 Optional 21,57
36 Orthograph1c oriefliatlClfl. 399
310 Overtravel 108, 122. 150
477
472
471
5%0
53,58
54
P
56
54 PaUet changer 437
related 53,56 PaUet types US
applications 54 Pnrame!ers. 22.
MDI 21,26.389 Parsons, John
24 Part catcher or unloador . .1;d
66,45:2 Pan
36 Pari reference pOln!.
Metne units 69 Part setup
Milling - G·codes. 47 Setup sheet
M-codes 54 P8rt -off
operations Parts counter
Direction o( cui 279 Pattern of holBS
End mills 275-277
Peripheral milling _ 275-280 222
Slots and 281-292 223
and teeds 277 220
Siock removal 279 220
Width and of cut 2BO Random hole paltern _ 217
Minimum axis increment _ 73 row hoi" pattern 2\8
2 Index
Z-axIs
commands 119
\22
R
Position commands 113-118
Definition 113 Radius programming 2~O
Lathes . 115 Rapid positioning 143·1118,271,294
113 Approach 10 Ihe part 148
113 Hockey std motion . 146,151
115 Motion formulas 147
Post 33. 488 Reduction of rapid rate, 26, 147
Power rating 39 1001 path mOlion . 144
PreparatOlY curt!llramJs 47·52 Real number sV8tem . 15
Pr ocess sheet 36 Reaming 214
Program 42 Recess programming 304
Program changes, Li60 Rectangular coordinate system 15
Program comments 66 Reference 107·112. 471-479, 481·482
end , 58 Fixed 108
Program header 45 Flexible point. 108
Progl8iT1 length reduction 4115 Machine lero 107·111.149- 471·479.481-482
Program structure 46 MachIne zero (home) , 108
Program documents 447-452 Part reference point 109
Documentation !lle folder 451 Reference point groups 107
(J program 448 Tool reference point . 112
Setup sheet 449 commands. 113·118
sheet 449 Return to machine zero . 109
Program ideMificatlon 62 Rigid 209,212
Program name 62 R-Ievel selection 181-182
number 62 Roughing and finishing 307
planning 31·40 RS·232C interlace . 30,465,468
Program stop 56
Program verification. 453·456
Avoidance of elfors 454
Detection of errors 453
Graphic method
errors
454
455
S
Thread 360
Program Writing 441-445 Safe block . 65
Confusing characters . 442 Safety in eNC work 6
Long programs 445 function 405-408
formatting 443 G50·G51 commands 405
forms ~42 center 406
Program zero 16.109,273 factor 406
Index 503
W Z
Z-axis fleglaci 28
\IV-axis, 10
Wear olisel 105, )29, 254
Adjuslmem 106
NOTES
505
506 NOTES
NOTES
508 NOTES
Praise For The First
by Peter Smid fills the void for the intelligent reader who
1be simplistic concepts regurgitated in so many other books. " -
close to 20 books on CNC programming and oan honestly say that this is the
bas covered both basic and advanced programming techniques for both mills and
- Houston, Texas,
superb book, very well written, easy to understand, and should be on the desk of every
CNC Programmer and Production Engineer." - Nottingham, England
Extraordinarily comprehensive, this popular and authoritative reference covers just about every
possible subject a typical CNC programmer may encounter on a daily basis. Fully indexed to
help the user quickly locate topics of interest, this "industrial strength" handbook presents most
common programming subjects in great depth and is equally applicable to both CNC milling
and CNC turning operations. Many advanced subjects are also covered, thus making this an
unusually comprehensive reference for machinists, programmers, engineers, and supervisors.
Filled with over one thousand illustrations, tables, fonnulas, tips, shortcuts, and practical
examples, this widely respected publication is structured in a logical order that is readily adapt-
able to virtually all levels of CNC training, from the basic to the advanced.
CNC Programming Handbook has just become more valuable than ever! A new
CD-ROM, packed with actual problem-solving projects and enhancing the
material presented in the book, is included for the first time. Users will find pro-
gramming projects and exercises for most chapters, special programming and
machining pr9jects, solutions to problems, and numerous reference files useful in
CNC programming, as well as several utilities. With the majority of files in Adobe PDF, instruc-
tors will be able to quickly and easily print and distribute any of the projects, exercises, and
references to their classes. Meanwhile, students and professionals will find this CD an effective
self-study aid that allows them to enhance their understanding of the . at a time.